comisai 1.0.34 → 1.0.37
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 +30 -4
- package/node_modules/@comis/agent/dist/background/background-task-manager.d.ts +22 -2
- package/node_modules/@comis/agent/dist/background/background-task-manager.js +88 -40
- package/node_modules/@comis/agent/dist/background/background-task-persistence.js +34 -4
- package/node_modules/@comis/agent/dist/background/background-task-types.d.ts +59 -3
- package/node_modules/@comis/agent/dist/background/background-task-types.js +1 -1
- package/node_modules/@comis/agent/dist/background/completion-dispatcher.d.ts +130 -0
- package/node_modules/@comis/agent/dist/background/completion-dispatcher.js +215 -0
- 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 +62 -0
- package/node_modules/@comis/agent/dist/background/completion-runner.js +234 -0
- package/node_modules/@comis/agent/dist/background/index.d.ts +10 -1
- package/node_modules/@comis/agent/dist/background/index.js +4 -0
- package/node_modules/@comis/agent/dist/background/session-resolver.d.ts +85 -0
- package/node_modules/@comis/agent/dist/background/session-resolver.js +78 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/messaging-sections.js +1 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/tool-descriptions.js +3 -3
- package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.d.ts +30 -2
- package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.js +51 -2
- package/node_modules/@comis/agent/dist/bootstrap/system-prompt-assembler.d.ts +22 -0
- package/node_modules/@comis/agent/dist/bootstrap/system-prompt-assembler.js +2 -2
- package/node_modules/@comis/agent/dist/bridge/bridge-event-handlers.d.ts +1 -5
- package/node_modules/@comis/agent/dist/bridge/bridge-event-handlers.js +2 -14
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.d.ts +43 -2
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.js +17 -2
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.d.ts +32 -23
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +145 -62
- 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/signature-surrogate-guard.d.ts +10 -10
- package/node_modules/@comis/agent/dist/context-engine/signature-surrogate-guard.js +14 -14
- package/node_modules/@comis/agent/dist/context-engine/thinking-block-cleaner.d.ts +11 -13
- package/node_modules/@comis/agent/dist/context-engine/thinking-block-cleaner.js +14 -15
- 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/capability-index-context.d.ts +72 -0
- package/node_modules/@comis/agent/dist/executor/capability-index-context.js +329 -0
- package/node_modules/@comis/agent/dist/executor/drain-helper.d.ts +122 -0
- package/node_modules/@comis/agent/dist/executor/drain-helper.js +173 -0
- package/node_modules/@comis/agent/dist/executor/error-classifier.js +2 -2
- 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 +78 -4
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.js +150 -31
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.d.ts +7 -0
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +26 -5
- 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.d.ts +18 -1
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +20 -18
- 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/jit-guide-injector.d.ts +11 -2
- package/node_modules/@comis/agent/dist/executor/jit-guide-injector.js +16 -2
- 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 +21 -2
- package/node_modules/@comis/agent/dist/executor/pi-executor.js +96 -18
- package/node_modules/@comis/agent/dist/executor/post-batch-continuation.js +7 -7
- package/node_modules/@comis/agent/dist/executor/prompt-assembly.d.ts +9 -1
- package/node_modules/@comis/agent/dist/executor/prompt-assembly.js +15 -1
- 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 +18 -27
- package/node_modules/@comis/agent/dist/executor/tool-deferral.js +34 -43
- 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/model-registry-adapter.js +1 -1
- package/node_modules/@comis/agent/dist/model/model-scanner.js +1 -1
- 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/safety/tool-retry-breaker.d.ts +11 -1
- package/node_modules/@comis/agent/dist/safety/tool-retry-breaker.js +19 -22
- package/node_modules/@comis/agent/dist/session/comis-session-manager.d.ts +17 -3
- 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/dist/spawn/pi-mono-adapters.d.ts +1 -1
- package/node_modules/@comis/agent/dist/spawn/pi-mono-adapters.js +5 -5
- package/node_modules/@comis/agent/dist/workspace/data-env.d.ts +38 -0
- package/node_modules/@comis/agent/dist/workspace/data-env.js +56 -0
- package/node_modules/@comis/agent/dist/workspace/index.d.ts +1 -0
- package/node_modules/@comis/agent/dist/workspace/index.js +1 -0
- package/node_modules/@comis/agent/dist/workspace/templates.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/index.d.ts +1 -1
- package/node_modules/@comis/channels/dist/index.js +1 -1
- package/node_modules/@comis/channels/dist/shared/channel-manager.d.ts +9 -3
- package/node_modules/@comis/channels/dist/shared/deliver-to-channel.js +12 -10
- package/node_modules/@comis/channels/dist/shared/inbound-gate.d.ts +1 -1
- package/node_modules/@comis/channels/dist/shared/inbound-gate.js +22 -7
- package/node_modules/@comis/channels/dist/shared/inbound-pipeline.d.ts +10 -3
- package/node_modules/@comis/channels/dist/shared/inbound-route.d.ts +1 -1
- package/node_modules/@comis/channels/dist/shared/inbound-route.js +13 -2
- package/node_modules/@comis/channels/dist/shared/response-filter.d.ts +11 -24
- package/node_modules/@comis/channels/dist/shared/response-filter.js +25 -53
- 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/commands/providers.d.ts +1 -2
- package/node_modules/@comis/cli/dist/commands/providers.js +5 -6
- 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/field-metadata.js +2 -0
- package/node_modules/@comis/core/dist/config/immutable-keys.js +4 -1
- package/node_modules/@comis/core/dist/config/index.d.ts +7 -1
- package/node_modules/@comis/core/dist/config/index.js +4 -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 -792
- package/node_modules/@comis/core/dist/config/schema-agent.js +16 -1
- package/node_modules/@comis/core/dist/config/schema-approvals.d.ts +0 -14
- package/node_modules/@comis/core/dist/config/schema-auto-reply-engine.d.ts +0 -6
- package/node_modules/@comis/core/dist/config/schema-background-tasks.d.ts +1 -6
- package/node_modules/@comis/core/dist/config/schema-background-tasks.js +7 -0
- package/node_modules/@comis/core/dist/config/schema-browser.d.ts +0 -18
- package/node_modules/@comis/core/dist/config/schema-channel.d.ts +0 -158
- package/node_modules/@comis/core/dist/config/schema-coalescer.d.ts +0 -5
- package/node_modules/@comis/core/dist/config/schema-daemon.d.ts +0 -32
- package/node_modules/@comis/core/dist/config/schema-delivery.d.ts +1 -17
- package/node_modules/@comis/core/dist/config/schema-delivery.js +2 -0
- package/node_modules/@comis/core/dist/config/schema-documentation.d.ts +0 -12
- package/node_modules/@comis/core/dist/config/schema-embedding.d.ts +0 -20
- package/node_modules/@comis/core/dist/config/schema-envelope.d.ts +0 -15
- package/node_modules/@comis/core/dist/config/schema-gateway.d.ts +0 -37
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.d.ts +0 -4
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.js +0 -2
- package/node_modules/@comis/core/dist/config/schema-integrations.d.ts +0 -318
- package/node_modules/@comis/core/dist/config/schema-lifecycle-reactions.d.ts +0 -18
- package/node_modules/@comis/core/dist/config/schema-memory-review.d.ts +0 -7
- package/node_modules/@comis/core/dist/config/schema-memory.d.ts +0 -16
- package/node_modules/@comis/core/dist/config/schema-messages.d.ts +0 -8
- package/node_modules/@comis/core/dist/config/schema-models.d.ts +0 -15
- package/node_modules/@comis/core/dist/config/schema-notification.d.ts +0 -5
- package/node_modules/@comis/core/dist/config/schema-oauth.d.ts +18 -0
- package/node_modules/@comis/core/dist/config/schema-oauth.js +19 -0
- package/node_modules/@comis/core/dist/config/schema-observability.d.ts +0 -38
- package/node_modules/@comis/core/dist/config/schema-output-retention.d.ts +34 -0
- package/node_modules/@comis/core/dist/config/schema-output-retention.js +48 -0
- package/node_modules/@comis/core/dist/config/schema-plugins.d.ts +0 -8
- package/node_modules/@comis/core/dist/config/schema-providers.d.ts +0 -64
- package/node_modules/@comis/core/dist/config/schema-queue.d.ts +0 -58
- package/node_modules/@comis/core/dist/config/schema-response-prefix.d.ts +0 -2
- package/node_modules/@comis/core/dist/config/schema-retry.d.ts +0 -6
- package/node_modules/@comis/core/dist/config/schema-scheduler.d.ts +0 -39
- package/node_modules/@comis/core/dist/config/schema-secrets.d.ts +0 -3
- package/node_modules/@comis/core/dist/config/schema-security.d.ts +0 -18
- package/node_modules/@comis/core/dist/config/schema-send-policy.d.ts +0 -13
- package/node_modules/@comis/core/dist/config/schema-sender-trust-display.d.ts +0 -5
- package/node_modules/@comis/core/dist/config/schema-serializer.js +2 -0
- package/node_modules/@comis/core/dist/config/schema-skills.d.ts +0 -63
- package/node_modules/@comis/core/dist/config/schema-skills.js +3 -4
- package/node_modules/@comis/core/dist/config/schema-streaming.d.ts +0 -38
- package/node_modules/@comis/core/dist/config/schema-telegram-file-guard.d.ts +0 -3
- package/node_modules/@comis/core/dist/config/schema-tooling.d.ts +87 -0
- package/node_modules/@comis/core/dist/config/schema-tooling.js +152 -0
- package/node_modules/@comis/core/dist/config/schema-verbosity.d.ts +0 -12
- package/node_modules/@comis/core/dist/config/schema-webhooks.d.ts +0 -40
- package/node_modules/@comis/core/dist/config/schema.d.ts +50 -37
- package/node_modules/@comis/core/dist/config/schema.js +9 -0
- package/node_modules/@comis/core/dist/context/context.d.ts +0 -4
- package/node_modules/@comis/core/dist/domain/approval-request.d.ts +0 -17
- package/node_modules/@comis/core/dist/domain/background-task-origin.d.ts +29 -0
- package/node_modules/@comis/core/dist/domain/background-task-origin.js +39 -0
- package/node_modules/@comis/core/dist/domain/delivery-origin.d.ts +0 -5
- package/node_modules/@comis/core/dist/domain/execution-graph.d.ts +0 -48
- package/node_modules/@comis/core/dist/domain/memory-entry.d.ts +0 -3
- package/node_modules/@comis/core/dist/domain/model-compat.d.ts +0 -4
- package/node_modules/@comis/core/dist/domain/normalized-message.d.ts +0 -15
- package/node_modules/@comis/core/dist/domain/provider-capabilities.d.ts +0 -6
- package/node_modules/@comis/core/dist/domain/rich-message.d.ts +0 -14
- package/node_modules/@comis/core/dist/domain/subagent-context-config.d.ts +0 -22
- package/node_modules/@comis/core/dist/domain/subagent-context-types.d.ts +0 -8
- package/node_modules/@comis/core/dist/event-bus/events-agent.d.ts +31 -0
- package/node_modules/@comis/core/dist/event-bus/events-infra.d.ts +76 -2
- package/node_modules/@comis/core/dist/exports/config.d.ts +2 -2
- package/node_modules/@comis/core/dist/exports/config.js +3 -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/hooks.d.ts +1 -1
- 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/channel-plugin.d.ts +0 -13
- 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 +4 -0
- package/node_modules/@comis/core/dist/ports/index.js +5 -0
- package/node_modules/@comis/core/dist/ports/no-op-tool-capability.d.ts +30 -0
- package/node_modules/@comis/core/dist/ports/no-op-tool-capability.js +47 -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/ports/tool-capability.d.ts +165 -0
- package/node_modules/@comis/core/dist/ports/tool-capability.js +15 -0
- package/node_modules/@comis/core/dist/security/audit.d.ts +0 -11
- package/node_modules/@comis/core/dist/tool-metadata.d.ts +41 -1
- package/node_modules/@comis/core/dist/tool-metadata.js +1 -1
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/bundled-skills/skill-creator/scripts/validate-skill.py +1 -1
- package/node_modules/@comis/daemon/dist/daemon-types.d.ts +23 -3
- package/node_modules/@comis/daemon/dist/daemon.js +168 -30
- 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.d.ts +1 -1
- package/node_modules/@comis/daemon/dist/rpc/agent-inline-workspace.js +3 -3
- package/node_modules/@comis/daemon/dist/rpc/builtin-provider-guard.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/model-handlers.d.ts +1 -1
- package/node_modules/@comis/daemon/dist/rpc/model-handlers.js +2 -2
- 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/sub-agent-runner.d.ts +18 -0
- package/node_modules/@comis/daemon/dist/sub-agent-runner.js +41 -9
- package/node_modules/@comis/daemon/dist/wiring/index.d.ts +4 -0
- package/node_modules/@comis/daemon/dist/wiring/index.js +2 -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 +81 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.js +164 -3
- package/node_modules/@comis/daemon/dist/wiring/setup-background-completion-runner.d.ts +58 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-background-completion-runner.js +59 -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 +13 -7
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.d.ts +9 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.js +35 -10
- package/node_modules/@comis/daemon/dist/wiring/setup-cross-session.d.ts +20 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-cross-session.js +21 -16
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.d.ts +14 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.js +65 -20
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.d.ts +4 -6
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.js +3 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-heartbeat.d.ts +20 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-heartbeat.js +11 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-output-retention.d.ts +89 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-output-retention.js +212 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-schedulers.js +4 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-tools.d.ts +18 -4
- package/node_modules/@comis/daemon/dist/wiring/setup-tools.js +29 -10
- package/node_modules/@comis/daemon/dist/wiring/tool-capability-adapter.d.ts +75 -0
- package/node_modules/@comis/daemon/dist/wiring/tool-capability-adapter.js +253 -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/dist/webhook/webhook-endpoint.d.ts +0 -4
- 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/cron/cron-types.d.ts +0 -42
- 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.d.ts +29 -8
- package/node_modules/@comis/scheduler/dist/heartbeat/agent-heartbeat-source.js +20 -8
- 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/dist/system-events/system-event-types.d.ts +0 -3
- package/node_modules/@comis/scheduler/dist/tasks/task-types.d.ts +0 -17
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/dist/index.d.ts +3 -0
- package/node_modules/@comis/shared/dist/index.js +4 -0
- package/node_modules/@comis/shared/dist/mcp-tool-name.d.ts +78 -0
- package/node_modules/@comis/shared/dist/mcp-tool-name.js +92 -0
- package/node_modules/@comis/shared/dist/silent-tokens.d.ts +38 -0
- package/node_modules/@comis/shared/dist/silent-tokens.js +51 -0
- package/node_modules/@comis/shared/dist/visible-delivery.d.ts +28 -0
- package/node_modules/@comis/shared/dist/visible-delivery.js +16 -0
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/dist/bridge/mcp-tool-bridge.d.ts +2 -13
- package/node_modules/@comis/skills/dist/bridge/mcp-tool-bridge.js +3 -21
- 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 +133 -3
- 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.d.ts +55 -9
- package/node_modules/@comis/skills/dist/builtin/exec-tool.js +392 -19
- package/node_modules/@comis/skills/dist/builtin/file-tools/grep-tool.js +6 -6
- package/node_modules/@comis/skills/dist/builtin/install-detour.d.ts +67 -0
- package/node_modules/@comis/skills/dist/builtin/install-detour.js +342 -0
- package/node_modules/@comis/skills/dist/builtin/platform/admin-manage-factory.js +5 -5
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.d.ts +7 -6
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.js +40 -29
- 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/platform/message-tool.js +18 -0
- package/node_modules/@comis/skills/dist/builtin/platform/messaging-factory.d.ts +18 -1
- package/node_modules/@comis/skills/dist/builtin/platform/messaging-factory.js +18 -2
- package/node_modules/@comis/skills/dist/builtin/platform/models-manage-tool.js +3 -3
- package/node_modules/@comis/skills/dist/builtin/process-registry.d.ts +14 -0
- package/node_modules/@comis/skills/dist/builtin/process-tool.d.ts +24 -4
- package/node_modules/@comis/skills/dist/builtin/process-tool.js +25 -7
- 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 +123 -1
- package/node_modules/@comis/skills/dist/builtin/sandbox/detect-provider.js +40 -15
- package/node_modules/@comis/skills/dist/index.d.ts +4 -1
- package/node_modules/@comis/skills/dist/index.js +3 -1
- package/node_modules/@comis/skills/dist/manifest/capability-parser.d.ts +44 -0
- package/node_modules/@comis/skills/dist/manifest/capability-parser.js +68 -0
- package/node_modules/@comis/skills/dist/manifest/schema.d.ts +44 -37
- package/node_modules/@comis/skills/dist/manifest/schema.js +35 -0
- 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/dist/registry/discovery.d.ts +8 -0
- package/node_modules/@comis/skills/dist/registry/discovery.js +10 -3
- package/node_modules/@comis/skills/dist/registry/skill-registry.d.ts +45 -1
- package/node_modules/@comis/skills/dist/registry/skill-registry.js +70 -7
- 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 +25 -24
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
/**
|
|
3
3
|
* Cross-session messaging setup: cross-session sender and sub-agent runner.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Isolates cross-session service creation from the main wiring sequence.
|
|
5
|
+
* The three callback closures (executeInSession, sendToChannel,
|
|
6
|
+
* executeSubAgent) are built internally from injected dependencies
|
|
7
|
+
* (assembleToolsForAgent, getExecutor, adaptersByType).
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { tryGetContext, runWithContext, formatSessionKey, safePath } from "@comis/core";
|
|
@@ -15,7 +15,6 @@ import { createSubAgentRunner } from "../sub-agent-runner.js";
|
|
|
15
15
|
import { createAnnouncementBatcher } from "../announcement-batcher.js";
|
|
16
16
|
import { createAnnouncementDeadLetterQueue } from "../announcement-dead-letter.js";
|
|
17
17
|
import { randomUUID } from "node:crypto";
|
|
18
|
-
import { resolve } from "node:path";
|
|
19
18
|
// ---------------------------------------------------------------------------
|
|
20
19
|
// Depth-aware graph cache retention
|
|
21
20
|
// ---------------------------------------------------------------------------
|
|
@@ -348,7 +347,7 @@ export function setupCrossSession(deps) {
|
|
|
348
347
|
deps.logger?.warn({
|
|
349
348
|
err,
|
|
350
349
|
hint: "Parent summary generation failed; proceeding without summary",
|
|
351
|
-
errorKind: "
|
|
350
|
+
errorKind: "dependency",
|
|
352
351
|
}, "generateParentSummary failed for parent context");
|
|
353
352
|
}
|
|
354
353
|
}
|
|
@@ -426,13 +425,13 @@ export function setupCrossSession(deps) {
|
|
|
426
425
|
const GRAPH_PROMPT_TIMEOUT_MS = 600_000;
|
|
427
426
|
// Base subagent retention is "short" (5m TTL).
|
|
428
427
|
// Graph sub-agents with graphSharedDir get depth-aware retention:
|
|
429
|
-
// - Root nodes (depth=0): "short" -- complete
|
|
430
|
-
// - Downstream nodes (depth >= 1): "long" -- may be consumed by further
|
|
428
|
+
// - Root nodes (depth=0): "short" -- complete fast, consumed by downstream nodes within 5m
|
|
429
|
+
// - Downstream nodes (depth >= 1): "long" -- may be consumed by further descendants
|
|
431
430
|
// Non-graph sub-agents always get "short".
|
|
432
431
|
const subAgentCacheRetention = graphSharedDir
|
|
433
432
|
? resolveGraphCacheRetention(graphNodeDepth, isLeafNode)
|
|
434
433
|
: "short";
|
|
435
|
-
//
|
|
434
|
+
// Session adapter for sub-agents.
|
|
436
435
|
// When subAgentSessionPersistence is true, sub-agents get disk-backed JSONL sessions
|
|
437
436
|
// for debugging/auditing. Default (false): ephemeral in-memory, garbage-collected.
|
|
438
437
|
const subAgentPersistence = container.config.security?.agentToAgent?.subAgentSessionPersistence ?? false;
|
|
@@ -472,8 +471,8 @@ export function setupCrossSession(deps) {
|
|
|
472
471
|
// Reuse sessions need their own cache entries (skipCacheWrite will be false
|
|
473
472
|
// because spawnPacket is undefined). Force "long" retention for multi-round persistence.
|
|
474
473
|
// Graph sub-agents use depth-aware retention:
|
|
475
|
-
// Root nodes (depth=0): "short" -- complete fast, consumed within 5m by
|
|
476
|
-
// Downstream nodes (depth>=1): "long" -- may be consumed
|
|
474
|
+
// Root nodes (depth=0): "short" -- complete fast, consumed within 5m by downstream nodes.
|
|
475
|
+
// Downstream nodes (depth>=1): "long" -- may be consumed beyond 5m.
|
|
477
476
|
// Model resolution's cacheRetention must NOT override graph-aware default.
|
|
478
477
|
cacheRetention: isReuseSession
|
|
479
478
|
? "long"
|
|
@@ -508,7 +507,7 @@ export function setupCrossSession(deps) {
|
|
|
508
507
|
toolCallHistory: result.toolCallHistory,
|
|
509
508
|
};
|
|
510
509
|
};
|
|
511
|
-
//
|
|
510
|
+
// Cross-session sender — fire-and-forget, wait, or ping-pong messaging
|
|
512
511
|
const crossSessionSender = createCrossSessionSender({
|
|
513
512
|
sessionStore: {
|
|
514
513
|
loadByFormattedKey: (key) => sessionStore.loadByFormattedKey(key),
|
|
@@ -572,8 +571,13 @@ export function setupCrossSession(deps) {
|
|
|
572
571
|
}
|
|
573
572
|
};
|
|
574
573
|
// Create dead-letter queue for failed announcement persistence (before batcher, so batcher can reference it)
|
|
575
|
-
|
|
576
|
-
|
|
574
|
+
// Direct safePath composition. AGENTS §2.2: all paths via safePath. safePath
|
|
575
|
+
// requires an absolute base (see PathTraversalError contract in
|
|
576
|
+
// packages/core/src/security/safe-path.ts), so when container.config.dataDir
|
|
577
|
+
// is unset we fall back to process.cwd(). process.cwd() is not banned by
|
|
578
|
+
// AGENTS §2.2 (only process.env and node:path's path.join/path.resolve are
|
|
579
|
+
// restricted).
|
|
580
|
+
const deadLetterFilePath = safePath(container.config.dataDir || process.cwd(), "dead-letters.jsonl");
|
|
577
581
|
const deadLetterQueue = createAnnouncementDeadLetterQueue({
|
|
578
582
|
filePath: deadLetterFilePath,
|
|
579
583
|
maxRetries: 5,
|
|
@@ -581,7 +585,7 @@ export function setupCrossSession(deps) {
|
|
|
581
585
|
maxAgeMs: 3_600_000,
|
|
582
586
|
maxEntries: 100,
|
|
583
587
|
eventBus: container.eventBus,
|
|
584
|
-
logger: deps.logger?.child({
|
|
588
|
+
logger: deps.logger?.child({ submodule: "dead-letter-queue" }),
|
|
585
589
|
});
|
|
586
590
|
// Create announcement batcher for coalescing near-simultaneous sub-agent completions
|
|
587
591
|
const announcementBatcher = createAnnouncementBatcher({
|
|
@@ -628,7 +632,7 @@ export function setupCrossSession(deps) {
|
|
|
628
632
|
: { info: () => { }, warn: () => { }, debug: () => { } },
|
|
629
633
|
eventBus: container.eventBus,
|
|
630
634
|
});
|
|
631
|
-
//
|
|
635
|
+
// Sub-agent runner — async sub-agent spawning with allowlist + auto-archive
|
|
632
636
|
const subAgentRunner = createSubAgentRunner({
|
|
633
637
|
sessionStore: {
|
|
634
638
|
save: (key, messages, metadata) => sessionStore.save(key, messages, metadata),
|
|
@@ -645,6 +649,7 @@ export function setupCrossSession(deps) {
|
|
|
645
649
|
memoryAdapter: deps.memoryAdapter,
|
|
646
650
|
batcher: announcementBatcher,
|
|
647
651
|
activeRunRegistry: deps.activeRunRegistry,
|
|
652
|
+
sessionResolver: deps.sessionResolver,
|
|
648
653
|
resultCondenser,
|
|
649
654
|
condenserModel: condenserApiKey ? { id: condensationResolution.modelId, provider: condensationResolution.provider } : undefined,
|
|
650
655
|
condenserApiKey: condenserApiKey || undefined,
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* Queue two-phase lifecycle resolves the circular dependency between the
|
|
6
6
|
* queue and channel adapters:
|
|
7
7
|
* 1. setupDeliveryQueue() creates the adapter immediately (before setupChannels).
|
|
8
|
-
* 2.
|
|
9
|
-
*
|
|
8
|
+
* 2. drainAndStart() recovers in_flight rows, runs startup drain, then starts
|
|
9
|
+
* both the recurring drain timer and the prune timer AFTER
|
|
10
|
+
* setupChannels populates channelAdapters.
|
|
10
11
|
* Crash-Safe Delivery Queue.
|
|
11
12
|
* Session Mirroring.
|
|
12
13
|
* @module setup-delivery — Delivery subsystem wiring (queue + mirror)
|
|
@@ -18,9 +19,9 @@ import type { PluginRegistry } from "@comis/core";
|
|
|
18
19
|
export interface DeliveryQueueResult {
|
|
19
20
|
/** The delivery queue adapter (real or no-op), available immediately. */
|
|
20
21
|
deliveryQueue: DeliveryQueuePort;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
/** Clears the prune interval
|
|
22
|
+
/** Recovers in_flight rows, runs startup drain, then starts the recurring drain + prune timers. Call AFTER setupChannels. */
|
|
23
|
+
drainAndStart: () => Promise<void>;
|
|
24
|
+
/** Clears the recurring drain interval AND the prune interval (call on shutdown). */
|
|
24
25
|
shutdown: () => void;
|
|
25
26
|
}
|
|
26
27
|
export declare function setupDeliveryQueue(deps: {
|
|
@@ -31,6 +32,14 @@ export declare function setupDeliveryQueue(deps: {
|
|
|
31
32
|
logger: ComisLogger;
|
|
32
33
|
channelAdapters: Map<string, DeliveryAdapter>;
|
|
33
34
|
}): Promise<DeliveryQueueResult>;
|
|
35
|
+
export declare function drainDeliveryQueue(deps: {
|
|
36
|
+
deliveryQueue: DeliveryQueuePort;
|
|
37
|
+
channelAdapters: Map<string, DeliveryAdapter>;
|
|
38
|
+
eventBus: TypedEventBus;
|
|
39
|
+
logger: ComisLogger;
|
|
40
|
+
drainBudgetMs: number;
|
|
41
|
+
defaultMaxAttempts: number;
|
|
42
|
+
}): Promise<void>;
|
|
34
43
|
export interface DeliveryMirrorResult {
|
|
35
44
|
/** The delivery mirror adapter (real or no-op), available immediately. */
|
|
36
45
|
deliveryMirror: DeliveryMirrorPort;
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* Queue two-phase lifecycle resolves the circular dependency between the
|
|
7
7
|
* queue and channel adapters:
|
|
8
8
|
* 1. setupDeliveryQueue() creates the adapter immediately (before setupChannels).
|
|
9
|
-
* 2.
|
|
10
|
-
*
|
|
9
|
+
* 2. drainAndStart() recovers in_flight rows, runs startup drain, then starts
|
|
10
|
+
* both the recurring drain timer and the prune timer AFTER
|
|
11
|
+
* setupChannels populates channelAdapters.
|
|
11
12
|
* Crash-Safe Delivery Queue.
|
|
12
13
|
* Session Mirroring.
|
|
13
14
|
* @module setup-delivery — Delivery subsystem wiring (queue + mirror)
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
import { createNoOpDeliveryQueue, createNoOpDeliveryMirror } from "@comis/core";
|
|
16
17
|
import { createSqliteDeliveryQueue, createSqliteDeliveryMirror } from "@comis/memory";
|
|
17
18
|
import { isPermanentError, computeQueueBackoff } from "@comis/channels";
|
|
18
|
-
import { ok } from "@comis/shared";
|
|
19
|
+
import { ok, suppressError } from "@comis/shared";
|
|
19
20
|
import { createHash } from "node:crypto";
|
|
20
21
|
// ---------------------------------------------------------------------------
|
|
21
22
|
// Setup function
|
|
@@ -28,48 +29,92 @@ export async function setupDeliveryQueue(deps) {
|
|
|
28
29
|
logger.debug("Delivery queue disabled by config");
|
|
29
30
|
return {
|
|
30
31
|
deliveryQueue: createNoOpDeliveryQueue(),
|
|
31
|
-
|
|
32
|
+
drainAndStart: async () => { },
|
|
32
33
|
shutdown: () => { },
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
36
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- db is better-sqlite3 Database; typed as unknown to avoid cross-package type dependency
|
|
36
|
-
const deliveryQueue = createSqliteDeliveryQueue(db);
|
|
37
|
+
const deliveryQueue = createSqliteDeliveryQueue(db, eventBus);
|
|
37
38
|
logger.info({ maxQueueDepth: queueConfig.maxQueueDepth, defaultMaxAttempts: queueConfig.defaultMaxAttempts }, "Delivery queue enabled");
|
|
38
39
|
let pruneInterval;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
let drainInterval;
|
|
41
|
+
// Single-tick gate: in-flight Promise prevents overlapping ticks.
|
|
42
|
+
let draining = null;
|
|
43
|
+
// Inner helper: one drain pass. Reused by startup drain AND each recurring tick.
|
|
44
|
+
const runOneDrainPass = async () => {
|
|
45
|
+
await drainDeliveryQueue({
|
|
46
|
+
deliveryQueue,
|
|
47
|
+
channelAdapters,
|
|
48
|
+
eventBus,
|
|
49
|
+
logger,
|
|
50
|
+
drainBudgetMs: queueConfig.drainBudgetMs,
|
|
51
|
+
defaultMaxAttempts: queueConfig.defaultMaxAttempts,
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
// 2. Startup drain + recurring drain timer + prune timer (deferred until channelAdapters populated)
|
|
55
|
+
const drainAndStart = async () => {
|
|
56
|
+
// --- Step 1: Recover in_flight rows. ---
|
|
57
|
+
// Runs UNCONDITIONALLY -- independent of drainOnStartup policy. An 'in_flight'
|
|
58
|
+
// row from a prior crash is a correctness bug regardless of the drain policy.
|
|
59
|
+
const recoverResult = await deliveryQueue.recoverInFlight();
|
|
60
|
+
if (!recoverResult.ok) {
|
|
61
|
+
logger.warn({ err: recoverResult.error, hint: "Could not recover in_flight rows on startup; messages may stall until next restart", errorKind: "internal" }, "Delivery queue: recoverInFlight failed");
|
|
62
|
+
}
|
|
63
|
+
else if (recoverResult.value > 0) {
|
|
64
|
+
logger.info({ recovered: recoverResult.value }, "Delivery queue: recovered in_flight rows to pending");
|
|
65
|
+
}
|
|
66
|
+
// --- Step 2: Startup drain (existing behavior, unchanged). ---
|
|
42
67
|
if (queueConfig.drainOnStartup) {
|
|
43
|
-
await
|
|
44
|
-
deliveryQueue,
|
|
45
|
-
channelAdapters,
|
|
46
|
-
eventBus,
|
|
47
|
-
logger,
|
|
48
|
-
drainBudgetMs: queueConfig.drainBudgetMs,
|
|
49
|
-
defaultMaxAttempts: queueConfig.defaultMaxAttempts,
|
|
50
|
-
});
|
|
68
|
+
await runOneDrainPass();
|
|
51
69
|
}
|
|
52
|
-
// ---
|
|
70
|
+
// --- Step 3: Recurring drain timer. ---
|
|
71
|
+
drainInterval = setInterval(() => {
|
|
72
|
+
if (draining)
|
|
73
|
+
return; // single-tick gate
|
|
74
|
+
draining = runOneDrainPass().finally(() => { draining = null; });
|
|
75
|
+
// Fire-and-forget: failures inside drainDeliveryQueue are already logged
|
|
76
|
+
// and do not propagate (it never throws). suppressError satisfies the
|
|
77
|
+
// no-floating-promise lint without altering semantics.
|
|
78
|
+
suppressError(draining, "delivery queue recurring drain tick");
|
|
79
|
+
}, queueConfig.drainIntervalMs);
|
|
80
|
+
drainInterval.unref();
|
|
81
|
+
// --- Step 4: Prune timer. ---
|
|
82
|
+
// Emit a per-class drain log line with structured fields
|
|
83
|
+
// (`pruned`, `class`, `durationMs`) so operators can correlate prune
|
|
84
|
+
// activity by retention class across subsystems (delivery_queue,
|
|
85
|
+
// delivery_mirror, output retention housekeeper, etc.). The `class`
|
|
86
|
+
// field is a placeholder until the underlying pruneExpired() is
|
|
87
|
+
// extended with per-class breakdown. Canonical Pino object-first;
|
|
88
|
+
// durationMs is the canonical name (CLAUDE.md logging conventions).
|
|
53
89
|
pruneInterval = setInterval(async () => {
|
|
90
|
+
const startMs = Date.now();
|
|
54
91
|
const result = await deliveryQueue.pruneExpired();
|
|
55
92
|
if (result.ok && result.value > 0) {
|
|
56
|
-
logger.debug({
|
|
93
|
+
logger.debug({
|
|
94
|
+
pruned: result.value,
|
|
95
|
+
class: "delivery_queue",
|
|
96
|
+
durationMs: Date.now() - startMs,
|
|
97
|
+
}, "Delivery queue pruned");
|
|
57
98
|
}
|
|
58
99
|
}, queueConfig.pruneIntervalMs);
|
|
59
100
|
pruneInterval.unref();
|
|
60
101
|
};
|
|
61
102
|
const shutdown = () => {
|
|
103
|
+
if (drainInterval) {
|
|
104
|
+
clearInterval(drainInterval);
|
|
105
|
+
drainInterval = undefined;
|
|
106
|
+
}
|
|
62
107
|
if (pruneInterval) {
|
|
63
108
|
clearInterval(pruneInterval);
|
|
64
109
|
pruneInterval = undefined;
|
|
65
110
|
}
|
|
66
111
|
};
|
|
67
|
-
return { deliveryQueue,
|
|
112
|
+
return { deliveryQueue, drainAndStart, shutdown };
|
|
68
113
|
}
|
|
69
114
|
// ---------------------------------------------------------------------------
|
|
70
115
|
// Drain implementation
|
|
71
116
|
// ---------------------------------------------------------------------------
|
|
72
|
-
async function drainDeliveryQueue(deps) {
|
|
117
|
+
export async function drainDeliveryQueue(deps) {
|
|
73
118
|
const { deliveryQueue, channelAdapters, eventBus, logger, drainBudgetMs, defaultMaxAttempts } = deps;
|
|
74
119
|
const drainStart = Date.now();
|
|
75
120
|
const deadline = drainStart + drainBudgetMs;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gateway setup: RPC bridge (deferred dispatch), RPC adapter wiring, dynamic
|
|
3
3
|
* method registration, webhook mounting, OpenAI-compatible route mounting,
|
|
4
|
-
* and gateway server creation/start.
|
|
5
|
-
*
|
|
6
|
-
* largest inline block from the main wiring sequence. Covers the full
|
|
7
|
-
* gateway lifecycle from RPC bridge creation through server start.
|
|
4
|
+
* and gateway server creation/start. Covers the full gateway lifecycle from
|
|
5
|
+
* RPC bridge creation through server start.
|
|
8
6
|
* @module
|
|
9
7
|
*/
|
|
10
8
|
import type { SessionKey, AppContainer, AppConfig } from "@comis/core";
|
|
@@ -36,7 +34,7 @@ export declare function buildExecutionRequestedLogFields(input: {
|
|
|
36
34
|
messageHash?: string;
|
|
37
35
|
connectionId?: string;
|
|
38
36
|
};
|
|
39
|
-
/** All services produced by the RPC bridge setup
|
|
37
|
+
/** All services produced by the RPC bridge setup. */
|
|
40
38
|
export interface RpcBridgeResult {
|
|
41
39
|
/** The rpcCall function usable immediately (delegates to inner dispatch once wired). */
|
|
42
40
|
rpcCall: RpcCall;
|
|
@@ -145,7 +143,7 @@ export interface GatewayDeps {
|
|
|
145
143
|
/** Set of suspended agent IDs for REST API status reporting. */
|
|
146
144
|
suspendedAgents?: ReadonlySet<string>;
|
|
147
145
|
}
|
|
148
|
-
/** All services produced by the gateway setup
|
|
146
|
+
/** All services produced by the gateway setup. */
|
|
149
147
|
export interface GatewayResult {
|
|
150
148
|
/** Gateway server handle (undefined when gateway is disabled). */
|
|
151
149
|
gatewayHandle?: GatewayServerHandle;
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Gateway setup: RPC bridge (deferred dispatch), RPC adapter wiring, dynamic
|
|
4
4
|
* method registration, webhook mounting, OpenAI-compatible route mounting,
|
|
5
|
-
* and gateway server creation/start.
|
|
6
|
-
*
|
|
7
|
-
* largest inline block from the main wiring sequence. Covers the full
|
|
8
|
-
* gateway lifecycle from RPC bridge creation through server start.
|
|
5
|
+
* and gateway server creation/start. Covers the full gateway lifecycle from
|
|
6
|
+
* RPC bridge creation through server start.
|
|
9
7
|
* @module
|
|
10
8
|
*/
|
|
11
9
|
import { registerRpcMethods } from "./setup-gateway-rpc.js";
|
|
@@ -417,7 +415,7 @@ export async function setupGateway(deps) {
|
|
|
417
415
|
catch {
|
|
418
416
|
// Session history bridging is non-fatal
|
|
419
417
|
}
|
|
420
|
-
// Token usage
|
|
418
|
+
// Token usage captured by tokenTracker's bus subscription:
|
|
421
419
|
// PiEventBridge emits observability:token_usage at turn_end -> tokenTracker
|
|
422
420
|
// bus handler stores it. No direct record() call needed here.
|
|
423
421
|
// Conversation memory persistence now handled by PiExecutor
|
|
@@ -9,9 +9,19 @@
|
|
|
9
9
|
import type { AppContainer, ChannelPort } from "@comis/core";
|
|
10
10
|
import type { ComisLogger } from "@comis/infra";
|
|
11
11
|
import { type PerAgentHeartbeatRunner, type DuplicateDetector, type SystemEventQueue } from "@comis/scheduler";
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Minimal BackgroundSessionResolver shape -- only needs hasActiveSession()
|
|
14
|
+
* for the queue-busy check. Locally re-declared to avoid the
|
|
15
|
+
* cycle from importing @comis/agent here; the daemon constructs the
|
|
16
|
+
* resolver as `createBackgroundSessionResolver({activeRunRegistry})` and
|
|
17
|
+
* the resulting object is structurally assignable to this shape.
|
|
18
|
+
*/
|
|
19
|
+
interface HeartbeatSessionResolver {
|
|
20
|
+
hasActiveSession(key: {
|
|
21
|
+
agentId: string;
|
|
22
|
+
channelType: string;
|
|
23
|
+
channelId: string;
|
|
24
|
+
}): boolean;
|
|
15
25
|
}
|
|
16
26
|
/** 8-param executor interface matching AgentExecutor.execute (used in deps map). */
|
|
17
27
|
interface InnerExecutor {
|
|
@@ -29,8 +39,13 @@ export interface HeartbeatSetupDeps {
|
|
|
29
39
|
assembleToolsForAgent: (agentId: string) => Promise<unknown[]>;
|
|
30
40
|
/** Per-agent workspace directories. */
|
|
31
41
|
workspaceDirs: Map<string, string>;
|
|
32
|
-
/**
|
|
33
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Composite-key resolver for queue-busy detection (optional).
|
|
44
|
+
* The daemon wires this via `createBackgroundSessionResolver`; it
|
|
45
|
+
* supersedes the previous `.has(sessionKey)` lookup so multi-agent /
|
|
46
|
+
* multi-channel collisions are distinguishable.
|
|
47
|
+
*/
|
|
48
|
+
sessionResolver?: HeartbeatSessionResolver;
|
|
34
49
|
/** Duplicate detector shared between global and per-agent heartbeat delivery. */
|
|
35
50
|
duplicateDetector?: DuplicateDetector;
|
|
36
51
|
/** Channel adapters for heartbeat delivery (optional). */
|
|
@@ -23,7 +23,7 @@ import { applyToolPolicy } from "@comis/skills";
|
|
|
23
23
|
* @param deps - Per-agent heartbeat dependencies
|
|
24
24
|
*/
|
|
25
25
|
export function setupHeartbeat(deps) {
|
|
26
|
-
const { container, executors, assembleToolsForAgent, workspaceDirs,
|
|
26
|
+
const { container, executors, assembleToolsForAgent, workspaceDirs, sessionResolver, duplicateDetector, adaptersByType, systemEventQueue, memoryApi, schedulerLogger, } = deps;
|
|
27
27
|
const agents = container.config.agents;
|
|
28
28
|
const globalHeartbeat = container.config.scheduler.heartbeat;
|
|
29
29
|
// 1. Build per-agent state map (only heartbeat-enabled agents)
|
|
@@ -76,7 +76,16 @@ export function setupHeartbeat(deps) {
|
|
|
76
76
|
// 4. Build AgentHeartbeatSource dependencies
|
|
77
77
|
const source = createAgentHeartbeatSource({
|
|
78
78
|
getExecutor: (agentId) => {
|
|
79
|
+
// Explicit boundary throw replaces a non-null-assertion lookup. The
|
|
80
|
+
// assertion was unsafe — if executor wiring missed an agent that's
|
|
81
|
+
// still in the heartbeat config, `inner.execute(...)` would surface
|
|
82
|
+
// as a runtime TypeError inside a timer callback (uncaught). The
|
|
83
|
+
// explicit Error gives operators a clean stack at the wiring
|
|
84
|
+
// boundary instead.
|
|
79
85
|
const inner = executors.get(agentId);
|
|
86
|
+
if (!inner) {
|
|
87
|
+
throw new Error(`No executor found for heartbeat agent ${agentId}`);
|
|
88
|
+
}
|
|
80
89
|
return {
|
|
81
90
|
execute: (msg, sessionKey, tools, hbAgentId, overrides) => inner.execute(msg, sessionKey, tools, undefined, hbAgentId, undefined, undefined, overrides),
|
|
82
91
|
};
|
|
@@ -96,7 +105,7 @@ export function setupHeartbeat(deps) {
|
|
|
96
105
|
eventBus: container.eventBus,
|
|
97
106
|
logger: schedulerLogger,
|
|
98
107
|
},
|
|
99
|
-
|
|
108
|
+
sessionResolver,
|
|
100
109
|
getMemoryStats,
|
|
101
110
|
// Inject applyToolPolicy so scheduler can filter without taking a direct
|
|
102
111
|
// dependency on @comis/skills. Type-erased `unknown[]` at the boundary is
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output retention housekeeper: scans the agent's output/ directory,
|
|
3
|
+
* deletes files whose age exceeds the per-class retentionMs.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors setup-delivery.ts drain+prune timer pattern (single-tick gate +
|
|
6
|
+
* unref() + structured DEBUG log per pass).
|
|
7
|
+
*
|
|
8
|
+
* Consumes JSONL details.visibleDelivery for offline analysis (the
|
|
9
|
+
* housekeeper does NOT delete JSONL itself; it only manages output/
|
|
10
|
+
* files referenced by it).
|
|
11
|
+
*
|
|
12
|
+
* Per AGENTS §2.2: NO `path.join`, NO `process.env`. All paths via
|
|
13
|
+
* `safePath(workspaceDir, ...)`. Per AGENTS §2.4: factory + Deps with
|
|
14
|
+
* ComisLogger injected. Per AGENTS §2.1: error paths log WARN/DEBUG with
|
|
15
|
+
* hint+errorKind; never throws. Per AGENTS §2.3 KISS: in-place file
|
|
16
|
+
* deletion. No "trash dir", no "soft delete". Per AGENTS §6.6
|
|
17
|
+
* (security/daemon): file deletion is destructive — operator can
|
|
18
|
+
* disable via `enabled: false` config.
|
|
19
|
+
*
|
|
20
|
+
* Test contract: `validateOutputRetentionConfig({ classes:
|
|
21
|
+
* [{classId, retentionMs}] })` returns `{ ok, value | error }`.
|
|
22
|
+
*
|
|
23
|
+
* @module setup-output-retention
|
|
24
|
+
*/
|
|
25
|
+
import type { OutputRetentionConfig } from "@comis/core";
|
|
26
|
+
import type { ComisLogger } from "@comis/infra";
|
|
27
|
+
import { type Result } from "@comis/shared";
|
|
28
|
+
export interface SetupOutputRetentionDeps {
|
|
29
|
+
/**
|
|
30
|
+
* Validated config (from AppConfig.outputRetention). May be undefined
|
|
31
|
+
* in legacy test mocks where AppConfig is hand-constructed via
|
|
32
|
+
* `as unknown as`; the factory degrades to no-op in that case (mirrors
|
|
33
|
+
* `setupDeliveryMirror`'s `if (!mirrorConfig?.enabled)` pattern).
|
|
34
|
+
*/
|
|
35
|
+
config: OutputRetentionConfig | undefined;
|
|
36
|
+
/** Absolute path to the workspace dir. The housekeeper scans `<workspaceDir>/output/`. */
|
|
37
|
+
workspaceDir: string;
|
|
38
|
+
/** Injected logger (per AGENTS §2.4 — never import @comis/infra at runtime). */
|
|
39
|
+
logger: ComisLogger;
|
|
40
|
+
}
|
|
41
|
+
export interface SetupOutputRetentionHandle {
|
|
42
|
+
/** Stop the recurring housekeeper interval. Idempotent. */
|
|
43
|
+
shutdown(): void;
|
|
44
|
+
/** Manual trigger for tests; runs one full pass synchronously. */
|
|
45
|
+
runOnePass(): Promise<{
|
|
46
|
+
deleted: number;
|
|
47
|
+
bytesFreed: number;
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Legacy array-of-objects shape preserved as the input to
|
|
52
|
+
* `validateOutputRetentionConfig`. The housekeeper itself uses the
|
|
53
|
+
* schema-derived `OutputRetentionConfig` (Record-of-classes shape); this
|
|
54
|
+
* validator acts as the test's binding gate that retentionMs <= 0 is
|
|
55
|
+
* rejected.
|
|
56
|
+
*/
|
|
57
|
+
export interface RetentionClassConfigInput {
|
|
58
|
+
classId: string;
|
|
59
|
+
retentionMs: number;
|
|
60
|
+
}
|
|
61
|
+
export interface ValidatedRetentionConfig {
|
|
62
|
+
classes: RetentionClassConfigInput[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Validate an output-retention config supplied as the legacy
|
|
66
|
+
* `{ classes: [{classId, retentionMs}] }` shape. Returns a Result-shaped
|
|
67
|
+
* `{ ok: true, value }` on success, `{ ok: false, error }` on failure.
|
|
68
|
+
*
|
|
69
|
+
* Validator contract:
|
|
70
|
+
* - retentionMs = -1 → rejected
|
|
71
|
+
* - retentionMs = 0 → rejected
|
|
72
|
+
* - retentionMs = 1 → accepted
|
|
73
|
+
*
|
|
74
|
+
* Production wiring uses the Zod schema in
|
|
75
|
+
* @comis/core/config/schema-output-retention.ts directly; this
|
|
76
|
+
* validator is a thin compatibility surface for the test contract.
|
|
77
|
+
*/
|
|
78
|
+
export declare function validateOutputRetentionConfig(config: unknown): Result<ValidatedRetentionConfig, Error>;
|
|
79
|
+
/**
|
|
80
|
+
* Wire the per-class output-retention housekeeper.
|
|
81
|
+
*
|
|
82
|
+
* Mirrors setup-delivery.ts (drain + prune timer): single-tick gate, .unref(),
|
|
83
|
+
* structured per-pass log. The factory starts the recurring interval
|
|
84
|
+
* immediately on construction; call shutdown() on system:shutdown.
|
|
85
|
+
*
|
|
86
|
+
* Returns a handle exposing `shutdown()` (idempotent) and `runOnePass()`
|
|
87
|
+
* (manual trigger for tests).
|
|
88
|
+
*/
|
|
89
|
+
export declare function setupOutputRetention(deps: SetupOutputRetentionDeps): SetupOutputRetentionHandle;
|