@xopcai/xopc 0.0.232 → 0.0.233
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/{activity-store-VXCWz43N.js → activity-store-DQ5L3PTi.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BXRaZYW8.js → agent-avatar-dicebear-Bps8fvBp.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-dR7HMaRX.js → agent-defaults-settings-panel-JrK80PvP.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-Bileycwe.js → agents-CJYEnz94.js} +1 -1
- package/dist/gateway/static/root/assets/{api-wGPgL8xY.js → api-DE6tZKG0.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BJfClfPx.js → app-management-settings-panel-BryzDVod.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-C_R0vUAu.js → appearance-settings-BoweLBDm.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-Bt8_sWtU.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-DnFHkSHE.js → archive-plugin-DyujzZNu.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DZrEwytM.js → attachment-load-DmXGUWve.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-BDTD8YUe.js +12 -0
- package/dist/gateway/static/root/assets/{automations-page-DpkKajui.js → automations-page-DrTVSK7o.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-86UTesz3.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-Ckc_Csue.js → binary-plugins-mFyeC74W.js} +2 -2
- package/dist/gateway/static/root/assets/{block-editor-DAC6w-iV.js → block-editor-D5yMFrgH.js} +3 -3
- package/dist/gateway/static/root/assets/browser-settings-page-DfMU7yXv.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-BGd7R8GO.js → browser-workflow-inputs-B6rLBtua.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-DUfj7ntM.js → browser-workflows-page-C74sg50f.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-lsHRuBlX.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-CxR_clkO.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-CfboECLt.js → channels-status-swr-DowVNjNw.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CA9fndbZ.js → chat-terminal-dock-BO6_BgjE.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CpNLyKB4.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-CqPu7HYJ.js → cron-expression-CYMXfk4M.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-C8dJsCgk.js → date-picker-DIM_OkQP.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Iz2wYimy.js → dependency-picker-Cp8I6rsL.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-YfeVVzLe.js → desktop-pet-settings-NjPiz3M_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-C3h40FmG.js → desktop-pet-wzSzZ6S8.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CChgztz_.js → extension-debug-page-CoMl13ET.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DF6ct6_y.js → extension-page-CXc1Lc8x.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-jgBsjn0F.js → extension-settings-page-CfEWpgjl.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-CVajuIGL.js → gateway-config-api-yH4KAEkK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BGQn8duh.js → gateway-config-swr-YyZJKvFf.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BbssNGid.js → gateway-settings-BmjJIiKh.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-D2Rnh9fX.js → gateway-startup-retry-Dnrl91pU.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CJtXu8iD.js → heartbeat-settings-DGq9q4b6.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-Dj4B1wb3.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D7W2p5_8.js → image-generation-api-BNzAAw4Y.js} +1 -1
- package/dist/gateway/static/root/assets/index-BGf-TiZj.js +70 -0
- package/dist/gateway/static/root/assets/index-BTUuTnc9.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BvHYyNus.js → keyboard-shortcuts-settings-CfNV1ysF.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-IJg75WaN.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Cb8t2wWM.js → local-apps-page-MPd4Fl_l.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DLwVxS3V.js → locale-store-D_dq_0LV.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-NsfoazgK.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-B8Jie4-J.js → management-settings-DeIjN4e0.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-BD1r4o2i.js → markdown-split-BUAVv6Gu.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-CPkBOY3h.js +201 -0
- package/dist/gateway/static/root/assets/{media-plugins-BCev8fkW.js → media-plugins-DFsVnOY-.js} +1 -1
- package/dist/gateway/static/root/assets/messages-D4qOHT4D.js +3 -0
- package/dist/gateway/static/root/assets/{mobile-device-api-DACoHhhk.js → mobile-device-api-D9JevyCE.js} +1 -1
- package/dist/gateway/static/root/assets/models-hub-cache-C5y2gzMU.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-DEdNKw0I.js → notes-api-BWSfTP1w.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-BBTLjJwa.js → notes-page-CV8UJj7g.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-DrjMVgEI.js +4 -0
- package/dist/gateway/static/root/assets/{oauth-api-BNCO2YK5.js → oauth-api-DnanEBsf.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-fEBbRekH.js → product-open-page-zNg1KOy2.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-tfcGYL-O.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-dHDXpMCg.js → projects-page-BkjnXLdJ.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Cvr4Qm7N.js → registry-api-BeVzfRvs.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BXn-3n2d.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BT5B74IH.js → runtime-tools-settings-panel-BxoioSvT.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-C4tB34S5.js → schema-form-vzbmscrE.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-MLNjrOkw.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-ByNLBY2q.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-D1oXhkgI.js → settings-form-section-x9k7MWD3.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-CldfX6FJ.js → settings-loading-skeleton-BLFOD9h9.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-c3LJnbvE.js → settings-page-CwgTooar.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-bnueBZg8.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DptCK_mk.js → share-preview-page-COTrPAd-.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-D-v_psqL.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DJICr4wh.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-OHBeBtSg.js → skills-page-D9wM6_Jn.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-B9WZbOLC.js → skills-page.utils-PtlQLM5a.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Dj_DpOGw.js → system-settings-panel-BR74mNEK.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-B-rmeE8t.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-Cpd3Gd5R.js → theme-store-Bud54q9e.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DCl5Yq7N.js → use-autosave-DH47MH7s.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-B6eyxxOT.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BB_ZQV8F.js → voice-api-key-field-B59GaqRa.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-BNiYmpl5.js → voice-config-api-C0ahrZ0e.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BrIdtdum.js → work-discovery-overlay-DTn4RCcx.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-hKh-uCLo.js → workflow-run-setup-panel-yDFoEX06.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BOwSbfWm.js +5 -0
- package/dist/gateway/static/root/index.html +13 -13
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +162 -2
- package/dist/packages/gateway-contract/src/product-delivery.js +6 -2
- package/dist/packages/gateway-contract/src/turn-outcome.js +77 -1
- package/dist/src/agent/capabilities/definitions.d.ts +1 -1
- package/dist/src/agent/capabilities/definitions.js +2 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +5 -1
- package/dist/src/agent/prompt/sections/tooling.js +5 -0
- package/dist/src/agent/tools/create-share-tool.js +2 -1
- package/dist/src/agent/tools/exec-command.js +2 -1
- package/dist/src/agent/tools/factory.js +2 -0
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +2 -1
- package/dist/src/agent/tools/publish-artifacts.d.ts +2 -0
- package/dist/src/agent/tools/publish-artifacts.js +82 -0
- package/dist/src/agent/tools/send-media.js +2 -1
- package/dist/src/cli/command-catalog.js +4 -0
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-manifest.js +4 -0
- package/dist/src/cli/commands/auth.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/commands/providers.js +1 -1
- package/dist/src/cli/commands/support.d.ts +1 -0
- package/dist/src/cli/commands/support.js +51 -0
- package/dist/src/endpoint-tools/binding-service.d.ts +22 -0
- package/dist/src/endpoint-tools/binding-service.js +45 -0
- package/dist/src/endpoint-tools/index.d.ts +1 -0
- package/dist/src/endpoint-tools/index.js +2 -1
- package/dist/src/endpoint-tools/invocation-service.d.ts +1 -0
- package/dist/src/endpoint-tools/invocation-service.js +8 -0
- package/dist/src/endpoint-tools/policy.d.ts +4 -1
- package/dist/src/endpoint-tools/policy.js +68 -5
- package/dist/src/endpoint-tools/registry.js +1 -1
- package/dist/src/endpoint-tools/runtime.d.ts +2 -0
- package/dist/src/endpoint-tools/runtime.js +8 -0
- package/dist/src/files/file-service.js +14 -5
- package/dist/src/gateway/chat-stream/turn-outcome-collector.js +41 -6
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/middleware/auth.js +3 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.js +68 -1
- package/dist/src/gateway/hono/routes/files.js +7 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/media.js +46 -2
- package/dist/src/gateway/hono/routes/support.d.ts +3 -0
- package/dist/src/gateway/hono/routes/support.js +28 -0
- package/dist/src/gateway/hono/routes/you.js +24 -0
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/media/store.js +9 -0
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.d.ts +8 -0
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +32 -0
- package/dist/src/storage/sqlite/index.d.ts +1 -0
- package/dist/src/storage/sqlite/index.js +2 -1
- package/dist/src/storage/sqlite/migrations/139_turn_outcome_artifact_backfill.sql +231 -0
- package/dist/src/storage/sqlite/migrations/140_endpoint_session_bindings.sql +8 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/support/build-support-investigation-prompt.d.ts +2 -0
- package/dist/src/support/build-support-investigation-prompt.js +29 -0
- package/dist/src/support/collect-support-report.d.ts +16 -0
- package/dist/src/support/collect-support-report.js +216 -0
- package/dist/src/support/redact-support-report.d.ts +16 -0
- package/dist/src/support/redact-support-report.js +89 -0
- package/dist/src/support/types.d.ts +76 -0
- package/dist/src/support/types.js +18 -0
- package/dist/src/user-context/user-avatar.d.ts +17 -0
- package/dist/src/user-context/user-avatar.js +116 -0
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/apps-page-CBow8pBI.js +0 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-Cmo-5BP5.js +0 -11
- package/dist/gateway/static/root/assets/automations-workspace-BBntVWgv.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-DrsMd-Po.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-97gkGeSV.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-CuBsz8UI.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-SuL7td7Z.js +0 -2
- package/dist/gateway/static/root/assets/home-page-Be1o1AXQ.js +0 -1
- package/dist/gateway/static/root/assets/index-B2OJSXX9.js +0 -70
- package/dist/gateway/static/root/assets/index-rHjAElxG.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-COfelgk7.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-DA8oDjeB.js +0 -2
- package/dist/gateway/static/root/assets/markdown-view-B-BHEcNd.js +0 -201
- package/dist/gateway/static/root/assets/messages-Dp1OxSKt.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-C8zjqmIv.js +0 -1
- package/dist/gateway/static/root/assets/notes-workbench-DICgUGPv.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-CqdkznYJ.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-2feZudJw.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CO2JCFdy.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DxMVaqdn.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DZNHb6A5.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DakZ2AGN.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BOiNkWJC.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-D5Nbe3C8.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-CAPSUK8B.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-ahDvypGO.js +0 -5
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260713-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260713-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-BGf-TiZj.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/x-B_N4OPjy.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-D4qOHT4D.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-D_dq_0LV.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/schemas-zIBW3wiV.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-tRr-7IxY.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-CPkBOY3h.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="/assets/dist-DqPZM2MH2.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<link rel="modulepreload" crossorigin href="/assets/eye-off-DEAzt3g1.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="/assets/eye-CABVeTq0.js">
|
|
48
48
|
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/notes-api-
|
|
49
|
+
<link rel="modulepreload" crossorigin href="/assets/notes-api-BWSfTP1w.js">
|
|
50
50
|
<link rel="modulepreload" crossorigin href="/assets/loader-circle-CifKLtgG.js">
|
|
51
51
|
<link rel="modulepreload" crossorigin href="/assets/rotate-cw-LIg3Am9S.js">
|
|
52
52
|
<link rel="modulepreload" crossorigin href="/assets/search-DA7gz22f.js">
|
|
@@ -54,20 +54,20 @@
|
|
|
54
54
|
<link rel="modulepreload" crossorigin href="/assets/files-Dp8_uGTO.js">
|
|
55
55
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-R8V9l6nk.js">
|
|
56
56
|
<link rel="modulepreload" crossorigin href="/assets/button-CSEbl4zT.js">
|
|
57
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
58
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-
|
|
57
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-Dnrl91pU.js">
|
|
58
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-BeVzfRvs.js">
|
|
59
59
|
<link rel="modulepreload" crossorigin href="/assets/config-reload-event-Bjh2zoKp.js">
|
|
60
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-
|
|
61
|
-
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-
|
|
60
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-YyZJKvFf.js">
|
|
61
|
+
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-C5y2gzMU.js">
|
|
62
62
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-DH5wF8X8.js">
|
|
63
|
-
<link rel="modulepreload" crossorigin href="/assets/oauth-api-
|
|
63
|
+
<link rel="modulepreload" crossorigin href="/assets/oauth-api-DnanEBsf.js">
|
|
64
64
|
<link rel="modulepreload" crossorigin href="/assets/form-field-width-DJw_jULe.js">
|
|
65
65
|
<link rel="modulepreload" crossorigin href="/assets/interaction-BmQogeqz.js">
|
|
66
66
|
<link rel="modulepreload" crossorigin href="/assets/is-masked-secret-DOkL5b_X.js">
|
|
67
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
68
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
67
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-DQ5L3PTi.js">
|
|
68
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-Bud54q9e.js">
|
|
69
69
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-B1bGSQqt.css">
|
|
70
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
70
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BTUuTnc9.css">
|
|
71
71
|
</head>
|
|
72
72
|
<body>
|
|
73
73
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -18,6 +18,7 @@ const endpointResultKindSchema = z.enum([
|
|
|
18
18
|
"json",
|
|
19
19
|
"file"
|
|
20
20
|
]);
|
|
21
|
+
const endpointSensitivitySchema = z.enum(["public", "personal"]);
|
|
21
22
|
const identifierSchema = z.string().min(1).max(160);
|
|
22
23
|
const turnTokenSchema = z.string().min(32).max(160).regex(/^[A-Za-z0-9_-]+$/);
|
|
23
24
|
const turnOriginSchema = z.discriminatedUnion("type", [
|
|
@@ -49,6 +50,9 @@ const endpointToolDescriptorSchema = z.strictObject({
|
|
|
49
50
|
title: z.string().min(1).max(120),
|
|
50
51
|
description: z.string().min(1).max(2e3),
|
|
51
52
|
inputSchema: jsonObjectSchema,
|
|
53
|
+
outputSchema: jsonObjectSchema,
|
|
54
|
+
policyId: z.string().regex(/^[a-z][a-z0-9_.-]+$/).max(120),
|
|
55
|
+
sensitivity: endpointSensitivitySchema,
|
|
52
56
|
effect: endpointEffectSchema,
|
|
53
57
|
confirmation: endpointConfirmationSchema,
|
|
54
58
|
requiresForeground: z.boolean(),
|
|
@@ -66,6 +70,42 @@ const endpointPrincipalRegistrationSchema = z.strictObject({
|
|
|
66
70
|
platform: z.string().min(1).max(80),
|
|
67
71
|
publicKey: z.string().min(32).max(2048)
|
|
68
72
|
});
|
|
73
|
+
const endpointSessionBindingRequestSchema = z.strictObject({ endpointId: identifierSchema });
|
|
74
|
+
const backgroundCapabilitySchema = z.string().regex(/^[a-z][a-z0-9_]*(?:\.[a-z][a-z0-9_]*)+$/).max(120);
|
|
75
|
+
z.strictObject({
|
|
76
|
+
jobId: z.uuid(),
|
|
77
|
+
endpointId: identifierSchema,
|
|
78
|
+
capability: backgroundCapabilitySchema,
|
|
79
|
+
input: jsonObjectSchema,
|
|
80
|
+
idempotencyKey: identifierSchema,
|
|
81
|
+
consentGrantId: identifierSchema,
|
|
82
|
+
createdAt: timestampSchema,
|
|
83
|
+
expiresAt: timestampSchema
|
|
84
|
+
});
|
|
85
|
+
z.strictObject({
|
|
86
|
+
jobId: z.uuid(),
|
|
87
|
+
status: z.enum([
|
|
88
|
+
"queued",
|
|
89
|
+
"running",
|
|
90
|
+
"succeeded",
|
|
91
|
+
"failed",
|
|
92
|
+
"cancelled"
|
|
93
|
+
]),
|
|
94
|
+
updatedAt: timestampSchema,
|
|
95
|
+
output: jsonObjectSchema.optional(),
|
|
96
|
+
error: z.strictObject({
|
|
97
|
+
code: identifierSchema,
|
|
98
|
+
message: z.string().min(1).max(2e3)
|
|
99
|
+
}).optional()
|
|
100
|
+
});
|
|
101
|
+
z.strictObject({
|
|
102
|
+
eventId: z.uuid(),
|
|
103
|
+
endpointId: identifierSchema,
|
|
104
|
+
subscriptionId: identifierSchema,
|
|
105
|
+
eventType: backgroundCapabilitySchema,
|
|
106
|
+
data: jsonObjectSchema,
|
|
107
|
+
occurredAt: timestampSchema
|
|
108
|
+
});
|
|
69
109
|
const endpointHelloPayloadSchema = z.strictObject({
|
|
70
110
|
principalId: identifierSchema,
|
|
71
111
|
endpointId: identifierSchema,
|
|
@@ -135,7 +175,7 @@ const endpointToolErrorCodeSchema = z.enum([
|
|
|
135
175
|
"PROTOCOL_ERROR"
|
|
136
176
|
]);
|
|
137
177
|
const envelope = (type, payload) => z.strictObject({
|
|
138
|
-
protocolVersion: z.literal(
|
|
178
|
+
protocolVersion: z.literal(2),
|
|
139
179
|
messageId: messageIdSchema,
|
|
140
180
|
type: z.literal(type),
|
|
141
181
|
sentAt: timestampSchema,
|
|
@@ -162,6 +202,126 @@ const clientEndpointMessageSchema = z.discriminatedUnion("type", [
|
|
|
162
202
|
envelope("tool.cancelled", invocationPayloadSchema)
|
|
163
203
|
]);
|
|
164
204
|
const serverEndpointMessageSchema = z.discriminatedUnion("type", [envelope("tool.invoke", toolInvokePayloadSchema), envelope("tool.cancel", toolCancelPayloadSchema)]);
|
|
205
|
+
const ENDPOINT_TEXT_OUTPUT_SCHEMA = {
|
|
206
|
+
type: "array",
|
|
207
|
+
minItems: 1,
|
|
208
|
+
maxItems: 20,
|
|
209
|
+
items: {
|
|
210
|
+
type: "object",
|
|
211
|
+
additionalProperties: false,
|
|
212
|
+
required: ["type", "text"],
|
|
213
|
+
properties: {
|
|
214
|
+
type: { const: "text" },
|
|
215
|
+
text: {
|
|
216
|
+
type: "string",
|
|
217
|
+
maxLength: 256 * 1024
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
const ENDPOINT_FILE_OUTPUT_SCHEMA = {
|
|
223
|
+
type: "array",
|
|
224
|
+
minItems: 1,
|
|
225
|
+
maxItems: 20,
|
|
226
|
+
items: {
|
|
227
|
+
type: "object",
|
|
228
|
+
additionalProperties: false,
|
|
229
|
+
required: [
|
|
230
|
+
"type",
|
|
231
|
+
"fileId",
|
|
232
|
+
"name",
|
|
233
|
+
"mimeType",
|
|
234
|
+
"size",
|
|
235
|
+
"sha256"
|
|
236
|
+
],
|
|
237
|
+
properties: {
|
|
238
|
+
type: { const: "file" },
|
|
239
|
+
fileId: {
|
|
240
|
+
type: "string",
|
|
241
|
+
minLength: 1,
|
|
242
|
+
maxLength: 160
|
|
243
|
+
},
|
|
244
|
+
name: {
|
|
245
|
+
type: "string",
|
|
246
|
+
minLength: 1,
|
|
247
|
+
maxLength: 255
|
|
248
|
+
},
|
|
249
|
+
mimeType: {
|
|
250
|
+
type: "string",
|
|
251
|
+
minLength: 1,
|
|
252
|
+
maxLength: 255
|
|
253
|
+
},
|
|
254
|
+
size: {
|
|
255
|
+
type: "integer",
|
|
256
|
+
minimum: 0
|
|
257
|
+
},
|
|
258
|
+
sha256: {
|
|
259
|
+
type: "string",
|
|
260
|
+
pattern: "^[a-f0-9]{64}$"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
const ENDPOINT_CONTACT_RECORD_SCHEMA = {
|
|
266
|
+
type: "object",
|
|
267
|
+
additionalProperties: false,
|
|
268
|
+
required: [
|
|
269
|
+
"id",
|
|
270
|
+
"name",
|
|
271
|
+
"phones",
|
|
272
|
+
"emails"
|
|
273
|
+
],
|
|
274
|
+
properties: {
|
|
275
|
+
id: {
|
|
276
|
+
type: "string",
|
|
277
|
+
minLength: 1,
|
|
278
|
+
maxLength: 512
|
|
279
|
+
},
|
|
280
|
+
name: {
|
|
281
|
+
type: "string",
|
|
282
|
+
minLength: 1,
|
|
283
|
+
maxLength: 500
|
|
284
|
+
},
|
|
285
|
+
phones: {
|
|
286
|
+
type: "array",
|
|
287
|
+
maxItems: 20,
|
|
288
|
+
items: {
|
|
289
|
+
type: "string",
|
|
290
|
+
maxLength: 100
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
emails: {
|
|
294
|
+
type: "array",
|
|
295
|
+
maxItems: 20,
|
|
296
|
+
items: {
|
|
297
|
+
type: "string",
|
|
298
|
+
maxLength: 320
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
function contactOutputSchema(multiple) {
|
|
304
|
+
return {
|
|
305
|
+
type: "array",
|
|
306
|
+
minItems: 1,
|
|
307
|
+
maxItems: 1,
|
|
308
|
+
items: {
|
|
309
|
+
type: "object",
|
|
310
|
+
additionalProperties: false,
|
|
311
|
+
required: ["type", "value"],
|
|
312
|
+
properties: {
|
|
313
|
+
type: { const: "json" },
|
|
314
|
+
value: multiple ? {
|
|
315
|
+
type: "array",
|
|
316
|
+
maxItems: 20,
|
|
317
|
+
items: ENDPOINT_CONTACT_RECORD_SCHEMA
|
|
318
|
+
} : ENDPOINT_CONTACT_RECORD_SCHEMA
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
const ENDPOINT_CONTACT_OUTPUT_SCHEMA = contactOutputSchema(false);
|
|
324
|
+
const ENDPOINT_CONTACT_LIST_OUTPUT_SCHEMA = contactOutputSchema(true);
|
|
165
325
|
function canonicalJson(value) {
|
|
166
326
|
if (value === null) return "null";
|
|
167
327
|
if (typeof value === "string" || typeof value === "boolean") return JSON.stringify(value);
|
|
@@ -181,4 +341,4 @@ function endpointHelloSigningPayload(payload) {
|
|
|
181
341
|
return canonicalJson(unsigned);
|
|
182
342
|
}
|
|
183
343
|
//#endregion
|
|
184
|
-
export { ENDPOINT_INVOCATION_RECEIPT_TIMEOUT_MS, ENDPOINT_MAX_FILE_BYTES, canonicalJson, clientEndpointMessageSchema, endpointHelloPayloadSchema, endpointHelloSigningPayload, endpointPrincipalRegistrationSchema, endpointTurnClaimSchema, serverEndpointMessageSchema, turnOriginSchema };
|
|
344
|
+
export { ENDPOINT_CONTACT_LIST_OUTPUT_SCHEMA, ENDPOINT_CONTACT_OUTPUT_SCHEMA, ENDPOINT_FILE_OUTPUT_SCHEMA, ENDPOINT_INVOCATION_RECEIPT_TIMEOUT_MS, ENDPOINT_MAX_FILE_BYTES, ENDPOINT_TEXT_OUTPUT_SCHEMA, canonicalJson, clientEndpointMessageSchema, endpointHelloPayloadSchema, endpointHelloSigningPayload, endpointPrincipalRegistrationSchema, endpointSessionBindingRequestSchema, endpointTurnClaimSchema, serverEndpointMessageSchema, turnOriginSchema };
|
|
@@ -41,12 +41,16 @@ const ProductDeliveryOperationSchema = z.enum([
|
|
|
41
41
|
"completed",
|
|
42
42
|
"failed"
|
|
43
43
|
]);
|
|
44
|
-
z.object({
|
|
44
|
+
const ProductDeliveryEnvelopeSchema = z.object({
|
|
45
45
|
version: z.literal(1),
|
|
46
46
|
operation: ProductDeliveryOperationSchema,
|
|
47
47
|
primary: ProductReferenceSchema.optional(),
|
|
48
48
|
related: z.array(ProductReferenceSchema).optional()
|
|
49
49
|
});
|
|
50
|
+
function parseProductDeliveryEnvelope(value) {
|
|
51
|
+
const parsed = ProductDeliveryEnvelopeSchema.safeParse(value);
|
|
52
|
+
return parsed.success ? parsed.data : null;
|
|
53
|
+
}
|
|
50
54
|
const PRODUCT_DELIVERY_TEXT_PREFIX = "xopc-product-delivery:";
|
|
51
55
|
function appendProductDeliveryText(text, delivery) {
|
|
52
56
|
if (!delivery) return text;
|
|
@@ -59,4 +63,4 @@ function productReferenceDeepLink(reference) {
|
|
|
59
63
|
}).toString()}`;
|
|
60
64
|
}
|
|
61
65
|
//#endregion
|
|
62
|
-
export { appendProductDeliveryText };
|
|
66
|
+
export { appendProductDeliveryText, parseProductDeliveryEnvelope };
|
|
@@ -106,9 +106,85 @@ const TurnOutcomeSchema = z.object({
|
|
|
106
106
|
evidence: z.array(TurnOutcomeEvidenceSchema),
|
|
107
107
|
createdAt: z.string()
|
|
108
108
|
});
|
|
109
|
+
const FILE_RESOURCE_ARTIFACT_URI_PREFIX = "xopc-file:";
|
|
110
|
+
function fileResourceArtifactUri(fileResourceId) {
|
|
111
|
+
return `${FILE_RESOURCE_ARTIFACT_URI_PREFIX}${encodeURIComponent(fileResourceId)}`;
|
|
112
|
+
}
|
|
113
|
+
function turnOutcomeKindFromFileName(fileName) {
|
|
114
|
+
const extension = fileName.toLowerCase().split(".").pop() ?? "";
|
|
115
|
+
if (extension === "xlsx" || extension === "xls" || extension === "csv" || extension === "tsv") return "spreadsheet";
|
|
116
|
+
if (extension === "pptx" || extension === "ppt") return "presentation";
|
|
117
|
+
if (extension === "pdf") return "pdf";
|
|
118
|
+
if ([
|
|
119
|
+
"doc",
|
|
120
|
+
"docx",
|
|
121
|
+
"md",
|
|
122
|
+
"rtf",
|
|
123
|
+
"txt"
|
|
124
|
+
].includes(extension)) return "document";
|
|
125
|
+
if ([
|
|
126
|
+
"png",
|
|
127
|
+
"jpg",
|
|
128
|
+
"jpeg",
|
|
129
|
+
"gif",
|
|
130
|
+
"webp",
|
|
131
|
+
"svg",
|
|
132
|
+
"bmp"
|
|
133
|
+
].includes(extension)) return "image";
|
|
134
|
+
if ([
|
|
135
|
+
"mp4",
|
|
136
|
+
"mov",
|
|
137
|
+
"webm"
|
|
138
|
+
].includes(extension)) return "video";
|
|
139
|
+
if ([
|
|
140
|
+
"mp3",
|
|
141
|
+
"wav",
|
|
142
|
+
"ogg",
|
|
143
|
+
"m4a"
|
|
144
|
+
].includes(extension)) return "audio";
|
|
145
|
+
if ([
|
|
146
|
+
"zip",
|
|
147
|
+
"tar",
|
|
148
|
+
"gz",
|
|
149
|
+
"tgz"
|
|
150
|
+
].includes(extension)) return "archive";
|
|
151
|
+
if (extension === "html" || extension === "htm") return "site";
|
|
152
|
+
return "file";
|
|
153
|
+
}
|
|
154
|
+
function turnOutcomeMimeTypeFromFileName(fileName) {
|
|
155
|
+
return {
|
|
156
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
157
|
+
xls: "application/vnd.ms-excel",
|
|
158
|
+
csv: "text/csv",
|
|
159
|
+
tsv: "text/tab-separated-values",
|
|
160
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
161
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
162
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
163
|
+
doc: "application/msword",
|
|
164
|
+
pdf: "application/pdf",
|
|
165
|
+
md: "text/markdown",
|
|
166
|
+
txt: "text/plain",
|
|
167
|
+
html: "text/html",
|
|
168
|
+
htm: "text/html",
|
|
169
|
+
png: "image/png",
|
|
170
|
+
jpg: "image/jpeg",
|
|
171
|
+
jpeg: "image/jpeg",
|
|
172
|
+
gif: "image/gif",
|
|
173
|
+
webp: "image/webp",
|
|
174
|
+
svg: "image/svg+xml",
|
|
175
|
+
mp4: "video/mp4",
|
|
176
|
+
mov: "video/quicktime",
|
|
177
|
+
webm: "video/webm",
|
|
178
|
+
mp3: "audio/mpeg",
|
|
179
|
+
wav: "audio/wav",
|
|
180
|
+
ogg: "audio/ogg",
|
|
181
|
+
m4a: "audio/mp4",
|
|
182
|
+
zip: "application/zip"
|
|
183
|
+
}[fileName.toLowerCase().split(".").pop() ?? ""];
|
|
184
|
+
}
|
|
109
185
|
function parseTurnOutcome(value) {
|
|
110
186
|
const parsed = TurnOutcomeSchema.safeParse(value);
|
|
111
187
|
return parsed.success ? parsed.data : null;
|
|
112
188
|
}
|
|
113
189
|
//#endregion
|
|
114
|
-
export { TurnOutcomeDeliverableSchema, parseTurnOutcome };
|
|
190
|
+
export { TurnOutcomeDeliverableSchema, fileResourceArtifactUri, parseTurnOutcome, turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName };
|
|
@@ -156,7 +156,7 @@ export declare const AGENT_CAPABILITY_DEFINITIONS: readonly [{
|
|
|
156
156
|
readonly label: "Data analysis";
|
|
157
157
|
readonly description: "Analyze local structured data and produce derived tables, summaries, or artifacts.";
|
|
158
158
|
readonly category: "analysis";
|
|
159
|
-
readonly tools: readonly ["read_file", "write_file", "list_dir", "grep", "find"];
|
|
159
|
+
readonly tools: readonly ["read_file", "write_file", "list_dir", "grep", "find", "publish_artifacts"];
|
|
160
160
|
readonly activation: {
|
|
161
161
|
readonly mode: "explicit";
|
|
162
162
|
readonly ttl: "session";
|
|
@@ -66,13 +66,17 @@ var EndpointToolProvider = class {
|
|
|
66
66
|
details: {
|
|
67
67
|
endpointId: resolved.endpointId,
|
|
68
68
|
endpointToolName: resolved.tool.descriptor.name,
|
|
69
|
+
endpointSensitivity: resolved.tool.descriptor.sensitivity,
|
|
69
70
|
...result.details ?? {},
|
|
70
71
|
...files.length === 0 ? {} : { endpointFiles: files }
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
currentEndpoint() {
|
|
75
|
-
const
|
|
76
|
+
const context = this.deps.getCurrentContext();
|
|
77
|
+
if (!context) return void 0;
|
|
78
|
+
if (this.deps.runtime.bindings.get(context.sessionKey)) return this.deps.runtime.bindings.resolve(context.sessionKey);
|
|
79
|
+
const origin = context.origin;
|
|
76
80
|
if (origin?.type !== "endpoint") return void 0;
|
|
77
81
|
return this.deps.runtime.registry.get(origin.endpointId);
|
|
78
82
|
}
|
|
@@ -14,6 +14,7 @@ const CORE_TOOL_ORDER = [
|
|
|
14
14
|
"browser_use",
|
|
15
15
|
"send_message",
|
|
16
16
|
"send_media",
|
|
17
|
+
"publish_artifacts",
|
|
17
18
|
"memory_search",
|
|
18
19
|
"memory_get",
|
|
19
20
|
"session_recall",
|
|
@@ -51,6 +52,7 @@ const CORE_TOOL_SUMMARIES = {
|
|
|
51
52
|
browser_use: "Control the configured browser",
|
|
52
53
|
send_message: "Send messages to the current conversation or an explicit configured channel",
|
|
53
54
|
send_media: "Send media attachments to the current channel",
|
|
55
|
+
publish_artifacts: "Publish final generated files as durable chat deliverables",
|
|
54
56
|
memory_search: "Semantic search over indexed memory sources",
|
|
55
57
|
memory_get: "Read specific lines from memory sources returned by search",
|
|
56
58
|
session_recall: "Search exact raw turns in the current session, including compacted history",
|
|
@@ -117,6 +119,7 @@ function buildToolingSection(params) {
|
|
|
117
119
|
const hasFind = availableTools.has("find");
|
|
118
120
|
const hasExec = availableTools.has("exec_command");
|
|
119
121
|
const hasPlan = availableTools.has("update_plan");
|
|
122
|
+
const hasPublishArtifacts = availableTools.has("publish_artifacts");
|
|
120
123
|
const orchestrationLines = [];
|
|
121
124
|
if (hasDelegate) orchestrationLines.push("- Sub-agent delegation → use `delegate_task(goal, context?, toolset?)` for focused parallel work; results return to you automatically.");
|
|
122
125
|
if (hasWorkflow) orchestrationLines.push("- Multi-phase workflows → use `workflow` to start persisted runs with subagents when a script defines phases.");
|
|
@@ -131,6 +134,8 @@ function buildToolingSection(params) {
|
|
|
131
134
|
hasWrite ? `Use \`${writeToolName}\` only for new files or intentional complete rewrites.` : "",
|
|
132
135
|
hasGrep || hasFind ? `Use ${[hasGrep ? `\`${grepToolName}\`` : "", hasFind ? `\`${findToolName}\`` : ""].filter(Boolean).join(" and ")} for text/file discovery; use code graph or symbol tools when available for definitions and call relationships.` : "",
|
|
133
136
|
hasExec ? `Use \`${execToolName}\` for verification and safe inspection, not routine file editing.` : "",
|
|
137
|
+
hasWrite || hasExec ? "When delivering a user-facing workspace file, include a clickable Markdown link in the final response using `xopc://workspace/file?path=<workspace-relative-path>`; URL-encode spaces and special characters, and do not invent an HTTP or `file://` URL." : "",
|
|
138
|
+
hasPublishArtifacts ? "After a command or runtime creates final user-facing files such as spreadsheets, presentations, PDFs, documents, media, or archives, call `publish_artifacts` once with all final paths. Do not publish temporary files, code edits, or build intermediates." : "",
|
|
134
139
|
hasPlan ? `Use \`${planToolName}\` for multi-step coding work: keep exactly one active step when work is in progress, and update it after meaningful progress or review.` : "",
|
|
135
140
|
hasToolManual ? "Some complex tools have built-in manuals. Use `tool_manual(tool)` before non-trivial use." : "",
|
|
136
141
|
hasDelegate ? "If a task is complex or long-running, delegate it. Completion is push-based: the sub-agent result returns when done." : "",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
2
|
+
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
3
|
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
3
4
|
import { resolveShareConfig } from "../../share/share-config.js";
|
|
4
5
|
import { mergeWithDefaults } from "../../share/site-share-config.js";
|
|
@@ -231,7 +232,7 @@ function successResult(locale, payload) {
|
|
|
231
232
|
artifacts: [{
|
|
232
233
|
artifactId: `share:${String(payload.shareUrl ?? "")}`,
|
|
233
234
|
title: String(payload.title ?? "Shared result"),
|
|
234
|
-
kind: payload.kind === "site" ? "site" : payload.kind === "zip" ? "archive" : "
|
|
235
|
+
kind: payload.kind === "site" ? "site" : payload.kind === "zip" ? "archive" : turnOutcomeKindFromFileName(String(payload.title ?? "Shared result")),
|
|
235
236
|
availability: "available",
|
|
236
237
|
location: "artifact_store",
|
|
237
238
|
capabilities: payload.kind === "site" ? ["preview", "share"] : ["download", "share"],
|
|
@@ -94,7 +94,8 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
94
94
|
description: [
|
|
95
95
|
"Run shell commands for code inspection, builds, tests, type checks, and verification.",
|
|
96
96
|
"Use apply_patch for file edits; do not edit files by shell redirection unless explicitly necessary.",
|
|
97
|
-
"Relative cwd values resolve under the current agent workspace."
|
|
97
|
+
"Relative cwd values resolve under the current agent workspace.",
|
|
98
|
+
"When the command creates final user-facing files, call publish_artifacts afterward with all final paths."
|
|
98
99
|
].join(" "),
|
|
99
100
|
parameters: ExecCommandSchema,
|
|
100
101
|
label: "Run Command",
|
|
@@ -22,6 +22,7 @@ import { createWebFetchTool, createWebSearchTool } from "./web.js";
|
|
|
22
22
|
import { createWebExtractTool } from "./web-extract.js";
|
|
23
23
|
import { createMessageTool } from "./communication.js";
|
|
24
24
|
import { createSendMediaTool } from "./send-media.js";
|
|
25
|
+
import { createPublishArtifactsTool } from "./publish-artifacts.js";
|
|
25
26
|
import { createReadMediaTool } from "./media-read-tool.js";
|
|
26
27
|
import { createCreateShareTool, isShareToolAvailable } from "./create-share-tool.js";
|
|
27
28
|
import { createTodoTool } from "./todo-tool.js";
|
|
@@ -280,6 +281,7 @@ var AgentToolsFactory = class {
|
|
|
280
281
|
getConfig: () => this.deps.getConfig?.()
|
|
281
282
|
})] : [],
|
|
282
283
|
createSendMediaTool(workspace, bus, () => this.deps.getCurrentContext()),
|
|
284
|
+
createPublishArtifactsTool(workspace),
|
|
283
285
|
createReadMediaTool(),
|
|
284
286
|
...isShareToolAvailable(cfg) ? [createCreateShareTool({
|
|
285
287
|
workspace,
|
|
@@ -14,6 +14,7 @@ export { createWebSearchTool, createWebFetchTool } from './web.js';
|
|
|
14
14
|
export { createWebExtractTool, stripHtmlBoilerplate, DEFAULT_WEB_EXTRACT_MAX_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, } from './web-extract.js';
|
|
15
15
|
export { createMessageTool } from './communication.js';
|
|
16
16
|
export { createSendMediaTool } from './send-media.js';
|
|
17
|
+
export { createPublishArtifactsTool } from './publish-artifacts.js';
|
|
17
18
|
export { createReadMediaTool } from './media-read-tool.js';
|
|
18
19
|
export { createCreateShareTool, isShareToolAvailable, type CreateShareToolDeps, } from './create-share-tool.js';
|
|
19
20
|
export { createTodoTool, TodoStore, type TodoItem, type TodoStatus } from './todo-tool.js';
|
|
@@ -16,6 +16,7 @@ import { createWebFetchTool, createWebSearchTool } from "./web.js";
|
|
|
16
16
|
import { DEFAULT_WEB_EXTRACT_MAX_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, createWebExtractTool, stripHtmlBoilerplate } from "./web-extract.js";
|
|
17
17
|
import { createMessageTool } from "./communication.js";
|
|
18
18
|
import { createSendMediaTool } from "./send-media.js";
|
|
19
|
+
import { createPublishArtifactsTool } from "./publish-artifacts.js";
|
|
19
20
|
import { createReadMediaTool } from "./media-read-tool.js";
|
|
20
21
|
import { createCreateShareTool, isShareToolAvailable } from "./create-share-tool.js";
|
|
21
22
|
import { TodoStore, createTodoTool } from "./todo-tool.js";
|
|
@@ -42,4 +43,4 @@ import { createManagedJobTool } from "./managed-job-tool.js";
|
|
|
42
43
|
import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
|
|
43
44
|
import { createImageTool } from "./image-tool.js";
|
|
44
45
|
import { createImageGenerateTool, resolveImageGenerationModelConfigForTool } from "./image-generate-tool.js";
|
|
45
|
-
export { BrowserManager, DEFAULT_DELEGATE_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_TOOL_METADATA, DEFAULT_WEB_EXTRACT_MAX_LENGTH, DELEGATE_BLOCKED_TOOLS, GREP_MAX_LINE_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, SANDBOX_ALLOWED_TOOLS, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, buildSandboxToolMap, createApplyPatchTool, createAutomationTool, createBrowserRecipeTool, createClarifyTool, createCreateShareTool, createDelegateTool, createDesktopPetTool, createDreamingTool, createExecCommandTool, createExecuteCodeTool, createFindTool, createGrepTool, createImageGenerateTool, createImageTool, createListDirTool, createManagedJobTool, createMemoryGetTool, createMemorySearchTool, createMessageTool, createReadFileTool, createReadMediaTool, createSendMediaTool, createSessionRecallTool, createSessionSearchTool, createSessionStatusTool, createSkillInstallTool, createSkillManageTool, createSkillViewTool, createSkillsListTool, createSkillsMarketplaceSearchTool, createTodoTool, createToolManualTool, createUpdatePlanTool, createWebExtractTool, createWebFetchTool, createWebSearchTool, createWorkflowTool, createWriteFileTool, createXopcUseTool, findTool, formatSize, fuzzyFindText, generateDiffString, getToolMetadata, grepTool, isShareToolAvailable, listDirTool, normalizeForFuzzyMatch, normalizeToLF, resolveImageGenerationModelConfigForTool, resolveImageModelConfigForTool, resolveToolLockMode, restoreLineEndings, stripBom, stripHtmlBoilerplate, truncateHead, truncateLine, truncateTail, writeFileTool };
|
|
46
|
+
export { BrowserManager, DEFAULT_DELEGATE_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_TOOL_METADATA, DEFAULT_WEB_EXTRACT_MAX_LENGTH, DELEGATE_BLOCKED_TOOLS, GREP_MAX_LINE_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, SANDBOX_ALLOWED_TOOLS, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, buildSandboxToolMap, createApplyPatchTool, createAutomationTool, createBrowserRecipeTool, createClarifyTool, createCreateShareTool, createDelegateTool, createDesktopPetTool, createDreamingTool, createExecCommandTool, createExecuteCodeTool, createFindTool, createGrepTool, createImageGenerateTool, createImageTool, createListDirTool, createManagedJobTool, createMemoryGetTool, createMemorySearchTool, createMessageTool, createPublishArtifactsTool, createReadFileTool, createReadMediaTool, createSendMediaTool, createSessionRecallTool, createSessionSearchTool, createSessionStatusTool, createSkillInstallTool, createSkillManageTool, createSkillViewTool, createSkillsListTool, createSkillsMarketplaceSearchTool, createTodoTool, createToolManualTool, createUpdatePlanTool, createWebExtractTool, createWebFetchTool, createWebSearchTool, createWorkflowTool, createWriteFileTool, createXopcUseTool, findTool, formatSize, fuzzyFindText, generateDiffString, getToolMetadata, grepTool, isShareToolAvailable, listDirTool, normalizeForFuzzyMatch, normalizeToLF, resolveImageGenerationModelConfigForTool, resolveImageModelConfigForTool, resolveToolLockMode, restoreLineEndings, stripBom, stripHtmlBoilerplate, truncateHead, truncateLine, truncateTail, writeFileTool };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
|
+
import { turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
4
|
+
import { persistToolMedia } from "./tool-media.js";
|
|
5
|
+
import { basename, isAbsolute } from "node:path";
|
|
6
|
+
import { readFile } from "node:fs/promises";
|
|
7
|
+
import { Type } from "@sinclair/typebox";
|
|
8
|
+
//#region src/agent/tools/publish-artifacts.ts
|
|
9
|
+
const PublishArtifactsSchema = Type.Object({ paths: Type.Array(Type.String({ minLength: 1 }), {
|
|
10
|
+
minItems: 1,
|
|
11
|
+
maxItems: 50,
|
|
12
|
+
description: "Files to publish. Relative paths resolve under the current agent workspace."
|
|
13
|
+
}) });
|
|
14
|
+
function createPublishArtifactsTool(workspace) {
|
|
15
|
+
return {
|
|
16
|
+
name: "publish_artifacts",
|
|
17
|
+
label: "Publish Artifacts",
|
|
18
|
+
description: "Publish completed user-facing files into durable chat artifacts. Call this after exec_command or another runtime creates spreadsheets, presentations, PDFs, documents, archives, or other files. Pass every final deliverable together; do not publish temporary or source files.",
|
|
19
|
+
parameters: PublishArtifactsSchema,
|
|
20
|
+
mutationScope: "none",
|
|
21
|
+
supportsParallel: false,
|
|
22
|
+
idempotent: false,
|
|
23
|
+
async execute(toolCallId, params) {
|
|
24
|
+
const paths = [...new Set(params.paths.map((value) => value.trim()).filter(Boolean))];
|
|
25
|
+
if (paths.length === 0) throw new Error("At least one artifact path is required");
|
|
26
|
+
const artifacts = [];
|
|
27
|
+
const publishedPaths = /* @__PURE__ */ new Set();
|
|
28
|
+
for (const [index, inputPath] of paths.entries()) {
|
|
29
|
+
const resolved = resolvePathUnderWorkspace(inputPath, workspace);
|
|
30
|
+
if (publishedPaths.has(resolved)) continue;
|
|
31
|
+
publishedPaths.add(resolved);
|
|
32
|
+
try {
|
|
33
|
+
const safety = checkFileSafety("read", resolved);
|
|
34
|
+
if (!safety.allowed) throw new Error(safety.message);
|
|
35
|
+
const media = await persistToolMedia({
|
|
36
|
+
buffer: await readFile(resolved),
|
|
37
|
+
filePath: resolved
|
|
38
|
+
});
|
|
39
|
+
const kind = turnOutcomeKindFromFileName(media.name);
|
|
40
|
+
artifacts.push({
|
|
41
|
+
artifactId: media.id,
|
|
42
|
+
title: media.name,
|
|
43
|
+
kind,
|
|
44
|
+
mimeType: media.mimeType,
|
|
45
|
+
sizeBytes: media.size,
|
|
46
|
+
availability: "available",
|
|
47
|
+
location: "artifact_store",
|
|
48
|
+
capabilities: kind === "archive" || kind === "file" ? ["download"] : ["preview", "download"],
|
|
49
|
+
uri: media.uri
|
|
50
|
+
});
|
|
51
|
+
} catch {
|
|
52
|
+
const title = basename(resolved);
|
|
53
|
+
const mimeType = turnOutcomeMimeTypeFromFileName(title);
|
|
54
|
+
artifacts.push({
|
|
55
|
+
artifactId: `publish-failed:${toolCallId}:${index}`,
|
|
56
|
+
title,
|
|
57
|
+
kind: turnOutcomeKindFromFileName(title),
|
|
58
|
+
...mimeType ? { mimeType } : {},
|
|
59
|
+
availability: "failed",
|
|
60
|
+
location: isAbsolute(inputPath) ? "external_host" : "workspace",
|
|
61
|
+
capabilities: ["regenerate"]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const publishedCount = artifacts.filter((item) => item.availability === "available").length;
|
|
66
|
+
const failedCount = artifacts.length - publishedCount;
|
|
67
|
+
return {
|
|
68
|
+
content: [{
|
|
69
|
+
type: "text",
|
|
70
|
+
text: [
|
|
71
|
+
`${publishedCount} artifact${publishedCount === 1 ? "" : "s"} published`,
|
|
72
|
+
failedCount > 0 ? `${failedCount} failed` : "",
|
|
73
|
+
artifacts.map((item) => item.title).join(", ")
|
|
74
|
+
].filter(Boolean).join(": ")
|
|
75
|
+
}],
|
|
76
|
+
details: { artifacts }
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { createPublishArtifactsTool };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
2
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
|
+
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
3
4
|
import { persistToolMedia } from "./tool-media.js";
|
|
4
5
|
import { basename } from "node:path";
|
|
5
6
|
import { readFile } from "fs/promises";
|
|
@@ -67,7 +68,7 @@ function createSendMediaTool(workspace, bus, getContext) {
|
|
|
67
68
|
artifacts: [{
|
|
68
69
|
artifactId: media.id,
|
|
69
70
|
title: media.name,
|
|
70
|
-
kind: media.type === "photo" ? "image" : media.type === "video" ? "video" : media.type === "audio" ? "audio" : media.
|
|
71
|
+
kind: media.type === "photo" ? "image" : media.type === "video" ? "video" : media.type === "audio" ? "audio" : turnOutcomeKindFromFileName(media.name),
|
|
71
72
|
mimeType: media.mimeType,
|
|
72
73
|
sizeBytes: media.size,
|
|
73
74
|
availability: "available",
|
|
@@ -16,6 +16,7 @@ const REGISTRY_COMMAND_MODULES = {
|
|
|
16
16
|
project: () => import("./commands/project.js"),
|
|
17
17
|
config: () => import("./commands/config.js"),
|
|
18
18
|
doctor: () => import("./commands/doctor/index.js"),
|
|
19
|
+
support: () => import("./commands/support.js"),
|
|
19
20
|
runtime: () => import("./commands/runtime.js"),
|
|
20
21
|
image: () => import("./commands/image.js"),
|
|
21
22
|
channels: () => import("./commands/channels.js"),
|