@xopcai/xopc 0.0.232 → 0.0.234
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-BzswYHcj.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BXRaZYW8.js → agent-avatar-dicebear-CztNAQyE.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BHeLVAW5.js +1 -0
- package/dist/gateway/static/root/assets/agents-B8c0U7Ze.js +1 -0
- package/dist/gateway/static/root/assets/{api-wGPgL8xY.js → api-7zOtMbaE.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BJfClfPx.js → app-management-settings-panel-BxBMAdWc.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-C_R0vUAu.js → appearance-settings-DVAxCOPL.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CBow8pBI.js → apps-page-BtzXxSYK.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-DnFHkSHE.js → archive-plugin-DawToDU8.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DZrEwytM.js → attachment-load-BpCKsdiO.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-a6_hTplT.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-C7ZwZl04.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-Ckc_Csue.js → binary-plugins-OqUf-uET.js} +2 -2
- package/dist/gateway/static/root/assets/{block-editor-DAC6w-iV.js → block-editor-9OAYqVKF.js} +3 -3
- package/dist/gateway/static/root/assets/browser-settings-page-CEHhbDj0.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-BGd7R8GO.js → browser-workflow-inputs-4ooVX-Tx.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-DUfj7ntM.js → browser-workflows-page-CUgwXXsi.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-97gkGeSV.js → capabilities-settings-panel-CAbI9beX.js} +5 -5
- package/dist/gateway/static/root/assets/channels-settings-BksDnAyv.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-CfboECLt.js → channels-status-swr-BDJvMnA_.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CA9fndbZ.js → chat-terminal-dock-DB9zi_dy.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-CnY8lcGJ.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-CqPu7HYJ.js → cron-expression-a9Jyianb.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-C8dJsCgk.js → date-picker-B_l2CHWO.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Iz2wYimy.js → dependency-picker-DjcEIzVJ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-C3h40FmG.js → desktop-pet-ZCBsj8Je.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-YfeVVzLe.js → desktop-pet-settings-DJJf0EvL.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CChgztz_.js → extension-debug-page-CMXbAkx-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DF6ct6_y.js → extension-page-WWePedpo.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-jgBsjn0F.js → extension-settings-page-DjIhNJVI.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-CVajuIGL.js → gateway-config-api-BNj6srhV.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BGQn8duh.js → gateway-config-swr-R702lNJR.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BbssNGid.js → gateway-settings-DvlFDxhZ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-D2Rnh9fX.js → gateway-startup-retry-2rVSUvyw.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-Dlahslof.js +1 -0
- package/dist/gateway/static/root/assets/home-page-DJhUd30b.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D7W2p5_8.js → image-generation-api-B28USRCK.js} +1 -1
- package/dist/gateway/static/root/assets/index-BTUuTnc9.css +2 -0
- package/dist/gateway/static/root/assets/index-CXGQihfj.js +70 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BvHYyNus.js → keyboard-shortcuts-settings-d12AAEaC.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DUP0UiFY.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Cb8t2wWM.js → local-apps-page-_z2o0cD1.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DLwVxS3V.js → locale-store-8k4mvYGL.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CPUaLcGH.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-B8Jie4-J.js → management-settings-eTBfNgXU.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-BD1r4o2i.js → markdown-split-7rTfQCN_.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-D02mJdoU.js +201 -0
- package/dist/gateway/static/root/assets/{media-plugins-BCev8fkW.js → media-plugins-BIfKo5Ow.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CoovNoMn.js +3 -0
- package/dist/gateway/static/root/assets/{mobile-device-api-DACoHhhk.js → mobile-device-api-CvjVB_TB.js} +1 -1
- package/dist/gateway/static/root/assets/models-hub-cache-CYr6LzvY.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-DEdNKw0I.js → notes-api-p2Pncp2B.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-BBTLjJwa.js → notes-page-dOvbZBOQ.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-DQMUpDc9.js +4 -0
- package/dist/gateway/static/root/assets/{oauth-api-BNCO2YK5.js → oauth-api-DpLONwfK.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-fEBbRekH.js → product-open-page-CgZhadZQ.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-D1HidxgT.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-CxwNbbud.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-Cvr4Qm7N.js → registry-api-B7b0LJgI.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CK59rSc_.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BT5B74IH.js → runtime-tools-settings-panel-D3PS55Yg.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-C4tB34S5.js → schema-form-H-aeWTzM.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-C2tP7363.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DlYBA2N-.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-D1oXhkgI.js → settings-form-section-B9oF8Rhw.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-CldfX6FJ.js → settings-loading-skeleton-CazDM3n5.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-c3LJnbvE.js → settings-page-C6pmQNzY.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Cn2E0G2o.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DptCK_mk.js → share-preview-page-XgxvE8cx.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-Czph0_fM.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DDq_QEqd.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-OHBeBtSg.js → skills-page-CfNV6kgb.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-B9WZbOLC.js → skills-page.utils-DgxGb7v7.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Dj_DpOGw.js → system-settings-panel-B4W--Ukh.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-UY5kNWoR.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-Cpd3Gd5R.js → theme-store-CpcBI73Q.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DCl5Yq7N.js → use-autosave-DR7YWBzR.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-DnUL8kJU.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BB_ZQV8F.js → voice-api-key-field-BZhqoxBR.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-BNiYmpl5.js → voice-config-api-ynE-vY6I.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BrIdtdum.js → work-discovery-overlay-CouKiK45.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-hKh-uCLo.js → workflow-run-setup-panel-CUqAESrr.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-B8dJRjMJ.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/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/capabilities/definitions.d.ts +1 -1
- package/dist/src/agent/capabilities/definitions.js +2 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +57 -8
- package/dist/src/agent/embedded/types.d.ts +5 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +5 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +5 -0
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/agent/tools/create-share-tool.js +2 -1
- package/dist/src/agent/tools/exec-command.d.ts +2 -0
- package/dist/src/agent/tools/exec-command.js +24 -7
- 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 +8 -0
- package/dist/src/agent/tools/publish-artifacts.js +95 -0
- package/dist/src/agent/tools/send-media.js +2 -1
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -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/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/models.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/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- 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/extensions/lockfile.js +1 -1
- package/dist/src/files/file-service.js +14 -5
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +5 -0
- package/dist/src/gateway/hono/lib/config-payload.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/models.js +1 -1
- 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/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +0 -35
- package/dist/src/gateway/service.js +3 -3
- package/dist/src/media/store.js +9 -0
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/session/store.js +4 -2
- package/dist/src/session/turn-outcome-projector.d.ts +9 -0
- package/dist/src/session/turn-outcome-projector.js +209 -0
- package/dist/src/share/hosted-session-share.js +1 -1
- 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/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/user-context/user-avatar.d.ts +17 -0
- package/dist/src/user-context/user-avatar.js +116 -0
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-dR7HMaRX.js +0 -1
- package/dist/gateway/static/root/assets/agents-Bileycwe.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/channels-settings-CuBsz8UI.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-SuL7td7Z.js +0 -2
- package/dist/gateway/static/root/assets/heartbeat-settings-CJtXu8iD.js +0 -1
- 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/projects-page-dHDXpMCg.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
- package/dist/src/gateway/chat-stream/turn-outcome-collector.d.ts +0 -16
- package/dist/src/gateway/chat-stream/turn-outcome-collector.js +0 -111
|
@@ -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-CXGQihfj.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-CoovNoMn.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-8k4mvYGL.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-D02mJdoU.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-p2Pncp2B.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-2rVSUvyw.js">
|
|
58
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-B7b0LJgI.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-R702lNJR.js">
|
|
61
|
+
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-CYr6LzvY.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-DpLONwfK.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-BzswYHcj.js">
|
|
68
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-CpcBI73Q.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 };
|
|
@@ -5,16 +5,16 @@ import { getSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
|
5
5
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
6
6
|
import "../storage/sqlite/index.js";
|
|
7
7
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
8
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
9
8
|
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
10
9
|
import { init_agent_scope, resolveAgentProfileDir } from "./agent-scope.js";
|
|
11
|
-
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
12
|
-
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
13
10
|
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
14
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
15
11
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
12
|
+
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
13
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
16
14
|
import { getApiKeySync, getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
17
15
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
16
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
17
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
18
18
|
import { extractTextContent } from "./context/workspace.js";
|
|
19
19
|
import { buildExecutionScopeContextForPrompt } from "./context/execution-scope.js";
|
|
20
20
|
import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
@@ -4,10 +4,10 @@ import { finishContextExtractionRun } from "../../storage/sqlite/context-extract
|
|
|
4
4
|
import { getTurnPersonalization } from "../../storage/sqlite/user-context-repository.js";
|
|
5
5
|
import { loadCompactionSourceSnapshot } from "../../storage/sqlite/transcript-repository.js";
|
|
6
6
|
import "../../storage/sqlite/index.js";
|
|
7
|
-
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
8
7
|
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
9
8
|
import { getApiKeySync, init_providers, resolveModel } from "../../providers/index.js";
|
|
10
9
|
import { createExtensionAwareStreamFn } from "../../providers/extension-stream-bridge.js";
|
|
10
|
+
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
11
11
|
import { extractTextContent } from "../context/workspace.js";
|
|
12
12
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
13
13
|
import { resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
@@ -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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_paths, resolveModelsJsonPath } from "../../config/paths.js";
|
|
2
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
4
4
|
import { XopcModelCredentialStore, init_model_credential_store } from "../../auth/model-credential-store.js";
|
|
5
5
|
import { init_register_bundled_oauth_flows, registerBundledOAuthFlows } from "../../providers/register-bundled-oauth-flows.js";
|
|
6
6
|
import { init_register_runtime_providers, registerRuntimeProviders } from "../../providers/register-runtime-providers.js";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
4
3
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
4
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
|
+
import { parseTurnOutcome } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
5
6
|
import { resolveAgentTurnTimeoutMs } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
6
7
|
import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
|
|
7
8
|
import { evaluateContextBudget } from "../memory/context-budget.js";
|
|
8
9
|
import { resolveCompactionPolicy } from "../memory/compaction-policy.js";
|
|
10
|
+
import { projectTurnOutcome } from "../../session/turn-outcome-projector.js";
|
|
9
11
|
import { runXopcEmbeddedTurn } from "./run-turn.js";
|
|
10
12
|
import { applyStartupContextToUserMessage } from "../reply/apply-turn-user-enrichment.js";
|
|
11
13
|
import { AgentRunSupervisor } from "../orchestration/agent-run-supervisor.js";
|
|
@@ -23,6 +25,41 @@ async function runEmbeddedTurnForSession(params) {
|
|
|
23
25
|
deadlineAtMs: params.deadlineAtMs,
|
|
24
26
|
parentSignal: params.abortSignal
|
|
25
27
|
});
|
|
28
|
+
const finish = async (result) => {
|
|
29
|
+
try {
|
|
30
|
+
const rows = await sessionStore.loadTranscriptRows(sessionKey);
|
|
31
|
+
const hasTurn = rows.some((source) => {
|
|
32
|
+
return source.turnId === runId;
|
|
33
|
+
});
|
|
34
|
+
const alreadyPersisted = rows.some((source) => {
|
|
35
|
+
const row = source;
|
|
36
|
+
return row.type === "custom" && row.customType === "turn_outcome" && parseTurnOutcome(row.data)?.turnId === runId;
|
|
37
|
+
});
|
|
38
|
+
if (!hasTurn || alreadyPersisted) return result;
|
|
39
|
+
const outcome = projectTurnOutcome({
|
|
40
|
+
rows,
|
|
41
|
+
turnId: runId,
|
|
42
|
+
runStatus: result.ok ? "success" : result.errorMessage === "aborted" ? "cancelled" : "error",
|
|
43
|
+
summary: result.errorMessage
|
|
44
|
+
});
|
|
45
|
+
await sessionStore.appendTranscriptCustomEntry(sessionKey, {
|
|
46
|
+
customType: "turn_outcome",
|
|
47
|
+
data: outcome
|
|
48
|
+
});
|
|
49
|
+
params.onEvent?.({
|
|
50
|
+
type: "turn_outcome",
|
|
51
|
+
runId,
|
|
52
|
+
outcome
|
|
53
|
+
});
|
|
54
|
+
} catch (err) {
|
|
55
|
+
log.warn({
|
|
56
|
+
err,
|
|
57
|
+
sessionKey,
|
|
58
|
+
runId
|
|
59
|
+
}, "Turn outcome persistence failed");
|
|
60
|
+
}
|
|
61
|
+
return result;
|
|
62
|
+
};
|
|
26
63
|
try {
|
|
27
64
|
await params.beforeTurn?.();
|
|
28
65
|
if (supervisor.signal.aborted) return {
|
|
@@ -169,7 +206,7 @@ async function runEmbeddedTurnForSession(params) {
|
|
|
169
206
|
attempt: i + 1,
|
|
170
207
|
total: resolvedCandidates.length
|
|
171
208
|
}, "Agent model fallback succeeded");
|
|
172
|
-
return turnResult;
|
|
209
|
+
return finish(turnResult);
|
|
173
210
|
}
|
|
174
211
|
lastResult = turnResult;
|
|
175
212
|
if (supervisor.signal.aborted || turnResult.retryable === false) break;
|
|
@@ -184,7 +221,13 @@ async function runEmbeddedTurnForSession(params) {
|
|
|
184
221
|
}, hasNextCandidate ? "Agent model turn failed, trying fallback" : "Agent model turn failed, no fallback remains");
|
|
185
222
|
} catch (err) {
|
|
186
223
|
lastError = err;
|
|
187
|
-
if (err instanceof DOMException && err.name === "AbortError")
|
|
224
|
+
if (err instanceof DOMException && err.name === "AbortError") {
|
|
225
|
+
await finish({
|
|
226
|
+
ok: false,
|
|
227
|
+
errorMessage: "aborted"
|
|
228
|
+
});
|
|
229
|
+
throw err;
|
|
230
|
+
}
|
|
188
231
|
log.warn({
|
|
189
232
|
err,
|
|
190
233
|
sessionKey,
|
|
@@ -209,13 +252,19 @@ async function runEmbeddedTurnForSession(params) {
|
|
|
209
252
|
resumeLastUserMessage = preparation === "resume";
|
|
210
253
|
}
|
|
211
254
|
}
|
|
212
|
-
if (lastResult) return lastResult;
|
|
213
|
-
if (lastError
|
|
214
|
-
|
|
215
|
-
|
|
255
|
+
if (lastResult) return finish(lastResult);
|
|
256
|
+
if (lastError != null) {
|
|
257
|
+
const result = await finish({
|
|
258
|
+
ok: false,
|
|
259
|
+
errorMessage: lastError instanceof Error ? lastError.message : String(lastError)
|
|
260
|
+
});
|
|
261
|
+
if (lastError instanceof Error) throw lastError;
|
|
262
|
+
throw new Error(result.errorMessage);
|
|
263
|
+
}
|
|
264
|
+
return finish({
|
|
216
265
|
ok: false,
|
|
217
266
|
errorMessage: "No model candidates available"
|
|
218
|
-
};
|
|
267
|
+
});
|
|
219
268
|
} finally {
|
|
220
269
|
supervisor.dispose();
|
|
221
270
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentMessage, AgentToolResult, ThinkingLevel } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import type { AssistantMessageEvent, Model, Api, ImageContent } from '@earendil-works/pi-ai';
|
|
3
|
+
import type { TurnOutcome } from '@xopcai/gateway-contract';
|
|
3
4
|
import type { SessionStore } from '../../session/store.js';
|
|
4
5
|
import type { EmbeddedTranscriptRuntime } from './transcript-runtime.js';
|
|
5
6
|
import type { AgentTurnPolicy } from '../orchestration/agent-turn-policy.js';
|
|
@@ -76,6 +77,10 @@ export type EmbeddedStreamEvent = {
|
|
|
76
77
|
type: 'error';
|
|
77
78
|
runId?: string;
|
|
78
79
|
content: string;
|
|
80
|
+
} | {
|
|
81
|
+
type: 'turn_outcome';
|
|
82
|
+
runId?: string;
|
|
83
|
+
outcome: TurnOutcome;
|
|
79
84
|
} | {
|
|
80
85
|
type: 'compaction';
|
|
81
86
|
runId?: string;
|
|
@@ -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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "../../config/schema.js";
|
|
2
2
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
3
|
-
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
4
3
|
import { getDefaultModelSync, getModelsByProvider, init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
4
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
5
|
import { resolveAgentModelFallbackValues, resolveAgentModelPrimaryValue } from "../../config/model-input.js";
|
|
6
6
|
import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
|
|
7
7
|
import "../../capabilities/readiness/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveAgentDir } from "../../config/paths.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
4
|
+
import { init_paths, resolveAgentDir } from "../../config/paths.js";
|
|
5
5
|
import { join } from "path";
|
|
6
6
|
import { existsSync, watch } from "fs";
|
|
7
7
|
import { mkdir, readFile, readdir, rename } from "fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveMcpOAuthPath } from "../../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomic } from "../../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveMcpOAuthPath } from "../../../config/paths.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { readFile, rm } from "node:fs/promises";
|
|
5
5
|
//#region src/agent/mcp/oauth/mcp-oauth-store.ts
|
|
@@ -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 ? "Declare final user-facing files in `exec_command.outputs`. Use `publish_artifacts` only when files were created by another runtime or were not known when the command started. 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." : "",
|