@xopcai/xopc 0.0.460 → 0.0.463
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/_locales/en/messages.json +1 -0
- package/dist/browser-ext/_locales/zh_CN/messages.json +1 -0
- package/dist/browser-ext/dist/assets/{auth-CQmxIyWw.js → auth-YPMDpWOW.js} +32 -1
- package/dist/browser-ext/dist/assets/{pcm-capture-worklet-CGN9Mlhg.js → pcm-capture-worklet-Df5TcFw4.js} +4 -2
- package/dist/browser-ext/dist/background.js +24 -19
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +10 -9
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-C_rlXuEe.js +1 -0
- package/dist/gateway/static/root/assets/{agents-CGUdvmIT.js → agents-DC0lHtl5.js} +3 -3
- package/dist/gateway/static/root/assets/{apps-page-M2XD1Pzu.js → apps-page-D1qzENN_.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-CiJmJ7_h.js → automation-task-card-CJbIHRxN.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CVjgENMO.js → automations-page-HYFnPiNG.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-CGPWyL0P.js → automations-workspace-JCQ1IXFk.js} +2 -2
- package/dist/gateway/static/root/assets/{block-editor-CmnkluMF.js → block-editor-DrZyRQQ0.js} +5 -5
- package/dist/gateway/static/root/assets/{capabilities-DDqDvCBs.js → capabilities-Dr-vvMez.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-hSb-qEgL.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-kPv2dOzf.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CvF8VRTv.js → capabilities-settings-panel-B08mjrGB.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-BDVQ6Z7A.js → channels-B--IHNs4.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-stPJEZ90.js → chat-chart-block-ClCZyIi0.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-CalELOKj.js +71 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B4uA_W6R.js → chat-terminal-dock-eneTvxV3.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-DyzDVVfz.js → connectors-page-B9mpz_Rt.js} +1 -1
- package/dist/gateway/static/root/assets/constants-Bg1wM2nv.js +1 -0
- package/dist/gateway/static/root/assets/diagnostics-Bo0Z42P_.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BPwRrP3L.js → extension-debug-page-Bn_5xu_M.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-DIH4TcdH.js → extension-iframe-host-Vs6USa0c.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-C9JDpo_7.js → extension-message-router-GIekDj_w.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CLDoL5N8.js → extension-page-C_3bIjSB.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-BPIoHw4r.js → extension-provider-D-LolObs.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BO_UKeG8.js → extension-settings-page-BV51dk16.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-DefKShSW.js +8 -0
- package/dist/gateway/static/root/assets/index-CChzK_5b.css +1 -0
- package/dist/gateway/static/root/assets/index-DUo6H0PC.js +11 -0
- package/dist/gateway/static/root/assets/{local-app-workbench-page-D8oqDDAn.js → local-app-workbench-page-CfnixDO3.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-BlxIaCCQ.js → markdown-view-CNJaAdNN.js} +39 -39
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-DCIEL5bA.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DsXb1qjW.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-D6mvMSKr.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-CdXA-g9r.js → notes-api-BOIM9Q_D.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-BTpiOw67.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-Dibmspef.js → page-context-capture-button-B_Vdo2Ai.js} +1 -1
- package/dist/gateway/static/root/assets/pcm-capture-worklet-CpXsv44v.js +1 -0
- package/dist/gateway/static/root/assets/{personal-page-BwfyW7Hx.js → personal-page-I3IGVSJh.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-profile-settings-CQhZjoK6.js → personal-profile-settings-C4CxmQLQ.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-peD05ktj.js → personal-settings-panel-CnxI2TL0.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-nSDw8sfo.js → plugin-details-dialog-F08k_k2u.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-D51I7Lg3.js → product-automation-feedback-CGso8wGv.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-WkF2j_c-.js → product-preview-content-Dgtb4LF7.js} +1 -1
- package/dist/gateway/static/root/assets/product-preview-modal-C35EWUps.js +2 -0
- package/dist/gateway/static/root/assets/project-detail-page-Dy46uSEt.js +7 -0
- package/dist/gateway/static/root/assets/recording-upload-CFX7CANT.js +1 -0
- package/dist/gateway/static/root/assets/route-preload-ChTaYgpA.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-KH1VaEdC.js +2 -0
- package/dist/gateway/static/root/assets/{service-recommendation-list-DDlMyPvC.js → service-recommendation-list-BmRtbJz2.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-63NaXb1s.js +25 -0
- package/dist/gateway/static/root/assets/{settings-page-BHImcF1q.js → settings-page-C39lKVRv.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-fV5USZb1.js → share-preview-page-Cqy-7-rd.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-sl40lqND.js → shares-settings-BDr50uTV.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-FTd0Z7Ey.js → skills-page-DReUQ4Ug.js} +1 -1
- package/dist/gateway/static/root/assets/star-CnYNmpLd.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-D1dNWTnP.js +3 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-CSJeB9AH.js → task-result-evidence-CW_tN93T.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-CO7XLI4x.js → use-composer-attachments-Xn6eUus2.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BXXeXnT0.js → use-file-preview-expanded-D0IBFhM9.js} +1 -1
- package/dist/gateway/static/root/assets/use-realtime-voice-B5IsKrRW.js +1 -0
- package/dist/gateway/static/root/assets/{use-workspace-tree-D27u-eoX.js → use-workspace-tree-7X2ydgS8.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-settings-BiqJ0tlf.js → voice-settings-57pwZeKD.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-UvWbDUXi.js → work-discovery-overlay-BJ15p4rH.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-BM1HsYz6.js → work-discovery-page-8XciWNs5.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-api-Dd_UDfeo.js +2 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-NffP-UXC.js → workspace-file-preview-dialog-Clj9hMj5.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-preview-store-Do31QQH5.js → workspace-preview-store-imhtuEIP.js} +1 -1
- package/dist/gateway/static/root/index.html +30 -29
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/follow-ups.js +97 -0
- package/dist/packages/gateway-contract/src/home.js +1 -0
- package/dist/packages/gateway-contract/src/index.js +4 -0
- package/dist/packages/gateway-contract/src/observation-starters.js +95 -0
- package/dist/packages/gateway-contract/src/observation.js +7 -0
- package/dist/packages/gateway-contract/src/task-research-result.js +3 -0
- package/dist/src/agent/agent-manager.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.d.ts +1 -0
- package/dist/src/agent/background-review/prompts.js +7 -1
- package/dist/src/agent/background-review/run-background-review.js +85 -7
- package/dist/src/agent/coding/run-verification.d.ts +14 -7
- package/dist/src/agent/coding/run-verification.js +28 -6
- package/dist/src/agent/context/coordinator.js +1 -1
- package/dist/src/agent/context/deep-recall.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +4 -2
- package/dist/src/agent/embedded/run-for-session.d.ts +2 -0
- package/dist/src/agent/embedded/run-for-session.js +9 -0
- package/dist/src/agent/embedded/run-turn.js +63 -14
- package/dist/src/agent/embedded/session-runner.js +2 -2
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/external-tools/gateway-tools.js +8 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +1 -0
- package/dist/src/agent/mcp/connection-setup.js +46 -42
- package/dist/src/agent/mcp/conversation-setup.js +13 -8
- package/dist/src/agent/mcp/discovery.d.ts +22 -1
- package/dist/src/agent/mcp/discovery.js +19 -3
- package/dist/src/agent/mcp/managed-discovery.d.ts +8 -0
- package/dist/src/agent/mcp/managed-discovery.js +77 -0
- package/dist/src/agent/mcp/tool-catalog.js +1 -1
- package/dist/src/agent/prompt/conversational-configuration-guide.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -0
- package/dist/src/agent/service/direct-turn-helpers.js +17 -2
- package/dist/src/agent/service/process-direct-streaming.d.ts +1 -0
- package/dist/src/agent/service/process-direct-streaming.js +1 -0
- package/dist/src/agent/service.d.ts +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +6 -2
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +10 -7
- package/dist/src/agent/tasks/task-judge-service.js +1 -0
- package/dist/src/agent/tool-manuals/browser.d.ts +1 -1
- package/dist/src/agent/tool-manuals/browser.js +3 -1
- package/dist/src/agent/tool-manuals/xopc-configuration.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-configuration.js +12 -4
- package/dist/src/agent/tools/factory.d.ts +1 -1
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +36 -4
- package/dist/src/agent/tools/personal-task-tool.d.ts +7 -1
- package/dist/src/agent/tools/personal-task-tool.js +68 -3
- package/dist/src/agent/tools/session-search-tool.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.d.ts +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +54 -3
- package/dist/src/agent/tools/task-result-tool.js +31 -0
- package/dist/src/agent/tools/xopc-use-tool.js +50 -19
- package/dist/src/automations/capabilities/write.d.ts +2 -2
- package/dist/src/automations/domain/validation.d.ts +4 -4
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -1
- package/dist/src/browser/drivers/browser-driver.d.ts +1 -0
- package/dist/src/browser/drivers/create-driver.js +2 -11
- package/dist/src/browser/drivers/playwright-driver.d.ts +5 -2
- package/dist/src/browser/drivers/playwright-driver.js +83 -38
- package/dist/src/browser/runtime/browser-runtime.d.ts +5 -0
- package/dist/src/browser/runtime/browser-runtime.js +71 -9
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +2 -2
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/computer/diagnostics.d.ts +4 -4
- package/dist/src/computer/errors.d.ts +4 -4
- package/dist/src/computer/evaluation.d.ts +3 -3
- package/dist/src/computer/flows.d.ts +1 -1
- package/dist/src/computer/runtime.d.ts +3 -3
- package/dist/src/config/schema.d.ts +6 -2
- package/dist/src/config/schema.js +3 -0
- package/dist/src/connectors/connected-source-understanding.js +11 -3
- package/dist/src/connectors/connection-recovery-service.js +38 -5
- package/dist/src/connectors/excluded-connectors.d.ts +1 -0
- package/dist/src/connectors/excluded-connectors.js +5 -1
- package/dist/src/connectors/learning-coordinator.js +45 -11
- package/dist/src/connectors/plugin-connection.d.ts +10 -0
- package/dist/src/connectors/plugin-connection.js +105 -0
- package/dist/src/discussions/recording.js +13 -6
- package/dist/src/endpoint-tools/device-host.d.ts +2 -2
- package/dist/src/extensions/agent-plugins/setup.js +1 -1
- package/dist/src/extensions/agent-plugins/skill-catalog.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +4 -0
- package/dist/src/gateway/hono/middleware/auth.js +1 -1
- package/dist/src/gateway/hono/routes/agent-plugins.js +2 -2
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/desktop-host.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +51 -0
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +3 -3
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/session-command-handler.js +15 -1
- package/dist/src/gateway/hono/routes/update.js +2 -2
- package/dist/src/gateway/hono/routes/user-model.js +1 -1
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/run-loop.js +2 -2
- package/dist/src/gateway/security/gateway-scopes.js +1 -0
- package/dist/src/gateway/service/agent-runner.d.ts +2 -8
- package/dist/src/gateway/service/agent-runner.js +2 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +5 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +13 -8
- package/dist/src/gateway/service/run-gateway-agent.js +6 -3
- package/dist/src/gateway/service/session-input-coordinator.d.ts +4 -0
- package/dist/src/gateway/service/session-input-coordinator.js +6 -1
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +19 -12
- package/dist/src/home-intelligence/follow-ups.d.ts +36 -0
- package/dist/src/home-intelligence/follow-ups.js +496 -0
- package/dist/src/home-intelligence/host.d.ts +80 -4
- package/dist/src/home-intelligence/host.js +124 -4
- package/dist/src/home-intelligence/observation-starters.d.ts +3 -0
- package/dist/src/home-intelligence/observation-starters.js +27 -0
- package/dist/src/home-intelligence/observation.d.ts +1 -1
- package/dist/src/home-intelligence/observation.js +16 -4
- package/dist/src/infra/gateway-processes.js +1 -1
- package/dist/src/infra/update-restart.js +2 -2
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/local-apps/automation-proposals.d.ts +4 -4
- package/dist/src/local-apps/capabilities/projections.d.ts +38 -38
- package/dist/src/memory-learning/choice-observations.d.ts +9 -0
- package/dist/src/memory-learning/choice-observations.js +155 -0
- package/dist/src/memory-learning/evidence-repair.d.ts +12 -0
- package/dist/src/memory-learning/evidence-repair.js +31 -0
- package/dist/src/memory-learning/repository.d.ts +1 -0
- package/dist/src/memory-learning/repository.js +43 -5
- package/dist/src/memory-learning/source-learning.js +52 -7
- package/dist/src/memory-learning/task-receipts.js +19 -10
- package/dist/src/memory-learning/transcript-source.js +7 -0
- package/dist/src/memory-learning/work-candidate.d.ts +14 -0
- package/dist/src/memory-learning/work-candidate.js +17 -2
- package/dist/src/memory-learning/work-capture.d.ts +1 -0
- package/dist/src/memory-learning/work-capture.js +28 -10
- package/dist/src/memory-learning/work-review.d.ts +46 -0
- package/dist/src/memory-learning/work-review.js +209 -0
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notifications/service.js +2 -2
- package/dist/src/personal-agent/communication.d.ts +1 -1
- package/dist/src/personal-agent/communication.js +1 -1
- package/dist/src/personal-agent/default-style.d.ts +1 -1
- package/dist/src/personal-agent/default-style.js +1 -1
- package/dist/src/personal-agent/proactivity/repository.d.ts +1 -1
- package/dist/src/personal-agent/prompts.js +4 -4
- package/dist/src/personal-agent/reply-composer.d.ts +1 -1
- package/dist/src/personal-agent/reply-composer.js +52 -34
- package/dist/src/personal-agent/reply-style.d.ts +2 -2
- package/dist/src/personal-agent/reply-style.js +3 -2
- package/dist/src/personal-agent/request-repository.d.ts +3 -0
- package/dist/src/personal-agent/request-service.d.ts +2 -0
- package/dist/src/personal-agent/request-service.js +8 -2
- package/dist/src/phone/contracts.d.ts +1 -1
- package/dist/src/phone/stream-gateway.js +1 -1
- package/dist/src/projects/capabilities/write.js +1 -1
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +7 -7
- package/dist/src/storage/sqlite/schema.sql +22 -0
- package/dist/src/storage/sqlite/upgrades/274_home_followups.sql +21 -0
- package/dist/src/tasks/capabilities/management.d.ts +3 -3
- package/dist/src/tasks/capabilities/relations.d.ts +3 -3
- package/dist/src/tasks/capabilities/write.d.ts +4 -4
- package/dist/src/tasks/capabilities/write.js +2 -0
- package/dist/src/tasks/home-query-service.js +4 -2
- package/dist/src/tasks/task-allocation-service.js +10 -2
- package/dist/src/tasks/task-application-service.d.ts +4 -0
- package/dist/src/tasks/task-application-service.js +6 -1
- package/dist/src/tasks/task-context-assembler.js +7 -2
- package/dist/src/tasks/task-contract-planner.js +3 -3
- package/dist/src/tasks/task-conversation-summary.d.ts +64 -0
- package/dist/src/tasks/task-conversation-summary.js +105 -0
- package/dist/src/tasks/task-delay-notice.d.ts +4 -0
- package/dist/src/tasks/task-delay-notice.js +113 -0
- package/dist/src/tasks/task-deletion-service.js +6 -1
- package/dist/src/tasks/task-handoff.d.ts +21 -0
- package/dist/src/tasks/task-handoff.js +77 -1
- package/dist/src/tasks/task-json-acceptance.d.ts +22 -0
- package/dist/src/tasks/task-json-acceptance.js +96 -0
- package/dist/src/tasks/task-main-update-decision-service.js +17 -21
- package/dist/src/tasks/task-main-update-delivery.js +34 -7
- package/dist/src/tasks/task-notification-preference.d.ts +16 -0
- package/dist/src/tasks/task-notification-preference.js +42 -0
- package/dist/src/tasks/task-origin-repository.d.ts +1 -0
- package/dist/src/tasks/task-origin-repository.js +3 -0
- package/dist/src/tasks/task-read-model-projector.js +1 -1
- package/dist/src/tasks/task-repository.js +1 -0
- package/dist/src/tasks/task-research-repair.d.ts +19 -1
- package/dist/src/tasks/task-research-repair.js +14 -4
- package/dist/src/tasks/task-research-result.d.ts +12 -0
- package/dist/src/tasks/task-research-result.js +5 -0
- package/dist/src/tasks/task-result-delivery-repository.d.ts +4 -1
- package/dist/src/tasks/task-result-delivery-repository.js +8 -5
- package/dist/src/tasks/task-result-delivery-service.js +9 -1
- package/dist/src/tasks/task-run-coordinator.js +45 -10
- package/dist/src/tui/tui-management.js +2 -2
- package/dist/src/usage/cloud-wire.d.ts +1 -0
- package/dist/src/user-context/config.d.ts +8 -0
- package/dist/src/user-context/config.js +10 -0
- package/dist/src/user-model/capture/evidence-policy.d.ts +2 -0
- package/dist/src/user-model/capture/evidence-policy.js +8 -1
- package/dist/src/user-model/capture/executor.js +16 -4
- package/dist/src/user-model/capture/semantic.d.ts +4 -0
- package/dist/src/user-model/capture/semantic.js +3 -0
- package/dist/src/user-model/index.js +1 -1
- package/dist/src/user-model/observation-repository.d.ts +6 -0
- package/dist/src/user-model/observation-repository.js +12 -0
- package/dist/src/user-model/repository.js +10 -1
- package/dist/src/voice/realtime/agentEngine.js +29 -7
- package/dist/src/voice/realtime/pcmPlaybackEcho.d.ts +10 -0
- package/dist/src/voice/realtime/pcmPlaybackEcho.js +56 -0
- package/dist/src/voice/realtime/playback-echo.d.ts +3 -0
- package/dist/src/voice/realtime/playback-echo.js +35 -5
- package/dist/src/voice/realtime/runtime.js +6 -1
- package/dist/src/voice/realtime/turnPolicy.js +1 -1
- package/package.json +14 -8
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CikzCYAG.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-DB713nRi.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-D2hq4cgE.js +0 -2
- package/dist/gateway/static/root/assets/chat-page-BhPw56Vc.js +0 -71
- package/dist/gateway/static/root/assets/constants-DpkUgykJ.js +0 -1
- package/dist/gateway/static/root/assets/discussion-annotation-sync-fwPPMPv9.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BPPe4JXB.js +0 -7
- package/dist/gateway/static/root/assets/index-DjzrnmBA.js +0 -11
- package/dist/gateway/static/root/assets/index-YQxumvaS.css +0 -1
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-CsTSmjmX.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-BbHlfAju.js +0 -7
- package/dist/gateway/static/root/assets/note-image-lightbox-CqK_uJ6Y.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-8w2Stfak.js +0 -8
- package/dist/gateway/static/root/assets/pcm-capture-worklet-uW_SEACy.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-modal-DMHOKocl.js +0 -2
- package/dist/gateway/static/root/assets/project-detail-page-CNFuzmRr.js +0 -7
- package/dist/gateway/static/root/assets/recording-upload-CyZSl2DJ.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-CuxNu-LB.js +0 -2
- package/dist/gateway/static/root/assets/routine-panel-CXs4PjW0.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-D2LaQymu.js +0 -25
- package/dist/gateway/static/root/assets/task-detail-page-_5TEldtl.js +0 -3
- package/dist/gateway/static/root/assets/use-realtime-voice-C7iWQuUv.js +0 -1
- package/dist/gateway/static/root/assets/workspace-api-LghfbP5g.js +0 -2
|
@@ -1078,6 +1078,9 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1078
1078
|
showMemoryReferences: true,
|
|
1079
1079
|
processingPolicy: "remote_allowed",
|
|
1080
1080
|
extraction: {
|
|
1081
|
+
crossSessionObservations: true,
|
|
1082
|
+
observationWindowDays: 30,
|
|
1083
|
+
maxObservationEvidence: 6,
|
|
1081
1084
|
reviewIntervalTurns: 10,
|
|
1082
1085
|
maxHistoryMessages: 80,
|
|
1083
1086
|
maxDurationMs: 12e4
|
|
@@ -154,8 +154,15 @@ async function deriveConnectedSourceUnderstanding(input) {
|
|
|
154
154
|
}
|
|
155
155
|
const sourceRun = getUnderstandingSourceRun(input.sourceRunId);
|
|
156
156
|
const consentReceipt = sourceRun ? getActiveUnderstandingConsent(sourceRun.grantId) ?? void 0 : void 0;
|
|
157
|
+
const allowPersonal = input.config.userContext.enabled && input.config.userContext.userModel.enabled && input.config.userContext.userModel.writePolicy === "allow" && consentReceipt?.purposes.includes("personalization");
|
|
158
|
+
const allowWork = input.config.userContext.enabled && input.config.userContext.knowledgeMemory.enabled && input.config.userContext.knowledgeMemory.writePolicy === "allow" && consentReceipt?.purposes.includes("work_assistance");
|
|
159
|
+
if (!allowPersonal && !allowWork) return {
|
|
160
|
+
created: 0,
|
|
161
|
+
knowledgeCount: 0,
|
|
162
|
+
status: "completed"
|
|
163
|
+
};
|
|
157
164
|
const modelItems = itemsAllowedByConsent(items, consentReceipt);
|
|
158
|
-
recordConnectedSourceObservations({
|
|
165
|
+
if (allowPersonal) recordConnectedSourceObservations({
|
|
159
166
|
items: sourceItems,
|
|
160
167
|
consent: consentReceipt,
|
|
161
168
|
sourceGrantId: sourceRun?.grantId
|
|
@@ -182,7 +189,7 @@ async function deriveConnectedSourceUnderstanding(input) {
|
|
|
182
189
|
const byRef = new Map(modelItems.map((item) => [item.evidenceRef, item]));
|
|
183
190
|
const outputs = [];
|
|
184
191
|
let created = 0;
|
|
185
|
-
for (const candidate of analysis.profileCandidates.filter(isPortraitCandidate)) {
|
|
192
|
+
for (const candidate of allowPersonal ? analysis.profileCandidates.filter(isPortraitCandidate) : []) {
|
|
186
193
|
const policy = candidatePolicy(candidate);
|
|
187
194
|
const evidenceItems = durableEvidence(candidate, byRef);
|
|
188
195
|
const candidateKey = `connected-profile:${candidate.category}:${candidate.factKey}`;
|
|
@@ -271,7 +278,7 @@ async function deriveConnectedSourceUnderstanding(input) {
|
|
|
271
278
|
const item = byRef.get(ref);
|
|
272
279
|
return item?.ownerAttribution === "user" ? [item] : [];
|
|
273
280
|
});
|
|
274
|
-
if (consentReceipt?.allowedDomains.includes("goals") && !consentReceipt.deniedDomains.includes("goals") && thread.confidence !== "low" && goalEvidence.length) {
|
|
281
|
+
if (allowPersonal && consentReceipt?.allowedDomains.includes("goals") && !consentReceipt.deniedDomains.includes("goals") && thread.confidence !== "low" && goalEvidence.length) {
|
|
275
282
|
const observedAt = Math.max(...goalEvidence.map((item) => item.occurredAt ?? item.modifiedAt ?? Date.now()));
|
|
276
283
|
const validityDays = thread.horizon === "current" ? 30 : thread.horizon === "ongoing" ? 90 : 365;
|
|
277
284
|
let goalCreated = false;
|
|
@@ -335,6 +342,7 @@ async function deriveConnectedSourceUnderstanding(input) {
|
|
|
335
342
|
}
|
|
336
343
|
if (goalCreated) created += 1;
|
|
337
344
|
}
|
|
345
|
+
if (!allowWork) continue;
|
|
338
346
|
const evidence = evidenceRefs.flatMap((ref) => {
|
|
339
347
|
const evidenceItem = byRef.get(ref);
|
|
340
348
|
const sourceItem = sourceItems.find((item) => `knowledge-source://${item.id}` === ref);
|
|
@@ -18,6 +18,7 @@ import { getInstalledConnectorDefinition, listConnectorInstances } from "./insta
|
|
|
18
18
|
import { describeCliAction, verifyCliConnection } from "./cli/runtime.js";
|
|
19
19
|
import { capabilityActions, isToolInputSchema, missingConnectionCapabilities } from "./connection-capabilities.js";
|
|
20
20
|
import { installConnector } from "./install.js";
|
|
21
|
+
import { readPluginConnection } from "./plugin-connection.js";
|
|
21
22
|
import { resolveConnectionCandidate } from "./connection-candidates.js";
|
|
22
23
|
import { cancelPersonalRequest, resolvePersonalRequestConnection } from "../personal-agent/request-service.js";
|
|
23
24
|
import { persistConfigMutation } from "../config/config-mutation.js";
|
|
@@ -79,6 +80,10 @@ var ConnectionRecoveryService = class {
|
|
|
79
80
|
for (const conversationId of reconcileConnectionWaits()) this.deps.drain(conversationId);
|
|
80
81
|
for (const wait of listConnectionWaitsToCheck()) {
|
|
81
82
|
if (this.busy.has(wait.conversationId) || interruptedConnectionMessage(wait)) continue;
|
|
83
|
+
if (wait.needs.some((need) => need.target.type === "plugin" && !readPluginConnection({
|
|
84
|
+
...need,
|
|
85
|
+
target: need.target
|
|
86
|
+
}, wait.agentId).verified)) continue;
|
|
82
87
|
await this.act(wait.conversationId, {
|
|
83
88
|
waitId: wait.id,
|
|
84
89
|
expectedTranscriptId: wait.transcriptId,
|
|
@@ -188,6 +193,10 @@ var ConnectionRecoveryService = class {
|
|
|
188
193
|
}
|
|
189
194
|
view(wait, verifiedIds) {
|
|
190
195
|
const needs = wait.needs.map((need) => {
|
|
196
|
+
if (need.target.type === "plugin") return readPluginConnection({
|
|
197
|
+
...need,
|
|
198
|
+
target: need.target
|
|
199
|
+
}, wait.agentId).view;
|
|
191
200
|
if (need.target.type === "store-connector") {
|
|
192
201
|
const target = need.target;
|
|
193
202
|
const instance = listConnectorInstances(this.deps.getConfig()).find((item) => item.connectorId === target.connectorId);
|
|
@@ -316,7 +325,7 @@ var ConnectionRecoveryService = class {
|
|
|
316
325
|
}))
|
|
317
326
|
}, verified).needs;
|
|
318
327
|
return Promise.all(wait.needs.map(async (need) => {
|
|
319
|
-
if (need.target.type
|
|
328
|
+
if (need.target.type !== "connector") return need;
|
|
320
329
|
if (views.find((view) => view.key === need.key)?.phase !== "ready") return {
|
|
321
330
|
...need,
|
|
322
331
|
capabilityError: void 0
|
|
@@ -405,10 +414,10 @@ var ConnectionRecoveryService = class {
|
|
|
405
414
|
if (getConnectionWait(wait.id)?.version !== wait.version) return false;
|
|
406
415
|
wait = this.markChecking(wait, "tools");
|
|
407
416
|
const verified = new Set(fresh.filter((item) => item.status === "active").map((item) => item.id));
|
|
408
|
-
wait.needs = wait.needs.map((need) => ({
|
|
417
|
+
wait.needs = wait.needs.map((need) => isConnectorNeed(need) ? {
|
|
409
418
|
...need,
|
|
410
419
|
unavailable: !fresh.some((item) => item.id === need.connectionId && item.status === "active")
|
|
411
|
-
})
|
|
420
|
+
} : need);
|
|
412
421
|
wait.needs = await this.boundedCheck(wait.id, () => this.checkCapabilities(wait, verified));
|
|
413
422
|
const ready = this.view(wait, verified).needs.every((need) => need.phase === "ready");
|
|
414
423
|
if (getConnectionWait(wait.id)?.version !== wait.version) return false;
|
|
@@ -551,6 +560,30 @@ var ConnectionRecoveryService = class {
|
|
|
551
560
|
} else if (action.action === "connect") {
|
|
552
561
|
const need = wait.needs.find((need) => need.key === action.needKey);
|
|
553
562
|
if (!need) throw new Error("Unknown connection requirement.");
|
|
563
|
+
if (need.target.type === "plugin") {
|
|
564
|
+
const plugin = readPluginConnection({
|
|
565
|
+
...need,
|
|
566
|
+
target: need.target
|
|
567
|
+
}, wait.agentId);
|
|
568
|
+
if (plugin.view.phase === "blocked") throw new Error("This plugin cannot be connected from the current objective.");
|
|
569
|
+
updateConnectionWait({
|
|
570
|
+
...wait,
|
|
571
|
+
needs: wait.needs.map((item) => item.key === need.key ? {
|
|
572
|
+
...item,
|
|
573
|
+
attempt: {
|
|
574
|
+
id: action.idempotencyKey,
|
|
575
|
+
connectionId: plugin.revision,
|
|
576
|
+
expiresAt: Date.now() + INTENT_TTL
|
|
577
|
+
}
|
|
578
|
+
} : item),
|
|
579
|
+
intent: {
|
|
580
|
+
objectiveRevision: wait.objectiveRevision,
|
|
581
|
+
validUntil: Date.now() + INTENT_TTL
|
|
582
|
+
}
|
|
583
|
+
}, wait.version);
|
|
584
|
+
publishConnectionWait(conversationId);
|
|
585
|
+
return { snapshot: this.snapshot(conversationId) };
|
|
586
|
+
}
|
|
554
587
|
if (this.view(wait).needs.find((item) => item.key === need.key)?.phase === "blocked") throw new Error("Connector policy blocks this connection.");
|
|
555
588
|
const id = need.target.connectorId;
|
|
556
589
|
const instance = listConnectorInstances(this.deps.getConfig()).find((item) => item.connectorId === id);
|
|
@@ -650,11 +683,11 @@ var ConnectionRecoveryService = class {
|
|
|
650
683
|
if (!latest || latest.version !== wait.version || latest.status !== "open") throw new Error("WAIT_CHANGED");
|
|
651
684
|
const currentNeeds = this.view(wait).needs;
|
|
652
685
|
let needs = wait.needs.map((need) => {
|
|
653
|
-
if (need.target.type === "store-connector") {
|
|
686
|
+
if (need.target.type === "plugin" || need.target.type === "store-connector") {
|
|
654
687
|
const selected = currentNeeds.find((item) => item.key === need.key);
|
|
655
688
|
return selected?.phase === "ready" ? {
|
|
656
689
|
...need,
|
|
657
|
-
connectionId: selected.connectionId,
|
|
690
|
+
connectionId: selected.pluginId ?? selected.connectionId,
|
|
658
691
|
unavailable: false,
|
|
659
692
|
capabilityError: void 0
|
|
660
693
|
} : need;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare function preferredStorePlugin(serviceName: string): string | undefined;
|
|
1
2
|
export declare function isExcludedComposioToolkit(toolkit: string): boolean;
|
|
2
3
|
export declare function assertComposioToolkitAvailable(toolkit: string): void;
|
|
3
4
|
export declare function isExcludedStoreConnector(packageName: string): boolean;
|
|
@@ -7,6 +7,10 @@ const STORE_CONNECTOR_REPLACEMENTS = {
|
|
|
7
7
|
notion: "Store plugin \"notion-office\"",
|
|
8
8
|
"todoist-mcp": "Store plugin \"todoist\""
|
|
9
9
|
};
|
|
10
|
+
function preferredStorePlugin(serviceName) {
|
|
11
|
+
const slug = serviceName.trim().toLowerCase();
|
|
12
|
+
return Object.hasOwn(COMPOSIO_PLUGIN_REPLACEMENTS, slug) ? COMPOSIO_PLUGIN_REPLACEMENTS[slug] : void 0;
|
|
13
|
+
}
|
|
10
14
|
function isExcludedComposioToolkit(toolkit) {
|
|
11
15
|
return Object.hasOwn(COMPOSIO_PLUGIN_REPLACEMENTS, toolkit.trim().toLowerCase());
|
|
12
16
|
}
|
|
@@ -21,4 +25,4 @@ function assertStoreConnectorAvailable(packageName) {
|
|
|
21
25
|
if (isExcludedStoreConnector(packageName)) throw new Error(`Use ${STORE_CONNECTOR_REPLACEMENTS[packageName]} instead of the duplicate Store connector.`);
|
|
22
26
|
}
|
|
23
27
|
//#endregion
|
|
24
|
-
export { assertComposioToolkitAvailable, assertStoreConnectorAvailable, isExcludedComposioToolkit, isExcludedStoreConnector };
|
|
28
|
+
export { assertComposioToolkitAvailable, assertStoreConnectorAvailable, isExcludedComposioToolkit, isExcludedStoreConnector, preferredStorePlugin };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getSqliteDatabase } from "../storage/sqlite/transaction.js";
|
|
3
4
|
import { getConnectorAccount, reconcileConnectorAccount } from "../storage/sqlite/connector-account-repository.js";
|
|
4
5
|
import { getConnectorInstallation, listConnectorConnections, upsertConnectorConnection } from "../storage/sqlite/connector-repository.js";
|
|
5
6
|
import { claimNextConnectorLearningJob, enqueueConnectorLearningJob, listConnectorLearningJobs, recoverStaleConnectorLearningJobs, setConnectorLearningPaused, updateConnectorLearningJob } from "../storage/sqlite/connector-learning-repository.js";
|
|
@@ -7,6 +8,7 @@ import { pruneBoundedKnowledgeSourceItems } from "../storage/sqlite/knowledge-re
|
|
|
7
8
|
import { getConnectorSyncPolicyForConnection } from "../storage/sqlite/connector-sync-policy-repository.js";
|
|
8
9
|
import "../storage/sqlite/index.js";
|
|
9
10
|
import { getActiveUnderstandingConsent, grantUnderstandingConsent } from "../user-context/sources/consent-repository.js";
|
|
11
|
+
import { canAccessConnectorAccount } from "./account-access.js";
|
|
10
12
|
import { connectorIdentityKey, normalizeConnectorIdentity } from "./connector-identity.js";
|
|
11
13
|
import { ComposioSessionsAdapter } from "./composio-sessions.js";
|
|
12
14
|
import { buildConnectorLearningArguments, getConnectorLearningPlan } from "./learning-recipes.js";
|
|
@@ -31,9 +33,19 @@ function connectorSourceCategory(toolkit) {
|
|
|
31
33
|
if (toolkit === "github" || toolkit === "linear") return "code_activity";
|
|
32
34
|
return "files";
|
|
33
35
|
}
|
|
36
|
+
function consentWasRevoked(grantId) {
|
|
37
|
+
return !getActiveUnderstandingConsent(grantId) && Boolean(getSqliteDatabase().prepare("SELECT 1 FROM understanding_consent_receipts WHERE grant_id = ? LIMIT 1").get(grantId));
|
|
38
|
+
}
|
|
34
39
|
function ensureUnderstandingSourceRun(job, toolkit, displayName, config) {
|
|
35
|
-
|
|
36
|
-
if (existing
|
|
40
|
+
let existing = listUnderstandingSourceGrants({ includeRevoked: true }).find((grant) => grant.sourceKey === `connector-account:${job.accountId}`);
|
|
41
|
+
if (existing && (existing.status === "revoked" || consentWasRevoked(existing.id))) throw new Error("Source authorization was revoked.");
|
|
42
|
+
if (existing && existing.config.sourceInstanceId !== job.sourceInstanceId) existing = upsertUnderstandingSourceGrant({
|
|
43
|
+
...existing,
|
|
44
|
+
config: {
|
|
45
|
+
...existing.config,
|
|
46
|
+
sourceInstanceId: job.sourceInstanceId
|
|
47
|
+
}
|
|
48
|
+
});
|
|
37
49
|
const grant = existing ?? upsertUnderstandingSourceGrant({
|
|
38
50
|
sourceKey: `connector-account:${job.accountId}`,
|
|
39
51
|
adapterId: `connector:${job.connectorId}`,
|
|
@@ -46,6 +58,7 @@ function ensureUnderstandingSourceRun(job, toolkit, displayName, config) {
|
|
|
46
58
|
config: {
|
|
47
59
|
connectorId: job.connectorId,
|
|
48
60
|
accountId: job.accountId,
|
|
61
|
+
sourceInstanceId: job.sourceInstanceId,
|
|
49
62
|
readOnly: true
|
|
50
63
|
}
|
|
51
64
|
});
|
|
@@ -92,7 +105,7 @@ function ensureUnderstandingSourceRun(job, toolkit, displayName, config) {
|
|
|
92
105
|
});
|
|
93
106
|
}
|
|
94
107
|
function learningEnabled(config) {
|
|
95
|
-
return config.userContext.enabled && config.userContext.userModel.enabled;
|
|
108
|
+
return config.userContext.enabled && (config.userContext.userModel.enabled || config.userContext.knowledgeMemory.enabled);
|
|
96
109
|
}
|
|
97
110
|
function startConnectorLearningCoordinator(options) {
|
|
98
111
|
const intervalMs = Math.max(2e3, Math.min(options.intervalMs ?? 1e4, 6e4));
|
|
@@ -107,8 +120,9 @@ function startConnectorLearningCoordinator(options) {
|
|
|
107
120
|
const connection = listConnectorConnections().find((item) => item.id === connectionId && item.status === "active");
|
|
108
121
|
if (!connection) return null;
|
|
109
122
|
if (!connection.accountId) throw new Error(`Connector account is missing for connection ${connection.id}.`);
|
|
110
|
-
|
|
111
|
-
if (
|
|
123
|
+
const installation = getConnectorInstallation(connection.installationId);
|
|
124
|
+
if (!installation || !canAccessConnectorAccount(connection, installation, options.resolveAgentId())) return null;
|
|
125
|
+
if (listUnderstandingSourceGrants({ includeRevoked: true }).some((grant) => grant.sourceKey === `connector-account:${connection.accountId}` && (grant.status === "revoked" || consentWasRevoked(grant.id)))) return null;
|
|
112
126
|
if (request.reason === "manual") {
|
|
113
127
|
const active = listConnectorLearningJobs({
|
|
114
128
|
accountId: connection.accountId,
|
|
@@ -346,6 +360,7 @@ function startConnectorLearningCoordinator(options) {
|
|
|
346
360
|
if (running || stopped) return;
|
|
347
361
|
running = true;
|
|
348
362
|
try {
|
|
363
|
+
recoverAuthorizedConnections();
|
|
349
364
|
for (let count = 0; count < 10; count += 1) {
|
|
350
365
|
const job = claimNextConnectorLearningJob();
|
|
351
366
|
if (!job) break;
|
|
@@ -380,13 +395,32 @@ function startConnectorLearningCoordinator(options) {
|
|
|
380
395
|
running = false;
|
|
381
396
|
}
|
|
382
397
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
for (const connection of activeAccountConnections())
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
398
|
+
function recoverAuthorizedConnections() {
|
|
399
|
+
if (!learningEnabled(options.getConfig())) return;
|
|
400
|
+
for (const connection of activeAccountConnections()) {
|
|
401
|
+
const jobs = listConnectorLearningJobs({
|
|
402
|
+
accountId: connection.accountId,
|
|
403
|
+
limit: 100
|
|
404
|
+
});
|
|
405
|
+
if (jobs.some((job) => [
|
|
406
|
+
"queued",
|
|
407
|
+
"running",
|
|
408
|
+
"failed",
|
|
409
|
+
"paused"
|
|
410
|
+
].includes(job.status))) continue;
|
|
411
|
+
const policy = getConnectorSyncPolicyForConnection(connection.id);
|
|
412
|
+
if (!policy?.scanEnabled) continue;
|
|
413
|
+
const last = jobs[0];
|
|
414
|
+
const nextRunAt = last ? Date.parse(last.updatedAt) + (policy.intervalMinutes ?? 30) * 6e4 : void 0;
|
|
415
|
+
enqueueConnection(connection.id, {
|
|
416
|
+
reason: "schedule",
|
|
417
|
+
nextRunAt,
|
|
418
|
+
idempotencyKey: last ? `recovery:${connection.accountId}:${last.id}` : void 0
|
|
419
|
+
});
|
|
420
|
+
}
|
|
389
421
|
}
|
|
422
|
+
recoverStaleConnectorLearningJobs(Date.now());
|
|
423
|
+
recoverAuthorizedConnections();
|
|
390
424
|
timer = setTimeout(() => {
|
|
391
425
|
runNow();
|
|
392
426
|
timer = setInterval(() => void runNow(), intervalMs);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ConnectionNeed, ConnectionNeedView, PluginConnectionTarget } from '@xopcai/gateway-contract';
|
|
2
|
+
import type { Config } from '../config/schema.js';
|
|
3
|
+
export declare function resolvePluginConnectionCandidate(ref: string, config?: Config): Promise<ConnectionNeed | undefined>;
|
|
4
|
+
export declare function readPluginConnection(need: ConnectionNeed & {
|
|
5
|
+
target: PluginConnectionTarget;
|
|
6
|
+
}, agentId: string): {
|
|
7
|
+
view: ConnectionNeedView;
|
|
8
|
+
revision?: string;
|
|
9
|
+
verified: boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
2
|
+
import { resolvePluginCapabilityAccess } from "../extensions/agent-plugins/capability-access.js";
|
|
3
|
+
import { AgentPluginStore } from "../extensions/agent-plugins/store.js";
|
|
4
|
+
import { fetchMarketplacePackageDetail, resolveExtensionsStoreBaseUrl } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
5
|
+
import { agentPluginInventoryRow } from "../extensions/agent-plugins/inventory.js";
|
|
6
|
+
import { PluginSetupService } from "../extensions/agent-plugins/setup.js";
|
|
7
|
+
import { resolve } from "node:path";
|
|
8
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
9
|
+
//#region src/connectors/plugin-connection.ts
|
|
10
|
+
init_agent_scope();
|
|
11
|
+
async function resolvePluginConnectionCandidate(ref, config) {
|
|
12
|
+
const installed = /^agent-plugin:([a-z0-9.-]+)$/.exec(ref)?.[1];
|
|
13
|
+
if (installed) {
|
|
14
|
+
const plugin = new AgentPluginStore().get(installed);
|
|
15
|
+
if (!plugin) throw new Error("The requested plugin is no longer installed.");
|
|
16
|
+
return {
|
|
17
|
+
key: ref,
|
|
18
|
+
label: plugin.manifest.name,
|
|
19
|
+
capabilities: ["tools"],
|
|
20
|
+
target: {
|
|
21
|
+
type: "plugin",
|
|
22
|
+
pluginId: installed,
|
|
23
|
+
revision: plugin.receipt.revision
|
|
24
|
+
},
|
|
25
|
+
unavailable: true
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const packageName = /^store-plugin:([a-z0-9.-]+)$/.exec(ref)?.[1];
|
|
29
|
+
if (!packageName) return void 0;
|
|
30
|
+
if (!config) throw new Error("The Store is unavailable in this session.");
|
|
31
|
+
const detail = await fetchMarketplacePackageDetail(resolveExtensionsStoreBaseUrl(config), packageName, AbortSignal.timeout(6e3));
|
|
32
|
+
if (detail.type !== "plugin" || !detail.latestVersion?.version) throw new Error("No matching plugin is available in the Store.");
|
|
33
|
+
return {
|
|
34
|
+
key: ref,
|
|
35
|
+
label: detail.localizations?.en?.displayName ?? packageName,
|
|
36
|
+
capabilities: ["tools"],
|
|
37
|
+
target: {
|
|
38
|
+
type: "plugin",
|
|
39
|
+
packageName,
|
|
40
|
+
version: detail.latestVersion.version
|
|
41
|
+
},
|
|
42
|
+
unavailable: true
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function readPluginConnection(need, agentId) {
|
|
46
|
+
const { target } = need;
|
|
47
|
+
const base = {
|
|
48
|
+
...need,
|
|
49
|
+
authorizationMode: "desktop",
|
|
50
|
+
accounts: []
|
|
51
|
+
};
|
|
52
|
+
const blocked = (reason) => ({
|
|
53
|
+
view: {
|
|
54
|
+
...base,
|
|
55
|
+
phase: "blocked",
|
|
56
|
+
reason
|
|
57
|
+
},
|
|
58
|
+
verified: false
|
|
59
|
+
});
|
|
60
|
+
try {
|
|
61
|
+
const store = new AgentPluginStore();
|
|
62
|
+
const plugin = "pluginId" in target ? store.get(target.pluginId) : store.list().find((item) => item.receipt.provenance?.packageName === target.packageName);
|
|
63
|
+
if (!plugin) return "packageName" in target ? {
|
|
64
|
+
view: {
|
|
65
|
+
...base,
|
|
66
|
+
phase: "install"
|
|
67
|
+
},
|
|
68
|
+
verified: false
|
|
69
|
+
} : blocked("The plugin is no longer installed.");
|
|
70
|
+
if (!("pluginId" in target ? plugin.receipt.revision === target.revision : plugin.receipt.provenance?.version === target.version) || plugin.readiness === "blocked" || store.pending(plugin.id)) return blocked("The plugin has changed or is unavailable. Review it in the plugin manager.");
|
|
71
|
+
const workspace = resolveAgentWorkspaceDir(agentId);
|
|
72
|
+
const scope = plugin.receipt.workspacePaths;
|
|
73
|
+
if (scope && !scope.includes(existsSync(workspace) ? realpathSync(workspace) : resolve(workspace))) return blocked("The plugin is unavailable in this workspace. Review its workspace access in the plugin manager.");
|
|
74
|
+
const inventory = agentPluginInventoryRow(plugin, store);
|
|
75
|
+
const job = new PluginSetupService(store).get(plugin.id, "gateway-owner");
|
|
76
|
+
const setup = job?.packageRevision === plugin.receipt.revision ? job : void 0;
|
|
77
|
+
const revision = JSON.stringify([
|
|
78
|
+
plugin.receipt.revision,
|
|
79
|
+
plugin.receipt.enabled,
|
|
80
|
+
setup?.id,
|
|
81
|
+
setup?.revision
|
|
82
|
+
]);
|
|
83
|
+
const active = store.active(agentId, workspace).some((item) => item.id === plugin.id && item.receipt.revision === plugin.receipt.revision);
|
|
84
|
+
const access = resolvePluginCapabilityAccess(plugin, store);
|
|
85
|
+
const usable = plugin.skills.some((skill) => access.skill(skill.name)) || Object.keys(plugin.servers).some((name) => access.server(name) && (!setup || setup.connections.some((item) => item.name === name && (item.toolCount ?? 0) > 0)));
|
|
86
|
+
const finished = !setup || !setup.deferred && (setup.state === "completed" || Boolean(need.connectionId) && setup.installed && setup.resources === "ready" && setup.state === "action_required");
|
|
87
|
+
const setupVerified = active && usable && inventory.authorizationStatus !== "required" && finished;
|
|
88
|
+
const freshSetup = need.attempt && (!setup || need.attempt.connectionId !== revision);
|
|
89
|
+
const verified = setupVerified && (!need.unavailable || Boolean(freshSetup));
|
|
90
|
+
const phase = verified ? "ready" : setup?.state === "running" ? "authorizing" : plugin.receipt.enabled && (need.unavailable || inventory.authorizationStatus === "required") ? "reconnect" : "connect";
|
|
91
|
+
return {
|
|
92
|
+
revision,
|
|
93
|
+
verified,
|
|
94
|
+
view: {
|
|
95
|
+
...base,
|
|
96
|
+
pluginId: plugin.id,
|
|
97
|
+
phase
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
} catch {
|
|
101
|
+
return blocked("The plugin setup state is unavailable. Review it in the plugin manager.");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { readPluginConnection, resolvePluginConnectionCandidate };
|
|
@@ -79,11 +79,12 @@ function validateRecordingManifest(capture, input) {
|
|
|
79
79
|
"seal"
|
|
80
80
|
].includes(event.kind)))) throw invalid("Invalid recording events");
|
|
81
81
|
if (input.epochs !== void 0) {
|
|
82
|
-
if (input.containerMode || !Array.isArray(input.epochs) || input.epochs.length <
|
|
82
|
+
if (input.containerMode || !Array.isArray(input.epochs) || input.epochs.length < 1 || input.epochs.length > 100 || input.epochs.some((epoch, index) => !epoch || !Number.isSafeInteger(epoch.firstChunk) || (index === 0 ? epoch.firstChunk !== 0 : epoch.firstChunk <= input.epochs[index - 1].firstChunk) || epoch.firstChunk >= input.chunkCount || !Number.isSafeInteger(epoch.startedAt) || epoch.startedAt < 0 || epoch.previousEndedAt !== void 0 && (!Number.isSafeInteger(epoch.previousEndedAt) || epoch.previousEndedAt < 0) || typeof epoch.mimeType !== "string" || ![
|
|
83
83
|
"audio/webm",
|
|
84
84
|
"audio/mp4",
|
|
85
85
|
"audio/ogg",
|
|
86
|
-
"audio/wav"
|
|
86
|
+
"audio/wav",
|
|
87
|
+
"audio/mpeg"
|
|
87
88
|
].includes(epoch.mimeType.split(";")[0]))) throw invalid("Invalid recording epochs");
|
|
88
89
|
}
|
|
89
90
|
const mimeType = input.mimeType.split(";")[0];
|
|
@@ -156,8 +157,8 @@ async function completeRecording(capture, input, notes, assertLease, signal) {
|
|
|
156
157
|
} finally {
|
|
157
158
|
await file.close();
|
|
158
159
|
}
|
|
159
|
-
let durationMs = 0;
|
|
160
|
-
await forEachNormalizedAudioSegment({
|
|
160
|
+
let durationMs = epochs?.reduce((total, epoch) => total + epoch.durationMs, 0) ?? 0;
|
|
161
|
+
if (!epochs) await forEachNormalizedAudioSegment({
|
|
161
162
|
filePath: target,
|
|
162
163
|
segmentSeconds: 30,
|
|
163
164
|
maxDurationSeconds: DISCUSSION_MAX_SAVED_DURATION_MS / 1e3,
|
|
@@ -197,7 +198,7 @@ async function completeRecording(capture, input, notes, assertLease, signal) {
|
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
200
|
const attachment = await notes.addAttachment(capture.noteId, {
|
|
200
|
-
name: input.epochs ? "meeting-resumed.wav" : input.fileName.trim().slice(0, 200) || "meeting.webm",
|
|
201
|
+
name: input.epochs ? input.epochs.length === 1 ? "meeting-import.wav" : "meeting-resumed.wav" : input.fileName.trim().slice(0, 200) || "meeting.webm",
|
|
201
202
|
buffer: { filePath: target },
|
|
202
203
|
mimeType: outputMime,
|
|
203
204
|
duration: Math.round(durationMs / 1e3),
|
|
@@ -299,12 +300,18 @@ async function assembleEpochs(capture, input, notes, output, signal, assertLease
|
|
|
299
300
|
await output.writeFile(pcm);
|
|
300
301
|
});
|
|
301
302
|
if (!epochSamples) throw invalid("Recording epoch has no decodable audio");
|
|
303
|
+
if (input.epochs.length === 1 && epochSamples < 16e3) throw invalid("Recording must contain at least one second of audio");
|
|
302
304
|
const epochDuration = epochSamples / 16;
|
|
303
305
|
epochs.push(epoch.mimeType.includes("wav") ? pcmEpoch(epochDuration, (samples - epochSamples) / 16) : await probeMediaEpoch(path, epochDuration, (samples - epochSamples) / 16, signal));
|
|
304
306
|
assertLease();
|
|
305
307
|
signal.throwIfAborted();
|
|
306
308
|
const sha256 = await hashFile(path, signal);
|
|
307
|
-
const extension =
|
|
309
|
+
const extension = {
|
|
310
|
+
"audio/mp4": "m4a",
|
|
311
|
+
"audio/ogg": "ogg",
|
|
312
|
+
"audio/wav": "wav",
|
|
313
|
+
"audio/mpeg": "mp3"
|
|
314
|
+
}[epoch.mimeType.split(";")[0]] ?? "webm";
|
|
308
315
|
const attachment = await notes.addAttachment(capture.noteId, {
|
|
309
316
|
name: `recording-part-${capture.id}-${index + 1}.${extension}`,
|
|
310
317
|
buffer: { filePath: path },
|
|
@@ -6,8 +6,8 @@ export declare const deviceHostConfigSchema: z.ZodObject<{
|
|
|
6
6
|
identityPath: z.ZodString;
|
|
7
7
|
displayName: z.ZodString;
|
|
8
8
|
providers: z.ZodArray<z.ZodObject<{
|
|
9
|
-
title: z.ZodString;
|
|
10
9
|
summary: z.ZodString;
|
|
10
|
+
title: z.ZodString;
|
|
11
11
|
localId: z.ZodString;
|
|
12
12
|
gatewayFormInput: z.ZodOptional<z.ZodLiteral<1>>;
|
|
13
13
|
server: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -66,8 +66,8 @@ export declare function readDeviceHostConfig(path: string): Promise<{
|
|
|
66
66
|
identityPath: string;
|
|
67
67
|
displayName: string;
|
|
68
68
|
providers: {
|
|
69
|
-
title: string;
|
|
70
69
|
summary: string;
|
|
70
|
+
title: string;
|
|
71
71
|
localId: string;
|
|
72
72
|
policies: Record<string, {
|
|
73
73
|
sensitivity: "public" | "personal";
|
|
@@ -7,12 +7,12 @@ import { pluginName, pluginServerId } from "./validation.js";
|
|
|
7
7
|
import { AgentPluginStore } from "./store.js";
|
|
8
8
|
import { readPluginAuthBinding, savePluginAuthBinding, savePluginOAuthReference } from "./auth.js";
|
|
9
9
|
import { pluginConfigMissing, readPluginUserConfig, savePluginUserConfig } from "./user-config.js";
|
|
10
|
+
import { cancelPluginCliAuthorizations, getPluginCliAuthorization, inspectPluginCliAuthorization, startPluginCliAuthorization } from "./cli-authorization.js";
|
|
10
11
|
import { materializePluginServers } from "./mcp-adapter.js";
|
|
11
12
|
import { connectionFingerprint, matchingReusableConnection } from "./connection-reuse.js";
|
|
12
13
|
import { createNativeMcpCredentials } from "../../agent/mcp/credential-store.js";
|
|
13
14
|
import { getNativePiAgentDir } from "../../agent/mcp/native-mcp.js";
|
|
14
15
|
import { cancelMcpAuthorization, getMcpAuthorization, probeMcpConnection, startMcpAuthorization, submitMcpRedirect } from "../../agent/mcp/connection-setup.js";
|
|
15
|
-
import { cancelPluginCliAuthorizations, getPluginCliAuthorization, inspectPluginCliAuthorization, startPluginCliAuthorization } from "./cli-authorization.js";
|
|
16
16
|
import { join } from "node:path";
|
|
17
17
|
import { existsSync, readFileSync } from "node:fs";
|
|
18
18
|
import { randomUUID } from "node:crypto";
|
|
@@ -2,10 +2,10 @@ import { containedPath } from "./contained-path.js";
|
|
|
2
2
|
import "./validation.js";
|
|
3
3
|
import { AgentPluginStore } from "./store.js";
|
|
4
4
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
5
|
+
import { agentPluginInventoryRow } from "./inventory.js";
|
|
5
6
|
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
6
7
|
import { parseSkillLocalizations } from "../../agent/skills/parse-skill-metadata.js";
|
|
7
8
|
import { buildSkillMarkdownPreviewFromRaw } from "../../agent/skills/skill-markdown-preview-from-raw.js";
|
|
8
|
-
import { agentPluginInventoryRow } from "./inventory.js";
|
|
9
9
|
import { basename, dirname } from "node:path";
|
|
10
10
|
import { readFileSync } from "node:fs";
|
|
11
11
|
//#region src/extensions/agent-plugins/skill-catalog.ts
|
|
@@ -236,6 +236,9 @@ export declare function buildSafeWebConfigPayload(service: GatewayService, optio
|
|
|
236
236
|
showMemoryReferences: boolean;
|
|
237
237
|
processingPolicy: "local_only" | "remote_allowed";
|
|
238
238
|
extraction: {
|
|
239
|
+
crossSessionObservations: boolean;
|
|
240
|
+
observationWindowDays: number;
|
|
241
|
+
maxObservationEvidence: number;
|
|
239
242
|
reviewIntervalTurns: number;
|
|
240
243
|
maxHistoryMessages: number;
|
|
241
244
|
maxDurationMs: number;
|
|
@@ -264,6 +267,7 @@ export declare function buildSafeWebConfigPayload(service: GatewayService, optio
|
|
|
264
267
|
learning?: {
|
|
265
268
|
idleFlushMs: number;
|
|
266
269
|
maxBatchChars: number;
|
|
270
|
+
evidenceReview: boolean;
|
|
267
271
|
maxDailyBatches: number;
|
|
268
272
|
};
|
|
269
273
|
allowedProviderIds?: string[];
|
|
@@ -8,9 +8,9 @@ import "../../rate-limit/index.js";
|
|
|
8
8
|
import { authenticateDeviceAccessToken, getDevice } from "../../../storage/sqlite/device-access-repository.js";
|
|
9
9
|
import { getOrCreateGatewayIdentity } from "../../../storage/sqlite/gateway-identity-repository.js";
|
|
10
10
|
import { getDesktopExecutionGrant } from "../../../storage/sqlite/desktop-execution-repository.js";
|
|
11
|
+
import { PROOF_HEADER, acquireProofBodyBudget, consumeRequestNonce, parseRequestProof, proofDigest, requestProofMessage, verifyRequestProofSignature } from "../../security/device-request-proof.js";
|
|
11
12
|
import { safeEqualSecret } from "../../security/secret-equal.js";
|
|
12
13
|
import { resolveClientIpFromRequest } from "../../client-ip.js";
|
|
13
|
-
import { PROOF_HEADER, acquireProofBodyBudget, consumeRequestNonce, parseRequestProof, proofDigest, requestProofMessage, verifyRequestProofSignature } from "../../security/device-request-proof.js";
|
|
14
14
|
import { authenticateBrowserSession } from "../../../storage/sqlite/browser-session-repository.js";
|
|
15
15
|
import { isChromeExtensionOrigin } from "../../security/origin-check.js";
|
|
16
16
|
import { browserCookieRequestAllowed, readBrowserSessionCookie, writeBrowserSessionCookie } from "../../security/browser-session.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PluginSelectionRequired } from "../../../extensions/agent-plugins/source-catalog.js";
|
|
2
2
|
import { AgentPluginStore } from "../../../extensions/agent-plugins/store.js";
|
|
3
3
|
import { getWorkspacePath } from "../../../config/workspace-path-helpers.js";
|
|
4
|
+
import { agentPluginInventoryRow } from "../../../extensions/agent-plugins/inventory.js";
|
|
4
5
|
import { savePluginAuthBinding } from "../../../extensions/agent-plugins/auth.js";
|
|
5
|
-
import { evictAllEmbeddedSessionRunners } from "../../../agent/embedded/session-runner.js";
|
|
6
6
|
import { cancelPluginCliAuthorizations } from "../../../extensions/agent-plugins/cli-authorization.js";
|
|
7
7
|
import { PluginSetupService, setupActionSchema } from "../../../extensions/agent-plugins/setup.js";
|
|
8
|
-
import {
|
|
8
|
+
import { evictAllEmbeddedSessionRunners } from "../../../agent/embedded/session-runner.js";
|
|
9
9
|
import { withAgentPluginSource } from "../../../extensions/agent-plugins/sources.js";
|
|
10
10
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
11
11
|
import { removePluginCredentials } from "../../../extensions/agent-plugins/credentials.js";
|
|
@@ -5,6 +5,7 @@ import { getAllModels, getAvailableModels, init_providers } from "../../../provi
|
|
|
5
5
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
6
6
|
import { listAutomations } from "../../../automations/storage/automation-repository.js";
|
|
7
7
|
import "../../../automations/storage/index.js";
|
|
8
|
+
import { listAgentPluginInventory } from "../../../extensions/agent-plugins/inventory.js";
|
|
8
9
|
import { automationConfigurationDigest } from "../../../local-apps/capabilities/automation-policy.js";
|
|
9
10
|
import { assertProposalCurrent, automationProposalReview, readAutomationProposal, resolveAutomationProposal } from "../../../local-apps/automation-proposals.js";
|
|
10
11
|
import { assertResourceRequest, localAppConnectorOptions, readAppResourceRequest, resolveAppResourceRequest } from "../../../local-apps/p1-services.js";
|
|
@@ -15,7 +16,6 @@ import { mergeActivationContext } from "../../../extensions/activation-context.j
|
|
|
15
16
|
import { validateExtensionConfig } from "../../../extensions/config-validation.js";
|
|
16
17
|
import { fetchRegistry, listExtensions, searchExtensions } from "../../../extensions/marketplace.js";
|
|
17
18
|
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
18
|
-
import { listAgentPluginInventory } from "../../../extensions/agent-plugins/inventory.js";
|
|
19
19
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
20
20
|
import { createOAuthAsyncHandler } from "../oauth-async.js";
|
|
21
21
|
import { createOAuthHandler } from "../oauth.js";
|
|
@@ -20,7 +20,6 @@ import { createConnectorSetupSecretRequest, submitConnectorSetupSecret } from ".
|
|
|
20
20
|
import { recordConnectorHealthUsage } from "../../../connectors/usage.js";
|
|
21
21
|
import { getConnectorInstance, getInstalledConnectorDefinition, listConnectorInstances } from "../../../connectors/instances.js";
|
|
22
22
|
import { installConnector, installConnectorDefinition, uninstallConnector, updateConnectorConfig } from "../../../connectors/install.js";
|
|
23
|
-
import { ConfigPersistenceError, persistConfigMutation } from "../../../config/config-mutation.js";
|
|
24
23
|
import { resumeApprovedConnectorAction } from "../../../connectors/approval-resume.js";
|
|
25
24
|
import { startConnectorAuthorization } from "../../../connectors/auth-provider-registry.js";
|
|
26
25
|
import { composioLogoResponse } from "../../../connectors/composio-logo.js";
|
|
@@ -28,6 +27,7 @@ import { inspectManagedComposioStatus } from "../../../connectors/composio-manag
|
|
|
28
27
|
import { appendComposioTriggerEvent, listComposioTriggerEvents } from "../../../connectors/composio-triggers.js";
|
|
29
28
|
import { listUnderstandingSourceGrants, revokeUnderstandingSourceGrant } from "../../../user-context/sources/repository.js";
|
|
30
29
|
import { ingestLocalFolderSource } from "../../../connectors/connected-source-ingestion.js";
|
|
30
|
+
import { ConfigPersistenceError, persistConfigMutation } from "../../../config/config-mutation.js";
|
|
31
31
|
import { testConnectorInstance } from "../../../connectors/health.js";
|
|
32
32
|
import { setConnectorEnabled } from "../../../connectors/lifecycle.js";
|
|
33
33
|
import { projectComposioConnectionStatus } from "../../../connectors/runtime-status.js";
|
|
@@ -8,8 +8,8 @@ import { init_src as init_src$1 } from "../../../../packages/endpoint-tools-prot
|
|
|
8
8
|
import { getDesktopExecutionGrant, revokeDesktopExecutionGrant, setDesktopExecutionGrant } from "../../../storage/sqlite/desktop-execution-repository.js";
|
|
9
9
|
import { getDesktopOperationForReview, listDesktopOperationsForReview, reviewDesktopOperation } from "../../../storage/sqlite/desktop-operation-repository.js";
|
|
10
10
|
import { signDesktopAuthorityResponse } from "../../../endpoint-tools/desktop-authority-response.js";
|
|
11
|
-
import { resolveSecureDeviceRoutes } from "../../device-routes.js";
|
|
12
11
|
import { PROOF_HEADER, parseRequestProof } from "../../security/device-request-proof.js";
|
|
12
|
+
import { resolveSecureDeviceRoutes } from "../../device-routes.js";
|
|
13
13
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
//#region src/gateway/hono/routes/desktop-host.ts
|