mirror of
https://ghproxy.cflmy.top/https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-28 08:09:35 +08:00
fix(ci): isolate compiler scans and verify Office render results
This commit is contained in:
1 parent
39f2c26d8b
commit
c93d021286
10 files changed
+22
-14
No files matched your search
@@ -46,7 +46,7 @@
|
||||
zh: a534164ad9eb00da
|
||||
/desktop-packaging/runtime-file-selection-and-installation-checks:
|
||||
en: d3a8410de52fb3a7
|
||||
zh: e4faaaa1a5ead5d6
|
||||
zh: 13995b029044ad88
|
||||
/desktop-packaging/desktop-runtime-preparation:
|
||||
en: 84be38ab3136fff7
|
||||
zh: bb4ed12ee0e1dfa0
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
en: 41d772192075e133
|
||||
zh: 5ef3da69b4de1d8a
|
||||
/capability-seams-and-core-services:
|
||||
en: 81ada544b91db085
|
||||
zh: 4442cc22a114987d
|
||||
en: 915bfe6e90876dfe
|
||||
zh: 045adacedb3f3b3e
|
||||
@@ -13,7 +13,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t
|
||||
| `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:198`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - |
|
||||
| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:66`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | [`cua`](../packages/experimental/cua), `remotes` |
|
||||
| `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:399`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:290`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | `browser-use-runtime`, `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`cua`](../packages/experimental/cua), [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/experimental/hooks-claude-code), [`hooks-codex`](../packages/experimental/hooks-codex), `liveshare`, [`loader-smoke`](../packages/test-support/loader-smoke), [`permission-presets`](../packages/interaction/permission-presets), `session-controller`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:290`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | [`agent-team`](../packages/team/agent-team), `browser-use-runtime`, `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`cua`](../packages/experimental/cua), [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/experimental/hooks-claude-code), [`hooks-codex`](../packages/experimental/hooks-codex), `liveshare`, [`loader-smoke`](../packages/test-support/loader-smoke), [`permission-presets`](../packages/interaction/permission-presets), `session-controller`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:299`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`action-cards`](../packages/experimental/action-cards), [`agent-loop`](../packages/core/agent-loop), `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), `server`, `session-controller`, [`subagent`](../packages/subagent/subagent), [`tool-office`](../packages/document/tool-office), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) |
|
||||
| `agent/error` | `emit` | [`packages/core/agent/src/runtime-types.ts:429`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`deepseek-account`](../packages/credentials/deepseek-account), [`goal-round-driver`](../packages/goal/goal-round-driver), [`headless`](../packages/bundle/headless), `server`, `session-controller`, [`session-telemetry`](../packages/session/session-telemetry), [`subagent`](../packages/subagent/subagent) |
|
||||
| `agent/inbox/claimed` | `emit` | [`packages/core/agent/src/runtime-types.ts:328`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`tool-jobs`](../packages/jobs/tool-jobs), [`user-questions`](../packages/interaction/user-questions) |
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
| `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:198`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - |
|
||||
| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:66`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | [`cua`](../packages/experimental/cua), `remotes` |
|
||||
| `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:399`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:290`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | `browser-use-runtime`, `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`cua`](../packages/experimental/cua), [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/experimental/hooks-claude-code), [`hooks-codex`](../packages/experimental/hooks-codex), `liveshare`, [`loader-smoke`](../packages/test-support/loader-smoke), [`permission-presets`](../packages/interaction/permission-presets), `session-controller`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:290`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | [`agent-team`](../packages/team/agent-team), `browser-use-runtime`, `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`cua`](../packages/experimental/cua), [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/experimental/hooks-claude-code), [`hooks-codex`](../packages/experimental/hooks-codex), `liveshare`, [`loader-smoke`](../packages/test-support/loader-smoke), [`permission-presets`](../packages/interaction/permission-presets), `session-controller`, [`tool-subagent`](../packages/subagent/tool-subagent) |
|
||||
| `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:299`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`action-cards`](../packages/experimental/action-cards), [`agent-loop`](../packages/core/agent-loop), `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), `server`, `session-controller`, [`subagent`](../packages/subagent/subagent), [`tool-office`](../packages/document/tool-office), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) |
|
||||
| `agent/error` | `emit` | [`packages/core/agent/src/runtime-types.ts:429`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`deepseek-account`](../packages/credentials/deepseek-account), [`goal-round-driver`](../packages/goal/goal-round-driver), [`headless`](../packages/bundle/headless), `server`, `session-controller`, [`session-telemetry`](../packages/session/session-telemetry), [`subagent`](../packages/subagent/subagent) |
|
||||
| `agent/inbox/claimed` | `emit` | [`packages/core/agent/src/runtime-types.ts:328`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`acp`](../packages/acp/acp), [`goal-round-driver`](../packages/goal/goal-round-driver), [`subagent`](../packages/subagent/subagent), [`tool-jobs`](../packages/jobs/tool-jobs), [`user-questions`](../packages/interaction/user-questions) |
|
||||
|
||||
@@ -11,6 +11,6 @@ If `office_render`, `office_convert`, or `office_recalculate` is not in your too
|
||||
|
||||
- Images, visual checks, or appearance edits: `office_render`, even unrequested.
|
||||
- Recalculate formulas: `office_recalculate`, `format: "xlsx"` or `"ods"`.
|
||||
- Convert: `office_convert` with `format`. For PDF, check the copy is nonempty and starts with `%PDF-`; PDF export alone stops there.
|
||||
- Convert: `office_convert` with `format`. For PDF export alone, copy the file, check it is nonempty and starts with `%PDF-`, then deliver it without rendering.
|
||||
|
||||
Copy temporary files to the destination; never overwrite existing files unless asked. Skip rendering when asked. New files, content, formulas, and incidental formatting need no render unless requested. Otherwise reuse loaded skills.
|
||||
@@ -63,10 +63,13 @@ it.skipIf(!process.env.DEEPSEEK_API_KEY || !runtime).each([{ format: 'docx', mod
|
||||
})
|
||||
const renders = officeCalls(events).filter(call => call.name === 'office_render')
|
||||
expect(renders.length, JSON.stringify(calls)).toBeGreaterThan(0)
|
||||
const images = events.some(event => (event.type === 'tool/result' && event.data.message.content.some(block => block.type === 'image'))
|
||||
|| (event.type === 'user/message' && event.data.source.kind === 'ptc-mode' && event.data.content.some(block => block.type === 'image')))
|
||||
const renderCallIds = new Set(renders.map(call => call.callId))
|
||||
const images = events.some(event => mode === 'native'
|
||||
? event.type === 'tool/result' && renderCallIds.has(event.data.message.toolCallId)
|
||||
&& !event.data.message.isError && event.data.message.content.some(block => block.type === 'image')
|
||||
: event.type === 'user/message' && event.data.source.kind === 'ptc-mode'
|
||||
&& event.data.content.some(block => block.type === 'image'))
|
||||
expect(images, JSON.stringify(calls)).toBe(true)
|
||||
expect(calls.some(call => call.name === 'read_image')).toBe(false)
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@@ -48,6 +48,11 @@ export const coverageExemptHeavySuites: readonly CoverageExemptSuite[] = [
|
||||
{ filter: 'scripts/install-lefthook.spec.ts', exclude: 'scripts/install-lefthook.spec.ts' },
|
||||
{ filter: 'scripts/oxlint-contract.spec.ts', exclude: 'scripts/oxlint-contract.spec.ts' },
|
||||
{ filter: 'scripts/change-scope.spec.ts', exclude: 'scripts/change-scope.spec.ts' },
|
||||
// Repository compiler scans measure scripts/ sources only. The epoch-header
|
||||
// suite also calls the v3-to-v4 admission guard, covered by its package tests.
|
||||
{ filter: 'scripts/persistence-schema.spec.ts', exclude: 'scripts/persistence-schema.spec.ts' },
|
||||
{ filter: 'scripts/persistence-epoch-header.spec.ts', exclude: 'scripts/persistence-epoch-header.spec.ts' },
|
||||
{ filter: 'scripts/gen-client-catalog.spec.ts', exclude: 'scripts/gen-client-catalog.spec.ts' },
|
||||
// Built-artifact proof. Packer/runtime src is threshold-excluded, and the
|
||||
// suite self-skips on unbuilt checkouts; the serial-windows complete
|
||||
// reference still starts this uninstrumented gate after its build gate, so
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{"type":"session/title","data":{"title":"Load the office router, then","messageSeqs":[8],"source":{"kind":"fallback"}}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_office_skill","name":"skill","arguments":"{\"name\":\"office\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:5}}"},"stream":[{"type":"chunk","time":1793628044587,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1793628044588,"index":0,"dt":[],"id":"call_office_skill","name":"skill","args":["{\"name\":\"office\"}"]},{"type":"chunk","time":1793628044588,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_office_skill","name":"skill","arguments":"{\"name\":\"office\"}"}}},{"type":"chunk","time":1793628044588,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":1,"callId":"call_office_skill","name":"skill","arguments":"{\"name\":\"office\"}"}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_office_skill"},"toolCallId":"call_office_skill","content":[{"type":"text","text":"<skill_content name=\"office\">\n<skill_resources>\nBase directory for this skill: {{cwd}}/office-skills/office\nResolve relative paths mentioned by this skill against the base directory before using them. Load referenced resources only as needed.\n</skill_resources>\n\n<skill_instructions>\n# Office task routing\n\nTo create, read, or edit, load `office-docx`, `office-pptx`, or `office-xlsx`. Operations alone skip format skills.\n\nIf `office_render`, `office_convert`, or `office_recalculate` is not in your tools, load `office` with `skill`; they appear next step.\n\n- Images, visual checks, or appearance edits: `office_render`, even unrequested.\n- Recalculate formulas: `office_recalculate`, `format: \"xlsx\"` or `\"ods\"`.\n- Convert: `office_convert` with `format`. For PDF, check the copy is nonempty and starts with `%PDF-`; PDF export alone stops there.\n\nCopy temporary files to the destination; never overwrite existing files unless asked. Skip rendering when asked. New files, content, formulas, and incidental formatting need no render unless requested. Otherwise reuse loaded skills.\n</skill_instructions>\n</skill_content>"}],"isError":false,"id":"{{message:6}}"}},"sourceEventSeqs":[15],"surfaceOp":"append"}
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_office_skill"},"toolCallId":"call_office_skill","content":[{"type":"text","text":"<skill_content name=\"office\">\n<skill_resources>\nBase directory for this skill: {{cwd}}/office-skills/office\nResolve relative paths mentioned by this skill against the base directory before using them. Load referenced resources only as needed.\n</skill_resources>\n\n<skill_instructions>\n# Office task routing\n\nTo create, read, or edit, load `office-docx`, `office-pptx`, or `office-xlsx`. Operations alone skip format skills.\n\nIf `office_render`, `office_convert`, or `office_recalculate` is not in your tools, load `office` with `skill`; they appear next step.\n\n- Images, visual checks, or appearance edits: `office_render`, even unrequested.\n- Recalculate formulas: `office_recalculate`, `format: \"xlsx\"` or `\"ods\"`.\n- Convert: `office_convert` with `format`. For PDF export alone, copy the file, check it is nonempty and starts with `%PDF-`, then deliver it without rendering.\n\nCopy temporary files to the destination; never overwrite existing files unless asked. Skip rendering when asked. New files, content, formulas, and incidental formatting need no render unless requested. Otherwise reuse loaded skills.\n</skill_instructions>\n</skill_content>"}],"isError":false,"id":"{{message:6}}"}},"sourceEventSeqs":[15],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":1}}
|
||||
{"type":"step/start","data":{"turn":1,"step":2}}
|
||||
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["apply_patch","create_goal","edit","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","office_convert","office_recalculate","office_render","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","wait_agent","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_office_skill","name":"run_code","arguments":"{\"code\":\"console.log(await tools.skill({\\\"name\\\":\\\"office\\\"}));\",\"description\":\"Load task instructions\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:5}}"},"stream":[{"type":"chunk","time":1793628045463,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1793628045463,"index":0,"dt":[],"id":"call_office_skill","name":"run_code","args":["{\"code\":\"console.log(await tools.skill({\\\"name\\\":\\\"office\\\"}));\",\"description\":\"Load task instructions\"}"]},{"type":"chunk","time":1793628045463,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_office_skill","name":"run_code","arguments":"{\"code\":\"console.log(await tools.skill({\\\"name\\\":\\\"office\\\"}));\",\"description\":\"Load task instructions\"}"}}},{"type":"chunk","time":1793628045463,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":1,"callId":"call_office_skill","name":"run_code","arguments":"{\"code\":\"console.log(await tools.skill({\\\"name\\\":\\\"office\\\"}));\",\"description\":\"Load task instructions\"}"}}
|
||||
{"type":"tool/ptc-dispatch-start","data":{"rootCallId":"call_office_skill","parentCallId":"call_office_skill","subCallId":"call_office_skill:ptc:1","name":"skill","arguments":{"name":"office"}}}
|
||||
{"type":"tool/ptc-dispatch","data":{"rootCallId":"call_office_skill","parentCallId":"call_office_skill","subCallId":"call_office_skill:ptc:1","name":"skill","arguments":{"name":"office"},"isError":false,"content":[{"type":"text","text":"<skill_content name=\"office\">\n<skill_resources>\nBase directory for this skill: {{cwd}}/office-skills/office\nResolve relative paths mentioned by this skill against the base directory before using them. Load referenced resources only as needed.\n</skill_resources>\n\n<skill_instructions>\n# Office task routing\n\nTo create, read, or edit, load `office-docx`, `office-pptx`, or `office-xlsx`. Operations alone skip format skills.\n\nIf `office_render`, `office_convert`, or `office_recalculate` is not in your tools, load `office` with `skill`; they appear next step.\n\n- Images, visual checks, or appearance edits: `office_render`, even unrequested.\n- Recalculate formulas: `office_recalculate`, `format: \"xlsx\"` or `\"ods\"`.\n- Convert: `office_convert` with `format`. For PDF, check the copy is nonempty and starts with `%PDF-`; PDF export alone stops there.\n\nCopy temporary files to the destination; never overwrite existing files unless asked. Skip rendering when asked. New files, content, formulas, and incidental formatting need no render unless requested. Otherwise reuse loaded skills.\n</skill_instructions>\n</skill_content>"}]}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_office_skill"},"toolCallId":"call_office_skill","content":[{"type":"text","text":"{\n name: 'office',\n provider: 'dsh-office',\n resourceBase: {\n kind: 'directory',\n path: '{{cwd}}/office-skills/office'\n },\n content: '# Office task routing\\n' +\n '\\n' +\n 'To create, read, or edit, load `office-docx`, `office-pptx`, or `office-xlsx`. Operations alone skip format skills.\\n' +\n '\\n' +\n 'If `office_render`, `office_convert`, or `office_recalculate` is not in your tools, load `office` with `skill`; they appear next step.\\n' +\n '\\n' +\n '- Images, visual checks, or appearance edits: `office_render`, even unrequested.\\n' +\n '- Recalculate formulas: `office_recalculate`, `format: \"xlsx\"` or `\"ods\"`.\\n' +\n '- Convert: `office_convert` with `format`. For PDF, check the copy is nonempty and starts with `%PDF-`; PDF export alone stops there.\\n' +\n '\\n' +\n 'Copy temporary files to the destination; never overwrite existing files unless asked. Skip rendering when asked. New files, content, formulas, and incidental formatting need no render unless requested. Otherwise reuse loaded skills.'\n}"}],"isError":false,"id":"{{message:6}}"}},"sourceEventSeqs":[15],"surfaceOp":"append"}
|
||||
{"type":"tool/ptc-dispatch","data":{"rootCallId":"call_office_skill","parentCallId":"call_office_skill","subCallId":"call_office_skill:ptc:1","name":"skill","arguments":{"name":"office"},"isError":false,"content":[{"type":"text","text":"<skill_content name=\"office\">\n<skill_resources>\nBase directory for this skill: {{cwd}}/office-skills/office\nResolve relative paths mentioned by this skill against the base directory before using them. Load referenced resources only as needed.\n</skill_resources>\n\n<skill_instructions>\n# Office task routing\n\nTo create, read, or edit, load `office-docx`, `office-pptx`, or `office-xlsx`. Operations alone skip format skills.\n\nIf `office_render`, `office_convert`, or `office_recalculate` is not in your tools, load `office` with `skill`; they appear next step.\n\n- Images, visual checks, or appearance edits: `office_render`, even unrequested.\n- Recalculate formulas: `office_recalculate`, `format: \"xlsx\"` or `\"ods\"`.\n- Convert: `office_convert` with `format`. For PDF export alone, copy the file, check it is nonempty and starts with `%PDF-`, then deliver it without rendering.\n\nCopy temporary files to the destination; never overwrite existing files unless asked. Skip rendering when asked. New files, content, formulas, and incidental formatting need no render unless requested. Otherwise reuse loaded skills.\n</skill_instructions>\n</skill_content>"}]}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_office_skill"},"toolCallId":"call_office_skill","content":[{"type":"text","text":"{\n name: 'office',\n provider: 'dsh-office',\n resourceBase: {\n kind: 'directory',\n path: '{{cwd}}/office-skills/office'\n },\n content: '# Office task routing\\n' +\n '\\n' +\n 'To create, read, or edit, load `office-docx`, `office-pptx`, or `office-xlsx`. Operations alone skip format skills.\\n' +\n '\\n' +\n 'If `office_render`, `office_convert`, or `office_recalculate` is not in your tools, load `office` with `skill`; they appear next step.\\n' +\n '\\n' +\n '- Images, visual checks, or appearance edits: `office_render`, even unrequested.\\n' +\n '- Recalculate formulas: `office_recalculate`, `format: \"xlsx\"` or `\"ods\"`.\\n' +\n '- Convert: `office_convert` with `format`. For PDF export alone, copy the file, check it is nonempty and starts with `%PDF-`, then deliver it without rendering.\\n' +\n '\\n' +\n 'Copy temporary files to the destination; never overwrite existing files unless asked. Skip rendering when asked. New files, content, formulas, and incidental formatting need no render unless requested. Otherwise reuse loaded skills.'\n}"}],"isError":false,"id":"{{message:6}}"}},"sourceEventSeqs":[15],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":1}}
|
||||
{"type":"step/start","data":{"turn":1,"step":2}}
|
||||
{"type":"system/message","data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:7}}"}},"sourceEventSeqs":[7],"surfaceOp":{"op":"replace","startSeq":7,"endSeq":7}}
|
||||
|
||||
@@ -207,7 +207,7 @@ interface ToolArgsMap {
|
||||
} & Record<string, JsonValue>;
|
||||
/** Search the web for current information. Returns an optional summary answer and a list of source URLs. */
|
||||
web_search: {
|
||||
/** 1–4 search queries; their results are merged. */
|
||||
/** 1–10 search queries; their results are merged. */
|
||||
queries: string[];
|
||||
} & Record<string, JsonValue>;
|
||||
/** 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. Script-body hooks: - `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) 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. - `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)`. A stage throw drops that ITEM to `null` and skips its remaining stages. - `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`. - `phase(title)` — start a progress phase; `log(message)` — narrate progress; `args` — the tool call's `args` input, verbatim. Misused hooks (bad arguments, unknown options, unsupported schemas, tripped caps) end the whole script instead of producing `null`. The script has no filesystem, network, timer, or Node.js APIs; the agents do the work. */
|
||||
@@ -548,7 +548,7 @@ Verify your work by running the code or tests. Keep answers brief and factual.
|
||||
|
||||
`run_code` is the only tool you can call directly — a tool call naming any other tool fails. Reach every tool the SDK declares below from inside the program.
|
||||
|
||||
Use the read tool — not shell commands like cat — to inspect text files. Use offset and limit to continue reading large files.
|
||||
Use the read tool — not shell commands like cat, sed, head, or tail — to inspect text files. Use offset and limit to read a line range or continue a large file.
|
||||
|
||||
Read an existing file before overwriting it with write and prefer edit for targeted changes.
|
||||
|
||||
|
||||
Reference in new issue
Block a user