From 7b86b84c2f7415fec73c120845d514d4b2ce3e72 Mon Sep 17 00:00:00 2001 From: lsdsjy <1356263+lsdsjy@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:37:07 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix(web):=20=E4=BF=AE=E5=A4=8D=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E6=A8=A1=E5=9E=8B=E8=AE=BE=E7=BD=AE=E7=9A=84=20namesp?= =?UTF-8?q?ace=20=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui-settings-models/README.i18n.yaml | 4 +- packages/client/ui-settings-models/README.md | 2 +- .../client/ui-settings-models/README.zh.md | 2 +- .../src/client/ProviderEditor.tsx | 1 + .../tests/components.client.spec.tsx | 52 +++++++++++++++++-- .../tests/store.client.spec.ts | 14 ++++- 6 files changed, 66 insertions(+), 9 deletions(-) diff --git a/packages/client/ui-settings-models/README.i18n.yaml b/packages/client/ui-settings-models/README.i18n.yaml index 79acecbefe..9af1829753 100644 --- a/packages/client/ui-settings-models/README.i18n.yaml +++ b/packages/client/ui-settings-models/README.i18n.yaml @@ -30,8 +30,8 @@ en: 589397a35f82244e zh: 342fbceee2c173a2 /deepseek-ai-dsh-client-ui-settings-models/use-this-package/extension-slots: - en: 6979796f0332268f - zh: 00896a005cc4f4e2 + en: 1edb9186d1ab73c2 + zh: c4895e03947c1235 /deepseek-ai-dsh-client-ui-settings-models/understand-the-implementation: en: a87afbec5e339b36 zh: 6348c81af7e650e1 diff --git a/packages/client/ui-settings-models/README.md b/packages/client/ui-settings-models/README.md index 549177fbbb..b34be2679f 100644 --- a/packages/client/ui-settings-models/README.md +++ b/packages/client/ui-settings-models/README.md @@ -61,7 +61,7 @@ After the versioned notice step completes, the DeepSeek step projects first-run The section declares two seats for plugins distributed outside this repository, typed in [`src/client/slot-contract.ts`](src/client/slot-contract.ts) and exported from `./client`. `settings.models.provider-card` (keyed) renders inside every card that shows a directory row — a saved row's card, its first-run setup posture, and the add-provider draft — dispatched with `entryKey = settingsNs` and owner props carrying the row's `ConfigurableProviderView`, its configured state, and its confirmed api-key credential state, so one registration under an adapter family's namespace receives every card of that family, hand-declared routes included; the hand-declared draft card has no directory row yet and dispatches nothing until saved. `settings.models.footer` (list) renders after the rows and the add controls. A registrant activates through `ctx.slots.inject` with a type-only import of this package's `/client` entry; without registrants both seats render nothing. -The Models page includes **DeepSeek Account** (`deepseek-account`, **DeepSeek 账号** in Chinese). Its editor exposes the shared DeepSeek model catalog without API-key or base-URL inputs. The account row is hidden when its available model catalog is empty, including before sign-in and after sign-out; it returns when account models become available. +The Models page includes **DeepSeek Account** (`deepseek-account`, **DeepSeek 账号** in Chinese). Its editor exposes the shared DeepSeek model catalog without API-key or base-URL inputs, and saves that catalog under the account route's own `llm-deepseek-account` section, so an account edit never rewrites the `llm-deepseek` section the official route reads. The account row is hidden when its available model catalog is empty, including before sign-in and after sign-out; it returns when account models become available. ----- diff --git a/packages/client/ui-settings-models/README.zh.md b/packages/client/ui-settings-models/README.zh.md index e9bd2122c3..d4029f3a19 100644 --- a/packages/client/ui-settings-models/README.zh.md +++ b/packages/client/ui-settings-models/README.zh.md @@ -61,7 +61,7 @@ API 密钥输入框初始为空,并通过 `autocomplete="new-password"` 请求 本分区为仓库外分发的插件声明两个席位,类型定义在 [`src/client/slot-contract.ts`](src/client/slot-contract.ts) 并从 `./client` 导出。`settings.models.provider-card`(keyed)渲染在每张展示目录行的卡片内部——已保存行的卡片、其首次运行 setup 形态、以及「添加提供商」草稿卡——以 `entryKey = settingsNs` 分发,owner props 携带该行的 `ConfigurableProviderView`、其 configured 状态与已确认的 api-key 凭据状态,因此以某适配器家族的 namespace 注册一次即可收到该家族的全部卡片,含手工声明的路由;手工声明的草稿卡尚无目录行,保存之前不分发。`settings.models.footer`(list)渲染在行列表与新增控件之后。注册方通过 `ctx.slots.inject` 激活,并以 type-only import 引入本包 `/client` 入口;没有注册方时两个席位均不渲染任何内容。 -Models 页面包含 **DeepSeek 账号**(`deepseek-account`,英文为 **DeepSeek Account**)。其编辑器展示共享的 DeepSeek 模型目录,不提供 API Key 或 Base URL 输入框。账号可用模型目录为空时隐藏账号行,包括登录前和退登后;账号模型恢复可用时重新显示。 +Models 页面包含 **DeepSeek 账号**(`deepseek-account`,英文为 **DeepSeek Account**)。其编辑器展示共享的 DeepSeek 模型目录,不提供 API Key 或 Base URL 输入框;目录保存到账号路由自己的 `llm-deepseek-account` 段,因此账号侧的编辑不会改写 official 路由读取的 `llm-deepseek` 段。账号可用模型目录为空时隐藏账号行,包括登录前和退登后;账号模型恢复可用时重新显示。 ----- diff --git a/packages/client/ui-settings-models/src/client/ProviderEditor.tsx b/packages/client/ui-settings-models/src/client/ProviderEditor.tsx index a50fe2933f..08056cc965 100644 --- a/packages/client/ui-settings-models/src/client/ProviderEditor.tsx +++ b/packages/client/ui-settings-models/src/client/ProviderEditor.tsx @@ -138,6 +138,7 @@ export function pathOps( /** The editor layout the owning namespace selects. */ function layoutOf(ns: string): EditorLayout { if (ns === 'llm-deepseek') return 'deepseek' + if (ns === 'llm-deepseek-account') return 'deepseek' if (ns === 'llm-pi-ai') return 'pi-ai' return 'unknown' } diff --git a/packages/client/ui-settings-models/tests/components.client.spec.tsx b/packages/client/ui-settings-models/tests/components.client.spec.tsx index 1a2398bd2a..671cc0b5ca 100644 --- a/packages/client/ui-settings-models/tests/components.client.spec.tsx +++ b/packages/client/ui-settings-models/tests/components.client.spec.tsx @@ -137,9 +137,29 @@ function wireNamespaces(): SettingsNamespaceView[] { secrets: [], revision: 4, }, + { + ns: 'llm-deepseek-account', + schema: JSON.parse(JSON.stringify(DeepSeekConfig.toJSON())) as JsonValue, + value: { + baseURL: 'https://base', + defaultContextWindow: 1_000_000, + maxTokens: 256_000, + models: DEFAULT_DEEPSEEK_MODELS, + }, + base: { defaultContextWindow: 1_000_000, maxTokens: 256_000, models: DEFAULT_DEEPSEEK_MODELS }, + user: {}, + autoGenerate: true, applies: 'live', + secrets: [], + revision: 0, + }, ] } +/** The account provider's dedicated settings namespace. */ +function accountNamespace(): SettingsNamespaceView { + return wireNamespaces().find(view => view.ns === 'llm-deepseek-account')! +} + /** Credentials answers over the Remote carrier, which has no envelope. */ function remoteOk(value: T) { return { ok: true as const, value } @@ -1887,15 +1907,41 @@ it.each([en, zh])('edits the account model catalog without credential or endpoin const scripted = scriptedFace({}) const ops = operationsWith(scripted.face) const describe = vi.spyOn(ops, 'describeCredential') + const namespace = accountNamespace() + const mutate = vi.spyOn(scripted.face.settings, 'mutate').mockResolvedValue(remoteOk(accountNamespace())) + const onClose = vi.fn() render( copy[key]} readOnly={false} onClose={() => {}} />) + namespace={namespace} settingsPath={[]} schema={settingsSchema} + operations={ops} t={key => copy[key]} readOnly={false} onClose={onClose} />) expect(screen.queryByLabelText(copy.keyInput)).toBeNull() expect(screen.queryByLabelText(copy.baseUrl)).toBeNull() expect(describe).not.toHaveBeenCalled() expect(screen.getByDisplayValue('deepseek-v4-flash')).toBeTruthy() + expect(screen.queryByText(content => content.includes(copy.advancedHint))).toBeNull() await expect(`${document.body.textContent}\n`) .toMatchFileSnapshot(`./expected/deepseek-account-${copy === en ? 'en' : 'zh'}.txt`) + const set = vi.spyOn(ops, 'storeCredential') + fireEvent.change(screen.getAllByLabelText(new RegExp(copy.modelId))[0]!, { target: { value: 'deepseek-v4-mini' } }) + fireEvent.click(screen.getByText(copy.apply)) + await waitFor(() => { expect(onClose).toHaveBeenCalledWith(true) }) + expect(mutate.mock.calls[0]).toEqual([ + 'llm-deepseek-account', + [{ + op: 'set', + path: ['models'], + value: [ + { + id: 'deepseek-v4-mini', + name: 'DeepSeek-V4-Flash', + description: 'Preserved hidden detail', + contextWindow: 1_000_000, + }, + { id: 'deepseek-v4-pro', name: 'DeepSeek-V4-Pro', contextWindow: 1_000_000 }, + ], + }], + 0, + ]) + expect(set).not.toHaveBeenCalled() }) it('renders the localized account row and supports catalogs without capacity defaults', async () => { @@ -1907,7 +1953,7 @@ it('renders the localized account row and supports catalogs without capacity def }) }) expect(screen.getByText(en.deepSeekAccount)).toBeTruthy() view.unmount() - const namespace = wireNamespaces()[0]! + const namespace = accountNamespace() render( {}} />) diff --git a/packages/client/ui-settings-models/tests/store.client.spec.ts b/packages/client/ui-settings-models/tests/store.client.spec.ts index 79905b4441..007ff68099 100644 --- a/packages/client/ui-settings-models/tests/store.client.spec.ts +++ b/packages/client/ui-settings-models/tests/store.client.spec.ts @@ -62,6 +62,15 @@ const NAMESPACES = [ secrets: [], revision: 0, }, + { + ns: 'llm-deepseek-account', + schema: {}, + value: { baseURL: 'https://base' }, + base: { baseURL: 'https://base' }, + autoGenerate: true, applies: 'live' as const, + secrets: [], + revision: 0, + }, { ns: 'llm-pi-ai', schema: {}, @@ -346,7 +355,7 @@ describe('edge joins', () => { it.each([false, true])('uses account availability without asking for an API key: %s', async (accountAvailable) => { const { ctx, mirror, seenRefs } = api({ accountAvailable, providers: async () => ok({ providers: [{ - provider: 'deepseek-account', displayName: 'DeepSeek Account', settingsNs: 'llm-deepseek', settingsPath: [], active: true, + provider: 'deepseek-account', displayName: 'DeepSeek Account', settingsNs: 'llm-deepseek-account', settingsPath: [], active: true, }] }) }) const store = new ModelsSettingsStore(ctx, settingsSchema, mirror) await store.load() @@ -356,12 +365,13 @@ it.each([false, true])('uses account availability without asking for an API key: expect(rows[0]).toMatchObject({ accountAvailable: true, apiKeyEnv: undefined, credential: undefined }) expect(providerUsable(rows[0]!)).toBe(true) } + expect(store.store.getSnapshot().namespaces.get('llm-deepseek-account')?.ns).toBe('llm-deepseek-account') expect(seenRefs).toEqual([]) }) it('removes the account row after sign-out and restores it after sign-in', async () => { const overrides = { accountAvailable: true, providers: async () => ok({ providers: [{ - provider: 'deepseek-account', displayName: 'DeepSeek Account', settingsNs: 'llm-deepseek', settingsPath: [], active: true, + provider: 'deepseek-account', displayName: 'DeepSeek Account', settingsNs: 'llm-deepseek-account', settingsPath: [], active: true, }, ...DIRECTORY] }) } const { ctx, mirror } = api(overrides) const store = new ModelsSettingsStore(ctx, settingsSchema, mirror) From d183c8a8c0e1ed7e718a6c1e791478005511d856 Mon Sep 17 00:00:00 2001 From: lsdsjy <1356263+lsdsjy@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:54:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix(web):=20=E6=8C=89=E8=B4=A6=E5=8F=B7=20p?= =?UTF-8?q?rovider=20=E8=AF=86=E5=88=AB=E6=A8=A1=E5=9E=8B=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui-settings-models/README.i18n.yaml | 4 +- packages/client/ui-settings-models/README.md | 2 +- .../client/ui-settings-models/README.zh.md | 2 +- .../src/client/ProviderEditor.tsx | 4 +- .../tests/components.client.spec.tsx | 69 +++++++++++++++++-- 5 files changed, 70 insertions(+), 11 deletions(-) diff --git a/packages/client/ui-settings-models/README.i18n.yaml b/packages/client/ui-settings-models/README.i18n.yaml index 9af1829753..3e3c096cab 100644 --- a/packages/client/ui-settings-models/README.i18n.yaml +++ b/packages/client/ui-settings-models/README.i18n.yaml @@ -30,8 +30,8 @@ en: 589397a35f82244e zh: 342fbceee2c173a2 /deepseek-ai-dsh-client-ui-settings-models/use-this-package/extension-slots: - en: 1edb9186d1ab73c2 - zh: c4895e03947c1235 + en: 65e9d8822b67b6c2 + zh: 7e83be9defda28ee /deepseek-ai-dsh-client-ui-settings-models/understand-the-implementation: en: a87afbec5e339b36 zh: 6348c81af7e650e1 diff --git a/packages/client/ui-settings-models/README.md b/packages/client/ui-settings-models/README.md index b34be2679f..ead2111e2b 100644 --- a/packages/client/ui-settings-models/README.md +++ b/packages/client/ui-settings-models/README.md @@ -61,7 +61,7 @@ After the versioned notice step completes, the DeepSeek step projects first-run The section declares two seats for plugins distributed outside this repository, typed in [`src/client/slot-contract.ts`](src/client/slot-contract.ts) and exported from `./client`. `settings.models.provider-card` (keyed) renders inside every card that shows a directory row — a saved row's card, its first-run setup posture, and the add-provider draft — dispatched with `entryKey = settingsNs` and owner props carrying the row's `ConfigurableProviderView`, its configured state, and its confirmed api-key credential state, so one registration under an adapter family's namespace receives every card of that family, hand-declared routes included; the hand-declared draft card has no directory row yet and dispatches nothing until saved. `settings.models.footer` (list) renders after the rows and the add controls. A registrant activates through `ctx.slots.inject` with a type-only import of this package's `/client` entry; without registrants both seats render nothing. -The Models page includes **DeepSeek Account** (`deepseek-account`, **DeepSeek 账号** in Chinese). Its editor exposes the shared DeepSeek model catalog without API-key or base-URL inputs, and saves that catalog under the account route's own `llm-deepseek-account` section, so an account edit never rewrites the `llm-deepseek` section the official route reads. The account row is hidden when its available model catalog is empty, including before sign-in and after sign-out; it returns when account models become available. +The Models page includes **DeepSeek Account** (`deepseek-account`, **DeepSeek 账号** in Chinese). Its editor exposes the shared DeepSeek model catalog without API-key or base-URL inputs, and saves that catalog under the account route's own settings section (`llm-deepseek-account` by default), so an account edit never rewrites the `llm-deepseek` section the official route reads. The account row is hidden when its available model catalog is empty, including before sign-in and after sign-out; it returns when account models become available. ----- diff --git a/packages/client/ui-settings-models/README.zh.md b/packages/client/ui-settings-models/README.zh.md index d4029f3a19..8f8e0720fb 100644 --- a/packages/client/ui-settings-models/README.zh.md +++ b/packages/client/ui-settings-models/README.zh.md @@ -61,7 +61,7 @@ API 密钥输入框初始为空,并通过 `autocomplete="new-password"` 请求 本分区为仓库外分发的插件声明两个席位,类型定义在 [`src/client/slot-contract.ts`](src/client/slot-contract.ts) 并从 `./client` 导出。`settings.models.provider-card`(keyed)渲染在每张展示目录行的卡片内部——已保存行的卡片、其首次运行 setup 形态、以及「添加提供商」草稿卡——以 `entryKey = settingsNs` 分发,owner props 携带该行的 `ConfigurableProviderView`、其 configured 状态与已确认的 api-key 凭据状态,因此以某适配器家族的 namespace 注册一次即可收到该家族的全部卡片,含手工声明的路由;手工声明的草稿卡尚无目录行,保存之前不分发。`settings.models.footer`(list)渲染在行列表与新增控件之后。注册方通过 `ctx.slots.inject` 激活,并以 type-only import 引入本包 `/client` 入口;没有注册方时两个席位均不渲染任何内容。 -Models 页面包含 **DeepSeek 账号**(`deepseek-account`,英文为 **DeepSeek Account**)。其编辑器展示共享的 DeepSeek 模型目录,不提供 API Key 或 Base URL 输入框;目录保存到账号路由自己的 `llm-deepseek-account` 段,因此账号侧的编辑不会改写 official 路由读取的 `llm-deepseek` 段。账号可用模型目录为空时隐藏账号行,包括登录前和退登后;账号模型恢复可用时重新显示。 +Models 页面包含 **DeepSeek 账号**(`deepseek-account`,英文为 **DeepSeek Account**)。其编辑器展示共享的 DeepSeek 模型目录,不提供 API Key 或 Base URL 输入框;目录保存到账号路由自己的设置段(默认为 `llm-deepseek-account`),因此账号侧的编辑不会改写 official 路由读取的 `llm-deepseek` 段。账号可用模型目录为空时隐藏账号行,包括登录前和退登后;账号模型恢复可用时重新显示。 ----- diff --git a/packages/client/ui-settings-models/src/client/ProviderEditor.tsx b/packages/client/ui-settings-models/src/client/ProviderEditor.tsx index 08056cc965..41dac376d1 100644 --- a/packages/client/ui-settings-models/src/client/ProviderEditor.tsx +++ b/packages/client/ui-settings-models/src/client/ProviderEditor.tsx @@ -138,7 +138,6 @@ export function pathOps( /** The editor layout the owning namespace selects. */ function layoutOf(ns: string): EditorLayout { if (ns === 'llm-deepseek') return 'deepseek' - if (ns === 'llm-deepseek-account') return 'deepseek' if (ns === 'llm-pi-ai') return 'pi-ai' return 'unknown' } @@ -183,8 +182,9 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode { const node = useMemo(() => schema.nodeAtPath(root, settingsPath), [root, schema, settingsPath]) const fallback = schema.getPath(namespace.value, settingsPath) const disabled = props.readOnly || busy - const layout = layoutOf(namespace.ns) const accountProvider = props.provider === 'deepseek-account' + // Account settings use a configurable Cordis entry id. + const layout = accountProvider ? 'deepseek' : layoutOf(namespace.ns) const keyRef = refFor(schema, namespace, settingsPath, props.provider) // The same schema read the create card makes, so the choices offered here // and there cannot drift apart: both come from the adapter's own `Config`. diff --git a/packages/client/ui-settings-models/tests/components.client.spec.tsx b/packages/client/ui-settings-models/tests/components.client.spec.tsx index 671cc0b5ca..9396ff7f42 100644 --- a/packages/client/ui-settings-models/tests/components.client.spec.tsx +++ b/packages/client/ui-settings-models/tests/components.client.spec.tsx @@ -155,9 +155,9 @@ function wireNamespaces(): SettingsNamespaceView[] { ] } -/** The account provider's dedicated settings namespace. */ -function accountNamespace(): SettingsNamespaceView { - return wireNamespaces().find(view => view.ns === 'llm-deepseek-account')! +/** The account provider's settings namespace, under a composition's entry id. */ +function accountNamespace(ns = 'llm-deepseek-account'): SettingsNamespaceView { + return { ...wireNamespaces().find(view => view.ns === 'llm-deepseek-account')!, ns } } /** Credentials answers over the Remote carrier, which has no envelope. */ @@ -1904,11 +1904,11 @@ describe('apiKeyFailure', () => { }) it.each([en, zh])('edits the account model catalog without credential or endpoint fields', async (copy) => { - const scripted = scriptedFace({}) + const mutate = vi.fn(() => Promise.resolve(remoteOk(accountNamespace()))) + const scripted = scriptedFace({ mutate }) const ops = operationsWith(scripted.face) const describe = vi.spyOn(ops, 'describeCredential') const namespace = accountNamespace() - const mutate = vi.spyOn(scripted.face.settings, 'mutate').mockResolvedValue(remoteOk(accountNamespace())) const onClose = vi.fn() render( { + const namespace = accountNamespace('team-account-entry') + const mutate = vi.fn(() => Promise.resolve(remoteOk(namespace))) + const ops = operationsWith(scriptedFace({ mutate }).face) + const set = vi.spyOn(ops, 'storeCredential') + const onClose = vi.fn() + render() + expect(screen.queryByText(content => content.includes(en.advancedHint))).toBeNull() + expect(screen.getByDisplayValue('deepseek-v4-flash')).toBeTruthy() + fireEvent.change(screen.getAllByLabelText(new RegExp(en.modelId))[0]!, { target: { value: 'deepseek-v4-mini' } }) + fireEvent.click(screen.getByText(en.apply)) + await waitFor(() => { expect(onClose).toHaveBeenCalledWith(true) }) + expect(mutate).toHaveBeenCalledWith('team-account-entry', expect.any(Array), 0) + expect(set).not.toHaveBeenCalled() +}) + +it('opens the account row from the section and saves to its own namespace', async () => { + const namespace = accountNamespace() + const mutate = vi.fn(() => Promise.resolve(remoteOk(namespace))) + const { controller, set } = await mountSection({ mutate }) + const row = controller.store.getSnapshot().rows[0]! + await act(async () => { controller.store.update((state) => { + state.rows = [{ + ...row, + accountAvailable: true, + entry: { + provider: 'deepseek-account', displayName: en.deepSeekAccount, settingsNs: namespace.ns, settingsPath: [], active: true, + }, + }, ...state.rows] + }) }) + fireEvent.click(screen.getByRole('button', { + name: providerCopy(en.editProvider, { provider: 'deepseek-account', displayName: en.deepSeekAccount }), + })) + expect(screen.getByDisplayValue('deepseek-v4-flash')).toBeTruthy() + fireEvent.change(screen.getAllByLabelText(new RegExp(en.modelId))[0]!, { target: { value: 'deepseek-v4-mini' } }) + fireEvent.click(screen.getByText(en.apply)) + await waitFor(() => { expect(mutate).toHaveBeenCalledTimes(1) }) + expect(mutate.mock.calls[0]).toEqual([ + 'llm-deepseek-account', + [{ + op: 'set', + path: ['models'], + value: [ + { + id: 'deepseek-v4-mini', + name: 'DeepSeek-V4-Flash', + description: 'Preserved hidden detail', + contextWindow: 1_000_000, + }, + { id: 'deepseek-v4-pro', name: 'DeepSeek-V4-Pro', contextWindow: 1_000_000 }, + ], + }], + 0, + ]) + expect(set).not.toHaveBeenCalled() +}) + it('renders the localized account row and supports catalogs without capacity defaults', async () => { const scripted = scriptedFace({}) const { controller, view } = await mountFace(scripted) From e1f65ea64060a71a4583da74729418603ea0c5f1 Mon Sep 17 00:00:00 2001 From: turtle1999 Date: Thu, 24 Sep 2026 17:20:17 +0800 Subject: [PATCH 3/4] fix(preset): route profile feature enabling through cordis-plugin-development Broaden the skill description to cover enabling a shipped plugin that a bundle leaves disabled, add the workspace-bundle recipe for it, forbid hand-editing profile files that install_bundle owns, and verify installs through the install result and cordis_inspect_query instead of logs, process lists, or paged list_plugins calls. --- .../skills/cordis-plugin-development/SKILL.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md b/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md index b66474a4ca..def5d11e19 100644 --- a/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md +++ b/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md @@ -1,18 +1,24 @@ --- name: cordis-plugin-development -description: Use when authoring, installing, configuring, or debugging persistent plugins and MCP connections in the current Harness profile, and for any visual object, decoration, or widget request that names no other destination, which means an installed UI plugin rendered in the Harness Web UI. +description: Use when adding, enabling, disabling, installing, configuring, or debugging a plugin, bundle, feature, page, panel, tool, or MCP connection in the current Harness profile, including a shipped plugin that is disabled by default, and for any visual object, decoration, or widget request that names no other destination, which means an installed UI plugin rendered in the Harness Web UI. --- # Persistent Harness plugins Use ordinary workspace files to author a bundle, then `plugin_manager` with `action: install_bundle` and the absolute package directory as `target` to install it in the current profile. Changes affect every session in that profile and survive restart. Load `editing-cordis-compositions` for agent preset changes. +Do not write the profile's `package.json` or `cordis.patch.yml`, create packages under `$DSH_HOME`, or run pnpm in the profile directory: `install_bundle` performs those steps, and each hand-made write outside the workspace needs its own approval. Every `plugin_manager` action, including `list_plugins` and `list_bundles`, also needs approval without Full access, so call it only when its result decides the next step. + +## Enable a shipped plugin + +A shipped bundle can resolve a plugin row and leave it `disabled`. The row id and its reason are in the shipped patch, `packages/bundle/*/cordis.patch.yml` in a source checkout. Write a workspace bundle whose patch overrides that row with `disabled: false` and inserts the Host rows it depends on; a source checkout's `apps/cli/config/examples//cordis.yml` lists them for opt-in features. Packages shipped with dsh resolve from the dsh installation, so the bundle declares no dependencies on them. Install it with `install_bundle`. + ## Deliver a working plugin first 1. Resolve the requested result and destination. An unspecified visual destination is the current Harness Web UI; a standalone image or HTML file does not complete such a request. Choose reasonable visual details and implement a small first version; install it before visual refinement. 2. Discover only the APIs needed for that version: `cordis_inspect_list`, then targeted `cordis_inspect_query` calls. For UI, query Client `Slots.listSubTree` and the selected slot's registration options and props. For anything beyond a static decoration, such as tool policy, agent context, session-derived state, or Chat rows, read `references/practices.md` before choosing the extension point. Once the chosen slot and registration API are known, write the plugin. 3. Read the matching template under `templates/` with the file-read tool and write its copies into one workspace directory, or write the installable package, patch, and required Host/Client files there yourself. Check JavaScript syntax and the manifest, then install it. Before that first installation, do not create preview HTML, mock shells, design variants, screenshot scripts, or rasterizer tooling. Use the installed plugin itself as the first preview. -4. Read the installation result. After `application: applied`, exercise the capability or inspect the live Client registration. Use the connected page for visual verification when browser control is available. For a page or panel, also verify design consistency: styles use only theme tokens, the plugin imports no Harness Client package such as `@deepseek-ai/dsh-client-ui-primitives`, the console shows no slot entry crash, and the view reads correctly in light and dark themes beside a comparable host page. State any verification limitation explicitly; installation and slot registration alone do not establish what the user can see. +4. Read the installation result: its `application` and `warnings` fields decide whether the change is live, not server logs, terminal output, process lists, or the page's boot payload. Confirm new rows with `cordis_inspect_query`, which needs no approval, rather than paging `list_plugins`. After `application: applied`, exercise the capability or inspect the live Client registration. Use the connected page for visual verification when browser control is available. For a page or panel, also verify design consistency: styles use only theme tokens, the plugin imports no Harness Client package such as `@deepseek-ai/dsh-client-ui-primitives`, the console shows no slot entry crash, and the view reads correctly in light and dark themes beside a comparable host page. State any verification limitation explicitly; installation and slot registration alone do not establish what the user can see. 5. Fix observed defects in the same plugin. When the requested result works, finish with its location and verification status. Do not continue speculative visual variants, optional features, or a new mock preview. Close any task list you created. ## Knowledge sources, in order From 12c9dd599e73235408f03df5c9eb8ddbf1677c2a Mon Sep 17 00:00:00 2001 From: Turtle 2099 Date: Thu, 24 Sep 2026 17:47:42 +0800 Subject: [PATCH 4/4] feat(approval): localize approval explanations (#4793) * feat(approval): localize prompts and allow consent for one turn * test(approval): update cast baseline and Web PTC prompt pin * fix(approval): cover PTC language and clarify turn consent * fix(approval): group turn consent under allow menu * fix(approval): keep turn consent in memory only * test(snapshot): refresh owners for merged justification guidance * fix(approval): drop duplicate allow-once from the allow menu * refactor(approval): derive turn consent expiry from one check Replace the turn approval bookkeeping (revocation state, incremental log cursor, and turn-signal listeners) with one side-effect-free expiry check over the log and lifetime flags. Events now only withdraw open presentations early; the expiry check decides whether an answer or turn consent still applies, including for Sessions without event publication. * refactor(approval): drop one-turn consent and keep localization only Remove the allowed-turn answer, the live turn-consent state, the allow menu, and their tests, notes, and recorded Web scenario. The approval service returns to the master request path; the request keeps the localized displayReason for presentation, and the card resolves it in the active UI language. * test(snapshots): record the localized justification schema text in new scenarios --------- Co-authored-by: Turtle Co-authored-by: Kaige-Gao <102539609+Kaige-Gao@users.noreply.github.com> --- .../2026-07-06-approval-seam.i18n.yaml | 4 +-- .../feature/2026-07-06-approval-seam.md | 2 +- .../feature/2026-07-06-approval-seam.zh.md | 2 +- docs/event-producer-consumer.md | 2 +- docs/event-producer-consumer.zh.md | 2 +- docs/subsystems/approval.i18n.yaml | 4 +-- docs/subsystems/approval.md | 2 +- docs/subsystems/approval.zh.md | 2 +- docs/tool-catalog.md | 2 +- docs/tool-catalog.zh.md | 2 +- packages/client/ui-approval/README.i18n.yaml | 4 +-- packages/client/ui-approval/README.md | 2 +- packages/client/ui-approval/README.zh.md | 2 +- .../ui-approval/src/client/ApprovalPanel.tsx | 8 +++--- .../ui-approval/src/client/contract/slots.ts | 16 +++++++++++ .../client/ui-approval/src/client/index.ts | 4 +++ .../tests/ui-approval.client.spec.tsx | 27 +++++++++++++++++-- packages/core/tools/README.i18n.yaml | 4 +-- packages/core/tools/README.md | 2 +- packages/core/tools/README.zh.md | 2 +- packages/core/tools/src/ptc.ts | 2 +- .../extensions/tool-cordis/src/api-catalog.ts | 2 +- packages/fs/tool-fs/README.i18n.yaml | 4 +-- packages/fs/tool-fs/README.md | 2 +- packages/fs/tool-fs/README.zh.md | 2 +- packages/fs/tool-fs/src/sandbox.ts | 2 +- .../user-approval/README.i18n.yaml | 4 +-- packages/interaction/user-approval/README.md | 2 +- .../interaction/user-approval/README.zh.md | 2 +- .../interaction/user-approval/src/types.ts | 2 ++ packages/sandbox/sandbox/README.i18n.yaml | 4 +-- packages/sandbox/sandbox/README.md | 2 +- packages/sandbox/sandbox/README.zh.md | 2 +- packages/sandbox/sandbox/src/escalation.ts | 15 +++++++++-- .../sandbox/sandbox/tests/escalation.spec.ts | 6 +++++ packages/shell/tool-bash/README.i18n.yaml | 4 +-- packages/shell/tool-bash/README.md | 2 +- packages/shell/tool-bash/README.zh.md | 2 +- packages/shell/tool-bash/src/index.ts | 3 ++- packages/shell/tool-pwsh/README.i18n.yaml | 8 +++--- packages/shell/tool-pwsh/README.md | 4 +-- packages/shell/tool-pwsh/README.zh.md | 4 +-- packages/shell/tool-pwsh/src/index.ts | 3 ++- scripts/no-unknown-casts.baseline.json | 3 +-- .../sdk/bash-tool/tool-schemas.expected.json | 6 ++--- .../tool-schemas.1.expected.json | 6 ++--- .../tool-schemas.1.expected.json | 6 ++--- .../tool-schemas.1.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.1.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.1.expected.json | 6 ++--- .../tool-schemas.1.expected.json | 6 ++--- .../sdk/text-turn/tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 12 ++++----- .../tool-schemas.expected.json | 6 ++--- .../both-mode-turn/system-prompt.expected.md | 6 ++--- .../both-mode-turn/tool-schemas.expected.json | 8 +++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 12 ++++----- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../system-prompt.expected.md | 6 ++--- .../tool-schemas.expected.json | 8 +++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 18 ++++++------- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../lsp-definition/tool-schemas.expected.json | 6 ++--- .../system-prompt.expected.md | 6 ++--- .../tool-schemas.expected.json | 2 +- .../mcp-resources/tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../office-skills/tool-schemas.expected.json | 4 +-- .../tool-schemas.expected.json | 4 +-- .../tool-schemas.expected.json | 12 ++++----- .../plugin-manager/tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../provider-cwd/tool-schemas.expected.json | 6 ++--- .../system-prompt.expected.md | 6 ++--- .../tool-schemas.expected.json | 2 +- .../system-prompt.expected.md | 6 ++--- .../tool-schemas.expected.json | 2 +- .../ptc-python-turn/system-prompt.expected.md | 6 ++--- .../ptc-read-image/system-prompt.expected.md | 6 ++--- .../ptc-turn/system-prompt.expected.md | 6 ++--- .../ptc-turn/tool-schemas.expected.json | 2 +- .../tool-schemas.expected.json | 6 ++--- .../pwsh-tool-turn/tool-schemas.expected.json | 6 ++--- .../ralph-loop/tool-schemas.1.expected.json | 6 ++--- .../ralph-loop/tool-schemas.2.expected.json | 6 ++--- .../ralph-loop/tool-schemas.expected.json | 6 ++--- .../session-query-spill/session.v4.jsonl | 2 +- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.1.expected.json | 2 +- .../tool-schemas.expected.json | 6 ++--- .../team-targets/tool-schemas.expected.json | 6 ++--- .../text-turn/tool-schemas.expected.json | 6 ++--- .../web-fetch/tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 6 ++--- .../tool-schemas.expected.json | 4 +-- .../web/approval-composer/ui.expected.md | 2 +- .../tool-schemas.expected.json | 6 ++--- .../approval.expected.md | 2 +- .../web/ptc-round/system-prompt.expected.md | 6 ++--- .../web/ptc-round/tool-schemas.expected.json | 2 +- 113 files changed, 326 insertions(+), 261 deletions(-) diff --git a/.agents/notes/implemented/feature/2026-07-06-approval-seam.i18n.yaml b/.agents/notes/implemented/feature/2026-07-06-approval-seam.i18n.yaml index 6b8dc5e1c0..07e39db02d 100644 --- a/.agents/notes/implemented/feature/2026-07-06-approval-seam.i18n.yaml +++ b/.agents/notes/implemented/feature/2026-07-06-approval-seam.i18n.yaml @@ -18,8 +18,8 @@ en: a6d7884e4359af3a zh: e72588705942000a /agent-note-the-approval-seam-one-shot-permission-decisions-over-a-waterfall-of-answerers/decision/design-detail/the-seam-mechanism-and-policy-split: - en: 0aa6f3a90921d1ea - zh: c4a734f84800dae8 + en: 53da7800d8744d9e + zh: 316fef884853ca5d /agent-note-the-approval-seam-one-shot-permission-decisions-over-a-waterfall-of-answerers/decision/design-detail/ask-routing-in-dsh-tools: en: 1d4478059f608fd2 zh: 4a1d12e4ccb766b5 diff --git a/.agents/notes/implemented/feature/2026-07-06-approval-seam.md b/.agents/notes/implemented/feature/2026-07-06-approval-seam.md index 03a4269dd7..bb44957b6d 100644 --- a/.agents/notes/implemented/feature/2026-07-06-approval-seam.md +++ b/.agents/notes/implemented/feature/2026-07-06-approval-seam.md @@ -55,7 +55,7 @@ After validation and a successful `approval/asked` append, the service resolves Answerers are `approval/request` waterfall listeners. Zero listeners fall through to `unavailable`; a recognizing listener occupies the first-wins decision slot, while an unrecognized agent must delegate with `next()`. Listeners dispose with their fibers, so an unloaded channel fails closed. Because sibling registration order is not deterministic, a deployment composes one terminal answerer and reserves `prepend` for decide-or-delegate gates. -`ApprovalRequest` carries the asking `agent`, `toolName`, optional exact `callId`, human-readable `reason`, and optional `signal`. It uses the `ToolCallId` brand without importing `dsh-tools`, which depends on this seam. Channel adapters correlate any richer call state by `callId`; the approval request does not duplicate tool arguments. +`ApprovalRequest` carries the asking `agent`, `toolName`, optional exact `callId`, human-readable `reason`, optional localized `displayReason`, and optional `signal`. It uses the `ToolCallId` brand without importing `dsh-tools`, which depends on this seam. Channel adapters correlate any richer call state by `callId`; the approval request does not duplicate tool arguments. #### Ask routing in dsh-tools diff --git a/.agents/notes/implemented/feature/2026-07-06-approval-seam.zh.md b/.agents/notes/implemented/feature/2026-07-06-approval-seam.zh.md index f11e0956c9..b7e07a376c 100644 --- a/.agents/notes/implemented/feature/2026-07-06-approval-seam.zh.md +++ b/.agents/notes/implemented/feature/2026-07-06-approval-seam.zh.md @@ -55,7 +55,7 @@ tool/result "escalated" — this one call ran under the wider mode; the gra 应答者是 `approval/request` waterfall 监听器。零监听器会直接落到 `unavailable`;识别该 agent 的监听器占用先到先得的决策槽,而不识别的监听器必须调用 `next()` 委派。监听器会随其 fiber 一同 dispose(资源释放),因此卸载通道后,请求会在故障时默认被拒绝。由于兄弟插件的注册顺序不确定,部署应组合一个终端应答者,并保留 `prepend` 给「决策或委派」门禁。 -`ApprovalRequest` 携带发起请求的 `agent`、`toolName`、可选的精确 `callId`、人类可读的 `reason` 和可选的 `signal`。它使用 `ToolCallId` brand 而不导入依赖本 seam 的 `dsh-tools`。通道适配器可按 `callId` 关联任何更丰富的调用状态;审批请求本身不重复携带工具参数。 +`ApprovalRequest` 携带发起请求的 `agent`、`toolName`、可选的精确 `callId`、人类可读的 `reason`、可选的本地化 `displayReason` 和可选的 `signal`。它使用 `ToolCallId` brand 而不导入依赖本 seam 的 `dsh-tools`。通道适配器可按 `callId` 关联任何更丰富的调用状态;审批请求本身不重复携带工具参数。 #### dsh-tools 中的 Ask 路由 diff --git a/docs/event-producer-consumer.md b/docs/event-producer-consumer.md index bafab73675..5312354d60 100644 --- a/docs/event-producer-consumer.md +++ b/docs/event-producer-consumer.md @@ -28,7 +28,7 @@ This matrix shows which packages dispatch each harness-owned event and which pac | `api-session/removed` | `emit` | [`packages/api/session-controller/src/types.ts:597`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | | `api-session/status` | `emit` | [`packages/api/session-controller/src/types.ts:604`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | | `app-boot/config-reload` | `emit` | [`packages/boot/app-boot/src/index.ts:52`](../packages/boot/app-boot/src/index.ts) | [`app-boot`](../packages/boot/app-boot) (`emit`) | [`settings`](../packages/settings/settings) | -| `approval/request` | `waterfall` | [`packages/interaction/user-approval/src/types.ts:85`](../packages/interaction/user-approval/src/types.ts) | [`user-approval`](../packages/interaction/user-approval) (`waterfall`) | [`acp`](../packages/acp/acp), `remotes` | +| `approval/request` | `waterfall` | [`packages/interaction/user-approval/src/types.ts:87`](../packages/interaction/user-approval/src/types.ts) | [`user-approval`](../packages/interaction/user-approval) (`waterfall`) | [`acp`](../packages/acp/acp), `remotes` | | `authorization/settled` | `emit` | [`packages/credentials/authorization/src/index.ts:57`](../packages/credentials/authorization/src/index.ts) | [`authorization`](../packages/credentials/authorization) (`events.dispatch`) | [`authorization`](../packages/credentials/authorization) | | `commands/change` | `emit` | [`packages/interaction/commands/src/types.ts:89`](../packages/interaction/commands/src/types.ts) | [`commands`](../packages/interaction/commands) (`events.dispatch`) | `remotes` | | `compaction/summary-error` | `waterfall` | [`packages/compaction/compaction/src/index.ts:106`](../packages/compaction/compaction/src/index.ts) | [`compaction-basic`](../packages/compaction/compaction-basic) (`waterfall`) | [`compaction-image-offload`](../packages/compaction/compaction-image-offload) | diff --git a/docs/event-producer-consumer.zh.md b/docs/event-producer-consumer.zh.md index faa7c6b3b6..6baa07d2d2 100644 --- a/docs/event-producer-consumer.zh.md +++ b/docs/event-producer-consumer.zh.md @@ -30,7 +30,7 @@ | `api-session/removed` | `emit` | [`packages/api/session-controller/src/types.ts:597`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | | `api-session/status` | `emit` | [`packages/api/session-controller/src/types.ts:604`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | | `app-boot/config-reload` | `emit` | [`packages/boot/app-boot/src/index.ts:52`](../packages/boot/app-boot/src/index.ts) | [`app-boot`](../packages/boot/app-boot) (`emit`) | [`settings`](../packages/settings/settings) | -| `approval/request` | `waterfall` | [`packages/interaction/user-approval/src/types.ts:85`](../packages/interaction/user-approval/src/types.ts) | [`user-approval`](../packages/interaction/user-approval) (`waterfall`) | [`acp`](../packages/acp/acp), `remotes` | +| `approval/request` | `waterfall` | [`packages/interaction/user-approval/src/types.ts:87`](../packages/interaction/user-approval/src/types.ts) | [`user-approval`](../packages/interaction/user-approval) (`waterfall`) | [`acp`](../packages/acp/acp), `remotes` | | `authorization/settled` | `emit` | [`packages/credentials/authorization/src/index.ts:57`](../packages/credentials/authorization/src/index.ts) | [`authorization`](../packages/credentials/authorization) (`events.dispatch`) | [`authorization`](../packages/credentials/authorization) | | `commands/change` | `emit` | [`packages/interaction/commands/src/types.ts:89`](../packages/interaction/commands/src/types.ts) | [`commands`](../packages/interaction/commands) (`events.dispatch`) | `remotes` | | `compaction/summary-error` | `waterfall` | [`packages/compaction/compaction/src/index.ts:106`](../packages/compaction/compaction/src/index.ts) | [`compaction-basic`](../packages/compaction/compaction-basic) (`waterfall`) | [`compaction-image-offload`](../packages/compaction/compaction-image-offload) | diff --git a/docs/subsystems/approval.i18n.yaml b/docs/subsystems/approval.i18n.yaml index d11fac4c66..ebdb2ead96 100644 --- a/docs/subsystems/approval.i18n.yaml +++ b/docs/subsystems/approval.i18n.yaml @@ -12,8 +12,8 @@ en: 5e51c6e37c5e30c3 zh: 84bad36357332539 /user-approval/approval-request: - en: dc3647525133ff2f - zh: 8365b809a93ec81d + en: 044ddfc382eb745c + zh: c0010b23c94ab3af /user-approval/dispatch-and-audit: en: bd2c2cc1eaaaf2d6 zh: 67bfbed1b7499ffb diff --git a/docs/subsystems/approval.md b/docs/subsystems/approval.md index 656325aa44..5a2513775a 100644 --- a/docs/subsystems/approval.md +++ b/docs/subsystems/approval.md @@ -50,7 +50,7 @@ Both policies contribute their complete current meaning to the cache-safe runtim ## Approval request -`ApprovalRequest` identifies the agent and tool action closely enough to route and audit the question. It deliberately omits tool arguments: an answerer attaches the prompt to the already-streamed tool call through `callId` instead of rendering a second copy that could drift. +`ApprovalRequest` identifies the agent and tool action closely enough to route and audit the question. It deliberately omits tool arguments: an answerer attaches the prompt to the already-streamed tool call through `callId` instead of rendering a second copy that could drift. Optional `displayReason` carries requester-owned locale strings to presentation; `reason` remains the audit text. ```ts type-equiv /** diff --git a/docs/subsystems/approval.zh.md b/docs/subsystems/approval.zh.md index a22aec2ef2..74aa7fbfc1 100644 --- a/docs/subsystems/approval.zh.md +++ b/docs/subsystems/approval.zh.md @@ -50,7 +50,7 @@ type ApprovalPolicy = 'ask' | 'never' ## 审批请求 -`ApprovalRequest` 以足够精确的方式标识 agent 和工具操作,以便路由和审计该问题。它有意省略工具参数:应答者通过 `callId` 将提示附加到已流式输出的工具调用上,而非渲染另一份可能漂移的副本。 +`ApprovalRequest` 以足够精确的方式标识 agent 和工具操作,以便路由和审计该问题。它有意省略工具参数:应答者通过 `callId` 将提示附加到已流式输出的工具调用上,而非渲染另一份可能漂移的副本。可选的 `displayReason` 向界面传递请求方提供的本地化字符串;`reason` 仍是审计文本。 ```ts type-equiv /** diff --git a/docs/tool-catalog.md b/docs/tool-catalog.md index ba5cf0f276..d92c8d583f 100644 --- a/docs/tool-catalog.md +++ b/docs/tool-catalog.md @@ -551,7 +551,7 @@ Execute a TypeScript program against the available tools. Takes two required arg }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [ diff --git a/docs/tool-catalog.zh.md b/docs/tool-catalog.zh.md index b0b7f2944f..9c05b6f477 100644 --- a/docs/tool-catalog.zh.md +++ b/docs/tool-catalog.zh.md @@ -555,7 +555,7 @@ ask_user_question 会暂停工具调用,直到当前 UI 提供方返回人类 }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [ diff --git a/packages/client/ui-approval/README.i18n.yaml b/packages/client/ui-approval/README.i18n.yaml index efbfdf2cb6..7fef3ae2d8 100644 --- a/packages/client/ui-approval/README.i18n.yaml +++ b/packages/client/ui-approval/README.i18n.yaml @@ -21,8 +21,8 @@ en: adf7112e0691b89e zh: 14eeddcff985119f /deepseek-ai-dsh-client-ui-approval/known-limitations-and-deferred-work: - en: 158f435625e41ca9 - zh: 9d58169aaf6c7ed7 + en: ae644102ed52f7ee + zh: e109de1d517a3a94 /deepseek-ai-dsh-client-ui-approval/known-limitations-and-deferred-work/dev-note: en: 240c92ce5e544116 zh: 5bfae598cc20a3af diff --git a/packages/client/ui-approval/README.md b/packages/client/ui-approval/README.md index ce2ccdbbec..4986683615 100644 --- a/packages/client/ui-approval/README.md +++ b/packages/client/ui-approval/README.md @@ -33,7 +33,7 @@ None; approval request and response rendering does not alter a model request. -- **The panel exposes transient decisions only** — it supports allow-once and reject; persistent permission policy remains owned by Host-side approval packages. +- **The panel exposes transient decisions only** — it supports allow-once and reject; persistent permission policy remains owned by Host-side approval packages. Requester-supplied localized presentation copy follows the UI language without changing the audit reason or translating model-generated text. diff --git a/packages/client/ui-approval/README.zh.md b/packages/client/ui-approval/README.zh.md index d7a94ae915..7015ba5f44 100644 --- a/packages/client/ui-approval/README.zh.md +++ b/packages/client/ui-approval/README.zh.md @@ -33,7 +33,7 @@ kind: "package-reference" -- **面板只提供临时决定**——它支持仅本次允许和拒绝;持久权限策略仍由 Host 侧审批包拥有。 +- **面板只提供临时决定**——它支持仅本次允许和拒绝;持久权限策略仍由 Host 侧审批包拥有。请求方提供的本地化展示文案跟随界面语言,不改写审计原因,也不翻译模型生成的文本。 diff --git a/packages/client/ui-approval/src/client/ApprovalPanel.tsx b/packages/client/ui-approval/src/client/ApprovalPanel.tsx index 9dce13573c..bdfcba3f02 100644 --- a/packages/client/ui-approval/src/client/ApprovalPanel.tsx +++ b/packages/client/ui-approval/src/client/ApprovalPanel.tsx @@ -14,11 +14,13 @@ export function ApprovalPanel(props: ApprovalComposerProps) { const detail = approval.callId === undefined ? null : props.renderSlot('conversation.approval.detail', { callId: approval.callId }) - return + const reason = approval.displayReason === undefined ? approval.reason : props.resolveReason(approval.displayReason) + return } -function ApprovalFlow({ pending, detail, t }: { +function ApprovalFlow({ pending, reason, detail, t }: { pending: PendingApproval + reason: string | undefined detail: ReactNode t: ApprovalComposerProps['t'] }) { @@ -69,7 +71,7 @@ function ApprovalFlow({ pending, detail, t }: { role="group" aria-label={t('detail.aria')} > -
{pending.reason ?? t('escalation', { toolName: pending.toolName })}
+
{reason ?? t('escalation', { toolName: pending.toolName })}
{detail !== null &&
{detail}
}
diff --git a/packages/client/ui-approval/src/client/contract/slots.ts b/packages/client/ui-approval/src/client/contract/slots.ts index b129b97d94..2558b40ea4 100644 --- a/packages/client/ui-approval/src/client/contract/slots.ts +++ b/packages/client/ui-approval/src/client/contract/slots.ts @@ -56,6 +56,8 @@ export interface ApprovalPresentationRequest { readonly callId?: ToolCallId /** Human-readable reason supplied by the requester. */ readonly reason?: string + /** Localized presentation copy; the audit reason remains unchanged. */ + readonly displayReason?: { readonly en: string; readonly [locale: string]: string } /** Cancellation projected from the Host waterfall. */ readonly signal?: AbortSignal } @@ -80,6 +82,8 @@ export class PendingApproval { readonly callId: ToolCallId | undefined /** Human-readable reason supplied by the asker. */ readonly reason: string | undefined + /** Localized presentation copy, when supplied by the asker. */ + readonly displayReason: ApprovalPresentationRequest['displayReason'] /** Result returned by the Remote Event listener to the Host waterfall. */ readonly result: Promise @@ -101,6 +105,7 @@ export class PendingApproval { this.toolName = request.toolName this.callId = request.callId this.reason = request.reason + this.displayReason = request.displayReason const completion = Promise.withResolvers() this.result = completion.promise this.#resolve = completion.resolve @@ -170,9 +175,20 @@ export class PendingApproval { } } +/** Locale lookup supplied by the approval registration. */ +export interface ApprovalInjected { + /** + * Resolve requester-owned copy in the current UI language. + * @param reason - localized presentation text with an English fallback. + * @returns text for the active UI language. + */ + resolveReason(reason: NonNullable): string +} + /** Full props of the approval composer takeover. */ export type ApprovalComposerProps = PropsRuntime<'conversation.composer'> & PropsRenderSlots<'conversation.approval.detail'> & { matched: PendingApproval } & PropsLocale<'approval'> + & ApprovalInjected diff --git a/packages/client/ui-approval/src/client/index.ts b/packages/client/ui-approval/src/client/index.ts index acad0bc207..ca6d674e36 100644 --- a/packages/client/ui-approval/src/client/index.ts +++ b/packages/client/ui-approval/src/client/index.ts @@ -48,6 +48,7 @@ async function answerApproval( ? {} : { callId: request.callId }), ...(request.reason === undefined ? {} : { reason: request.reason }), + ...(request.displayReason === undefined ? {} : { displayReason: request.displayReason }), ...(request.signal === undefined ? {} : { signal: request.signal }), }) const completed = Promise.withResolvers() @@ -93,6 +94,9 @@ export function apply(ctx: ClientContext): void { select: ({ pendingInteraction }: ComposerChainProps): PendingApproval | null => pendingInteraction instanceof PendingApproval ? pendingInteraction : null, locale: NS, + inject: () => ({ + resolveReason: (reason: NonNullable) => ctx.locale.resolveText(reason), + }), children: { 'conversation.approval.detail': { kind: 'single', scope: 'session' }, }, diff --git a/packages/client/ui-approval/tests/ui-approval.client.spec.tsx b/packages/client/ui-approval/tests/ui-approval.client.spec.tsx index 6e18ace13c..e9edc316a5 100644 --- a/packages/client/ui-approval/tests/ui-approval.client.spec.tsx +++ b/packages/client/ui-approval/tests/ui-approval.client.spec.tsx @@ -6,7 +6,7 @@ import type { SessionId } from '@deepseek-ai/dsh-session/types' import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react' import { afterEach, describe, expect, it, vi } from 'vitest' import { ApprovalPanel } from '../src/client/ApprovalPanel.tsx' -import type { ApprovalComposerProps } from '../src/client/contract/slots.ts' +import type { ApprovalComposerProps, ApprovalInjected } from '../src/client/contract/slots.ts' import { PendingApproval } from '../src/client/contract/slots.ts' import { apply, inject } from '../src/client/index.ts' import { apply as nodeApply } from '../src/index.ts' @@ -17,6 +17,7 @@ type ApprovalListener = ( toolName: string callId?: string reason?: string + displayReason?: PendingApproval['displayReason'] signal?: AbortSignal }, next: () => Promise<'unavailable'>, @@ -35,6 +36,7 @@ interface PluginBench { registration(): { options: { select(props: { pendingInteraction: PendingApproval | undefined }): PendingApproval | null + inject(): ApprovalInjected } component: unknown } @@ -46,6 +48,7 @@ async function setupPlugin(): Promise { let registration: { options: { select(props: { pendingInteraction: PendingApproval | undefined }): PendingApproval | null + inject(): ApprovalInjected } component: unknown } | undefined @@ -82,6 +85,7 @@ async function setupPlugin(): Promise { ctx.provide('slots', { inject: injectSlot, register } as never) ctx.provide('locale', { register: vi.fn(() => disposeLocale), + resolveText: (reason: NonNullable) => reason.en, } as never) const fiber = ctx.plugin({ apply }) @@ -219,12 +223,15 @@ describe('approval Remote Event consumer', () => { toolName: 'bash', callId: 'call-1', reason: 'needs access', + displayReason: { en: 'Display reason', zh: '展示原因' }, signal: controller.signal, }, next) const pending = bench.pending.getSnapshot()[0]! const { options, component } = bench.registration() expect(component).toBe(ApprovalPanel) + expect(pending.displayReason).toEqual({ en: 'Display reason', zh: '展示原因' }) + expect(options.inject().resolveReason(pending.displayReason!)).toBe('Display reason') expect(options.select({ pendingInteraction: undefined })).toBeNull() expect(options.select({ pendingInteraction: pending })).toBe(pending) expect(pending).toMatchObject({ @@ -319,8 +326,9 @@ function panelProps( return { matched: pending, renderSlot, + resolveReason: (reason: NonNullable) => reason.en, t: (key: string) => messages[key] ?? key, - } as unknown as ApprovalComposerProps + } as ApprovalComposerProps } describe('ApprovalPanel', () => { @@ -362,6 +370,21 @@ describe('ApprovalPanel', () => { await expect(pending.result).resolves.toBe('allowed-once') }) + it('keeps the audit reason intact and follows the UI language for presentation copy', () => { + const pending = new PendingApproval(id('s1'), { + toolName: 'bash', + reason: 'audit reason', + displayReason: { en: 'English explanation', zh: '中文说明' }, + }) + const props = panelProps(pending) + const view = render() + expect(screen.getByText('English explanation')).toBeTruthy() + expect(screen.queryByText('audit reason')).toBeNull() + view.rerender( reason['zh']!} />) + expect(screen.getByText('中文说明')).toBeTruthy() + expect(pending.reason).toBe('audit reason') + }) + it.each([['Enter', 'allowed-once'], ['Escape', 'rejected']] as const)( 'answers the focused container with %s through the pending request', async (key, outcome) => { const pending = new PendingApproval(id('s1'), { toolName: 'bash' }) diff --git a/packages/core/tools/README.i18n.yaml b/packages/core/tools/README.i18n.yaml index 1c6c7cc042..a33e9507b1 100644 --- a/packages/core/tools/README.i18n.yaml +++ b/packages/core/tools/README.i18n.yaml @@ -45,8 +45,8 @@ en: dc44a88997777988 zh: 56454aeace1c8b77 /deepseek-ai-dsh-tools/understand-the-implementation/ptc-mode: - en: b75b027e45340107 - zh: beffa345cf76df51 + en: 9e67cfffae432d15 + zh: 3a061b8e805c07cd /deepseek-ai-dsh-tools/understand-the-implementation/extension-points: en: c2a14d6f22bc9428 zh: 89c1414fca465931 diff --git a/packages/core/tools/README.md b/packages/core/tools/README.md index 83f04d86d7..b96592b137 100644 --- a/packages/core/tools/README.md +++ b/packages/core/tools/README.md @@ -130,7 +130,7 @@ New sub-calls use `:ptc:` ids. Consumers treat these ids as opaque an Successful image-bearing subcall results become deferred user-message context with `source.kind` set to `ptc-mode`. Other additional contexts retain their producing tool's attribution. -`run_code` accepts `timeoutMs` when the mounted runtime supports an override; its schema reports the configured default and maximum, the runtime's usage instructions and the Session working directory. The Node default is 120,000 ms with a 600,000 ms cap, including nested tool and approval waits. A wider `sandbox_permissions` mode requires a non-empty `justification` and approval before the program starts. The grant applies to that complete execution; standing Session policy and nested tools retain their own authority. Programs are never replayed automatically: inspect earlier effects before explicitly retrying a denied program. +`run_code` accepts `timeoutMs` when the mounted runtime supports an override; its schema reports the configured default and maximum, the runtime's usage instructions and the Session working directory. The Node default is 120,000 ms with a 600,000 ms cap, including nested tool and approval waits. A wider `sandbox_permissions` mode requires a non-empty `justification` and approval before the program starts. The schema asks the model to write that reason in the current user's language. The grant applies to that complete execution; standing Session policy and nested tools retain their own authority. Programs are never replayed automatically: inspect earlier effects before explicitly retrying a denied program. ### Extension points diff --git a/packages/core/tools/README.zh.md b/packages/core/tools/README.zh.md index 2b5c4e87b8..dfd729c2bc 100644 --- a/packages/core/tools/README.zh.md +++ b/packages/core/tools/README.zh.md @@ -130,7 +130,7 @@ ctx.tools.register(defineTool({ 成功且包含图片的子调用结果会成为延后的 user-message 上下文,其 `source.kind` 为 `ptc-mode`。其他 additional context 保留其生产工具的归属。 -当已挂载运行时支持覆盖时,`run_code` 接受 `timeoutMs`;其 schema 报告配置的默认值和上限、运行时使用说明及 Session 工作目录。Node 默认值为 120,000 ms,上限为 600,000 ms,包含嵌套工具和审批等待。更宽的 `sandbox_permissions` 模式要求非空 `justification`,并在程序启动前获得审批。授权仅用于该次完整执行;常驻 Session 策略与嵌套工具保留各自权限。程序不会自动重放:显式重试被拒程序前,应检查先前已发生的效果。 +当已挂载运行时支持覆盖时,`run_code` 接受 `timeoutMs`;其 schema 报告配置的默认值和上限、运行时使用说明及 Session 工作目录。Node 默认值为 120,000 ms,上限为 600,000 ms,包含嵌套工具和审批等待。更宽的 `sandbox_permissions` 模式要求非空 `justification`,并在程序启动前获得审批。schema 提示模型使用当前用户的语言撰写理由。授权仅用于该次完整执行;常驻 Session 策略与嵌套工具保留各自权限。程序不会自动重放:显式重试被拒程序前,应检查先前已发生的效果。 ### 扩展点 diff --git a/packages/core/tools/src/ptc.ts b/packages/core/tools/src/ptc.ts index eadfbaabcc..00d6abcd03 100644 --- a/packages/core/tools/src/ptc.ts +++ b/packages/core/tools/src/ptc.ts @@ -108,7 +108,7 @@ const RUN_CODE_DESCRIPTION_PARAM_DESCRIPTION const RUN_CODE_CONTROLS = { timeoutMs: { type: 'number', description: 'Positive elapsed-time budget in milliseconds, capped by the deployment maximum.' }, sandbox_permissions: { type: 'string', enum: [...ESCALATION_TARGETS], description: 'Wider sandbox mode for this complete program execution; requires justification and approval.' }, - justification: { type: 'string', description: 'Reason this complete program needs wider access, shown to the user for approval.' }, + justification: { type: 'string', description: 'Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request.' }, } as const function controlParameters(runtime: PtcRuntime | undefined) { diff --git a/packages/extensions/tool-cordis/src/api-catalog.ts b/packages/extensions/tool-cordis/src/api-catalog.ts index e6d16f6e27..987d3a50a1 100644 --- a/packages/extensions/tool-cordis/src/api-catalog.ts +++ b/packages/extensions/tool-cordis/src/api-catalog.ts @@ -4467,7 +4467,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [ }, { name: 'ApprovalRequestEvent', - declaration: 'export interface ApprovalRequestEvent {\n readonly agent: Agent;\n readonly toolName: string;\n readonly callId?: ToolCallId;\n readonly reason?: string;\n readonly signal?: AbortSignal;\n}', + declaration: 'export interface ApprovalRequestEvent {\n readonly agent: Agent;\n readonly toolName: string;\n readonly callId?: ToolCallId;\n readonly reason?: string;\n readonly displayReason?: {\n readonly en: string;\n readonly [locale: string]: string;\n };\n readonly signal?: AbortSignal;\n}', }, { name: 'ArchiveSessionOptions', diff --git a/packages/fs/tool-fs/README.i18n.yaml b/packages/fs/tool-fs/README.i18n.yaml index 8443e1a64a..90d4a216dd 100644 --- a/packages/fs/tool-fs/README.i18n.yaml +++ b/packages/fs/tool-fs/README.i18n.yaml @@ -27,8 +27,8 @@ en: 7eb705e3b132fcba zh: 883207b13d381f9e /deepseek-ai-dsh-tool-fs/use-this-package/policy-and-sandbox-behavior: - en: 245b4be79ea4cc6b - zh: ff15b41e778fadab + en: 53d4ac2db089ef39 + zh: 214ea051ed56f500 /deepseek-ai-dsh-tool-fs/use-this-package/failures-and-recovery: en: 962b09e21305a04b zh: 382d2b8cce217569 diff --git a/packages/fs/tool-fs/README.md b/packages/fs/tool-fs/README.md index 9d338a6227..c845038046 100644 --- a/packages/fs/tool-fs/README.md +++ b/packages/fs/tool-fs/README.md @@ -67,7 +67,7 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a Path authorization for `read` and `read_image` belongs entirely to `ctx.fs`; media-type declarations and file signatures only decide whether `read_image` accepts the bytes returned by that backend. -With the policy plugin mounted, `write` and `edit` obtain their guard from the `fs/*` intent slots, so an unread target or a stale observation fails with `FS_NOT_OBSERVED` or `FS_STALE_VERSION` and a recovery instruction. Under a confining backend (`fs-sandbox`), `write`/`edit` additionally advertise `sandbox_permissions` and `justification`; a denied mutation returns the `[sandbox: file access denied under mode]` marker with the same-turn escalation hint, and an approved retry may stamp a strictly wider mode for that one call. +With the policy plugin mounted, `write` and `edit` obtain their guard from the `fs/*` intent slots, so an unread target or a stale observation fails with `FS_NOT_OBSERVED` or `FS_STALE_VERSION` and a recovery instruction. Under a confining backend (`fs-sandbox`), `write`/`edit` additionally advertise `sandbox_permissions` and `justification`; a denied mutation returns the `[sandbox: file access denied under mode]` marker with the same-turn escalation hint, and an approved retry may stamp a strictly wider mode for that one call. The justification asks the model to use the language of the current user request. ### Failures and recovery diff --git a/packages/fs/tool-fs/README.zh.md b/packages/fs/tool-fs/README.zh.md index 0c34f840ad..44c33f51c7 100644 --- a/packages/fs/tool-fs/README.zh.md +++ b/packages/fs/tool-fs/README.zh.md @@ -67,7 +67,7 @@ kind: "package-reference" `read` 与 `read_image` 的路径授权完全由 `ctx.fs` 负责;媒体类型声明和文件签名只决定 `read_image` 是否接受该后端返回的字节。 -挂载策略插件后,`write` 与 `edit` 从 `fs/*` 意图槽位取得防护,因此未读目标或陈旧观察会以 `FS_NOT_OBSERVED` 或 `FS_STALE_VERSION` 及恢复指令失败。使用施加沙箱限制的后端(`fs-sandbox`)时,`write`/`edit` 还会公开 `sandbox_permissions` 与 `justification`;被拒绝的变更返回 `[sandbox: file access denied under mode]` 标记与同轮次升级提示,获批的重试可以在该次调用中加盖严格更宽的模式。 +挂载策略插件后,`write` 与 `edit` 从 `fs/*` 意图槽位取得防护,因此未读目标或陈旧观察会以 `FS_NOT_OBSERVED` 或 `FS_STALE_VERSION` 及恢复指令失败。使用施加沙箱限制的后端(`fs-sandbox`)时,`write`/`edit` 还会公开 `sandbox_permissions` 与 `justification`;被拒绝的变更返回 `[sandbox: file access denied under mode]` 标记与同轮次升级提示,获批的重试可以在该次调用中加盖严格更宽的模式。理由字段提示模型使用用户当前提问的语言。 ### 失败与恢复 diff --git a/packages/fs/tool-fs/src/sandbox.ts b/packages/fs/tool-fs/src/sandbox.ts index c388d5f340..1c5841671f 100644 --- a/packages/fs/tool-fs/src/sandbox.ts +++ b/packages/fs/tool-fs/src/sandbox.ts @@ -67,7 +67,7 @@ export class FsSandboxController { justification: { type: 'string', description: 'Required with sandbox_permissions: one sentence for the user explaining ' - + 'why this exact file operation needs the wider access.', + + 'why this exact file operation needs the wider access. Use the language of the user’s current request.', }, } } diff --git a/packages/interaction/user-approval/README.i18n.yaml b/packages/interaction/user-approval/README.i18n.yaml index bf4aa4fa42..a3d4a3ca8e 100644 --- a/packages/interaction/user-approval/README.i18n.yaml +++ b/packages/interaction/user-approval/README.i18n.yaml @@ -24,8 +24,8 @@ en: d4ef1901ac78b431 zh: 822b97f8bed1b2c9 /deepseek-ai-dsh-user-approval/use-this-package/requesting-a-decision: - en: add08f0d0dace4c8 - zh: e45268e0f0ed2e95 + en: dc465de82799bab0 + zh: 51144cc77bb15689 /deepseek-ai-dsh-user-approval/use-this-package/what-the-model-and-user-see: en: 016bf3cd1891d3d7 zh: 33e7e5ffaf95f5e7 diff --git a/packages/interaction/user-approval/README.md b/packages/interaction/user-approval/README.md index b06a98ccca..82d84222de 100644 --- a/packages/interaction/user-approval/README.md +++ b/packages/interaction/user-approval/README.md @@ -49,7 +49,7 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a ### Requesting a decision -`request(req)` names the agent, tool, optional call id and reason, and an abort signal. It requires an open turn: an idle or between-turn caller throws before auditing anything. Aborting withdraws the question — the request settles `cancelled` and a late answer is discarded. A failure that prevents either audit append from committing rejects instead of returning an unlogged decision. +`request(req)` names the agent, tool, optional call id and reason, and an abort signal. Optional `displayReason` supplies localized presentation text without changing the logged reason. It requires an open turn: an idle or between-turn caller throws before auditing anything. Aborting withdraws the question — the request settles `cancelled` and a late answer is discarded. A failure that prevents either audit append from committing rejects instead of returning an unlogged decision. ### What the model and user see diff --git a/packages/interaction/user-approval/README.zh.md b/packages/interaction/user-approval/README.zh.md index 32c6cef1ce..e6e4029e3a 100644 --- a/packages/interaction/user-approval/README.zh.md +++ b/packages/interaction/user-approval/README.zh.md @@ -49,7 +49,7 @@ kind: "package-reference" ### 请求决定 -`request(req)` 指名 agent、工具、原因、可选的调用 id,以及一个中止信号。它要求当前处于尚未结束的轮次中:空闲或在轮次之间调用会在审计前抛出异常。中止会撤回问题——请求以 `cancelled` 结算,迟到的回答被丢弃。若任一审计事件在提交前失败,请求会被拒绝,而不会返回一项未记录的决定。 +`request(req)` 指名 agent、工具、原因、可选的调用 id,以及一个中止信号。可选的 `displayReason` 提供本地化展示文案,不改写日志中的原因。它要求当前处于尚未结束的轮次中:空闲或在轮次之间调用会在审计前抛出异常。中止会撤回问题——请求以 `cancelled` 结算,迟到的回答被丢弃。若任一审计事件在提交前失败,请求会被拒绝,而不会返回一项未记录的决定。 ### 模型与用户看到什么 diff --git a/packages/interaction/user-approval/src/types.ts b/packages/interaction/user-approval/src/types.ts index c4b18260e9..12b8106d34 100644 --- a/packages/interaction/user-approval/src/types.ts +++ b/packages/interaction/user-approval/src/types.ts @@ -69,6 +69,8 @@ export interface ApprovalRequestEvent { readonly callId?: ToolCallId /** Human-readable reason supplied by the asker. */ readonly reason?: string + /** Localized presentation only; never persisted in approval audit events. */ + readonly displayReason?: { readonly en: string; readonly [locale: string]: string } /** Cancellation lifetime of the pending request. */ readonly signal?: AbortSignal } diff --git a/packages/sandbox/sandbox/README.i18n.yaml b/packages/sandbox/sandbox/README.i18n.yaml index 370f0de0cb..05ff012735 100644 --- a/packages/sandbox/sandbox/README.i18n.yaml +++ b/packages/sandbox/sandbox/README.i18n.yaml @@ -27,8 +27,8 @@ en: ab093e9042b86b99 zh: d173df7cb3649446 /deepseek-ai-dsh-sandbox/use-this-package/denied-calls-and-escalation: - en: ff24616d2a68ff77 - zh: 49cb99b3d941dab1 + en: 92cf42bad65d112c + zh: 60fa2cb7e9c4c556 /deepseek-ai-dsh-sandbox/use-this-package/fail-closed-behavior: en: 6bf240632a7a6bf5 zh: ebf414f5cf435875 diff --git a/packages/sandbox/sandbox/README.md b/packages/sandbox/sandbox/README.md index 56cdd87c27..5e089c468c 100644 --- a/packages/sandbox/sandbox/README.md +++ b/packages/sandbox/sandbox/README.md @@ -63,7 +63,7 @@ Enforcement is reported per call: `full` means the backend governs every promise ### Denied calls and escalation -When a confined call is denied, the operation reports a denial marker naming the mode — `[sandbox: file access denied under mode]` — and, when the composition advertises escalation, an escalation hint. The model may retry the exact call once with `sandbox_permissions` (the narrowest wider mode that suffices) plus a `justification`; the user sees one approval prompt and can allow once, reject, or cancel. A wider mode requires approval and applies to that one call only. Repeating the call's effective mode succeeds without approval; narrower targets remain invalid. +When a confined call is denied, the operation reports a denial marker naming the mode — `[sandbox: file access denied under mode]` — and, when the composition advertises escalation, an escalation hint. The model may retry the exact call once with `sandbox_permissions` (the narrowest wider mode that suffices) plus a `justification`; the approval service obtains consent for the operation. The request retains its audit reason and supplies English and Chinese presentation copy with the model's justification unchanged. Missing translations follow the locale service's fallback chain, ultimately English; requesters own their translated presentation text. A wider mode requires approval and applies to that one call only. Repeating the call's effective mode succeeds without approval; narrower targets remain invalid. ### Fail-closed behavior diff --git a/packages/sandbox/sandbox/README.zh.md b/packages/sandbox/sandbox/README.zh.md index c09d7e31fc..dc38008d98 100644 --- a/packages/sandbox/sandbox/README.zh.md +++ b/packages/sandbox/sandbox/README.zh.md @@ -63,7 +63,7 @@ kind: "package-reference" ### 被拒绝的调用与升权 -受限调用被拒绝时,操作会报告指明模式的拒绝标记——`[sandbox: file access denied under mode]`——组合声明升权能力时还会给出升权提示。模型可以用 `sandbox_permissions`(足以放行的最窄更宽模式)加 `justification` 重试一次完全相同的调用;用户会看到一次审批提示,可以选择允许一次、拒绝或取消。更宽的模式需要审批,且只作用于该次调用。重复指定调用的生效模式无需审批即可成功;更窄的目标仍然无效。 +受限调用被拒绝时,操作会报告指明模式的拒绝标记——`[sandbox: file access denied under mode]`——组合声明升权能力时还会给出升权提示。模型可以用 `sandbox_permissions`(足以放行的最窄更宽模式)加 `justification` 重试一次完全相同的调用;审批服务为操作取得同意。请求保留审计原因,同时提供英文和中文展示文案,模型给出的理由保持原样。缺失的译文遵循语言服务的回退链,最终回退到英文;请求方负责自己的展示译文。更宽的模式需要审批,且只作用于该次调用。重复指定调用的生效模式无需审批即可成功;更窄的目标仍然无效。 ### 故障关闭行为 diff --git a/packages/sandbox/sandbox/src/escalation.ts b/packages/sandbox/sandbox/src/escalation.ts index f1cd91b58c..08b43153a4 100644 --- a/packages/sandbox/sandbox/src/escalation.ts +++ b/packages/sandbox/sandbox/src/escalation.ts @@ -102,10 +102,17 @@ export type EscalationOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'una export interface EscalationApprover { /** * Ask the human to approve one action, resolving to a closed outcome. - * @param req - the audit-self-contained request (agent, tool, call id, reason, optional signal). + * @param req - the audit request with optional localized displayReason and presentation lifetime signal. * @returns the human's decision as a closed {@link EscalationOutcome}. */ - request(req: { agent: A; toolName: string; callId: C; reason: string; signal?: AbortSignal }): Promise + request(req: { + agent: A + toolName: string + callId: C + reason: string + displayReason?: { readonly en: string; readonly [locale: string]: string } + signal?: AbortSignal + }): Promise } /** @@ -172,6 +179,10 @@ export async function approveEscalation(request: EscalationRequest, approv toolName: approval.toolName, callId: approval.callId, reason: `escalate sandbox to ${mode}: ${justification}`, + displayReason: { + en: `Allow this operation with ${mode} permissions: ${justification}`, + zh: `允许本次操作使用 ${mode} 权限:${justification}`, + }, ...approval.signal ? { signal: approval.signal } : {}, }) switch (outcome) { diff --git a/packages/sandbox/sandbox/tests/escalation.spec.ts b/packages/sandbox/sandbox/tests/escalation.spec.ts index 3a3c886d03..e10e8a3129 100644 --- a/packages/sandbox/sandbox/tests/escalation.spec.ts +++ b/packages/sandbox/sandbox/tests/escalation.spec.ts @@ -79,6 +79,12 @@ describe('approveEscalation', () => { const granted = await approveEscalation(req(), ingredients({ approver: approver('allowed-once', r => seen.push(r as { reason?: string })) })) expect(granted).toBe('workspace-write') expect(seen[0]?.reason).toBe('escalate sandbox to workspace-write: the user asked to write in the workspace') + expect(seen[0]).toMatchObject({ + displayReason: { + en: 'Allow this operation with workspace-write permissions: the user asked to write in the workspace', + zh: '允许本次操作使用 workspace-write 权限:the user asked to write in the workspace', + }, + }) }) it.each(ESCALATION_TARGETS)('repeating %s succeeds without asking for approval', async (mode) => { diff --git a/packages/shell/tool-bash/README.i18n.yaml b/packages/shell/tool-bash/README.i18n.yaml index 3cfb113c2a..1d40929702 100644 --- a/packages/shell/tool-bash/README.i18n.yaml +++ b/packages/shell/tool-bash/README.i18n.yaml @@ -75,8 +75,8 @@ en: 3039bc5e7a796b21 zh: 6b7a9eaf69c9ea53 /deepseek-ai-dsh-tool-bash/model-experience/tool-schemas/what-the-model-sees: - en: 2580605a7e7b431a - zh: 0cb6dfde14f3e215 + en: d1ac6102f35ec68c + zh: 43d7e605b95096c5 /deepseek-ai-dsh-tool-bash/model-experience/tool-schemas/token-effect: en: cdbd4262314e6856 zh: e8c12c0cf5492386 diff --git a/packages/shell/tool-bash/README.md b/packages/shell/tool-bash/README.md index 3068e6d201..6e83725866 100644 --- a/packages/shell/tool-bash/README.md +++ b/packages/shell/tool-bash/README.md @@ -151,7 +151,7 @@ Prefix-stable while the registration scope and prompt text are unchanged. Plugin #### What the model sees -The model sees the generated [`bash` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-bash). `run_in_background` appears only when this producer enables it and a job registry is composed; `sandbox_permissions` and `justification` appear only when the mounted executor advertises sandboxing. Agent-scoped tool restrictions can remove the definition for that agent. +The model sees the generated [`bash` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-bash). `run_in_background` appears only when this producer enables it and a job registry is composed; `sandbox_permissions` and `justification` appear only when the mounted executor advertises sandboxing; the justification asks the model to use the language of the current user request. Agent-scoped tool restrictions can remove the definition for that agent. #### Token effect diff --git a/packages/shell/tool-bash/README.zh.md b/packages/shell/tool-bash/README.zh.md index 032d59efa3..80a108fd5c 100644 --- a/packages/shell/tool-bash/README.zh.md +++ b/packages/shell/tool-bash/README.zh.md @@ -151,7 +151,7 @@ Check the [exit code: N] marker on every bash result; investigate failures befor #### 模型看到什么 -模型会看到生成的 [`bash` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-bash)。仅当本生产方启用 `run_in_background` 且组合中有 job 注册表时,该字段才会出现;仅当已挂载执行器声明支持沙箱时,`sandbox_permissions` 和 `justification` 才会出现。按 agent 作用域限制工具可以移除该 agent 的定义。 +模型会看到生成的 [`bash` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-bash)。仅当本生产方启用 `run_in_background` 且组合中有 job 注册表时,该字段才会出现;仅当已挂载执行器声明支持沙箱时,`sandbox_permissions` 和 `justification` 才会出现;理由字段提示模型使用用户当前提问的语言。按 agent 作用域限制工具可以移除该 agent 的定义。 #### Token 影响 diff --git a/packages/shell/tool-bash/src/index.ts b/packages/shell/tool-bash/src/index.ts index c74b051324..4200d83f6b 100644 --- a/packages/shell/tool-bash/src/index.ts +++ b/packages/shell/tool-bash/src/index.ts @@ -422,7 +422,8 @@ export function apply(ctx: Context, config: Config = {}): void { }, justification: { type: 'string' as const, - description: 'Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access.', + description: 'Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. ' + + 'Use the language of the user’s current request.', }, } : {}, }, diff --git a/packages/shell/tool-pwsh/README.i18n.yaml b/packages/shell/tool-pwsh/README.i18n.yaml index 6018b22ae1..70f03c5bec 100644 --- a/packages/shell/tool-pwsh/README.i18n.yaml +++ b/packages/shell/tool-pwsh/README.i18n.yaml @@ -30,8 +30,8 @@ en: d2b292d651535d34 zh: 1c0ebf140458759c /deepseek-ai-dsh-tool-pwsh/use-this-package/windows-specific-sandbox-behavior: - en: a2d3592afd0c5678 - zh: dc9ef914149c3604 + en: 76f3f791f53d1005 + zh: e5b262db24e6eb83 /deepseek-ai-dsh-tool-pwsh/use-this-package/what-can-go-wrong: en: c1a9cc1201ed3a89 zh: a43a659d350e9d4a @@ -72,8 +72,8 @@ en: 3039bc5e7a796b21 zh: 6b7a9eaf69c9ea53 /deepseek-ai-dsh-tool-pwsh/model-experience/tool-schemas/what-the-model-sees: - en: 74ab02476c1e08e3 - zh: 3327fa00a5e38833 + en: 319b3a4512305a26 + zh: fed6a1c70bf79a0e /deepseek-ai-dsh-tool-pwsh/model-experience/tool-schemas/token-effect: en: 97cce067584eadff zh: 54b1f5cd5899e7f3 diff --git a/packages/shell/tool-pwsh/README.md b/packages/shell/tool-pwsh/README.md index 26bf4e30eb..ce8d923907 100644 --- a/packages/shell/tool-pwsh/README.md +++ b/packages/shell/tool-pwsh/README.md @@ -60,7 +60,7 @@ With a job registry composed, a foreground command is registered with `ctx.jobs` ### Windows-specific sandbox behavior -Under a sandboxing executor, denied commands report `[sandbox: file access denied under mode]`, and the same one-shot escalation path applies: retry the exact command once with `sandbox_permissions` plus a `justification` through user approval. The tool also teaches two Windows-restricted-token contracts in its description: read-only pwsh runs in ConstrainedLanguage (`.NET` static calls, `Add-Type`, COM, and reflection fail with "only core types" errors), and in both confined modes programs cannot open named pipes, so a command that captures another program's output through piped stdio fails with EPERM — escalate the exact command once or restructure it to avoid capturing output. +Under a sandboxing executor, denied commands report `[sandbox: file access denied under mode]`, and the same one-shot escalation path applies: retry the exact command once with `sandbox_permissions` plus a `justification` through user approval. The justification asks the model to use the language of the current user request. The tool also teaches two Windows-restricted-token contracts in its description: read-only pwsh runs in ConstrainedLanguage (`.NET` static calls, `Add-Type`, COM, and reflection fail with "only core types" errors), and in both confined modes programs cannot open named pipes, so a command that captures another program's output through piped stdio fails with EPERM — escalate the exact command once or restructure it to avoid capturing output. ### What can go wrong @@ -143,7 +143,7 @@ Prefix-stable while the registration scope and prompt text are unchanged. Plugin #### What the model sees -The model sees the generated [`pwsh` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-pwsh). Agent-scoped tool restrictions can remove the definition for that agent. +The model sees the generated [`pwsh` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-pwsh). Its justification asks the model to use the language of the current user request. Agent-scoped tool restrictions can remove the definition for that agent. #### Token effect diff --git a/packages/shell/tool-pwsh/README.zh.md b/packages/shell/tool-pwsh/README.zh.md index fbf9fc61ba..f990a0c5c1 100644 --- a/packages/shell/tool-pwsh/README.zh.md +++ b/packages/shell/tool-pwsh/README.zh.md @@ -60,7 +60,7 @@ kind: "package-reference" ### Windows 特有的沙箱行为 -在沙箱执行器下,被拒绝的命令会报告 `[sandbox: file access denied under mode]`,并适用相同的单次升权路径:用 `sandbox_permissions` 加一句 `justification`,经用户审批后重试完全相同的命令一次。工具还会在其描述中教授两条 Windows 受限令牌约定:只读 pwsh 运行在 ConstrainedLanguage 中(`.NET` 静态调用、`Add-Type`、COM 与反射会以 "only core types" 错误失败);两种受限模式下程序都无法打开命名管道,因此通过管道 stdio 捕获另一程序输出的命令会以 EPERM 失败——请升权该确切命令一次,或重构命令以避免捕获输出。 +在沙箱执行器下,被拒绝的命令会报告 `[sandbox: file access denied under mode]`,并适用相同的单次升权路径:用 `sandbox_permissions` 加一句 `justification`,经用户审批后重试完全相同的命令一次。理由字段提示模型使用用户当前提问的语言。工具还会在其描述中教授两条 Windows 受限令牌约定:只读 pwsh 运行在 ConstrainedLanguage 中(`.NET` 静态调用、`Add-Type`、COM 与反射会以 "only core types" 错误失败);两种受限模式下程序都无法打开命名管道,因此通过管道 stdio 捕获另一程序输出的命令会以 EPERM 失败——请升权该确切命令一次,或重构命令以避免捕获输出。 ### 可能出什么问题 @@ -143,7 +143,7 @@ Non-zero exits are reported as `[exit code: N]` markers; investigate failures be #### 模型看到什么 -模型会看到生成的 [`pwsh` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-pwsh)。按 agent 作用域实施的工具限制可以移除该 agent 的定义。 +模型会看到生成的 [`pwsh` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-pwsh)。其理由字段提示模型使用用户当前提问的语言。按 agent 作用域实施的工具限制可以移除该 agent 的定义。 #### Token 影响 diff --git a/packages/shell/tool-pwsh/src/index.ts b/packages/shell/tool-pwsh/src/index.ts index 8fdfddd629..63a75f8d69 100644 --- a/packages/shell/tool-pwsh/src/index.ts +++ b/packages/shell/tool-pwsh/src/index.ts @@ -432,7 +432,8 @@ export function apply(ctx: Context, config: Config = {}): void { }, justification: { type: 'string' as const, - description: 'Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access.', + description: 'Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. ' + + 'Use the language of the user’s current request.', }, } : {}, }, diff --git a/scripts/no-unknown-casts.baseline.json b/scripts/no-unknown-casts.baseline.json index 8c8f334366..761358a17e 100644 --- a/scripts/no-unknown-casts.baseline.json +++ b/scripts/no-unknown-casts.baseline.json @@ -460,8 +460,7 @@ "6c63f71c0aeb1a9a97ec28a3242f77eef021ecfcee48238f17592eb2f1040c09": 1 }, "packages/client/ui-approval/tests/ui-approval.client.spec.tsx": { - "3e392ff0165a51a6ac716515b99af35ec152f89607cff72080cb9afbcff63f46": 1, - "d3a081f97422a352526b7014a6aa4c6c8f78cb27587568bc4150232db2037198": 1 + "3e392ff0165a51a6ac716515b99af35ec152f89607cff72080cb9afbcff63f46": 1 }, "packages/client/ui-attachment/tests/attachment-rail.client.spec.tsx": { "b42ab24a43e0f7542bf1deb8f7ac3a76698d29e098f8dc575af6c08774987c32": 1 diff --git a/snapshots/sdk/bash-tool/tool-schemas.expected.json b/snapshots/sdk/bash-tool/tool-schemas.expected.json index 4e902f3a17..5dfd3e136e 100644 --- a/snapshots/sdk/bash-tool/tool-schemas.expected.json +++ b/snapshots/sdk/bash-tool/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json b/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json b/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json b/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json b/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json index 27a31b309d..d9105baeb4 100644 --- a/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json +++ b/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -658,7 +658,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.1.expected.json b/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.1.expected.json index bcf8931c18..18f990e7ad 100644 --- a/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.1.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -608,7 +608,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.expected.json b/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.expected.json index f7d8410402..77f0109125 100644 --- a/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.expected.json +++ b/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -633,7 +633,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json b/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json b/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/sdk/text-turn/tool-schemas.expected.json b/snapshots/sdk/text-turn/tool-schemas.expected.json index 4e902f3a17..5dfd3e136e 100644 --- a/snapshots/sdk/text-turn/tool-schemas.expected.json +++ b/snapshots/sdk/text-turn/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/agent-instructions/tool-schemas.expected.json b/snapshots/session/agent-instructions/tool-schemas.expected.json index 3998173abc..82424a225e 100644 --- a/snapshots/session/agent-instructions/tool-schemas.expected.json +++ b/snapshots/session/agent-instructions/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -652,7 +652,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -713,7 +713,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -1220,7 +1220,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/background-confinement-failure/tool-schemas.expected.json b/snapshots/session/background-confinement-failure/tool-schemas.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/session/background-confinement-failure/tool-schemas.expected.json +++ b/snapshots/session/background-confinement-failure/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/both-mode-turn/system-prompt.expected.md b/snapshots/session/both-mode-turn/system-prompt.expected.md index 4b689d8392..0ad00f0fda 100644 --- a/snapshots/session/both-mode-turn/system-prompt.expected.md +++ b/snapshots/session/both-mode-turn/system-prompt.expected.md @@ -62,7 +62,7 @@ interface ToolArgsMap { run_in_background?: boolean; /** The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Create one persisted same-session completion goal when the current direct human request is a long-running objective that should continue across autonomous goal rounds. You may infer that intent without requiring the user to say "create a goal". Do not use this for trivial single-turn work. Execution rejects non-human and subagent authority. */ @@ -84,7 +84,7 @@ interface ToolArgsMap { replace_all?: boolean; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. Send the COMPLETE plan as markdown, starting with a # heading that names it. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again. */ @@ -252,7 +252,7 @@ interface ToolArgsMap { content: string; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; } diff --git a/snapshots/session/both-mode-turn/tool-schemas.expected.json b/snapshots/session/both-mode-turn/tool-schemas.expected.json index b4a242a28e..27d9e581f8 100644 --- a/snapshots/session/both-mode-turn/tool-schemas.expected.json +++ b/snapshots/session/both-mode-turn/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -328,7 +328,7 @@ }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [ @@ -641,7 +641,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/browser-use-chrome-devtools-mcp/tool-schemas.expected.json b/snapshots/session/browser-use-chrome-devtools-mcp/tool-schemas.expected.json index f1fcfede7f..2df4f1bcd0 100644 --- a/snapshots/session/browser-use-chrome-devtools-mcp/tool-schemas.expected.json +++ b/snapshots/session/browser-use-chrome-devtools-mcp/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -711,7 +711,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json b/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json index f71968060e..cd90d78f12 100644 --- a/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json +++ b/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -713,7 +713,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json b/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json index b6a4343baf..cf1c7e4fe1 100644 --- a/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json +++ b/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -817,7 +817,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/compaction-recovery/tool-schemas.expected.json b/snapshots/session/compaction-recovery/tool-schemas.expected.json index 3998173abc..82424a225e 100644 --- a/snapshots/session/compaction-recovery/tool-schemas.expected.json +++ b/snapshots/session/compaction-recovery/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -652,7 +652,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -713,7 +713,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -1220,7 +1220,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/computer-use-cua-driver-mcp/tool-schemas.expected.json b/snapshots/session/computer-use-cua-driver-mcp/tool-schemas.expected.json index c4897f7bdc..d7fc857d0b 100644 --- a/snapshots/session/computer-use-cua-driver-mcp/tool-schemas.expected.json +++ b/snapshots/session/computer-use-cua-driver-mcp/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -690,7 +690,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/computer-use-cua-driver-native/tool-schemas.expected.json b/snapshots/session/computer-use-cua-driver-native/tool-schemas.expected.json index d0ad65828d..e4a3377d42 100644 --- a/snapshots/session/computer-use-cua-driver-native/tool-schemas.expected.json +++ b/snapshots/session/computer-use-cua-driver-native/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -143,7 +143,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -650,7 +650,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/cordis-inspect-jsdoc/system-prompt.expected.md b/snapshots/session/cordis-inspect-jsdoc/system-prompt.expected.md index fb46d6e740..80c33631c6 100644 --- a/snapshots/session/cordis-inspect-jsdoc/system-prompt.expected.md +++ b/snapshots/session/cordis-inspect-jsdoc/system-prompt.expected.md @@ -62,7 +62,7 @@ interface ToolArgsMap { run_in_background?: boolean; /** The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** List every Cordis Inspect Provider currently known to the Host, including local Host Providers and the latest manifests synchronized from the Client. Each entry includes its platform, purpose, read-only methods, and input/output schemas. Call this Tool before writing or configuring a plugin, then select the provider and method for cordis_inspect_query from its result. Do not guess names or treat an Inspect method as a business Service that Plugin code can call. */ @@ -97,7 +97,7 @@ interface ToolArgsMap { replace_all?: boolean; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. Send the COMPLETE plan as markdown, starting with a # heading that names it. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again. */ @@ -265,7 +265,7 @@ interface ToolArgsMap { content: string; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; } diff --git a/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json b/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json index 63a7b2aad4..5c583834b9 100644 --- a/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json +++ b/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -138,7 +138,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -369,7 +369,7 @@ }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [ @@ -682,7 +682,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json b/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json +++ b/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json b/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json +++ b/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/dynamic-tool-updates/tool-schemas.expected.json b/snapshots/session/dynamic-tool-updates/tool-schemas.expected.json index 05365a6f21..b9bbb59b6d 100644 --- a/snapshots/session/dynamic-tool-updates/tool-schemas.expected.json +++ b/snapshots/session/dynamic-tool-updates/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -652,7 +652,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -713,7 +713,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -1228,7 +1228,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -1275,7 +1275,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -1336,7 +1336,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -1843,7 +1843,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json b/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json +++ b/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/fs-glob-sampling/tool-schemas.expected.json b/snapshots/session/fs-glob-sampling/tool-schemas.expected.json index cd9925971d..2479028175 100644 --- a/snapshots/session/fs-glob-sampling/tool-schemas.expected.json +++ b/snapshots/session/fs-glob-sampling/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -77,7 +77,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -463,7 +463,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/lsp-definition/tool-schemas.expected.json b/snapshots/session/lsp-definition/tool-schemas.expected.json index c1b6b2d92b..82c496c075 100644 --- a/snapshots/session/lsp-definition/tool-schemas.expected.json +++ b/snapshots/session/lsp-definition/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -641,7 +641,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/mcp-resources-ptc/system-prompt.expected.md b/snapshots/session/mcp-resources-ptc/system-prompt.expected.md index f3a9d0da2b..7468cfc556 100644 --- a/snapshots/session/mcp-resources-ptc/system-prompt.expected.md +++ b/snapshots/session/mcp-resources-ptc/system-prompt.expected.md @@ -72,7 +72,7 @@ interface ToolArgsMap { run_in_background?: boolean; /** The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Create one persisted same-session completion goal when the current direct human request is a long-running objective that should continue across autonomous goal rounds. You may infer that intent without requiring the user to say "create a goal". Do not use this for trivial single-turn work. Execution rejects non-human and subagent authority. */ @@ -94,7 +94,7 @@ interface ToolArgsMap { replace_all?: boolean; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. Send the COMPLETE plan as markdown, starting with a # heading that names it. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again. */ @@ -283,7 +283,7 @@ interface ToolArgsMap { content: string; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; } diff --git a/snapshots/session/mcp-resources-ptc/tool-schemas.expected.json b/snapshots/session/mcp-resources-ptc/tool-schemas.expected.json index a2033b2b3c..a24c4fbfb4 100644 --- a/snapshots/session/mcp-resources-ptc/tool-schemas.expected.json +++ b/snapshots/session/mcp-resources-ptc/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/mcp-resources/tool-schemas.expected.json b/snapshots/session/mcp-resources/tool-schemas.expected.json index aeb4d65ddd..2dbbc00ca5 100644 --- a/snapshots/session/mcp-resources/tool-schemas.expected.json +++ b/snapshots/session/mcp-resources/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -665,7 +665,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/multimodal-spill-ends/tool-schemas.expected.json b/snapshots/session/multimodal-spill-ends/tool-schemas.expected.json index bcd2cf2be8..c2a80d7d32 100644 --- a/snapshots/session/multimodal-spill-ends/tool-schemas.expected.json +++ b/snapshots/session/multimodal-spill-ends/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -623,7 +623,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/office-skills/tool-schemas.expected.json b/snapshots/session/office-skills/tool-schemas.expected.json index 9279f3a6c4..e7bf23cc0c 100644 --- a/snapshots/session/office-skills/tool-schemas.expected.json +++ b/snapshots/session/office-skills/tool-schemas.expected.json @@ -52,7 +52,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -559,7 +559,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json b/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json index 09473768bc..b2e80c8cb1 100644 --- a/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json +++ b/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json @@ -32,7 +32,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -434,7 +434,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json b/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json index 1f40739eb5..916a40922c 100644 --- a/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json +++ b/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -665,7 +665,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -713,7 +713,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -774,7 +774,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -1412,7 +1412,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/plugin-manager/tool-schemas.expected.json b/snapshots/session/plugin-manager/tool-schemas.expected.json index aff31d32c1..b96a75c7cc 100644 --- a/snapshots/session/plugin-manager/tool-schemas.expected.json +++ b/snapshots/session/plugin-manager/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -665,7 +665,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/product-subagent-both/tool-schemas.expected.json b/snapshots/session/product-subagent-both/tool-schemas.expected.json index 73bf765d41..165396f11d 100644 --- a/snapshots/session/product-subagent-both/tool-schemas.expected.json +++ b/snapshots/session/product-subagent-both/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -704,7 +704,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/product-subagent-codex/tool-schemas.expected.json b/snapshots/session/product-subagent-codex/tool-schemas.expected.json index 6e7b1564d9..31efc071c3 100644 --- a/snapshots/session/product-subagent-codex/tool-schemas.expected.json +++ b/snapshots/session/product-subagent-codex/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -654,7 +654,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json b/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json index 30bd686392..77b1bd8a36 100644 --- a/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json +++ b/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -629,7 +629,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/provider-cwd/tool-schemas.expected.json b/snapshots/session/provider-cwd/tool-schemas.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/session/provider-cwd/tool-schemas.expected.json +++ b/snapshots/session/provider-cwd/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/ptc-node-read-only/system-prompt.expected.md b/snapshots/session/ptc-node-read-only/system-prompt.expected.md index d8eb93ee39..1a42d942af 100644 --- a/snapshots/session/ptc-node-read-only/system-prompt.expected.md +++ b/snapshots/session/ptc-node-read-only/system-prompt.expected.md @@ -64,7 +64,7 @@ interface ToolArgsMap { run_in_background?: boolean; /** The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Create one persisted same-session completion goal when the current direct human request is a long-running objective that should continue across autonomous goal rounds. You may infer that intent without requiring the user to say "create a goal". Do not use this for trivial single-turn work. Execution rejects non-human and subagent authority. */ @@ -86,7 +86,7 @@ interface ToolArgsMap { replace_all?: boolean; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. Send the COMPLETE plan as markdown, starting with a # heading that names it. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again. */ @@ -258,7 +258,7 @@ interface ToolArgsMap { content: string; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; } diff --git a/snapshots/session/ptc-node-read-only/tool-schemas.expected.json b/snapshots/session/ptc-node-read-only/tool-schemas.expected.json index a2033b2b3c..a24c4fbfb4 100644 --- a/snapshots/session/ptc-node-read-only/tool-schemas.expected.json +++ b/snapshots/session/ptc-node-read-only/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/ptc-node-workspace/system-prompt.expected.md b/snapshots/session/ptc-node-workspace/system-prompt.expected.md index d8eb93ee39..1a42d942af 100644 --- a/snapshots/session/ptc-node-workspace/system-prompt.expected.md +++ b/snapshots/session/ptc-node-workspace/system-prompt.expected.md @@ -64,7 +64,7 @@ interface ToolArgsMap { run_in_background?: boolean; /** The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Create one persisted same-session completion goal when the current direct human request is a long-running objective that should continue across autonomous goal rounds. You may infer that intent without requiring the user to say "create a goal". Do not use this for trivial single-turn work. Execution rejects non-human and subagent authority. */ @@ -86,7 +86,7 @@ interface ToolArgsMap { replace_all?: boolean; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. Send the COMPLETE plan as markdown, starting with a # heading that names it. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again. */ @@ -258,7 +258,7 @@ interface ToolArgsMap { content: string; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; } diff --git a/snapshots/session/ptc-node-workspace/tool-schemas.expected.json b/snapshots/session/ptc-node-workspace/tool-schemas.expected.json index a2033b2b3c..a24c4fbfb4 100644 --- a/snapshots/session/ptc-node-workspace/tool-schemas.expected.json +++ b/snapshots/session/ptc-node-workspace/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/ptc-python-turn/system-prompt.expected.md b/snapshots/session/ptc-python-turn/system-prompt.expected.md index ce9f942d92..9ab7ad0a92 100644 --- a/snapshots/session/ptc-python-turn/system-prompt.expected.md +++ b/snapshots/session/ptc-python-turn/system-prompt.expected.md @@ -59,7 +59,7 @@ class BashArgs(TypedDict): run_in_background: NotRequired[bool] # The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. sandbox_permissions: NotRequired[Literal["workspace-write", "danger-full-access"]] - # Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. + # Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. justification: NotRequired[str] # Additional keys beyond those declared are allowed. @@ -139,7 +139,7 @@ class EditArgs(TypedDict): replace_all: NotRequired[bool] # The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. sandbox_permissions: NotRequired[Literal["workspace-write", "danger-full-access"]] - # Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. + # Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. justification: NotRequired[str] # Additional keys beyond those declared are allowed. @@ -500,7 +500,7 @@ class WriteArgs(TypedDict): content: str # The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. sandbox_permissions: NotRequired[Literal["workspace-write", "danger-full-access"]] - # Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. + # Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. justification: NotRequired[str] # Additional keys beyond those declared are allowed. diff --git a/snapshots/session/ptc-read-image/system-prompt.expected.md b/snapshots/session/ptc-read-image/system-prompt.expected.md index bac97d4457..94b6aa54f2 100644 --- a/snapshots/session/ptc-read-image/system-prompt.expected.md +++ b/snapshots/session/ptc-read-image/system-prompt.expected.md @@ -64,7 +64,7 @@ interface ToolArgsMap { run_in_background?: boolean; /** The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Create one persisted same-session completion goal when the current direct human request is a long-running objective that should continue across autonomous goal rounds. You may infer that intent without requiring the user to say "create a goal". Do not use this for trivial single-turn work. Execution rejects non-human and subagent authority. */ @@ -86,7 +86,7 @@ interface ToolArgsMap { replace_all?: boolean; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. Send the COMPLETE plan as markdown, starting with a # heading that names it. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again. */ @@ -254,7 +254,7 @@ interface ToolArgsMap { content: string; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; } diff --git a/snapshots/session/ptc-turn/system-prompt.expected.md b/snapshots/session/ptc-turn/system-prompt.expected.md index d8eb93ee39..1a42d942af 100644 --- a/snapshots/session/ptc-turn/system-prompt.expected.md +++ b/snapshots/session/ptc-turn/system-prompt.expected.md @@ -64,7 +64,7 @@ interface ToolArgsMap { run_in_background?: boolean; /** The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Create one persisted same-session completion goal when the current direct human request is a long-running objective that should continue across autonomous goal rounds. You may infer that intent without requiring the user to say "create a goal". Do not use this for trivial single-turn work. Execution rejects non-human and subagent authority. */ @@ -86,7 +86,7 @@ interface ToolArgsMap { replace_all?: boolean; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. Send the COMPLETE plan as markdown, starting with a # heading that names it. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again. */ @@ -258,7 +258,7 @@ interface ToolArgsMap { content: string; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; } diff --git a/snapshots/session/ptc-turn/tool-schemas.expected.json b/snapshots/session/ptc-turn/tool-schemas.expected.json index a2033b2b3c..a24c4fbfb4 100644 --- a/snapshots/session/ptc-turn/tool-schemas.expected.json +++ b/snapshots/session/ptc-turn/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json b/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json index 60908d610b..240801fde5 100644 --- a/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json +++ b/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -733,7 +733,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json b/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json index 0b62b74f30..6fc8a3a9eb 100644 --- a/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json +++ b/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json @@ -32,7 +32,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -223,7 +223,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -515,7 +515,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/ralph-loop/tool-schemas.1.expected.json b/snapshots/session/ralph-loop/tool-schemas.1.expected.json index 3962047bb9..576f97e944 100644 --- a/snapshots/session/ralph-loop/tool-schemas.1.expected.json +++ b/snapshots/session/ralph-loop/tool-schemas.1.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -667,7 +667,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/ralph-loop/tool-schemas.2.expected.json b/snapshots/session/ralph-loop/tool-schemas.2.expected.json index 3962047bb9..576f97e944 100644 --- a/snapshots/session/ralph-loop/tool-schemas.2.expected.json +++ b/snapshots/session/ralph-loop/tool-schemas.2.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -667,7 +667,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/ralph-loop/tool-schemas.expected.json b/snapshots/session/ralph-loop/tool-schemas.expected.json index ef1b70c7c6..8a8ed23a1d 100644 --- a/snapshots/session/ralph-loop/tool-schemas.expected.json +++ b/snapshots/session/ralph-loop/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -624,7 +624,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/session-query-spill/session.v4.jsonl b/snapshots/session/session-query-spill/session.v4.jsonl index b522019782..0794e38039 100644 --- a/snapshots/session/session-query-spill/session.v4.jsonl +++ b/snapshots/session/session-query-spill/session.v4.jsonl @@ -14,7 +14,7 @@ {"type":"session/title","data":{"title":"Read request event 11 with","messageSeqs":[8],"source":{"kind":"fallback"}}} {"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_session_query_spill","name":"session_event_read","arguments":"{\"seq\":10}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1788699423495,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1788699423496,"index":0,"dt":[],"id":"call_session_query_spill","name":"session_event_read","args":["{\"seq\":10}"]},{"type":"chunk","time":1788699423496,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_session_query_spill","name":"session_event_read","arguments":"{\"seq\":10}"}}},{"type":"chunk","time":1788699423496,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1788699423496,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"} {"type":"tool/call","data":{"turn":1,"step":1,"callId":"call_session_query_spill","name":"session_event_read","arguments":"{\"seq\":10}"}} -{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_session_query_spill"},"toolCallId":"call_session_query_spill","content":[{"type":"text","text":"Session {{session:1}} — Read request event 11 with\nTarget event seq 10:\n```json\n{\n \"type\": \"request/header\",\n \"seq\": 10,\n \"time\": 1789981398965,\n \"data\": {\n \"header\": {\n \"config\": {\n \"provider\": \"deepseek-o\n\n[...]\n\nplaining why this exact file operation needs the wider access.\"\n }\n },\n \"required\": [\n \"file_path\",\n \"content\"\n ]\n }\n }\n ]\n },\n \"reason\": \"initial\"\n }\n}\n```\n\n(Omitted 40211 bytes. Full formatted result stored at: /tmp/dsh-acp-snap-035d1d054/session-50830de2ce22/dca7b66e737f-session_event_read.txt. Use read with offset/limit, or grep this path to search within it.)"}],"isError":false,"id":"{{message:5}}"}},"sourceEventSeqs":[14],"surfaceOp":"append"} +{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_session_query_spill"},"toolCallId":"call_session_query_spill","content":[{"type":"text","text":"Session {{session:1}} — Read request event 11 with\nTarget event seq 10:\n```json\n{\n \"type\": \"request/header\",\n \"seq\": 10,\n \"time\": 1790084590641,\n \"data\": {\n \"header\": {\n \"config\": {\n \"provider\": \"deepseek-o\n\n[...]\n\n wider access. Use the language of the user’s current request.\"\n }\n },\n \"required\": [\n \"file_path\",\n \"content\"\n ]\n }\n }\n ]\n },\n \"reason\": \"initial\"\n }\n}\n```\n\n(Omitted 41063 bytes. Full formatted result stored at: /tmp/dsh-acp-snap-035d1d054/session-50830de2ce22/dca7b66e737f-session_event_read.txt. Use read with offset/limit, or grep this path to search within it.)"}],"isError":false,"id":"{{message:5}}"}},"sourceEventSeqs":[14],"surfaceOp":"append"} {"type":"step/end","data":{"turn":1,"step":1}} {"type":"step/start","data":{"turn":1,"step":2}} {"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_verify_session_query_spill","name":"bash","arguments":"{\"command\":\"file=\\\"/tmp/dsh-acp-snap-035d1d054/session-50830de2ce22/dca7b66e737f-session_event_read.txt\\\"; grep -Fq request/header \\\"$file\\\" && grep -Fq session_event_search \\\"$file\\\" && printf 'SPILL_CANONICAL_OK\\\\n'\",\"description\":\"Verify complete session query spill\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:6}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1788699423521,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1788699423521,"index":0,"dt":[],"id":"call_verify_session_query_spill","name":"bash","args":["{\"command\":\"file=\\\"/tmp/dsh-acp-snap-035d1d054/session-50830de2ce22/dca7b66e737f-session_event_read.txt\\\"; grep -Fq request/header \\\"$file\\\" && grep -Fq session_event_search \\\"$file\\\" && printf 'SPILL_CANONICAL_OK\\\\n'\",\"description\":\"Verify complete session query spill\"}"]},{"type":"chunk","time":1788699423521,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_verify_session_query_spill","name":"bash","arguments":"{\"command\":\"file=\\\"/tmp/dsh-acp-snap-035d1d054/session-50830de2ce22/dca7b66e737f-session_event_read.txt\\\"; grep -Fq request/header \\\"$file\\\" && grep -Fq session_event_search \\\"$file\\\" && printf 'SPILL_CANONICAL_OK\\\\n'\",\"description\":\"Verify complete session query spill\"}"}}},{"type":"chunk","time":1788699423521,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1788699423521,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"} diff --git a/snapshots/session/session-query-spill/tool-schemas.expected.json b/snapshots/session/session-query-spill/tool-schemas.expected.json index fab2e57268..6544a89d7d 100644 --- a/snapshots/session/session-query-spill/tool-schemas.expected.json +++ b/snapshots/session/session-query-spill/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -808,7 +808,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json b/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json index 963ab05606..2a40e6e822 100644 --- a/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json +++ b/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -629,7 +629,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json b/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json index 6b25979b76..5109cabfda 100644 --- a/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json +++ b/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json @@ -99,7 +99,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -160,7 +160,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -667,7 +667,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json b/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json index 54c8d3fa8d..5b4d23e518 100644 --- a/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json +++ b/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/system-prompt-in-history/tool-schemas.expected.json b/snapshots/session/system-prompt-in-history/tool-schemas.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/session/system-prompt-in-history/tool-schemas.expected.json +++ b/snapshots/session/system-prompt-in-history/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/team-targets/tool-schemas.expected.json b/snapshots/session/team-targets/tool-schemas.expected.json index c512406928..5a76dbfa34 100644 --- a/snapshots/session/team-targets/tool-schemas.expected.json +++ b/snapshots/session/team-targets/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -743,7 +743,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/text-turn/tool-schemas.expected.json b/snapshots/session/text-turn/tool-schemas.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/session/text-turn/tool-schemas.expected.json +++ b/snapshots/session/text-turn/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/web-fetch/tool-schemas.expected.json b/snapshots/session/web-fetch/tool-schemas.expected.json index 15f97e0131..070c0bb689 100644 --- a/snapshots/session/web-fetch/tool-schemas.expected.json +++ b/snapshots/session/web-fetch/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -585,7 +585,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/workflow-confinement/tool-schemas.expected.json b/snapshots/session/workflow-confinement/tool-schemas.expected.json index edda1bd109..d96cac5782 100644 --- a/snapshots/session/workflow-confinement/tool-schemas.expected.json +++ b/snapshots/session/workflow-confinement/tool-schemas.expected.json @@ -36,7 +36,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -97,7 +97,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -604,7 +604,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/session/workspace-dependencies/tool-schemas.expected.json b/snapshots/session/workspace-dependencies/tool-schemas.expected.json index 1ab5bb2c82..86f13bcb3c 100644 --- a/snapshots/session/workspace-dependencies/tool-schemas.expected.json +++ b/snapshots/session/workspace-dependencies/tool-schemas.expected.json @@ -52,7 +52,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -567,7 +567,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/web/approval-composer/ui.expected.md b/snapshots/web/approval-composer/ui.expected.md index 767e0ce1f0..af90559c07 100644 --- a/snapshots/web/approval-composer/ui.expected.md +++ b/snapshots/web/approval-composer/ui.expected.md @@ -1,4 +1,4 @@ - text: Waiting for approval -- group "Approval details": "escalate sandbox to workspace-write: Need to write the notes.txt file as requested by the user. echo 'tok63z tokc7y tokibx tokofw tokujv tok10nu tok16rt tok1cvs tok1izr tok1p3q tok1v7p tok21bo tok2a4 tok8e3 tokei2 tokkm1 tokqq0 tokwtz tok12xy tok191x tok1f5w tok1l9v tok1rdu tok1xht tok23ls tok4k8 tokao7 tokgs6 tokmw5 tokt04 tokz43 tok1582 tok1bc1 tok1hg0 tok1njz tok1tny tok1zrx tokqd tok6uc tokcyb tokj2a tokp69 tokva8 tok11e7 tok17i6 tok1dm5 tok1jq4 tok1pu3 tok1vy2 tok2221 tok30h tok94g tokf8f toklce tokrgd tokxkc tok13ob tok19sa tok1fw9 tok1m08 tok1s47 tok1y86 tok24c5 tok5al tokbek tokhij toknmi toktqh tokzug tok15yf tok1c2e tok1i6d tok1oac tok1ueb tok20ia tok1gq tok7kp tokdoo tokjsn tokpwm tokw0l tok124k tok188j tok1eci tok1kgh tok1qkg tok1wof tok22se tok3qu tok9ut tokfys tokm2r toks6q tokyap tok14eo tok1ain tok1gmm tok1mql tok1suk tok1yyj tok252i tok60y tokc4x toki8w tokocv tokugu tok10kt tok16os tok1csr tok1iwq tok1p0p tok1v4o tok218n tok273 tok8b2 tokef1 tokkj0 tokqmz tokwqy tok12ux tok18yw tok1f2v tok1l6u tok1rat tok1xes tok23ir tok4h7 tokal6 tokgp5 tokmt4 toksx3 tokz12 tok1551 tok1b90 tok1hcz tok1ngy tok1tkx tok1zow toknc tok6rb tokcva tokiz9 tokp38 tokv77 tok11b6 tok17f5 tok1dj4 tok1jn3 tok1pr2 tok1vv1 tok21z0 tok2xg tok91f tokf5e tokl9d tokrdc tokxhb tok13la tok19p9 tok1ft8 tok1lx7 tok1s16 tok1y55 tok2494 tok57k tokbbj tokhfi toknjh toktng tokzrf tok15ve tok1bzd tok1i3c tok1o7b tok1uba tok20f9 tok1dp tok7ho tokdln tokjpm tokptl tokvxk tok121j tok185i tok1e9h tok1kdg tok1qhf tok1wle tok22pd tok3nt tok9rs tokfvr toklzq toks3p toky7o tok14bn tok1afm tok1gjl tok1mnk tok1srj tok1yvi tok24zh tok5xx tokc1w toki5v toko9u tokudt tok10hs tok16lr tok1cpq tok1itp tok1oxo tok1v1n tok215m tok242 tok881 tokec0 tokkfz tokqjy tokwnx' > notes.txt" +- group "Approval details": "Allow this operation with workspace-write permissions: Need to write the notes.txt file as requested by the user. echo 'tok63z tokc7y tokibx tokofw tokujv tok10nu tok16rt tok1cvs tok1izr tok1p3q tok1v7p tok21bo tok2a4 tok8e3 tokei2 tokkm1 tokqq0 tokwtz tok12xy tok191x tok1f5w tok1l9v tok1rdu tok1xht tok23ls tok4k8 tokao7 tokgs6 tokmw5 tokt04 tokz43 tok1582 tok1bc1 tok1hg0 tok1njz tok1tny tok1zrx tokqd tok6uc tokcyb tokj2a tokp69 tokva8 tok11e7 tok17i6 tok1dm5 tok1jq4 tok1pu3 tok1vy2 tok2221 tok30h tok94g tokf8f toklce tokrgd tokxkc tok13ob tok19sa tok1fw9 tok1m08 tok1s47 tok1y86 tok24c5 tok5al tokbek tokhij toknmi toktqh tokzug tok15yf tok1c2e tok1i6d tok1oac tok1ueb tok20ia tok1gq tok7kp tokdoo tokjsn tokpwm tokw0l tok124k tok188j tok1eci tok1kgh tok1qkg tok1wof tok22se tok3qu tok9ut tokfys tokm2r toks6q tokyap tok14eo tok1ain tok1gmm tok1mql tok1suk tok1yyj tok252i tok60y tokc4x toki8w tokocv tokugu tok10kt tok16os tok1csr tok1iwq tok1p0p tok1v4o tok218n tok273 tok8b2 tokef1 tokkj0 tokqmz tokwqy tok12ux tok18yw tok1f2v tok1l6u tok1rat tok1xes tok23ir tok4h7 tokal6 tokgp5 tokmt4 toksx3 tokz12 tok1551 tok1b90 tok1hcz tok1ngy tok1tkx tok1zow toknc tok6rb tokcva tokiz9 tokp38 tokv77 tok11b6 tok17f5 tok1dj4 tok1jn3 tok1pr2 tok1vv1 tok21z0 tok2xg tok91f tokf5e tokl9d tokrdc tokxhb tok13la tok19p9 tok1ft8 tok1lx7 tok1s16 tok1y55 tok2494 tok57k tokbbj tokhfi toknjh toktng tokzrf tok15ve tok1bzd tok1i3c tok1o7b tok1uba tok20f9 tok1dp tok7ho tokdln tokjpm tokptl tokvxk tok121j tok185i tok1e9h tok1kdg tok1qhf tok1wle tok22pd tok3nt tok9rs tokfvr toklzq toks3p toky7o tok14bn tok1afm tok1gjl tok1mnk tok1srj tok1yvi tok24zh tok5xx tokc1w toki5v toko9u tokudt tok10hs tok16lr tok1cpq tok1itp tok1oxo tok1v1n tok215m tok242 tok881 tokec0 tokkfz tokqjy tokwnx' > notes.txt" - button "Reject" - button "Allow once" diff --git a/snapshots/web/fresh-round-trip/tool-schemas.expected.json b/snapshots/web/fresh-round-trip/tool-schemas.expected.json index 89fe6a5885..5d71795391 100644 --- a/snapshots/web/fresh-round-trip/tool-schemas.expected.json +++ b/snapshots/web/fresh-round-trip/tool-schemas.expected.json @@ -99,7 +99,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -160,7 +160,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ @@ -970,7 +970,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access." + "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request." } }, "required": [ diff --git a/snapshots/web/ptc-escalation-approved/approval.expected.md b/snapshots/web/ptc-escalation-approved/approval.expected.md index 764a75c3e9..24641bdfad 100644 --- a/snapshots/web/ptc-escalation-approved/approval.expected.md +++ b/snapshots/web/ptc-escalation-approved/approval.expected.md @@ -1,4 +1,4 @@ - text: Waiting for approval -- group "Approval details": "escalate sandbox to workspace-write: Create the file requested by the user" +- group "Approval details": "Allow this operation with workspace-write permissions: Create the file requested by the user" - button "Reject" - button "Allow once" diff --git a/snapshots/web/ptc-round/system-prompt.expected.md b/snapshots/web/ptc-round/system-prompt.expected.md index 09b57ddd33..2c61f0ae6c 100644 --- a/snapshots/web/ptc-round/system-prompt.expected.md +++ b/snapshots/web/ptc-round/system-prompt.expected.md @@ -84,7 +84,7 @@ interface ToolArgsMap { run_in_background?: boolean; /** The wider sandbox mode this command needs. Only valid as a one-shot retry of a command the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Create one persisted same-session completion goal when the current direct human request is a long-running objective that should continue across autonomous goal rounds. You may infer that intent without requiring the user to say "create a goal". Do not use this for trivial single-turn work. Execution rejects non-human and subagent authority. */ @@ -106,7 +106,7 @@ interface ToolArgsMap { replace_all?: boolean; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; /** Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. Send the COMPLETE plan as markdown, starting with a # heading that names it. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again. */ @@ -343,7 +343,7 @@ interface ToolArgsMap { content: string; /** The wider sandbox mode this file operation needs. Only valid as a one-shot retry of an operation the sandbox just denied; requires justification and user approval. */ sandbox_permissions?: "workspace-write" | "danger-full-access"; - /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. */ + /** Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access. Use the language of the user’s current request. */ justification?: string; } & Record; } diff --git a/snapshots/web/ptc-round/tool-schemas.expected.json b/snapshots/web/ptc-round/tool-schemas.expected.json index a2033b2b3c..a24c4fbfb4 100644 --- a/snapshots/web/ptc-round/tool-schemas.expected.json +++ b/snapshots/web/ptc-round/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "justification": { "type": "string", - "description": "Reason this complete program needs wider access, shown to the user for approval." + "description": "Reason this complete program needs wider access, shown to the user for approval. Use the language of the user’s current request." } }, "required": [