@xopcai/xopc 0.0.309 → 0.0.312
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/README.md +2 -1
- package/README.zh-CN.md +2 -1
- 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-XKNYlFUI.js → activity-store-DVUTs1fk.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-1S2TFECE.js → agent-avatar-dicebear-BVIJMP8w.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-K3hTmu9d.js +1 -0
- package/dist/gateway/static/root/assets/{agents-CPqUMtCL.js → agents-D6g_SeWI.js} +1 -1
- package/dist/gateway/static/root/assets/{api-BEUEE4f2.js → api-_aHQA8bd.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-CKueEVbT.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CgVBSqzu.js → app-management-settings-panel-CLg_aXYG.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CoWdCokb.js → appearance-settings-CU52MfIT.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-ZpA1-6ad.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-C3ZA6LRS.js → archive-plugin-CHO3heHX.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CdgS6_zy.js → attachment-load-BsmsBCI2.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BtHL2hpg.js → automations-page-CftigJlf.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-IEAxKRME.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CiDhtq_H.js → binary-plugins-CRCLWBo2.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Br00T83w.js → block-editor-D0LDiOTT.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-D2tILykA.js → browser-automation-inputs-C611KRBx.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BVuEmryB.js → browser-automations-page-Djyv3vy-.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-CU4VWsmX.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-C9XQk3HL.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-Bqlhjooi.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-JsMtzDao.js → chat-terminal-dock-CIsKqdET.js} +2 -2
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE-Cq1tE_3b.js → chunk-KS7C4IRE-BMYIfy9x.js} +2 -2
- package/dist/gateway/static/root/assets/computer-settings-page-C0YL9J7m.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-DZFNUTiN.js → connector-service-page-BmH17JnO.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-zkx8Q-e6.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-CDsfv8R0.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-B-BcuG1y.js → dependency-picker-DvhPj3CZ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CdBBhhdY.js → desktop-pet-Cyg8XMpL.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CE4GOlMM.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-CdKJqnnw.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BFp5eKtY.js → extension-debug-page-D-AVJU3q.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DL3vyyH6.js → extension-page-DrFoQ9xt.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BXtvdAsY.js → extension-settings-page-DxWjESC1.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-xAOGtenO.js → gateway-config-swr-DUDX42qY.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BuaTsMSi.js → gateway-realtime-CGOW0-b4.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-D4um_sV7.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CgXp2zq4.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BwDxKHd4.js → gateway-startup-retry-Cf8OxlvY.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-D6Idk732.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-wGMeI_yW.js → image-generation-api-D2YorS--.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-zexFT5Rq.js → imports-page-BKucJlXI.js} +1 -1
- package/dist/gateway/static/root/assets/index-1wIKA-kM.css +1 -0
- package/dist/gateway/static/root/assets/index-PFQHPGgi.js +79 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CutG9zLh.js → keyboard-shortcuts-settings-BxLXD-yU.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BmAqTRb4.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CJy6I7Dt.js → local-apps-page-BAsQJQKJ.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DPZ79W1-.js → locale-store-DA0Z5jM_.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-egGcPHNi.js → logs-page-ZjVYXXyM.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-BQhIOELc.js → management-settings-CSTkYVOZ.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-DSjfHfaW.css +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-p2P5hP1U.js → markdown-view-DYGPxPee.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CsBylqlN.js → media-plugins-CQtQzLyg.js} +1 -1
- package/dist/gateway/static/root/assets/messages-4BtQKYlM.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DuXCt-MM.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-BjOgBVq5.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-ChQ4jJFs.js → page-tabs-B6DjkyMM.js} +1 -1
- package/dist/gateway/static/root/assets/{popover-select-9i-ZtHXL.js → popover-select-B-GDnZO9.js} +1 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-Dn57uLhr.js +1 -0
- package/dist/gateway/static/root/assets/product-delivery-CrAI8ZEa.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-BADxWEdP.js → product-open-page-H2YMk8TY.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-0zi4-i9X.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-B18OxmJj.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-B_e_nZSN.js → registry-api-C0DCx3wv.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-z-DxbuaE.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-D-pwiIyp.js → runtime-tools-settings-panel-DGsBTbo6.js} +2 -2
- package/dist/gateway/static/root/assets/scenes-page-Bgba03B_.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-IWmb05DX.js → schema-form-CblI9WUA.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-B1t3bMsm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CBX0Ezhf.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-B0veRBZs.js → settings-form-section-BAaVyxJH.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-CKNPbm5q.js +1 -0
- package/dist/gateway/static/root/assets/settings-page-layout-DqNCGKxQ.js +1 -0
- package/dist/gateway/static/root/assets/{settings-shell-layer-context-DCp6ykjQ.js → settings-shell-layer-context-BTQUDoJ2.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Bw71C2X3.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-CirpgkfD.js → share-preview-page-BzMfp_HM.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BoVDQolc.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DtTptpAt.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DIht92q6.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-B42mpWKV.js → skills-page.utils-DLYRiEn3.js} +1 -1
- package/dist/gateway/static/root/assets/system-settings-panel-yYs4YgYk.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-vgkiGo-D.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-BFbj_2Tu.js → theme-store-CegIlB8d.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-BasDYxvx.js +1 -0
- package/dist/gateway/static/root/assets/use-autosave-CWAUHhcb.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-CAGafNfP.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BZbKQ8HT.js → voice-api-key-field-Kc4UlxZs.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-SKCeQLrH.js → voice-config-api-DTyMdGOR.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BRVTTXNG.js → work-discovery-overlay-BPC_c9dO.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D2kuwv5e.js → workflow-run-setup-panel-DBTciOrq.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CSxHVs1p.js +6 -0
- package/dist/gateway/static/root/connector-icons/SOURCES.md +0 -2
- package/dist/gateway/static/root/index.html +18 -21
- package/dist/gateway/static/root/notification-sw.js +1 -1
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/notifications.js +12 -11
- package/dist/packages/gateway-contract/src/proactive.js +6 -6
- package/dist/packages/gateway-contract/src/product-delivery.js +1 -0
- package/dist/packages/gateway-contract/src/project-monitoring.js +4 -4
- package/dist/packages/gateway-contract/src/project-operating.js +1 -4
- package/dist/src/agent/agent-manager.d.ts +2 -6
- package/dist/src/agent/agent-manager.js +2 -1
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/context/execution-scope.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.d.ts +47 -0
- package/dist/src/agent/external-tools/cliProvider.js +317 -0
- package/dist/src/agent/external-tools/composio-provider.js +3 -3
- package/dist/src/agent/external-tools/gateway-tools.js +8 -2
- package/dist/src/agent/external-tools/index.js +6 -0
- package/dist/src/agent/external-tools/service.js +1 -1
- package/dist/src/agent/external-tools/types.d.ts +1 -1
- package/dist/src/agent/external-tools/types.js +1 -0
- 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/turn-provenance.js +2 -1
- package/dist/src/agent/service/parse-outbound-session-key.js +1 -1
- package/dist/src/agent/service.js +1 -0
- package/dist/src/agent/service.types.d.ts +2 -0
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +43 -16
- package/dist/src/agent/tools/factory.d.ts +2 -0
- package/dist/src/agent/tools/factory.js +3 -2
- package/dist/src/agent/tools/search/providers/xopc-cloud.d.ts +20 -0
- package/dist/src/agent/tools/search/providers/xopc-cloud.js +56 -0
- package/dist/src/agent/tools/search/registry.d.ts +4 -2
- package/dist/src/agent/tools/search/registry.js +5 -3
- package/dist/src/agent/tools/xopc-use-tool.d.ts +4 -2
- package/dist/src/agent/tools/xopc-use-tool.js +104 -44
- package/dist/src/automations/service/automation-service.d.ts +0 -4
- package/dist/src/automations/service/automation-service.js +0 -31
- package/dist/src/capabilities/store-connector.js +46 -0
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/project.js +1 -1
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/schema.d.ts +13 -4
- package/dist/src/config/schema.js +10 -14
- package/dist/src/config/web-patch.js +0 -5
- package/dist/src/connectors/account-selection.d.ts +14 -0
- package/dist/src/connectors/account-selection.js +26 -0
- package/dist/src/connectors/china-catalog.js +93 -226
- package/dist/src/connectors/cli/adapterRegistry.d.ts +4 -0
- package/dist/src/connectors/cli/adapterRegistry.js +26 -0
- package/dist/src/connectors/cli/adapters/lark.d.ts +2 -0
- package/dist/src/connectors/cli/adapters/lark.js +143 -0
- package/dist/src/connectors/cli/adapters/larkShortcuts.d.ts +3 -0
- package/dist/src/connectors/cli/adapters/larkShortcuts.js +64 -0
- package/dist/src/connectors/cli/adapters/wecom.d.ts +2 -0
- package/dist/src/connectors/cli/adapters/wecom.js +97 -0
- package/dist/src/connectors/cli/adapters/wps365/bundle.js +575 -0
- package/dist/src/connectors/cli/adapters/wps365.d.ts +2 -0
- package/dist/src/connectors/cli/adapters/wps365.js +115 -0
- package/dist/src/connectors/cli/assets.d.ts +3 -0
- package/dist/src/connectors/cli/assets.js +44 -0
- package/dist/src/connectors/cli/authorization.d.ts +16 -0
- package/dist/src/connectors/cli/authorization.js +184 -0
- package/dist/src/connectors/cli/distributions.d.ts +4 -0
- package/dist/src/connectors/cli/distributions.js +69 -0
- package/dist/src/connectors/cli/installer.d.ts +5 -0
- package/dist/src/connectors/cli/installer.js +102 -0
- package/dist/src/connectors/cli/lifecycle.d.ts +1 -0
- package/dist/src/connectors/cli/lifecycle.js +19 -0
- package/dist/src/connectors/cli/process.d.ts +18 -0
- package/dist/src/connectors/cli/process.js +100 -0
- package/dist/src/connectors/cli/protocol.d.ts +10 -0
- package/dist/src/connectors/cli/protocol.js +63 -0
- package/dist/src/connectors/cli/runtime.d.ts +10 -0
- package/dist/src/connectors/cli/runtime.js +93 -0
- package/dist/src/connectors/cli/store.d.ts +35 -0
- package/dist/src/connectors/cli/store.js +121 -0
- package/dist/src/connectors/cli/types.d.ts +73 -0
- package/dist/src/connectors/composio-backends.js +1 -1
- package/dist/src/connectors/composio-sessions.d.ts +1 -0
- package/dist/src/connectors/composio-sessions.js +8 -3
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connection-candidates.js +22 -3
- package/dist/src/connectors/connection-recovery-service.d.ts +1 -0
- package/dist/src/connectors/connection-recovery-service.js +53 -8
- package/dist/src/connectors/health.js +52 -0
- package/dist/src/connectors/instances.js +5 -1
- package/dist/src/connectors/lifecycle.js +2 -0
- package/dist/src/connectors/principal.js +2 -1
- package/dist/src/connectors/runtime-adapter-registry.js +31 -0
- package/dist/src/connectors/types.d.ts +13 -1
- package/dist/src/connectors/usage.js +1 -1
- package/dist/src/connectors/workflow-preflight.js +8 -4
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/gateway/hono/app.d.ts +2 -0
- package/dist/src/gateway/hono/app.js +4 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +3 -15
- package/dist/src/gateway/hono/lib/config-payload.js +1 -11
- package/dist/src/gateway/hono/routes/cli-connectors.d.ts +3 -0
- package/dist/src/gateway/hono/routes/cli-connectors.js +219 -0
- package/dist/src/gateway/hono/routes/config-patch/gateway.d.ts +2 -2
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +0 -59
- package/dist/src/gateway/hono/routes/config.js +0 -16
- package/dist/src/gateway/hono/routes/connectors.js +21 -22
- package/dist/src/gateway/hono/routes/deps.d.ts +2 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +4 -17
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/public-gateway.js +0 -1
- package/dist/src/gateway/hono/routes/scenes.d.ts +3 -0
- package/dist/src/gateway/hono/routes/scenes.js +142 -0
- package/dist/src/gateway/hono/routes/tasks.js +0 -46
- package/dist/src/gateway/hono/routes/user-model.js +54 -1
- package/dist/src/gateway/scenes/browserNotifications.d.ts +4 -0
- package/dist/src/gateway/scenes/browserNotifications.js +54 -0
- package/dist/src/gateway/scenes/host.d.ts +34 -0
- package/dist/src/gateway/scenes/host.js +130 -0
- package/dist/src/gateway/scenes/mailContext.d.ts +32 -0
- package/dist/src/gateway/scenes/mailContext.js +235 -0
- package/dist/src/gateway/security/gateway-scopes.js +0 -4
- package/dist/src/gateway/security/index.js +1 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -10
- package/dist/src/gateway/service/config-coordinator.js +0 -16
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service.d.ts +4 -25
- package/dist/src/gateway/service.js +44 -99
- package/dist/src/gateway/session-context-summary.js +2 -1
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/infra/unhandled-rejections.js +1 -1
- package/dist/src/migrations/runner.js +1 -4
- package/dist/src/notifications/browser-endpoint.d.ts +2 -0
- package/dist/src/notifications/browser-endpoint.js +13 -0
- package/dist/src/notifications/browserSubscriptions.d.ts +20 -0
- package/dist/src/notifications/browserSubscriptions.js +59 -0
- package/dist/src/notifications/browserTransport.d.ts +9 -0
- package/dist/src/notifications/browserTransport.js +64 -0
- package/dist/src/notifications/dispatch.d.ts +46 -0
- package/dist/src/notifications/dispatch.js +109 -0
- package/dist/src/notifications/domain-delivery.d.ts +21 -0
- package/dist/src/notifications/planner.js +0 -36
- package/dist/src/notifications/quietHours.d.ts +6 -0
- package/dist/src/notifications/quietHours.js +23 -0
- package/dist/src/notifications/resultOutbox.d.ts +23 -0
- package/dist/src/notifications/resultOutbox.js +49 -0
- package/dist/src/notifications/service.d.ts +18 -4
- package/dist/src/notifications/service.js +42 -61
- package/dist/src/notifications/store.d.ts +2 -1
- package/dist/src/notifications/store.js +7 -8
- package/dist/src/projects/project-service.d.ts +1 -4
- package/dist/src/projects/project-service.js +2 -30
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +19 -1
- package/dist/src/providers/model-catalog-store.js +1 -0
- package/dist/src/providers/model-catalog-types.d.ts +17 -0
- package/dist/src/providers/xopc-cloud-model-source.js +27 -0
- package/dist/src/scenes/agentExecutor.d.ts +8 -0
- package/dist/src/scenes/agentExecutor.js +63 -0
- package/dist/src/scenes/contracts.d.ts +118 -0
- package/dist/src/scenes/contracts.js +145 -0
- package/dist/src/scenes/execution.d.ts +56 -0
- package/dist/src/scenes/execution.js +168 -0
- package/dist/src/scenes/httpServices.d.ts +34 -0
- package/dist/src/scenes/inbox.d.ts +16 -0
- package/dist/src/scenes/inbox.js +68 -0
- package/dist/src/scenes/mailContext.d.ts +20 -0
- package/dist/src/scenes/mailContext.js +106 -0
- package/dist/src/scenes/mailObservations.d.ts +20 -0
- package/dist/src/scenes/mailObservations.js +107 -0
- package/dist/src/scenes/maintenance.d.ts +3 -0
- package/dist/src/scenes/maintenance.js +24 -0
- package/dist/src/scenes/metrics.d.ts +37 -0
- package/dist/src/scenes/metrics.js +100 -0
- package/dist/src/scenes/model.d.ts +3 -0
- package/dist/src/scenes/model.js +10 -0
- package/dist/src/scenes/notificationEligibility.d.ts +17 -0
- package/dist/src/scenes/notificationEligibility.js +72 -0
- package/dist/src/scenes/notificationPublication.d.ts +7 -0
- package/dist/src/scenes/notificationPublication.js +43 -0
- package/dist/src/scenes/preferences.d.ts +40 -0
- package/dist/src/scenes/preferences.js +108 -0
- package/dist/src/scenes/readiness.d.ts +7 -0
- package/dist/src/scenes/readiness.js +20 -0
- package/dist/src/scenes/repository.d.ts +174 -0
- package/dist/src/scenes/repository.js +740 -0
- package/dist/src/scenes/resultNotifications.d.ts +17 -0
- package/dist/src/scenes/resultNotifications.js +204 -0
- package/dist/src/scenes/runtime.d.ts +25 -0
- package/dist/src/scenes/runtime.js +101 -0
- package/dist/src/scenes/schedule.d.ts +9 -0
- package/dist/src/scenes/schedule.js +45 -0
- package/dist/src/scenes/service.d.ts +29 -0
- package/dist/src/scenes/service.js +116 -0
- package/dist/src/scenes/templates.d.ts +64 -0
- package/dist/src/scenes/templates.js +76 -0
- package/dist/src/scenes/userNotes.d.ts +10 -0
- package/dist/src/scenes/userNotes.js +34 -0
- package/dist/src/session/resolve-session.js +2 -1
- package/dist/src/session/store.js +2 -1
- package/dist/src/share/share-config.js +0 -5
- package/dist/src/share/site-share-config.js +0 -5
- package/dist/src/storage/sqlite/connection-wait-repository.js +20 -7
- package/dist/src/storage/sqlite/connection.js +1 -1
- package/dist/src/storage/sqlite/connector-account-repository.js +1 -0
- package/dist/src/storage/sqlite/connector-sync-policy-repository.d.ts +0 -4
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +3 -17
- package/dist/src/storage/sqlite/conversation-repository.js +2 -1
- package/dist/src/storage/sqlite/index.js +2 -1
- package/dist/src/storage/sqlite/migrations/187_cli_connectors.sql +34 -0
- package/dist/src/storage/sqlite/migrations/188_scene_storage.sql +2 -0
- package/dist/src/storage/sqlite/migrations/189_scene_source_health.sql +8 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +2 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +7 -3
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +20 -44
- package/dist/src/storage/sqlite/migrations/scene-reset.d.ts +5 -0
- package/dist/src/storage/sqlite/migrations/scene-reset.js +40 -0
- package/dist/src/storage/sqlite/scenes-schema.d.ts +8 -0
- package/dist/src/storage/sqlite/scenes-schema.js +61 -0
- package/dist/src/storage/sqlite/schema.js +4 -10
- package/dist/src/storage/sqlite/schemas/notifications.sql +65 -0
- package/dist/src/storage/sqlite/schemas/scenes.sql +212 -0
- package/dist/src/storage/sqlite/session-read-repository.d.ts +8 -0
- package/dist/src/storage/sqlite/session-read-repository.js +35 -0
- package/dist/src/storage/sqlite/session-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/session-repository.js +2 -25
- package/dist/src/storage/sqlite/sql-assets.d.ts +2 -0
- package/dist/src/storage/sqlite/sql-assets.js +18 -0
- package/dist/src/storage/sqlite/transaction.d.ts +2 -0
- package/dist/src/storage/sqlite/transaction.js +20 -1
- package/dist/src/tasks/home-query-service.d.ts +0 -2
- package/dist/src/tasks/home-query-service.js +13 -43
- package/dist/src/tasks/index.d.ts +0 -1
- package/dist/src/tasks/index.js +4 -5
- package/dist/src/tasks/project-operating-view-service.js +1 -4
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/user-model/goals.d.ts +10 -0
- package/dist/src/user-model/goals.js +29 -1
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/voice/realtime/memory-context.js +2 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +5 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-f0-YFMUz.js +0 -1
- package/dist/gateway/static/root/assets/api-CN4id43t.js +0 -1
- package/dist/gateway/static/root/assets/app-link-BiBXVEvp.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-CexHOcWg.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-onJPfmO6.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-BgVTyPFY.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-Dra8wj1S.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-CkxiMDJ4.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-Dtder4G_.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-DHerePwo.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-cl9ZrV4D.js +0 -2
- package/dist/gateway/static/root/assets/cron-expression-DAhdv_Xv.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-PacO1m3a.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-Gy03NgMI.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-aV25nKag.js +0 -1
- package/dist/gateway/static/root/assets/external-link-DjqjBmc3.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BG95uGVW.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Dcr2Ikeh.js +0 -1
- package/dist/gateway/static/root/assets/globe-DSSGFWFn.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DOy3alvT.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CDm3dGVy.js +0 -1
- package/dist/gateway/static/root/assets/index-D-vczw_0.css +0 -1
- package/dist/gateway/static/root/assets/index-DJo4DimT.js +0 -79
- package/dist/gateway/static/root/assets/loader-circle-CifKLtgG.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CwLvTwjn.js +0 -2
- package/dist/gateway/static/root/assets/markdown-view-Y68dCxuc.css +0 -1
- package/dist/gateway/static/root/assets/messages-BiYTyLJr.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-c2k5Uz6X.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-BLQWJMhf.js +0 -8
- package/dist/gateway/static/root/assets/preview-open-alternatives-9B5W7nVE.js +0 -1
- package/dist/gateway/static/root/assets/proactive-page-iOjI0d_e.js +0 -1
- package/dist/gateway/static/root/assets/product-delivery-CCC4FJ3Y.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BcxbQn2M.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BuSvld0O.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CFS8LQKW.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-DZjc__ok.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C1SM5B93.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-CxRWyWYe.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-layout-X1x-2Cp9.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-D9Rl7Tec.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-CwCThBs0.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DG6VGbOX.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BdRJ2vnL.js +0 -2
- package/dist/gateway/static/root/assets/system-settings-panel-DXIZpAvU.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-QXo9LJly.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-Db2guRdW.js +0 -1
- package/dist/gateway/static/root/assets/use-autosave-DDY9qoXZ.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-CzPmMkaO.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-CQXtiYtq.js +0 -6
- package/dist/gateway/static/root/connector-icons/wps-calendar.svg +0 -14
- package/dist/gateway/static/root/connector-icons/wps-mail.svg +0 -7
- package/dist/src/connectors/source-change-publisher.d.ts +0 -17
- package/dist/src/connectors/source-change-publisher.js +0 -151
- package/dist/src/gateway/heartbeat/check-store.d.ts +0 -18
- package/dist/src/gateway/heartbeat/check-store.js +0 -74
- package/dist/src/gateway/heartbeat/index.d.ts +0 -1
- package/dist/src/gateway/heartbeat/index.js +0 -2
- package/dist/src/gateway/heartbeat/service.d.ts +0 -55
- package/dist/src/gateway/heartbeat/service.js +0 -228
- package/dist/src/gateway/hono/routes/proactive-control.d.ts +0 -3
- package/dist/src/gateway/hono/routes/proactive-control.js +0 -135
- package/dist/src/gateway/hono/routes/proactive.d.ts +0 -4
- package/dist/src/gateway/hono/routes/proactive.js +0 -164
- package/dist/src/gateway/hono/routes/workspace.d.ts +0 -3
- package/dist/src/gateway/hono/routes/workspace.js +0 -62
- package/dist/src/gateway/workspace-heartbeat-path.d.ts +0 -3
- package/dist/src/gateway/workspace-heartbeat-path.js +0 -14
- package/dist/src/migrations/conversation-routing-config.d.ts +0 -2
- package/dist/src/migrations/conversation-routing-config.js +0 -42
- package/dist/src/notifications/proactive-channel.d.ts +0 -8
- package/dist/src/notifications/proactive-channel.js +0 -60
- package/dist/src/notifications/proactive-policy.d.ts +0 -3
- package/dist/src/notifications/proactive-policy.js +0 -35
- package/dist/src/notifications/web-push.d.ts +0 -19
- package/dist/src/notifications/web-push.js +0 -185
- package/dist/src/proactive/actions/service.d.ts +0 -1
- package/dist/src/proactive/actions/service.js +0 -82
- package/dist/src/proactive/events/envelope.d.ts +0 -2
- package/dist/src/proactive/events/envelope.js +0 -54
- package/dist/src/proactive/events/product-event-bridge.d.ts +0 -7
- package/dist/src/proactive/events/product-event-bridge.js +0 -87
- package/dist/src/proactive/events/publisher.d.ts +0 -4
- package/dist/src/proactive/events/repository.d.ts +0 -9
- package/dist/src/proactive/events/repository.js +0 -63
- package/dist/src/proactive/events/types.d.ts +0 -44
- package/dist/src/proactive/events/types.js +0 -15
- package/dist/src/proactive/execution/agent-executor.d.ts +0 -21
- package/dist/src/proactive/execution/agent-executor.js +0 -125
- package/dist/src/proactive/execution/authorization.d.ts +0 -7
- package/dist/src/proactive/execution/authorization.js +0 -71
- package/dist/src/proactive/execution/context.d.ts +0 -49
- package/dist/src/proactive/execution/context.js +0 -408
- package/dist/src/proactive/execution/insight.d.ts +0 -14
- package/dist/src/proactive/execution/insight.js +0 -132
- package/dist/src/proactive/execution/repository.d.ts +0 -28
- package/dist/src/proactive/execution/repository.js +0 -211
- package/dist/src/proactive/execution/types.d.ts +0 -80
- package/dist/src/proactive/execution/worker.d.ts +0 -15
- package/dist/src/proactive/execution/worker.js +0 -146
- package/dist/src/proactive/experience.d.ts +0 -89
- package/dist/src/proactive/experience.js +0 -195
- package/dist/src/proactive/follow-ups.d.ts +0 -128
- package/dist/src/proactive/follow-ups.js +0 -182
- package/dist/src/proactive/inbox/cards.d.ts +0 -21
- package/dist/src/proactive/inbox/cards.js +0 -276
- package/dist/src/proactive/inbox/delivery.d.ts +0 -6
- package/dist/src/proactive/inbox/delivery.js +0 -54
- package/dist/src/proactive/inbox/digest.d.ts +0 -8
- package/dist/src/proactive/inbox/digest.js +0 -123
- package/dist/src/proactive/inbox/lifecycle.d.ts +0 -4
- package/dist/src/proactive/inbox/lifecycle.js +0 -62
- package/dist/src/proactive/inbox/notification-policy.d.ts +0 -1
- package/dist/src/proactive/inbox/notification-policy.js +0 -25
- package/dist/src/proactive/inbox/repository.d.ts +0 -25
- package/dist/src/proactive/inbox/repository.js +0 -244
- package/dist/src/proactive/inbox/service.d.ts +0 -23
- package/dist/src/proactive/inbox/service.js +0 -46
- package/dist/src/proactive/inbox/types.d.ts +0 -64
- package/dist/src/proactive/inbox/worker.d.ts +0 -13
- package/dist/src/proactive/inbox/worker.js +0 -71
- package/dist/src/proactive/index.d.ts +0 -20
- package/dist/src/proactive/index.js +0 -14
- package/dist/src/proactive/mail-thread.d.ts +0 -13
- package/dist/src/proactive/mail-thread.js +0 -55
- package/dist/src/proactive/maintenance.d.ts +0 -4
- package/dist/src/proactive/maintenance.js +0 -28
- package/dist/src/proactive/metrics.d.ts +0 -10
- package/dist/src/proactive/metrics.js +0 -28
- package/dist/src/proactive/policy/presence.d.ts +0 -2
- package/dist/src/proactive/policy/presence.js +0 -30
- package/dist/src/proactive/policy/service.d.ts +0 -54
- package/dist/src/proactive/policy/service.js +0 -123
- package/dist/src/proactive/routing/batch-repository.d.ts +0 -27
- package/dist/src/proactive/routing/batch-repository.js +0 -57
- package/dist/src/proactive/routing/matcher.d.ts +0 -5
- package/dist/src/proactive/routing/matcher.js +0 -57
- package/dist/src/proactive/routing/types.d.ts +0 -44
- package/dist/src/proactive/routing/types.js +0 -1
- package/dist/src/proactive/scenarios/control.d.ts +0 -52
- package/dist/src/proactive/scenarios/control.js +0 -75
- package/dist/src/proactive/scenarios/prompt-composer.d.ts +0 -14
- package/dist/src/proactive/scenarios/prompt-composer.js +0 -26
- package/dist/src/proactive/scenarios/repository.d.ts +0 -23
- package/dist/src/proactive/scenarios/repository.js +0 -174
- package/dist/src/proactive/scenarios/service.d.ts +0 -15
- package/dist/src/proactive/scenarios/service.js +0 -26
- package/dist/src/proactive/scenarios/types.d.ts +0 -43
- package/dist/src/proactive/scenarios/types.js +0 -1
- package/dist/src/proactive/service.d.ts +0 -25
- package/dist/src/proactive/service.js +0 -78
- package/dist/src/proactive/source-freshness.d.ts +0 -8
- package/dist/src/proactive/source-freshness.js +0 -28
- package/dist/src/proactive/status.d.ts +0 -2
- package/dist/src/proactive/status.js +0 -22
- package/dist/src/proactive/temporal/schedule.d.ts +0 -3
- package/dist/src/proactive/temporal/schedule.js +0 -68
- package/dist/src/proactive/temporal/worker.d.ts +0 -17
- package/dist/src/proactive/temporal/worker.js +0 -129
- package/dist/src/tasks/project-monitoring-service.d.ts +0 -32
- package/dist/src/tasks/project-monitoring-service.js +0 -118
- /package/dist/src/{proactive/execution → connectors/cli}/types.js +0 -0
- /package/dist/src/{proactive/events/publisher.js → notifications/domain-delivery.js} +0 -0
- /package/dist/src/{proactive/inbox/types.js → scenes/httpServices.js} +0 -0
|
@@ -1,97 +1,92 @@
|
|
|
1
1
|
//#region src/connectors/china-catalog.ts
|
|
2
|
-
const FEISHU_MCP_VERSION = "0.5.1";
|
|
3
2
|
const DINGTALK_MCP_VERSION = "1.1.21";
|
|
4
3
|
const CHINA_CONNECTORS = [
|
|
5
4
|
{
|
|
6
5
|
id: "feishu-workspace",
|
|
7
|
-
version:
|
|
6
|
+
version: "1.0.96",
|
|
8
7
|
displayName: "飞书办公",
|
|
9
|
-
description: "
|
|
8
|
+
description: "连接飞书账号,搜索和读取文档、查询日程和联系人,并按权限创建日程。",
|
|
10
9
|
category: "docs",
|
|
11
|
-
kind: "
|
|
10
|
+
kind: "cli",
|
|
12
11
|
source: "builtin",
|
|
13
|
-
capabilities: [
|
|
14
|
-
"tools",
|
|
15
|
-
"runtime.mcp.stdio",
|
|
16
|
-
"auth.apiKey"
|
|
17
|
-
],
|
|
12
|
+
capabilities: ["tools"],
|
|
18
13
|
benefits: ["understand", "act"],
|
|
19
14
|
tags: [
|
|
20
15
|
"中国",
|
|
16
|
+
"Feishu",
|
|
17
|
+
"Lark",
|
|
21
18
|
"飞书",
|
|
22
|
-
"文档",
|
|
23
|
-
"知识库",
|
|
24
19
|
"日历",
|
|
25
|
-
"
|
|
20
|
+
"文档",
|
|
21
|
+
"文件",
|
|
22
|
+
"联系人"
|
|
26
23
|
],
|
|
27
24
|
branding: {
|
|
28
25
|
logoUrl: "/channel-icons/feishu.svg",
|
|
29
26
|
source: "builtin"
|
|
30
27
|
},
|
|
31
|
-
verificationLevel: "
|
|
32
|
-
auth: { mode: "
|
|
33
|
-
setup: {
|
|
34
|
-
links: [{
|
|
35
|
-
label: "前往飞书开放平台创建应用",
|
|
36
|
-
href: "https://open.feishu.cn/app",
|
|
37
|
-
external: true
|
|
38
|
-
}],
|
|
39
|
-
secrets: [{
|
|
40
|
-
key: "appId",
|
|
41
|
-
label: "App ID",
|
|
42
|
-
description: "在飞书开放平台的应用凭证页复制。",
|
|
43
|
-
required: true
|
|
44
|
-
}, {
|
|
45
|
-
key: "appSecret",
|
|
46
|
-
label: "App Secret",
|
|
47
|
-
description: "与 App ID 同一凭证页,仅保存在本机凭据存储。",
|
|
48
|
-
required: true
|
|
49
|
-
}],
|
|
50
|
-
config: [{
|
|
51
|
-
key: "tools",
|
|
52
|
-
label: "启用工具",
|
|
53
|
-
type: "string",
|
|
54
|
-
required: true,
|
|
55
|
-
defaultValue: "preset.light",
|
|
56
|
-
description: "飞书 MCP 工具预设或逗号分隔的工具列表。"
|
|
57
|
-
}]
|
|
58
|
-
},
|
|
28
|
+
verificationLevel: "beta",
|
|
29
|
+
auth: { mode: "cli" },
|
|
30
|
+
setup: {},
|
|
59
31
|
runtime: {
|
|
60
|
-
type: "
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
name: "@larksuiteoapi/lark-mcp",
|
|
65
|
-
version: FEISHU_MCP_VERSION
|
|
66
|
-
},
|
|
67
|
-
serverTemplate: {
|
|
68
|
-
command: "npx",
|
|
69
|
-
args: [
|
|
70
|
-
"-y",
|
|
71
|
-
`@larksuiteoapi/lark-mcp@${FEISHU_MCP_VERSION}`,
|
|
72
|
-
"mcp"
|
|
73
|
-
],
|
|
74
|
-
env: {
|
|
75
|
-
APP_ID: "{{secrets.appId}}",
|
|
76
|
-
APP_SECRET: "{{secrets.appSecret}}",
|
|
77
|
-
LARK_TOOLS: "{{config.tools}}",
|
|
78
|
-
LARK_DOMAIN: "https://open.feishu.cn",
|
|
79
|
-
LARK_TOKEN_MODE: "auto"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
32
|
+
type: "cli",
|
|
33
|
+
adapterId: "lark",
|
|
34
|
+
adapterVersion: "1",
|
|
35
|
+
binaryVersion: "1.0.96"
|
|
82
36
|
},
|
|
83
37
|
permissions: {
|
|
38
|
+
localExec: true,
|
|
84
39
|
data: [
|
|
40
|
+
"calendar",
|
|
85
41
|
"documents",
|
|
86
|
-
"
|
|
87
|
-
"calendar"
|
|
42
|
+
"contacts"
|
|
88
43
|
],
|
|
89
|
-
networkDomains: ["open.feishu.cn"]
|
|
44
|
+
networkDomains: ["open.feishu.cn"]
|
|
45
|
+
},
|
|
46
|
+
integrationStrategy: {
|
|
47
|
+
lane: "native",
|
|
48
|
+
workload: "core",
|
|
49
|
+
preferred: true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "wecom-workspace",
|
|
54
|
+
version: "1.3.0",
|
|
55
|
+
displayName: "企业微信办公",
|
|
56
|
+
description: "扫码连接企业微信,搜索和读取文档、查询联系人和待办,并按权限创建待办。",
|
|
57
|
+
category: "docs",
|
|
58
|
+
kind: "cli",
|
|
59
|
+
source: "builtin",
|
|
60
|
+
capabilities: ["tools"],
|
|
61
|
+
benefits: ["understand", "act"],
|
|
62
|
+
tags: [
|
|
63
|
+
"中国",
|
|
64
|
+
"WeCom",
|
|
65
|
+
"企业微信",
|
|
66
|
+
"文档",
|
|
67
|
+
"联系人",
|
|
68
|
+
"待办"
|
|
69
|
+
],
|
|
70
|
+
verificationLevel: "beta",
|
|
71
|
+
auth: { mode: "cli" },
|
|
72
|
+
setup: {},
|
|
73
|
+
runtime: {
|
|
74
|
+
type: "cli",
|
|
75
|
+
adapterId: "wecom",
|
|
76
|
+
adapterVersion: "1",
|
|
77
|
+
binaryVersion: "1.3.0"
|
|
78
|
+
},
|
|
79
|
+
permissions: {
|
|
90
80
|
localExec: true,
|
|
91
|
-
|
|
81
|
+
data: [
|
|
82
|
+
"documents",
|
|
83
|
+
"contacts",
|
|
84
|
+
"tasks"
|
|
85
|
+
],
|
|
86
|
+
networkDomains: ["qyapi.weixin.qq.com"]
|
|
92
87
|
},
|
|
93
88
|
integrationStrategy: {
|
|
94
|
-
lane: "
|
|
89
|
+
lane: "native",
|
|
95
90
|
workload: "core",
|
|
96
91
|
preferred: true
|
|
97
92
|
}
|
|
@@ -186,61 +181,53 @@ const CHINA_CONNECTORS = [
|
|
|
186
181
|
}
|
|
187
182
|
},
|
|
188
183
|
{
|
|
189
|
-
id: "
|
|
190
|
-
version: "
|
|
191
|
-
displayName: "WPS 365
|
|
192
|
-
description: "
|
|
184
|
+
id: "wps365-workspace",
|
|
185
|
+
version: "0.3.6",
|
|
186
|
+
displayName: "WPS 365",
|
|
187
|
+
description: "连接 WPS 365 企业账号,查看和搜索云文档、日程及邮件。当前仅支持读取。",
|
|
193
188
|
category: "docs",
|
|
194
|
-
kind: "
|
|
189
|
+
kind: "cli",
|
|
195
190
|
source: "builtin",
|
|
196
|
-
capabilities: [
|
|
197
|
-
|
|
198
|
-
"runtime.mcp.streamableHttp",
|
|
199
|
-
"auth.apiKey"
|
|
200
|
-
],
|
|
201
|
-
benefits: ["understand", "act"],
|
|
191
|
+
capabilities: ["tools"],
|
|
192
|
+
benefits: ["understand"],
|
|
202
193
|
tags: [
|
|
203
194
|
"中国",
|
|
204
195
|
"WPS",
|
|
196
|
+
"WPS365",
|
|
197
|
+
"金山",
|
|
198
|
+
"金山文档",
|
|
205
199
|
"云文档",
|
|
206
|
-
"
|
|
200
|
+
"日历",
|
|
201
|
+
"邮箱"
|
|
207
202
|
],
|
|
208
203
|
branding: {
|
|
209
204
|
logoUrl: "/connector-icons/wps-docs.svg",
|
|
210
205
|
source: "builtin"
|
|
211
206
|
},
|
|
212
|
-
verificationLevel: "
|
|
213
|
-
auth: { mode: "
|
|
214
|
-
setup: {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}],
|
|
220
|
-
secrets: [{
|
|
221
|
-
key: "accessToken",
|
|
222
|
-
label: "用户 Access Token",
|
|
223
|
-
description: "需先创建 WPS 开放平台应用并完成用户授权。",
|
|
224
|
-
required: true
|
|
225
|
-
}]
|
|
226
|
-
},
|
|
207
|
+
verificationLevel: "beta",
|
|
208
|
+
auth: { mode: "cli" },
|
|
209
|
+
setup: { links: [{
|
|
210
|
+
label: "WPS 365 企业授权与权限说明",
|
|
211
|
+
href: "https://open.wps.cn/documents/wps365-cli",
|
|
212
|
+
external: true
|
|
213
|
+
}] },
|
|
227
214
|
runtime: {
|
|
228
|
-
type: "
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
transport: "streamable-http",
|
|
233
|
-
headers: { Authorization: "Bearer {{secrets.accessToken}}" }
|
|
234
|
-
}
|
|
215
|
+
type: "cli",
|
|
216
|
+
adapterId: "wps365",
|
|
217
|
+
adapterVersion: "1",
|
|
218
|
+
binaryVersion: "0.3.6"
|
|
235
219
|
},
|
|
236
220
|
permissions: {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
221
|
+
localExec: true,
|
|
222
|
+
data: [
|
|
223
|
+
"documents",
|
|
224
|
+
"calendar",
|
|
225
|
+
"email"
|
|
226
|
+
],
|
|
227
|
+
networkDomains: ["openapi.wps.cn", "open.wps.cn"]
|
|
241
228
|
},
|
|
242
229
|
integrationStrategy: {
|
|
243
|
-
lane: "
|
|
230
|
+
lane: "native",
|
|
244
231
|
workload: "core",
|
|
245
232
|
preferred: true
|
|
246
233
|
}
|
|
@@ -304,126 +291,6 @@ const CHINA_CONNECTORS = [
|
|
|
304
291
|
workload: "core",
|
|
305
292
|
preferred: true
|
|
306
293
|
}
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
id: "wps-calendar",
|
|
310
|
-
version: "2.0.0",
|
|
311
|
-
displayName: "WPS 365 日历",
|
|
312
|
-
description: "通过 WPS 官方 MCP 查询日程、管理参与人并创建会议安排。",
|
|
313
|
-
category: "automation",
|
|
314
|
-
kind: "mcp",
|
|
315
|
-
source: "builtin",
|
|
316
|
-
capabilities: [
|
|
317
|
-
"tools",
|
|
318
|
-
"runtime.mcp.streamableHttp",
|
|
319
|
-
"auth.apiKey"
|
|
320
|
-
],
|
|
321
|
-
benefits: ["understand", "act"],
|
|
322
|
-
tags: [
|
|
323
|
-
"中国",
|
|
324
|
-
"WPS",
|
|
325
|
-
"日历",
|
|
326
|
-
"日程"
|
|
327
|
-
],
|
|
328
|
-
branding: {
|
|
329
|
-
logoUrl: "/connector-icons/wps-calendar.svg",
|
|
330
|
-
source: "builtin"
|
|
331
|
-
},
|
|
332
|
-
verificationLevel: "verified",
|
|
333
|
-
auth: { mode: "apiKey" },
|
|
334
|
-
setup: {
|
|
335
|
-
links: [{
|
|
336
|
-
label: "查看 WPS 用户 Access Token 获取流程",
|
|
337
|
-
href: "https://open.wps.cn/documents/app-integration-dev/wps365/server/certification-authorization/user-authorization/flow",
|
|
338
|
-
external: true
|
|
339
|
-
}],
|
|
340
|
-
secrets: [{
|
|
341
|
-
key: "accessToken",
|
|
342
|
-
label: "用户 Access Token",
|
|
343
|
-
description: "需先创建 WPS 开放平台应用并完成用户授权。",
|
|
344
|
-
required: true
|
|
345
|
-
}]
|
|
346
|
-
},
|
|
347
|
-
runtime: {
|
|
348
|
-
type: "mcp",
|
|
349
|
-
serverId: "wps_calendar",
|
|
350
|
-
serverTemplate: {
|
|
351
|
-
url: "https://openapi.wps.cn/mcp/v2/kso-calendar/message",
|
|
352
|
-
transport: "streamable-http",
|
|
353
|
-
headers: { Authorization: "Bearer {{secrets.accessToken}}" }
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
permissions: {
|
|
357
|
-
data: ["calendar"],
|
|
358
|
-
networkDomains: ["openapi.wps.cn"],
|
|
359
|
-
localExec: false,
|
|
360
|
-
filesystem: []
|
|
361
|
-
},
|
|
362
|
-
integrationStrategy: {
|
|
363
|
-
lane: "mcp",
|
|
364
|
-
workload: "core",
|
|
365
|
-
preferred: true
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
id: "wps-mail",
|
|
370
|
-
version: "2.0.0",
|
|
371
|
-
displayName: "WPS 365 邮箱",
|
|
372
|
-
description: "通过 WPS 官方 MCP 搜索邮件、读取邮件并创建或发送草稿。",
|
|
373
|
-
category: "automation",
|
|
374
|
-
kind: "mcp",
|
|
375
|
-
source: "builtin",
|
|
376
|
-
capabilities: [
|
|
377
|
-
"tools",
|
|
378
|
-
"runtime.mcp.streamableHttp",
|
|
379
|
-
"auth.apiKey"
|
|
380
|
-
],
|
|
381
|
-
benefits: ["understand", "act"],
|
|
382
|
-
tags: [
|
|
383
|
-
"中国",
|
|
384
|
-
"WPS",
|
|
385
|
-
"邮箱",
|
|
386
|
-
"邮件"
|
|
387
|
-
],
|
|
388
|
-
branding: {
|
|
389
|
-
logoUrl: "/connector-icons/wps-mail.svg",
|
|
390
|
-
source: "builtin"
|
|
391
|
-
},
|
|
392
|
-
verificationLevel: "verified",
|
|
393
|
-
auth: { mode: "apiKey" },
|
|
394
|
-
setup: {
|
|
395
|
-
links: [{
|
|
396
|
-
label: "查看 WPS 用户 Access Token 获取流程",
|
|
397
|
-
href: "https://open.wps.cn/documents/app-integration-dev/wps365/server/certification-authorization/user-authorization/flow",
|
|
398
|
-
external: true
|
|
399
|
-
}],
|
|
400
|
-
secrets: [{
|
|
401
|
-
key: "accessToken",
|
|
402
|
-
label: "用户 Access Token",
|
|
403
|
-
description: "需先创建 WPS 开放平台应用并完成用户授权。",
|
|
404
|
-
required: true
|
|
405
|
-
}]
|
|
406
|
-
},
|
|
407
|
-
runtime: {
|
|
408
|
-
type: "mcp",
|
|
409
|
-
serverId: "wps_mail",
|
|
410
|
-
serverTemplate: {
|
|
411
|
-
url: "https://openapi.wps.cn/mcp/v2/kso-mail/message",
|
|
412
|
-
transport: "streamable-http",
|
|
413
|
-
headers: { Authorization: "Bearer {{secrets.accessToken}}" }
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
permissions: {
|
|
417
|
-
data: ["email"],
|
|
418
|
-
networkDomains: ["openapi.wps.cn"],
|
|
419
|
-
localExec: false,
|
|
420
|
-
filesystem: []
|
|
421
|
-
},
|
|
422
|
-
integrationStrategy: {
|
|
423
|
-
lane: "mcp",
|
|
424
|
-
workload: "core",
|
|
425
|
-
preferred: true
|
|
426
|
-
}
|
|
427
294
|
}
|
|
428
295
|
];
|
|
429
296
|
//#endregion
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CliAdapter } from './types.js';
|
|
2
|
+
export declare function getCliAdapter(id: string): CliAdapter;
|
|
3
|
+
/** Register a trusted packaged protocol adapter; manifests cannot supply executable code. */
|
|
4
|
+
export declare function registerCliAdapter(adapter: CliAdapter): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { larkAdapter } from "./adapters/lark.js";
|
|
2
|
+
import { wps365Adapter } from "./adapters/wps365.js";
|
|
3
|
+
import { wecomAdapter } from "./adapters/wecom.js";
|
|
4
|
+
//#region src/connectors/cli/adapterRegistry.ts
|
|
5
|
+
const adapters = new Map([
|
|
6
|
+
larkAdapter,
|
|
7
|
+
wecomAdapter,
|
|
8
|
+
wps365Adapter
|
|
9
|
+
].map((adapter) => [adapter.id, adapter]));
|
|
10
|
+
function getCliAdapter(id) {
|
|
11
|
+
const adapter = adapters.get(id);
|
|
12
|
+
if (!adapter) throw new Error(`Unknown CLI adapter: ${id}`);
|
|
13
|
+
return adapter;
|
|
14
|
+
}
|
|
15
|
+
/** Register a trusted packaged protocol adapter; manifests cannot supply executable code. */
|
|
16
|
+
function registerCliAdapter(adapter) {
|
|
17
|
+
if (!/^[a-z][a-z0-9-]*$/.test(adapter.id) || adapters.has(adapter.id)) throw new Error("Invalid or duplicate CLI adapter.");
|
|
18
|
+
if (![
|
|
19
|
+
adapter.version,
|
|
20
|
+
adapter.binaryVersion,
|
|
21
|
+
adapter.executable
|
|
22
|
+
].every((value) => /^[a-zA-Z0-9_.-]+$/.test(value) && value !== "..")) throw new Error("Invalid CLI adapter version or executable.");
|
|
23
|
+
adapters.set(adapter.id, adapter);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { getCliAdapter, registerCliAdapter };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { CliProtocolError, actionRevision, closedSchema, object, parseJson } from "../protocol.js";
|
|
2
|
+
import { larkShortcutArgs, larkShortcuts } from "./larkShortcuts.js";
|
|
3
|
+
import { LARK_DISTRIBUTIONS } from "../distributions.js";
|
|
4
|
+
//#region src/connectors/cli/adapters/lark.ts
|
|
5
|
+
const curatedActions = {
|
|
6
|
+
"docs.search": "read",
|
|
7
|
+
"docs.fetch": "read",
|
|
8
|
+
"calendar.calendars.list": "read",
|
|
9
|
+
"calendar.events.instance_view": "read",
|
|
10
|
+
"calendar.events.get": "read",
|
|
11
|
+
"calendar.events.create": "write",
|
|
12
|
+
"drive.files.list": "read",
|
|
13
|
+
"drive.metas.batch_query": "read",
|
|
14
|
+
"contact.user_profiles.batch_query": "read"
|
|
15
|
+
};
|
|
16
|
+
function decodeLoginResult(output) {
|
|
17
|
+
const events = [];
|
|
18
|
+
for (const text of [output.stdout, output.stderr]) try {
|
|
19
|
+
events.push(object(JSON.parse(text)));
|
|
20
|
+
} catch {
|
|
21
|
+
for (const line of text.split("\n")) try {
|
|
22
|
+
events.push(object(JSON.parse(line)));
|
|
23
|
+
} catch {}
|
|
24
|
+
}
|
|
25
|
+
const complete = events.find((event) => event.event === "authorization_complete");
|
|
26
|
+
if (output.exitCode === 0 || output.exitCode === 3 && complete && typeof complete.user_open_id === "string" && complete.user_open_id.length > 0 && (complete.warning && typeof complete.warning === "object" ? object(complete.warning).type : void 0) === "missing_scope" && Array.isArray(complete.missing) && complete.missing.length > 0 && Array.isArray(complete.granted)) return;
|
|
27
|
+
const error = (events.find((event) => event.event === "authorization_failed") ?? events.find((event) => event.ok === false))?.error;
|
|
28
|
+
const message = typeof error === "string" ? error : error && typeof error === "object" ? object(error).message : void 0;
|
|
29
|
+
const detail = typeof message === "string" ? message.replace(/https?:\/\/[^\s"'<>]+/g, "[URL]").replace(/((?:[a-z_]*(?:token|secret|password|code)|authorization)\s*["']?\s*[:=]\s*["']?)[^\s"',;]+/gi, "$1[REDACTED]").replace(/[\r\n\x00-\x1f]+/g, " ").slice(0, 500) : "No structured error was returned.";
|
|
30
|
+
throw new Error(`Lark login failed (exit ${output.exitCode}): ${detail}`);
|
|
31
|
+
}
|
|
32
|
+
const larkAdapter = {
|
|
33
|
+
id: "lark",
|
|
34
|
+
version: "1",
|
|
35
|
+
binaryVersion: "1.0.96",
|
|
36
|
+
executable: "lark-cli",
|
|
37
|
+
distributions: LARK_DISTRIBUTIONS,
|
|
38
|
+
configEnvironment: "LARKSUITE_CLI_CONFIG_DIR",
|
|
39
|
+
dataEnvironment: "LARKSUITE_CLI_DATA_DIR",
|
|
40
|
+
curatedActions,
|
|
41
|
+
staticActions: larkShortcuts,
|
|
42
|
+
schemaArgs: (id) => ["schema", id],
|
|
43
|
+
decodeSchema(id, value) {
|
|
44
|
+
const row = object(value);
|
|
45
|
+
const meta = object(row._meta);
|
|
46
|
+
if (!curatedActions[id] || typeof row.name !== "string" || row.name.replaceAll(" ", ".") !== id) throw new Error("Unexpected Lark action schema.");
|
|
47
|
+
if (!Array.isArray(meta.access_tokens) || !meta.access_tokens.includes("user")) throw new Error("Lark action does not support user identity.");
|
|
48
|
+
const inputSchema = closedSchema(row.inputSchema);
|
|
49
|
+
return {
|
|
50
|
+
id,
|
|
51
|
+
description: String(row.description ?? id),
|
|
52
|
+
scope: curatedActions[id],
|
|
53
|
+
inputSchema,
|
|
54
|
+
anyScopes: Array.isArray(meta.scopes) ? meta.scopes.filter((x) => typeof x === "string") : [],
|
|
55
|
+
requiredScopes: Array.isArray(meta.required_scopes) ? meta.required_scopes.filter((x) => typeof x === "string") : [],
|
|
56
|
+
revision: actionRevision(value)
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
actionArgs(action, input) {
|
|
60
|
+
if (larkShortcuts[action.id]) return larkShortcutArgs(action, input);
|
|
61
|
+
const [service, ...segments] = action.id.split(".");
|
|
62
|
+
const method = segments.pop();
|
|
63
|
+
const args = [
|
|
64
|
+
service,
|
|
65
|
+
segments.join("."),
|
|
66
|
+
method,
|
|
67
|
+
"--as",
|
|
68
|
+
"user",
|
|
69
|
+
"--format",
|
|
70
|
+
"json"
|
|
71
|
+
];
|
|
72
|
+
for (const [key, value] of Object.entries(input)) {
|
|
73
|
+
if (!["params", "data"].includes(key)) throw new Error(`Unsupported Lark argument section: ${key}`);
|
|
74
|
+
args.push(`--${key}`, JSON.stringify(value));
|
|
75
|
+
}
|
|
76
|
+
return args;
|
|
77
|
+
},
|
|
78
|
+
decodeResult(output) {
|
|
79
|
+
const row = object(parseJson(output.exitCode === 0 ? output.stdout : output.stderr));
|
|
80
|
+
if (typeof row.ok !== "boolean") throw new CliProtocolError("Missing Lark result status.");
|
|
81
|
+
if (row.ok !== true) {
|
|
82
|
+
const error = row.error && typeof row.error === "object" ? object(row.error) : {};
|
|
83
|
+
throw new Error(String(error.message ?? "Lark command failed.").slice(0, 500));
|
|
84
|
+
}
|
|
85
|
+
return row.data;
|
|
86
|
+
},
|
|
87
|
+
statusArgs: [
|
|
88
|
+
"auth",
|
|
89
|
+
"status",
|
|
90
|
+
"--json",
|
|
91
|
+
"--verify"
|
|
92
|
+
],
|
|
93
|
+
decodeIdentity(output) {
|
|
94
|
+
const row = object(parseJson(output.stdout));
|
|
95
|
+
const user = object(object(row.identities).user);
|
|
96
|
+
if (output.exitCode !== 0 || user.available !== true || user.verified !== true || typeof user.openId !== "string" || typeof row.appId !== "string") throw new Error("Lark user authorization is not verified.");
|
|
97
|
+
return {
|
|
98
|
+
key: `${row.appId}:${user.openId}`,
|
|
99
|
+
label: String(user.userName ?? user.openId),
|
|
100
|
+
scopes: String(user.scope ?? "").split(/\s+/).filter(Boolean),
|
|
101
|
+
identity: {
|
|
102
|
+
appId: row.appId,
|
|
103
|
+
openId: user.openId,
|
|
104
|
+
name: user.userName,
|
|
105
|
+
kind: "user"
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
authorizationSteps: [{
|
|
110
|
+
initialOnly: true,
|
|
111
|
+
args: [
|
|
112
|
+
"config",
|
|
113
|
+
"init",
|
|
114
|
+
"--new"
|
|
115
|
+
],
|
|
116
|
+
challenge: "url",
|
|
117
|
+
urlHosts: [
|
|
118
|
+
"accounts.feishu.cn",
|
|
119
|
+
"open.feishu.cn",
|
|
120
|
+
"accounts.larksuite.com",
|
|
121
|
+
"open.larksuite.com"
|
|
122
|
+
]
|
|
123
|
+
}, {
|
|
124
|
+
decodeResult: decodeLoginResult,
|
|
125
|
+
urlField: "verification_uri_complete",
|
|
126
|
+
args: [
|
|
127
|
+
"auth",
|
|
128
|
+
"login",
|
|
129
|
+
"--domain",
|
|
130
|
+
"calendar,drive,contact,docs",
|
|
131
|
+
"--json"
|
|
132
|
+
],
|
|
133
|
+
challenge: "url",
|
|
134
|
+
urlHosts: [
|
|
135
|
+
"accounts.feishu.cn",
|
|
136
|
+
"open.feishu.cn",
|
|
137
|
+
"accounts.larksuite.com",
|
|
138
|
+
"open.larksuite.com"
|
|
139
|
+
]
|
|
140
|
+
}]
|
|
141
|
+
};
|
|
142
|
+
//#endregion
|
|
143
|
+
export { larkAdapter };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { actionRevision, closedSchema } from "../protocol.js";
|
|
2
|
+
const larkShortcuts = Object.fromEntries(Object.entries({
|
|
3
|
+
"docs.search": {
|
|
4
|
+
description: "Search visible Lark documents. Pass the returned page token to retrieve the next page.",
|
|
5
|
+
required: ["query"],
|
|
6
|
+
properties: {
|
|
7
|
+
query: {
|
|
8
|
+
type: "string",
|
|
9
|
+
minLength: 1
|
|
10
|
+
},
|
|
11
|
+
page_size: {
|
|
12
|
+
type: "integer",
|
|
13
|
+
minimum: 1,
|
|
14
|
+
maximum: 20
|
|
15
|
+
},
|
|
16
|
+
page_token: { type: "string" }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"docs.fetch": {
|
|
20
|
+
description: "Read a Lark document by URL or token, optionally restricting content to its outline.",
|
|
21
|
+
required: ["doc"],
|
|
22
|
+
properties: {
|
|
23
|
+
doc: {
|
|
24
|
+
type: "string",
|
|
25
|
+
minLength: 1
|
|
26
|
+
},
|
|
27
|
+
scope: {
|
|
28
|
+
type: "string",
|
|
29
|
+
enum: ["full", "outline"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}).map(([id, schema]) => {
|
|
34
|
+
const inputSchema = closedSchema({
|
|
35
|
+
type: "object",
|
|
36
|
+
properties: schema.properties,
|
|
37
|
+
required: schema.required
|
|
38
|
+
});
|
|
39
|
+
return [id, {
|
|
40
|
+
id,
|
|
41
|
+
description: schema.description,
|
|
42
|
+
inputSchema,
|
|
43
|
+
scope: "read",
|
|
44
|
+
requiredScopes: [],
|
|
45
|
+
revision: actionRevision({
|
|
46
|
+
version: "1.0.96",
|
|
47
|
+
id,
|
|
48
|
+
inputSchema
|
|
49
|
+
})
|
|
50
|
+
}];
|
|
51
|
+
}));
|
|
52
|
+
function larkShortcutArgs(action, input) {
|
|
53
|
+
const args = [
|
|
54
|
+
"docs",
|
|
55
|
+
action.id === "docs.search" ? "+search" : "+fetch",
|
|
56
|
+
"--as",
|
|
57
|
+
"user"
|
|
58
|
+
];
|
|
59
|
+
if (action.id === "docs.search") args.push("--format", "json");
|
|
60
|
+
for (const [key, value] of Object.entries(input)) args.push(`--${key.replaceAll("_", "-")}`, String(value));
|
|
61
|
+
return args;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { larkShortcutArgs, larkShortcuts };
|