Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review: fix codex auth-error visibility, datadog env, a11y, release guard
Adam Eivyf57c45676246
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 4a1c08f798..97381d2d18 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -103,7 +103,6 @@ jobs:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- name: Archive changelog on main- if: steps.release-check.outputs.exists == 'false'run: |CURRENT_VERSION=${{ steps.package-version.outputs.version }}MAJOR=$(echo $CURRENT_VERSION | cut -d. -f1)diff --git a/client/src/components/apps/tabs/DatadogTab.jsx b/client/src/components/apps/tabs/DatadogTab.jsxindex 66af418f90..d4da9129fd 100644--- a/client/src/components/apps/tabs/DatadogTab.jsx+++ b/client/src/components/apps/tabs/DatadogTab.jsx@@ -20,7 +20,7 @@ export default function DatadogTab({ app }) {const abortRef = useRef(null);const dd = app?.datadog;- const configured = dd?.enabled && dd?.instanceId && dd?.serviceName;+ const configured = dd?.enabled && dd?.instanceId && dd?.serviceName && dd?.environment;useEffect(() => {if (!dd?.instanceId) return;@@ -31,7 +31,7 @@ export default function DatadogTab({ app }) {}, [dd?.instanceId]);const fetchErrors = useCallback(async () => {- if (!dd?.enabled || !dd?.instanceId || !dd?.serviceName) { setLoading(false); return; }+ if (!dd?.enabled || !dd?.instanceId || !dd?.serviceName || !dd?.environment) { setLoading(false); return; }if (abortRef.current) abortRef.current.abort();const controller = new AbortController();abortRef.current = controller;@@ -39,7 +39,7 @@ export default function DatadogTab({ app }) {setFetchFailed(false);const range = TIME_RANGES.find(r => r.value === timeRange);const fromTime = new Date(Date.now() - range.ms).toISOString();- const result = await api.searchDatadogErrors(dd.instanceId, dd.serviceName, dd.environment || 'production', fromTime, { signal: controller.signal, silent: true }).catch(err => {+ const result = await api.searchDatadogErrors(dd.instanceId, dd.serviceName, dd.environment, fromTime, { signal: controller.signal, silent: true }).catch(err => {if (err.name === 'AbortError') return 'aborted';return null;});@@ -77,7 +77,7 @@ export default function DatadogTab({ app }) {<h2 className="text-lg font-semibold text-white">DataDog Errors</h2><p className="text-sm text-gray-400">Service: <span className="text-gray-300">{dd.serviceName}</span>- {' '}· Env: <span className="text-gray-300">{dd.environment || 'production'}</span>+ {' '}· Env: <span className="text-gray-300">{dd.environment}</span></p></div><div className="flex items-center gap-2">diff --git a/client/src/components/cos/CoSAvatarFrame.jsx b/client/src/components/cos/CoSAvatarFrame.jsxindex 8b3c548104..b724fbdf18 100644--- a/client/src/components/cos/CoSAvatarFrame.jsx+++ b/client/src/components/cos/CoSAvatarFrame.jsx@@ -1,13 +1,14 @@export default function CoSAvatarFrame({ children, label = 'Interactive 3D avatar. Drag to rotate.', background = false }) {+ const a11yProps = background+ ? { 'aria-hidden': true }+ : { role: 'group', 'aria-label': label, title: 'Drag to rotate' };return (<divclassName={background? 'relative w-full h-full min-h-full cursor-grab active:cursor-grabbing touch-none': 'relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6] cursor-grab active:cursor-grabbing touch-none'}- title="Drag to rotate"- role="group"- aria-label={label}+ {...a11yProps}>{children}</div>diff --git a/server/cos-runner/index.js b/server/cos-runner/index.jsindex e842a21bf3..09bdb712ac 100644--- a/server/cos-runner/index.js+++ b/server/cos-runner/index.js@@ -473,7 +473,7 @@ app.post('/spawn', async (req, res) => {const isStreamJson = spawnArgs.includes('stream-json');const streamParser = isStreamJson ? createStreamJsonParser() : null;const isCodexCli = basename(command).replace(/\.exe$/i, '') === 'codex';- const codexStderrFormatter = isCodexCli ? createCodexStderrFormatter() : null;+ const codexStderrFormatter = isCodexCli ? createCodexStderrFormatter(prompt) : null;// Store in memoryactiveAgents.set(agentId, {diff --git a/server/lib/codexCliOutput.js b/server/lib/codexCliOutput.jsindex b6c257fbc7..66a6992f25 100644--- a/server/lib/codexCliOutput.js+++ b/server/lib/codexCliOutput.js@@ -26,7 +26,14 @@ function formatCodexRuntimeLine(trimmed) {return trimmed;}-export function createCodexStderrFormatter() {+export function createCodexStderrFormatter(userPrompt = '') {+ // Normalize prompt lines for fast lookup. Trim each line and skip blanks —+ // Codex echoes the prompt verbatim line-by-line, so trimmed equality is+ // sufficient to detect echoed prompt content.+ const promptLineSet = new Set(+ String(userPrompt || '').split('\n').map(l => l.trim()).filter(Boolean)+ );+let lineBuffer = '';let sawRuntimeOutput = false;let suppressCommandOutput = false;@@ -40,8 +47,17 @@ export function createCodexStderrFormatter() {}if (shouldDropCodexLine(trimmed)) return null;+ // While in the prompt-echo zone, drop lines that match the user prompt+ // verbatim. This prevents prompt content like "Debug the api key" from+ // triggering ERROR_SIGNAL_RE below.+ if (!sawRuntimeOutput && promptLineSet.has(trimmed)) return null;++ // ERROR_SIGNAL_RE is only safe to evaluate after we've crossed the+ // metadata block. Once enabled, it lets plain-text auth/billing+ // failures (e.g. "not logged in", "unauthorized") become the+ // first-emitted runtime line even without an ERROR: prefix.const isRuntimeSignal = RUNTIME_SIGNAL_RE.test(trimmed)- || (sawRuntimeOutput && ERROR_SIGNAL_RE.test(trimmed));+ || (crossedPromptBoundary && ERROR_SIGNAL_RE.test(trimmed));if (suppressCommandOutput && !isRuntimeSignal) return null;if (!sawRuntimeOutput && !isRuntimeSignal) return null;if (isRuntimeSignal) sawRuntimeOutput = true;diff --git a/server/lib/codexCliOutput.test.js b/server/lib/codexCliOutput.test.jsindex c90ab2d526..700d8eb18e 100644--- a/server/lib/codexCliOutput.test.js+++ b/server/lib/codexCliOutput.test.js@@ -36,7 +36,8 @@ ERROR: {"type":"error","status":400,"error":{"type":"invalid_request_error","mes});it('does not leak prompt lines containing error keywords before the separator', () => {- const formatter = createCodexStderrFormatter();+ const userPrompt = 'Debug why the api key is not working and why the model is not supported.';+ const formatter = createCodexStderrFormatter(userPrompt);const lines = formatter.processChunk(`Reading prompt from stdin...OpenAI Codex v0.125.0 (research preview)@@ -99,4 +100,68 @@ file outputexpect(lines).toEqual(['🔧 ls -la']);});++ it('emits plain-text "not logged in" as the first post-boundary runtime line', () => {+ const formatter = createCodexStderrFormatter();++ const lines = formatter.processChunk(`Reading prompt from stdin...+OpenAI Codex v0.125.0 (research preview)+--------+workdir: /repo+model: gpt-4o+provider: openai+approval: never+sandbox: workspace-write+session id: abc+--------+user+Some normal prompt text.+not logged in+`);++ expect(lines).toEqual(['not logged in']);+ });++ it('emits plain-text "quota exceeded" as the first post-boundary runtime line', () => {+ const formatter = createCodexStderrFormatter();++ const lines = formatter.processChunk(`Reading prompt from stdin...+OpenAI Codex v0.125.0 (research preview)+--------+workdir: /repo+model: gpt-4o+provider: openai+approval: never+sandbox: workspace-write+session id: abc+--------+user+Some normal prompt text.+quota exceeded+`);++ expect(lines).toEqual(['quota exceeded']);+ });++ it('drops echoed prompt lines matching userPrompt but still emits first plain runtime error', () => {+ const userPrompt = 'Debug why the api key is not working and why the model is not supported.';+ const formatter = createCodexStderrFormatter(userPrompt);++ const lines = formatter.processChunk(`Reading prompt from stdin...+OpenAI Codex v0.125.0 (research preview)+--------+workdir: /repo+model: gpt-4o+provider: openai+approval: never+sandbox: workspace-write+session id: abc+--------+user+Debug why the api key is not working and why the model is not supported.+not logged in+`);++ expect(lines).toEqual(['not logged in']);+ });});diff --git a/server/services/agentCliSpawning.js b/server/services/agentCliSpawning.jsindex f94844f0c4..6161a36a96 100644--- a/server/services/agentCliSpawning.js+++ b/server/services/agentCliSpawning.js@@ -373,7 +373,7 @@ export async function spawnDirectly(agentId, task, prompt, workspacePath, model,const outputFile = join(agentDir, 'output.txt');const isStreamJson = cliConfig.streamFormat === 'stream-json';const streamParser = isStreamJson ? createStreamJsonParser() : null;- const codexStderrFormatter = provider.id === 'codex' ? createCodexStderrFormatter() : null;+ const codexStderrFormatter = provider.id === 'codex' ? createCodexStderrFormatter(prompt) : null;// If no output after 3 seconds, transition from initializing to working to show progressconst initializationTimeout = setTimeout(async () => {