tool-schemas.expected.json 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. {
  2. "initial": [
  3. {
  4. "name": "ask_user_question",
  5. "description": "Ask the user a concise question when you need confirmation, a choice, or missing information before proceeding. Send one or more questions, each with a stable id that will be echoed in the answer.",
  6. "parameters": {
  7. "type": "object",
  8. "properties": {
  9. "questions": {
  10. "type": "array",
  11. "description": "Questions to ask the user before continuing.",
  12. "items": {
  13. "type": "object",
  14. "additionalProperties": true,
  15. "properties": {
  16. "id": {
  17. "type": "string",
  18. "description": "Stable id for this question; echoed in the answer."
  19. },
  20. "question": {
  21. "type": "string",
  22. "description": "The specific question to ask the user."
  23. },
  24. "header": {
  25. "type": "string",
  26. "description": "Optional short heading for the question, such as \"Confirm\" or \"Choose Mode\"."
  27. },
  28. "options": {
  29. "type": "array",
  30. "description": "Optional choices to show the user. If you recommend one, put it first and append \"(Recommended)\" to that label.",
  31. "items": {
  32. "type": "object",
  33. "additionalProperties": true,
  34. "properties": {
  35. "label": {
  36. "type": "string",
  37. "description": "Short user-facing option label."
  38. },
  39. "description": {
  40. "type": "string",
  41. "description": "One sentence explaining the tradeoff or impact."
  42. }
  43. },
  44. "required": [
  45. "label"
  46. ]
  47. }
  48. },
  49. "multi_select": {
  50. "type": "boolean",
  51. "description": "Whether the user may select more than one option. Defaults to false."
  52. }
  53. },
  54. "required": [
  55. "id",
  56. "question"
  57. ]
  58. }
  59. }
  60. },
  61. "required": [
  62. "questions"
  63. ]
  64. }
  65. },
  66. {
  67. "name": "bash",
  68. "description": "Execute a bash command (`bash -c`) and return its stdout/stderr. Each call runs in a fresh shell: no state (cwd, variables, functions) persists between calls — pass `workdir` instead of using `cd`. Non-zero exits are reported as `[exit code: N]`. Current harness environment facts are exposed through managed `$DSH_*` variables; inspect them when needed. Commands may run under a file sandbox; a blocked file operation is reported as `[sandbox: file access denied under <mode> mode]` — a policy denial, not a bug in the command; do not retry another way. Long output is truncated to its tail; the full output is saved to a file whose path is reported when available. Set `run_in_background: true` for long-running commands: the call returns a task id immediately; read its output with `task_output` and stop it with `task_kill`. Attempting a command the sandbox may deny is safe and expected: run it and read the marker rather than assuming the denial. When a command is denied and a wider mode would let it succeed, escalate immediately in the same turn — the one sanctioned exception to a denial: retry the exact same command once with `sandbox_permissions` (the narrowest wider mode that suffices) plus a one-sentence `justification`. Do not detour through chat to ask permission first — the approval prompt raised by that retry is how the user consents. If the session states approval prompts are disabled, there is no exception: a denial is final — do not set `sandbox_permissions`. Never escalate speculatively: ground the request in a real denial — normally the one this command just hit; escalating up front is fine only when this session already denied the same access. A rejected escalation is final for that command — stop and explain, never work around it — but it does not forbid attempting or escalating other commands later.",
  69. "parameters": {
  70. "type": "object",
  71. "properties": {
  72. "command": {
  73. "type": "string",
  74. "description": "The bash command to execute."
  75. },
  76. "description": {
  77. "type": "string",
  78. "description": "Clear, concise description of what this command does in active voice, 5-10 words (shown in the UI). Examples: \"ls\" → \"List files in current directory\"; \"git status\" → \"Show working tree status\"; \"npm install\" → \"Install package dependencies\"."
  79. },
  80. "timeoutMs": {
  81. "type": "number",
  82. "description": "Timeout in milliseconds. The executor applies its configured default and cap, and kills the command on expiry."
  83. },
  84. "workdir": {
  85. "type": "string",
  86. "description": "Working directory for this command. Defaults to the session workspace; a relative path is resolved against it."
  87. },
  88. "run_in_background": {
  89. "type": "boolean",
  90. "description": "Run in the background and return a task id immediately (collect with task_output, stop with task_kill). No timeout applies."
  91. },
  92. "sandbox_permissions": {
  93. "type": "string",
  94. "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.",
  95. "enum": [
  96. "workspace-write",
  97. "danger-full-access"
  98. ]
  99. },
  100. "justification": {
  101. "type": "string",
  102. "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact command needs the wider access."
  103. }
  104. },
  105. "required": [
  106. "command",
  107. "description"
  108. ]
  109. }
  110. },
  111. {
  112. "name": "create_goal",
  113. "description": "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.",
  114. "parameters": {
  115. "type": "object",
  116. "properties": {
  117. "objective": {
  118. "type": "string",
  119. "description": "The concrete completion objective inferred from the direct human request."
  120. },
  121. "max_goal_rounds": {
  122. "type": "number",
  123. "description": "Optional positive safe-integer limit on automatic continuation rounds."
  124. }
  125. },
  126. "required": [
  127. "objective"
  128. ]
  129. }
  130. },
  131. {
  132. "name": "edit",
  133. "description": "Edit an existing UTF-8 text file by replacing literal text.",
  134. "parameters": {
  135. "type": "object",
  136. "properties": {
  137. "file_path": {
  138. "type": "string",
  139. "description": "Path to edit, resolved by the filesystem backend."
  140. },
  141. "old_string": {
  142. "type": "string",
  143. "description": "Literal text to replace. Must match exactly."
  144. },
  145. "new_string": {
  146. "type": "string",
  147. "description": "Literal replacement text. Use an empty string to delete the match."
  148. },
  149. "replace_all": {
  150. "type": "boolean",
  151. "description": "Replace all matches. Defaults to false; when false, old_string must appear exactly once."
  152. },
  153. "sandbox_permissions": {
  154. "type": "string",
  155. "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.",
  156. "enum": [
  157. "workspace-write",
  158. "danger-full-access"
  159. ]
  160. },
  161. "justification": {
  162. "type": "string",
  163. "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access."
  164. }
  165. },
  166. "required": [
  167. "file_path",
  168. "old_string",
  169. "new_string"
  170. ]
  171. }
  172. },
  173. {
  174. "name": "exit_plan_mode",
  175. "description": "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.",
  176. "parameters": {
  177. "type": "object",
  178. "properties": {
  179. "plan": {
  180. "type": "string",
  181. "description": "The complete plan, as markdown, starting with a # heading that names it."
  182. }
  183. },
  184. "required": [
  185. "plan"
  186. ]
  187. }
  188. },
  189. {
  190. "name": "get_goal",
  191. "description": "Read the current same-session goal, including its exact id/revision, objective, phase, completed continuation rounds, round limit, blocker reason when present, and whether another continuation is armed. Call this before updating a goal.",
  192. "parameters": {
  193. "type": "object",
  194. "properties": {}
  195. }
  196. },
  197. {
  198. "name": "ralph",
  199. "description": "Run a foreground fresh-agent Ralph loop toward one immutable objective. Use only when the direct human explicitly asks for Ralph or fresh-agent iteration. Each round opens a new child with no parent conversation or prior child session; the shared workspace is long-term memory, and only a bounded structured report crosses rounds. The call returns when a worker reports completion or a concrete blocker, or at the round limit. Ordinary long-running same-session work belongs to goal tools.",
  200. "parameters": {
  201. "type": "object",
  202. "properties": {
  203. "objective": {
  204. "type": "string",
  205. "description": "The immutable completion objective for every fresh Ralph round."
  206. },
  207. "maxRounds": {
  208. "type": "number",
  209. "description": "Optional positive safe-integer round cap, bounded by the deployment ceiling."
  210. }
  211. },
  212. "required": [
  213. "objective"
  214. ]
  215. }
  216. },
  217. {
  218. "name": "read",
  219. "description": "Read a UTF-8 text file and return line-numbered content.",
  220. "parameters": {
  221. "type": "object",
  222. "properties": {
  223. "file_path": {
  224. "type": "string",
  225. "description": "Path to read, resolved by the filesystem backend."
  226. },
  227. "offset": {
  228. "type": "number",
  229. "description": "1-based first line to return. Defaults to 1."
  230. },
  231. "limit": {
  232. "type": "number",
  233. "description": "Maximum number of lines to return. Defaults to 2000."
  234. }
  235. },
  236. "required": [
  237. "file_path"
  238. ]
  239. }
  240. },
  241. {
  242. "name": "skill",
  243. "description": "Load the full instructions for an available skill. Call this with the exact skill name from the session skill catalog before acting on a task that names or clearly matches that skill.",
  244. "parameters": {
  245. "type": "object",
  246. "properties": {
  247. "name": {
  248. "type": "string",
  249. "description": "The exact skill name from the available skills list."
  250. }
  251. },
  252. "required": [
  253. "name"
  254. ]
  255. }
  256. },
  257. {
  258. "name": "subagent",
  259. "description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) and return its final result. Use this to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent runs to completion and you receive only its final answer, not its intermediate steps. Give it a complete, standalone prompt: it does not see this conversation. Set `run_in_background: true` to return a task id; collect with `task_output` and stop with `task_kill`.",
  260. "parameters": {
  261. "type": "object",
  262. "properties": {
  263. "description": {
  264. "type": "string",
  265. "description": "A short (3-5 word) description of the delegated task, for display."
  266. },
  267. "prompt": {
  268. "type": "string",
  269. "description": "The complete, self-contained task for the subagent. It does not share this conversation's context, so include everything it needs."
  270. },
  271. "run_in_background": {
  272. "type": "boolean",
  273. "description": "Run as a background task and return its id; collect with task_output or stop with task_kill."
  274. }
  275. },
  276. "required": [
  277. "description",
  278. "prompt"
  279. ]
  280. }
  281. },
  282. {
  283. "name": "subagent_fork",
  284. "description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn), returning only its final result. Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive only its final answer, not its intermediate steps. Set `run_in_background: true` to return a task id; collect with `task_output` and stop with `task_kill`.",
  285. "parameters": {
  286. "type": "object",
  287. "properties": {
  288. "description": {
  289. "type": "string",
  290. "description": "A short (3-5 word) description of the delegated task, for display."
  291. },
  292. "prompt": {
  293. "type": "string",
  294. "description": "The task for the subagent. It already sees this conversation's completed turns, so build on them freely and state only what is new."
  295. },
  296. "run_in_background": {
  297. "type": "boolean",
  298. "description": "Run as a background task and return its id; collect with task_output or stop with task_kill."
  299. }
  300. },
  301. "required": [
  302. "description",
  303. "prompt"
  304. ]
  305. }
  306. },
  307. {
  308. "name": "task_kill",
  309. "description": "Request cancellation of a running background task by task id. Returns immediately; the task settles as killed once its work actually stops.",
  310. "parameters": {
  311. "type": "object",
  312. "properties": {
  313. "task_id": {
  314. "type": "string",
  315. "description": "Task id returned by the tool that started the background work."
  316. },
  317. "reason": {
  318. "type": "string",
  319. "description": "Optional short reason, recorded in the log and forwarded to the task."
  320. }
  321. },
  322. "required": [
  323. "task_id"
  324. ]
  325. }
  326. },
  327. {
  328. "name": "task_list",
  329. "description": "List your background tasks (running and finished) with their ids, kinds, and statuses.",
  330. "parameters": {
  331. "type": "object",
  332. "properties": {}
  333. }
  334. },
  335. {
  336. "name": "task_output",
  337. "description": "Read a background task. Stream tasks return only output since the previous read; final-output tasks return their result after settlement. Every response ends with `[status: ...]`. Reads are non-blocking unless `wait: true`, which waits up to the configured cap.",
  338. "parameters": {
  339. "type": "object",
  340. "properties": {
  341. "task_id": {
  342. "type": "string",
  343. "description": "Task id returned by the tool that started the background work."
  344. },
  345. "wait": {
  346. "type": "boolean",
  347. "description": "Block until the task reaches a terminal status or the timeout expires. A timed-out wait returns [status: running] and leaves the task alive."
  348. },
  349. "timeout_ms": {
  350. "type": "number",
  351. "description": "Max wait in milliseconds (only meaningful with wait: true). Defaults to the configured wait timeout; capped by the configured maximum."
  352. }
  353. },
  354. "required": [
  355. "task_id"
  356. ]
  357. }
  358. },
  359. {
  360. "name": "terminal_close",
  361. "description": "Close one persistent terminal and wait until its captured owned process tree is gone.",
  362. "parameters": {
  363. "type": "object",
  364. "properties": {
  365. "sessionId": {
  366. "type": "string",
  367. "description": "Terminal session id."
  368. }
  369. },
  370. "required": [
  371. "sessionId"
  372. ]
  373. }
  374. },
  375. {
  376. "name": "terminal_list",
  377. "description": "List persistent terminal sessions owned by the current agent.",
  378. "parameters": {
  379. "type": "object",
  380. "properties": {}
  381. }
  382. },
  383. {
  384. "name": "terminal_open",
  385. "description": "Create a persistent, owner-isolated terminal session from a registered backend type. Use this for shell or REPL state that must survive across tool calls.",
  386. "parameters": {
  387. "type": "object",
  388. "properties": {
  389. "type": {
  390. "type": "string",
  391. "description": "Registered terminal backend type, usually \"shell\"."
  392. },
  393. "name": {
  394. "type": "string",
  395. "description": "Optional owner-local display name such as \"main\" or \"gdb\"."
  396. },
  397. "cwd": {
  398. "type": "string",
  399. "description": "Initial working directory. Defaults to the deployment workspace root."
  400. }
  401. },
  402. "required": [
  403. "type"
  404. ]
  405. }
  406. },
  407. {
  408. "name": "terminal_read",
  409. "description": "Read a bounded page of retained output from a persistent terminal without sending input.",
  410. "parameters": {
  411. "type": "object",
  412. "properties": {
  413. "sessionId": {
  414. "type": "string",
  415. "description": "Terminal session id."
  416. },
  417. "offset": {
  418. "type": "number",
  419. "description": "Newest-relative line offset (default 0)."
  420. },
  421. "count": {
  422. "type": "number",
  423. "description": "Requested line count (default 500; backend caps apply)."
  424. }
  425. },
  426. "required": [
  427. "sessionId"
  428. ]
  429. }
  430. },
  431. {
  432. "name": "terminal_send",
  433. "description": "Send text to a persistent terminal. By default Enter is submitted and the call waits for a prompt, stdin wait, output silence, timeout, or session exit. Background mode returns a task id for task_output/task_kill.",
  434. "parameters": {
  435. "type": "object",
  436. "properties": {
  437. "sessionId": {
  438. "type": "string",
  439. "description": "Terminal session id returned by terminal_open or terminal_list."
  440. },
  441. "text": {
  442. "type": "string",
  443. "description": "UTF-8 text to write to the terminal."
  444. },
  445. "submit": {
  446. "type": "boolean",
  447. "description": "Submit Enter after text (default true). Set false for control characters or incomplete REPL input."
  448. },
  449. "run_in_background": {
  450. "type": "boolean",
  451. "description": "Return a task id immediately; collect with task_output or stop with task_kill."
  452. }
  453. },
  454. "required": [
  455. "sessionId",
  456. "text"
  457. ]
  458. }
  459. },
  460. {
  461. "name": "terminal_signal",
  462. "description": "Send an allowed signal to the current foreground process group of a persistent terminal.",
  463. "parameters": {
  464. "type": "object",
  465. "properties": {
  466. "sessionId": {
  467. "type": "string",
  468. "description": "Terminal session id."
  469. },
  470. "signal": {
  471. "type": "string",
  472. "description": "Signal to deliver. Shell-targeted SIGKILL is rejected; use terminal_close.",
  473. "enum": [
  474. "SIGINT",
  475. "SIGTERM",
  476. "SIGKILL",
  477. "SIGTSTP",
  478. "SIGHUP"
  479. ]
  480. }
  481. },
  482. "required": [
  483. "sessionId",
  484. "signal"
  485. ]
  486. }
  487. },
  488. {
  489. "name": "todo_write",
  490. "description": "Record and update a structured task list for the current work. Send the ENTIRE list every call — it REPLACES the previous list (there are no partial updates, no per-item edits). Use it to plan multi-step work and show progress: add one todo per concrete step before you start. Keep AT MOST ONE todo `in_progress` at a time; while work remains, exactly one active task should be `in_progress`. Mark a todo `completed` the moment it is done (do not batch completions), and allow no `in_progress` item only once all work is complete. Skip the list for trivial single-step tasks. Statuses: `pending` (not started), `in_progress` (being worked on now), `completed` (finished).",
  491. "parameters": {
  492. "type": "object",
  493. "properties": {
  494. "todos": {
  495. "type": "array",
  496. "description": "The COMPLETE task list, replacing any previous list.",
  497. "items": {
  498. "type": "object",
  499. "additionalProperties": true,
  500. "properties": {
  501. "content": {
  502. "type": "string",
  503. "description": "What the task is — a short imperative line."
  504. },
  505. "status": {
  506. "type": "string",
  507. "description": "pending (not started) | in_progress (now) | completed (done).",
  508. "enum": [
  509. "pending",
  510. "in_progress",
  511. "completed"
  512. ]
  513. }
  514. },
  515. "required": [
  516. "content",
  517. "status"
  518. ]
  519. }
  520. }
  521. },
  522. "required": [
  523. "todos"
  524. ]
  525. }
  526. },
  527. {
  528. "name": "update_goal",
  529. "description": "Update the exact current goal revision. edit, pause, and resume require a direct top-level human request. During an automatic continuation of the current goal, complete and blocked are also allowed. blocked is rejected before the configured minimum round count; the model remains responsible for judging that the same condition persisted across those rounds and must explain it in blocked_reason.",
  530. "parameters": {
  531. "type": "object",
  532. "properties": {
  533. "goal_id": {
  534. "type": "string",
  535. "description": "Exact id returned by get_goal."
  536. },
  537. "revision": {
  538. "type": "number",
  539. "description": "Exact positive revision returned by get_goal."
  540. },
  541. "action": {
  542. "type": "string",
  543. "description": "edit | pause | resume | complete | blocked",
  544. "enum": [
  545. "edit",
  546. "pause",
  547. "resume",
  548. "complete",
  549. "blocked"
  550. ]
  551. },
  552. "objective": {
  553. "type": "string",
  554. "description": "Replacement objective; valid only with action edit."
  555. },
  556. "max_goal_rounds": {
  557. "type": "number",
  558. "description": "Replacement cap; valid only with action edit."
  559. },
  560. "blocked_reason": {
  561. "type": "string",
  562. "description": "Concrete blocking condition; required only with action blocked."
  563. }
  564. },
  565. "required": [
  566. "goal_id",
  567. "revision",
  568. "action"
  569. ]
  570. }
  571. },
  572. {
  573. "name": "workflow",
  574. "description": "Run a JavaScript workflow script that orchestrates subagents at scale. Use this for work that fans out across many independent pieces — an audit over many files, a migration, multi-angle research, adversarial verification of findings — where you write the orchestration as a script instead of delegating turn by turn.\n\nThe workflow's identity rides the `meta` parameter as JSON: required `name` (short kebab-case) and `description` strings, optional `whenToUse` string and `phases` array (`{title, detail?, provider?, model?}`). The `script` parameter is the plain JavaScript body ONLY (NOT TypeScript, and NO `export const meta` statement — meta is a parameter, not code), running with top-level await; end with `return <value>` — the value must be JSON-serializable and is this tool's result.\n\nScript-body hooks:\n- `agent(prompt, opts?): Promise<any>` — run one subagent to completion. Without `opts.schema` it resolves to the child's final text; with `opts.schema` (an object-rooted JSON Schema using ONLY type/properties/required/additionalProperties/items/enum/const/oneOf — no pattern/format/numeric bounds) it resolves to the validated object. Resolves `null` when the child fails (filter with `.filter(Boolean)`). Other opts: `label` (display), `phase` (progress group), and independent `provider`/`model` LLM target overrides (either may be provided alone). Anything else (`effort`/`isolation`/`agentType`) is rejected loudly.\n- `pipeline(items, ...stages): Promise<any[]>` — run each item through the stages independently with NO barrier between stages (prefer this for multi-stage work). Each stage receives `(prev, item, index)`. An ordinary stage throw drops that ITEM to `null` and skips its remaining stages.\n- `parallel(thunks): Promise<any[]>` — run zero-argument functions concurrently and await ALL of them (a barrier; use only when a stage genuinely needs every prior result together). A throwing thunk resolves to `null`.\n- `phase(title)` — start a progress phase; `log(message)` — narrate progress; `args` — the tool call's `args` input, verbatim.\n\nMisused hooks (bad arguments, unknown options, unsupported schemas, tripped caps) throw errors that ALWAYS kill the script — they never dissolve into a per-item `null`.\n\nConstraints: concurrency and total-agent caps apply; no filesystem, network, timers, or Node.js APIs are provided — the agents do the work, the script only coordinates them. The run executes in the foreground: this call returns when the whole script finishes.",
  575. "parameters": {
  576. "type": "object",
  577. "properties": {
  578. "script": {
  579. "type": "string",
  580. "description": "The plain-JS workflow script body (top-level await allowed; NO `export const meta` statement; end with `return <json-value>`)."
  581. },
  582. "meta": {
  583. "type": "object",
  584. "description": "The workflow identity block (plain JSON — never code).",
  585. "additionalProperties": true,
  586. "properties": {
  587. "name": {
  588. "type": "string",
  589. "description": "Short kebab-case workflow name."
  590. },
  591. "description": {
  592. "type": "string",
  593. "description": "One-line description of what the workflow does."
  594. },
  595. "whenToUse": {
  596. "type": "string",
  597. "description": "Optional guidance on when this workflow applies."
  598. },
  599. "phases": {
  600. "type": "array",
  601. "description": "Optional phase declarations matched by phase() calls.",
  602. "items": {
  603. "type": "object",
  604. "additionalProperties": true,
  605. "properties": {
  606. "title": {
  607. "type": "string",
  608. "description": "The phase title phase() calls match by exact string."
  609. },
  610. "detail": {
  611. "type": "string",
  612. "description": "Optional one-line description of the phase."
  613. },
  614. "provider": {
  615. "type": "string",
  616. "description": "Optional provider override this phase is expected to use."
  617. },
  618. "model": {
  619. "type": "string",
  620. "description": "Optional model override this phase is expected to use."
  621. }
  622. },
  623. "required": [
  624. "title"
  625. ]
  626. }
  627. }
  628. },
  629. "required": [
  630. "name",
  631. "description"
  632. ]
  633. },
  634. "args": {
  635. "type": "object",
  636. "description": "Optional JSON input exposed to the script as the `args` global (wrap a bare list as a field, e.g. {\"files\": [...]}).",
  637. "additionalProperties": true
  638. }
  639. },
  640. "required": [
  641. "script",
  642. "meta"
  643. ]
  644. }
  645. },
  646. {
  647. "name": "write",
  648. "description": "Create or fully replace a UTF-8 text file.",
  649. "parameters": {
  650. "type": "object",
  651. "properties": {
  652. "file_path": {
  653. "type": "string",
  654. "description": "Path to write, resolved by the filesystem backend."
  655. },
  656. "content": {
  657. "type": "string",
  658. "description": "Full UTF-8 text content to write."
  659. },
  660. "sandbox_permissions": {
  661. "type": "string",
  662. "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.",
  663. "enum": [
  664. "workspace-write",
  665. "danger-full-access"
  666. ]
  667. },
  668. "justification": {
  669. "type": "string",
  670. "description": "Required with sandbox_permissions: one sentence for the user explaining why this exact file operation needs the wider access."
  671. }
  672. },
  673. "required": [
  674. "file_path",
  675. "content"
  676. ]
  677. }
  678. }
  679. ],
  680. "changes": []
  681. }