@xopcai/xopc 0.0.323 → 0.0.325
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -9
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DFzmThVi.js → agent-avatar-dicebear-CxfXpPWs.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CDHe8gJf.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-DYFYiuig.js → agent-plugin-dialog-DMv-udoZ.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-BqIlB5Co.js → agents-D_xOAXgj.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BgvMRGWe.js → app-management-settings-panel-p7fZB4dT.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CliHU03A.js → appearance-settings-C-clVcfp.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-Dz2g7eAN.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-DnuPpm0u.js → archive-plugin-Xm6xChUX.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BiwaK0ie.js → attachment-load-Di8kuG4L.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CJSISGQH.js → automations-page-GUZgDhKj.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BUZhG9aJ.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-KDjduQZO.js → binary-plugins-OCrDjC9O.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-bclvgove.js → block-editor-m9tqvu7x.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-CfQ2T9t6.js → browser-automation-inputs-DSWXq9lI.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-Cxq38Nnp.js → browser-automations-page-DuOaridE.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-D2_PgHep.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-sAZT4brT.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-7Y_pJqyt.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-B-Igy1ro.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DKQC62nQ.js → chat-terminal-dock-BfnVh8oo.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-D1whpIqL.js → computer-settings-page-aRG2lU4w.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-BAuYTgf5.js → connector-service-page-B5EhnfJH.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-7HfRt1LW.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-CtDyij_x.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-DOuVO2M1.js → dependency-picker-z6ouWxmz.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D9tu6Bhu.js → desktop-pet-BsIYCAkG.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CQPXub2f.js → desktop-pet-settings-z-0aQ5ct.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-DxkOYSut.js → device-pairing-wizard-DlmhQvY5.js} +1 -1
- package/dist/gateway/static/root/assets/dist-3h6cXXhT.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-CtWClPz-.js → extension-debug-page-Ct9pABNW.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BHh9HLCz.js → extension-page-BktsR4hj.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BdT3v5Uh.js → extension-settings-page-BQJc-vXH.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-1eqyz9vZ.js → gateway-config-swr-CoQVulMd.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CZas_Ekx.js → gateway-settings-BfDVlvy6.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C4rsW6vJ.js → gateway-startup-retry-B5GJ-CQV.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CI_eQTPL.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-B5DXMylk.js → image-generation-api-DvWDkbk1.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-B1JH0G5j.js → imports-page-DFpQfHVU.js} +1 -1
- package/dist/gateway/static/root/assets/index-19rMUT3d.js +121 -0
- package/dist/gateway/static/root/assets/{index-CNc4N4TX.css → index-BKL5tg2f.css} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DGrLJ8Yh.js → keyboard-shortcuts-settings-ctJLm8TP.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-C9kaP3Dy.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DqjStqbL.js → local-apps-page-BxC_LTqq.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BIkcRr3t.js → locale-store-BPZR8x9b.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-Ok5SpG-G.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-gCfH4cwH.js → management-settings-aOzRaQHM.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-Ck_5MADq.js → markdown-view-Dft8ASFD.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DTsZqgo6.js → media-plugins-ni5zJ4Ok.js} +1 -1
- package/dist/gateway/static/root/assets/messages-kFWhF6_t.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-C9OEltN9.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-Dj9rMgdi.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-DTI_g4tz.js → page-context-capture-button-BJA3d8vU.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-CfW_Q-K5.js → page-tabs-Dyc3wKkl.js} +1 -1
- package/dist/gateway/static/root/assets/popover-select-DcsFzD_i.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-CuPN-vAn.js → preview-open-alternatives-tIOIQbNX.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BHjxRz1E.js → product-open-page-DQctU8z3.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-Dy-EwZcc.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-Bk-es4i9.js → projects-page-JaGKa6rM.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-BAAZUGnU.js → registry-api-DWWO6ajd.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Cb8-nd60.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CHJBJKL1.js → runtime-tools-settings-panel-xhOSYfiX.js} +1 -1
- package/dist/gateway/static/root/assets/scenes-page-ClBkFdRY.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-FQAit5HL.js → schema-form-z8IeSdBp.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-BYW5l_nY.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CDNwmXuH.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BDc6bw1q.js → settings-form-section-BXTJAser.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DnhxBJjV.js → settings-page-Br9no5e4.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-D3KNSQ5g.js → settings-page-layout-D6745w0p.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-D2N9764S.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DVQCRxwK.js → share-preview-page-CE0SER59.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-Dk3_QOKQ.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CPt61fEv.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-Db6PB2C6.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-mDwC9UJ-.js → skills-page.utils-DrtW5FBy.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Bk7GrMij.js → system-settings-panel-CuY1Zh5s.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-o7RiDUMi.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-D3Aquraj.js → tunnel-api-PGHDgvWb.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-C1xQ-sHn.js → use-autosave-B55oBQUt.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-DspelwAa.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DCNECvcp.js → voice-api-key-field-By6Lgbse.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-B-_niUTU.js → voice-config-api-BaxITrwZ.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BrGx_JS_.js → work-discovery-overlay-DdhgIlyf.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CmmC2Pdr.js → workflow-run-setup-panel-BOJYQaxX.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-6ObD0IQZ.js +6 -0
- package/dist/gateway/static/root/index.html +11 -10
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/home.js +284 -55
- package/dist/packages/gateway-contract/src/index.js +0 -2
- package/dist/packages/gateway-contract/src/notifications.js +3 -10
- package/dist/src/activity/emitter.js +2 -1
- package/dist/src/activity/service.js +2 -1
- package/dist/src/agent/agent-manager.d.ts +3 -2
- package/dist/src/agent/agent-manager.js +36 -44
- package/dist/src/agent/agent-scope.d.ts +19 -48
- package/dist/src/agent/agent-scope.js +47 -169
- package/dist/src/agent/background-review/run-background-review.js +5 -4
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/commands/command-registry.js +7 -3
- package/dist/src/agent/context/coordinator.js +1 -1
- package/dist/src/agent/context/execution-context.js +2 -1
- package/dist/src/agent/context/execution-scope.js +2 -1
- package/dist/src/agent/context/workspace-seed.d.ts +1 -2
- package/dist/src/agent/context/workspace-seed.js +3 -3
- package/dist/src/agent/context/workspace-state.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +2 -1
- package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +2 -1
- package/dist/src/agent/external-tools/cliProvider.js +2 -1
- package/dist/src/agent/external-tools/composio-provider.js +2 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/index.js +2 -3
- package/dist/src/agent/external-tools/mcp-provider.js +2 -2
- package/dist/src/agent/image/tool-model-config.js +4 -5
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/ipc/bus.js +1 -1
- package/dist/src/agent/ipc/socket.js +3 -3
- package/dist/src/agent/media-generation/runtime-shared.d.ts +1 -1
- package/dist/src/agent/media-generation/runtime-shared.js +1 -1
- package/dist/src/agent/memory/plugin-discovery.js +1 -2
- package/dist/src/agent/models/manager.d.ts +1 -1
- package/dist/src/agent/models/manager.js +2 -2
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +1 -1
- package/dist/src/agent/prompt/response-language.js +2 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +6 -3
- package/dist/src/agent/prompt/system-prompt.js +2 -1
- package/dist/src/agent/reply/post-compaction-context.js +2 -2
- package/dist/src/agent/service/build-direct-message-content.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +2 -1
- package/dist/src/agent/service/parse-outbound-session-key.js +2 -1
- package/dist/src/agent/service/process-direct-streaming.js +3 -2
- package/dist/src/agent/service/webchat-tts.js +2 -1
- package/dist/src/agent/service.d.ts +1 -1
- package/dist/src/agent/service.js +12 -11
- package/dist/src/agent/service.types.d.ts +2 -0
- package/dist/src/agent/session/session-inspector.js +4 -5
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +5 -0
- package/dist/src/agent/starter-agents.d.ts +4 -5
- package/dist/src/agent/starter-agents.js +21 -20
- package/dist/src/agent/tasks/task-judge-service.js +2 -2
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +31 -1
- package/dist/src/agent/tools/delegation-parent-policy.js +2 -3
- package/dist/src/agent/tools/factory.d.ts +2 -0
- package/dist/src/agent/tools/factory.js +10 -9
- package/dist/src/agent/tools/image-generate-tool.js +1 -1
- package/dist/src/agent/tools/workflow-tool.js +2 -3
- package/dist/src/agent/tools/xopc-use-tool.d.ts +3 -2
- package/dist/src/agent/tools/xopc-use-tool.js +54 -6
- package/dist/src/agent/workflow/workflow-child-tools.js +1 -2
- package/dist/src/agent/workspace-runtime/registry.d.ts +1 -1
- package/dist/src/agent/workspace-runtime/registry.js +2 -2
- package/dist/src/agent-catalog/capabilities.d.ts +3 -0
- package/dist/src/agent-catalog/capabilities.js +238 -0
- package/dist/src/agent-catalog/id.d.ts +15 -0
- package/dist/src/agent-catalog/id.js +101 -0
- package/dist/src/agent-catalog/index.d.ts +6 -0
- package/dist/src/agent-catalog/index.js +10 -0
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.d.ts +11 -0
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.js +195 -0
- package/dist/src/agent-catalog/repository.d.ts +39 -0
- package/dist/src/agent-catalog/repository.js +319 -0
- package/dist/src/agent-catalog/service.d.ts +33 -0
- package/dist/src/agent-catalog/service.js +202 -0
- package/dist/src/agent-catalog/test-support.d.ts +14 -0
- package/dist/src/agent-catalog/test-support.js +34 -0
- package/dist/src/agent-catalog/types.d.ts +26 -0
- package/dist/src/agent-catalog/types.js +1 -0
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/schema.d.ts +1 -172
- package/dist/src/agent-config/schema.js +2 -41
- package/dist/src/auth/credentials.js +3 -3
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/sync-provider-auth.d.ts +1 -1
- package/dist/src/auth/sync-provider-auth.js +5 -9
- package/dist/src/automations/capabilities/drafts.js +8 -7
- package/dist/src/automations/service/action-executor.js +2 -1
- package/dist/src/bootstrap/application-state.d.ts +10 -0
- package/dist/src/bootstrap/application-state.js +26 -0
- package/dist/src/browser/automations/repository.js +2 -1
- package/dist/src/browser/automations/schema.d.ts +1 -1
- package/dist/src/browser/automations/service.d.ts +1 -1
- package/dist/src/browser/native-messaging-host.js +5 -4
- package/dist/src/browser/providers/extension.js +4 -2
- package/dist/src/browser/providers/realtime-extension.js +2 -1
- package/dist/src/capabilities/readiness/from-config.js +7 -4
- package/dist/src/capabilities/runtime/dispatcher.d.ts +1 -0
- package/dist/src/capabilities/runtime/dispatcher.js +10 -4
- package/dist/src/capabilities/runtime/product.js +2 -0
- package/dist/src/channels/catalog/channel-catalog-service.js +7 -13
- package/dist/src/chat-commands/agent-edit.js +4 -3
- package/dist/src/chat-commands/builtins/config.js +6 -8
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +1 -1
- package/dist/src/chat-commands/config-paths.js +1 -1
- package/dist/src/chat-commands/context.js +2 -3
- package/dist/src/chat-previews/store.js +2 -1
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/agent.js +4 -4
- package/dist/src/cli/commands/agents.d.ts +1 -1
- package/dist/src/cli/commands/agents.js +36 -48
- package/dist/src/cli/commands/auth.js +2 -1
- package/dist/src/cli/commands/browser-cli-helpers.js +1 -2
- package/dist/src/cli/commands/channels.js +2 -4
- package/dist/src/cli/commands/config.js +4 -5
- package/dist/src/cli/commands/connectors.js +1 -2
- package/dist/src/cli/commands/doctor/checks/channel-config.js +2 -4
- package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +1 -2
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -2
- package/dist/src/cli/commands/doctor/checks/config-health.js +1 -2
- package/dist/src/cli/commands/doctor/checks/database-schema.js +4 -4
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -2
- package/dist/src/cli/commands/doctor/checks/gateway-service.js +1 -2
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +13 -11
- package/dist/src/cli/commands/doctor/checks/security-audit.js +1 -2
- package/dist/src/cli/commands/doctor/checks/session-integrity.js +3 -3
- package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -2
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +5 -7
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -2
- package/dist/src/cli/commands/extension-dev.js +2 -4
- package/dist/src/cli/commands/extension-marketplace.js +1 -2
- package/dist/src/cli/commands/extension-pack.js +1 -2
- package/dist/src/cli/commands/extension.js +1 -2
- package/dist/src/cli/commands/gateway/run-foreground.js +3 -3
- package/dist/src/cli/commands/gateway/shared.js +1 -1
- package/dist/src/cli/commands/history.js +2 -1
- package/dist/src/cli/commands/image.js +2 -2
- package/dist/src/cli/commands/init.js +11 -30
- package/dist/src/cli/commands/mcp.js +1 -2
- package/dist/src/cli/commands/models.js +13 -11
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -2
- package/dist/src/cli/commands/onboard/gateway.js +1 -2
- package/dist/src/cli/commands/onboard/model.d.ts +1 -1
- package/dist/src/cli/commands/onboard/model.js +18 -26
- package/dist/src/cli/commands/onboard.js +4 -2
- package/dist/src/cli/commands/platform.js +1 -0
- package/dist/src/cli/commands/project.js +3 -3
- package/dist/src/cli/commands/providers.js +2 -1
- package/dist/src/cli/commands/runtime.js +1 -2
- package/dist/src/cli/commands/search.js +1 -2
- package/dist/src/cli/commands/skills.js +1 -2
- package/dist/src/cli/commands/tui-runner.js +3 -2
- package/dist/src/cli/commands/tui.js +6 -8
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/voice.js +1 -2
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/cli/index.js +4 -2
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +15 -16
- package/dist/src/cli/utils/session.js +1 -2
- package/dist/src/computer/model-config.d.ts +3 -3
- package/dist/src/computer/model-config.js +10 -20
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/agent-model-intents.js +2 -2
- package/dist/src/config/agent-profile.d.ts +5 -6
- package/dist/src/config/agent-profile.js +19 -19
- package/dist/src/config/config-surface.d.ts +0 -3
- package/dist/src/config/default-model.js +2 -6
- package/dist/src/config/index.js +7 -8
- package/dist/src/config/loader.js +12 -18
- package/dist/src/config/models-json.d.ts +6 -6
- package/dist/src/config/paths.d.ts +18 -19
- package/dist/src/config/paths.js +35 -35
- package/dist/src/config/reload.d.ts +0 -1
- package/dist/src/config/reload.js +1 -6
- package/dist/src/config/rules.js +0 -15
- package/dist/src/config/schema.d.ts +3 -406
- package/dist/src/config/schema.js +24 -86
- package/dist/src/config/validate-channel-configs.js +8 -14
- package/dist/src/config/workspace-dirs.d.ts +3 -4
- package/dist/src/config/workspace-dirs.js +9 -8
- package/dist/src/config/workspace-path-helpers.d.ts +1 -1
- package/dist/src/config/workspace-path-helpers.js +2 -2
- package/dist/src/connectors/cli/lifecycle.js +2 -1
- package/dist/src/connectors/composio-managed-events.js +2 -1
- package/dist/src/connectors/connected-source-ingestion.js +2 -1
- package/dist/src/connectors/connected-source-understanding.js +4 -2
- package/dist/src/connectors/content-enrichment.js +2 -1
- package/dist/src/connectors/learning-coordinator.js +2 -1
- package/dist/src/connectors/runtime-adapter-registry.js +2 -1
- package/dist/src/connectors/workflow-preflight.d.ts +8 -1
- package/dist/src/connectors/workflow-preflight.js +11 -3
- package/dist/src/discussions/analyzer.js +2 -2
- package/dist/src/endpoint-tools/runtime.js +2 -1
- package/dist/src/execution-environments/subject.js +2 -1
- package/dist/src/extensions/activation-context.js +3 -16
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/discover-extensions.js +9 -15
- package/dist/src/extensions/extension-metadata-snapshot.d.ts +1 -1
- package/dist/src/extensions/extension-metadata-snapshot.js +9 -16
- package/dist/src/extensions/index.js +4 -10
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +7 -14
- package/dist/src/extensions/manifest-registry.js +93 -98
- package/dist/src/extensions/marketplace.js +5 -2
- package/dist/src/extensions/normalize-manifest.js +12 -17
- package/dist/src/extensions/update.js +1 -2
- package/dist/src/files/file-service.js +7 -8
- package/dist/src/gateway/agents-admin.d.ts +23 -27
- package/dist/src/gateway/agents-admin.js +109 -130
- package/dist/src/gateway/file-path-classifier.js +3 -3
- package/dist/src/gateway/file-space-service.js +2 -1
- package/dist/src/gateway/global-defaults-admin.d.ts +6 -4
- package/dist/src/gateway/global-defaults-admin.js +21 -20
- package/dist/src/gateway/hono/app.js +2 -1
- package/dist/src/gateway/hono/lib/config-payload.js +12 -9
- package/dist/src/gateway/hono/middleware/auth.js +2 -1
- package/dist/src/gateway/hono/middleware/scopes.js +2 -1
- package/dist/src/gateway/hono/routes/agents.js +22 -49
- package/dist/src/gateway/hono/routes/browser.js +4 -2
- package/dist/src/gateway/hono/routes/channels.js +1 -2
- package/dist/src/gateway/hono/routes/cli-connectors.js +2 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +3 -1
- package/dist/src/gateway/hono/routes/composer-history.js +2 -1
- package/dist/src/gateway/hono/routes/config-patch/index.d.ts +1 -3
- package/dist/src/gateway/hono/routes/config-patch/index.js +1 -2
- package/dist/src/gateway/hono/routes/config-patch/misc.js +18 -11
- package/dist/src/gateway/hono/routes/config.js +0 -2
- package/dist/src/gateway/hono/routes/connectors.js +8 -4
- package/dist/src/gateway/hono/routes/context-sources.js +4 -3
- package/dist/src/gateway/hono/routes/device-pairing-approval.js +2 -1
- package/dist/src/gateway/hono/routes/device-push.js +3 -2
- package/dist/src/gateway/hono/routes/devices.js +6 -3
- package/dist/src/gateway/hono/routes/discussions.js +2 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +2 -1
- package/dist/src/gateway/hono/routes/global-defaults.js +8 -16
- package/dist/src/gateway/hono/routes/home.js +93 -4
- package/dist/src/gateway/hono/routes/interaction-state.js +2 -1
- package/dist/src/gateway/hono/routes/models.js +8 -7
- package/dist/src/gateway/hono/routes/notes.js +4 -5
- package/dist/src/gateway/hono/routes/projects.js +6 -6
- package/dist/src/gateway/hono/routes/public-gateway.js +2 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +4 -2
- package/dist/src/gateway/hono/routes/shares.js +4 -3
- package/dist/src/gateway/hono/routes/site-shares.js +2 -2
- package/dist/src/gateway/hono/routes/status.js +2 -3
- package/dist/src/gateway/hono/routes/tasks.js +1 -2
- package/dist/src/gateway/hono/routes/user-model-refresh.js +2 -1
- package/dist/src/gateway/hono/routes/user-model.js +3 -2
- package/dist/src/gateway/hono/routes/work-discovery.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/image-generation-setup.d.ts +19 -10
- package/dist/src/gateway/image-generation-setup.js +59 -23
- package/dist/src/gateway/index.js +1 -4
- package/dist/src/gateway/lock.js +13 -18
- package/dist/src/gateway/memory-maintenance-automation-reconciler.js +4 -3
- package/dist/src/gateway/run-loop.js +2 -3
- package/dist/src/gateway/security/gateway-scopes.js +6 -2
- package/dist/src/gateway/security/index.js +4 -1
- package/dist/src/gateway/service/agent-runner.js +4 -2
- package/dist/src/gateway/service/app-context-access.js +2 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +0 -1
- package/dist/src/gateway/service/config-coordinator.js +4 -22
- package/dist/src/gateway/service/marketplace-service.js +3 -1
- package/dist/src/gateway/service/run-gateway-agent.js +4 -2
- package/dist/src/gateway/service/session-input-coordinator.js +4 -2
- package/dist/src/gateway/service.d.ts +5 -0
- package/dist/src/gateway/service.js +109 -33
- package/dist/src/gateway/session-context-summary.js +4 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +2 -0
- package/dist/src/gateway/xopc-cloud-capability-setup.js +15 -10
- package/dist/src/home-intelligence/application-service.d.ts +31 -0
- package/dist/src/home-intelligence/application-service.js +134 -0
- package/dist/src/home-intelligence/capability-preflight.d.ts +32 -0
- package/dist/src/home-intelligence/capability-preflight.js +118 -0
- package/dist/src/home-intelligence/evaluation.d.ts +34 -0
- package/dist/src/home-intelligence/evaluation.js +49 -0
- package/dist/src/home-intelligence/generator.d.ts +125 -0
- package/dist/src/home-intelligence/generator.js +227 -0
- package/dist/src/home-intelligence/host.d.ts +53 -0
- package/dist/src/home-intelligence/host.js +257 -0
- package/dist/src/home-intelligence/notification.d.ts +8 -0
- package/dist/src/home-intelligence/notification.js +20 -0
- package/dist/src/home-intelligence/policy.d.ts +16 -0
- package/dist/src/home-intelligence/policy.js +152 -0
- package/dist/src/home-intelligence/repository.d.ts +81 -0
- package/dist/src/home-intelligence/repository.js +495 -0
- package/dist/src/home-intelligence/snapshot.d.ts +43 -0
- package/dist/src/home-intelligence/snapshot.js +133 -0
- package/dist/src/home-intelligence/strategy.d.ts +14 -0
- package/dist/src/home-intelligence/strategy.js +10 -0
- package/dist/src/home-intelligence/types.d.ts +13 -0
- package/dist/src/home-intelligence/types.js +1 -0
- package/dist/src/infra/update-restart.js +4 -2
- package/dist/src/knowledge/connected-knowledge-pipeline.js +2 -1
- package/dist/src/knowledge/ingestion-service.js +2 -1
- package/dist/src/knowledge-memory/repository.js +2 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/local-apps/store.js +2 -1
- package/dist/src/mcp/channel-bridge.js +1 -2
- package/dist/src/mcp/channel-server.js +1 -2
- package/dist/src/mcp/gateway-http-client.js +1 -2
- package/dist/src/media/session-references.js +2 -1
- package/dist/src/memory-maintenance/service.js +2 -1
- package/dist/src/migrations/memory-config.js +1 -2
- package/dist/src/notes/agent-context.js +2 -1
- package/dist/src/notes/attachment-ref.js +8 -4
- package/dist/src/notes/note-attachment-sync.js +2 -1
- package/dist/src/notes/note-index-meta.js +14 -7
- package/dist/src/notes/note-markdown.js +13 -7
- package/dist/src/notes/service.js +6 -3
- package/dist/src/notes/store.js +4 -2
- package/dist/src/notifications/device-store.js +1 -1
- package/dist/src/notifications/planner.js +24 -0
- package/dist/src/notifications/service.d.ts +7 -14
- package/dist/src/notifications/service.js +13 -3
- package/dist/src/notifications/store.js +1 -1
- package/dist/src/notifications/types.d.ts +1 -1
- package/dist/src/notifications/types.js +1 -1
- package/dist/src/projects/capabilities/write.js +2 -1
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-agent.js +4 -4
- package/dist/src/projects/project-service.js +2 -1
- package/dist/src/projects/workspace.js +3 -2
- package/dist/src/providers/index.js +3 -3
- package/dist/src/providers/model-reference-auditor.d.ts +1 -2
- package/dist/src/providers/model-reference-auditor.js +8 -5
- package/dist/src/realtime/runtime.js +2 -1
- package/dist/src/routing/binding-schema.d.ts +41 -0
- package/dist/src/routing/binding-schema.js +26 -0
- package/dist/src/routing/bindings.d.ts +4 -2
- package/dist/src/routing/bindings.js +4 -4
- package/dist/src/routing/index.d.ts +1 -1
- package/dist/src/routing/resolve-route.d.ts +7 -24
- package/dist/src/routing/resolve-route.js +17 -18
- package/dist/src/routing/resolve-tui-session-key.d.ts +1 -4
- package/dist/src/routing/resolve-tui-session-key.js +10 -9
- package/dist/src/scenes/execution.d.ts +1 -1
- package/dist/src/scenes/model.js +1 -1
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +1 -1
- package/dist/src/scenes/taskFollowUp/service.js +6 -4
- package/dist/src/scenes/templates.d.ts +2 -2
- package/dist/src/session/config-store.js +2 -1
- package/dist/src/session/init-session-turn.js +2 -1
- package/dist/src/session/resolve-session.js +2 -1
- package/dist/src/session/session-workspace.js +1 -1
- package/dist/src/session/store.js +3 -2
- package/dist/src/storage/sqlite/activity-repository.js +6 -2
- package/dist/src/storage/sqlite/browser-tab-binding-repository.js +6 -2
- package/dist/src/storage/sqlite/clarification-wait-repository.js +13 -8
- package/dist/src/storage/sqlite/collaboration-rule-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/collaboration-rule-repository.js +8 -3
- package/dist/src/storage/sqlite/composer-input-history-repository.js +8 -3
- package/dist/src/storage/sqlite/config-repository.js +9 -5
- package/dist/src/storage/sqlite/connector-learning-repository.js +6 -2
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +6 -2
- package/dist/src/storage/sqlite/context-evidence-repository.js +8 -3
- package/dist/src/storage/sqlite/context-extraction-repository.js +8 -3
- package/dist/src/storage/sqlite/device-access-repository.js +15 -9
- package/dist/src/storage/sqlite/device-pairing-approval.js +6 -2
- package/dist/src/storage/sqlite/device-pairing-repository.js +10 -5
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +6 -2
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +6 -2
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +6 -2
- package/dist/src/storage/sqlite/gateway-identity-repository.js +6 -2
- package/dist/src/storage/sqlite/home-attention-repository.js +6 -2
- package/dist/src/storage/sqlite/index.d.ts +0 -1
- package/dist/src/storage/sqlite/index.js +72 -42
- package/dist/src/storage/sqlite/interaction-state-repository.js +10 -4
- package/dist/src/storage/sqlite/knowledge-repository.js +6 -2
- package/dist/src/storage/sqlite/migrations/203_remove_retired_proactive_contracts.sql +70 -0
- package/dist/src/storage/sqlite/migrations/204_home_intelligence.sql +78 -0
- package/dist/src/storage/sqlite/migrations/205_agent_catalog.sql +66 -0
- package/dist/src/storage/sqlite/migrations/206_home_advice_strategy_version.sql +3 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +2 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +8 -4
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.d.ts +7 -1
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +2 -2
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +4 -4
- package/dist/src/storage/sqlite/note-agent-context-repository.js +6 -2
- package/dist/src/storage/sqlite/notes-repository.js +9 -4
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-task-plan-repository.js +14 -9
- package/dist/src/storage/sqlite/session-turn-replace-repository.js +9 -5
- package/dist/src/storage/sqlite/sidebar-layout-repository.js +14 -9
- package/dist/src/storage/sqlite/transcript-repository.js +10 -6
- package/dist/src/storage/sqlite/user-people-repository.js +8 -3
- package/dist/src/storage/sqlite/user-trust-repository.js +8 -3
- package/dist/src/tasks/attention-governor.d.ts +0 -1
- package/dist/src/tasks/attention-governor.js +1 -7
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.d.ts +1 -1
- package/dist/src/tasks/execution-context.d.ts +2 -2
- package/dist/src/tasks/execution-context.js +6 -5
- package/dist/src/tasks/home-query-service.d.ts +3 -2
- package/dist/src/tasks/home-query-service.js +23 -44
- package/dist/src/tasks/task-context-assembler.js +2 -1
- package/dist/src/tasks/task-context-repository.d.ts +1 -1
- package/dist/src/tasks/task-contract-planner.d.ts +0 -3
- package/dist/src/tasks/task-contract-planner.js +1 -4
- package/dist/src/tasks/task-handoff-service.d.ts +0 -2
- package/dist/src/tasks/task-handoff-service.js +3 -3
- package/dist/src/tasks/task-value-metrics-service.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +12 -14
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-commands.js +5 -3
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui.js +5 -5
- package/dist/src/tunnel/registration-proof.js +2 -1
- package/dist/src/user-context/access-policy.js +2 -1
- package/dist/src/user-context/domain.d.ts +1 -1
- package/dist/src/user-context/domain.js +18 -13
- package/dist/src/user-context/extraction/registry.js +2 -1
- package/dist/src/user-context/interaction-state.js +4 -1
- package/dist/src/user-context/relationship-continuity.js +2 -1
- package/dist/src/user-context/trust-policy.js +13 -8
- package/dist/src/user-model/bootstrap.js +2 -1
- package/dist/src/user-model/capture/executor.js +4 -2
- package/dist/src/user-model/capture/semantic.d.ts +1 -1
- package/dist/src/user-model/capture/semantic.js +1 -1
- package/dist/src/user-model/domain.js +7 -2
- package/dist/src/user-model/goals.js +2 -1
- package/dist/src/user-model/index.js +4 -1
- package/dist/src/user-model/repository.js +2 -1
- package/dist/src/utils/helpers.js +1 -4
- package/dist/src/utils/index.js +2 -2
- package/dist/src/utils/logger/index.d.ts +1 -1
- package/dist/src/utils/logger/index.js +2 -2
- package/dist/src/utils/logger/redact.d.ts +2 -0
- package/dist/src/utils/logger/redact.js +11 -3
- package/dist/src/utils/logger.js +2 -2
- package/dist/src/voice/realtime/memory-context.js +2 -1
- package/dist/src/voice/realtime/persona-context.js +6 -6
- package/dist/src/voice/tts/audio.js +1 -1
- package/dist/src/work-discovery/analyzer.js +3 -3
- package/dist/src/work-discovery/investigator.js +1 -1
- package/dist/src/work-discovery/service.js +12 -11
- package/dist/src/workflows/draft/workflow-draft-service.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +4 -5
- package/dist/src/workflows/store/paths.js +1 -1
- package/package.json +5 -5
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CAFHadiy.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-Drt3Foi9.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-B-Eduqwz.js +0 -7
- package/dist/gateway/static/root/assets/browser-settings-page-Dwgir6mu.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-H5L5vynP.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-uFKh3Hd0.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-RFBRYe5S.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Px-v3Q6Q.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-CfCo3lqh.js +0 -1
- package/dist/gateway/static/root/assets/home-page-w3_aWeNt.js +0 -1
- package/dist/gateway/static/root/assets/index--3c0awkr.js +0 -121
- package/dist/gateway/static/root/assets/local-app-workbench-page-BYKrJpFF.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-Dl4kM4Na.js +0 -2
- package/dist/gateway/static/root/assets/messages-7VAhscYe.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-j6sioeL1.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CMvvHv0f.js +0 -8
- package/dist/gateway/static/root/assets/popover-select-B-GDnZO9.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-C9K_e-EV.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CLGJNA42.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-ClLAD1pz.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-Xj8MkXN1.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DwALV8mi.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-F0rCQ-2a.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-C7hf6Cov.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-xPrFejRE.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-RdDYu7Yj.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-2A966jFY.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-CnBxPBVe.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-BZVpqw4T.js +0 -6
- package/dist/packages/gateway-contract/src/proactive.js +0 -136
- package/dist/src/commands/agents.config.d.ts +0 -31
- package/dist/src/commands/agents.config.js +0 -129
- package/dist/src/gateway/hono/routes/config-patch/agents.d.ts +0 -2
- package/dist/src/gateway/hono/routes/config-patch/agents.js +0 -6
- package/dist/src/storage/sqlite/relationship-settings-repository.d.ts +0 -17
- package/dist/src/storage/sqlite/relationship-settings-repository.js +0 -65
|
@@ -1,14 +1,7 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
3
|
import { getCurrentTranscriptId, init_session_repository } from "./session-repository.js";
|
|
3
4
|
//#region src/storage/sqlite/session-task-plan-repository.ts
|
|
4
|
-
init_session_repository();
|
|
5
|
-
init_transaction();
|
|
6
|
-
const VALID_STATUSES = new Set([
|
|
7
|
-
"pending",
|
|
8
|
-
"in_progress",
|
|
9
|
-
"completed",
|
|
10
|
-
"cancelled"
|
|
11
|
-
]);
|
|
12
5
|
function parseItems(value) {
|
|
13
6
|
try {
|
|
14
7
|
const raw = JSON.parse(value);
|
|
@@ -75,5 +68,17 @@ function deleteSessionTaskPlan(conversationId, planId = "todo") {
|
|
|
75
68
|
});
|
|
76
69
|
return deleted;
|
|
77
70
|
}
|
|
71
|
+
var VALID_STATUSES;
|
|
72
|
+
var init_session_task_plan_repository = __esmMin((() => {
|
|
73
|
+
init_session_repository();
|
|
74
|
+
init_transaction();
|
|
75
|
+
VALID_STATUSES = new Set([
|
|
76
|
+
"pending",
|
|
77
|
+
"in_progress",
|
|
78
|
+
"completed",
|
|
79
|
+
"cancelled"
|
|
80
|
+
]);
|
|
81
|
+
}));
|
|
78
82
|
//#endregion
|
|
79
|
-
|
|
83
|
+
init_session_task_plan_repository();
|
|
84
|
+
export { getSessionTaskPlan, init_session_task_plan_repository, setSessionTaskPlan };
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { getXopcDatabase, init_connection } from "./connection.js";
|
|
2
3
|
import { init_transaction, runSqliteWriteTransaction } from "./transaction.js";
|
|
3
4
|
import { buildSessionContextForLlm, buildSessionDisplayMessages, init_session_context_for_llm } from "../../session/session-context-for-llm.js";
|
|
4
5
|
import { estimateTokensFromMessages, init_row_mappers, transcriptEntryRowToStoredRow } from "./row-mappers.js";
|
|
5
6
|
import { randomUUID } from "node:crypto";
|
|
6
7
|
//#region src/storage/sqlite/session-turn-replace-repository.ts
|
|
7
|
-
init_session_context_for_llm();
|
|
8
|
-
init_row_mappers();
|
|
9
|
-
init_connection();
|
|
10
|
-
init_transaction();
|
|
11
8
|
function isUserRow(row) {
|
|
12
9
|
return row.role === "user";
|
|
13
10
|
}
|
|
@@ -111,5 +108,12 @@ function replaceLatestSessionTurnAndQueueInput(input) {
|
|
|
111
108
|
};
|
|
112
109
|
});
|
|
113
110
|
}
|
|
111
|
+
var init_session_turn_replace_repository = __esmMin((() => {
|
|
112
|
+
init_session_context_for_llm();
|
|
113
|
+
init_row_mappers();
|
|
114
|
+
init_connection();
|
|
115
|
+
init_transaction();
|
|
116
|
+
}));
|
|
114
117
|
//#endregion
|
|
115
|
-
|
|
118
|
+
init_session_turn_replace_repository();
|
|
119
|
+
export { init_session_turn_replace_repository, replaceLatestSessionTurnAndQueueInput, validateLatestSessionTurnTarget };
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
3
|
//#region src/storage/sqlite/sidebar-layout-repository.ts
|
|
3
|
-
init_transaction();
|
|
4
|
-
var SidebarLayoutConflictError = class extends Error {
|
|
5
|
-
constructor(current) {
|
|
6
|
-
super("Sidebar layout changed in another window");
|
|
7
|
-
this.current = current;
|
|
8
|
-
this.name = "SidebarLayoutConflictError";
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
4
|
function getSidebarLayout(containerId) {
|
|
12
5
|
const db = getSqliteDatabase();
|
|
13
6
|
const row = db.prepare("SELECT revision FROM sidebar_layouts WHERE container_id = ?").get(containerId);
|
|
@@ -49,5 +42,17 @@ function sortBySidebarLayout(items, layout, idOf) {
|
|
|
49
42
|
return a.index - b.index;
|
|
50
43
|
}).map(({ item }) => item);
|
|
51
44
|
}
|
|
45
|
+
var SidebarLayoutConflictError;
|
|
46
|
+
var init_sidebar_layout_repository = __esmMin((() => {
|
|
47
|
+
init_transaction();
|
|
48
|
+
SidebarLayoutConflictError = class extends Error {
|
|
49
|
+
constructor(current) {
|
|
50
|
+
super("Sidebar layout changed in another window");
|
|
51
|
+
this.current = current;
|
|
52
|
+
this.name = "SidebarLayoutConflictError";
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}));
|
|
52
56
|
//#endregion
|
|
53
|
-
|
|
57
|
+
init_sidebar_layout_repository();
|
|
58
|
+
export { SidebarLayoutConflictError, getSidebarLayout, init_sidebar_layout_repository, replaceSidebarLayout, sortBySidebarLayout };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
3
|
import { readCurrentTranscriptId } from "./session-instance-repository.js";
|
|
3
4
|
import { buildSessionContextForLlm, init_session_context_for_llm, isRuntimeOnlyTranscriptMessage } from "../../session/session-context-for-llm.js";
|
|
@@ -6,11 +7,6 @@ import { escapeFts5Query, init_fts } from "./fts.js";
|
|
|
6
7
|
import { getCurrentTranscriptId, init_session_repository } from "./session-repository.js";
|
|
7
8
|
import { randomUUID } from "node:crypto";
|
|
8
9
|
//#region src/storage/sqlite/transcript-repository.ts
|
|
9
|
-
init_session_context_for_llm();
|
|
10
|
-
init_row_mappers();
|
|
11
|
-
init_session_repository();
|
|
12
|
-
init_fts();
|
|
13
|
-
init_transaction();
|
|
14
10
|
function nextSeq(db, transcriptId) {
|
|
15
11
|
return (db.prepare(`SELECT COALESCE(MAX(seq), 0) AS max_seq FROM transcript_entries WHERE transcript_id = ?`).get(transcriptId).max_seq ?? 0) + 1;
|
|
16
12
|
}
|
|
@@ -383,5 +379,13 @@ function restoreBeforeCompactionBoundary(conversationId, compactionId) {
|
|
|
383
379
|
WHERE conversation_id = ?`).run(restoredMessages.length, tokensAfter, compactedCount, now, now, now, conversationId);
|
|
384
380
|
});
|
|
385
381
|
}
|
|
382
|
+
var init_transcript_repository = __esmMin((() => {
|
|
383
|
+
init_session_context_for_llm();
|
|
384
|
+
init_row_mappers();
|
|
385
|
+
init_session_repository();
|
|
386
|
+
init_fts();
|
|
387
|
+
init_transaction();
|
|
388
|
+
}));
|
|
386
389
|
//#endregion
|
|
387
|
-
|
|
390
|
+
init_transcript_repository();
|
|
391
|
+
export { appendCompactionBoundaryIfUnchanged, appendMediaToAssistantTranscriptEntry, appendTranscriptEntry, findLatestAssistantTranscriptEntryId, init_transcript_repository, listCompactionBoundaries, loadCompactionSourceSnapshot, loadLlmMessagesForSession, loadTranscriptHistoryRowsForSession, loadTranscriptRows, loadTranscriptRowsForSession, paginateTranscriptMessages, replaceTranscriptRows, restoreBeforeCompactionBoundary, searchSessionTranscript };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
-
import { USER_CONTEXT_PRINCIPAL_ID } from "../../user-context/domain.js";
|
|
3
|
+
import { USER_CONTEXT_PRINCIPAL_ID, init_domain } from "../../user-context/domain.js";
|
|
3
4
|
//#region src/storage/sqlite/user-people-repository.ts
|
|
4
|
-
init_transaction();
|
|
5
5
|
function sourceMetadata(sourceInstanceId) {
|
|
6
6
|
if (!sourceInstanceId.startsWith("composio:")) return {};
|
|
7
7
|
const connectorId = sourceInstanceId.split(":")[1];
|
|
@@ -243,5 +243,10 @@ function mergeUserPeople(sourcePersonId, targetPersonId, principalId = USER_CONT
|
|
|
243
243
|
});
|
|
244
244
|
return getUserPerson(targetPersonId, principalId);
|
|
245
245
|
}
|
|
246
|
+
var init_user_people_repository = __esmMin((() => {
|
|
247
|
+
init_domain();
|
|
248
|
+
init_transaction();
|
|
249
|
+
}));
|
|
246
250
|
//#endregion
|
|
247
|
-
|
|
251
|
+
init_user_people_repository();
|
|
252
|
+
export { getUserPeopleIndexState, getUserPerson, init_user_people_repository, listUserPeople, mergeUserPeople, replaceUserPeopleIndex, summarizeUserPeople, updateUserPerson };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
-
import { DEFAULT_USER_TRUST_LEVEL, isUserTrustLevel } from "../../user-context/trust-policy.js";
|
|
3
|
+
import { DEFAULT_USER_TRUST_LEVEL, init_trust_policy, isUserTrustLevel } from "../../user-context/trust-policy.js";
|
|
3
4
|
//#region src/storage/sqlite/user-trust-repository.ts
|
|
4
|
-
init_transaction();
|
|
5
5
|
function fromRow(row) {
|
|
6
6
|
return {
|
|
7
7
|
principalId: row.principal_id,
|
|
@@ -29,5 +29,10 @@ function setUserTrustPolicy(defaultActionLevel, principalId = "local-owner") {
|
|
|
29
29
|
return getUserTrustPolicy(principalId);
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
+
var init_user_trust_repository = __esmMin((() => {
|
|
33
|
+
init_trust_policy();
|
|
34
|
+
init_transaction();
|
|
35
|
+
}));
|
|
32
36
|
//#endregion
|
|
33
|
-
|
|
37
|
+
init_user_trust_repository();
|
|
38
|
+
export { getUserTrustPolicy, init_user_trust_repository, setUserTrustPolicy };
|
|
@@ -3,7 +3,6 @@ function decisionScore(item) {
|
|
|
3
3
|
if (item.reason === "approval_required") return 100;
|
|
4
4
|
if (item.reason === "needs_input" || item.reason === "user_input" || item.reason === "user_approval") return 95;
|
|
5
5
|
if (item.reason === "blocked" || item.reason === "dependency" || item.reason === "external") return 85;
|
|
6
|
-
if (item.kind === "agent_judgment") return Math.round((item.judgment?.valueScore ?? 0) * 70) + (item.urgency === "now" ? 20 : 0);
|
|
7
6
|
if (item.reason === "overdue") return 70;
|
|
8
7
|
return 50;
|
|
9
8
|
}
|
|
@@ -11,17 +10,12 @@ function decisionKey(item) {
|
|
|
11
10
|
const title = item.title.trim().toLocaleLowerCase();
|
|
12
11
|
return item.response ? item.id : `${item.projectId ?? "global"}:${title}:${item.reason === "approval_required" ? item.id : ""}`;
|
|
13
12
|
}
|
|
14
|
-
function keepDecision(item, proactiveEnabled) {
|
|
15
|
-
if (item.kind !== "agent_judgment") return true;
|
|
16
|
-
if (!proactiveEnabled) return false;
|
|
17
|
-
return (item.judgment?.confidence ?? 0) >= .65 && (item.judgment?.valueScore ?? 0) >= .6;
|
|
18
|
-
}
|
|
19
13
|
var AttentionGovernor = class {
|
|
20
14
|
project(input) {
|
|
21
15
|
const maxDecisions = Math.max(1, Math.min(20, input.maxDecisions ?? 7));
|
|
22
16
|
const maxAttention = Math.max(1, Math.min(10, input.maxAttention ?? 5));
|
|
23
17
|
const seen = /* @__PURE__ */ new Set();
|
|
24
|
-
const eligible = [...input.decisions].
|
|
18
|
+
const eligible = [...input.decisions].sort((left, right) => decisionScore(right) - decisionScore(left) || right.updatedAt - left.updatedAt).filter((item) => {
|
|
25
19
|
const key = decisionKey(item);
|
|
26
20
|
if (seen.has(key)) return false;
|
|
27
21
|
seen.add(key);
|
|
@@ -2,10 +2,10 @@ import { ProductReadContracts } from "../../../packages/gateway-contract/src/cap
|
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "../task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../task-run-repository.js";
|
|
5
|
-
import { TaskConversationRepository } from "../task-conversation-repository.js";
|
|
6
|
-
import { TaskReadModelProjector } from "../task-read-model-projector.js";
|
|
7
5
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
6
|
import { defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
7
|
+
import { TaskConversationRepository } from "../task-conversation-repository.js";
|
|
8
|
+
import { TaskReadModelProjector } from "../task-read-model-projector.js";
|
|
9
9
|
import { TaskContextRepository } from "../task-context-repository.js";
|
|
10
10
|
import { TaskDependencyService } from "../task-dependency-service.js";
|
|
11
11
|
import { TaskValueMetricsService } from "../task-value-metrics-service.js";
|
|
@@ -101,8 +101,8 @@ export declare const TaskMutationOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
101
101
|
ok: z.ZodLiteral<false>;
|
|
102
102
|
reason: z.ZodEnum<{
|
|
103
103
|
blocked: "blocked";
|
|
104
|
-
conflict: "conflict";
|
|
105
104
|
not_found: "not_found";
|
|
105
|
+
conflict: "conflict";
|
|
106
106
|
invalid_transition: "invalid_transition";
|
|
107
107
|
}>;
|
|
108
108
|
model: z.ZodOptional<z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SessionMetadata } from '../session/types.js';
|
|
2
2
|
import type { ExecutionEnvironmentKind } from '../execution-environments/types.js';
|
|
3
|
-
export type ExecutionOrigin = 'chat' | 'task' | 'workflow' | 'automation' | 'browser' | '
|
|
4
|
-
export type ExecutionTrigger = 'user' | 'schedule' | 'webhook' | '
|
|
3
|
+
export type ExecutionOrigin = 'chat' | 'task' | 'workflow' | 'automation' | 'browser' | 'heartbeat';
|
|
4
|
+
export type ExecutionTrigger = 'user' | 'schedule' | 'webhook' | 'heartbeat' | 'retry';
|
|
5
5
|
export interface ExecutionContext {
|
|
6
6
|
runId: string;
|
|
7
7
|
conversationId: string;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { isXopcDatabaseOpen } from "../storage/sqlite/connection.js";
|
|
2
|
-
import "../storage/sqlite/index.js";
|
|
2
|
+
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
3
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
4
4
|
import { getExecutionEnvironmentForSession } from "../execution-environments/subject.js";
|
|
5
5
|
//#region src/tasks/execution-context.ts
|
|
6
|
+
init_sqlite();
|
|
6
7
|
const ORIGINS = new Set([
|
|
7
8
|
"chat",
|
|
8
9
|
"task",
|
|
9
10
|
"workflow",
|
|
10
11
|
"automation",
|
|
11
12
|
"browser",
|
|
12
|
-
"
|
|
13
|
+
"heartbeat"
|
|
13
14
|
]);
|
|
14
15
|
const TRIGGERS = new Set([
|
|
15
16
|
"user",
|
|
16
17
|
"schedule",
|
|
17
18
|
"webhook",
|
|
18
|
-
"
|
|
19
|
+
"heartbeat",
|
|
19
20
|
"retry"
|
|
20
21
|
]);
|
|
21
22
|
function optionalString(value) {
|
|
@@ -27,7 +28,7 @@ function metadataOrigin(metadata, taskId) {
|
|
|
27
28
|
if (taskId) return "task";
|
|
28
29
|
if (metadata.sessionType === "workflow-run" || metadata.sessionType === "workflow-subagent") return "workflow";
|
|
29
30
|
if (metadata.sessionType === "cron") return "automation";
|
|
30
|
-
if (metadata.sessionType === "heartbeat") return "
|
|
31
|
+
if (metadata.sessionType === "heartbeat") return "heartbeat";
|
|
31
32
|
if (optionalString(metadata.customData?.browserRecipeId)) return "browser";
|
|
32
33
|
return "chat";
|
|
33
34
|
}
|
|
@@ -35,7 +36,7 @@ function metadataTrigger(metadata) {
|
|
|
35
36
|
const explicit = optionalString(metadata.customData?.triggerKind);
|
|
36
37
|
if (explicit && TRIGGERS.has(explicit)) return explicit;
|
|
37
38
|
if (metadata.sessionType === "cron") return "schedule";
|
|
38
|
-
if (metadata.sessionType === "heartbeat") return "
|
|
39
|
+
if (metadata.sessionType === "heartbeat") return "heartbeat";
|
|
39
40
|
return "user";
|
|
40
41
|
}
|
|
41
42
|
function resolveExecutionContext(input) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HomeAttention, HomeDecision, HomeResponse } from '@xopcai/gateway-contract';
|
|
1
|
+
import type { HomeAttention, HomeAdvisor, HomeDecision, HomeResponse } from '@xopcai/gateway-contract';
|
|
2
2
|
import type { AutomationService } from '../automations/service/automation-service.js';
|
|
3
3
|
import type { Config } from '../config/schema.js';
|
|
4
4
|
import type { ProjectService } from '../projects/project-service.js';
|
|
@@ -57,7 +57,8 @@ export declare function buildHomeWorkbench(input: {
|
|
|
57
57
|
export declare class HomeQueryService {
|
|
58
58
|
#private;
|
|
59
59
|
private readonly service;
|
|
60
|
-
|
|
60
|
+
private readonly getAdvisor;
|
|
61
|
+
constructor(service: HomeGatewayPort, getAdvisor?: () => HomeAdvisor);
|
|
61
62
|
getSnapshot(locale?: string): Promise<HomeResponse>;
|
|
62
63
|
}
|
|
63
64
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
2
2
|
import { isHomeAttentionAcknowledged } from "../storage/sqlite/home-attention-repository.js";
|
|
3
3
|
import { listConnectorApprovals } from "../storage/sqlite/connector-repository.js";
|
|
4
|
-
import {
|
|
5
|
-
import "../storage/sqlite/index.js";
|
|
4
|
+
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
6
5
|
import { TaskReadModelProjector } from "./task-read-model-projector.js";
|
|
7
6
|
import "../automations/domain/defaults.js";
|
|
8
7
|
import { AttentionGovernor } from "./attention-governor.js";
|
|
9
8
|
import { listGatewayAgents } from "../gateway/agents-admin.js";
|
|
10
9
|
import "../automations/index.js";
|
|
11
10
|
//#region src/tasks/home-query-service.ts
|
|
11
|
+
init_sqlite();
|
|
12
12
|
init_task_repository();
|
|
13
13
|
function toHomeWorkflowRun(run) {
|
|
14
14
|
return {
|
|
@@ -146,7 +146,6 @@ function formatScheduleDistance(value, nowMs, locale) {
|
|
|
146
146
|
return formatter.format(Math.ceil(distanceMs / 864e5), "day");
|
|
147
147
|
}
|
|
148
148
|
function decisionRecommendation(decision, copy) {
|
|
149
|
-
if (decision.judgment?.recommendation) return decision.judgment.recommendation;
|
|
150
149
|
if (decision.reason === "needs_input" || decision.reason === "user_input") return copy.inputRecommendation;
|
|
151
150
|
if (decision.reason === "approval_required" || decision.reason === "user_approval") return copy.approvalRecommendation;
|
|
152
151
|
if (decision.reason === "retry") return copy.retryRecommendation;
|
|
@@ -155,11 +154,7 @@ function decisionRecommendation(decision, copy) {
|
|
|
155
154
|
function buildHomeWorkbench(input) {
|
|
156
155
|
const copy = homeActionCopy(input.locale);
|
|
157
156
|
const decisions = input.decisions.map((decision) => {
|
|
158
|
-
const openAction =
|
|
159
|
-
type: "review_judgment",
|
|
160
|
-
label: copy.review,
|
|
161
|
-
itemId: decision.judgment.inboxItemId
|
|
162
|
-
} : {
|
|
157
|
+
const openAction = {
|
|
163
158
|
type: "open",
|
|
164
159
|
label: copy.review,
|
|
165
160
|
href: decision.href
|
|
@@ -287,11 +282,15 @@ var HomeQueryService = class {
|
|
|
287
282
|
#tasks = new TaskRepository();
|
|
288
283
|
#projector = new TaskReadModelProjector();
|
|
289
284
|
#attentionGovernor = new AttentionGovernor();
|
|
290
|
-
constructor(service) {
|
|
285
|
+
constructor(service, getAdvisor = () => ({
|
|
286
|
+
state: "quiet",
|
|
287
|
+
reason: "no_change"
|
|
288
|
+
})) {
|
|
291
289
|
this.service = service;
|
|
290
|
+
this.getAdvisor = getAdvisor;
|
|
292
291
|
}
|
|
293
292
|
async getSnapshot(locale) {
|
|
294
|
-
const agents = await listGatewayAgents(
|
|
293
|
+
const agents = await listGatewayAgents();
|
|
295
294
|
const defaultAgent = agents.agents.find((agent) => agent.id === agents.defaultId) ?? agents.agents[0];
|
|
296
295
|
const workflowRunStore = this.service.createWorkflowRunService().createRunStore(defaultAgent?.id ?? agents.defaultId);
|
|
297
296
|
const nowMs = Date.now();
|
|
@@ -367,46 +366,26 @@ var HomeQueryService = class {
|
|
|
367
366
|
}))].sort((left, right) => right.updatedAt - left.updatedAt);
|
|
368
367
|
const governed = this.#attentionGovernor.project({
|
|
369
368
|
decisions: decisionCandidates,
|
|
370
|
-
attention: attentionCandidates
|
|
371
|
-
proactiveEnabled: getRelationshipSettings().proactiveEnabled
|
|
369
|
+
attention: attentionCandidates
|
|
372
370
|
});
|
|
373
371
|
const decisions = governed.decisions;
|
|
374
372
|
const attention = governed.attention;
|
|
375
|
-
const interactiveDecisions = decisions.filter((item) => item.kind !== "agent_judgment" || item.judgment?.attentionKind === "decision");
|
|
376
|
-
const proactiveInformation = decisions.filter((item) => item.kind === "agent_judgment" && item.judgment?.attentionKind !== "decision");
|
|
377
|
-
const workbench = buildHomeWorkbench({
|
|
378
|
-
locale,
|
|
379
|
-
decisions: interactiveDecisions,
|
|
380
|
-
attention,
|
|
381
|
-
activeWorkflowRuns,
|
|
382
|
-
runningTasks: tasks.filter((task) => {
|
|
383
|
-
const state = this.#projector.project(task).operationalState;
|
|
384
|
-
return state === "queued" || state === "running" || state === "verifying";
|
|
385
|
-
}),
|
|
386
|
-
scheduled: upcomingAutomations,
|
|
387
|
-
nowMs
|
|
388
|
-
});
|
|
389
|
-
const informationItems = proactiveInformation.map((item) => ({
|
|
390
|
-
id: item.id,
|
|
391
|
-
kind: "insight",
|
|
392
|
-
title: item.title,
|
|
393
|
-
summary: item.detail ?? item.judgment.recommendation,
|
|
394
|
-
recommendation: item.judgment.recommendation,
|
|
395
|
-
updatedAt: item.updatedAt,
|
|
396
|
-
openAction: {
|
|
397
|
-
type: "review_judgment",
|
|
398
|
-
label: locale?.startsWith("zh") ? "查看" : "Review",
|
|
399
|
-
itemId: item.judgment.inboxItemId
|
|
400
|
-
},
|
|
401
|
-
secondaryActions: []
|
|
402
|
-
}));
|
|
403
|
-
const background = [...informationItems, ...workbench.background].sort((left, right) => right.updatedAt - left.updatedAt).slice(0, 3);
|
|
404
373
|
return {
|
|
405
|
-
...
|
|
406
|
-
|
|
407
|
-
|
|
374
|
+
...buildHomeWorkbench({
|
|
375
|
+
locale,
|
|
376
|
+
decisions,
|
|
377
|
+
attention,
|
|
378
|
+
activeWorkflowRuns,
|
|
379
|
+
runningTasks: tasks.filter((task) => {
|
|
380
|
+
const state = this.#projector.project(task).operationalState;
|
|
381
|
+
return state === "queued" || state === "running" || state === "verifying";
|
|
382
|
+
}),
|
|
383
|
+
scheduled: upcomingAutomations,
|
|
384
|
+
nowMs
|
|
385
|
+
}),
|
|
408
386
|
runningConversations,
|
|
409
387
|
decisions,
|
|
388
|
+
advisor: this.getAdvisor(),
|
|
410
389
|
attentionPolicy: governed.policy
|
|
411
390
|
};
|
|
412
391
|
}
|
|
@@ -3,11 +3,12 @@ import { verifiedTaskCriteria } from "../../packages/gateway-contract/src/tasks.
|
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
5
5
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
6
|
-
import "../storage/sqlite/index.js";
|
|
6
|
+
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
7
7
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
8
8
|
import { TaskContextRepository } from "./task-context-repository.js";
|
|
9
9
|
//#region src/tasks/task-context-assembler.ts
|
|
10
10
|
init_src();
|
|
11
|
+
init_sqlite();
|
|
11
12
|
init_task_repository();
|
|
12
13
|
init_task_run_repository();
|
|
13
14
|
const STANDARD = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ActorRef, TaskAuthorityGrant, TaskContextEdge, TaskContextRole } from '@xopcai/gateway-contract';
|
|
2
2
|
export declare class TaskContextRepository {
|
|
3
3
|
captureSnapshot(input: {
|
|
4
|
-
ownerKind: 'task_run' | 'task' | 'session'
|
|
4
|
+
ownerKind: 'task_run' | 'task' | 'session';
|
|
5
5
|
ownerId: string;
|
|
6
6
|
query: string;
|
|
7
7
|
selectedItems?: unknown[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type Config } from '../config/schema.js';
|
|
2
1
|
import { type TaskContractDefinition } from './task-contract-definition.js';
|
|
3
2
|
export interface TaskContractPlanningInput {
|
|
4
3
|
objective: string;
|
|
@@ -11,7 +10,5 @@ export interface TaskContractPlanner {
|
|
|
11
10
|
}
|
|
12
11
|
export declare function parseTaskContractResponse(raw: string): TaskContractDefinition | undefined;
|
|
13
12
|
export declare class ModelTaskContractPlanner implements TaskContractPlanner {
|
|
14
|
-
private readonly getConfig;
|
|
15
|
-
constructor(getConfig: () => Config);
|
|
16
13
|
plan(input: TaskContractPlanningInput): Promise<TaskContractDefinition>;
|
|
17
14
|
}
|
|
@@ -46,13 +46,10 @@ function parseTaskContractResponse(raw) {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
var ModelTaskContractPlanner = class {
|
|
49
|
-
constructor(getConfig) {
|
|
50
|
-
this.getConfig = getConfig;
|
|
51
|
-
}
|
|
52
49
|
async plan(input) {
|
|
53
50
|
const fallback = defineTaskContract(input.objective);
|
|
54
51
|
try {
|
|
55
|
-
const model = resolveModel(getAgentDefaultModelRef(
|
|
52
|
+
const model = resolveModel(getAgentDefaultModelRef());
|
|
56
53
|
const planned = parseTaskContractResponse(extractText((await completeWithResolvedCredentials(model, { messages: [{
|
|
57
54
|
role: "user",
|
|
58
55
|
content: [
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Config } from '../config/schema.js';
|
|
2
1
|
import type { SessionIndex } from '../session/index.js';
|
|
3
2
|
import { type TaskConversationState, type TaskHandoffSnapshot } from './task-conversation-repository.js';
|
|
4
3
|
import { type TaskAggregate } from './task-repository.js';
|
|
@@ -15,7 +14,6 @@ export declare class TaskHandoffService {
|
|
|
15
14
|
#private;
|
|
16
15
|
private readonly deps;
|
|
17
16
|
constructor(deps: {
|
|
18
|
-
getConfig: () => Config;
|
|
19
17
|
sessionIndex: SessionIndex;
|
|
20
18
|
getActiveRunId: (conversationId: string) => string | undefined;
|
|
21
19
|
abortRun: (runId: string) => Promise<unknown>;
|
|
@@ -2,7 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
5
|
-
import {
|
|
5
|
+
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
6
|
+
import { init_agent_scope, listAgentEntries } from "../agent/agent-scope.js";
|
|
6
7
|
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
7
8
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
8
9
|
import { TaskContextRepository } from "./task-context-repository.js";
|
|
@@ -28,9 +29,8 @@ var TaskHandoffService = class {
|
|
|
28
29
|
return pending;
|
|
29
30
|
}
|
|
30
31
|
async performHandoff(input) {
|
|
31
|
-
const config = this.deps.getConfig();
|
|
32
32
|
const toAgentId = normalizeAgentId(input.toAgentId);
|
|
33
|
-
if (!listAgentEntries(
|
|
33
|
+
if (!listAgentEntries().find((entry) => entry.enabled !== false && normalizeAgentId(entry.id) === toAgentId)) throw new Error(`Agent not found: ${toAgentId}`);
|
|
34
34
|
const tasks = new TaskRepository();
|
|
35
35
|
const task = tasks.require(input.taskId);
|
|
36
36
|
const conversations = new TaskConversationRepository();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getSqliteDatabase } from "../storage/sqlite/transaction.js";
|
|
2
|
-
import "../storage/sqlite/index.js";
|
|
2
|
+
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
3
|
//#region src/tasks/task-value-metrics-service.ts
|
|
4
|
+
init_sqlite();
|
|
4
5
|
function ratio(numerator, denominator) {
|
|
5
6
|
return denominator > 0 ? numerator / denominator : 0;
|
|
6
7
|
}
|
|
@@ -3,12 +3,13 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { openXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
4
4
|
import { appendComposerInputHistory, listComposerInputHistory } from "../../storage/sqlite/composer-input-history-repository.js";
|
|
5
5
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
6
|
-
import "../../storage/sqlite/index.js";
|
|
6
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
7
|
+
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
8
|
+
import { init_agent_scope, listAgentEntries } from "../../agent/agent-scope.js";
|
|
9
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
7
10
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
8
|
-
import { init_agent_scope, listAgentEntries, normalizeAgentId } from "../../agent/agent-scope.js";
|
|
9
11
|
import { createConversation, init_conversation_repository } from "../../storage/sqlite/conversation-repository.js";
|
|
10
12
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../../routing/agent-session-key.js";
|
|
11
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
12
13
|
import { effectiveWorkspacePathForSession } from "../../session/session-workspace.js";
|
|
13
14
|
import { ProjectService } from "../../projects/project-service.js";
|
|
14
15
|
import { inferSuggestedProjectDefaultAgentId } from "../../projects/project-agent-suggestion.js";
|
|
@@ -17,10 +18,10 @@ import { buildSessionTimeline } from "../../session/transcript-outline.js";
|
|
|
17
18
|
import { transcriptRowsToClientHistory } from "../../session/client-history.js";
|
|
18
19
|
import { createCreateShareTool, isShareToolAvailable } from "../../agent/tools/create-share-tool.js";
|
|
19
20
|
import { evictEmbeddedSessionRunner } from "../../agent/embedded/session-runner.js";
|
|
20
|
-
import { setTuiDefaultAgentConfig } from "../../commands/agents.config.js";
|
|
21
21
|
import { SessionIndex } from "../../session/manager.js";
|
|
22
22
|
import "../../session/index.js";
|
|
23
23
|
import { parseModelRef } from "../../agent/models/selection.js";
|
|
24
|
+
import { loadConfig } from "../../config/loader.js";
|
|
24
25
|
import { buildReviewContext, resolveGitRoot } from "../../review/review-git.js";
|
|
25
26
|
import { MessageBus, MessageBusShutdownError } from "../../infra/bus/queue.js";
|
|
26
27
|
import "../../infra/bus/index.js";
|
|
@@ -44,6 +45,7 @@ init_conversation_repository();
|
|
|
44
45
|
init_agent_scope();
|
|
45
46
|
init_agent_session_key();
|
|
46
47
|
init_schema();
|
|
48
|
+
init_sqlite();
|
|
47
49
|
init_logger();
|
|
48
50
|
const log = createLogger("TUI:Embedded");
|
|
49
51
|
function clampHistoryWindowSpan(value, fallback) {
|
|
@@ -145,7 +147,7 @@ var EmbeddedBackend = class {
|
|
|
145
147
|
await this.refreshXopcCloudModels();
|
|
146
148
|
const { AgentService } = await import("../../agent/service.js");
|
|
147
149
|
const workspace = this.workspace || getWorkspacePath(config);
|
|
148
|
-
const modelId = getAgentDefaultModelRef(
|
|
150
|
+
const modelId = getAgentDefaultModelRef();
|
|
149
151
|
const agent = new AgentService(this.bus, {
|
|
150
152
|
workspace,
|
|
151
153
|
model: modelId,
|
|
@@ -620,9 +622,8 @@ var EmbeddedBackend = class {
|
|
|
620
622
|
}
|
|
621
623
|
}
|
|
622
624
|
async listAgents() {
|
|
623
|
-
const config = this.activeConfig();
|
|
624
625
|
const agents = /* @__PURE__ */ new Map();
|
|
625
|
-
for (const entry of listAgentEntries(
|
|
626
|
+
for (const entry of listAgentEntries()) {
|
|
626
627
|
if (entry.enabled === false) continue;
|
|
627
628
|
const id = normalizeAgentId(entry.id);
|
|
628
629
|
agents.set(id, {
|
|
@@ -633,11 +634,8 @@ var EmbeddedBackend = class {
|
|
|
633
634
|
return [...agents.values()].sort((a, b) => a.id.localeCompare(b.id));
|
|
634
635
|
}
|
|
635
636
|
async setTuiDefaultAgent(agentId) {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
await saveConfig(result.config);
|
|
639
|
-
this.config = result.config;
|
|
640
|
-
return { agentId: result.agentId };
|
|
637
|
+
new AgentCatalogService().setSurfaceDefault("tui", agentId);
|
|
638
|
+
return { agentId: agentId.trim().toLowerCase() };
|
|
641
639
|
}
|
|
642
640
|
async renameSession(conversationId, name) {
|
|
643
641
|
if (!this.agent) return { ok: false };
|
|
@@ -678,7 +676,7 @@ var EmbeddedBackend = class {
|
|
|
678
676
|
}, "", conversationId).key;
|
|
679
677
|
}
|
|
680
678
|
async getSessionInfo(conversationId) {
|
|
681
|
-
if (!this.agent) return { model: getAgentDefaultModelRef(
|
|
679
|
+
if (!this.agent) return { model: getAgentDefaultModelRef() ?? void 0 };
|
|
682
680
|
try {
|
|
683
681
|
const cfg = await this.agent.sessionInspector.agentConfig(conversationId);
|
|
684
682
|
const parsed = parseModelRef(cfg.model);
|
|
@@ -705,7 +703,7 @@ var EmbeddedBackend = class {
|
|
|
705
703
|
conversationId,
|
|
706
704
|
errorMessage
|
|
707
705
|
}, `getSessionInfo failed: ${errorMessage}`);
|
|
708
|
-
return { model: getAgentDefaultModelRef(
|
|
706
|
+
return { model: getAgentDefaultModelRef() ?? void 0 };
|
|
709
707
|
}
|
|
710
708
|
}
|
|
711
709
|
async listModels() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
4
|
-
import { loadConfig } from "../../config/loader.js";
|
|
5
4
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
5
|
+
import { loadConfig } from "../../config/loader.js";
|
|
6
6
|
import { getWorkspacePath } from "../../config/workspace-path-helpers.js";
|
|
7
7
|
import "../../config/index.js";
|
|
8
8
|
//#region src/tui/extension-host/load-extensions.ts
|