@xopcai/xopc 0.0.332 → 0.0.334
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/dist/assets/{auth-DocRzRlS.js → auth-Cjj5SuoT.js} +49 -39
- package/dist/browser-ext/dist/background.js +1 -1
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +240 -36
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-C2wg3xC_.js → agent-avatar-dicebear-B73q7mlz.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-B9L2YIXz.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BeNnu1Ts.js → agent-plugin-dialog-COOjsvea.js} +1 -1
- package/dist/gateway/static/root/assets/agents-CCj1JnLu.js +70 -0
- package/dist/gateway/static/root/assets/agents-admin-api-Cuqi5xZn.js +2 -0
- package/dist/gateway/static/root/assets/{app-link-C6gA5Nck.js → app-link-DRL0YnPs.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-etFSkfzl.js → app-management-settings-panel-CckioKud.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DKmU2VAP.js → appearance-settings-DDiPIr_Q.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-Azqy8vfo.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-D0z_Fr2G.js → archive-plugin-Dtyr0RhX.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-load-qjPpQzYY.js +1 -0
- package/dist/gateway/static/root/assets/attachment-utils-core-BIOUBrpT.js +1 -0
- package/dist/gateway/static/root/assets/{automations-page-B7_C-p66.js → automations-page-g3SrFkTC.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-B0nW2nZD.js +7 -0
- package/dist/gateway/static/root/assets/binary-plugins-BwKQVxsU.js +2 -0
- package/dist/gateway/static/root/assets/{block-editor-ChWW8Z9L.js → block-editor-DD9d5pCt.js} +29 -29
- package/dist/gateway/static/root/assets/{browser-automation-inputs-C5s1yHOu.js → browser-automation-inputs-D2gNdS3e.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BV00BXRb.js → browser-automations-page-BKqqJR7P.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-settings-page-xwTmuZjS.js → browser-settings-page-BZH9bZbk.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-CHk4RZl4.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-CfWaVH-6.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-C5FcWsSe.js +8 -0
- package/dist/gateway/static/root/assets/capability-header-actions-Bd66yEOa.js +1 -0
- package/dist/gateway/static/root/assets/channels-DIU5Gq4o.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-C41mXCAi.js → chat-terminal-dock-B0nPDJyj.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-BJkqok2G.js → computer-settings-page-D7PxxaoG.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-BKCZMmwm.js → connector-service-page-BZH4SeQg.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BC81R_fz.js +2 -0
- package/dist/gateway/static/root/assets/{turn-outcome-D0SnyZ3Z.js → constants-Co2_smKQ.js} +1 -1
- package/dist/gateway/static/root/assets/date-picker-CDEVYjXI.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-CqADAHZp.js → dependency-picker-AInmpSwC.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Bab-iWED.js → desktop-pet-Sjgnlq8M.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BqgzLOdi.js → desktop-pet-settings-BWn0rrhr.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-DFg7FDPf.js → device-pairing-wizard-BtW837_d.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-hqJ9sFCR.js → directory-picker-path-field-2CpmDx_D.js} +1 -1
- package/dist/gateway/static/root/assets/dist-CKkafhaS.js +1 -0
- package/dist/gateway/static/root/assets/dist-io9jFpN72.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DX3PFhRE.js → extension-debug-page-WWJFj9Z5.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DkREdHLs.js → extension-page-DL00dFRr.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-wF-HNTM-.js → extension-settings-page-CN-agjPk.js} +1 -1
- package/dist/gateway/static/root/assets/{files-BK6enEvD.js → files-Bw4SBGdM.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-cR-tz7-Q.js → gateway-config-swr-CgIjCxM8.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-Ciq4c7KT.js +1 -0
- package/dist/gateway/static/root/assets/gateway-realtime-store-BHeHN26R.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-4oD6fhAm.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-6jLRcQsu.js → gateway-startup-retry-i-1lTrwY.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-nEpyJUBY.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CSSkwsyC.js → image-generation-api-gilc-u7M.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-B80Cv043.js → imports-page-BivdeiQ5.js} +1 -1
- package/dist/gateway/static/root/assets/index-BioG1pRD.js +106 -0
- package/dist/gateway/static/root/assets/index-DbLEkdNg.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BgoFaTwv.js → keyboard-shortcuts-settings-B_8AJTFr.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CRtZQrmz.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-HO6OQlQT.js → local-apps-page-DclxpoqR.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-Bpja8nC6.js → local-apps-yys1VChX.js} +1 -1
- package/dist/gateway/static/root/assets/local-session-drafts-DkolHmyp.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-wNXWkWu5.js → locale-store-BY30D6tg.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DX8TxkRl.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-5WFufZ4g.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DlT9KqwF.js → markdown-view-DYJnwlDr.js} +1 -1
- package/dist/gateway/static/root/assets/media-plugins-DlJDvwLK.js +1 -0
- package/dist/gateway/static/root/assets/messages-_6IXbP2u.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-GF5Q9Fqy.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-E8o4_Ty9.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-CiCmfRTw.js +1 -0
- package/dist/gateway/static/root/assets/{page-tabs-vqI30Yrg.js → page-tabs-Cwp3fGVM.js} +1 -1
- package/dist/gateway/static/root/assets/popover-select-0p9PIHRy.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-B-mwPBJW.js → preview-open-alternatives-DJ5xqGeu.js} +1 -1
- package/dist/gateway/static/root/assets/{product-delivery-bv3z8Xkh.js → product-delivery-BAks11S4.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-D--sj_uN.js → product-open-page-CcGwNePw.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-6hhRBkmC.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DUOzRaFI.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-BIpltJ47.js → registry-api-BvVx0G1o.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BWpWUXiE.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CAnb0PNY.js → runtime-tools-settings-panel-C6eDCNHz.js} +2 -2
- package/dist/gateway/static/root/assets/scenes-page-pF7Lmqnk.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-BKj6wIMb.js → schema-form-D8W8q_ez.js} +1 -1
- package/dist/gateway/static/root/assets/{schemas-88fK3zzl.js → schemas-CObaziC7.js} +3 -3
- package/dist/gateway/static/root/assets/session-api-BAyUr97V.js +1 -0
- package/dist/gateway/static/root/assets/session-manager-BAy2sR2Q.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-BDKDqqf9.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-C9cJWlAq.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-78ycUHfv.js → settings-form-section-B0cAj0nq.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-BOdxIVzo.js → settings-page-DZVVTFxs.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DZCPVx9c.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page-BkPNyV8c.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-Bqlv5JBi.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-CiBGQ0Jg.js → skill-api-C0dufzQC.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-3JF2OTBz.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DB4lR4om.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-CyJUeREH.js → system-settings-panel-xjrlhdUz.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-CB6M7wSs.js +1 -0
- package/dist/gateway/static/root/assets/{tasks-CDR_RVbQ.js → tasks-QQJXsiER.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-Day9zhKi.js → tunnel-api--68MQEWM.js} +1 -1
- package/dist/gateway/static/root/assets/usage-page-OLZ00eqD.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-Bj9hC6ML.js → use-autosave-DsnHYpTv.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-CoePFpHD.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-fWRD6B8r.js → voice-api-key-field-CvIXutQp.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-ujEySjyc.js → voice-config-api-Bwy3Al3J.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-CnxdvIk8.js → work-discovery-overlay-By5_7MLR.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DlWNN1VA.js → workflow-run-setup-panel-HSMDxDXV.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DElQ47Da.js +6 -0
- package/dist/gateway/static/root/index.html +27 -21
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +44 -14
- package/dist/packages/gateway-contract/src/capabilities.js +120 -10
- package/dist/packages/gateway-contract/src/index.js +8 -2
- package/dist/packages/gateway-contract/src/scenes.js +7 -6
- package/dist/packages/gateway-contract/src/session-command-rejection.js +19 -0
- package/dist/packages/gateway-contract/src/session-input-command.js +109 -0
- package/dist/packages/gateway-contract/src/sessions.js +2 -7
- package/dist/packages/gateway-contract/src/usage.js +6 -0
- package/dist/src/agent/agent-manager.js +15 -9
- package/dist/src/agent/background-review/run-background-review.js +8 -3
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/embedded/run-turn.js +7 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/gateway-tools.d.ts +2 -1
- package/dist/src/agent/external-tools/gateway-tools.js +45 -11
- package/dist/src/agent/external-tools/index.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +2 -2
- package/dist/src/agent/image/understanding/pi-ai-provider.js +1 -1
- package/dist/src/agent/memory/compaction.js +4 -0
- package/dist/src/agent/service/btw-query.js +8 -2
- package/dist/src/agent/service/process-direct-streaming.js +4 -2
- package/dist/src/agent/service.js +5 -5
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +2 -2
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +7 -3
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +5 -4
- package/dist/src/agent/tools/automation-tool.d.ts +4 -1
- package/dist/src/agent/tools/automation-tool.js +42 -4
- package/dist/src/agent/tools/session-search-tool.js +1 -1
- package/dist/src/agent/tools/web-extract.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +50 -9
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/ai-assist/text-assist.js +6 -2
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth-provider-lock.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/api/routes.js +65 -0
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/capabilities/read.js +24 -0
- package/dist/src/automations/capabilities/write.d.ts +52 -14
- package/dist/src/automations/capabilities/write.js +52 -3
- package/dist/src/automations/delivery/delivery-router.d.ts +50 -0
- package/dist/src/automations/delivery/delivery-router.js +318 -0
- package/dist/src/automations/delivery/index.d.ts +1 -0
- package/dist/src/automations/delivery/index.js +2 -0
- package/dist/src/automations/domain/defaults.d.ts +0 -1
- package/dist/src/automations/domain/defaults.js +1 -1
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/domain/types.d.ts +158 -7
- package/dist/src/automations/domain/validation.d.ts +104 -22
- package/dist/src/automations/domain/validation.js +66 -13
- package/dist/src/automations/draft/automation-draft-prompt.js +3 -4
- package/dist/src/automations/draft/automation-draft-service.js +6 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +22 -3
- package/dist/src/automations/draft/automation-draft-validator.js +4 -4
- package/dist/src/automations/events/event-catalog.d.ts +14 -0
- package/dist/src/automations/events/event-catalog.js +117 -0
- package/dist/src/automations/events/event-dispatcher.d.ts +27 -0
- package/dist/src/automations/events/event-dispatcher.js +140 -0
- package/dist/src/automations/events/event-repository.d.ts +59 -0
- package/dist/src/automations/events/event-repository.js +361 -0
- package/dist/src/automations/events/index.d.ts +3 -0
- package/dist/src/automations/events/index.js +4 -0
- package/dist/src/automations/index.d.ts +3 -1
- package/dist/src/automations/index.js +9 -3
- package/dist/src/automations/service/action-executor.d.ts +20 -1
- package/dist/src/automations/service/action-executor.js +80 -40
- package/dist/src/automations/service/automation-service.d.ts +21 -4
- package/dist/src/automations/service/automation-service.js +150 -100
- package/dist/src/automations/storage/automation-repository.js +4 -5
- package/dist/src/automations/storage/automation-run-repository.d.ts +1 -0
- package/dist/src/automations/storage/automation-run-repository.js +26 -1
- package/dist/src/automations/storage/index.js +2 -2
- package/dist/src/automations/webhook-secrets.d.ts +1 -0
- package/dist/src/automations/webhook-secrets.js +16 -0
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/capabilities/store-connector.d.ts +17 -1
- package/dist/src/capabilities/store-connector.js +69 -3
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/connectors.js +4 -3
- package/dist/src/cli/commands/doctor/checks/automation-integrity.d.ts +2 -0
- package/dist/src/cli/commands/doctor/checks/automation-integrity.js +55 -0
- package/dist/src/cli/commands/doctor/checks/database-relations.d.ts +2 -0
- package/dist/src/cli/commands/doctor/checks/database-relations.js +81 -0
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +2 -2
- package/dist/src/cli/commands/doctor/flow.js +5 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/commands/skills.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +1 -1
- package/dist/src/connectors/approval-resume.js +1 -1
- package/dist/src/connectors/cli/authorization.d.ts +1 -1
- package/dist/src/connectors/cli/store.d.ts +1 -1
- package/dist/src/connectors/cli/store.js +1 -1
- package/dist/src/connectors/composio-backends.js +14 -4
- package/dist/src/connectors/composio-managed-events.d.ts +5 -2
- package/dist/src/connectors/composio-managed-events.js +4 -1
- package/dist/src/connectors/connection-candidates.js +53 -15
- package/dist/src/connectors/connection-capabilities.js +5 -1
- package/dist/src/connectors/connection-recovery-service.d.ts +2 -1
- package/dist/src/connectors/connection-recovery-service.js +89 -4
- package/dist/src/discussions/analyzer.js +4 -4
- package/dist/src/execution-environments/local-worktree-manager.js +10 -1
- package/dist/src/execution-environments/session-environment-service.d.ts +3 -0
- package/dist/src/execution-environments/session-environment-service.js +28 -4
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/home-intelligence-automation-reconciler.js +4 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/agent-stream.js +6 -2
- package/dist/src/gateway/hono/routes/browser-session.js +4 -2
- package/dist/src/gateway/hono/routes/capabilities.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +9 -2
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connection-waits.js +3 -2
- package/dist/src/gateway/hono/routes/files.js +3 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +14 -1
- package/dist/src/gateway/hono/routes/models.js +17 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -4
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/public-gateway.js +93 -3
- package/dist/src/gateway/hono/routes/scenes.js +57 -41
- package/dist/src/gateway/hono/routes/session-command-handler.d.ts +5 -0
- package/dist/src/gateway/hono/routes/session-command-handler.js +189 -0
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +14 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +2 -2
- package/dist/src/gateway/hono/routes/sessions.js +15 -168
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/tui.js +2 -1
- package/dist/src/gateway/hono/routes/usage.d.ts +3 -0
- package/dist/src/gateway/hono/routes/usage.js +61 -0
- package/dist/src/gateway/hono/routes/voice.js +10 -1
- package/dist/src/gateway/image-generation-setup.js +2 -2
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/memory-maintenance-automation-reconciler.js +5 -2
- package/dist/src/gateway/resolve-webchat-session-key.d.ts +1 -1
- package/dist/src/gateway/resolve-webchat-session-key.js +2 -2
- package/dist/src/gateway/scenes/host.js +27 -14
- package/dist/src/gateway/scenes/slackThreadSource.d.ts +2 -2
- package/dist/src/gateway/security/gateway-scopes.js +1 -0
- package/dist/src/gateway/service/active-execution.d.ts +19 -0
- package/dist/src/gateway/service/active-execution.js +16 -0
- package/dist/src/gateway/service/agent-runner.d.ts +4 -0
- package/dist/src/gateway/service/agent-runner.js +19 -1
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.d.ts +2 -0
- package/dist/src/gateway/service/run-gateway-agent.js +10 -2
- package/dist/src/gateway/service/session-command-service.d.ts +34 -0
- package/dist/src/gateway/service/session-command-service.js +81 -0
- package/dist/src/gateway/service/session-input-coordinator.d.ts +21 -0
- package/dist/src/gateway/service/session-input-coordinator.js +41 -0
- package/dist/src/gateway/service/session-preparation-worker.d.ts +15 -0
- package/dist/src/gateway/service/session-preparation-worker.js +125 -0
- package/dist/src/gateway/service/sessions-api.d.ts +13 -0
- package/dist/src/gateway/service/sessions-api.js +23 -0
- package/dist/src/gateway/service.d.ts +30 -3
- package/dist/src/gateway/service.js +89 -79
- package/dist/src/gateway/side-chat/promotion-service.js +0 -1
- package/dist/src/gateway/side-chat/run-service.js +10 -7
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/generator.js +5 -2
- package/dist/src/infra/domain-outbox-dispatcher.d.ts +0 -3
- package/dist/src/infra/domain-outbox-dispatcher.js +15 -7
- package/dist/src/local-apps/service.js +2 -2
- package/dist/src/mcp/channel-bridge.js +12 -2
- package/dist/src/notes/capabilities/read.js +2 -2
- package/dist/src/notes/service.d.ts +4 -1
- package/dist/src/notes/service.js +13 -11
- package/dist/src/projects/project-service.js +1 -2
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-call.d.ts +3 -2
- package/dist/src/providers/model-call.js +30 -5
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/scenes/activationAdapter.d.ts +19 -0
- package/dist/src/scenes/activationAdapter.js +1 -0
- package/dist/src/scenes/agentExecutor.js +3 -10
- package/dist/src/scenes/contracts.d.ts +3 -9
- package/dist/src/scenes/contracts.js +1 -0
- package/dist/src/scenes/execution.d.ts +9 -3
- package/dist/src/scenes/execution.js +12 -11
- package/dist/src/scenes/httpServices.d.ts +5 -2
- package/dist/src/scenes/mailContext.d.ts +4 -0
- package/dist/src/scenes/mailContext.js +9 -0
- package/dist/src/scenes/maintenance.js +1 -5
- package/dist/src/scenes/metrics.d.ts +0 -6
- package/dist/src/scenes/metrics.js +0 -11
- package/dist/src/scenes/registry.d.ts +11 -0
- package/dist/src/scenes/registry.js +28 -0
- package/dist/src/scenes/repository.d.ts +6 -3
- package/dist/src/scenes/repository.js +43 -5
- package/dist/src/scenes/service.d.ts +2 -1
- package/dist/src/scenes/service.js +9 -7
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +37 -7
- package/dist/src/scenes/taskFollowUp/contracts.js +36 -17
- package/dist/src/scenes/taskFollowUp/service.d.ts +35 -7
- package/dist/src/scenes/taskFollowUp/service.js +86 -28
- package/dist/src/scenes/templates.d.ts +2 -2
- package/dist/src/scenes/userNotes.d.ts +3 -0
- package/dist/src/scenes/userNotes.js +6 -0
- package/dist/src/session/client-history.d.ts +3 -0
- package/dist/src/session/client-history.js +10 -5
- package/dist/src/session/manager.d.ts +1 -0
- package/dist/src/session/resolve-session.js +4 -3
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.d.ts +1 -0
- package/dist/src/session/store.js +3 -3
- package/dist/src/storage/sqlite/ai-usage-repository.d.ts +137 -0
- package/dist/src/storage/sqlite/ai-usage-repository.js +175 -0
- package/dist/src/storage/sqlite/connector-account-repository.js +7 -5
- package/dist/src/storage/sqlite/connector-repository.js +36 -34
- package/dist/src/storage/sqlite/index.d.ts +2 -2
- package/dist/src/storage/sqlite/index.js +3 -3
- package/dist/src/storage/sqlite/migrations/209_automation_event_hub.sql +48 -0
- package/dist/src/storage/sqlite/migrations/210_remove_legacy_automation_timeout.sql +14 -0
- package/dist/src/storage/sqlite/migrations/211_automation_result_deliveries.sql +16 -0
- package/dist/src/storage/sqlite/migrations/212_automation_delivery_policy.sql +30 -0
- package/dist/src/storage/sqlite/migrations/213_automation_reliability_contract.sql +188 -0
- package/dist/src/storage/sqlite/migrations/214_ai_usage_ledger.sql +41 -0
- package/dist/src/storage/sqlite/migrations/215_scene_execution_adapters.sql +6 -0
- package/dist/src/storage/sqlite/migrations/216_remove_scene_model_usage.sql +1 -0
- package/dist/src/storage/sqlite/migrations/217_remove_legacy_memory_tables.sql +4 -0
- package/dist/src/storage/sqlite/migrations/218_core_relation_indexes.sql +26 -0
- package/dist/src/storage/sqlite/migrations/219_json_contracts.sql +123 -0
- package/dist/src/storage/sqlite/migrations/220_normalize_timestamps.sql +339 -0
- package/dist/src/storage/sqlite/migrations/221_ai_usage_retention_index.sql +2 -0
- package/dist/src/storage/sqlite/migrations/222_session_config_authority.sql +13 -0
- package/dist/src/storage/sqlite/migrations/223_session_creation_receipts.sql +59 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +4 -4
- package/dist/src/storage/sqlite/row-mappers.d.ts +3 -7
- package/dist/src/storage/sqlite/row-mappers.js +6 -6
- package/dist/src/storage/sqlite/scenes-schema.d.ts +1 -1
- package/dist/src/storage/sqlite/scenes-schema.js +0 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/schema.sql +0 -52
- package/dist/src/storage/sqlite/schemas/scenes.sql +0 -7
- package/dist/src/storage/sqlite/session-creation-repository.d.ts +50 -0
- package/dist/src/storage/sqlite/session-creation-repository.js +166 -0
- package/dist/src/storage/sqlite/session-input-repository.d.ts +12 -2
- package/dist/src/storage/sqlite/session-input-repository.js +25 -2
- package/dist/src/storage/sqlite/session-read-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/session-read-repository.js +0 -1
- package/dist/src/storage/sqlite/session-repository.d.ts +0 -4
- package/dist/src/storage/sqlite/session-repository.js +8 -18
- package/dist/src/storage/sqlite/timestamps.d.ts +4 -0
- package/dist/src/storage/sqlite/timestamps.js +20 -0
- package/dist/src/storage/sqlite/transcript-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/transcript-repository.js +23 -15
- package/dist/src/storage/sqlite/user-trust-repository.js +4 -2
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.d.ts +1 -1
- package/dist/src/tasks/home-query-service.js +3 -3
- package/dist/src/tasks/task-contract-planner.js +1 -1
- package/dist/src/tui/backends/embedded-backend.d.ts +5 -0
- package/dist/src/tui/backends/embedded-backend.js +266 -20
- package/dist/src/tui/backends/embedded-drafts.d.ts +22 -0
- package/dist/src/tui/backends/embedded-drafts.js +53 -0
- package/dist/src/tui/backends/gateway-realtime-backend.d.ts +10 -0
- package/dist/src/tui/backends/gateway-realtime-backend.js +214 -33
- package/dist/src/tui/tui-backend.d.ts +1 -1
- package/dist/src/tui/tui-chat-input-state.d.ts +1 -0
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-session-format.js +0 -1
- package/dist/src/tui/tui-startup-resources.d.ts +1 -0
- package/dist/src/tui/tui-startup-resources.js +2 -2
- package/dist/src/tui/tui-types.d.ts +0 -1
- package/dist/src/tui/tui.js +69 -29
- package/dist/src/usage/cost.d.ts +4 -0
- package/dist/src/usage/cost.js +28 -0
- package/dist/src/usage/recorder.d.ts +13 -0
- package/dist/src/usage/recorder.js +117 -0
- package/dist/src/usage/scenario-registry.d.ts +8 -0
- package/dist/src/usage/scenario-registry.js +117 -0
- package/dist/src/usage/types.d.ts +55 -0
- package/dist/src/usage/types.js +1 -0
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/voice/tts/summarize.js +1 -1
- package/dist/src/work-discovery/analyzer.js +2 -2
- package/dist/src/work-discovery/investigator.js +1 -1
- package/dist/src/work-discovery/service.js +3 -6
- package/dist/src/workflows/service/workflow-run-service.js +16 -3
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Se1Z72VG.js +0 -1
- package/dist/gateway/static/root/assets/agents-udIitwV8.js +0 -70
- package/dist/gateway/static/root/assets/apps-page-DVNySL58.js +0 -1
- package/dist/gateway/static/root/assets/attachment-load-DNCDbeOX.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BMgJvdcv.js +0 -7
- package/dist/gateway/static/root/assets/binary-plugins-BYn2hScX.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-CHA-sTAZ.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-v0WkhV5o.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DefBGjhV.js +0 -8
- package/dist/gateway/static/root/assets/capability-header-actions-vmx35sbu.js +0 -1
- package/dist/gateway/static/root/assets/channels-Eo4ONF5X.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DZYgogQw.js +0 -2
- package/dist/gateway/static/root/assets/conversation-identity-Cw0n9uzK.js +0 -1
- package/dist/gateway/static/root/assets/date-picker-CrOV4Ynd.js +0 -1
- package/dist/gateway/static/root/assets/dist-3h6cXXhT.js +0 -1
- package/dist/gateway/static/root/assets/dist-Che_jiQF.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Du-Dos9O.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D7YoMHq4.js +0 -1
- package/dist/gateway/static/root/assets/index-BEw0xrde.css +0 -1
- package/dist/gateway/static/root/assets/index-DalslRUx.js +0 -121
- package/dist/gateway/static/root/assets/local-app-workbench-page-BKL5UZAj.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-CjzR9Rpj.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-Dk_gTJb9.js +0 -1
- package/dist/gateway/static/root/assets/media-plugins-Dlj6TD3M.js +0 -1
- package/dist/gateway/static/root/assets/messages-fmf0dnr4.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-BebJPjjk.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CmS_hvz8.js +0 -8
- package/dist/gateway/static/root/assets/page-context-capture-button-BArPtqp5.js +0 -1
- package/dist/gateway/static/root/assets/popover-select-DcsFzD_i.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BFUdtWXF.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-DBsBwAQ6.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BurdDY0m.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-Cj8xtr5t.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-BCsjgkCs.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BLL7csOJ.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CbKHBjrU.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-DyLfktib.js +0 -2
- package/dist/gateway/static/root/assets/shares-settings-BzvSNouj.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BHnru0F5.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-C35VKjhb.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-Bd1_Fguk.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-DuYzuR1T.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-B45YDiEw.js +0 -6
- package/dist/src/automations/product-events.d.ts +0 -5
- package/dist/src/automations/product-events.js +0 -19
- package/dist/src/tui/tui-empty-session-cleanup.d.ts +0 -9
- package/dist/src/tui/tui-empty-session-cleanup.js +0 -19
- /package/dist/gateway/static/root/assets/{dist-CI_fqRk-.js → dist-CI_fqRk-2.js} +0 -0
|
@@ -171,7 +171,6 @@ export declare const AutomationManagementSchema: z.ZodObject<{
|
|
|
171
171
|
}, z.core.$strict>;
|
|
172
172
|
export declare const AutomationReliabilitySchema: z.ZodObject<{
|
|
173
173
|
executionTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
174
|
-
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
175
174
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
176
175
|
maxConcurrentRuns: z.ZodOptional<z.ZodNumber>;
|
|
177
176
|
disableAfterConsecutiveFailures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -183,6 +182,32 @@ export declare const AutomationSafetyPolicySchema: z.ZodObject<{
|
|
|
183
182
|
auto_apply: "auto_apply";
|
|
184
183
|
}>;
|
|
185
184
|
}, z.core.$strict>;
|
|
185
|
+
export declare const AutomationDeliveryPolicySchema: z.ZodObject<{
|
|
186
|
+
notificationPolicy: z.ZodDefault<z.ZodEnum<{
|
|
187
|
+
attention: "attention";
|
|
188
|
+
all: "all";
|
|
189
|
+
none: "none";
|
|
190
|
+
}>>;
|
|
191
|
+
destinations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
192
|
+
key: z.ZodString;
|
|
193
|
+
kind: z.ZodLiteral<"gateway_event">;
|
|
194
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
195
|
+
key: z.ZodString;
|
|
196
|
+
kind: z.ZodLiteral<"webhook">;
|
|
197
|
+
endpoint: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
198
|
+
secretId: z.ZodString;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
key: z.ZodString;
|
|
201
|
+
kind: z.ZodLiteral<"file">;
|
|
202
|
+
targetId: z.ZodString;
|
|
203
|
+
pathTemplate: z.ZodString;
|
|
204
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
205
|
+
key: z.ZodString;
|
|
206
|
+
kind: z.ZodLiteral<"card">;
|
|
207
|
+
channelId: z.ZodString;
|
|
208
|
+
templateId: z.ZodString;
|
|
209
|
+
}, z.core.$strict>], "kind">>>;
|
|
210
|
+
}, z.core.$strict>;
|
|
186
211
|
export declare const AutomationStateSchema: z.ZodObject<{
|
|
187
212
|
nextRunAtMs: z.ZodOptional<z.ZodNumber>;
|
|
188
213
|
runningRunId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string>>;
|
|
@@ -365,15 +390,34 @@ export declare const AutomationSchema: z.ZodObject<{
|
|
|
365
390
|
new_session: "new_session";
|
|
366
391
|
continuous: "continuous";
|
|
367
392
|
}>>;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
393
|
+
delivery: z.ZodDefault<z.ZodObject<{
|
|
394
|
+
notificationPolicy: z.ZodDefault<z.ZodEnum<{
|
|
395
|
+
attention: "attention";
|
|
396
|
+
all: "all";
|
|
397
|
+
none: "none";
|
|
398
|
+
}>>;
|
|
399
|
+
destinations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
400
|
+
key: z.ZodString;
|
|
401
|
+
kind: z.ZodLiteral<"gateway_event">;
|
|
402
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
403
|
+
key: z.ZodString;
|
|
404
|
+
kind: z.ZodLiteral<"webhook">;
|
|
405
|
+
endpoint: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
406
|
+
secretId: z.ZodString;
|
|
407
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
408
|
+
key: z.ZodString;
|
|
409
|
+
kind: z.ZodLiteral<"file">;
|
|
410
|
+
targetId: z.ZodString;
|
|
411
|
+
pathTemplate: z.ZodString;
|
|
412
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
413
|
+
key: z.ZodString;
|
|
414
|
+
kind: z.ZodLiteral<"card">;
|
|
415
|
+
channelId: z.ZodString;
|
|
416
|
+
templateId: z.ZodString;
|
|
417
|
+
}, z.core.$strict>], "kind">>>;
|
|
418
|
+
}, z.core.$strict>>;
|
|
374
419
|
reliability: z.ZodOptional<z.ZodObject<{
|
|
375
420
|
executionTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
376
|
-
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
377
421
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
378
422
|
maxConcurrentRuns: z.ZodOptional<z.ZodNumber>;
|
|
379
423
|
disableAfterConsecutiveFailures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -559,6 +603,32 @@ export declare const CreateAutomationSchema: z.ZodObject<{
|
|
|
559
603
|
payloadMatch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
560
604
|
}, z.core.$strict>], "kind">;
|
|
561
605
|
description: z.ZodOptional<z.ZodString>;
|
|
606
|
+
delivery: z.ZodDefault<z.ZodObject<{
|
|
607
|
+
notificationPolicy: z.ZodDefault<z.ZodEnum<{
|
|
608
|
+
attention: "attention";
|
|
609
|
+
all: "all";
|
|
610
|
+
none: "none";
|
|
611
|
+
}>>;
|
|
612
|
+
destinations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
613
|
+
key: z.ZodString;
|
|
614
|
+
kind: z.ZodLiteral<"gateway_event">;
|
|
615
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
616
|
+
key: z.ZodString;
|
|
617
|
+
kind: z.ZodLiteral<"webhook">;
|
|
618
|
+
endpoint: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
619
|
+
secretId: z.ZodString;
|
|
620
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
621
|
+
key: z.ZodString;
|
|
622
|
+
kind: z.ZodLiteral<"file">;
|
|
623
|
+
targetId: z.ZodString;
|
|
624
|
+
pathTemplate: z.ZodString;
|
|
625
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
626
|
+
key: z.ZodString;
|
|
627
|
+
kind: z.ZodLiteral<"card">;
|
|
628
|
+
channelId: z.ZodString;
|
|
629
|
+
templateId: z.ZodString;
|
|
630
|
+
}, z.core.$strict>], "kind">>>;
|
|
631
|
+
}, z.core.$strict>>;
|
|
562
632
|
safety: z.ZodOptional<z.ZodObject<{
|
|
563
633
|
mode: z.ZodEnum<{
|
|
564
634
|
suggest_only: "suggest_only";
|
|
@@ -570,15 +640,8 @@ export declare const CreateAutomationSchema: z.ZodObject<{
|
|
|
570
640
|
new_session: "new_session";
|
|
571
641
|
continuous: "continuous";
|
|
572
642
|
}>>;
|
|
573
|
-
notificationPolicy: z.ZodDefault<z.ZodEnum<{
|
|
574
|
-
attention: "attention";
|
|
575
|
-
all: "all";
|
|
576
|
-
none: "none";
|
|
577
|
-
}>>;
|
|
578
|
-
completionWebhookUrl: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string>>;
|
|
579
643
|
reliability: z.ZodOptional<z.ZodObject<{
|
|
580
644
|
executionTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
581
|
-
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
582
645
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
583
646
|
maxConcurrentRuns: z.ZodOptional<z.ZodNumber>;
|
|
584
647
|
disableAfterConsecutiveFailures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -772,10 +835,8 @@ export declare const UpdateAutomationSchema: z.ZodObject<{
|
|
|
772
835
|
auto_apply: "auto_apply";
|
|
773
836
|
}>;
|
|
774
837
|
}, z.core.$strict>>>;
|
|
775
|
-
completionWebhookUrl: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string>>>;
|
|
776
838
|
reliability: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
777
839
|
executionTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
778
|
-
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
779
840
|
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
780
841
|
maxConcurrentRuns: z.ZodOptional<z.ZodNumber>;
|
|
781
842
|
disableAfterConsecutiveFailures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -793,11 +854,32 @@ export declare const UpdateAutomationSchema: z.ZodObject<{
|
|
|
793
854
|
new_session: "new_session";
|
|
794
855
|
continuous: "continuous";
|
|
795
856
|
}>>;
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
857
|
+
delivery: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
858
|
+
notificationPolicy: z.ZodDefault<z.ZodEnum<{
|
|
859
|
+
attention: "attention";
|
|
860
|
+
all: "all";
|
|
861
|
+
none: "none";
|
|
862
|
+
}>>;
|
|
863
|
+
destinations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
864
|
+
key: z.ZodString;
|
|
865
|
+
kind: z.ZodLiteral<"gateway_event">;
|
|
866
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
867
|
+
key: z.ZodString;
|
|
868
|
+
kind: z.ZodLiteral<"webhook">;
|
|
869
|
+
endpoint: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
870
|
+
secretId: z.ZodString;
|
|
871
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
872
|
+
key: z.ZodString;
|
|
873
|
+
kind: z.ZodLiteral<"file">;
|
|
874
|
+
targetId: z.ZodString;
|
|
875
|
+
pathTemplate: z.ZodString;
|
|
876
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
877
|
+
key: z.ZodString;
|
|
878
|
+
kind: z.ZodLiteral<"card">;
|
|
879
|
+
channelId: z.ZodString;
|
|
880
|
+
templateId: z.ZodString;
|
|
881
|
+
}, z.core.$strict>], "kind">>>;
|
|
882
|
+
}, z.core.$strict>>>;
|
|
801
883
|
state: z.ZodOptional<z.ZodObject<{
|
|
802
884
|
nextRunAtMs: z.ZodOptional<z.ZodNumber>;
|
|
803
885
|
runningRunId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string>>;
|
|
@@ -6,6 +6,19 @@ import { CronExpressionParser } from "cron-parser";
|
|
|
6
6
|
init_src();
|
|
7
7
|
const nonEmptyString = z.string().trim().min(1);
|
|
8
8
|
const optionalTrimmedString = (max) => z.string().trim().max(max).nullish().transform((value) => value || void 0);
|
|
9
|
+
const httpsUrl = z.string().trim().min(1).max(2e3).transform((value, ctx) => {
|
|
10
|
+
try {
|
|
11
|
+
const parsed = new URL(value);
|
|
12
|
+
if (parsed.protocol !== "https:") throw new Error("unsupported protocol");
|
|
13
|
+
return parsed.toString();
|
|
14
|
+
} catch {
|
|
15
|
+
ctx.addIssue({
|
|
16
|
+
code: "custom",
|
|
17
|
+
message: "Webhook endpoint must be a valid HTTPS URL"
|
|
18
|
+
});
|
|
19
|
+
return z.NEVER;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
9
22
|
const AutomationScheduleSchema = z.discriminatedUnion("kind", [
|
|
10
23
|
z.object({
|
|
11
24
|
kind: z.literal("once"),
|
|
@@ -108,7 +121,6 @@ const AutomationManagementSchema = z.object({
|
|
|
108
121
|
}).strict();
|
|
109
122
|
const AutomationReliabilitySchema = z.object({
|
|
110
123
|
executionTimeoutSeconds: z.number().int().min(1).max(86400).optional(),
|
|
111
|
-
timeoutSeconds: z.number().int().min(1).max(86400).optional(),
|
|
112
124
|
retryCount: z.number().int().min(0).max(10).optional(),
|
|
113
125
|
maxConcurrentRuns: z.number().int().min(1).max(20).optional(),
|
|
114
126
|
disableAfterConsecutiveFailures: z.number().int().min(1).max(100).optional()
|
|
@@ -118,6 +130,50 @@ const AutomationSafetyPolicySchema = z.object({ mode: z.enum([
|
|
|
118
130
|
"ask_before_apply",
|
|
119
131
|
"auto_apply"
|
|
120
132
|
]) }).strict();
|
|
133
|
+
const AutomationDeliveryPolicySchema = z.object({
|
|
134
|
+
notificationPolicy: z.enum([
|
|
135
|
+
"attention",
|
|
136
|
+
"all",
|
|
137
|
+
"none"
|
|
138
|
+
]).default("attention"),
|
|
139
|
+
destinations: z.array(z.discriminatedUnion("kind", [
|
|
140
|
+
z.object({
|
|
141
|
+
key: nonEmptyString.max(100),
|
|
142
|
+
kind: z.literal("gateway_event")
|
|
143
|
+
}).strict(),
|
|
144
|
+
z.object({
|
|
145
|
+
key: nonEmptyString.max(100),
|
|
146
|
+
kind: z.literal("webhook"),
|
|
147
|
+
endpoint: httpsUrl,
|
|
148
|
+
secretId: nonEmptyString.max(200)
|
|
149
|
+
}).strict(),
|
|
150
|
+
z.object({
|
|
151
|
+
key: nonEmptyString.max(100),
|
|
152
|
+
kind: z.literal("file"),
|
|
153
|
+
targetId: nonEmptyString.max(200),
|
|
154
|
+
pathTemplate: nonEmptyString.max(2e3)
|
|
155
|
+
}).strict(),
|
|
156
|
+
z.object({
|
|
157
|
+
key: nonEmptyString.max(100),
|
|
158
|
+
kind: z.literal("card"),
|
|
159
|
+
channelId: nonEmptyString.max(200),
|
|
160
|
+
templateId: nonEmptyString.max(200)
|
|
161
|
+
}).strict()
|
|
162
|
+
])).max(20).superRefine((destinations, ctx) => {
|
|
163
|
+
const keys = /* @__PURE__ */ new Set();
|
|
164
|
+
destinations.forEach((destination, index) => {
|
|
165
|
+
if (keys.has(destination.key)) ctx.addIssue({
|
|
166
|
+
code: "custom",
|
|
167
|
+
path: [index, "key"],
|
|
168
|
+
message: `Duplicate destination key: ${destination.key}`
|
|
169
|
+
});
|
|
170
|
+
keys.add(destination.key);
|
|
171
|
+
});
|
|
172
|
+
}).default([{
|
|
173
|
+
key: "gateway_event",
|
|
174
|
+
kind: "gateway_event"
|
|
175
|
+
}])
|
|
176
|
+
}).strict();
|
|
121
177
|
const AutomationStateSchema = z.object({
|
|
122
178
|
nextRunAtMs: z.number().int().nonnegative().optional(),
|
|
123
179
|
runningRunId: optionalTrimmedString(100),
|
|
@@ -144,12 +200,13 @@ const AutomationSchema = z.object({
|
|
|
144
200
|
action: AutomationActionSchema,
|
|
145
201
|
safety: AutomationSafetyPolicySchema.optional(),
|
|
146
202
|
conversationMode: z.enum(["new_session", "continuous"]).default("new_session"),
|
|
147
|
-
|
|
148
|
-
"attention",
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
203
|
+
delivery: AutomationDeliveryPolicySchema.default({
|
|
204
|
+
notificationPolicy: "attention",
|
|
205
|
+
destinations: [{
|
|
206
|
+
key: "gateway_event",
|
|
207
|
+
kind: "gateway_event"
|
|
208
|
+
}]
|
|
209
|
+
}),
|
|
153
210
|
reliability: AutomationReliabilitySchema.optional(),
|
|
154
211
|
management: AutomationManagementSchema.optional(),
|
|
155
212
|
state: AutomationStateSchema.default({}),
|
|
@@ -173,12 +230,8 @@ const UpdateAutomationSchema = AutomationSchema.omit({
|
|
|
173
230
|
updatedAtMs: true
|
|
174
231
|
}).extend({
|
|
175
232
|
conversationMode: z.enum(["new_session", "continuous"]),
|
|
176
|
-
|
|
177
|
-
"attention",
|
|
178
|
-
"all",
|
|
179
|
-
"none"
|
|
180
|
-
]),
|
|
233
|
+
delivery: AutomationDeliveryPolicySchema.optional(),
|
|
181
234
|
state: AutomationStateSchema
|
|
182
235
|
}).partial().refine((data) => Object.keys(data).length > 0, { message: "At least one field must be provided" });
|
|
183
236
|
//#endregion
|
|
184
|
-
export { AutomationActionSchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema };
|
|
237
|
+
export { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema };
|
|
@@ -11,7 +11,7 @@ JSON shape:
|
|
|
11
11
|
"action": { "kind": "agent", "instruction": "clear instruction for the agent" },
|
|
12
12
|
"safety": { "mode": "suggest_only" },
|
|
13
13
|
"conversationMode": "new_session",
|
|
14
|
-
"notificationPolicy": "attention",
|
|
14
|
+
"delivery": { "notificationPolicy": "attention" },
|
|
15
15
|
"reliability": { "executionTimeoutSeconds": 300, "disableAfterConsecutiveFailures": 3 }
|
|
16
16
|
},
|
|
17
17
|
"explanation": "Short explanation",
|
|
@@ -52,7 +52,7 @@ Rules:
|
|
|
52
52
|
- Use cron for daily/weekly schedules. Use standard 5-field cron.
|
|
53
53
|
- Keep executionTimeoutSeconds between 60 and 1800.
|
|
54
54
|
- Use conversationMode "new_session" unless the user explicitly wants each run to continue the same conversation.
|
|
55
|
-
- Use notificationPolicy "attention" unless the user explicitly requests every-run notifications or no notifications.
|
|
55
|
+
- Use delivery.notificationPolicy "attention" unless the user explicitly requests every-run notifications or no notifications.
|
|
56
56
|
- Language for user-facing copy: ${params.language ?? "en"}.
|
|
57
57
|
|
|
58
58
|
User request:
|
|
@@ -85,8 +85,7 @@ JSON shape:
|
|
|
85
85
|
"action": "optional complete action object",
|
|
86
86
|
"safety": "optional complete safety object",
|
|
87
87
|
"conversationMode": "optional new_session or continuous",
|
|
88
|
-
"notificationPolicy": "optional attention, all, or none",
|
|
89
|
-
"completionWebhookUrl": "optional HTTPS URL",
|
|
88
|
+
"delivery": { "notificationPolicy": "optional attention, all, or none", "destinations": [{ "key": "stable key", "kind": "gateway_event or webhook", "endpoint": "HTTPS URL for webhook", "secretId": "outbound secret id for webhook" }] },
|
|
90
89
|
"reliability": "optional complete reliability object",
|
|
91
90
|
"enabled": true
|
|
92
91
|
},
|
|
@@ -37,6 +37,9 @@ var AutomationDraftService = class {
|
|
|
37
37
|
maxTokens: 2048,
|
|
38
38
|
temperature: attempt === 0 ? .2 : .1,
|
|
39
39
|
signal
|
|
40
|
+
}, void 0, {
|
|
41
|
+
operation: "automation.generate_draft",
|
|
42
|
+
trigger: attempt === 0 ? "user" : "retry"
|
|
40
43
|
}));
|
|
41
44
|
try {
|
|
42
45
|
return buildAutomationDraftResponse(parseGeneratedAutomationDraft(lastText), attempt);
|
|
@@ -90,6 +93,9 @@ var AutomationDraftService = class {
|
|
|
90
93
|
maxTokens: 2048,
|
|
91
94
|
temperature: attempt === 0 ? .15 : .05,
|
|
92
95
|
signal
|
|
96
|
+
}, void 0, {
|
|
97
|
+
operation: "automation.generate_draft",
|
|
98
|
+
trigger: attempt === 0 ? "user" : "retry"
|
|
93
99
|
}));
|
|
94
100
|
try {
|
|
95
101
|
return parseGeneratedAutomationRepairDraft(lastText, attempt);
|
|
@@ -11,8 +11,29 @@ export declare function buildAutomationDraftResponse(draft: GeneratedAutomationD
|
|
|
11
11
|
draftId: `${string}-${string}-${string}-${string}-${string}`;
|
|
12
12
|
automation: {
|
|
13
13
|
name: string;
|
|
14
|
+
delivery: {
|
|
15
|
+
notificationPolicy: "attention" | "all" | "none";
|
|
16
|
+
destinations: ({
|
|
17
|
+
key: string;
|
|
18
|
+
kind: "gateway_event";
|
|
19
|
+
} | {
|
|
20
|
+
key: string;
|
|
21
|
+
kind: "webhook";
|
|
22
|
+
secretId: string;
|
|
23
|
+
endpoint?: string;
|
|
24
|
+
} | {
|
|
25
|
+
key: string;
|
|
26
|
+
kind: "file";
|
|
27
|
+
targetId: string;
|
|
28
|
+
pathTemplate: string;
|
|
29
|
+
} | {
|
|
30
|
+
key: string;
|
|
31
|
+
kind: "card";
|
|
32
|
+
channelId: string;
|
|
33
|
+
templateId: string;
|
|
34
|
+
})[];
|
|
35
|
+
};
|
|
14
36
|
conversationMode: "new_session" | "continuous";
|
|
15
|
-
notificationPolicy: "attention" | "all" | "none";
|
|
16
37
|
projectId?: string;
|
|
17
38
|
action?: {
|
|
18
39
|
kind: "agent";
|
|
@@ -135,10 +156,8 @@ export declare function buildAutomationDraftResponse(draft: GeneratedAutomationD
|
|
|
135
156
|
safety?: {
|
|
136
157
|
mode: "suggest_only" | "ask_before_apply" | "auto_apply";
|
|
137
158
|
};
|
|
138
|
-
completionWebhookUrl?: string;
|
|
139
159
|
reliability?: {
|
|
140
160
|
executionTimeoutSeconds?: number;
|
|
141
|
-
timeoutSeconds?: number;
|
|
142
161
|
retryCount?: number;
|
|
143
162
|
maxConcurrentRuns?: number;
|
|
144
163
|
disableAfterConsecutiveFailures?: number;
|
|
@@ -54,9 +54,9 @@ function simulateAutomation(input) {
|
|
|
54
54
|
const triggerSummary = summarizeTrigger(automation.trigger);
|
|
55
55
|
const actionSummary = summarizeAction(automation.action);
|
|
56
56
|
if (automation.action.kind === "agent" && /delete|remove|send|post|publish|付款|删除|发送|发布/i.test(automation.action.instruction)) requiredConfirmations.push("Agent instruction may perform an external or destructive action.");
|
|
57
|
-
if (automation.
|
|
58
|
-
safetyNotes.push("The
|
|
59
|
-
requiredConfirmations.push("External
|
|
57
|
+
if (automation.delivery.destinations.some((destination) => destination.kind === "webhook")) {
|
|
58
|
+
safetyNotes.push("The result webhook will call an external URL after each run.");
|
|
59
|
+
requiredConfirmations.push("External result delivery should be reviewed before publishing.");
|
|
60
60
|
}
|
|
61
61
|
const safetyMode = automation.safety?.mode ?? "auto_apply";
|
|
62
62
|
if (safetyMode === "suggest_only") safetyNotes.push("Suggest-only safety mode will generate recommendations without applying changes.");
|
|
@@ -97,7 +97,7 @@ function summarizeAction(action) {
|
|
|
97
97
|
}
|
|
98
98
|
function repairPatchNeedsApproval(patch) {
|
|
99
99
|
if (patch.safety?.mode === "auto_apply") return true;
|
|
100
|
-
if (patch.
|
|
100
|
+
if (patch.delivery?.destinations.some((destination) => destination.kind === "webhook")) return true;
|
|
101
101
|
if (patch.trigger?.kind === "webhook") return true;
|
|
102
102
|
if (patch.action?.kind === "agent") return /delete|remove|send|post|publish|付款|删除|发送|发布/i.test(patch.action.instruction);
|
|
103
103
|
return false;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ZodType } from 'zod';
|
|
2
|
+
import type { AutomationEventEnvelope } from '../domain/types.js';
|
|
3
|
+
export interface BusinessEventDefinition<TPayload extends Record<string, unknown> = Record<string, unknown>> {
|
|
4
|
+
type: string;
|
|
5
|
+
source: string;
|
|
6
|
+
schemaVersion: number;
|
|
7
|
+
payloadSchema: ZodType<TPayload>;
|
|
8
|
+
defaultTrust: Extract<AutomationEventEnvelope['trust'], 'system' | 'user' | 'connector'>;
|
|
9
|
+
description: string;
|
|
10
|
+
subjectKind: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function registerBusinessEvent<TPayload extends Record<string, unknown>>(definition: BusinessEventDefinition<TPayload>): void;
|
|
13
|
+
export declare function validateCatalogedBusinessEvent(event: AutomationEventEnvelope): void;
|
|
14
|
+
export declare function listBusinessEventDefinitions(): BusinessEventDefinition[];
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/automations/events/event-catalog.ts
|
|
3
|
+
const definitions = /* @__PURE__ */ new Map();
|
|
4
|
+
function catalogKey(type, source, schemaVersion) {
|
|
5
|
+
return `${source}\0${type}\0${schemaVersion}`;
|
|
6
|
+
}
|
|
7
|
+
function registerBusinessEvent(definition) {
|
|
8
|
+
const key = catalogKey(definition.type, definition.source, definition.schemaVersion);
|
|
9
|
+
if (definitions.has(key)) throw new Error(`Business event is already registered: ${definition.source}/${definition.type}@${definition.schemaVersion}`);
|
|
10
|
+
definitions.set(key, definition);
|
|
11
|
+
}
|
|
12
|
+
function validateCatalogedBusinessEvent(event) {
|
|
13
|
+
const definition = definitions.get(catalogKey(event.type, event.source, event.schemaVersion));
|
|
14
|
+
if (!definition) return;
|
|
15
|
+
if (event.subject?.kind !== definition.subjectKind) throw new Error(`Business event subject must be ${definition.subjectKind}: ${event.type}`);
|
|
16
|
+
definition.payloadSchema.parse(event.payload);
|
|
17
|
+
}
|
|
18
|
+
function listBusinessEventDefinitions() {
|
|
19
|
+
return [...definitions.values()].toSorted((left, right) => `${left.source}/${left.type}`.localeCompare(`${right.source}/${right.type}`));
|
|
20
|
+
}
|
|
21
|
+
const objectPayload = z.record(z.string(), z.unknown());
|
|
22
|
+
for (const definition of [
|
|
23
|
+
[
|
|
24
|
+
"tasks",
|
|
25
|
+
"task.changed.v2",
|
|
26
|
+
"task",
|
|
27
|
+
"A Task changed."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"tasks",
|
|
31
|
+
"task.deleted.v1",
|
|
32
|
+
"task",
|
|
33
|
+
"A Task was deleted."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"notes",
|
|
37
|
+
"note.created",
|
|
38
|
+
"note",
|
|
39
|
+
"A Note was created."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"notes",
|
|
43
|
+
"note.updated",
|
|
44
|
+
"note",
|
|
45
|
+
"A Note changed."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"notes",
|
|
49
|
+
"note.deleted",
|
|
50
|
+
"note",
|
|
51
|
+
"A Note was deleted."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"projects",
|
|
55
|
+
"project.created",
|
|
56
|
+
"project",
|
|
57
|
+
"A Project was created."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"projects",
|
|
61
|
+
"project.changed",
|
|
62
|
+
"project",
|
|
63
|
+
"A Project changed."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"projects",
|
|
67
|
+
"project.deleted",
|
|
68
|
+
"project",
|
|
69
|
+
"A Project was deleted."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"scenes",
|
|
73
|
+
"scene.created",
|
|
74
|
+
"scene",
|
|
75
|
+
"A Scene was created."
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"scenes",
|
|
79
|
+
"scene.changed",
|
|
80
|
+
"scene",
|
|
81
|
+
"A Scene changed."
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"scenes",
|
|
85
|
+
"scene.deleted",
|
|
86
|
+
"scene",
|
|
87
|
+
"A Scene was deleted."
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"discussions",
|
|
91
|
+
"discussion.completed",
|
|
92
|
+
"discussion",
|
|
93
|
+
"A Discussion completed."
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"sessions",
|
|
97
|
+
"session.transcript.updated",
|
|
98
|
+
"session",
|
|
99
|
+
"A Session transcript changed."
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"workflows",
|
|
103
|
+
"workflow.run.completed",
|
|
104
|
+
"workflow_run",
|
|
105
|
+
"A Workflow run completed."
|
|
106
|
+
]
|
|
107
|
+
]) registerBusinessEvent({
|
|
108
|
+
source: definition[0],
|
|
109
|
+
type: definition[1],
|
|
110
|
+
subjectKind: definition[2],
|
|
111
|
+
description: definition[3],
|
|
112
|
+
schemaVersion: 1,
|
|
113
|
+
payloadSchema: objectPayload,
|
|
114
|
+
defaultTrust: "system"
|
|
115
|
+
});
|
|
116
|
+
//#endregion
|
|
117
|
+
export { listBusinessEventDefinitions, registerBusinessEvent, validateCatalogedBusinessEvent };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AutomationEventEnvelope, AutomationRun } from '../domain/types.js';
|
|
2
|
+
import type { AutomationService } from '../service/automation-service.js';
|
|
3
|
+
export declare class AutomationEventDispatcher {
|
|
4
|
+
private readonly automationService;
|
|
5
|
+
private readonly options;
|
|
6
|
+
private timer?;
|
|
7
|
+
private active?;
|
|
8
|
+
private stopping;
|
|
9
|
+
private readonly owner;
|
|
10
|
+
private readonly abortController;
|
|
11
|
+
constructor(automationService: AutomationService, options?: {
|
|
12
|
+
onEvent?: (event: AutomationEventEnvelope, signal?: AbortSignal) => void | Promise<void>;
|
|
13
|
+
onDeadLetter?: (input: {
|
|
14
|
+
phase: 'event_projection' | 'event_delivery';
|
|
15
|
+
eventId: string;
|
|
16
|
+
automationId?: string;
|
|
17
|
+
error: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
intervalMs?: number;
|
|
20
|
+
});
|
|
21
|
+
start(): void;
|
|
22
|
+
stop(): Promise<void>;
|
|
23
|
+
dispatch(): Promise<number>;
|
|
24
|
+
runCompleted(run: AutomationRun): void;
|
|
25
|
+
private runDispatch;
|
|
26
|
+
private projectEvents;
|
|
27
|
+
}
|