@xopcai/xopc 0.0.313 → 0.0.315
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/assets/{auth-C3yV1y_l.js → auth-DKo-NMUY.js} +18 -1
- package/dist/browser-ext/dist/background.js +68 -2
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +1 -1
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +12 -12
- package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
- package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-C73s_EYF.js → agent-avatar-dicebear-BbFOF2SH.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D9T-QGmd.js +1 -0
- package/dist/gateway/static/root/assets/agents-Ds5sQcPd.js +1 -0
- package/dist/gateway/static/root/assets/{api-Com7kQuw.js → api-BzloAiIG.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-CKueEVbT.js → app-link-nL8iPwEr.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DSo_SV6G.js → app-management-settings-panel-BpUHskXq.js} +1 -1
- package/dist/gateway/static/root/assets/appearance-settings-CQd5Vo6f.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-B7VIsfye.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BWueu3Qt.js → archive-plugin-BM4O6WfL.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DYV25sAC.js → attachment-load-Cdn9MYmI.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Du8AkHrH.js → automations-page-DnRx-Ra4.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-B5s10G5F.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-rahoUE_-.js → binary-plugins-dkhUf4bm.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CVbiuQ90.js → block-editor-BTzqEuAy.js} +29 -29
- package/dist/gateway/static/root/assets/{browser-automation-inputs-CAC4w9KM.js → browser-automation-inputs-Bowij-nJ.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-B3-fdrAr.js → browser-automations-page-CQ7SYTQj.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-vqLoPOOg.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-D0S3DuAD.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DI68WGYd.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-Cimssy-S.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-98GzKJ0K.js → chat-terminal-dock-DzgFHd6l.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-CB3mySQb.js → computer-settings-page-380_vIqO.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-ZlbIXdey.js → connector-service-page-DILFakXb.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-COmFp9HC.js +2 -0
- package/dist/gateway/static/root/assets/conversation-identity-Cw0n9uzK.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-WW3fY-ng.js → date-picker-CRVun-T5.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-D1QgzM_s.js → dependency-picker-BoWqt5yU.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D0MtbTwu.js → desktop-pet-DPlkBjft.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-D7FgfX_K.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-BP6yxut8.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BOtWAAGM.js → extension-debug-page-CT_QkSN_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-FULvawj8.js → extension-page-BF1NdcKP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Dzh6lE26.js → extension-settings-page-CKQVZ3Xc.js} +1 -1
- package/dist/gateway/static/root/assets/files-BK6enEvD.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-D7SG_ECs.js → gateway-config-swr-BPsZPoAT.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-3bIy7XMr.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CrHz00-9.js → gateway-startup-retry-cG6EqUJw.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-DFNDLFgv.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DGiHzeLb.js → image-generation-api-DI_QutIx.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DiJrgu9D.js → imports-page-BUG6G72F.js} +1 -1
- package/dist/gateway/static/root/assets/index-BCi8nfxs.js +89 -0
- package/dist/gateway/static/root/assets/index-DWgd1VK2.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DZ60sucF.js → keyboard-shortcuts-settings-qnG-4FJs.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-B3iJWhjN.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Cx2YuI8E.js → local-apps-page-BpEGeURS.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-vZTDIqJB.js → locale-store-BlgpZORR.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-0QPGj-5c.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-Sl0wwidS.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DJfzcZCW.js → markdown-view-BzjjpL2H.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-COpQGcN3.js → media-plugins-Bzkdhotn.js} +1 -1
- package/dist/gateway/static/root/assets/messages-2GhUD7SC.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-BXtD71j1.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-DNY4vW-u.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-CFt4hXQ6.js +1 -0
- package/dist/gateway/static/root/assets/{page-tabs-nARdLZcP.js → page-tabs-Dz_x22MQ.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BEJg3fTq.js → preview-open-alternatives-C1mkgFAl.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-chCjIpvu.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-CR4Lehku.js → product-open-page-DHZgzSDV.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-D3NhZ7ZZ.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-CEr8DX9I.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CF-nJ5MG.js → registry-api-DMW2apOO.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Db-B-Mf3.js +1 -0
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-DEJi0BLL.js +5 -0
- package/dist/gateway/static/root/assets/scenes-page-BUUX-PnI.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-DOsDKbWU.js → schema-form-RVltVpuG.js} +1 -1
- package/dist/gateway/static/root/assets/schemas-88fK3zzl.js +64 -0
- package/dist/gateway/static/root/assets/sessions-page-Rm4H2okS.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-VxPItcOG.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-kIV5M-9G.js → settings-form-section-BkBO7woF.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-B39PogyD.js → settings-page-layout-lLvHc-zF.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C2TS9mvq.js → settings-page-zl0XY203.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Difrpr4T.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-CMbgRZ7w.js → share-preview-page-NC4Gj867.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DPLvEcB-.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CKdLCf_-.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-DV4FX1ev.js → skills-page-CzekvBNQ.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-C-2lmZHk.js → skills-page.utils-BLeiN245.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CQ1Z6i28.js → system-settings-panel-Bp75s9nl.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-Bh8H4FYR.js +1 -0
- package/dist/gateway/static/root/assets/tasks-CDR_RVbQ.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-tn6H0D44.js → tunnel-api-BDiaC6an.js} +1 -1
- package/dist/gateway/static/root/assets/turn-outcome-D0SnyZ3Z.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-CkEM9tXu.js → use-autosave-C_ntK_Zu.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-C7gFCGAV.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-d0Fawetf.js → voice-api-key-field-D4cfuMp1.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-D_8zU7Li.js → voice-config-api-Cjvd6maH.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-C5FFSieF.js → work-discovery-overlay-Ce6ToB0O.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-q5ammR4k.js → workflow-run-setup-panel-C80nrmKi.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CVQjo3RI.js +6 -0
- package/dist/gateway/static/root/index.html +16 -16
- package/dist/package.js +1 -1
- package/dist/packages/computer-control-contract/src/index.js +10 -1
- package/dist/packages/gateway-contract/src/app-context.js +55 -0
- package/dist/packages/gateway-contract/src/automations.js +16 -17
- package/dist/packages/gateway-contract/src/capabilities.js +1078 -0
- package/dist/packages/gateway-contract/src/extension-capabilities.js +26 -0
- package/dist/packages/gateway-contract/src/home.js +3 -3
- package/dist/packages/gateway-contract/src/index.js +8 -0
- package/dist/packages/gateway-contract/src/product-delivery.js +19 -4
- package/dist/packages/gateway-contract/src/scenes.js +199 -0
- package/dist/packages/gateway-contract/src/task-runs.js +8 -4
- package/dist/packages/gateway-contract/src/tasks.js +5 -4
- package/dist/packages/realtime-client/src/index.js +17 -4
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +19 -18
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/run-background-review.js +4 -4
- package/dist/src/agent/child-agent-factory.d.ts +2 -0
- package/dist/src/agent/child-agent-factory.js +5 -0
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/commands/approved-verification.d.ts +14 -0
- package/dist/src/agent/commands/approved-verification.js +48 -0
- package/dist/src/agent/context/coordinator.js +2 -2
- package/dist/src/agent/context/execution-context.js +4 -4
- package/dist/src/agent/context/execution-scope.js +4 -3
- package/dist/src/agent/context/project-context.js +5 -4
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/index.js +2 -2
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +4 -4
- package/dist/src/agent/embedded/run-turn.js +4 -4
- package/dist/src/agent/embedded/session-tool-result-guard.js +3 -3
- package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +126 -78
- package/dist/src/agent/external-tools/composio-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/composio-provider.js +73 -15
- package/dist/src/agent/external-tools/endpoint-provider.js +14 -1
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/mcp-provider.js +2 -2
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/providers/dashscope.js +1 -1
- package/dist/src/agent/image/generation/providers/fal.js +1 -1
- package/dist/src/agent/image/generation/providers/google.js +1 -1
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +2 -2
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +2 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +2 -1
- package/dist/src/agent/index.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-gateway.d.ts +39 -0
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +33 -2
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +12 -1
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +2 -1
- package/dist/src/agent/mcp/index.js +2 -2
- package/dist/src/agent/mcp/mcp-resource-id.d.ts +6 -0
- package/dist/src/agent/mcp/mcp-resource-id.js +19 -0
- package/dist/src/agent/mcp/mcp-transport.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/memory/compaction-chunks.d.ts +6 -1
- package/dist/src/agent/memory/compaction-chunks.js +16 -3
- package/dist/src/agent/memory/compaction-ledger.d.ts +3 -1
- package/dist/src/agent/memory/compaction-ledger.js +31 -18
- package/dist/src/agent/memory/compaction-request.d.ts +2 -0
- package/dist/src/agent/memory/compaction-request.js +6 -1
- package/dist/src/agent/memory/compaction.d.ts +19 -1
- package/dist/src/agent/memory/compaction.js +112 -30
- package/dist/src/agent/memory/context-recovery.js +1 -1
- package/dist/src/agent/memory/index.js +2 -2
- package/dist/src/agent/orchestration/agent-orchestrator.js +5 -5
- package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +5 -5
- package/dist/src/agent/service/process-direct-one-shot.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.d.ts +3 -0
- package/dist/src/agent/service/process-direct-streaming.js +21 -12
- package/dist/src/agent/service/webchat-tts.js +1 -1
- package/dist/src/agent/service.js +22 -21
- package/dist/src/agent/service.types.d.ts +1 -0
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/config.js +2 -0
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/format-skills-prompt.js +14 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +3 -3
- package/dist/src/agent/skills/index.js +16 -8
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/skills/types.d.ts +1 -1
- package/dist/src/agent/source-context/app-context.d.ts +4 -0
- package/dist/src/agent/source-context/app-context.js +36 -0
- package/dist/src/agent/source-context/browser-tab.d.ts +3 -0
- package/dist/src/agent/source-context/browser-tab.js +29 -0
- package/dist/src/agent/source-context/file-context.d.ts +3 -0
- package/dist/src/agent/source-context/file-context.js +64 -0
- package/dist/src/agent/source-context/index.d.ts +4 -0
- package/dist/src/agent/source-context/index.js +5 -1
- package/dist/src/agent/source-context/injector.js +2 -1
- package/dist/src/agent/source-context/mcp-resource-context.d.ts +8 -0
- package/dist/src/agent/source-context/mcp-resource-context.js +30 -0
- package/dist/src/agent/source-context/session-context.d.ts +8 -0
- package/dist/src/agent/source-context/session-context.js +33 -0
- package/dist/src/agent/source-context/types.d.ts +12 -2
- package/dist/src/agent/source-context/types.js +3 -2
- package/dist/src/agent/tasks/task-judge-service.js +6 -5
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +1 -1
- package/dist/src/agent/tools/automation-tool.d.ts +12 -1
- package/dist/src/agent/tools/automation-tool.js +106 -32
- package/dist/src/agent/tools/create-share-tool.js +4 -4
- package/dist/src/agent/tools/dataBatch.js +1 -1
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/delegation-parent-policy.js +1 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +22 -17
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +3 -3
- package/dist/src/agent/tools/index.js +6 -6
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.js +2 -2
- package/dist/src/agent/tools/read.js +2 -2
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/scoped-workspace-tools.d.ts +8 -0
- package/dist/src/agent/tools/scoped-workspace-tools.js +81 -0
- package/dist/src/agent/tools/send-media.js +2 -2
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/write.js +2 -2
- package/dist/src/agent/tools/xopc-use-tool.d.ts +6 -3
- package/dist/src/agent/tools/xopc-use-tool.js +997 -908
- package/dist/src/agent/workflow/subagent-runner.js +2 -1
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/schema.d.ts +5 -0
- package/dist/src/agent-config/schema.js +14 -10
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/automations/api/routes.js +244 -164
- package/dist/src/automations/capabilities/drafts.d.ts +4 -0
- package/dist/src/automations/capabilities/drafts.js +95 -0
- package/dist/src/automations/capabilities/read.d.ts +4 -0
- package/dist/src/automations/capabilities/read.js +119 -0
- package/dist/src/automations/capabilities/write.d.ts +349 -0
- package/dist/src/automations/capabilities/write.js +172 -0
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/domain/validation.d.ts +77 -77
- package/dist/src/automations/domain/validation.js +9 -6
- package/dist/src/automations/draft/automation-draft-validator.d.ts +2 -2
- package/dist/src/automations/index.js +6 -6
- package/dist/src/automations/service/automation-service.d.ts +31 -0
- package/dist/src/automations/service/automation-service.js +213 -75
- package/dist/src/automations/service/index.js +2 -2
- package/dist/src/automations/storage/automation-repository.d.ts +2 -0
- package/dist/src/automations/storage/automation-repository.js +9 -1
- package/dist/src/automations/storage/automation-run-repository.d.ts +4 -1
- package/dist/src/automations/storage/automation-run-repository.js +16 -3
- package/dist/src/automations/storage/index.js +3 -3
- package/dist/src/browser/automations/schema.d.ts +1 -1
- package/dist/src/browser/automations/service.d.ts +1 -1
- package/dist/src/browser/observation/format.js +4 -0
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/adapters/http.d.ts +4 -0
- package/dist/src/capabilities/adapters/http.js +44 -0
- package/dist/src/capabilities/readiness/from-config.js +11 -7
- package/dist/src/capabilities/runtime/app-context.d.ts +3 -0
- package/dist/src/capabilities/runtime/app-context.js +72 -0
- package/dist/src/capabilities/runtime/atomic-operations.d.ts +11 -0
- package/dist/src/capabilities/runtime/atomic-operations.js +34 -0
- package/dist/src/capabilities/runtime/dispatcher.d.ts +67 -0
- package/dist/src/capabilities/runtime/dispatcher.js +170 -0
- package/dist/src/capabilities/runtime/errors.d.ts +6 -0
- package/dist/src/capabilities/runtime/errors.js +11 -0
- package/dist/src/capabilities/runtime/external-operations.d.ts +16 -0
- package/dist/src/capabilities/runtime/external-operations.js +92 -0
- package/dist/src/capabilities/runtime/product.d.ts +12 -0
- package/dist/src/capabilities/runtime/product.js +69 -0
- package/dist/src/capabilities/runtime/settings.d.ts +3 -0
- package/dist/src/capabilities/runtime/settings.js +27 -0
- package/dist/src/capabilities/store-connector.js +1 -1
- package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
- package/dist/src/channels/index.js +2 -2
- package/dist/src/channels/pairing/allow-from-file.js +9 -9
- package/dist/src/channels/pairing/pairing-store.js +6 -6
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/builtins/understanding.js +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +2 -2
- package/dist/src/chat-commands/context.js +2 -2
- package/dist/src/chat-commands/index.js +2 -2
- package/dist/src/cli/cli-log-level-preset.d.ts +2 -0
- package/dist/src/cli/cli-log-level-preset.js +4 -0
- 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/agent.js +7 -7
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/config.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 +3 -3
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/gateway/shared.js +1 -1
- package/dist/src/cli/commands/gateway/token.js +1 -1
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/mcp.d.ts +1 -0
- package/dist/src/cli/commands/mcp.js +51 -0
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.js +2 -2
- package/dist/src/cli/commands/runtime.js +1 -1
- package/dist/src/cli/commands/skills.js +2 -2
- package/dist/src/cli/commands/tunnel.js +3 -3
- package/dist/src/cli/extension-cli-register.js +4 -4
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/computer/broker.d.ts +0 -1
- package/dist/src/computer/broker.js +4 -6
- package/dist/src/computer/evaluation-harness.d.ts +45 -0
- package/dist/src/computer/evaluation-harness.js +108 -0
- package/dist/src/computer/model-adapter.d.ts +37 -2
- package/dist/src/computer/model-adapter.js +333 -42
- package/dist/src/computer/model-policy.d.ts +4 -1
- package/dist/src/computer/model-policy.js +11 -3
- package/dist/src/computer/release-gate.d.ts +22 -0
- package/dist/src/computer/release-gate.js +19 -0
- package/dist/src/computer/runtime.js +16 -12
- package/dist/src/computer/task-state.d.ts +1 -0
- package/dist/src/computer/task-state.js +1 -0
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.d.ts +6 -0
- package/dist/src/config/models-json.js +3 -3
- package/dist/src/config/schema.d.ts +4 -0
- package/dist/src/config/schema.js +4 -10
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/cli/runtime.js +1 -1
- package/dist/src/connectors/composio-sessions.d.ts +4 -2
- package/dist/src/connectors/composio-sessions.js +11 -10
- package/dist/src/connectors/composio.js +11 -9
- package/dist/src/connectors/connected-source-understanding.js +2 -2
- package/dist/src/connectors/connection-recovery-service.js +5 -5
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/discussions/action-tasks.js +2 -1
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/recording.js +1 -1
- package/dist/src/discussions/sealer.js +1 -1
- package/dist/src/execution-environments/local-worktree-manager.d.ts +1 -0
- package/dist/src/execution-environments/local-worktree-manager.js +13 -2
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/api.js +3 -3
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/normalize-manifest.js +6 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/extensions/types/manifest.d.ts +3 -0
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +4 -4
- package/dist/src/gateway/chat-stream/mapper.js +3 -2
- package/dist/src/gateway/device-routes.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/app.js +3 -3
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
- package/dist/src/gateway/hono/lib/config-payload.js +3 -3
- package/dist/src/gateway/hono/middleware/scopes.js +1 -1
- package/dist/src/gateway/hono/routes/agent-stream.js +2 -2
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +6 -3
- package/dist/src/gateway/hono/routes/browser.js +33 -1
- package/dist/src/gateway/hono/routes/capability-operations.d.ts +3 -0
- package/dist/src/gateway/hono/routes/capability-operations.js +52 -0
- package/dist/src/gateway/hono/routes/commands-skills.js +3 -3
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/devices.js +0 -16
- package/dist/src/gateway/hono/routes/endpoint-tools.js +86 -30
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
- package/dist/src/gateway/hono/routes/local-app-capabilities.d.ts +4 -0
- package/dist/src/gateway/hono/routes/local-app-capabilities.js +41 -0
- package/dist/src/gateway/hono/routes/local-apps.js +41 -9
- package/dist/src/gateway/hono/routes/mcp.js +33 -2
- package/dist/src/gateway/hono/routes/media.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +7 -7
- package/dist/src/gateway/hono/routes/notes.js +216 -147
- package/dist/src/gateway/hono/routes/projects.js +219 -376
- package/dist/src/gateway/hono/routes/scenes.js +188 -75
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +64 -16
- package/dist/src/gateway/hono/routes/session-input-handler.js +49 -7
- package/dist/src/gateway/hono/routes/sessions.js +18 -1
- package/dist/src/gateway/hono/routes/shares.js +3 -3
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +182 -326
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +4 -4
- package/dist/src/gateway/hono/routes/voice.js +7 -7
- package/dist/src/gateway/hono/routes/workflows.js +3 -3
- package/dist/src/gateway/lock.js +11 -11
- package/dist/src/gateway/media-access.js +3 -2
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/scenes/host.js +14 -3
- package/dist/src/gateway/scenes/mailContext.js +1 -1
- package/dist/src/gateway/scenes/slackThreadSource.d.ts +41 -0
- package/dist/src/gateway/scenes/slackThreadSource.js +168 -0
- package/dist/src/gateway/security/gateway-scopes.d.ts +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +5 -0
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +1 -1
- package/dist/src/gateway/service/agent-runner.js +2 -2
- package/dist/src/gateway/service/app-context-access.d.ts +7 -0
- package/dist/src/gateway/service/app-context-access.js +70 -0
- package/dist/src/gateway/service/config-coordinator.js +4 -4
- package/dist/src/gateway/service/marketplace-service.js +3 -3
- package/dist/src/gateway/service/run-gateway-agent.js +13 -4
- package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -1
- package/dist/src/gateway/service/session-input-coordinator.js +56 -17
- package/dist/src/gateway/service/sessions-api.d.ts +1 -0
- package/dist/src/gateway/service/sessions-api.js +4 -1
- package/dist/src/gateway/service/task-conversation-query-service.d.ts +3 -1
- package/dist/src/gateway/service/task-conversation-query-service.js +32 -3
- package/dist/src/gateway/service.d.ts +3 -0
- package/dist/src/gateway/service.js +130 -39
- package/dist/src/gateway/session-context-summary.js +3 -2
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/gateway/workspace-file-search.js +25 -12
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/i18n/share-tool-bundle.js +2 -2
- package/dist/src/imports/runtime.js +1 -1
- package/dist/src/{tasks/task-outbox-dispatcher.d.ts → infra/domain-outbox-dispatcher.d.ts} +2 -2
- package/dist/src/{tasks/task-outbox-dispatcher.js → infra/domain-outbox-dispatcher.js} +10 -9
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/operation-context.d.ts +2 -0
- package/dist/src/infra/operation-context.js +16 -0
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +10 -10
- package/dist/src/local-apps/capabilities/contracts.d.ts +2 -0
- package/dist/src/local-apps/capabilities/contracts.js +32 -0
- package/dist/src/local-apps/capabilities/read.d.ts +3 -0
- package/dist/src/local-apps/capabilities/read.js +48 -0
- package/dist/src/local-apps/capabilities/runtime.d.ts +16 -0
- package/dist/src/local-apps/capabilities/runtime.js +66 -0
- package/dist/src/local-apps/capabilities/write.d.ts +3 -0
- package/dist/src/local-apps/capabilities/write.js +35 -0
- package/dist/src/local-apps/release-lock.d.ts +2 -0
- package/dist/src/local-apps/release-lock.js +20 -0
- package/dist/src/local-apps/runtime-entry.d.ts +0 -2
- package/dist/src/local-apps/runtime-entry.js +1 -14
- package/dist/src/local-apps/scaffold.js +4 -1
- package/dist/src/local-apps/service.d.ts +24 -1
- package/dist/src/local-apps/service.js +187 -44
- package/dist/src/local-apps/store.js +0 -2
- package/dist/src/mcp/capability-server.d.ts +4 -0
- package/dist/src/mcp/capability-server.js +96 -0
- package/dist/src/mcp/channel-bridge.js +1 -1
- package/dist/src/mcp/gateway-http-client.d.ts +7 -0
- package/dist/src/mcp/gateway-http-client.js +27 -5
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/notes/agent-context.js +4 -4
- package/dist/src/notes/capabilities/read.d.ts +3 -0
- package/dist/src/notes/capabilities/read.js +96 -0
- package/dist/src/notes/capabilities/write.d.ts +7 -0
- package/dist/src/notes/capabilities/write.js +152 -0
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.d.ts +12 -4
- package/dist/src/notes/service.js +188 -175
- package/dist/src/notes/store.d.ts +14 -9
- package/dist/src/notes/store.js +81 -21
- package/dist/src/notifications/service.d.ts +1 -0
- package/dist/src/notifications/service.js +5 -0
- package/dist/src/projects/capabilities/read.d.ts +3 -0
- package/dist/src/projects/capabilities/read.js +81 -0
- package/dist/src/projects/capabilities/write.d.ts +9 -0
- package/dist/src/projects/capabilities/write.js +260 -0
- package/dist/src/projects/index.js +2 -2
- package/dist/src/projects/project-change-events.d.ts +2 -0
- package/dist/src/projects/project-change-events.js +18 -0
- package/dist/src/projects/project-service.d.ts +11 -0
- package/dist/src/projects/project-service.js +121 -42
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/projects/project-store.js +12 -2
- package/dist/src/projects/project-workspace-creation.d.ts +3 -0
- package/dist/src/projects/project-workspace-creation.js +45 -0
- package/dist/src/projects/workspace-project.js +6 -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-catalog-persistence.js +1 -1
- package/dist/src/providers/model-catalog-types.d.ts +2 -1
- package/dist/src/providers/model-reference-auditor.js +5 -5
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/model-supplements.js +13 -3
- package/dist/src/providers/presentation.js +3 -3
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/providers/xopc-cloud-model-source.js +4 -2
- package/dist/src/realtime/runtime.js +4 -0
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/scenes/capabilities/read.d.ts +3 -0
- package/dist/src/scenes/capabilities/read.js +187 -0
- package/dist/src/scenes/capabilities/write.d.ts +3 -0
- package/dist/src/scenes/capabilities/write.js +151 -0
- package/dist/src/scenes/contracts.d.ts +2 -105
- package/dist/src/scenes/contracts.js +3 -88
- package/dist/src/scenes/execution.d.ts +1 -1
- package/dist/src/scenes/httpServices.d.ts +2 -0
- package/dist/src/scenes/inbox.d.ts +1 -0
- package/dist/src/scenes/inbox.js +7 -7
- package/dist/src/scenes/preferences.d.ts +3 -24
- package/dist/src/scenes/preferences.js +8 -30
- package/dist/src/scenes/repository.d.ts +1 -0
- package/dist/src/scenes/repository.js +7 -3
- package/dist/src/scenes/resultNotifications.js +2 -2
- package/dist/src/scenes/schedule.d.ts +1 -8
- package/dist/src/scenes/schedule.js +3 -15
- package/dist/src/scenes/service.d.ts +6 -0
- package/dist/src/scenes/service.js +29 -25
- package/dist/src/scenes/taskFollowUp/agentExecutor.d.ts +36 -0
- package/dist/src/scenes/taskFollowUp/agentExecutor.js +149 -0
- package/dist/src/scenes/taskFollowUp/branchInventory.d.ts +38 -0
- package/dist/src/scenes/taskFollowUp/branchInventory.js +70 -0
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +91 -0
- package/dist/src/scenes/taskFollowUp/contracts.js +100 -0
- package/dist/src/scenes/taskFollowUp/resources.d.ts +19 -0
- package/dist/src/scenes/taskFollowUp/resources.js +97 -0
- package/dist/src/scenes/taskFollowUp/service.d.ts +810 -0
- package/dist/src/scenes/taskFollowUp/service.js +710 -0
- package/dist/src/scenes/taskFollowUp/workspaceFingerprint.d.ts +2 -0
- package/dist/src/scenes/taskFollowUp/workspaceFingerprint.js +46 -0
- package/dist/src/scenes/templates.d.ts +2 -2
- package/dist/src/scenes/templates.js +1 -1
- package/dist/src/session/client-history.d.ts +2 -1
- package/dist/src/session/client-history.js +3 -2
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/session-find.d.ts +17 -0
- package/dist/src/session/session-find.js +56 -0
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.d.ts +4 -0
- package/dist/src/session/store.js +46 -10
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/note-share-revocation.d.ts +3 -0
- package/dist/src/share/note-share-revocation.js +26 -0
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.d.ts +15 -1
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +39 -6
- package/dist/src/storage/sqlite/index.d.ts +1 -1
- package/dist/src/storage/sqlite/index.js +2 -2
- package/dist/src/storage/sqlite/migrations/190_scene_development.sql +37 -0
- package/dist/src/storage/sqlite/migrations/191_scene_task_follow_up.sql +27 -0
- package/dist/src/storage/sqlite/migrations/192_capability_operations.sql +20 -0
- package/dist/src/storage/sqlite/migrations/193_note_file_cleanup.sql +8 -0
- package/dist/src/storage/sqlite/migrations/194_capability_external_outcomes.sql +11 -0
- package/dist/src/storage/sqlite/migrations/195_automation_deleted_revisions.sql +4 -0
- package/dist/src/storage/sqlite/migrations/196_automation_run_requests.sql +23 -0
- package/dist/src/storage/sqlite/migrations/197_note_deletion_cleanup.sql +8 -0
- package/dist/src/storage/sqlite/migrations/198_project_workspace_creation.sql +7 -0
- package/dist/src/storage/sqlite/migrations/199_scene_resource_events.sql +488 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +6 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/transaction.d.ts +5 -0
- package/dist/src/storage/sqlite/transaction.js +34 -3
- package/dist/src/tasks/capabilities/management.d.ts +195 -0
- package/dist/src/tasks/capabilities/management.js +111 -0
- package/dist/src/tasks/capabilities/read.d.ts +2 -0
- package/dist/src/tasks/capabilities/read.js +141 -0
- package/dist/src/tasks/capabilities/relations.d.ts +204 -0
- package/dist/src/tasks/capabilities/relations.js +140 -0
- package/dist/src/tasks/capabilities/runs.d.ts +2 -0
- package/dist/src/tasks/capabilities/runs.js +89 -0
- package/dist/src/tasks/capabilities/write.d.ts +207 -0
- package/dist/src/tasks/capabilities/write.js +107 -0
- package/dist/src/tasks/execution-context.js +1 -1
- package/dist/src/tasks/home-query-service.js +5 -4
- package/dist/src/tasks/index.d.ts +0 -1
- package/dist/src/tasks/index.js +9 -9
- package/dist/src/tasks/project-operating-view-service.js +2 -1
- package/dist/src/tasks/task-application-service.d.ts +1 -0
- package/dist/src/tasks/task-application-service.js +4 -3
- package/dist/src/tasks/task-change-events.js +5 -3
- package/dist/src/tasks/task-context-assembler.js +3 -2
- package/dist/src/tasks/task-deletion-service.js +2 -1
- package/dist/src/tasks/task-dependency-service.js +2 -1
- package/dist/src/tasks/task-handoff-service.js +3 -2
- package/dist/src/tasks/task-read-model-projector.js +2 -1
- package/dist/src/tasks/task-repository.d.ts +12 -7
- package/dist/src/tasks/task-repository.js +175 -154
- package/dist/src/tasks/task-run-coordinator.js +2 -1
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tasks/task-run-repository.d.ts +1 -0
- package/dist/src/tasks/task-run-repository.js +29 -14
- package/dist/src/tasks/task-signal-service.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +10 -10
- package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-command-formatters.js +1 -1
- package/dist/src/tui/tui-commands.js +6 -6
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +4 -4
- package/dist/src/tui/tui.js +3 -3
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/config.d.ts +13 -0
- package/dist/src/user-context/config.js +2 -0
- package/dist/src/voice/local/runtime-worker.js +1 -1
- package/dist/src/voice/platform-catalog.d.ts +1 -1
- package/dist/src/voice/realtime/memory-context.js +3 -3
- package/dist/src/voice/realtime/runtime.js +3 -3
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +1 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
- package/dist/src/voice/stt/providers/local-transcription.js +1 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/audio.js +1 -1
- package/dist/src/voice/tts/factory.js +1 -1
- package/dist/src/voice/tts/index.js +1 -1
- package/dist/src/voice/tts/payload.js +1 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
- package/dist/src/work-discovery/incremental-repository.js +1 -1
- package/dist/src/work-discovery/index.js +1 -1
- package/dist/src/work-discovery/repository.d.ts +1 -1
- package/dist/src/work-discovery/repository.js +3 -2
- package/dist/src/work-discovery/service.d.ts +4 -0
- package/dist/src/work-discovery/service.js +40 -15
- package/dist/src/workflows/context/workflow-context.js +3 -2
- package/dist/src/workflows/service/workflow-run-service.js +7 -6
- package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
- package/package.json +8 -4
- package/skills/THIRD_PARTY_NOTICES.md +2 -2
- package/skills/documents/xlsx/SKILL.md +5 -0
- package/skills/engineering/build-xopc-local-app/SKILL.md +2 -0
- package/skills/tools/find-skills/SKILL.md +3 -0
- package/dist/gateway/static/root/assets/activity-store-CS_SAPwP.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-9w_YVThL.js +0 -1
- package/dist/gateway/static/root/assets/agents-Bspu1pT2.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-Jgvx-RKL.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-403o57-3.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-Dpju5KT_.js +0 -7
- package/dist/gateway/static/root/assets/browser-settings-page-C0HJrpr1.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BanM86OX.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-Bhh0F9pO.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BTqjm6eD.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-settings-BI_sQTR_.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-BoPCEIm5.js +0 -1
- package/dist/gateway/static/root/assets/files-Be5viEFY.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-mpOw3R4d.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Z-ErSgkD.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Bq82yXVh.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BD1v6Uee.js +0 -1
- package/dist/gateway/static/root/assets/index-Ah5XDhOL.js +0 -79
- package/dist/gateway/static/root/assets/index-CV5b1pD1.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BF8x3bgh.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-B4vMUM7D.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-Cg0UjJpy.js +0 -1
- package/dist/gateway/static/root/assets/messages-CRH2my19.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-CWVIGctd.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CcTzMI1K.js +0 -8
- package/dist/gateway/static/root/assets/product-delivery-CrAI8ZEa.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BNYoV9Ac.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CcKnYQqm.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-HIvwD5Xn.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-CFE2oX_l.js +0 -5
- package/dist/gateway/static/root/assets/scenes-page-BGKdg4uS.js +0 -1
- package/dist/gateway/static/root/assets/schemas-BaskVM5g.js +0 -64
- package/dist/gateway/static/root/assets/sessions-page-tn99saMj.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cx_uvwqz.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-1kYYg3BH.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Du7BfwId.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BMhhXxRZ.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-vFn3xdlZ.js +0 -1
- package/dist/gateway/static/root/assets/theme-store-DdURyZ1M.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-uK9sxPUH.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-DIyd5AC9.js +0 -6
- package/skills/creative/algorithmic-art/SKILL.md +0 -44
- package/skills/creative/algorithmic-art/templates/generator-template.js +0 -27
- package/skills/creative/algorithmic-art/templates/viewer.html +0 -27
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
2
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
3
2
|
import { resolveSiteShareConfig } from "../../../share/site-share-config.js";
|
|
4
3
|
import { getSiteShareStore } from "../../../share/site-share-store.js";
|
|
5
4
|
import { resolveSiteShareUrl } from "../../../share/share-url.js";
|
|
5
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
6
6
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
//#region src/gateway/hono/routes/site-shares.ts
|
|
@@ -1,68 +1,67 @@
|
|
|
1
1
|
import { init_transaction, runSqliteWriteTransaction } from "../../../storage/sqlite/transaction.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { TaskCommandRequestSchema, TaskCreateRequestSchema, TaskHandoffRequestSchema } from "../../../../packages/gateway-contract/src/tasks.js";
|
|
3
|
+
import { ProductReadContracts, TaskRunCancelOutputSchema, TaskRunFeedbackOutputSchema } from "../../../../packages/gateway-contract/src/capabilities.js";
|
|
4
4
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
5
5
|
import { enqueueTaskChangedEvent, init_task_change_events } from "../../../tasks/task-change-events.js";
|
|
6
|
+
import { TaskRepository, init_task_repository } from "../../../tasks/task-repository.js";
|
|
6
7
|
import { TaskRunRepository, init_task_run_repository } from "../../../tasks/task-run-repository.js";
|
|
7
|
-
import { TaskContextRepository } from "../../../tasks/task-context-repository.js";
|
|
8
|
-
import { TaskRepository } from "../../../tasks/task-repository.js";
|
|
9
|
-
import { TaskReadModelProjector } from "../../../tasks/task-read-model-projector.js";
|
|
10
|
-
import { TaskDependencyError, TaskDependencyService } from "../../../tasks/task-dependency-service.js";
|
|
11
|
-
import { TaskApplicationService } from "../../../tasks/task-application-service.js";
|
|
12
|
-
import { resolveProjectAgentId } from "../../../projects/project-agent.js";
|
|
13
8
|
import { TaskConversationRepository } from "../../../tasks/task-conversation-repository.js";
|
|
9
|
+
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
10
|
+
import "../../../capabilities/runtime/dispatcher.js";
|
|
11
|
+
import { TaskContextMutationOutputSchema } from "../../../tasks/capabilities/relations.js";
|
|
12
|
+
import { TaskDeleteOutputSchema } from "../../../tasks/capabilities/management.js";
|
|
13
|
+
import { TaskMutationOutputSchema } from "../../../tasks/capabilities/write.js";
|
|
14
|
+
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
14
15
|
import { ProjectOperatingViewService } from "../../../tasks/project-operating-view-service.js";
|
|
15
|
-
import { TaskValueMetricsService } from "../../../tasks/task-value-metrics-service.js";
|
|
16
16
|
import { TaskHandoffService } from "../../../tasks/task-handoff-service.js";
|
|
17
|
-
import { TaskDeletionService } from "../../../tasks/task-deletion-service.js";
|
|
18
|
-
import { TaskSignalService } from "../../../tasks/task-signal-service.js";
|
|
19
17
|
import { submitSessionInput } from "./session-input-handler.js";
|
|
20
18
|
import { patchChatModelConfig } from "./chat-model-config.js";
|
|
19
|
+
import { capabilityHttpContext, capabilityHttpError } from "../../../capabilities/adapters/http.js";
|
|
21
20
|
import { TaskConversationQueryService } from "../../service/task-conversation-query-service.js";
|
|
21
|
+
import { randomUUID } from "node:crypto";
|
|
22
22
|
//#region src/gateway/hono/routes/tasks.ts
|
|
23
23
|
init_src();
|
|
24
24
|
init_transaction();
|
|
25
25
|
init_task_change_events();
|
|
26
|
+
init_task_repository();
|
|
26
27
|
init_task_run_repository();
|
|
27
28
|
function registerTaskRoutes(authenticated, deps) {
|
|
29
|
+
const capabilities = createProductDispatcher(() => deps.service.notesServiceInstance, {
|
|
30
|
+
getConfig: () => deps.service.currentConfig,
|
|
31
|
+
getProjects: () => deps.service.projects,
|
|
32
|
+
wake: (runId) => runId ? deps.service.dispatchTaskRuns() : deps.service.dispatchTaskEvents(),
|
|
33
|
+
abortConversation: async (conversationId) => {
|
|
34
|
+
const liveRunId = deps.service.getActiveWebchatRunId(conversationId);
|
|
35
|
+
if (liveRunId) await deps.service.abortAgentRun(liveRunId);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
28
38
|
const taskRateLimit = deps.taskRateLimitMiddleware ?? deps.strictRateLimitMiddleware;
|
|
29
|
-
const
|
|
39
|
+
const invokeRelation = async (c, operation, input) => {
|
|
40
|
+
const caller = capabilityHttpContext(c);
|
|
41
|
+
return capabilities.call(operation, input, caller, {
|
|
42
|
+
...capabilities.describe(operation, caller),
|
|
43
|
+
idempotencyKey: c.req.header("idempotency-key") ?? randomUUID()
|
|
44
|
+
});
|
|
45
|
+
};
|
|
30
46
|
const operatingViews = new ProjectOperatingViewService(deps.service.projects);
|
|
31
|
-
const metrics = new TaskValueMetricsService();
|
|
32
47
|
const tasks = new TaskRepository();
|
|
33
48
|
const runs = new TaskRunRepository();
|
|
34
|
-
const context = new TaskContextRepository();
|
|
35
49
|
const conversations = new TaskConversationRepository();
|
|
36
50
|
const conversationQuery = new TaskConversationQueryService(deps.service.sessions);
|
|
37
|
-
const projector = new TaskReadModelProjector();
|
|
38
|
-
const signals = new TaskSignalService(() => deps.service.dispatchTaskRuns());
|
|
39
|
-
const dependencies = new TaskDependencyService();
|
|
40
|
-
const deletion = new TaskDeletionService(tasks, runs);
|
|
41
51
|
const handoffs = new TaskHandoffService({
|
|
42
52
|
getConfig: () => deps.service.currentConfig,
|
|
43
53
|
sessionIndex: deps.service.sessionIndexInstance,
|
|
44
54
|
getActiveRunId: (conversationId) => deps.service.getActiveWebchatRunId(conversationId),
|
|
45
55
|
abortRun: (runId) => deps.service.abortAgentRun(runId)
|
|
46
56
|
});
|
|
47
|
-
authenticated.get("/api/tasks", (c) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
...phase.success ? { phase: phase.data } : {},
|
|
56
|
-
limit
|
|
57
|
-
}).map((task) => {
|
|
58
|
-
const model = projector.project(task);
|
|
59
|
-
return {
|
|
60
|
-
task,
|
|
61
|
-
operationalState: model.operationalState,
|
|
62
|
-
attention: model.attention
|
|
63
|
-
};
|
|
64
|
-
})
|
|
65
|
-
});
|
|
57
|
+
authenticated.get("/api/tasks", async (c) => {
|
|
58
|
+
try {
|
|
59
|
+
const input = { ...c.req.query() };
|
|
60
|
+
for (const key of ["limit", "offset"]) if (input[key] !== void 0) input[key] = Number(input[key]);
|
|
61
|
+
return c.json(await capabilities.call("xopc.tasks.list", input, capabilityHttpContext(c)));
|
|
62
|
+
} catch (error) {
|
|
63
|
+
return capabilityHttpError(c, error);
|
|
64
|
+
}
|
|
66
65
|
});
|
|
67
66
|
authenticated.post("/api/tasks", taskRateLimit, async (c) => {
|
|
68
67
|
const body = await c.req.json().catch(() => ({}));
|
|
@@ -72,32 +71,17 @@ function registerTaskRoutes(authenticated, deps) {
|
|
|
72
71
|
error: "Invalid task request"
|
|
73
72
|
}, 400);
|
|
74
73
|
try {
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
});
|
|
82
|
-
const input = {
|
|
83
|
-
...parsed.data,
|
|
84
|
-
delegateAgentId: agentId,
|
|
85
|
-
activation: parsed.data.activation.mode === "start" ? {
|
|
86
|
-
...parsed.data.activation,
|
|
87
|
-
executor: parsed.data.activation.executor?.kind === "agent" || !parsed.data.activation.executor ? {
|
|
88
|
-
kind: "agent",
|
|
89
|
-
agentId
|
|
90
|
-
} : parsed.data.activation.executor
|
|
91
|
-
} : parsed.data.activation
|
|
92
|
-
};
|
|
93
|
-
const created = application.create(input);
|
|
74
|
+
const context = capabilityHttpContext(c);
|
|
75
|
+
const { idempotencyKey, ...input } = parsed.data;
|
|
76
|
+
const created = TaskMutationOutputSchema.parse(await capabilities.call("xopc.tasks.create", input, context, {
|
|
77
|
+
...capabilities.describe("xopc.tasks.create", context),
|
|
78
|
+
idempotencyKey
|
|
79
|
+
}));
|
|
94
80
|
if (created.ok === false) return c.json({
|
|
95
81
|
ok: false,
|
|
96
82
|
code: created.reason,
|
|
97
83
|
error: created.reason
|
|
98
84
|
}, 409);
|
|
99
|
-
if (created.runId) deps.service.dispatchTaskRuns();
|
|
100
|
-
else deps.service.dispatchTaskEvents();
|
|
101
85
|
return c.json({
|
|
102
86
|
ok: true,
|
|
103
87
|
task: created.model.task,
|
|
@@ -112,33 +96,19 @@ function registerTaskRoutes(authenticated, deps) {
|
|
|
112
96
|
}, message === "Project not found" ? 404 : 409);
|
|
113
97
|
}
|
|
114
98
|
});
|
|
115
|
-
authenticated.get("/api/tasks/metrics", (c) =>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
task,
|
|
129
|
-
operationalState: model.operationalState,
|
|
130
|
-
attention: model.attention,
|
|
131
|
-
waits: runs.listActiveWaits(task.id),
|
|
132
|
-
runs: runs.listByTask(task.id),
|
|
133
|
-
receipts: runs.listReceipts(task.id),
|
|
134
|
-
context: context.list(task.id),
|
|
135
|
-
conversation: conversations.requireState(task.id),
|
|
136
|
-
sessions: conversations.listSessions(task.id),
|
|
137
|
-
authorityGrants: context.listActiveGrants(task.id),
|
|
138
|
-
dependencies: dependencies.listDependencies(task.id),
|
|
139
|
-
dependents: dependencies.listDependents(task.id),
|
|
140
|
-
allowedCommands: model.allowedCommands
|
|
141
|
-
});
|
|
99
|
+
authenticated.get("/api/tasks/metrics", async (c) => {
|
|
100
|
+
try {
|
|
101
|
+
return c.json(await capabilities.call("xopc.tasks.metrics", {}, capabilityHttpContext(c)));
|
|
102
|
+
} catch (error) {
|
|
103
|
+
return capabilityHttpError(c, error);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
authenticated.get("/api/tasks/:id", async (c) => {
|
|
107
|
+
try {
|
|
108
|
+
return c.json(await capabilities.call("xopc.tasks.get", { id: c.req.param("id") }, capabilityHttpContext(c)));
|
|
109
|
+
} catch (error) {
|
|
110
|
+
return capabilityHttpError(c, error);
|
|
111
|
+
}
|
|
142
112
|
});
|
|
143
113
|
authenticated.post("/api/tasks/:id/conversation", taskRateLimit, async (c) => {
|
|
144
114
|
try {
|
|
@@ -257,46 +227,44 @@ function registerTaskRoutes(authenticated, deps) {
|
|
|
257
227
|
error: "Task conversation not found"
|
|
258
228
|
}, 404);
|
|
259
229
|
});
|
|
260
|
-
authenticated.
|
|
261
|
-
const
|
|
262
|
-
if (!
|
|
230
|
+
authenticated.get("/api/tasks/:id/conversation/find", async (c) => {
|
|
231
|
+
const query = c.req.query("q")?.trim() ?? "";
|
|
232
|
+
if (!query || query.length > 256) return c.json({
|
|
263
233
|
ok: false,
|
|
264
|
-
error: "
|
|
234
|
+
error: "q must contain 1 to 256 characters"
|
|
265
235
|
}, 400);
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
if (!task) return void 0;
|
|
269
|
-
const changedFields = Object.keys(parsed.data).filter((field) => field !== "expectedVersion");
|
|
270
|
-
enqueueTaskChangedEvent(db, {
|
|
271
|
-
taskId: task.id,
|
|
272
|
-
projectId: task.projectId,
|
|
273
|
-
version: task.version,
|
|
274
|
-
changedFields,
|
|
275
|
-
actor: { kind: "user" }
|
|
276
|
-
});
|
|
277
|
-
return task;
|
|
278
|
-
});
|
|
279
|
-
if (!updated) return c.json({
|
|
280
|
-
ok: false,
|
|
281
|
-
error: "Task changed or was not found"
|
|
282
|
-
}, 409);
|
|
283
|
-
deps.service.dispatchTaskEvents();
|
|
284
|
-
return c.json({
|
|
236
|
+
const result = await conversationQuery.findMessages(c.req.param("id"), query);
|
|
237
|
+
return result ? c.json({
|
|
285
238
|
ok: true,
|
|
286
|
-
|
|
287
|
-
})
|
|
239
|
+
...result
|
|
240
|
+
}) : c.json({
|
|
241
|
+
ok: false,
|
|
242
|
+
error: "Task conversation not found"
|
|
243
|
+
}, 404);
|
|
244
|
+
});
|
|
245
|
+
authenticated.patch("/api/tasks/:id", taskRateLimit, async (c) => {
|
|
246
|
+
try {
|
|
247
|
+
return c.json(await invokeRelation(c, "xopc.tasks.update", {
|
|
248
|
+
...await c.req.json().catch(() => ({})),
|
|
249
|
+
taskId: c.req.param("id")
|
|
250
|
+
}));
|
|
251
|
+
} catch (error) {
|
|
252
|
+
return capabilityHttpError(c, error);
|
|
253
|
+
}
|
|
288
254
|
});
|
|
289
|
-
authenticated.delete("/api/tasks/:id", taskRateLimit, (c) => {
|
|
255
|
+
authenticated.delete("/api/tasks/:id", taskRateLimit, async (c) => {
|
|
290
256
|
const taskId = c.req.param("id");
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
deleted: true,
|
|
297
|
-
taskId
|
|
298
|
-
});
|
|
257
|
+
let result;
|
|
258
|
+
try {
|
|
259
|
+
result = TaskDeleteOutputSchema.parse(await invokeRelation(c, "xopc.tasks.delete", { taskId }));
|
|
260
|
+
} catch (error) {
|
|
261
|
+
return capabilityHttpError(c, error);
|
|
299
262
|
}
|
|
263
|
+
if (result.ok === true) return c.json({
|
|
264
|
+
ok: true,
|
|
265
|
+
deleted: true,
|
|
266
|
+
taskId
|
|
267
|
+
});
|
|
300
268
|
if (result.reason === "active_run") return c.json({
|
|
301
269
|
ok: false,
|
|
302
270
|
code: "task_active",
|
|
@@ -310,79 +278,23 @@ function registerTaskRoutes(authenticated, deps) {
|
|
|
310
278
|
}, 404);
|
|
311
279
|
});
|
|
312
280
|
authenticated.put("/api/tasks/:id/dependencies", taskRateLimit, async (c) => {
|
|
313
|
-
const parsed = TaskDependencyUpdateRequestSchema.safeParse(await c.req.json().catch(() => ({})));
|
|
314
|
-
if (!parsed.success) return c.json({
|
|
315
|
-
ok: false,
|
|
316
|
-
error: "Invalid task dependencies"
|
|
317
|
-
}, 400);
|
|
318
281
|
try {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
});
|
|
324
|
-
enqueueTaskChangedEvent(db, {
|
|
325
|
-
taskId: changed.id,
|
|
326
|
-
projectId: changed.projectId,
|
|
327
|
-
version: changed.version,
|
|
328
|
-
changedFields: ["dependencies"],
|
|
329
|
-
actor: { kind: "user" }
|
|
330
|
-
});
|
|
331
|
-
return changed;
|
|
332
|
-
});
|
|
333
|
-
deps.service.dispatchTaskEvents();
|
|
334
|
-
return c.json({
|
|
335
|
-
ok: true,
|
|
336
|
-
task,
|
|
337
|
-
dependencies: dependencies.listDependencies(task.id),
|
|
338
|
-
dependents: dependencies.listDependents(task.id)
|
|
339
|
-
});
|
|
282
|
+
return c.json(await invokeRelation(c, "xopc.tasks.update_dependencies", {
|
|
283
|
+
...await c.req.json().catch(() => ({})),
|
|
284
|
+
taskId: c.req.param("id")
|
|
285
|
+
}));
|
|
340
286
|
} catch (error) {
|
|
341
|
-
|
|
342
|
-
const status = error.code === "not_found" ? 404 : error.code === "conflict" ? 409 : 400;
|
|
343
|
-
return c.json({
|
|
344
|
-
ok: false,
|
|
345
|
-
code: error.code,
|
|
346
|
-
error: error.message
|
|
347
|
-
}, status);
|
|
287
|
+
return capabilityHttpError(c, error);
|
|
348
288
|
}
|
|
349
289
|
});
|
|
350
290
|
authenticated.put("/api/tasks/:id/board-position", taskRateLimit, async (c) => {
|
|
351
|
-
const parsed = TaskBoardPositionRequestSchema.safeParse(await c.req.json().catch(() => ({})));
|
|
352
|
-
if (!parsed.success) return c.json({
|
|
353
|
-
ok: false,
|
|
354
|
-
error: "Invalid task board position"
|
|
355
|
-
}, 400);
|
|
356
291
|
try {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
});
|
|
362
|
-
if (!reordered) return void 0;
|
|
363
|
-
enqueueTaskChangedEvent(db, {
|
|
364
|
-
taskId: reordered.id,
|
|
365
|
-
projectId: reordered.projectId,
|
|
366
|
-
version: reordered.version,
|
|
367
|
-
changedFields: ["boardRank"],
|
|
368
|
-
actor: { kind: "user" }
|
|
369
|
-
});
|
|
370
|
-
return reordered;
|
|
371
|
-
});
|
|
372
|
-
if (!task) return c.json({
|
|
373
|
-
ok: false,
|
|
374
|
-
error: "Task changed or was not found"
|
|
375
|
-
}, 409);
|
|
376
|
-
deps.service.dispatchTaskEvents();
|
|
377
|
-
return c.json({
|
|
378
|
-
ok: true,
|
|
379
|
-
task
|
|
380
|
-
});
|
|
292
|
+
return c.json(await invokeRelation(c, "xopc.tasks.reorder", {
|
|
293
|
+
...await c.req.json().catch(() => ({})),
|
|
294
|
+
taskId: c.req.param("id")
|
|
295
|
+
}));
|
|
381
296
|
} catch (error) {
|
|
382
|
-
return c
|
|
383
|
-
ok: false,
|
|
384
|
-
error: error instanceof Error ? error.message : String(error)
|
|
385
|
-
}, 400);
|
|
297
|
+
return capabilityHttpError(c, error);
|
|
386
298
|
}
|
|
387
299
|
});
|
|
388
300
|
authenticated.post("/api/tasks/:id/commands", taskRateLimit, async (c) => {
|
|
@@ -391,12 +303,20 @@ function registerTaskRoutes(authenticated, deps) {
|
|
|
391
303
|
ok: false,
|
|
392
304
|
error: "Invalid task command"
|
|
393
305
|
}, 400);
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
306
|
+
const capabilityContext = capabilityHttpContext(c);
|
|
307
|
+
const { idempotencyKey, ...input } = parsed.data;
|
|
308
|
+
let result;
|
|
309
|
+
try {
|
|
310
|
+
result = TaskMutationOutputSchema.parse(await capabilities.call("xopc.tasks.command", {
|
|
311
|
+
...input,
|
|
312
|
+
taskId: c.req.param("id")
|
|
313
|
+
}, capabilityContext, {
|
|
314
|
+
...capabilities.describe("xopc.tasks.command", capabilityContext),
|
|
315
|
+
idempotencyKey
|
|
316
|
+
}));
|
|
317
|
+
} catch (error) {
|
|
318
|
+
return capabilityHttpError(c, error);
|
|
319
|
+
}
|
|
400
320
|
if (result.ok === false) {
|
|
401
321
|
if (result.reason === "not_found") return c.json({
|
|
402
322
|
ok: false,
|
|
@@ -409,16 +329,6 @@ function registerTaskRoutes(authenticated, deps) {
|
|
|
409
329
|
latest: result.model
|
|
410
330
|
}, 409);
|
|
411
331
|
}
|
|
412
|
-
if (parsed.data.command?.type === "add_wait" && parsed.data.command.wait.kind === "paused" || parsed.data.command?.type === "close" || parsed.data.command?.type === "resolve_wait" && parsed.data.command.resolution?.kind === "task_approval" && parsed.data.command.resolution.decision === "deny") {
|
|
413
|
-
const activeRun = runs.getActiveRoot(c.req.param("id"));
|
|
414
|
-
if (activeRun?.conversationId) {
|
|
415
|
-
const liveRunId = deps.service.getActiveWebchatRunId(activeRun.conversationId);
|
|
416
|
-
if (liveRunId) await deps.service.abortAgentRun(liveRunId);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
if (result.runId || parsed.data.command?.type === "resolve_wait") deps.service.dispatchTaskRuns();
|
|
420
|
-
else deps.service.dispatchTaskEvents();
|
|
421
|
-
if (parsed.data.command?.type === "close" && parsed.data.command.resolution === "done") signals.dependencyClosed(c.req.param("id"));
|
|
422
332
|
return c.json({
|
|
423
333
|
ok: true,
|
|
424
334
|
...result.model,
|
|
@@ -426,142 +336,88 @@ function registerTaskRoutes(authenticated, deps) {
|
|
|
426
336
|
});
|
|
427
337
|
});
|
|
428
338
|
authenticated.post("/api/tasks/:id/context", taskRateLimit, async (c) => {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
createdBy: { kind: "user" }
|
|
444
|
-
});
|
|
445
|
-
enqueueTaskChangedEvent(db, {
|
|
446
|
-
taskId: task.id,
|
|
447
|
-
projectId: task.projectId,
|
|
448
|
-
version: task.version,
|
|
449
|
-
changedFields: ["context"],
|
|
450
|
-
actor: { kind: "user" }
|
|
451
|
-
});
|
|
452
|
-
return created;
|
|
453
|
-
});
|
|
454
|
-
deps.service.dispatchTaskEvents();
|
|
455
|
-
return c.json({
|
|
456
|
-
ok: true,
|
|
457
|
-
edge
|
|
458
|
-
}, 201);
|
|
339
|
+
try {
|
|
340
|
+
const { expectedVersion, ...edge } = await c.req.json().catch(() => ({})) ?? {};
|
|
341
|
+
const result = TaskContextMutationOutputSchema.parse(await invokeRelation(c, "xopc.tasks.add_context", {
|
|
342
|
+
taskId: c.req.param("id"),
|
|
343
|
+
edge,
|
|
344
|
+
expectedVersion
|
|
345
|
+
}));
|
|
346
|
+
return c.json({
|
|
347
|
+
ok: true,
|
|
348
|
+
edge: result.edge
|
|
349
|
+
}, 201);
|
|
350
|
+
} catch (error) {
|
|
351
|
+
return capabilityHttpError(c, error);
|
|
352
|
+
}
|
|
459
353
|
});
|
|
460
|
-
authenticated.delete("/api/tasks/:id/context/:edgeId", taskRateLimit, (c) => {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
taskId: task.id,
|
|
466
|
-
projectId: task.projectId,
|
|
467
|
-
version: task.version,
|
|
468
|
-
changedFields: ["context"],
|
|
469
|
-
actor: { kind: "user" }
|
|
354
|
+
authenticated.delete("/api/tasks/:id/context/:edgeId", taskRateLimit, async (c) => {
|
|
355
|
+
try {
|
|
356
|
+
await invokeRelation(c, "xopc.tasks.remove_context", {
|
|
357
|
+
taskId: c.req.param("id"),
|
|
358
|
+
edgeId: c.req.param("edgeId")
|
|
470
359
|
});
|
|
471
|
-
return
|
|
472
|
-
})
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
ok: false,
|
|
476
|
-
error: "Task context edge not found"
|
|
477
|
-
}, 404);
|
|
360
|
+
return c.json({ ok: true });
|
|
361
|
+
} catch (error) {
|
|
362
|
+
return capabilityHttpError(c, error);
|
|
363
|
+
}
|
|
478
364
|
});
|
|
479
|
-
authenticated.get("/api/task-runs/:runId", (c) => {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
365
|
+
authenticated.get("/api/task-runs/:runId", async (c) => {
|
|
366
|
+
try {
|
|
367
|
+
const { run, receipt } = ProductReadContracts["xopc.task_runs.get"].output.parse(await capabilities.call("xopc.task_runs.get", { id: c.req.param("runId") }, capabilityHttpContext(c)));
|
|
368
|
+
return c.json({
|
|
369
|
+
ok: true,
|
|
370
|
+
run,
|
|
371
|
+
receipt
|
|
372
|
+
});
|
|
373
|
+
} catch (error) {
|
|
374
|
+
return capabilityHttpError(c, error);
|
|
375
|
+
}
|
|
489
376
|
});
|
|
490
|
-
authenticated.get("/api/task-runs/:runId/events", (c) => {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
377
|
+
authenticated.get("/api/task-runs/:runId/events", async (c) => {
|
|
378
|
+
try {
|
|
379
|
+
const { events } = ProductReadContracts["xopc.task_runs.get"].output.parse(await capabilities.call("xopc.task_runs.get", { id: c.req.param("runId") }, capabilityHttpContext(c)));
|
|
380
|
+
return c.json({
|
|
381
|
+
ok: true,
|
|
382
|
+
items: events
|
|
383
|
+
});
|
|
384
|
+
} catch (error) {
|
|
385
|
+
return capabilityHttpError(c, error);
|
|
386
|
+
}
|
|
499
387
|
});
|
|
500
388
|
authenticated.post("/api/task-runs/:runId/cancel", taskRateLimit, async (c) => {
|
|
501
|
-
const body = await c.req.json().catch(() => ({}));
|
|
502
|
-
const run = runs.get(c.req.param("runId"));
|
|
503
|
-
if (!run) return c.json({
|
|
504
|
-
ok: false,
|
|
505
|
-
error: "TaskRun not found"
|
|
506
|
-
}, 404);
|
|
507
|
-
if (!Number.isInteger(body.expectedVersion) || body.expectedVersion !== run.version) return c.json({
|
|
508
|
-
ok: false,
|
|
509
|
-
error: "TaskRun changed",
|
|
510
|
-
run
|
|
511
|
-
}, 409);
|
|
512
|
-
const task = tasks.require(run.taskId);
|
|
513
|
-
const result = application.completeRun({
|
|
514
|
-
runId: run.id,
|
|
515
|
-
expectedRunVersion: run.version,
|
|
516
|
-
actor: { kind: "user" },
|
|
517
|
-
terminalCode: "cancelled_by_user",
|
|
518
|
-
terminalMessage: typeof body.reason === "string" ? body.reason : "Cancelled by user",
|
|
519
|
-
receipt: {
|
|
520
|
-
status: "cancelled",
|
|
521
|
-
summary: typeof body.reason === "string" ? body.reason : "TaskRun cancelled by user",
|
|
522
|
-
changes: [],
|
|
523
|
-
evidence: [],
|
|
524
|
-
verification: {
|
|
525
|
-
status: "unverified",
|
|
526
|
-
checks: []
|
|
527
|
-
},
|
|
528
|
-
remainingWork: [task.contract?.objective ?? task.title],
|
|
529
|
-
needsUser: false,
|
|
530
|
-
completionVerdict: "not_achieved"
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
if (result.ok === false) return c.json({
|
|
534
|
-
ok: false,
|
|
535
|
-
error: result.reason
|
|
536
|
-
}, 409);
|
|
537
|
-
deps.service.dispatchTaskEvents();
|
|
538
|
-
return c.json({
|
|
539
|
-
ok: true,
|
|
540
|
-
run: runs.get(run.id),
|
|
541
|
-
receipt: runs.getReceipt(run.id)
|
|
542
|
-
});
|
|
543
|
-
});
|
|
544
|
-
authenticated.post("/api/task-runs/:runId/feedback", taskRateLimit, async (c) => {
|
|
545
|
-
const body = await c.req.json().catch(() => ({}));
|
|
546
|
-
if (body.rating !== "helpful" && body.rating !== "not_helpful") return c.json({
|
|
547
|
-
ok: false,
|
|
548
|
-
error: "Invalid feedback rating"
|
|
549
|
-
}, 400);
|
|
550
389
|
try {
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
rating: body.rating,
|
|
554
|
-
reason: typeof body.reason === "string" ? body.reason : void 0
|
|
390
|
+
const body = await c.req.json().catch(() => {
|
|
391
|
+
throw new CapabilityError("INVALID_INPUT", "Invalid JSON body");
|
|
555
392
|
});
|
|
393
|
+
if (!body || typeof body !== "object" || Array.isArray(body)) throw new CapabilityError("INVALID_INPUT", "Expected an object");
|
|
394
|
+
const { run, receipt, executionStopConfirmed } = TaskRunCancelOutputSchema.parse(await invokeRelation(c, "xopc.task_runs.cancel", {
|
|
395
|
+
id: c.req.param("runId"),
|
|
396
|
+
expectedVersion: body.expectedVersion,
|
|
397
|
+
reason: body.reason
|
|
398
|
+
}));
|
|
556
399
|
return c.json({
|
|
557
400
|
ok: true,
|
|
558
|
-
|
|
401
|
+
run,
|
|
402
|
+
receipt,
|
|
403
|
+
executionStopConfirmed
|
|
559
404
|
});
|
|
560
|
-
} catch {
|
|
561
|
-
return c
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
405
|
+
} catch (error) {
|
|
406
|
+
return capabilityHttpError(c, error);
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
authenticated.post("/api/task-runs/:runId/feedback", taskRateLimit, async (c) => {
|
|
410
|
+
try {
|
|
411
|
+
const body = await c.req.json().catch(() => {
|
|
412
|
+
throw new CapabilityError("INVALID_INPUT", "Invalid JSON body");
|
|
413
|
+
});
|
|
414
|
+
if (!body || typeof body !== "object" || Array.isArray(body)) throw new CapabilityError("INVALID_INPUT", "Expected an object");
|
|
415
|
+
return c.json(TaskRunFeedbackOutputSchema.parse(await invokeRelation(c, "xopc.task_runs.feedback", {
|
|
416
|
+
...body,
|
|
417
|
+
id: c.req.param("runId")
|
|
418
|
+
})));
|
|
419
|
+
} catch (error) {
|
|
420
|
+
return capabilityHttpError(c, error);
|
|
565
421
|
}
|
|
566
422
|
});
|
|
567
423
|
authenticated.get("/api/projects/:projectId/operating-view", (c) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { listConnectorLearningJobs } from "../../../storage/sqlite/connector-learning-repository.js";
|
|
2
2
|
import { getConnectorAccount } from "../../../storage/sqlite/connector-account-repository.js";
|
|
3
3
|
import "../../../storage/sqlite/index.js";
|
|
4
|
+
import { getWorkDiscoveryRun } from "../../../work-discovery/repository.js";
|
|
4
5
|
import { listUnderstandingSourceRuns } from "../../../user-context/sources/repository.js";
|
|
5
6
|
import { isLocalUnderstandingSourceId } from "../../../user-context/sources/local-source-contract.js";
|
|
6
|
-
import { getWorkDiscoveryRun } from "../../../work-discovery/repository.js";
|
|
7
7
|
import { normalizeUnderstandingSourceItems } from "../../../work-discovery/service.js";
|
|
8
8
|
import { UnderstandingRefreshService } from "../../../user-context/sources/refresh-service.js";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { init_transaction, runSqliteWriteTransaction } from "../../../storage/sqlite/transaction.js";
|
|
2
2
|
import { createCollaborationRule, getCollaborationRule, listCollaborationRules, setCollaborationRuleStatus } from "../../../storage/sqlite/collaboration-rule-repository.js";
|
|
3
|
+
import { KnowledgeReviewConflictError, deleteKnowledgeItem, getKnowledgeItem, listKnowledgeItems, reviewKnowledgeItem, searchKnowledgeItems } from "../../../knowledge-memory/repository.js";
|
|
4
|
+
import "../../../knowledge-memory/index.js";
|
|
3
5
|
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus, updatePriorityWindow, updateUserGoal } from "../../../user-model/goals.js";
|
|
4
6
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../../user-model/repository.js";
|
|
5
7
|
import { applyUserProfilePatch, getUserProfileSnapshot } from "../../../user-model/profile.js";
|
|
6
8
|
import { bootstrapUserModel } from "../../../user-model/bootstrap.js";
|
|
7
9
|
import { canUseAssertion } from "../../../user-model/usage-policy.js";
|
|
8
10
|
import "../../../user-model/index.js";
|
|
9
|
-
import { KnowledgeReviewConflictError, deleteKnowledgeItem, getKnowledgeItem, listKnowledgeItems, reviewKnowledgeItem, searchKnowledgeItems } from "../../../knowledge-memory/repository.js";
|
|
10
|
-
import "../../../knowledge-memory/index.js";
|
|
11
|
-
import { listUnderstandingSourceGrants } from "../../../user-context/sources/repository.js";
|
|
12
|
-
import { getExecutionContextAudit, recordExecutionContextFeedback } from "../../../agent/context/audit.js";
|
|
13
11
|
import { listMemoryMaintenanceRuns } from "../../../memory-maintenance/service.js";
|
|
14
12
|
import "../../../memory-maintenance/index.js";
|
|
13
|
+
import { getExecutionContextAudit, recordExecutionContextFeedback } from "../../../agent/context/audit.js";
|
|
14
|
+
import { listUnderstandingSourceGrants } from "../../../user-context/sources/repository.js";
|
|
15
15
|
import { userInfo } from "node:os";
|
|
16
16
|
//#region src/gateway/hono/routes/user-model.ts
|
|
17
17
|
init_transaction();
|