comisai 1.0.34 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@comis/agent/dist/background/auto-background-middleware.d.ts +11 -1
- package/node_modules/@comis/agent/dist/background/auto-background-middleware.js +30 -4
- package/node_modules/@comis/agent/dist/background/background-task-manager.d.ts +22 -2
- package/node_modules/@comis/agent/dist/background/background-task-manager.js +88 -40
- package/node_modules/@comis/agent/dist/background/background-task-persistence.js +34 -4
- package/node_modules/@comis/agent/dist/background/background-task-types.d.ts +59 -3
- package/node_modules/@comis/agent/dist/background/background-task-types.js +1 -1
- package/node_modules/@comis/agent/dist/background/completion-dispatcher.d.ts +130 -0
- package/node_modules/@comis/agent/dist/background/completion-dispatcher.js +215 -0
- package/node_modules/@comis/agent/dist/background/completion-formatter.d.ts +39 -0
- package/node_modules/@comis/agent/dist/background/completion-formatter.js +77 -0
- package/node_modules/@comis/agent/dist/background/completion-runner.d.ts +62 -0
- package/node_modules/@comis/agent/dist/background/completion-runner.js +234 -0
- package/node_modules/@comis/agent/dist/background/index.d.ts +10 -1
- package/node_modules/@comis/agent/dist/background/index.js +4 -0
- package/node_modules/@comis/agent/dist/background/session-resolver.d.ts +85 -0
- package/node_modules/@comis/agent/dist/background/session-resolver.js +78 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/messaging-sections.js +1 -0
- package/node_modules/@comis/agent/dist/bootstrap/sections/tool-descriptions.js +3 -3
- package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.d.ts +30 -2
- package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.js +51 -2
- package/node_modules/@comis/agent/dist/bootstrap/system-prompt-assembler.d.ts +22 -0
- package/node_modules/@comis/agent/dist/bootstrap/system-prompt-assembler.js +2 -2
- package/node_modules/@comis/agent/dist/bridge/bridge-event-handlers.d.ts +1 -5
- package/node_modules/@comis/agent/dist/bridge/bridge-event-handlers.js +2 -14
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.d.ts +43 -2
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.js +17 -2
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.d.ts +32 -23
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +145 -62
- package/node_modules/@comis/agent/dist/bridge/thinking-block-hash-invariant.d.ts +6 -7
- package/node_modules/@comis/agent/dist/bridge/thinking-block-hash-invariant.js +24 -25
- package/node_modules/@comis/agent/dist/budget/cost-tracker.d.ts +1 -1
- package/node_modules/@comis/agent/dist/context-engine/constants.d.ts +5 -5
- package/node_modules/@comis/agent/dist/context-engine/constants.js +12 -12
- package/node_modules/@comis/agent/dist/context-engine/context-engine.js +13 -4
- package/node_modules/@comis/agent/dist/context-engine/dag-annotator.d.ts +1 -2
- package/node_modules/@comis/agent/dist/context-engine/dag-annotator.js +1 -2
- package/node_modules/@comis/agent/dist/context-engine/llm-compaction.js +20 -16
- package/node_modules/@comis/agent/dist/context-engine/rehydration.js +6 -6
- package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.d.ts +12 -12
- package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.js +36 -22
- package/node_modules/@comis/agent/dist/context-engine/signature-surrogate-guard.d.ts +10 -10
- package/node_modules/@comis/agent/dist/context-engine/signature-surrogate-guard.js +14 -14
- package/node_modules/@comis/agent/dist/context-engine/thinking-block-cleaner.d.ts +11 -13
- package/node_modules/@comis/agent/dist/context-engine/thinking-block-cleaner.js +14 -15
- package/node_modules/@comis/agent/dist/context-engine/types-core.d.ts +15 -0
- package/node_modules/@comis/agent/dist/executor/cache-break-detection.d.ts +6 -6
- package/node_modules/@comis/agent/dist/executor/cache-break-detection.js +8 -8
- package/node_modules/@comis/agent/dist/executor/capability-index-context.d.ts +72 -0
- package/node_modules/@comis/agent/dist/executor/capability-index-context.js +329 -0
- package/node_modules/@comis/agent/dist/executor/drain-helper.d.ts +122 -0
- package/node_modules/@comis/agent/dist/executor/drain-helper.js +173 -0
- package/node_modules/@comis/agent/dist/executor/error-classifier.js +2 -2
- package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.d.ts +16 -0
- package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.js +46 -5
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.d.ts +78 -4
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.js +150 -31
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.d.ts +7 -0
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +26 -5
- package/node_modules/@comis/agent/dist/executor/executor-response-filter.d.ts +7 -6
- package/node_modules/@comis/agent/dist/executor/executor-response-filter.js +9 -42
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.d.ts +18 -1
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +20 -18
- package/node_modules/@comis/agent/dist/executor/gemini-cache-injector.d.ts +2 -2
- package/node_modules/@comis/agent/dist/executor/gemini-cache-injector.js +4 -4
- package/node_modules/@comis/agent/dist/executor/jit-guide-injector.d.ts +11 -2
- package/node_modules/@comis/agent/dist/executor/jit-guide-injector.js +16 -2
- package/node_modules/@comis/agent/dist/executor/phase-filter.d.ts +2 -2
- package/node_modules/@comis/agent/dist/executor/phase-filter.js +5 -7
- package/node_modules/@comis/agent/dist/executor/pi-executor.d.ts +21 -2
- package/node_modules/@comis/agent/dist/executor/pi-executor.js +96 -18
- package/node_modules/@comis/agent/dist/executor/post-batch-continuation.js +7 -7
- package/node_modules/@comis/agent/dist/executor/prompt-assembly.d.ts +9 -1
- package/node_modules/@comis/agent/dist/executor/prompt-assembly.js +15 -1
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.d.ts +1 -1
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.js +1 -1
- package/node_modules/@comis/agent/dist/executor/tool-deferral.d.ts +18 -27
- package/node_modules/@comis/agent/dist/executor/tool-deferral.js +34 -43
- package/node_modules/@comis/agent/dist/index.d.ts +17 -0
- package/node_modules/@comis/agent/dist/index.js +32 -11
- package/node_modules/@comis/agent/dist/model/auth-provider.d.ts +25 -2
- package/node_modules/@comis/agent/dist/model/auth-provider.js +6 -0
- package/node_modules/@comis/agent/dist/model/compaction-model-resolver.d.ts +3 -3
- package/node_modules/@comis/agent/dist/model/compaction-model-resolver.js +3 -3
- package/node_modules/@comis/agent/dist/model/model-registry-adapter.js +1 -1
- package/node_modules/@comis/agent/dist/model/model-scanner.js +1 -1
- package/node_modules/@comis/agent/dist/model/oauth-credential-store-file.d.ts +37 -0
- package/node_modules/@comis/agent/dist/model/oauth-credential-store-file.js +279 -0
- package/node_modules/@comis/agent/dist/model/oauth-credential-store-selector.d.ts +49 -0
- package/node_modules/@comis/agent/dist/model/oauth-credential-store-selector.js +50 -0
- package/node_modules/@comis/agent/dist/model/oauth-device-code.d.ts +57 -0
- package/node_modules/@comis/agent/dist/model/oauth-device-code.js +302 -0
- package/node_modules/@comis/agent/dist/model/oauth-env.d.ts +33 -0
- package/node_modules/@comis/agent/dist/model/oauth-env.js +38 -0
- package/node_modules/@comis/agent/dist/model/oauth-errors.d.ts +41 -0
- package/node_modules/@comis/agent/dist/model/oauth-errors.js +88 -0
- package/node_modules/@comis/agent/dist/model/oauth-identity.d.ts +53 -0
- package/node_modules/@comis/agent/dist/model/oauth-identity.js +141 -0
- package/node_modules/@comis/agent/dist/model/oauth-login-runner.d.ts +99 -0
- package/node_modules/@comis/agent/dist/model/oauth-login-runner.js +374 -0
- package/node_modules/@comis/agent/dist/model/oauth-tls-preflight.d.ts +58 -0
- package/node_modules/@comis/agent/dist/model/oauth-tls-preflight.js +82 -0
- package/node_modules/@comis/agent/dist/model/oauth-token-manager.d.ts +86 -16
- package/node_modules/@comis/agent/dist/model/oauth-token-manager.js +961 -66
- package/node_modules/@comis/agent/dist/model/operation-model-defaults.d.ts +9 -4
- package/node_modules/@comis/agent/dist/model/operation-model-defaults.js +36 -9
- package/node_modules/@comis/agent/dist/model/resolve-provider-api-key.d.ts +48 -0
- package/node_modules/@comis/agent/dist/model/resolve-provider-api-key.js +66 -0
- package/node_modules/@comis/agent/dist/provider/capabilities.d.ts +5 -5
- package/node_modules/@comis/agent/dist/provider/capabilities.js +10 -23
- package/node_modules/@comis/agent/dist/safety/tool-output-safety.js +3 -3
- package/node_modules/@comis/agent/dist/safety/tool-retry-breaker.d.ts +11 -1
- package/node_modules/@comis/agent/dist/safety/tool-retry-breaker.js +19 -22
- package/node_modules/@comis/agent/dist/session/comis-session-manager.d.ts +17 -3
- package/node_modules/@comis/agent/dist/session/comis-session-manager.js +1 -1
- package/node_modules/@comis/agent/dist/spawn/narrative-caster.d.ts +10 -0
- package/node_modules/@comis/agent/dist/spawn/narrative-caster.js +5 -1
- package/node_modules/@comis/agent/dist/spawn/pi-mono-adapters.d.ts +1 -1
- package/node_modules/@comis/agent/dist/spawn/pi-mono-adapters.js +5 -5
- package/node_modules/@comis/agent/dist/workspace/data-env.d.ts +38 -0
- package/node_modules/@comis/agent/dist/workspace/data-env.js +56 -0
- package/node_modules/@comis/agent/dist/workspace/index.d.ts +1 -0
- package/node_modules/@comis/agent/dist/workspace/index.js +1 -0
- package/node_modules/@comis/agent/dist/workspace/templates.js +5 -1
- package/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/dist/email/email-adapter.js +6 -6
- package/node_modules/@comis/channels/dist/email/imap-lifecycle.js +7 -7
- package/node_modules/@comis/channels/dist/index.d.ts +1 -1
- package/node_modules/@comis/channels/dist/index.js +1 -1
- package/node_modules/@comis/channels/dist/shared/channel-manager.d.ts +9 -3
- package/node_modules/@comis/channels/dist/shared/deliver-to-channel.js +12 -10
- package/node_modules/@comis/channels/dist/shared/inbound-gate.d.ts +1 -1
- package/node_modules/@comis/channels/dist/shared/inbound-gate.js +22 -7
- package/node_modules/@comis/channels/dist/shared/inbound-pipeline.d.ts +10 -3
- package/node_modules/@comis/channels/dist/shared/inbound-route.d.ts +1 -1
- package/node_modules/@comis/channels/dist/shared/inbound-route.js +13 -2
- package/node_modules/@comis/channels/dist/shared/response-filter.d.ts +11 -24
- package/node_modules/@comis/channels/dist/shared/response-filter.js +25 -53
- package/node_modules/@comis/channels/dist/telegram/telegram-adapter.js +1 -1
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/dist/cli.js +2 -0
- package/node_modules/@comis/cli/dist/commands/agent.d.ts +3 -3
- package/node_modules/@comis/cli/dist/commands/agent.js +46 -3
- package/node_modules/@comis/cli/dist/commands/auth.d.ts +37 -0
- package/node_modules/@comis/cli/dist/commands/auth.js +433 -0
- package/node_modules/@comis/cli/dist/commands/doctor.d.ts +4 -1
- package/node_modules/@comis/cli/dist/commands/doctor.js +20 -5
- package/node_modules/@comis/cli/dist/commands/providers.d.ts +1 -2
- package/node_modules/@comis/cli/dist/commands/providers.js +5 -6
- package/node_modules/@comis/cli/dist/doctor/checks/oauth-health.d.ts +39 -0
- package/node_modules/@comis/cli/dist/doctor/checks/oauth-health.js +399 -0
- package/node_modules/@comis/cli/dist/doctor/types.d.ts +19 -0
- package/node_modules/@comis/cli/dist/index.d.ts +1 -0
- package/node_modules/@comis/cli/dist/index.js +10 -4
- package/node_modules/@comis/cli/dist/output/relative-time.d.ts +23 -0
- package/node_modules/@comis/cli/dist/output/relative-time.js +36 -0
- package/node_modules/@comis/cli/dist/wizard/non-interactive.js +17 -8
- package/node_modules/@comis/cli/dist/wizard/steps/03-provider.js +2 -1
- package/node_modules/@comis/cli/dist/wizard/steps/04-credentials.js +223 -34
- package/node_modules/@comis/cli/dist/wizard/steps/10-write-config.js +14 -0
- package/node_modules/@comis/cli/dist/wizard/steps/11-daemon-start.js +3 -3
- package/node_modules/@comis/cli/dist/wizard/types.d.ts +7 -0
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/bootstrap.d.ts +1 -1
- package/node_modules/@comis/core/dist/config/env-substitution.d.ts +66 -0
- package/node_modules/@comis/core/dist/config/env-substitution.js +115 -0
- package/node_modules/@comis/core/dist/config/field-metadata.js +2 -0
- package/node_modules/@comis/core/dist/config/immutable-keys.js +4 -1
- package/node_modules/@comis/core/dist/config/index.d.ts +7 -1
- package/node_modules/@comis/core/dist/config/index.js +4 -1
- package/node_modules/@comis/core/dist/config/loader.js +61 -0
- package/node_modules/@comis/core/dist/config/managed-sections.d.ts +3 -3
- package/node_modules/@comis/core/dist/config/managed-sections.js +10 -5
- package/node_modules/@comis/core/dist/config/schema-agent.d.ts +4 -792
- package/node_modules/@comis/core/dist/config/schema-agent.js +16 -1
- package/node_modules/@comis/core/dist/config/schema-approvals.d.ts +0 -14
- package/node_modules/@comis/core/dist/config/schema-auto-reply-engine.d.ts +0 -6
- package/node_modules/@comis/core/dist/config/schema-background-tasks.d.ts +1 -6
- package/node_modules/@comis/core/dist/config/schema-background-tasks.js +7 -0
- package/node_modules/@comis/core/dist/config/schema-browser.d.ts +0 -18
- package/node_modules/@comis/core/dist/config/schema-channel.d.ts +0 -158
- package/node_modules/@comis/core/dist/config/schema-coalescer.d.ts +0 -5
- package/node_modules/@comis/core/dist/config/schema-daemon.d.ts +0 -32
- package/node_modules/@comis/core/dist/config/schema-delivery.d.ts +1 -17
- package/node_modules/@comis/core/dist/config/schema-delivery.js +2 -0
- package/node_modules/@comis/core/dist/config/schema-documentation.d.ts +0 -12
- package/node_modules/@comis/core/dist/config/schema-embedding.d.ts +0 -20
- package/node_modules/@comis/core/dist/config/schema-envelope.d.ts +0 -15
- package/node_modules/@comis/core/dist/config/schema-gateway.d.ts +0 -37
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.d.ts +0 -4
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.js +0 -2
- package/node_modules/@comis/core/dist/config/schema-integrations.d.ts +0 -318
- package/node_modules/@comis/core/dist/config/schema-lifecycle-reactions.d.ts +0 -18
- package/node_modules/@comis/core/dist/config/schema-memory-review.d.ts +0 -7
- package/node_modules/@comis/core/dist/config/schema-memory.d.ts +0 -16
- package/node_modules/@comis/core/dist/config/schema-messages.d.ts +0 -8
- package/node_modules/@comis/core/dist/config/schema-models.d.ts +0 -15
- package/node_modules/@comis/core/dist/config/schema-notification.d.ts +0 -5
- package/node_modules/@comis/core/dist/config/schema-oauth.d.ts +18 -0
- package/node_modules/@comis/core/dist/config/schema-oauth.js +19 -0
- package/node_modules/@comis/core/dist/config/schema-observability.d.ts +0 -38
- package/node_modules/@comis/core/dist/config/schema-output-retention.d.ts +34 -0
- package/node_modules/@comis/core/dist/config/schema-output-retention.js +48 -0
- package/node_modules/@comis/core/dist/config/schema-plugins.d.ts +0 -8
- package/node_modules/@comis/core/dist/config/schema-providers.d.ts +0 -64
- package/node_modules/@comis/core/dist/config/schema-queue.d.ts +0 -58
- package/node_modules/@comis/core/dist/config/schema-response-prefix.d.ts +0 -2
- package/node_modules/@comis/core/dist/config/schema-retry.d.ts +0 -6
- package/node_modules/@comis/core/dist/config/schema-scheduler.d.ts +0 -39
- package/node_modules/@comis/core/dist/config/schema-secrets.d.ts +0 -3
- package/node_modules/@comis/core/dist/config/schema-security.d.ts +0 -18
- package/node_modules/@comis/core/dist/config/schema-send-policy.d.ts +0 -13
- package/node_modules/@comis/core/dist/config/schema-sender-trust-display.d.ts +0 -5
- package/node_modules/@comis/core/dist/config/schema-serializer.js +2 -0
- package/node_modules/@comis/core/dist/config/schema-skills.d.ts +0 -63
- package/node_modules/@comis/core/dist/config/schema-skills.js +3 -4
- package/node_modules/@comis/core/dist/config/schema-streaming.d.ts +0 -38
- package/node_modules/@comis/core/dist/config/schema-telegram-file-guard.d.ts +0 -3
- package/node_modules/@comis/core/dist/config/schema-tooling.d.ts +87 -0
- package/node_modules/@comis/core/dist/config/schema-tooling.js +152 -0
- package/node_modules/@comis/core/dist/config/schema-verbosity.d.ts +0 -12
- package/node_modules/@comis/core/dist/config/schema-webhooks.d.ts +0 -40
- package/node_modules/@comis/core/dist/config/schema.d.ts +50 -37
- package/node_modules/@comis/core/dist/config/schema.js +9 -0
- package/node_modules/@comis/core/dist/context/context.d.ts +0 -4
- package/node_modules/@comis/core/dist/domain/approval-request.d.ts +0 -17
- package/node_modules/@comis/core/dist/domain/background-task-origin.d.ts +29 -0
- package/node_modules/@comis/core/dist/domain/background-task-origin.js +39 -0
- package/node_modules/@comis/core/dist/domain/delivery-origin.d.ts +0 -5
- package/node_modules/@comis/core/dist/domain/execution-graph.d.ts +0 -48
- package/node_modules/@comis/core/dist/domain/memory-entry.d.ts +0 -3
- package/node_modules/@comis/core/dist/domain/model-compat.d.ts +0 -4
- package/node_modules/@comis/core/dist/domain/normalized-message.d.ts +0 -15
- package/node_modules/@comis/core/dist/domain/provider-capabilities.d.ts +0 -6
- package/node_modules/@comis/core/dist/domain/rich-message.d.ts +0 -14
- package/node_modules/@comis/core/dist/domain/subagent-context-config.d.ts +0 -22
- package/node_modules/@comis/core/dist/domain/subagent-context-types.d.ts +0 -8
- package/node_modules/@comis/core/dist/event-bus/events-agent.d.ts +31 -0
- package/node_modules/@comis/core/dist/event-bus/events-infra.d.ts +76 -2
- package/node_modules/@comis/core/dist/exports/config.d.ts +2 -2
- package/node_modules/@comis/core/dist/exports/config.js +3 -1
- package/node_modules/@comis/core/dist/exports/domain.d.ts +2 -0
- package/node_modules/@comis/core/dist/exports/domain.js +1 -0
- package/node_modules/@comis/core/dist/exports/hooks.d.ts +1 -1
- package/node_modules/@comis/core/dist/exports/ports.d.ts +2 -2
- package/node_modules/@comis/core/dist/exports/ports.js +1 -1
- package/node_modules/@comis/core/dist/ports/channel-plugin.d.ts +0 -13
- package/node_modules/@comis/core/dist/ports/delivery-queue.d.ts +23 -0
- package/node_modules/@comis/core/dist/ports/delivery-queue.js +2 -0
- package/node_modules/@comis/core/dist/ports/index.d.ts +4 -0
- package/node_modules/@comis/core/dist/ports/index.js +5 -0
- package/node_modules/@comis/core/dist/ports/no-op-tool-capability.d.ts +30 -0
- package/node_modules/@comis/core/dist/ports/no-op-tool-capability.js +47 -0
- package/node_modules/@comis/core/dist/ports/oauth-credential-store.d.ts +64 -0
- package/node_modules/@comis/core/dist/ports/oauth-credential-store.js +37 -0
- package/node_modules/@comis/core/dist/ports/tool-capability.d.ts +165 -0
- package/node_modules/@comis/core/dist/ports/tool-capability.js +15 -0
- package/node_modules/@comis/core/dist/security/audit.d.ts +0 -11
- package/node_modules/@comis/core/dist/tool-metadata.d.ts +41 -1
- package/node_modules/@comis/core/dist/tool-metadata.js +1 -1
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/bundled-skills/skill-creator/scripts/validate-skill.py +1 -1
- package/node_modules/@comis/daemon/dist/daemon-types.d.ts +23 -3
- package/node_modules/@comis/daemon/dist/daemon.js +168 -30
- package/node_modules/@comis/daemon/dist/index.d.ts +2 -0
- package/node_modules/@comis/daemon/dist/index.js +5 -0
- package/node_modules/@comis/daemon/dist/observability/channel-health-logger.js +3 -3
- package/node_modules/@comis/daemon/dist/observability/delivery-queue-logger.js +1 -1
- package/node_modules/@comis/daemon/dist/rpc/agent-handlers.d.ts +22 -1
- package/node_modules/@comis/daemon/dist/rpc/agent-handlers.js +84 -21
- package/node_modules/@comis/daemon/dist/rpc/agent-inline-workspace.d.ts +1 -1
- package/node_modules/@comis/daemon/dist/rpc/agent-inline-workspace.js +3 -3
- package/node_modules/@comis/daemon/dist/rpc/builtin-provider-guard.js +2 -2
- package/node_modules/@comis/daemon/dist/rpc/config-handlers.d.ts +9 -1
- package/node_modules/@comis/daemon/dist/rpc/config-handlers.js +104 -23
- package/node_modules/@comis/daemon/dist/rpc/credential-resolver.d.ts +30 -1
- package/node_modules/@comis/daemon/dist/rpc/credential-resolver.js +74 -11
- package/node_modules/@comis/daemon/dist/rpc/mcp-handlers.d.ts +8 -0
- package/node_modules/@comis/daemon/dist/rpc/mcp-handlers.js +22 -8
- package/node_modules/@comis/daemon/dist/rpc/model-handlers.d.ts +1 -1
- package/node_modules/@comis/daemon/dist/rpc/model-handlers.js +2 -2
- package/node_modules/@comis/daemon/dist/rpc/provider-handlers.js +9 -12
- package/node_modules/@comis/daemon/dist/rpc/rpc-dispatch.d.ts +1 -0
- package/node_modules/@comis/daemon/dist/rpc/rpc-dispatch.js +27 -2
- package/node_modules/@comis/daemon/dist/setup-docker-restart-warn.js +0 -1
- package/node_modules/@comis/daemon/dist/sub-agent-runner.d.ts +18 -0
- package/node_modules/@comis/daemon/dist/sub-agent-runner.js +41 -9
- package/node_modules/@comis/daemon/dist/wiring/index.d.ts +4 -0
- package/node_modules/@comis/daemon/dist/wiring/index.js +2 -0
- package/node_modules/@comis/daemon/dist/wiring/oauth-preflight.d.ts +21 -0
- package/node_modules/@comis/daemon/dist/wiring/oauth-preflight.js +134 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.d.ts +81 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.js +164 -3
- package/node_modules/@comis/daemon/dist/wiring/setup-background-completion-runner.d.ts +58 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-background-completion-runner.js +59 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-background-tasks.d.ts +10 -3
- package/node_modules/@comis/daemon/dist/wiring/setup-background-tasks.js +13 -7
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.d.ts +9 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.js +35 -10
- package/node_modules/@comis/daemon/dist/wiring/setup-cross-session.d.ts +20 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-cross-session.js +21 -16
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.d.ts +14 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.js +65 -20
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.d.ts +4 -6
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.js +3 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-heartbeat.d.ts +20 -5
- package/node_modules/@comis/daemon/dist/wiring/setup-heartbeat.js +11 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-output-retention.d.ts +89 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-output-retention.js +212 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-schedulers.js +4 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-tools.d.ts +18 -4
- package/node_modules/@comis/daemon/dist/wiring/setup-tools.js +29 -10
- package/node_modules/@comis/daemon/dist/wiring/tool-capability-adapter.d.ts +75 -0
- package/node_modules/@comis/daemon/dist/wiring/tool-capability-adapter.js +253 -0
- package/node_modules/@comis/daemon/package.json +1 -1
- package/node_modules/@comis/gateway/dist/index.d.ts +2 -0
- package/node_modules/@comis/gateway/dist/index.js +2 -0
- package/node_modules/@comis/gateway/dist/oauth/oauth-callback-route.d.ts +66 -0
- package/node_modules/@comis/gateway/dist/oauth/oauth-callback-route.js +212 -0
- package/node_modules/@comis/gateway/dist/server/hono-server.d.ts +14 -0
- package/node_modules/@comis/gateway/dist/server/hono-server.js +10 -0
- package/node_modules/@comis/gateway/dist/webhook/webhook-endpoint.d.ts +0 -4
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/dist/logging/log-fields.d.ts +23 -0
- package/node_modules/@comis/infra/package.json +1 -1
- package/node_modules/@comis/memory/dist/compaction.d.ts +3 -5
- package/node_modules/@comis/memory/dist/compaction.js +2 -3
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.d.ts +2 -2
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.js +49 -1
- package/node_modules/@comis/memory/dist/index.d.ts +2 -0
- package/node_modules/@comis/memory/dist/index.js +3 -0
- package/node_modules/@comis/memory/dist/memory-api.d.ts +1 -1
- package/node_modules/@comis/memory/dist/memory-api.js +1 -1
- package/node_modules/@comis/memory/dist/oauth-profile-schema.d.ts +17 -0
- package/node_modules/@comis/memory/dist/oauth-profile-schema.js +33 -0
- package/node_modules/@comis/memory/dist/oauth-profile-store-encrypted.d.ts +27 -0
- package/node_modules/@comis/memory/dist/oauth-profile-store-encrypted.js +144 -0
- package/node_modules/@comis/memory/dist/session-store.d.ts +1 -1
- package/node_modules/@comis/memory/dist/session-store.js +1 -1
- package/node_modules/@comis/memory/dist/sqlite-secret-store.d.ts +29 -3
- package/node_modules/@comis/memory/dist/sqlite-secret-store.js +11 -3
- package/node_modules/@comis/memory/package.json +1 -1
- package/node_modules/@comis/scheduler/dist/cron/cron-types.d.ts +0 -42
- package/node_modules/@comis/scheduler/dist/execution/execution-lock.d.ts +13 -0
- package/node_modules/@comis/scheduler/dist/execution/execution-lock.js +1 -1
- package/node_modules/@comis/scheduler/dist/execution/index.d.ts +2 -0
- package/node_modules/@comis/scheduler/dist/execution/index.js +2 -0
- package/node_modules/@comis/scheduler/dist/heartbeat/agent-heartbeat-source.d.ts +29 -8
- package/node_modules/@comis/scheduler/dist/heartbeat/agent-heartbeat-source.js +20 -8
- package/node_modules/@comis/scheduler/dist/index.d.ts +2 -0
- package/node_modules/@comis/scheduler/dist/index.js +2 -0
- package/node_modules/@comis/scheduler/dist/system-events/system-event-types.d.ts +0 -3
- package/node_modules/@comis/scheduler/dist/tasks/task-types.d.ts +0 -17
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/dist/index.d.ts +3 -0
- package/node_modules/@comis/shared/dist/index.js +4 -0
- package/node_modules/@comis/shared/dist/mcp-tool-name.d.ts +78 -0
- package/node_modules/@comis/shared/dist/mcp-tool-name.js +92 -0
- package/node_modules/@comis/shared/dist/silent-tokens.d.ts +38 -0
- package/node_modules/@comis/shared/dist/silent-tokens.js +51 -0
- package/node_modules/@comis/shared/dist/visible-delivery.d.ts +28 -0
- package/node_modules/@comis/shared/dist/visible-delivery.js +16 -0
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/dist/bridge/mcp-tool-bridge.d.ts +2 -13
- package/node_modules/@comis/skills/dist/bridge/mcp-tool-bridge.js +3 -21
- package/node_modules/@comis/skills/dist/bridge/schema-validator.d.ts +38 -0
- package/node_modules/@comis/skills/dist/bridge/schema-validator.js +169 -0
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-enforcement.js +12 -0
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-registry.js +133 -3
- package/node_modules/@comis/skills/dist/builtin/exec-diagnostics.d.ts +32 -0
- package/node_modules/@comis/skills/dist/builtin/exec-diagnostics.js +127 -0
- package/node_modules/@comis/skills/dist/builtin/exec-security.js +38 -0
- package/node_modules/@comis/skills/dist/builtin/exec-tool.d.ts +55 -9
- package/node_modules/@comis/skills/dist/builtin/exec-tool.js +392 -19
- package/node_modules/@comis/skills/dist/builtin/file-tools/grep-tool.js +6 -6
- package/node_modules/@comis/skills/dist/builtin/install-detour.d.ts +67 -0
- package/node_modules/@comis/skills/dist/builtin/install-detour.js +342 -0
- package/node_modules/@comis/skills/dist/builtin/platform/admin-manage-factory.js +5 -5
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.d.ts +7 -6
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.js +40 -29
- package/node_modules/@comis/skills/dist/builtin/platform/background-tasks-tool.d.ts +4 -1
- package/node_modules/@comis/skills/dist/builtin/platform/background-tasks-tool.js +3 -3
- package/node_modules/@comis/skills/dist/builtin/platform/cron-tool.js +1 -1
- package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.js +6 -6
- package/node_modules/@comis/skills/dist/builtin/platform/mcp-manage-tool.d.ts +1 -1
- package/node_modules/@comis/skills/dist/builtin/platform/mcp-manage-tool.js +9 -9
- package/node_modules/@comis/skills/dist/builtin/platform/message-tool.js +18 -0
- package/node_modules/@comis/skills/dist/builtin/platform/messaging-factory.d.ts +18 -1
- package/node_modules/@comis/skills/dist/builtin/platform/messaging-factory.js +18 -2
- package/node_modules/@comis/skills/dist/builtin/platform/models-manage-tool.js +3 -3
- package/node_modules/@comis/skills/dist/builtin/process-registry.d.ts +14 -0
- package/node_modules/@comis/skills/dist/builtin/process-tool.d.ts +24 -4
- package/node_modules/@comis/skills/dist/builtin/process-tool.js +25 -7
- package/node_modules/@comis/skills/dist/builtin/sandbox/bwrap-provider.d.ts +11 -0
- package/node_modules/@comis/skills/dist/builtin/sandbox/bwrap-provider.js +123 -1
- package/node_modules/@comis/skills/dist/builtin/sandbox/detect-provider.js +40 -15
- package/node_modules/@comis/skills/dist/index.d.ts +4 -1
- package/node_modules/@comis/skills/dist/index.js +3 -1
- package/node_modules/@comis/skills/dist/manifest/capability-parser.d.ts +44 -0
- package/node_modules/@comis/skills/dist/manifest/capability-parser.js +68 -0
- package/node_modules/@comis/skills/dist/manifest/schema.d.ts +44 -37
- package/node_modules/@comis/skills/dist/manifest/schema.js +35 -0
- package/node_modules/@comis/skills/dist/media/ssrf-fetcher.d.ts +7 -0
- package/node_modules/@comis/skills/dist/media/ssrf-fetcher.js +9 -2
- package/node_modules/@comis/skills/dist/registry/discovery.d.ts +8 -0
- package/node_modules/@comis/skills/dist/registry/discovery.js +10 -3
- package/node_modules/@comis/skills/dist/registry/skill-registry.d.ts +45 -1
- package/node_modules/@comis/skills/dist/registry/skill-registry.js +70 -7
- package/node_modules/@comis/skills/package.json +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-detail-71BSbSfD.js → agent-detail-q8t1NB7w.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-editor-CTSDZhwT.js → agent-editor-B46io5gv.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-list-BEhni2ea.js → agent-list-DQ6g2Rcx.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{billing-view-DVP1IvVs.js → billing-view-IWPR8LgF.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{channel-detail-N_YK74xC.js → channel-detail-DlNNZuuC.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{channel-list-DRk6ZJaF.js → channel-list-DhGwxiMc.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{chat-console-Dm-GtSf9.js → chat-console-Nv6fM3Rc.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{config-editor-CIferYX6.js → config-editor-BYKuJF76.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{context-dag-browser-CL84rXXM.js → context-dag-browser-ClNEtzYE.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{context-engine-B1HOTEZv.js → context-engine-BZJ6HChd.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{delivery-view-Y6JKYVFw.js → delivery-view-Cb7I3vGu.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{diagnostics-view-DWV1UQjz.js → diagnostics-view-9u9Lyu5a.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{ic-chat-message-DfSERzzg.js → ic-chat-message-BFt3cVpx.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{ic-connection-dot-CXyhlJup.js → ic-connection-dot-y77LZ3Gu.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{ic-tool-call-DNmwTjek.js → ic-tool-call-qt6w1NQl.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{index-CBr0Tm9_.js → index-8Tg9oc-C.js} +2 -2
- package/node_modules/@comis/web/dist/assets/{mcp-management-BaH2-vox.js → mcp-management-69dtH_kY.js} +2 -2
- package/node_modules/@comis/web/dist/assets/{media-config-CZLshJoN.js → media-config-BdjLj5c1.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{media-test-C9NUWgo_.js → media-test-DuPqrixi.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{memory-inspector-D_fmTcRN.js → memory-inspector-B-Pepbq-.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{message-center-BBFlNCZn.js → message-center-B7l0yNYY.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{models-BytGLm99.js → models-JHFHuv5S.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{observe-view-VXtHqaqq.js → observe-view-r8mqhy4O.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-builder-CfXczlfJ.js → pipeline-builder-XjkiZRcR.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-history-CPmXFnbe.js → pipeline-history-CZqJv_Hj.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-history-detail-DcueTMs9.js → pipeline-history-detail-BEFGMoDy.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-list-B-xG5WZh.js → pipeline-list-B6q5LvO1.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{pipeline-monitor-pnIOYaSY.js → pipeline-monitor-BNomXjVL.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{scheduler-BtUIFHhA.js → scheduler-BJEjcGKA.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{security-C8mWRq2y.js → security-2G1jhBfV.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{session-detail-DgdkO5ka.js → session-detail-DmVPzFBR.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{session-list-DcylcfTn.js → session-list-CsqMQoHs.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{setup-wizard-BP5yjsuL.js → setup-wizard-CAdM-gSP.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{skills-DXt1bX8Z.js → skills-2ODqKaWr.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{subagents-C7YbUHXY.js → subagents-BFlwfTbD.js} +1 -1
- package/node_modules/@comis/web/dist/assets/{workspace-manager-DP6pW4wa.js → workspace-manager--CbOx_dI.js} +1 -1
- package/node_modules/@comis/web/dist/index.html +1 -1
- package/node_modules/@comis/web/package.json +1 -1
- package/package.json +25 -24
|
@@ -23,40 +23,28 @@ export type TaskStatus = z.infer<typeof TaskStatusSchema>;
|
|
|
23
23
|
* A task extracted from conversation by the LLM.
|
|
24
24
|
*/
|
|
25
25
|
export declare const ExtractedTaskSchema: z.ZodObject<{
|
|
26
|
-
/** Unique task identifier */
|
|
27
26
|
id: z.ZodString;
|
|
28
|
-
/** Short title for the task */
|
|
29
27
|
title: z.ZodString;
|
|
30
|
-
/** Detailed description */
|
|
31
28
|
description: z.ZodDefault<z.ZodString>;
|
|
32
|
-
/** Optional due date (ISO 8601) */
|
|
33
29
|
dueDate: z.ZodOptional<z.ZodString>;
|
|
34
|
-
/** Task priority */
|
|
35
30
|
priority: z.ZodEnum<{
|
|
36
31
|
low: "low";
|
|
37
32
|
medium: "medium";
|
|
38
33
|
high: "high";
|
|
39
34
|
critical: "critical";
|
|
40
35
|
}>;
|
|
41
|
-
/** Source provenance */
|
|
42
36
|
source: z.ZodObject<{
|
|
43
|
-
/** Session key where task was extracted */
|
|
44
37
|
sessionKey: z.ZodString;
|
|
45
|
-
/** Message index within the session */
|
|
46
38
|
messageIndex: z.ZodNumber;
|
|
47
|
-
/** Timestamp when extraction occurred (ms since epoch) */
|
|
48
39
|
extractedAt: z.ZodNumber;
|
|
49
40
|
}, z.core.$strict>;
|
|
50
|
-
/** Confidence score from the LLM extraction (0-1) */
|
|
51
41
|
confidence: z.ZodNumber;
|
|
52
|
-
/** Task lifecycle status */
|
|
53
42
|
status: z.ZodDefault<z.ZodEnum<{
|
|
54
43
|
completed: "completed";
|
|
55
44
|
pending: "pending";
|
|
56
45
|
cancelled: "cancelled";
|
|
57
46
|
scheduled: "scheduled";
|
|
58
47
|
}>>;
|
|
59
|
-
/** Task creation timestamp (ms since epoch) */
|
|
60
48
|
createdAtMs: z.ZodNumber;
|
|
61
49
|
}, z.core.$strict>;
|
|
62
50
|
export type ExtractedTask = z.infer<typeof ExtractedTaskSchema>;
|
|
@@ -65,7 +53,6 @@ export type ExtractedTask = z.infer<typeof ExtractedTaskSchema>;
|
|
|
65
53
|
* Tasks here lack id, createdAtMs, and status (assigned by the system).
|
|
66
54
|
*/
|
|
67
55
|
export declare const TaskExtractionResultSchema: z.ZodObject<{
|
|
68
|
-
/** Extracted tasks (without system-assigned fields) */
|
|
69
56
|
tasks: z.ZodArray<z.ZodObject<{
|
|
70
57
|
priority: z.ZodEnum<{
|
|
71
58
|
low: "low";
|
|
@@ -77,16 +64,12 @@ export declare const TaskExtractionResultSchema: z.ZodObject<{
|
|
|
77
64
|
description: z.ZodDefault<z.ZodString>;
|
|
78
65
|
dueDate: z.ZodOptional<z.ZodString>;
|
|
79
66
|
source: z.ZodObject<{
|
|
80
|
-
/** Session key where task was extracted */
|
|
81
67
|
sessionKey: z.ZodString;
|
|
82
|
-
/** Message index within the session */
|
|
83
68
|
messageIndex: z.ZodNumber;
|
|
84
|
-
/** Timestamp when extraction occurred (ms since epoch) */
|
|
85
69
|
extractedAt: z.ZodNumber;
|
|
86
70
|
}, z.core.$strict>;
|
|
87
71
|
confidence: z.ZodNumber;
|
|
88
72
|
}, z.core.$strict>>;
|
|
89
|
-
/** Optional reasoning from the LLM about extraction */
|
|
90
73
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
91
74
|
}, z.core.$strict>;
|
|
92
75
|
export type TaskExtractionResult = z.infer<typeof TaskExtractionResultSchema>;
|
|
@@ -5,3 +5,6 @@ export { withTimeout, TimeoutError } from "./timeout.js";
|
|
|
5
5
|
export { checkAborted } from "./abort.js";
|
|
6
6
|
export { createTTLCache } from "./ttl-cache.js";
|
|
7
7
|
export type { TTLCache, TTLCacheOptions } from "./ttl-cache.js";
|
|
8
|
+
export { stripReplyTags, isSilentResponse, NO_REPLY_TOKEN, HEARTBEAT_OK_TOKEN, SILENT_PREFIX, } from "./silent-tokens.js";
|
|
9
|
+
export type { VisibleDeliveryKind, VisibleDeliveryRecord } from "./visible-delivery.js";
|
|
10
|
+
export { extractMcpServerName, parseSanitizedMcpToolName } from "./mcp-tool-name.js";
|
|
@@ -5,3 +5,7 @@ export { suppressError } from "./suppress-error.js";
|
|
|
5
5
|
export { withTimeout, TimeoutError } from "./timeout.js";
|
|
6
6
|
export { checkAborted } from "./abort.js";
|
|
7
7
|
export { createTTLCache } from "./ttl-cache.js";
|
|
8
|
+
// Silent-token detection for agent responses.
|
|
9
|
+
export { stripReplyTags, isSilentResponse, NO_REPLY_TOKEN, HEARTBEAT_OK_TOKEN, SILENT_PREFIX, } from "./silent-tokens.js";
|
|
10
|
+
// Canonical sanitized MCP tool name parsers.
|
|
11
|
+
export { extractMcpServerName, parseSanitizedMcpToolName } from "./mcp-tool-name.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical sanitized MCP tool name parsers.
|
|
3
|
+
*
|
|
4
|
+
* Sanitized MCP tool names use the format `mcp__serverName--toolName`,
|
|
5
|
+
* produced by `sanitizeMcpToolName` in @comis/skills' mcp-tool-bridge
|
|
6
|
+
* (replaces `:` with `__`, `/` with `--` to satisfy LLM API constraints
|
|
7
|
+
* that tool names match `^[a-zA-Z0-9_-]{1,128}$`).
|
|
8
|
+
*
|
|
9
|
+
* Both parsers split on the FIRST `--` after the `mcp__` prefix, which:
|
|
10
|
+
* - Correctly handles hyphenated server names (`mcp__foo-bar--baz`
|
|
11
|
+
* -> server="foo-bar", tool="baz")
|
|
12
|
+
* - Correctly handles underscored server names (`mcp__srv__v2--ns--tool`
|
|
13
|
+
* -> server="srv__v2", tool="ns--tool")
|
|
14
|
+
* - Returns undefined for non-MCP tools (`Read`) and malformed names
|
|
15
|
+
* (`mcp__`, `mcp__foo`, `mcp__--baz`)
|
|
16
|
+
*
|
|
17
|
+
* Asymmetry between the two functions is intentional:
|
|
18
|
+
* - `extractMcpServerName("mcp__foo--")` returns "foo" — callers that
|
|
19
|
+
* only need to GROUP by server (e.g., DeferredToolEntry grouping in
|
|
20
|
+
* tool-deferral.ts) tolerate empty tool names.
|
|
21
|
+
* - `parseSanitizedMcpToolName("mcp__foo--")` returns undefined —
|
|
22
|
+
* callers that need a complete (server, tool) pair require both
|
|
23
|
+
* halves to be non-empty.
|
|
24
|
+
*
|
|
25
|
+
* Used by:
|
|
26
|
+
* - `packages/skills/src/bridge/mcp-tool-bridge.ts` — re-exports for
|
|
27
|
+
* public API surface (`packages/skills/src/index.ts:174`).
|
|
28
|
+
* - `packages/agent/src/bridge/bridge-event-handlers.ts` — re-exports
|
|
29
|
+
* for in-package callers (`pi-event-bridge.ts:42`,
|
|
30
|
+
* `tool-deferral.ts:23`).
|
|
31
|
+
* - `packages/agent/src/bridge/pi-event-bridge.ts:347` — log decoration
|
|
32
|
+
* when an MCP tool errors at the event-bus boundary.
|
|
33
|
+
* - `packages/agent/src/executor/tool-deferral.ts:293,912,917` —
|
|
34
|
+
* grouping `DeferredToolEntry[]` by server name.
|
|
35
|
+
* - Future install-detour parser will consume `parseSanitizedMcpToolName`
|
|
36
|
+
* for `{server, tool}` pair-matching.
|
|
37
|
+
*
|
|
38
|
+
* @module
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* Extract the MCP server name from a sanitized tool name.
|
|
42
|
+
*
|
|
43
|
+
* Sanitized MCP tool names use the format `mcp__serverName--toolName`.
|
|
44
|
+
* Returns `undefined` for non-MCP tools, malformed names with no
|
|
45
|
+
* `--` separator, or names with an empty server (`mcp__--baz`).
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* extractMcpServerName("mcp__context7--resolve-library-id") // "context7"
|
|
49
|
+
* extractMcpServerName("mcp__foo-bar--baz") // "foo-bar"
|
|
50
|
+
* extractMcpServerName("mcp__srv__v2--ns--tool") // "srv__v2"
|
|
51
|
+
* extractMcpServerName("Read") // undefined
|
|
52
|
+
* extractMcpServerName("mcp__") // undefined
|
|
53
|
+
* extractMcpServerName("mcp__foo") // undefined
|
|
54
|
+
* extractMcpServerName("mcp__--baz") // undefined
|
|
55
|
+
*/
|
|
56
|
+
export declare function extractMcpServerName(toolName: string): string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Parse a sanitized MCP tool name into its server and tool components.
|
|
59
|
+
*
|
|
60
|
+
* Returns `undefined` for non-MCP tools, malformed names, or names where
|
|
61
|
+
* either the server or tool component would be empty.
|
|
62
|
+
*
|
|
63
|
+
* Stricter than `extractMcpServerName`: this function ALSO rejects names
|
|
64
|
+
* with an empty tool (`mcp__foo--` returns `undefined` here, but
|
|
65
|
+
* `extractMcpServerName` returns `"foo"`).
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* parseSanitizedMcpToolName("mcp__context7--resolve-library-id")
|
|
69
|
+
* // { server: "context7", tool: "resolve-library-id" }
|
|
70
|
+
* parseSanitizedMcpToolName("mcp__foo--bar--baz")
|
|
71
|
+
* // { server: "foo", tool: "bar--baz" } // splits on FIRST "--"
|
|
72
|
+
* parseSanitizedMcpToolName("mcp__foo--") // undefined
|
|
73
|
+
* parseSanitizedMcpToolName("Read") // undefined
|
|
74
|
+
*/
|
|
75
|
+
export declare function parseSanitizedMcpToolName(toolName: string): {
|
|
76
|
+
server: string;
|
|
77
|
+
tool: string;
|
|
78
|
+
} | undefined;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Canonical sanitized MCP tool name parsers.
|
|
4
|
+
*
|
|
5
|
+
* Sanitized MCP tool names use the format `mcp__serverName--toolName`,
|
|
6
|
+
* produced by `sanitizeMcpToolName` in @comis/skills' mcp-tool-bridge
|
|
7
|
+
* (replaces `:` with `__`, `/` with `--` to satisfy LLM API constraints
|
|
8
|
+
* that tool names match `^[a-zA-Z0-9_-]{1,128}$`).
|
|
9
|
+
*
|
|
10
|
+
* Both parsers split on the FIRST `--` after the `mcp__` prefix, which:
|
|
11
|
+
* - Correctly handles hyphenated server names (`mcp__foo-bar--baz`
|
|
12
|
+
* -> server="foo-bar", tool="baz")
|
|
13
|
+
* - Correctly handles underscored server names (`mcp__srv__v2--ns--tool`
|
|
14
|
+
* -> server="srv__v2", tool="ns--tool")
|
|
15
|
+
* - Returns undefined for non-MCP tools (`Read`) and malformed names
|
|
16
|
+
* (`mcp__`, `mcp__foo`, `mcp__--baz`)
|
|
17
|
+
*
|
|
18
|
+
* Asymmetry between the two functions is intentional:
|
|
19
|
+
* - `extractMcpServerName("mcp__foo--")` returns "foo" — callers that
|
|
20
|
+
* only need to GROUP by server (e.g., DeferredToolEntry grouping in
|
|
21
|
+
* tool-deferral.ts) tolerate empty tool names.
|
|
22
|
+
* - `parseSanitizedMcpToolName("mcp__foo--")` returns undefined —
|
|
23
|
+
* callers that need a complete (server, tool) pair require both
|
|
24
|
+
* halves to be non-empty.
|
|
25
|
+
*
|
|
26
|
+
* Used by:
|
|
27
|
+
* - `packages/skills/src/bridge/mcp-tool-bridge.ts` — re-exports for
|
|
28
|
+
* public API surface (`packages/skills/src/index.ts:174`).
|
|
29
|
+
* - `packages/agent/src/bridge/bridge-event-handlers.ts` — re-exports
|
|
30
|
+
* for in-package callers (`pi-event-bridge.ts:42`,
|
|
31
|
+
* `tool-deferral.ts:23`).
|
|
32
|
+
* - `packages/agent/src/bridge/pi-event-bridge.ts:347` — log decoration
|
|
33
|
+
* when an MCP tool errors at the event-bus boundary.
|
|
34
|
+
* - `packages/agent/src/executor/tool-deferral.ts:293,912,917` —
|
|
35
|
+
* grouping `DeferredToolEntry[]` by server name.
|
|
36
|
+
* - Future install-detour parser will consume `parseSanitizedMcpToolName`
|
|
37
|
+
* for `{server, tool}` pair-matching.
|
|
38
|
+
*
|
|
39
|
+
* @module
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Extract the MCP server name from a sanitized tool name.
|
|
43
|
+
*
|
|
44
|
+
* Sanitized MCP tool names use the format `mcp__serverName--toolName`.
|
|
45
|
+
* Returns `undefined` for non-MCP tools, malformed names with no
|
|
46
|
+
* `--` separator, or names with an empty server (`mcp__--baz`).
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* extractMcpServerName("mcp__context7--resolve-library-id") // "context7"
|
|
50
|
+
* extractMcpServerName("mcp__foo-bar--baz") // "foo-bar"
|
|
51
|
+
* extractMcpServerName("mcp__srv__v2--ns--tool") // "srv__v2"
|
|
52
|
+
* extractMcpServerName("Read") // undefined
|
|
53
|
+
* extractMcpServerName("mcp__") // undefined
|
|
54
|
+
* extractMcpServerName("mcp__foo") // undefined
|
|
55
|
+
* extractMcpServerName("mcp__--baz") // undefined
|
|
56
|
+
*/
|
|
57
|
+
export function extractMcpServerName(toolName) {
|
|
58
|
+
if (!toolName.startsWith("mcp__"))
|
|
59
|
+
return undefined;
|
|
60
|
+
const rest = toolName.slice(5);
|
|
61
|
+
const sepIdx = rest.indexOf("--");
|
|
62
|
+
if (sepIdx <= 0)
|
|
63
|
+
return undefined;
|
|
64
|
+
return rest.slice(0, sepIdx);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Parse a sanitized MCP tool name into its server and tool components.
|
|
68
|
+
*
|
|
69
|
+
* Returns `undefined` for non-MCP tools, malformed names, or names where
|
|
70
|
+
* either the server or tool component would be empty.
|
|
71
|
+
*
|
|
72
|
+
* Stricter than `extractMcpServerName`: this function ALSO rejects names
|
|
73
|
+
* with an empty tool (`mcp__foo--` returns `undefined` here, but
|
|
74
|
+
* `extractMcpServerName` returns `"foo"`).
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* parseSanitizedMcpToolName("mcp__context7--resolve-library-id")
|
|
78
|
+
* // { server: "context7", tool: "resolve-library-id" }
|
|
79
|
+
* parseSanitizedMcpToolName("mcp__foo--bar--baz")
|
|
80
|
+
* // { server: "foo", tool: "bar--baz" } // splits on FIRST "--"
|
|
81
|
+
* parseSanitizedMcpToolName("mcp__foo--") // undefined
|
|
82
|
+
* parseSanitizedMcpToolName("Read") // undefined
|
|
83
|
+
*/
|
|
84
|
+
export function parseSanitizedMcpToolName(toolName) {
|
|
85
|
+
if (!toolName.startsWith("mcp__"))
|
|
86
|
+
return undefined;
|
|
87
|
+
const rest = toolName.slice(5);
|
|
88
|
+
const sepIdx = rest.indexOf("--");
|
|
89
|
+
if (sepIdx <= 0 || sepIdx >= rest.length - 2)
|
|
90
|
+
return undefined;
|
|
91
|
+
return { server: rest.slice(0, sepIdx), tool: rest.slice(sepIdx + 2) };
|
|
92
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Silent-token detection for agent responses.
|
|
3
|
+
*
|
|
4
|
+
* Symbols + helpers that detect "silent" agent responses — exact-match
|
|
5
|
+
* sentinels (`NO_REPLY`, `HEARTBEAT_OK`) and a `[SILENT]`-prefix marker —
|
|
6
|
+
* after stripping `<reply>` / `</reply>` XML tags and trimming whitespace.
|
|
7
|
+
*
|
|
8
|
+
* Used by:
|
|
9
|
+
* - `packages/agent/src/executor/executor-post-execution.ts` — silent-sentinel
|
|
10
|
+
* pre-gate before paired-memory persistence.
|
|
11
|
+
* - `packages/channels/src/shared/response-filter.ts` — channel-delivery
|
|
12
|
+
* suppression (helper-delegating).
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
export declare const NO_REPLY_TOKEN = "NO_REPLY";
|
|
17
|
+
export declare const HEARTBEAT_OK_TOKEN = "HEARTBEAT_OK";
|
|
18
|
+
export declare const SILENT_PREFIX = "[SILENT]";
|
|
19
|
+
/**
|
|
20
|
+
* Strip `<reply>` / `<reply to="...">` opening tags and `</reply>` closing
|
|
21
|
+
* tags from a response, then trim whitespace.
|
|
22
|
+
*/
|
|
23
|
+
export declare function stripReplyTags(s: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Returns true iff the response, after stripping `<reply>` / `</reply>` tags
|
|
26
|
+
* and trimming whitespace, is exactly a silent sentinel (`NO_REPLY`,
|
|
27
|
+
* `HEARTBEAT_OK`, `[SILENT]`-prefix) or empty.
|
|
28
|
+
*
|
|
29
|
+
* **Contract:** idempotent under `stripReplyTags + trim`. For all
|
|
30
|
+
* inputs, `isSilentResponse(response) === isSilentResponse(stripReplyTags(response))`.
|
|
31
|
+
* Callers may pass raw or pre-stripped input; the helper does the strip+trim
|
|
32
|
+
* internally as defense-in-depth.
|
|
33
|
+
*
|
|
34
|
+
* Behavior matches the legacy `filterResponse` in
|
|
35
|
+
* `packages/channels/src/shared/response-filter.ts` byte-for-byte (this
|
|
36
|
+
* helper is the canonical home; `filterResponse` delegates to it).
|
|
37
|
+
*/
|
|
38
|
+
export declare function isSilentResponse(response: string | undefined): boolean;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Silent-token detection for agent responses.
|
|
4
|
+
*
|
|
5
|
+
* Symbols + helpers that detect "silent" agent responses — exact-match
|
|
6
|
+
* sentinels (`NO_REPLY`, `HEARTBEAT_OK`) and a `[SILENT]`-prefix marker —
|
|
7
|
+
* after stripping `<reply>` / `</reply>` XML tags and trimming whitespace.
|
|
8
|
+
*
|
|
9
|
+
* Used by:
|
|
10
|
+
* - `packages/agent/src/executor/executor-post-execution.ts` — silent-sentinel
|
|
11
|
+
* pre-gate before paired-memory persistence.
|
|
12
|
+
* - `packages/channels/src/shared/response-filter.ts` — channel-delivery
|
|
13
|
+
* suppression (helper-delegating).
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
export const NO_REPLY_TOKEN = "NO_REPLY";
|
|
18
|
+
export const HEARTBEAT_OK_TOKEN = "HEARTBEAT_OK";
|
|
19
|
+
export const SILENT_PREFIX = "[SILENT]";
|
|
20
|
+
const REPLY_TAG_RE = /<\/?reply(?:\s[^>]*)?>|<reply>/gi;
|
|
21
|
+
/**
|
|
22
|
+
* Strip `<reply>` / `<reply to="...">` opening tags and `</reply>` closing
|
|
23
|
+
* tags from a response, then trim whitespace.
|
|
24
|
+
*/
|
|
25
|
+
export function stripReplyTags(s) {
|
|
26
|
+
return s.replace(REPLY_TAG_RE, "").trim();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns true iff the response, after stripping `<reply>` / `</reply>` tags
|
|
30
|
+
* and trimming whitespace, is exactly a silent sentinel (`NO_REPLY`,
|
|
31
|
+
* `HEARTBEAT_OK`, `[SILENT]`-prefix) or empty.
|
|
32
|
+
*
|
|
33
|
+
* **Contract:** idempotent under `stripReplyTags + trim`. For all
|
|
34
|
+
* inputs, `isSilentResponse(response) === isSilentResponse(stripReplyTags(response))`.
|
|
35
|
+
* Callers may pass raw or pre-stripped input; the helper does the strip+trim
|
|
36
|
+
* internally as defense-in-depth.
|
|
37
|
+
*
|
|
38
|
+
* Behavior matches the legacy `filterResponse` in
|
|
39
|
+
* `packages/channels/src/shared/response-filter.ts` byte-for-byte (this
|
|
40
|
+
* helper is the canonical home; `filterResponse` delegates to it).
|
|
41
|
+
*/
|
|
42
|
+
export function isSilentResponse(response) {
|
|
43
|
+
if (!response)
|
|
44
|
+
return true;
|
|
45
|
+
const trimmed = stripReplyTags(response);
|
|
46
|
+
if (!trimmed)
|
|
47
|
+
return true;
|
|
48
|
+
if (trimmed.toUpperCase().startsWith(SILENT_PREFIX))
|
|
49
|
+
return true;
|
|
50
|
+
return trimmed === NO_REPLY_TOKEN || trimmed === HEARTBEAT_OK_TOKEN;
|
|
51
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VisibleDeliveryRecord: structured metadata for outbound channel deliveries
|
|
3
|
+
* captured in JSONL `details` for offline analysis (output retention housekeeper consumes this).
|
|
4
|
+
*
|
|
5
|
+
* Persisted in `details.visibleDelivery` on `message(action='attach')` toolResult
|
|
6
|
+
* entries; visible to operators inspecting JSONL but NOT injected back into the
|
|
7
|
+
* model's context window across turns.
|
|
8
|
+
*
|
|
9
|
+
* Plain TypeScript interface (no Zod) per AGENTS §2.3 KISS — `@comis/shared`
|
|
10
|
+
* has zero runtime deps, and this type is JSONL-persisted only (no port-bus
|
|
11
|
+
* payload validation needed).
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
/** Kind of visible delivery captured. Open-ended union for forward extensibility. */
|
|
16
|
+
export type VisibleDeliveryKind = "attachment" | "text" | "reaction";
|
|
17
|
+
export interface VisibleDeliveryRecord {
|
|
18
|
+
/** What kind of delivery this records. */
|
|
19
|
+
kind: VisibleDeliveryKind;
|
|
20
|
+
/** Channel adapter that delivered (e.g., "telegram"). */
|
|
21
|
+
channelType: string;
|
|
22
|
+
/** Channel-specific identifier (e.g., user/group/peer id). */
|
|
23
|
+
channelId: string;
|
|
24
|
+
/** Human-readable caption for attachments; brief text for text/reaction. */
|
|
25
|
+
caption?: string;
|
|
26
|
+
/** Wall-clock millis when delivery completed (Date.now()). */
|
|
27
|
+
deliveredAt: number;
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* VisibleDeliveryRecord: structured metadata for outbound channel deliveries
|
|
4
|
+
* captured in JSONL `details` for offline analysis (output retention housekeeper consumes this).
|
|
5
|
+
*
|
|
6
|
+
* Persisted in `details.visibleDelivery` on `message(action='attach')` toolResult
|
|
7
|
+
* entries; visible to operators inspecting JSONL but NOT injected back into the
|
|
8
|
+
* model's context window across turns.
|
|
9
|
+
*
|
|
10
|
+
* Plain TypeScript interface (no Zod) per AGENTS §2.3 KISS — `@comis/shared`
|
|
11
|
+
* has zero runtime deps, and this type is JSONL-persisted only (no port-bus
|
|
12
|
+
* payload validation needed).
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -13,24 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
|
15
15
|
import { type TSchema } from "typebox";
|
|
16
|
+
import { extractMcpServerName } from "@comis/shared";
|
|
17
|
+
export { extractMcpServerName };
|
|
16
18
|
import { type ToolSourceProfile } from "../builtin/tool-source-profiles.js";
|
|
17
19
|
import type { McpToolDefinition, McpClientManager } from "../integrations/mcp-client.js";
|
|
18
20
|
/** Minimal pino-compatible logger for MCP bridge diagnostic logging. */
|
|
19
21
|
interface McpBridgeLogger {
|
|
20
22
|
debug(obj: Record<string, unknown>, msg: string): void;
|
|
21
23
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Extract the MCP server name from a sanitized tool name.
|
|
24
|
-
*
|
|
25
|
-
* Sanitized MCP tool names use the format `mcp__serverName--toolName`.
|
|
26
|
-
* Returns `undefined` for non-MCP tools or malformed names.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* extractMcpServerName("mcp__context7--resolve-library-id") // "context7"
|
|
30
|
-
* extractMcpServerName("mcp__srv__v2--ns--tool") // "srv__v2"
|
|
31
|
-
* extractMcpServerName("bash") // undefined
|
|
32
|
-
*/
|
|
33
|
-
export declare function extractMcpServerName(toolName: string): string | undefined;
|
|
34
24
|
/**
|
|
35
25
|
* Classify an MCP error message into a category for observability.
|
|
36
26
|
*
|
|
@@ -78,4 +68,3 @@ export declare function sanitizeMcpToolName(qualifiedName: string): string;
|
|
|
78
68
|
* @returns AgentTool instances ready for the agent executor
|
|
79
69
|
*/
|
|
80
70
|
export declare function mcpToolsToAgentTools(tools: McpToolDefinition[], callTool: McpClientManager["callTool"], toolSourceProfiles?: Record<string, Partial<ToolSourceProfile>>, logger?: McpBridgeLogger): AgentTool<any>[];
|
|
81
|
-
export {};
|
|
@@ -14,32 +14,14 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { Type } from "typebox";
|
|
16
16
|
import { registerToolMetadata } from "@comis/core";
|
|
17
|
+
import { extractMcpServerName } from "@comis/shared";
|
|
18
|
+
export { extractMcpServerName };
|
|
17
19
|
import { resolveSourceProfile } from "../builtin/tool-source-profiles.js";
|
|
18
20
|
import { sanitizeMcpToolResult } from "../integrations/mcp-result-sanitizer.js";
|
|
19
21
|
import { truncateJsonAware } from "./json-truncate.js";
|
|
20
22
|
// ---------------------------------------------------------------------------
|
|
21
|
-
// MCP
|
|
23
|
+
// MCP error classification
|
|
22
24
|
// ---------------------------------------------------------------------------
|
|
23
|
-
/**
|
|
24
|
-
* Extract the MCP server name from a sanitized tool name.
|
|
25
|
-
*
|
|
26
|
-
* Sanitized MCP tool names use the format `mcp__serverName--toolName`.
|
|
27
|
-
* Returns `undefined` for non-MCP tools or malformed names.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* extractMcpServerName("mcp__context7--resolve-library-id") // "context7"
|
|
31
|
-
* extractMcpServerName("mcp__srv__v2--ns--tool") // "srv__v2"
|
|
32
|
-
* extractMcpServerName("bash") // undefined
|
|
33
|
-
*/
|
|
34
|
-
export function extractMcpServerName(toolName) {
|
|
35
|
-
if (!toolName.startsWith("mcp__"))
|
|
36
|
-
return undefined;
|
|
37
|
-
const rest = toolName.slice(5); // strip "mcp__"
|
|
38
|
-
const sepIdx = rest.indexOf("--");
|
|
39
|
-
if (sepIdx <= 0)
|
|
40
|
-
return undefined; // no separator or empty server name
|
|
41
|
-
return rest.slice(0, sepIdx);
|
|
42
|
-
}
|
|
43
25
|
/**
|
|
44
26
|
* Classify an MCP error message into a category for observability.
|
|
45
27
|
*
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic tool-entry schema validator.
|
|
3
|
+
*
|
|
4
|
+
* Pre-flight, action-aware shape gate that runs BEFORE per-tool
|
|
5
|
+
* `validateInput`. Catches malformed shapes such as
|
|
6
|
+
* `mcp_manage({action:"connect", server_name:"yfinance"})` at the
|
|
7
|
+
* tool-entry boundary and produces a self-correcting message:
|
|
8
|
+
*
|
|
9
|
+
* "[invalid_value] unknown key 'server_name' -- did you mean 'name'?.
|
|
10
|
+
* missing for action='connect': transport.
|
|
11
|
+
* valid keys: action, name, transport, command, args, url, headers"
|
|
12
|
+
*
|
|
13
|
+
* Generic by construction: every per-tool branch lives in the metadata
|
|
14
|
+
* registered via `registerToolMetadata({ validActions, validKeys,
|
|
15
|
+
* requiredByAction })`. This file contains zero tool-name conditionals.
|
|
16
|
+
*
|
|
17
|
+
* Reuses `levenshteinSimilarity` from
|
|
18
|
+
* ../builtin/file/path-suggest.js -- DO NOT duplicate the helper.
|
|
19
|
+
*
|
|
20
|
+
* Returns a single error string on failure (matches the
|
|
21
|
+
* `validateInput` contract used by `wrapWithMetadataEnforcement`),
|
|
22
|
+
* `undefined` on success. Caller prepends `[invalid_value]`.
|
|
23
|
+
*
|
|
24
|
+
* @module
|
|
25
|
+
*/
|
|
26
|
+
import type { ComisToolMetadata } from "@comis/core";
|
|
27
|
+
/**
|
|
28
|
+
* Validate tool-entry shape against registered metadata.
|
|
29
|
+
*
|
|
30
|
+
* @param params - Raw params object as the SDK would pass to `execute()`.
|
|
31
|
+
* @param meta - Metadata returned from `getToolMetadata(toolName)`. May be
|
|
32
|
+
* undefined or missing the entry-shape fields -- in either case this
|
|
33
|
+
* function returns undefined (no-op) so existing tools without
|
|
34
|
+
* registered shape metadata pass through unchanged.
|
|
35
|
+
* @returns A single error string when validation fails (caller prepends
|
|
36
|
+
* `[invalid_value]`), or `undefined` when validation passes / is skipped.
|
|
37
|
+
*/
|
|
38
|
+
export declare function validateToolEntry(params: unknown, meta: ComisToolMetadata | undefined): string | undefined;
|