@xopcai/xopc 0.0.442 → 0.0.444
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-Chneosh4.js → agent-defaults-settings-panel-rH1QpgiR.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-DKfOY5z9.js → agents-lvQfOQPN.js} +1 -1
- package/dist/gateway/static/root/assets/{api-ClZ7BrD4.js → api-snfMD8_Y.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CBLj-m2k.js → apps-page-C3iDd3ZQ.js} +1 -1
- package/dist/gateway/static/root/assets/automation-task-card-CKbHMLSy.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-CYngiwxI.js → automations-page-K3trjTZl.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-zyhyqSdH.js → automations-workspace-D7m3w_9B.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-oWWLfwf3.js → capabilities-DDJJhQ40.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BpYi2fQO.js → capabilities-DJYgOjeq.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-Dlgwv1dI.js → capabilities-page-CBqvHAyp.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CslXPIs8.js → capabilities-settings-panel-wjezs0OE.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-P-xOLYBz.js → channels-D4q8hiD0.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-page-Cen4dGHa.js → chat-page-CeHOmJqM.js} +6 -6
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DTQL2DBu.js → chat-terminal-dock-D9o0nUEV.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-B1GFVFK_.js → composer-payload-handoff-CoDWKzBm.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-sULM6YyQ.js → connected-providers-grid-C5-3MDIj.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-DN9BOiFk.js → connectors-page-QVWuoxuK.js} +1 -1
- package/dist/gateway/static/root/assets/constants-CsVXarqA.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-D2Dhtu6H.js → extension-debug-page-CDZfdMAR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-Dra7k_6o.js → extension-iframe-host-CG70QWPS.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Dd16lQg-.js → extension-page-DpJTL6-v.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-C4WwnCxf.js → extension-provider-BZTbdvCF.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BHwQ2ipj.js → extension-settings-page-CC4rmiFC.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-D-gy9LlQ.js → home-page-Df3X6-Ko.js} +2 -2
- package/dist/gateway/static/root/assets/{index-CqQZfWRQ.js → index-Cg0AgHw1.js} +5 -5
- package/dist/gateway/static/root/assets/{index-D7Noveui.css → index-DE2bG5EI.css} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-Drbzz4Lm.js → local-app-workbench-page-CE46mHc0.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-BQdgpm0s.js → note-detail-panel-DWIWloib.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-IefutMyg.js → notes-page-DIugUbkV.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-DDmLslYG.js → page-context-capture-button-B9L7V_n2.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-DkrDSJqk.js → personal-page-BZWJKyZ8.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-COU6H_jO.js → product-preview-content-CGbqoID0.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-Ct5q4tv6.js → product-preview-modal-0wvIDcVr.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-CQj7nm6I.js → project-detail-page-Bkxs8knZ.js} +2 -2
- package/dist/gateway/static/root/assets/{projects-page-sWxQJrFS.js → projects-page-BsgZb6n9.js} +1 -1
- package/dist/gateway/static/root/assets/{route-preload-CDQtPdgq.js → route-preload-BVo8JPwW.js} +2 -2
- package/dist/gateway/static/root/assets/{session-manager-Czu9GpZX.js → session-manager-ChHnJOWW.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-CGkbbrz-.js → sessions-page-BM-oqd22.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-zGjDXdHY.js → settings-page-irv-JoTz.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-Bs3VjTGj.js → share-preview-page-CFebGqyB.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BseSozxm.js → shares-settings-B-7la3QN.js} +1 -1
- package/dist/gateway/static/root/assets/sliding-tab-list-CmcrqRzN.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-6awKGnOr.js +3 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-BNhYqUAa.js → task-result-evidence-Cy9txdqV.js} +1 -1
- package/dist/gateway/static/root/assets/{tasks-DRmd6sWt.js → tasks-D_xuHn6V.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-CMtFem_g.js → tracing-settings-page-B_Xdc2VF.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BO2OFCoA.js → usage-page-DqzosTxy.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-ClakaDU1.js +2 -0
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-g4SwMHbx.js → use-file-preview-expanded-9DED7ohY.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-DG5ZMfaY.js → use-workspace-tree-Dq0qgK3N.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-B5_01fi_.js → user-model-page-Ziz55hVM.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-transcribe-api-Cc92OabY.js → voice-transcribe-api-Bf9FaI-p.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-fKmmIslV.js → workspace-api-DrVss2Fd.js} +2 -2
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-C_0lUEsm.js → workspace-file-preview-dialog-C2egBzza.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-BznuSmFZ.js → workspace-open-location-menu-XFUtwfLY.js} +1 -1
- package/dist/gateway/static/root/index.html +24 -24
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/task-research-result.js +1 -0
- package/dist/packages/gateway-contract/src/tasks.js +1 -1
- package/dist/src/agent/embedded/codemode-extension.js +10 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.js +2 -1
- package/dist/src/agent/embedded/run-turn.js +2 -1
- package/dist/src/agent/embedded/session-runner.js +1 -0
- package/dist/src/agent/orchestration/llm-turn-retry.d.ts +4 -0
- package/dist/src/agent/orchestration/llm-turn-retry.js +14 -1
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +3 -0
- package/dist/src/agent/tools/factory.js +1 -0
- package/dist/src/agent/tools/personal-request-result-tool.js +2 -2
- package/dist/src/agent/tools/personal-request-tool.js +4 -1
- package/dist/src/agent/tools/personal-task-tool.d.ts +1 -0
- package/dist/src/agent/tools/personal-task-tool.js +4 -0
- package/dist/src/agent/tools/task-collaboration-tool.js +10 -1
- package/dist/src/agent/tools/task-evidence.js +1 -0
- package/dist/src/agent/tools/xopc-use-tool.js +10 -1
- package/dist/src/automations/capabilities/write.d.ts +6 -6
- package/dist/src/automations/domain/validation.d.ts +12 -12
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +3 -3
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/gateway/hono/app.js +1 -1
- package/dist/src/gateway/hono/middleware/auth.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/desktop-host.js +1 -1
- package/dist/src/gateway/hono/routes/exposure.js +1 -1
- package/dist/src/gateway/hono/routes/files.js +2 -2
- package/dist/src/gateway/hono/routes/logs.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +5 -5
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +5 -5
- package/dist/src/gateway/hono/routes/status.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/tunnel.js +2 -2
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/next-turn-suggestions/snapshot.js +11 -3
- package/dist/src/gateway/provider-model-setup.js +1 -1
- package/dist/src/gateway/security/audit.js +1 -1
- package/dist/src/gateway/security/index.js +2 -2
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service/sessions-api.js +1 -1
- package/dist/src/gateway/service.js +21 -21
- package/dist/src/gateway/side-chat/run-service.js +1 -1
- package/dist/src/home-intelligence/application-service.js +1 -1
- package/dist/src/personal-agent/communication.d.ts +1 -1
- package/dist/src/personal-agent/communication.js +2 -2
- package/dist/src/personal-agent/reply-style.d.ts +1 -1
- package/dist/src/personal-agent/reply-style.js +3 -1
- package/dist/src/personal-agent/request-delivery.js +1 -5
- package/dist/src/personal-agent/request-repository.d.ts +1 -0
- package/dist/src/personal-agent/request-service.d.ts +1 -0
- package/dist/src/personal-agent/request-service.js +12 -3
- package/dist/src/personal-agent/request-verification.d.ts +6 -0
- package/dist/src/personal-agent/request-verification.js +22 -0
- package/dist/src/phone/stream-gateway.js +1 -1
- package/dist/src/providers/setup/voice.js +1 -1
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/share/site-share-router.js +2 -2
- package/dist/src/tasks/task-allocation-service.js +4 -2
- package/dist/src/tasks/task-application-service.js +4 -1
- package/dist/src/tasks/task-context-assembler.js +3 -1
- package/dist/src/tasks/task-contract-definition.d.ts +1 -0
- package/dist/src/tasks/task-contract-planner.js +3 -0
- package/dist/src/tasks/task-main-update-decision-service.js +7 -7
- package/dist/src/tasks/task-main-update-delivery.js +15 -2
- package/dist/src/tasks/task-repository.js +1 -1
- package/dist/src/tasks/task-research-repair.d.ts +1 -0
- package/dist/src/tasks/task-research-repair.js +3 -1
- package/dist/src/tasks/task-research-result.js +24 -3
- package/dist/src/tasks/task-run-coordinator.js +12 -9
- package/dist/src/tui/backends/embedded-backend.js +3 -3
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/voice/realtime/runtime.js +1 -1
- package/dist/src/work-discovery/index.js +2 -2
- package/dist/src/work-discovery/investigator.js +1 -1
- package/dist/src/work-discovery/service.js +3 -3
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/automation-task-card-DLg-LYCm.js +0 -3
- package/dist/gateway/static/root/assets/constants-DBtMsXdW.js +0 -1
- package/dist/gateway/static/root/assets/sliding-tab-list-DuQyViqe.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-CwMpmFVS.js +0 -3
- package/dist/gateway/static/root/assets/use-composer-attachments-DA6SxZPQ.js +0 -2
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260910-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260910-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-Cg0AgHw1.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-Czpn1I53.js">
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<link rel="modulepreload" crossorigin href="/assets/refresh-cw-BRlGaq2w.js">
|
|
110
110
|
<link rel="modulepreload" crossorigin href="/assets/save-DRDABU--.js">
|
|
111
111
|
<link rel="modulepreload" crossorigin href="/assets/search-DA7gz22f.js">
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/constants-
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/constants-CsVXarqA.js">
|
|
113
113
|
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-CqtCJzWJ.js">
|
|
114
114
|
<link rel="modulepreload" crossorigin href="/assets/session-api-DjnHJ-0n.js">
|
|
115
115
|
<link rel="modulepreload" crossorigin href="/assets/attachment-utils-core-BIOUBrpT.js">
|
|
@@ -118,12 +118,12 @@
|
|
|
118
118
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-DHOGevH3.js">
|
|
119
119
|
<link rel="modulepreload" crossorigin href="/assets/use-async-resource-BHFGZCY2.js">
|
|
120
120
|
<link rel="modulepreload" crossorigin href="/assets/sliding-indicator-hwz0sx3h.js">
|
|
121
|
-
<link rel="modulepreload" crossorigin href="/assets/sliding-tab-list-
|
|
121
|
+
<link rel="modulepreload" crossorigin href="/assets/sliding-tab-list-CmcrqRzN.js">
|
|
122
122
|
<link rel="modulepreload" crossorigin href="/assets/index.module-Cd9ENXfk.js">
|
|
123
123
|
<link rel="modulepreload" crossorigin href="/assets/files-BNL4kkSB.js">
|
|
124
|
-
<link rel="modulepreload" crossorigin href="/assets/workspace-api-
|
|
124
|
+
<link rel="modulepreload" crossorigin href="/assets/workspace-api-DrVss2Fd.js">
|
|
125
125
|
<link rel="modulepreload" crossorigin href="/assets/dist-ZrL34Ps4.js">
|
|
126
|
-
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-
|
|
126
|
+
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-9DED7ohY.js">
|
|
127
127
|
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
128
128
|
<link rel="modulepreload" crossorigin href="/assets/history-DXH_9jsE.js">
|
|
129
129
|
<link rel="modulepreload" crossorigin href="/assets/key-round-DWbpyU2U.js">
|
|
@@ -154,33 +154,33 @@
|
|
|
154
154
|
<link rel="modulepreload" crossorigin href="/assets/share-link-dialog-C_uYNUlp.js">
|
|
155
155
|
<link rel="modulepreload" crossorigin href="/assets/wrench-DFb4r8bH.js">
|
|
156
156
|
<link rel="modulepreload" crossorigin href="/assets/specialists-xbB3xL9e.js">
|
|
157
|
-
<link rel="modulepreload" crossorigin href="/assets/tasks-
|
|
158
|
-
<link rel="modulepreload" crossorigin href="/assets/api-
|
|
157
|
+
<link rel="modulepreload" crossorigin href="/assets/tasks-D_xuHn6V.js">
|
|
158
|
+
<link rel="modulepreload" crossorigin href="/assets/api-snfMD8_Y.js">
|
|
159
159
|
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-Bt_e3A8f.js">
|
|
160
160
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-BtJkgjFf.js">
|
|
161
161
|
<link rel="modulepreload" crossorigin href="/assets/personal-proactivity-DaRnbB1f.js">
|
|
162
162
|
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-ugwtyD4q.js">
|
|
163
163
|
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-hnEaDFaA.js">
|
|
164
164
|
<link rel="modulepreload" crossorigin href="/assets/agents-admin-api-DPLtjJtX.js">
|
|
165
|
-
<link rel="modulepreload" crossorigin href="/assets/session-manager-
|
|
165
|
+
<link rel="modulepreload" crossorigin href="/assets/session-manager-ChHnJOWW.js">
|
|
166
166
|
<link rel="modulepreload" crossorigin href="/assets/new-session-preferences-gb411vZP.js">
|
|
167
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
167
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-DJYgOjeq.js">
|
|
168
168
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
169
169
|
<link rel="modulepreload" crossorigin href="/assets/theme-store-DsvYj7Vy.js">
|
|
170
|
-
<link rel="modulepreload" crossorigin href="/assets/extension-provider-
|
|
170
|
+
<link rel="modulepreload" crossorigin href="/assets/extension-provider-BZTbdvCF.js">
|
|
171
171
|
<link rel="modulepreload" crossorigin href="/assets/chevron-left-DqFhpbvK.js">
|
|
172
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
172
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-DDJJhQ40.js">
|
|
173
173
|
<link rel="modulepreload" crossorigin href="/assets/phone-workspace-store-BKltFHtG.js">
|
|
174
174
|
<link rel="modulepreload" crossorigin href="/assets/shares-api-C2GDyqxP.js">
|
|
175
175
|
<link rel="modulepreload" crossorigin href="/assets/file-preview-surface-Dtla5oAW.js">
|
|
176
176
|
<link rel="modulepreload" crossorigin href="/assets/skill-wire-pattern-BPpeIcCi.js">
|
|
177
|
-
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-
|
|
177
|
+
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-ClakaDU1.js">
|
|
178
178
|
<link rel="modulepreload" crossorigin href="/assets/chat-agents-api-BOB3dILf.js">
|
|
179
|
-
<link rel="modulepreload" crossorigin href="/assets/voice-transcribe-api-
|
|
179
|
+
<link rel="modulepreload" crossorigin href="/assets/voice-transcribe-api-Bf9FaI-p.js">
|
|
180
180
|
<link rel="modulepreload" crossorigin href="/assets/open-capability-settings-Cvb65hQB.js">
|
|
181
181
|
<link rel="modulepreload" crossorigin href="/assets/workspace-editor-agent-store-CmSYxTmk.js">
|
|
182
182
|
<link rel="modulepreload" crossorigin href="/assets/voice-input-shortcut-events-SD2gZVg8.js">
|
|
183
|
-
<link rel="modulepreload" crossorigin href="/assets/composer-payload-handoff-
|
|
183
|
+
<link rel="modulepreload" crossorigin href="/assets/composer-payload-handoff-CoDWKzBm.js">
|
|
184
184
|
<link rel="modulepreload" crossorigin href="/assets/chunk-D32TOXHM-DQIy-Baq.js">
|
|
185
185
|
<link rel="modulepreload" crossorigin href="/assets/tool-friendly-title-DEGpbye4.js">
|
|
186
186
|
<link rel="modulepreload" crossorigin href="/assets/page-header-store-YZfSLNTg.js">
|
|
@@ -196,9 +196,9 @@
|
|
|
196
196
|
<link rel="modulepreload" crossorigin href="/assets/calendar-clock-D-quYVPe.js">
|
|
197
197
|
<link rel="modulepreload" crossorigin href="/assets/calendar-days-hw_Y-g-s.js">
|
|
198
198
|
<link rel="modulepreload" crossorigin href="/assets/date-picker-D2whl8Ci.js">
|
|
199
|
-
<link rel="modulepreload" crossorigin href="/assets/automation-task-card-
|
|
199
|
+
<link rel="modulepreload" crossorigin href="/assets/automation-task-card-CKbHMLSy.js">
|
|
200
200
|
<link rel="modulepreload" crossorigin href="/assets/dev-view-store-bryv5YRw.js">
|
|
201
|
-
<link rel="modulepreload" crossorigin href="/assets/extension-iframe-host-
|
|
201
|
+
<link rel="modulepreload" crossorigin href="/assets/extension-iframe-host-CG70QWPS.js">
|
|
202
202
|
<link rel="modulepreload" crossorigin href="/assets/api-CEzBruRJ.js">
|
|
203
203
|
<link rel="modulepreload" crossorigin href="/assets/runtime-health-D2TDFLLq.js">
|
|
204
204
|
<link rel="modulepreload" crossorigin href="/assets/terminal-panel-store-DUEJoa1M.js">
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
<link rel="modulepreload" crossorigin href="/assets/oauth-authorization-window-o6URRos4.js">
|
|
209
209
|
<link rel="modulepreload" crossorigin href="/assets/page-context-draft-GveHK8e2.js">
|
|
210
210
|
<link rel="modulepreload" crossorigin href="/assets/side-chat-shortcut-BIw-1TTD.js">
|
|
211
|
-
<link rel="modulepreload" crossorigin href="/assets/chat-page-
|
|
211
|
+
<link rel="modulepreload" crossorigin href="/assets/chat-page-CeHOmJqM.js">
|
|
212
212
|
<link rel="modulepreload" crossorigin href="/assets/arrow-right-DSSvoX71.js">
|
|
213
213
|
<link rel="modulepreload" crossorigin href="/assets/browser-notification-delivery-DmE2FgGc.js">
|
|
214
214
|
<link rel="modulepreload" crossorigin href="/assets/unlink-BEuthaaq.js">
|
|
@@ -231,12 +231,12 @@
|
|
|
231
231
|
<link rel="modulepreload" crossorigin href="/assets/extension-paths-DvuaZJuy.js">
|
|
232
232
|
<link rel="modulepreload" crossorigin href="/assets/secret-input-labels-B5Jl5HqK.js">
|
|
233
233
|
<link rel="modulepreload" crossorigin href="/assets/providers-api-CspehmSU.js">
|
|
234
|
-
<link rel="modulepreload" crossorigin href="/assets/connected-providers-grid-
|
|
234
|
+
<link rel="modulepreload" crossorigin href="/assets/connected-providers-grid-C5-3MDIj.js">
|
|
235
235
|
<link rel="modulepreload" crossorigin href="/assets/clipboard-copy-DuJk5WD6.js">
|
|
236
236
|
<link rel="modulepreload" crossorigin href="/assets/connector-filters-Cfcx9EA2.js">
|
|
237
237
|
<link rel="modulepreload" crossorigin href="/assets/code-xml-DJtYhZUF.js">
|
|
238
238
|
<link rel="modulepreload" crossorigin href="/assets/coins-DjP27vUx.js">
|
|
239
|
-
<link rel="modulepreload" crossorigin href="/assets/workspace-open-location-menu-
|
|
239
|
+
<link rel="modulepreload" crossorigin href="/assets/workspace-open-location-menu-XFUtwfLY.js">
|
|
240
240
|
<link rel="modulepreload" crossorigin href="/assets/cpu-B247669f.js">
|
|
241
241
|
<link rel="modulepreload" crossorigin href="/assets/file-tree-CFlZnV3Y.js">
|
|
242
242
|
<link rel="modulepreload" crossorigin href="/assets/power-off-CwwQ7Gp7.js">
|
|
@@ -279,15 +279,15 @@
|
|
|
279
279
|
<link rel="modulepreload" crossorigin href="/assets/preference-select-fields-QlyIA8ve.js">
|
|
280
280
|
<link rel="modulepreload" crossorigin href="/assets/navigation-D62kPsA9.js">
|
|
281
281
|
<link rel="modulepreload" crossorigin href="/assets/page-tabs-oeTY7z3_.js">
|
|
282
|
-
<link rel="modulepreload" crossorigin href="/assets/route-preload-
|
|
282
|
+
<link rel="modulepreload" crossorigin href="/assets/route-preload-BVo8JPwW.js">
|
|
283
283
|
<link rel="modulepreload" crossorigin href="/assets/use-personal-profile-T2e6P5Ed.js">
|
|
284
284
|
<link rel="modulepreload" crossorigin href="/assets/project-understanding-CU2af95r.js">
|
|
285
285
|
<link rel="modulepreload" crossorigin href="/assets/refresh-button-DiWdGAaX.js">
|
|
286
|
-
<link rel="modulepreload" crossorigin href="/assets/workspace-file-preview-dialog-
|
|
287
|
-
<link rel="modulepreload" crossorigin href="/assets/use-workspace-tree-
|
|
286
|
+
<link rel="modulepreload" crossorigin href="/assets/workspace-file-preview-dialog-C2egBzza.js">
|
|
287
|
+
<link rel="modulepreload" crossorigin href="/assets/use-workspace-tree-Dq0qgK3N.js">
|
|
288
288
|
<link rel="modulepreload" crossorigin href="/assets/settings-mode-store-Blc4C8aw.js">
|
|
289
289
|
<link rel="modulepreload" crossorigin href="/assets/global-defaults-api-BQMdHLlp.js">
|
|
290
|
-
<link rel="modulepreload" crossorigin href="/assets/product-preview-modal-
|
|
290
|
+
<link rel="modulepreload" crossorigin href="/assets/product-preview-modal-0wvIDcVr.js">
|
|
291
291
|
<link rel="modulepreload" crossorigin href="/assets/settings-loading-skeleton-CAoOV17i.js">
|
|
292
292
|
<link rel="modulepreload" crossorigin href="/assets/segmented-styles-Cqb91xsn.js">
|
|
293
293
|
<link rel="modulepreload" crossorigin href="/assets/settings-advanced-section-CM44UlF8.js">
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
<link rel="stylesheet" crossorigin href="/assets/loopi-C09I2mNj.css">
|
|
297
297
|
<link rel="stylesheet" crossorigin href="/assets/chat-page-zQeUaawJ.css">
|
|
298
298
|
<link rel="stylesheet" crossorigin href="/assets/personal-avatar-BUCb7OiW.css">
|
|
299
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
299
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DE2bG5EI.css">
|
|
300
300
|
</head>
|
|
301
301
|
<body>
|
|
302
302
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -45,6 +45,7 @@ var init_task_research_result = __esmMin((() => {
|
|
|
45
45
|
version: z.literal(1),
|
|
46
46
|
contractVersion: z.number().int().positive(),
|
|
47
47
|
instructionSequence: z.number().int().nonnegative(),
|
|
48
|
+
personalResultHash: z.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
48
49
|
sources: z.array(TaskResearchSourceSchema).max(40),
|
|
49
50
|
claims: z.array(TaskResearchClaimSchema).min(1).max(40),
|
|
50
51
|
checks: z.array(TaskResearchCheckSchema).max(40),
|
|
@@ -298,7 +298,7 @@ var init_tasks = __esmMin((() => {
|
|
|
298
298
|
version: true,
|
|
299
299
|
createdBy: true,
|
|
300
300
|
createdAt: true
|
|
301
|
-
});
|
|
301
|
+
}).extend({ acceptancePolicy: TaskAcceptancePolicySchema.default("verified_auto") });
|
|
302
302
|
TaskContextInputSchema = TaskContextEdgeSchema.omit({
|
|
303
303
|
id: true,
|
|
304
304
|
taskId: true,
|
|
@@ -67,7 +67,7 @@ function createXopcCodemodeExtension(policy, tools, getSession) {
|
|
|
67
67
|
isError: true
|
|
68
68
|
};
|
|
69
69
|
try {
|
|
70
|
-
|
|
70
|
+
const override = await getSession()?.agent.afterToolCall?.({
|
|
71
71
|
...contextFor(event.toolCallId, event.toolName, event.input),
|
|
72
72
|
result: {
|
|
73
73
|
content: event.content,
|
|
@@ -77,6 +77,15 @@ function createXopcCodemodeExtension(policy, tools, getSession) {
|
|
|
77
77
|
},
|
|
78
78
|
isError: event.isError
|
|
79
79
|
}, active.signal);
|
|
80
|
+
pi.appendEntry("codemode-tool-result", {
|
|
81
|
+
parentToolCallId: event.parentToolCallId,
|
|
82
|
+
toolCallId: event.toolCallId,
|
|
83
|
+
toolName: event.toolName,
|
|
84
|
+
content: override?.content ?? event.content,
|
|
85
|
+
details: override?.details ?? event.details,
|
|
86
|
+
isError: override?.isError ?? event.isError
|
|
87
|
+
});
|
|
88
|
+
return override;
|
|
80
89
|
} catch {
|
|
81
90
|
return {
|
|
82
91
|
content: [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
2
|
export declare const TASK_EXECUTION_TOOL_IDS: readonly string[];
|
|
3
|
-
export declare const PERSONAL_REQUEST_TOOL_IDS: readonly ["tool_search", "xopc_tool_describe", "xopc_tool_execute", "personal_request_result", "personal_request_connection", "task_collaboration"];
|
|
3
|
+
export declare const PERSONAL_REQUEST_TOOL_IDS: readonly ["tool_search", "xopc_tool_describe", "xopc_tool_execute", "personal_request_result", "personal_request_connection", "task_collaboration", "publish_task_result"];
|
|
4
4
|
export type ExecutionToolPolicy = Readonly<{
|
|
5
5
|
surface: 'agent' | 'personal_main' | 'personal_request_worker';
|
|
6
6
|
taskExecution: boolean;
|
|
@@ -16,7 +16,8 @@ const PERSONAL_REQUEST_TOOL_IDS = [
|
|
|
16
16
|
"xopc_tool_execute",
|
|
17
17
|
"personal_request_result",
|
|
18
18
|
"personal_request_connection",
|
|
19
|
-
"task_collaboration"
|
|
19
|
+
"task_collaboration",
|
|
20
|
+
"publish_task_result"
|
|
20
21
|
];
|
|
21
22
|
/** Resolve from persisted execution identity, never from tool names or model input. */
|
|
22
23
|
function resolveExecutionToolPolicy(conversationId) {
|
|
@@ -18,7 +18,7 @@ import { resolveAgentAbortReason } from "../orchestration/run-termination.js";
|
|
|
18
18
|
import { isAgentTurnTimeoutError, isAgentTurnUnsettledError, resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
19
19
|
import { isContextOverflowError } from "../orchestration/context-overflow.js";
|
|
20
20
|
import { ACCEPTANCE_REPAIR_READ_TOOLS, canResumeAfterModelFailure, completedRecoveryToolResult } from "../orchestration/turn-recovery.js";
|
|
21
|
-
import { classifyLlmFailure, getAssistantTurnErrorMessage, isAssistantTurnAborted, isAssistantTurnFailed, maybeRetryTurnAfterTransientLlmFailure, stripTrailingErrorAssistantMessages } from "../orchestration/llm-turn-retry.js";
|
|
21
|
+
import { classifyLlmFailure, getAssistantTurnErrorMessage, isAssistantTurnAborted, isAssistantTurnFailed, maybeRetryTurnAfterTransientLlmFailure, recordLlmRetryOutcome, stripTrailingErrorAssistantMessages } from "../orchestration/llm-turn-retry.js";
|
|
22
22
|
import { allowsExecutionTool, filterExecutionTools, resolveExecutionToolPolicy } from "./execution-tool-policy.js";
|
|
23
23
|
import { isPhoneAssistanceSuspended, phoneAssistance, phoneResumeForRun } from "../../phone/assistance.js";
|
|
24
24
|
import { runWithEmbeddedExecutionSession } from "./execution-context.js";
|
|
@@ -929,6 +929,7 @@ async function runXopcEmbeddedTurnInner(params) {
|
|
|
929
929
|
}, "Embedded first response text ready");
|
|
930
930
|
}
|
|
931
931
|
if (event.type === "message_end" && event.message.role === "assistant") {
|
|
932
|
+
recordLlmRetryOutcome(requestRetryBudget, event.message.stopReason);
|
|
932
933
|
recordPromptCacheTouch(conversationId, resolvedModel, event.message.usage);
|
|
933
934
|
if (event.message.stopReason === "error" || event.message.stopReason === "aborted") log.warn({
|
|
934
935
|
conversationId,
|
|
@@ -255,6 +255,7 @@ var EmbeddedSessionRunnerPool = class {
|
|
|
255
255
|
conversationId: params.transcriptRuntime.persistent ? runtimeId : void 0,
|
|
256
256
|
persistCustomTypes: [
|
|
257
257
|
"codemode-store",
|
|
258
|
+
"codemode-tool-result",
|
|
258
259
|
TOOL_DISCOVERY_STATE,
|
|
259
260
|
"coding_run_started",
|
|
260
261
|
"coding_verification",
|
|
@@ -35,6 +35,10 @@ export interface RetryTransientTurnOptions {
|
|
|
35
35
|
warn: (obj: Record<string, unknown>, msg: string) => void;
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
+
/** A completed model response ends a consecutive failure streak, including tool-use responses. */
|
|
39
|
+
export declare function recordLlmRetryOutcome(budget: {
|
|
40
|
+
continues: number;
|
|
41
|
+
}, stopReason: string): void;
|
|
38
42
|
/**
|
|
39
43
|
* After waitForIdle(), call this to optionally re-run the last user turn when the
|
|
40
44
|
* assistant message only contains a transient provider/network error.
|
|
@@ -53,6 +53,10 @@ function stripTrailingErrorAssistantMessages(messages) {
|
|
|
53
53
|
}
|
|
54
54
|
return out;
|
|
55
55
|
}
|
|
56
|
+
/** A completed model response ends a consecutive failure streak, including tool-use responses. */
|
|
57
|
+
function recordLlmRetryOutcome(budget, stopReason) {
|
|
58
|
+
if (stopReason === "stop" || stopReason === "toolUse") budget.continues = 0;
|
|
59
|
+
}
|
|
56
60
|
async function waitForRetryDelay(delayMs, signal) {
|
|
57
61
|
signal?.throwIfAborted();
|
|
58
62
|
if (delayMs <= 0) return;
|
|
@@ -126,6 +130,15 @@ async function maybeRetryTurnAfterTransientLlmFailure(agent, options) {
|
|
|
126
130
|
await agent.continue();
|
|
127
131
|
await agent.waitForIdle();
|
|
128
132
|
}
|
|
133
|
+
const errorMessage = getAssistantTurnErrorMessage(agent);
|
|
134
|
+
if (budget.continues >= maxContinues && errorMessage) options.log.warn({
|
|
135
|
+
conversationId: options.conversationId,
|
|
136
|
+
errorMessage,
|
|
137
|
+
phase: "model_request_recovery",
|
|
138
|
+
recoveryBlockedReason: "retry_budget_exhausted",
|
|
139
|
+
continueAttempts: budget.continues,
|
|
140
|
+
maxContinues
|
|
141
|
+
}, "Model recovery stopped after consecutive retry failures");
|
|
129
142
|
}
|
|
130
143
|
//#endregion
|
|
131
|
-
export { classifyLlmFailure, getAssistantTurnErrorMessage, getLastAssistantMessage, isAssistantTurnAborted, isAssistantTurnFailed, isTransientLlmErrorMessage, maybeRetryTurnAfterTransientLlmFailure, stripTrailingErrorAssistantMessages };
|
|
144
|
+
export { classifyLlmFailure, getAssistantTurnErrorMessage, getLastAssistantMessage, isAssistantTurnAborted, isAssistantTurnFailed, isTransientLlmErrorMessage, maybeRetryTurnAfterTransientLlmFailure, recordLlmRetryOutcome, stripTrailingErrorAssistantMessages };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const xopcUseManual = "# XOPC Use Tool Manual\n\n## Purpose\n\n`xopc_use` operates first-class XOPC product objects without editing SQLite or product files directly.\nLoad this manual before a non-trivial mutation. For focused configuration workflows use\n`tool_manual({tool:\"xopc_use\",topic:\"agent|settings|automation|connections\"})`.\nFor identity-only changes prefer `agent patch_profile {id,expectedRevision,patch,idempotencyKey?}`,\nwhich preserves omitted profile fields. Existing update keeps replacement semantics for profile.\n\n```json\n{\n \"mode\": \"agent | project | automation | note | task | task_run | chat_preview | local_app | settings\",\n \"command\": \"...\",\n \"args\": {},\n \"dryRun\": false\n}\n```\n\nSend one object command per call. Inspect the returned JSON `ok` field; a tool call can\ncomplete successfully while the product command returns `ok: false`.\n\n## Object routing\n\n| Object | Tool |\n| --- | --- |\n| Agent definition and default Agent | `xopc_use` mode `agent` |\n| Project, milestone, project update | `xopc_use` mode `project` |\n| Automation | `xopc_use` mode `automation` |\n| Task intent and lifecycle | `xopc_use` mode `task` |\n| Task execution attempt, receipt, events and waits | `xopc_use` mode `task_run` |\n| Note | `xopc_use` mode `note` |\n| Lightweight UI preview | `xopc_use` mode `chat_preview` |\n| Local app | `xopc_use` mode `local_app` |\n| Settings jump target | `xopc_use` mode `settings` |\n| Session, memory, skill, connected app or workspace file | its dedicated tool |\n\nA Task is durable intent; a TaskRun is one execution attempt.\n\n## Agents\n\nCommands: `list`, `get`, `create`, `update`, `set_default`, `disable`,\n`delete`, and `purge`.\n\nAn Agent profile stores `name` and optional `description`, `creature`, `style`, `language`,\n`emoji`, and `avatar` identity fields. Use `instructions` for short execution rules.\nPut personality in SOUL.md and ongoing work guidance in AGENTS.md.\n\n```json\n{\n \"mode\": \"agent\",\n \"command\": \"create\",\n \"args\": {\n \"id\": \"xiaomei\",\n \"profile\": {\n \"name\": \"\u5C0F\u7F8E\",\n \"description\": \"\u5E2E\u52A9\u6574\u7406\u65E5\u5E38\u4E8B\u9879\",\n \"language\": \"zh-CN\",\n \"style\": \"\u6E29\u67D4\u3001\u4EB2\u5207\",\n \"instructions\": \"\u7ED9\u51FA\u64CD\u4F5C\u5EFA\u8BAE\u524D\u5148\u6838\u5BF9\u5173\u952E\u4E8B\u5B9E\u3002\"\n },\n \"idempotencyKey\": \"create-agent-xiaomei\"\n }\n}\n```\n\nUse `list` before creating an Agent so an existing id is updated rather than duplicated.\nMutations other than `create` require the current `expectedRevision`; `set_default` uses\nthe catalog revision returned by `list`. `delete` preserves on-disk data, while `purge`\nalso removes it. Use `dryRun: true` to validate the exact same input contract without writing.\n\n## Reliable protocol\n\n1. Use `list` then `get` when an id is unknown.\n2. Read the current `version` before a Task mutation.\n3. Use `dryRun: true` for broad Project changes or uncertain mutations.\n4. Mutate once with the exact id and current concurrency token.\n5. Verify the returned object and preserve any \u201COpen in xopc\u201D delivery link.\n6. On a conflict, read again and reconsider the operation; do not blindly retry.\n\nTimestamps are Unix epoch milliseconds. Array fields are arrays of strings. Omission\npreserves a patchable field; an empty array intentionally clears it. Prefer explicit\n`projectId`, `taskId`, `runId`, `noteId`, and `localAppId` fields over `id`.\n\n## Projects\n\nCommands: `list`, `get`, `create`, `update`, `resolve_workspace`,\n`list_milestones`, `create_milestone`, `update_milestone`, `list_updates`,\nand `create_update`.\n\nProject statuses: `planned`, `active`, `paused`, `completed`, `cancelled`,\n`archived`. Health values: `unknown`, `on_track`, `at_risk`, `off_track`.\n\nA Project defines bounded shared context for related work. Its durable planning fields are `outcome`,\n`successCriteria`, `scope`, `nonGoals`, `ownerId`, `targetAt`, and `health`.\nUse `brief` for a concise description and `instructions` for durable operating guidance.\n\n### Create\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"AI Product Research\",\n \"outcome\": \"Choose a validated product direction\",\n \"successCriteria\": [\"Ten customer interviews\", \"Decision recorded\"],\n \"scope\": { \"market\": \"developer tools\" },\n \"nonGoals\": [\"Build the production product\"],\n \"health\": \"on_track\",\n \"targetAt\": 1760000000000,\n \"workspaceRoot\": \"/path/to/repo\"\n }\n}\n```\n\n### Update\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"status\": \"active\",\n \"health\": \"at_risk\",\n \"successCriteria\": [\"Ten interviews\", \"Evidence-backed decision\"]\n }\n}\n```\n\n### Resolve a workspace\n\nUse `autoCreate: false` for lookup. Set it to true only when creating a Project is authorized.\n\n```json\n{ \"mode\": \"project\", \"command\": \"resolve_workspace\", \"args\": { \"workspacePath\": \"/path/to/repo\", \"autoCreate\": false } }\n```\n\n### Milestones\n\nMilestone statuses: `planned`, `active`, `completed`, `cancelled`.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_milestone\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"title\": \"Finish discovery\",\n \"status\": \"active\",\n \"targetAt\": 1760000000000,\n \"sortOrder\": 10\n }\n}\n```\n\nUse `list_milestones` with `projectId`. Use `update_milestone` with both\n`projectId` and `milestoneId`. Milestone deletion is intentionally not exposed.\n\n### Immutable project updates\n\nProject updates are append-only progress snapshots. They also update Project health.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"health\": \"on_track\",\n \"summary\": \"Discovery is complete\",\n \"progress\": [\"Interviewed ten users\"],\n \"risks\": [\"Pricing remains unvalidated\"],\n \"nextSteps\": [\"Run pricing tests\"]\n }\n}\n```\n\nUse `list_updates` with `projectId` and optional `limit`. Updates cannot be edited.\n\n## Automations\n\nCommands: `list`, `get`, `create`, `update`, `delete`, `run`, `pause`,\n`resume`, and `history`.\n\nAutomation `create` automatically uses the current session Project when `projectId` is\nomitted. An explicit `projectId` takes precedence and is validated before mutation. Use an\nexplicit id when creating for a Project other than the current session Project.\n\n### Create in the current Project\n\n`trigger` and `action` use the same shapes as the Automation product API.\n\n```json\n{\n \"mode\": \"automation\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"Daily project review\",\n \"trigger\": { \"kind\": \"schedule\", \"schedule\": { \"kind\": \"cron\", \"expr\": \"0 9 * * 1-5\", \"tz\": \"Asia/Shanghai\" } },\n \"action\": { \"kind\": \"agent\", \"instruction\": \"Review the current project and summarize risks.\" }\n }\n}\n```\n\nTo override the inherited Project, add `\"projectId\": \"project_id\"` to `args`.\nThe create payload may also be nested under `args.automation`; top-level `args.projectId`\nhas precedence.\n\n### List and history\n\n`list` and unqualified `history` inherit the current session Project. Pass an explicit\n`projectId` to query another Project. Pass `automationId` to `history` for one Automation.\n\n### Update and operate\n\nUse `automationId` for `get`, `update`, `delete`, `run`, `pause`, and `resume`.\nFor `update`, patch fields may be direct args or nested under `args.patch`. Supplying a new\n`projectId` reassigns the Automation after validating the target Project.\n\n## Tasks\n\nTask locale follows the conversation response language, then the user request and profile.\nKeep every user-facing contract field (criteria, expected outputs, constraints, assumptions and risks)\nin that language, even when attached source material is English. Preserve paths, URLs and proper nouns.\nAn explicit locale must reflect the user\u2019s language choice.\n\nCommands: `list`, `get`, `create`, `delegated_tasks`, `collaboration`,\n`collaboration_post`, `update_dependencies`, `add_context`, `remove_context`,\n`command`, and `delete`.\n\nTask phases are `backlog`, `ready`, `active`, `review`, and `closed`.\nOperational state is projected separately as `idle`, `queued`, `running`, `waiting`,\n`verifying`, `succeeded`, `failed`, or `cancelled`. Never send either value as a\nfree-form status update.\n\n`task.get` returns the Task, its projected `model`, dependencies, dependents, context,\nauthority grants, TaskRuns, receipts, and waits.\nThe projected model is the correct source for current operational state and attention items.\n\n`delete` permanently removes the Task and its contracts, waits, context links, TaskRuns,\nreceipts, and Task-owned execution records. It does not delete linked Sessions, workspace files,\nor external artifacts. Cancel an active TaskRun before deletion, and use `dryRun: true` when\nthe user's intent is ambiguous.\n\n```json\n{ \"mode\": \"task\", \"command\": \"delete\", \"args\": { \"taskId\": \"task_id\" }, \"dryRun\": true }\n```\n\n### Capture or start\n\n`createMode` defaults to `capture`, which creates a backlog Task without executing it.\nUse `start` only when immediate execution is intended.\n\nFor an immediate delegated task, use the minimal call below. The objective can include the\nworker instructions and constraints; optional lists are unnecessary for a simple delegation.\n\n```json\n{ \"mode\": \"task\", \"command\": \"create\", \"args\": { \"objective\": \"Calculate the requested result and report progress\", \"createMode\": \"start\" } }\n```\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"create\",\n \"args\": {\n \"objective\": \"Complete the customer research report\",\n \"projectId\": \"project_id\",\n \"createMode\": \"capture\",\n \"priority\": \"high\",\n \"expectedOutputs\": [\"Research report\"],\n \"acceptanceCriteria\": [\"Sources are cited\"],\n \"constraints\": [\"Do not contact customers without approval\"],\n \"dependsOnTaskIds\": []\n }\n}\n```\n\n### Main Agent and worker collaboration\n\nThe user-facing Agent can call `delegated_tasks` to list Tasks created from this conversation,\nthen `collaboration` with `{ \"taskId\": \"...\", \"afterSequence\": 0 }` to read the ordered board.\nUse the Task and TaskRun receipt as the final source of execution status.\n\nUse `collaboration_post` with `taskId`, `kind`, `body`, and a stable `idempotencyKey`.\nThe main Agent may write `instruction`, `question`, or `answer`; answers include\n`causationId` of the worker's question. The worker may write `progress`, `question`,\nor `ack`; acknowledgements include `causationId` of the instruction. A worker question\npauses the active TaskRun. After posting it, stop the execution turn and wait for an answer.\nAn instruction is first recorded, then delivered to the worker conversation, and is only\nconfirmed when the worker acknowledges it. Ordinary progress does not interrupt the user.\n\n```json\n{ \"mode\": \"task\", \"command\": \"collaboration_post\", \"args\": { \"taskId\": \"task_id\", \"kind\": \"progress\", \"body\": \"Completed source review\", \"idempotencyKey\": \"stable-key\" } }\n```\n\n### Dependencies\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"update_dependencies\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"dependsOnTaskIds\": [\"dependency_task_id\"]\n }\n}\n```\n\n### Context links\n\nUse `add_context` to link a document, file, URL, session, memory, Task, artifact, or source\nas `input`, `reference`, `constraint`, `deliverable`, or `evidence` context.\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"add_context\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"targetKind\": \"file\",\n \"targetId\": \"/path/to/spec.md\",\n \"role\": \"input\",\n \"title\": \"Product specification\",\n \"pinned\": true,\n \"retrievalPolicy\": {},\n \"metadata\": {}\n }\n}\n```\n\nUse `remove_context` with `taskId` and the exact `edgeId` returned by `task.get`.\nDo not add authority grants through this tool; an Agent must not authorize itself.\n\n### Typed lifecycle commands\n\nEvery command requires `taskId`, the Task's current `expectedVersion`, a `type`, and\ntype-specific fields inside `commandArgs`.\n\nSupported command types:\n\n- `mark_ready`\n- `start`: `{ \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" } }`\n- `request_review`\n- `close`: `{ \"resolution\": \"done | cancelled | duplicate | wont_do\" }`\n- `reopen`: `{ \"phase\": \"ready | active\" }`\n- `add_wait`: `{ \"wait\": { \"kind\": \"dependency | approval | input | schedule | external | paused\", \"reason\": \"...\", \"condition\": {} } }`\n- `resolve_wait`: `{ \"waitId\": \"wait_id\", \"resolution\": {} }`\n- `delegate`: `{ \"agentId\": \"agent_id\" }`\n- `revise_contract`: `{ \"contract\": { ...complete contract... } }`\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"command\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"type\": \"start\",\n \"commandArgs\": {\n \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" }\n }\n }\n}\n```\n\nContract revision is replacement, not a patch. Read the Task and preserve all contract fields\nthe user did not ask to change. Resolve a wait through `resolve_wait`; do not directly mutate\na TaskRun or manufacture a phase transition.\n\n## TaskRuns\n\nTaskRun inspection is read-only except for explicit cancellation. Other execution state is\ncontrolled by Task commands and the runtime coordinator.\n\n### List attempts for a Task\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"list\", \"args\": { \"taskId\": \"task_id\", \"limit\": 20 } }\n```\n\nThe result contains run attempts, finalized receipts, and active waits.\n\n### Inspect one attempt\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"get\", \"args\": { \"runId\": \"run_id\" } }\n```\n\nThe result contains the TaskRun, its receipt when terminal, ordered events, and active Task waits.\n\n### Cancel an attempt\n\nRead the run first, then pass its current version. Cancellation creates a terminal receipt.\n\n```json\n{\n \"mode\": \"task_run\",\n \"command\": \"cancel\",\n \"args\": { \"runId\": \"run_id\", \"expectedVersion\": 2, \"reason\": \"User cancelled execution\" }\n}\n```\n\nDo not guess commands such as retry, force-complete, heartbeat, or transition; they are not Agent APIs.\n\n## Notes\n\nCommands: `list`, `get`, `create`, `append`, `preview_edit`, `update`, and `delete`.\nUse Notes for durable prose and reference material, not as a Task substitute. Prefer `append`\nwhen preserving user content. Use `preview_edit` before a canonical rewrite.\n\n```json\n{ \"mode\": \"note\", \"command\": \"create\", \"args\": { \"title\": \"Decision\", \"markdown\": \"...\", \"projectId\": \"project_id\" } }\n```\n\n```json\n{ \"mode\": \"note\", \"command\": \"append\", \"args\": { \"noteId\": \"note_id\", \"heading\": \"AI synthesis\", \"content\": \"...\" } }\n```\n\nUse `update` with `status: \"trashed\"` for a recoverable removal. `delete` permanently\nremoves the Note and its stored snapshots and media; use `dryRun: true` first when the\nuser's intent is ambiguous.\n\n```json\n{ \"mode\": \"note\", \"command\": \"delete\", \"args\": { \"noteId\": \"note_id\" }, \"dryRun\": true }\n```\n\n## Chat previews, local apps, and settings\n\nUse `chat_preview` by default when the user asks to design, mock up, or quickly show a UI in\nthe current conversation. It creates no Project and no Local App. Commands are `create`,\n`get`, and `revise`. Source consists of `markup`, `styles`, and optional `script`;\ndo not include a full HTML document or remote dependencies. Revision requires the exact\n`baseRevision` returned by the prior call.\n\nUse `local_app` only when the user explicitly asks for a durable, installable app or chooses\n\u201CSave as app\u201D on a chat preview. Do not create a Local App merely to render a UI draft.\n\nLocal app commands are `list`, `get`, `create`, and `validate`. Installation,\nactivation, rollback, and uninstall remain product runtime operations.\n\nSettings supports only `open` and returns an exact product jump target without changing config.\n\n## Error recovery\n\n| Result | Recovery |\n| --- | --- |\n| service unavailable | Stop retrying and report the unavailable capability. |\n| not found | Re-list in the intended scope; do not invent another id. |\n| conflict | Read the current object and reassess using its latest version. |\n| waiting | Inspect the Task projection and TaskRun waits; resolve only the real blocker. |\n| invalid command or state | Read the object and use only a documented transition. |\n| unsupported operation | Use the dedicated tool or product UI; never write storage directly. |\n\n## Deliberate boundaries\n\n- Project deletion and milestone deletion are not Agent APIs.\n- TaskRun mutation is internal to execution coordination except for optimistic cancellation.\n- Project updates are immutable.\n- Automation operations remain in their dedicated tools.\n- Only the documented Task and TaskRun commands are valid; do not infer hidden aliases.\n";
|
|
1
|
+
export declare const xopcUseManual = "# XOPC Use Tool Manual\n\n## Purpose\n\n`xopc_use` operates first-class XOPC product objects without editing SQLite or product files directly.\nLoad this manual before a non-trivial mutation. For focused configuration workflows use\n`tool_manual({tool:\"xopc_use\",topic:\"agent|settings|automation|connections\"})`.\nFor identity-only changes prefer `agent patch_profile {id,expectedRevision,patch,idempotencyKey?}`,\nwhich preserves omitted profile fields. Existing update keeps replacement semantics for profile.\n\n```json\n{\n \"mode\": \"agent | project | automation | note | task | task_run | chat_preview | local_app | settings\",\n \"command\": \"...\",\n \"args\": {},\n \"dryRun\": false\n}\n```\n\nSend one object command per call. Inspect the returned JSON `ok` field; a tool call can\ncomplete successfully while the product command returns `ok: false`.\n\n## Object routing\n\n| Object | Tool |\n| --- | --- |\n| Agent definition and default Agent | `xopc_use` mode `agent` |\n| Project, milestone, project update | `xopc_use` mode `project` |\n| Automation | `xopc_use` mode `automation` |\n| Task intent and lifecycle | `xopc_use` mode `task` |\n| Task execution attempt, receipt, events and waits | `xopc_use` mode `task_run` |\n| Note | `xopc_use` mode `note` |\n| Lightweight UI preview | `xopc_use` mode `chat_preview` |\n| Local app | `xopc_use` mode `local_app` |\n| Settings jump target | `xopc_use` mode `settings` |\n| Session, memory, skill, connected app or workspace file | its dedicated tool |\n\nA Task is durable intent; a TaskRun is one execution attempt.\n\n## Agents\n\nCommands: `list`, `get`, `create`, `update`, `set_default`, `disable`,\n`delete`, and `purge`.\n\nAn Agent profile stores `name` and optional `description`, `creature`, `style`, `language`,\n`emoji`, and `avatar` identity fields. Use `instructions` for short execution rules.\nPut personality in SOUL.md and ongoing work guidance in AGENTS.md.\n\n```json\n{\n \"mode\": \"agent\",\n \"command\": \"create\",\n \"args\": {\n \"id\": \"xiaomei\",\n \"profile\": {\n \"name\": \"\u5C0F\u7F8E\",\n \"description\": \"\u5E2E\u52A9\u6574\u7406\u65E5\u5E38\u4E8B\u9879\",\n \"language\": \"zh-CN\",\n \"style\": \"\u6E29\u67D4\u3001\u4EB2\u5207\",\n \"instructions\": \"\u7ED9\u51FA\u64CD\u4F5C\u5EFA\u8BAE\u524D\u5148\u6838\u5BF9\u5173\u952E\u4E8B\u5B9E\u3002\"\n },\n \"idempotencyKey\": \"create-agent-xiaomei\"\n }\n}\n```\n\nUse `list` before creating an Agent so an existing id is updated rather than duplicated.\nMutations other than `create` require the current `expectedRevision`; `set_default` uses\nthe catalog revision returned by `list`. `delete` preserves on-disk data, while `purge`\nalso removes it. Use `dryRun: true` to validate the exact same input contract without writing.\n\n## Reliable protocol\n\n1. Use `list` then `get` when an id is unknown.\n2. Read the current `version` before a Task mutation.\n3. Use `dryRun: true` for broad Project changes or uncertain mutations.\n4. Mutate once with the exact id and current concurrency token.\n5. Verify the returned object and preserve any \u201COpen in xopc\u201D delivery link.\n6. On a conflict, read again and reconsider the operation; do not blindly retry.\n\nTimestamps are Unix epoch milliseconds. Array fields are arrays of strings. Omission\npreserves a patchable field; an empty array intentionally clears it. Prefer explicit\n`projectId`, `taskId`, `runId`, `noteId`, and `localAppId` fields over `id`.\n\n## Projects\n\nCommands: `list`, `get`, `create`, `update`, `resolve_workspace`,\n`list_milestones`, `create_milestone`, `update_milestone`, `list_updates`,\nand `create_update`.\n\nProject statuses: `planned`, `active`, `paused`, `completed`, `cancelled`,\n`archived`. Health values: `unknown`, `on_track`, `at_risk`, `off_track`.\n\nA Project defines bounded shared context for related work. Its durable planning fields are `outcome`,\n`successCriteria`, `scope`, `nonGoals`, `ownerId`, `targetAt`, and `health`.\nUse `brief` for a concise description and `instructions` for durable operating guidance.\n\n### Create\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"AI Product Research\",\n \"outcome\": \"Choose a validated product direction\",\n \"successCriteria\": [\"Ten customer interviews\", \"Decision recorded\"],\n \"scope\": { \"market\": \"developer tools\" },\n \"nonGoals\": [\"Build the production product\"],\n \"health\": \"on_track\",\n \"targetAt\": 1760000000000,\n \"workspaceRoot\": \"/path/to/repo\"\n }\n}\n```\n\n### Update\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"status\": \"active\",\n \"health\": \"at_risk\",\n \"successCriteria\": [\"Ten interviews\", \"Evidence-backed decision\"]\n }\n}\n```\n\n### Resolve a workspace\n\nUse `autoCreate: false` for lookup. Set it to true only when creating a Project is authorized.\n\n```json\n{ \"mode\": \"project\", \"command\": \"resolve_workspace\", \"args\": { \"workspacePath\": \"/path/to/repo\", \"autoCreate\": false } }\n```\n\n### Milestones\n\nMilestone statuses: `planned`, `active`, `completed`, `cancelled`.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_milestone\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"title\": \"Finish discovery\",\n \"status\": \"active\",\n \"targetAt\": 1760000000000,\n \"sortOrder\": 10\n }\n}\n```\n\nUse `list_milestones` with `projectId`. Use `update_milestone` with both\n`projectId` and `milestoneId`. Milestone deletion is intentionally not exposed.\n\n### Immutable project updates\n\nProject updates are append-only progress snapshots. They also update Project health.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"health\": \"on_track\",\n \"summary\": \"Discovery is complete\",\n \"progress\": [\"Interviewed ten users\"],\n \"risks\": [\"Pricing remains unvalidated\"],\n \"nextSteps\": [\"Run pricing tests\"]\n }\n}\n```\n\nUse `list_updates` with `projectId` and optional `limit`. Updates cannot be edited.\n\n## Automations\n\nCommands: `list`, `get`, `create`, `update`, `delete`, `run`, `pause`,\n`resume`, and `history`.\n\nAutomation `create` automatically uses the current session Project when `projectId` is\nomitted. An explicit `projectId` takes precedence and is validated before mutation. Use an\nexplicit id when creating for a Project other than the current session Project.\n\n### Create in the current Project\n\n`trigger` and `action` use the same shapes as the Automation product API.\n\n```json\n{\n \"mode\": \"automation\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"Daily project review\",\n \"trigger\": { \"kind\": \"schedule\", \"schedule\": { \"kind\": \"cron\", \"expr\": \"0 9 * * 1-5\", \"tz\": \"Asia/Shanghai\" } },\n \"action\": { \"kind\": \"agent\", \"instruction\": \"Review the current project and summarize risks.\" }\n }\n}\n```\n\nTo override the inherited Project, add `\"projectId\": \"project_id\"` to `args`.\nThe create payload may also be nested under `args.automation`; top-level `args.projectId`\nhas precedence.\n\n### List and history\n\n`list` and unqualified `history` inherit the current session Project. Pass an explicit\n`projectId` to query another Project. Pass `automationId` to `history` for one Automation.\n\n### Update and operate\n\nUse `automationId` for `get`, `update`, `delete`, `run`, `pause`, and `resume`.\nFor `update`, patch fields may be direct args or nested under `args.patch`. Supplying a new\n`projectId` reassigns the Automation after validating the target Project.\n\n## Tasks\n\nTask locale follows the conversation response language, then the user request and profile.\nKeep every user-facing contract field (criteria, expected outputs, constraints, assumptions and risks)\nin that language, even when attached source material is English. Preserve paths, URLs and proper nouns.\nAn explicit locale must reflect the user\u2019s language choice.\n\nCommands: `list`, `get`, `create`, `delegated_tasks`, `collaboration`,\n`collaboration_post`, `update_dependencies`, `add_context`, `remove_context`,\n`command`, and `delete`.\n\nTask phases are `backlog`, `ready`, `active`, `review`, and `closed`.\nOperational state is projected separately as `idle`, `queued`, `running`, `waiting`,\n`verifying`, `succeeded`, `failed`, or `cancelled`. Never send either value as a\nfree-form status update.\n\n`task.get` returns the Task, its projected `model`, dependencies, dependents, context,\nauthority grants, TaskRuns, receipts, and waits.\nThe projected model is the correct source for current operational state and attention items.\n\n`delete` permanently removes the Task and its contracts, waits, context links, TaskRuns,\nreceipts, and Task-owned execution records. It does not delete linked Sessions, workspace files,\nor external artifacts. Cancel an active TaskRun before deletion, and use `dryRun: true` when\nthe user's intent is ambiguous.\n\n```json\n{ \"mode\": \"task\", \"command\": \"delete\", \"args\": { \"taskId\": \"task_id\" }, \"dryRun\": true }\n```\n\n### Capture or start\n\n`createMode` defaults to `capture`, which creates a backlog Task without executing it.\nUse `start` only when immediate execution is intended.\nTask acceptance defaults to `verified_auto`: verify the results and close automatically when all criteria pass.\nPass `acceptancePolicy: \"manual\"` only when the user explicitly requires human acceptance.\n\nFor an immediate delegated task, use the minimal call below. The objective can include the\nworker instructions and constraints; optional lists are unnecessary for a simple delegation.\n\n```json\n{ \"mode\": \"task\", \"command\": \"create\", \"args\": { \"objective\": \"Calculate the requested result and report progress\", \"createMode\": \"start\" } }\n```\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"create\",\n \"args\": {\n \"objective\": \"Complete the customer research report\",\n \"projectId\": \"project_id\",\n \"createMode\": \"capture\",\n \"priority\": \"high\",\n \"expectedOutputs\": [\"Research report\"],\n \"acceptanceCriteria\": [\"Sources are cited\"],\n \"acceptancePolicy\": \"verified_auto\",\n \"constraints\": [\"Do not contact customers without approval\"],\n \"dependsOnTaskIds\": []\n }\n}\n```\n\n### Main Agent and worker collaboration\n\nThe user-facing Agent can call `delegated_tasks` to list Tasks created from this conversation,\nthen `collaboration` with `{ \"taskId\": \"...\", \"afterSequence\": 0 }` to read the ordered board.\nUse the Task and TaskRun receipt as the final source of execution status.\n\nUse `collaboration_post` with `taskId`, `kind`, `body`, and a stable `idempotencyKey`.\nThe main Agent may write `instruction`, `question`, or `answer`; answers include\n`causationId` of the worker's question. The worker may write `progress`, `question`,\nor `ack`; acknowledgements include `causationId` of the instruction. A worker question\npauses the active TaskRun. After posting it, stop the execution turn and wait for an answer.\nAn instruction is first recorded, then delivered to the worker conversation, and is only\nconfirmed when the worker acknowledges it. Ordinary progress does not interrupt the user.\n\n```json\n{ \"mode\": \"task\", \"command\": \"collaboration_post\", \"args\": { \"taskId\": \"task_id\", \"kind\": \"progress\", \"body\": \"Completed source review\", \"idempotencyKey\": \"stable-key\" } }\n```\n\n### Dependencies\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"update_dependencies\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"dependsOnTaskIds\": [\"dependency_task_id\"]\n }\n}\n```\n\n### Context links\n\nUse `add_context` to link a document, file, URL, session, memory, Task, artifact, or source\nas `input`, `reference`, `constraint`, `deliverable`, or `evidence` context.\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"add_context\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"targetKind\": \"file\",\n \"targetId\": \"/path/to/spec.md\",\n \"role\": \"input\",\n \"title\": \"Product specification\",\n \"pinned\": true,\n \"retrievalPolicy\": {},\n \"metadata\": {}\n }\n}\n```\n\nUse `remove_context` with `taskId` and the exact `edgeId` returned by `task.get`.\nDo not add authority grants through this tool; an Agent must not authorize itself.\n\n### Typed lifecycle commands\n\nEvery command requires `taskId`, the Task's current `expectedVersion`, a `type`, and\ntype-specific fields inside `commandArgs`.\n\nSupported command types:\n\n- `mark_ready`\n- `start`: `{ \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" } }`\n- `request_review`\n- `close`: `{ \"resolution\": \"done | cancelled | duplicate | wont_do\" }`\n- `reopen`: `{ \"phase\": \"ready | active\" }`\n- `add_wait`: `{ \"wait\": { \"kind\": \"dependency | approval | input | schedule | external | paused\", \"reason\": \"...\", \"condition\": {} } }`\n- `resolve_wait`: `{ \"waitId\": \"wait_id\", \"resolution\": {} }`\n- `delegate`: `{ \"agentId\": \"agent_id\" }`\n- `revise_contract`: `{ \"contract\": { ...complete contract... } }`\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"command\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"type\": \"start\",\n \"commandArgs\": {\n \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" }\n }\n }\n}\n```\n\nContract revision is replacement, not a patch. Read the Task and preserve all contract fields\nthe user did not ask to change. Resolve a wait through `resolve_wait`; do not directly mutate\na TaskRun or manufacture a phase transition.\n\n## TaskRuns\n\nTaskRun inspection is read-only except for explicit cancellation. Other execution state is\ncontrolled by Task commands and the runtime coordinator.\n\n### List attempts for a Task\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"list\", \"args\": { \"taskId\": \"task_id\", \"limit\": 20 } }\n```\n\nThe result contains run attempts, finalized receipts, and active waits.\n\n### Inspect one attempt\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"get\", \"args\": { \"runId\": \"run_id\" } }\n```\n\nThe result contains the TaskRun, its receipt when terminal, ordered events, and active Task waits.\n\n### Cancel an attempt\n\nRead the run first, then pass its current version. Cancellation creates a terminal receipt.\n\n```json\n{\n \"mode\": \"task_run\",\n \"command\": \"cancel\",\n \"args\": { \"runId\": \"run_id\", \"expectedVersion\": 2, \"reason\": \"User cancelled execution\" }\n}\n```\n\nDo not guess commands such as retry, force-complete, heartbeat, or transition; they are not Agent APIs.\n\n## Notes\n\nCommands: `list`, `get`, `create`, `append`, `preview_edit`, `update`, and `delete`.\nUse Notes for durable prose and reference material, not as a Task substitute. Prefer `append`\nwhen preserving user content. Use `preview_edit` before a canonical rewrite.\n\n```json\n{ \"mode\": \"note\", \"command\": \"create\", \"args\": { \"title\": \"Decision\", \"markdown\": \"...\", \"projectId\": \"project_id\" } }\n```\n\n```json\n{ \"mode\": \"note\", \"command\": \"append\", \"args\": { \"noteId\": \"note_id\", \"heading\": \"AI synthesis\", \"content\": \"...\" } }\n```\n\nUse `update` with `status: \"trashed\"` for a recoverable removal. `delete` permanently\nremoves the Note and its stored snapshots and media; use `dryRun: true` first when the\nuser's intent is ambiguous.\n\n```json\n{ \"mode\": \"note\", \"command\": \"delete\", \"args\": { \"noteId\": \"note_id\" }, \"dryRun\": true }\n```\n\n## Chat previews, local apps, and settings\n\nUse `chat_preview` by default when the user asks to design, mock up, or quickly show a UI in\nthe current conversation. It creates no Project and no Local App. Commands are `create`,\n`get`, and `revise`. Source consists of `markup`, `styles`, and optional `script`;\ndo not include a full HTML document or remote dependencies. Revision requires the exact\n`baseRevision` returned by the prior call.\n\nUse `local_app` only when the user explicitly asks for a durable, installable app or chooses\n\u201CSave as app\u201D on a chat preview. Do not create a Local App merely to render a UI draft.\n\nLocal app commands are `list`, `get`, `create`, and `validate`. Installation,\nactivation, rollback, and uninstall remain product runtime operations.\n\nSettings supports only `open` and returns an exact product jump target without changing config.\n\n## Error recovery\n\n| Result | Recovery |\n| --- | --- |\n| service unavailable | Stop retrying and report the unavailable capability. |\n| not found | Re-list in the intended scope; do not invent another id. |\n| conflict | Read the current object and reassess using its latest version. |\n| waiting | Inspect the Task projection and TaskRun waits; resolve only the real blocker. |\n| invalid command or state | Read the object and use only a documented transition. |\n| unsupported operation | Use the dedicated tool or product UI; never write storage directly. |\n\n## Deliberate boundaries\n\n- Project deletion and milestone deletion are not Agent APIs.\n- TaskRun mutation is internal to execution coordination except for optimistic cancellation.\n- Project updates are immutable.\n- Automation operations remain in their dedicated tools.\n- Only the documented Task and TaskRun commands are valid; do not infer hidden aliases.\n";
|
|
@@ -253,6 +253,8 @@ the user's intent is ambiguous.
|
|
|
253
253
|
|
|
254
254
|
\`createMode\` defaults to \`capture\`, which creates a backlog Task without executing it.
|
|
255
255
|
Use \`start\` only when immediate execution is intended.
|
|
256
|
+
Task acceptance defaults to \`verified_auto\`: verify the results and close automatically when all criteria pass.
|
|
257
|
+
Pass \`acceptancePolicy: "manual"\` only when the user explicitly requires human acceptance.
|
|
256
258
|
|
|
257
259
|
For an immediate delegated task, use the minimal call below. The objective can include the
|
|
258
260
|
worker instructions and constraints; optional lists are unnecessary for a simple delegation.
|
|
@@ -272,6 +274,7 @@ worker instructions and constraints; optional lists are unnecessary for a simple
|
|
|
272
274
|
"priority": "high",
|
|
273
275
|
"expectedOutputs": ["Research report"],
|
|
274
276
|
"acceptanceCriteria": ["Sources are cited"],
|
|
277
|
+
"acceptancePolicy": "verified_auto",
|
|
275
278
|
"constraints": ["Do not contact customers without approval"],
|
|
276
279
|
"dependsOnTaskIds": []
|
|
277
280
|
}
|
|
@@ -369,6 +369,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
369
369
|
} });
|
|
370
370
|
if (personalExecution || personalExecutionMarker) {
|
|
371
371
|
allowed = new Set(PERSONAL_REQUEST_TOOL_IDS.slice(0, 3).filter((name) => !allowed || allowed.has(name)));
|
|
372
|
+
allowed.add("publish_task_result");
|
|
372
373
|
allowed.add("personal_request_result");
|
|
373
374
|
allowed.add("personal_request_connection");
|
|
374
375
|
allowed.add("task_collaboration");
|
|
@@ -3,8 +3,8 @@ import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-ru
|
|
|
3
3
|
import { init_request_repository, personalRequestForExecution } from "../../personal-agent/request-repository.js";
|
|
4
4
|
import { assertPersonalRequestAccountAccess } from "../../personal-agent/request-access.js";
|
|
5
5
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
6
|
-
import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
7
6
|
import { PersonalRequestResultSchema } from "../../personal-agent/request-result.js";
|
|
7
|
+
import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
9
|
//#region src/agent/tools/personal-request-result-tool.ts
|
|
10
10
|
init_transaction();
|
|
@@ -69,7 +69,7 @@ function createPersonalRequestResultTool(conversationId) {
|
|
|
69
69
|
return {
|
|
70
70
|
content: [{
|
|
71
71
|
type: "text",
|
|
72
|
-
text: "Result saved for delivery to the originating chat after this Task completes."
|
|
72
|
+
text: "Result saved for delivery to the originating chat after this Task completes. Now call publish_task_result with source excerpts from successful xopc_tool_execute reads and claims supporting this saved summary, items and coverage. Correct any failed checks before finishing."
|
|
73
73
|
}],
|
|
74
74
|
details: {}
|
|
75
75
|
};
|
|
@@ -59,6 +59,7 @@ const RequestSchema = Type.Object({
|
|
|
59
59
|
maxLength: 16e3,
|
|
60
60
|
description: "Complete task brief preserving all user requirements, stages, inputs, outputs and constraints. Do not replace exact specifications with a short objective or a reference to an unspecified process."
|
|
61
61
|
})),
|
|
62
|
+
acceptancePolicy: Type.Optional(Type.Union([Type.Literal("verified_auto"), Type.Literal("manual")], { description: "Default automatic verification and completion. Use manual only for an explicit user requirement for human acceptance." })),
|
|
62
63
|
objective: Type.Optional(Type.String({
|
|
63
64
|
minLength: 1,
|
|
64
65
|
maxLength: 4e3
|
|
@@ -191,13 +192,15 @@ function createPersonalRequestTools(deps) {
|
|
|
191
192
|
objective: input.objective.trim(),
|
|
192
193
|
description: input.description?.trim(),
|
|
193
194
|
timeRange: input.timeRange,
|
|
195
|
+
acceptancePolicy: input.acceptancePolicy,
|
|
194
196
|
idempotencyKey: input.idempotencyKey ?? `personal-request-submit:${selectionRequestHash({
|
|
195
197
|
inputId: getSessionInputState(conversationId).activeInputId ?? toolCallId,
|
|
196
198
|
objective: input.objective.trim(),
|
|
197
199
|
description: input.description?.trim(),
|
|
198
200
|
connectorId: input.connectorId,
|
|
199
201
|
accountId: input.accountId,
|
|
200
|
-
timeRange: input.timeRange
|
|
202
|
+
timeRange: input.timeRange,
|
|
203
|
+
acceptancePolicy: input.acceptancePolicy
|
|
201
204
|
})}`
|
|
202
205
|
});
|
|
203
206
|
publishPersonalRequest(request);
|
|
@@ -24,6 +24,7 @@ declare const PersonalTaskModelSchema: import("@sinclair/typebox").TObject<{
|
|
|
24
24
|
objective: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25
25
|
expectedOutputs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
26
26
|
constraints: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
27
|
+
acceptancePolicy: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"verified_auto">, import("@sinclair/typebox").TLiteral<"manual">]>>;
|
|
27
28
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
28
29
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
29
30
|
section: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>>;
|
|
@@ -113,6 +113,7 @@ const PersonalTaskSchema = Type.Object({
|
|
|
113
113
|
].map((value) => Type.Literal(value)))),
|
|
114
114
|
questionId: Type.Optional(Type.String({ description: "Collaboration question ID to answer." })),
|
|
115
115
|
expectedOutputs: Type.Optional(Type.Array(Type.String())),
|
|
116
|
+
acceptancePolicy: Type.Optional(Type.Union([Type.Literal("verified_auto"), Type.Literal("manual")], { description: "Defaults to automatic verification and completion. Use manual only when the user explicitly requests human acceptance." })),
|
|
116
117
|
acceptanceCriteria: Type.Optional(Type.Array(Type.String())),
|
|
117
118
|
constraints: Type.Optional(Type.Array(Type.String())),
|
|
118
119
|
requiredSkills: Type.Optional(Type.Array(Type.String({
|
|
@@ -361,6 +362,7 @@ function createPersonalTaskTool(deps) {
|
|
|
361
362
|
sourceRefs: modelInput.sourceRefs,
|
|
362
363
|
expectedOutputs: input.expectedOutputs,
|
|
363
364
|
acceptanceCriteria: input.acceptanceCriteria,
|
|
365
|
+
acceptancePolicy: input.acceptancePolicy,
|
|
364
366
|
constraints: input.constraints
|
|
365
367
|
});
|
|
366
368
|
command = "create";
|
|
@@ -372,6 +374,7 @@ function createPersonalTaskTool(deps) {
|
|
|
372
374
|
includeConversationContext: false,
|
|
373
375
|
expectedOutputs: input.expectedOutputs,
|
|
374
376
|
acceptanceCriteria: input.acceptanceCriteria,
|
|
377
|
+
acceptancePolicy: input.acceptancePolicy,
|
|
375
378
|
constraints: input.constraints,
|
|
376
379
|
idempotencyKey: `personal-submit:${conversationId}:${selectionRequestHash(submissionKey)}`
|
|
377
380
|
};
|
|
@@ -455,6 +458,7 @@ function createPersonalTaskTool(deps) {
|
|
|
455
458
|
includeConversationContext: false,
|
|
456
459
|
expectedOutputs: input.expectedOutputs,
|
|
457
460
|
acceptanceCriteria: input.acceptanceCriteria,
|
|
461
|
+
acceptancePolicy: input.acceptancePolicy,
|
|
458
462
|
constraints: input.constraints,
|
|
459
463
|
idempotencyKey: key
|
|
460
464
|
};
|
|
@@ -179,7 +179,16 @@ function createTaskCollaborationTool(deps) {
|
|
|
179
179
|
const { tools } = taskResearchEvidence(conversationId);
|
|
180
180
|
if (input.toolCallId) {
|
|
181
181
|
const tool = tools.find((item) => item.toolCallId === input.toolCallId);
|
|
182
|
-
if (!tool) throw new Error(
|
|
182
|
+
if (!tool) throw new Error(JSON.stringify({
|
|
183
|
+
code: "evidence_read_not_found",
|
|
184
|
+
message: "Successful evidence read not found in this execution",
|
|
185
|
+
toolCallId: input.toolCallId,
|
|
186
|
+
recovery: "List section=evidence without toolCallId and use an exact returned ID. Only successful source reads from the current TaskRun qualify; evidence listing/replay calls are not new sources. Older Codemode call metadata may have no persisted output; use an available original source read instead. Do not retry the same missing ID.",
|
|
187
|
+
availableReads: tools.slice(-10).map(({ toolCallId, toolName }) => ({
|
|
188
|
+
toolCallId,
|
|
189
|
+
toolName
|
|
190
|
+
}))
|
|
191
|
+
}));
|
|
183
192
|
return reply({
|
|
184
193
|
toolCallId: tool.toolCallId,
|
|
185
194
|
toolName: tool.toolName,
|
|
@@ -19,6 +19,7 @@ function withTaskEvidenceIdentity(tool) {
|
|
|
19
19
|
...tool,
|
|
20
20
|
execute: async (...args) => {
|
|
21
21
|
const result = await tool.execute(args[0], args[1], args[2], args[3]);
|
|
22
|
+
if (tool.name === "task_collaboration" && !result.details?.taskSourceRead) return result;
|
|
22
23
|
const artifacts = tool.name === "publish_artifacts" ? result.details?.artifacts : void 0;
|
|
23
24
|
const receipt = artifacts ? [{
|
|
24
25
|
type: "text",
|
|
@@ -1440,6 +1440,15 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1440
1440
|
};
|
|
1441
1441
|
contract[field] = value;
|
|
1442
1442
|
}
|
|
1443
|
+
const acceptancePolicy = args.acceptancePolicy ?? "verified_auto";
|
|
1444
|
+
if (![
|
|
1445
|
+
"verified_auto",
|
|
1446
|
+
"verified_then_review",
|
|
1447
|
+
"manual"
|
|
1448
|
+
].includes(String(acceptancePolicy))) return {
|
|
1449
|
+
ok: false,
|
|
1450
|
+
error: "Invalid acceptancePolicy"
|
|
1451
|
+
};
|
|
1443
1452
|
const originConversationId = deps.getCurrentConversationId?.();
|
|
1444
1453
|
const conversationId = trimString(args.conversationId) ?? originConversationId;
|
|
1445
1454
|
const config = deps.getConfig?.();
|
|
@@ -1491,7 +1500,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1491
1500
|
locale: taskLocale,
|
|
1492
1501
|
contract: {
|
|
1493
1502
|
...contract,
|
|
1494
|
-
acceptancePolicy
|
|
1503
|
+
acceptancePolicy,
|
|
1495
1504
|
outputDestinations: []
|
|
1496
1505
|
},
|
|
1497
1506
|
dependencies: dependsOnTaskIds,
|
|
@@ -132,12 +132,12 @@ export declare const AutomationCreateCapabilityInputSchema: z.ZodObject<{
|
|
|
132
132
|
approvalRequired: z.ZodArray<z.ZodString>;
|
|
133
133
|
assumptions: z.ZodArray<z.ZodString>;
|
|
134
134
|
risks: z.ZodArray<z.ZodString>;
|
|
135
|
-
|
|
135
|
+
outputDestinations: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
136
|
+
acceptancePolicy: z.ZodDefault<z.ZodEnum<{
|
|
136
137
|
verified_auto: "verified_auto";
|
|
137
138
|
verified_then_review: "verified_then_review";
|
|
138
139
|
manual: "manual";
|
|
139
|
-
}
|
|
140
|
-
outputDestinations: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
140
|
+
}>>;
|
|
141
141
|
}, z.core.$strip>;
|
|
142
142
|
}, z.core.$strip>], "type">;
|
|
143
143
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -361,12 +361,12 @@ export declare const AutomationUpdatePatchSchema: z.ZodObject<{
|
|
|
361
361
|
approvalRequired: z.ZodArray<z.ZodString>;
|
|
362
362
|
assumptions: z.ZodArray<z.ZodString>;
|
|
363
363
|
risks: z.ZodArray<z.ZodString>;
|
|
364
|
-
|
|
364
|
+
outputDestinations: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
365
|
+
acceptancePolicy: z.ZodDefault<z.ZodEnum<{
|
|
365
366
|
verified_auto: "verified_auto";
|
|
366
367
|
verified_then_review: "verified_then_review";
|
|
367
368
|
manual: "manual";
|
|
368
|
-
}
|
|
369
|
-
outputDestinations: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
369
|
+
}>>;
|
|
370
370
|
}, z.core.$strip>;
|
|
371
371
|
}, z.core.$strip>], "type">;
|
|
372
372
|
}, z.core.$strict>, z.ZodObject<{
|