Merge branch 'feat/cli-account' into feat/feishu-plugin

# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/client/README.i18n.yaml
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	scripts/gen-cordis-catalog.ts
#	scripts/product-package-policy.ts
#	tsconfig.client.json
This commit is contained in:
gengruilin committed 2026-11-01 02:09:29 +08:00
commit b6fc8a773e
1824 files changed
+64524 -39974

No files matched your search

+4 -4
View File
@@ -307,8 +307,8 @@ describe('package payload constraints', () => {
])
})
it('accepts the Agent Team icon payload and rejects its omission', () => {
const dir = 'packages/experimental/agent-team-profile'
it('accepts the Voice Input icon payload and rejects its omission', () => {
const dir = 'packages/experimental/voice-input-bundle'
const manifest = JSON.parse(readFileSync(new URL(`../${dir}/package.json`, import.meta.url), 'utf8')) as WorkspaceManifest['manifest']
expect(checkWorkspaceManifest({ dir, manifest })).toEqual([])
expect(checkWorkspaceManifest({ dir, manifest: { ...manifest, files: manifest.files!.filter(file => file !== 'icon.svg') } }))
@@ -406,9 +406,9 @@ describe('package payload constraints', () => {
})).toEqual(['lib/index.js', 'lib/types/**/*.d.ts'])
})
it.each(['agent-team', 'agent-team-profile', 'auto-review', 'client-ui-agent-team', 'tool-agent-team'])(
it.each(['team/agent-team', 'experimental/voice-input-bundle', 'experimental/auto-review', 'client/ui-agent-team', 'team/tool-agent-team'])(
'accepts the published locale files for %s and rejects their omission', (name) => {
const dir = `packages/experimental/${name}`
const dir = `packages/${name}`
const manifest = JSON.parse(readFileSync(new URL(`../${dir}/package.json`, import.meta.url), 'utf8')) as WorkspaceManifest['manifest']
expect(checkWorkspaceManifest({ dir, manifest })).toEqual([])
expect(checkWorkspaceManifest({ dir, manifest: {
+15 -1
View File
@@ -1771,7 +1771,7 @@ describe('Policy workflow shells', () => {
describe('Policy workflows', () => {
const workflows = [
['pr-check-on-head-branch.yml', ['master']],
['pr-check-after-approve.yml', ['approve', 'review']],
['pr-check-after-approve.yml', ['approve']],
] as const
function stepsOf(job: Record<string, unknown>): Record<string, unknown>[] {
@@ -1794,6 +1794,20 @@ describe('Policy workflows', () => {
}
})
it('decides the review verdict in one Approve Check job that can publish the check run', () => {
const workflow = loadWorkflow('.github/workflows/pr-check-after-approve.yml')
if (!isRecord(workflow.jobs)) throw new TypeError('the workflow must define jobs')
expect(Object.keys(workflow.jobs)).toEqual(['approve'])
const job = workflow.jobs.approve
if (!isRecord(job) || !isRecord(job.permissions)) throw new TypeError('the approve job must declare permissions')
expect(job.name).toBe('Approve Check')
expect(job.permissions.checks).toBe('write')
const check = stepsOf(job).find(step => typeof step.uses === 'string' && step.uses.startsWith('deepseek-harness/deepseek-harness-check@'))
if (check === undefined || !isRecord(check.env)) throw new TypeError('the job must run the check action with env')
expect(String(check.env.CHECK_MODE)).toContain('vars.MERGE_POLICY_HEAD_DIFF')
expect(JSON.stringify(workflow)).not.toContain('MERGE_POLICY_REVIEW')
})
it('keeps the pre-merge build behind the merge step, which honours the mode on its failures', () => {
const steps = stepsOf(workflowJob(loadWorkflow('.github/workflows/pr-check-on-head-branch.yml'), 'pre-merge'))
const merge = steps.findIndex(step => step.id === 'merge')
+86 -17
View File
@@ -1,6 +1,6 @@
/**
* Pins shared client-bundle preset rules: module-edge purity, source-map
* chaining, and physical watch dependencies hidden behind virtual CSS Modules.
* Pins shared client-bundle preset rules: build modes, module-edge purity,
* source-map chaining, and physical watch dependencies hidden behind virtual CSS Modules.
*/
import { existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
@@ -109,6 +109,63 @@ describe('client bundle build faces', () => {
})
})
async function clientChunkOutput(root: string, config: UserConfig, fileName: string): Promise<string> {
let builds: TsdownBundle[] = []
try {
builds = await build({
...config, cwd: root, config: false, tsconfig: false,
write: false, clean: false, exports: false, report: false, logLevel: 'silent',
})
const chunks = builds.flatMap(bundle => bundle.chunks).filter(chunk => chunk.type === 'chunk')
const output = chunks.find(chunk => chunk.fileName === fileName)?.code
if (output === undefined) throw new Error(`client output missing: ${fileName}`)
return output
} finally {
for (const bundle of builds) await bundle[Symbol.asyncDispose]()
}
}
describe('statically linked client build modes', () => {
it.each([
{ label: 'defaults to production', mode: undefined, expectedMode: 'production', frozen: false },
{ label: 'retains explicit development', mode: 'development', expectedMode: 'development', frozen: true },
])('$label when compiling conditional branches', async ({ mode, expectedMode, frozen }) => {
const root = mkdtempSync(join(tmpdir(), 'dsh-static-client-mode-'))
onTestFinished(() => { rmSync(root, { recursive: true, force: true }) })
const entry = join(root, 'lib/types/client/index.js')
mkdirSync(dirname(entry), { recursive: true })
writeFileSync(join(root, 'package.json'), JSON.stringify({ name: REQUESTING_PACKAGE, type: 'module' }))
writeFileSync(entry, [
'export const snapshot = { value: 1 }',
"if (process.env.NODE_ENV !== 'production') Object.freeze(snapshot)",
'export const mode = process.env.NODE_ENV',
'',
].join('\n'))
const previousMode = process.env.NODE_ENV
let config: UserConfig | undefined
try {
if (mode === undefined) Reflect.deleteProperty(process.env, 'NODE_ENV')
else process.env.NODE_ENV = mode
config = staticLinked(root, ['lib/types/client/index.js'])({ env: { DSH_BUILD_FACE: 'client' } })
.find(candidate => candidate.platform === 'browser')
} finally {
if (previousMode === undefined) Reflect.deleteProperty(process.env, 'NODE_ENV')
else process.env.NODE_ENV = previousMode
}
if (config === undefined) throw new Error('static client config missing')
const output = await clientChunkOutput(root, config, 'index.js')
const emitted = await import(`data:text/javascript,${encodeURIComponent(output)}`) as {
mode: string
snapshot: { value: number }
}
expect(emitted.mode).toBe(expectedMode)
expect(emitted.snapshot).toEqual({ value: 1 })
expect(Object.isFrozen(emitted.snapshot)).toBe(frozen)
})
})
function dynamicImportFixture(prefix: string): string {
const root = mkdtempSync(join(tmpdir(), prefix))
onTestFinished(() => { rmSync(root, { recursive: true, force: true }) })
@@ -148,19 +205,9 @@ describe('client bundle dynamic imports', () => {
const config = clientConfigs()[0]
if (config === undefined) throw new Error('client config missing')
let builds: TsdownBundle[] = []
try {
builds = await build({
...config, cwd: root, config: false, tsconfig: false,
write: false, clean: false, exports: false, report: false, logLevel: 'silent',
})
const chunks = builds.flatMap(bundle => bundle.chunks).filter(chunk => chunk.type === 'chunk')
const output = chunks.find(chunk => chunk.fileName === 'client.js')?.code
expect(output).toContain('require.async("./client.terminal.js")')
expect(output).not.toContain('Promise.resolve().then(() => require("./client.terminal.js"))')
} finally {
for (const bundle of builds) await bundle[Symbol.asyncDispose]()
}
const output = await clientChunkOutput(root, config, 'client.js')
expect(output).toContain('require.async("./client.terminal.js")')
expect(output).not.toContain('Promise.resolve().then(() => require("./client.terminal.js"))')
})
})
@@ -214,6 +261,7 @@ describe('client bundle purity gate', () => {
expect(resolveId('@deepseek-ai/dsh-session/surface')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-brand')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-deque')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-util-time')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-util-values')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-token-meter/client')).toBeNull()
expect(() => resolveId('@deepseek-ai/dsh-token-meter')).toThrow(/purity/)
@@ -227,6 +275,27 @@ describe('client bundle purity gate', () => {
expect(() => resolveId('@deepseek-ai/dsh-plugin-manager/registry/internal')).toThrow(/purity/)
})
it('omits unused RRULE code from a Cron-only browser import', async () => {
const builds = await build({
config: false, platform: 'browser', format: ['esm'], entry: ['cron-only'],
write: false, clean: false, exports: false, report: false, logLevel: 'silent',
plugins: [{
name: 'cron-only',
resolveId: id => id === 'cron-only' ? id : null,
load: id => id === 'cron-only'
? `export { Cron } from ${JSON.stringify(join(packageDir('util/time'), 'src/index.ts'))}` : null,
}],
})
try {
const modules = builds.flatMap(bundle => bundle.chunks).flatMap(chunk => chunk.type === 'chunk' ? chunk.moduleIds : [])
.map(id => id.replaceAll('\\', '/'))
expect(modules.some(id => id.endsWith('/time/src/cron.ts'))).toBe(true)
expect(modules.some(id => id.includes('/rrule'))).toBe(false)
} finally {
for (const bundle of builds) await bundle[Symbol.asyncDispose]()
}
})
it('admits only the pure spill notice entry, not its Host policy', () => {
expect(resolveId('@deepseek-ai/dsh-spill-policy/notice')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-output-retention')).toBeNull()
@@ -293,8 +362,8 @@ describe('client bundle purity gate', () => {
})
describe('client bundle experimental input isolation', () => {
const experimental = '@deepseek-ai/dsh-experimental-client-ui-agent-team'
const experimentalDir = packageDir('experimental/client-ui-agent-team')
const experimental = '@deepseek-ai/dsh-experimental-client-ui-voice-input'
const experimentalDir = packageDir('experimental/client-ui-voice-input')
function fixture() {
const root = mkdtempSync(join(tmpdir(), 'dsh-client-inputs-'))
+1
View File
@@ -98,6 +98,7 @@ const PACKAGE_LIBRARIES: Readonly<Record<string, string>> = {
'packages/util/deque': 'Zero-dependency circular deque utility.',
'packages/util/chunked-list': 'Persistent collection operations and checkpoint validation without a plugin surface.',
'packages/util/code-language': 'Zero-dependency file-extension to syntax-highlighting language table.',
'packages/fs/fs-patch': 'Pure patch parsing and hunk application without plugin registration or filesystem I/O.',
'packages/util/home-paths': 'Zero-dependency harness-home path resolver.',
'packages/util/launch-environment': 'Zero-dependency environment resolver.',
'packages/util/lazy-require': 'Caller-relative CommonJS-compatible dependency loader.',
+17 -1
View File
@@ -1,5 +1,21 @@
import { describe, expect, it } from 'vitest'
import { builtDeclarationPath } from './doc-typecheck-paths.ts'
import { builtDeclarationPath, isFrozenUpgradeGuidePath } from './doc-typecheck-paths.ts'
describe('frozen upgrade-guide examples', () => {
it('excludes earlier release guides in both languages from current API compilation', () => {
expect(isFrozenUpgradeGuidePath('docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.md', '0.2.1-rc.2')).toBe(true)
expect(isFrozenUpgradeGuidePath('docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.zh.md', '0.2.1-rc.2')).toBe(true)
})
it.each([
'docs/upgrade-guide/v0.2.1-rc.2/subagent-activations/guide.md',
'docs/upgrade-guide/v0.2.1-rc.3/subagent-activations/guide.md',
'docs/upgrade-guide/vinvalid/subagent-activations/guide.md',
'docs/subsystems/subagent.md',
])('keeps %s subject to current API compilation', (file) => {
expect(isFrozenUpgradeGuidePath(file, '0.2.1-rc.2')).toBe(false)
})
})
describe('builtDeclarationPath', () => {
it('maps package source directories and exact entry files to built declarations', () => {
+13
View File
@@ -1,3 +1,16 @@
import { lt, valid } from 'semver'
/**
* Identify frozen upgrade guides whose examples target an earlier release.
* @param file - Repository-relative path normalized to forward slashes.
* @param currentVersion - Current root package version.
* @returns Whether the guide predates the current upgrade-guide directory.
*/
export function isFrozenUpgradeGuidePath(file: string, currentVersion: string): boolean {
const version = /^docs\/upgrade-guide\/v([^/]+)\/[^/]+\/guide(?:\.zh)?\.md$/.exec(file)?.[1]
return version !== undefined && valid(version) !== null && lt(version, currentVersion)
}
/** Map one workspace source alias target to its declaration-build target. */
export function builtDeclarationPath(candidate: string): string {
// Two workspace path forms exist: whole-package entries end in /src, subpath
+6 -3
View File
@@ -1,7 +1,8 @@
/**
* Typecheck Markdown `ts` fences against the workspace API. `ignore-check` fences are reported as
* opt-outs; generated catalog fragments and source-equivalence blocks are skipped here because their
* owning gates verify them. Byte-identical `.zh.md` copies reuse their unsuffixed sibling's check. A
* owning gates verify them. Frozen upgrade guides retain their release-specific examples.
* Byte-identical `.zh.md` copies reuse their unsuffixed sibling's check. A
* build-coordinated mode consumes existing declarations without emit.
*/
@@ -9,7 +10,7 @@ import { execFileSync } from 'node:child_process'
import { globSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
import { join, relative, resolve } from 'node:path'
import ts from 'typescript'
import { builtDeclarationPath } from './doc-typecheck-paths.ts'
import { builtDeclarationPath, isFrozenUpgradeGuidePath } from './doc-typecheck-paths.ts'
import { markdownFences } from './markdown.ts'
import { partitionPairedMarkdownDerivatives } from './paired-markdown-derivatives.ts'
import { isArchivedAgentNotePath } from './repo-files.ts'
@@ -205,9 +206,11 @@ function remapBlockPaths(output: string, blocks: Block[]): string {
const markdownGlobs = ['README.md', '.agents/notes/**/*.md', 'docs/**/*.md', 'packages/*/*.md', 'packages/*/*/*.md']
const files: string[] = []
const { version } = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')) as { version: string }
for (const pattern of markdownGlobs) {
for (const match of globSync(pattern, { cwd: root })) {
if (!isArchivedAgentNotePath(match)) files.push(resolve(root, match))
const file = match.replaceAll('\\', '/')
if (!isArchivedAgentNotePath(file) && !isFrozenUpgradeGuidePath(file, version)) files.push(resolve(root, file))
}
}
files.sort()
+23 -2
View File
@@ -1,7 +1,11 @@
/** Command discovery and complete output preservation for the CLI reference. */
import { describe, expect, it } from 'vitest'
import { collectCliHelp, parseCliHelp, prefetchHelp, topLevelHelpArgs } from './gen-cli-help.ts'
import { execFile } from 'node:child_process'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { cliHelpConcurrency, collectCliHelp, main, parseCliHelp, prefetchHelp, topLevelHelpArgs } from './gen-cli-help.ts'
vi.mock('node:child_process', () => ({ execFile: vi.fn() }))
afterEach(() => { vi.unstubAllEnvs(); vi.clearAllMocks() })
interface PendingRead {
args: string
@@ -26,6 +30,23 @@ async function flush(): Promise<void> {
await new Promise<void>((resolve) => { setImmediate(resolve) })
}
describe('CLI help child budget', () => {
it.each([undefined, ''])('keeps the independent worker budget for %j', (raw) => {
expect(cliHelpConcurrency(raw, 12)).toBe(12)
})
it('uses an explicit caller allowance', () => {
expect(cliHelpConcurrency('1', 12)).toBe(1)
expect(cliHelpConcurrency('3', 12)).toBe(3)
})
it.each(['0', '-1', '1.5', '2workers', '02', '9007199254740992'])('rejects %j before spawning help', async (raw) => {
vi.stubEnv('DSH_CLI_HELP_CONCURRENCY', raw)
await expect(main()).rejects.toThrow('DSH_CLI_HELP_CONCURRENCY must be a positive integer')
expect(execFile).not.toHaveBeenCalled()
})
})
describe('CLI help discovery', () => {
it('reads command rows while retaining wrapped descriptions and examples', () => {
const help = 'Usage: dsh\r\n\r\nCommands:\r\n web [options] Serve the browser\r\n with a wrapped description\r\n plugin Manage plugins\r\n\r\nExamples:\r\n dsh web\r\n'
+19 -2
View File
@@ -66,6 +66,22 @@ export function topLevelHelpArgs(profiles: readonly string[]): string[][] {
return [[], ['plugin'], ...[...profiles].sort().flatMap(profile => [[profile], ['--profile', profile]])]
}
/**
* Resolve the child-process allowance before any help invocation starts.
* @param raw - optional DSH_CLI_HELP_CONCURRENCY override.
* @param fallback - worker budget for an invocation without an explicit allowance.
* @returns the maximum number of help children in flight.
* @throws when a supplied override is not a positive decimal integer.
*/
export function cliHelpConcurrency(raw: string | undefined, fallback: number): number {
if (raw === undefined || raw === '') return fallback
const parsed = Number.parseInt(raw, 10)
if (!Number.isSafeInteger(parsed) || parsed < 1 || String(parsed) !== raw) {
throw new Error(`gen-cli-help: DSH_CLI_HELP_CONCURRENCY must be a positive integer, got ${JSON.stringify(raw)}.`)
}
return parsed
}
/** Help reads started ahead of an in-order consumer. */
export interface PrefetchedHelpReader {
/**
@@ -177,9 +193,10 @@ export async function collectCliHelp(
}
async function collectHelp(): Promise<HelpPage[]> {
const concurrency = cliHelpConcurrency(process.env.DSH_CLI_HELP_CONCURRENCY, defaultParallelism())
const directory = mkdtempSync(join(tmpdir(), 'dsh-cli-help-'))
const profiles = Object.keys(PROFILE_TEMPLATES)
// Concurrent profile boots share the repository worker budget.
// Aggregate callers allocate this leaf's children separately from the other running gates.
const reader = prefetchHelp(async (args, signal) => {
// Each invocation boots against its own empty Harness and agents homes.
const home = mkdtempSync(join(directory, 'invocation-'))
@@ -207,7 +224,7 @@ async function collectHelp(): Promise<HelpPage[]> {
} finally {
signal.removeEventListener('abort', abort)
}
}, topLevelHelpArgs(profiles), defaultParallelism())
}, topLevelHelpArgs(profiles), concurrency)
try {
return await collectCliHelp(reader.readHelp, profiles)
} finally {
+2 -2
View File
@@ -48,9 +48,9 @@ const MAX_DECL_CHARS = 1200
* share that hands down a subsystem instead of a share, and prose that grew
* into a manual. Every report also lists one line per standard prop seat of its
* scope, so the widest Session-scope slot (`tool.call.toolview`, with the
* global and Session access seats) sets the current 123.
* global and Session access seats) sets the current 125.
*/
const MAX_ENTRY_LINES = 123
const MAX_ENTRY_LINES = 125
/** One register-call option as the catalog teaches it. */
interface OptionDoc {
+21 -13
View File
@@ -63,6 +63,7 @@ export const SERVICE_PAGE: Record<string, string> = {
actionCards: 'boot.md',
pluginRecommendations: 'boot.md',
pluginMarket: 'boot.md',
cliAccounts: 'boot.md',
pluginRegistryProbe: 'boot.md',
configEditor: 'boot.md',
profileContext: 'boot.md',
@@ -205,7 +206,6 @@ export const SERVICE_WALK_EXEMPTIONS: Record<string, string> = {
commandUi: 'client-side interface-typed browser service — packages/client/ui-commands/README.md owns the API',
fileDrag: 'client-side file preparation and transfer service — packages/client/ui-file-drag/README.md owns the API',
feedbackUi: 'client-side feedback dialog service — packages/client/ui-message-feedback/README.md owns the API',
cliAccounts: 'client-side CLI app account registry — packages/client/ui-cli-account/README.md owns the API',
conversation: 'client-side interface-typed browser service — packages/client/ui-conversation/README.md owns the API',
layout: 'client-side interface-typed browser service — packages/client/ui-layout/README.md owns the API',
pluginNavigation: 'client-side bundle navigation — packages/client/ui-plugin-manager/README.md owns the API',
@@ -588,6 +588,10 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
PruneResult: 'compaction.md',
FileReadOutcome: 'filesystem.md',
FsDirEntry: 'filesystem.md',
FsDeleteOutcome: 'filesystem.md',
FsMoveOutcome: 'filesystem.md',
FsMoveSourceFailure: 'filesystem.md',
PatchHunk: 'filesystem.md',
FsEditOutcome: 'filesystem.md',
FsEditRequest: 'filesystem.md',
FsInfo: 'filesystem.md',
@@ -612,13 +616,21 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
ScheduleDeliveryHistoryResult: 'schedule.md',
ScheduleCreateRequest: 'schedule.md',
ScheduleListRequest: 'schedule.md',
ScheduleDeleteRequest: 'schedule.md',
ScheduleDeleteResult: 'schedule.md',
ScheduleDeleteInactiveResult: 'schedule.md',
ScheduleTimingChange: 'schedule.md',
ScheduleUpdateRequest: 'schedule.md',
ScheduleUpdateResult: 'schedule.md',
ScheduleRecord: 'schedule.md',
ScheduleEditResult: 'schedule.md',
ScheduleListResult: 'schedule.md',
ScheduleRunResult: 'schedule.md',
ScheduleViewResult: 'schedule.md',
ScheduleViewRequest: 'schedule.md',
SchedulePatch: 'schedule.md',
ScheduleEditRequest: 'schedule.md',
ScheduleRunRequest: 'schedule.md',
ScheduleConflictResult: 'schedule.md',
ScheduleSessionCreateSpec: 'schedule.md',
ScheduleTarget: 'schedule.md',
ScheduleTargetRequest: 'schedule.md',
DailyInput: 'schedule.md',
DailyScheduleRecord: 'schedule.md',
RecurringScheduleRecord: 'schedule.md',
@@ -794,18 +806,10 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
SpeechCatalog: 'voice-input.md',
TranscriptionRequest: 'voice-input.md',
CreateTeamTaskRequest: 'agent-team.md',
SendTeamMessageRequest: 'agent-team.md',
SendTeamMessageResult: 'agent-team.md',
SpawnTeammateRequest: 'agent-team.md',
SpawnTeammateResult: 'agent-team.md',
TeamId: 'agent-team.md',
TeamMemberView: 'agent-team.md',
TeamMembership: 'agent-team.md',
TeamTaskId: 'agent-team.md',
TeamTaskView: 'agent-team.md',
TeamProjection: 'agent-team.md',
TeamMemberProjection: 'agent-team.md',
TeamWaitResult: 'agent-team.md',
UpdateTeamTaskRequest: 'agent-team.md',
ModDefinition: 'claude-code-mods.md',
SurfaceSnapshot: 'claude-code-mods.md',
@@ -929,6 +933,7 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
SessionProjectionMap: 'session-projection.md',
ProjectionKeySelection: 'session-projection.md',
ProjectionChangeListener: 'session-projection.md',
ProjectionEventChangeListener: 'session-projection.md',
ProjectionSnapshot: 'session-projection.md',
ProjectionCheckpoint: 'session-projection.md',
DirectoryPickerCapability: 'workspace.md',
@@ -1001,6 +1006,9 @@ export const TYPE_LINK_EXEMPTIONS: Readonly<Record<string, string>> = {
McpResourceProvider: 'scoped resource provider is owned by packages/mcp/mcp-resources/README.md',
CliOperationId: 'account operation id is owned by packages/connector/cli-account/README.md',
FeishuState: 'account view fields are owned by packages/connector/feishu-cli/README.md',
AnyCliAccountView: 'generic CLI account view is owned by packages/connector/cli-account/README.md',
CliAccountRegistration: 'Plugins page account registration is owned by packages/client/ui-cli-account/README.md',
CliAccountsView: 'registered account stream item is owned by packages/client/ui-cli-account/README.md',
'z.ZodType': 'Zod response validation API is owned by https://zod.dev/packages/zod',
Socket: 'Node.js byte stream API is owned by https://nodejs.org/api/net.html#class-netsocket',
z: 'schemastery schema constructor is owned by vendor/schemastery (vendored upstream)',
+11 -4
View File
@@ -178,6 +178,13 @@ const SERVICE_ROLES: ServiceRole[] = [
consumers: ['client-ui-plugin-market', 'plugin-market'],
note: 'Fetches and validates the index sources the user configures; installation goes through the plugin manager.',
},
{
key: 'cliAccounts',
pkg: 'client-ui-cli-account',
title: 'CLI app accounts on the Plugins page',
mode: 'service',
note: 'Holds the accounts CLI app plugins register and serves them to the Plugins page through one Remote; links and notices stay in the browser that started the operation.',
},
{
key: 'profileContext',
pkg: 'app-boot',
@@ -718,7 +725,7 @@ const SERVICE_ROLES: ServiceRole[] = [
pkg: 'schedule',
title: 'Host scheduled messages',
mode: 'core',
note: 'Stores tasks independently of Session activation and queues due messages in the original Session.',
note: 'Stores tasks independently of Session activation and queues due messages in each task\'s target Session.',
},
{
key: 'goals',
@@ -853,11 +860,11 @@ const SERVICE_ROLES: ServiceRole[] = [
},
{
key: 'agentTeams',
pkg: 'experimental-agent-team',
pkg: 'agent-team',
title: 'Agent Teams coordination domain',
mode: 'core',
consumers: ['experimental-tool-agent-team'],
note: 'Owns the implicit-root roster, direct peer inbox delivery, shared task DAG, and continuable-child lifecycle; tool-agent-team contributes model controls.',
consumers: ['tool-agent-team'],
note: 'Owns the shared task DAG for a subagent tree; tool-agent-team contributes task controls.',
},
{
key: 'claudeCodeMods',
+42 -31
View File
@@ -15,6 +15,7 @@ import AgentRegistry from '@deepseek-ai/dsh-agent'
import type { Agent } from '@deepseek-ai/dsh-agent'
import { createScope } from '@deepseek-ai/dsh-scope'
import SessionStore, { SessionId } from '@deepseek-ai/dsh-session'
import SessionPersistence from '@deepseek-ai/dsh-session-persistence'
import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection'
import SqliteSessionQueryEngine from '@deepseek-ai/dsh-session-query-sqlite'
import GoalService from '@deepseek-ai/dsh-goal'
@@ -62,7 +63,7 @@ import TerminalSessionService from '@deepseek-ai/dsh-terminal'
import * as ToolPty from '@deepseek-ai/dsh-tool-terminal'
import * as ToolGoal from '@deepseek-ai/dsh-tool-goal'
import * as ToolSchedule from '@deepseek-ai/dsh-tool-schedule'
import type ScheduleService from '@deepseek-ai/dsh-schedule'
import ScheduleService from '@deepseek-ai/dsh-schedule'
import Lsp from '@deepseek-ai/dsh-lsp'
import * as ToolLsp from '@deepseek-ai/dsh-tool-lsp'
import * as ToolSkill from '@deepseek-ai/dsh-tool-skill'
@@ -70,8 +71,8 @@ import * as ToolSessionQuery from '@deepseek-ai/dsh-tool-session-query'
import * as ToolJobs from '@deepseek-ai/dsh-tool-jobs'
import BrowserUseRegistry from '@deepseek-ai/dsh-browser-use'
import * as StagehandBrowserTools from '@deepseek-ai/dsh-experimental-browser-use-stagehand-native'
import type TeamService from '@deepseek-ai/dsh-experimental-agent-team'
import * as ToolTeam from '@deepseek-ai/dsh-experimental-tool-agent-team'
import TeamService from '@deepseek-ai/dsh-agent-team'
import * as ToolTeam from '@deepseek-ai/dsh-tool-agent-team'
import * as ToolTodo from '@deepseek-ai/dsh-tool-todo'
import type PluginManager from '@deepseek-ai/dsh-plugin-manager'
import * as PluginManagerTools from '@deepseek-ai/dsh-plugin-manager/tools'
@@ -123,6 +124,20 @@ class CatalogWorkflowEngine extends WorkflowEngine {
}
}
/** Schema collection needs the persistence service but must never access stored Sessions. */
class CatalogSessionPersistence extends SessionPersistence {
create = unavailableCatalogPersistence
open = unavailableCatalogPersistence
flush = unavailableCatalogPersistence
stat = unavailableCatalogPersistence
list = unavailableCatalogPersistence
}
/** Storage operations are unreachable during schema collection. */
function unavailableCatalogPersistence(): never {
throw new Error('gen-tool-catalog: persistence access is unavailable during schema harvest')
}
/**
* Register the descriptor needed to mount schema-producing consumers. Declares
* the full capability set of the shipped in-process providers so consumers
@@ -402,15 +417,15 @@ const TOOL_PACKAGES: ToolPackage[] = [
dir: 'tool-fs',
source: 'packages/fs/tool-fs/src/index.ts',
requires: ['ctx.workingDirectory', 'ctx.tools', 'ctx.fs', 'ctx.systemPrompt', 'ctx.attachments (image-tool registration)', 'ctx.llm + an image-capable route (image-tool execution)'],
writes: ['tool/call', 'fs/write-intent or fs/edit-intent for mutations', 'fs/observed after read presence/absence or successful file operation', 'durable attachment (read_image)', 'tool/result'],
writes: ['tool/call', 'fs/write-intent, fs/edit-intent, or fs/delete-intent for mutations', 'fs/observed after read presence/absence or successful file operation', 'durable attachment (read_image)', 'tool/result'],
async mount(ctx) {
// The catalog seam marker opts into
// the attachments-conditional image schema without attachment I/O.
await ctx.plugin(CatalogAttachmentStore)
await ctx.plugin(ToolFs)
await ctx.plugin(ToolFs, { applyPatch: true })
},
note:
'The read-before-write/edit policy is added by `@deepseek-ai/dsh-fs-observation-policy` (an `fs/*` event-gate plugin, no schema change); a deployment that loads these tools is expected to also load it. The image tool is not registered without `ctx.attachments`; its schema is route-independent, and execution refuses unless the exact routed model declares image input.',
'The read-before-write/edit policy is added by `@deepseek-ai/dsh-fs-observation-policy` (an `fs/*` event-gate plugin, no schema change); the shipped compositions leave its row disabled, so mutations are unconditional unless a deployment enables it. The image tool is not registered without `ctx.attachments`; its schema is route-independent, and execution refuses unless the exact routed model declares image input. `apply_patch` registers only with `applyPatch: true`; the catalog sets it so the schema is documented. `dsh-base` and the Web `standard` preset enable it; the Web `ptc` and `cordis` presets and the PTC overlay state `applyPatch: false`.',
},
{
pkg: '@deepseek-ai/dsh-tool-fs-search',
@@ -461,20 +476,21 @@ const TOOL_PACKAGES: ToolPackage[] = [
pkg: '@deepseek-ai/dsh-tool-schedule',
dir: 'tool-schedule',
source: 'packages/schedule/tool-schedule/src/index.ts',
requires: ['ctx.tools', 'ctx.schedule'],
requires: ['ctx.tools', 'ctx.schedule', 'ctx.systemPrompt'],
writes: ['tool/call', 'Schedule storage domain create, update, or delete', 'tool/result'],
async mount(ctx) {
// Schema harvest never executes a tool, so the Host service is a
// declaration-only stub.
ctx.provide('schedule', {} as ScheduleService)
// Schema harvest never executes a tool, so the Host service is a stub that answers only the read of the
// default delivery limits, which the target description names when above the minimum.
ctx.provide('schedule', {
deliveryLimits: () => ({ newSessionIntervalSeconds: ScheduleService.Config({}).newSessionIntervalSeconds }),
} as ScheduleService)
await ctx.plugin(ToolSchedule)
},
note:
'A preset or Agent scope mounts this package; the preset decides which agents receive the four '
+ 'management tools. Each call acts on the calling Agent\'s Session. '
+ 'Accepts after_seconds, explicit absolute at, bounded fixed-rate every_seconds, daily and weekly '
+ 'local times in an explicit IANA zone, and cron as a five-field expression. '
+ 'Management uses the Host storage domain; due messages resume the original Session.',
'A preset or Agent scope mounts this package and decides which agents receive its tools. '
+ 'Management reads and writes Host tasks by id across Sessions. '
+ 'Tasks store an RFC 5545 recurrence and an existing, first-created-and-reused, or per-run-new Session target. '
+ 'Delegated subagents cannot call these tools.',
},
{
pkg: '@deepseek-ai/dsh-tool-lsp',
@@ -576,6 +592,7 @@ const TOOL_PACKAGES: ToolPackage[] = [
interrupt_agent: 'packages/subagent/tool-subagent-control/src/index.ts',
list_agents: 'packages/subagent/tool-subagent-control/src/list-agents.ts',
send_message: 'packages/subagent/tool-subagent-control/src/index.ts',
wait_agent: 'packages/subagent/tool-subagent-control/src/wait-agent.ts',
},
requires: ['ctx.tools', 'ctx.subagents', 'ctx.agents'],
writes: ['tool/call', 'tool/result', 'child session events through ctx.subagents'],
@@ -587,7 +604,7 @@ const TOOL_PACKAGES: ToolPackage[] = [
await ctx.plugin(ToolSubagentControl)
},
note:
'The globally named discovery, interruption, and local-message tools over managed subagents: provider-bound `tool-subagent` instances register distinct delegation tools, while one instance of this package registers `send_message`, `interrupt_agent`, and `list_agents`.',
'The shared control tools discover and contact agents in the subagent tree, interrupt owned descendants, and wait for input in the caller’s inbox. Provider-bound `tool-subagent` instances supply delegation tools.',
},
{
pkg: '@deepseek-ai/dsh-tool-jobs',
@@ -603,26 +620,19 @@ const TOOL_PACKAGES: ToolPackage[] = [
'The kind-agnostic background-job controller: background bash commands and PTY sends are read, listed, and killed through the same three tools. Loading the plugin attaches the controller that arms producers\' `ctx.jobs.start()`.',
},
{
pkg: '@deepseek-ai/dsh-experimental-tool-agent-team',
pkg: '@deepseek-ai/dsh-tool-agent-team',
dir: 'tool-agent-team',
source: 'packages/experimental/tool-agent-team/src/index.ts',
requires: ['ctx.tools', 'ctx.systemPrompt', 'ctx.agentTeams', 'an exact live Team member Agent'],
writes: ['tool/call', 'team/member', 'team/task', 'agent/inbox/spliced', 'user/message on inbox claim', 'tool/result'],
source: 'packages/team/tool-agent-team/src/index.ts',
requires: ['ctx.tools', 'ctx.systemPrompt', 'ctx.agentTeams', 'ctx.subagents', 'an exact live Team member Agent'],
writes: ['tool/call', 'team/task', 'tool/result'],
async mount(ctx) {
await ctx.plugin(AgentRegistry)
await ctx.plugin(SessionStore)
await ctx.plugin(SubagentRuntime)
await ctx.plugin(CatalogSessionPersistence)
await ctx.plugin(TeamService)
const session = ctx.sessions.create(SessionId('tool-catalog-team-lead'))
let agent!: Agent
const membership = {
get root() { return agent },
id: session.id,
role: 'lead' as const,
name: 'lead',
}
ctx.provide('agentTeams', {
tryMembership: (candidate: Agent) => candidate === agent ? membership : undefined,
membership: () => membership,
} as unknown as TeamService)
await ctx.plugin(Object.assign(async (inner: Context) => {
agent = {
id: session.id,
@@ -633,12 +643,13 @@ const TOOL_PACKAGES: ToolPackage[] = [
Object.assign(agent, { ctx: createScope(inner, agent).ctx })
await inner.agents.register(agent)
}, { inject: ['tools', 'systemPrompt', 'agents', 'agentTeams'] }))
await ctx.agentTeams.setEnabled(agent, true)
await ctx.plugin(ToolTeam)
catalogChildScopes.set(ctx, agent)
},
scope: ctx => catalogChildScopes.get(ctx) as Agent,
note:
'All nine tools are scoped to implicit Team Leads and durable teammates. The shipped dsh-base bundle keeps the package disabled; the documented Agent Teams profile patch enables it while disabling the legacy continuable-child control names.',
'Four task-board tools share the subagent tree’s root Session. Enabling Team mode on the root Session adds task-board guidance alongside standard subagent delegation and control tools. Standard subagent controls provide required identity independently of Team mode.',
},
{
pkg: '@deepseek-ai/dsh-tool-todo',
+5 -37
View File
@@ -217,8 +217,7 @@
"e9721557773cba96e50cea1b0c6737991a9fb2490bcd83e934311e46310d8b68": 1
},
"packages/api/session-controller/tests/control-queue.host.spec.ts": {
"9b2258e1e99500b30d66b0b93e0f0bc5077278877903fc8cc6712167411f6109": 1,
"f2fe8bd862649a2492b7f99f0c35e78ba051a248f339d248d0dcfab163c69752": 1
"9b2258e1e99500b30d66b0b93e0f0bc5077278877903fc8cc6712167411f6109": 1
},
"packages/api/session-controller/tests/controller.host.spec.ts": {
"40725eab4d86929b16d87c88d5cf83168035def78b4d901613dd0369876f0731": 3,
@@ -258,9 +257,6 @@
"packages/api/session-controller/tests/session-presets.host.spec.ts": {
"c051663ae60f381f30367e71bae4da0ea88c490453bbc1d86230b71c0fde8d6f": 1
},
"packages/api/session-controller/tests/session-remote-rejection.client.spec.ts": {
"01c40d09d9157679ffe02d7cce2d1761ffd42d4a569a7176d5eeec838a09edc1": 1
},
"packages/api/session-controller/tests/session.client.spec.ts": {
"52faf4558fcd91bd27dbdfa7e497843e8eeb75ea5f68ee231335018d5b3f2053": 3
},
@@ -971,19 +967,6 @@
"packages/document/office-to-pdf/tests/queue.spec.ts": {
"bbe31b89b81048bb47c7158e78670deec5f2973286f9abc591290a8fdd851cf1": 1
},
"packages/experimental/agent-team/src/journal.ts": {
"364930a7ddcc79316a9ffc126602f45ae56a3cecdb80484c5c8a79686f8f1057": 1
},
"packages/experimental/agent-team/tests/projection-events.spec.ts": {
"71ffbcca0bb71d3b595143632491d4c5d580aaf6ac384c22116e038995b2f2b5": 1,
"a66c8967969859328890e6049a0bd9e90403861eb19ed5d6937da5505aa79c05": 1,
"bd3a42d7bc38a7deb366d7ad1364f2ab01be2af077aae04e49b9c8a61b9e1c7d": 1,
"d8076a64f8d940fb0a5c3df15e9e1c8fb7ac05e84762a6198dbbfcffcf379821": 1
},
"packages/experimental/agent-team/tests/team.spec.ts": {
"3ae979a4364fe22772c89133e79ea216cdb4f3163c7cb02c47eb1a5d4788e661": 3,
"ae5776af8c1e9965a4eca94bcbc07b65da8d2e9e24e4570d2141b34d60b4f90f": 1
},
"packages/experimental/browser-use-runtime/src/index.ts": {
"04bc8a44533574365dfedf563e2356458bcf95f990a00906938c977c1d683356": 1
},
@@ -1139,9 +1122,6 @@
"packages/experimental/webworker-packer/tests/preview.spec.ts": {
"cdd46c8ceda6d5707bc2abfba329351ba06bcc030b314a3c799d72a4971bd5a4": 1
},
"packages/experimental/webworker-runtime/src/compile/transform.ts": {
"48bb7e26a882fa7a44a4175f843d20846606976c7d6fdaf67c8a08dd8830b95e": 1
},
"packages/experimental/webworker-runtime/src/node/builtin_modules/implemented/stream.ts": {
"8d4298961ca8095e069df7c940bd5082e0a90f76a24f517d5f547566e0631b6c": 1
},
@@ -1273,9 +1253,6 @@
"744b30e13b6390439c34f4970441a292a07f4ac3d26f25e9be75d1b5c18f4f33": 1,
"f33c4a795e2cda267cb28d2937c632d56134b8e6438d21e4bf74da2735b1c154": 1
},
"packages/interaction/user-questions/tests/user-questions.spec.ts": {
"60655aea47d3d8667f90341b58e3faaf64d12670b9592af837aa40ecf7b83583": 1
},
"packages/jobs/jobs-local/tests/jobs.spec.ts": {
"52e6bc7e2a6c58a465a5e1c7a1e92caa4f771235b19ebf4642df5c0845de72aa": 1
},
@@ -1763,9 +1740,6 @@
"3e704e331ed2fc5d4c0855e2455b31b82924c525f2e267416e393cdbd36c251b": 1,
"fdc5fcade0ba1abbc426ccccb07a1ad4998253799b8561815047d95178441cdf": 1
},
"packages/subagent/subagent/src/internal.ts": {
"89b33a57a7c77261a02116dd015c08d9e6a5b1efb5ba0ebf49bc68a21e7f120a": 2
},
"packages/subagent/subagent/src/projection.ts": {
"0cd01f87cd1ae24b558cfe5427d45cc016b499579e5ddd3eab125517339b7c71": 1
},
@@ -1781,10 +1755,6 @@
"packages/subagent/subagent/tests/continuation.spec.ts": {
"ae5776af8c1e9965a4eca94bcbc07b65da8d2e9e24e4570d2141b34d60b4f90f": 1
},
"packages/subagent/subagent/tests/control.spec.ts": {
"52faf4558fcd91bd27dbdfa7e497843e8eeb75ea5f68ee231335018d5b3f2053": 1,
"764cefa4ddc93e5b865cade70e780d8d471ef51e58148e838681ed4cf0bd7b4a": 1
},
"packages/subagent/subagent/tests/service.spec.ts": {
"41a1501a36d265ae52c5893b26e9e92eacc1012a379afb2948a31d153bcbac2a": 1,
"514d368a1007506da97412cee4b14191025685d1693f2c68442bb466b5054e02": 1,
@@ -1852,6 +1822,10 @@
"574bce326cab70f3080b19219844405565d1c4c23df4eec85e7838f9ec1038ed": 1,
"f5b7ed19aea21153c86ef4e2596f39d1b667b3b8a1d1ba2b2a2a95bf90869b58": 1
},
"packages/team/agent-team/tests/projection-events.spec.ts": {
"71ffbcca0bb71d3b595143632491d4c5d580aaf6ac384c22116e038995b2f2b5": 1,
"a66c8967969859328890e6049a0bd9e90403861eb19ed5d6937da5505aa79c05": 1
},
"packages/terminal/terminal-bash/tests/index.spec.ts": {
"2878860b606c2614696f97227e4e580a65b1ae1680b6261f233163cd8b838ee0": 1,
"30c8c859832405858e95a7de1493488b75a9030e3baa8fcaf3647e071bd5bbf1": 1,
@@ -1924,11 +1898,6 @@
"da6ccb5610150a9169b5c3949017d7f5e0d60eadd999615e231db00470aa00e7": 1,
"f772961d38eac5032c547a0485c4b941da2faa044c428f788934798230fc389a": 1
},
"packages/test-support/loader-smoke/tests/agent-turn.spec.ts": {
"432811d8f7105d0bf1934d2b52456aeb8f202b334486810dc1b6c3d87349b5b1": 1,
"efbd107cd9aad870467dc06957b0d0298798245cf063c9f8e2a8b46c10cb3189": 1,
"effb170ab353dc903b037ff2e208a85ba87ff1da08f40306f2e292f78609c6c9": 1
},
"packages/test-support/session-snapshot/src/harness.ts": {
"04bc8a44533574365dfedf563e2356458bcf95f990a00906938c977c1d683356": 1
},
@@ -2017,7 +1986,6 @@
"f30cc8d63e02fd6608c2c80f9564bfc17f171581770ba2df4b1a62a8869a3105": 1
},
"scripts/gen-tool-catalog.ts": {
"86969c58d27d2ec65c0607b449bbb5ab4644717f0627729a5a193937d51f419e": 1,
"ebe146aded1e6f3e71f166a7f88720e560b336bbb92d19cea0b2bdab58c46f8a": 1
},
"scripts/persistence-changes.ts": {
+1 -1
View File
@@ -23,8 +23,8 @@ describe('npm baseline package discovery', () => {
const expected = [
'apps/cli/package.json',
'packages/core/session/package.json',
'packages/experimental/agent-team/package.json',
'packages/experimental/new-prototype/package.json',
'packages/team/agent-team/package.json',
'vendor/cordis/package.json',
]
const root = fixture([
+2 -1
View File
@@ -15,7 +15,8 @@ function property(nodes: readonly SchemaNode[], index: number, name: string): nu
return field.type
}
it('requires compatibility review before request headers can carry retired system text', { timeout: 60_000 }, () => {
// Whole-repository schema extraction needs the same budget as persistence-schema.spec.ts and Windows coverage.
it('requires compatibility review before request headers can carry retired system text', { timeout: 90_000 }, () => {
const inventory = extractPersistenceSchema(resolve(import.meta.dirname, '..'))
const before = inventory.roots.find(root => root.key === 'event:request/header')
if (before === undefined) throw new Error('generated schema omits request/header')
+1
View File
@@ -40,6 +40,7 @@ export const PRODUCT_PACKAGE_POLICY: Readonly<Record<string, ProductPackagePolic
'packages/connector/feishu': { category: 'optional', reason: 'Separately installed app plugin that requires the Feishu CLI and a user-authorized Feishu account.' },
'packages/connector/feishu-cli': { category: 'optional', reason: 'Feishu CLI, skills, and account operations mounted by the separately installed Feishu bundle.' },
'packages/client/ui-feishu': { category: 'optional', reason: 'Plugins page connection mounted by the separately installed Feishu bundle.' },
'packages/fs/fs-observation-policy': { category: 'optional', reason: 'Read-before-mutation guard that a deployment enables on the disabled dsh-base row.' },
'packages/sdk/client': { category: 'sdk', reason: 'Published TypeScript embedding client runs in the consumer process.' },
'packages/typert/generator': { category: 'build', reason: 'Build-time generation of type metadata.' },
'packages/test-support/agent-loop-testkit': { category: 'test', reason: 'Published agent-loop test harness.' },
@@ -79,7 +79,7 @@ describe('advanced Python snapshot workflow ordering', () => {
const parent = await ctx.agentLoop.create(SessionId(config.parentSessionId), { provider: 'mock', model: 'mock' })
const run = await ctx.subagents.startActivation({
provider: 'spawn', label: 'workflow-child', delivery: 'caller',
request: { parent, prompt: [{ type: 'text', text: config.prompt }] }, signal: new AbortController().signal,
parent, prompt: [{ type: 'text', text: config.prompt }], signal: new AbortController().signal,
})
cleanups.push(() => run.dispose())
const child = await entered.promise
-4
View File
@@ -50,8 +50,6 @@ describe('release families', () => {
.filter(member => member.directory.startsWith('packages/experimental/'))
.map(member => member.name)).toEqual([
'@deepseek-ai/dsh-action-cards',
'@deepseek-ai/dsh-experimental-agent-team-profile',
'@deepseek-ai/dsh-experimental-agent-team',
'@deepseek-ai/dsh-experimental-api-speech-to-text',
'@deepseek-ai/dsh-experimental-auto-review',
'@deepseek-ai/dsh-experimental-badge-skill-bundle',
@@ -61,7 +59,6 @@ describe('release families', () => {
'@deepseek-ai/dsh-experimental-browser-use-stagehand-native',
'@deepseek-ai/dsh-experimental-claude-code-mods',
'@deepseek-ai/dsh-client-ui-action-cards',
'@deepseek-ai/dsh-experimental-client-ui-agent-team',
'@deepseek-ai/dsh-experimental-client-ui-claude-code-mods',
'@deepseek-ai/dsh-experimental-client-ui-cot-translation',
'@deepseek-ai/dsh-client-ui-creation-recommendations',
@@ -101,7 +98,6 @@ describe('release families', () => {
'@deepseek-ai/dsh-experimental-speech-to-text',
'@deepseek-ai/dsh-experimental-subagent-oar',
'@deepseek-ai/dsh-experimental-terminal-bundle',
'@deepseek-ai/dsh-experimental-tool-agent-team',
'@deepseek-ai/dsh-tool-ralph',
'@deepseek-ai/dsh-tool-session-query',
'@deepseek-ai/dsh-experimental-tool-subagent-oar',
+5 -5
View File
@@ -88,8 +88,8 @@ describe('product identifiers', () => {
'apps/cli/tests/optional-bundle-transitions.e2e.ts',
'apps/web/tests/agent-preset-selection.e2e.ts',
'apps/web/tests/developer-tools-settings.e2e.ts',
'docs/subsystems/schedule.md',
'docs/subsystems/schedule.zh.md',
'docs/subsystems/extensions.md',
'docs/subsystems/extensions.zh.md',
'docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md',
'docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md',
'docs/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.md',
@@ -177,7 +177,7 @@ describe('product identifiers', () => {
})
it('rewrites multiline fenced imports while preserving prose and fenced product data', () => {
const file = 'docs/subsystems/schedule.md'
const file = 'docs/subsystems/extensions.md'
const text = "The `cordis` preset.\n```ts\nconst preset = 'cordis'\nimport {\n Context,\n} from 'cordis'\n```\n"
const scoped = "The `cordis` preset.\n```ts\nconst preset = 'cordis'\nimport {\n Context,\n} from '@deepseek-ai/cordis'\n```\n"
expectRoundTrip(file, text, scoped, 1)
@@ -188,7 +188,7 @@ describe('product identifiers', () => {
const scoped = `# The 'cordis' preset.\n- name: ${name.replace('cordis', '@deepseek-ai/cordis')} # 'cordis' stays product data\n`
for (const [file, wrap] of [
['packages/bundle/web-app/cordis.patch.yml', (value: string) => value],
['docs/subsystems/schedule.md', (value: string) => `The \`cordis\` preset.\n\`\`\`yaml\n${value}\`\`\`\n`],
['docs/subsystems/extensions.md', (value: string) => `The \`cordis\` preset.\n\`\`\`yaml\n${value}\`\`\`\n`],
] as const) {
expectRoundTrip(file, wrap(text), wrap(scoped), 1)
}
@@ -215,7 +215,7 @@ describe('product identifiers', () => {
})
it.each(['```ts\n```\n', "```ts\nimport 'cordis'\n"])('keeps fence line counts without requiring a closing fence', (text) => {
const file = 'docs/subsystems/schedule.md'
const file = 'docs/subsystems/extensions.md'
const scoped = text.replace("import 'cordis'", "import '@deepseek-ai/cordis'")
expectRoundTrip(file, text, scoped, scoped === text ? 0 : 1)
})
-2
View File
@@ -109,8 +109,6 @@ const GENERIC_SKIPS: readonly GenericSkip[] = [
{ file: 'apps/cli/tests/optional-bundle-transitions.e2e.ts', upstream: ['cordis'] },
{ file: 'apps/web/tests/agent-preset-selection.e2e.ts', upstream: ['cordis'] },
{ file: 'apps/web/tests/developer-tools-settings.e2e.ts', upstream: ['cordis'] },
{ file: 'docs/subsystems/schedule.md', upstream: ['cordis'] },
{ file: 'docs/subsystems/schedule.zh.md', upstream: ['cordis'] },
{ file: 'docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md', upstream: ['cordis'] },
{ file: 'docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md', upstream: ['cordis'] },
{ file: 'docs/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.md', upstream: ['cordis'] },
+13 -4
View File
@@ -23,6 +23,7 @@ beforeEach(() => {
vi.stubEnv('DSH_WEB_SNAPSHOT_WORKERS', undefined)
vi.stubEnv('DSH_COVERAGE_MAX_WORKERS', undefined)
vi.stubEnv('DSH_COVERAGE_PARTITIONS', undefined)
vi.stubEnv('DSH_CLI_HELP_CONCURRENCY', undefined)
})
afterEach(() => vi.unstubAllEnvs())
@@ -305,13 +306,21 @@ describe('gate graph validation', () => {
expect(ids).toContain('public-repository-links')
})
it('checks the complete CLI reference locally and in the static CI lane', () => {
for (const mode of ['doc-sync', 'ci-static'] as const) {
it.each([undefined, ''])('allocates one CLI help child inside each aggregate when its allowance is %j', (raw) => {
vi.stubEnv('DSH_CLI_HELP_CONCURRENCY', raw)
for (const mode of ['doc-sync', 'ci-static', 'ci-windows-observational-ready'] as const) {
const gates = withPnpmEntrypoint(() => gatesForMode(mode))
expect(gates.find(gate => gate.id === 'cli-help')).toBeDefined()
expect(gates.find(gate => gate.id === 'cli-help')).toMatchObject({ env: { DSH_CLI_HELP_CONCURRENCY: '1' } })
expect(gates.filter(gate => gate.id !== 'cli-help').every(gate => gate.env?.DSH_CLI_HELP_CONCURRENCY === undefined)).toBe(true)
}
})
it.each(['3', 'invalid'])('passes an explicit CLI help allowance %j to its owner', (raw) => {
vi.stubEnv('DSH_CLI_HELP_CONCURRENCY', raw)
const gates = withPnpmEntrypoint(() => gatesForMode('ci-windows-observational-ready'))
expect(gates.find(gate => gate.id === 'cli-help')).toMatchObject({ env: { DSH_CLI_HELP_CONCURRENCY: raw } })
})
it('keeps the concrete terminology policy in the documentation gate', () => {
const ids = withPnpmEntrypoint(() => gatesForMode('doc-sync').map(subject => subject.id))
@@ -998,7 +1007,7 @@ describe('Node 24 lane ownership', () => {
'packages/subprocess/subprocess-local/tests/spawn-runner-built.e2e.ts',
'packages/subagent/subagent-codex/tests/loader-composition.e2e.ts',
'packages/subagent/subagent-claude-code/tests/loader-composition.e2e.ts',
'packages/experimental/agent-team/tests/built-lib.e2e.ts',
'packages/team/agent-team/tests/built-lib.e2e.ts',
]),
)
expect(subject.find(item => item.id === 'web-snapshot')).toMatchObject({
+6 -2
View File
@@ -833,7 +833,11 @@ function docSyncLeafGates(options: {
: [pnpmScript('doc-typecheck', options.docTypecheckScript ?? 'doc-typecheck', docTypecheckOptions)],
pnpmScript('docs-site-build', options.docsBuildScript ?? 'docs:build', { label: 'documentation build' }),
pnpmScript('doc-graphs', 'verify-doc-graphs', { label: 'doc graphs' }),
pnpmScript('cli-help', 'verify-cli-help', { label: 'CLI help reference' }),
pnpmScript('cli-help', 'verify-cli-help', {
label: 'CLI help reference',
// Other gate workers already run beside this leaf; direct help generation keeps its own worker budget.
env: { DSH_CLI_HELP_CONCURRENCY: process.env.DSH_CLI_HELP_CONCURRENCY || '1' },
}),
pnpmScript('markdown-links', 'verify-md-links', { label: 'markdown links', quick: true }),
pnpmScript('type-equivalence', 'verify-type-equiv', { label: 'type equivalence', quick: true }),
pnpmScript('cordis-catalog', 'verify-cordis-catalog', { label: 'cordis catalog' }),
@@ -914,7 +918,7 @@ function builtBinSmokeGate(needs: string[] = ['build']): Gate {
'packages/subagent/subagent-codex/tests/loader-composition.e2e.ts',
'packages/subagent/subagent-claude-code/tests/loader-composition.e2e.ts',
'packages/api/remotes/tests/built-lib.e2e.ts',
'packages/experimental/agent-team/tests/built-lib.e2e.ts',
'packages/team/agent-team/tests/built-lib.e2e.ts',
// Built execution consumers: the only automated proof that package-name
// imports reach their lib/ entrypoints under plain Node. The e2e lane runs
// unbuilt, so these files self-skip there.
+5
View File
@@ -1842,6 +1842,11 @@ def smoke_sdk_snapshot_mode(
expected_children = 2 if mode == "native" else 0
if methods.count("subagent.started") != expected_children or methods.count("subagent.finished") != expected_children:
raise AssertionError(f"{mode} advanced snapshot emitted unexpected subagent lifecycle: {methods}")
creators = {item.payload["childSessionId"]: item.payload["parentSessionId"]
for item in result.notifications if item.method == "subagent.started"}
for item in result.notifications:
if item.method == "subagent.finished":
assert item.payload["parentSessionId"] == creators[item.payload["childSessionId"]]
ptc_events = [event for event in result.events
if event.get("type") in ("tool/ptc-dispatch-start", "tool/ptc-dispatch")]
expected_ptc_calls = 2 if mode == "ptc" else 0
@@ -919,6 +919,10 @@
],
"isError": false,
"id": "{{messageId}}"
},
"meta": {
"kind": "activation",
"subagentId": "{{child-1}}"
}
},
"sourceEventSeqs": [
@@ -981,6 +985,7 @@
"kind": "subagent-settled",
"form": "notice",
"summary": "Background subagent {{child-1}} finished and will do no further work unless you send it more.",
"stopReason": "completed",
"senderSessionId": "{{child-1}}"
},
"role": "user",
@@ -1258,6 +1263,7 @@
"kind": "subagent-settled",
"form": "notice",
"summary": "Background subagent {{child-1}} finished and will do no further work unless you send it more.",
"stopReason": "completed",
"senderSessionId": "{{child-1}}"
},
"role": "user",
@@ -2691,6 +2697,10 @@
{
"type": "text",
"text": "Reply with exactly DIRECT_CHILD_OK and nothing else."
},
{
"type": "text",
"text": "Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. If your last action is a message to your parent, the completion notice omits your final answer; include the result and relevant evidence in that message."
}
],
"source": {
@@ -2803,6 +2813,10 @@
],
"isError": false,
"id": "{{messageId}}"
},
"meta": {
"kind": "activation",
"subagentId": "{{child-1}}"
}
},
"sourceEventSeqs": [
@@ -2940,6 +2954,10 @@
{
"type": "text",
"text": "Reply with exactly DIRECT_CHILD_OK and nothing else."
},
{
"type": "text",
"text": "Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. If your last action is a message to your parent, the completion notice omits your final answer; include the result and relevant evidence in that message."
}
],
"source": {
@@ -3272,6 +3290,7 @@
"kind": "subagent-settled",
"form": "notice",
"summary": "Background subagent {{child-1}} finished and will do no further work unless you send it more.",
"stopReason": "completed",
"senderSessionId": "{{child-1}}"
},
"role": "user",
@@ -4224,6 +4243,7 @@
"kind": "subagent-settled",
"form": "notice",
"summary": "Background subagent {{child-1}} finished and will do no further work unless you send it more.",
"stopReason": "completed",
"senderSessionId": "{{child-1}}"
},
"role": "user",
@@ -4,14 +4,14 @@
{"type":"approval/policy","data":{"policy":"never","source":"delegation"}}
{"type":"permission/preset","data":{"preset":"danger-full-access"}}
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin:serial-created-fixture"}}]}}
{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Reply with exactly DIRECT_CHILD_OK and nothing else."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"}]}}
{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Reply with exactly DIRECT_CHILD_OK and nothing else."},{"type":"text","text":"Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. If your last action is a message to your parent, the completion notice omits your final answer; include the result and relevant evidence in that message."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"}]}}
{"type":"turn/start","data":{"turn":1}}
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}}
{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}
{"type":"step/start","data":{"turn":1,"step":1}}
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"}
{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin:serial-created-fixture"}},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Reply with exactly DIRECT_CHILD_OK and nothing else."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Reply with exactly DIRECT_CHILD_OK and nothing else."},{"type":"text","text":"Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. If your last action is a message to your parent, the completion notice omits your final answer; include the result and relevant evidence in that message."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"smoke-model","reasoningEffort":"high","maxTokens":256000},"adapterDefaults":{"maxTokens":true},"tools":["cordis_inspect_list","cordis_inspect_query","job_kill","job_list","job_output","snapshot_double","subagent","workflow","working_directory"]},"reason":"initial"}}
{"type":"request/context","data":{"provider":"deepseek-official","model":"smoke-model","contextWindow":1000000}}
@@ -37,11 +37,11 @@
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"tool-call","id":"advanced-direct-child","name":"subagent","arguments":"{\"description\": \"Check direct child\", \"prompt\": \"Reply with exactly DIRECT_CHILD_OK and nothing else.\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"smoke-model","replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"tool-call"}]}},"id":"{{messageId}}"},"usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"advanced-direct-child","name":"subagent","args":[""]},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"advanced-direct-child","args":["{\"description\": \"Check direct child\", \"prompt\": \"Reply with exactly DIRECT_CHILD_OK and nothing else.\"}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-direct-child","name":"subagent","arguments":"{\"description\": \"Check direct child\", \"prompt\": \"Reply with exactly DIRECT_CHILD_OK and nothing else.\"}"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"},"replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"tool-call"}]}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":3,"callId":"advanced-direct-child","name":"subagent","arguments":"{\"description\": \"Check direct child\", \"prompt\": \"Reply with exactly DIRECT_CHILD_OK and nothing else.\"}"}}
{"type":"subagent/catalog","data":{"version":0,"childId":"{{child-1}}","childCreatedAt":0,"mode":"continuable","label":"Check direct child"}}
{"type":"tool/result","data":{"turn":1,"step":3,"message":{"role":"tool","source":{"kind":"tool","callId":"advanced-direct-child"},"toolCallId":"advanced-direct-child","content":[{"type":"text","text":"started subagent {{child-1}}"}],"isError":false,"id":"{{messageId}}"}},"sourceEventSeqs":[36],"surfaceOp":"append"}
{"type":"tool/result","data":{"turn":1,"step":3,"message":{"role":"tool","source":{"kind":"tool","callId":"advanced-direct-child"},"toolCallId":"advanced-direct-child","content":[{"type":"text","text":"started subagent {{child-1}}"}],"isError":false,"id":"{{messageId}}"},"meta":{"kind":"activation","subagentId":"{{child-1}}"}},"sourceEventSeqs":[36],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":3}}
{"type":"step/start","data":{"turn":1,"step":4}}
{"type":"session-log-deepseek/delivery-accepted","data":{"sessionId":"{{parent}}","sessionFormatVersion":4,"throughSeq":40}}
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"content":[{"type":"text","text":"Background subagent {{child-1}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"DIRECT_CHILD_OK"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{child-1}} finished and will do no further work unless you send it more.","senderSessionId":"{{child-1}}"},"role":"user","id":"{{messageId}}"}]}}
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"content":[{"type":"text","text":"Background subagent {{child-1}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"DIRECT_CHILD_OK"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{child-1}} finished and will do no further work unless you send it more.","stopReason":"completed","senderSessionId":"{{child-1}}"},"role":"user","id":"{{messageId}}"}]}}
{"type":"assistant/message","data":{"turn":1,"step":4,"message":{"role":"assistant","content":[{"type":"tool-call","id":"advanced-workflow","name":"workflow","arguments":"{\"script\": \"phase('Delegate')\\nconst reply = await agent('Reply with exactly WORKFLOW_CHILD_OK and nothing else.', { label: 'workflow-child' })\\nreturn { reply }\", \"meta\": {\"name\": \"advanced-exe-snapshot\", \"description\": \"exercise one packaged workflow child\"}}"}],"source":{"kind":"model","provider":"deepseek-official","model":"smoke-model","replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"tool-call"}]}},"id":"{{messageId}}"},"usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"advanced-workflow","name":"workflow","args":[""]},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"advanced-workflow","args":["{\"script\": \"phase('Delegate')\\nconst reply = await agent('Reply with exactly WORKFLOW_CHILD_OK and nothing else.', { label: 'workflow-child' })\\nreturn { reply }\", \"meta\": {\"name\": \"advanced-exe-snapshot\", \"description\": \"exercise one packaged workflow child\"}}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-workflow","name":"workflow","arguments":"{\"script\": \"phase('Delegate')\\nconst reply = await agent('Reply with exactly WORKFLOW_CHILD_OK and nothing else.', { label: 'workflow-child' })\\nreturn { reply }\", \"meta\": {\"name\": \"advanced-exe-snapshot\", \"description\": \"exercise one packaged workflow child\"}}"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"},"replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"tool-call"}]}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":4,"callId":"advanced-workflow","name":"workflow","arguments":"{\"script\": \"phase('Delegate')\\nconst reply = await agent('Reply with exactly WORKFLOW_CHILD_OK and nothing else.', { label: 'workflow-child' })\\nreturn { reply }\", \"meta\": {\"name\": \"advanced-exe-snapshot\", \"description\": \"exercise one packaged workflow child\"}}"}}
{"type":"tool-workflow/run-start","data":{"runId":"{{workflow-run}}","name":"advanced-exe-snapshot"}}
@@ -53,7 +53,7 @@
{"type":"step/end","data":{"turn":1,"step":4}}
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}}
{"type":"step/start","data":{"turn":1,"step":5}}
{"type":"user/message","data":{"content":[{"type":"text","text":"Background subagent {{child-1}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"DIRECT_CHILD_OK"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{child-1}} finished and will do no further work unless you send it more.","senderSessionId":"{{child-1}}"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Background subagent {{child-1}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"DIRECT_CHILD_OK"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{child-1}} finished and will do no further work unless you send it more.","stopReason":"completed","senderSessionId":"{{child-1}}"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"}
{"type":"session-log-deepseek/delivery-accepted","data":{"sessionId":"{{parent}}","sessionFormatVersion":4,"throughSeq":54}}
{"type":"assistant/message","data":{"turn":1,"step":5,"message":{"role":"assistant","content":[{"type":"text","text":"ADVANCED_EXECUTABLE_OK"}],"source":{"kind":"model","provider":"deepseek-official","model":"smoke-model","replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"text"}]}},"id":"{{message:1}}"},"usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["ADVANCED_EXECUTABLE_OK"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"ADVANCED_EXECUTABLE_OK"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"},"replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"text"}]}}}]},"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":5}}
@@ -8,7 +8,7 @@
}
},
"catalogs": [
"Query the packaged Python environment for Office authoring.Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).<system-reminder>\nA skill is a reusable set of task-specific instructions. The following skills are available in this session:\n\n<available_skills>\n- `office`: Create, edit, inspect, or convert Office documents, spreadsheets, presentations, and PDFs. Load to choose the relevant workflow.\n- `office-docx`: Create, read, edit, and validate Word documents (.docx).\n- `office-export-pdf`: Convert an Office document to a requested PDF with LibreOffice Kit.\n- `office-pptx`: Create, read, edit, and validate PowerPoint presentations (.pptx).\n- `office-recalculate`: Refresh spreadsheet formula caches and verify calculated values with LibreOffice Kit.\n- `office-render`: Render requested document images or inspect visual layout with LibreOffice Kit.\n- `office-xlsx`: Read, create, edit, and validate Excel workbooks, data, and formulas (.xlsx).\n</available_skills>\n\nIf the user names a skill, or the task clearly matches a skill's description, call the `skill` tool with the exact skill name before taking task actions. Load all applicable skills, then follow their full instructions. This catalog contains summaries only; do not infer or follow a skill's instructions until it has been loaded.\nA user may also invoke a skill directly; its <skill_content> block then appears in this conversation. Follow it, and do not call the `skill` tool again for that skill.\n</system-reminder>Time sampled while preparing turn 1, step 1: 2026-10-16T00:00:00+00:00[UTC]\nBrowser time zone for this request: unavailable. Ask the user to clarify otherwise-unqualified dates and times.\nElapsed since the preceding model-visible message: unavailable."
"Query the packaged Python environment for Office authoring.Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are the root agent. Your agent id is \"authoring\".\n\nTo message other agents, use send_message({ agent_id: \"<agent-id>\", message: \"...\" }).\nUse list_agents({}) to find your collaborator agents and their ids.<system-reminder>\nA skill is a reusable set of task-specific instructions. The following skills are available in this session:\n\n<available_skills>\n- `office`: Create, edit, inspect, or convert Office documents, spreadsheets, presentations, and PDFs. Load to choose the relevant workflow.\n- `office-docx`: Create, read, edit, and validate Word documents (.docx).\n- `office-export-pdf`: Convert an Office document to a requested PDF with LibreOffice Kit.\n- `office-pptx`: Create, read, edit, and validate PowerPoint presentations (.pptx).\n- `office-recalculate`: Refresh spreadsheet formula caches and verify calculated values with LibreOffice Kit.\n- `office-render`: Render requested document images or inspect visual layout with LibreOffice Kit.\n- `office-xlsx`: Read, create, edit, and validate Excel workbooks, data, and formulas (.xlsx).\n</available_skills>\n\nIf the user names a skill, or the task clearly matches a skill's description, call the `skill` tool with the exact skill name before taking task actions. Load all applicable skills, then follow their full instructions. This catalog contains summaries only; do not infer or follow a skill's instructions until it has been loaded.\nA user may also invoke a skill directly; its <skill_content> block then appears in this conversation. Follow it, and do not call the `skill` tool again for that skill.\n</system-reminder>Time sampled while preparing turn 1, step 1: 2026-10-16T00:00:00+00:00[UTC]\nBrowser time zone for this request: unavailable. Ask the user to clarify otherwise-unqualified dates and times.\nElapsed since the preceding model-visible message: unavailable."
],
"result": {
"python": "{{python}}",
@@ -8,7 +8,7 @@
}
},
"catalogs": [
"Query the packaged Python environment for Office authoring.Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).<system-reminder>\nA skill is a reusable set of task-specific instructions. The following skills are available in this session:\n\n<available_skills>\n- `diagnose-windows-sandbox-acl`: Use on Windows for unexpected DSH sandbox access denials: workspace writes or listing fail, or an ordinarily readable path cannot be read. One bundled command inspects the path and every ancestor and repairs the ACL problems it proves in that same run. Expected confinement denials need no ACL repair.\n- `office`: Create, edit, inspect, or convert Office documents, spreadsheets, presentations, and PDFs. Load to choose the relevant workflow.\n- `office-docx`: Create, read, edit, and validate Word documents (.docx).\n- `office-export-pdf`: Convert an Office document to a requested PDF with LibreOffice Kit.\n- `office-pptx`: Create, read, edit, and validate PowerPoint presentations (.pptx).\n- `office-recalculate`: Refresh spreadsheet formula caches and verify calculated values with LibreOffice Kit.\n- `office-render`: Render requested document images or inspect visual layout with LibreOffice Kit.\n- `office-xlsx`: Read, create, edit, and validate Excel workbooks, data, and formulas (.xlsx).\n</available_skills>\n\nIf the user names a skill, or the task clearly matches a skill's description, call the `skill` tool with the exact skill name before taking task actions. Load all applicable skills, then follow their full instructions. This catalog contains summaries only; do not infer or follow a skill's instructions until it has been loaded.\nA user may also invoke a skill directly; its <skill_content> block then appears in this conversation. Follow it, and do not call the `skill` tool again for that skill.\n</system-reminder>Time sampled while preparing turn 1, step 1: 2026-10-16T00:00:00+00:00[UTC]\nBrowser time zone for this request: unavailable. Ask the user to clarify otherwise-unqualified dates and times.\nElapsed since the preceding model-visible message: unavailable."
"Query the packaged Python environment for Office authoring.Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are the root agent. Your agent id is \"authoring\".\n\nTo message other agents, use send_message({ agent_id: \"<agent-id>\", message: \"...\" }).\nUse list_agents({}) to find your collaborator agents and their ids.<system-reminder>\nA skill is a reusable set of task-specific instructions. The following skills are available in this session:\n\n<available_skills>\n- `diagnose-windows-sandbox-acl`: Use on Windows for unexpected DSH sandbox access denials: workspace writes or listing fail, or an ordinarily readable path cannot be read. One bundled command inspects the path and every ancestor and repairs the ACL problems it proves in that same run. Expected confinement denials need no ACL repair.\n- `office`: Create, edit, inspect, or convert Office documents, spreadsheets, presentations, and PDFs. Load to choose the relevant workflow.\n- `office-docx`: Create, read, edit, and validate Word documents (.docx).\n- `office-export-pdf`: Convert an Office document to a requested PDF with LibreOffice Kit.\n- `office-pptx`: Create, read, edit, and validate PowerPoint presentations (.pptx).\n- `office-recalculate`: Refresh spreadsheet formula caches and verify calculated values with LibreOffice Kit.\n- `office-render`: Render requested document images or inspect visual layout with LibreOffice Kit.\n- `office-xlsx`: Read, create, edit, and validate Excel workbooks, data, and formulas (.xlsx).\n</available_skills>\n\nIf the user names a skill, or the task clearly matches a skill's description, call the `skill` tool with the exact skill name before taking task actions. Load all applicable skills, then follow their full instructions. This catalog contains summaries only; do not infer or follow a skill's instructions until it has been loaded.\nA user may also invoke a skill directly; its <skill_content> block then appears in this conversation. Follow it, and do not call the `skill` tool again for that skill.\n</system-reminder>Time sampled while preparing turn 1, step 1: 2026-10-16T00:00:00+00:00[UTC]\nBrowser time zone for this request: unavailable. Ask the user to clarify otherwise-unqualified dates and times.\nElapsed since the preceding model-visible message: unavailable."
],
"result": {
"python": "{{python}}",
@@ -45,6 +45,7 @@
"maxTokens": true
},
"tools": [
"apply_patch",
"ask_user_question",
"create_goal",
"edit",
@@ -61,15 +62,16 @@
"read",
"read_image",
"schedule_create",
"schedule_delete",
"schedule_edit",
"schedule_list",
"schedule_update",
"schedule_view",
"send_message",
"skill",
"subagent",
"subagent_fork",
"todo_write",
"update_goal",
"wait_agent",
"web_fetch",
"web_search",
"workflow",
@@ -107,6 +109,7 @@
"maxTokens": true
},
"tools": [
"apply_patch",
"ask_user_question",
"create_goal",
"edit",
@@ -123,9 +126,9 @@
"read",
"read_image",
"schedule_create",
"schedule_delete",
"schedule_edit",
"schedule_list",
"schedule_update",
"schedule_view",
"send_message",
"skill",
"snapshot_ping",
@@ -133,6 +136,7 @@
"subagent_fork",
"todo_write",
"update_goal",
"wait_agent",
"web_fetch",
"web_search",
"workflow",
@@ -184,6 +188,7 @@
"maxTokens": true
},
"tools": [
"apply_patch",
"ask_user_question",
"create_goal",
"edit",
@@ -200,15 +205,16 @@
"read",
"read_image",
"schedule_create",
"schedule_delete",
"schedule_edit",
"schedule_list",
"schedule_update",
"schedule_view",
"send_message",
"skill",
"subagent",
"subagent_fork",
"todo_write",
"update_goal",
"wait_agent",
"web_fetch",
"web_search",
"workflow",
+46 -181
View File
@@ -302,210 +302,35 @@
"symbol": "GoalChanged",
"source": "packages/goal/goal/src/domain.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "AfterScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "AtScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "EveryScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "DailyInput",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "DailyScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "RecurringScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "LegacyScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeleteInactiveResult",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "LocalAtInput",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "AtInput",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "OneShotScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryReceipt",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleTimingChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleUpdateRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleUpdateResult",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryHistoryRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "DeliveryRetentionBounds",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryHistoryResult",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleCatalogEntry",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleCreateChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeleteChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "OneShotScheduleDispatchChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "EveryScheduleDispatchChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDispatchChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleState",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryMode",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleView",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleCreateRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleListRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeleteRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeleteResult",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/agent-team.md",
"symbol": "TeamMemberProjection",
"source": "packages/experimental/agent-team/src/types.ts"
},
{
"doc": "docs/subsystems/agent-team.md",
"symbol": "TeamTaskView",
"source": "packages/experimental/agent-team/src/types.ts"
"source": "packages/team/agent-team/src/types.ts"
},
{
"doc": "docs/subsystems/agent-team.md",
"symbol": "TeamProjection",
"source": "packages/experimental/agent-team/src/types.ts"
"source": "packages/team/agent-team/src/types.ts"
},
{
"doc": "docs/subsystems/agent-team.md",
"symbol": "TeamMemberSnapshot",
"source": "packages/experimental/agent-team/src/types.ts"
"source": "packages/team/agent-team/src/types.ts"
},
{
"doc": "docs/subsystems/agent-team.md",
"symbol": "TeamMessageSnapshot",
"source": "packages/experimental/agent-team/src/types.ts"
"source": "packages/team/agent-team/src/types.ts"
},
{
"doc": "docs/subsystems/agent-team.md",
"symbol": "TeamMessageSource",
"source": "packages/experimental/agent-team/src/types.ts"
"source": "packages/team/agent-team/src/types.ts"
},
{
"doc": "docs/subsystems/agent-team.md",
"symbol": "TeamTaskSnapshot",
"source": "packages/experimental/agent-team/src/types.ts"
"source": "packages/team/agent-team/src/types.ts"
},
{
"doc": "docs/subsystems/commands.md",
@@ -1536,6 +1361,41 @@
"symbol": "FileReadOutcome",
"source": "packages/fs/tool-fs/src/read-render.ts"
},
{
"doc": "docs/subsystems/filesystem.md",
"symbol": "FsDeleteOutcome",
"source": "packages/fs/fs/src/types.ts"
},
{
"doc": "docs/subsystems/filesystem.md",
"symbol": "FsMoveSourceFailure",
"source": "packages/fs/fs/src/types.ts"
},
{
"doc": "docs/subsystems/filesystem.md",
"symbol": "FsMoveOutcome",
"source": "packages/fs/fs/src/types.ts"
},
{
"doc": "docs/subsystems/filesystem.md",
"symbol": "HunkApplyFailure",
"source": "packages/fs/fs-patch/src/types.ts"
},
{
"doc": "docs/subsystems/filesystem.md",
"symbol": "ApplyHunksResult",
"source": "packages/fs/fs-patch/src/types.ts"
},
{
"doc": "docs/subsystems/filesystem.md",
"symbol": "PatchHunk",
"source": "packages/fs/fs-patch/src/types.ts"
},
{
"doc": "docs/subsystems/filesystem.md",
"symbol": "PatchOperation",
"source": "packages/fs/fs-patch/src/types.ts"
},
{
"doc": "docs/subsystems/skills.md",
"symbol": "SkillSource",
@@ -2271,6 +2131,11 @@
"symbol": "ProjectionChangeListener",
"source": "packages/session/session-projection/src/index.ts"
},
{
"doc": "docs/subsystems/session-projection.md",
"symbol": "ProjectionEventChangeListener",
"source": "packages/session/session-projection/src/index.ts"
},
{
"doc": "docs/subsystems/core.md",
"symbol": "AgentHandle",
@@ -30,6 +30,7 @@ interface SentenceContract {
* so an absent section cannot be mistaken for forgotten documentation.
*/
const NO_MODEL_EXPERIENCE_SECTION: Readonly<Record<string, string>> = {
'packages/fs/fs-patch': 'The pure library only parses caller-supplied patch text and applies hunks to text; consumers own tools, execution, capture, and model output.',
'packages/util/file-drag': 'The package resolves export names and declares native file operations; it does not construct model input.',
'packages/core/scope': 'The package is a model-agnostic registration and lifecycle primitive; model-facing consumers own any context selection.',
'packages/experimental/liveshare-protocol': 'The package only defines wire frames and identity values that its consumers exchange; it registers nothing model-facing.',
@@ -137,7 +138,7 @@ const SENTENCE_MODEL_EXPERIENCE: Readonly<Record<string, SentenceContract>> = {
'packages/client/file-upload': { kind: 'none', reason: 'Browser-side request-body transport; registers nothing model-facing.' },
'packages/api/remotes': { kind: 'none', reason: 'The Remote BFF selects business methods and forwarded events; selected services own any model-visible effect.' },
'packages/api/remote-access': { kind: 'none', reason: 'Remote access decisions for Client callers; registers nothing model-facing.' },
'packages/experimental/client-ui-agent-team': { kind: 'none', reason: 'The browser projection and task controls register no model-facing input.' },
'packages/client/ui-agent-team': { kind: 'none', reason: 'The browser projection and task controls register no model-facing input.' },
'packages/experimental/client-ui-claude-code-mods': { kind: 'none', reason: 'The browser draws Host-held mod trees and relays clicks; the mods\' own hooks own any model-visible effect.' },
'packages/client/shortcuts': { kind: 'none', reason: 'Browser keyboard routing; registers nothing model-facing.' },
'packages/client/ui-shortcuts': { kind: 'none', reason: 'Read-only browser reference; registers nothing model-facing.' },