@xopcai/xopc 0.0.386 → 0.0.387
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/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-D-86VOlb.js → agent-avatar-dicebear-Bv8M5ygD.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-SmeUVHY8.js → agent-defaults-settings-panel-UBy01-65.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BVT3wXq5.js → agent-plugin-dialog-Q9guA8kU.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-D7rLQFhX.js → agents-yfJFubD0.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CUR7n5iP.js → app-management-settings-panel-Cdyad8c1.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BCotSGep.js → appearance-settings-DPPvnKH_.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-hk0bo9LT.js → apps-page-Bn_jwaeA.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CqxuUwox.js → automations-page-CAB2sLJ5.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-11_Z69pr.js → automations-workspace-CYRUhhH4.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-eldB84Mj.js → block-editor-B9DmMEa8.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-D4TaUPYT.js → browser-automations-page-BHAWpZE2.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-BXRlxeGV.js → browser-settings-page-BG_17NcQ.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-DVj9n65C.js → capabilities-BX1rCiVm.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BkKgImWi.js → capabilities-CW389yo6.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CyYlueEd.js → capabilities-page-BAnBYWlY.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-uVEgfvo0.js → capabilities-settings-panel-Ca-d6lXk.js} +3 -3
- package/dist/gateway/static/root/assets/{capability-header-actions-BXv0xu56.js → capability-header-actions-B3TL8TcF.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-fNb3SOzm.js → channels-BadpS-nq.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CnLtparQ.js → chat-terminal-dock-C_vntFpP.js} +1 -1
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE-BMYIfy9x.js → chunk-KS7C4IRE--EKdQGRF.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-xM0AnOlP.js → computer-settings-page-B-5kxk70.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-CdG2WUb6.js → connector-service-page-DTnfpLHL.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-BRd08GH6.js → connectors-page-CmJV7gqj.js} +1 -1
- package/dist/gateway/static/root/assets/constants-DeXt1mV-.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-DIBbE-O8.js → date-picker-D5zYeC8q.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DDD8zokD.js → dependency-picker-D72vT-tb.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-KlF390Xn.js → desktop-pet-DvoeVPf_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CgqQMKDC.js → desktop-pet-settings-Dfb392hs.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-BR6isfG2.js → device-pairing-wizard-B06Sqn5D.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-vPQsW05P.js → directory-picker-path-field-CA3H3bc-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-ZHLPrLbH.js → extension-debug-page-B0wTBCx4.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DJ42KFRN.js → extension-page-BeHiXhB1.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-6IcsyNaV.js → extension-provider-CJZ5EVpQ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-D7-5v0V4.js → extension-settings-page-Q88-LFCJ.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-DnYn7qOV.js → fallback-models-BXoPCvzq.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-Bwe3JWX-.js → gateway-settings-IICLMGDI.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-DefTxF3q.js → highlighted-body-KQOG7T2V-D336so8z.js} +1 -1
- package/dist/gateway/static/root/assets/home-page--MvqsFhQ.js +2 -0
- package/dist/gateway/static/root/assets/{imports-page-CTdBYZib.js → imports-page-muV1SduS.js} +1 -1
- package/dist/gateway/static/root/assets/index-D0qMv3jf.js +260 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CXKp57O_.js → keyboard-shortcuts-settings-i1sDWcwl.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-DzD_OzGY.js → local-app-workbench-page-DY9tXEO6.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-B0E0vttg.js → local-apps-page-BHD73STy.js} +1 -1
- package/dist/gateway/static/root/assets/local-session-drafts-Be4BGM4Z.js +1 -0
- package/dist/gateway/static/root/assets/{logs-page-eL4fYcMl.js → logs-page-DsPpe8Ws.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-DSpjodMC.js → management-settings-Buwi2wQE.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DHfQAvZQ.js → markdown-view-CBjl-XEc.js} +2 -2
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-D2mip-f9.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-CsY5tQp5.js → note-detail-panel-D8n80Gbr.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-api-nqN2wKYc.js → notes-api-BlGP533W.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-D09LjNoj.js → notes-page-Btf-jSS_.js} +5 -5
- package/dist/gateway/static/root/assets/{page-context-capture-button-DO-aP3D9.js → page-context-capture-button-97RL8Gc7.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-E8F2aGNB.js → personal-page-B04L8Oz5.js} +1 -1
- package/dist/gateway/static/root/assets/product-open-page-9zEDvZa7.js +1 -0
- package/dist/gateway/static/root/assets/{product-preview-content-B-cz-pIV.js → product-preview-content-DynBrIXq.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-WhefAh8E.js → project-detail-page-BM7MsoVA.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CyqAs0tO.js → projects-page-pcyeEJnz.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-BwhRGL6m.js → remote-access-hub-CphyTu22.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-o26dmPNq.js → runtime-tools-settings-panel-DPafoO0G.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-D_e19kv_.js → scenes-page-j97FrDRW.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-DLLdqUC3.js → schema-form-CuJNwKHO.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-2I-nFJcE.js → send-session-input-C293-Hbx.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-Co5ozD0l.js → session-manager-COd9RECl.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-DX6INsiS.js → sessions-page-D8t_8fMl.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CDkitNHA.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-Bc_zxxRu.js → settings-page-DS9DMYUe.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-FpF_cPPr.js → setup-status-panel-DRDvm9yZ.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-C47Xgzta.js → share-link-dialog-BKGI8Kr0.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BOCcPBqQ.js → share-preview-page-BF2WaO43.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-CInxjxgJ.js → shares-settings-DQTQZu6V.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-Bjd8WAA4.js → skill-api-DzVa7G-O.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-8CKS3Oo2.js → skills-page-CfJIjRdS.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-BgQdsrNw.js → system-settings-panel-Bzhqed-a.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-BnG5ehZ6.js → task-detail-page-BYQFC0-U.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-BCuc70Vc.js → task-expandable-content-C9ohICpw.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CY7MoDGf.js → tunnel-api-DrgpZ81I.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-s8Sv_PIG.js → usage-page-Drk8FWnj.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-D0S2iZF4.js → use-composer-attachments-rgW7h4sD.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BElqELib.js → use-file-preview-expanded-DSKIxfz9.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-CyWrEtHY.js → user-model-page-07t2-nFE.js} +2 -2
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DmZXLs1v.js → work-discovery-overlay-TQ5bjVot.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BdLOzHm4.js → workflow-run-setup-panel-C9HP2uGG.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-Cx3I3AV5.js → workflows-page-DK01JRI1.js} +3 -3
- package/dist/gateway/static/root/assets/{workspace-api-Du7-xJ0q.js → workspace-api-JWHOFos6.js} +2 -2
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-D8B136vW.js → xopc-cloud-account-card-B-BhQdAf.js} +1 -1
- package/dist/gateway/static/root/index.html +15 -15
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/index.js +2 -0
- package/dist/packages/gateway-contract/src/result-reference.js +25 -0
- package/dist/packages/gateway-contract/src/session-input-command.js +2 -1
- package/dist/packages/gateway-contract/src/task-research-result.js +1 -0
- package/dist/packages/gateway-contract/src/task-result-delivery.js +21 -0
- package/dist/packages/gateway-contract/src/turn-outcome.js +1 -0
- package/dist/src/agent/agent-manager.js +3 -3
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/xopc-tools-bridge.js +13 -2
- package/dist/src/agent/external-tools/cliProvider.js +1 -1
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +2 -0
- package/dist/src/agent/service/direct-turn-helpers.js +4 -0
- package/dist/src/agent/service/process-direct-one-shot.js +4 -1
- package/dist/src/agent/service/process-direct-streaming.js +3 -2
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/source-context/index.js +1 -1
- package/dist/src/agent/source-context/result-context.d.ts +2 -0
- package/dist/src/agent/source-context/result-context.js +32 -0
- package/dist/src/agent/source-context/types.d.ts +2 -2
- package/dist/src/agent/source-context/types.js +1 -1
- package/dist/src/agent/tools/exec-command.js +47 -2
- package/dist/src/agent/tools/factory.js +17 -10
- package/dist/src/agent/tools/personal-performance.d.ts +2 -0
- package/dist/src/agent/tools/personal-performance.js +82 -0
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +1 -1
- package/dist/src/agent/tools/personal-result-tool.d.ts +2 -0
- package/dist/src/agent/tools/personal-result-tool.js +106 -0
- package/dist/src/agent/tools/personal-task-tool.d.ts +11 -1
- package/dist/src/agent/tools/personal-task-tool.js +106 -2
- package/dist/src/agent/tools/review-workspace.js +20 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.d.ts +9 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +121 -2
- package/dist/src/agent/tools/task-evidence.d.ts +3 -0
- package/dist/src/agent/tools/task-evidence.js +71 -0
- package/dist/src/agent/tools/task-result-tool.js +24 -4
- package/dist/src/agent/tools/tool-media.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +25 -4
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/service/action-executor.js +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.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/utils/init-workspace-core.js +1 -1
- package/dist/src/config/agent-profile.js +2 -2
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +1 -1
- package/dist/src/connectors/connection-recovery-service.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/agent-stream.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +2 -2
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +20 -1
- package/dist/src/gateway/service/session-input-coordinator.js +2 -2
- package/dist/src/gateway/service.js +40 -9
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/media/session-references.js +1 -1
- package/dist/src/personal-agent/communication.js +1 -0
- package/dist/src/personal-agent/performance.d.ts +83 -0
- package/dist/src/personal-agent/performance.js +65 -0
- package/dist/src/personal-agent/policy.d.ts +1 -1
- package/dist/src/personal-agent/policy.js +1 -0
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- package/dist/src/personal-agent/prompt-context.js +3 -1
- package/dist/src/personal-agent/prompts.js +6 -3
- package/dist/src/personal-agent/reply-composer.js +79 -8
- package/dist/src/personal-agent/request-delivery.js +3 -1
- package/dist/src/personal-agent/request-service.js +1 -1
- package/dist/src/personal-agent/result-extraction.d.ts +42 -0
- package/dist/src/personal-agent/result-extraction.js +209 -0
- package/dist/src/personal-agent/result-read-continuations.d.ts +13 -0
- package/dist/src/personal-agent/result-read-continuations.js +78 -0
- package/dist/src/personal-agent/result-reader.d.ts +43 -0
- package/dist/src/personal-agent/result-reader.js +461 -0
- package/dist/src/personal-agent/service.js +2 -2
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.js +1 -1
- package/dist/src/session/client-history.d.ts +1 -1
- package/dist/src/session/client-history.js +1 -1
- package/dist/src/session/session-context-for-llm.js +2 -0
- package/dist/src/share/hosted-session-share.js +1 -1
- package/dist/src/storage/sqlite/migrations/251_personal_result_reads.sql +40 -0
- package/dist/src/storage/sqlite/migrations/252_task_work_revisions.sql +15 -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/schema.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +61 -10
- package/dist/src/tasks/task-application-service.d.ts +18 -0
- package/dist/src/tasks/task-application-service.js +131 -0
- package/dist/src/tasks/task-context-assembler.js +8 -5
- package/dist/src/tasks/task-contract-definition.d.ts +3 -0
- package/dist/src/tasks/task-contract-planner.js +50 -16
- package/dist/src/tasks/task-conversation-repository.js +1 -1
- package/dist/src/tasks/task-evidence-ranges.d.ts +7 -0
- package/dist/src/tasks/task-evidence-ranges.js +20 -0
- package/dist/src/tasks/task-execution-capabilities.d.ts +26 -0
- package/dist/src/tasks/task-execution-capabilities.js +117 -0
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.d.ts +56 -0
- package/dist/src/tasks/task-handoff.js +510 -0
- package/dist/src/tasks/task-read-model-projector.d.ts +6 -0
- package/dist/src/tasks/task-read-model-projector.js +12 -1
- package/dist/src/tasks/task-research-repair.js +6 -2
- package/dist/src/tasks/task-research-result.d.ts +16 -2
- package/dist/src/tasks/task-research-result.js +123 -39
- package/dist/src/tasks/task-result-delivery-repository.js +26 -3
- package/dist/src/tasks/task-result-delivery-service.js +37 -9
- package/dist/src/tasks/task-run-coordinator.js +3 -1
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -0
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +6 -4
- package/dist/gateway/static/root/assets/constants-CpWu0oHS.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BtSy2hRV.js +0 -2
- package/dist/gateway/static/root/assets/index-B08iR7fT.js +0 -260
- package/dist/gateway/static/root/assets/local-session-drafts-D_tYFy7d.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-BTrk2wWv.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-aUoA-uPw.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C4_gW1vw.js +0 -1
package/dist/gateway/static/root/assets/{workspace-api-Du7-xJ0q.js → workspace-api-JWHOFos6.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/session-manager-
|
|
2
|
-
import{t as e}from"./preload-helper-zJ_50EbN.js";import{i as t,r as n}from"./locale-store-uRu_DsWm.js";import{i as r,n as i,r as a,t as o}from"./files-Bw4SBGdM.js";async function s(e){let t=await e.json().catch(()=>null);return Error(t?.error?.message??`HTTP ${e.status}`)}async function c(e,r){let i=await t(n(e),r);if(!i.ok)throw await s(i);return i.json()}async function l(t){if(!t?.projectId&&t?.conversationId){let{SessionManager:n}=await e(async()=>{let{SessionManager:e}=await import(`./session-manager-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/session-manager-COd9RECl.js","assets/rolldown-runtime-aKtaBQYM.js","assets/locale-store-uRu_DsWm.js","assets/vendor-react-BOUWij0V.js","assets/messages-DTqbfje6.js","assets/schemas-CObaziC7.js","assets/gateway-realtime-BnHraJ3O.js","assets/gateway-realtime-store-BVriF6Zj.js","assets/local-session-drafts-Be4BGM4Z.js","assets/session-api-CzVTrG8n.js","assets/gateway-startup-retry-C1DQsIH3.js","assets/constants-DeXt1mV-.js","assets/tool-activity-BtJkgjFf.js","assets/registry-api-CYqA7bfl.js","assets/preload-helper-zJ_50EbN.js","assets/attachment-utils-core-BIOUBrpT.js","assets/agents-admin-api-BkULgC6Q.js","assets/gateway-config-swr-D0tBjSgj.js","assets/vendor-swr-BIWyz7Rc.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./preload-helper-zJ_50EbN.js";import{i as t,r as n}from"./locale-store-uRu_DsWm.js";import{i as r,n as i,r as a,t as o}from"./files-Bw4SBGdM.js";async function s(e){let t=await e.json().catch(()=>null);return Error(t?.error?.message??`HTTP ${e.status}`)}async function c(e,r){let i=await t(n(e),r);if(!i.ok)throw await s(i);return i.json()}async function l(t){if(!t?.projectId&&t?.conversationId){let{SessionManager:n}=await e(async()=>{let{SessionManager:e}=await import(`./session-manager-COd9RECl.js`).then(e=>e.n);return{SessionManager:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));await new n().materialize(t.conversationId,`session_resources`)}let n=t?.projectId?{kind:`project`,id:t.projectId}:t?.conversationId?{kind:`session`,id:t.conversationId}:t?.agentId?{kind:`agent`,id:t.agentId}:null;if(n){let e=await c(`/api/files/contexts/${n.kind}/${encodeURIComponent(n.id)}`);return r.parse(e.space)}let i=await c(`/api/files/default-space`);return r.parse(i.space)}function u(e){return{id:e.id,name:e.name,path:e.relativePath,isDirectory:e.kind===`directory`,mimeType:e.mimeType,revision:e.revision}}async function d(e,t){let n=await l(t),r=await c(`/api/files/resolve`,{method:`POST`,body:JSON.stringify({spaceId:n.id,path:e,taskRunId:t?.taskRunId})});return i.parse(r.resource)}async function f(e,t){return d(e,t)}async function p(e=``,t){let n=await l(t),r=new URLSearchParams;return e&&r.set(`path`,e),{entries:a.parse(await c(`/api/files/spaces/${encodeURIComponent(n.id)}/children${r.size?`?${r}`:``}`)).items.map(u)}}async function m(e=``,t){return(await p(e,t)).entries}async function h(e){let t=await l(e);return u(o.parse(await c(`/api/files/spaces/${encodeURIComponent(t.id)}/root`)).resource)}async function g(e,t,n=50){let r=await l(t),i=new URLSearchParams({q:e.trim(),limit:String(n),spaceId:r.id});return a.parse(await c(`/api/files/search?${i}`)).items.map(u)}async function _(e,r){let i=await d(e,r),a=await t(n(`/api/files/${encodeURIComponent(i.id)}/content`));if(!a.ok)throw await s(a);return{content:await a.text(),path:i.relativePath,mtimeMs:i.modifiedAt,revision:i.revision}}async function v(e,t){let n;try{n=await l(t)}catch{return null}try{let r=await c(`/api/files/resolve`,{method:`POST`,body:JSON.stringify({spaceId:n.id,path:e,taskRunId:t?.taskRunId})}),a=i.parse(r.resource);return{absolutePath:r.absolutePath,fileId:a.id,inputPath:e,displayName:a.name,scope:r.absolutePath?`external`:`workspace`,locationKind:r.absolutePath?`host`:`workspace`,exists:!0,isDirectory:a.kind===`directory`,workspaceRelativePath:a.relativePath,capabilities:a.capabilities.filter(e=>e===`preview`||e===`edit`),mtimeMs:a.modifiedAt}}catch{try{return(await c(`/api/files/resolve-reference`,{method:`POST`,body:JSON.stringify({spaceId:n.id,path:e,conversationId:t?.conversationId})})).reference}catch{return null}}}async function y(e,t,n){return await c(`/api/files/references/${encodeURIComponent(e)}/action`,{method:`POST`,body:JSON.stringify({action:t,conversationId:n?.conversationId})})}async function b(e,r){let i=await d(e,r),a=await t(n(`/api/files/${encodeURIComponent(i.id)}/content`),{headers:{Accept:`*/*`}});if(!a.ok)throw await s(a);return a.blob()}async function x(e,t,n){let r=await d(e,n),a=await c(`/api/files/${encodeURIComponent(r.id)}/content`,{method:`PUT`,body:JSON.stringify({content:t,revision:r.revision})}),o=i.parse(a.resource);return{path:o.relativePath,mtimeMs:o.modifiedAt,revision:o.revision}}async function S(e,r=``,i){let a=await l(i),c=new FormData;c.set(`directory`,r),c.set(`file`,e);let d=await t(n(`/api/files/spaces/${encodeURIComponent(a.id)}/upload`),{method:`POST`,body:c});if(!d.ok)throw await s(d);return u(o.parse(await d.json()).resource)}async function C(e){let r=await t(n(`/api/files/${encodeURIComponent(e)}`),{method:`DELETE`});if(!r.ok)throw await s(r)}function w(e,t){let n=new Blob([t],{type:`text/plain;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}function T(e,t,n){let r=new Blob([t],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}export{b as a,_ as c,f as d,g as f,p as i,y as l,x as m,T as n,h as o,S as p,w as r,m as s,C as t,v as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./cloud-C4-yfnnk.js";import{t as r}from"./external-link-DjqjBmc3.js";import{a as i,n as a,r as o}from"./locale-store-uRu_DsWm.js";import{n as s,t as c}from"./cloud-credits-BMYMiiNn.js";import{i as l}from"./vendor-swr-BIWyz7Rc.js";import{t as u}from"./button-aIC072nz.js";import{t as d}from"./skeleton-BI5TyibZ.js";import{So as f,Xo as p}from"./index-
|
|
1
|
+
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./cloud-C4-yfnnk.js";import{t as r}from"./external-link-DjqjBmc3.js";import{a as i,n as a,r as o}from"./locale-store-uRu_DsWm.js";import{n as s,t as c}from"./cloud-credits-BMYMiiNn.js";import{i as l}from"./vendor-swr-BIWyz7Rc.js";import{t as u}from"./button-aIC072nz.js";import{t as d}from"./skeleton-BI5TyibZ.js";import{So as f,Xo as p}from"./index-D0qMv3jf.js";var m=e(),h=t();function g(e){let t=(BigInt(e)+500n)/1000n*1000n;return s(String(t))}async function _(){let e=await i(o(`/api/models/xopc-cloud/account-summary`));return c.parse(e.payload)}function v(e){let t=(0,m.c)(148),{labels:i}=e,o=a(y)===`zh`?`zh-CN`:`en-US`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={refreshInterval:6e4,revalidateOnFocus:!0},t[0]=s):s=t[0];let{data:c,error:v,isLoading:b,isValidating:x,mutate:S}=l(`/api/models/xopc-cloud/account-summary`,_,s);if(b){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(d,{className:`h-40 w-full rounded-xl`}),t[1]=e):e=t[1],e}if(v||!c){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(f,{className:`mt-0.5 size-4 shrink-0 text-amber-500`,"aria-hidden":!0}),t[2]=e):e=t[2];let n;t[3]===i.title?n=t[4]:(n=(0,h.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:i.title}),t[3]=i.title,t[4]=n);let r;t[5]===i.unavailable?r=t[6]:(r=(0,h.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:i.unavailable}),t[5]=i.unavailable,t[6]=r);let a;t[7]!==n||t[8]!==r?(a=(0,h.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[e,(0,h.jsxs)(`div`,{children:[n,r]})]}),t[7]=n,t[8]=r,t[9]=a):a=t[9];let o;t[10]===S?o=t[11]:(o=()=>void S(),t[10]=S,t[11]=o);let s=x?`size-4 animate-spin`:`size-4`,c;t[12]===s?c=t[13]:(c=(0,h.jsx)(p,{className:s,"aria-hidden":!0}),t[12]=s,t[13]=c);let l;t[14]!==x||t[15]!==i.retry||t[16]!==o||t[17]!==c?(l=(0,h.jsxs)(u,{type:`button`,variant:`secondary`,disabled:x,onClick:o,children:[c,i.retry]}),t[14]=x,t[15]=i.retry,t[16]=o,t[17]=c,t[18]=l):l=t[18];let d;return t[19]!==a||t[20]!==l?(d=(0,h.jsx)(`section`,{className:`rounded-xl bg-surface-hover/25 p-4`,children:(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[a,l]})}),t[19]=a,t[20]=l,t[21]=d):d=t[21],d}let C,w,T,E,D,O,k,A,j,M;if(t[22]!==c.balance.availableCreditMicro||t[23]!==c.balance.expiring[0]||t[24]!==c.balance.grantedCreditMicro||t[25]!==c.balance.purchasedCreditMicro||t[26]!==c.balance.refundReservedCreditMicro||t[27]!==c.balance.usageReservedCreditMicro||t[28]!==c.links.details||t[29]!==c.links.purchase||t[30]!==c.usage.chargedCreditMicro||t[31]!==c.usage.requests||t[32]!==c.usage.totalTokens||t[33]!==i.availableCredits||t[34]!==i.connected||t[35]!==i.details||t[36]!==i.expiring||t[37]!==i.granted||t[38]!==i.purchase||t[39]!==i.purchased||t[40]!==i.recentUsage||t[41]!==i.reserved||t[42]!==i.title||t[43]!==i.tokenUsage||t[44]!==i.usageSummary||t[45]!==i.zeroBalance||t[46]!==o){let e=new Intl.NumberFormat(o),a=i.usageSummary.replace(`{{credits}}`,g(c.usage.chargedCreditMicro)).replace(`{{requests}}`,e.format(c.usage.requests));C=`rounded-xl bg-surface-hover/40 p-4 sm:p-5`;let s;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,h.jsx)(n,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),t[57]=s):s=t[57];let l;t[58]===i.title?l=t[59]:(l=(0,h.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:i.title}),t[58]=i.title,t[59]=l);let d;t[60]===i.connected?d=t[61]:(d=(0,h.jsx)(`span`,{className:`rounded-full bg-emerald-500/10 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:text-emerald-300`,children:i.connected}),t[60]=i.connected,t[61]=d);let f;t[62]!==l||t[63]!==d?(f=(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[s,l,d]}),t[62]=l,t[63]=d,t[64]=f):f=t[64];let p;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,h.jsx)(r,{className:`size-3.5`,"aria-hidden":!0}),t[65]=p):p=t[65];let m;t[66]!==c.links.purchase||t[67]!==i.purchase?(m=(0,h.jsx)(u,{asChild:!0,variant:`primary`,children:(0,h.jsxs)(`a`,{href:c.links.purchase,target:`_blank`,rel:`noreferrer`,children:[i.purchase,p]})}),t[66]=c.links.purchase,t[67]=i.purchase,t[68]=m):m=t[68];let _;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,h.jsx)(r,{className:`size-3.5`,"aria-hidden":!0}),t[69]=_):_=t[69];let v;t[70]!==c.links.details||t[71]!==i.details?(v=(0,h.jsx)(u,{asChild:!0,variant:`secondary`,children:(0,h.jsxs)(`a`,{href:c.links.details,target:`_blank`,rel:`noreferrer`,children:[i.details,_]})}),t[70]=c.links.details,t[71]=i.details,t[72]=v):v=t[72];let y;t[73]!==m||t[74]!==v?(y=(0,h.jsxs)(`div`,{className:`flex shrink-0 flex-wrap gap-2`,children:[m,v]}),t[73]=m,t[74]=v,t[75]=y):y=t[75],t[76]!==f||t[77]!==y?(w=(0,h.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[f,y]}),t[76]=f,t[77]=y,t[78]=w):w=t[78],j=`mt-4 grid gap-4 rounded-lg bg-surface-base/45 p-3 sm:grid-cols-[minmax(12rem,0.7fr)_minmax(0,1.3fr)] sm:gap-6`;let b;t[79]===i.availableCredits?b=t[80]:(b=(0,h.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:i.availableCredits}),t[79]=i.availableCredits,t[80]=b);let x;t[81]===c.balance.availableCreditMicro?x=t[82]:(x=g(c.balance.availableCreditMicro),t[81]=c.balance.availableCreditMicro,t[82]=x);let S;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(`span`,{className:`ml-2 text-sm font-medium text-fg-muted`,children:`Credits`}),t[83]=S):S=t[83];let N;t[84]===x?N=t[85]:(N=(0,h.jsxs)(`p`,{className:`mt-1 text-2xl font-semibold tracking-tight text-fg`,children:[x,S]}),t[84]=x,t[85]=N);let P;t[86]!==c.balance.availableCreditMicro||t[87]!==i.zeroBalance?(P=c.balance.availableCreditMicro===`0`?(0,h.jsx)(`p`,{className:`mt-1 text-sm font-medium text-danger`,children:i.zeroBalance}):null,t[86]=c.balance.availableCreditMicro,t[87]=i.zeroBalance,t[88]=P):P=t[88];let F=i.purchased,I;t[89]===c.balance.purchasedCreditMicro?I=t[90]:(I=g(c.balance.purchasedCreditMicro),t[89]=c.balance.purchasedCreditMicro,t[90]=I);let L;t[91]!==i.purchased||t[92]!==I?(L=(0,h.jsxs)(`div`,{children:[F,`: `,I,` Credits`]}),t[91]=i.purchased,t[92]=I,t[93]=L):L=t[93];let R=i.granted,z;t[94]===c.balance.grantedCreditMicro?z=t[95]:(z=g(c.balance.grantedCreditMicro),t[94]=c.balance.grantedCreditMicro,t[95]=z);let B;t[96]!==i.granted||t[97]!==z?(B=(0,h.jsxs)(`div`,{children:[R,`: `,z,` Credits`]}),t[96]=i.granted,t[97]=z,t[98]=B):B=t[98];let V=i.reserved,H=String(BigInt(c.balance.usageReservedCreditMicro)+BigInt(c.balance.refundReservedCreditMicro)),U;t[99]===H?U=t[100]:(U=g(H),t[99]=H,t[100]=U);let W;t[101]!==i.reserved||t[102]!==U?(W=(0,h.jsxs)(`div`,{children:[V,`: `,U,` Credits`]}),t[101]=i.reserved,t[102]=U,t[103]=W):W=t[103];let G;t[104]!==L||t[105]!==B||t[106]!==W?(G=(0,h.jsxs)(`div`,{className:`mt-2 space-y-1 text-xs text-fg-muted`,children:[L,B,W]}),t[104]=L,t[105]=B,t[106]=W,t[107]=G):G=t[107];let K;t[108]!==c.balance.expiring[0]||t[109]!==i.expiring||t[110]!==o?(K=c.balance.expiring[0]?(0,h.jsx)(`p`,{className:`mt-2 text-xs text-amber-600 dark:text-amber-400`,children:i.expiring.replace(`{{credits}}`,g(c.balance.expiring[0].creditMicro)).replace(`{{date}}`,new Date(c.balance.expiring[0].expiresAt).toLocaleDateString(o))}):null,t[108]=c.balance.expiring[0],t[109]=i.expiring,t[110]=o,t[111]=K):K=t[111],t[112]!==b||t[113]!==N||t[114]!==P||t[115]!==G||t[116]!==K?(M=(0,h.jsxs)(`div`,{children:[b,N,P,G,K]}),t[112]=b,t[113]=N,t[114]=P,t[115]=G,t[116]=K,t[117]=M):M=t[117],t[118]===i.recentUsage?k=t[119]:(k=(0,h.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:i.recentUsage}),t[118]=i.recentUsage,t[119]=k),A=(0,h.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:a}),D=`mt-2 text-xs text-fg-subtle`,t[120]===i.tokenUsage?O=t[121]:(O=(0,h.jsx)(`summary`,{className:`cursor-pointer`,children:i.tokenUsage}),t[120]=i.tokenUsage,t[121]=O),T=`mt-1`,E=e.format(c.usage.totalTokens),t[22]=c.balance.availableCreditMicro,t[23]=c.balance.expiring[0],t[24]=c.balance.grantedCreditMicro,t[25]=c.balance.purchasedCreditMicro,t[26]=c.balance.refundReservedCreditMicro,t[27]=c.balance.usageReservedCreditMicro,t[28]=c.links.details,t[29]=c.links.purchase,t[30]=c.usage.chargedCreditMicro,t[31]=c.usage.requests,t[32]=c.usage.totalTokens,t[33]=i.availableCredits,t[34]=i.connected,t[35]=i.details,t[36]=i.expiring,t[37]=i.granted,t[38]=i.purchase,t[39]=i.purchased,t[40]=i.recentUsage,t[41]=i.reserved,t[42]=i.title,t[43]=i.tokenUsage,t[44]=i.usageSummary,t[45]=i.zeroBalance,t[46]=o,t[47]=C,t[48]=w,t[49]=T,t[50]=E,t[51]=D,t[52]=O,t[53]=k,t[54]=A,t[55]=j,t[56]=M}else C=t[47],w=t[48],T=t[49],E=t[50],D=t[51],O=t[52],k=t[53],A=t[54],j=t[55],M=t[56];let N;t[122]!==T||t[123]!==E?(N=(0,h.jsxs)(`p`,{className:T,children:[E,` tokens`]}),t[122]=T,t[123]=E,t[124]=N):N=t[124];let P;t[125]!==N||t[126]!==D||t[127]!==O?(P=(0,h.jsxs)(`details`,{className:D,children:[O,N]}),t[125]=N,t[126]=D,t[127]=O,t[128]=P):P=t[128];let F;t[129]!==c.balance.updatedAt||t[130]!==i.updatedAt||t[131]!==o?(F=i.updatedAt.replace(`{{time}}`,new Date(c.balance.updatedAt).toLocaleString(o)),t[129]=c.balance.updatedAt,t[130]=i.updatedAt,t[131]=o,t[132]=F):F=t[132];let I;t[133]===F?I=t[134]:(I=(0,h.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:F}),t[133]=F,t[134]=I);let L;t[135]!==P||t[136]!==I||t[137]!==k||t[138]!==A?(L=(0,h.jsxs)(`div`,{children:[k,A,P,I]}),t[135]=P,t[136]=I,t[137]=k,t[138]=A,t[139]=L):L=t[139];let R;t[140]!==L||t[141]!==j||t[142]!==M?(R=(0,h.jsxs)(`div`,{className:j,children:[M,L]}),t[140]=L,t[141]=j,t[142]=M,t[143]=R):R=t[143];let z;return t[144]!==C||t[145]!==w||t[146]!==R?(z=(0,h.jsxs)(`section`,{className:C,children:[w,R]}),t[144]=C,t[145]=w,t[146]=R,t[147]=z):z=t[147],z}function y(e){return e.language}export{v as t};
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260910-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260910-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-D0qMv3jf.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">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/floating-ui.dom-B7uQOZZW.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/dist-CI_fqRk-.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/dist-BGTk37IG.js">
|
|
26
|
-
<link rel="modulepreload" crossorigin href="/assets/chunk-KS7C4IRE
|
|
26
|
+
<link rel="modulepreload" crossorigin href="/assets/chunk-KS7C4IRE--EKdQGRF.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-DPHK1VkS.js">
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/bundle-mjs-rHxsej31.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="/assets/cn-0WouolD0.js">
|
|
39
39
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
40
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-CBjl-XEc.js">
|
|
41
41
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
42
42
|
<link rel="modulepreload" crossorigin href="/assets/copy-Dv6d4Dvw.js">
|
|
43
43
|
<link rel="modulepreload" crossorigin href="/assets/button-aIC072nz.js">
|
|
@@ -75,28 +75,28 @@
|
|
|
75
75
|
<link rel="modulepreload" crossorigin href="/assets/index.module-Cd9ENXfk.js">
|
|
76
76
|
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-C1DQsIH3.js">
|
|
77
77
|
<link rel="modulepreload" crossorigin href="/assets/session-api-CzVTrG8n.js">
|
|
78
|
-
<link rel="modulepreload" crossorigin href="/assets/constants-
|
|
78
|
+
<link rel="modulepreload" crossorigin href="/assets/constants-DeXt1mV-.js">
|
|
79
79
|
<link rel="modulepreload" crossorigin href="/assets/app-chrome-BeB4KgOf.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="/assets/attachment-utils-core-BIOUBrpT.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/files-Bw4SBGdM.js">
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/workspace-api-
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/workspace-api-JWHOFos6.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-Dit0bHgy.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="/assets/use-async-resource-GrnWNwMZ.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="/assets/activity-store-CB2X4Gmu.js">
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-DSKIxfz9.js">
|
|
87
87
|
<link rel="modulepreload" crossorigin href="/assets/mic-CuUb7zc-.js">
|
|
88
88
|
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
89
|
-
<link rel="modulepreload" crossorigin href="/assets/share-link-dialog-
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-
|
|
89
|
+
<link rel="modulepreload" crossorigin href="/assets/share-link-dialog-BKGI8Kr0.js">
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-Be4BGM4Z.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="/assets/specialists-4bkS5rZ4.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="/assets/tasks-PuIUgF9L.js">
|
|
93
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
93
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-CW389yo6.js">
|
|
94
94
|
<link rel="modulepreload" crossorigin href="/assets/skill-wire-pattern-BPpeIcCi.js">
|
|
95
95
|
<link rel="modulepreload" crossorigin href="/assets/shares-api-B0HlMAzi.js">
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
97
|
-
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-BX1rCiVm.js">
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-rgW7h4sD.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="/assets/git-branch-Dh9uxTot.js">
|
|
99
|
-
<link rel="modulepreload" crossorigin href="/assets/notes-api-
|
|
99
|
+
<link rel="modulepreload" crossorigin href="/assets/notes-api-BlGP533W.js">
|
|
100
100
|
<link rel="modulepreload" crossorigin href="/assets/message-square-fVE7Ghj1.js">
|
|
101
101
|
<link rel="modulepreload" crossorigin href="/assets/pause-DuPxgSxk.js">
|
|
102
102
|
<link rel="modulepreload" crossorigin href="/assets/play-kxZvpBg8.js">
|
|
@@ -109,10 +109,10 @@
|
|
|
109
109
|
<link rel="modulepreload" crossorigin href="/assets/registry-api-CYqA7bfl.js">
|
|
110
110
|
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-D0tBjSgj.js">
|
|
111
111
|
<link rel="modulepreload" crossorigin href="/assets/agents-admin-api-BkULgC6Q.js">
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/session-manager-
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/send-session-input-
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/session-manager-COd9RECl.js">
|
|
113
|
+
<link rel="modulepreload" crossorigin href="/assets/send-session-input-C293-Hbx.js">
|
|
114
114
|
<link rel="modulepreload" crossorigin href="/assets/theme-store-BUfzeDvL.js">
|
|
115
|
-
<link rel="modulepreload" crossorigin href="/assets/extension-provider-
|
|
115
|
+
<link rel="modulepreload" crossorigin href="/assets/extension-provider-CJZ5EVpQ.js">
|
|
116
116
|
<link rel="modulepreload" crossorigin href="/assets/loopi-Djb8XU3l.js">
|
|
117
117
|
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-Ct6X5zmB.js">
|
|
118
118
|
<link rel="modulepreload" crossorigin href="/assets/skill-api-utils-C7V4JVXM.js">
|
package/dist/package.js
CHANGED
|
@@ -45,6 +45,7 @@ import { init_usage } from "./usage.js";
|
|
|
45
45
|
import { init_task_result_delivery } from "./task-result-delivery.js";
|
|
46
46
|
import { init_session_command_rejection } from "./session-command-rejection.js";
|
|
47
47
|
import { init_personal_proactivity } from "./personal-proactivity.js";
|
|
48
|
+
import { init_result_reference } from "./result-reference.js";
|
|
48
49
|
//#region packages/gateway-contract/src/index.ts
|
|
49
50
|
var init_src = __esmMin((() => {
|
|
50
51
|
init_agent_stream();
|
|
@@ -93,6 +94,7 @@ var init_src = __esmMin((() => {
|
|
|
93
94
|
init_session_command_rejection();
|
|
94
95
|
init_personal_proactivity();
|
|
95
96
|
init_specialists();
|
|
97
|
+
init_result_reference();
|
|
96
98
|
}));
|
|
97
99
|
//#endregion
|
|
98
100
|
init_src();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region packages/gateway-contract/src/result-reference.ts
|
|
3
|
+
/** Stable selection wire; authorization is always checked by the receiving conversation. */
|
|
4
|
+
function resultReferenceId(resultId, sourceId = "body") {
|
|
5
|
+
return `result:${encodeURIComponent(resultId)}:${encodeURIComponent(sourceId)}`;
|
|
6
|
+
}
|
|
7
|
+
function parseResultReferenceId(value) {
|
|
8
|
+
const match = /^result:([^:]+):([^:]+)$/.exec(value);
|
|
9
|
+
if (!match) return null;
|
|
10
|
+
try {
|
|
11
|
+
return {
|
|
12
|
+
resultId: decodeURIComponent(match[1]),
|
|
13
|
+
sourceId: decodeURIComponent(match[2])
|
|
14
|
+
};
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function resultReferenceVersion(delivery) {
|
|
20
|
+
return `${delivery.taskRunId}:${delivery.assignmentEpoch}:${delivery.outcome.outcomeId}`;
|
|
21
|
+
}
|
|
22
|
+
var init_result_reference = __esmMin((() => {}));
|
|
23
|
+
//#endregion
|
|
24
|
+
init_result_reference();
|
|
25
|
+
export { init_result_reference, parseResultReferenceId, resultReferenceId, resultReferenceVersion };
|
|
@@ -49,6 +49,7 @@ var init_task_research_result = __esmMin((() => {
|
|
|
49
49
|
claims: z.array(TaskResearchClaimSchema).min(1).max(40),
|
|
50
50
|
checks: z.array(TaskResearchCheckSchema).max(40),
|
|
51
51
|
review: z.enum(["model_reviewed", "unavailable"]),
|
|
52
|
+
finalArtifactIds: z.array(z.string().min(1)).max(50).optional(),
|
|
52
53
|
inspectedArtifactIds: z.array(z.string().min(1)).max(50).optional(),
|
|
53
54
|
instructionChecks: z.array(z.object({
|
|
54
55
|
sequence: z.number().int().positive(),
|
|
@@ -19,6 +19,27 @@ var init_task_result_delivery = __esmMin((() => {
|
|
|
19
19
|
originTranscriptId: z.string().min(1),
|
|
20
20
|
requestInputId: z.string().optional(),
|
|
21
21
|
assignmentEpoch: z.number().int().nonnegative(),
|
|
22
|
+
resultRevision: z.number().int().positive().optional(),
|
|
23
|
+
previousResultId: z.string().optional(),
|
|
24
|
+
contractVersion: z.number().int().positive().optional(),
|
|
25
|
+
instructionSequence: z.number().int().nonnegative().optional(),
|
|
26
|
+
adoption: z.array(z.object({
|
|
27
|
+
entryId: z.string(),
|
|
28
|
+
sequence: z.number().int(),
|
|
29
|
+
status: z.enum([
|
|
30
|
+
"applied",
|
|
31
|
+
"partially_applied",
|
|
32
|
+
"not_applied",
|
|
33
|
+
"superseded"
|
|
34
|
+
]),
|
|
35
|
+
verification: z.enum([
|
|
36
|
+
"passed",
|
|
37
|
+
"failed",
|
|
38
|
+
"unverified"
|
|
39
|
+
]),
|
|
40
|
+
claimIds: z.array(z.string()),
|
|
41
|
+
note: z.string()
|
|
42
|
+
})).optional(),
|
|
22
43
|
outcome: TurnOutcomeSchema,
|
|
23
44
|
text: z.string().optional(),
|
|
24
45
|
createdAt: z.number()
|
|
@@ -148,6 +148,7 @@ var init_turn_outcome = __esmMin((() => {
|
|
|
148
148
|
title: z.string().min(1),
|
|
149
149
|
kind: TurnOutcomeDeliverableKindSchema,
|
|
150
150
|
mimeType: z.string().optional(),
|
|
151
|
+
sha256: z.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
151
152
|
sizeBytes: z.number().nonnegative().optional(),
|
|
152
153
|
availability: TurnOutcomeArtifactAvailabilitySchema,
|
|
153
154
|
location: TurnOutcomeArtifactLocationSchema,
|
|
@@ -6,11 +6,10 @@ import { consumeClarificationApproval, init_clarification_wait_repository } from
|
|
|
6
6
|
import { getInteractionState } from "../storage/sqlite/interaction-state-repository.js";
|
|
7
7
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
8
8
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
9
|
-
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
10
|
-
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir } from "./agent-scope.js";
|
|
11
|
-
import { extractTextContent } from "./context/workspace.js";
|
|
12
9
|
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
13
10
|
import { enqueueConversationLearning } from "../memory-learning/repository.js";
|
|
11
|
+
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
12
|
+
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir } from "./agent-scope.js";
|
|
14
13
|
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
15
14
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
16
15
|
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
@@ -21,6 +20,7 @@ import { createExtensionAwareStreamFn } from "../providers/extension-stream-brid
|
|
|
21
20
|
import { traceTools } from "../observability/runtime.js";
|
|
22
21
|
import { continuesAfterTool, trackAiUsageStream } from "../usage/recorder.js";
|
|
23
22
|
import { MemoryLearningService } from "../memory-learning/service.js";
|
|
23
|
+
import { extractTextContent } from "./context/workspace.js";
|
|
24
24
|
import { runPersistentLearningJob } from "./background-review/run-background-review.js";
|
|
25
25
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
26
26
|
import { isPersonalConversation } from "../personal-agent/repository.js";
|
|
@@ -5,7 +5,6 @@ import { finishContextExtractionRun } from "../../storage/sqlite/context-extract
|
|
|
5
5
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
6
6
|
import { loadCompactionSourceSnapshot } from "../../storage/sqlite/transcript-repository.js";
|
|
7
7
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
8
|
-
import { extractTextContent } from "../context/workspace.js";
|
|
9
8
|
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
10
9
|
import { failLearningJob, finishLearningJob, learningPolicyHash } from "../../memory-learning/repository.js";
|
|
11
10
|
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
@@ -22,6 +21,7 @@ import { getAssertionSlot, listUserAssertions } from "../../user-model/repositor
|
|
|
22
21
|
import { emptyUserModelCaptureResult, executeUserModelInterpretation } from "../../user-model/capture/executor.js";
|
|
23
22
|
import { parseUserModelInterpretation } from "../../user-model/capture/semantic.js";
|
|
24
23
|
import "../../user-model/capture/index.js";
|
|
24
|
+
import { extractTextContent } from "../context/workspace.js";
|
|
25
25
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
26
26
|
import { resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
27
27
|
import { isAssistantTurnAborted, isAssistantTurnFailed } from "../orchestration/llm-turn-retry.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getXopcToolMetadata } from "./tool-metadata.js";
|
|
2
2
|
import { withDataToolPermissions } from "../tools/dataBatch.js";
|
|
3
|
+
import { recordPersonalPerformance } from "../../personal-agent/performance.js";
|
|
3
4
|
//#region src/agent/embedded/xopc-tools-bridge.ts
|
|
4
5
|
const APPLY_PATCH_BEGIN_MARKER = "*** Begin Patch";
|
|
5
6
|
const APPLY_PATCH_END_MARKER = "*** End Patch";
|
|
@@ -49,7 +50,7 @@ function validateApplyPatchEnvelope(params) {
|
|
|
49
50
|
expected: APPLY_PATCH_BEGIN_MARKER,
|
|
50
51
|
retryHint: "Pass a patch string beginning with the exact marker `*** Begin Patch`."
|
|
51
52
|
};
|
|
52
|
-
const lines = patch.split(/\r?\n/);
|
|
53
|
+
const lines = patch.replace(/[\r\n]+$/, "").split(/\r?\n/);
|
|
53
54
|
const firstLine = lines[0] ?? "";
|
|
54
55
|
if (firstLine !== APPLY_PATCH_BEGIN_MARKER) return {
|
|
55
56
|
code: "invalid_patch_envelope",
|
|
@@ -111,7 +112,17 @@ function xopcToolsToDefinitions(tools) {
|
|
|
111
112
|
async execute(toolCallId, params, signal, onUpdate) {
|
|
112
113
|
if (tool.name === "apply_patch") {
|
|
113
114
|
const envelopeError = validateApplyPatchEnvelope(params);
|
|
114
|
-
if (envelopeError)
|
|
115
|
+
if (envelopeError) {
|
|
116
|
+
recordPersonalPerformance({
|
|
117
|
+
phase: "tool",
|
|
118
|
+
tool: tool.name,
|
|
119
|
+
toolCallId,
|
|
120
|
+
durationMs: 0,
|
|
121
|
+
status: "error",
|
|
122
|
+
errorCode: "patch_envelope"
|
|
123
|
+
});
|
|
124
|
+
return invalidApplyPatchEnvelopeResult(envelopeError);
|
|
125
|
+
}
|
|
115
126
|
}
|
|
116
127
|
return withDataToolPermissions(new Set(tools.map((item) => item.name)), () => tool.execute(toolCallId, params, signal, onUpdate));
|
|
117
128
|
}
|
|
@@ -5,6 +5,7 @@ import { getConnectorAccount, init_connector_account_repository } from "../../st
|
|
|
5
5
|
import { appendConnectorExecutionAudit, consumeConnectorApproval, createConnectorApproval, getConnectorApproval, getConnectorConnection, getConnectorInstallation, init_connector_repository } from "../../storage/sqlite/connector-repository.js";
|
|
6
6
|
import { connectorObjectiveScope, init_connection_wait_repository, publishConnectionWait, requireSessionConnection } from "../../storage/sqlite/connection-wait-repository.js";
|
|
7
7
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
8
|
+
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
8
9
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
9
10
|
import { ExternalEffectNotAppliedError, executeExternalOperation } from "../../capabilities/runtime/external-operations.js";
|
|
10
11
|
import "../../capabilities/runtime/dispatcher.js";
|
|
@@ -17,7 +18,6 @@ import { evaluateConnectorExecutionPolicy } from "../../connectors/policy.js";
|
|
|
17
18
|
import { listConnectorInstances } from "../../connectors/instances.js";
|
|
18
19
|
import { cliOwnerId, recoverCliExecutions } from "../../connectors/cli/store.js";
|
|
19
20
|
import { describeCliAction, executeCliAction } from "../../connectors/cli/runtime.js";
|
|
20
|
-
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
21
21
|
import { externalToolRef, parseExternalToolRef } from "./refs.js";
|
|
22
22
|
import { join } from "node:path";
|
|
23
23
|
import { randomUUID } from "node:crypto";
|
|
@@ -5,17 +5,17 @@ import { getConnectorAccount } from "../../storage/sqlite/connector-account-repo
|
|
|
5
5
|
import { consumeConnectorApproval, createConnectorApproval, getConnectorApproval, getConnectorConnection, getConnectorInstallation, listConnectorActionMetadata, listConnectorConnections, listConnectorInstallations, upsertConnectorActionMetadata, upsertConnectorInstallation } from "../../storage/sqlite/connector-repository.js";
|
|
6
6
|
import { bindObjectiveAccount, connectionBinding, connectionBindings, connectorObjectiveScope, init_connection_wait_repository, publishConnectionWait, requireSessionConnection } from "../../storage/sqlite/connection-wait-repository.js";
|
|
7
7
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
8
|
+
import { canAccessConnectorAccount, currentAccountConnections } from "../../connectors/account-access.js";
|
|
9
|
+
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
8
10
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
9
11
|
import { ExternalEffectNotAppliedError, executeExternalOperation } from "../../capabilities/runtime/external-operations.js";
|
|
10
12
|
import { connectorArgumentsHash, connectorArgumentsPreview } from "../../connectors/approval.js";
|
|
11
|
-
import { canAccessConnectorAccount, currentAccountConnections } from "../../connectors/account-access.js";
|
|
12
13
|
import { connectorIdentitySummary } from "../../connectors/connector-identity.js";
|
|
13
14
|
import { evaluateConnectorExecutionPolicy } from "../../connectors/policy.js";
|
|
14
15
|
import { ComposioSessionsAdapter } from "../../connectors/composio-sessions.js";
|
|
15
16
|
import { getComposioToolkitScope, getConfiguredComposioAuthConfigs, isComposioActionAllowedByCatalog, scopeForComposioAction } from "../../connectors/composio.js";
|
|
16
17
|
import { getConnectorDefinition } from "../../connectors/catalog.js";
|
|
17
18
|
import { listConnectorInstances } from "../../connectors/instances.js";
|
|
18
|
-
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
19
19
|
import { externalToolRef, parseExternalToolRef } from "./refs.js";
|
|
20
20
|
import { isToolInputSchema } from "../../connectors/connection-capabilities.js";
|
|
21
21
|
import { ExternalToolSearchError } from "./search-error.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExternalEffectNotAppliedError, executeExternalOperation } from "../../capabilities/runtime/external-operations.js";
|
|
2
|
-
import { canonicalCapabilityJson } from "../../capabilities/runtime/dispatcher.js";
|
|
3
1
|
import { init_src } from "../../../packages/computer-control-contract/src/index.js";
|
|
4
2
|
import "../../../packages/browser-control-contract/src/index.js";
|
|
3
|
+
import { ExternalEffectNotAppliedError, executeExternalOperation } from "../../capabilities/runtime/external-operations.js";
|
|
4
|
+
import { canonicalCapabilityJson } from "../../capabilities/runtime/dispatcher.js";
|
|
5
5
|
import { externalToolRef, parseExternalToolRef } from "./refs.js";
|
|
6
6
|
import { extractDocumentText } from "../../document-understanding/extract.js";
|
|
7
7
|
import { prepareImageForModel } from "../image/prepare-image-for-model.js";
|
|
@@ -5,8 +5,8 @@ import { getConnectorConnection, getConnectorInstallation, init_connector_reposi
|
|
|
5
5
|
import { connectionBindings, getActiveConnectionWait, init_connection_wait_repository, publishConnectionWait, requireSessionConnection, reviseCurrentConnectionObjective } from "../../storage/sqlite/connection-wait-repository.js";
|
|
6
6
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
7
7
|
import { init_session_repository } from "../../storage/sqlite/session-repository.js";
|
|
8
|
-
import { listConnectorInstances } from "../../connectors/instances.js";
|
|
9
8
|
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
9
|
+
import { listConnectorInstances } from "../../connectors/instances.js";
|
|
10
10
|
import { parseExternalToolRef } from "./refs.js";
|
|
11
11
|
import { setXopcToolMetadata } from "../embedded/tool-metadata.js";
|
|
12
12
|
import { getStoreConnectorInstallPlan, parseStoreConnectorCandidateRef, searchStoreConnectorInstallCandidates } from "../../capabilities/store-connector.js";
|
|
@@ -3,9 +3,9 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
|
3
3
|
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
4
4
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
5
5
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
6
|
-
import { MODEL_IMAGE_MAX_BYTES, MODEL_IMAGE_SOURCE_MAX_BYTES, prepareImageForModel } from "../image/prepare-image-for-model.js";
|
|
7
6
|
import { mimeTypeFromMediaPath } from "../../media/store.js";
|
|
8
7
|
import { readMediaReference } from "../../media/media-reference.js";
|
|
8
|
+
import { MODEL_IMAGE_MAX_BYTES, MODEL_IMAGE_SOURCE_MAX_BYTES, prepareImageForModel } from "../image/prepare-image-for-model.js";
|
|
9
9
|
import { isImageInboundAttachment } from "../../channels/attachments/attachment-classifiers.js";
|
|
10
10
|
import "../../channels/attachments/inbound-persist.js";
|
|
11
11
|
import { expandAtFileMentionsInPlainText } from "../context/expand-at-file-mentions.js";
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* the entry points only manage their I/O specifics (event sink, voice STT,
|
|
6
6
|
* TTS, transcript persistence).
|
|
7
7
|
*/
|
|
8
|
+
import type { TurnOrigin } from '@xopcai/endpoint-tools-protocol';
|
|
8
9
|
import type { AgentMessage } from '@earendil-works/pi-agent-core';
|
|
9
10
|
import type { ImageContent } from '@earendil-works/pi-ai';
|
|
10
11
|
import type { AgentSourceContext } from '../source-context/types.js';
|
|
@@ -51,6 +52,7 @@ export declare function tryRunSlashCommand(deps: TryRunSlashCommandDeps, ctx: {
|
|
|
51
52
|
isGroup?: boolean;
|
|
52
53
|
inboundMetadata?: Record<string, unknown>;
|
|
53
54
|
}, content: string, options?: {
|
|
55
|
+
origin?: TurnOrigin;
|
|
54
56
|
skipResetCommands?: boolean;
|
|
55
57
|
emitEvent?: (event: CommandStreamEvent) => void | Promise<void>;
|
|
56
58
|
sourceContexts?: AgentSourceContext[];
|
|
@@ -35,6 +35,10 @@ async function hydratePerTurnState(deps, conversationId, thinking) {
|
|
|
35
35
|
* can persist the receipt or stream it as a token.
|
|
36
36
|
*/
|
|
37
37
|
async function tryRunSlashCommand(deps, ctx, content, options) {
|
|
38
|
+
if (options?.origin?.type === "system" && options.origin.source === "workflow") return {
|
|
39
|
+
matched: false,
|
|
40
|
+
aggregatedText: ""
|
|
41
|
+
};
|
|
38
42
|
const personal = isPersonalConversation(ctx.conversationId);
|
|
39
43
|
const parsed = personal ? /^\/[a-z][a-z0-9_:-]*(?:\s|$)/i.test(content.trim()) ? parseSlashCommand(content.trim().split(/\r?\n/)[0]) : null : parseSlashCommand(content);
|
|
40
44
|
if (!parsed) return {
|
|
@@ -29,7 +29,10 @@ async function runProcessDirect(deps, input) {
|
|
|
29
29
|
conversationId: input.conversationId,
|
|
30
30
|
channel,
|
|
31
31
|
chatId
|
|
32
|
-
}, turnBody, {
|
|
32
|
+
}, turnBody, {
|
|
33
|
+
origin: input.origin,
|
|
34
|
+
skipResetCommands: resetTriggeredAtInit
|
|
35
|
+
});
|
|
33
36
|
if (slash.matched) {
|
|
34
37
|
const trimmed = slash.aggregatedText.trim();
|
|
35
38
|
if (trimmed) {
|
|
@@ -3,13 +3,14 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
|
3
3
|
import { init_session_input_repository, listTaskUpdateTriggers } from "../../storage/sqlite/session-input-repository.js";
|
|
4
4
|
import { getClarificationResumeInput, init_clarification_wait_repository } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
5
5
|
import { getConnectionResumeInput, init_connection_wait_repository } from "../../storage/sqlite/connection-wait-repository.js";
|
|
6
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
7
6
|
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
7
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
8
8
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
9
9
|
import { abortEmbeddedRun } from "../embedded/runs.js";
|
|
10
10
|
import { clearPendingTranscriptUserMessage, setPendingTranscriptUserMessage } from "../inbound/attachment-pipeline.js";
|
|
11
11
|
import { mergeSttConfigFromAppConfig } from "../../voice/stt/config.js";
|
|
12
12
|
import "../../voice/stt/index.js";
|
|
13
|
+
import { isSessionSourceBinding, summarizeSourceContext } from "../source-context/types.js";
|
|
13
14
|
import { formatAgentRunErrorForClient } from "../client-error-format.js";
|
|
14
15
|
import { resolveConfiguredActivityDetailDefault, resolveEffectiveReasoningLevel } from "../../session/thinking-resolve.js";
|
|
15
16
|
import { initSessionTurn } from "../../session/init-session-turn.js";
|
|
@@ -18,7 +19,6 @@ import { getTaskContinuation } from "../../tasks/task-continuation.js";
|
|
|
18
19
|
import { stripEnvelopeTimestampPrefix } from "../../channels/envelope-timestamp.js";
|
|
19
20
|
import { isVoiceLikeAttachment, mergeVoiceTranscriptsIntoUserText, requestsOriginalVoiceInspection } from "../../channels/attachments/voice-stt-webchat.js";
|
|
20
21
|
import { applyReasoningVisibility } from "../streaming/reasoning-visibility.js";
|
|
21
|
-
import { isSessionSourceBinding, summarizeSourceContext } from "../source-context/types.js";
|
|
22
22
|
import { injectSourceContextsIntoUserMessage } from "../source-context/injector.js";
|
|
23
23
|
import { AsyncQueue, AsyncQueueOverflowError } from "./async-queue.js";
|
|
24
24
|
import { hydratePerTurnState, runDirectAgentTurn, tryRunSlashCommand } from "./direct-turn-helpers.js";
|
|
@@ -265,6 +265,7 @@ async function* runProcessDirectStreaming(deps, input) {
|
|
|
265
265
|
isGroup: context.isGroup,
|
|
266
266
|
inboundMetadata: context.metadata
|
|
267
267
|
}, authoredText, {
|
|
268
|
+
origin: input.origin,
|
|
268
269
|
skipResetCommands: resetTriggeredAtInit,
|
|
269
270
|
emitEvent: (event) => {
|
|
270
271
|
pushVisible({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_attachment_ref, parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
|
-
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
5
|
-
import { extractTextContent } from "./context/workspace.js";
|
|
6
4
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
5
|
+
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
7
6
|
import { extractProfileAgentId, resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
8
7
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
9
8
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
10
9
|
import { configureTracing, flushTracing } from "../observability/runtime.js";
|
|
11
10
|
import { getUserTimezone } from "../user-model/repository.js";
|
|
11
|
+
import { extractTextContent } from "./context/workspace.js";
|
|
12
12
|
import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-timeout.js";
|
|
13
13
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
14
14
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
5
4
|
import { init_paths } from "../../config/paths.js";
|
|
5
|
+
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
6
6
|
import { findInstallSpec, hasBinary, installSkill } from "./installer.js";
|
|
7
7
|
import { applySkillEnvOverrides, createSkillConfigManager, getSkillEnvironment, isSkillEnabled, resolveSkillConfig, validateSkillConfig } from "./config.js";
|
|
8
8
|
import { parseSkillToolConditions } from "./skill-tool-gating.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
1
|
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
|
+
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
3
3
|
import { loadSkillsLock } from "./hub-lock.js";
|
|
4
4
|
import { dirname, join, resolve, sep } from "node:path";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
1
|
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
|
+
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
3
3
|
import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
|
|
4
4
|
import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
5
5
|
import { fuzzyFindText, normalizeForFuzzyMatch, normalizeToLF, restoreLineEndings } from "../tools/edit-diff.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isSessionSourceBinding, isTurnContextRef, parseTurnContextRefs, summarizeSourceContext } from "./types.js";
|
|
2
|
+
import { buildUserAssertionAgentContext } from "./user-assertion-context.js";
|
|
2
3
|
import { injectSourceContextsIntoUserMessage } from "./injector.js";
|
|
3
4
|
import { buildFileAgentContext } from "./file-context.js";
|
|
4
5
|
import { buildSessionAgentContext } from "./session-context.js";
|
|
5
6
|
import { buildBrowserTabAgentContext } from "./browser-tab.js";
|
|
6
|
-
import { buildUserAssertionAgentContext } from "./user-assertion-context.js";
|
|
7
7
|
export { buildBrowserTabAgentContext, buildFileAgentContext, buildSessionAgentContext, buildUserAssertionAgentContext, injectSourceContextsIntoUserMessage, isSessionSourceBinding, isTurnContextRef, parseTurnContextRefs, summarizeSourceContext };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { parseResultReferenceId, resultReferenceVersion } from "../../../packages/gateway-contract/src/result-reference.js";
|
|
2
|
+
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { resolvePersonalResultReference } from "../../personal-agent/result-reader.js";
|
|
4
|
+
//#region src/agent/source-context/result-context.ts
|
|
5
|
+
init_src();
|
|
6
|
+
function buildResultAgentContext(conversationId, sourceId, expectedVersion) {
|
|
7
|
+
const selection = parseResultReferenceId(sourceId);
|
|
8
|
+
if (!selection) return null;
|
|
9
|
+
try {
|
|
10
|
+
const delivery = resolvePersonalResultReference(conversationId, selection.resultId);
|
|
11
|
+
const version = resultReferenceVersion(delivery);
|
|
12
|
+
if (expectedVersion && expectedVersion !== version) return null;
|
|
13
|
+
const artifact = selection.sourceId === "body" ? void 0 : delivery.outcome.deliverables.find((item) => item.artifactId === selection.sourceId);
|
|
14
|
+
if (selection.sourceId !== "body" && !artifact) return null;
|
|
15
|
+
return {
|
|
16
|
+
kind: "result",
|
|
17
|
+
sourceId,
|
|
18
|
+
version,
|
|
19
|
+
title: artifact?.title ?? delivery.taskTitle,
|
|
20
|
+
text: JSON.stringify({
|
|
21
|
+
...selection,
|
|
22
|
+
taskId: delivery.taskId,
|
|
23
|
+
version,
|
|
24
|
+
guidance: "The user selected this result. Read its exact content with personal_result; this reference is not the full source."
|
|
25
|
+
})
|
|
26
|
+
};
|
|
27
|
+
} catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { buildResultAgentContext };
|
|
@@ -13,7 +13,7 @@ export interface SessionSourceBinding {
|
|
|
13
13
|
}
|
|
14
14
|
export interface TurnContextRef {
|
|
15
15
|
refId?: string;
|
|
16
|
-
kind: 'note' | 'task' | 'file' | 'session' | 'browser_tab' | 'user_assertion';
|
|
16
|
+
kind: 'result' | 'note' | 'task' | 'file' | 'session' | 'browser_tab' | 'user_assertion';
|
|
17
17
|
sourceId: string;
|
|
18
18
|
expectedVersion?: string;
|
|
19
19
|
}
|
|
@@ -32,7 +32,7 @@ export interface SourceContextRefSummary {
|
|
|
32
32
|
}
|
|
33
33
|
export interface AgentSourceContext {
|
|
34
34
|
refId?: string;
|
|
35
|
-
kind: SessionSourceBinding['kind'] | 'task' | 'file' | 'session' | 'browser_tab' | 'browser_page' | 'app_context' | 'user_assertion' | 'device_context';
|
|
35
|
+
kind: SessionSourceBinding['kind'] | 'result' | 'task' | 'file' | 'session' | 'browser_tab' | 'browser_page' | 'app_context' | 'user_assertion' | 'device_context';
|
|
36
36
|
sourceId: string;
|
|
37
37
|
version: string;
|
|
38
38
|
title: string;
|