@xopcai/xopc 0.0.306 → 0.0.308
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-DLtim-_I.js → activity-store-wgSB2HYK.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-iQXtiilH.js → agent-avatar-dicebear-dUotwUO6.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-C6LflMXr.js +1 -0
- package/dist/gateway/static/root/assets/agents-VPDIGRSS.js +1 -0
- package/dist/gateway/static/root/assets/{api-DfSU0-lD.js → api-BKHmTb0w.js} +1 -1
- package/dist/gateway/static/root/assets/api-DFOlahZv.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BpYFKz7B.js → app-management-settings-panel-zPz0rOND.js} +1 -1
- package/dist/gateway/static/root/assets/appearance-settings-DhvhR43G.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-Pmslbzzr.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BxOvZ-ZX.js → archive-plugin-BQVZMreT.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-B0FzTMAJ.js → attachment-load-CPE-TMPf.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BpXuPaPg.js → automations-page-C4IAy_zF.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-Fx5VUJRu.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BP7wfpqy.js → binary-plugins-DgTl7diZ.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-oMLvdnOQ.js → block-editor-CcOVA-Gw.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DTxSZ00u.js → browser-automation-inputs-BzkJog8e.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-IbJnwEY4.js → browser-automations-page--zKAgj1k.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-DBms6d35.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-epdDWIZy.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-B0bsDtmP.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-D2AmAoty.js → channels-status-swr-B2JwuTjG.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B-yI3Mi1.js → chat-terminal-dock-BfLd2rIJ.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CWx_jnng.js → computer-settings-page-Ckgc0Py-.js} +1 -1
- package/dist/gateway/static/root/assets/connector-service-page-BlC1OXX4.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-By33-bF1.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-DMRRL4Zg.js → cron-expression-CqNE-nf6.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-BSwL0e6E.js → date-picker-BS9ZjzYJ.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BQTspLzC.js → dependency-picker-CF_zYzxX.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-C3lFxDF6.js → desktop-pet-CDwtLR7Z.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-Y8pjpXFE.js → desktop-pet-settings-C0djIc1J.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-CDKj9LQj.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-CVGiGVcR.js → extension-debug-page-CX5OXxEU.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-g3JtCP_y.js → extension-page-BytR1PaY.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CjpoKV1f.js → extension-settings-page-CkaMJA5F.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BSvXXpKM.js → gateway-config-swr-B6wHa6ZI.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BDCpS7U1.js → gateway-realtime-B53R0CA4.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BLDgrJ30.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-CYG9WCZn.js → gateway-settings-_YU-1p0z.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-Caf8g3sC.js → gateway-startup-retry-DRzGnEV-.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-Cl834-SS.js → heartbeat-settings-CVIvvm4x.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-COCHelcL.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-BwEWBUVC.js → image-generation-api-Ck_pyDom.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CoMlgSIA.js → imports-page-DrtbjL8O.js} +1 -1
- package/dist/gateway/static/root/assets/index-CDfcPiPb.js +79 -0
- package/dist/gateway/static/root/assets/index-CRu1p38D.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CNq5D4pe.js → keyboard-shortcuts-settings-BlZh41Xq.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-D7_Raxjw.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DQnRA598.js → local-apps-page-DbP7wWuh.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-D16nmbaN.js → locale-store-msTfRK8P.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-C0n66FiO.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-DKcO5fQ-.js → management-settings-i6GhxpGV.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DCp4BlZP.js → markdown-view-BInabSKf.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Cy64sn_C.js → media-plugins-CnWChQ3Y.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-C-9oo69N.js → messages-F74LVAiU.js} +3 -3
- package/dist/gateway/static/root/assets/note-detail-panel-C59d8vDW.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-C1GBPrVI.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-CgEoHSVT.js → page-tabs-BWitjb3e.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Ck2uKTbf.js → preview-open-alternatives-UaCWCxZv.js} +1 -1
- package/dist/gateway/static/root/assets/{proactive-page-Dr1mCJhZ.js → proactive-page-CtSFJxoM.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-DbZvJ5GE.js → product-open-page-gmi5LLwM.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-ILTmQ1YN.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-snl4rOQZ.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DcQdwpPu.js → registry-api-BSWtko7U.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BbaAcEN3.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CPwdgWKo.js → runtime-tools-settings-panel-CtOjKGWg.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-8psK4cFO.js → schema-form-DkyyDcl2.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-DrWL71O8.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BG0kl4HT.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-D_Gsz5rl.js → settings-form-section-C0JDGN_V.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C_Tj_mkZ.js → settings-page-DiIyMQ52.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-EPazhoZO.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-B_M_oPsT.js → share-preview-page-Bt1K657Y.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-g2MdRXSZ.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-B1DPzu98.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-Wd0uYSPG.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-Cuh6s2HM.js → skills-page.utils-vq5Ujm03.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-aassGyNb.js → system-settings-panel-Cz1P-HDH.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-BG3A5gPZ.js +1 -0
- package/dist/gateway/static/root/assets/theme-store-1SZ-HFHX.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-DJYcPWIV.js → tunnel-api-DQGoFuZO.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-QGYG7oMZ.js → use-autosave-DVDlBb95.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-qM5UiTGx.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-D1s0gIRW.js → voice-api-key-field-B2pZCcxY.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-D2goEn5e.js → voice-config-api-DgJML_uM.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DkFW9aJ6.js → work-discovery-overlay-Bptv7bEY.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BYToUPUY.js → workflow-run-setup-panel-BijCrNc4.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DRy1RAYH.js +6 -0
- package/dist/gateway/static/root/channel-icons/feishu.svg +6 -12
- package/dist/gateway/static/root/connector-icons/SOURCES.md +12 -0
- package/dist/gateway/static/root/connector-icons/dingtalk-mark.svg +1 -0
- package/dist/gateway/static/root/connector-icons/tencent-meeting-mark.svg +37 -0
- package/dist/gateway/static/root/connector-icons/wps-calendar.svg +14 -0
- package/dist/gateway/static/root/connector-icons/wps-docs.svg +14 -0
- package/dist/gateway/static/root/connector-icons/wps-mail.svg +7 -0
- package/dist/gateway/static/root/index.html +12 -12
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/notifications.js +1 -1
- package/dist/src/agent/background-review/prompts.js +3 -1
- package/dist/src/agent/context/execution-context.js +4 -4
- package/dist/src/agent/external-tools/composio-provider.js +83 -20
- package/dist/src/agent/external-tools/gateway-tools.js +2 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +1 -1
- package/dist/src/agent/memory/compaction-promotion.d.ts +1 -1
- package/dist/src/agent/memory/compaction-promotion.js +4 -3
- package/dist/src/agent/tools/knowledge-memory-tool.d.ts +1 -1
- package/dist/src/agent/tools/knowledge-memory-tool.js +3 -3
- package/dist/src/agent/tools/user-context-tool.js +17 -7
- package/dist/src/chat-commands/builtins/understanding.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/config/schema.d.ts +14 -4
- package/dist/src/config/schema.js +6 -4
- package/dist/src/connectors/account-access.d.ts +4 -0
- package/dist/src/connectors/account-access.js +23 -0
- package/dist/src/connectors/approval-resume.d.ts +4 -0
- package/dist/src/connectors/approval-resume.js +23 -0
- package/dist/src/connectors/auth-provider-registry.d.ts +1 -0
- package/dist/src/connectors/auth-provider-registry.js +2 -1
- package/dist/src/connectors/authorization-attempts.d.ts +21 -0
- package/dist/src/connectors/authorization-attempts.js +33 -0
- package/dist/src/connectors/builtin-catalog.js +1 -3
- package/dist/src/connectors/catalog.js +2 -1
- package/dist/src/connectors/china-catalog.d.ts +2 -0
- package/dist/src/connectors/china-catalog.js +430 -0
- package/dist/src/connectors/composio-backends.d.ts +26 -0
- package/dist/src/connectors/composio-backends.js +65 -0
- package/dist/src/connectors/composio-catalog.js +2 -1
- package/dist/src/connectors/composio-managed-client.js +3 -1
- package/dist/src/connectors/composio-managed-events.js +5 -2
- package/dist/src/connectors/composio-session-types.d.ts +2 -0
- package/dist/src/connectors/composio-sessions.d.ts +11 -2
- package/dist/src/connectors/composio-sessions.js +137 -35
- package/dist/src/connectors/composio-triggers.js +4 -2
- package/dist/src/connectors/composio.d.ts +11 -8
- package/dist/src/connectors/composio.js +68 -84
- package/dist/src/connectors/connected-source-ingestion.js +4 -3
- package/dist/src/connectors/connected-source-understanding.d.ts +1 -0
- package/dist/src/connectors/connected-source-understanding.js +1 -0
- package/dist/src/connectors/connection-recovery-service.js +25 -13
- package/dist/src/connectors/connector-identity.d.ts +2 -0
- package/dist/src/connectors/connector-identity.js +18 -5
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/instances.js +1 -7
- package/dist/src/connectors/learning-coordinator.js +35 -12
- package/dist/src/connectors/materialize.js +14 -1
- package/dist/src/connectors/policy.d.ts +1 -1
- package/dist/src/connectors/policy.js +1 -1
- package/dist/src/connectors/principal.js +24 -3
- package/dist/src/connectors/providers.d.ts +1 -0
- package/dist/src/connectors/providers.js +14 -2
- package/dist/src/connectors/runtime-adapter-registry.js +4 -9
- package/dist/src/connectors/secret-store.d.ts +4 -1
- package/dist/src/connectors/secret-store.js +7 -3
- package/dist/src/connectors/source-change-publisher.js +4 -2
- package/dist/src/connectors/types.d.ts +16 -11
- package/dist/src/connectors/workflow-preflight.d.ts +2 -1
- package/dist/src/connectors/workflow-preflight.js +20 -3
- package/dist/src/gateway/hono/lib/config-payload.d.ts +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +207 -16
- package/dist/src/gateway/hono/routes/context-sources.js +1 -24
- package/dist/src/gateway/hono/routes/home.js +4 -1
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/local-apps.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +8 -0
- package/dist/src/gateway/hono/routes/update.js +2 -2
- package/dist/src/gateway/hono/routes/user-model-refresh.d.ts +5 -0
- package/dist/src/gateway/hono/routes/user-model-refresh.js +128 -0
- package/dist/src/gateway/hono/routes/user-model.js +12 -5
- package/dist/src/gateway/hono/routes/work-discovery.js +0 -30
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/service.js +6 -6
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge-memory/index.js +2 -2
- package/dist/src/knowledge-memory/repository.d.ts +7 -0
- package/dist/src/knowledge-memory/repository.js +58 -8
- package/dist/src/memory-maintenance/service.js +61 -31
- package/dist/src/migrations/memory-config.d.ts +2 -0
- package/dist/src/migrations/memory-config.js +77 -0
- package/dist/src/migrations/runner.js +2 -2
- package/dist/src/notifications/planner.js +5 -5
- package/dist/src/notifications/service.d.ts +2 -2
- package/dist/src/notifications/service.js +1 -1
- package/dist/src/proactive/follow-ups.js +2 -1
- package/dist/src/storage/sqlite/connection-wait-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/connection-wait-repository.js +63 -2
- package/dist/src/storage/sqlite/connector-account-repository.d.ts +6 -0
- package/dist/src/storage/sqlite/connector-account-repository.js +35 -7
- package/dist/src/storage/sqlite/connector-repository.js +15 -10
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +1 -1
- package/dist/src/storage/sqlite/index.js +4 -2
- package/dist/src/storage/sqlite/migrations/182_connector_account_policies.sql +92 -0
- package/dist/src/storage/sqlite/migrations/183_connector_backend_consistency.sql +20 -0
- package/dist/src/storage/sqlite/migrations/184_memory_suppressions.sql +12 -0
- package/dist/src/storage/sqlite/migrations/185_understanding_refresh_batches.sql +6 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +7 -7
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/home-query-service.js +3 -3
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/user-context/config.d.ts +4 -9
- package/dist/src/user-context/config.js +7 -27
- package/dist/src/user-context/memory-suppression.d.ts +7 -0
- package/dist/src/user-context/memory-suppression.js +23 -0
- package/dist/src/user-context/relationship-continuity.js +1 -1
- package/dist/src/user-context/sources/refresh-service.d.ts +48 -0
- package/dist/src/user-context/sources/refresh-service.js +221 -0
- package/dist/src/user-context/sources/repository.js +1 -1
- package/dist/src/user-model/bootstrap.js +27 -24
- package/dist/src/user-model/capture/executor.d.ts +1 -1
- package/dist/src/user-model/capture/executor.js +17 -11
- package/dist/src/user-model/capture/semantic.js +1 -1
- package/dist/src/user-model/domain.d.ts +6 -2
- package/dist/src/user-model/index.js +3 -3
- package/dist/src/user-model/profile.js +1 -1
- package/dist/src/user-model/repository.d.ts +4 -1
- package/dist/src/user-model/repository.js +96 -6
- package/dist/src/user-model/usage-policy.d.ts +2 -0
- package/dist/src/user-model/usage-policy.js +6 -2
- package/dist/src/work-discovery/project-understanding.js +2 -1
- package/dist/src/work-discovery/service.d.ts +8 -24
- package/dist/src/work-discovery/service.js +138 -180
- package/dist/src/workflows/domain/definition.d.ts +1 -0
- package/dist/src/workflows/domain/validation.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +14 -0
- package/dist/src/workflows/service/workflow-session-bridge.d.ts +1 -0
- package/dist/src/workflows/service/workflow-session-bridge.js +1 -0
- package/package.json +5 -5
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CxOv4ivK.js +0 -1
- package/dist/gateway/static/root/assets/agents-DzKx7z3k.js +0 -1
- package/dist/gateway/static/root/assets/api-gpHh07OL.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-BQfR5vrq.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BceB7JHZ.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-Cn_p8zY_.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CCUO3G23.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BjMb5H2_.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-P22-_i13.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BLgPORmH.js +0 -2
- package/dist/gateway/static/root/assets/device-pairing-wizard-DM4_GMzo.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BGmP1obI.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CB_XVtIM.js +0 -1
- package/dist/gateway/static/root/assets/index-CI37dTAn.css +0 -1
- package/dist/gateway/static/root/assets/index-Do9MltC4.js +0 -79
- package/dist/gateway/static/root/assets/local-app-workbench-page-BxQlEje6.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CT5GrcMs.js +0 -2
- package/dist/gateway/static/root/assets/note-detail-panel-5dc3LKTL.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-AbwxgXuG.js +0 -8
- package/dist/gateway/static/root/assets/project-detail-page-DnE1zI1c.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BD0nLYxk.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-TYuE6A3S.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-BcWDQQFX.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DzGQX6Hq.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CE2X89qN.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BL4H9Iym.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-WMKIgUOp.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-DYgwzl5B.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-BjeRslap.js +0 -1
- package/dist/gateway/static/root/assets/theme-store-RUBQBsFP.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-PrRsd4go.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-Z8iZe9YP.js +0 -6
- package/dist/src/migrations/knowledge-memory-read-policy-config.d.ts +0 -2
- package/dist/src/migrations/knowledge-memory-read-policy-config.js +0 -48
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260910-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260910-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-CDfcPiPb.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/x-B_N4OPjy.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-F74LVAiU.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-msTfRK8P.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/schemas-BaskVM5g.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-CCC4FJ3Y.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/app-link-BiBXVEvp.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-BInabSKf.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="/assets/dist-Che_jiQF.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="/assets/loader-circle-CifKLtgG.js">
|
|
48
48
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-
|
|
50
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-
|
|
49
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-BLDgrJ30.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-B53R0CA4.js">
|
|
51
51
|
<link rel="modulepreload" crossorigin href="/assets/files-Be5viEFY.js">
|
|
52
52
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-BtJkgjFf.js">
|
|
53
53
|
<link rel="modulepreload" crossorigin href="/assets/button-CS04eWY9.js">
|
|
54
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
55
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-
|
|
56
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-
|
|
54
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-DRzGnEV-.js">
|
|
55
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-BSWtko7U.js">
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-B6wHa6ZI.js">
|
|
57
57
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-Dit0bHgy.js">
|
|
58
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
59
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
58
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-wgSB2HYK.js">
|
|
59
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-1SZ-HFHX.js">
|
|
60
60
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-Y68dCxuc.css">
|
|
61
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
61
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CRu1p38D.css">
|
|
62
62
|
</head>
|
|
63
63
|
<body>
|
|
64
64
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -58,7 +58,7 @@ var init_notifications = __esmMin((() => {
|
|
|
58
58
|
"automation.completed",
|
|
59
59
|
"automation.failed",
|
|
60
60
|
"proactive.insight",
|
|
61
|
-
"work_discovery.
|
|
61
|
+
"work_discovery.completed",
|
|
62
62
|
"work_discovery.failed"
|
|
63
63
|
]);
|
|
64
64
|
NotificationLocalizedTextSchema = z.object({
|
|
@@ -40,7 +40,9 @@ Rules:
|
|
|
40
40
|
- Set selfContained=false and list unresolvedReferences for unresolved pronouns or references.
|
|
41
41
|
- Omit temporary reactions and one-off task instructions.
|
|
42
42
|
- Never include passwords, credentials, regulated identifiers, or speculative diagnoses.
|
|
43
|
-
-
|
|
43
|
+
- Use user_explicit only for a fact or preference the user directly states, user_observed for repeated behavior, and system_inferred for synthesis. No separate remember command is required for an ordinary direct statement.
|
|
44
|
+
- A project-specific choice stays scoped to that project. Do not generalize it into a global preference.
|
|
45
|
+
- Existing memory, assistant output, repeated summaries, and lack of objection are not new supporting evidence.
|
|
44
46
|
- If evidence is insufficient, return candidates=[] and explain abstentionReason.
|
|
45
47
|
${targets}`;
|
|
46
48
|
}
|
|
@@ -5,7 +5,7 @@ import "../../knowledge-memory/index.js";
|
|
|
5
5
|
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
6
6
|
import { calculateExecutionValue } from "../../user-model/importance.js";
|
|
7
7
|
import { listUserAssertions } from "../../user-model/repository.js";
|
|
8
|
-
import {
|
|
8
|
+
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
9
9
|
import { getExecutionContextFeedbackScores } from "./audit.js";
|
|
10
10
|
import { buildUserContextBlock } from "../memory/context-fence.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
@@ -63,7 +63,7 @@ function rankAssertion(assertion, query, asOf, feedbackScore) {
|
|
|
63
63
|
].filter(Boolean);
|
|
64
64
|
return {
|
|
65
65
|
assertion,
|
|
66
|
-
usage: assertion.
|
|
66
|
+
usage: assertion.authority === "user_explicit" ? "confirmed" : "working_assumption",
|
|
67
67
|
score: assertion.status === "candidate" ? score - .05 : score,
|
|
68
68
|
reasons
|
|
69
69
|
};
|
|
@@ -125,7 +125,7 @@ function buildExecutionContext(request) {
|
|
|
125
125
|
const rankedAssertions = includeUserModel ? listUserAssertions({
|
|
126
126
|
statuses: ["active", "candidate"],
|
|
127
127
|
limit: 1e3
|
|
128
|
-
}).filter((item) => scopeVisible(getAssertionScope(item.slotId), request)).filter((item) => applicabilityVisible(item.applicability, request)).filter((item) => (item
|
|
128
|
+
}).filter((item) => scopeVisible(getAssertionScope(item.slotId), request)).filter((item) => applicabilityVisible(item.applicability, request)).filter((item) => canUseAssertion(item, asOf)).map((item) => rankAssertion(item, request.query, asOf, feedbackScores.get(`assertion:${item.id}`) ?? 0)).filter((item) => item.score >= .12 || item.reasons.includes("high_consequence")).sort((left, right) => right.score - left.score) : [];
|
|
129
129
|
const assertions = [...rankedAssertions.filter((item) => item.usage === "confirmed"), ...rankedAssertions.filter((item) => item.usage === "working_assumption")].slice(0, assertionLimit);
|
|
130
130
|
const maxKnowledge = Math.max(0, Math.min(100, request.maxKnowledge ?? 12));
|
|
131
131
|
const knowledge = request.includeKnowledge === false || maxKnowledge === 0 ? [] : searchKnowledgeItems({
|
|
@@ -165,7 +165,7 @@ function renderExecutionContext(context) {
|
|
|
165
165
|
const confirmedAssertions = context.assertions.filter((item) => item.usage === "confirmed");
|
|
166
166
|
const workingAssumptions = context.assertions.filter((item) => item.usage === "working_assumption");
|
|
167
167
|
if (confirmedAssertions.length) sections.push(`Confirmed user context:\n${confirmedAssertions.map((item) => `- ${item.assertion.statement}`).join("\n")}`);
|
|
168
|
-
if (workingAssumptions.length) sections.push(`Working assumptions (may be wrong; adapt quietly, never present them as confirmed facts, and accept corrections immediately):\n${workingAssumptions.map((item) => `- ${item.assertion.statement} (confidence ${item.assertion.confidence.toFixed(2)})`).join("\n")}`);
|
|
168
|
+
if (workingAssumptions.length) sections.push(`Working assumptions (may be wrong; never authorize actions; current user instructions take precedence; adapt quietly, never present them as confirmed facts, and accept corrections immediately):\n${workingAssumptions.map((item) => `- ${item.assertion.statement} (confidence ${item.assertion.confidence.toFixed(2)})`).join("\n")}`);
|
|
169
169
|
const confirmedGoals = context.goals.filter((goal) => goal.usage === "confirmed");
|
|
170
170
|
const assumedGoals = context.goals.filter((goal) => goal.usage === "working_assumption");
|
|
171
171
|
if (confirmedGoals.length) sections.push(`Confirmed goals:\n${confirmedGoals.map((goal) => `- ${goal.title}: ${goal.desiredOutcome}`).join("\n")}`);
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getSessionInputState, init_session_input_repository } from "../../storage/sqlite/session-input-repository.js";
|
|
4
|
+
import { getConnectorAccount } from "../../storage/sqlite/connector-account-repository.js";
|
|
5
|
+
import { consumeConnectorApproval, createConnectorApproval, getConnectorApproval, getConnectorConnection, getConnectorInstallation, listConnectorActionMetadata, listConnectorConnections, listConnectorInstallations, upsertConnectorActionMetadata, upsertConnectorInstallation } from "../../storage/sqlite/connector-repository.js";
|
|
6
|
+
import { bindObjectiveAccount, connectionBinding, connectionBindings, connectorObjectiveScope, init_connection_wait_repository, publishConnectionWait, requireSessionConnection } from "../../storage/sqlite/connection-wait-repository.js";
|
|
5
7
|
import "../../storage/sqlite/index.js";
|
|
6
8
|
import { connectorArgumentsHash, connectorArgumentsPreview } from "../../connectors/approval.js";
|
|
9
|
+
import { connectorIdentitySummary } from "../../connectors/connector-identity.js";
|
|
10
|
+
import { canAccessConnectorAccount, currentAccountConnections } from "../../connectors/account-access.js";
|
|
7
11
|
import { ComposioSessionsAdapter } from "../../connectors/composio-sessions.js";
|
|
8
12
|
import { getComposioToolkitScope, getConfiguredComposioAuthConfigs, isComposioActionAllowedByCatalog, scopeForComposioAction } from "../../connectors/composio.js";
|
|
9
13
|
import { getConnectorDefinition } from "../../connectors/catalog.js";
|
|
14
|
+
import { listConnectorInstances } from "../../connectors/instances.js";
|
|
10
15
|
import { isToolInputSchema } from "../../connectors/connection-capabilities.js";
|
|
11
16
|
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
12
17
|
import { ExternalToolSearchError } from "./search-error.js";
|
|
13
18
|
import { externalToolRef, parseExternalToolRef } from "./refs.js";
|
|
14
19
|
//#region src/agent/external-tools/composio-provider.ts
|
|
20
|
+
init_session_input_repository();
|
|
15
21
|
init_connection_wait_repository();
|
|
16
22
|
init_logger();
|
|
17
|
-
const CONNECTION_ARGUMENT = "
|
|
23
|
+
const CONNECTION_ARGUMENT = "xopcAccountId";
|
|
18
24
|
const log = createLogger("ComposioToolProvider");
|
|
19
25
|
function textResult(value) {
|
|
20
26
|
return {
|
|
@@ -62,7 +68,7 @@ function syncLocalOwnerInstallations(config) {
|
|
|
62
68
|
allowedAgentIds: existing?.allowedAgentIds ?? [],
|
|
63
69
|
maxScope: existing?.maxScope ?? getComposioToolkitScope(config, toolkit),
|
|
64
70
|
confirmationPolicy: existing?.confirmationPolicy ?? "writes",
|
|
65
|
-
|
|
71
|
+
selectedAccountIds: existing?.selectedAccountIds ?? null,
|
|
66
72
|
createdAt: existing?.createdAt
|
|
67
73
|
});
|
|
68
74
|
}
|
|
@@ -98,6 +104,7 @@ function actionInputSchema(action) {
|
|
|
98
104
|
if (!isToolInputSchema(action.inputSchema)) throw new Error(`Exact input contract is unavailable for ${action.actionId}`);
|
|
99
105
|
const schema = action.inputSchema;
|
|
100
106
|
const properties = schema.properties && typeof schema.properties === "object" && !Array.isArray(schema.properties) ? schema.properties : {};
|
|
107
|
+
if (Object.hasOwn(properties, CONNECTION_ARGUMENT)) throw new Error("The provider contract conflicts with the reserved account selector.");
|
|
101
108
|
return {
|
|
102
109
|
...schema,
|
|
103
110
|
type: "object",
|
|
@@ -105,7 +112,7 @@ function actionInputSchema(action) {
|
|
|
105
112
|
...properties,
|
|
106
113
|
[CONNECTION_ARGUMENT]: {
|
|
107
114
|
type: "string",
|
|
108
|
-
description: "
|
|
115
|
+
description: "Stable local account ID. Required when this objective uses multiple accounts. Never guess an account."
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
118
|
};
|
|
@@ -190,13 +197,22 @@ var ComposioToolProvider = class {
|
|
|
190
197
|
const action = listConnectorActionMetadata(resolved.installation.connectorId).find((candidate) => candidate.actionId === resolved.actionId);
|
|
191
198
|
if (!action || !isToolInputSchema(action.inputSchema) || !isComposioActionAllowedByCatalog(action.actionId)) return void 0;
|
|
192
199
|
const summary = `Run ${action.actionId} in ${toolkit}.`;
|
|
200
|
+
const available = this.availableInstallations();
|
|
201
|
+
const accounts = currentAccountConnections(listConnectorConnections({
|
|
202
|
+
principalId: available.principalId,
|
|
203
|
+
connectorId: resolved.installation.connectorId
|
|
204
|
+
}).filter((connection) => canAccessConnectorAccount(connection, resolved.installation, available.agentId))).map((connection) => ({
|
|
205
|
+
accountId: connection.accountId,
|
|
206
|
+
label: getConnectorAccount(connection.accountId)?.label,
|
|
207
|
+
identity: connectorIdentitySummary(connection.identity)
|
|
208
|
+
}));
|
|
193
209
|
return {
|
|
194
210
|
toolRef,
|
|
195
211
|
source: this.source,
|
|
196
212
|
namespace: toolkit,
|
|
197
213
|
title: action.actionId,
|
|
198
214
|
summary,
|
|
199
|
-
description: summary
|
|
215
|
+
description: `${summary} Available accounts: ${JSON.stringify(accounts)}. Use xopcAccountId to select one; never guess when the user's intent is ambiguous.`,
|
|
200
216
|
inputSchema: actionInputSchema(action)
|
|
201
217
|
};
|
|
202
218
|
}
|
|
@@ -220,19 +236,20 @@ var ComposioToolProvider = class {
|
|
|
220
236
|
const refreshed = await this.adapter.refreshConnection(expired);
|
|
221
237
|
fresh = fresh.map((item) => item.id === refreshed.id ? refreshed : item);
|
|
222
238
|
}
|
|
223
|
-
const connections = listConnectorConnections({
|
|
239
|
+
const connections = currentAccountConnections(listConnectorConnections({
|
|
224
240
|
principalId: available.principalId,
|
|
225
241
|
connectorId: resolved.installation.connectorId
|
|
226
|
-
}).filter((connection) => connection.status === "active" && fresh.some((item) => item.id === connection.id) && (
|
|
227
|
-
const
|
|
242
|
+
}).filter((connection) => connection.status === "active" && fresh.some((item) => item.id === connection.id) && canAccessConnectorAccount(connection, resolved.installation, available.agentId)));
|
|
243
|
+
const boundConnection = available.context ? connectionBinding(available.context.conversationId, resolved.installation.connectorId) : void 0;
|
|
244
|
+
const requestedAccount = typeof executionArgs[CONNECTION_ARGUMENT] === "string" ? executionArgs[CONNECTION_ARGUMENT] : boundConnection ? getConnectorConnection(boundConnection)?.accountId : void 0;
|
|
228
245
|
const bindings = available.context ? connectionBindings(available.context.conversationId).filter((need) => need.connectorId === resolved.installation.connectorId) : [];
|
|
229
|
-
if (bindings.length > 1 && !
|
|
246
|
+
if (bindings.length > 1 && !requestedAccount) return textResult({
|
|
230
247
|
status: "account_selection_required",
|
|
231
248
|
accounts: bindings,
|
|
232
|
-
instruction: "Choose the account for this operation using
|
|
249
|
+
instruction: "Choose the account for this operation using xopcAccountId."
|
|
233
250
|
});
|
|
234
|
-
if (bindings.length &&
|
|
235
|
-
const connection =
|
|
251
|
+
if (bindings.length && requestedAccount && !bindings.some((need) => need.accountId === requestedAccount)) return textResult("This account was not selected for the current objective.");
|
|
252
|
+
const connection = requestedAccount ? connections.find((candidate) => candidate.accountId === requestedAccount) : connections.length === 1 ? connections[0] : void 0;
|
|
236
253
|
const requestConnection = () => {
|
|
237
254
|
if (!available.context) return textResult({ status: "connection_required" });
|
|
238
255
|
const result = requireSessionConnection({
|
|
@@ -243,7 +260,7 @@ var ComposioToolProvider = class {
|
|
|
243
260
|
needs: [{
|
|
244
261
|
key: `${resolved.installation.connectorId}:default`,
|
|
245
262
|
connectorId: resolved.installation.connectorId,
|
|
246
|
-
|
|
263
|
+
accountId: requestedAccount,
|
|
247
264
|
label: getConnectorDefinition(resolved.installation.connectorId)?.displayName ?? toolkit,
|
|
248
265
|
capabilities: [action.actionId]
|
|
249
266
|
}]
|
|
@@ -252,13 +269,18 @@ var ComposioToolProvider = class {
|
|
|
252
269
|
return textResult(result);
|
|
253
270
|
};
|
|
254
271
|
if (!connection) return requestConnection();
|
|
272
|
+
if (available.context && connection.accountId) bindObjectiveAccount(available.context.conversationId, resolved.installation.connectorId, connection.accountId);
|
|
255
273
|
const actionArgs = { ...executionArgs };
|
|
256
274
|
delete actionArgs[CONNECTION_ARGUMENT];
|
|
257
|
-
const argsHash = connectorArgumentsHash(
|
|
275
|
+
const argsHash = connectorArgumentsHash({
|
|
276
|
+
args: actionArgs,
|
|
277
|
+
accountId: connection.accountId,
|
|
278
|
+
objective: available.context ? connectorObjectiveScope(available.context.conversationId) : void 0
|
|
279
|
+
});
|
|
258
280
|
let confirmed = false;
|
|
259
281
|
if (approvalId) {
|
|
260
282
|
const pending = getConnectorApproval(approvalId);
|
|
261
|
-
if (!pending || pending.principalId !== available.principalId || pending.connectorId !== resolved.installation.connectorId || pending.actionId !== action.actionId || pending.conversationId !== available.context?.conversationId) return textResult("The connector approval is invalid for this session or action.");
|
|
283
|
+
if (!pending || pending.principalId !== available.principalId || pending.connectorId !== resolved.installation.connectorId || pending.actionId !== action.actionId || pending.conversationId !== available.context?.conversationId || pending.agentId !== available.agentId || !pending.connectionId || getConnectorConnection(pending.connectionId)?.accountId !== connection.accountId) return textResult("The connector approval is invalid for this session or action.");
|
|
262
284
|
confirmed = Boolean(consumeConnectorApproval(approvalId, argsHash));
|
|
263
285
|
if (!confirmed) return textResult("The connector approval is not approved, has expired, or was already used.");
|
|
264
286
|
}
|
|
@@ -286,7 +308,22 @@ var ComposioToolProvider = class {
|
|
|
286
308
|
throw error;
|
|
287
309
|
}
|
|
288
310
|
if (result.decision === "confirmation_required") {
|
|
311
|
+
const wait = available.context && getSessionInputState(available.context.conversationId).activeInputId ? requireSessionConnection({
|
|
312
|
+
conversationId: available.context.conversationId,
|
|
313
|
+
principalId: available.principalId,
|
|
314
|
+
agentId: available.agentId ?? "main",
|
|
315
|
+
summary: `Confirm ${action.actionId}`,
|
|
316
|
+
needs: [{
|
|
317
|
+
key: `${resolved.installation.connectorId}:${connection.accountId}`,
|
|
318
|
+
connectorId: resolved.installation.connectorId,
|
|
319
|
+
accountId: connection.accountId,
|
|
320
|
+
connectionId: connection.id,
|
|
321
|
+
label: toolkit,
|
|
322
|
+
capabilities: [action.actionId]
|
|
323
|
+
}]
|
|
324
|
+
}) : void 0;
|
|
289
325
|
const approval = createConnectorApproval({
|
|
326
|
+
waitId: wait?.waitId,
|
|
290
327
|
principalId: available.principalId,
|
|
291
328
|
connectorId: resolved.installation.connectorId,
|
|
292
329
|
connectionId: connection?.id,
|
|
@@ -294,10 +331,22 @@ var ComposioToolProvider = class {
|
|
|
294
331
|
conversationId: available.context?.conversationId,
|
|
295
332
|
actionId: action.actionId,
|
|
296
333
|
scope: action.scope,
|
|
297
|
-
argumentsHash:
|
|
298
|
-
|
|
334
|
+
argumentsHash: connectorArgumentsHash({
|
|
335
|
+
args: actionArgs,
|
|
336
|
+
accountId: connection.accountId,
|
|
337
|
+
objective: available.context ? connectorObjectiveScope(available.context.conversationId) : void 0
|
|
338
|
+
}),
|
|
339
|
+
argumentsPreview: {
|
|
340
|
+
account: {
|
|
341
|
+
id: connection.accountId,
|
|
342
|
+
label: getConnectorAccount(connection.accountId)?.label,
|
|
343
|
+
identity: connectorIdentitySummary(connection.identity)
|
|
344
|
+
},
|
|
345
|
+
arguments: connectorArgumentsPreview(actionArgs)
|
|
346
|
+
},
|
|
299
347
|
expiresAt: new Date(Date.now() + 10 * 6e4).toISOString()
|
|
300
348
|
});
|
|
349
|
+
if (available.context && wait?.waitId) publishConnectionWait(available.context.conversationId);
|
|
301
350
|
return textResult({
|
|
302
351
|
status: "confirmation_required",
|
|
303
352
|
approvalId: approval.id,
|
|
@@ -305,17 +354,31 @@ var ComposioToolProvider = class {
|
|
|
305
354
|
scope: approval.scope,
|
|
306
355
|
argumentsPreview: approval.argumentsPreview,
|
|
307
356
|
expiresAt: approval.expiresAt,
|
|
357
|
+
account: {
|
|
358
|
+
id: connection.accountId,
|
|
359
|
+
label: getConnectorAccount(connection.accountId)?.label,
|
|
360
|
+
identity: connectorIdentitySummary(connection.identity)
|
|
361
|
+
},
|
|
308
362
|
instruction: "Ask the user to approve this exact action in xopc, then retry with the approvalId and unchanged arguments."
|
|
309
363
|
});
|
|
310
364
|
}
|
|
311
|
-
return textResult(result.decision === "allowed" ?
|
|
365
|
+
return textResult(result.decision === "allowed" ? {
|
|
366
|
+
account: {
|
|
367
|
+
id: connection.accountId,
|
|
368
|
+
label: getConnectorAccount(connection.accountId)?.label,
|
|
369
|
+
identity: connectorIdentitySummary(connection.identity)
|
|
370
|
+
},
|
|
371
|
+
result: result.result
|
|
372
|
+
} : result.reason);
|
|
312
373
|
}
|
|
313
374
|
availableInstallations() {
|
|
314
375
|
const context = this.deps.getCurrentContext();
|
|
315
376
|
const principal = connectorPrincipalForSession(context?.conversationId);
|
|
316
377
|
if (principal.isLocalOwner) syncLocalOwnerInstallations(this.deps.getConfig());
|
|
317
378
|
const agentId = this.deps.agentId ?? principal.agentId;
|
|
318
|
-
const
|
|
379
|
+
const config = this.deps.getConfig();
|
|
380
|
+
const disabled = new Set(config ? listConnectorInstances(config).filter((instance) => !instance.enabled).map((instance) => instance.connectorId) : []);
|
|
381
|
+
const installations = listConnectorInstallations(principal.principalId).filter((installation) => installation.enabled && !disabled.has(installation.connectorId) && composioToolkitFromConnectorId(installation.connectorId) !== void 0 && (installation.allowedAgentIds.length === 0 || Boolean(agentId && installation.allowedAgentIds.includes(agentId))));
|
|
319
382
|
return {
|
|
320
383
|
principalId: principal.principalId,
|
|
321
384
|
agentId,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { init_connector_repository, listConnectorConnections } from "../../storage/sqlite/connector-repository.js";
|
|
1
2
|
import { connectionBindings, getActiveConnectionWait, init_connection_wait_repository, publishConnectionWait, requireSessionConnection, reviseCurrentConnectionObjective } from "../../storage/sqlite/connection-wait-repository.js";
|
|
2
|
-
import { listConnectorConnections } from "../../storage/sqlite/connector-repository.js";
|
|
3
3
|
import { connectorPrincipalForSession } from "../../connectors/principal.js";
|
|
4
4
|
import { connectionCandidates, resolveConnectionCandidate } from "../../connectors/connection-candidates.js";
|
|
5
5
|
import { ExternalToolService } from "./service.js";
|
|
6
6
|
import { EXTERNAL_TOOL_SOURCES } from "./types.js";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
8
8
|
//#region src/agent/external-tools/gateway-tools.ts
|
|
9
|
+
init_connector_repository();
|
|
9
10
|
init_connection_wait_repository();
|
|
10
11
|
const EXTERNAL_TOOL_NAMES = {
|
|
11
12
|
search: "xopc_tool_search",
|
|
@@ -2,9 +2,9 @@ import { init_global_singleton, resolveGlobalSingleton } from "../../utils/globa
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_string_coerce, normalizeOptionalString } from "../../utils/string-coerce.js";
|
|
5
|
+
import { resolveConnectorSecretReferences } from "../../connectors/secret-store.js";
|
|
5
6
|
import { redactSensitiveUrlLikeString } from "../../utils/redact-sensitive-url.js";
|
|
6
7
|
import { loadEmbeddedMcpConfig } from "./embedded-mcp.js";
|
|
7
|
-
import { resolveConnectorSecretReferences } from "../../connectors/secret-store.js";
|
|
8
8
|
import { isMcpConfigRecord } from "./mcp-config-shared.js";
|
|
9
9
|
import { resolveMcpTransport } from "./mcp-transport.js";
|
|
10
10
|
import { sanitizeServerName } from "./bundle-mcp-names.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_global_singleton, resolveGlobalSingleton } from "../../../utils/global-singleton.js";
|
|
2
2
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../../utils/logger.js";
|
|
4
|
-
import { redactSensitiveUrlLikeString } from "../../../utils/redact-sensitive-url.js";
|
|
5
4
|
import { resolveConnectorSecretReferences } from "../../../connectors/secret-store.js";
|
|
5
|
+
import { redactSensitiveUrlLikeString } from "../../../utils/redact-sensitive-url.js";
|
|
6
6
|
import { resolveMcpTransportConfig } from "../mcp-transport-config.js";
|
|
7
7
|
import { isMcpAuthorizationError } from "./mcp-oauth-errors.js";
|
|
8
8
|
import { McpOAuthStore, canonicalMcpServerUrl } from "./mcp-oauth-store.js";
|
|
@@ -9,7 +9,7 @@ export interface PromoteCompactionLedgerInput {
|
|
|
9
9
|
handover: CompactionHandover;
|
|
10
10
|
audit: CompactionAudit;
|
|
11
11
|
sourceEntries: readonly TranscriptSourceEntry[];
|
|
12
|
-
writePolicy: 'deny' | '
|
|
12
|
+
writePolicy: 'deny' | 'allow';
|
|
13
13
|
}
|
|
14
14
|
export interface PromoteCompactionLedgerResult {
|
|
15
15
|
episodicRecordIds: string[];
|
|
@@ -129,7 +129,7 @@ function promoteCompactionLedger(input) {
|
|
|
129
129
|
content: item.text,
|
|
130
130
|
canonicalKey: `compaction:${input.transcriptId}:${item.id}`,
|
|
131
131
|
confidence: input.audit.status === "passed" ? .82 : .65,
|
|
132
|
-
status: active ?
|
|
132
|
+
status: active ? originClass !== "untrusted" && !classified.derivedFromRecalledContext ? "active" : "candidate" : "archived",
|
|
133
133
|
importance: importanceFor(item),
|
|
134
134
|
originClass,
|
|
135
135
|
sourceAgentId: input.sourceAgentId,
|
|
@@ -143,6 +143,7 @@ function promoteCompactionLedger(input) {
|
|
|
143
143
|
handoverKind: item.kind
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
|
+
if (!episode.item) continue;
|
|
146
147
|
result.episodicRecordIds.push(episode.item.id);
|
|
147
148
|
if (!(active && input.audit.status === "passed" && sessionKind === "interactive" && originClass === "agent" && !classified.derivedFromRecalledContext && DURABLE_KINDS.has(item.kind))) {
|
|
148
149
|
const existingDurable = !active ? listKnowledgeItems({ limit: 2e3 }).find((entry) => entry.canonicalKey === `durable:${item.kind}:${stableId("fact", item.text)}`) : void 0;
|
|
@@ -168,7 +169,7 @@ function promoteCompactionLedger(input) {
|
|
|
168
169
|
content: item.text,
|
|
169
170
|
canonicalKey: `durable:${item.kind}:${stableId("fact", item.text)}`,
|
|
170
171
|
confidence: .82,
|
|
171
|
-
status:
|
|
172
|
+
status: "active",
|
|
172
173
|
importance: importanceFor(item),
|
|
173
174
|
originClass: "agent",
|
|
174
175
|
sourceConversationId: input.conversationId,
|
|
@@ -181,7 +182,7 @@ function promoteCompactionLedger(input) {
|
|
|
181
182
|
observedAt: classified.observedAt
|
|
182
183
|
}
|
|
183
184
|
});
|
|
184
|
-
result.durableRecordIds.push(durable.item.id);
|
|
185
|
+
if (durable.item) result.durableRecordIds.push(durable.item.id);
|
|
185
186
|
}
|
|
186
187
|
return result;
|
|
187
188
|
}
|
|
@@ -7,7 +7,7 @@ export interface KnowledgeToolOptions {
|
|
|
7
7
|
getProjectId?: () => string | undefined;
|
|
8
8
|
canRead: () => boolean;
|
|
9
9
|
canWrite: () => boolean;
|
|
10
|
-
getWritePolicy: () => 'deny' | '
|
|
10
|
+
getWritePolicy: () => 'deny' | 'allow';
|
|
11
11
|
getReadPolicy: () => KnowledgeReadPolicy;
|
|
12
12
|
}
|
|
13
13
|
export declare function createKnowledgeSearchTool(options: KnowledgeToolOptions): AgentTool;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getKnowledgeItem, knowledgeItemAllowed, searchKnowledgeItems, writeKnowledgeItem } from "../../knowledge-memory/repository.js";
|
|
1
|
+
import { getKnowledgeItem, isKnowledgeCurrent, knowledgeItemAllowed, searchKnowledgeItems, writeKnowledgeItem } from "../../knowledge-memory/repository.js";
|
|
2
2
|
import "../../knowledge-memory/index.js";
|
|
3
3
|
import { Type } from "@sinclair/typebox";
|
|
4
4
|
//#region src/agent/tools/knowledge-memory-tool.ts
|
|
@@ -92,7 +92,7 @@ function createKnowledgeGetTool(options) {
|
|
|
92
92
|
};
|
|
93
93
|
const id = raw.id;
|
|
94
94
|
const item = getKnowledgeItem(id);
|
|
95
|
-
return item && visibleItem(options, item) && knowledgeItemAllowed(item, options.getReadPolicy()) ? {
|
|
95
|
+
return item && isKnowledgeCurrent(item) && visibleItem(options, item) && knowledgeItemAllowed(item, options.getReadPolicy()) ? {
|
|
96
96
|
content: [{
|
|
97
97
|
type: "text",
|
|
98
98
|
text: JSON.stringify(item, null, 2)
|
|
@@ -160,7 +160,7 @@ function createKnowledgeWriteTool(options) {
|
|
|
160
160
|
},
|
|
161
161
|
content: input.content,
|
|
162
162
|
canonicalKey: input.canonicalKey,
|
|
163
|
-
status:
|
|
163
|
+
status: "active",
|
|
164
164
|
confidence: .7,
|
|
165
165
|
importance: input.importance ?? .5,
|
|
166
166
|
originClass: "agent",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
2
|
-
import { getAssertionSlot, getUserAssertion, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
|
|
3
|
-
import {
|
|
2
|
+
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
|
|
3
|
+
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
4
4
|
import "../../user-model/index.js";
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
6
|
//#region src/agent/tools/user-context-tool.ts
|
|
@@ -31,9 +31,6 @@ function visible(options, slotId) {
|
|
|
31
31
|
const scope = getAssertionSlot(slotId)?.scope;
|
|
32
32
|
return scope?.type === "global" || scope?.type === "agent" && scope.id === options.agentId || scope?.type === "workspace" && scope.id === options.workspaceId || scope?.type === "project" && scope.id === options.getProjectId?.() || scope?.type === "session" && scope.id === options.getSessionId();
|
|
33
33
|
}
|
|
34
|
-
function referenceable(assertion) {
|
|
35
|
-
return (assertion.status === "active" || isWorkingAssumption(assertion)) && assertion.authority !== "external_untrusted" && assertion.sensitivity !== "secret" && assertion.sensitivity !== "regulated" && assertion.disclosurePolicy !== "ask_before_reference";
|
|
36
|
-
}
|
|
37
34
|
function createUserContextSearchTool(options) {
|
|
38
35
|
return {
|
|
39
36
|
name: "user_context_search",
|
|
@@ -52,7 +49,7 @@ function createUserContextSearchTool(options) {
|
|
|
52
49
|
const results = listUserAssertions({
|
|
53
50
|
statuses: ["active", "candidate"],
|
|
54
51
|
limit: 1e3
|
|
55
|
-
}).filter((assertion) => visible(options, assertion.slotId)).filter(
|
|
52
|
+
}).filter((assertion) => visible(options, assertion.slotId)).filter((item) => canUseAssertion(item)).map((assertion) => ({
|
|
56
53
|
assertion,
|
|
57
54
|
score: retrievalLexicalSimilarity(input.query, `${assertion.statement} ${assertion.normalizedValue}`)
|
|
58
55
|
})).filter((item) => item.score > 0).sort((left, right) => right.score - left.score).slice(0, input.maxResults ?? 12).map(({ assertion, score }) => ({
|
|
@@ -89,7 +86,7 @@ function createUserContextGetTool(options) {
|
|
|
89
86
|
};
|
|
90
87
|
const id = raw.id;
|
|
91
88
|
const assertion = getUserAssertion(id);
|
|
92
|
-
if (!assertion || !visible(options, assertion.slotId) || !
|
|
89
|
+
if (!assertion || !visible(options, assertion.slotId) || !canUseAssertion(assertion)) return {
|
|
93
90
|
content: [{
|
|
94
91
|
type: "text",
|
|
95
92
|
text: `User assertion not found: ${id}`
|
|
@@ -199,6 +196,19 @@ function createUserContextUpdateTool(options) {
|
|
|
199
196
|
details: receipt
|
|
200
197
|
};
|
|
201
198
|
}
|
|
199
|
+
if (input.action === "forget") {
|
|
200
|
+
deleteUserAssertion(current.id);
|
|
201
|
+
return {
|
|
202
|
+
content: [{
|
|
203
|
+
type: "text",
|
|
204
|
+
text: "Memory deleted."
|
|
205
|
+
}],
|
|
206
|
+
details: {
|
|
207
|
+
action: "forget",
|
|
208
|
+
id: current.id
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
202
212
|
const status = {
|
|
203
213
|
confirm: "active",
|
|
204
214
|
reject: "rejected",
|
|
@@ -58,7 +58,7 @@ const rememberCommand = {
|
|
|
58
58
|
disclosurePolicy: "referenceable",
|
|
59
59
|
observedAt: Date.now(),
|
|
60
60
|
createdBy: "user"
|
|
61
|
-
});
|
|
61
|
+
}, Date.now(), { restoreDeleted: true });
|
|
62
62
|
const scopeLabel = sessionOnly ? "this conversation" : "all conversations";
|
|
63
63
|
return {
|
|
64
64
|
content: result.action === "created" ? `Remembered for ${scopeLabel}. You can review or remove it in User Model.` : `This is already remembered for ${scopeLabel}.`,
|
|
@@ -53,7 +53,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
53
53
|
id: "database-schema",
|
|
54
54
|
label: "Database schema",
|
|
55
55
|
status: "pass",
|
|
56
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
56
|
+
message: `SQLite schema v${status.dbVersion} (current release v185).`,
|
|
57
57
|
hints: []
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -3,8 +3,8 @@ import { loadConfig } from "../../../config/loader.js";
|
|
|
3
3
|
import "../../../config/index.js";
|
|
4
4
|
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
5
5
|
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
6
|
-
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
7
6
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "../../../infra/restart.js";
|
|
7
|
+
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
8
8
|
import { runServiceRestart, runServiceStop } from "./lifecycle-core.js";
|
|
9
9
|
import { DEFAULT_RESTART_HEALTH_ATTEMPTS, renderGatewayPortHealthDiagnostics, waitForGatewayHealthyListener } from "./restart-health.js";
|
|
10
10
|
import { parsePortFromArgs, renderGatewayServiceStartHints, resolveGatewayPortFromConfig } from "./shared.js";
|
|
@@ -2,9 +2,9 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
3
|
import { formatExamples, register } from "../registry.js";
|
|
4
4
|
import "../../config/index.js";
|
|
5
|
+
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
5
6
|
import { normalizeUpdateChannel } from "../../infra/update-channels.js";
|
|
6
7
|
import { compareSemver, resolveNpmChannelTag } from "../../infra/update-check.js";
|
|
7
|
-
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
8
8
|
import { formatUpdateApiResult, resolveUpdateInstallSurface, runGatewayUpdateWithPostSteps } from "../../infra/update-runner.js";
|
|
9
9
|
import { Command } from "commander";
|
|
10
10
|
//#region src/cli/commands/update.ts
|