From 656361ffe20c1f41859a0ebc978d75dac5af5039 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Thu, 3 Sep 2026 16:51:00 +0000 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20sweep=20hygiene=20=E2=80=94=20dedu?= =?UTF-8?q?pe=20rstest=20exclude,=20drop=20dead=20Overview,=20move=20Codex?= =?UTF-8?q?=20MCP=20token=20note=20into=20capability=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - examples/rsc-agent-runtime/rstest.config.ts: remove the duplicate exclude key (TS1117); keep tests/route-unit/**. - packages/workbench: delete the unused Overview export from overview-page.tsx (main.tsx renders its own); HostAdoptionSection and BundleWorkflow stay shared; the unit test renders HostAdoptionSection directly. - codex-0.147.0.json: add the dated mcp.pathTokenLowering row; the website generator reads its reason instead of a hardcoded per-host note map. Codex adapterRevision 1.11.0 -> 1.12.0. --- .../codex-mcp-path-token-lowering-row.md | 13 ++ examples/rsc-agent-runtime/rstest.config.ts | 3 +- .../adapters/capabilities/codex-0.147.0.json | 9 ++ packages/agent-bundle/src/adapters/codex.ts | 2 +- .../tests/adapter-metadata.test.ts | 2 +- packages/workbench/src/overview-page.tsx | 139 +----------------- .../workbench/tests/overview-page.test.ts | 36 +++-- website/plugins/generated-reference.ts | 21 ++- 8 files changed, 57 insertions(+), 168 deletions(-) create mode 100644 .changeset/codex-mcp-path-token-lowering-row.md diff --git a/.changeset/codex-mcp-path-token-lowering-row.md b/.changeset/codex-mcp-path-token-lowering-row.md new file mode 100644 index 000000000..fbafa8492 --- /dev/null +++ b/.changeset/codex-mcp-path-token-lowering-row.md @@ -0,0 +1,13 @@ +--- +"agent-bundle": patch +--- + +Record the Codex MCP `${PLUGIN_ROOT}` lowering rule as a dated +`mcp.pathTokenLowering` row in the pinned `codex-0.147.0.json` capability +table (no host interpolation; a *leading* `${PLUGIN_ROOT}` in `command`, +`args`, `env` values, and `cwd` is rewritten to a `./`-relative path under +`cwd: "./"` only when `cwd` is the plugin root; embedded tokens, +`${PLUGIN_DATA}`, and workspace-root tokens fail the build), so the generated +hosts reference renders it from the table instead of a hardcoded note. The +`codex` target's `adapterRevision` advances to `1.12.0`, so previously built +Codex artifacts revalidate as stale against the changed table. (#PR) diff --git a/examples/rsc-agent-runtime/rstest.config.ts b/examples/rsc-agent-runtime/rstest.config.ts index d036d31ae..01289f62a 100644 --- a/examples/rsc-agent-runtime/rstest.config.ts +++ b/examples/rsc-agent-runtime/rstest.config.ts @@ -6,9 +6,8 @@ export default defineConfig({ // Route-unit proofs need the framework-generated configuration // (rstest.route-unit.config.ts via `pnpm test:routes`), so they are not // swept into this plain Node pool where no test manifest is registered. - exclude: ['tests/route-unit/**'], include: ['tests/**/*.test.{ts,tsx}'], - exclude: ['tests/route-unit/**/*.test.{ts,tsx}'], + exclude: ['tests/route-unit/**'], pool: { maxWorkers: 1 }, testEnvironment: 'node', // Every suite here runs real rsbuild compiles and spawned children, which a diff --git a/packages/agent-bundle/src/adapters/capabilities/codex-0.147.0.json b/packages/agent-bundle/src/adapters/capabilities/codex-0.147.0.json index 9128e2a18..366b6ee44 100644 --- a/packages/agent-bundle/src/adapters/capabilities/codex-0.147.0.json +++ b/packages/agent-bundle/src/adapters/capabilities/codex-0.147.0.json @@ -395,6 +395,15 @@ } }, "mcp": { + "pathTokenLowering": { + "evidence": [ + "2026-09-03: plugin.hookEnvironment records PLUGIN_ROOT and PLUGIN_DATA as environment variables Codex exports to plugin hook commands; the pinned schemas/codex/mcp.schema.json declares no placeholder or interpolation rule for .mcp.json command, args, env, or cwd values, so this table records no mcp.pathTokens field list for Codex.", + "2026-09-03: packages/agent-bundle/src/adapters/codex.ts lowers a leading ${PLUGIN_ROOT} in command, args, env values, and cwd to a ./-relative path under cwd \"./\" only when the server's cwd is the plugin root, and fails the build for embedded plugin-root tokens (codex.mcp.token.plugin-root.embedded.*), plugin-root tokens without a plugin-root cwd (codex.mcp.token.plugin-root.cwd.required.*), ${PLUGIN_DATA} (codex.mcp.token.plugin-data.*), and workspace-root tokens (codex.mcp.token.workspace-root.*); this row is what the generated hosts reference renders in place of the token-field list." + ], + "fields": ["command", "args", "env", "cwd"], + "reason": "No host interpolation. `command`, `args`, `env` values, and `cwd` accept a *leading* `${PLUGIN_ROOT}` only when `cwd` is the plugin root; the compiler rewrites it to a `./`-relative path under `cwd: \"./\"`. Embedded tokens, `${PLUGIN_DATA}`, and workspace-root tokens are build errors.", + "state": "degraded" + }, "stdio": true, "streamableHttp": true }, diff --git a/packages/agent-bundle/src/adapters/codex.ts b/packages/agent-bundle/src/adapters/codex.ts index d1a7a2401..912fc0369 100644 --- a/packages/agent-bundle/src/adapters/codex.ts +++ b/packages/agent-bundle/src/adapters/codex.ts @@ -178,7 +178,7 @@ const hookContract = Object.freeze({ wrapperSource: (entry) => nativeHookWrapperSource(entry, 'Codex'), } satisfies TargetHookContract); const metadata = Object.freeze({ - adapterRevision: '1.11.0', + adapterRevision: '1.12.0', observedVersion: capabilityTable.observedCliVersion, schemas: schemaDescriptorsFrom(schemaProvenance, schemaProvenance.observedCliVersion), }); diff --git a/packages/agent-bundle/tests/adapter-metadata.test.ts b/packages/agent-bundle/tests/adapter-metadata.test.ts index 5db429328..38a86f319 100644 --- a/packages/agent-bundle/tests/adapter-metadata.test.ts +++ b/packages/agent-bundle/tests/adapter-metadata.test.ts @@ -68,7 +68,7 @@ it('records exact immutable metadata for every built-in target', () => { ], }); expect(registryMetadata(registry, 'codex')).toEqual({ - adapterRevision: '1.11.0', + adapterRevision: '1.12.0', observedVersion: '0.147.0', schemas: [ { diff --git a/packages/workbench/src/overview-page.tsx b/packages/workbench/src/overview-page.tsx index 8a2d0f580..b032dc6a8 100644 --- a/packages/workbench/src/overview-page.tsx +++ b/packages/workbench/src/overview-page.tsx @@ -1,26 +1,8 @@ -import React, { useState } from 'react'; +import React from 'react'; -import type { Diagnostic } from '../../agent-bundle/src/contracts/diagnostics.ts'; -import type { ProjectStatus } from '../../agent-bundle/src/contracts/project.ts'; - -import { bundleSummaryFor, overviewFor, type OverviewHostAdoption } from './overview-model.ts'; -import type { ProjectClient } from './project-client.ts'; +import { bundleSummaryFor, type OverviewHostAdoption } from './overview-model.ts'; import type { WorkbenchCapabilities } from './workbench-capabilities.ts'; -import { Navigation, Topbar, type WorkbenchPage } from './workbench-screen.tsx'; - -const dateTimeFormat = new Intl.DateTimeFormat(undefined, { - dateStyle: 'medium', - timeStyle: 'medium', -}); - -const dateTime = (value: string | undefined): string => value === undefined - ? 'Not available' - : dateTimeFormat.format(new Date(value)); - -const stateLabel = (state: string): string => state.replaceAll('-', ' '); - -const sourceFor = (diagnostic: Diagnostic): string => - diagnostic.sourcePath ?? diagnostic.generatedPath ?? diagnostic.target ?? 'Project'; +import type { WorkbenchPage } from './workbench-screen.tsx'; const StateMark = ({ state }: { readonly state: string }) => (