diff --git a/examples/rsc-agent-runtime/src/runtime/state-file.ts b/examples/rsc-agent-runtime/src/runtime/state-file.ts index 202efbf33..a85a7b183 100644 --- a/examples/rsc-agent-runtime/src/runtime/state-file.ts +++ b/examples/rsc-agent-runtime/src/runtime/state-file.ts @@ -157,7 +157,10 @@ export const createFileRuntimeKernel = (options: FileRuntimeKernelOptions): Runt { host: input.host, path: input.path, sessionId: input.sessionId, toolName: input.toolName }, { idempotencyKey: input.idempotencyKey, signal: mutationOptions?.signal }, ); - return snapshotAt(store, committed.revision, undefined, mutationOptions?.signal); + // Idempotent replays return the current head, exactly like the retired + // JSONL kernel: a rerun after a later reset must surface the reset + // state, not the durable prefix at the original commit. + return snapshotAt(store, committed.replayed ? undefined : committed.revision, undefined, mutationOptions?.signal); }); }, @@ -169,7 +172,7 @@ export const createFileRuntimeKernel = (options: FileRuntimeKernelOptions): Runt ...(input.seed === undefined ? {} : { seed: { edits: [], seed: input.seed } }), signal: mutationOptions?.signal, }); - return snapshotAt(store, committed.revision, undefined, mutationOptions?.signal); + return snapshotAt(store, committed.replayed ? undefined : committed.revision, undefined, mutationOptions?.signal); }); }, diff --git a/packages/agent-bundle/package.json b/packages/agent-bundle/package.json index 4335bb422..31531604f 100644 --- a/packages/agent-bundle/package.json +++ b/packages/agent-bundle/package.json @@ -99,7 +99,6 @@ "yaml": "2.9.0" }, "devDependencies": { - "@agent-bundle/runtime": "workspace:*", "@modelcontextprotocol/server": "2.0.0", "@types/react": "19.2.18", "@types/ws": "8.18.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b59653a38..be63f1bb0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + '@agent-bundle/runtime': workspace:* + importers: .: @@ -184,6 +187,9 @@ importers: packages/agent-bundle: dependencies: + '@agent-bundle/runtime': + specifier: workspace:* + version: link:../rsc-runtime '@modelcontextprotocol/client': specifier: 2.0.0 version: 2.0.0 @@ -254,9 +260,6 @@ importers: specifier: 2.9.0 version: 2.9.0 devDependencies: - '@agent-bundle/runtime': - specifier: workspace:* - version: link:../rsc-runtime '@types/react': specifier: 19.2.18 version: 19.2.18 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b6aae7d0f..38aacb47a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,6 +2,12 @@ packages: - packages/* - packages/workbench/src/inspector - examples/* +# The published agent-bundle manifest must never carry a `workspace:` range +# (npm refuses to install such a tarball, and the release audit forbids it), +# so its optional @agent-bundle/runtime peer is satisfied from the workspace +# here instead of through a devDependency in the shipped package.json. +overrides: + '@agent-bundle/runtime': workspace:* allowBuilds: '@google/genai': false msgpackr-extract: false diff --git a/scripts/run-examples-check.mjs b/scripts/run-examples-check.mjs index 43428178d..777cd2561 100644 --- a/scripts/run-examples-check.mjs +++ b/scripts/run-examples-check.mjs @@ -10,8 +10,14 @@ if (pnpmEntrypoint === undefined || pnpmEntrypoint.length === 0) { throw new Error('run-examples-check.mjs must be launched through a pnpm package script.'); } -const child = spawn(process.execPath, [ - pnpmEntrypoint, +// npm_execpath is a JavaScript entrypoint under corepack and pnpm's own +// installer, but a native shim (or a bare command name) under standalone +// setups such as pnpm/setup on hosted CI. Only JavaScript files can be +// launched through the current Node executable. +const isJavaScriptEntrypoint = /\.[cm]?js$/u.test(pnpmEntrypoint); +const command = isJavaScriptEntrypoint ? process.execPath : pnpmEntrypoint; +const child = spawn(command, [ + ...(isJavaScriptEntrypoint ? [pnpmEntrypoint] : []), '--filter', './examples/*', '--workspace-concurrency=3',