diff --git a/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.i18n.yaml b/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.i18n.yaml index 6030451a9e..51fb584b7e 100644 --- a/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.i18n.yaml +++ b/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write .agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.md -2026-09-20-unambiguous-tool-arguments.md: e671603648777e0576e294ddef1e1c9061cf2052 -2026-09-20-unambiguous-tool-arguments.zh.md: 325b3dc098763d13b5a3ab48db153264d03f8d1f +2026-09-20-unambiguous-tool-arguments.md: 7e2a5111c3de45dfe61e1db67292c84a690915ff +2026-09-20-unambiguous-tool-arguments.zh.md: 6887d9feb8b51fdf7e2b648cc8258dbee37d541d diff --git a/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.md b/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.md index e671603648..7e2a5111c3 100644 --- a/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.md +++ b/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.md @@ -6,7 +6,7 @@ English | [中文](2026-09-20-unambiguous-tool-arguments.zh.md) ## Problem -Models can populate optional fields that do not affect the requested operation. Rejecting these calls adds retries without protecting any state. A general OpenAI strict-schema adapter requires separate schema projection and argument restoration; these local compatibility rules do not implement that adapter. +Models can populate optional fields that do not affect the requested operation. Rejecting these calls adds retries without protecting any state. ## Decision diff --git a/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.zh.md b/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.zh.md index 325b3dc098..6887d9feb8 100644 --- a/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.zh.md +++ b/.agents/notes/implemented/bug-fix/2026-09-20-unambiguous-tool-arguments.zh.md @@ -6,7 +6,7 @@ Status: implemented ## 问题 -模型可能填写不影响所请求操作的可选字段。拒绝这些调用只会增加重试,并不保护任何状态。通用 OpenAI 严格 schema 适配需要单独实现 schema 投影和参数还原;这些局部兼容规则并未实现该适配器。 +模型可能填写不影响所请求操作的可选字段。拒绝这些调用只会增加重试,并不保护任何状态。 ## 决策 diff --git a/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.i18n.yaml b/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.i18n.yaml index 1f375c2431..980da5ab10 100644 --- a/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.i18n.yaml +++ b/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write .agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.md -2026-07-19-model-facing-goal-tools.md: 0dbc3f6f5f5668005240a52300eae0eea01c9b8b -2026-07-19-model-facing-goal-tools.zh.md: a4328a026510e1be17ed7a37663f1aceac160003 +2026-07-19-model-facing-goal-tools.md: 8986e0cb5c30ac879bd9224d1865c0237c0f00f5 +2026-07-19-model-facing-goal-tools.zh.md: 402a9469c796dd3f89b4da2485535ea316a44d5a diff --git a/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.md b/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.md index 0dbc3f6f5f..8986e0cb5c 100644 --- a/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.md +++ b/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.md @@ -16,7 +16,7 @@ The tool API also needs to preserve the separation between durable state and liv ### Tools and model contract -`get_goal()` returns the current goal or `null`. A non-null result contains the compare-and-set id and revision, objective, durable phase, admitted and maximum goal rounds, any blocker reason, plus the process-local activation observation. `create_goal(objective, max_goal_rounds?)` creates one long-running same-session objective. `update_goal(goal_id, revision, action, objective?, max_goal_rounds?, blocked_reason?)` supports `edit`, `pause`, `resume`, `complete`, and `blocked`; replacement fields are used only for `edit`, while a non-empty `blocked_reason` is required only for `blocked` and persists under the stable `model-reported` code. A durable paused goal rejects `resume` with `GOAL_TOOL_RESUME_PAUSED`; the user-facing command or Web control owns that transition. For `edit`, exact empty-string objectives and a zero `max_goal_rounds` count as omitted, and at least one meaningful replacement is required. The rejection of populated fields unused by an action is superseded by [unambiguous tool argument compatibility](../bug-fix/2026-09-20-unambiguous-tool-arguments.md). +`get_goal()` returns the current goal or `null`. A non-null result contains the compare-and-set id and revision, objective, durable phase, admitted and maximum goal rounds, any blocker reason, plus the process-local activation observation. `create_goal(objective, max_goal_rounds?)` creates one long-running same-session objective. `update_goal(goal_id, revision, action, objective?, max_goal_rounds?, blocked_reason?)` supports `edit`, `pause`, `resume`, `complete`, and `blocked`; replacement fields are used only for `edit`, while a non-empty `blocked_reason` is required only for `blocked` and persists under the stable `model-reported` code. A durable paused goal rejects `resume` with `GOAL_TOOL_RESUME_PAUSED`; the user-facing command or Web control owns that transition. For `edit`, exact empty-string objectives and a zero `max_goal_rounds` count as omitted, and at least one meaningful replacement is required. Each action ignores known optional fields it does not use ([rationale](../bug-fix/2026-09-20-unambiguous-tool-arguments.md)). The prompt tells the model that it may infer goal intent from a direct human request in any wording or language, but should not convert routine single-turn work into a goal. It must read the current goal before updating and copy the exact id and revision. On a restored or forked active-but-disarmed goal, a semantic human request to continue is grounds for `resume`. The prompt does not announce the durable paused boundary; execution rejects that attempt with `GOAL_TOOL_RESUME_PAUSED`, and the user-facing resume path owns the transition. Completion is reserved for an achieved objective, and difficulty or uncertainty alone is not a blocker; a block report must name the concrete condition. @@ -48,7 +48,7 @@ Unit coverage pins registration and disposal, exclusive scheduling, generated pr - **Authorize from persisted root or fork metadata** — rejected because a fork that becomes an independently resumed top-level session should accept new human authority, while a currently owned child should not. - **Let autonomous rounds edit or resume the goal** — rejected because continuation authority is narrower than authority to redefine or restart the human objective. - **Treat the blocked threshold as an evaluator** — rejected because event counts cannot prove that an obstacle is semantically unchanged or truly terminal. -- **Reject every present action-specific field** — rejected because strict-schema providers can serialize zero-value placeholders for every optional field; only meaningful values can express a conflicting action. +- **Reject every present action-specific field** — rejected because strict-schema providers can serialize zero-value placeholders for every optional field; only meaningful values can express a conflicting action. The [unused-field decision](../bug-fix/2026-09-20-unambiguous-tool-arguments.md) defines which populated fields are ignored. ## Consequences diff --git a/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.zh.md b/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.zh.md index a4328a0265..402a9469c7 100644 --- a/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.zh.md +++ b/.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.zh.md @@ -16,7 +16,7 @@ Status: implemented ### 工具与模型约定 -`get_goal()` 返回当前目标或 `null`。非空结果包含用于比较并交换的 id 与修订号、目标描述、持久阶段、已接纳和最大 Goal Round 数、可能存在的阻塞原因,以及进程本地激活态观察。`create_goal(objective, max_goal_rounds?)` 创建一个长时间运行的同会话目标。`update_goal(goal_id, revision, action, objective?, max_goal_rounds?, blocked_reason?)` 支持 `edit`、`pause`、`resume`、`complete` 和 `blocked`;替换字段仅在 `edit` 时使用,非空的 `blocked_reason` 仅在 `blocked` 时必填,并以稳定代码 `model-reported` 持久化。持久 paused goal 会以 `GOAL_TOOL_RESUME_PAUSED` 拒绝 `resume`;面向用户的命令或 Web 控件拥有该转换。对于 `edit`,值恰好为空字符串的目标描述和值为 0 的 `max_goal_rounds` 视为省略,且至少需要一个有实际意义的替换字段。对已填写但当前 action 不使用的字段的拒绝规则,已由[无歧义的工具参数兼容](../bug-fix/2026-09-20-unambiguous-tool-arguments.zh.md)取代。 +`get_goal()` 返回当前目标或 `null`。非空结果包含用于比较并交换的 id 与修订号、目标描述、持久阶段、已接纳和最大 Goal Round 数、可能存在的阻塞原因,以及进程本地激活态观察。`create_goal(objective, max_goal_rounds?)` 创建一个长时间运行的同会话目标。`update_goal(goal_id, revision, action, objective?, max_goal_rounds?, blocked_reason?)` 支持 `edit`、`pause`、`resume`、`complete` 和 `blocked`;替换字段仅在 `edit` 时使用,非空的 `blocked_reason` 仅在 `blocked` 时必填,并以稳定代码 `model-reported` 持久化。持久 paused goal 会以 `GOAL_TOOL_RESUME_PAUSED` 拒绝 `resume`;面向用户的命令或 Web 控件拥有该转换。对于 `edit`,值恰好为空字符串的目标描述和值为 0 的 `max_goal_rounds` 视为省略,且至少需要一个有实际意义的替换字段。每个 action 都忽略它不使用的已知可选字段([理由](../bug-fix/2026-09-20-unambiguous-tool-arguments.zh.md))。 提示词告诉模型:它可以从任何措辞或语言的直接人类请求中推断目标意图,但不应把常规单轮工作转换为目标。更新前必须读取当前目标,并复制准确的 id 和修订号。对于恢复或 fork 后处于活跃但未激活状态的目标,人类在语义上要求继续即可成为执行 `resume` 的依据。提示词不会静态声明持久 paused 的边界;执行时以 `GOAL_TOOL_RESUME_PAUSED` 拒绝该尝试,面向用户的恢复路径拥有该转换。只有目标已经实现时才能标记完成,困难或不确定性本身不构成阻塞;阻塞报告必须说明具体条件。 @@ -48,7 +48,7 @@ Status: implemented - **根据持久的根或 fork 元数据授权**——不予采纳,因为作为顶层会话独立恢复的 fork 应接受新的人类权限,而当前仍受所有权约束的 subagent 则不应接受。 - **允许自主 Round 编辑或恢复目标**——不予采纳,因为继续执行权限比重新定义或重启人类目标的权限更窄。 - **把阻塞阈值当作评估器**——不予采纳,因为事件计数无法证明障碍在语义上未改变或确实不可继续。 -- **拒绝所有已提供的特定操作字段**——不予采纳,因为采用严格 schema 的提供方可能为每个可选字段序列化零值占位符;只有有实际意义的字段值才能表示与指定操作相冲突的另一项操作。 +- **拒绝所有已提供的特定操作字段**——不予采纳,因为采用严格 schema 的提供方可能为每个可选字段序列化零值占位符;只有有实际意义的字段值才能表示与指定操作相冲突的另一项操作。[无关字段决策](../bug-fix/2026-09-20-unambiguous-tool-arguments.zh.md)规定了哪些已填写字段会被忽略。 ## 后果 diff --git a/apps/web/tests/search-empty-include.e2e.ts b/apps/web/tests/search-empty-include.e2e.ts new file mode 100644 index 0000000000..d14c715616 --- /dev/null +++ b/apps/web/tests/search-empty-include.e2e.ts @@ -0,0 +1,63 @@ +/** Recorded empty-include searches retain the specialized Web result cards. */ +import { readFile } from 'node:fs/promises' +import { fileURLToPath } from 'node:url' +import { chromium, type Browser, type Page } from 'playwright' +import { afterAll, beforeAll, describe, expect, it, onTestFailed } from 'vitest' +import { + assertFixtureInventory, captureStableAria, compareOrRefreshGolden, + launchWebScaffold, seedSession, selectedSessionFixture, watchConsole, webSnapshotMode, type WebScaffold, +} from './scaffold.ts' +import { expandTurnProcesses, newEnglishPage, saveFailureShot } from './support.ts' + +const ROOT = fileURLToPath(new URL('../../../snapshots', import.meta.url)) +const MODE = webSnapshotMode() + +describe.skipIf(MODE === 'record')('web e2e: search-empty-include', () => { + let scaffold: WebScaffold + let browser: Browser + let page: Page + let tripwire: ReturnType + + beforeAll(async () => { + scaffold = await launchWebScaffold({}) + const fixture = await selectedSessionFixture(`${ROOT}/session/toolcall-unused-args/session.v4.jsonl`) + await seedSession(scaffold, await readFile(fixture, 'utf8'), 'search-empty-include') + browser = await chromium.launch() + page = await newEnglishPage(browser) + tripwire = watchConsole(page) + await page.goto(scaffold.authenticatedUrl, { waitUntil: 'load' }) + }) + + afterAll(async () => { + try { + await browser?.close() + } finally { + await scaffold?.close() + } + }) + + it('renders both recorded searches as file-grouped matches rather than generic JSON', async () => { + onTestFailed(() => saveFailureShot(page, 'web-e2e-search-empty-include')) + await page.locator('[role="treeitem"]').first().click() + await page.locator('[role="treeitem"]').nth(1).click() + await page.getByText('DONE', { exact: true }).waitFor({ timeout: 15_000 }) + await expandTurnProcesses(page) + const calls = page.locator('[data-variant="search"]') + expect(await calls.count()).toBe(2) + const views: string[] = [] + for (const [index, extension] of ['.ts', '.md'].entries()) { + const call = calls.nth(index) + await call.locator('[data-expandable]').click() + const matches = call.locator('[data-search="matches"]') + await matches.waitFor() + expect(await matches.textContent()).toContain(`example${extension}`) + expect(await matches.textContent()).toContain('marker') + views.push(await captureStableAria(page, `[data-variant="search"] >> nth=${index}`, scaffold.workspaceCwd)) + } + const snapshotDir = `${ROOT}/web/search-empty-include` + await compareOrRefreshGolden(`${snapshotDir}/ui.expected.md`, views.join('\n'), MODE) + await assertFixtureInventory(snapshotDir, ['ui.expected.md']) + expect(tripwire.pageErrors).toEqual([]) + expect(tripwire.warnings).toEqual([]) + }) +}) diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 30e2d212b5..7db20a5375 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -24,6 +24,7 @@ "exclude": [ "tests/default-product-isolation.e2e.ts", "tests/diff-context.e2e.ts", + "tests/search-empty-include.e2e.ts", "tests/scaffold.ts", "tests/prefix-proxy.ts", "tests/auto-review-fixture.ts", diff --git a/packages/client/ui-tool/README.i18n.yaml b/packages/client/ui-tool/README.i18n.yaml index 3437b438a6..1678276bde 100644 --- a/packages/client/ui-tool/README.i18n.yaml +++ b/packages/client/ui-tool/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/client/ui-tool/README.md -README.md: db82d69b742756f9a239d29e6b6b83d344bc9da5 -README.zh.md: d43daddce8a6962efe6b0e7128d7c53b29c2a29e +README.md: 23ba3c332a308e4666ce4f209fa83eed1537d582 +README.zh.md: f53fd5d1a3ce733a707197430a0e3018707ac592 diff --git a/packages/client/ui-tool/README.md b/packages/client/ui-tool/README.md index db82d69b74..23ba3c332a 100644 --- a/packages/client/ui-tool/README.md +++ b/packages/client/ui-tool/README.md @@ -66,7 +66,7 @@ The package realizes one dispatch rule: atomic Tool views are keyed by wire Tool Every card is read in place in the call tree; there is no second, full-height presentation of a selected call. Row renderers share one pure card model for each terminal, read, diff, search, and web card, and the image card's gallery renders through the tool-owned `tool.call.images` slot. These models validate raw call arguments, result content, failure state, persisted metadata, PTC dispatch `parentCallId`, and Session path facts. Unsupported or malformed inputs use flattened Tool result text. A file-path summary opens the file through the owner's `openFile`, which the chat view routes to the right Sidebar's text preview; `inspect` opens the trajectory view and is absent when that View is unavailable; cards then omit Inspect. Card-specific limits and fallback rules for the terminal, diff, read, search, and web cards remain in [the ui-primitives README](../ui-primitives/README.md); the image card's model in this package carries its own fallback rules. -Shell and file cards accept absent or blank justification with recognized or omitted permission fields. Malformed field types and non-empty orphan reasons remain generic; effective-mode and approval decisions belong to execution. +Search cards treat an exact empty `include` as omitted; invalid types, whitespace-only values, negated filters, and comma-separated lists remain generic. Shell and file cards accept absent or blank justification with recognized or omitted permission fields. Malformed field types and non-empty orphan reasons remain generic; effective-mode and approval decisions belong to execution. Chat diff cards keep nine rows before folding, enough for a file header, one removed/added pair, and three context lines on either side. The collapsed row and expanded footer share the primitive's exact or coarse-replacement counts. diff --git a/packages/client/ui-tool/README.zh.md b/packages/client/ui-tool/README.zh.md index d43daddce8..f53fd5d1a3 100644 --- a/packages/client/ui-tool/README.zh.md +++ b/packages/client/ui-tool/README.zh.md @@ -66,7 +66,7 @@ owner 载荷为 `ToolCallOwnerProps`:`callId`、`toolName`、冻结的 `block` 每张卡片都直接在调用树中查看;选中调用后不会再显示第二个全高视图。行 renderer 为 terminal、read、diff、search 和 web 卡片各复用同一个纯 card model,image 卡片的图库经由工具自有 `tool.call.images` slot 渲染。这些 model 校验原始调用参数、结果内容、失败状态、持久 metadata、PTC dispatch 的 `parentCallId` 与会话路径信息。不受支持或格式错误的输入使用压平的工具结果文本。文件路径摘要经属主的 `openFile` 打开文件,chat 视图把它路由到右侧 Sidebar 的文本预览;`inspect` 打开轨迹视图;该视图不可用时不提供此回调,卡片随之隐藏 Inspect。terminal、diff、read、search 与 web 卡片的上限与 fallback 规则仍由 [ui-primitives README](../ui-primitives/README.zh.md) 负责;image 卡片的 fallback 规则由本包内的 card model 自行承载。 -Shell 和文件卡片允许在权限字段省略或取已知值时省略理由或提供空白理由。字段类型错误、没有权限字段却提供非空理由时,仍使用通用显示;生效模式和审批由执行端判断。 +搜索卡片将值恰好为空字符串的 `include` 视为省略;类型错误、仅含空白的值、否定过滤器和逗号分隔列表仍使用通用显示。Shell 和文件卡片允许在权限字段省略或取已知值时省略理由或提供空白理由。字段类型错误、没有权限字段却提供非空理由时,仍使用通用显示;生效模式和审批由执行端判断。 Chat diff 卡片在折叠前保留九行,足以容纳文件标题、一对删除与新增行及两侧各三行上下文。折叠工具行与展开卡片底部采用原语一致的精确或粗粒度替换统计。 diff --git a/packages/client/ui-tool/src/client/tool/models/search-card-model.ts b/packages/client/ui-tool/src/client/tool/models/search-card-model.ts index cc4d25b6b5..bf265b1996 100644 --- a/packages/client/ui-tool/src/client/tool/models/search-card-model.ts +++ b/packages/client/ui-tool/src/client/tool/models/search-card-model.ts @@ -30,7 +30,7 @@ function validSearchCall(block: ToolCallBlock): 'grep' | 'glob' | null { if (path !== undefined && (typeof path !== 'string' || path.trim() === '')) return null if (call.name === 'grep') { const { include } = call.args - if (include !== undefined && (typeof include !== 'string' || !validInclude(include))) return null + if (include !== undefined && include !== '' && (typeof include !== 'string' || !validInclude(include))) return null } return call.name } diff --git a/packages/client/ui-tool/tests/search-card.client.spec.tsx b/packages/client/ui-tool/tests/search-card.client.spec.tsx index cee488b8b6..1b829a0a3a 100644 --- a/packages/client/ui-tool/tests/search-card.client.spec.tsx +++ b/packages/client/ui-tool/tests/search-card.client.spec.tsx @@ -97,6 +97,21 @@ describe('searchCardModel', () => { }) }) + it('keeps the matches card when the recorded include is empty', () => { + const call = { name: 'grep', argsRaw: '{"pattern":"foo","path":"src","include":""}' } + expect(searchCardModel(settledGrep({ call }))).toEqual(searchCardModel(settledGrep())) + expect(searchCardModel(settledGrep({ call, isError: true }))).toBeNull() + }) + + it.each([null, false, 7, [], {}, ' ', '\t\n', '!*.ts', '*.ts,*.md'])( + 'keeps invalid include %j on the generic path', + (include) => { + expect(searchCardModel(settledGrep({ + call: { name: 'grep', argsRaw: JSON.stringify({ pattern: 'foo', include }) }, + }))).toBeNull() + }, + ) + it('derives a paths card from glob result metadata, carrying the truncation signal', () => { // Empty block content isolates the truncation signal from the recovery arm. expect(searchCardModel(settledGlob({ content: [], meta: pathsMeta({ truncated: true, total: 20 }) }))).toEqual({ @@ -183,9 +198,12 @@ describe('chat row search body (GenericToolCard fallback)', () => { fireEvent.click(view.container.querySelector('[data-expandable]')!) } - it('the expanded body is the grouped matches, capped tighter than the panel', () => { + it.each([undefined, ''])('the expanded body groups matches when include is %j', (include) => { expect(CHAT_SEARCH_MAX_LINES).toBeLessThan(16) - const view = render() + const block = settledGrep({ + call: { name: 'grep', argsRaw: JSON.stringify({ pattern: 'foo', path: 'src', ...include === undefined ? {} : { include } }) }, + }) + const view = render() // Collapsed: the one-line summary row only, no card. expect(view.queryByText(/const foo = 1/)).toBeNull() toggleRow(view) diff --git a/packages/fs/tool-fs-search/src/grep.ts b/packages/fs/tool-fs-search/src/grep.ts index 0bb032ffb1..d5e68a5b64 100644 --- a/packages/fs/tool-fs-search/src/grep.ts +++ b/packages/fs/tool-fs-search/src/grep.ts @@ -234,14 +234,14 @@ function formatRetainedGrep(retained: RetainedItems, spillRef?: Spill /** * Pending-call presentation: a search card titled by the pattern (and target / - * include filter). + * include filter). An exact empty include contributes no filter suffix. * * @param args - the raw tool arguments; `pattern`, `path`, and `include` feed the title. * @returns the generic card view (`kind: 'search'`) shown while the call runs. */ export function presentGrepCall(args: { pattern: string; path?: string; include?: string }): GenericCallView { const where = args.path !== undefined ? ` in ${args.path}` : '' - const filter = args.include !== undefined ? ` (${args.include})` : '' + const filter = args.include !== undefined && args.include !== '' ? ` (${args.include})` : '' return { card: 'generic', title: `Grep ${args.pattern}${where}${filter}`, kind: 'search', rawInput: args.pattern } } diff --git a/packages/fs/tool-fs-search/tests/tools.spec.ts b/packages/fs/tool-fs-search/tests/tools.spec.ts index 1c7769b049..39ad4e71cd 100644 --- a/packages/fs/tool-fs-search/tests/tools.spec.ts +++ b/packages/fs/tool-fs-search/tests/tools.spec.ts @@ -1155,6 +1155,8 @@ describe('presentation', () => { it('grep titles carry the pattern, target, and include filter', () => { expect(presentGrepCall({ pattern: 'todo' })).toMatchObject({ card: 'generic', title: 'Grep todo', kind: 'search' }) + expect(presentGrepCall({ pattern: 'todo', include: '' })).toEqual(presentGrepCall({ pattern: 'todo' })) + expect(presentGrepCall({ pattern: 'todo', path: 'src', include: '' }).title).toBe('Grep todo in src') expect(presentGrepCall({ pattern: 'todo', path: 'src', include: '*.ts' }).title).toBe('Grep todo in src (*.ts)') }) diff --git a/packages/fs/tool-fs/src/sandbox.ts b/packages/fs/tool-fs/src/sandbox.ts index 60ceca9151..0b74f1b8a2 100644 --- a/packages/fs/tool-fs/src/sandbox.ts +++ b/packages/fs/tool-fs/src/sandbox.ts @@ -61,13 +61,13 @@ export class FsSandboxController { sandbox_permissions: { type: 'string', enum: [...this.escalationModes], - description: '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.', + description: 'Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. ' + + 'A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.', }, justification: { type: 'string', - description: 'Required with sandbox_permissions: one sentence for the user explaining ' - + 'why this exact file operation needs the wider access.', + description: 'Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions ' + + 'is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions.', }, } } diff --git a/packages/goal/tool-goal/tests/tool-goal.spec.ts b/packages/goal/tool-goal/tests/tool-goal.spec.ts index 392a8e9a5a..afed926ad3 100644 --- a/packages/goal/tool-goal/tests/tool-goal.spec.ts +++ b/packages/goal/tool-goal/tests/tool-goal.spec.ts @@ -1,4 +1,4 @@ -import { describe, expect, it } from 'vitest' +import { afterAll, afterEach, describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import AgentRegistry, { agentEvents } from '@deepseek-ai/dsh-agent' @@ -29,6 +29,17 @@ declare module '@deepseek-ai/dsh-llm' { } const testToolSignal = new AbortController().signal +const testContexts: Context[] = [] + +function testContext(): Context { + const ctx = new Context() + testContexts.push(ctx) + return ctx +} + +afterEach(async () => { + for (const ctx of testContexts.splice(0).reverse()) await ctx.fiber.dispose() +}) interface StubAgent { readonly agent: Agent @@ -38,6 +49,7 @@ interface StubAgent { } const isolatedInboxCtx = new Context() +afterAll(async () => { await isolatedInboxCtx.fiber.dispose() }) await isolatedInboxCtx.plugin(SessionStore) await isolatedInboxCtx.plugin(SessionProjectionRegistry) await isolatedInboxCtx.plugin(AgentRegistry) @@ -98,7 +110,7 @@ function closeTurn(stub: StubAgent, turn: number): void { } async function harness(config: toolGoal.Config = {}) { - const ctx = new Context() + const ctx = testContext() await ctx.plugin(SessionStore) await ctx.plugin(SessionProjectionRegistry) await ctx.plugin(SystemPrompt) @@ -214,7 +226,7 @@ describe('goal tool registration and presentation', () => { }) it('fails invalid direct config before registering anything', async () => { - const ctx = new Context() + const ctx = testContext() await ctx.plugin(SystemPrompt) await ctx.plugin(AgentRegistry) await ctx.plugin(ToolRuntime) @@ -228,7 +240,7 @@ describe('goal tool registration and presentation', () => { }) it('resolves the direct-apply default before registration', async () => { - const ctx = new Context() + const ctx = testContext() await ctx.plugin(SystemPrompt) await ctx.plugin(AgentRegistry) await ctx.plugin(ToolRuntime) @@ -521,34 +533,30 @@ describe('goal tool state transitions', () => { 'ignores populated fields unused by action %s without changing other goal values', async (action) => { const { ctx, root } = await harness() - try { - openTurn(root, { kind: 'user' }) - const goal = ctx.goals.create(root.agent, { objective: 'keep this objective', maxGoalRounds: 4 }) - if (action === 'resume') ctx.goals.disarm(root.agent) - const changesBefore = root.session.snapshotEvents().filter(event => event.type === 'goal/change').length - const result = await execute(ctx, 'update_goal', { - goal_id: goal.id, - revision: goal.revision, - action, - objective: 'replacement objective', - max_goal_rounds: 12, - blocked_reason: 'a concrete blocker', - }, root.agent) - const expected = { - objective: action === 'edit' ? 'replacement objective' : 'keep this objective', - maxGoalRounds: action === 'edit' ? 12 : 4, - revision: goal.revision + 1, - phase: action === 'pause' ? 'paused' : action === 'complete' || action === 'blocked' ? action : 'active', - } - expect(resultGoal(result)).toMatchObject(expected) - expect(ctx.goals.get(root.agent)).toMatchObject(expected) - expect(ctx.goals.get(root.agent)?.blockedReason).toEqual(action === 'blocked' - ? { code: 'model-reported', message: 'a concrete blocker' } - : undefined) - expect(root.session.snapshotEvents().filter(event => event.type === 'goal/change')).toHaveLength(changesBefore + 1) - } finally { - await ctx.fiber.dispose() + openTurn(root, { kind: 'user' }) + const goal = ctx.goals.create(root.agent, { objective: 'keep this objective', maxGoalRounds: 4 }) + if (action === 'resume') ctx.goals.disarm(root.agent) + const changesBefore = root.session.snapshotEvents().filter(event => event.type === 'goal/change').length + const result = await execute(ctx, 'update_goal', { + goal_id: goal.id, + revision: goal.revision, + action, + objective: 'replacement objective', + max_goal_rounds: 12, + blocked_reason: 'a concrete blocker', + }, root.agent) + const expected = { + objective: action === 'edit' ? 'replacement objective' : 'keep this objective', + maxGoalRounds: action === 'edit' ? 12 : 4, + revision: goal.revision + 1, + phase: action === 'pause' ? 'paused' : action === 'complete' || action === 'blocked' ? action : 'active', } + expect(resultGoal(result)).toMatchObject(expected) + expect(ctx.goals.get(root.agent)).toMatchObject(expected) + expect(ctx.goals.get(root.agent)?.blockedReason).toEqual(action === 'blocked' + ? { code: 'model-reported', message: 'a concrete blocker' } + : undefined) + expect(root.session.snapshotEvents().filter(event => event.type === 'goal/change')).toHaveLength(changesBefore + 1) }, ) diff --git a/packages/shell/tool-bash/src/index.ts b/packages/shell/tool-bash/src/index.ts index 7e1f6227e2..c94923cb5c 100644 --- a/packages/shell/tool-bash/src/index.ts +++ b/packages/shell/tool-bash/src/index.ts @@ -262,11 +262,13 @@ export function apply(ctx: Context, config: Config = {}): void { sandbox_permissions: { type: 'string' as const, enum: [...escalationModes], - description: '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.', + description: 'Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. ' + + 'A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.', }, 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: 'Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions ' + + 'is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions.', }, } : {}, }, diff --git a/packages/shell/tool-pwsh/src/index.ts b/packages/shell/tool-pwsh/src/index.ts index bbb266ba38..ff667c8a50 100644 --- a/packages/shell/tool-pwsh/src/index.ts +++ b/packages/shell/tool-pwsh/src/index.ts @@ -95,8 +95,6 @@ function validatePwshArgs(args: PwshToolArgs): void { if (args.timeoutMs !== undefined && (!Number.isFinite(args.timeoutMs) || args.timeoutMs <= 0)) { throw new Error(`invalid timeoutMs: expected a positive number, got ${JSON.stringify(args.timeoutMs)}`) } - // The escalation pairing (sandbox_permissions ⇔ justification, non-empty) is - // the shared rule both enforcing families validate identically. validateEscalationArgs(args.sandbox_permissions, args.justification) } /* jscpd:ignore-end */ diff --git a/snapshots/sdk/bash-tool/tool-schemas.expected.json b/snapshots/sdk/bash-tool/tool-schemas.expected.json index af58f05832..26bdf52fe2 100644 --- a/snapshots/sdk/bash-tool/tool-schemas.expected.json +++ b/snapshots/sdk/bash-tool/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 e889e27e18..c3b5317aab 100644 --- a/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 e889e27e18..c3b5317aab 100644 --- a/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json b/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json index e889e27e18..c3b5317aab 100644 --- a/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 a17808e30c..0e68d6d866 100644 --- a/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json +++ b/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -646,7 +646,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 bf856eedd4..73ff9706cd 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 @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -596,7 +596,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 2ff33ac78d..a8b0bf6393 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 @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -621,7 +621,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 e889e27e18..c3b5317aab 100644 --- a/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 e889e27e18..c3b5317aab 100644 --- a/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json +++ b/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/sdk/text-turn/tool-schemas.expected.json b/snapshots/sdk/text-turn/tool-schemas.expected.json index af58f05832..26bdf52fe2 100644 --- a/snapshots/sdk/text-turn/tool-schemas.expected.json +++ b/snapshots/sdk/text-turn/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/agent-instructions/tool-schemas.expected.json b/snapshots/session/agent-instructions/tool-schemas.expected.json index 86fd6cf68d..f5b6040074 100644 --- a/snapshots/session/agent-instructions/tool-schemas.expected.json +++ b/snapshots/session/agent-instructions/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -640,7 +640,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -648,7 +648,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -701,7 +701,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -709,7 +709,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -1204,7 +1204,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -1212,7 +1212,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/background-confinement-failure/tool-schemas.expected.json b/snapshots/session/background-confinement-failure/tool-schemas.expected.json index e889e27e18..c3b5317aab 100644 --- a/snapshots/session/background-confinement-failure/tool-schemas.expected.json +++ b/snapshots/session/background-confinement-failure/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/both-mode-turn/system-prompt.expected.md b/snapshots/session/both-mode-turn/system-prompt.expected.md index 877f420ae9..9af8c86327 100644 --- a/snapshots/session/both-mode-turn/system-prompt.expected.md +++ b/snapshots/session/both-mode-turn/system-prompt.expected.md @@ -60,9 +60,9 @@ interface ToolArgsMap { workdir?: string; /** Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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. */ @@ -82,9 +82,9 @@ interface ToolArgsMap { new_string: string; /** Replace all matches. Defaults to false; when false, old_string must appear exactly once. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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. */ @@ -248,9 +248,9 @@ interface ToolArgsMap { file_path: string; /** Full UTF-8 text content to write. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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 f6c26273bd..c005e393fb 100644 --- a/snapshots/session/both-mode-turn/tool-schemas.expected.json +++ b/snapshots/session/both-mode-turn/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -629,7 +629,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -637,7 +637,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 d59e7ad3c7..147c75cf5a 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 @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -699,7 +699,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -707,7 +707,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 61c4891f39..d4755a55bb 100644 --- a/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json +++ b/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -701,7 +701,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -709,7 +709,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 d5658e1a12..85a9106549 100644 --- a/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json +++ b/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -805,7 +805,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -813,7 +813,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/compaction-recovery/tool-schemas.expected.json b/snapshots/session/compaction-recovery/tool-schemas.expected.json index 86fd6cf68d..f5b6040074 100644 --- a/snapshots/session/compaction-recovery/tool-schemas.expected.json +++ b/snapshots/session/compaction-recovery/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -640,7 +640,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -648,7 +648,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -701,7 +701,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -709,7 +709,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -1204,7 +1204,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -1212,7 +1212,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 9d92e8f413..731ba7a512 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 @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -678,7 +678,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -686,7 +686,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 9f1676eec1..6a58a15838 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 @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -135,7 +135,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -638,7 +638,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -646,7 +646,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/cordis-inspect-jsdoc/system-prompt.expected.md b/snapshots/session/cordis-inspect-jsdoc/system-prompt.expected.md index 5a98a377d2..42bc796fdf 100644 --- a/snapshots/session/cordis-inspect-jsdoc/system-prompt.expected.md +++ b/snapshots/session/cordis-inspect-jsdoc/system-prompt.expected.md @@ -60,9 +60,9 @@ interface ToolArgsMap { workdir?: string; /** Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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. */ @@ -95,9 +95,9 @@ interface ToolArgsMap { new_string: string; /** Replace all matches. Defaults to false; when false, old_string must appear exactly once. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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. */ @@ -261,9 +261,9 @@ interface ToolArgsMap { file_path: string; /** Full UTF-8 text content to write. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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 3936f423d2..c17a1ceb5a 100644 --- a/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json +++ b/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -130,7 +130,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -670,7 +670,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -678,7 +678,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 e889e27e18..c3b5317aab 100644 --- a/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json +++ b/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 e889e27e18..c3b5317aab 100644 --- a/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json +++ b/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json b/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json index e889e27e18..c3b5317aab 100644 --- a/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json +++ b/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/fs-glob-sampling/tool-schemas.expected.json b/snapshots/session/fs-glob-sampling/tool-schemas.expected.json index 1106ebbe40..8c4f4d9763 100644 --- a/snapshots/session/fs-glob-sampling/tool-schemas.expected.json +++ b/snapshots/session/fs-glob-sampling/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -69,7 +69,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -451,7 +451,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -459,7 +459,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/lsp-definition/tool-schemas.expected.json b/snapshots/session/lsp-definition/tool-schemas.expected.json index 3e143e3d29..0376c5d875 100644 --- a/snapshots/session/lsp-definition/tool-schemas.expected.json +++ b/snapshots/session/lsp-definition/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -629,7 +629,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -637,7 +637,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/mcp-resources-ptc/system-prompt.expected.md b/snapshots/session/mcp-resources-ptc/system-prompt.expected.md index cb95c5d647..8d4bbf0294 100644 --- a/snapshots/session/mcp-resources-ptc/system-prompt.expected.md +++ b/snapshots/session/mcp-resources-ptc/system-prompt.expected.md @@ -70,9 +70,9 @@ interface ToolArgsMap { workdir?: string; /** Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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. */ @@ -92,9 +92,9 @@ interface ToolArgsMap { new_string: string; /** Replace all matches. Defaults to false; when false, old_string must appear exactly once. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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. */ @@ -279,9 +279,9 @@ interface ToolArgsMap { file_path: string; /** Full UTF-8 text content to write. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ justification?: string; } & Record; } diff --git a/snapshots/session/mcp-resources/tool-schemas.expected.json b/snapshots/session/mcp-resources/tool-schemas.expected.json index 42f12ff7ce..fed7ead7a8 100644 --- a/snapshots/session/mcp-resources/tool-schemas.expected.json +++ b/snapshots/session/mcp-resources/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -653,7 +653,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -661,7 +661,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 863f729ecd..a243d5e081 100644 --- a/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json +++ b/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json @@ -24,7 +24,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -422,7 +422,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -430,7 +430,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json b/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json index d7bfdde337..d48718c647 100644 --- a/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json +++ b/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -643,7 +643,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -651,7 +651,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -691,7 +691,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -699,7 +699,7 @@ }, "justification": { "type": "string", - "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access." + "description": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -752,7 +752,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -760,7 +760,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -1376,7 +1376,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -1384,7 +1384,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/plugin-manager/tool-schemas.expected.json b/snapshots/session/plugin-manager/tool-schemas.expected.json index f3e5ad3709..efad53afd2 100644 --- a/snapshots/session/plugin-manager/tool-schemas.expected.json +++ b/snapshots/session/plugin-manager/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -643,7 +643,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -651,7 +651,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/product-subagent-both/tool-schemas.expected.json b/snapshots/session/product-subagent-both/tool-schemas.expected.json index 6dceb42b45..0174572b47 100644 --- a/snapshots/session/product-subagent-both/tool-schemas.expected.json +++ b/snapshots/session/product-subagent-both/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -692,7 +692,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -700,7 +700,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/product-subagent-codex/tool-schemas.expected.json b/snapshots/session/product-subagent-codex/tool-schemas.expected.json index 75d11a3c8d..4fbf40b1e1 100644 --- a/snapshots/session/product-subagent-codex/tool-schemas.expected.json +++ b/snapshots/session/product-subagent-codex/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -642,7 +642,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 8002ca0414..decb5d0667 100644 --- a/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json +++ b/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -617,7 +617,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -625,7 +625,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/provider-cwd/tool-schemas.expected.json b/snapshots/session/provider-cwd/tool-schemas.expected.json index e889e27e18..c3b5317aab 100644 --- a/snapshots/session/provider-cwd/tool-schemas.expected.json +++ b/snapshots/session/provider-cwd/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 57d91d0bb8..82382e60f9 100644 --- a/snapshots/session/ptc-node-read-only/system-prompt.expected.md +++ b/snapshots/session/ptc-node-read-only/system-prompt.expected.md @@ -62,9 +62,9 @@ interface ToolArgsMap { workdir?: string; /** Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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,9 +84,9 @@ interface ToolArgsMap { new_string: string; /** Replace all matches. Defaults to false; when false, old_string must appear exactly once. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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,9 +254,9 @@ interface ToolArgsMap { file_path: string; /** Full UTF-8 text content to write. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ justification?: string; } & Record; } diff --git a/snapshots/session/ptc-node-workspace/system-prompt.expected.md b/snapshots/session/ptc-node-workspace/system-prompt.expected.md index 57d91d0bb8..82382e60f9 100644 --- a/snapshots/session/ptc-node-workspace/system-prompt.expected.md +++ b/snapshots/session/ptc-node-workspace/system-prompt.expected.md @@ -62,9 +62,9 @@ interface ToolArgsMap { workdir?: string; /** Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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,9 +84,9 @@ interface ToolArgsMap { new_string: string; /** Replace all matches. Defaults to false; when false, old_string must appear exactly once. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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,9 +254,9 @@ interface ToolArgsMap { file_path: string; /** Full UTF-8 text content to write. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ justification?: string; } & Record; } diff --git a/snapshots/session/ptc-python-turn/system-prompt.expected.md b/snapshots/session/ptc-python-turn/system-prompt.expected.md index 99dcad198e..a44003cf08 100644 --- a/snapshots/session/ptc-python-turn/system-prompt.expected.md +++ b/snapshots/session/ptc-python-turn/system-prompt.expected.md @@ -57,9 +57,9 @@ class BashArgs(TypedDict): workdir: NotRequired[str] # Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. 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. + # Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. + # Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. justification: NotRequired[str] # Additional keys beyond those declared are allowed. @@ -130,9 +130,9 @@ class EditArgs(TypedDict): new_string: str # Replace all matches. Defaults to false; when false, old_string must appear exactly once. 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. + # Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. + # Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. justification: NotRequired[str] # Additional keys beyond those declared are allowed. @@ -491,9 +491,9 @@ class WriteArgs(TypedDict): file_path: str # Full UTF-8 text content to write. 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. + # Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. + # Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. 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 81042ef1cd..cce4944cd0 100644 --- a/snapshots/session/ptc-read-image/system-prompt.expected.md +++ b/snapshots/session/ptc-read-image/system-prompt.expected.md @@ -62,9 +62,9 @@ interface ToolArgsMap { workdir?: string; /** Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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,9 +84,9 @@ interface ToolArgsMap { new_string: string; /** Replace all matches. Defaults to false; when false, old_string must appear exactly once. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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. */ @@ -250,9 +250,9 @@ interface ToolArgsMap { file_path: string; /** Full UTF-8 text content to write. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ justification?: string; } & Record; } diff --git a/snapshots/session/ptc-turn/system-prompt.expected.md b/snapshots/session/ptc-turn/system-prompt.expected.md index 57d91d0bb8..82382e60f9 100644 --- a/snapshots/session/ptc-turn/system-prompt.expected.md +++ b/snapshots/session/ptc-turn/system-prompt.expected.md @@ -62,9 +62,9 @@ interface ToolArgsMap { workdir?: string; /** Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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,9 +84,9 @@ interface ToolArgsMap { new_string: string; /** Replace all matches. Defaults to false; when false, old_string must appear exactly once. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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,9 +254,9 @@ interface ToolArgsMap { file_path: string; /** Full UTF-8 text content to write. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ justification?: string; } & Record; } 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 ffc24844fe..3fb4e09919 100644 --- a/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json +++ b/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -721,7 +721,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -729,7 +729,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json b/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json index 5002d370b8..07e283e495 100644 --- a/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json +++ b/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json @@ -24,7 +24,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -503,7 +503,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -511,7 +511,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/ralph-loop/tool-schemas.1.expected.json b/snapshots/session/ralph-loop/tool-schemas.1.expected.json index 4c3b83d53e..1ccff64d01 100644 --- a/snapshots/session/ralph-loop/tool-schemas.1.expected.json +++ b/snapshots/session/ralph-loop/tool-schemas.1.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -655,7 +655,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -663,7 +663,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/ralph-loop/tool-schemas.2.expected.json b/snapshots/session/ralph-loop/tool-schemas.2.expected.json index 4c3b83d53e..1ccff64d01 100644 --- a/snapshots/session/ralph-loop/tool-schemas.2.expected.json +++ b/snapshots/session/ralph-loop/tool-schemas.2.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -655,7 +655,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -663,7 +663,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/ralph-loop/tool-schemas.expected.json b/snapshots/session/ralph-loop/tool-schemas.expected.json index 265132aa2c..b76c5d9998 100644 --- a/snapshots/session/ralph-loop/tool-schemas.expected.json +++ b/snapshots/session/ralph-loop/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -612,7 +612,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -620,7 +620,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/session-query-spill/tool-schemas.expected.json b/snapshots/session/session-query-spill/tool-schemas.expected.json index 8d40a13bbe..70cd979900 100644 --- a/snapshots/session/session-query-spill/tool-schemas.expected.json +++ b/snapshots/session/session-query-spill/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -796,7 +796,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -804,7 +804,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json b/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json index db507436cc..adba1f8db2 100644 --- a/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json +++ b/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -617,7 +617,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -625,7 +625,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 376fd88904..5050a8e6c1 100644 --- a/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json +++ b/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json @@ -91,7 +91,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -152,7 +152,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -655,7 +655,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -663,7 +663,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 72c03b7d67..6de9d9a7eb 100644 --- a/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json +++ b/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "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 e889e27e18..c3b5317aab 100644 --- a/snapshots/session/system-prompt-in-history/tool-schemas.expected.json +++ b/snapshots/session/system-prompt-in-history/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/team-targets/tool-schemas.expected.json b/snapshots/session/team-targets/tool-schemas.expected.json index 13b2a5d95d..e3de55bfdb 100644 --- a/snapshots/session/team-targets/tool-schemas.expected.json +++ b/snapshots/session/team-targets/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -731,7 +731,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -739,7 +739,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/text-turn/tool-schemas.expected.json b/snapshots/session/text-turn/tool-schemas.expected.json index e889e27e18..c3b5317aab 100644 --- a/snapshots/session/text-turn/tool-schemas.expected.json +++ b/snapshots/session/text-turn/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/web-fetch/tool-schemas.expected.json b/snapshots/session/web-fetch/tool-schemas.expected.json index 82fe18be28..a4a1d2fca1 100644 --- a/snapshots/session/web-fetch/tool-schemas.expected.json +++ b/snapshots/session/web-fetch/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -573,7 +573,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -581,7 +581,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/workflow-confinement/tool-schemas.expected.json b/snapshots/session/workflow-confinement/tool-schemas.expected.json index e889e27e18..c3b5317aab 100644 --- a/snapshots/session/workflow-confinement/tool-schemas.expected.json +++ b/snapshots/session/workflow-confinement/tool-schemas.expected.json @@ -28,7 +28,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -89,7 +89,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -592,7 +592,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -600,7 +600,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/session/workspace-dependencies/tool-schemas.expected.json b/snapshots/session/workspace-dependencies/tool-schemas.expected.json index 89f643a926..21884893da 100644 --- a/snapshots/session/workspace-dependencies/tool-schemas.expected.json +++ b/snapshots/session/workspace-dependencies/tool-schemas.expected.json @@ -44,7 +44,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -555,7 +555,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -563,7 +563,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/web/cordis-tool-round/tool-schemas.expected.json b/snapshots/web/cordis-tool-round/tool-schemas.expected.json index ffdda04759..b00a87b3c8 100644 --- a/snapshots/web/cordis-tool-round/tool-schemas.expected.json +++ b/snapshots/web/cordis-tool-round/tool-schemas.expected.json @@ -91,7 +91,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -349,7 +349,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -357,7 +357,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -888,7 +888,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -896,7 +896,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/web/fresh-round-trip/tool-schemas.expected.json b/snapshots/web/fresh-round-trip/tool-schemas.expected.json index fcda43dc6e..5085a3c000 100644 --- a/snapshots/web/fresh-round-trip/tool-schemas.expected.json +++ b/snapshots/web/fresh-round-trip/tool-schemas.expected.json @@ -91,7 +91,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -152,7 +152,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -691,7 +691,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -699,7 +699,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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/web/ptc-round/system-prompt.expected.md b/snapshots/web/ptc-round/system-prompt.expected.md index 6528103554..b352dc82e1 100644 --- a/snapshots/web/ptc-round/system-prompt.expected.md +++ b/snapshots/web/ptc-round/system-prompt.expected.md @@ -82,9 +82,9 @@ interface ToolArgsMap { workdir?: string; /** Run in the background and return a job id immediately (collect with job_output, stop with job_kill). No timeout applies. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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. */ @@ -104,9 +104,9 @@ interface ToolArgsMap { new_string: string; /** Replace all matches. Defaults to false; when false, old_string must appear exactly once. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ 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,9 +254,9 @@ interface ToolArgsMap { file_path: string; /** Full UTF-8 text content to write. */ 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. */ + /** Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty 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. */ + /** Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions. */ justification?: string; } & Record; } diff --git a/snapshots/web/schedule-catalog/tool-schemas.expected.json b/snapshots/web/schedule-catalog/tool-schemas.expected.json index ead1129537..2b538cf770 100644 --- a/snapshots/web/schedule-catalog/tool-schemas.expected.json +++ b/snapshots/web/schedule-catalog/tool-schemas.expected.json @@ -91,7 +91,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact command was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -152,7 +152,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ @@ -735,7 +735,7 @@ }, "sandbox_permissions": { "type": "string", - "description": "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.", + "description": "Requested sandbox mode. Repeating the effective mode needs no approval; narrower modes are rejected. A wider mode is only valid for a one-shot retry after this exact file operation was denied and requires a non-empty justification and user approval.", "enum": [ "workspace-write", "danger-full-access" @@ -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": "Non-empty, one-sentence reason for a different sandbox mode. May be omitted or blank when sandbox_permissions is omitted or repeats the effective mode; a non-empty reason requires sandbox_permissions." } }, "required": [ diff --git a/snapshots/web/search-empty-include/snapshot.yml b/snapshots/web/search-empty-include/snapshot.yml new file mode 100644 index 0000000000..2c82b7d7bd --- /dev/null +++ b/snapshots/web/search-empty-include/snapshot.yml @@ -0,0 +1,9 @@ +version: 1 +scenario: search-empty-include +profile: web +composition: default +recording: authored +header: + class: default +session: + source: ../../session/toolcall-unused-args/session.v4.jsonl diff --git a/snapshots/web/search-empty-include/ui.expected.md b/snapshots/web/search-empty-include/ui.expected.md new file mode 100644 index 0000000000..361bf41e47 --- /dev/null +++ b/snapshots/web/search-empty-include/ui.expected.md @@ -0,0 +1,12 @@ +- button "Grep marker" [expanded] +- text: 1 matches · 1 files +- button "Copy" +- button "seed/example.ts 1" [expanded] +- text: "1: export const marker = 'typescript';" +- button "Inspect" +- button "Grep marker" [expanded] +- text: 1 matches · 1 files +- button "Copy" +- button "seed/example.md 1" [expanded] +- text: "1: marker in markdown" +- button "Inspect" diff --git a/tsconfig.host.json b/tsconfig.host.json index 30dc0ea0bf..916657dd4f 100644 --- a/tsconfig.host.json +++ b/tsconfig.host.json @@ -12,6 +12,7 @@ "apps/web/product-isolation.ts", "apps/web/tests/default-product-isolation.e2e.ts", "apps/web/tests/diff-context.e2e.ts", + "apps/web/tests/search-empty-include.e2e.ts", "apps/web/tests/scaffold.ts", "apps/web/tests/prefix-proxy.ts", "apps/web/tests/developer-tools-settings.e2e.ts",