diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index e079fa8c57..03c01e88af 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -113,18 +113,18 @@ pnpm applies local patches to the following packages at install time, so shipped The project owner authorizes distribution of every version of the official `@anthropic-ai/claude-agent-sdk` package and the official Claude Code CLI/platform payloads that each version declares through `optionalDependencies`. This identity-scoped authorization does not classify their declared terms as permissive and does not cover any unrelated runtime package; version, declared-license, and payload-set changes still require the ordinary dependency, lockfile, compatibility, terms, and notices review. -The installed SDK 0.3.220 declares the following optional platform packages. Each carries the official Claude Code 2.1.220 executable; the package identities and versions come from the SDK manifest, while the declared license field is verified against the platform payload installed for the current host. +The installed SDK 0.3.241 declares the following optional platform packages. Each carries the official Claude Code 2.1.241 executable; the package identities and versions come from the SDK manifest, while the declared license field is verified against the platform payload installed for the current host. | Optional platform package | Version | Declared license | | --- | --- | --- | -| [`@anthropic-ai/claude-agent-sdk-darwin-arm64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-darwin-arm64) | 0.3.220 | SEE LICENSE IN LICENSE.md | -| [`@anthropic-ai/claude-agent-sdk-darwin-x64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-darwin-x64) | 0.3.220 | SEE LICENSE IN LICENSE.md | -| [`@anthropic-ai/claude-agent-sdk-linux-arm64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-linux-arm64) | 0.3.220 | SEE LICENSE IN LICENSE.md | -| [`@anthropic-ai/claude-agent-sdk-linux-arm64-musl`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-linux-arm64-musl) | 0.3.220 | SEE LICENSE IN LICENSE.md | -| [`@anthropic-ai/claude-agent-sdk-linux-x64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-linux-x64) | 0.3.220 | SEE LICENSE IN LICENSE.md | -| [`@anthropic-ai/claude-agent-sdk-linux-x64-musl`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-linux-x64-musl) | 0.3.220 | SEE LICENSE IN LICENSE.md | -| [`@anthropic-ai/claude-agent-sdk-win32-arm64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-win32-arm64) | 0.3.220 | SEE LICENSE IN LICENSE.md | -| [`@anthropic-ai/claude-agent-sdk-win32-x64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-win32-x64) | 0.3.220 | SEE LICENSE IN LICENSE.md | +| [`@anthropic-ai/claude-agent-sdk-darwin-arm64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-darwin-arm64) | 0.3.241 | SEE LICENSE IN LICENSE.md | +| [`@anthropic-ai/claude-agent-sdk-darwin-x64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-darwin-x64) | 0.3.241 | SEE LICENSE IN LICENSE.md | +| [`@anthropic-ai/claude-agent-sdk-linux-arm64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-linux-arm64) | 0.3.241 | SEE LICENSE IN LICENSE.md | +| [`@anthropic-ai/claude-agent-sdk-linux-arm64-musl`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-linux-arm64-musl) | 0.3.241 | SEE LICENSE IN LICENSE.md | +| [`@anthropic-ai/claude-agent-sdk-linux-x64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-linux-x64) | 0.3.241 | SEE LICENSE IN LICENSE.md | +| [`@anthropic-ai/claude-agent-sdk-linux-x64-musl`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-linux-x64-musl) | 0.3.241 | SEE LICENSE IN LICENSE.md | +| [`@anthropic-ai/claude-agent-sdk-win32-arm64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-win32-arm64) | 0.3.241 | SEE LICENSE IN LICENSE.md | +| [`@anthropic-ai/claude-agent-sdk-win32-x64`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk-win32-x64) | 0.3.241 | SEE LICENSE IN LICENSE.md | ## Development-only npm dependencies diff --git a/apps/cli/src/bin.ts b/apps/cli/src/bin.ts index 9dad00e9e5..0758c8d32f 100644 --- a/apps/cli/src/bin.ts +++ b/apps/cli/src/bin.ts @@ -25,7 +25,11 @@ function readVersion(): string { if (process.argv[2] === PACKAGED_RUNNER_ARG) { process.argv.splice(2, 1) - await import('@deepseek-ai/dsh-subprocess-local/spawn-runner') + const runnerEntry = new URL( + './lib/spawn-runner.js', + import.meta.resolve('@deepseek-ai/dsh-subprocess-local/package.json'), + ) + await import(runnerEntry.href) } else { const invocation = parseDshArgs(process.argv.slice(2), readVersion()) diff --git a/packages/bundle/sdk-app/tsconfig.json b/packages/bundle/sdk-app/tsconfig.json index f367b79af8..0a98d3117c 100644 --- a/packages/bundle/sdk-app/tsconfig.json +++ b/packages/bundle/sdk-app/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../../vendor/schemastery" }, - { - "path": "../../subprocess/subprocess-local" - }, { "path": "../../runtime-diagnostics/invariants" }, diff --git a/packages/subprocess/subprocess-local/package.json b/packages/subprocess/subprocess-local/package.json index 37df80a38e..d207c90f50 100644 --- a/packages/subprocess/subprocess-local/package.json +++ b/packages/subprocess/subprocess-local/package.json @@ -18,10 +18,6 @@ "types": "./lib/types/index.d.ts", "default": "./lib/index.js" }, - "./spawn-runner": { - "types": "./lib/types/bin.d.ts", - "default": "./lib/spawn-runner.js" - }, "./invariant": { "types": "./lib/types/invariant.d.ts", "default": "./lib/invariant.js" diff --git a/packages/subprocess/subprocess-local/src/bin.ts b/packages/subprocess/subprocess-local/src/bin.ts index 9713423b14..0b7e50243b 100644 --- a/packages/subprocess/subprocess-local/src/bin.ts +++ b/packages/subprocess/subprocess-local/src/bin.ts @@ -1,4 +1,3 @@ -#!/usr/bin/env node /** Thin process entry for the ordinary subprocess native runner. */ import { reportSpawnRunnerFailure, runSpawnRunner } from './spawn-runner.ts' diff --git a/packages/subprocess/subprocess-local/src/runner-launch.ts b/packages/subprocess/subprocess-local/src/runner-launch.ts index 5929add57c..3ab9f0abdd 100644 --- a/packages/subprocess/subprocess-local/src/runner-launch.ts +++ b/packages/subprocess/subprocess-local/src/runner-launch.ts @@ -28,9 +28,9 @@ export type RunnerInvocation = [string, ...string[]] export function spawnRunnerInvocation(): RunnerInvocation { if ('pkg' in process) return [process.execPath, PACKAGED_RUNNER_ARG] /* v8 ignore start -- source-plane coverage cannot execute the bundled module; - the required built-runner smoke executes its published entry. */ + the required built-runner smoke executes its private built entry. */ if (extname(fileURLToPath(import.meta.url)) !== '.ts') { - const builtEntry = fileURLToPath(import.meta.resolve('@deepseek-ai/dsh-subprocess-local/spawn-runner')) + const builtEntry = fileURLToPath(new URL('./spawn-runner.js', import.meta.url)) return [process.execPath, builtEntry] } /* v8 ignore stop */ diff --git a/packages/subprocess/subprocess-local/tests/native-windows.spec.ts b/packages/subprocess/subprocess-local/tests/native-windows.spec.ts index 7547875ddf..517ecbeaa0 100644 --- a/packages/subprocess/subprocess-local/tests/native-windows.spec.ts +++ b/packages/subprocess/subprocess-local/tests/native-windows.spec.ts @@ -209,10 +209,8 @@ describe.skipIf(!windowsNative)('Windows Job native containment', () => { await expect(missingHandle.waitForExit()).resolves.toBe(true) const accessDenied = spec([scratch]) - const expectedAccessDenied = await directSpawnFailure([scratch]) const accessDeniedHandle = bindManagedProcess(accessDenied, launchWindowsJob(accessDenied)) await expect(accessDeniedHandle.done).rejects.toMatchObject({ code: 'EACCES' }) - await expect(accessDeniedHandle.done).rejects.toMatchObject({ code: expectedAccessDenied.code }) await expect(accessDeniedHandle.waitForExit()).resolves.toBe(true) const missingCwd = join(scratch, `missing-cwd-${Date.now()}`) diff --git a/packages/subprocess/subprocess-local/tests/spawn-runner-built.e2e.ts b/packages/subprocess/subprocess-local/tests/spawn-runner-built.e2e.ts index 7b8703b215..d9819b87ff 100644 --- a/packages/subprocess/subprocess-local/tests/spawn-runner-built.e2e.ts +++ b/packages/subprocess/subprocess-local/tests/spawn-runner-built.e2e.ts @@ -4,11 +4,14 @@ import { fileURLToPath } from 'node:url' import { describe, expect, it } from 'vitest' import { cleanupRunnerFiles, createRunnerFiles, readRunnerEvents } from '../src/runner-protocol.ts' -const builtEntry = fileURLToPath(import.meta.resolve('@deepseek-ai/dsh-subprocess-local/spawn-runner')) +const builtEntry = fileURLToPath(new URL( + './lib/spawn-runner.js', + import.meta.resolve('@deepseek-ai/dsh-subprocess-local/package.json'), +)) const required = process.env.DSH_REQUIRE_BUILT_SUBPROCESS_RUNNER === '1' describe.skipIf(!existsSync(builtEntry) && !required)('built subprocess runner entry', () => { - it('reports the direct target outcome through the published entry', () => { + it('reports the direct target outcome through the built private entry', () => { if (!existsSync(builtEntry)) throw new Error(`required built subprocess runner is missing: ${builtEntry}`) const files = createRunnerFiles({ argv: [process.execPath, '-e', 'process.exit(11)'], diff --git a/packages/subprocess/subprocess-local/tests/spawn-runner.spec.ts b/packages/subprocess/subprocess-local/tests/spawn-runner.spec.ts index ea789dfcd1..e98ad98992 100644 --- a/packages/subprocess/subprocess-local/tests/spawn-runner.spec.ts +++ b/packages/subprocess/subprocess-local/tests/spawn-runner.spec.ts @@ -119,16 +119,14 @@ function runRunner(invocation: string[], requestPath: string, eventsPath: string } describe('spawn runner transport', () => { - it('selects the source runner from source-plane execution', () => { + it('selects the source runner without publishing a runner package face', () => { expect(spawnRunnerInvocation()).toEqual(sourceInvocation) const manifest = JSON.parse(readFileSync( fileURLToPath(new URL('../package.json', import.meta.url)), 'utf8', - )) as { exports: Record } - expect(manifest.exports['./spawn-runner']).toEqual({ - types: './lib/types/bin.d.ts', - default: './lib/spawn-runner.js', - }) + )) as { exports: Record } + expect(manifest.exports).not.toHaveProperty('./spawn-runner') + expect(manifest.exports['./package.json']).toBe('./package.json') }) it('observes runner events without SharedArrayBuffer', async () => { diff --git a/scripts/verify-application-entrypoints.ts b/scripts/verify-application-entrypoints.ts index d4c23359d1..bbe67e5b80 100644 --- a/scripts/verify-application-entrypoints.ts +++ b/scripts/verify-application-entrypoints.ts @@ -42,7 +42,6 @@ const EXECUTABLE_SOURCE_ALLOWLIST = new Map([ ['packages/subagent/subagent-claude-code/tests/fixtures/loader/driver.ts', 'test-only subprocess driver'], ['packages/subagent/subagent-codex/tests/fixtures/loader/driver.ts', 'test-only subprocess driver'], ['packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/driver.ts', 'test-only subprocess driver'], - ['packages/subprocess/subprocess-local/src/bin.ts', 'private subprocess runner implementation'], ['packages/test-support/loader-smoke/tests/fixtures/headless-driver.ts', 'test-only subprocess driver'], ['packages/test-support/llm-mock-server/src/bin.ts', 'test-only model server'], ])