comisai 1.0.4
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/LICENSE +191 -0
- package/README.md +186 -0
- package/dist/agent.d.ts +1 -0
- package/dist/agent.js +2 -0
- package/dist/channels.d.ts +1 -0
- package/dist/channels.js +2 -0
- package/dist/cli-entry.d.ts +2 -0
- package/dist/cli-entry.js +16 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +2 -0
- package/dist/core.d.ts +1 -0
- package/dist/core.js +2 -0
- package/dist/daemon.d.ts +1 -0
- package/dist/daemon.js +2 -0
- package/dist/gateway.d.ts +1 -0
- package/dist/gateway.js +2 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +15 -0
- package/dist/infra.d.ts +1 -0
- package/dist/infra.js +2 -0
- package/dist/memory.d.ts +1 -0
- package/dist/memory.js +2 -0
- package/dist/scheduler.d.ts +1 -0
- package/dist/scheduler.js +2 -0
- package/dist/shared.d.ts +1 -0
- package/dist/shared.js +2 -0
- package/dist/skills.d.ts +1 -0
- package/dist/skills.js +2 -0
- package/node_modules/@comis/agent/dist/background/auto-background-middleware.d.ts +27 -0
- package/node_modules/@comis/agent/dist/background/auto-background-middleware.js +87 -0
- package/node_modules/@comis/agent/dist/background/background-task-manager.d.ts +34 -0
- package/node_modules/@comis/agent/dist/background/background-task-manager.js +199 -0
- package/node_modules/@comis/agent/dist/background/background-task-persistence.d.ts +26 -0
- package/node_modules/@comis/agent/dist/background/background-task-persistence.js +117 -0
- package/node_modules/@comis/agent/dist/background/background-task-types.d.ts +30 -0
- package/node_modules/@comis/agent/dist/background/background-task-types.js +7 -0
- package/node_modules/@comis/agent/dist/background/index.d.ts +11 -0
- package/node_modules/@comis/agent/dist/background/index.js +9 -0
- package/node_modules/@comis/agent/dist/bootstrap/index.d.ts +6 -0
- package/node_modules/@comis/agent/dist/bootstrap/index.js +7 -0
- package/node_modules/@comis/agent/dist/bootstrap/section-extractor.d.ts +28 -0
- package/node_modules/@comis/agent/dist/bootstrap/section-extractor.js +70 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/context-sections.d.ts +43 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/context-sections.js +224 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/core-sections.d.ts +12 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/core-sections.js +162 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/docs-sections.d.ts +19 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/docs-sections.js +75 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/index.d.ts +10 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/index.js +11 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/media-sections.d.ts +21 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/media-sections.js +117 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/messaging-sections.d.ts +14 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/messaging-sections.js +119 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/skills-memory-sections.d.ts +7 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/skills-memory-sections.js +114 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/tool-descriptions.d.ts +81 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/tool-descriptions.js +549 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.d.ts +62 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.js +363 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/trust-sections.d.ts +47 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/trust-sections.js +106 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/verbosity-sections.d.ts +30 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/verbosity-sections.js +68 -0
- package/node_modules/@comis/agent/dist/bootstrap/system-prompt-assembler.d.ts +108 -0
- package/node_modules/@comis/agent/dist/bootstrap/system-prompt-assembler.js +199 -0
- package/node_modules/@comis/agent/dist/bootstrap/types.d.ts +96 -0
- package/node_modules/@comis/agent/dist/bootstrap/types.js +21 -0
- package/node_modules/@comis/agent/dist/bootstrap/workspace-loader.d.ts +121 -0
- package/node_modules/@comis/agent/dist/bootstrap/workspace-loader.js +227 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-event-handlers.d.ts +30 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-event-handlers.js +94 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.d.ts +95 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.js +104 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-safety-controls.d.ts +105 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-safety-controls.js +182 -0
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.d.ts +185 -0
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +775 -0
- package/node_modules/@comis/agent/dist/budget/budget-guard.d.ts +48 -0
- package/node_modules/@comis/agent/dist/budget/budget-guard.js +128 -0
- package/node_modules/@comis/agent/dist/budget/cost-tracker.d.ts +110 -0
- package/node_modules/@comis/agent/dist/budget/cost-tracker.js +124 -0
- package/node_modules/@comis/agent/dist/budget/turn-budget-tracker.d.ts +63 -0
- package/node_modules/@comis/agent/dist/budget/turn-budget-tracker.js +65 -0
- package/node_modules/@comis/agent/dist/commands/budget-command.d.ts +37 -0
- package/node_modules/@comis/agent/dist/commands/budget-command.js +97 -0
- package/node_modules/@comis/agent/dist/commands/command-handler.d.ts +23 -0
- package/node_modules/@comis/agent/dist/commands/command-handler.js +508 -0
- package/node_modules/@comis/agent/dist/commands/command-parser.d.ts +24 -0
- package/node_modules/@comis/agent/dist/commands/command-parser.js +182 -0
- package/node_modules/@comis/agent/dist/commands/index.d.ts +8 -0
- package/node_modules/@comis/agent/dist/commands/index.js +10 -0
- package/node_modules/@comis/agent/dist/commands/prompt-skill-command.d.ts +53 -0
- package/node_modules/@comis/agent/dist/commands/prompt-skill-command.js +105 -0
- package/node_modules/@comis/agent/dist/commands/types.d.ts +184 -0
- package/node_modules/@comis/agent/dist/commands/types.js +14 -0
- package/node_modules/@comis/agent/dist/context-engine/cleanup-helpers.d.ts +20 -0
- package/node_modules/@comis/agent/dist/context-engine/cleanup-helpers.js +36 -0
- package/node_modules/@comis/agent/dist/context-engine/constants.d.ts +167 -0
- package/node_modules/@comis/agent/dist/context-engine/constants.js +292 -0
- package/node_modules/@comis/agent/dist/context-engine/context-engine.d.ts +26 -0
- package/node_modules/@comis/agent/dist/context-engine/context-engine.js +554 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-annotator.d.ts +49 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-annotator.js +178 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-assembler.d.ts +32 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-assembler.js +298 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-compaction.d.ts +110 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-compaction.js +358 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-integrity.d.ts +27 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-integrity.js +371 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-reconciliation.d.ts +95 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-reconciliation.js +521 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-triggers.d.ts +88 -0
- package/node_modules/@comis/agent/dist/context-engine/dag-triggers.js +229 -0
- package/node_modules/@comis/agent/dist/context-engine/dead-content-evictor.d.ts +40 -0
- package/node_modules/@comis/agent/dist/context-engine/dead-content-evictor.js +441 -0
- package/node_modules/@comis/agent/dist/context-engine/history-window.d.ts +59 -0
- package/node_modules/@comis/agent/dist/context-engine/history-window.js +250 -0
- package/node_modules/@comis/agent/dist/context-engine/index.d.ts +45 -0
- package/node_modules/@comis/agent/dist/context-engine/index.js +51 -0
- package/node_modules/@comis/agent/dist/context-engine/llm-compaction.d.ts +52 -0
- package/node_modules/@comis/agent/dist/context-engine/llm-compaction.js +466 -0
- package/node_modules/@comis/agent/dist/context-engine/microcompaction-guard.d.ts +49 -0
- package/node_modules/@comis/agent/dist/context-engine/microcompaction-guard.js +288 -0
- package/node_modules/@comis/agent/dist/context-engine/objective-reinforcement.d.ts +24 -0
- package/node_modules/@comis/agent/dist/context-engine/objective-reinforcement.js +100 -0
- package/node_modules/@comis/agent/dist/context-engine/observation-masker.d.ts +53 -0
- package/node_modules/@comis/agent/dist/context-engine/observation-masker.js +344 -0
- package/node_modules/@comis/agent/dist/context-engine/reasoning-tag-stripper.d.ts +43 -0
- package/node_modules/@comis/agent/dist/context-engine/reasoning-tag-stripper.js +131 -0
- package/node_modules/@comis/agent/dist/context-engine/rehydration.d.ts +30 -0
- package/node_modules/@comis/agent/dist/context-engine/rehydration.js +393 -0
- package/node_modules/@comis/agent/dist/context-engine/reread-detector.d.ts +31 -0
- package/node_modules/@comis/agent/dist/context-engine/reread-detector.js +116 -0
- package/node_modules/@comis/agent/dist/context-engine/thinking-block-cleaner.d.ts +37 -0
- package/node_modules/@comis/agent/dist/context-engine/thinking-block-cleaner.js +119 -0
- package/node_modules/@comis/agent/dist/context-engine/token-budget.d.ts +31 -0
- package/node_modules/@comis/agent/dist/context-engine/token-budget.js +52 -0
- package/node_modules/@comis/agent/dist/context-engine/types-compaction.d.ts +109 -0
- package/node_modules/@comis/agent/dist/context-engine/types-compaction.js +7 -0
- package/node_modules/@comis/agent/dist/context-engine/types-core.d.ts +292 -0
- package/node_modules/@comis/agent/dist/context-engine/types-core.js +7 -0
- package/node_modules/@comis/agent/dist/context-engine/types-dag.d.ts +239 -0
- package/node_modules/@comis/agent/dist/context-engine/types-dag.js +7 -0
- package/node_modules/@comis/agent/dist/context-engine/types-eviction.d.ts +17 -0
- package/node_modules/@comis/agent/dist/context-engine/types-eviction.js +7 -0
- package/node_modules/@comis/agent/dist/context-engine/types-integrity.d.ts +77 -0
- package/node_modules/@comis/agent/dist/context-engine/types-integrity.js +7 -0
- package/node_modules/@comis/agent/dist/context-engine/types.d.ts +20 -0
- package/node_modules/@comis/agent/dist/context-engine/types.js +21 -0
- package/node_modules/@comis/agent/dist/envelope/elapsed-time.d.ts +12 -0
- package/node_modules/@comis/agent/dist/envelope/elapsed-time.js +30 -0
- package/node_modules/@comis/agent/dist/envelope/index.d.ts +2 -0
- package/node_modules/@comis/agent/dist/envelope/index.js +4 -0
- package/node_modules/@comis/agent/dist/envelope/message-envelope.d.ts +25 -0
- package/node_modules/@comis/agent/dist/envelope/message-envelope.js +71 -0
- package/node_modules/@comis/agent/dist/executor/active-run-registry.d.ts +47 -0
- package/node_modules/@comis/agent/dist/executor/active-run-registry.js +48 -0
- package/node_modules/@comis/agent/dist/executor/adaptive-cache-retention.d.ts +72 -0
- package/node_modules/@comis/agent/dist/executor/adaptive-cache-retention.js +144 -0
- package/node_modules/@comis/agent/dist/executor/block-stability-tracker.d.ts +41 -0
- package/node_modules/@comis/agent/dist/executor/block-stability-tracker.js +69 -0
- package/node_modules/@comis/agent/dist/executor/cache-break-detection.d.ts +228 -0
- package/node_modules/@comis/agent/dist/executor/cache-break-detection.js +656 -0
- package/node_modules/@comis/agent/dist/executor/cache-break-diff-writer.d.ts +90 -0
- package/node_modules/@comis/agent/dist/executor/cache-break-diff-writer.js +159 -0
- package/node_modules/@comis/agent/dist/executor/cache-usage-helpers.d.ts +26 -0
- package/node_modules/@comis/agent/dist/executor/cache-usage-helpers.js +48 -0
- package/node_modules/@comis/agent/dist/executor/discovery-tracker.d.ts +74 -0
- package/node_modules/@comis/agent/dist/executor/discovery-tracker.js +130 -0
- package/node_modules/@comis/agent/dist/executor/error-classifier.d.ts +37 -0
- package/node_modules/@comis/agent/dist/executor/error-classifier.js +141 -0
- package/node_modules/@comis/agent/dist/executor/executor-command-handlers.d.ts +73 -0
- package/node_modules/@comis/agent/dist/executor/executor-command-handlers.js +275 -0
- package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.d.ts +98 -0
- package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.js +259 -0
- package/node_modules/@comis/agent/dist/executor/executor-input-guard.d.ts +42 -0
- package/node_modules/@comis/agent/dist/executor/executor-input-guard.js +156 -0
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.d.ts +154 -0
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.js +337 -0
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.d.ts +133 -0
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +755 -0
- package/node_modules/@comis/agent/dist/executor/executor-response-filter.d.ts +91 -0
- package/node_modules/@comis/agent/dist/executor/executor-response-filter.js +224 -0
- package/node_modules/@comis/agent/dist/executor/executor-session-state.d.ts +142 -0
- package/node_modules/@comis/agent/dist/executor/executor-session-state.js +299 -0
- package/node_modules/@comis/agent/dist/executor/executor-stream-setup.d.ts +124 -0
- package/node_modules/@comis/agent/dist/executor/executor-stream-setup.js +244 -0
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.d.ts +144 -0
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +339 -0
- package/node_modules/@comis/agent/dist/executor/executor-tool-pipeline.d.ts +75 -0
- package/node_modules/@comis/agent/dist/executor/executor-tool-pipeline.js +192 -0
- package/node_modules/@comis/agent/dist/executor/fault-injector.d.ts +51 -0
- package/node_modules/@comis/agent/dist/executor/fault-injector.js +93 -0
- package/node_modules/@comis/agent/dist/executor/gemini-cache-injector.d.ts +50 -0
- package/node_modules/@comis/agent/dist/executor/gemini-cache-injector.js +140 -0
- package/node_modules/@comis/agent/dist/executor/gemini-cache-lifecycle.d.ts +30 -0
- package/node_modules/@comis/agent/dist/executor/gemini-cache-lifecycle.js +31 -0
- package/node_modules/@comis/agent/dist/executor/gemini-cache-manager.d.ts +74 -0
- package/node_modules/@comis/agent/dist/executor/gemini-cache-manager.js +323 -0
- package/node_modules/@comis/agent/dist/executor/jit-guide-injector.d.ts +56 -0
- package/node_modules/@comis/agent/dist/executor/jit-guide-injector.js +127 -0
- package/node_modules/@comis/agent/dist/executor/mcp-disconnect-cleanup.d.ts +36 -0
- package/node_modules/@comis/agent/dist/executor/mcp-disconnect-cleanup.js +43 -0
- package/node_modules/@comis/agent/dist/executor/model-retry.d.ts +85 -0
- package/node_modules/@comis/agent/dist/executor/model-retry.js +301 -0
- package/node_modules/@comis/agent/dist/executor/overflow-recovery.d.ts +69 -0
- package/node_modules/@comis/agent/dist/executor/overflow-recovery.js +182 -0
- package/node_modules/@comis/agent/dist/executor/phase-filter.d.ts +21 -0
- package/node_modules/@comis/agent/dist/executor/phase-filter.js +63 -0
- package/node_modules/@comis/agent/dist/executor/pi-executor.d.ts +200 -0
- package/node_modules/@comis/agent/dist/executor/pi-executor.js +1028 -0
- package/node_modules/@comis/agent/dist/executor/prompt-assembly.d.ts +174 -0
- package/node_modules/@comis/agent/dist/executor/prompt-assembly.js +767 -0
- package/node_modules/@comis/agent/dist/executor/prompt-timeout.d.ts +57 -0
- package/node_modules/@comis/agent/dist/executor/prompt-timeout.js +112 -0
- package/node_modules/@comis/agent/dist/executor/schema-stripping.d.ts +19 -0
- package/node_modules/@comis/agent/dist/executor/schema-stripping.js +113 -0
- package/node_modules/@comis/agent/dist/executor/session-latch.d.ts +63 -0
- package/node_modules/@comis/agent/dist/executor/session-latch.js +60 -0
- package/node_modules/@comis/agent/dist/executor/session-snapshot-cleanup.d.ts +35 -0
- package/node_modules/@comis/agent/dist/executor/session-snapshot-cleanup.js +65 -0
- package/node_modules/@comis/agent/dist/executor/step-counter.d.ts +21 -0
- package/node_modules/@comis/agent/dist/executor/step-counter.js +29 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/__test-helpers.d.ts +9 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/__test-helpers.js +43 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/api-payload-trace-writer.d.ts +40 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/api-payload-trace-writer.js +91 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/cache-trace-writer.d.ts +65 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/cache-trace-writer.js +145 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/compose.d.ts +20 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/compose.js +27 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/config-resolver.d.ts +55 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/config-resolver.js +85 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/index.d.ts +26 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/index.js +22 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.d.ts +273 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.js +1679 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/tool-result-size-bouncer.d.ts +46 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/tool-result-size-bouncer.js +92 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/tool-schema-cache.d.ts +28 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/tool-schema-cache.js +50 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/turn-result-budget-wrapper.d.ts +42 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/turn-result-budget-wrapper.js +68 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/types.d.ts +12 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/types.js +7 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/validation-error-formatter.d.ts +27 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/validation-error-formatter.js +51 -0
- package/node_modules/@comis/agent/dist/executor/tool-deferral.d.ts +159 -0
- package/node_modules/@comis/agent/dist/executor/tool-deferral.js +617 -0
- package/node_modules/@comis/agent/dist/executor/tool-lifecycle.d.ts +112 -0
- package/node_modules/@comis/agent/dist/executor/tool-lifecycle.js +164 -0
- package/node_modules/@comis/agent/dist/executor/tool-parallelism.d.ts +59 -0
- package/node_modules/@comis/agent/dist/executor/tool-parallelism.js +158 -0
- package/node_modules/@comis/agent/dist/executor/ttl-guard.d.ts +55 -0
- package/node_modules/@comis/agent/dist/executor/ttl-guard.js +103 -0
- package/node_modules/@comis/agent/dist/executor/types.d.ts +112 -0
- package/node_modules/@comis/agent/dist/executor/types.js +7 -0
- package/node_modules/@comis/agent/dist/file-state/session-tracker-registry.d.ts +59 -0
- package/node_modules/@comis/agent/dist/file-state/session-tracker-registry.js +57 -0
- package/node_modules/@comis/agent/dist/greeting/session-greeting.d.ts +40 -0
- package/node_modules/@comis/agent/dist/greeting/session-greeting.js +94 -0
- package/node_modules/@comis/agent/dist/identity/identity-link-resolver.d.ts +47 -0
- package/node_modules/@comis/agent/dist/identity/identity-link-resolver.js +54 -0
- package/node_modules/@comis/agent/dist/identity/identity-loader.d.ts +38 -0
- package/node_modules/@comis/agent/dist/identity/identity-loader.js +91 -0
- package/node_modules/@comis/agent/dist/identity/identity-updater.d.ts +37 -0
- package/node_modules/@comis/agent/dist/identity/identity-updater.js +104 -0
- package/node_modules/@comis/agent/dist/index.d.ts +188 -0
- package/node_modules/@comis/agent/dist/index.js +192 -0
- package/node_modules/@comis/agent/dist/memory/memory-review-job.d.ts +72 -0
- package/node_modules/@comis/agent/dist/memory/memory-review-job.js +341 -0
- package/node_modules/@comis/agent/dist/model/auth-profile.d.ts +61 -0
- package/node_modules/@comis/agent/dist/model/auth-profile.js +154 -0
- package/node_modules/@comis/agent/dist/model/auth-provider.d.ts +70 -0
- package/node_modules/@comis/agent/dist/model/auth-provider.js +83 -0
- package/node_modules/@comis/agent/dist/model/auth-rotation-adapter.d.ts +53 -0
- package/node_modules/@comis/agent/dist/model/auth-rotation-adapter.js +78 -0
- package/node_modules/@comis/agent/dist/model/auth-storage-adapter.d.ts +27 -0
- package/node_modules/@comis/agent/dist/model/auth-storage-adapter.js +37 -0
- package/node_modules/@comis/agent/dist/model/auth-usage-tracker.d.ts +60 -0
- package/node_modules/@comis/agent/dist/model/auth-usage-tracker.js +90 -0
- package/node_modules/@comis/agent/dist/model/context-window-resolver.d.ts +48 -0
- package/node_modules/@comis/agent/dist/model/context-window-resolver.js +55 -0
- package/node_modules/@comis/agent/dist/model/image-router.d.ts +109 -0
- package/node_modules/@comis/agent/dist/model/image-router.js +128 -0
- package/node_modules/@comis/agent/dist/model/model-alias-resolver.d.ts +57 -0
- package/node_modules/@comis/agent/dist/model/model-alias-resolver.js +72 -0
- package/node_modules/@comis/agent/dist/model/model-allowlist.d.ts +52 -0
- package/node_modules/@comis/agent/dist/model/model-allowlist.js +61 -0
- package/node_modules/@comis/agent/dist/model/model-catalog.d.ts +93 -0
- package/node_modules/@comis/agent/dist/model/model-catalog.js +152 -0
- package/node_modules/@comis/agent/dist/model/model-registry-adapter.d.ts +47 -0
- package/node_modules/@comis/agent/dist/model/model-registry-adapter.js +74 -0
- package/node_modules/@comis/agent/dist/model/model-scanner.d.ts +59 -0
- package/node_modules/@comis/agent/dist/model/model-scanner.js +199 -0
- package/node_modules/@comis/agent/dist/model/oauth-token-manager.d.ts +60 -0
- package/node_modules/@comis/agent/dist/model/oauth-token-manager.js +138 -0
- package/node_modules/@comis/agent/dist/model/operation-model-defaults.d.ts +48 -0
- package/node_modules/@comis/agent/dist/model/operation-model-defaults.js +78 -0
- package/node_modules/@comis/agent/dist/model/operation-model-resolver.d.ts +65 -0
- package/node_modules/@comis/agent/dist/model/operation-model-resolver.js +135 -0
- package/node_modules/@comis/agent/dist/planner/checklist-formatter.d.ts +21 -0
- package/node_modules/@comis/agent/dist/planner/checklist-formatter.js +53 -0
- package/node_modules/@comis/agent/dist/planner/plan-extractor.d.ts +24 -0
- package/node_modules/@comis/agent/dist/planner/plan-extractor.js +66 -0
- package/node_modules/@comis/agent/dist/planner/types.d.ts +38 -0
- package/node_modules/@comis/agent/dist/planner/types.js +12 -0
- package/node_modules/@comis/agent/dist/provider/capabilities.d.ts +72 -0
- package/node_modules/@comis/agent/dist/provider/capabilities.js +163 -0
- package/node_modules/@comis/agent/dist/provider/model-compat.d.ts +35 -0
- package/node_modules/@comis/agent/dist/provider/model-compat.js +40 -0
- package/node_modules/@comis/agent/dist/provider/model-id-normalize.d.ts +33 -0
- package/node_modules/@comis/agent/dist/provider/model-id-normalize.js +87 -0
- package/node_modules/@comis/agent/dist/provider/response/sanitize-pipeline.d.ts +50 -0
- package/node_modules/@comis/agent/dist/provider/response/sanitize-pipeline.js +173 -0
- package/node_modules/@comis/agent/dist/provider/response/strip-minimax-xml.d.ts +9 -0
- package/node_modules/@comis/agent/dist/provider/response/strip-minimax-xml.js +17 -0
- package/node_modules/@comis/agent/dist/provider/response/strip-model-tokens.d.ts +13 -0
- package/node_modules/@comis/agent/dist/provider/response/strip-model-tokens.js +19 -0
- package/node_modules/@comis/agent/dist/provider/response/strip-tool-text.d.ts +11 -0
- package/node_modules/@comis/agent/dist/provider/response/strip-tool-text.js +32 -0
- package/node_modules/@comis/agent/dist/provider/tool-schema/clean-for-gemini.d.ts +20 -0
- package/node_modules/@comis/agent/dist/provider/tool-schema/clean-for-gemini.js +83 -0
- package/node_modules/@comis/agent/dist/provider/tool-schema/clean-for-xai.d.ts +20 -0
- package/node_modules/@comis/agent/dist/provider/tool-schema/clean-for-xai.js +82 -0
- package/node_modules/@comis/agent/dist/provider/tool-schema/normalize-enums.d.ts +33 -0
- package/node_modules/@comis/agent/dist/provider/tool-schema/normalize-enums.js +117 -0
- package/node_modules/@comis/agent/dist/provider/tool-schema/normalize.d.ts +43 -0
- package/node_modules/@comis/agent/dist/provider/tool-schema/normalize.js +133 -0
- package/node_modules/@comis/agent/dist/queue/coalescer.d.ts +25 -0
- package/node_modules/@comis/agent/dist/queue/coalescer.js +58 -0
- package/node_modules/@comis/agent/dist/queue/command-queue.d.ts +88 -0
- package/node_modules/@comis/agent/dist/queue/command-queue.js +351 -0
- package/node_modules/@comis/agent/dist/queue/debounce-buffer.d.ts +48 -0
- package/node_modules/@comis/agent/dist/queue/debounce-buffer.js +132 -0
- package/node_modules/@comis/agent/dist/queue/followup-trigger.d.ts +34 -0
- package/node_modules/@comis/agent/dist/queue/followup-trigger.js +62 -0
- package/node_modules/@comis/agent/dist/queue/index.d.ts +12 -0
- package/node_modules/@comis/agent/dist/queue/index.js +8 -0
- package/node_modules/@comis/agent/dist/queue/lane.d.ts +22 -0
- package/node_modules/@comis/agent/dist/queue/lane.js +10 -0
- package/node_modules/@comis/agent/dist/queue/overflow.d.ts +34 -0
- package/node_modules/@comis/agent/dist/queue/overflow.js +97 -0
- package/node_modules/@comis/agent/dist/queue/priority-scheduler.d.ts +59 -0
- package/node_modules/@comis/agent/dist/queue/priority-scheduler.js +198 -0
- package/node_modules/@comis/agent/dist/rag/hybrid-memory-injector.d.ts +41 -0
- package/node_modules/@comis/agent/dist/rag/hybrid-memory-injector.js +57 -0
- package/node_modules/@comis/agent/dist/rag/rag-retriever.d.ts +58 -0
- package/node_modules/@comis/agent/dist/rag/rag-retriever.js +147 -0
- package/node_modules/@comis/agent/dist/response-filter/code-regions.d.ts +27 -0
- package/node_modules/@comis/agent/dist/response-filter/code-regions.js +46 -0
- package/node_modules/@comis/agent/dist/response-filter/reasoning-tags.d.ts +27 -0
- package/node_modules/@comis/agent/dist/response-filter/reasoning-tags.js +85 -0
- package/node_modules/@comis/agent/dist/response-filter/thinking-tag-filter.d.ts +43 -0
- package/node_modules/@comis/agent/dist/response-filter/thinking-tag-filter.js +384 -0
- package/node_modules/@comis/agent/dist/routing/message-router.d.ts +49 -0
- package/node_modules/@comis/agent/dist/routing/message-router.js +121 -0
- package/node_modules/@comis/agent/dist/safety/circuit-breaker.d.ts +29 -0
- package/node_modules/@comis/agent/dist/safety/circuit-breaker.js +59 -0
- package/node_modules/@comis/agent/dist/safety/context-truncation-recovery.d.ts +40 -0
- package/node_modules/@comis/agent/dist/safety/context-truncation-recovery.js +115 -0
- package/node_modules/@comis/agent/dist/safety/context-window-guard.d.ts +59 -0
- package/node_modules/@comis/agent/dist/safety/context-window-guard.js +54 -0
- package/node_modules/@comis/agent/dist/safety/follow-through-detector.d.ts +46 -0
- package/node_modules/@comis/agent/dist/safety/follow-through-detector.js +76 -0
- package/node_modules/@comis/agent/dist/safety/message-send-limiter.d.ts +44 -0
- package/node_modules/@comis/agent/dist/safety/message-send-limiter.js +71 -0
- package/node_modules/@comis/agent/dist/safety/post-compaction-safety.d.ts +30 -0
- package/node_modules/@comis/agent/dist/safety/post-compaction-safety.js +51 -0
- package/node_modules/@comis/agent/dist/safety/provider-health-monitor.d.ts +56 -0
- package/node_modules/@comis/agent/dist/safety/provider-health-monitor.js +158 -0
- package/node_modules/@comis/agent/dist/safety/response-safety-checks.d.ts +65 -0
- package/node_modules/@comis/agent/dist/safety/response-safety-checks.js +118 -0
- package/node_modules/@comis/agent/dist/safety/schema-normalizer.d.ts +37 -0
- package/node_modules/@comis/agent/dist/safety/schema-normalizer.js +137 -0
- package/node_modules/@comis/agent/dist/safety/schema-pruning.d.ts +50 -0
- package/node_modules/@comis/agent/dist/safety/schema-pruning.js +112 -0
- package/node_modules/@comis/agent/dist/safety/token-estimator.d.ts +95 -0
- package/node_modules/@comis/agent/dist/safety/token-estimator.js +236 -0
- package/node_modules/@comis/agent/dist/safety/tool-display-names.d.ts +26 -0
- package/node_modules/@comis/agent/dist/safety/tool-display-names.js +66 -0
- package/node_modules/@comis/agent/dist/safety/tool-image-sanitizer.d.ts +43 -0
- package/node_modules/@comis/agent/dist/safety/tool-image-sanitizer.js +96 -0
- package/node_modules/@comis/agent/dist/safety/tool-output-safety.d.ts +79 -0
- package/node_modules/@comis/agent/dist/safety/tool-output-safety.js +184 -0
- package/node_modules/@comis/agent/dist/safety/tool-result-size-guard.d.ts +76 -0
- package/node_modules/@comis/agent/dist/safety/tool-result-size-guard.js +220 -0
- package/node_modules/@comis/agent/dist/safety/tool-retry-breaker.d.ts +80 -0
- package/node_modules/@comis/agent/dist/safety/tool-retry-breaker.js +365 -0
- package/node_modules/@comis/agent/dist/safety/tool-sanitizer.d.ts +44 -0
- package/node_modules/@comis/agent/dist/safety/tool-sanitizer.js +94 -0
- package/node_modules/@comis/agent/dist/safety/tool-schema-safety.d.ts +89 -0
- package/node_modules/@comis/agent/dist/safety/tool-schema-safety.js +253 -0
- package/node_modules/@comis/agent/dist/safety/turn-result-budget.d.ts +48 -0
- package/node_modules/@comis/agent/dist/safety/turn-result-budget.js +173 -0
- package/node_modules/@comis/agent/dist/safety/validation-error-formatter.d.ts +22 -0
- package/node_modules/@comis/agent/dist/safety/validation-error-formatter.js +131 -0
- package/node_modules/@comis/agent/dist/session/comis-session-manager.d.ts +114 -0
- package/node_modules/@comis/agent/dist/session/comis-session-manager.js +169 -0
- package/node_modules/@comis/agent/dist/session/orphaned-message-repair.d.ts +84 -0
- package/node_modules/@comis/agent/dist/session/orphaned-message-repair.js +337 -0
- package/node_modules/@comis/agent/dist/session/sanitize-session-secrets.d.ts +34 -0
- package/node_modules/@comis/agent/dist/session/sanitize-session-secrets.js +232 -0
- package/node_modules/@comis/agent/dist/session/scrub-redacted-tool-calls.d.ts +47 -0
- package/node_modules/@comis/agent/dist/session/scrub-redacted-tool-calls.js +183 -0
- package/node_modules/@comis/agent/dist/session/session-key-builder.d.ts +46 -0
- package/node_modules/@comis/agent/dist/session/session-key-builder.js +100 -0
- package/node_modules/@comis/agent/dist/session/session-key-mapper.d.ts +33 -0
- package/node_modules/@comis/agent/dist/session/session-key-mapper.js +183 -0
- package/node_modules/@comis/agent/dist/session/session-label-store.d.ts +34 -0
- package/node_modules/@comis/agent/dist/session/session-label-store.js +54 -0
- package/node_modules/@comis/agent/dist/session/session-lifecycle.d.ts +55 -0
- package/node_modules/@comis/agent/dist/session/session-lifecycle.js +82 -0
- package/node_modules/@comis/agent/dist/session/session-reset-policy.d.ts +113 -0
- package/node_modules/@comis/agent/dist/session/session-reset-policy.js +192 -0
- package/node_modules/@comis/agent/dist/session/session-write-lock.d.ts +48 -0
- package/node_modules/@comis/agent/dist/session/session-write-lock.js +151 -0
- package/node_modules/@comis/agent/dist/spawn/generate-parent-summary.d.ts +34 -0
- package/node_modules/@comis/agent/dist/spawn/generate-parent-summary.js +29 -0
- package/node_modules/@comis/agent/dist/spawn/index.d.ts +17 -0
- package/node_modules/@comis/agent/dist/spawn/index.js +13 -0
- package/node_modules/@comis/agent/dist/spawn/lifecycle-hooks.d.ts +86 -0
- package/node_modules/@comis/agent/dist/spawn/lifecycle-hooks.js +114 -0
- package/node_modules/@comis/agent/dist/spawn/narrative-caster.d.ts +46 -0
- package/node_modules/@comis/agent/dist/spawn/narrative-caster.js +159 -0
- package/node_modules/@comis/agent/dist/spawn/pi-mono-adapters.d.ts +29 -0
- package/node_modules/@comis/agent/dist/spawn/pi-mono-adapters.js +54 -0
- package/node_modules/@comis/agent/dist/spawn/result-condenser.d.ts +98 -0
- package/node_modules/@comis/agent/dist/spawn/result-condenser.js +343 -0
- package/node_modules/@comis/agent/dist/spawn/spawn-packet-builder.d.ts +41 -0
- package/node_modules/@comis/agent/dist/spawn/spawn-packet-builder.js +39 -0
- package/node_modules/@comis/agent/dist/workspace/boot-file.d.ts +23 -0
- package/node_modules/@comis/agent/dist/workspace/boot-file.js +38 -0
- package/node_modules/@comis/agent/dist/workspace/heartbeat-file.d.ts +24 -0
- package/node_modules/@comis/agent/dist/workspace/heartbeat-file.js +37 -0
- package/node_modules/@comis/agent/dist/workspace/index.d.ts +10 -0
- package/node_modules/@comis/agent/dist/workspace/index.js +8 -0
- package/node_modules/@comis/agent/dist/workspace/onboarding-detector.d.ts +12 -0
- package/node_modules/@comis/agent/dist/workspace/onboarding-detector.js +42 -0
- package/node_modules/@comis/agent/dist/workspace/templates.d.ts +11 -0
- package/node_modules/@comis/agent/dist/workspace/templates.js +499 -0
- package/node_modules/@comis/agent/dist/workspace/workspace-manager.d.ts +127 -0
- package/node_modules/@comis/agent/dist/workspace/workspace-manager.js +242 -0
- package/node_modules/@comis/agent/dist/workspace/workspace-resolver.d.ts +13 -0
- package/node_modules/@comis/agent/dist/workspace/workspace-resolver.js +27 -0
- package/node_modules/@comis/agent/dist/workspace/workspace-state.d.ts +39 -0
- package/node_modules/@comis/agent/dist/workspace/workspace-state.js +120 -0
- package/node_modules/@comis/agent/package.json +44 -0
- package/node_modules/@comis/channels/dist/discord/credential-validator.d.ts +23 -0
- package/node_modules/@comis/channels/dist/discord/credential-validator.js +33 -0
- package/node_modules/@comis/channels/dist/discord/discord-actions.d.ts +17 -0
- package/node_modules/@comis/channels/dist/discord/discord-actions.js +340 -0
- package/node_modules/@comis/channels/dist/discord/discord-adapter.d.ts +28 -0
- package/node_modules/@comis/channels/dist/discord/discord-adapter.js +451 -0
- package/node_modules/@comis/channels/dist/discord/discord-plugin.d.ts +17 -0
- package/node_modules/@comis/channels/dist/discord/discord-plugin.js +70 -0
- package/node_modules/@comis/channels/dist/discord/discord-resolver.d.ts +43 -0
- package/node_modules/@comis/channels/dist/discord/discord-resolver.js +50 -0
- package/node_modules/@comis/channels/dist/discord/format-discord.d.ts +31 -0
- package/node_modules/@comis/channels/dist/discord/format-discord.js +217 -0
- package/node_modules/@comis/channels/dist/discord/media-handler.d.ts +18 -0
- package/node_modules/@comis/channels/dist/discord/media-handler.js +43 -0
- package/node_modules/@comis/channels/dist/discord/message-mapper.d.ts +21 -0
- package/node_modules/@comis/channels/dist/discord/message-mapper.js +54 -0
- package/node_modules/@comis/channels/dist/discord/rich-renderer.d.ts +32 -0
- package/node_modules/@comis/channels/dist/discord/rich-renderer.js +97 -0
- package/node_modules/@comis/channels/dist/discord/voice-sender.d.ts +46 -0
- package/node_modules/@comis/channels/dist/discord/voice-sender.js +171 -0
- package/node_modules/@comis/channels/dist/echo/echo-adapter.d.ts +82 -0
- package/node_modules/@comis/channels/dist/echo/echo-adapter.js +170 -0
- package/node_modules/@comis/channels/dist/echo/echo-plugin.d.ts +19 -0
- package/node_modules/@comis/channels/dist/echo/echo-plugin.js +68 -0
- package/node_modules/@comis/channels/dist/email/credential-validator.d.ts +33 -0
- package/node_modules/@comis/channels/dist/email/credential-validator.js +45 -0
- package/node_modules/@comis/channels/dist/email/email-adapter.d.ts +46 -0
- package/node_modules/@comis/channels/dist/email/email-adapter.js +271 -0
- package/node_modules/@comis/channels/dist/email/email-plugin.d.ts +20 -0
- package/node_modules/@comis/channels/dist/email/email-plugin.js +76 -0
- package/node_modules/@comis/channels/dist/email/imap-lifecycle.d.ts +37 -0
- package/node_modules/@comis/channels/dist/email/imap-lifecycle.js +191 -0
- package/node_modules/@comis/channels/dist/email/message-mapper.d.ts +53 -0
- package/node_modules/@comis/channels/dist/email/message-mapper.js +107 -0
- package/node_modules/@comis/channels/dist/email/sender-filter.d.ts +31 -0
- package/node_modules/@comis/channels/dist/email/sender-filter.js +82 -0
- package/node_modules/@comis/channels/dist/email/threading.d.ts +38 -0
- package/node_modules/@comis/channels/dist/email/threading.js +44 -0
- package/node_modules/@comis/channels/dist/imessage/credential-validator.d.ts +36 -0
- package/node_modules/@comis/channels/dist/imessage/credential-validator.js +102 -0
- package/node_modules/@comis/channels/dist/imessage/imessage-adapter.d.ts +31 -0
- package/node_modules/@comis/channels/dist/imessage/imessage-adapter.js +290 -0
- package/node_modules/@comis/channels/dist/imessage/imessage-client.d.ts +52 -0
- package/node_modules/@comis/channels/dist/imessage/imessage-client.js +209 -0
- package/node_modules/@comis/channels/dist/imessage/imessage-plugin.d.ts +20 -0
- package/node_modules/@comis/channels/dist/imessage/imessage-plugin.js +71 -0
- package/node_modules/@comis/channels/dist/imessage/imessage-resolver.d.ts +33 -0
- package/node_modules/@comis/channels/dist/imessage/imessage-resolver.js +73 -0
- package/node_modules/@comis/channels/dist/imessage/media-handler.d.ts +31 -0
- package/node_modules/@comis/channels/dist/imessage/media-handler.js +34 -0
- package/node_modules/@comis/channels/dist/imessage/message-mapper.d.ts +56 -0
- package/node_modules/@comis/channels/dist/imessage/message-mapper.js +67 -0
- package/node_modules/@comis/channels/dist/index.d.ts +138 -0
- package/node_modules/@comis/channels/dist/index.js +127 -0
- package/node_modules/@comis/channels/dist/irc/credential-validator.d.ts +34 -0
- package/node_modules/@comis/channels/dist/irc/credential-validator.js +78 -0
- package/node_modules/@comis/channels/dist/irc/irc-adapter.d.ts +39 -0
- package/node_modules/@comis/channels/dist/irc/irc-adapter.js +302 -0
- package/node_modules/@comis/channels/dist/irc/irc-plugin.d.ts +21 -0
- package/node_modules/@comis/channels/dist/irc/irc-plugin.js +71 -0
- package/node_modules/@comis/channels/dist/irc/message-mapper.d.ts +34 -0
- package/node_modules/@comis/channels/dist/irc/message-mapper.js +41 -0
- package/node_modules/@comis/channels/dist/line/credential-validator.d.ts +37 -0
- package/node_modules/@comis/channels/dist/line/credential-validator.js +50 -0
- package/node_modules/@comis/channels/dist/line/flex-builder.d.ts +52 -0
- package/node_modules/@comis/channels/dist/line/flex-builder.js +136 -0
- package/node_modules/@comis/channels/dist/line/line-adapter.d.ts +40 -0
- package/node_modules/@comis/channels/dist/line/line-adapter.js +324 -0
- package/node_modules/@comis/channels/dist/line/line-plugin.d.ts +36 -0
- package/node_modules/@comis/channels/dist/line/line-plugin.js +83 -0
- package/node_modules/@comis/channels/dist/line/line-resolver.d.ts +31 -0
- package/node_modules/@comis/channels/dist/line/line-resolver.js +69 -0
- package/node_modules/@comis/channels/dist/line/media-handler.d.ts +24 -0
- package/node_modules/@comis/channels/dist/line/media-handler.js +72 -0
- package/node_modules/@comis/channels/dist/line/message-mapper.d.ts +29 -0
- package/node_modules/@comis/channels/dist/line/message-mapper.js +127 -0
- package/node_modules/@comis/channels/dist/line/rich-menu-manager.d.ts +79 -0
- package/node_modules/@comis/channels/dist/line/rich-menu-manager.js +90 -0
- package/node_modules/@comis/channels/dist/shared/abort-summary.d.ts +26 -0
- package/node_modules/@comis/channels/dist/shared/abort-summary.js +47 -0
- package/node_modules/@comis/channels/dist/shared/approval-notifier.d.ts +31 -0
- package/node_modules/@comis/channels/dist/shared/approval-notifier.js +82 -0
- package/node_modules/@comis/channels/dist/shared/audio-preflight.d.ts +49 -0
- package/node_modules/@comis/channels/dist/shared/audio-preflight.js +78 -0
- package/node_modules/@comis/channels/dist/shared/auto-reply-engine.d.ts +68 -0
- package/node_modules/@comis/channels/dist/shared/auto-reply-engine.js +132 -0
- package/node_modules/@comis/channels/dist/shared/block-chunker.d.ts +30 -0
- package/node_modules/@comis/channels/dist/shared/block-chunker.js +201 -0
- package/node_modules/@comis/channels/dist/shared/block-coalescer.d.ts +59 -0
- package/node_modules/@comis/channels/dist/shared/block-coalescer.js +154 -0
- package/node_modules/@comis/channels/dist/shared/block-pacer.d.ts +42 -0
- package/node_modules/@comis/channels/dist/shared/block-pacer.js +130 -0
- package/node_modules/@comis/channels/dist/shared/channel-health-monitor.d.ts +90 -0
- package/node_modules/@comis/channels/dist/shared/channel-health-monitor.js +317 -0
- package/node_modules/@comis/channels/dist/shared/channel-manager.d.ts +169 -0
- package/node_modules/@comis/channels/dist/shared/channel-manager.js +174 -0
- package/node_modules/@comis/channels/dist/shared/channel-registry.d.ts +46 -0
- package/node_modules/@comis/channels/dist/shared/channel-registry.js +81 -0
- package/node_modules/@comis/channels/dist/shared/chunk-for-delivery.d.ts +40 -0
- package/node_modules/@comis/channels/dist/shared/chunk-for-delivery.js +77 -0
- package/node_modules/@comis/channels/dist/shared/credential-validator-factory.d.ts +20 -0
- package/node_modules/@comis/channels/dist/shared/credential-validator-factory.js +24 -0
- package/node_modules/@comis/channels/dist/shared/deliver-to-channel.d.ts +156 -0
- package/node_modules/@comis/channels/dist/shared/deliver-to-channel.js +516 -0
- package/node_modules/@comis/channels/dist/shared/delivery-timing.d.ts +31 -0
- package/node_modules/@comis/channels/dist/shared/delivery-timing.js +87 -0
- package/node_modules/@comis/channels/dist/shared/emoji-tier-map.d.ts +46 -0
- package/node_modules/@comis/channels/dist/shared/emoji-tier-map.js +87 -0
- package/node_modules/@comis/channels/dist/shared/execution-deliver.d.ts +21 -0
- package/node_modules/@comis/channels/dist/shared/execution-deliver.js +174 -0
- package/node_modules/@comis/channels/dist/shared/execution-execute.d.ts +45 -0
- package/node_modules/@comis/channels/dist/shared/execution-execute.js +175 -0
- package/node_modules/@comis/channels/dist/shared/execution-filter.d.ts +30 -0
- package/node_modules/@comis/channels/dist/shared/execution-filter.js +186 -0
- package/node_modules/@comis/channels/dist/shared/execution-pipeline.d.ts +95 -0
- package/node_modules/@comis/channels/dist/shared/execution-pipeline.js +294 -0
- package/node_modules/@comis/channels/dist/shared/execution-policy.d.ts +34 -0
- package/node_modules/@comis/channels/dist/shared/execution-policy.js +128 -0
- package/node_modules/@comis/channels/dist/shared/format-for-channel.d.ts +27 -0
- package/node_modules/@comis/channels/dist/shared/format-for-channel.js +62 -0
- package/node_modules/@comis/channels/dist/shared/group-history-buffer.d.ts +33 -0
- package/node_modules/@comis/channels/dist/shared/group-history-buffer.js +58 -0
- package/node_modules/@comis/channels/dist/shared/inbound-gate.d.ts +35 -0
- package/node_modules/@comis/channels/dist/shared/inbound-gate.js +353 -0
- package/node_modules/@comis/channels/dist/shared/inbound-pipeline.d.ts +144 -0
- package/node_modules/@comis/channels/dist/shared/inbound-pipeline.js +89 -0
- package/node_modules/@comis/channels/dist/shared/inbound-preprocess.d.ts +19 -0
- package/node_modules/@comis/channels/dist/shared/inbound-preprocess.js +83 -0
- package/node_modules/@comis/channels/dist/shared/inbound-resolve.d.ts +28 -0
- package/node_modules/@comis/channels/dist/shared/inbound-resolve.js +55 -0
- package/node_modules/@comis/channels/dist/shared/inbound-route.d.ts +26 -0
- package/node_modules/@comis/channels/dist/shared/inbound-route.js +235 -0
- package/node_modules/@comis/channels/dist/shared/inbound-setup.d.ts +32 -0
- package/node_modules/@comis/channels/dist/shared/inbound-setup.js +148 -0
- package/node_modules/@comis/channels/dist/shared/ir-chunker.d.ts +42 -0
- package/node_modules/@comis/channels/dist/shared/ir-chunker.js +234 -0
- package/node_modules/@comis/channels/dist/shared/ir-renderer.d.ts +26 -0
- package/node_modules/@comis/channels/dist/shared/ir-renderer.js +565 -0
- package/node_modules/@comis/channels/dist/shared/lifecycle-reactor.d.ts +44 -0
- package/node_modules/@comis/channels/dist/shared/lifecycle-reactor.js +420 -0
- package/node_modules/@comis/channels/dist/shared/lifecycle-state-machine.d.ts +56 -0
- package/node_modules/@comis/channels/dist/shared/lifecycle-state-machine.js +85 -0
- package/node_modules/@comis/channels/dist/shared/location-normalizer.d.ts +45 -0
- package/node_modules/@comis/channels/dist/shared/location-normalizer.js +37 -0
- package/node_modules/@comis/channels/dist/shared/markdown-ir.d.ts +49 -0
- package/node_modules/@comis/channels/dist/shared/markdown-ir.js +479 -0
- package/node_modules/@comis/channels/dist/shared/markdown-tables.d.ts +18 -0
- package/node_modules/@comis/channels/dist/shared/markdown-tables.js +142 -0
- package/node_modules/@comis/channels/dist/shared/media-compressor.d.ts +31 -0
- package/node_modules/@comis/channels/dist/shared/media-compressor.js +114 -0
- package/node_modules/@comis/channels/dist/shared/media-utils.d.ts +10 -0
- package/node_modules/@comis/channels/dist/shared/media-utils.js +19 -0
- package/node_modules/@comis/channels/dist/shared/outbound-media-handler.d.ts +56 -0
- package/node_modules/@comis/channels/dist/shared/outbound-media-handler.js +151 -0
- package/node_modules/@comis/channels/dist/shared/permanent-errors.d.ts +30 -0
- package/node_modules/@comis/channels/dist/shared/permanent-errors.js +41 -0
- package/node_modules/@comis/channels/dist/shared/poll-normalizer.d.ts +59 -0
- package/node_modules/@comis/channels/dist/shared/poll-normalizer.js +80 -0
- package/node_modules/@comis/channels/dist/shared/prefix-template.d.ts +53 -0
- package/node_modules/@comis/channels/dist/shared/prefix-template.js +158 -0
- package/node_modules/@comis/channels/dist/shared/regex-guard.d.ts +33 -0
- package/node_modules/@comis/channels/dist/shared/regex-guard.js +48 -0
- package/node_modules/@comis/channels/dist/shared/response-filter.d.ts +41 -0
- package/node_modules/@comis/channels/dist/shared/response-filter.js +75 -0
- package/node_modules/@comis/channels/dist/shared/retry-engine.d.ts +88 -0
- package/node_modules/@comis/channels/dist/shared/retry-engine.js +258 -0
- package/node_modules/@comis/channels/dist/shared/sanitize-for-plain-text.d.ts +32 -0
- package/node_modules/@comis/channels/dist/shared/sanitize-for-plain-text.js +80 -0
- package/node_modules/@comis/channels/dist/shared/send-policy.d.ts +53 -0
- package/node_modules/@comis/channels/dist/shared/send-policy.js +88 -0
- package/node_modules/@comis/channels/dist/shared/slack-emoji-map.d.ts +22 -0
- package/node_modules/@comis/channels/dist/shared/slack-emoji-map.js +44 -0
- package/node_modules/@comis/channels/dist/shared/stall-detector.d.ts +54 -0
- package/node_modules/@comis/channels/dist/shared/stall-detector.js +61 -0
- package/node_modules/@comis/channels/dist/shared/table-converter.d.ts +24 -0
- package/node_modules/@comis/channels/dist/shared/table-converter.js +139 -0
- package/node_modules/@comis/channels/dist/shared/telegram-file-ref-guard.d.ts +59 -0
- package/node_modules/@comis/channels/dist/shared/telegram-file-ref-guard.js +172 -0
- package/node_modules/@comis/channels/dist/shared/thinking-tag-filter.d.ts +28 -0
- package/node_modules/@comis/channels/dist/shared/thinking-tag-filter.js +206 -0
- package/node_modules/@comis/channels/dist/shared/typing-controller.d.ts +107 -0
- package/node_modules/@comis/channels/dist/shared/typing-controller.js +156 -0
- package/node_modules/@comis/channels/dist/shared/typing-lifecycle-controller.d.ts +55 -0
- package/node_modules/@comis/channels/dist/shared/typing-lifecycle-controller.js +86 -0
- package/node_modules/@comis/channels/dist/shared/voice-response-pipeline.d.ts +149 -0
- package/node_modules/@comis/channels/dist/shared/voice-response-pipeline.js +157 -0
- package/node_modules/@comis/channels/dist/shared/voice-sender.d.ts +64 -0
- package/node_modules/@comis/channels/dist/shared/voice-sender.js +77 -0
- package/node_modules/@comis/channels/dist/signal/credential-validator.d.ts +30 -0
- package/node_modules/@comis/channels/dist/signal/credential-validator.js +75 -0
- package/node_modules/@comis/channels/dist/signal/media-handler.d.ts +18 -0
- package/node_modules/@comis/channels/dist/signal/media-handler.js +40 -0
- package/node_modules/@comis/channels/dist/signal/message-mapper.d.ts +18 -0
- package/node_modules/@comis/channels/dist/signal/message-mapper.js +79 -0
- package/node_modules/@comis/channels/dist/signal/signal-adapter.d.ts +28 -0
- package/node_modules/@comis/channels/dist/signal/signal-adapter.js +339 -0
- package/node_modules/@comis/channels/dist/signal/signal-client.d.ts +98 -0
- package/node_modules/@comis/channels/dist/signal/signal-client.js +244 -0
- package/node_modules/@comis/channels/dist/signal/signal-format.d.ts +40 -0
- package/node_modules/@comis/channels/dist/signal/signal-format.js +169 -0
- package/node_modules/@comis/channels/dist/signal/signal-plugin.d.ts +17 -0
- package/node_modules/@comis/channels/dist/signal/signal-plugin.js +68 -0
- package/node_modules/@comis/channels/dist/signal/signal-resolver.d.ts +43 -0
- package/node_modules/@comis/channels/dist/signal/signal-resolver.js +50 -0
- package/node_modules/@comis/channels/dist/slack/credential-validator.d.ts +43 -0
- package/node_modules/@comis/channels/dist/slack/credential-validator.js +66 -0
- package/node_modules/@comis/channels/dist/slack/format-slack.d.ts +20 -0
- package/node_modules/@comis/channels/dist/slack/format-slack.js +73 -0
- package/node_modules/@comis/channels/dist/slack/media-handler.d.ts +47 -0
- package/node_modules/@comis/channels/dist/slack/media-handler.js +132 -0
- package/node_modules/@comis/channels/dist/slack/message-mapper.d.ts +50 -0
- package/node_modules/@comis/channels/dist/slack/message-mapper.js +70 -0
- package/node_modules/@comis/channels/dist/slack/rich-renderer.d.ts +32 -0
- package/node_modules/@comis/channels/dist/slack/rich-renderer.js +89 -0
- package/node_modules/@comis/channels/dist/slack/slack-actions.d.ts +22 -0
- package/node_modules/@comis/channels/dist/slack/slack-actions.js +137 -0
- package/node_modules/@comis/channels/dist/slack/slack-adapter.d.ts +30 -0
- package/node_modules/@comis/channels/dist/slack/slack-adapter.js +399 -0
- package/node_modules/@comis/channels/dist/slack/slack-plugin.d.ts +17 -0
- package/node_modules/@comis/channels/dist/slack/slack-plugin.js +69 -0
- package/node_modules/@comis/channels/dist/slack/slack-resolver.d.ts +31 -0
- package/node_modules/@comis/channels/dist/slack/slack-resolver.js +83 -0
- package/node_modules/@comis/channels/dist/telegram/credential-validator.d.ts +37 -0
- package/node_modules/@comis/channels/dist/telegram/credential-validator.js +62 -0
- package/node_modules/@comis/channels/dist/telegram/emoji-fallback.d.ts +30 -0
- package/node_modules/@comis/channels/dist/telegram/emoji-fallback.js +60 -0
- package/node_modules/@comis/channels/dist/telegram/media-handler.d.ts +13 -0
- package/node_modules/@comis/channels/dist/telegram/media-handler.js +92 -0
- package/node_modules/@comis/channels/dist/telegram/message-mapper.d.ts +21 -0
- package/node_modules/@comis/channels/dist/telegram/message-mapper.js +78 -0
- package/node_modules/@comis/channels/dist/telegram/rich-renderer.d.ts +33 -0
- package/node_modules/@comis/channels/dist/telegram/rich-renderer.js +97 -0
- package/node_modules/@comis/channels/dist/telegram/telegram-adapter.d.ts +36 -0
- package/node_modules/@comis/channels/dist/telegram/telegram-adapter.js +673 -0
- package/node_modules/@comis/channels/dist/telegram/telegram-plugin.d.ts +39 -0
- package/node_modules/@comis/channels/dist/telegram/telegram-plugin.js +79 -0
- package/node_modules/@comis/channels/dist/telegram/telegram-resolver.d.ts +44 -0
- package/node_modules/@comis/channels/dist/telegram/telegram-resolver.js +83 -0
- package/node_modules/@comis/channels/dist/telegram/thread-context.d.ts +90 -0
- package/node_modules/@comis/channels/dist/telegram/thread-context.js +119 -0
- package/node_modules/@comis/channels/dist/telegram/voice-sender.d.ts +35 -0
- package/node_modules/@comis/channels/dist/telegram/voice-sender.js +75 -0
- package/node_modules/@comis/channels/dist/whatsapp/credential-validator.d.ts +27 -0
- package/node_modules/@comis/channels/dist/whatsapp/credential-validator.js +80 -0
- package/node_modules/@comis/channels/dist/whatsapp/jid-utils.d.ts +39 -0
- package/node_modules/@comis/channels/dist/whatsapp/jid-utils.js +125 -0
- package/node_modules/@comis/channels/dist/whatsapp/media-handler.d.ts +27 -0
- package/node_modules/@comis/channels/dist/whatsapp/media-handler.js +84 -0
- package/node_modules/@comis/channels/dist/whatsapp/message-mapper.d.ts +74 -0
- package/node_modules/@comis/channels/dist/whatsapp/message-mapper.js +106 -0
- package/node_modules/@comis/channels/dist/whatsapp/voice-sender.d.ts +37 -0
- package/node_modules/@comis/channels/dist/whatsapp/voice-sender.js +49 -0
- package/node_modules/@comis/channels/dist/whatsapp/whatsapp-adapter.d.ts +27 -0
- package/node_modules/@comis/channels/dist/whatsapp/whatsapp-adapter.js +475 -0
- package/node_modules/@comis/channels/dist/whatsapp/whatsapp-plugin.d.ts +17 -0
- package/node_modules/@comis/channels/dist/whatsapp/whatsapp-plugin.js +69 -0
- package/node_modules/@comis/channels/dist/whatsapp/whatsapp-resolver.d.ts +34 -0
- package/node_modules/@comis/channels/dist/whatsapp/whatsapp-resolver.js +99 -0
- package/node_modules/@comis/channels/package.json +47 -0
- package/node_modules/@comis/cli/dist/cli.d.ts +12 -0
- package/node_modules/@comis/cli/dist/cli.js +57 -0
- package/node_modules/@comis/cli/dist/client/rpc-client.d.ts +61 -0
- package/node_modules/@comis/cli/dist/client/rpc-client.js +274 -0
- package/node_modules/@comis/cli/dist/commands/agent.d.ts +15 -0
- package/node_modules/@comis/cli/dist/commands/agent.js +282 -0
- package/node_modules/@comis/cli/dist/commands/channel.d.ts +15 -0
- package/node_modules/@comis/cli/dist/commands/channel.js +113 -0
- package/node_modules/@comis/cli/dist/commands/config.d.ts +16 -0
- package/node_modules/@comis/cli/dist/commands/config.js +293 -0
- package/node_modules/@comis/cli/dist/commands/configure.d.ts +20 -0
- package/node_modules/@comis/cli/dist/commands/configure.js +273 -0
- package/node_modules/@comis/cli/dist/commands/daemon.d.ts +17 -0
- package/node_modules/@comis/cli/dist/commands/daemon.js +562 -0
- package/node_modules/@comis/cli/dist/commands/doctor.d.ts +20 -0
- package/node_modules/@comis/cli/dist/commands/doctor.js +160 -0
- package/node_modules/@comis/cli/dist/commands/health.d.ts +20 -0
- package/node_modules/@comis/cli/dist/commands/health.js +158 -0
- package/node_modules/@comis/cli/dist/commands/init.d.ts +24 -0
- package/node_modules/@comis/cli/dist/commands/init.js +229 -0
- package/node_modules/@comis/cli/dist/commands/memory.d.ts +15 -0
- package/node_modules/@comis/cli/dist/commands/memory.js +266 -0
- package/node_modules/@comis/cli/dist/commands/models.d.ts +20 -0
- package/node_modules/@comis/cli/dist/commands/models.js +225 -0
- package/node_modules/@comis/cli/dist/commands/pm2.d.ts +16 -0
- package/node_modules/@comis/cli/dist/commands/pm2.js +216 -0
- package/node_modules/@comis/cli/dist/commands/reset.d.ts +19 -0
- package/node_modules/@comis/cli/dist/commands/reset.js +186 -0
- package/node_modules/@comis/cli/dist/commands/secrets.d.ts +25 -0
- package/node_modules/@comis/cli/dist/commands/secrets.js +491 -0
- package/node_modules/@comis/cli/dist/commands/security.d.ts +21 -0
- package/node_modules/@comis/cli/dist/commands/security.js +231 -0
- package/node_modules/@comis/cli/dist/commands/sessions.d.ts +25 -0
- package/node_modules/@comis/cli/dist/commands/sessions.js +179 -0
- package/node_modules/@comis/cli/dist/commands/signal-setup.d.ts +19 -0
- package/node_modules/@comis/cli/dist/commands/signal-setup.js +398 -0
- package/node_modules/@comis/cli/dist/commands/status.d.ts +20 -0
- package/node_modules/@comis/cli/dist/commands/status.js +243 -0
- package/node_modules/@comis/cli/dist/commands/uninstall.d.ts +13 -0
- package/node_modules/@comis/cli/dist/commands/uninstall.js +143 -0
- package/node_modules/@comis/cli/dist/doctor/check-runner.d.ts +23 -0
- package/node_modules/@comis/cli/dist/doctor/check-runner.js +56 -0
- package/node_modules/@comis/cli/dist/doctor/checks/channel-health.d.ts +18 -0
- package/node_modules/@comis/cli/dist/doctor/checks/channel-health.js +94 -0
- package/node_modules/@comis/cli/dist/doctor/checks/config-health.d.ts +17 -0
- package/node_modules/@comis/cli/dist/doctor/checks/config-health.js +114 -0
- package/node_modules/@comis/cli/dist/doctor/checks/daemon-health.d.ts +17 -0
- package/node_modules/@comis/cli/dist/doctor/checks/daemon-health.js +77 -0
- package/node_modules/@comis/cli/dist/doctor/checks/gateway-health.d.ts +15 -0
- package/node_modules/@comis/cli/dist/doctor/checks/gateway-health.js +110 -0
- package/node_modules/@comis/cli/dist/doctor/checks/workspace-health.d.ts +19 -0
- package/node_modules/@comis/cli/dist/doctor/checks/workspace-health.js +97 -0
- package/node_modules/@comis/cli/dist/doctor/output.d.ts +28 -0
- package/node_modules/@comis/cli/dist/doctor/output.js +83 -0
- package/node_modules/@comis/cli/dist/doctor/repairs/repair-config.d.ts +24 -0
- package/node_modules/@comis/cli/dist/doctor/repairs/repair-config.js +88 -0
- package/node_modules/@comis/cli/dist/doctor/repairs/repair-daemon.d.ts +21 -0
- package/node_modules/@comis/cli/dist/doctor/repairs/repair-daemon.js +38 -0
- package/node_modules/@comis/cli/dist/doctor/repairs/repair-workspace.d.ts +23 -0
- package/node_modules/@comis/cli/dist/doctor/repairs/repair-workspace.js +56 -0
- package/node_modules/@comis/cli/dist/doctor/types.d.ts +65 -0
- package/node_modules/@comis/cli/dist/doctor/types.js +11 -0
- package/node_modules/@comis/cli/dist/index.d.ts +23 -0
- package/node_modules/@comis/cli/dist/index.js +48 -0
- package/node_modules/@comis/cli/dist/mock-rpc-client.d.ts +69 -0
- package/node_modules/@comis/cli/dist/mock-rpc-client.js +105 -0
- package/node_modules/@comis/cli/dist/output/format.d.ts +28 -0
- package/node_modules/@comis/cli/dist/output/format.js +42 -0
- package/node_modules/@comis/cli/dist/output/spinner.d.ts +19 -0
- package/node_modules/@comis/cli/dist/output/spinner.js +32 -0
- package/node_modules/@comis/cli/dist/output/table.d.ts +21 -0
- package/node_modules/@comis/cli/dist/output/table.js +57 -0
- package/node_modules/@comis/cli/dist/security/check-runner.d.ts +25 -0
- package/node_modules/@comis/cli/dist/security/check-runner.js +68 -0
- package/node_modules/@comis/cli/dist/security/checks/action-confirmation.d.ts +18 -0
- package/node_modules/@comis/cli/dist/security/checks/action-confirmation.js +52 -0
- package/node_modules/@comis/cli/dist/security/checks/audit-logging.d.ts +19 -0
- package/node_modules/@comis/cli/dist/security/checks/audit-logging.js +57 -0
- package/node_modules/@comis/cli/dist/security/checks/browser-exposure.d.ts +17 -0
- package/node_modules/@comis/cli/dist/security/checks/browser-exposure.js +56 -0
- package/node_modules/@comis/cli/dist/security/checks/channel-security.d.ts +16 -0
- package/node_modules/@comis/cli/dist/security/checks/channel-security.js +63 -0
- package/node_modules/@comis/cli/dist/security/checks/config-validation.d.ts +17 -0
- package/node_modules/@comis/cli/dist/security/checks/config-validation.js +77 -0
- package/node_modules/@comis/cli/dist/security/checks/file-permissions.d.ts +18 -0
- package/node_modules/@comis/cli/dist/security/checks/file-permissions.js +97 -0
- package/node_modules/@comis/cli/dist/security/checks/gateway-exposure.d.ts +17 -0
- package/node_modules/@comis/cli/dist/security/checks/gateway-exposure.js +69 -0
- package/node_modules/@comis/cli/dist/security/checks/hooks-hardening.d.ts +17 -0
- package/node_modules/@comis/cli/dist/security/checks/hooks-hardening.js +72 -0
- package/node_modules/@comis/cli/dist/security/checks/model-hygiene.d.ts +18 -0
- package/node_modules/@comis/cli/dist/security/checks/model-hygiene.js +61 -0
- package/node_modules/@comis/cli/dist/security/checks/secrets-exposure.d.ts +20 -0
- package/node_modules/@comis/cli/dist/security/checks/secrets-exposure.js +82 -0
- package/node_modules/@comis/cli/dist/security/checks/skills-code.d.ts +18 -0
- package/node_modules/@comis/cli/dist/security/checks/skills-code.js +136 -0
- package/node_modules/@comis/cli/dist/security/checks/ssrf-surface.d.ts +17 -0
- package/node_modules/@comis/cli/dist/security/checks/ssrf-surface.js +66 -0
- package/node_modules/@comis/cli/dist/security/checks/state-protection.d.ts +16 -0
- package/node_modules/@comis/cli/dist/security/checks/state-protection.js +97 -0
- package/node_modules/@comis/cli/dist/security/checks/webhook-security.d.ts +21 -0
- package/node_modules/@comis/cli/dist/security/checks/webhook-security.js +61 -0
- package/node_modules/@comis/cli/dist/security/fix-runner.d.ts +32 -0
- package/node_modules/@comis/cli/dist/security/fix-runner.js +95 -0
- package/node_modules/@comis/cli/dist/security/fix-types.d.ts +46 -0
- package/node_modules/@comis/cli/dist/security/fix-types.js +10 -0
- package/node_modules/@comis/cli/dist/security/fixes/fix-config.d.ts +25 -0
- package/node_modules/@comis/cli/dist/security/fixes/fix-config.js +46 -0
- package/node_modules/@comis/cli/dist/security/fixes/fix-permissions.d.ts +21 -0
- package/node_modules/@comis/cli/dist/security/fixes/fix-permissions.js +82 -0
- package/node_modules/@comis/cli/dist/security/fixes/fix-secrets.d.ts +21 -0
- package/node_modules/@comis/cli/dist/security/fixes/fix-secrets.js +34 -0
- package/node_modules/@comis/cli/dist/security/output.d.ts +28 -0
- package/node_modules/@comis/cli/dist/security/output.js +92 -0
- package/node_modules/@comis/cli/dist/security/types.d.ts +65 -0
- package/node_modules/@comis/cli/dist/security/types.js +11 -0
- package/node_modules/@comis/cli/dist/test-fixtures.d.ts +76 -0
- package/node_modules/@comis/cli/dist/test-fixtures.js +164 -0
- package/node_modules/@comis/cli/dist/test-helpers.d.ts +54 -0
- package/node_modules/@comis/cli/dist/test-helpers.js +73 -0
- package/node_modules/@comis/cli/dist/wizard/clack-adapter.d.ts +46 -0
- package/node_modules/@comis/cli/dist/wizard/clack-adapter.js +248 -0
- package/node_modules/@comis/cli/dist/wizard/config-writer.d.ts +25 -0
- package/node_modules/@comis/cli/dist/wizard/config-writer.js +144 -0
- package/node_modules/@comis/cli/dist/wizard/flow-types.d.ts +48 -0
- package/node_modules/@comis/cli/dist/wizard/flow-types.js +70 -0
- package/node_modules/@comis/cli/dist/wizard/index.d.ts +44 -0
- package/node_modules/@comis/cli/dist/wizard/index.js +46 -0
- package/node_modules/@comis/cli/dist/wizard/json-output.d.ts +66 -0
- package/node_modules/@comis/cli/dist/wizard/json-output.js +83 -0
- package/node_modules/@comis/cli/dist/wizard/manual-flow.d.ts +21 -0
- package/node_modules/@comis/cli/dist/wizard/manual-flow.js +345 -0
- package/node_modules/@comis/cli/dist/wizard/non-interactive.d.ts +120 -0
- package/node_modules/@comis/cli/dist/wizard/non-interactive.js +403 -0
- package/node_modules/@comis/cli/dist/wizard/prompter.d.ts +122 -0
- package/node_modules/@comis/cli/dist/wizard/prompter.js +44 -0
- package/node_modules/@comis/cli/dist/wizard/quickstart-flow.d.ts +21 -0
- package/node_modules/@comis/cli/dist/wizard/quickstart-flow.js +116 -0
- package/node_modules/@comis/cli/dist/wizard/state.d.ts +124 -0
- package/node_modules/@comis/cli/dist/wizard/state.js +448 -0
- package/node_modules/@comis/cli/dist/wizard/steps/00-welcome.d.ts +12 -0
- package/node_modules/@comis/cli/dist/wizard/steps/00-welcome.js +42 -0
- package/node_modules/@comis/cli/dist/wizard/steps/01-detect-existing.d.ts +12 -0
- package/node_modules/@comis/cli/dist/wizard/steps/01-detect-existing.js +369 -0
- package/node_modules/@comis/cli/dist/wizard/steps/02-flow-select.d.ts +14 -0
- package/node_modules/@comis/cli/dist/wizard/steps/02-flow-select.js +43 -0
- package/node_modules/@comis/cli/dist/wizard/steps/03-provider.d.ts +15 -0
- package/node_modules/@comis/cli/dist/wizard/steps/03-provider.js +46 -0
- package/node_modules/@comis/cli/dist/wizard/steps/04-credentials.d.ts +18 -0
- package/node_modules/@comis/cli/dist/wizard/steps/04-credentials.js +324 -0
- package/node_modules/@comis/cli/dist/wizard/steps/05-agent.d.ts +12 -0
- package/node_modules/@comis/cli/dist/wizard/steps/05-agent.js +116 -0
- package/node_modules/@comis/cli/dist/wizard/steps/06-channels.d.ts +15 -0
- package/node_modules/@comis/cli/dist/wizard/steps/06-channels.js +476 -0
- package/node_modules/@comis/cli/dist/wizard/steps/07-gateway.d.ts +14 -0
- package/node_modules/@comis/cli/dist/wizard/steps/07-gateway.js +105 -0
- package/node_modules/@comis/cli/dist/wizard/steps/08-workspace.d.ts +14 -0
- package/node_modules/@comis/cli/dist/wizard/steps/08-workspace.js +69 -0
- package/node_modules/@comis/cli/dist/wizard/steps/08b-tool-providers.d.ts +14 -0
- package/node_modules/@comis/cli/dist/wizard/steps/08b-tool-providers.js +61 -0
- package/node_modules/@comis/cli/dist/wizard/steps/09-review.d.ts +17 -0
- package/node_modules/@comis/cli/dist/wizard/steps/09-review.js +150 -0
- package/node_modules/@comis/cli/dist/wizard/steps/10-write-config.d.ts +11 -0
- package/node_modules/@comis/cli/dist/wizard/steps/10-write-config.js +342 -0
- package/node_modules/@comis/cli/dist/wizard/steps/11-daemon-start.d.ts +16 -0
- package/node_modules/@comis/cli/dist/wizard/steps/11-daemon-start.js +330 -0
- package/node_modules/@comis/cli/dist/wizard/steps/12-finish.d.ts +14 -0
- package/node_modules/@comis/cli/dist/wizard/steps/12-finish.js +95 -0
- package/node_modules/@comis/cli/dist/wizard/theme.d.ts +93 -0
- package/node_modules/@comis/cli/dist/wizard/theme.js +170 -0
- package/node_modules/@comis/cli/dist/wizard/types.d.ts +172 -0
- package/node_modules/@comis/cli/dist/wizard/types.js +88 -0
- package/node_modules/@comis/cli/dist/wizard/validators/agent-name.d.ts +26 -0
- package/node_modules/@comis/cli/dist/wizard/validators/agent-name.js +62 -0
- package/node_modules/@comis/cli/dist/wizard/validators/api-key.d.ts +36 -0
- package/node_modules/@comis/cli/dist/wizard/validators/api-key.js +124 -0
- package/node_modules/@comis/cli/dist/wizard/validators/channel-creds.d.ts +34 -0
- package/node_modules/@comis/cli/dist/wizard/validators/channel-creds.js +164 -0
- package/node_modules/@comis/cli/dist/wizard/validators/network.d.ts +27 -0
- package/node_modules/@comis/cli/dist/wizard/validators/network.js +68 -0
- package/node_modules/@comis/cli/dist/wizard/validators/port.d.ts +23 -0
- package/node_modules/@comis/cli/dist/wizard/validators/port.js +63 -0
- package/node_modules/@comis/cli/package.json +51 -0
- package/node_modules/@comis/core/dist/approval/approval-gate.d.ts +63 -0
- package/node_modules/@comis/core/dist/approval/approval-gate.js +330 -0
- package/node_modules/@comis/core/dist/approval/approval-gate.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/approval/approval-gate.test.js +1003 -0
- package/node_modules/@comis/core/dist/approval/index.d.ts +4 -0
- package/node_modules/@comis/core/dist/approval/index.js +3 -0
- package/node_modules/@comis/core/dist/bootstrap.d.ts +55 -0
- package/node_modules/@comis/core/dist/bootstrap.js +81 -0
- package/node_modules/@comis/core/dist/bootstrap.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/bootstrap.test.js +150 -0
- package/node_modules/@comis/core/dist/config/backup.d.ts +51 -0
- package/node_modules/@comis/core/dist/config/backup.js +116 -0
- package/node_modules/@comis/core/dist/config/backup.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/backup.test.js +160 -0
- package/node_modules/@comis/core/dist/config/env-substitution.d.ts +59 -0
- package/node_modules/@comis/core/dist/config/env-substitution.js +262 -0
- package/node_modules/@comis/core/dist/config/env-substitution.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/env-substitution.test.js +259 -0
- package/node_modules/@comis/core/dist/config/field-metadata.d.ts +42 -0
- package/node_modules/@comis/core/dist/config/field-metadata.js +187 -0
- package/node_modules/@comis/core/dist/config/field-metadata.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/field-metadata.test.js +72 -0
- package/node_modules/@comis/core/dist/config/git-manager.d.ts +146 -0
- package/node_modules/@comis/core/dist/config/git-manager.js +466 -0
- package/node_modules/@comis/core/dist/config/git-manager.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/git-manager.test.js +1042 -0
- package/node_modules/@comis/core/dist/config/immutable-keys.d.ts +79 -0
- package/node_modules/@comis/core/dist/config/immutable-keys.js +139 -0
- package/node_modules/@comis/core/dist/config/immutable-keys.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/immutable-keys.test.js +283 -0
- package/node_modules/@comis/core/dist/config/include-resolver.d.ts +38 -0
- package/node_modules/@comis/core/dist/config/include-resolver.js +130 -0
- package/node_modules/@comis/core/dist/config/include-resolver.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/include-resolver.test.js +292 -0
- package/node_modules/@comis/core/dist/config/index.d.ts +76 -0
- package/node_modules/@comis/core/dist/config/index.js +70 -0
- package/node_modules/@comis/core/dist/config/layered.d.ts +30 -0
- package/node_modules/@comis/core/dist/config/layered.js +87 -0
- package/node_modules/@comis/core/dist/config/layered.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/layered.test.js +211 -0
- package/node_modules/@comis/core/dist/config/loader.d.ts +36 -0
- package/node_modules/@comis/core/dist/config/loader.js +110 -0
- package/node_modules/@comis/core/dist/config/loader.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/loader.test.js +300 -0
- package/node_modules/@comis/core/dist/config/migrate.d.ts +27 -0
- package/node_modules/@comis/core/dist/config/migrate.js +114 -0
- package/node_modules/@comis/core/dist/config/migrate.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/migrate.test.js +244 -0
- package/node_modules/@comis/core/dist/config/partial-validator.d.ts +49 -0
- package/node_modules/@comis/core/dist/config/partial-validator.js +77 -0
- package/node_modules/@comis/core/dist/config/partial-validator.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/partial-validator.test.js +98 -0
- package/node_modules/@comis/core/dist/config/schema-agent-model.d.ts +135 -0
- package/node_modules/@comis/core/dist/config/schema-agent-model.js +114 -0
- package/node_modules/@comis/core/dist/config/schema-agent-model.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-agent-model.test.js +279 -0
- package/node_modules/@comis/core/dist/config/schema-agent-session.d.ts +177 -0
- package/node_modules/@comis/core/dist/config/schema-agent-session.js +116 -0
- package/node_modules/@comis/core/dist/config/schema-agent-session.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-agent-session.test.js +242 -0
- package/node_modules/@comis/core/dist/config/schema-agent.d.ts +2373 -0
- package/node_modules/@comis/core/dist/config/schema-agent.js +732 -0
- package/node_modules/@comis/core/dist/config/schema-agent.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-agent.test.js +645 -0
- package/node_modules/@comis/core/dist/config/schema-approvals.d.ts +78 -0
- package/node_modules/@comis/core/dist/config/schema-approvals.js +49 -0
- package/node_modules/@comis/core/dist/config/schema-auto-reply-engine.d.ts +42 -0
- package/node_modules/@comis/core/dist/config/schema-auto-reply-engine.js +35 -0
- package/node_modules/@comis/core/dist/config/schema-background-tasks.d.ts +25 -0
- package/node_modules/@comis/core/dist/config/schema-background-tasks.js +25 -0
- package/node_modules/@comis/core/dist/config/schema-browser.d.ts +42 -0
- package/node_modules/@comis/core/dist/config/schema-browser.js +51 -0
- package/node_modules/@comis/core/dist/config/schema-channel.d.ts +1172 -0
- package/node_modules/@comis/core/dist/config/schema-channel.js +165 -0
- package/node_modules/@comis/core/dist/config/schema-channel.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-channel.test.js +341 -0
- package/node_modules/@comis/core/dist/config/schema-coalescer.d.ts +24 -0
- package/node_modules/@comis/core/dist/config/schema-coalescer.js +21 -0
- package/node_modules/@comis/core/dist/config/schema-coalescer.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-coalescer.test.js +51 -0
- package/node_modules/@comis/core/dist/config/schema-context-engine.d.ts +92 -0
- package/node_modules/@comis/core/dist/config/schema-context-engine.js +92 -0
- package/node_modules/@comis/core/dist/config/schema-context-engine.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-context-engine.test.js +797 -0
- package/node_modules/@comis/core/dist/config/schema-context-guard.d.ts +34 -0
- package/node_modules/@comis/core/dist/config/schema-context-guard.js +32 -0
- package/node_modules/@comis/core/dist/config/schema-context-guard.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-context-guard.test.js +111 -0
- package/node_modules/@comis/core/dist/config/schema-daemon.d.ts +140 -0
- package/node_modules/@comis/core/dist/config/schema-daemon.js +91 -0
- package/node_modules/@comis/core/dist/config/schema-daemon.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-daemon.test.js +107 -0
- package/node_modules/@comis/core/dist/config/schema-delivery-mirror.d.ts +27 -0
- package/node_modules/@comis/core/dist/config/schema-delivery-mirror.js +26 -0
- package/node_modules/@comis/core/dist/config/schema-delivery-queue.d.ts +31 -0
- package/node_modules/@comis/core/dist/config/schema-delivery-queue.js +30 -0
- package/node_modules/@comis/core/dist/config/schema-delivery-timing.d.ts +41 -0
- package/node_modules/@comis/core/dist/config/schema-delivery-timing.js +31 -0
- package/node_modules/@comis/core/dist/config/schema-delivery-timing.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-delivery-timing.test.js +51 -0
- package/node_modules/@comis/core/dist/config/schema-delivery.d.ts +97 -0
- package/node_modules/@comis/core/dist/config/schema-delivery.js +89 -0
- package/node_modules/@comis/core/dist/config/schema-documentation.d.ts +42 -0
- package/node_modules/@comis/core/dist/config/schema-documentation.js +36 -0
- package/node_modules/@comis/core/dist/config/schema-documentation.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-documentation.test.js +63 -0
- package/node_modules/@comis/core/dist/config/schema-embedding.d.ts +58 -0
- package/node_modules/@comis/core/dist/config/schema-embedding.js +61 -0
- package/node_modules/@comis/core/dist/config/schema-envelope.d.ts +35 -0
- package/node_modules/@comis/core/dist/config/schema-envelope.js +32 -0
- package/node_modules/@comis/core/dist/config/schema-gateway.d.ts +124 -0
- package/node_modules/@comis/core/dist/config/schema-gateway.js +85 -0
- package/node_modules/@comis/core/dist/config/schema-gateway.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-gateway.test.js +219 -0
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.d.ts +19 -0
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.js +19 -0
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.test.js +41 -0
- package/node_modules/@comis/core/dist/config/schema-integrations.d.ts +960 -0
- package/node_modules/@comis/core/dist/config/schema-integrations.js +369 -0
- package/node_modules/@comis/core/dist/config/schema-integrations.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-integrations.test.js +92 -0
- package/node_modules/@comis/core/dist/config/schema-lifecycle-reactions.d.ts +78 -0
- package/node_modules/@comis/core/dist/config/schema-lifecycle-reactions.js +49 -0
- package/node_modules/@comis/core/dist/config/schema-lifecycle-reactions.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-lifecycle-reactions.test.js +61 -0
- package/node_modules/@comis/core/dist/config/schema-memory-review.d.ts +38 -0
- package/node_modules/@comis/core/dist/config/schema-memory-review.js +38 -0
- package/node_modules/@comis/core/dist/config/schema-memory.d.ts +50 -0
- package/node_modules/@comis/core/dist/config/schema-memory.js +36 -0
- package/node_modules/@comis/core/dist/config/schema-messages.d.ts +29 -0
- package/node_modules/@comis/core/dist/config/schema-messages.js +28 -0
- package/node_modules/@comis/core/dist/config/schema-misc.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-misc.test.js +394 -0
- package/node_modules/@comis/core/dist/config/schema-models.d.ts +46 -0
- package/node_modules/@comis/core/dist/config/schema-models.js +36 -0
- package/node_modules/@comis/core/dist/config/schema-monitoring.d.ts +105 -0
- package/node_modules/@comis/core/dist/config/schema-monitoring.js +67 -0
- package/node_modules/@comis/core/dist/config/schema-notification.d.ts +25 -0
- package/node_modules/@comis/core/dist/config/schema-notification.js +25 -0
- package/node_modules/@comis/core/dist/config/schema-observability.d.ts +139 -0
- package/node_modules/@comis/core/dist/config/schema-observability.js +95 -0
- package/node_modules/@comis/core/dist/config/schema-observability.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-observability.test.js +76 -0
- package/node_modules/@comis/core/dist/config/schema-plugins.d.ts +37 -0
- package/node_modules/@comis/core/dist/config/schema-plugins.js +27 -0
- package/node_modules/@comis/core/dist/config/schema-providers.d.ts +241 -0
- package/node_modules/@comis/core/dist/config/schema-providers.js +88 -0
- package/node_modules/@comis/core/dist/config/schema-providers.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-providers.test.js +294 -0
- package/node_modules/@comis/core/dist/config/schema-queue.d.ts +248 -0
- package/node_modules/@comis/core/dist/config/schema-queue.js +145 -0
- package/node_modules/@comis/core/dist/config/schema-queue.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-queue.test.js +234 -0
- package/node_modules/@comis/core/dist/config/schema-response-prefix.d.ts +20 -0
- package/node_modules/@comis/core/dist/config/schema-response-prefix.js +17 -0
- package/node_modules/@comis/core/dist/config/schema-response-prefix.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-response-prefix.test.js +36 -0
- package/node_modules/@comis/core/dist/config/schema-retry.d.ts +25 -0
- package/node_modules/@comis/core/dist/config/schema-retry.js +25 -0
- package/node_modules/@comis/core/dist/config/schema-scheduler.d.ts +90 -0
- package/node_modules/@comis/core/dist/config/schema-scheduler.js +88 -0
- package/node_modules/@comis/core/dist/config/schema-secrets.d.ts +15 -0
- package/node_modules/@comis/core/dist/config/schema-secrets.js +14 -0
- package/node_modules/@comis/core/dist/config/schema-security.d.ts +159 -0
- package/node_modules/@comis/core/dist/config/schema-security.js +70 -0
- package/node_modules/@comis/core/dist/config/schema-security.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-security.test.js +54 -0
- package/node_modules/@comis/core/dist/config/schema-send-policy.d.ts +65 -0
- package/node_modules/@comis/core/dist/config/schema-send-policy.js +40 -0
- package/node_modules/@comis/core/dist/config/schema-sender-trust-display.d.ts +26 -0
- package/node_modules/@comis/core/dist/config/schema-sender-trust-display.js +22 -0
- package/node_modules/@comis/core/dist/config/schema-sender-trust-display.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-sender-trust-display.test.js +60 -0
- package/node_modules/@comis/core/dist/config/schema-serializer.d.ts +33 -0
- package/node_modules/@comis/core/dist/config/schema-serializer.js +97 -0
- package/node_modules/@comis/core/dist/config/schema-serializer.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-serializer.test.js +73 -0
- package/node_modules/@comis/core/dist/config/schema-skills.d.ts +134 -0
- package/node_modules/@comis/core/dist/config/schema-skills.js +122 -0
- package/node_modules/@comis/core/dist/config/schema-streaming.d.ts +286 -0
- package/node_modules/@comis/core/dist/config/schema-streaming.js +110 -0
- package/node_modules/@comis/core/dist/config/schema-telegram-file-guard.d.ts +19 -0
- package/node_modules/@comis/core/dist/config/schema-telegram-file-guard.js +19 -0
- package/node_modules/@comis/core/dist/config/schema-telegram-file-guard.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/config/schema-telegram-file-guard.test.js +39 -0
- package/node_modules/@comis/core/dist/config/schema-verbosity.d.ts +68 -0
- package/node_modules/@comis/core/dist/config/schema-verbosity.js +27 -0
- package/node_modules/@comis/core/dist/config/schema-webhooks.d.ts +131 -0
- package/node_modules/@comis/core/dist/config/schema-webhooks.js +72 -0
- package/node_modules/@comis/core/dist/config/schema.d.ts +2041 -0
- package/node_modules/@comis/core/dist/config/schema.js +115 -0
- package/node_modules/@comis/core/dist/config/types.d.ts +52 -0
- package/node_modules/@comis/core/dist/config/types.js +7 -0
- package/node_modules/@comis/core/dist/context/context.d.ts +78 -0
- package/node_modules/@comis/core/dist/context/context.js +82 -0
- package/node_modules/@comis/core/dist/context/context.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/context/context.test.js +276 -0
- package/node_modules/@comis/core/dist/context/index.d.ts +2 -0
- package/node_modules/@comis/core/dist/context/index.js +2 -0
- package/node_modules/@comis/core/dist/domain/agent-response.d.ts +55 -0
- package/node_modules/@comis/core/dist/domain/agent-response.js +46 -0
- package/node_modules/@comis/core/dist/domain/agent-response.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/agent-response.test.js +159 -0
- package/node_modules/@comis/core/dist/domain/approval-request.d.ts +98 -0
- package/node_modules/@comis/core/dist/domain/approval-request.js +83 -0
- package/node_modules/@comis/core/dist/domain/credential-mapping.d.ts +46 -0
- package/node_modules/@comis/core/dist/domain/credential-mapping.js +62 -0
- package/node_modules/@comis/core/dist/domain/credential-mapping.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/credential-mapping.test.js +135 -0
- package/node_modules/@comis/core/dist/domain/delivery-origin.d.ts +32 -0
- package/node_modules/@comis/core/dist/domain/delivery-origin.js +35 -0
- package/node_modules/@comis/core/dist/domain/delivery-origin.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/delivery-origin.test.js +68 -0
- package/node_modules/@comis/core/dist/domain/execution-graph.d.ts +260 -0
- package/node_modules/@comis/core/dist/domain/execution-graph.js +322 -0
- package/node_modules/@comis/core/dist/domain/execution-graph.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/execution-graph.test.js +441 -0
- package/node_modules/@comis/core/dist/domain/index.d.ts +31 -0
- package/node_modules/@comis/core/dist/domain/index.js +20 -0
- package/node_modules/@comis/core/dist/domain/memory-entry.d.ts +74 -0
- package/node_modules/@comis/core/dist/domain/memory-entry.js +56 -0
- package/node_modules/@comis/core/dist/domain/memory-entry.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/memory-entry.test.js +193 -0
- package/node_modules/@comis/core/dist/domain/model-compat.d.ts +61 -0
- package/node_modules/@comis/core/dist/domain/model-compat.js +47 -0
- package/node_modules/@comis/core/dist/domain/node-type-driver.d.ts +124 -0
- package/node_modules/@comis/core/dist/domain/node-type-driver.js +1 -0
- package/node_modules/@comis/core/dist/domain/normalized-message.d.ts +98 -0
- package/node_modules/@comis/core/dist/domain/normalized-message.js +62 -0
- package/node_modules/@comis/core/dist/domain/normalized-message.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/normalized-message.test.js +255 -0
- package/node_modules/@comis/core/dist/domain/poll-input.d.ts +46 -0
- package/node_modules/@comis/core/dist/domain/poll-input.js +67 -0
- package/node_modules/@comis/core/dist/domain/provider-capabilities.d.ts +69 -0
- package/node_modules/@comis/core/dist/domain/provider-capabilities.js +51 -0
- package/node_modules/@comis/core/dist/domain/rich-message.d.ts +85 -0
- package/node_modules/@comis/core/dist/domain/rich-message.js +83 -0
- package/node_modules/@comis/core/dist/domain/secret-ref.d.ts +54 -0
- package/node_modules/@comis/core/dist/domain/secret-ref.js +43 -0
- package/node_modules/@comis/core/dist/domain/session-key.d.ts +47 -0
- package/node_modules/@comis/core/dist/domain/session-key.js +120 -0
- package/node_modules/@comis/core/dist/domain/session-key.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/session-key.test.js +291 -0
- package/node_modules/@comis/core/dist/domain/subagent-context-config.d.ts +62 -0
- package/node_modules/@comis/core/dist/domain/subagent-context-config.js +58 -0
- package/node_modules/@comis/core/dist/domain/subagent-context-config.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/subagent-context-config.test.js +131 -0
- package/node_modules/@comis/core/dist/domain/subagent-context-types.d.ts +203 -0
- package/node_modules/@comis/core/dist/domain/subagent-context-types.js +57 -0
- package/node_modules/@comis/core/dist/domain/subagent-context-types.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/domain/subagent-context-types.test.js +182 -0
- package/node_modules/@comis/core/dist/event-bus/bus.d.ts +50 -0
- package/node_modules/@comis/core/dist/event-bus/bus.js +71 -0
- package/node_modules/@comis/core/dist/event-bus/bus.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/event-bus/bus.test.js +152 -0
- package/node_modules/@comis/core/dist/event-bus/events-agent.d.ts +387 -0
- package/node_modules/@comis/core/dist/event-bus/events-agent.js +1 -0
- package/node_modules/@comis/core/dist/event-bus/events-agent.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/event-bus/events-agent.test.js +409 -0
- package/node_modules/@comis/core/dist/event-bus/events-channel.d.ts +376 -0
- package/node_modules/@comis/core/dist/event-bus/events-channel.js +1 -0
- package/node_modules/@comis/core/dist/event-bus/events-channel.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/event-bus/events-channel.test.js +240 -0
- package/node_modules/@comis/core/dist/event-bus/events-infra.d.ts +437 -0
- package/node_modules/@comis/core/dist/event-bus/events-infra.js +1 -0
- package/node_modules/@comis/core/dist/event-bus/events-infra.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/event-bus/events-infra.test.js +416 -0
- package/node_modules/@comis/core/dist/event-bus/events-messaging.d.ts +298 -0
- package/node_modules/@comis/core/dist/event-bus/events-messaging.js +1 -0
- package/node_modules/@comis/core/dist/event-bus/events-messaging.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/event-bus/events-messaging.test.js +433 -0
- package/node_modules/@comis/core/dist/event-bus/events.d.ts +15 -0
- package/node_modules/@comis/core/dist/event-bus/events.js +1 -0
- package/node_modules/@comis/core/dist/event-bus/events.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/event-bus/events.test.js +93 -0
- package/node_modules/@comis/core/dist/event-bus/index.d.ts +7 -0
- package/node_modules/@comis/core/dist/event-bus/index.js +2 -0
- package/node_modules/@comis/core/dist/exports/bootstrap.d.ts +5 -0
- package/node_modules/@comis/core/dist/exports/bootstrap.js +8 -0
- package/node_modules/@comis/core/dist/exports/config.d.ts +2 -0
- package/node_modules/@comis/core/dist/exports/config.js +3 -0
- package/node_modules/@comis/core/dist/exports/domain.d.ts +2 -0
- package/node_modules/@comis/core/dist/exports/domain.js +33 -0
- package/node_modules/@comis/core/dist/exports/event-bus.d.ts +2 -0
- package/node_modules/@comis/core/dist/exports/event-bus.js +3 -0
- package/node_modules/@comis/core/dist/exports/hooks.d.ts +6 -0
- package/node_modules/@comis/core/dist/exports/hooks.js +7 -0
- package/node_modules/@comis/core/dist/exports/ports.d.ts +2 -0
- package/node_modules/@comis/core/dist/exports/ports.js +3 -0
- package/node_modules/@comis/core/dist/exports/security.d.ts +38 -0
- package/node_modules/@comis/core/dist/exports/security.js +45 -0
- package/node_modules/@comis/core/dist/hooks/hook-runner-global.d.ts +4 -0
- package/node_modules/@comis/core/dist/hooks/hook-runner-global.js +22 -0
- package/node_modules/@comis/core/dist/hooks/hook-runner-global.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/hooks/hook-runner-global.test.js +29 -0
- package/node_modules/@comis/core/dist/hooks/hook-runner.d.ts +52 -0
- package/node_modules/@comis/core/dist/hooks/hook-runner.js +204 -0
- package/node_modules/@comis/core/dist/hooks/hook-runner.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/hooks/hook-runner.test.js +490 -0
- package/node_modules/@comis/core/dist/hooks/hook-strategies.d.ts +29 -0
- package/node_modules/@comis/core/dist/hooks/hook-strategies.js +58 -0
- package/node_modules/@comis/core/dist/hooks/hook-strategies.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/hooks/hook-strategies.test.js +209 -0
- package/node_modules/@comis/core/dist/hooks/index.d.ts +6 -0
- package/node_modules/@comis/core/dist/hooks/index.js +6 -0
- package/node_modules/@comis/core/dist/hooks/integration.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/hooks/integration.test.js +235 -0
- package/node_modules/@comis/core/dist/hooks/plugin-registry.d.ts +49 -0
- package/node_modules/@comis/core/dist/hooks/plugin-registry.js +176 -0
- package/node_modules/@comis/core/dist/hooks/plugin-registry.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/hooks/plugin-registry.test.js +470 -0
- package/node_modules/@comis/core/dist/index.d.ts +7 -0
- package/node_modules/@comis/core/dist/index.js +12 -0
- package/node_modules/@comis/core/dist/load-env.d.ts +31 -0
- package/node_modules/@comis/core/dist/load-env.js +83 -0
- package/node_modules/@comis/core/dist/load-env.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/load-env.test.js +21 -0
- package/node_modules/@comis/core/dist/ports/channel-plugin.d.ts +104 -0
- package/node_modules/@comis/core/dist/ports/channel-plugin.js +59 -0
- package/node_modules/@comis/core/dist/ports/channel.d.ts +223 -0
- package/node_modules/@comis/core/dist/ports/channel.js +1 -0
- package/node_modules/@comis/core/dist/ports/credential-mapping.d.ts +61 -0
- package/node_modules/@comis/core/dist/ports/credential-mapping.js +1 -0
- package/node_modules/@comis/core/dist/ports/delivery-mirror.d.ts +87 -0
- package/node_modules/@comis/core/dist/ports/delivery-mirror.js +29 -0
- package/node_modules/@comis/core/dist/ports/delivery-queue.d.ts +114 -0
- package/node_modules/@comis/core/dist/ports/delivery-queue.js +33 -0
- package/node_modules/@comis/core/dist/ports/device-identity.d.ts +50 -0
- package/node_modules/@comis/core/dist/ports/device-identity.js +14 -0
- package/node_modules/@comis/core/dist/ports/embedding.d.ts +51 -0
- package/node_modules/@comis/core/dist/ports/embedding.js +1 -0
- package/node_modules/@comis/core/dist/ports/file-extraction-port.d.ts +82 -0
- package/node_modules/@comis/core/dist/ports/file-extraction-port.js +1 -0
- package/node_modules/@comis/core/dist/ports/hook-types.d.ts +218 -0
- package/node_modules/@comis/core/dist/ports/hook-types.js +1 -0
- package/node_modules/@comis/core/dist/ports/image-analysis-port.d.ts +27 -0
- package/node_modules/@comis/core/dist/ports/image-analysis-port.js +1 -0
- package/node_modules/@comis/core/dist/ports/index.d.ts +23 -0
- package/node_modules/@comis/core/dist/ports/index.js +5 -0
- package/node_modules/@comis/core/dist/ports/media-ports.d.ts +278 -0
- package/node_modules/@comis/core/dist/ports/media-ports.js +1 -0
- package/node_modules/@comis/core/dist/ports/media-resolver-port.d.ts +42 -0
- package/node_modules/@comis/core/dist/ports/media-resolver-port.js +1 -0
- package/node_modules/@comis/core/dist/ports/memory.d.ts +97 -0
- package/node_modules/@comis/core/dist/ports/memory.js +1 -0
- package/node_modules/@comis/core/dist/ports/output-guard.d.ts +22 -0
- package/node_modules/@comis/core/dist/ports/output-guard.js +1 -0
- package/node_modules/@comis/core/dist/ports/plugin.d.ts +87 -0
- package/node_modules/@comis/core/dist/ports/plugin.js +1 -0
- package/node_modules/@comis/core/dist/ports/provider.d.ts +44 -0
- package/node_modules/@comis/core/dist/ports/provider.js +1 -0
- package/node_modules/@comis/core/dist/ports/secret-store.d.ts +106 -0
- package/node_modules/@comis/core/dist/ports/secret-store.js +1 -0
- package/node_modules/@comis/core/dist/ports/skill.d.ts +92 -0
- package/node_modules/@comis/core/dist/ports/skill.js +1 -0
- package/node_modules/@comis/core/dist/ports/transcription-port.d.ts +39 -0
- package/node_modules/@comis/core/dist/ports/transcription-port.js +1 -0
- package/node_modules/@comis/core/dist/ports/tts-port.d.ts +37 -0
- package/node_modules/@comis/core/dist/ports/tts-port.js +1 -0
- package/node_modules/@comis/core/dist/ports/vision-port.d.ts +56 -0
- package/node_modules/@comis/core/dist/ports/vision-port.js +1 -0
- package/node_modules/@comis/core/dist/security/action-classifier.d.ts +64 -0
- package/node_modules/@comis/core/dist/security/action-classifier.js +320 -0
- package/node_modules/@comis/core/dist/security/action-classifier.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/action-classifier.test.js +298 -0
- package/node_modules/@comis/core/dist/security/audit-aggregator.d.ts +38 -0
- package/node_modules/@comis/core/dist/security/audit-aggregator.js +73 -0
- package/node_modules/@comis/core/dist/security/audit-aggregator.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/audit-aggregator.test.js +128 -0
- package/node_modules/@comis/core/dist/security/audit.d.ts +64 -0
- package/node_modules/@comis/core/dist/security/audit.js +56 -0
- package/node_modules/@comis/core/dist/security/audit.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/audit.test.js +154 -0
- package/node_modules/@comis/core/dist/security/canary-token.d.ts +18 -0
- package/node_modules/@comis/core/dist/security/canary-token.js +28 -0
- package/node_modules/@comis/core/dist/security/canary-token.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/canary-token.test.js +45 -0
- package/node_modules/@comis/core/dist/security/config-redaction.d.ts +19 -0
- package/node_modules/@comis/core/dist/security/config-redaction.js +42 -0
- package/node_modules/@comis/core/dist/security/config-redaction.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/config-redaction.test.js +107 -0
- package/node_modules/@comis/core/dist/security/external-content.d.ts +57 -0
- package/node_modules/@comis/core/dist/security/external-content.js +210 -0
- package/node_modules/@comis/core/dist/security/external-content.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/external-content.test.js +210 -0
- package/node_modules/@comis/core/dist/security/index.d.ts +38 -0
- package/node_modules/@comis/core/dist/security/index.js +66 -0
- package/node_modules/@comis/core/dist/security/injection-patterns.d.ts +9 -0
- package/node_modules/@comis/core/dist/security/injection-patterns.js +10 -0
- package/node_modules/@comis/core/dist/security/injection-patterns.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/injection-patterns.test.js +213 -0
- package/node_modules/@comis/core/dist/security/injection-rate-limiter.d.ts +43 -0
- package/node_modules/@comis/core/dist/security/injection-rate-limiter.js +108 -0
- package/node_modules/@comis/core/dist/security/injection-rate-limiter.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/injection-rate-limiter.test.js +194 -0
- package/node_modules/@comis/core/dist/security/input-guard.d.ts +46 -0
- package/node_modules/@comis/core/dist/security/input-guard.js +166 -0
- package/node_modules/@comis/core/dist/security/input-guard.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/input-guard.test.js +215 -0
- package/node_modules/@comis/core/dist/security/input-security-guard.d.ts +45 -0
- package/node_modules/@comis/core/dist/security/input-security-guard.js +166 -0
- package/node_modules/@comis/core/dist/security/input-security-guard.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/input-security-guard.test.js +215 -0
- package/node_modules/@comis/core/dist/security/input-validator.d.ts +37 -0
- package/node_modules/@comis/core/dist/security/input-validator.js +68 -0
- package/node_modules/@comis/core/dist/security/input-validator.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/input-validator.test.js +133 -0
- package/node_modules/@comis/core/dist/security/log-sanitizer.d.ts +21 -0
- package/node_modules/@comis/core/dist/security/log-sanitizer.js +83 -0
- package/node_modules/@comis/core/dist/security/log-sanitizer.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/log-sanitizer.test.js +260 -0
- package/node_modules/@comis/core/dist/security/memory-write-validator.d.ts +35 -0
- package/node_modules/@comis/core/dist/security/memory-write-validator.js +42 -0
- package/node_modules/@comis/core/dist/security/memory-write-validator.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/memory-write-validator.test.js +62 -0
- package/node_modules/@comis/core/dist/security/output-guard.d.ts +17 -0
- package/node_modules/@comis/core/dist/security/output-guard.js +94 -0
- package/node_modules/@comis/core/dist/security/output-guard.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/output-guard.test.js +397 -0
- package/node_modules/@comis/core/dist/security/patterns/content-scanner.d.ts +57 -0
- package/node_modules/@comis/core/dist/security/patterns/content-scanner.js +70 -0
- package/node_modules/@comis/core/dist/security/patterns/credential-log.d.ts +37 -0
- package/node_modules/@comis/core/dist/security/patterns/credential-log.js +52 -0
- package/node_modules/@comis/core/dist/security/patterns/dangerous-commands.d.ts +18 -0
- package/node_modules/@comis/core/dist/security/patterns/dangerous-commands.js +24 -0
- package/node_modules/@comis/core/dist/security/patterns/index.d.ts +8 -0
- package/node_modules/@comis/core/dist/security/patterns/index.js +9 -0
- package/node_modules/@comis/core/dist/security/patterns/invisible-chars.d.ts +85 -0
- package/node_modules/@comis/core/dist/security/patterns/invisible-chars.js +94 -0
- package/node_modules/@comis/core/dist/security/patterns/jailbreak.d.ts +45 -0
- package/node_modules/@comis/core/dist/security/patterns/jailbreak.js +67 -0
- package/node_modules/@comis/core/dist/security/patterns/prompt-extraction.d.ts +14 -0
- package/node_modules/@comis/core/dist/security/patterns/prompt-extraction.js +18 -0
- package/node_modules/@comis/core/dist/security/patterns/role-markers.d.ts +22 -0
- package/node_modules/@comis/core/dist/security/patterns/role-markers.js +30 -0
- package/node_modules/@comis/core/dist/security/patterns/secret-formats.d.ts +35 -0
- package/node_modules/@comis/core/dist/security/patterns/secret-formats.js +52 -0
- package/node_modules/@comis/core/dist/security/safe-path.d.ts +26 -0
- package/node_modules/@comis/core/dist/security/safe-path.js +97 -0
- package/node_modules/@comis/core/dist/security/safe-path.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/safe-path.test.js +95 -0
- package/node_modules/@comis/core/dist/security/scoped-secret-manager.d.ts +38 -0
- package/node_modules/@comis/core/dist/security/scoped-secret-manager.js +94 -0
- package/node_modules/@comis/core/dist/security/scoped-secret-manager.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/scoped-secret-manager.test.js +231 -0
- package/node_modules/@comis/core/dist/security/secret-access.d.ts +36 -0
- package/node_modules/@comis/core/dist/security/secret-access.js +53 -0
- package/node_modules/@comis/core/dist/security/secret-access.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/secret-access.test.js +41 -0
- package/node_modules/@comis/core/dist/security/secret-crypto.d.ts +52 -0
- package/node_modules/@comis/core/dist/security/secret-crypto.js +83 -0
- package/node_modules/@comis/core/dist/security/secret-crypto.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/secret-crypto.test.js +113 -0
- package/node_modules/@comis/core/dist/security/secret-manager.d.ts +77 -0
- package/node_modules/@comis/core/dist/security/secret-manager.js +154 -0
- package/node_modules/@comis/core/dist/security/secret-manager.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/secret-manager.test.js +394 -0
- package/node_modules/@comis/core/dist/security/secret-ref-resolver.d.ts +66 -0
- package/node_modules/@comis/core/dist/security/secret-ref-resolver.js +233 -0
- package/node_modules/@comis/core/dist/security/secret-ref-resolver.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/secret-ref-resolver.test.js +268 -0
- package/node_modules/@comis/core/dist/security/secrets-audit.d.ts +71 -0
- package/node_modules/@comis/core/dist/security/secrets-audit.js +226 -0
- package/node_modules/@comis/core/dist/security/secrets-audit.test.d.ts +10 -0
- package/node_modules/@comis/core/dist/security/secrets-audit.test.js +295 -0
- package/node_modules/@comis/core/dist/security/ssrf-guard.d.ts +53 -0
- package/node_modules/@comis/core/dist/security/ssrf-guard.js +106 -0
- package/node_modules/@comis/core/dist/security/ssrf-guard.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/ssrf-guard.test.js +127 -0
- package/node_modules/@comis/core/dist/security/token-generator.d.ts +21 -0
- package/node_modules/@comis/core/dist/security/token-generator.js +28 -0
- package/node_modules/@comis/core/dist/security/token-generator.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/security/token-generator.test.js +35 -0
- package/node_modules/@comis/core/dist/tool-metadata.d.ts +62 -0
- package/node_modules/@comis/core/dist/tool-metadata.js +85 -0
- package/node_modules/@comis/core/dist/tool-metadata.test.d.ts +1 -0
- package/node_modules/@comis/core/dist/tool-metadata.test.js +112 -0
- package/node_modules/@comis/core/package.json +44 -0
- package/node_modules/@comis/daemon/bundled-skills/skill-creator/SKILL.md +320 -0
- package/node_modules/@comis/daemon/bundled-skills/skill-creator/references/schema.md +101 -0
- package/node_modules/@comis/daemon/bundled-skills/skill-creator/scripts/init-skill.py +137 -0
- package/node_modules/@comis/daemon/bundled-skills/skill-creator/scripts/validate-skill.py +286 -0
- package/node_modules/@comis/daemon/dist/announcement-batcher.d.ts +58 -0
- package/node_modules/@comis/daemon/dist/announcement-batcher.js +229 -0
- package/node_modules/@comis/daemon/dist/announcement-dead-letter.d.ts +71 -0
- package/node_modules/@comis/daemon/dist/announcement-dead-letter.js +216 -0
- package/node_modules/@comis/daemon/dist/config/exec-git.d.ts +14 -0
- package/node_modules/@comis/daemon/dist/config/exec-git.js +30 -0
- package/node_modules/@comis/daemon/dist/config/last-known-good.d.ts +43 -0
- package/node_modules/@comis/daemon/dist/config/last-known-good.js +141 -0
- package/node_modules/@comis/daemon/dist/cross-session-sender.d.ts +56 -0
- package/node_modules/@comis/daemon/dist/cross-session-sender.js +144 -0
- package/node_modules/@comis/daemon/dist/daemon-types.d.ts +113 -0
- package/node_modules/@comis/daemon/dist/daemon-types.js +8 -0
- package/node_modules/@comis/daemon/dist/daemon.d.ts +37 -0
- package/node_modules/@comis/daemon/dist/daemon.js +1327 -0
- package/node_modules/@comis/daemon/dist/device/device-identity.d.ts +29 -0
- package/node_modules/@comis/daemon/dist/device/device-identity.js +95 -0
- package/node_modules/@comis/daemon/dist/device/device-pairing.d.ts +31 -0
- package/node_modules/@comis/daemon/dist/device/device-pairing.js +240 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/agent-driver.d.ts +8 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/agent-driver.js +41 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/approval-gate-driver.d.ts +10 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/approval-gate-driver.js +76 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/collaborate-driver.d.ts +9 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/collaborate-driver.js +87 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/debate-driver.d.ts +9 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/debate-driver.js +208 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/index.d.ts +7 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/index.js +8 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/map-reduce-driver.d.ts +10 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/map-reduce-driver.js +79 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/refine-driver.d.ts +9 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/refine-driver.js +67 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/vote-driver.d.ts +9 -0
- package/node_modules/@comis/daemon/dist/graph/drivers/vote-driver.js +66 -0
- package/node_modules/@comis/daemon/dist/graph/graph-cleanup.d.ts +18 -0
- package/node_modules/@comis/daemon/dist/graph/graph-cleanup.js +69 -0
- package/node_modules/@comis/daemon/dist/graph/graph-completion.d.ts +64 -0
- package/node_modules/@comis/daemon/dist/graph/graph-completion.js +478 -0
- package/node_modules/@comis/daemon/dist/graph/graph-concurrency.d.ts +54 -0
- package/node_modules/@comis/daemon/dist/graph/graph-concurrency.js +77 -0
- package/node_modules/@comis/daemon/dist/graph/graph-coordinator-state.d.ts +233 -0
- package/node_modules/@comis/daemon/dist/graph/graph-coordinator-state.js +9 -0
- package/node_modules/@comis/daemon/dist/graph/graph-coordinator.d.ts +44 -0
- package/node_modules/@comis/daemon/dist/graph/graph-coordinator.js +344 -0
- package/node_modules/@comis/daemon/dist/graph/graph-driver-handler.d.ts +62 -0
- package/node_modules/@comis/daemon/dist/graph/graph-driver-handler.js +611 -0
- package/node_modules/@comis/daemon/dist/graph/graph-node-lifecycle.d.ts +97 -0
- package/node_modules/@comis/daemon/dist/graph/graph-node-lifecycle.js +611 -0
- package/node_modules/@comis/daemon/dist/graph/graph-prewarm.d.ts +65 -0
- package/node_modules/@comis/daemon/dist/graph/graph-prewarm.js +95 -0
- package/node_modules/@comis/daemon/dist/graph/graph-state-machine.d.ts +77 -0
- package/node_modules/@comis/daemon/dist/graph/graph-state-machine.js +439 -0
- package/node_modules/@comis/daemon/dist/graph/graph-tool-superset.d.ts +33 -0
- package/node_modules/@comis/daemon/dist/graph/graph-tool-superset.js +74 -0
- package/node_modules/@comis/daemon/dist/graph/index.d.ts +7 -0
- package/node_modules/@comis/daemon/dist/graph/index.js +7 -0
- package/node_modules/@comis/daemon/dist/graph/node-type-registry.d.ts +18 -0
- package/node_modules/@comis/daemon/dist/graph/node-type-registry.js +45 -0
- package/node_modules/@comis/daemon/dist/graph/template-interpolation.d.ts +73 -0
- package/node_modules/@comis/daemon/dist/graph/template-interpolation.js +205 -0
- package/node_modules/@comis/daemon/dist/graph/user-variables.d.ts +45 -0
- package/node_modules/@comis/daemon/dist/graph/user-variables.js +68 -0
- package/node_modules/@comis/daemon/dist/health/index.d.ts +1 -0
- package/node_modules/@comis/daemon/dist/health/index.js +3 -0
- package/node_modules/@comis/daemon/dist/health/watchdog.d.ts +50 -0
- package/node_modules/@comis/daemon/dist/health/watchdog.js +84 -0
- package/node_modules/@comis/daemon/dist/index.d.ts +9 -0
- package/node_modules/@comis/daemon/dist/index.js +12 -0
- package/node_modules/@comis/daemon/dist/monitoring/disk-space-source.d.ts +14 -0
- package/node_modules/@comis/daemon/dist/monitoring/disk-space-source.js +71 -0
- package/node_modules/@comis/daemon/dist/monitoring/exec-helpers.d.ts +31 -0
- package/node_modules/@comis/daemon/dist/monitoring/exec-helpers.js +44 -0
- package/node_modules/@comis/daemon/dist/monitoring/git-watcher-source.d.ts +15 -0
- package/node_modules/@comis/daemon/dist/monitoring/git-watcher-source.js +104 -0
- package/node_modules/@comis/daemon/dist/monitoring/index.d.ts +5 -0
- package/node_modules/@comis/daemon/dist/monitoring/index.js +7 -0
- package/node_modules/@comis/daemon/dist/monitoring/security-update-source.d.ts +14 -0
- package/node_modules/@comis/daemon/dist/monitoring/security-update-source.js +141 -0
- package/node_modules/@comis/daemon/dist/monitoring/system-resources-source.d.ts +15 -0
- package/node_modules/@comis/daemon/dist/monitoring/system-resources-source.js +197 -0
- package/node_modules/@comis/daemon/dist/monitoring/systemd-service-source.d.ts +14 -0
- package/node_modules/@comis/daemon/dist/monitoring/systemd-service-source.js +115 -0
- package/node_modules/@comis/daemon/dist/notification/channel-resolver.d.ts +40 -0
- package/node_modules/@comis/daemon/dist/notification/channel-resolver.js +33 -0
- package/node_modules/@comis/daemon/dist/notification/notification-service.d.ts +48 -0
- package/node_modules/@comis/daemon/dist/notification/notification-service.js +150 -0
- package/node_modules/@comis/daemon/dist/notification/rate-limiter.d.ts +15 -0
- package/node_modules/@comis/daemon/dist/notification/rate-limiter.js +28 -0
- package/node_modules/@comis/daemon/dist/notification/session-tracker.d.ts +23 -0
- package/node_modules/@comis/daemon/dist/notification/session-tracker.js +40 -0
- package/node_modules/@comis/daemon/dist/observability/billing-estimator.d.ts +63 -0
- package/node_modules/@comis/daemon/dist/observability/billing-estimator.js +98 -0
- package/node_modules/@comis/daemon/dist/observability/channel-activity-tracker.d.ts +36 -0
- package/node_modules/@comis/daemon/dist/observability/channel-activity-tracker.js +97 -0
- package/node_modules/@comis/daemon/dist/observability/channel-health-logger.d.ts +25 -0
- package/node_modules/@comis/daemon/dist/observability/channel-health-logger.js +82 -0
- package/node_modules/@comis/daemon/dist/observability/context-pipeline-collector.d.ts +73 -0
- package/node_modules/@comis/daemon/dist/observability/context-pipeline-collector.js +132 -0
- package/node_modules/@comis/daemon/dist/observability/delivery-context.d.ts +37 -0
- package/node_modules/@comis/daemon/dist/observability/delivery-context.js +1 -0
- package/node_modules/@comis/daemon/dist/observability/delivery-queue-logger.d.ts +25 -0
- package/node_modules/@comis/daemon/dist/observability/delivery-queue-logger.js +99 -0
- package/node_modules/@comis/daemon/dist/observability/delivery-tracer.d.ts +59 -0
- package/node_modules/@comis/daemon/dist/observability/delivery-tracer.js +150 -0
- package/node_modules/@comis/daemon/dist/observability/diagnostic-collector.d.ts +46 -0
- package/node_modules/@comis/daemon/dist/observability/diagnostic-collector.js +129 -0
- package/node_modules/@comis/daemon/dist/observability/index.d.ts +30 -0
- package/node_modules/@comis/daemon/dist/observability/index.js +30 -0
- package/node_modules/@comis/daemon/dist/observability/latency-recorder.d.ts +54 -0
- package/node_modules/@comis/daemon/dist/observability/latency-recorder.js +85 -0
- package/node_modules/@comis/daemon/dist/observability/log-infra.d.ts +57 -0
- package/node_modules/@comis/daemon/dist/observability/log-infra.js +104 -0
- package/node_modules/@comis/daemon/dist/observability/log-level-manager.d.ts +23 -0
- package/node_modules/@comis/daemon/dist/observability/log-level-manager.js +34 -0
- package/node_modules/@comis/daemon/dist/observability/log-transport.d.ts +44 -0
- package/node_modules/@comis/daemon/dist/observability/log-transport.js +74 -0
- package/node_modules/@comis/daemon/dist/observability/obs-persistence-wiring.d.ts +82 -0
- package/node_modules/@comis/daemon/dist/observability/obs-persistence-wiring.js +213 -0
- package/node_modules/@comis/daemon/dist/observability/obs-write-buffer.d.ts +53 -0
- package/node_modules/@comis/daemon/dist/observability/obs-write-buffer.js +68 -0
- package/node_modules/@comis/daemon/dist/observability/token-tracker.d.ts +70 -0
- package/node_modules/@comis/daemon/dist/observability/token-tracker.js +120 -0
- package/node_modules/@comis/daemon/dist/observability/trace-logger.d.ts +17 -0
- package/node_modules/@comis/daemon/dist/observability/trace-logger.js +37 -0
- package/node_modules/@comis/daemon/dist/observability/types.d.ts +6 -0
- package/node_modules/@comis/daemon/dist/observability/types.js +1 -0
- package/node_modules/@comis/daemon/dist/process/graceful-shutdown.d.ts +50 -0
- package/node_modules/@comis/daemon/dist/process/graceful-shutdown.js +126 -0
- package/node_modules/@comis/daemon/dist/process/index.d.ts +2 -0
- package/node_modules/@comis/daemon/dist/process/index.js +4 -0
- package/node_modules/@comis/daemon/dist/process/process-monitor.d.ts +52 -0
- package/node_modules/@comis/daemon/dist/process/process-monitor.js +69 -0
- package/node_modules/@comis/daemon/dist/rpc/agent-handlers.d.ts +40 -0
- package/node_modules/@comis/daemon/dist/rpc/agent-handlers.js +293 -0
- package/node_modules/@comis/daemon/dist/rpc/approval-handlers.d.ts +18 -0
- package/node_modules/@comis/daemon/dist/rpc/approval-handlers.js +68 -0
- package/node_modules/@comis/daemon/dist/rpc/browser-handlers.d.ts +22 -0
- package/node_modules/@comis/daemon/dist/rpc/browser-handlers.js +118 -0
- package/node_modules/@comis/daemon/dist/rpc/channel-handlers.d.ts +34 -0
- package/node_modules/@comis/daemon/dist/rpc/channel-handlers.js +217 -0
- package/node_modules/@comis/daemon/dist/rpc/config-handlers.d.ts +95 -0
- package/node_modules/@comis/daemon/dist/rpc/config-handlers.js +855 -0
- package/node_modules/@comis/daemon/dist/rpc/context-handlers.d.ts +42 -0
- package/node_modules/@comis/daemon/dist/rpc/context-handlers.js +371 -0
- package/node_modules/@comis/daemon/dist/rpc/cron-handlers.d.ts +22 -0
- package/node_modules/@comis/daemon/dist/rpc/cron-handlers.js +204 -0
- package/node_modules/@comis/daemon/dist/rpc/daemon-handlers.d.ts +19 -0
- package/node_modules/@comis/daemon/dist/rpc/daemon-handlers.js +49 -0
- package/node_modules/@comis/daemon/dist/rpc/env-handlers.d.ts +26 -0
- package/node_modules/@comis/daemon/dist/rpc/env-handlers.js +289 -0
- package/node_modules/@comis/daemon/dist/rpc/graph-handlers.d.ts +84 -0
- package/node_modules/@comis/daemon/dist/rpc/graph-handlers.js +803 -0
- package/node_modules/@comis/daemon/dist/rpc/heartbeat-handlers.d.ts +30 -0
- package/node_modules/@comis/daemon/dist/rpc/heartbeat-handlers.js +195 -0
- package/node_modules/@comis/daemon/dist/rpc/image-handlers.d.ts +28 -0
- package/node_modules/@comis/daemon/dist/rpc/image-handlers.js +95 -0
- package/node_modules/@comis/daemon/dist/rpc/index.d.ts +24 -0
- package/node_modules/@comis/daemon/dist/rpc/index.js +23 -0
- package/node_modules/@comis/daemon/dist/rpc/mcp-handlers.d.ts +24 -0
- package/node_modules/@comis/daemon/dist/rpc/mcp-handlers.js +195 -0
- package/node_modules/@comis/daemon/dist/rpc/media-handlers.d.ts +59 -0
- package/node_modules/@comis/daemon/dist/rpc/media-handlers.js +480 -0
- package/node_modules/@comis/daemon/dist/rpc/memory-handlers.d.ts +36 -0
- package/node_modules/@comis/daemon/dist/rpc/memory-handlers.js +246 -0
- package/node_modules/@comis/daemon/dist/rpc/message-handlers.d.ts +40 -0
- package/node_modules/@comis/daemon/dist/rpc/message-handlers.js +296 -0
- package/node_modules/@comis/daemon/dist/rpc/model-handlers.d.ts +26 -0
- package/node_modules/@comis/daemon/dist/rpc/model-handlers.js +100 -0
- package/node_modules/@comis/daemon/dist/rpc/notification-handlers.d.ts +25 -0
- package/node_modules/@comis/daemon/dist/rpc/notification-handlers.js +56 -0
- package/node_modules/@comis/daemon/dist/rpc/obs-handlers.d.ts +86 -0
- package/node_modules/@comis/daemon/dist/rpc/obs-handlers.js +570 -0
- package/node_modules/@comis/daemon/dist/rpc/persist-to-config.d.ts +74 -0
- package/node_modules/@comis/daemon/dist/rpc/persist-to-config.js +204 -0
- package/node_modules/@comis/daemon/dist/rpc/rpc-dispatch.d.ts +200 -0
- package/node_modules/@comis/daemon/dist/rpc/rpc-dispatch.js +199 -0
- package/node_modules/@comis/daemon/dist/rpc/session-handlers.d.ts +73 -0
- package/node_modules/@comis/daemon/dist/rpc/session-handlers.js +828 -0
- package/node_modules/@comis/daemon/dist/rpc/skill-handlers.d.ts +34 -0
- package/node_modules/@comis/daemon/dist/rpc/skill-handlers.js +444 -0
- package/node_modules/@comis/daemon/dist/rpc/subagent-handlers.d.ts +25 -0
- package/node_modules/@comis/daemon/dist/rpc/subagent-handlers.js +80 -0
- package/node_modules/@comis/daemon/dist/rpc/token-handlers.d.ts +56 -0
- package/node_modules/@comis/daemon/dist/rpc/token-handlers.js +212 -0
- package/node_modules/@comis/daemon/dist/rpc/types.d.ts +2 -0
- package/node_modules/@comis/daemon/dist/rpc/types.js +1 -0
- package/node_modules/@comis/daemon/dist/rpc/workspace-handlers.d.ts +34 -0
- package/node_modules/@comis/daemon/dist/rpc/workspace-handlers.js +424 -0
- package/node_modules/@comis/daemon/dist/sub-agent-result-processor.d.ts +143 -0
- package/node_modules/@comis/daemon/dist/sub-agent-result-processor.js +493 -0
- package/node_modules/@comis/daemon/dist/sub-agent-runner.d.ts +321 -0
- package/node_modules/@comis/daemon/dist/sub-agent-runner.js +1224 -0
- package/node_modules/@comis/daemon/dist/wiring/daemon-context.d.ts +149 -0
- package/node_modules/@comis/daemon/dist/wiring/daemon-context.js +13 -0
- package/node_modules/@comis/daemon/dist/wiring/daemon-utils.d.ts +40 -0
- package/node_modules/@comis/daemon/dist/wiring/daemon-utils.js +109 -0
- package/node_modules/@comis/daemon/dist/wiring/index.d.ts +19 -0
- package/node_modules/@comis/daemon/dist/wiring/index.js +18 -0
- package/node_modules/@comis/daemon/dist/wiring/restart-continuation.d.ts +59 -0
- package/node_modules/@comis/daemon/dist/wiring/restart-continuation.js +113 -0
- package/node_modules/@comis/daemon/dist/wiring/seed-bundled-skills.d.ts +41 -0
- package/node_modules/@comis/daemon/dist/wiring/seed-bundled-skills.js +84 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.d.ts +182 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.js +455 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-background-tasks.d.ts +28 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-background-tasks.js +30 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-channels-adapters.d.ts +42 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-channels-adapters.js +296 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-channels-media.d.ts +54 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-channels-media.js +332 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.d.ts +161 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.js +731 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-cross-session.d.ts +108 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-cross-session.js +732 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery-mirror.d.ts +24 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery-mirror.js +88 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery-queue.d.ts +31 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery-queue.js +132 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.d.ts +48 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.js +225 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway-routes.d.ts +48 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway-routes.js +262 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway-rpc.d.ts +31 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway-rpc.js +234 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.d.ts +146 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.js +690 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-health.d.ts +59 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-health.js +138 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-heartbeat.d.ts +63 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-heartbeat.js +111 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-logging.d.ts +38 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-logging.js +78 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-mcp.d.ts +47 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-mcp.js +182 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-media.d.ts +48 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-media.js +193 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-memory.d.ts +56 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-memory.js +214 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-monitoring.d.ts +38 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-monitoring.js +100 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-notifications.d.ts +43 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-notifications.js +53 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-observability.d.ts +48 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-observability.js +106 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-rpc-bridge.d.ts +34 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-rpc-bridge.js +52 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-schedulers.d.ts +84 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-schedulers.js +327 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-shutdown.d.ts +135 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-shutdown.js +308 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-task-extraction.d.ts +41 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-task-extraction.js +86 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-tools.d.ts +104 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-tools.js +440 -0
- package/node_modules/@comis/daemon/dist/wiring/startup-dry-run.d.ts +41 -0
- package/node_modules/@comis/daemon/dist/wiring/startup-dry-run.js +88 -0
- package/node_modules/@comis/daemon/package.json +50 -0
- package/node_modules/@comis/gateway/dist/acp/acp-server.d.ts +74 -0
- package/node_modules/@comis/gateway/dist/acp/acp-server.js +122 -0
- package/node_modules/@comis/gateway/dist/acp/acp-session-map.d.ts +39 -0
- package/node_modules/@comis/gateway/dist/acp/acp-session-map.js +50 -0
- package/node_modules/@comis/gateway/dist/acp/index.d.ts +4 -0
- package/node_modules/@comis/gateway/dist/acp/index.js +4 -0
- package/node_modules/@comis/gateway/dist/auth/mtls-verifier.d.ts +24 -0
- package/node_modules/@comis/gateway/dist/auth/mtls-verifier.js +70 -0
- package/node_modules/@comis/gateway/dist/auth/token-auth.d.ts +54 -0
- package/node_modules/@comis/gateway/dist/auth/token-auth.js +56 -0
- package/node_modules/@comis/gateway/dist/discovery/index.d.ts +1 -0
- package/node_modules/@comis/gateway/dist/discovery/index.js +3 -0
- package/node_modules/@comis/gateway/dist/discovery/mdns-advertiser.d.ts +45 -0
- package/node_modules/@comis/gateway/dist/discovery/mdns-advertiser.js +63 -0
- package/node_modules/@comis/gateway/dist/index.d.ts +19 -0
- package/node_modules/@comis/gateway/dist/index.js +30 -0
- package/node_modules/@comis/gateway/dist/openai/index.d.ts +8 -0
- package/node_modules/@comis/gateway/dist/openai/index.js +6 -0
- package/node_modules/@comis/gateway/dist/openai/openai-completions.d.ts +60 -0
- package/node_modules/@comis/gateway/dist/openai/openai-completions.js +236 -0
- package/node_modules/@comis/gateway/dist/openai/openai-embeddings.d.ts +68 -0
- package/node_modules/@comis/gateway/dist/openai/openai-embeddings.js +90 -0
- package/node_modules/@comis/gateway/dist/openai/openai-models.d.ts +37 -0
- package/node_modules/@comis/gateway/dist/openai/openai-models.js +59 -0
- package/node_modules/@comis/gateway/dist/openai/openai-types.d.ts +115 -0
- package/node_modules/@comis/gateway/dist/openai/openai-types.js +84 -0
- package/node_modules/@comis/gateway/dist/rate-limit/rate-limiter.d.ts +40 -0
- package/node_modules/@comis/gateway/dist/rate-limit/rate-limiter.js +83 -0
- package/node_modules/@comis/gateway/dist/responses/index.d.ts +4 -0
- package/node_modules/@comis/gateway/dist/responses/index.js +4 -0
- package/node_modules/@comis/gateway/dist/responses/responses-endpoint.d.ts +57 -0
- package/node_modules/@comis/gateway/dist/responses/responses-endpoint.js +293 -0
- package/node_modules/@comis/gateway/dist/responses/responses-types.d.ts +148 -0
- package/node_modules/@comis/gateway/dist/responses/responses-types.js +51 -0
- package/node_modules/@comis/gateway/dist/rpc/method-router.d.ts +77 -0
- package/node_modules/@comis/gateway/dist/rpc/method-router.js +223 -0
- package/node_modules/@comis/gateway/dist/rpc/rpc-adapters.d.ts +120 -0
- package/node_modules/@comis/gateway/dist/rpc/rpc-adapters.js +155 -0
- package/node_modules/@comis/gateway/dist/rpc/ws-handler.d.ts +121 -0
- package/node_modules/@comis/gateway/dist/rpc/ws-handler.js +313 -0
- package/node_modules/@comis/gateway/dist/server/hono-server.d.ts +90 -0
- package/node_modules/@comis/gateway/dist/server/hono-server.js +250 -0
- package/node_modules/@comis/gateway/dist/web/index.d.ts +7 -0
- package/node_modules/@comis/gateway/dist/web/index.js +6 -0
- package/node_modules/@comis/gateway/dist/web/media-routes.d.ts +30 -0
- package/node_modules/@comis/gateway/dist/web/media-routes.js +164 -0
- package/node_modules/@comis/gateway/dist/web/rest-api.d.ts +83 -0
- package/node_modules/@comis/gateway/dist/web/rest-api.js +300 -0
- package/node_modules/@comis/gateway/dist/web/sse-endpoint.d.ts +32 -0
- package/node_modules/@comis/gateway/dist/web/sse-endpoint.js +181 -0
- package/node_modules/@comis/gateway/dist/web/static-middleware.d.ts +13 -0
- package/node_modules/@comis/gateway/dist/web/static-middleware.js +59 -0
- package/node_modules/@comis/gateway/dist/webhook/hmac-verifier.d.ts +61 -0
- package/node_modules/@comis/gateway/dist/webhook/hmac-verifier.js +69 -0
- package/node_modules/@comis/gateway/dist/webhook/webhook-endpoint.d.ts +115 -0
- package/node_modules/@comis/gateway/dist/webhook/webhook-endpoint.js +186 -0
- package/node_modules/@comis/gateway/dist/webhook/webhook-mapping.d.ts +69 -0
- package/node_modules/@comis/gateway/dist/webhook/webhook-mapping.js +149 -0
- package/node_modules/@comis/gateway/dist/webhook/webhook-presets.d.ts +27 -0
- package/node_modules/@comis/gateway/dist/webhook/webhook-presets.js +57 -0
- package/node_modules/@comis/gateway/package.json +45 -0
- package/node_modules/@comis/infra/dist/index.d.ts +4 -0
- package/node_modules/@comis/infra/dist/index.js +5 -0
- package/node_modules/@comis/infra/dist/logging/index.d.ts +4 -0
- package/node_modules/@comis/infra/dist/logging/index.js +4 -0
- package/node_modules/@comis/infra/dist/logging/log-fields.d.ts +164 -0
- package/node_modules/@comis/infra/dist/logging/log-fields.js +19 -0
- package/node_modules/@comis/infra/dist/logging/logger.d.ts +39 -0
- package/node_modules/@comis/infra/dist/logging/logger.js +152 -0
- package/node_modules/@comis/infra/package.json +43 -0
- package/node_modules/@comis/memory/dist/compaction.d.ts +85 -0
- package/node_modules/@comis/memory/dist/compaction.js +181 -0
- package/node_modules/@comis/memory/dist/compaction.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/compaction.test.js +298 -0
- package/node_modules/@comis/memory/dist/context-schema.d.ts +24 -0
- package/node_modules/@comis/memory/dist/context-schema.js +161 -0
- package/node_modules/@comis/memory/dist/context-schema.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/context-schema.test.js +246 -0
- package/node_modules/@comis/memory/dist/context-store.d.ts +139 -0
- package/node_modules/@comis/memory/dist/context-store.js +450 -0
- package/node_modules/@comis/memory/dist/context-store.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/context-store.test.js +708 -0
- package/node_modules/@comis/memory/dist/credential-mapping-schema.d.ts +25 -0
- package/node_modules/@comis/memory/dist/credential-mapping-schema.js +40 -0
- package/node_modules/@comis/memory/dist/credential-mapping-schema.test.d.ts +7 -0
- package/node_modules/@comis/memory/dist/credential-mapping-schema.test.js +73 -0
- package/node_modules/@comis/memory/dist/credential-mapping-store.d.ts +22 -0
- package/node_modules/@comis/memory/dist/credential-mapping-store.js +98 -0
- package/node_modules/@comis/memory/dist/credential-mapping-store.test.d.ts +8 -0
- package/node_modules/@comis/memory/dist/credential-mapping-store.test.js +340 -0
- package/node_modules/@comis/memory/dist/delivery-mirror-adapter.d.ts +21 -0
- package/node_modules/@comis/memory/dist/delivery-mirror-adapter.js +112 -0
- package/node_modules/@comis/memory/dist/delivery-mirror-adapter.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/delivery-mirror-adapter.test.js +165 -0
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.d.ts +21 -0
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.js +197 -0
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.test.js +263 -0
- package/node_modules/@comis/memory/dist/embedding-batch-indexer.d.ts +50 -0
- package/node_modules/@comis/memory/dist/embedding-batch-indexer.js +104 -0
- package/node_modules/@comis/memory/dist/embedding-batch-indexer.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/embedding-batch-indexer.test.js +202 -0
- package/node_modules/@comis/memory/dist/embedding-cache-lru.d.ts +36 -0
- package/node_modules/@comis/memory/dist/embedding-cache-lru.js +100 -0
- package/node_modules/@comis/memory/dist/embedding-cache-lru.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/embedding-cache-lru.test.js +241 -0
- package/node_modules/@comis/memory/dist/embedding-cache-sqlite.d.ts +36 -0
- package/node_modules/@comis/memory/dist/embedding-cache-sqlite.js +247 -0
- package/node_modules/@comis/memory/dist/embedding-cache-sqlite.test.d.ts +8 -0
- package/node_modules/@comis/memory/dist/embedding-cache-sqlite.test.js +678 -0
- package/node_modules/@comis/memory/dist/embedding-cache.d.ts +36 -0
- package/node_modules/@comis/memory/dist/embedding-cache.js +94 -0
- package/node_modules/@comis/memory/dist/embedding-cache.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/embedding-cache.test.js +213 -0
- package/node_modules/@comis/memory/dist/embedding-fingerprint.d.ts +35 -0
- package/node_modules/@comis/memory/dist/embedding-fingerprint.js +75 -0
- package/node_modules/@comis/memory/dist/embedding-fingerprint.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/embedding-fingerprint.test.js +87 -0
- package/node_modules/@comis/memory/dist/embedding-hash.d.ts +9 -0
- package/node_modules/@comis/memory/dist/embedding-hash.js +14 -0
- package/node_modules/@comis/memory/dist/embedding-hash.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/embedding-hash.test.js +31 -0
- package/node_modules/@comis/memory/dist/embedding-integration.test.d.ts +8 -0
- package/node_modules/@comis/memory/dist/embedding-integration.test.js +232 -0
- package/node_modules/@comis/memory/dist/embedding-provider-factory.d.ts +40 -0
- package/node_modules/@comis/memory/dist/embedding-provider-factory.js +59 -0
- package/node_modules/@comis/memory/dist/embedding-provider-factory.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/embedding-provider-factory.test.js +176 -0
- package/node_modules/@comis/memory/dist/embedding-provider-local.d.ts +32 -0
- package/node_modules/@comis/memory/dist/embedding-provider-local.js +83 -0
- package/node_modules/@comis/memory/dist/embedding-provider-local.test.d.ts +8 -0
- package/node_modules/@comis/memory/dist/embedding-provider-local.test.js +76 -0
- package/node_modules/@comis/memory/dist/embedding-provider-openai.d.ts +29 -0
- package/node_modules/@comis/memory/dist/embedding-provider-openai.js +60 -0
- package/node_modules/@comis/memory/dist/embedding-provider-openai.test.d.ts +8 -0
- package/node_modules/@comis/memory/dist/embedding-provider-openai.test.js +100 -0
- package/node_modules/@comis/memory/dist/embedding-queue.d.ts +48 -0
- package/node_modules/@comis/memory/dist/embedding-queue.js +66 -0
- package/node_modules/@comis/memory/dist/embedding-queue.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/embedding-queue.test.js +236 -0
- package/node_modules/@comis/memory/dist/hybrid-search.d.ts +104 -0
- package/node_modules/@comis/memory/dist/hybrid-search.js +255 -0
- package/node_modules/@comis/memory/dist/hybrid-search.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/hybrid-search.test.js +476 -0
- package/node_modules/@comis/memory/dist/identity-link-store.d.ts +45 -0
- package/node_modules/@comis/memory/dist/identity-link-store.js +63 -0
- package/node_modules/@comis/memory/dist/identity-link-store.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/identity-link-store.test.js +88 -0
- package/node_modules/@comis/memory/dist/index.d.ts +36 -0
- package/node_modules/@comis/memory/dist/index.js +44 -0
- package/node_modules/@comis/memory/dist/memory-api.d.ts +85 -0
- package/node_modules/@comis/memory/dist/memory-api.js +225 -0
- package/node_modules/@comis/memory/dist/memory-api.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/memory-api.test.js +495 -0
- package/node_modules/@comis/memory/dist/memory-concurrency.test.d.ts +20 -0
- package/node_modules/@comis/memory/dist/memory-concurrency.test.js +222 -0
- package/node_modules/@comis/memory/dist/named-graph-schema.d.ts +23 -0
- package/node_modules/@comis/memory/dist/named-graph-schema.js +42 -0
- package/node_modules/@comis/memory/dist/named-graph-store.d.ts +65 -0
- package/node_modules/@comis/memory/dist/named-graph-store.js +111 -0
- package/node_modules/@comis/memory/dist/named-graph-store.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/named-graph-store.test.js +227 -0
- package/node_modules/@comis/memory/dist/observability-store.d.ts +184 -0
- package/node_modules/@comis/memory/dist/observability-store.js +387 -0
- package/node_modules/@comis/memory/dist/observability-store.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/observability-store.test.js +704 -0
- package/node_modules/@comis/memory/dist/row-mapper.d.ts +70 -0
- package/node_modules/@comis/memory/dist/row-mapper.js +159 -0
- package/node_modules/@comis/memory/dist/row-mapper.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/row-mapper.test.js +409 -0
- package/node_modules/@comis/memory/dist/schema.d.ts +31 -0
- package/node_modules/@comis/memory/dist/schema.js +358 -0
- package/node_modules/@comis/memory/dist/schema.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/schema.test.js +240 -0
- package/node_modules/@comis/memory/dist/secret-store-schema.d.ts +43 -0
- package/node_modules/@comis/memory/dist/secret-store-schema.js +92 -0
- package/node_modules/@comis/memory/dist/secret-store-schema.test.d.ts +7 -0
- package/node_modules/@comis/memory/dist/secret-store-schema.test.js +90 -0
- package/node_modules/@comis/memory/dist/session-store.d.ts +93 -0
- package/node_modules/@comis/memory/dist/session-store.js +131 -0
- package/node_modules/@comis/memory/dist/session-store.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/session-store.test.js +262 -0
- package/node_modules/@comis/memory/dist/setup-secrets.d.ts +35 -0
- package/node_modules/@comis/memory/dist/setup-secrets.js +45 -0
- package/node_modules/@comis/memory/dist/setup-secrets.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/setup-secrets.test.js +140 -0
- package/node_modules/@comis/memory/dist/sqlite-adapter-base.d.ts +39 -0
- package/node_modules/@comis/memory/dist/sqlite-adapter-base.js +72 -0
- package/node_modules/@comis/memory/dist/sqlite-memory-adapter.d.ts +52 -0
- package/node_modules/@comis/memory/dist/sqlite-memory-adapter.js +378 -0
- package/node_modules/@comis/memory/dist/sqlite-memory-adapter.test.d.ts +1 -0
- package/node_modules/@comis/memory/dist/sqlite-memory-adapter.test.js +888 -0
- package/node_modules/@comis/memory/dist/sqlite-secret-store.d.ts +32 -0
- package/node_modules/@comis/memory/dist/sqlite-secret-store.js +153 -0
- package/node_modules/@comis/memory/dist/sqlite-secret-store.test.d.ts +8 -0
- package/node_modules/@comis/memory/dist/sqlite-secret-store.test.js +245 -0
- package/node_modules/@comis/memory/dist/types.d.ts +192 -0
- package/node_modules/@comis/memory/dist/types.js +8 -0
- package/node_modules/@comis/memory/package.json +45 -0
- package/node_modules/@comis/scheduler/dist/config/scheduler-config.d.ts +9 -0
- package/node_modules/@comis/scheduler/dist/config/scheduler-config.js +9 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-expression.d.ts +12 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-expression.js +57 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-scheduler.d.ts +47 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-scheduler.js +214 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-store.d.ts +33 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-store.js +155 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-types.d.ts +161 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-types.js +113 -0
- package/node_modules/@comis/scheduler/dist/cron/index.d.ts +6 -0
- package/node_modules/@comis/scheduler/dist/cron/index.js +8 -0
- package/node_modules/@comis/scheduler/dist/execution/execution-lock.d.ts +32 -0
- package/node_modules/@comis/scheduler/dist/execution/execution-lock.js +86 -0
- package/node_modules/@comis/scheduler/dist/execution/execution-tracker.d.ts +68 -0
- package/node_modules/@comis/scheduler/dist/execution/execution-tracker.js +124 -0
- package/node_modules/@comis/scheduler/dist/execution/index.d.ts +2 -0
- package/node_modules/@comis/scheduler/dist/execution/index.js +4 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/agent-heartbeat-source.d.ts +117 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/agent-heartbeat-source.js +226 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/cron-delivery-policy.d.ts +28 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/cron-delivery-policy.js +33 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/cron-event-prompt.d.ts +21 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/cron-event-prompt.js +25 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/delivery-bridge.d.ts +61 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/delivery-bridge.js +110 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/duplicate-detector.d.ts +31 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/duplicate-detector.js +56 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/file-gate.d.ts +22 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/file-gate.js +29 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/heartbeat-config.d.ts +27 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/heartbeat-config.js +19 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/heartbeat-runner.d.ts +75 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/heartbeat-runner.js +136 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/heartbeat-source.d.ts +34 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/heartbeat-source.js +9 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/index.d.ts +32 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/index.js +34 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/per-agent-heartbeat-runner.d.ts +52 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/per-agent-heartbeat-runner.js +227 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/prompt-builder.d.ts +43 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/prompt-builder.js +92 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/quiet-hours.d.ts +41 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/quiet-hours.js +75 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/relevance-filter.d.ts +49 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/relevance-filter.js +55 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/resilience-tracker.d.ts +53 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/resilience-tracker.js +81 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/response-cache.d.ts +42 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/response-cache.js +61 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/response-processor.d.ts +74 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/response-processor.js +120 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/wake-coalescer.d.ts +21 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/wake-coalescer.js +135 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/wake-types.d.ts +44 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/wake-types.js +22 -0
- package/node_modules/@comis/scheduler/dist/index.d.ts +43 -0
- package/node_modules/@comis/scheduler/dist/index.js +41 -0
- package/node_modules/@comis/scheduler/dist/shared-types.d.ts +12 -0
- package/node_modules/@comis/scheduler/dist/shared-types.js +1 -0
- package/node_modules/@comis/scheduler/dist/system-events/index.d.ts +4 -0
- package/node_modules/@comis/scheduler/dist/system-events/index.js +6 -0
- package/node_modules/@comis/scheduler/dist/system-events/system-event-queue.d.ts +33 -0
- package/node_modules/@comis/scheduler/dist/system-events/system-event-queue.js +63 -0
- package/node_modules/@comis/scheduler/dist/system-events/system-event-types.d.ts +14 -0
- package/node_modules/@comis/scheduler/dist/system-events/system-event-types.js +14 -0
- package/node_modules/@comis/scheduler/dist/tasks/index.d.ts +8 -0
- package/node_modules/@comis/scheduler/dist/tasks/index.js +6 -0
- package/node_modules/@comis/scheduler/dist/tasks/task-extractor.d.ts +60 -0
- package/node_modules/@comis/scheduler/dist/tasks/task-extractor.js +90 -0
- package/node_modules/@comis/scheduler/dist/tasks/task-priority.d.ts +38 -0
- package/node_modules/@comis/scheduler/dist/tasks/task-priority.js +65 -0
- package/node_modules/@comis/scheduler/dist/tasks/task-store.d.ts +30 -0
- package/node_modules/@comis/scheduler/dist/tasks/task-store.js +73 -0
- package/node_modules/@comis/scheduler/dist/tasks/task-types.d.ts +92 -0
- package/node_modules/@comis/scheduler/dist/tasks/task-types.js +50 -0
- package/node_modules/@comis/scheduler/package.json +43 -0
- package/node_modules/@comis/shared/dist/abort.d.ts +16 -0
- package/node_modules/@comis/shared/dist/abort.js +24 -0
- package/node_modules/@comis/shared/dist/abort.test.d.ts +1 -0
- package/node_modules/@comis/shared/dist/abort.test.js +71 -0
- package/node_modules/@comis/shared/dist/index.d.ts +7 -0
- package/node_modules/@comis/shared/dist/index.js +7 -0
- package/node_modules/@comis/shared/dist/result.d.ts +38 -0
- package/node_modules/@comis/shared/dist/result.js +52 -0
- package/node_modules/@comis/shared/dist/result.test.d.ts +1 -0
- package/node_modules/@comis/shared/dist/result.test.js +178 -0
- package/node_modules/@comis/shared/dist/suppress-error.d.ts +14 -0
- package/node_modules/@comis/shared/dist/suppress-error.js +25 -0
- package/node_modules/@comis/shared/dist/suppress-error.test.d.ts +1 -0
- package/node_modules/@comis/shared/dist/suppress-error.test.js +50 -0
- package/node_modules/@comis/shared/dist/timeout.d.ts +31 -0
- package/node_modules/@comis/shared/dist/timeout.js +50 -0
- package/node_modules/@comis/shared/dist/timeout.test.d.ts +1 -0
- package/node_modules/@comis/shared/dist/timeout.test.js +75 -0
- package/node_modules/@comis/shared/dist/ttl-cache.d.ts +41 -0
- package/node_modules/@comis/shared/dist/ttl-cache.js +73 -0
- package/node_modules/@comis/shared/dist/ttl-cache.test.d.ts +1 -0
- package/node_modules/@comis/shared/dist/ttl-cache.test.js +81 -0
- package/node_modules/@comis/shared/package.json +43 -0
- package/node_modules/@comis/skills/dist/audit/skill-audit.d.ts +36 -0
- package/node_modules/@comis/skills/dist/audit/skill-audit.js +72 -0
- package/node_modules/@comis/skills/dist/bridge/credential-injector.d.ts +90 -0
- package/node_modules/@comis/skills/dist/bridge/credential-injector.js +235 -0
- package/node_modules/@comis/skills/dist/bridge/json-truncate.d.ts +33 -0
- package/node_modules/@comis/skills/dist/bridge/json-truncate.js +185 -0
- package/node_modules/@comis/skills/dist/bridge/mcp-tool-bridge.d.ts +81 -0
- package/node_modules/@comis/skills/dist/bridge/mcp-tool-bridge.js +260 -0
- package/node_modules/@comis/skills/dist/bridge/tool-audit.d.ts +25 -0
- package/node_modules/@comis/skills/dist/bridge/tool-audit.js +78 -0
- package/node_modules/@comis/skills/dist/bridge/tool-bridge.d.ts +91 -0
- package/node_modules/@comis/skills/dist/bridge/tool-bridge.js +136 -0
- package/node_modules/@comis/skills/dist/bridge/tool-definition-adapter.d.ts +33 -0
- package/node_modules/@comis/skills/dist/bridge/tool-definition-adapter.js +56 -0
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-enforcement.d.ts +45 -0
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-enforcement.js +101 -0
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-registry.d.ts +13 -0
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-registry.js +350 -0
- package/node_modules/@comis/skills/dist/bridge/tool-output-schemas.d.ts +17 -0
- package/node_modules/@comis/skills/dist/bridge/tool-output-schemas.js +125 -0
- package/node_modules/@comis/skills/dist/bridge/tool-parallelism-metadata.d.ts +14 -0
- package/node_modules/@comis/skills/dist/bridge/tool-parallelism-metadata.js +92 -0
- package/node_modules/@comis/skills/dist/bridge/tool-result-caps.d.ts +14 -0
- package/node_modules/@comis/skills/dist/bridge/tool-result-caps.js +36 -0
- package/node_modules/@comis/skills/dist/bridge/tool-search-hints.d.ts +15 -0
- package/node_modules/@comis/skills/dist/bridge/tool-search-hints.js +68 -0
- package/node_modules/@comis/skills/dist/bridge/tool-validators.d.ts +11 -0
- package/node_modules/@comis/skills/dist/bridge/tool-validators.js +105 -0
- package/node_modules/@comis/skills/dist/browser/browser-service.d.ts +105 -0
- package/node_modules/@comis/skills/dist/browser/browser-service.js +192 -0
- package/node_modules/@comis/skills/dist/browser/cdp.d.ts +60 -0
- package/node_modules/@comis/skills/dist/browser/cdp.js +91 -0
- package/node_modules/@comis/skills/dist/browser/chrome-detection.d.ts +45 -0
- package/node_modules/@comis/skills/dist/browser/chrome-detection.js +256 -0
- package/node_modules/@comis/skills/dist/browser/config.d.ts +45 -0
- package/node_modules/@comis/skills/dist/browser/config.js +49 -0
- package/node_modules/@comis/skills/dist/browser/constants.d.ts +30 -0
- package/node_modules/@comis/skills/dist/browser/constants.js +31 -0
- package/node_modules/@comis/skills/dist/browser/downloads.d.ts +63 -0
- package/node_modules/@comis/skills/dist/browser/downloads.js +135 -0
- package/node_modules/@comis/skills/dist/browser/index.d.ts +24 -0
- package/node_modules/@comis/skills/dist/browser/index.js +15 -0
- package/node_modules/@comis/skills/dist/browser/playwright-actions.d.ts +78 -0
- package/node_modules/@comis/skills/dist/browser/playwright-actions.js +232 -0
- package/node_modules/@comis/skills/dist/browser/playwright-session.d.ts +120 -0
- package/node_modules/@comis/skills/dist/browser/playwright-session.js +341 -0
- package/node_modules/@comis/skills/dist/browser/playwright-snapshots.d.ts +61 -0
- package/node_modules/@comis/skills/dist/browser/playwright-snapshots.js +287 -0
- package/node_modules/@comis/skills/dist/browser/profile-decoration.d.ts +30 -0
- package/node_modules/@comis/skills/dist/browser/profile-decoration.js +63 -0
- package/node_modules/@comis/skills/dist/browser/profiles-service.d.ts +51 -0
- package/node_modules/@comis/skills/dist/browser/profiles-service.js +137 -0
- package/node_modules/@comis/skills/dist/browser/profiles.d.ts +42 -0
- package/node_modules/@comis/skills/dist/browser/profiles.js +70 -0
- package/node_modules/@comis/skills/dist/browser/screenshot-normalizer.d.ts +63 -0
- package/node_modules/@comis/skills/dist/browser/screenshot-normalizer.js +124 -0
- package/node_modules/@comis/skills/dist/browser/screenshots.d.ts +51 -0
- package/node_modules/@comis/skills/dist/browser/screenshots.js +65 -0
- package/node_modules/@comis/skills/dist/browser/smart-waits.d.ts +44 -0
- package/node_modules/@comis/skills/dist/browser/smart-waits.js +74 -0
- package/node_modules/@comis/skills/dist/browser/viewport.d.ts +45 -0
- package/node_modules/@comis/skills/dist/browser/viewport.js +73 -0
- package/node_modules/@comis/skills/dist/builtin/exec-security.d.ts +204 -0
- package/node_modules/@comis/skills/dist/builtin/exec-security.js +988 -0
- package/node_modules/@comis/skills/dist/builtin/exec-tool.d.ts +83 -0
- package/node_modules/@comis/skills/dist/builtin/exec-tool.js +886 -0
- package/node_modules/@comis/skills/dist/builtin/file/apply-patch-parser.d.ts +49 -0
- package/node_modules/@comis/skills/dist/builtin/file/apply-patch-parser.js +232 -0
- package/node_modules/@comis/skills/dist/builtin/file/apply-patch-similarity.d.ts +25 -0
- package/node_modules/@comis/skills/dist/builtin/file/apply-patch-similarity.js +94 -0
- package/node_modules/@comis/skills/dist/builtin/file/apply-patch-tool.d.ts +16 -0
- package/node_modules/@comis/skills/dist/builtin/file/apply-patch-tool.js +418 -0
- package/node_modules/@comis/skills/dist/builtin/file/file-state-tracker.d.ts +102 -0
- package/node_modules/@comis/skills/dist/builtin/file/file-state-tracker.js +138 -0
- package/node_modules/@comis/skills/dist/builtin/file/file-tools.d.ts +31 -0
- package/node_modules/@comis/skills/dist/builtin/file/file-tools.js +67 -0
- package/node_modules/@comis/skills/dist/builtin/file/find-sort-wrapper.d.ts +22 -0
- package/node_modules/@comis/skills/dist/builtin/file/find-sort-wrapper.js +95 -0
- package/node_modules/@comis/skills/dist/builtin/file/grep-output-mode-wrapper.d.ts +24 -0
- package/node_modules/@comis/skills/dist/builtin/file/grep-output-mode-wrapper.js +167 -0
- package/node_modules/@comis/skills/dist/builtin/file/path-suggest.d.ts +64 -0
- package/node_modules/@comis/skills/dist/builtin/file/path-suggest.js +208 -0
- package/node_modules/@comis/skills/dist/builtin/file/safe-path-wrapper.d.ts +26 -0
- package/node_modules/@comis/skills/dist/builtin/file/safe-path-wrapper.js +23 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/edit-tool.d.ts +40 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/edit-tool.js +308 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/find-tool.d.ts +36 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/find-tool.js +313 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/grep-tool.d.ts +46 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/grep-tool.js +424 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/ls-tool.d.ts +34 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/ls-tool.js +166 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/notebook-edit-tool.d.ts +32 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/notebook-edit-tool.js +195 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/read-tool.d.ts +50 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/read-tool.js +427 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/edit-diff.d.ts +109 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/edit-diff.js +575 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/file-encoding.d.ts +63 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/file-encoding.js +130 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/file-mutation-queue.d.ts +24 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/file-mutation-queue.js +58 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/git-diff.d.ts +20 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/git-diff.js +34 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/notebook-edit-ops.d.ts +47 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/notebook-edit-ops.js +89 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/notebook-utils.d.ts +32 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/shared/notebook-utils.js +112 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/write-tool.d.ts +36 -0
- package/node_modules/@comis/skills/dist/builtin/file-tools/write-tool.js +283 -0
- package/node_modules/@comis/skills/dist/builtin/output-cleaner.d.ts +33 -0
- package/node_modules/@comis/skills/dist/builtin/output-cleaner.js +107 -0
- package/node_modules/@comis/skills/dist/builtin/platform/admin-manage-factory.d.ts +70 -0
- package/node_modules/@comis/skills/dist/builtin/platform/admin-manage-factory.js +95 -0
- package/node_modules/@comis/skills/dist/builtin/platform/agents-list-tool.d.ts +19 -0
- package/node_modules/@comis/skills/dist/builtin/platform/agents-list-tool.js +39 -0
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.d.ts +69 -0
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.js +196 -0
- package/node_modules/@comis/skills/dist/builtin/platform/background-tasks-tool.d.ts +50 -0
- package/node_modules/@comis/skills/dist/builtin/platform/background-tasks-tool.js +157 -0
- package/node_modules/@comis/skills/dist/builtin/platform/browser-tool-schema.d.ts +87 -0
- package/node_modules/@comis/skills/dist/builtin/platform/browser-tool-schema.js +123 -0
- package/node_modules/@comis/skills/dist/builtin/platform/browser-tool.d.ts +43 -0
- package/node_modules/@comis/skills/dist/builtin/platform/browser-tool.js +98 -0
- package/node_modules/@comis/skills/dist/builtin/platform/channels-manage-tool.d.ts +36 -0
- package/node_modules/@comis/skills/dist/builtin/platform/channels-manage-tool.js +140 -0
- package/node_modules/@comis/skills/dist/builtin/platform/cron-tool.d.ts +48 -0
- package/node_modules/@comis/skills/dist/builtin/platform/cron-tool.js +172 -0
- package/node_modules/@comis/skills/dist/builtin/platform/ctx-expand-tool.d.ts +24 -0
- package/node_modules/@comis/skills/dist/builtin/platform/ctx-expand-tool.js +48 -0
- package/node_modules/@comis/skills/dist/builtin/platform/ctx-inspect-tool.d.ts +22 -0
- package/node_modules/@comis/skills/dist/builtin/platform/ctx-inspect-tool.js +47 -0
- package/node_modules/@comis/skills/dist/builtin/platform/ctx-recall-tool.d.ts +26 -0
- package/node_modules/@comis/skills/dist/builtin/platform/ctx-recall-tool.js +62 -0
- package/node_modules/@comis/skills/dist/builtin/platform/ctx-search-tool.d.ts +26 -0
- package/node_modules/@comis/skills/dist/builtin/platform/ctx-search-tool.js +52 -0
- package/node_modules/@comis/skills/dist/builtin/platform/describe-video-tool.d.ts +23 -0
- package/node_modules/@comis/skills/dist/builtin/platform/describe-video-tool.js +53 -0
- package/node_modules/@comis/skills/dist/builtin/platform/discord-action-tool.d.ts +29 -0
- package/node_modules/@comis/skills/dist/builtin/platform/discord-action-tool.js +90 -0
- package/node_modules/@comis/skills/dist/builtin/platform/extract-document-tool.d.ts +23 -0
- package/node_modules/@comis/skills/dist/builtin/platform/extract-document-tool.js +53 -0
- package/node_modules/@comis/skills/dist/builtin/platform/fts5-sanitizer.d.ts +27 -0
- package/node_modules/@comis/skills/dist/builtin/platform/fts5-sanitizer.js +78 -0
- package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.d.ts +55 -0
- package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.js +255 -0
- package/node_modules/@comis/skills/dist/builtin/platform/heartbeat-manage-tool.d.ts +36 -0
- package/node_modules/@comis/skills/dist/builtin/platform/heartbeat-manage-tool.js +139 -0
- package/node_modules/@comis/skills/dist/builtin/platform/image-generate-tool.d.ts +26 -0
- package/node_modules/@comis/skills/dist/builtin/platform/image-generate-tool.js +41 -0
- package/node_modules/@comis/skills/dist/builtin/platform/image-tool.d.ts +27 -0
- package/node_modules/@comis/skills/dist/builtin/platform/image-tool.js +73 -0
- package/node_modules/@comis/skills/dist/builtin/platform/index.d.ts +60 -0
- package/node_modules/@comis/skills/dist/builtin/platform/index.js +74 -0
- package/node_modules/@comis/skills/dist/builtin/platform/mcp-manage-tool.d.ts +23 -0
- package/node_modules/@comis/skills/dist/builtin/platform/mcp-manage-tool.js +109 -0
- package/node_modules/@comis/skills/dist/builtin/platform/memory-get-tool.d.ts +27 -0
- package/node_modules/@comis/skills/dist/builtin/platform/memory-get-tool.js +55 -0
- package/node_modules/@comis/skills/dist/builtin/platform/memory-manage-tool.d.ts +41 -0
- package/node_modules/@comis/skills/dist/builtin/platform/memory-manage-tool.js +183 -0
- package/node_modules/@comis/skills/dist/builtin/platform/memory-search-tool.d.ts +23 -0
- package/node_modules/@comis/skills/dist/builtin/platform/memory-search-tool.js +44 -0
- package/node_modules/@comis/skills/dist/builtin/platform/memory-store-tool.d.ts +22 -0
- package/node_modules/@comis/skills/dist/builtin/platform/memory-store-tool.js +66 -0
- package/node_modules/@comis/skills/dist/builtin/platform/message-tool.d.ts +49 -0
- package/node_modules/@comis/skills/dist/builtin/platform/message-tool.js +190 -0
- package/node_modules/@comis/skills/dist/builtin/platform/messaging-factory.d.ts +75 -0
- package/node_modules/@comis/skills/dist/builtin/platform/messaging-factory.js +83 -0
- package/node_modules/@comis/skills/dist/builtin/platform/models-manage-tool.d.ts +32 -0
- package/node_modules/@comis/skills/dist/builtin/platform/models-manage-tool.js +76 -0
- package/node_modules/@comis/skills/dist/builtin/platform/notify-tool.d.ts +28 -0
- package/node_modules/@comis/skills/dist/builtin/platform/notify-tool.js +54 -0
- package/node_modules/@comis/skills/dist/builtin/platform/obs-query-tool.d.ts +25 -0
- package/node_modules/@comis/skills/dist/builtin/platform/obs-query-tool.js +179 -0
- package/node_modules/@comis/skills/dist/builtin/platform/pipeline-tool.d.ts +62 -0
- package/node_modules/@comis/skills/dist/builtin/platform/pipeline-tool.js +460 -0
- package/node_modules/@comis/skills/dist/builtin/platform/platform-action-tool.d.ts +60 -0
- package/node_modules/@comis/skills/dist/builtin/platform/platform-action-tool.js +70 -0
- package/node_modules/@comis/skills/dist/builtin/platform/session-search-tool.d.ts +32 -0
- package/node_modules/@comis/skills/dist/builtin/platform/session-search-tool.js +76 -0
- package/node_modules/@comis/skills/dist/builtin/platform/session-status-tool.d.ts +21 -0
- package/node_modules/@comis/skills/dist/builtin/platform/session-status-tool.js +43 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-history-tool.d.ts +23 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-history-tool.js +51 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-list-tool.d.ts +22 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-list-tool.js +51 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-manage-tool.d.ts +33 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-manage-tool.js +82 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-send-tool.d.ts +29 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-send-tool.js +58 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-spawn-tool.d.ts +38 -0
- package/node_modules/@comis/skills/dist/builtin/platform/sessions-spawn-tool.js +84 -0
- package/node_modules/@comis/skills/dist/builtin/platform/skills-manage-tool.d.ts +38 -0
- package/node_modules/@comis/skills/dist/builtin/platform/skills-manage-tool.js +107 -0
- package/node_modules/@comis/skills/dist/builtin/platform/slack-action-tool.d.ts +23 -0
- package/node_modules/@comis/skills/dist/builtin/platform/slack-action-tool.js +77 -0
- package/node_modules/@comis/skills/dist/builtin/platform/subagents-tool.d.ts +26 -0
- package/node_modules/@comis/skills/dist/builtin/platform/subagents-tool.js +100 -0
- package/node_modules/@comis/skills/dist/builtin/platform/telegram-action-tool.d.ts +21 -0
- package/node_modules/@comis/skills/dist/builtin/platform/telegram-action-tool.js +72 -0
- package/node_modules/@comis/skills/dist/builtin/platform/tokens-manage-tool.d.ts +33 -0
- package/node_modules/@comis/skills/dist/builtin/platform/tokens-manage-tool.js +87 -0
- package/node_modules/@comis/skills/dist/builtin/platform/tool-helpers.d.ts +163 -0
- package/node_modules/@comis/skills/dist/builtin/platform/tool-helpers.js +237 -0
- package/node_modules/@comis/skills/dist/builtin/platform/transcribe-audio-tool.d.ts +23 -0
- package/node_modules/@comis/skills/dist/builtin/platform/transcribe-audio-tool.js +53 -0
- package/node_modules/@comis/skills/dist/builtin/platform/tts-tool.d.ts +25 -0
- package/node_modules/@comis/skills/dist/builtin/platform/tts-tool.js +61 -0
- package/node_modules/@comis/skills/dist/builtin/platform/unified-context-tool.d.ts +34 -0
- package/node_modules/@comis/skills/dist/builtin/platform/unified-context-tool.js +106 -0
- package/node_modules/@comis/skills/dist/builtin/platform/unified-memory-tool.d.ts +44 -0
- package/node_modules/@comis/skills/dist/builtin/platform/unified-memory-tool.js +230 -0
- package/node_modules/@comis/skills/dist/builtin/platform/unified-session-tool.d.ts +32 -0
- package/node_modules/@comis/skills/dist/builtin/platform/unified-session-tool.js +130 -0
- package/node_modules/@comis/skills/dist/builtin/platform/whatsapp-action-tool.d.ts +24 -0
- package/node_modules/@comis/skills/dist/builtin/platform/whatsapp-action-tool.js +79 -0
- package/node_modules/@comis/skills/dist/builtin/process-registry.d.ts +74 -0
- package/node_modules/@comis/skills/dist/builtin/process-registry.js +213 -0
- package/node_modules/@comis/skills/dist/builtin/process-tool.d.ts +35 -0
- package/node_modules/@comis/skills/dist/builtin/process-tool.js +104 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/bwrap-provider.d.ts +19 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/bwrap-provider.js +181 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/detect-provider.d.ts +20 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/detect-provider.js +41 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/sandbox-exec-provider.d.ts +15 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/sandbox-exec-provider.js +201 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/types.d.ts +46 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/types.js +12 -0
- package/node_modules/@comis/skills/dist/builtin/search-provider.d.ts +81 -0
- package/node_modules/@comis/skills/dist/builtin/search-provider.js +45 -0
- package/node_modules/@comis/skills/dist/builtin/task-plan-tool.d.ts +25 -0
- package/node_modules/@comis/skills/dist/builtin/task-plan-tool.js +67 -0
- package/node_modules/@comis/skills/dist/builtin/tool-provisioner.d.ts +29 -0
- package/node_modules/@comis/skills/dist/builtin/tool-provisioner.js +227 -0
- package/node_modules/@comis/skills/dist/builtin/tool-source-profiles.d.ts +48 -0
- package/node_modules/@comis/skills/dist/builtin/tool-source-profiles.js +103 -0
- package/node_modules/@comis/skills/dist/builtin/truncate.d.ts +59 -0
- package/node_modules/@comis/skills/dist/builtin/truncate.js +125 -0
- package/node_modules/@comis/skills/dist/builtin/web-fetch-tool.d.ts +77 -0
- package/node_modules/@comis/skills/dist/builtin/web-fetch-tool.js +528 -0
- package/node_modules/@comis/skills/dist/builtin/web-fetch-utils.d.ts +67 -0
- package/node_modules/@comis/skills/dist/builtin/web-fetch-utils.js +268 -0
- package/node_modules/@comis/skills/dist/builtin/web-fetch-visibility.d.ts +35 -0
- package/node_modules/@comis/skills/dist/builtin/web-fetch-visibility.js +190 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-brave.d.ts +35 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-brave.js +147 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-duckduckgo.d.ts +43 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-duckduckgo.js +192 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-exa.d.ts +32 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-exa.js +84 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-grok.d.ts +50 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-grok.js +87 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-jina.d.ts +29 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-jina.js +94 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-perplexity.d.ts +45 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-perplexity.js +115 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-searxng.d.ts +31 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-searxng.js +100 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-tavily.d.ts +31 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-tavily.js +87 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-tool.d.ts +174 -0
- package/node_modules/@comis/skills/dist/builtin/web-search-tool.js +666 -0
- package/node_modules/@comis/skills/dist/builtin/web-shared.d.ts +60 -0
- package/node_modules/@comis/skills/dist/builtin/web-shared.js +127 -0
- package/node_modules/@comis/skills/dist/index.d.ts +62 -0
- package/node_modules/@comis/skills/dist/index.js +113 -0
- package/node_modules/@comis/skills/dist/integrations/deepgram-stt-adapter.d.ts +27 -0
- package/node_modules/@comis/skills/dist/integrations/deepgram-stt-adapter.js +81 -0
- package/node_modules/@comis/skills/dist/integrations/document/binary-detector.d.ts +28 -0
- package/node_modules/@comis/skills/dist/integrations/document/binary-detector.js +59 -0
- package/node_modules/@comis/skills/dist/integrations/document/composite-extractor.d.ts +22 -0
- package/node_modules/@comis/skills/dist/integrations/document/composite-extractor.js +34 -0
- package/node_modules/@comis/skills/dist/integrations/document/file-classifier.d.ts +25 -0
- package/node_modules/@comis/skills/dist/integrations/document/file-classifier.js +60 -0
- package/node_modules/@comis/skills/dist/integrations/document/file-extractor.d.ts +41 -0
- package/node_modules/@comis/skills/dist/integrations/document/file-extractor.js +148 -0
- package/node_modules/@comis/skills/dist/integrations/document/pdf-extractor.d.ts +50 -0
- package/node_modules/@comis/skills/dist/integrations/document/pdf-extractor.js +214 -0
- package/node_modules/@comis/skills/dist/integrations/document/pdf-page-renderer.d.ts +41 -0
- package/node_modules/@comis/skills/dist/integrations/document/pdf-page-renderer.js +78 -0
- package/node_modules/@comis/skills/dist/integrations/document/text-decoder.d.ts +21 -0
- package/node_modules/@comis/skills/dist/integrations/document/text-decoder.js +53 -0
- package/node_modules/@comis/skills/dist/integrations/document/xml-block.d.ts +59 -0
- package/node_modules/@comis/skills/dist/integrations/document/xml-block.js +80 -0
- package/node_modules/@comis/skills/dist/integrations/edge-tts-adapter.d.ts +15 -0
- package/node_modules/@comis/skills/dist/integrations/edge-tts-adapter.js +42 -0
- package/node_modules/@comis/skills/dist/integrations/elevenlabs-tts-adapter.d.ts +19 -0
- package/node_modules/@comis/skills/dist/integrations/elevenlabs-tts-adapter.js +65 -0
- package/node_modules/@comis/skills/dist/integrations/groq-stt-adapter.d.ts +23 -0
- package/node_modules/@comis/skills/dist/integrations/groq-stt-adapter.js +76 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/fal-adapter.d.ts +11 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/fal-adapter.js +39 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/image-gen-factory.d.ts +13 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/image-gen-factory.js +31 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/index.d.ts +5 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/index.js +5 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/openai-adapter.d.ts +11 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/openai-adapter.js +32 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/rate-limiter.d.ts +22 -0
- package/node_modules/@comis/skills/dist/integrations/image-gen/rate-limiter.js +32 -0
- package/node_modules/@comis/skills/dist/integrations/image-sanitizer.d.ts +39 -0
- package/node_modules/@comis/skills/dist/integrations/image-sanitizer.js +121 -0
- package/node_modules/@comis/skills/dist/integrations/link/link-detector.d.ts +26 -0
- package/node_modules/@comis/skills/dist/integrations/link/link-detector.js +114 -0
- package/node_modules/@comis/skills/dist/integrations/link/link-fetcher.d.ts +43 -0
- package/node_modules/@comis/skills/dist/integrations/link/link-fetcher.js +74 -0
- package/node_modules/@comis/skills/dist/integrations/link/link-formatter.d.ts +39 -0
- package/node_modules/@comis/skills/dist/integrations/link/link-formatter.js +55 -0
- package/node_modules/@comis/skills/dist/integrations/link/link-runner.d.ts +56 -0
- package/node_modules/@comis/skills/dist/integrations/link/link-runner.js +77 -0
- package/node_modules/@comis/skills/dist/integrations/mcp-client.d.ts +163 -0
- package/node_modules/@comis/skills/dist/integrations/mcp-client.js +705 -0
- package/node_modules/@comis/skills/dist/integrations/mcp-result-sanitizer.d.ts +21 -0
- package/node_modules/@comis/skills/dist/integrations/mcp-result-sanitizer.js +44 -0
- package/node_modules/@comis/skills/dist/integrations/mcp-tool-bridge.d.ts +75 -0
- package/node_modules/@comis/skills/dist/integrations/mcp-tool-bridge.js +235 -0
- package/node_modules/@comis/skills/dist/integrations/media-adapter-shared.d.ts +16 -0
- package/node_modules/@comis/skills/dist/integrations/media-adapter-shared.js +35 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-audio.d.ts +33 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-audio.js +62 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-document.d.ts +38 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-document.js +70 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-factory.d.ts +25 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-factory.js +39 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-image.d.ts +48 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-image.js +86 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-video.d.ts +37 -0
- package/node_modules/@comis/skills/dist/integrations/media-handler-video.js +49 -0
- package/node_modules/@comis/skills/dist/integrations/media-preprocessor.d.ts +118 -0
- package/node_modules/@comis/skills/dist/integrations/media-preprocessor.js +176 -0
- package/node_modules/@comis/skills/dist/integrations/multimodal-analyzer.d.ts +27 -0
- package/node_modules/@comis/skills/dist/integrations/multimodal-analyzer.js +139 -0
- package/node_modules/@comis/skills/dist/integrations/openai-stt-adapter.d.ts +24 -0
- package/node_modules/@comis/skills/dist/integrations/openai-stt-adapter.js +78 -0
- package/node_modules/@comis/skills/dist/integrations/openai-tts-adapter.d.ts +19 -0
- package/node_modules/@comis/skills/dist/integrations/openai-tts-adapter.js +78 -0
- package/node_modules/@comis/skills/dist/integrations/outbound-media-parser.d.ts +33 -0
- package/node_modules/@comis/skills/dist/integrations/outbound-media-parser.js +58 -0
- package/node_modules/@comis/skills/dist/integrations/stt-factory.d.ts +36 -0
- package/node_modules/@comis/skills/dist/integrations/stt-factory.js +84 -0
- package/node_modules/@comis/skills/dist/integrations/tts/tts-auto-mode.d.ts +44 -0
- package/node_modules/@comis/skills/dist/integrations/tts/tts-auto-mode.js +48 -0
- package/node_modules/@comis/skills/dist/integrations/tts/tts-directive-parser.d.ts +53 -0
- package/node_modules/@comis/skills/dist/integrations/tts/tts-directive-parser.js +93 -0
- package/node_modules/@comis/skills/dist/integrations/tts/tts-output-format.d.ts +42 -0
- package/node_modules/@comis/skills/dist/integrations/tts/tts-output-format.js +114 -0
- package/node_modules/@comis/skills/dist/integrations/tts-factory.d.ts +15 -0
- package/node_modules/@comis/skills/dist/integrations/tts-factory.js +37 -0
- package/node_modules/@comis/skills/dist/integrations/vision/gemini-vision-adapter.d.ts +35 -0
- package/node_modules/@comis/skills/dist/integrations/vision/gemini-vision-adapter.js +149 -0
- package/node_modules/@comis/skills/dist/integrations/vision/scope-resolver.d.ts +40 -0
- package/node_modules/@comis/skills/dist/integrations/vision/scope-resolver.js +55 -0
- package/node_modules/@comis/skills/dist/integrations/vision/video-handler.d.ts +33 -0
- package/node_modules/@comis/skills/dist/integrations/vision/video-handler.js +46 -0
- package/node_modules/@comis/skills/dist/integrations/vision/vision-provider-registry.d.ts +48 -0
- package/node_modules/@comis/skills/dist/integrations/vision/vision-provider-registry.js +134 -0
- package/node_modules/@comis/skills/dist/manifest/parser.d.ts +29 -0
- package/node_modules/@comis/skills/dist/manifest/parser.js +69 -0
- package/node_modules/@comis/skills/dist/manifest/schema.d.ts +125 -0
- package/node_modules/@comis/skills/dist/manifest/schema.js +113 -0
- package/node_modules/@comis/skills/dist/media/audio-converter.d.ts +39 -0
- package/node_modules/@comis/skills/dist/media/audio-converter.js +154 -0
- package/node_modules/@comis/skills/dist/media/audio-tags.d.ts +37 -0
- package/node_modules/@comis/skills/dist/media/audio-tags.js +45 -0
- package/node_modules/@comis/skills/dist/media/composite-resolver.d.ts +41 -0
- package/node_modules/@comis/skills/dist/media/composite-resolver.js +78 -0
- package/node_modules/@comis/skills/dist/media/constants.d.ts +17 -0
- package/node_modules/@comis/skills/dist/media/constants.js +54 -0
- package/node_modules/@comis/skills/dist/media/ffmpeg-detect.d.ts +27 -0
- package/node_modules/@comis/skills/dist/media/ffmpeg-detect.js +41 -0
- package/node_modules/@comis/skills/dist/media/file-validator.d.ts +45 -0
- package/node_modules/@comis/skills/dist/media/file-validator.js +98 -0
- package/node_modules/@comis/skills/dist/media/image-ops.d.ts +64 -0
- package/node_modules/@comis/skills/dist/media/image-ops.js +139 -0
- package/node_modules/@comis/skills/dist/media/index.d.ts +31 -0
- package/node_modules/@comis/skills/dist/media/index.js +33 -0
- package/node_modules/@comis/skills/dist/media/media-persistence.d.ts +64 -0
- package/node_modules/@comis/skills/dist/media/media-persistence.js +95 -0
- package/node_modules/@comis/skills/dist/media/media-semaphore.d.ts +37 -0
- package/node_modules/@comis/skills/dist/media/media-semaphore.js +47 -0
- package/node_modules/@comis/skills/dist/media/media-store.d.ts +64 -0
- package/node_modules/@comis/skills/dist/media/media-store.js +178 -0
- package/node_modules/@comis/skills/dist/media/media-temp.d.ts +53 -0
- package/node_modules/@comis/skills/dist/media/media-temp.js +134 -0
- package/node_modules/@comis/skills/dist/media/mime-detection.d.ts +45 -0
- package/node_modules/@comis/skills/dist/media/mime-detection.js +125 -0
- package/node_modules/@comis/skills/dist/media/ssrf-fetcher.d.ts +65 -0
- package/node_modules/@comis/skills/dist/media/ssrf-fetcher.js +208 -0
- package/node_modules/@comis/skills/dist/policy/index.d.ts +7 -0
- package/node_modules/@comis/skills/dist/policy/index.js +7 -0
- package/node_modules/@comis/skills/dist/policy/tool-policy.d.ts +74 -0
- package/node_modules/@comis/skills/dist/policy/tool-policy.js +220 -0
- package/node_modules/@comis/skills/dist/prompt/content-scanner.d.ts +58 -0
- package/node_modules/@comis/skills/dist/prompt/content-scanner.js +284 -0
- package/node_modules/@comis/skills/dist/prompt/processor.d.ts +98 -0
- package/node_modules/@comis/skills/dist/prompt/processor.js +232 -0
- package/node_modules/@comis/skills/dist/prompt/sanitizer.d.ts +62 -0
- package/node_modules/@comis/skills/dist/prompt/sanitizer.js +72 -0
- package/node_modules/@comis/skills/dist/registry/diagnostics.d.ts +23 -0
- package/node_modules/@comis/skills/dist/registry/diagnostics.js +11 -0
- package/node_modules/@comis/skills/dist/registry/discovery.d.ts +94 -0
- package/node_modules/@comis/skills/dist/registry/discovery.js +332 -0
- package/node_modules/@comis/skills/dist/registry/eligibility.d.ts +61 -0
- package/node_modules/@comis/skills/dist/registry/eligibility.js +124 -0
- package/node_modules/@comis/skills/dist/registry/skill-registry.d.ts +127 -0
- package/node_modules/@comis/skills/dist/registry/skill-registry.js +496 -0
- package/node_modules/@comis/skills/dist/registry/skill-watcher.d.ts +50 -0
- package/node_modules/@comis/skills/dist/registry/skill-watcher.js +166 -0
- package/node_modules/@comis/skills/package.json +44 -0
- package/package.json +201 -0
|
@@ -0,0 +1,1327 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Daemon Entry Point: thin orchestrator calling setupXxx() factories in sequence.
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { bootstrap, loadEnvFile, createApprovalGate, parseFormattedSessionKey, createConfigGitManager, envSubset, generateStrongToken, createAuditAggregator, createInjectionRateLimiter, validateMemoryWrite, checkApprovalsConfig, safePath, resolveConfigSecretRefs, formatSessionKey } from "@comis/core";
|
|
7
|
+
import { setupSecrets as _setupSecretsImpl, createSqliteSecretStore, createNamedGraphStore, createContextStore, createObservabilityStore } from "@comis/memory";
|
|
8
|
+
import { ok, err, suppressError } from "@comis/shared";
|
|
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";
|
|
11
|
+
import { setupSingleAgent } from "./wiring/setup-agents.js";
|
|
12
|
+
import { createActiveRunRegistry, createModelCatalog, wireSessionStateCleanup, wireMcpDisconnectCleanup, createGeminiCacheManager, wireGeminiCacheCleanup, createSessionTrackerRegistry } from "@comis/agent";
|
|
13
|
+
import { detectSandboxProvider, createImageGenProvider, createImageGenRateLimiter, createFileStateTracker } from "@comis/skills";
|
|
14
|
+
import { createGraphCoordinator, createNodeTypeRegistry } from "./graph/index.js";
|
|
15
|
+
import { createChannelHealthMonitor } from "@comis/channels";
|
|
16
|
+
import { createWakeCoalescer, createSystemEventQueue } from "@comis/scheduler";
|
|
17
|
+
import { createTokenRegistry } from "./rpc/token-handlers.js";
|
|
18
|
+
import { createLatencyRecorder } from "./observability/latency-recorder.js";
|
|
19
|
+
import { setupObsPersistence } from "./observability/obs-persistence-wiring.js";
|
|
20
|
+
import { createContextPipelineCollector } from "./observability/context-pipeline-collector.js";
|
|
21
|
+
import { createLogLevelManager } from "./observability/log-infra.js";
|
|
22
|
+
import { createTokenTracker } from "./observability/token-tracker.js";
|
|
23
|
+
import { createTracingLogger } from "./observability/trace-logger.js";
|
|
24
|
+
import { setupDeliveryQueueLogging } from "./observability/delivery-queue-logger.js";
|
|
25
|
+
import { setupChannelHealthLogging } from "./observability/channel-health-logger.js";
|
|
26
|
+
import { registerGracefulShutdown } from "./process/graceful-shutdown.js";
|
|
27
|
+
import { createProcessMonitor } from "./process/process-monitor.js";
|
|
28
|
+
import { startWatchdog } from "./health/watchdog.js";
|
|
29
|
+
import { randomUUID, createHmac } from "node:crypto";
|
|
30
|
+
import { existsSync, chmodSync, statSync, mkdirSync, readFileSync, unlinkSync, cpSync } from "node:fs";
|
|
31
|
+
import { writeFile as fsWriteFile, rm } from "node:fs/promises";
|
|
32
|
+
import { createExecGit } from "./config/exec-git.js";
|
|
33
|
+
import { saveLastKnownGood, buildRollbackSuggestion, handleRestoreFlag } from "./config/last-known-good.js";
|
|
34
|
+
import { createRestartContinuationTracker, loadContinuations, buildMcpStatusLine } from "./wiring/restart-continuation.js";
|
|
35
|
+
import { logOperationModelDryRun } from "./wiring/startup-dry-run.js";
|
|
36
|
+
import os from "node:os";
|
|
37
|
+
import { join as pathJoin, dirname as pathDirname, resolve as pathResolve } from "node:path";
|
|
38
|
+
import { fileURLToPath } from "node:url";
|
|
39
|
+
const DEFAULT_CONFIG_PATHS = [
|
|
40
|
+
safePath(safePath(os.homedir(), ".comis"), "config.yaml"),
|
|
41
|
+
safePath(safePath(os.homedir(), ".comis"), "config.local.yaml"),
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Sensitive environment variable prefixes to remove from process.env after
|
|
45
|
+
* the SecretManager snapshot captures them. Prevents leakage through
|
|
46
|
+
* subprocess inheritance.
|
|
47
|
+
*/
|
|
48
|
+
const SENSITIVE_PREFIXES = [
|
|
49
|
+
"ANTHROPIC_",
|
|
50
|
+
"OPENAI_",
|
|
51
|
+
"TELEGRAM_",
|
|
52
|
+
"DISCORD_",
|
|
53
|
+
"SLACK_",
|
|
54
|
+
"WHATSAPP_",
|
|
55
|
+
"GOOGLE_",
|
|
56
|
+
"GROQ_",
|
|
57
|
+
"MISTRAL_",
|
|
58
|
+
"DEEPGRAM_",
|
|
59
|
+
"ELEVENLABS_",
|
|
60
|
+
"SENDGRID_",
|
|
61
|
+
"STRIPE_",
|
|
62
|
+
];
|
|
63
|
+
/** Individual keys to scrub that don't match prefix patterns. */
|
|
64
|
+
const SENSITIVE_EXACT_KEYS = new Set([
|
|
65
|
+
"SECRETS_MASTER_KEY",
|
|
66
|
+
]);
|
|
67
|
+
/**
|
|
68
|
+
* Remove sensitive environment variables from process.env.
|
|
69
|
+
* Called AFTER mergedEnv snapshot is built but BEFORE bootstrap().
|
|
70
|
+
* Preserves operational vars: COMIS_*, PATH, HOME, NODE_ENV, etc.
|
|
71
|
+
*/
|
|
72
|
+
function scrubProcessEnv() {
|
|
73
|
+
for (const key of Object.keys(process.env)) {
|
|
74
|
+
if (SENSITIVE_EXACT_KEYS.has(key)) {
|
|
75
|
+
// eslint-disable-next-line no-restricted-syntax -- see scrubProcessEnv comment above
|
|
76
|
+
delete process.env[key];
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
for (const prefix of SENSITIVE_PREFIXES) {
|
|
80
|
+
if (key.startsWith(prefix)) {
|
|
81
|
+
// eslint-disable-next-line no-restricted-syntax -- see scrubProcessEnv comment above
|
|
82
|
+
delete process.env[key];
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Scan ~/.comis/ and fix permissions on the data directory and known
|
|
90
|
+
* sensitive files. Returns an array of corrections for deferred logging.
|
|
91
|
+
*/
|
|
92
|
+
export function hardenDataDirPermissions(dataDir) {
|
|
93
|
+
const corrections = [];
|
|
94
|
+
// Ensure data dir exists with 0o700
|
|
95
|
+
try {
|
|
96
|
+
mkdirSync(dataDir, { recursive: true, mode: 0o700 });
|
|
97
|
+
}
|
|
98
|
+
catch { /* may already exist */ }
|
|
99
|
+
// Fix data directory permissions
|
|
100
|
+
try {
|
|
101
|
+
const stat = statSync(dataDir);
|
|
102
|
+
const currentMode = stat.mode & 0o777;
|
|
103
|
+
if (currentMode !== 0o700) {
|
|
104
|
+
chmodSync(dataDir, 0o700);
|
|
105
|
+
corrections.push({ file: dataDir, oldMode: currentMode, newMode: 0o700 });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch { /* best-effort */ }
|
|
109
|
+
// Fix known sensitive files
|
|
110
|
+
const sensitiveFiles = ["config.yaml", "config.local.yaml", ".env", "secrets.db"];
|
|
111
|
+
for (const filename of sensitiveFiles) {
|
|
112
|
+
try {
|
|
113
|
+
const filePath = `${dataDir}/${filename}`;
|
|
114
|
+
const stat = statSync(filePath);
|
|
115
|
+
const currentMode = stat.mode & 0o777;
|
|
116
|
+
if (currentMode !== 0o600) {
|
|
117
|
+
chmodSync(filePath, 0o600);
|
|
118
|
+
corrections.push({ file: filePath, oldMode: currentMode, newMode: 0o600 });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
catch { /* file may not exist; best-effort */ }
|
|
122
|
+
}
|
|
123
|
+
return corrections;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Probe better-sqlite3 before any subsystem init. A missing transitive
|
|
127
|
+
* `bindings` folder (known failure mode from partial npm upgrades) makes
|
|
128
|
+
* better-sqlite3 throw at first require, which otherwise surfaces as an
|
|
129
|
+
* opaque mid-boot crash and a systemd restart loop. Here we catch it up
|
|
130
|
+
* front and exit 78 (EX_CONFIG) with an actionable hint, so operators can
|
|
131
|
+
* repair instead of chasing a cascading failure.
|
|
132
|
+
*/
|
|
133
|
+
export async function runPreflightDoctor(exitFn, opts = {}) {
|
|
134
|
+
const write = opts.stderrWrite ?? ((s) => { process.stderr.write(s); });
|
|
135
|
+
const load = opts.loadBetterSqlite3
|
|
136
|
+
?? (async () => (await import("better-sqlite3")).default);
|
|
137
|
+
try {
|
|
138
|
+
const Database = await load();
|
|
139
|
+
const db = new Database(":memory:");
|
|
140
|
+
try {
|
|
141
|
+
const row = db.prepare("select 1 as ok").get();
|
|
142
|
+
if (!row)
|
|
143
|
+
throw new Error("better-sqlite3 returned no row from sentinel query");
|
|
144
|
+
}
|
|
145
|
+
finally {
|
|
146
|
+
db.close();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
151
|
+
write(JSON.stringify({
|
|
152
|
+
level: 60,
|
|
153
|
+
time: new Date().toISOString(),
|
|
154
|
+
name: "comis-daemon",
|
|
155
|
+
module: "preflight",
|
|
156
|
+
errorKind: "dependency",
|
|
157
|
+
err: message,
|
|
158
|
+
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.",
|
|
159
|
+
msg: "Preflight check failed: better-sqlite3 unavailable",
|
|
160
|
+
}) + "\n");
|
|
161
|
+
exitFn(78);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/** Main daemon entry point. Wires all subsystem modules and returns DaemonInstance. */
|
|
165
|
+
export async function main(overrides = {}) {
|
|
166
|
+
const startupStartMs = Date.now();
|
|
167
|
+
const instanceId = randomUUID().slice(0, 8);
|
|
168
|
+
const _bootstrap = overrides.bootstrap ?? bootstrap;
|
|
169
|
+
const _setupSecrets = overrides.setupSecrets ?? _setupSecretsImpl;
|
|
170
|
+
const _createTracingLogger = overrides.createTracingLogger ?? createTracingLogger;
|
|
171
|
+
const _createLogLevelManager = overrides.createLogLevelManager ?? createLogLevelManager;
|
|
172
|
+
const _createTokenTracker = overrides.createTokenTracker ?? createTokenTracker;
|
|
173
|
+
const _createLatencyRecorder = overrides.createLatencyRecorder ?? createLatencyRecorder;
|
|
174
|
+
const _createProcessMonitor = overrides.createProcessMonitor ?? createProcessMonitor;
|
|
175
|
+
const _registerGracefulShutdown = overrides.registerGracefulShutdown ?? registerGracefulShutdown;
|
|
176
|
+
const _startWatchdog = overrides.startWatchdog ?? startWatchdog;
|
|
177
|
+
const _createGatewayServer = overrides.createGatewayServer ?? createGatewayServer;
|
|
178
|
+
const _setupMedia = overrides.setupMedia ?? setupMedia;
|
|
179
|
+
const exitFn = overrides.exit ?? ((code) => process.exit(code));
|
|
180
|
+
const _preflightDoctor = overrides.preflightDoctor ?? ((fn) => runPreflightDoctor(fn));
|
|
181
|
+
// Preflight: probe native deps before any subsystem init so a missing
|
|
182
|
+
// better-sqlite3 'bindings' module fails fast with a clear repair hint
|
|
183
|
+
// instead of cascading into a systemd restart loop.
|
|
184
|
+
await _preflightDoctor(exitFn);
|
|
185
|
+
// 0. Load secrets from .env
|
|
186
|
+
const envPath = safePath(safePath(os.homedir(), ".comis"), ".env");
|
|
187
|
+
loadEnvFile(envPath);
|
|
188
|
+
// 0.5. Decrypt secrets, merge with env, scrub process.env
|
|
189
|
+
// eslint-disable-next-line no-restricted-syntax -- process.env access needed before SecretManager is initialized
|
|
190
|
+
const dataDir = process.env["COMIS_DATA_DIR"]
|
|
191
|
+
?? safePath(os.homedir(), ".comis");
|
|
192
|
+
// Scan and correct permissions on known sensitive files
|
|
193
|
+
const permissionCorrections = hardenDataDirPermissions(dataDir);
|
|
194
|
+
const secretsBootResult = _setupSecrets({
|
|
195
|
+
env: process.env,
|
|
196
|
+
dataDir,
|
|
197
|
+
});
|
|
198
|
+
let mergedEnv = process.env;
|
|
199
|
+
let secretStore;
|
|
200
|
+
if (!secretsBootResult.ok) {
|
|
201
|
+
// Invalid master key -- fatal error
|
|
202
|
+
throw new Error(`Secrets bootstrap failed: ${secretsBootResult.error.message}`);
|
|
203
|
+
}
|
|
204
|
+
if (secretsBootResult.value !== null) {
|
|
205
|
+
// Valid master key -- create store and decrypt all secrets
|
|
206
|
+
const { crypto, dbPath } = secretsBootResult.value;
|
|
207
|
+
const store = createSqliteSecretStore(dbPath, crypto);
|
|
208
|
+
secretStore = store;
|
|
209
|
+
const decryptResult = store.decryptAll();
|
|
210
|
+
if (!decryptResult.ok) {
|
|
211
|
+
throw new Error(`Secret decryption failed: ${decryptResult.error.message}`);
|
|
212
|
+
}
|
|
213
|
+
// Build merged env: decrypted secrets as base, env vars override
|
|
214
|
+
const merged = {};
|
|
215
|
+
for (const [name, value] of decryptResult.value) {
|
|
216
|
+
merged[name] = value;
|
|
217
|
+
}
|
|
218
|
+
for (const [key, value] of Object.entries(process.env)) {
|
|
219
|
+
if (value !== undefined)
|
|
220
|
+
merged[key] = value;
|
|
221
|
+
}
|
|
222
|
+
mergedEnv = merged;
|
|
223
|
+
// Scrub process.env of sensitive prefixes (after snapshot)
|
|
224
|
+
scrubProcessEnv();
|
|
225
|
+
}
|
|
226
|
+
// 1. Bootstrap core container
|
|
227
|
+
// eslint-disable-next-line no-restricted-syntax -- process.env access needed before SecretManager for config path resolution
|
|
228
|
+
const rawConfigPaths = process.env["COMIS_CONFIG_PATHS"];
|
|
229
|
+
const configPaths = (rawConfigPaths
|
|
230
|
+
? rawConfigPaths.split(":")
|
|
231
|
+
: DEFAULT_CONFIG_PATHS).filter((p) => existsSync(p));
|
|
232
|
+
const result = _bootstrap({ configPaths, env: mergedEnv });
|
|
233
|
+
if (!result.ok) {
|
|
234
|
+
throw new Error(`Bootstrap failed: ${result.error.message}`);
|
|
235
|
+
}
|
|
236
|
+
let container = result.value;
|
|
237
|
+
// Resolve any SecretRef objects in config before subsystem startup
|
|
238
|
+
const refResult = resolveConfigSecretRefs(container.config, { secretManager: container.secretManager });
|
|
239
|
+
if (!refResult.ok) {
|
|
240
|
+
throw new Error(`SecretRef resolution failed: ${refResult.error.message}`);
|
|
241
|
+
}
|
|
242
|
+
container = { ...container, config: refResult.value };
|
|
243
|
+
// 1.5. Config git versioning
|
|
244
|
+
const execGit = createExecGit();
|
|
245
|
+
const configDir = configPaths.length > 0 ? pathDirname(configPaths[0]) : "";
|
|
246
|
+
const configGitManager = configDir
|
|
247
|
+
? createConfigGitManager({
|
|
248
|
+
configDir,
|
|
249
|
+
execGit,
|
|
250
|
+
writeFile: async (relativePath, content) => {
|
|
251
|
+
try {
|
|
252
|
+
const targetPath = safePath(configDir, relativePath);
|
|
253
|
+
await fsWriteFile(targetPath, content, "utf-8");
|
|
254
|
+
return ok(undefined);
|
|
255
|
+
}
|
|
256
|
+
catch (e) {
|
|
257
|
+
return err(e instanceof Error ? e.message : String(e));
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
removeDir: async (relativePath) => {
|
|
261
|
+
try {
|
|
262
|
+
const targetPath = safePath(configDir, relativePath);
|
|
263
|
+
await rm(targetPath, { recursive: true, force: true });
|
|
264
|
+
return ok(undefined);
|
|
265
|
+
}
|
|
266
|
+
catch (e) {
|
|
267
|
+
return err(e instanceof Error ? e.message : String(e));
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
})
|
|
271
|
+
: undefined;
|
|
272
|
+
// 2-3. Logging
|
|
273
|
+
const { logger, logLevelManager, daemonLogger, gatewayLogger, channelsLogger, agentLogger, schedulerLogger, skillsLogger, memoryLogger, daemonVersion, } = setupLogging({ container, instanceId, _createTracingLogger, _createLogLevelManager });
|
|
274
|
+
// Log permission corrections (deferred until logger is available)
|
|
275
|
+
if (permissionCorrections.length > 0) {
|
|
276
|
+
for (const c of permissionCorrections) {
|
|
277
|
+
daemonLogger.info({ file: c.file, oldMode: `0o${c.oldMode.toString(8)}`, newMode: `0o${c.newMode.toString(8)}`, hint: "Restrictive permissions applied", errorKind: "config" }, `Fixed permissions on ${c.file}: 0o${c.oldMode.toString(8)} -> 0o${c.newMode.toString(8)}`);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// 3.5. Startup config warnings
|
|
281
|
+
const approvalsWarning = checkApprovalsConfig(container.config.approvals ?? { enabled: false, defaultMode: "auto", rules: [], defaultTimeoutMs: 30_000, waitTimeoutMs: 60_000 });
|
|
282
|
+
if (approvalsWarning) {
|
|
283
|
+
daemonLogger.warn({ hint: "Set approvals.enabled: true or remove unused rules", errorKind: "config" }, approvalsWarning);
|
|
284
|
+
}
|
|
285
|
+
// 4. Observability
|
|
286
|
+
const { tokenTracker, latencyRecorder, sharedCostTracker, // needed for obs.reset billing clear
|
|
287
|
+
diagnosticCollector, billingEstimator, channelActivityTracker, deliveryTracer, } = setupObservability({ eventBus: container.eventBus, _createTokenTracker, _createLatencyRecorder, logger: logLevelManager.getLogger("observability"), dataDir });
|
|
288
|
+
// Context pipeline collector for obs.context.* RPC handlers
|
|
289
|
+
const contextPipelineCollector = createContextPipelineCollector({
|
|
290
|
+
eventBus: container.eventBus,
|
|
291
|
+
logger: logLevelManager.getLogger("context-pipeline"),
|
|
292
|
+
});
|
|
293
|
+
// 5-6. Health / process
|
|
294
|
+
const { processMonitor, watchdogHandle, deviceIdentity } = setupHealth({
|
|
295
|
+
container, logger, daemonLogger, _createProcessMonitor, _startWatchdog,
|
|
296
|
+
});
|
|
297
|
+
// 6.5. Memory + embedding
|
|
298
|
+
const { disposeEmbedding, cachedPort, memoryAdapter, db, sessionStore, memoryApi, embeddingQueue, backgroundIndexingPromise, embeddingCacheStats, embeddingCircuitBreakerState, } = await setupMemory({ container, memoryLogger });
|
|
299
|
+
// Observability persistence (dual-write to SQLite)
|
|
300
|
+
const obsConfig = container.config.observability;
|
|
301
|
+
let obsStore;
|
|
302
|
+
let obsPersistence;
|
|
303
|
+
if (obsConfig.persistence.enabled) {
|
|
304
|
+
obsStore = createObservabilityStore(db);
|
|
305
|
+
// Prune stale data on startup only (avoids continuous overhead)
|
|
306
|
+
const pruneResult = obsStore.prune(obsConfig.persistence.retentionDays);
|
|
307
|
+
daemonLogger.info({
|
|
308
|
+
retentionDays: obsConfig.persistence.retentionDays,
|
|
309
|
+
pruned: pruneResult,
|
|
310
|
+
}, "Observability data pruned on startup");
|
|
311
|
+
// Wire dual-write listeners
|
|
312
|
+
obsPersistence = setupObsPersistence({
|
|
313
|
+
eventBus: container.eventBus,
|
|
314
|
+
obsStore,
|
|
315
|
+
db,
|
|
316
|
+
channelActivityTracker,
|
|
317
|
+
startupTimestamp: startupStartMs,
|
|
318
|
+
snapshotIntervalMs: obsConfig.persistence.snapshotIntervalMs,
|
|
319
|
+
logger: daemonLogger,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
// Create context store for DAG recall tools.
|
|
323
|
+
// Shares the same better-sqlite3 database instance as the memory adapter.
|
|
324
|
+
// contextSchema tables are created lazily by createContextStore if they don't exist.
|
|
325
|
+
const contextStore = createContextStore(db);
|
|
326
|
+
// Shared active run registry for steer+followup routing.
|
|
327
|
+
// Created once and injected into both setupAgents (PiExecutor registration)
|
|
328
|
+
// and setupChannels (inbound pipeline routing).
|
|
329
|
+
const activeRunRegistry = createActiveRunRegistry();
|
|
330
|
+
// Derive canary fallback secret from tenantId.
|
|
331
|
+
// Used when CANARY_SECRET env var is not configured. The per-agent derivation
|
|
332
|
+
// in setup-agents.ts uses this as a base combined with agentId for uniqueness.
|
|
333
|
+
const canaryFallbackSecret = createHmac("sha256", container.config.tenantId)
|
|
334
|
+
.update("comis:canary-fallback")
|
|
335
|
+
.digest("hex");
|
|
336
|
+
// Injection rate limiter as daemon-level singleton
|
|
337
|
+
const injectionRateLimiter = createInjectionRateLimiter();
|
|
338
|
+
// Session mirroring -- adapter + hook plugin registration.
|
|
339
|
+
// MUST run before setupAgents() so agents receive a live deliveryMirror port.
|
|
340
|
+
// Only needs db (from setupMemory) + config + pluginRegistry + logger.
|
|
341
|
+
const { deliveryMirror, startPrune: startMirrorPrune, shutdown: shutdownMirror } = await setupDeliveryMirror({
|
|
342
|
+
db, config: container.config, pluginRegistry: container.pluginRegistry, logger: daemonLogger,
|
|
343
|
+
});
|
|
344
|
+
// Gemini CachedContent lifecycle manager.
|
|
345
|
+
// Always created (cheap -- closure-scoped Maps, lazy SDK client). Per-agent
|
|
346
|
+
// geminiCache.enabled guard in the injector handles individual enablement.
|
|
347
|
+
const geminiCacheManager = createGeminiCacheManager({
|
|
348
|
+
getApiKey: () => container.secretManager.get("google-api-key") ?? container.secretManager.get("GOOGLE_API_KEY"),
|
|
349
|
+
ttlSeconds: 3600,
|
|
350
|
+
maxActiveCachesPerAgent: 20,
|
|
351
|
+
refreshThreshold: 0.5,
|
|
352
|
+
logger: daemonLogger,
|
|
353
|
+
});
|
|
354
|
+
// Deferred channel plugins ref for resolving platform character limits.
|
|
355
|
+
// Populated after setupChannels; the callback is invoked at message time (always set by then).
|
|
356
|
+
const channelPluginsRef = {};
|
|
357
|
+
// 6.5.1. Background task system (Proactive v1 -- BGND)
|
|
358
|
+
// Created before setupAgents so BackgroundTaskManager is available for executor deps.
|
|
359
|
+
const { backgroundTaskManager } = setupBackgroundTasks({
|
|
360
|
+
dataDir,
|
|
361
|
+
eventBus: container.eventBus,
|
|
362
|
+
logger: logLevelManager.getLogger("background-tasks"),
|
|
363
|
+
});
|
|
364
|
+
// Deferred notification ref for background task completion callbacks.
|
|
365
|
+
// Populated after setupNotifications returns (below). The bgNotifyFn captures the
|
|
366
|
+
// ref, so it is always set before any background task completes.
|
|
367
|
+
const bgNotifyRef = {};
|
|
368
|
+
const bgNotifyFn = async (opts) => {
|
|
369
|
+
await bgNotifyRef.ref?.notifyUser({
|
|
370
|
+
agentId: opts.agentId,
|
|
371
|
+
message: opts.message,
|
|
372
|
+
priority: opts.priority,
|
|
373
|
+
origin: opts.origin,
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
// 6.5.9. Seed bundled skill-creator into user data dir (version-aware)
|
|
377
|
+
{
|
|
378
|
+
const skillsTarget = safePath(dataDir, "skills");
|
|
379
|
+
const skillCreatorDest = safePath(skillsTarget, "skill-creator");
|
|
380
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
381
|
+
const bundledSrc = pathResolve(__filename, "../../bundled-skills/skill-creator");
|
|
382
|
+
if (existsSync(bundledSrc)) {
|
|
383
|
+
const bundledSkillMd = safePath(bundledSrc, "SKILL.md");
|
|
384
|
+
const installedSkillMd = safePath(skillCreatorDest, "SKILL.md");
|
|
385
|
+
let shouldSeed = !existsSync(skillCreatorDest);
|
|
386
|
+
if (!shouldSeed && existsSync(bundledSkillMd) && existsSync(installedSkillMd)) {
|
|
387
|
+
// Compare version fields in frontmatter to detect upgrades
|
|
388
|
+
const extractVersion = (path) => {
|
|
389
|
+
try {
|
|
390
|
+
const head = readFileSync(path, "utf-8").slice(0, 512);
|
|
391
|
+
const match = head.match(/^version:\s*["']?([^"'\n]+)/m);
|
|
392
|
+
return match?.[1]?.trim();
|
|
393
|
+
}
|
|
394
|
+
catch {
|
|
395
|
+
return undefined;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
const bundledVersion = extractVersion(bundledSkillMd);
|
|
399
|
+
const installedVersion = extractVersion(installedSkillMd);
|
|
400
|
+
if (bundledVersion && bundledVersion !== installedVersion) {
|
|
401
|
+
shouldSeed = true;
|
|
402
|
+
agentLogger.info({ skill: "skill-creator", installedVersion: installedVersion ?? "none", bundledVersion }, "Bundled skill-creator version newer than installed — updating");
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (shouldSeed) {
|
|
406
|
+
mkdirSync(skillsTarget, { recursive: true });
|
|
407
|
+
cpSync(bundledSrc, skillCreatorDest, { recursive: true });
|
|
408
|
+
agentLogger.info({ skill: "skill-creator" }, "Bundled skill-creator seeded into data directory");
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
// 6.6. Agents
|
|
413
|
+
const agents = container.config.agents;
|
|
414
|
+
const { sessionManager, executors, workspaceDirs, costTrackers, budgetGuards, stepCounters, defaultAgentId, defaultWorkspaceDir, getExecutor, piSessionAdapters, skillWatcherHandles, skillRegistries, lockCleanupTimer, singleAgentDeps, providerHealth, } = await setupAgents({
|
|
415
|
+
container, memoryAdapter, sessionStore, agentLogger, outboundMediaEnabled: true,
|
|
416
|
+
autonomousMediaEnabled: !container.config.integrations.media.transcription.autoTranscribe
|
|
417
|
+
|| !container.config.integrations.media.vision.enabled
|
|
418
|
+
|| !container.config.integrations.media.documentExtraction.enabled,
|
|
419
|
+
activeRunRegistry, // steer+followup session tracking
|
|
420
|
+
canaryFallbackSecret, // Deterministic canary fallback
|
|
421
|
+
injectionRateLimiter, // Per-user injection rate limiting
|
|
422
|
+
embeddingQueue, // Conversation memory persistence in executor
|
|
423
|
+
// DAG context engine deps
|
|
424
|
+
contextStore,
|
|
425
|
+
db,
|
|
426
|
+
embeddingPort: cachedPort, // Semantic search in discover_tools
|
|
427
|
+
// Session mirroring -- mirror port + injection budget config
|
|
428
|
+
deliveryMirror,
|
|
429
|
+
deliveryMirrorConfig: container.config.deliveryMirror
|
|
430
|
+
? { maxEntriesPerInjection: container.config.deliveryMirror.maxEntriesPerInjection, maxCharsPerInjection: container.config.deliveryMirror.maxCharsPerInjection }
|
|
431
|
+
: undefined,
|
|
432
|
+
geminiCacheManager, // Gemini cache lifecycle manager
|
|
433
|
+
// Resolve platform char limit via deferred channelPlugins ref
|
|
434
|
+
getChannelMaxChars: (channelType) => {
|
|
435
|
+
const plugin = channelPluginsRef.ref?.get(channelType);
|
|
436
|
+
return plugin?.capabilities?.limits?.maxMessageChars;
|
|
437
|
+
},
|
|
438
|
+
backgroundTaskManager, // Auto-background middleware in executor pipeline
|
|
439
|
+
backgroundNotifyFn: bgNotifyFn, // Completion notification via deferred notificationService ref
|
|
440
|
+
});
|
|
441
|
+
// Log operation model resolutions at startup (dry-run validation)
|
|
442
|
+
logOperationModelDryRun({
|
|
443
|
+
agents: container.config.agents,
|
|
444
|
+
secretManager: container.secretManager,
|
|
445
|
+
logger: daemonLogger,
|
|
446
|
+
});
|
|
447
|
+
// Restart continuation tracker: track recently-active sessions for SIGUSR2 replay
|
|
448
|
+
const continuationTracker = createRestartContinuationTracker();
|
|
449
|
+
// Filtered subprocess environment (used by setupSchedulers and MCP spawns)
|
|
450
|
+
// System vars needed for basic process operation + all user-managed secrets.
|
|
451
|
+
// SecretManager only contains values explicitly provisioned for the agent
|
|
452
|
+
// (via env_set, .env file, or secrets.db). Host process.env was already
|
|
453
|
+
// scrubbed by scrubProcessEnv() so no host credentials leak through here.
|
|
454
|
+
//
|
|
455
|
+
// IMPORTANT: This env is for TRUSTED children (scheduler-spawned tasks and
|
|
456
|
+
// MCP server processes whose env is declared in config.yaml). It is NOT safe
|
|
457
|
+
// for exec-tool children, which run agent-issued shell commands sourced from
|
|
458
|
+
// attacker-controllable channels (Discord, email, webhooks, prompt injection,
|
|
459
|
+
// etc.). Exec-tool gets its own credential-free env (`execToolEnv` below).
|
|
460
|
+
const SUBPROCESS_SYSTEM = ["PATH", "HOME", "LANG", "TERM", "NODE_ENV", "TZ"];
|
|
461
|
+
const subprocessEnv = envSubset(container.secretManager, [...SUBPROCESS_SYSTEM, ...container.secretManager.keys()]);
|
|
462
|
+
// Credential-free env for the exec tool (agent-issued shell commands).
|
|
463
|
+
// Strips ANTHROPIC_API_KEY, OPENAI_API_KEY, COMIS_GATEWAY_TOKEN, etc. so an
|
|
464
|
+
// LLM-induced prompt injection cannot exfiltrate daemon credentials via a
|
|
465
|
+
// simple `env` or `printenv` call inside the sandbox. System vars only.
|
|
466
|
+
const execToolEnv = envSubset(container.secretManager, [...SUBPROCESS_SYSTEM]);
|
|
467
|
+
// Deferred wake callback -- wired after wakeCoalescer is created
|
|
468
|
+
// eslint-disable-next-line prefer-const -- assigned later after wakeCoalescer is created
|
|
469
|
+
let cronWakeCallback;
|
|
470
|
+
// 6.6.4.9. System event queue (created early for cron-heartbeat routing)
|
|
471
|
+
const systemEventQueue = createSystemEventQueue({ logger: schedulerLogger });
|
|
472
|
+
// 6.6.5. Schedulers
|
|
473
|
+
const { cronSchedulers, executionTrackers, browserServices, resetSchedulers, getAgentCronScheduler, getAgentBrowserService, } = await setupSchedulers({
|
|
474
|
+
container, workspaceDirs, sessionStore, sessionManager,
|
|
475
|
+
schedulerLogger, agentLogger, skillsLogger,
|
|
476
|
+
subprocessEnv,
|
|
477
|
+
systemEventQueue, // cron-heartbeat routing
|
|
478
|
+
onCronWake: (reason) => cronWakeCallback?.(reason), // deferred
|
|
479
|
+
});
|
|
480
|
+
// Clean up all session-scoped state on session expiry
|
|
481
|
+
wireSessionStateCleanup(container.eventBus);
|
|
482
|
+
// Per-session FileStateTracker pool -- keeps the LLM's file read state
|
|
483
|
+
// alive across turns. Registered trackers are released on session:expired.
|
|
484
|
+
// Factory is injected to keep the agent package free of a skills dep.
|
|
485
|
+
const sessionTrackerRegistry = createSessionTrackerRegistry(createFileStateTracker);
|
|
486
|
+
container.eventBus.on("session:expired", (payload) => {
|
|
487
|
+
sessionTrackerRegistry.release(formatSessionKey(payload.sessionKey));
|
|
488
|
+
});
|
|
489
|
+
// Dispose Gemini cache on session expiry (fire-and-forget)
|
|
490
|
+
wireGeminiCacheCleanup(container.eventBus, geminiCacheManager);
|
|
491
|
+
// Clean up orphaned comis:* caches from previous daemon runs
|
|
492
|
+
suppressError(geminiCacheManager.cleanupOrphaned().then((result) => {
|
|
493
|
+
if (result.ok && (result.value.deleted > 0 || result.value.skipped > 0)) {
|
|
494
|
+
daemonLogger.info({ deleted: result.value.deleted, skipped: result.value.skipped }, "Gemini cache: orphan cleanup complete");
|
|
495
|
+
}
|
|
496
|
+
}), "gemini-cache-orphan-cleanup");
|
|
497
|
+
// Clean up discovery state when MCP servers disconnect or remove tools
|
|
498
|
+
wireMcpDisconnectCleanup(container.eventBus);
|
|
499
|
+
// 6.6.5.5. Task extraction (conversation -> extracted tasks pipeline)
|
|
500
|
+
const { extractFromConversation } = setupTaskExtraction({
|
|
501
|
+
container, workspaceDirs, schedulerLogger,
|
|
502
|
+
});
|
|
503
|
+
// Audit aggregator for deduplicating security events
|
|
504
|
+
const auditAggregator = createAuditAggregator(container.eventBus, undefined, skillsLogger);
|
|
505
|
+
const onSuspiciousContent = (info) => {
|
|
506
|
+
auditAggregator.record({
|
|
507
|
+
source: "external_content",
|
|
508
|
+
patterns: info.patterns,
|
|
509
|
+
});
|
|
510
|
+
};
|
|
511
|
+
// 6.6.7. Media (moved up from 6.6.8 -- media infrastructure must be ready before channels)
|
|
512
|
+
const { ttsAdapter, visionRegistry, linkRunner, mediaTempManager, mediaSemaphore, audioConverter, transcriber, ssrfFetcher, fileExtractor, } = await _setupMedia({ container, skillsLogger, onSuspiciousContent });
|
|
513
|
+
// 6.6.7.5. RPC bridge (deferred dispatch) -- moved before setupChannels so rpcCall
|
|
514
|
+
// can be threaded into channel config command handling. The deferred dispatch pattern
|
|
515
|
+
// ensures rpcCall is safe to pass now; actual dispatch wires later via wireDispatch().
|
|
516
|
+
const { rpcCall, wireDispatch } = setupRpcBridge({ gatewayLogger });
|
|
517
|
+
// 6.6.8.6. Approval gate (moved before channels for APPR-CHAT command interception)
|
|
518
|
+
const approvalGate = createApprovalGate({
|
|
519
|
+
eventBus: container.eventBus,
|
|
520
|
+
getTimeoutMs: () => container.config.approvals?.defaultTimeoutMs ?? 30_000,
|
|
521
|
+
getDenialCacheTtlMs: () => container.config.approvals?.denialCacheTtlMs ?? 60_000,
|
|
522
|
+
getBatchApprovalTtlMs: () => container.config.approvals?.batchApprovalTtlMs ?? 30_000,
|
|
523
|
+
logger: daemonLogger, // Approval cache hit/miss debug logging
|
|
524
|
+
});
|
|
525
|
+
// 6.6.8.6.1. Restore pending approvals from previous restart (quick-174)
|
|
526
|
+
const approvalRestorePath = pathJoin(container.config.dataDir || dataDir, "restart-approvals.json");
|
|
527
|
+
if (existsSync(approvalRestorePath)) {
|
|
528
|
+
try {
|
|
529
|
+
const raw = readFileSync(approvalRestorePath, "utf-8");
|
|
530
|
+
const records = JSON.parse(raw);
|
|
531
|
+
unlinkSync(approvalRestorePath);
|
|
532
|
+
const restored = approvalGate.restorePending(records);
|
|
533
|
+
if (restored > 0) {
|
|
534
|
+
daemonLogger.info({ count: restored, total: records.length }, "Pending approvals restored from previous session");
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
catch (restoreErr) {
|
|
538
|
+
daemonLogger.warn({ err: restoreErr, hint: "Could not restore pending approvals; operators may need to re-approve", errorKind: "internal" }, "Failed to restore pending approvals");
|
|
539
|
+
try {
|
|
540
|
+
unlinkSync(approvalRestorePath);
|
|
541
|
+
}
|
|
542
|
+
catch { /* ignore */ }
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
// 6.6.8.6.2. Restore approval cache from previous session
|
|
546
|
+
const approvalCacheRestorePath = pathJoin(container.config.dataDir || dataDir, "restart-approval-cache.json");
|
|
547
|
+
if (existsSync(approvalCacheRestorePath)) {
|
|
548
|
+
try {
|
|
549
|
+
const raw = readFileSync(approvalCacheRestorePath, "utf-8");
|
|
550
|
+
unlinkSync(approvalCacheRestorePath); // Consume immediately
|
|
551
|
+
const entries = JSON.parse(raw);
|
|
552
|
+
const restored = approvalGate.restoreApprovalCache(entries);
|
|
553
|
+
if (restored > 0) {
|
|
554
|
+
daemonLogger.info({ count: restored, total: entries.length }, "Approval cache restored from previous session");
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
catch (restoreErr) {
|
|
558
|
+
daemonLogger.warn({ err: restoreErr, hint: "Could not restore approval cache; users may need to re-approve", errorKind: "internal" }, "Failed to restore approval cache");
|
|
559
|
+
try {
|
|
560
|
+
unlinkSync(approvalCacheRestorePath);
|
|
561
|
+
}
|
|
562
|
+
catch { /* ignore */ }
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
// 6.6.7.8. Delivery queue: create adapter BEFORE setupChannels.
|
|
566
|
+
// channelAdapters map is passed by reference -- populated after setupChannels.
|
|
567
|
+
// drainAndStartPrune() is called AFTER setupChannels (two-phase lifecycle).
|
|
568
|
+
const channelAdaptersRef = new Map();
|
|
569
|
+
const { deliveryQueue, drainAndStartPrune: drainAndStartDeliveryPrune, shutdown: shutdownDeliveryQueue } = await setupDeliveryQueue({
|
|
570
|
+
db, config: container.config, eventBus: container.eventBus, logger: daemonLogger, channelAdapters: channelAdaptersRef,
|
|
571
|
+
});
|
|
572
|
+
// 6.6.8. Channels (moved down from 6.6.6 -- needs ssrfFetcher and transcriber from setupMedia)
|
|
573
|
+
// Deferred tool assembler ref: wired after setupTools returns (avoids TDZ --
|
|
574
|
+
// the Telegram adapter starts polling immediately and messages can arrive
|
|
575
|
+
// before setupTools completes).
|
|
576
|
+
// Deferred notification session tracker ref: wired after setupNotifications returns.
|
|
577
|
+
// The onMessageProcessed callback reads this at call time (not definition time),
|
|
578
|
+
// so it is always set before any message arrives.
|
|
579
|
+
const sessionTrackerRef = {};
|
|
580
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches assembleToolsForAgent signature from setup-tools.ts
|
|
581
|
+
const toolAssemblerRef = {};
|
|
582
|
+
const { adaptersByType, channelManager, resolveAttachment, lifecycleReactors, channelPlugins, commandQueue } = await setupChannels({
|
|
583
|
+
container, executors, defaultAgentId, sessionManager, sessionStore,
|
|
584
|
+
logger, channelsLogger,
|
|
585
|
+
linkRunner,
|
|
586
|
+
ssrfFetcher,
|
|
587
|
+
transcriber,
|
|
588
|
+
maxMediaBytes: container.config.integrations.media.infrastructure.maxRemoteFetchBytes,
|
|
589
|
+
assembleToolsForAgent: (agentId, options) => toolAssemblerRef.ref ? toolAssemblerRef.ref(agentId, options) : Promise.resolve([]),
|
|
590
|
+
// Voice response pipeline deps
|
|
591
|
+
ttsAdapter,
|
|
592
|
+
audioConverter,
|
|
593
|
+
mediaTempManager,
|
|
594
|
+
mediaSemaphore,
|
|
595
|
+
// Document extraction pipeline
|
|
596
|
+
fileExtractor,
|
|
597
|
+
fileExtractionConfig: container.config.integrations.media.documentExtraction,
|
|
598
|
+
// Media file persistence pipeline
|
|
599
|
+
workspaceDirs,
|
|
600
|
+
defaultWorkspaceDir,
|
|
601
|
+
memoryAdapter,
|
|
602
|
+
tenantId: container.config.tenantId,
|
|
603
|
+
embeddingQueue,
|
|
604
|
+
// Pass queue config for per-session serialization
|
|
605
|
+
queueConfig: container.config.queue,
|
|
606
|
+
// steer+followup inbound routing
|
|
607
|
+
activeRunRegistry,
|
|
608
|
+
// /config chat command handling via deferred RPC dispatch
|
|
609
|
+
rpcCall,
|
|
610
|
+
// Task extraction callback (gated by config.scheduler.tasks.enabled)
|
|
611
|
+
onTaskExtraction: extractFromConversation,
|
|
612
|
+
// Restart continuation: track recently-active sessions for SIGUSR2 replay
|
|
613
|
+
onMessageProcessed: (msg, channelType) => {
|
|
614
|
+
continuationTracker.track({
|
|
615
|
+
agentId: defaultAgentId,
|
|
616
|
+
channelType,
|
|
617
|
+
channelId: msg.channelId,
|
|
618
|
+
userId: msg.senderId,
|
|
619
|
+
tenantId: container.config.tenantId,
|
|
620
|
+
timestamp: Date.now(),
|
|
621
|
+
});
|
|
622
|
+
// Record session activity for notification channel resolution fallback.
|
|
623
|
+
// sessionTrackerRef is populated after setupNotifications() returns (below).
|
|
624
|
+
sessionTrackerRef.ref?.recordActivity(defaultAgentId, channelType, msg.channelId);
|
|
625
|
+
},
|
|
626
|
+
// /approve and /deny chat command interception
|
|
627
|
+
approvalGate: container.config.approvals?.enabled ? approvalGate : undefined,
|
|
628
|
+
// CMD-WIRE: Per-agent session adapters and cost trackers for slash commands
|
|
629
|
+
piSessionAdapters,
|
|
630
|
+
costTrackers,
|
|
631
|
+
// Delivery queue for crash-safe persistence
|
|
632
|
+
deliveryQueue,
|
|
633
|
+
// Cron execution trackers for enriched JSONL entries
|
|
634
|
+
cronExecutionTrackers: executionTrackers,
|
|
635
|
+
});
|
|
636
|
+
// Populate channel plugins ref for per-message char limit resolution.
|
|
637
|
+
channelPluginsRef.ref = channelPlugins;
|
|
638
|
+
// Populate channelAdapters ref now that setupChannels has returned.
|
|
639
|
+
// The drain cycle needs adapters to re-deliver pending messages.
|
|
640
|
+
for (const [type, adapter] of adaptersByType) {
|
|
641
|
+
channelAdaptersRef.set(type, adapter);
|
|
642
|
+
}
|
|
643
|
+
// Run drain + start prune timer (two-phase lifecycle: adapter was created above).
|
|
644
|
+
await drainAndStartDeliveryPrune();
|
|
645
|
+
// Register delivery queue shutdown (clears prune interval)
|
|
646
|
+
container.eventBus.on("system:shutdown", () => { shutdownDeliveryQueue(); });
|
|
647
|
+
// Start mirror prune timer and register shutdown
|
|
648
|
+
startMirrorPrune();
|
|
649
|
+
container.eventBus.on("system:shutdown", () => { shutdownMirror(); });
|
|
650
|
+
// Structured logging for delivery queue lifecycle events
|
|
651
|
+
setupDeliveryQueueLogging({ eventBus: container.eventBus, logger: daemonLogger });
|
|
652
|
+
// 6.6.8.0.1. Notification system (Proactive v1)
|
|
653
|
+
// setupNotifications creates the NotificationService and SessionTracker.
|
|
654
|
+
// The factory is already complete -- this call wires it into the daemon.
|
|
655
|
+
const notificationContext = setupNotifications({
|
|
656
|
+
eventBus: container.eventBus,
|
|
657
|
+
deliveryQueue,
|
|
658
|
+
agents,
|
|
659
|
+
quietHoursConfig: container.config.scheduler.quietHours,
|
|
660
|
+
criticalBypass: container.config.scheduler.quietHours.criticalBypass,
|
|
661
|
+
activeAdapterTypes: new Set(adaptersByType.keys()),
|
|
662
|
+
logger: daemonLogger,
|
|
663
|
+
tenantId: container.config.tenantId,
|
|
664
|
+
});
|
|
665
|
+
// Wire deferred session tracker ref for onMessageProcessed callback
|
|
666
|
+
sessionTrackerRef.ref = notificationContext.sessionTracker;
|
|
667
|
+
// Wire deferred notification ref for background task completion callbacks
|
|
668
|
+
bgNotifyRef.ref = notificationContext.notificationService;
|
|
669
|
+
// Channel health monitor -- polls adapter getStatus() at configurable interval.
|
|
670
|
+
// Created after adapters are initialized, started immediately with the adapter map.
|
|
671
|
+
let channelHealthMonitor;
|
|
672
|
+
let stopChannelHealthMonitor;
|
|
673
|
+
const healthCheckConfig = container.config.channels?.healthCheck;
|
|
674
|
+
if (healthCheckConfig?.enabled !== false) {
|
|
675
|
+
channelHealthMonitor = createChannelHealthMonitor({
|
|
676
|
+
eventBus: container.eventBus,
|
|
677
|
+
pollIntervalMs: healthCheckConfig?.pollIntervalMs,
|
|
678
|
+
staleThresholdMs: healthCheckConfig?.staleThresholdMs,
|
|
679
|
+
idleThresholdMs: healthCheckConfig?.idleThresholdMs,
|
|
680
|
+
errorThreshold: healthCheckConfig?.errorThreshold,
|
|
681
|
+
stuckThresholdMs: healthCheckConfig?.stuckThresholdMs,
|
|
682
|
+
startupGraceMs: healthCheckConfig?.startupGraceMs,
|
|
683
|
+
autoRestartOnStale: healthCheckConfig?.autoRestartOnStale,
|
|
684
|
+
maxRestartsPerHour: healthCheckConfig?.maxRestartsPerHour,
|
|
685
|
+
restartCooldownMs: healthCheckConfig?.restartCooldownMs,
|
|
686
|
+
restartAdapter: async (channelType) => {
|
|
687
|
+
const adapter = adaptersByType.get(channelType);
|
|
688
|
+
if (!adapter)
|
|
689
|
+
return;
|
|
690
|
+
daemonLogger.info({ channelType }, "Health monitor triggering auto-restart for stale adapter");
|
|
691
|
+
await adapter.stop();
|
|
692
|
+
await adapter.start();
|
|
693
|
+
},
|
|
694
|
+
});
|
|
695
|
+
stopChannelHealthMonitor = channelHealthMonitor.start(adaptersByType);
|
|
696
|
+
}
|
|
697
|
+
// Register health monitor shutdown on system:shutdown event
|
|
698
|
+
container.eventBus.on("system:shutdown", () => { stopChannelHealthMonitor?.(); });
|
|
699
|
+
// Structured logging for channel health state transitions
|
|
700
|
+
setupChannelHealthLogging({ eventBus: container.eventBus, logger: daemonLogger });
|
|
701
|
+
// 6.6.8.7. MCP server connections (external tool servers)
|
|
702
|
+
const { mcpClientManager } = await setupMcp({
|
|
703
|
+
servers: container.config.integrations.mcp.servers,
|
|
704
|
+
logger: skillsLogger,
|
|
705
|
+
callToolTimeoutMs: container.config.integrations.mcp.callToolTimeoutMs,
|
|
706
|
+
defaultCwd: defaultWorkspaceDir,
|
|
707
|
+
eventBus: container.eventBus,
|
|
708
|
+
stdioDefaultConcurrency: container.config.integrations.mcp.stdioDefaultConcurrency,
|
|
709
|
+
httpDefaultConcurrency: container.config.integrations.mcp.httpDefaultConcurrency,
|
|
710
|
+
});
|
|
711
|
+
// Detect sandbox provider once at startup
|
|
712
|
+
const sandboxProvider = detectSandboxProvider(skillsLogger);
|
|
713
|
+
if (sandboxProvider) {
|
|
714
|
+
skillsLogger.info({ provider: sandboxProvider.name }, "Exec sandbox provider detected");
|
|
715
|
+
}
|
|
716
|
+
// 6.6.8.4.1. Image generation provider (Proactive v1 -- IMGN)
|
|
717
|
+
const imageGenConfig = container.config.integrations.media.imageGeneration;
|
|
718
|
+
const imageGenResult = createImageGenProvider(imageGenConfig, container.secretManager);
|
|
719
|
+
const imageGenProvider = imageGenResult.ok ? imageGenResult.value : undefined;
|
|
720
|
+
const imageGenRateLimiter = imageGenProvider
|
|
721
|
+
? createImageGenRateLimiter({ maxPerHour: imageGenConfig.maxPerHour })
|
|
722
|
+
: undefined;
|
|
723
|
+
if (imageGenProvider) {
|
|
724
|
+
skillsLogger.info({ provider: imageGenConfig.provider }, "Image generation provider initialized");
|
|
725
|
+
}
|
|
726
|
+
else if (imageGenResult.ok) {
|
|
727
|
+
skillsLogger.debug("Image generation disabled: API key not configured");
|
|
728
|
+
}
|
|
729
|
+
else {
|
|
730
|
+
skillsLogger.warn({ err: imageGenResult.error, hint: "Check image generation config provider value", errorKind: "config" }, "Image generation provider creation failed");
|
|
731
|
+
}
|
|
732
|
+
// 6.6.8.5. Tools + message preprocessing
|
|
733
|
+
const { assembleToolsForAgent, preprocessMessageText } = setupTools({
|
|
734
|
+
rpcCall, agents, defaultAgentId, workspaceDirs, defaultWorkspaceDir,
|
|
735
|
+
dataDir: container.config.dataDir || ".",
|
|
736
|
+
secretManager: container.secretManager,
|
|
737
|
+
platformSecretNames: container.platformSecretNames,
|
|
738
|
+
eventBus: container.eventBus, skillsLogger, linkRunner,
|
|
739
|
+
approvalGate: container.config.approvals?.enabled ? approvalGate : undefined,
|
|
740
|
+
subprocessEnv: execToolEnv,
|
|
741
|
+
onSuspiciousContent,
|
|
742
|
+
mcpClientManager,
|
|
743
|
+
sandboxProvider,
|
|
744
|
+
imageGenProvider, // Conditional: only registered when API key is present
|
|
745
|
+
backgroundTaskManager, // Background_tasks tool registration
|
|
746
|
+
sessionTrackerRegistry,
|
|
747
|
+
});
|
|
748
|
+
// Wire deferred tool assembler ref now that setupTools has returned
|
|
749
|
+
toolAssemblerRef.ref = assembleToolsForAgent;
|
|
750
|
+
// 6.6.9. Cross-session sender + sub-agent runner
|
|
751
|
+
// Deferred gateway send ref: wired after setupGateway returns wsConnections
|
|
752
|
+
const gatewaySendRef = {};
|
|
753
|
+
const { crossSessionSender, subAgentRunner, sendToChannel, announceToParent, deadLetterQueue, announcementBatcher } = setupCrossSession({
|
|
754
|
+
sessionStore, container, assembleToolsForAgent, getExecutor, adaptersByType,
|
|
755
|
+
logger: agentLogger,
|
|
756
|
+
memoryAdapter,
|
|
757
|
+
gatewaySend: gatewaySendRef,
|
|
758
|
+
activeRunRegistry,
|
|
759
|
+
deliveryQueue,
|
|
760
|
+
});
|
|
761
|
+
// Rolling prompt timeout counter (sliding 5-minute window).
|
|
762
|
+
// Timestamps are pushed on every execution:prompt_timeout event. Pruning
|
|
763
|
+
// happens at read time inside the health log handler to avoid timer overhead.
|
|
764
|
+
const promptTimeoutTimestamps = [];
|
|
765
|
+
container.eventBus.on("execution:prompt_timeout", () => {
|
|
766
|
+
promptTimeoutTimestamps.push(Date.now());
|
|
767
|
+
});
|
|
768
|
+
// 6.6.9.0. Node type registry (initially empty; drivers registered at startup)
|
|
769
|
+
const nodeTypeRegistry = createNodeTypeRegistry();
|
|
770
|
+
// 6.6.9.1. Graph coordinator for DAG execution
|
|
771
|
+
const graphCoordinator = createGraphCoordinator({
|
|
772
|
+
subAgentRunner,
|
|
773
|
+
eventBus: container.eventBus,
|
|
774
|
+
sendToChannel,
|
|
775
|
+
announceToParent,
|
|
776
|
+
batcher: announcementBatcher,
|
|
777
|
+
tenantId: container.config.tenantId,
|
|
778
|
+
defaultAgentId,
|
|
779
|
+
maxConcurrency: container.config.security.agentToAgent.graphMaxConcurrency ?? 4,
|
|
780
|
+
maxResultLength: container.config.security.agentToAgent.graphMaxResultLength,
|
|
781
|
+
maxGlobalSubAgents: container.config.security.agentToAgent.graphMaxGlobalSubAgents,
|
|
782
|
+
logger: agentLogger?.child?.({ submodule: "graph-coordinator" }),
|
|
783
|
+
dataDir: container.config.dataDir || dataDir,
|
|
784
|
+
nodeTypeRegistry,
|
|
785
|
+
activeRunRegistry, // Parent-session-gone detection for graph completion
|
|
786
|
+
// Provide tool assembly for graph-wide superset computation and prewarm.
|
|
787
|
+
// Returns full tool definitions (name + description + inputSchema) so prewarm
|
|
788
|
+
// can send byte-identical tool schemas to seed the cache prefix.
|
|
789
|
+
assembleToolsForAgent: async (agentId) => {
|
|
790
|
+
const tools = await assembleToolsForAgent(agentId);
|
|
791
|
+
return tools.map((t) => ({
|
|
792
|
+
name: t.name,
|
|
793
|
+
description: t.description,
|
|
794
|
+
inputSchema: t.inputSchema,
|
|
795
|
+
}));
|
|
796
|
+
},
|
|
797
|
+
// Keep parent session lane alive during graph execution
|
|
798
|
+
touchParentSession: commandQueue
|
|
799
|
+
? (sessionKey) => commandQueue.touchLane(sessionKey)
|
|
800
|
+
: undefined,
|
|
801
|
+
// Pre-warm cache prefix for Anthropic graph executions.
|
|
802
|
+
// Seeds system prompt + tools into Anthropic's cache before graph nodes spawn,
|
|
803
|
+
// so all nodes get cache reads instead of independent cold writes.
|
|
804
|
+
// Tools field is populated eagerly -- the graph coordinator awaits toolSupersetPromise
|
|
805
|
+
// before calling preWarmGraphCache, but the deps.preWarm.tools field provides the full
|
|
806
|
+
// tool definitions (with description + inputSchema) for the prewarm API call.
|
|
807
|
+
// assembleToolsForAgent is called lazily at graph start time, so we provide the
|
|
808
|
+
// resolver function via a getter pattern: the coordinator resolves tools from
|
|
809
|
+
// the superset at prewarm time using deps.assembleToolsForAgent (already wired above).
|
|
810
|
+
preWarm: (() => {
|
|
811
|
+
const agentCfg = agents[defaultAgentId];
|
|
812
|
+
const provider = agentCfg?.provider ?? "anthropic";
|
|
813
|
+
const resolvedModel = agentCfg?.model === "default" || !agentCfg?.model
|
|
814
|
+
? "claude-sonnet-4-5-20250929"
|
|
815
|
+
: agentCfg.model;
|
|
816
|
+
const apiKey = container.secretManager.get("anthropic-api-key")
|
|
817
|
+
?? container.secretManager.get("ANTHROPIC_API_KEY") ?? "";
|
|
818
|
+
if (!apiKey)
|
|
819
|
+
return undefined;
|
|
820
|
+
return {
|
|
821
|
+
provider,
|
|
822
|
+
modelId: resolvedModel,
|
|
823
|
+
apiKey,
|
|
824
|
+
systemPrompt: agentCfg?.name
|
|
825
|
+
? `You are ${agentCfg.name}. You are a helpful AI assistant.`
|
|
826
|
+
: "You are a helpful AI assistant.",
|
|
827
|
+
tools: [],
|
|
828
|
+
};
|
|
829
|
+
})(),
|
|
830
|
+
});
|
|
831
|
+
// Late-bind graph coordinator into sub-agent runner for direct kill cascade
|
|
832
|
+
subAgentRunner.setGraphCoordinator(graphCoordinator);
|
|
833
|
+
// 6.6.9.2. Named graph store for server-side pipeline persistence
|
|
834
|
+
const namedGraphStore = createNamedGraphStore(db);
|
|
835
|
+
// 6.7. Monitoring (adaptersByType passed for delivery bridge wiring)
|
|
836
|
+
const { heartbeatRunner, duplicateDetector } = setupMonitoring({ container, schedulerLogger, logger, adaptersByType });
|
|
837
|
+
// 6.7.0.0. Per-agent heartbeat with LLM-driven agent turns
|
|
838
|
+
const { perAgentRunner } = setupHeartbeat({
|
|
839
|
+
container,
|
|
840
|
+
executors,
|
|
841
|
+
assembleToolsForAgent,
|
|
842
|
+
workspaceDirs,
|
|
843
|
+
activeRunRegistry,
|
|
844
|
+
duplicateDetector,
|
|
845
|
+
adaptersByType,
|
|
846
|
+
systemEventQueue,
|
|
847
|
+
memoryApi,
|
|
848
|
+
schedulerLogger,
|
|
849
|
+
});
|
|
850
|
+
// 6.7.0.1. Wake coalescer wrapping heartbeatRunner
|
|
851
|
+
const wakeCoalescer = createWakeCoalescer({
|
|
852
|
+
runOnce: () => (heartbeatRunner ? heartbeatRunner.runOnce() : Promise.resolve()),
|
|
853
|
+
logger: schedulerLogger,
|
|
854
|
+
});
|
|
855
|
+
// Wire deferred cron wake callback
|
|
856
|
+
cronWakeCallback = (reason) => wakeCoalescer.requestHeartbeatNow(reason);
|
|
857
|
+
// 6.7.0.2. Agent management runtime state
|
|
858
|
+
const suspendedAgents = new Set();
|
|
859
|
+
// Model catalog for model management handlers
|
|
860
|
+
const modelCatalog = createModelCatalog();
|
|
861
|
+
modelCatalog.loadStatic();
|
|
862
|
+
// Channel config for channel management handlers
|
|
863
|
+
const channelConfig = Object.fromEntries(Object.entries(container.config.channels ?? {}).filter(([k, v]) => k !== "healthCheck" && typeof v === "object" && v !== null && "enabled" in v).map(([k, v]) => [k, { enabled: !!v.enabled }]));
|
|
864
|
+
// Token registry for token management handlers
|
|
865
|
+
const gwTokens = (container.config.gateway?.tokens ?? []).map((t) => ({
|
|
866
|
+
id: t.id ?? "unknown",
|
|
867
|
+
scopes: [...(t.scopes ?? [])],
|
|
868
|
+
}));
|
|
869
|
+
const tokenRegistry = createTokenRegistry(gwTokens);
|
|
870
|
+
const runtimeTokens = [];
|
|
871
|
+
const removedTokenIds = new Set();
|
|
872
|
+
// Resolve gateway token secrets at startup (config -> env -> auto-generate)
|
|
873
|
+
const resolvedGatewayTokens = [];
|
|
874
|
+
for (const t of container.config.gateway?.tokens ?? []) {
|
|
875
|
+
const tokenId = t.id ?? "unknown";
|
|
876
|
+
const tokenScopes = [...(t.scopes ?? [])];
|
|
877
|
+
if (typeof t.secret === "string" && t.secret.length >= 32) {
|
|
878
|
+
// Source: config (explicit secret present and valid)
|
|
879
|
+
resolvedGatewayTokens.push({ id: tokenId, secret: t.secret, scopes: tokenScopes });
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
const envKey = `GATEWAY_TOKEN_${tokenId.toUpperCase().replace(/-/g, "_")}`;
|
|
883
|
+
const envSecret = container.secretManager.get(envKey);
|
|
884
|
+
if (envSecret) {
|
|
885
|
+
// Source: env / SecretManager
|
|
886
|
+
resolvedGatewayTokens.push({ id: tokenId, secret: envSecret, scopes: tokenScopes });
|
|
887
|
+
}
|
|
888
|
+
else {
|
|
889
|
+
// Source: auto-generated (ephemeral)
|
|
890
|
+
const generated = generateStrongToken();
|
|
891
|
+
resolvedGatewayTokens.push({ id: tokenId, secret: generated, scopes: tokenScopes });
|
|
892
|
+
daemonLogger.warn({ tokenId, envVar: envKey, hint: `Set ${envKey} in environment or secrets store for persistence`, errorKind: "config" }, "Gateway token auto-generated (ephemeral -- will be lost on restart)");
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
// 6.7.0.5. Session store bridge (shared between RPC dispatch and DaemonInstance return)
|
|
897
|
+
const sessionStoreBridge = {
|
|
898
|
+
listDetailed: (tenantId) => sessionStore.listDetailed(tenantId),
|
|
899
|
+
loadByFormattedKey: (key) => sessionStore.loadByFormattedKey(key),
|
|
900
|
+
deleteByFormattedKey: (key) => {
|
|
901
|
+
const parsed = parseFormattedSessionKey(key);
|
|
902
|
+
if (!parsed)
|
|
903
|
+
return false;
|
|
904
|
+
return sessionStore.delete(parsed);
|
|
905
|
+
},
|
|
906
|
+
saveByFormattedKey: (key, messages, metadata) => {
|
|
907
|
+
const parsed = parseFormattedSessionKey(key);
|
|
908
|
+
if (!parsed)
|
|
909
|
+
return;
|
|
910
|
+
sessionStore.save(parsed, messages, metadata);
|
|
911
|
+
},
|
|
912
|
+
};
|
|
913
|
+
// Mutable shutdown ref for hot-add guard.
|
|
914
|
+
// Closures must be defined before wireDispatch() so the { ...deps }
|
|
915
|
+
// spread in createAgentHandlers captures them. But shutdownHandle is created
|
|
916
|
+
// after wireDispatch at setupShutdown(). We use a mutable ref that
|
|
917
|
+
// is assigned after setupShutdown -- closures read it at RPC call time, not
|
|
918
|
+
// definition time, so it is always set before any RPC arrives.
|
|
919
|
+
const shutdownRef = {};
|
|
920
|
+
// Hot-add/hot-remove closures for runtime agent lifecycle.
|
|
921
|
+
// These closures capture the destructured Maps by reference. All consumers
|
|
922
|
+
// (channels, tools, gateway, RPC) hold references to the same Maps, so
|
|
923
|
+
// inserting/deleting once makes the agent visible/invisible everywhere.
|
|
924
|
+
const hotAdd = async (agentId, config) => {
|
|
925
|
+
const startMs = Date.now();
|
|
926
|
+
if (shutdownRef.value?.isShuttingDown) {
|
|
927
|
+
throw new Error("Cannot hot-add agent during shutdown");
|
|
928
|
+
}
|
|
929
|
+
const result = await setupSingleAgent(agentId, config, singleAgentDeps);
|
|
930
|
+
executors.set(agentId, result.executor);
|
|
931
|
+
workspaceDirs.set(agentId, result.workspaceDir);
|
|
932
|
+
costTrackers.set(agentId, result.costTracker);
|
|
933
|
+
budgetGuards.set(agentId, result.budgetGuard);
|
|
934
|
+
stepCounters.set(agentId, result.stepCounter);
|
|
935
|
+
piSessionAdapters.set(agentId, result.piSessionAdapter);
|
|
936
|
+
if (result.skillWatcherHandle) {
|
|
937
|
+
skillWatcherHandles.set(agentId, result.skillWatcherHandle);
|
|
938
|
+
}
|
|
939
|
+
skillRegistries.set(agentId, result.skillRegistry);
|
|
940
|
+
container.eventBus.emit("agent:hot_added", { agentId, timestamp: Date.now() });
|
|
941
|
+
daemonLogger.info({ agentId, durationMs: Date.now() - startMs }, "Agent hot-added to running daemon");
|
|
942
|
+
};
|
|
943
|
+
const hotRemove = async (agentId) => {
|
|
944
|
+
const startMs = Date.now();
|
|
945
|
+
// Warn if agent may have active executions.
|
|
946
|
+
// ActiveRunRegistry is keyed by sessionKey, not agentId. Since hot-remove is
|
|
947
|
+
// rare and the registry is small, a coarse size > 0 check is sufficient for v1.
|
|
948
|
+
if (activeRunRegistry.size > 0) {
|
|
949
|
+
daemonLogger.warn({ agentId, activeRuns: activeRunRegistry.size,
|
|
950
|
+
hint: "Agent removed while daemon has active executions; if this agent has an in-flight run it will complete but response delivery may fail",
|
|
951
|
+
errorKind: "operational" }, "Hot-removing agent with possible active executions");
|
|
952
|
+
}
|
|
953
|
+
// Stop skill watcher if present
|
|
954
|
+
const watcher = skillWatcherHandles.get(agentId);
|
|
955
|
+
if (watcher) {
|
|
956
|
+
await watcher.close();
|
|
957
|
+
skillWatcherHandles.delete(agentId);
|
|
958
|
+
}
|
|
959
|
+
// Remove from all Maps (workspace dir preserved on disk for data safety)
|
|
960
|
+
executors.delete(agentId);
|
|
961
|
+
workspaceDirs.delete(agentId);
|
|
962
|
+
costTrackers.delete(agentId);
|
|
963
|
+
budgetGuards.delete(agentId);
|
|
964
|
+
stepCounters.delete(agentId);
|
|
965
|
+
piSessionAdapters.delete(agentId);
|
|
966
|
+
skillRegistries.delete(agentId);
|
|
967
|
+
container.eventBus.emit("agent:hot_removed", { agentId, timestamp: Date.now() });
|
|
968
|
+
daemonLogger.info({ agentId, durationMs: Date.now() - startMs }, "Agent hot-removed from running daemon");
|
|
969
|
+
};
|
|
970
|
+
// 6.7.1. Wire RPC dispatch now that heartbeatRunner is available
|
|
971
|
+
// Keep a reference so we can add wsConnections/mediaDir after gateway setup (quick-91).
|
|
972
|
+
const rpcDispatchDeps = {
|
|
973
|
+
defaultAgentId, getAgentCronScheduler, cronSchedulers, executionTrackers,
|
|
974
|
+
wakeCoalescer, defaultWorkspaceDir, workspaceDirs, memoryApi, memoryAdapter,
|
|
975
|
+
embeddingQueue, tenantId: container.config.tenantId, agents, costTrackers,
|
|
976
|
+
stepCounters,
|
|
977
|
+
agentDataDir: pathJoin(container.config.dataDir ?? pathJoin(os.homedir(), ".comis"), "agents"),
|
|
978
|
+
sessionStore: sessionStoreBridge,
|
|
979
|
+
crossSessionSender, subAgentRunner, graphCoordinator, namedGraphStore, nodeTypeRegistry,
|
|
980
|
+
securityConfig: container.config.security, adaptersByType, visionRegistry,
|
|
981
|
+
mediaConfig: container.config.integrations.media, ttsAdapter, linkRunner,
|
|
982
|
+
logger, container, configPaths, defaultConfigPaths: DEFAULT_CONFIG_PATHS,
|
|
983
|
+
configGitManager,
|
|
984
|
+
configWebhook: container.config.daemon.configWebhook,
|
|
985
|
+
secretStore,
|
|
986
|
+
envFilePath: envPath,
|
|
987
|
+
logLevelManager,
|
|
988
|
+
getAgentBrowserService,
|
|
989
|
+
resolveAttachment, transcriber, fileExtractor,
|
|
990
|
+
approvalGate,
|
|
991
|
+
suspendedAgents,
|
|
992
|
+
hotAdd, // runtime agent creation without restart
|
|
993
|
+
hotRemove, // runtime agent deletion without restart
|
|
994
|
+
diagnosticCollector, billingEstimator, channelActivityTracker, deliveryTracer,
|
|
995
|
+
budgetGuards,
|
|
996
|
+
modelCatalog,
|
|
997
|
+
channelConfig,
|
|
998
|
+
tokenRegistry,
|
|
999
|
+
addToTokenStore: (entry) => {
|
|
1000
|
+
runtimeTokens.push({ id: entry.id, secretBuf: Buffer.from(entry.secret, "utf-8"), scopes: entry.scopes });
|
|
1001
|
+
},
|
|
1002
|
+
removeFromTokenStore: (id) => {
|
|
1003
|
+
removedTokenIds.add(id);
|
|
1004
|
+
const idx = runtimeTokens.findIndex((t) => t.id === id);
|
|
1005
|
+
if (idx >= 0)
|
|
1006
|
+
runtimeTokens.splice(idx, 1);
|
|
1007
|
+
},
|
|
1008
|
+
memoryWriteValidator: validateMemoryWrite, // memory content validation
|
|
1009
|
+
eventBus: container.eventBus, // security event emission for memory writes
|
|
1010
|
+
mcpClientManager, // Phase quick-81: MCP server management
|
|
1011
|
+
contextStore, // DAG recall RPC handlers
|
|
1012
|
+
contextEngineConfig: {
|
|
1013
|
+
maxRecallsPerDay: agents[defaultAgentId]?.contextEngine?.maxRecallsPerDay ?? 10,
|
|
1014
|
+
maxExpandTokens: agents[defaultAgentId]?.contextEngine?.maxExpandTokens ?? 4000,
|
|
1015
|
+
recallTimeoutMs: agents[defaultAgentId]?.contextEngine?.recallTimeoutMs ?? 120000,
|
|
1016
|
+
},
|
|
1017
|
+
obsStore, // dual-source reads in obs-handlers
|
|
1018
|
+
startupTimestamp: startupStartMs, // dedup boundary for dual-source merge
|
|
1019
|
+
sharedCostTracker, // obs.reset needs to clear in-memory billing data
|
|
1020
|
+
contextPipelineCollector, // context engine pipeline/DAG RPC handlers
|
|
1021
|
+
execGit, // workspace file management
|
|
1022
|
+
deliveryQueue, // crash-safe delivery queue
|
|
1023
|
+
channelPlugins, // channel plugins for capabilities RPC
|
|
1024
|
+
healthMonitor: channelHealthMonitor, // channel health monitor for channels.health RPC
|
|
1025
|
+
embeddingCacheStats, // embedding cache stats for memory.embeddingCache RPC
|
|
1026
|
+
embeddingCircuitBreakerState, // Embedding circuit breaker state for memory operations
|
|
1027
|
+
skillRegistries, // skill management handlers in rpc-dispatch
|
|
1028
|
+
notificationService: notificationContext.notificationService, // Proactive v1: notification.send RPC handler
|
|
1029
|
+
// Image generation RPC handler deps
|
|
1030
|
+
imageHandlerDeps: imageGenProvider && imageGenRateLimiter ? {
|
|
1031
|
+
provider: imageGenProvider,
|
|
1032
|
+
rateLimiter: imageGenRateLimiter,
|
|
1033
|
+
config: imageGenConfig,
|
|
1034
|
+
logger: skillsLogger,
|
|
1035
|
+
getChannelAdapter: (channelType) => adaptersByType.get(channelType),
|
|
1036
|
+
} : undefined,
|
|
1037
|
+
};
|
|
1038
|
+
wireDispatch(rpcDispatchDeps);
|
|
1039
|
+
// 7. Gateway
|
|
1040
|
+
const gwConfig = container.config.gateway;
|
|
1041
|
+
const { gatewayHandle, activeExecutions, getActiveConnectionCount, wsConnections } = await setupGateway({
|
|
1042
|
+
container, gwConfig, webhooksConfig: container.config.webhooks, agents, defaultAgentId,
|
|
1043
|
+
configPaths, defaultConfigPaths: DEFAULT_CONFIG_PATHS, gatewayLogger,
|
|
1044
|
+
embeddingQueue, memoryAdapter, memoryApi, cachedPort, sessionStore, getExecutor,
|
|
1045
|
+
assembleToolsForAgent, preprocessMessageText, rpcCall,
|
|
1046
|
+
costTrackers, workspaceDirs,
|
|
1047
|
+
_createGatewayServer, piSessionAdapters,
|
|
1048
|
+
resolvedTokens: resolvedGatewayTokens,
|
|
1049
|
+
suspendedAgents,
|
|
1050
|
+
instanceId, startupStartMs,
|
|
1051
|
+
});
|
|
1052
|
+
// 7.0.1. Wire deferred gateway attachment deps (quick-91)
|
|
1053
|
+
// wsConnections and mediaDir are now available after gateway setup; message.attach
|
|
1054
|
+
// handler closures read from the mutable rpcDispatchDeps reference at call time.
|
|
1055
|
+
rpcDispatchDeps.wsConnections = wsConnections;
|
|
1056
|
+
if (defaultWorkspaceDir) {
|
|
1057
|
+
rpcDispatchDeps.mediaDir = safePath(defaultWorkspaceDir, "media");
|
|
1058
|
+
}
|
|
1059
|
+
// Persist gateway attachment markers to SQLite session store so images
|
|
1060
|
+
// survive page navigation (especially for sub-agent async deliveries).
|
|
1061
|
+
rpcDispatchDeps.onGatewayAttachment = (channelId, marker) => {
|
|
1062
|
+
try {
|
|
1063
|
+
const sk = {
|
|
1064
|
+
tenantId: container.config.tenantId,
|
|
1065
|
+
userId: "default",
|
|
1066
|
+
channelId,
|
|
1067
|
+
};
|
|
1068
|
+
const existing = sessionStore.load(sk);
|
|
1069
|
+
const messages = existing?.messages ?? [];
|
|
1070
|
+
// Deduplicate: skip if this media URL is already in the session
|
|
1071
|
+
const urlMatch = marker.match(/\/media\/[^"]+/);
|
|
1072
|
+
if (urlMatch) {
|
|
1073
|
+
const existingText = messages.map((m) => String(m.content ?? "")).join("\n");
|
|
1074
|
+
if (existingText.includes(urlMatch[0]))
|
|
1075
|
+
return;
|
|
1076
|
+
}
|
|
1077
|
+
messages.push({ role: "assistant", content: marker, timestamp: Date.now() });
|
|
1078
|
+
sessionStore.save(sk, messages);
|
|
1079
|
+
}
|
|
1080
|
+
catch {
|
|
1081
|
+
// Non-fatal: attachment persistence failure should not break delivery
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
// 7.1. Wire deferred gateway send ref for sub-agent announcement delivery
|
|
1085
|
+
// channelId here is a session UUID (from announce_channel_id), not a clientId.
|
|
1086
|
+
// Use broadcast to deliver to all connected WebSocket clients since we cannot
|
|
1087
|
+
// map session UUIDs to clientIds.
|
|
1088
|
+
gatewaySendRef.ref = (_channelId, text) => {
|
|
1089
|
+
const sent = wsConnections.broadcast("notification.message", {
|
|
1090
|
+
text,
|
|
1091
|
+
timestamp: Date.now(),
|
|
1092
|
+
});
|
|
1093
|
+
if (sent) {
|
|
1094
|
+
gatewayLogger.info({ textLength: text.length, activeConnections: getActiveConnectionCount() }, "Sub-agent notification broadcast to WebSocket clients");
|
|
1095
|
+
}
|
|
1096
|
+
else {
|
|
1097
|
+
gatewayLogger.warn({ textLength: text.length, hint: "No WebSocket clients connected to receive sub-agent notification", errorKind: "internal" }, "Sub-agent notification broadcast failed: no connections");
|
|
1098
|
+
}
|
|
1099
|
+
return sent;
|
|
1100
|
+
};
|
|
1101
|
+
// 7.5. Restart continuation replay
|
|
1102
|
+
const continuationFilePath = pathJoin(container.config.dataDir || dataDir, "restart-continuations.json");
|
|
1103
|
+
const continuations = loadContinuations(continuationFilePath, 5 * 60_000, daemonLogger);
|
|
1104
|
+
if (continuations.length > 0 && channelManager) {
|
|
1105
|
+
daemonLogger.info({ count: continuations.length }, "Replaying restart continuations");
|
|
1106
|
+
const mcpStatusLine = buildMcpStatusLine(mcpClientManager.getAllConnections());
|
|
1107
|
+
if (mcpStatusLine) {
|
|
1108
|
+
daemonLogger.warn({
|
|
1109
|
+
mcpStatusLine,
|
|
1110
|
+
continuationCount: continuations.length,
|
|
1111
|
+
hint: "One or more MCP servers failed to handshake after restart; surfacing status to agents via synthetic system message",
|
|
1112
|
+
errorKind: "dependency",
|
|
1113
|
+
}, "MCP connection failures detected during restart continuation replay");
|
|
1114
|
+
}
|
|
1115
|
+
const baseText = "[system: daemon restarted after config change — session restored. Do NOT repeat, re-send, or re-execute anything from the previous conversation. Simply greet the user or wait for their next message.]";
|
|
1116
|
+
for (const record of continuations) {
|
|
1117
|
+
// Skip sessions that already received a message during this startup cycle
|
|
1118
|
+
// (e.g., Telegram webhook delivered before continuation replay ran).
|
|
1119
|
+
if (continuationTracker.isTracked(record)) {
|
|
1120
|
+
daemonLogger.debug({ channelType: record.channelType, channelId: record.channelId }, "Skipping continuation replay: session already active this cycle");
|
|
1121
|
+
continue;
|
|
1122
|
+
}
|
|
1123
|
+
const syntheticMsg = {
|
|
1124
|
+
id: randomUUID(),
|
|
1125
|
+
channelId: record.channelId,
|
|
1126
|
+
channelType: record.channelType,
|
|
1127
|
+
senderId: record.userId,
|
|
1128
|
+
text: mcpStatusLine ? `${baseText}\n${mcpStatusLine}` : baseText,
|
|
1129
|
+
timestamp: Date.now(),
|
|
1130
|
+
attachments: [],
|
|
1131
|
+
metadata: { isRestartContinuation: true, mcpStatusLine: mcpStatusLine ?? null },
|
|
1132
|
+
};
|
|
1133
|
+
channelManager.injectMessage(record.channelType, syntheticMsg).catch((injectErr) => {
|
|
1134
|
+
daemonLogger.warn({ err: injectErr, channelType: record.channelType, channelId: record.channelId, hint: "Continuation replay failed; user can re-send to resume", errorKind: "internal" }, "Failed to replay continuation");
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
// 8. Graceful shutdown
|
|
1139
|
+
const { shutdownHandle } = setupShutdown({
|
|
1140
|
+
logger, daemonLogger, processMonitor, container, exitFn, _registerGracefulShutdown,
|
|
1141
|
+
tokenTracker, startupTimestamp: startupStartMs,
|
|
1142
|
+
activeExecutions, graphCoordinator, subAgentRunner, cronSchedulers, resetSchedulers,
|
|
1143
|
+
browserServices, channelManager, heartbeatRunner, perAgentRunner, wakeCoalescer, gatewayHandle,
|
|
1144
|
+
mediaTempManager, skillWatcherHandles,
|
|
1145
|
+
diagnosticCollector, channelActivityTracker, deliveryTracer, contextPipelineCollector,
|
|
1146
|
+
backgroundIndexingPromise, db,
|
|
1147
|
+
disposeEmbedding, // coordinated L1 -> L2 -> provider dispose chain
|
|
1148
|
+
approvalGate,
|
|
1149
|
+
secretStore, // close secrets.db on shutdown
|
|
1150
|
+
auditAggregator, // clear pending dedup timers
|
|
1151
|
+
injectionRateLimiter, // clear rate limiter timers on shutdown
|
|
1152
|
+
lockCleanupTimer, // quick-112: clear periodic lock cleanup timer
|
|
1153
|
+
dataDir: container.config.dataDir || dataDir,
|
|
1154
|
+
continuationTracker,
|
|
1155
|
+
lifecycleReactors, // destroy lifecycle reactors on shutdown
|
|
1156
|
+
obsPersistence, // drain write buffers before db.close
|
|
1157
|
+
geminiCacheManager, // Dispose all Gemini caches on shutdown
|
|
1158
|
+
});
|
|
1159
|
+
// Wire shutdown ref for hot-add guard.
|
|
1160
|
+
shutdownRef.value = shutdownHandle;
|
|
1161
|
+
// 8.5. Health logging: subscribe to process metrics events
|
|
1162
|
+
container.eventBus.on("observability:metrics", async (metrics) => {
|
|
1163
|
+
// Prune prompt timeout timestamps to 5-minute window
|
|
1164
|
+
const fiveMinAgo = Date.now() - 5 * 60_000;
|
|
1165
|
+
while (promptTimeoutTimestamps.length > 0 && promptTimeoutTimestamps[0] < fiveMinAgo) {
|
|
1166
|
+
promptTimeoutTimestamps.shift();
|
|
1167
|
+
}
|
|
1168
|
+
// Database size metrics for health monitoring
|
|
1169
|
+
let memoryDbSizeBytes;
|
|
1170
|
+
let memoryDbWalSizeBytes;
|
|
1171
|
+
try {
|
|
1172
|
+
const dbFilePath = db.name;
|
|
1173
|
+
if (dbFilePath) {
|
|
1174
|
+
memoryDbSizeBytes = statSync(dbFilePath).size;
|
|
1175
|
+
try {
|
|
1176
|
+
memoryDbWalSizeBytes = statSync(dbFilePath + "-wal").size;
|
|
1177
|
+
}
|
|
1178
|
+
catch { /* WAL file may not exist */ }
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
catch { /* stat failure must not crash health check */ }
|
|
1182
|
+
// Compute sub-agent health metrics (threshold-aware split)
|
|
1183
|
+
const stuckKillThresholdMs = container.config.security.agentToAgent.subagentContext?.stuckKillThresholdMs ?? 180_000;
|
|
1184
|
+
const graphStuckKillThresholdMs = container.config.security.agentToAgent.subagentContext?.graphStuckKillThresholdMs ?? 600_000;
|
|
1185
|
+
const allRuns = subAgentRunner.listRuns();
|
|
1186
|
+
const now = Date.now();
|
|
1187
|
+
let activeSubAgentRuns = 0;
|
|
1188
|
+
let stuckSubAgentRuns = 0;
|
|
1189
|
+
for (const run of allRuns) {
|
|
1190
|
+
if (run.status !== "running")
|
|
1191
|
+
continue;
|
|
1192
|
+
activeSubAgentRuns++;
|
|
1193
|
+
const threshold = run.graphId ? graphStuckKillThresholdMs : stuckKillThresholdMs;
|
|
1194
|
+
if (threshold > 0 && (now - run.startedAt) > threshold) {
|
|
1195
|
+
stuckSubAgentRuns++;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
// Kill stuck sub-agents and track actual killed count.
|
|
1199
|
+
// Graph sub-agents get a longer threshold since they do multi-step analytical work.
|
|
1200
|
+
let stuckKilledThisTick = 0;
|
|
1201
|
+
if (stuckKillThresholdMs > 0 || graphStuckKillThresholdMs > 0) {
|
|
1202
|
+
for (const run of allRuns) {
|
|
1203
|
+
if (run.status !== "running")
|
|
1204
|
+
continue;
|
|
1205
|
+
const threshold = run.graphId ? graphStuckKillThresholdMs : stuckKillThresholdMs;
|
|
1206
|
+
if (threshold <= 0)
|
|
1207
|
+
continue;
|
|
1208
|
+
if ((now - run.startedAt) <= threshold)
|
|
1209
|
+
continue;
|
|
1210
|
+
subAgentRunner.killRun(run.runId);
|
|
1211
|
+
stuckKilledThisTick++;
|
|
1212
|
+
daemonLogger.warn({
|
|
1213
|
+
runId: run.runId,
|
|
1214
|
+
agentId: run.agentId,
|
|
1215
|
+
runtimeMs: now - run.startedAt,
|
|
1216
|
+
thresholdMs: threshold,
|
|
1217
|
+
isGraphRun: !!run.graphId,
|
|
1218
|
+
hint: run.graphId
|
|
1219
|
+
? "Graph sub-agent exceeded graphStuckKillThresholdMs; force-killed by health handler. Adjust security.agentToAgent.subagentContext.graphStuckKillThresholdMs if needed."
|
|
1220
|
+
: "Sub-agent exceeded stuckKillThresholdMs; force-killed by health handler. Adjust security.agentToAgent.subagentContext.stuckKillThresholdMs if needed.",
|
|
1221
|
+
errorKind: "timeout",
|
|
1222
|
+
}, "Stuck sub-agent killed by health handler");
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
daemonLogger.debug({
|
|
1226
|
+
rssBytes: metrics.rssBytes,
|
|
1227
|
+
heapUsedBytes: metrics.heapUsedBytes,
|
|
1228
|
+
heapTotalBytes: metrics.heapTotalBytes,
|
|
1229
|
+
externalBytes: metrics.externalBytes,
|
|
1230
|
+
eventLoopP99Ms: Math.round(metrics.eventLoopDelayMs.p99 * 100) / 100,
|
|
1231
|
+
activeHandles: metrics.activeHandles,
|
|
1232
|
+
activeConnections: getActiveConnectionCount(),
|
|
1233
|
+
activeExecutions: activeExecutions.size,
|
|
1234
|
+
uptimeSeconds: Math.round(metrics.uptimeSeconds),
|
|
1235
|
+
// Resilience metrics
|
|
1236
|
+
activeSubAgentRuns,
|
|
1237
|
+
stuckSubAgentRuns,
|
|
1238
|
+
stuckKilledThisTick,
|
|
1239
|
+
deadLetterQueueSize: deadLetterQueue?.size() ?? 0,
|
|
1240
|
+
degradedProviders: [...providerHealth.getHealthSummary().entries()]
|
|
1241
|
+
.filter(([, v]) => v.degraded)
|
|
1242
|
+
.map(([k]) => k),
|
|
1243
|
+
promptTimeoutsLast5m: promptTimeoutTimestamps.length,
|
|
1244
|
+
// Database file size and delivery queue depth for health monitoring
|
|
1245
|
+
...(memoryDbSizeBytes !== undefined && { memoryDbSizeBytes }),
|
|
1246
|
+
...(memoryDbWalSizeBytes !== undefined && { memoryDbWalSizeBytes }),
|
|
1247
|
+
pendingDeliveryCount: await deliveryQueue.pendingEntries().then(r => r.ok ? r.value.length : 0),
|
|
1248
|
+
}, "Daemon health");
|
|
1249
|
+
});
|
|
1250
|
+
// 9. Startup banner
|
|
1251
|
+
daemonLogger.info({
|
|
1252
|
+
version: daemonVersion, agents: Object.keys(agents),
|
|
1253
|
+
channels: Array.from(adaptersByType.keys()),
|
|
1254
|
+
port: gwConfig.enabled ? gwConfig.port : undefined, instanceId,
|
|
1255
|
+
startupDurationMs: Date.now() - startupStartMs, configPaths, dbPath: db.name,
|
|
1256
|
+
logLevel: container.config.logLevel ?? "info", nodeVersion: process.versions.node,
|
|
1257
|
+
manifest: {
|
|
1258
|
+
secrets: { encrypted: !!secretStore },
|
|
1259
|
+
memory: { embedding: !!cachedPort, dbPath: db.name },
|
|
1260
|
+
agents: Object.fromEntries(Object.entries(agents).map(([id, cfg]) => [id, { model: cfg.model }])),
|
|
1261
|
+
skills: {
|
|
1262
|
+
tts: !!ttsAdapter,
|
|
1263
|
+
vision: visionRegistry ? [...visionRegistry.keys()] : [],
|
|
1264
|
+
linkUnderstanding: container.config.integrations.media.linkUnderstanding.enabled,
|
|
1265
|
+
},
|
|
1266
|
+
gateway: {
|
|
1267
|
+
enabled: gwConfig.enabled,
|
|
1268
|
+
port: gwConfig.enabled ? gwConfig.port : undefined,
|
|
1269
|
+
tls: !!gwConfig.tls?.certPath,
|
|
1270
|
+
},
|
|
1271
|
+
},
|
|
1272
|
+
}, "Comis daemon started");
|
|
1273
|
+
// Snapshot current config as last-known-good after successful startup
|
|
1274
|
+
if (configPaths.length > 0) {
|
|
1275
|
+
const activeConfigPath = configPaths[configPaths.length - 1];
|
|
1276
|
+
const lkg = saveLastKnownGood(activeConfigPath);
|
|
1277
|
+
if (lkg.saved) {
|
|
1278
|
+
daemonLogger.debug({ lkgPath: lkg.path }, "Last-known-good config snapshot saved");
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
return {
|
|
1282
|
+
container, logger, logLevelManager, tokenTracker, latencyRecorder,
|
|
1283
|
+
processMonitor, shutdownHandle, watchdogHandle, cronSchedulers, resetSchedulers,
|
|
1284
|
+
browserServices, heartbeatRunner, gatewayHandle, adapterRegistry: adaptersByType,
|
|
1285
|
+
rpcCall, deviceIdentity, diagnosticCollector, billingEstimator,
|
|
1286
|
+
channelActivityTracker, deliveryTracer, approvalGate, channelHealthMonitor, sessionStoreBridge,
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
// Only run when invoked directly (not imported).
|
|
1290
|
+
// Under pm2, process.argv[1] is ProcessContainerFork.js — detect via pm_id env var.
|
|
1291
|
+
const isDirectRun = typeof process !== "undefined" &&
|
|
1292
|
+
process.argv[1] &&
|
|
1293
|
+
(process.argv[1].endsWith("daemon.js") ||
|
|
1294
|
+
process.argv[1].endsWith("daemon.ts") ||
|
|
1295
|
+
// eslint-disable-next-line no-restricted-syntax -- Trusted: checking pm2 runtime indicator
|
|
1296
|
+
process.env["pm_id"] !== undefined);
|
|
1297
|
+
if (isDirectRun) {
|
|
1298
|
+
// Handle --restore-last-good before startup
|
|
1299
|
+
if (process.argv.includes("--restore-last-good")) {
|
|
1300
|
+
// eslint-disable-next-line no-restricted-syntax -- process.env access needed for config path resolution
|
|
1301
|
+
const rawPaths = process.env["COMIS_CONFIG_PATHS"];
|
|
1302
|
+
const paths = (rawPaths ? rawPaths.split(":") : DEFAULT_CONFIG_PATHS).filter((p) => existsSync(p));
|
|
1303
|
+
handleRestoreFlag(paths, (code) => process.exit(code));
|
|
1304
|
+
}
|
|
1305
|
+
else {
|
|
1306
|
+
main().catch((error) => {
|
|
1307
|
+
// Fatal error -- log to stderr and exit
|
|
1308
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1309
|
+
process.stderr.write(`FATAL: ${message}\n`);
|
|
1310
|
+
// Suggest rollback from last-known-good config
|
|
1311
|
+
// eslint-disable-next-line no-restricted-syntax -- process.env access needed for config path resolution
|
|
1312
|
+
const rawPaths = process.env["COMIS_CONFIG_PATHS"];
|
|
1313
|
+
const paths = (rawPaths ? rawPaths.split(":") : DEFAULT_CONFIG_PATHS).filter((p) => existsSync(p));
|
|
1314
|
+
if (paths.length > 0) {
|
|
1315
|
+
const suggestion = buildRollbackSuggestion(paths[paths.length - 1]);
|
|
1316
|
+
if (suggestion) {
|
|
1317
|
+
process.stderr.write(`\n--- Last-known-good config available ---\n`);
|
|
1318
|
+
process.stderr.write(`${suggestion.hint}\n`);
|
|
1319
|
+
if (suggestion.diff) {
|
|
1320
|
+
process.stderr.write(`\nChanges since last successful startup:\n${suggestion.diff}\n`);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
process.exit(1);
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
}
|