comisai 1.0.33 → 1.0.36
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/node_modules/@comis/agent/dist/background/auto-background-middleware.d.ts +11 -1
- package/node_modules/@comis/agent/dist/background/auto-background-middleware.js +21 -4
- package/node_modules/@comis/agent/dist/background/background-task-manager.d.ts +2 -2
- package/node_modules/@comis/agent/dist/background/background-task-manager.js +61 -20
- package/node_modules/@comis/agent/dist/background/background-task-persistence.js +10 -3
- package/node_modules/@comis/agent/dist/background/background-task-types.d.ts +10 -3
- package/node_modules/@comis/agent/dist/background/background-task-types.js +1 -1
- package/node_modules/@comis/agent/dist/background/completion-formatter.d.ts +39 -0
- package/node_modules/@comis/agent/dist/background/completion-formatter.js +77 -0
- package/node_modules/@comis/agent/dist/background/completion-runner.d.ts +53 -0
- package/node_modules/@comis/agent/dist/background/completion-runner.js +151 -0
- package/node_modules/@comis/agent/dist/background/index.d.ts +4 -0
- package/node_modules/@comis/agent/dist/background/index.js +2 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.d.ts +17 -2
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.js +14 -2
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.d.ts +23 -23
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +72 -60
- package/node_modules/@comis/agent/dist/bridge/thinking-block-hash-invariant.d.ts +6 -7
- package/node_modules/@comis/agent/dist/bridge/thinking-block-hash-invariant.js +24 -25
- package/node_modules/@comis/agent/dist/budget/cost-tracker.d.ts +1 -1
- package/node_modules/@comis/agent/dist/context-engine/constants.d.ts +5 -5
- package/node_modules/@comis/agent/dist/context-engine/constants.js +12 -12
- package/node_modules/@comis/agent/dist/context-engine/context-engine.js +13 -4
- package/node_modules/@comis/agent/dist/context-engine/dag-annotator.d.ts +1 -2
- package/node_modules/@comis/agent/dist/context-engine/dag-annotator.js +1 -2
- package/node_modules/@comis/agent/dist/context-engine/llm-compaction.js +20 -16
- package/node_modules/@comis/agent/dist/context-engine/rehydration.js +6 -6
- package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.d.ts +12 -12
- package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.js +36 -22
- package/node_modules/@comis/agent/dist/context-engine/types-core.d.ts +15 -0
- package/node_modules/@comis/agent/dist/executor/cache-break-detection.d.ts +6 -6
- package/node_modules/@comis/agent/dist/executor/cache-break-detection.js +8 -8
- package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.d.ts +16 -0
- package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.js +46 -5
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.d.ts +30 -0
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.js +17 -1
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +1 -1
- package/node_modules/@comis/agent/dist/executor/executor-response-filter.d.ts +7 -6
- package/node_modules/@comis/agent/dist/executor/executor-response-filter.js +9 -42
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +2 -3
- package/node_modules/@comis/agent/dist/executor/gemini-cache-injector.d.ts +2 -2
- package/node_modules/@comis/agent/dist/executor/gemini-cache-injector.js +4 -4
- package/node_modules/@comis/agent/dist/executor/phase-filter.d.ts +2 -2
- package/node_modules/@comis/agent/dist/executor/phase-filter.js +5 -7
- package/node_modules/@comis/agent/dist/executor/pi-executor.d.ts +13 -0
- package/node_modules/@comis/agent/dist/executor/pi-executor.js +71 -6
- package/node_modules/@comis/agent/dist/executor/post-batch-continuation.js +7 -7
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.d.ts +1 -1
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.js +1 -1
- package/node_modules/@comis/agent/dist/executor/tool-deferral.d.ts +2 -2
- package/node_modules/@comis/agent/dist/executor/tool-deferral.js +7 -7
- package/node_modules/@comis/agent/dist/index.d.ts +17 -0
- package/node_modules/@comis/agent/dist/index.js +32 -11
- package/node_modules/@comis/agent/dist/model/auth-provider.d.ts +25 -2
- package/node_modules/@comis/agent/dist/model/auth-provider.js +6 -0
- package/node_modules/@comis/agent/dist/model/compaction-model-resolver.d.ts +3 -3
- package/node_modules/@comis/agent/dist/model/compaction-model-resolver.js +3 -3
- package/node_modules/@comis/agent/dist/model/oauth-credential-store-file.d.ts +37 -0
- package/node_modules/@comis/agent/dist/model/oauth-credential-store-file.js +279 -0
- package/node_modules/@comis/agent/dist/model/oauth-credential-store-selector.d.ts +49 -0
- package/node_modules/@comis/agent/dist/model/oauth-credential-store-selector.js +50 -0
- package/node_modules/@comis/agent/dist/model/oauth-device-code.d.ts +57 -0
- package/node_modules/@comis/agent/dist/model/oauth-device-code.js +302 -0
- package/node_modules/@comis/agent/dist/model/oauth-env.d.ts +33 -0
- package/node_modules/@comis/agent/dist/model/oauth-env.js +38 -0
- package/node_modules/@comis/agent/dist/model/oauth-errors.d.ts +41 -0
- package/node_modules/@comis/agent/dist/model/oauth-errors.js +88 -0
- package/node_modules/@comis/agent/dist/model/oauth-identity.d.ts +53 -0
- package/node_modules/@comis/agent/dist/model/oauth-identity.js +141 -0
- package/node_modules/@comis/agent/dist/model/oauth-login-runner.d.ts +99 -0
- package/node_modules/@comis/agent/dist/model/oauth-login-runner.js +374 -0
- package/node_modules/@comis/agent/dist/model/oauth-tls-preflight.d.ts +58 -0
- package/node_modules/@comis/agent/dist/model/oauth-tls-preflight.js +82 -0
- package/node_modules/@comis/agent/dist/model/oauth-token-manager.d.ts +86 -16
- package/node_modules/@comis/agent/dist/model/oauth-token-manager.js +961 -66
- package/node_modules/@comis/agent/dist/model/operation-model-defaults.d.ts +9 -4
- package/node_modules/@comis/agent/dist/model/operation-model-defaults.js +36 -9
- package/node_modules/@comis/agent/dist/model/resolve-provider-api-key.d.ts +48 -0
- package/node_modules/@comis/agent/dist/model/resolve-provider-api-key.js +66 -0
- package/node_modules/@comis/agent/dist/provider/capabilities.d.ts +5 -5
- package/node_modules/@comis/agent/dist/provider/capabilities.js +10 -23
- package/node_modules/@comis/agent/dist/safety/tool-output-safety.js +3 -3
- package/node_modules/@comis/agent/dist/session/comis-session-manager.d.ts +1 -1
- package/node_modules/@comis/agent/dist/session/comis-session-manager.js +1 -1
- package/node_modules/@comis/agent/dist/spawn/narrative-caster.d.ts +10 -0
- package/node_modules/@comis/agent/dist/spawn/narrative-caster.js +5 -1
- package/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/dist/email/email-adapter.js +6 -6
- package/node_modules/@comis/channels/dist/email/imap-lifecycle.js +7 -7
- package/node_modules/@comis/channels/dist/shared/deliver-to-channel.js +12 -10
- package/node_modules/@comis/channels/dist/telegram/telegram-adapter.js +1 -1
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/dist/cli.js +2 -0
- package/node_modules/@comis/cli/dist/commands/agent.d.ts +3 -3
- package/node_modules/@comis/cli/dist/commands/agent.js +46 -3
- package/node_modules/@comis/cli/dist/commands/auth.d.ts +37 -0
- package/node_modules/@comis/cli/dist/commands/auth.js +433 -0
- package/node_modules/@comis/cli/dist/commands/doctor.d.ts +4 -1
- package/node_modules/@comis/cli/dist/commands/doctor.js +20 -5
- package/node_modules/@comis/cli/dist/doctor/checks/oauth-health.d.ts +39 -0
- package/node_modules/@comis/cli/dist/doctor/checks/oauth-health.js +399 -0
- package/node_modules/@comis/cli/dist/doctor/types.d.ts +19 -0
- package/node_modules/@comis/cli/dist/index.d.ts +1 -0
- package/node_modules/@comis/cli/dist/index.js +10 -4
- package/node_modules/@comis/cli/dist/output/relative-time.d.ts +23 -0
- package/node_modules/@comis/cli/dist/output/relative-time.js +36 -0
- package/node_modules/@comis/cli/dist/wizard/non-interactive.js +17 -8
- package/node_modules/@comis/cli/dist/wizard/steps/03-provider.js +2 -1
- package/node_modules/@comis/cli/dist/wizard/steps/04-credentials.js +223 -34
- package/node_modules/@comis/cli/dist/wizard/steps/10-write-config.js +14 -0
- package/node_modules/@comis/cli/dist/wizard/steps/11-daemon-start.js +3 -3
- package/node_modules/@comis/cli/dist/wizard/types.d.ts +7 -0
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/bootstrap.d.ts +1 -1
- package/node_modules/@comis/core/dist/config/env-substitution.d.ts +66 -0
- package/node_modules/@comis/core/dist/config/env-substitution.js +115 -0
- package/node_modules/@comis/core/dist/config/index.d.ts +3 -1
- package/node_modules/@comis/core/dist/config/index.js +2 -1
- package/node_modules/@comis/core/dist/config/loader.js +61 -0
- package/node_modules/@comis/core/dist/config/managed-sections.d.ts +3 -3
- package/node_modules/@comis/core/dist/config/managed-sections.js +10 -5
- package/node_modules/@comis/core/dist/config/schema-agent.d.ts +4 -0
- package/node_modules/@comis/core/dist/config/schema-agent.js +16 -1
- package/node_modules/@comis/core/dist/config/schema-background-tasks.d.ts +7 -0
- package/node_modules/@comis/core/dist/config/schema-background-tasks.js +7 -0
- package/node_modules/@comis/core/dist/config/schema-delivery.d.ts +2 -0
- package/node_modules/@comis/core/dist/config/schema-delivery.js +2 -0
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.d.ts +0 -2
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.js +0 -2
- package/node_modules/@comis/core/dist/config/schema-oauth.d.ts +23 -0
- package/node_modules/@comis/core/dist/config/schema-oauth.js +19 -0
- package/node_modules/@comis/core/dist/config/schema-skills.d.ts +6 -8
- package/node_modules/@comis/core/dist/config/schema-skills.js +3 -4
- package/node_modules/@comis/core/dist/config/schema.d.ts +10 -0
- package/node_modules/@comis/core/dist/config/schema.js +3 -0
- package/node_modules/@comis/core/dist/domain/background-task-origin.d.ts +39 -0
- package/node_modules/@comis/core/dist/domain/background-task-origin.js +39 -0
- package/node_modules/@comis/core/dist/event-bus/events-infra.d.ts +71 -2
- package/node_modules/@comis/core/dist/exports/config.d.ts +2 -2
- package/node_modules/@comis/core/dist/exports/config.js +1 -1
- package/node_modules/@comis/core/dist/exports/domain.d.ts +2 -0
- package/node_modules/@comis/core/dist/exports/domain.js +1 -0
- package/node_modules/@comis/core/dist/exports/ports.d.ts +2 -2
- package/node_modules/@comis/core/dist/exports/ports.js +1 -1
- package/node_modules/@comis/core/dist/ports/delivery-queue.d.ts +23 -0
- package/node_modules/@comis/core/dist/ports/delivery-queue.js +2 -0
- package/node_modules/@comis/core/dist/ports/index.d.ts +2 -0
- package/node_modules/@comis/core/dist/ports/index.js +1 -0
- package/node_modules/@comis/core/dist/ports/oauth-credential-store.d.ts +64 -0
- package/node_modules/@comis/core/dist/ports/oauth-credential-store.js +37 -0
- package/node_modules/@comis/core/dist/tool-metadata.d.ts +20 -0
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/dist/daemon-types.d.ts +23 -3
- package/node_modules/@comis/daemon/dist/daemon.js +82 -19
- package/node_modules/@comis/daemon/dist/health/watchdog.js +18 -3
- package/node_modules/@comis/daemon/dist/index.d.ts +2 -0
- package/node_modules/@comis/daemon/dist/index.js +5 -0
- package/node_modules/@comis/daemon/dist/observability/channel-health-logger.js +3 -3
- package/node_modules/@comis/daemon/dist/observability/delivery-queue-logger.js +1 -1
- package/node_modules/@comis/daemon/dist/rpc/agent-handlers.d.ts +22 -1
- package/node_modules/@comis/daemon/dist/rpc/agent-handlers.js +84 -21
- package/node_modules/@comis/daemon/dist/rpc/agent-inline-workspace.js +2 -2
- package/node_modules/@comis/daemon/dist/rpc/config-handlers.d.ts +9 -1
- package/node_modules/@comis/daemon/dist/rpc/config-handlers.js +104 -23
- package/node_modules/@comis/daemon/dist/rpc/credential-resolver.d.ts +30 -1
- package/node_modules/@comis/daemon/dist/rpc/credential-resolver.js +74 -11
- package/node_modules/@comis/daemon/dist/rpc/mcp-handlers.d.ts +8 -0
- package/node_modules/@comis/daemon/dist/rpc/mcp-handlers.js +22 -8
- package/node_modules/@comis/daemon/dist/rpc/provider-handlers.js +9 -12
- package/node_modules/@comis/daemon/dist/rpc/rpc-dispatch.d.ts +1 -0
- package/node_modules/@comis/daemon/dist/rpc/rpc-dispatch.js +27 -2
- package/node_modules/@comis/daemon/dist/setup-docker-restart-warn.js +0 -1
- package/node_modules/@comis/daemon/dist/wiring/index.d.ts +2 -0
- package/node_modules/@comis/daemon/dist/wiring/index.js +1 -0
- package/node_modules/@comis/daemon/dist/wiring/oauth-preflight.d.ts +21 -0
- package/node_modules/@comis/daemon/dist/wiring/oauth-preflight.js +134 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.d.ts +46 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.js +127 -3
- package/node_modules/@comis/daemon/dist/wiring/setup-background-completion-runner.d.ts +39 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-background-completion-runner.js +32 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-background-tasks.d.ts +10 -3
- package/node_modules/@comis/daemon/dist/wiring/setup-background-tasks.js +11 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.js +20 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-cross-session.js +1 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.d.ts +14 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.js +52 -19
- package/node_modules/@comis/daemon/dist/wiring/setup-schedulers.js +4 -0
- package/node_modules/@comis/daemon/package.json +1 -1
- package/node_modules/@comis/gateway/dist/index.d.ts +2 -0
- package/node_modules/@comis/gateway/dist/index.js +2 -0
- package/node_modules/@comis/gateway/dist/oauth/oauth-callback-route.d.ts +66 -0
- package/node_modules/@comis/gateway/dist/oauth/oauth-callback-route.js +212 -0
- package/node_modules/@comis/gateway/dist/server/hono-server.d.ts +14 -0
- package/node_modules/@comis/gateway/dist/server/hono-server.js +10 -0
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/dist/logging/log-fields.d.ts +23 -0
- package/node_modules/@comis/infra/package.json +1 -1
- package/node_modules/@comis/memory/dist/compaction.d.ts +3 -5
- package/node_modules/@comis/memory/dist/compaction.js +2 -3
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.d.ts +2 -2
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.js +49 -1
- package/node_modules/@comis/memory/dist/index.d.ts +2 -0
- package/node_modules/@comis/memory/dist/index.js +3 -0
- package/node_modules/@comis/memory/dist/memory-api.d.ts +1 -1
- package/node_modules/@comis/memory/dist/memory-api.js +1 -1
- package/node_modules/@comis/memory/dist/oauth-profile-schema.d.ts +17 -0
- package/node_modules/@comis/memory/dist/oauth-profile-schema.js +33 -0
- package/node_modules/@comis/memory/dist/oauth-profile-store-encrypted.d.ts +27 -0
- package/node_modules/@comis/memory/dist/oauth-profile-store-encrypted.js +144 -0
- package/node_modules/@comis/memory/dist/session-store.d.ts +1 -1
- package/node_modules/@comis/memory/dist/session-store.js +1 -1
- package/node_modules/@comis/memory/dist/sqlite-secret-store.d.ts +29 -3
- package/node_modules/@comis/memory/dist/sqlite-secret-store.js +11 -3
- package/node_modules/@comis/memory/package.json +1 -1
- package/node_modules/@comis/scheduler/dist/execution/execution-lock.d.ts +13 -0
- package/node_modules/@comis/scheduler/dist/execution/execution-lock.js +1 -1
- package/node_modules/@comis/scheduler/dist/execution/index.d.ts +2 -0
- package/node_modules/@comis/scheduler/dist/execution/index.js +2 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/agent-heartbeat-source.js +1 -1
- package/node_modules/@comis/scheduler/dist/index.d.ts +2 -0
- package/node_modules/@comis/scheduler/dist/index.js +2 -0
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/dist/bridge/schema-validator.d.ts +38 -0
- package/node_modules/@comis/skills/dist/bridge/schema-validator.js +169 -0
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-enforcement.js +12 -0
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-registry.js +130 -0
- package/node_modules/@comis/skills/dist/builtin/exec-diagnostics.d.ts +32 -0
- package/node_modules/@comis/skills/dist/builtin/exec-diagnostics.js +127 -0
- package/node_modules/@comis/skills/dist/builtin/exec-security.js +38 -0
- package/node_modules/@comis/skills/dist/builtin/exec-tool.js +9 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/grep-tool.js +6 -6
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.d.ts +5 -4
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.js +38 -27
- package/node_modules/@comis/skills/dist/builtin/platform/background-tasks-tool.d.ts +4 -1
- package/node_modules/@comis/skills/dist/builtin/platform/background-tasks-tool.js +3 -3
- package/node_modules/@comis/skills/dist/builtin/platform/cron-tool.js +1 -1
- package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.js +6 -6
- package/node_modules/@comis/skills/dist/builtin/platform/mcp-manage-tool.d.ts +1 -1
- package/node_modules/@comis/skills/dist/builtin/platform/mcp-manage-tool.js +9 -9
- package/node_modules/@comis/skills/dist/builtin/sandbox/bwrap-provider.d.ts +11 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/bwrap-provider.js +114 -1
- package/node_modules/@comis/skills/dist/builtin/sandbox/detect-provider.js +40 -15
- package/node_modules/@comis/skills/dist/media/ssrf-fetcher.d.ts +7 -0
- package/node_modules/@comis/skills/dist/media/ssrf-fetcher.js +9 -2
- package/node_modules/@comis/skills/package.json +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-detail-71BSbSfD.js → agent-detail-q8t1NB7w.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-editor-CTSDZhwT.js → agent-editor-B46io5gv.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-list-BEhni2ea.js → agent-list-DQ6g2Rcx.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{billing-view-DVP1IvVs.js → billing-view-IWPR8LgF.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{channel-detail-N_YK74xC.js → channel-detail-DlNNZuuC.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{channel-list-DRk6ZJaF.js → channel-list-DhGwxiMc.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{chat-console-Dm-GtSf9.js → chat-console-Nv6fM3Rc.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{config-editor-CIferYX6.js → config-editor-BYKuJF76.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{context-dag-browser-CL84rXXM.js → context-dag-browser-ClNEtzYE.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{context-engine-B1HOTEZv.js → context-engine-BZJ6HChd.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{delivery-view-Y6JKYVFw.js → delivery-view-Cb7I3vGu.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{diagnostics-view-DWV1UQjz.js → diagnostics-view-9u9Lyu5a.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{ic-chat-message-DfSERzzg.js → ic-chat-message-BFt3cVpx.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{ic-connection-dot-CXyhlJup.js → ic-connection-dot-y77LZ3Gu.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{ic-tool-call-DNmwTjek.js → ic-tool-call-qt6w1NQl.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{index-CBr0Tm9_.js → index-8Tg9oc-C.js} +2 -2
- package/node_modules/@comis/web/dist/assets/{mcp-management-BaH2-vox.js → mcp-management-69dtH_kY.js} +2 -2
- package/node_modules/@comis/web/dist/assets/{media-config-CZLshJoN.js → media-config-BdjLj5c1.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{media-test-C9NUWgo_.js → media-test-DuPqrixi.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{memory-inspector-D_fmTcRN.js → memory-inspector-B-Pepbq-.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{message-center-BBFlNCZn.js → message-center-B7l0yNYY.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{models-BytGLm99.js → models-JHFHuv5S.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{observe-view-VXtHqaqq.js → observe-view-r8mqhy4O.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-builder-CfXczlfJ.js → pipeline-builder-XjkiZRcR.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-history-CPmXFnbe.js → pipeline-history-CZqJv_Hj.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-history-detail-DcueTMs9.js → pipeline-history-detail-BEFGMoDy.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-list-B-xG5WZh.js → pipeline-list-B6q5LvO1.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-monitor-pnIOYaSY.js → pipeline-monitor-BNomXjVL.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{scheduler-BtUIFHhA.js → scheduler-BJEjcGKA.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{security-C8mWRq2y.js → security-2G1jhBfV.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{session-detail-DgdkO5ka.js → session-detail-DmVPzFBR.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{session-list-DcylcfTn.js → session-list-CsqMQoHs.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{setup-wizard-BP5yjsuL.js → setup-wizard-CAdM-gSP.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{skills-DXt1bX8Z.js → skills-2ODqKaWr.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{subagents-C7YbUHXY.js → subagents-BFlwfTbD.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{workspace-manager-DP6pW4wa.js → workspace-manager--CbOx_dI.js} +1 -1
- package/node_modules/@comis/web/dist/index.html +1 -1
- package/node_modules/@comis/web/package.json +1 -1
- package/package.json +17 -16
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AppConfigSchema, AgentConfigSchema, AgentsMapSchema, BudgetConfigSchema, CircuitBreakerConfigSchema, DmScopeConfigSchema, ElevatedReplyConfigSchema, ModelRoutesSchema, HeartbeatConfigSchema, HeartbeatTargetSchema, PerAgentConfigSchema, PerAgentCronConfigSchema, PerAgentHeartbeatConfigSchema, PerAgentSchedulerConfigSchema, PruningConfigSchema, RagConfigSchema, ResetPolicyOverrideSchema, RoutingBindingSchema, RoutingConfigSchema, SessionResetPolicySchema, TracingConfigSchema, ChannelConfigSchema, ChannelEntrySchema, ChannelHealthCheckSchema, MemoryConfigSchema, CompactionConfigSchema, RetentionConfigSchema, SecurityConfigSchema, PermissionConfigSchema, ActionConfirmationConfigSchema, AgentToAgentConfigSchema, SkillsConfigSchema, DaemonConfigSchema, LoggingConfigSchema, TracingDefaultsSchema, ConfigWebhookSchema, SchedulerConfigSchema, GatewayConfigSchema, GatewayTlsConfigSchema, GatewayTokenSchema, GatewayRateLimitSchema, IntegrationsConfigSchema, BraveSearchConfigSchema, McpServerEntrySchema, McpConfigSchema, TranscriptionConfigSchema, TtsConfigSchema, TtsAutoModeSchema, ElevenLabsVoiceSettingsSchema, TtsOutputFormatSchema, ImageAnalysisConfigSchema, VisionScopeRuleSchema, VisionConfigSchema, LinkUnderstandingConfigSchema, MediaConfigSchema, DOCUMENT_MIME_WHITELIST, FileExtractionConfigSchema, AutoReplyRuleSchema, AutoReplyConfigSchema, MonitoringConfigSchema, PluginsConfigSchema, PluginEntrySchema, QueueConfigSchema, QueueModeSchema, OverflowPolicySchema, PerChannelQueueConfigSchema, OverflowConfigSchema, DebounceBufferConfigSchema, FollowupConfigSchema, PriorityLaneConfigSchema, LaneAssignmentConfigSchema, StreamingConfigSchema, PerChannelStreamingConfigSchema, TypingModeSchema, ChunkModeSchema, DeliveryMirrorConfigSchema, DeliveryQueueConfigSchema, DeliveryTimingConfigSchema, DeliveryTimingModeSchema, CoalescerConfigSchema, AutoReplyEngineConfigSchema, GroupActivationModeSchema, SendPolicyConfigSchema, SendPolicyRuleSchema, SendActionSchema, EnvelopeConfigSchema, RetryConfigSchema, WebhooksConfigSchema, WebhookMappingConfigSchema, WebhookMappingMatchSchema, AgentSecretsConfigSchema, SecretsConfigSchema, DocumentationConfigSchema, DocumentationLinkSchema, ImageGenerationConfigSchema, NotificationConfigSchema, VerbosityConfigSchema, VerbosityLevelSchema, VerbosityOverrideSchema, ContextEngineConfigSchema, BackgroundTasksConfigSchema, MemoryReviewConfigSchema, ProviderEntrySchema, ProvidersConfigSchema, UserModelSchema, ModelCostSchema, OperationModelEntrySchema, OperationModelsSchema, substituteEnvVars, warnSuspiciousEnvValues, loadConfigFile, validateConfig, deepMerge, mergeLayered, loadLayered, IMMUTABLE_CONFIG_PREFIXES, MUTABLE_CONFIG_OVERRIDES, isImmutableConfigPath, matchesOverridePattern, getMutableOverridesForSection, MANAGED_SECTIONS, getManagedSectionRedirect, formatRedirectHint, getConfigSchema, getConfigSections, getFieldMetadata, validatePartial, createConfigGitManager, checkApprovalsConfig, } from "../config/index.js";
|
|
2
|
-
export type { AppConfig, AgentConfig, BudgetConfig, CircuitBreakerConfig, DmScopeConfig, ElevatedReplyConfig, ModelRoutes, PruningConfig, HeartbeatConfig, HeartbeatTarget, PerAgentConfig, PerAgentCronConfig, PerAgentHeartbeatConfig, PerAgentSchedulerConfig, RagConfig, ResetPolicyOverride, RoutingBinding, RoutingConfig, SessionResetPolicyConfig, TracingConfig, ChannelConfig, ChannelEntry, ChannelHealthCheckConfig, AckReactionConfig, MemoryConfig, CompactionConfig, RetentionConfig, SecurityConfig, PermissionConfig, ActionConfirmationConfig, AgentToAgentConfig, SkillsConfig, DaemonConfig, LoggingConfig, TracingDefaults, ConfigWebhook, SchedulerConfig, GatewayConfig, GatewayTlsConfig, GatewayToken, GatewayRateLimit, IntegrationsConfig, BraveSearchConfig, McpServerEntry, McpConfig, TranscriptionConfig, TtsConfig, TtsAutoMode, ElevenLabsVoiceSettings, TtsOutputFormat, ImageAnalysisConfig, VisionScopeRule, VisionConfig, LinkUnderstandingConfig, MediaConfig, FileExtractionConfig, AutoReplyRule, AutoReplyConfig, MonitoringConfig, DiskMonitorConfig, ResourceMonitorConfig, SystemdMonitorConfig, SecurityUpdateMonitorConfig, GitMonitorConfig, PluginsConfig, PluginEntry, QueueConfig, PerChannelQueueConfig, QueueMode, OverflowPolicy, OverflowConfig, DebounceBufferConfig, FollowupConfig, PriorityLaneConfig, LaneAssignmentConfig, StreamingConfig, PerChannelStreamingConfig, TypingMode, ChunkMode, DeliveryMirrorConfig, DeliveryQueueConfig, DeliveryTimingConfig, DeliveryTimingMode, CoalescerConfig, AutoReplyEngineConfig, GroupActivationMode, SendPolicyConfig, SendPolicyRule, SendAction, EnvelopeConfig, RetryConfig, WebhooksConfig, WebhookMappingConfig, AgentSecretsConfig, SecretsConfig, ConfigError, ConfigErrorCode, FieldMetadata, PartialValidationResult, ConfigGitManager, GitCommitMetadata, HistoryEntry, GitManagerDeps, ExecGitFn, EnvValueWarning, LifecycleReactionsConfig, LifecycleReactionsTimingConfig, SenderTrustDisplayConfig, DocumentationConfig, DocumentationLink, ImageGenerationConfig, NotificationConfig, VerbosityConfig, VerbosityLevel, VerbosityOverride, ContextEngineConfig, BackgroundTasksConfig, MemoryReviewConfig, ProviderEntry, ProvidersConfig, UserModel, ModelCost, OperationModelEntry, OperationModels, ModelOperationType, } from "../config/index.js";
|
|
1
|
+
export { AppConfigSchema, AgentConfigSchema, AgentsMapSchema, BudgetConfigSchema, CircuitBreakerConfigSchema, DmScopeConfigSchema, ElevatedReplyConfigSchema, ModelRoutesSchema, HeartbeatConfigSchema, HeartbeatTargetSchema, PerAgentConfigSchema, PerAgentCronConfigSchema, PerAgentHeartbeatConfigSchema, PerAgentSchedulerConfigSchema, PruningConfigSchema, RagConfigSchema, ResetPolicyOverrideSchema, RoutingBindingSchema, RoutingConfigSchema, SessionResetPolicySchema, TracingConfigSchema, ChannelConfigSchema, ChannelEntrySchema, ChannelHealthCheckSchema, MemoryConfigSchema, CompactionConfigSchema, RetentionConfigSchema, SecurityConfigSchema, PermissionConfigSchema, ActionConfirmationConfigSchema, AgentToAgentConfigSchema, SkillsConfigSchema, DaemonConfigSchema, LoggingConfigSchema, TracingDefaultsSchema, ConfigWebhookSchema, SchedulerConfigSchema, GatewayConfigSchema, GatewayTlsConfigSchema, GatewayTokenSchema, GatewayRateLimitSchema, IntegrationsConfigSchema, BraveSearchConfigSchema, McpServerEntrySchema, McpConfigSchema, TranscriptionConfigSchema, TtsConfigSchema, TtsAutoModeSchema, ElevenLabsVoiceSettingsSchema, TtsOutputFormatSchema, ImageAnalysisConfigSchema, VisionScopeRuleSchema, VisionConfigSchema, LinkUnderstandingConfigSchema, MediaConfigSchema, DOCUMENT_MIME_WHITELIST, FileExtractionConfigSchema, AutoReplyRuleSchema, AutoReplyConfigSchema, MonitoringConfigSchema, PluginsConfigSchema, PluginEntrySchema, QueueConfigSchema, QueueModeSchema, OverflowPolicySchema, PerChannelQueueConfigSchema, OverflowConfigSchema, DebounceBufferConfigSchema, FollowupConfigSchema, PriorityLaneConfigSchema, LaneAssignmentConfigSchema, StreamingConfigSchema, PerChannelStreamingConfigSchema, TypingModeSchema, ChunkModeSchema, DeliveryMirrorConfigSchema, DeliveryQueueConfigSchema, DeliveryTimingConfigSchema, DeliveryTimingModeSchema, CoalescerConfigSchema, AutoReplyEngineConfigSchema, GroupActivationModeSchema, SendPolicyConfigSchema, SendPolicyRuleSchema, SendActionSchema, EnvelopeConfigSchema, RetryConfigSchema, WebhooksConfigSchema, WebhookMappingConfigSchema, WebhookMappingMatchSchema, AgentSecretsConfigSchema, SecretsConfigSchema, DocumentationConfigSchema, DocumentationLinkSchema, ImageGenerationConfigSchema, NotificationConfigSchema, VerbosityConfigSchema, VerbosityLevelSchema, VerbosityOverrideSchema, ContextEngineConfigSchema, BackgroundTasksConfigSchema, MemoryReviewConfigSchema, ProviderEntrySchema, ProvidersConfigSchema, UserModelSchema, ModelCostSchema, OperationModelEntrySchema, OperationModelsSchema, OAuthConfigSchema, substituteEnvVars, warnSuspiciousEnvValues, findUnresolvedEnvRefs, formatMissingEnvRefError, loadConfigFile, validateConfig, deepMerge, mergeLayered, loadLayered, IMMUTABLE_CONFIG_PREFIXES, MUTABLE_CONFIG_OVERRIDES, isImmutableConfigPath, matchesOverridePattern, getMutableOverridesForSection, MANAGED_SECTIONS, getManagedSectionRedirect, formatRedirectHint, getConfigSchema, getConfigSections, getFieldMetadata, validatePartial, createConfigGitManager, checkApprovalsConfig, } from "../config/index.js";
|
|
2
|
+
export type { AppConfig, AgentConfig, BudgetConfig, CircuitBreakerConfig, DmScopeConfig, ElevatedReplyConfig, ModelRoutes, PruningConfig, HeartbeatConfig, HeartbeatTarget, PerAgentConfig, PerAgentCronConfig, PerAgentHeartbeatConfig, PerAgentSchedulerConfig, RagConfig, ResetPolicyOverride, RoutingBinding, RoutingConfig, SessionResetPolicyConfig, TracingConfig, ChannelConfig, ChannelEntry, ChannelHealthCheckConfig, AckReactionConfig, MemoryConfig, CompactionConfig, RetentionConfig, SecurityConfig, PermissionConfig, ActionConfirmationConfig, AgentToAgentConfig, SkillsConfig, DaemonConfig, LoggingConfig, TracingDefaults, ConfigWebhook, SchedulerConfig, GatewayConfig, GatewayTlsConfig, GatewayToken, GatewayRateLimit, IntegrationsConfig, BraveSearchConfig, McpServerEntry, McpConfig, TranscriptionConfig, TtsConfig, TtsAutoMode, ElevenLabsVoiceSettings, TtsOutputFormat, ImageAnalysisConfig, VisionScopeRule, VisionConfig, LinkUnderstandingConfig, MediaConfig, FileExtractionConfig, AutoReplyRule, AutoReplyConfig, MonitoringConfig, DiskMonitorConfig, ResourceMonitorConfig, SystemdMonitorConfig, SecurityUpdateMonitorConfig, GitMonitorConfig, PluginsConfig, PluginEntry, QueueConfig, PerChannelQueueConfig, QueueMode, OverflowPolicy, OverflowConfig, DebounceBufferConfig, FollowupConfig, PriorityLaneConfig, LaneAssignmentConfig, StreamingConfig, PerChannelStreamingConfig, TypingMode, ChunkMode, DeliveryMirrorConfig, DeliveryQueueConfig, DeliveryTimingConfig, DeliveryTimingMode, CoalescerConfig, AutoReplyEngineConfig, GroupActivationMode, SendPolicyConfig, SendPolicyRule, SendAction, EnvelopeConfig, RetryConfig, WebhooksConfig, WebhookMappingConfig, AgentSecretsConfig, SecretsConfig, ConfigError, ConfigErrorCode, FieldMetadata, PartialValidationResult, ConfigGitManager, GitCommitMetadata, HistoryEntry, GitManagerDeps, ExecGitFn, EnvValueWarning, UnresolvedEnvRef, LifecycleReactionsConfig, LifecycleReactionsTimingConfig, SenderTrustDisplayConfig, DocumentationConfig, DocumentationLink, ImageGenerationConfig, NotificationConfig, VerbosityConfig, VerbosityLevel, VerbosityOverride, ContextEngineConfig, BackgroundTasksConfig, MemoryReviewConfig, ProviderEntry, ProvidersConfig, UserModel, ModelCost, OperationModelEntry, OperationModels, ModelOperationType, OAuthConfig, } from "../config/index.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// @comis/core exports — Config (layered configuration with Zod validation)
|
|
3
|
-
export { AppConfigSchema, AgentConfigSchema, AgentsMapSchema, BudgetConfigSchema, CircuitBreakerConfigSchema, DmScopeConfigSchema, ElevatedReplyConfigSchema, ModelRoutesSchema, HeartbeatConfigSchema, HeartbeatTargetSchema, PerAgentConfigSchema, PerAgentCronConfigSchema, PerAgentHeartbeatConfigSchema, PerAgentSchedulerConfigSchema, PruningConfigSchema, RagConfigSchema, ResetPolicyOverrideSchema, RoutingBindingSchema, RoutingConfigSchema, SessionResetPolicySchema, TracingConfigSchema, ChannelConfigSchema, ChannelEntrySchema, ChannelHealthCheckSchema, MemoryConfigSchema, CompactionConfigSchema, RetentionConfigSchema, SecurityConfigSchema, PermissionConfigSchema, ActionConfirmationConfigSchema, AgentToAgentConfigSchema, SkillsConfigSchema, DaemonConfigSchema, LoggingConfigSchema, TracingDefaultsSchema, ConfigWebhookSchema, SchedulerConfigSchema, GatewayConfigSchema, GatewayTlsConfigSchema, GatewayTokenSchema, GatewayRateLimitSchema, IntegrationsConfigSchema, BraveSearchConfigSchema, McpServerEntrySchema, McpConfigSchema, TranscriptionConfigSchema, TtsConfigSchema, TtsAutoModeSchema, ElevenLabsVoiceSettingsSchema, TtsOutputFormatSchema, ImageAnalysisConfigSchema, VisionScopeRuleSchema, VisionConfigSchema, LinkUnderstandingConfigSchema, MediaConfigSchema, DOCUMENT_MIME_WHITELIST, FileExtractionConfigSchema, AutoReplyRuleSchema, AutoReplyConfigSchema, MonitoringConfigSchema, PluginsConfigSchema, PluginEntrySchema, QueueConfigSchema, QueueModeSchema, OverflowPolicySchema, PerChannelQueueConfigSchema, OverflowConfigSchema, DebounceBufferConfigSchema, FollowupConfigSchema, PriorityLaneConfigSchema, LaneAssignmentConfigSchema, StreamingConfigSchema, PerChannelStreamingConfigSchema, TypingModeSchema, ChunkModeSchema, DeliveryMirrorConfigSchema, DeliveryQueueConfigSchema, DeliveryTimingConfigSchema, DeliveryTimingModeSchema, CoalescerConfigSchema, AutoReplyEngineConfigSchema, GroupActivationModeSchema, SendPolicyConfigSchema, SendPolicyRuleSchema, SendActionSchema, EnvelopeConfigSchema, RetryConfigSchema, WebhooksConfigSchema, WebhookMappingConfigSchema, WebhookMappingMatchSchema, AgentSecretsConfigSchema, SecretsConfigSchema, DocumentationConfigSchema, DocumentationLinkSchema, ImageGenerationConfigSchema, NotificationConfigSchema, VerbosityConfigSchema, VerbosityLevelSchema, VerbosityOverrideSchema, ContextEngineConfigSchema, BackgroundTasksConfigSchema, MemoryReviewConfigSchema, ProviderEntrySchema, ProvidersConfigSchema, UserModelSchema, ModelCostSchema, OperationModelEntrySchema, OperationModelsSchema, substituteEnvVars, warnSuspiciousEnvValues, loadConfigFile, validateConfig, deepMerge, mergeLayered, loadLayered, IMMUTABLE_CONFIG_PREFIXES, MUTABLE_CONFIG_OVERRIDES, isImmutableConfigPath, matchesOverridePattern, getMutableOverridesForSection, MANAGED_SECTIONS, getManagedSectionRedirect, formatRedirectHint, getConfigSchema, getConfigSections, getFieldMetadata, validatePartial, createConfigGitManager, checkApprovalsConfig, } from "../config/index.js";
|
|
3
|
+
export { AppConfigSchema, AgentConfigSchema, AgentsMapSchema, BudgetConfigSchema, CircuitBreakerConfigSchema, DmScopeConfigSchema, ElevatedReplyConfigSchema, ModelRoutesSchema, HeartbeatConfigSchema, HeartbeatTargetSchema, PerAgentConfigSchema, PerAgentCronConfigSchema, PerAgentHeartbeatConfigSchema, PerAgentSchedulerConfigSchema, PruningConfigSchema, RagConfigSchema, ResetPolicyOverrideSchema, RoutingBindingSchema, RoutingConfigSchema, SessionResetPolicySchema, TracingConfigSchema, ChannelConfigSchema, ChannelEntrySchema, ChannelHealthCheckSchema, MemoryConfigSchema, CompactionConfigSchema, RetentionConfigSchema, SecurityConfigSchema, PermissionConfigSchema, ActionConfirmationConfigSchema, AgentToAgentConfigSchema, SkillsConfigSchema, DaemonConfigSchema, LoggingConfigSchema, TracingDefaultsSchema, ConfigWebhookSchema, SchedulerConfigSchema, GatewayConfigSchema, GatewayTlsConfigSchema, GatewayTokenSchema, GatewayRateLimitSchema, IntegrationsConfigSchema, BraveSearchConfigSchema, McpServerEntrySchema, McpConfigSchema, TranscriptionConfigSchema, TtsConfigSchema, TtsAutoModeSchema, ElevenLabsVoiceSettingsSchema, TtsOutputFormatSchema, ImageAnalysisConfigSchema, VisionScopeRuleSchema, VisionConfigSchema, LinkUnderstandingConfigSchema, MediaConfigSchema, DOCUMENT_MIME_WHITELIST, FileExtractionConfigSchema, AutoReplyRuleSchema, AutoReplyConfigSchema, MonitoringConfigSchema, PluginsConfigSchema, PluginEntrySchema, QueueConfigSchema, QueueModeSchema, OverflowPolicySchema, PerChannelQueueConfigSchema, OverflowConfigSchema, DebounceBufferConfigSchema, FollowupConfigSchema, PriorityLaneConfigSchema, LaneAssignmentConfigSchema, StreamingConfigSchema, PerChannelStreamingConfigSchema, TypingModeSchema, ChunkModeSchema, DeliveryMirrorConfigSchema, DeliveryQueueConfigSchema, DeliveryTimingConfigSchema, DeliveryTimingModeSchema, CoalescerConfigSchema, AutoReplyEngineConfigSchema, GroupActivationModeSchema, SendPolicyConfigSchema, SendPolicyRuleSchema, SendActionSchema, EnvelopeConfigSchema, RetryConfigSchema, WebhooksConfigSchema, WebhookMappingConfigSchema, WebhookMappingMatchSchema, AgentSecretsConfigSchema, SecretsConfigSchema, DocumentationConfigSchema, DocumentationLinkSchema, ImageGenerationConfigSchema, NotificationConfigSchema, VerbosityConfigSchema, VerbosityLevelSchema, VerbosityOverrideSchema, ContextEngineConfigSchema, BackgroundTasksConfigSchema, MemoryReviewConfigSchema, ProviderEntrySchema, ProvidersConfigSchema, UserModelSchema, ModelCostSchema, OperationModelEntrySchema, OperationModelsSchema, OAuthConfigSchema, substituteEnvVars, warnSuspiciousEnvValues, findUnresolvedEnvRefs, formatMissingEnvRefError, loadConfigFile, validateConfig, deepMerge, mergeLayered, loadLayered, IMMUTABLE_CONFIG_PREFIXES, MUTABLE_CONFIG_OVERRIDES, isImmutableConfigPath, matchesOverridePattern, getMutableOverridesForSection, MANAGED_SECTIONS, getManagedSectionRedirect, formatRedirectHint, getConfigSchema, getConfigSections, getFieldMetadata, validatePartial, createConfigGitManager, checkApprovalsConfig, } from "../config/index.js";
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { AttachmentSchema, NormalizedMessageSchema, parseMessage, TrustLevelSchema, MemorySourceSchema, MemoryEntrySchema, ToolCallSchema, TokenUsageSchema, AgentResponseSchema, SessionKeySchema, parseSessionKey, formatSessionKey, parseFormattedSessionKey, PollInputSchema, PollOptionResultSchema, NormalizedPollResultSchema, normalizePollDurationHours, RichButtonSchema, RichCardFieldSchema, RichCardSchema, RichEffectSchema, ApprovalRequestSchema, ApprovalResolutionSchema, SerializedApprovalRequestSchema, SerializedApprovalCacheEntrySchema, InjectionTypeSchema, CredentialMappingSchema, SecretRefSchema, isSecretRef, SecretRefOrStringSchema, DeliveryOriginSchema, createDeliveryOrigin, NodeStatusSchema, GraphStatusSchema, GraphNodeSchema, NodeExecutionStateSchema, ExecutionGraphSchema, GraphValidationError, parseExecutionGraph, topologicalSort, validateAndSortGraph, SubagentResultSchema, SubagentEndReasonSchema, parseSubagentResult, SubagentContextConfigSchema, NodeTypeIdSchema, ToolSchemaProfileSchema, ToolCallArgumentsEncodingSchema, ModelCompatConfigSchema, ProviderFamilySchema, TranscriptToolCallIdModeSchema, ProviderCapabilitiesSchema, } from "../domain/index.js";
|
|
2
|
+
export { BackgroundTaskOriginSchema } from "../domain/background-task-origin.js";
|
|
3
|
+
export type { BackgroundTaskOrigin } from "../domain/background-task-origin.js";
|
|
2
4
|
export type { Attachment, NormalizedMessage, TrustLevel, MemoryEntry, ToolCall, TokenUsage, AgentResponse, SessionKey, PollInput, NormalizedPollResult, PollOptionResult, RichButton, RichCard, RichEffect, ApprovalRequest, ApprovalResolution, SerializedApprovalRequest, SerializedApprovalCacheEntry, InjectionType, CredentialMapping, SecretRef, DeliveryOrigin, NodeStatus, GraphStatus, GraphNode, NodeExecutionState, ExecutionGraph, ValidatedGraph, SubagentResult, SubagentEndReason, SpawnPacket, CondensedResult, SubAgentSpawnPreparedEvent, SubAgentSpawnRejectedEvent, SubAgentSpawnStartedEvent, SubAgentResultCondensedEvent, SubAgentLifecycleEndedEvent, SubAgentContextCompactedEvent, SubagentContextConfig, NodeTypeId, NodeTypeDriver, NodeDriverAction, NodeDriverContext, ToolSchemaProfile, ToolCallArgumentsEncoding, ModelCompatConfig, ProviderFamily, TranscriptToolCallIdMode, ProviderCapabilities, } from "../domain/index.js";
|
|
@@ -31,3 +31,4 @@ NodeTypeIdSchema,
|
|
|
31
31
|
ToolSchemaProfileSchema, ToolCallArgumentsEncodingSchema, ModelCompatConfigSchema,
|
|
32
32
|
// Provider capabilities
|
|
33
33
|
ProviderFamilySchema, TranscriptToolCallIdModeSchema, ProviderCapabilitiesSchema, } from "../domain/index.js";
|
|
34
|
+
export { BackgroundTaskOriginSchema } from "../domain/background-task-origin.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ChannelCapabilitySchema, createNoOpDeliveryQueue, createNoOpDeliveryMirror } from "../ports/index.js";
|
|
2
|
-
export type { ChannelPort, MessageHandler, SendMessageOptions, FetchMessagesOptions, FetchedMessage, AttachmentPayload, ChannelPluginPort, ChannelCapability, ChannelStatus, MemoryPort, MemorySearchOptions, MemorySearchResult, MemoryUpdateFields, SkillPort, SkillPermissions, SkillInput, SkillOutput, SkillManifest, EmbeddingPort, TranscriptionPort, TranscriptionOptions, TranscriptionResult, TTSPort, TTSOptions, TTSResult, ImageAnalysisPort, ImageAnalysisOptions, VisionRequest, VideoRequest, VisionResult, VisionProvider, ResolvedMedia, MediaResolverPort, FileClassification, FileExtractionErrorKind, FileExtractionError, FileExtractionInput, FileExtractionResult, FileExtractionPort, HookName, ModifyingHookName, VoidHookName, HookHandlerMap, HookBeforeAgentStartEvent, HookBeforeAgentStartContext, HookBeforeAgentStartResult, HookAgentEndEvent, HookAgentEndContext, HookBeforeToolCallEvent, HookBeforeToolCallContext, HookBeforeToolCallResult, HookAfterToolCallEvent, HookAfterToolCallContext, HookToolResultPersistEvent, HookToolResultPersistContext, HookToolResultPersistResult, HookBeforeCompactionEvent, HookBeforeCompactionContext, HookBeforeCompactionResult, HookAfterCompactionEvent, HookAfterCompactionContext, HookSessionStartEvent, HookSessionStartContext, HookSessionEndEvent, HookSessionEndContext, HookGatewayStartEvent, HookGatewayStartContext, HookGatewayStopEvent, HookGatewayStopContext, PluginPort, PluginRegistryApi, RegisteredHook, PluginToolDefinition, PluginHttpRoute, DeviceIdentity, DeviceIdentityPort, PairingRequest, PairedDevice, OutputGuardPort, OutputGuardFinding, OutputGuardResult, SecretStorePort, SecretMetadata, CredentialMappingPort, DeliveryQueuePort, DeliveryQueueEntry, DeliveryQueueEnqueueInput, DeliveryQueueStatusCounts, DeliveryMirrorPort, DeliveryMirrorEntry, DeliveryMirrorRecordInput, Provider, ImageGenInput, ImageGenOutput, ImageGenerationPort, } from "../ports/index.js";
|
|
1
|
+
export { ChannelCapabilitySchema, createNoOpDeliveryQueue, createNoOpDeliveryMirror, validateProfileId, PROFILE_ID_RE, } from "../ports/index.js";
|
|
2
|
+
export type { ChannelPort, MessageHandler, SendMessageOptions, FetchMessagesOptions, FetchedMessage, AttachmentPayload, ChannelPluginPort, ChannelCapability, ChannelStatus, MemoryPort, MemorySearchOptions, MemorySearchResult, MemoryUpdateFields, SkillPort, SkillPermissions, SkillInput, SkillOutput, SkillManifest, EmbeddingPort, TranscriptionPort, TranscriptionOptions, TranscriptionResult, TTSPort, TTSOptions, TTSResult, ImageAnalysisPort, ImageAnalysisOptions, VisionRequest, VideoRequest, VisionResult, VisionProvider, ResolvedMedia, MediaResolverPort, FileClassification, FileExtractionErrorKind, FileExtractionError, FileExtractionInput, FileExtractionResult, FileExtractionPort, HookName, ModifyingHookName, VoidHookName, HookHandlerMap, HookBeforeAgentStartEvent, HookBeforeAgentStartContext, HookBeforeAgentStartResult, HookAgentEndEvent, HookAgentEndContext, HookBeforeToolCallEvent, HookBeforeToolCallContext, HookBeforeToolCallResult, HookAfterToolCallEvent, HookAfterToolCallContext, HookToolResultPersistEvent, HookToolResultPersistContext, HookToolResultPersistResult, HookBeforeCompactionEvent, HookBeforeCompactionContext, HookBeforeCompactionResult, HookAfterCompactionEvent, HookAfterCompactionContext, HookSessionStartEvent, HookSessionStartContext, HookSessionEndEvent, HookSessionEndContext, HookGatewayStartEvent, HookGatewayStartContext, HookGatewayStopEvent, HookGatewayStopContext, PluginPort, PluginRegistryApi, RegisteredHook, PluginToolDefinition, PluginHttpRoute, DeviceIdentity, DeviceIdentityPort, PairingRequest, PairedDevice, OutputGuardPort, OutputGuardFinding, OutputGuardResult, SecretStorePort, SecretMetadata, CredentialMappingPort, OAuthCredentialStorePort, OAuthProfile, DeliveryQueuePort, DeliveryQueueEntry, DeliveryQueueEnqueueInput, DeliveryQueueStatusCounts, DeliveryMirrorPort, DeliveryMirrorEntry, DeliveryMirrorRecordInput, Provider, ImageGenInput, ImageGenOutput, ImageGenerationPort, } from "../ports/index.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// @comis/core exports — Port interfaces (hexagonal architecture boundaries)
|
|
3
|
-
export { ChannelCapabilitySchema, createNoOpDeliveryQueue, createNoOpDeliveryMirror } from "../ports/index.js";
|
|
3
|
+
export { ChannelCapabilitySchema, createNoOpDeliveryQueue, createNoOpDeliveryMirror, validateProfileId, PROFILE_ID_RE, } from "../ports/index.js";
|
|
@@ -65,6 +65,19 @@ export interface DeliveryQueuePort {
|
|
|
65
65
|
* @returns The assigned entry ID on success.
|
|
66
66
|
*/
|
|
67
67
|
enqueue(entry: DeliveryQueueEnqueueInput): Promise<Result<string, Error>>;
|
|
68
|
+
/**
|
|
69
|
+
* Enqueue a new outbound message with status='in_flight' (process-local lease).
|
|
70
|
+
*
|
|
71
|
+
* Used by the channel-side synchronous-send path: insert as 'in_flight' so the
|
|
72
|
+
* recurring drainer's `WHERE status='pending'` filter does not race-pick the row
|
|
73
|
+
* mid-send. Same semantics as enqueue() except for the initial status.
|
|
74
|
+
* On crash, the startup sweep (recoverInFlight) resets these rows back to 'pending'.
|
|
75
|
+
*
|
|
76
|
+
* Emits delivery:enqueued (same event as enqueue()) -- universal observability.
|
|
77
|
+
*
|
|
78
|
+
* @returns The assigned entry ID on success.
|
|
79
|
+
*/
|
|
80
|
+
enqueueInFlight(entry: DeliveryQueueEnqueueInput): Promise<Result<string, Error>>;
|
|
68
81
|
/**
|
|
69
82
|
* Mark an entry as successfully delivered.
|
|
70
83
|
* @param id - The queue entry ID
|
|
@@ -103,6 +116,16 @@ export interface DeliveryQueuePort {
|
|
|
103
116
|
* @param channelType - Optional filter to restrict counts to a specific channel.
|
|
104
117
|
*/
|
|
105
118
|
statusCounts(channelType?: string): Promise<Result<DeliveryQueueStatusCounts, Error>>;
|
|
119
|
+
/**
|
|
120
|
+
* Reset all rows with status='in_flight' to status='pending', clearing last_error.
|
|
121
|
+
*
|
|
122
|
+
* Called once at daemon startup before the existing startup drain. Treats
|
|
123
|
+
* 'in_flight' as a process-local lease -- any in_flight row left over from a
|
|
124
|
+
* prior daemon process is by definition stale and must be re-attempted.
|
|
125
|
+
*
|
|
126
|
+
* @returns The number of rows recovered (transitioned in_flight -> pending).
|
|
127
|
+
*/
|
|
128
|
+
recoverInFlight(): Promise<Result<number, Error>>;
|
|
106
129
|
}
|
|
107
130
|
/**
|
|
108
131
|
* No-op delivery queue for when the queue feature is disabled.
|
|
@@ -22,6 +22,7 @@ import { ok } from "@comis/shared";
|
|
|
22
22
|
export function createNoOpDeliveryQueue() {
|
|
23
23
|
return Object.freeze({
|
|
24
24
|
enqueue: () => Promise.resolve(ok(randomUUID())),
|
|
25
|
+
enqueueInFlight: () => Promise.resolve(ok(randomUUID())),
|
|
25
26
|
ack: () => Promise.resolve(ok(undefined)),
|
|
26
27
|
nack: () => Promise.resolve(ok(undefined)),
|
|
27
28
|
fail: () => Promise.resolve(ok(undefined)),
|
|
@@ -29,5 +30,6 @@ export function createNoOpDeliveryQueue() {
|
|
|
29
30
|
pruneExpired: () => Promise.resolve(ok(0)),
|
|
30
31
|
depth: () => Promise.resolve(ok(0)),
|
|
31
32
|
statusCounts: () => Promise.resolve(ok({ pending: 0, inFlight: 0, failed: 0, delivered: 0, expired: 0 })),
|
|
33
|
+
recoverInFlight: () => Promise.resolve(ok(0)),
|
|
32
34
|
});
|
|
33
35
|
}
|
|
@@ -16,6 +16,8 @@ export type { DeviceIdentity, DeviceIdentityPort, PairingRequest, PairedDevice,
|
|
|
16
16
|
export type { OutputGuardPort, OutputGuardFinding, OutputGuardResult, } from "./output-guard.js";
|
|
17
17
|
export type { SecretStorePort, SecretMetadata, } from "./secret-store.js";
|
|
18
18
|
export type { CredentialMappingPort } from "./credential-mapping.js";
|
|
19
|
+
export type { OAuthCredentialStorePort, OAuthProfile } from "./oauth-credential-store.js";
|
|
20
|
+
export { validateProfileId, PROFILE_ID_RE } from "./oauth-credential-store.js";
|
|
19
21
|
export type { Provider, ImageGenInput, ImageGenOutput, ImageGenerationPort } from "./provider.js";
|
|
20
22
|
export type { DeliveryQueuePort, DeliveryQueueEntry, DeliveryQueueEnqueueInput, DeliveryQueueStatusCounts, } from "./delivery-queue.js";
|
|
21
23
|
export { createNoOpDeliveryQueue } from "./delivery-queue.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// Port interfaces - Hexagonal architecture boundaries
|
|
3
3
|
export { ChannelCapabilitySchema } from "./channel-plugin.js";
|
|
4
|
+
export { validateProfileId, PROFILE_ID_RE } from "./oauth-credential-store.js";
|
|
4
5
|
export { createNoOpDeliveryQueue } from "./delivery-queue.js";
|
|
5
6
|
export { createNoOpDeliveryMirror } from "./delivery-mirror.js";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Result } from "@comis/shared";
|
|
2
|
+
/**
|
|
3
|
+
* Persisted OAuth profile shape.
|
|
4
|
+
*
|
|
5
|
+
* Maps to pi-ai's OAuthCredentials plus comis-managed metadata
|
|
6
|
+
* (provider, profileId, identity claims). The expires field is
|
|
7
|
+
* milliseconds since epoch (matches pi-ai — the JWT exp claim is
|
|
8
|
+
* seconds, but pi-ai stores ms).
|
|
9
|
+
*/
|
|
10
|
+
export interface OAuthProfile {
|
|
11
|
+
/** OAuth provider id (e.g. "openai-codex", "anthropic"). */
|
|
12
|
+
provider: string;
|
|
13
|
+
/** Canonical profile identifier in the form "<provider>:<identity>". */
|
|
14
|
+
profileId: string;
|
|
15
|
+
/** OAuth access token (JWT for OpenAI Codex). NEVER log this value. */
|
|
16
|
+
access: string;
|
|
17
|
+
/** OAuth refresh token. NEVER log this value. */
|
|
18
|
+
refresh: string;
|
|
19
|
+
/** Access-token expiry in ms since epoch. */
|
|
20
|
+
expires: number;
|
|
21
|
+
/** Provider-specific account identifier (e.g. Codex chatgpt_account_id). */
|
|
22
|
+
accountId?: string;
|
|
23
|
+
/** Identity email (when JWT decode produced one). */
|
|
24
|
+
email?: string;
|
|
25
|
+
/** Human-friendly display name (when available). */
|
|
26
|
+
displayName?: string;
|
|
27
|
+
/** Schema version. Currently always 1. Hard-fail on mismatch. */
|
|
28
|
+
version: 1;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* OAuthCredentialStorePort: Hexagonal architecture boundary for mutable
|
|
32
|
+
* OAuth credential persistence.
|
|
33
|
+
*
|
|
34
|
+
* Distinct from SecretStorePort (which is read-only). Every storage
|
|
35
|
+
* backend (file-based, encrypted SQLite) implements this interface.
|
|
36
|
+
*
|
|
37
|
+
* All operations are asynchronous and return Result<T, Error> for
|
|
38
|
+
* explicit error handling — never throw at the public boundary.
|
|
39
|
+
*/
|
|
40
|
+
export interface OAuthCredentialStorePort {
|
|
41
|
+
get(profileId: string): Promise<Result<OAuthProfile | undefined, Error>>;
|
|
42
|
+
set(profileId: string, profile: OAuthProfile): Promise<Result<void, Error>>;
|
|
43
|
+
delete(profileId: string): Promise<Result<boolean, Error>>;
|
|
44
|
+
list(filter?: {
|
|
45
|
+
provider?: string;
|
|
46
|
+
}): Promise<Result<OAuthProfile[], Error>>;
|
|
47
|
+
has(profileId: string): Promise<Result<boolean, Error>>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Profile-ID format regex: <provider>:<identity>.
|
|
51
|
+
* Provider must start with letter; alphanumeric + hyphen only.
|
|
52
|
+
* Identity is non-empty and may contain @, ., etc.
|
|
53
|
+
*/
|
|
54
|
+
export declare const PROFILE_ID_RE: RegExp;
|
|
55
|
+
/**
|
|
56
|
+
* Validate a profile-ID string against the <provider>:<identity> shape.
|
|
57
|
+
* Returns parsed parts on success; an Error describing the violation otherwise.
|
|
58
|
+
* Defense-in-depth: also rejects identities containing path-traversal or
|
|
59
|
+
* control characters (newline, null, slash, backslash, ..).
|
|
60
|
+
*/
|
|
61
|
+
export declare function validateProfileId(id: string): Result<{
|
|
62
|
+
provider: string;
|
|
63
|
+
identity: string;
|
|
64
|
+
}, Error>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ok, err } from "@comis/shared";
|
|
2
|
+
/**
|
|
3
|
+
* Profile-ID format regex: <provider>:<identity>.
|
|
4
|
+
* Provider must start with letter; alphanumeric + hyphen only.
|
|
5
|
+
* Identity is non-empty and may contain @, ., etc.
|
|
6
|
+
*/
|
|
7
|
+
export const PROFILE_ID_RE = /^[a-z][a-z0-9-]*:.+$/i;
|
|
8
|
+
/**
|
|
9
|
+
* Validate a profile-ID string against the <provider>:<identity> shape.
|
|
10
|
+
* Returns parsed parts on success; an Error describing the violation otherwise.
|
|
11
|
+
* Defense-in-depth: also rejects identities containing path-traversal or
|
|
12
|
+
* control characters (newline, null, slash, backslash, ..).
|
|
13
|
+
*/
|
|
14
|
+
export function validateProfileId(id) {
|
|
15
|
+
if (typeof id !== "string" || id.length === 0) {
|
|
16
|
+
return err(new Error("Invalid profile ID: empty or non-string"));
|
|
17
|
+
}
|
|
18
|
+
if (!PROFILE_ID_RE.test(id)) {
|
|
19
|
+
return err(new Error('Invalid profile ID "' + id + '": expected "<provider>:<identity>"'));
|
|
20
|
+
}
|
|
21
|
+
const colonIdx = id.indexOf(":");
|
|
22
|
+
const provider = id.slice(0, colonIdx);
|
|
23
|
+
const identity = id.slice(colonIdx + 1);
|
|
24
|
+
if (!provider)
|
|
25
|
+
return err(new Error('Invalid profile ID "' + id + '": empty provider'));
|
|
26
|
+
if (!identity)
|
|
27
|
+
return err(new Error('Invalid profile ID "' + id + '": empty identity'));
|
|
28
|
+
if (identity.includes("\0") ||
|
|
29
|
+
identity.includes("\n") ||
|
|
30
|
+
identity.includes("\r") ||
|
|
31
|
+
identity.includes("..") ||
|
|
32
|
+
identity.includes("/") ||
|
|
33
|
+
identity.includes("\\")) {
|
|
34
|
+
return err(new Error('Invalid profile ID "' + id + '": identity contains forbidden characters'));
|
|
35
|
+
}
|
|
36
|
+
return ok({ provider, identity });
|
|
37
|
+
}
|
|
@@ -22,6 +22,26 @@ export interface ComisToolMetadata {
|
|
|
22
22
|
outputSchema?: Record<string, unknown>;
|
|
23
23
|
/** Tool names that should be co-discovered whenever this tool is discovered (bidirectional). */
|
|
24
24
|
coDiscoverWith?: string[];
|
|
25
|
+
/** Valid `action` enum values for action-discriminated tools. Used by the
|
|
26
|
+
* generic schema-validator in @comis/skills/bridge to gate unknown actions
|
|
27
|
+
* before the per-tool validateInput runs. Field shape mirrors
|
|
28
|
+
* `ManagedSectionRedirect.schemaFragment.actions` in
|
|
29
|
+
* @comis/core/src/config/managed-sections.ts so cross-consistency tests
|
|
30
|
+
* can compare them. */
|
|
31
|
+
validActions?: readonly string[];
|
|
32
|
+
/** Full set of accepted top-level parameter keys. Unknown keys trigger a
|
|
33
|
+
* Levenshtein "did you mean" hint via the schema-validator. Action-
|
|
34
|
+
* discriminated tools list the union across all actions; non-discriminated
|
|
35
|
+
* tools list every accepted key. Omit when the tool's params are open-
|
|
36
|
+
* ended (e.g. exec). */
|
|
37
|
+
validKeys?: readonly string[];
|
|
38
|
+
/** Required keys per action value (action-discriminated tools only). Maps
|
|
39
|
+
* each `action` literal to the list of params that MUST be present beyond
|
|
40
|
+
* `action` itself. Field name + shape mirror
|
|
41
|
+
* `ManagedSectionRedirect.schemaFragment.requiredByAction` in
|
|
42
|
+
* @comis/core/src/config/managed-sections.ts. Omit actions with no
|
|
43
|
+
* required fields beyond `action`. */
|
|
44
|
+
requiredByAction?: Readonly<Record<string, readonly string[]>>;
|
|
25
45
|
/** Pre-flight input validator. Returns error string on failure, undefined on success. */
|
|
26
46
|
validateInput?: (params: Record<string, unknown>) => string | undefined | Promise<string | undefined>;
|
|
27
47
|
}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
import type { DeviceIdentity } from "@comis/core";
|
|
8
|
-
import type { AppContainer, ChannelPort } from "@comis/core";
|
|
8
|
+
import type { AppContainer, ChannelPort, DeliveryQueuePort } from "@comis/core";
|
|
9
9
|
import type { ApprovalGate } from "@comis/core";
|
|
10
|
-
import type { ChannelHealthMonitor } from "@comis/channels";
|
|
10
|
+
import type { ChannelHealthMonitor, DeliveryAdapter } from "@comis/channels";
|
|
11
11
|
import type { ComisLogger } from "@comis/infra";
|
|
12
|
-
import type { SessionResetScheduler } from "@comis/agent";
|
|
12
|
+
import type { SessionResetScheduler, BackgroundTaskManager } from "@comis/agent";
|
|
13
13
|
import type { GatewayServerHandle } from "@comis/gateway";
|
|
14
14
|
import type { HeartbeatRunner, CronScheduler } from "@comis/scheduler";
|
|
15
15
|
import type { BrowserService, RpcCall } from "@comis/skills";
|
|
@@ -52,6 +52,26 @@ export interface DaemonInstance {
|
|
|
52
52
|
readonly heartbeatRunner?: HeartbeatRunner;
|
|
53
53
|
readonly gatewayHandle?: GatewayServerHandle;
|
|
54
54
|
readonly adapterRegistry: Map<string, ChannelPort>;
|
|
55
|
+
/**
|
|
56
|
+
* Delivery-queue-side adapter map. Adapters registered here are
|
|
57
|
+
* used by the recurring delivery-queue drainer for crash-safe outbound
|
|
58
|
+
* delivery. Distinct from `adapterRegistry` (which serves direct dispatch
|
|
59
|
+
* via the RPC message.* path) -- daemon.ts populates this map AFTER
|
|
60
|
+
* setupChannels returns. Tests that exercise the recurring drainer must
|
|
61
|
+
* register adapters in this map so the drainer can find them.
|
|
62
|
+
*/
|
|
63
|
+
readonly deliveryAdapters: Map<string, DeliveryAdapter>;
|
|
64
|
+
/**
|
|
65
|
+
* Crash-safe delivery queue port. Exposed for tests that need
|
|
66
|
+
* to assert on queue depth (depth returns to 0 after drain).
|
|
67
|
+
*/
|
|
68
|
+
readonly deliveryQueue: DeliveryQueuePort;
|
|
69
|
+
/**
|
|
70
|
+
* Background task manager. Exposed for integration tests that
|
|
71
|
+
* need to promote synthetic tasks and call complete()/fail() to drive the
|
|
72
|
+
* completion runner pipeline without a live LLM.
|
|
73
|
+
*/
|
|
74
|
+
readonly backgroundTaskManager: BackgroundTaskManager;
|
|
55
75
|
readonly rpcCall: RpcCall;
|
|
56
76
|
readonly deviceIdentity?: DeviceIdentity;
|
|
57
77
|
readonly diagnosticCollector: DiagnosticCollector;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Daemon Entry Point: thin orchestrator calling setupXxx() factories in sequence.
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { bootstrap, loadEnvFile, createApprovalGate, parseFormattedSessionKey, createConfigGitManager, envSubset, generateStrongToken, createAuditAggregator, createInjectionRateLimiter, validateMemoryWrite, checkApprovalsConfig, safePath, resolveConfigSecretRefs, formatSessionKey } from "@comis/core";
|
|
6
|
+
import { bootstrap, loadEnvFile, createApprovalGate, parseFormattedSessionKey, createConfigGitManager, envSubset, generateStrongToken, createAuditAggregator, createInjectionRateLimiter, validateMemoryWrite, checkApprovalsConfig, safePath, resolveConfigSecretRefs, formatSessionKey, BackgroundTasksConfigSchema } from "@comis/core";
|
|
7
7
|
import { setupSecrets as _setupSecretsImpl, createSqliteSecretStore, createNamedGraphStore, createContextStore, createObservabilityStore } from "@comis/memory";
|
|
8
8
|
import { ok, err, suppressError } from "@comis/shared";
|
|
9
9
|
import { createGatewayServer } from "@comis/gateway";
|
|
10
|
-
import { setupLogging, setupObservability, setupHealth, setupMemory, setupAgents, setupSchedulers, setupChannels, setupMedia, setupCrossSession, setupMcp, setupTools, setupMonitoring, setupHeartbeat, setupTaskExtraction, setupShutdown, setupGateway, setupRpcBridge, setupDeliveryQueue, setupDeliveryMirror, setupNotifications, setupBackgroundTasks, } from "./wiring/index.js";
|
|
10
|
+
import { setupLogging, setupObservability, setupHealth, setupMemory, setupAgents, setupSchedulers, setupChannels, setupMedia, setupCrossSession, setupMcp, setupTools, setupMonitoring, setupHeartbeat, setupTaskExtraction, setupShutdown, setupGateway, setupRpcBridge, setupDeliveryQueue, setupDeliveryMirror, setupNotifications, setupBackgroundTasks, setupBackgroundCompletionRunner, } from "./wiring/index.js";
|
|
11
11
|
import { setupSingleAgent } from "./wiring/setup-agents.js";
|
|
12
12
|
import { createActiveRunRegistry, createModelCatalog, wireSessionStateCleanup, wireMcpDisconnectCleanup, createGeminiCacheManager, wireGeminiCacheCleanup, createSessionTrackerRegistry, validateProviderOverrides } from "@comis/agent";
|
|
13
13
|
import { detectSandboxProvider, createImageGenProvider, createImageGenRateLimiter, createFileStateTracker } from "@comis/skills";
|
|
@@ -27,6 +27,7 @@ import { registerGracefulShutdown } from "./process/graceful-shutdown.js";
|
|
|
27
27
|
import { createProcessMonitor } from "./process/process-monitor.js";
|
|
28
28
|
import { startWatchdog } from "./health/watchdog.js";
|
|
29
29
|
import { emitDockerRestartPolicyWarn } from "./setup-docker-restart-warn.js";
|
|
30
|
+
import { hasAnyOAuthAgent, emitOAuthTlsPreflightWarn } from "./wiring/oauth-preflight.js";
|
|
30
31
|
import { randomUUID, createHmac } from "node:crypto";
|
|
31
32
|
import { existsSync, chmodSync, statSync, mkdirSync, readFileSync, unlinkSync, cpSync } from "node:fs";
|
|
32
33
|
import { writeFile as fsWriteFile, rm } from "node:fs/promises";
|
|
@@ -184,7 +185,7 @@ export async function runPreflightDoctor(exitFn, opts = {}) {
|
|
|
184
185
|
level: 60,
|
|
185
186
|
time: new Date().toISOString(),
|
|
186
187
|
name: "comis-daemon",
|
|
187
|
-
|
|
188
|
+
submodule: "preflight",
|
|
188
189
|
errorKind: "dependency",
|
|
189
190
|
err: message,
|
|
190
191
|
hint: "Native module 'better-sqlite3' failed to load. Try: npm rebuild better-sqlite3 (or re-run install.sh). If this persists, reinstall comisai from a fresh tarball.",
|
|
@@ -243,6 +244,11 @@ export async function main(overrides = {}) {
|
|
|
243
244
|
});
|
|
244
245
|
let mergedEnv = process.env;
|
|
245
246
|
let secretStore;
|
|
247
|
+
// Captured here so setupAgents can wire the encrypted-mode OAuth profile
|
|
248
|
+
// adapter against the SAME db handle (no dual-handle to the same secrets.db
|
|
249
|
+
// file).
|
|
250
|
+
let secretsCrypto;
|
|
251
|
+
let secretsDb;
|
|
246
252
|
if (!secretsBootResult.ok) {
|
|
247
253
|
// Invalid master key -- fatal error
|
|
248
254
|
throw new Error(`Secrets bootstrap failed: ${secretsBootResult.error.message}`);
|
|
@@ -252,6 +258,9 @@ export async function main(overrides = {}) {
|
|
|
252
258
|
const { crypto, dbPath } = secretsBootResult.value;
|
|
253
259
|
const store = createSqliteSecretStore(dbPath, crypto);
|
|
254
260
|
secretStore = store;
|
|
261
|
+
// Capture for downstream OAuth wiring in setupAgents.
|
|
262
|
+
secretsCrypto = crypto;
|
|
263
|
+
secretsDb = store.db;
|
|
255
264
|
const decryptResult = store.decryptAll();
|
|
256
265
|
if (!decryptResult.ok) {
|
|
257
266
|
throw new Error(`Secret decryption failed: ${decryptResult.error.message}`);
|
|
@@ -328,7 +337,7 @@ export async function main(overrides = {}) {
|
|
|
328
337
|
if (approvalsWarning) {
|
|
329
338
|
daemonLogger.warn({ hint: "Set approvals.enabled: true or remove unused rules", errorKind: "config" }, approvalsWarning);
|
|
330
339
|
}
|
|
331
|
-
// 3.6. Validate PROVIDER_OVERRIDES vs live pi-ai catalog
|
|
340
|
+
// 3.6. Validate PROVIDER_OVERRIDES vs live pi-ai catalog.
|
|
332
341
|
// Emits one structured WARN per orphaned override key (provider listed in
|
|
333
342
|
// PROVIDER_OVERRIDES that pi-ai no longer ships). Fire-and-forget: never
|
|
334
343
|
// throws, daemon continues to boot with dead override entries.
|
|
@@ -405,7 +414,7 @@ export async function main(overrides = {}) {
|
|
|
405
414
|
// Deferred channel plugins ref for resolving platform character limits.
|
|
406
415
|
// Populated after setupChannels; the callback is invoked at message time (always set by then).
|
|
407
416
|
const channelPluginsRef = {};
|
|
408
|
-
// 6.5.1. Background task system
|
|
417
|
+
// 6.5.1. Background task system
|
|
409
418
|
// Created before setupAgents so BackgroundTaskManager is available for executor deps.
|
|
410
419
|
const { backgroundTaskManager } = setupBackgroundTasks({
|
|
411
420
|
dataDir,
|
|
@@ -462,7 +471,10 @@ export async function main(overrides = {}) {
|
|
|
462
471
|
}
|
|
463
472
|
// 6.6. Agents
|
|
464
473
|
const agents = container.config.agents;
|
|
465
|
-
const { sessionManager, executors, workspaceDirs, costTrackers, budgetGuards, stepCounters, defaultAgentId, defaultWorkspaceDir, getExecutor, piSessionAdapters, skillWatcherHandles, skillRegistries, lockCleanupTimer, singleAgentDeps, providerHealth,
|
|
474
|
+
const { sessionManager, executors, workspaceDirs, costTrackers, budgetGuards, stepCounters, defaultAgentId, defaultWorkspaceDir, getExecutor, piSessionAdapters, skillWatcherHandles, skillRegistries, lockCleanupTimer, singleAgentDeps, providerHealth,
|
|
475
|
+
// Daemon-level OAuth credential store, threaded into RpcDispatchDeps
|
|
476
|
+
// below so agents.update can validate oauthProfiles patches via has().
|
|
477
|
+
oauthCredentialStore, } = await setupAgents({
|
|
466
478
|
container, memoryAdapter, sessionStore, agentLogger, outboundMediaEnabled: true,
|
|
467
479
|
autonomousMediaEnabled: !container.config.integrations.media.transcription.autoTranscribe
|
|
468
480
|
|| !container.config.integrations.media.vision.enabled
|
|
@@ -488,6 +500,11 @@ export async function main(overrides = {}) {
|
|
|
488
500
|
},
|
|
489
501
|
backgroundTaskManager, // Auto-background middleware in executor pipeline
|
|
490
502
|
backgroundNotifyFn: bgNotifyFn, // Completion notification via deferred notificationService ref
|
|
503
|
+
// Plumb the secrets bootstrap result through so setup-agents can wire the
|
|
504
|
+
// OAuth credential store. encrypted-mode shares the existing
|
|
505
|
+
// better-sqlite3 connection (no dual-handle).
|
|
506
|
+
secretsCrypto,
|
|
507
|
+
secretsDb,
|
|
491
508
|
});
|
|
492
509
|
// Log operation model resolutions at startup (dry-run validation)
|
|
493
510
|
logOperationModelDryRun({
|
|
@@ -565,7 +582,7 @@ export async function main(overrides = {}) {
|
|
|
565
582
|
// can be threaded into channel config command handling. The deferred dispatch pattern
|
|
566
583
|
// ensures rpcCall is safe to pass now; actual dispatch wires later via wireDispatch().
|
|
567
584
|
const { rpcCall, wireDispatch } = setupRpcBridge({ gatewayLogger });
|
|
568
|
-
// 6.6.8.6. Approval gate (moved before channels for
|
|
585
|
+
// 6.6.8.6. Approval gate (moved before channels for chat command interception)
|
|
569
586
|
const approvalGate = createApprovalGate({
|
|
570
587
|
eventBus: container.eventBus,
|
|
571
588
|
getTimeoutMs: () => container.config.approvals?.defaultTimeoutMs ?? 30_000,
|
|
@@ -573,7 +590,7 @@ export async function main(overrides = {}) {
|
|
|
573
590
|
getBatchApprovalTtlMs: () => container.config.approvals?.batchApprovalTtlMs ?? 30_000,
|
|
574
591
|
logger: daemonLogger, // Approval cache hit/miss debug logging
|
|
575
592
|
});
|
|
576
|
-
// 6.6.8.6.1. Restore pending approvals from previous restart
|
|
593
|
+
// 6.6.8.6.1. Restore pending approvals from previous restart
|
|
577
594
|
const approvalRestorePath = pathJoin(container.config.dataDir || dataDir, "restart-approvals.json");
|
|
578
595
|
if (existsSync(approvalRestorePath)) {
|
|
579
596
|
try {
|
|
@@ -615,9 +632,9 @@ export async function main(overrides = {}) {
|
|
|
615
632
|
}
|
|
616
633
|
// 6.6.7.8. Delivery queue: create adapter BEFORE setupChannels.
|
|
617
634
|
// channelAdapters map is passed by reference -- populated after setupChannels.
|
|
618
|
-
//
|
|
635
|
+
// drainAndStart() is called AFTER setupChannels (two-phase lifecycle).
|
|
619
636
|
const channelAdaptersRef = new Map();
|
|
620
|
-
const { deliveryQueue,
|
|
637
|
+
const { deliveryQueue, drainAndStart: drainAndStartDeliveryPrune, shutdown: shutdownDeliveryQueue } = await setupDeliveryQueue({
|
|
621
638
|
db, config: container.config, eventBus: container.eventBus, logger: daemonLogger, channelAdapters: channelAdaptersRef,
|
|
622
639
|
});
|
|
623
640
|
// 6.6.8. Channels (moved down from 6.6.6 -- needs ssrfFetcher and transcriber from setupMedia)
|
|
@@ -670,7 +687,7 @@ export async function main(overrides = {}) {
|
|
|
670
687
|
// Task extraction callback (gated by config.scheduler.tasks.enabled)
|
|
671
688
|
onTaskExtraction: extractFromConversation,
|
|
672
689
|
// Restart continuation: track recently-active sessions for SIGUSR2 replay.
|
|
673
|
-
// Two-callback timing split
|
|
690
|
+
// Two-callback timing split:
|
|
674
691
|
// onMessageReceived fires BEFORE processInboundMessage so the tracker
|
|
675
692
|
// Map is populated before any tool call could trigger SIGUSR2 mid-
|
|
676
693
|
// execution. Without this, multi-restart chains saw 0 captured records
|
|
@@ -708,7 +725,7 @@ export async function main(overrides = {}) {
|
|
|
708
725
|
},
|
|
709
726
|
// /approve and /deny chat command interception
|
|
710
727
|
approvalGate: container.config.approvals?.enabled ? approvalGate : undefined,
|
|
711
|
-
//
|
|
728
|
+
// Per-agent session adapters and cost trackers for slash commands
|
|
712
729
|
piSessionAdapters,
|
|
713
730
|
costTrackers,
|
|
714
731
|
// Delivery queue for crash-safe persistence
|
|
@@ -744,7 +761,7 @@ export async function main(overrides = {}) {
|
|
|
744
761
|
container.eventBus.on("system:shutdown", () => { shutdownMirror(); });
|
|
745
762
|
// Structured logging for delivery queue lifecycle events
|
|
746
763
|
setupDeliveryQueueLogging({ eventBus: container.eventBus, logger: daemonLogger });
|
|
747
|
-
// 6.6.8.0.1. Notification system
|
|
764
|
+
// 6.6.8.0.1. Notification system
|
|
748
765
|
// setupNotifications creates the NotificationService and SessionTracker.
|
|
749
766
|
// The factory is already complete -- this call wires it into the daemon.
|
|
750
767
|
const notificationContext = setupNotifications({
|
|
@@ -761,6 +778,34 @@ export async function main(overrides = {}) {
|
|
|
761
778
|
sessionTrackerRef.ref = notificationContext.sessionTracker;
|
|
762
779
|
// Wire deferred notification ref for background task completion callbacks
|
|
763
780
|
bgNotifyRef.ref = notificationContext.notificationService;
|
|
781
|
+
// 6.6.8.0.2. Background-task completion runner -- re-enters the originating
|
|
782
|
+
// agent session when a backgrounded tool finishes.
|
|
783
|
+
// Runs AFTER setupNotifications so bgNotifyFn is live as fallbackNotifyFn.
|
|
784
|
+
//
|
|
785
|
+
// maxBackgroundHops is read from config.backgroundTasks.maxBackgroundHops
|
|
786
|
+
// (NOT config.workflow.*).
|
|
787
|
+
// backgroundTasks is a per-agent field; parse via BackgroundTasksConfigSchema to
|
|
788
|
+
// get the correct default (3) when not explicitly configured.
|
|
789
|
+
const bgConfigForRunner = BackgroundTasksConfigSchema.parse(agents[defaultAgentId]?.backgroundTasks ?? {});
|
|
790
|
+
const bgCompletionRunnerContext = setupBackgroundCompletionRunner({
|
|
791
|
+
eventBus: container.eventBus,
|
|
792
|
+
// setup-agents.ts:178 declares getExecutor as synchronous
|
|
793
|
+
// ((agentId: string) => AgentExecutor) -- resolved lazily per event.
|
|
794
|
+
getExecutor,
|
|
795
|
+
sessionStore,
|
|
796
|
+
taskManager: backgroundTaskManager,
|
|
797
|
+
fallbackNotifyFn: bgNotifyFn,
|
|
798
|
+
maxBackgroundHops: bgConfigForRunner.maxBackgroundHops,
|
|
799
|
+
logger: daemonLogger,
|
|
800
|
+
});
|
|
801
|
+
container.eventBus.on("system:shutdown", () => {
|
|
802
|
+
void bgCompletionRunnerContext.runner.shutdown();
|
|
803
|
+
});
|
|
804
|
+
// 6.6.8.0.3. Recover background tasks NOW (after the runner is subscribed).
|
|
805
|
+
// setup-background-tasks.ts INTENTIONALLY does not call this -- if it did,
|
|
806
|
+
// recovered failed events would fire before the runner subscribes and the
|
|
807
|
+
// user would never see the recovery announcement.
|
|
808
|
+
backgroundTaskManager.recoverOnStartup();
|
|
764
809
|
// Channel health monitor -- polls adapter getStatus() at configurable interval.
|
|
765
810
|
// Created after adapters are initialized, started immediately with the adapter map.
|
|
766
811
|
let channelHealthMonitor;
|
|
@@ -808,7 +853,7 @@ export async function main(overrides = {}) {
|
|
|
808
853
|
if (sandboxProvider) {
|
|
809
854
|
skillsLogger.info({ provider: sandboxProvider.name }, "Exec sandbox provider detected");
|
|
810
855
|
}
|
|
811
|
-
// 6.6.8.4.1. Image generation provider
|
|
856
|
+
// 6.6.8.4.1. Image generation provider
|
|
812
857
|
const imageGenConfig = container.config.integrations.media.imageGeneration;
|
|
813
858
|
const imageGenResult = createImageGenProvider(imageGenConfig, container.secretManager);
|
|
814
859
|
const imageGenProvider = imageGenResult.ok ? imageGenResult.value : undefined;
|
|
@@ -1063,7 +1108,7 @@ export async function main(overrides = {}) {
|
|
|
1063
1108
|
daemonLogger.info({ agentId, durationMs: Date.now() - startMs }, "Agent hot-removed from running daemon");
|
|
1064
1109
|
};
|
|
1065
1110
|
// 6.7.1. Wire RPC dispatch now that heartbeatRunner is available
|
|
1066
|
-
// Keep a reference so we can add wsConnections/mediaDir after gateway setup
|
|
1111
|
+
// Keep a reference so we can add wsConnections/mediaDir after gateway setup.
|
|
1067
1112
|
const rpcDispatchDeps = {
|
|
1068
1113
|
defaultAgentId, getAgentCronScheduler, cronSchedulers, executionTrackers,
|
|
1069
1114
|
wakeCoalescer, defaultWorkspaceDir, workspaceDirs, memoryApi, memoryAdapter,
|
|
@@ -1102,7 +1147,7 @@ export async function main(overrides = {}) {
|
|
|
1102
1147
|
},
|
|
1103
1148
|
memoryWriteValidator: validateMemoryWrite, // memory content validation
|
|
1104
1149
|
eventBus: container.eventBus, // security event emission for memory writes
|
|
1105
|
-
mcpClientManager, //
|
|
1150
|
+
mcpClientManager, // MCP server management
|
|
1106
1151
|
contextStore, // DAG recall RPC handlers
|
|
1107
1152
|
contextEngineConfig: {
|
|
1108
1153
|
maxRecallsPerDay: agents[defaultAgentId]?.contextEngine?.maxRecallsPerDay ?? 10,
|
|
@@ -1120,7 +1165,7 @@ export async function main(overrides = {}) {
|
|
|
1120
1165
|
embeddingCacheStats, // embedding cache stats for memory.embeddingCache RPC
|
|
1121
1166
|
embeddingCircuitBreakerState, // Embedding circuit breaker state for memory operations
|
|
1122
1167
|
skillRegistries, // skill management handlers in rpc-dispatch
|
|
1123
|
-
notificationService: notificationContext.notificationService, //
|
|
1168
|
+
notificationService: notificationContext.notificationService, // notification.send RPC handler
|
|
1124
1169
|
// Image generation RPC handler deps
|
|
1125
1170
|
imageHandlerDeps: imageGenProvider && imageGenRateLimiter ? {
|
|
1126
1171
|
provider: imageGenProvider,
|
|
@@ -1129,6 +1174,9 @@ export async function main(overrides = {}) {
|
|
|
1129
1174
|
logger: skillsLogger,
|
|
1130
1175
|
getChannelAdapter: (channelType) => adaptersByType.get(channelType),
|
|
1131
1176
|
} : undefined,
|
|
1177
|
+
// Daemon-level OAuth credential store handle for the agents.update
|
|
1178
|
+
// oauthProfiles existence check.
|
|
1179
|
+
oauthCredentialStore,
|
|
1132
1180
|
};
|
|
1133
1181
|
wireDispatch(rpcDispatchDeps);
|
|
1134
1182
|
// 7. Gateway
|
|
@@ -1147,7 +1195,7 @@ export async function main(overrides = {}) {
|
|
|
1147
1195
|
suspendedAgents,
|
|
1148
1196
|
instanceId, startupStartMs,
|
|
1149
1197
|
});
|
|
1150
|
-
// 7.0.1. Wire deferred gateway attachment deps
|
|
1198
|
+
// 7.0.1. Wire deferred gateway attachment deps
|
|
1151
1199
|
// wsConnections and mediaDir are now available after gateway setup; message.attach
|
|
1152
1200
|
// handler closures read from the mutable rpcDispatchDeps reference at call time.
|
|
1153
1201
|
rpcDispatchDeps.wsConnections = wsConnections;
|
|
@@ -1262,7 +1310,7 @@ export async function main(overrides = {}) {
|
|
|
1262
1310
|
secretStore, // close secrets.db on shutdown
|
|
1263
1311
|
auditAggregator, // clear pending dedup timers
|
|
1264
1312
|
injectionRateLimiter, // clear rate limiter timers on shutdown
|
|
1265
|
-
lockCleanupTimer, //
|
|
1313
|
+
lockCleanupTimer, // clear periodic lock cleanup timer
|
|
1266
1314
|
dataDir: container.config.dataDir || dataDir,
|
|
1267
1315
|
continuationTracker,
|
|
1268
1316
|
lifecycleReactors, // destroy lifecycle reactors on shutdown
|
|
@@ -1388,6 +1436,12 @@ export async function main(overrides = {}) {
|
|
|
1388
1436
|
// startup banner. No-op outside containers. Wired here so the WARN lands
|
|
1389
1437
|
// in `docker logs` next to the banner, where operators look first.
|
|
1390
1438
|
emitDockerRestartPolicyWarn(daemonLogger);
|
|
1439
|
+
// Boot-time TLS preflight against auth.openai.com.
|
|
1440
|
+
// Fire-and-forget — daemon is already serving by this point; the WARN
|
|
1441
|
+
// is purely advisory. Skipped when no OAuth-using agent is configured.
|
|
1442
|
+
if (hasAnyOAuthAgent(container.config.agents)) {
|
|
1443
|
+
void emitOAuthTlsPreflightWarn(daemonLogger);
|
|
1444
|
+
}
|
|
1391
1445
|
// Snapshot current config as last-known-good after successful startup
|
|
1392
1446
|
if (configPaths.length > 0) {
|
|
1393
1447
|
const activeConfigPath = configPaths[configPaths.length - 1];
|
|
@@ -1400,6 +1454,15 @@ export async function main(overrides = {}) {
|
|
|
1400
1454
|
container, logger, logLevelManager, tokenTracker, latencyRecorder,
|
|
1401
1455
|
processMonitor, shutdownHandle, watchdogHandle, cronSchedulers, resetSchedulers,
|
|
1402
1456
|
browserServices, heartbeatRunner, gatewayHandle, adapterRegistry: adaptersByType,
|
|
1457
|
+
// Expose the delivery-queue-side adapter map and the queue port
|
|
1458
|
+
// itself so integration tests can register adapters that the recurring
|
|
1459
|
+
// drainer sees and assert on queue depth.
|
|
1460
|
+
deliveryAdapters: channelAdaptersRef,
|
|
1461
|
+
deliveryQueue,
|
|
1462
|
+
// Expose the background task manager so integration tests can
|
|
1463
|
+
// promote synthetic tasks and call complete()/fail() to drive the
|
|
1464
|
+
// completion runner pipeline without requiring a live LLM call.
|
|
1465
|
+
backgroundTaskManager,
|
|
1403
1466
|
rpcCall, deviceIdentity, diagnosticCollector, billingEstimator,
|
|
1404
1467
|
channelActivityTracker, deliveryTracer, approvalGate, channelHealthMonitor, sessionStoreBridge,
|
|
1405
1468
|
};
|