comisai 1.0.18 → 1.0.22

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.
Files changed (149) hide show
  1. package/dist/cli-entry.js +0 -0
  2. package/node_modules/@comis/agent/dist/context-engine/context-engine.js +43 -2
  3. package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.d.ts +51 -0
  4. package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.js +110 -0
  5. package/node_modules/@comis/agent/dist/context-engine/signature-surrogate-guard.d.ts +54 -0
  6. package/node_modules/@comis/agent/dist/context-engine/signature-surrogate-guard.js +145 -0
  7. package/node_modules/@comis/agent/dist/context-engine/types-core.d.ts +17 -0
  8. package/node_modules/@comis/agent/dist/executor/error-classifier.d.ts +11 -1
  9. package/node_modules/@comis/agent/dist/executor/error-classifier.js +13 -0
  10. package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.d.ts +1 -0
  11. package/node_modules/@comis/agent/dist/executor/executor-context-engine-setup.js +55 -0
  12. package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +106 -5
  13. package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +1 -0
  14. package/node_modules/@comis/agent/dist/executor/pi-executor.d.ts +1 -4
  15. package/node_modules/@comis/agent/dist/executor/replay-drift-detector.d.ts +85 -0
  16. package/node_modules/@comis/agent/dist/executor/replay-drift-detector.js +92 -0
  17. package/node_modules/@comis/agent/dist/executor/signature-block-scrubber.d.ts +34 -0
  18. package/node_modules/@comis/agent/dist/executor/signature-block-scrubber.js +69 -0
  19. package/node_modules/@comis/agent/dist/executor/signed-replay-detector.d.ts +39 -0
  20. package/node_modules/@comis/agent/dist/executor/signed-replay-detector.js +72 -0
  21. package/node_modules/@comis/agent/package.json +1 -1
  22. package/node_modules/@comis/channels/package.json +1 -1
  23. package/node_modules/@comis/cli/dist/cli.js +0 -0
  24. package/node_modules/@comis/cli/dist/wizard/steps/12-finish.d.ts +4 -5
  25. package/node_modules/@comis/cli/dist/wizard/steps/12-finish.js +99 -40
  26. package/node_modules/@comis/cli/package.json +1 -1
  27. package/node_modules/@comis/core/dist/config/git-manager.js +10 -4
  28. package/node_modules/@comis/core/dist/config/index.d.ts +1 -0
  29. package/node_modules/@comis/core/dist/config/index.js +2 -0
  30. package/node_modules/@comis/core/dist/config/managed-sections.d.ts +67 -0
  31. package/node_modules/@comis/core/dist/config/managed-sections.js +124 -0
  32. package/node_modules/@comis/core/dist/config/schema-agent.d.ts +28 -10
  33. package/node_modules/@comis/core/dist/config/schema-agent.js +6 -0
  34. package/node_modules/@comis/core/dist/config/schema-gateway.d.ts +2 -2
  35. package/node_modules/@comis/core/dist/config/schema.d.ts +65 -64
  36. package/node_modules/@comis/core/dist/event-bus/events-messaging.d.ts +16 -0
  37. package/node_modules/@comis/core/dist/exports/config.d.ts +1 -1
  38. package/node_modules/@comis/core/dist/exports/config.js +1 -1
  39. package/node_modules/@comis/core/package.json +1 -1
  40. package/node_modules/@comis/daemon/bundled-skills/skill-creator/scripts/init-skill.py +0 -0
  41. package/node_modules/@comis/daemon/bundled-skills/skill-creator/scripts/validate-skill.py +0 -0
  42. package/node_modules/@comis/daemon/dist/daemon.js +0 -0
  43. package/node_modules/@comis/daemon/dist/rpc/config-handlers.js +20 -7
  44. package/node_modules/@comis/daemon/dist/rpc/session-handlers.js +27 -1
  45. package/node_modules/@comis/daemon/package.json +1 -1
  46. package/node_modules/@comis/gateway/package.json +1 -1
  47. package/node_modules/@comis/infra/package.json +1 -1
  48. package/node_modules/@comis/memory/package.json +1 -1
  49. package/node_modules/@comis/scheduler/package.json +1 -1
  50. package/node_modules/@comis/shared/package.json +1 -1
  51. package/node_modules/@comis/skills/dist/bridge/tool-metadata-registry.js +23 -8
  52. package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.d.ts +1 -1
  53. package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.js +18 -14
  54. package/node_modules/@comis/skills/dist/builtin/platform/unified-session-tool.js +1 -1
  55. package/node_modules/@comis/skills/package.json +1 -1
  56. package/node_modules/@comis/web/package.json +1 -1
  57. package/package.json +24 -26
  58. package/node_modules/@comis/agent/dist/provider/response/strip-minimax-xml.d.ts +0 -9
  59. package/node_modules/@comis/agent/dist/provider/response/strip-minimax-xml.js +0 -17
  60. package/node_modules/@comis/agent/dist/provider/response/strip-model-tokens.d.ts +0 -13
  61. package/node_modules/@comis/agent/dist/provider/response/strip-model-tokens.js +0 -19
  62. package/node_modules/@comis/agent/dist/provider/response/strip-tool-text.d.ts +0 -11
  63. package/node_modules/@comis/agent/dist/provider/response/strip-tool-text.js +0 -32
  64. package/node_modules/@comis/agent/dist/safety/follow-through-detector.d.ts +0 -46
  65. package/node_modules/@comis/agent/dist/safety/follow-through-detector.js +0 -76
  66. package/node_modules/@comis/agent/dist/safety/post-compaction-safety.d.ts +0 -30
  67. package/node_modules/@comis/agent/dist/safety/post-compaction-safety.js +0 -51
  68. package/node_modules/@comis/agent/dist/safety/schema-normalizer.d.ts +0 -37
  69. package/node_modules/@comis/agent/dist/safety/schema-normalizer.js +0 -137
  70. package/node_modules/@comis/agent/dist/safety/schema-pruning.d.ts +0 -50
  71. package/node_modules/@comis/agent/dist/safety/schema-pruning.js +0 -112
  72. package/node_modules/@comis/agent/dist/safety/tool-image-sanitizer.d.ts +0 -43
  73. package/node_modules/@comis/agent/dist/safety/tool-image-sanitizer.js +0 -96
  74. package/node_modules/@comis/agent/dist/safety/tool-sanitizer.d.ts +0 -44
  75. package/node_modules/@comis/agent/dist/safety/tool-sanitizer.js +0 -94
  76. package/node_modules/@comis/channels/dist/shared/thinking-tag-filter.d.ts +0 -28
  77. package/node_modules/@comis/channels/dist/shared/thinking-tag-filter.js +0 -206
  78. package/node_modules/@comis/cli/dist/wizard/config-writer.d.ts +0 -25
  79. package/node_modules/@comis/cli/dist/wizard/config-writer.js +0 -144
  80. package/node_modules/@comis/cli/dist/wizard/flow-types.d.ts +0 -48
  81. package/node_modules/@comis/cli/dist/wizard/flow-types.js +0 -70
  82. package/node_modules/@comis/cli/dist/wizard/manual-flow.d.ts +0 -21
  83. package/node_modules/@comis/cli/dist/wizard/manual-flow.js +0 -345
  84. package/node_modules/@comis/cli/dist/wizard/quickstart-flow.d.ts +0 -21
  85. package/node_modules/@comis/cli/dist/wizard/quickstart-flow.js +0 -116
  86. package/node_modules/@comis/core/dist/config/schema-agent-model.d.ts +0 -135
  87. package/node_modules/@comis/core/dist/config/schema-agent-model.js +0 -114
  88. package/node_modules/@comis/core/dist/config/schema-agent-session.d.ts +0 -177
  89. package/node_modules/@comis/core/dist/config/schema-agent-session.js +0 -116
  90. package/node_modules/@comis/core/dist/config/schema-context-engine.d.ts +0 -92
  91. package/node_modules/@comis/core/dist/config/schema-context-engine.js +0 -92
  92. package/node_modules/@comis/core/dist/config/schema-context-guard.d.ts +0 -34
  93. package/node_modules/@comis/core/dist/config/schema-context-guard.js +0 -32
  94. package/node_modules/@comis/core/dist/config/schema-delivery-mirror.d.ts +0 -27
  95. package/node_modules/@comis/core/dist/config/schema-delivery-mirror.js +0 -26
  96. package/node_modules/@comis/core/dist/config/schema-delivery-queue.d.ts +0 -31
  97. package/node_modules/@comis/core/dist/config/schema-delivery-queue.js +0 -30
  98. package/node_modules/@comis/core/dist/config/schema-delivery-timing.d.ts +0 -41
  99. package/node_modules/@comis/core/dist/config/schema-delivery-timing.js +0 -31
  100. package/node_modules/@comis/core/dist/config/schema-monitoring.d.ts +0 -105
  101. package/node_modules/@comis/core/dist/config/schema-monitoring.js +0 -67
  102. package/node_modules/@comis/core/dist/ports/media-ports.d.ts +0 -278
  103. package/node_modules/@comis/core/dist/ports/media-ports.js +0 -1
  104. package/node_modules/@comis/core/dist/security/input-guard.d.ts +0 -46
  105. package/node_modules/@comis/core/dist/security/input-guard.js +0 -166
  106. package/node_modules/@comis/core/dist/security/scoped-secret-manager.d.ts +0 -38
  107. package/node_modules/@comis/core/dist/security/scoped-secret-manager.js +0 -94
  108. package/node_modules/@comis/daemon/dist/observability/delivery-context.d.ts +0 -37
  109. package/node_modules/@comis/daemon/dist/observability/delivery-context.js +0 -1
  110. package/node_modules/@comis/daemon/dist/observability/log-level-manager.d.ts +0 -23
  111. package/node_modules/@comis/daemon/dist/observability/log-level-manager.js +0 -34
  112. package/node_modules/@comis/daemon/dist/observability/log-transport.d.ts +0 -44
  113. package/node_modules/@comis/daemon/dist/observability/log-transport.js +0 -74
  114. package/node_modules/@comis/daemon/dist/observability/obs-write-buffer.d.ts +0 -53
  115. package/node_modules/@comis/daemon/dist/observability/obs-write-buffer.js +0 -68
  116. package/node_modules/@comis/daemon/dist/observability/types.d.ts +0 -6
  117. package/node_modules/@comis/daemon/dist/observability/types.js +0 -1
  118. package/node_modules/@comis/daemon/dist/wiring/seed-bundled-skills.d.ts +0 -41
  119. package/node_modules/@comis/daemon/dist/wiring/seed-bundled-skills.js +0 -84
  120. package/node_modules/@comis/daemon/dist/wiring/setup-delivery-mirror.d.ts +0 -24
  121. package/node_modules/@comis/daemon/dist/wiring/setup-delivery-mirror.js +0 -88
  122. package/node_modules/@comis/daemon/dist/wiring/setup-delivery-queue.d.ts +0 -31
  123. package/node_modules/@comis/daemon/dist/wiring/setup-delivery-queue.js +0 -132
  124. package/node_modules/@comis/daemon/dist/wiring/setup-monitoring.d.ts +0 -38
  125. package/node_modules/@comis/daemon/dist/wiring/setup-monitoring.js +0 -100
  126. package/node_modules/@comis/daemon/dist/wiring/setup-rpc-bridge.d.ts +0 -34
  127. package/node_modules/@comis/daemon/dist/wiring/setup-rpc-bridge.js +0 -52
  128. package/node_modules/@comis/daemon/dist/wiring/setup-task-extraction.d.ts +0 -41
  129. package/node_modules/@comis/daemon/dist/wiring/setup-task-extraction.js +0 -86
  130. package/node_modules/@comis/memory/dist/embedding-cache.d.ts +0 -36
  131. package/node_modules/@comis/memory/dist/embedding-cache.js +0 -94
  132. package/node_modules/@comis/skills/dist/bridge/tool-output-schemas.d.ts +0 -17
  133. package/node_modules/@comis/skills/dist/bridge/tool-output-schemas.js +0 -125
  134. package/node_modules/@comis/skills/dist/bridge/tool-parallelism-metadata.d.ts +0 -14
  135. package/node_modules/@comis/skills/dist/bridge/tool-parallelism-metadata.js +0 -92
  136. package/node_modules/@comis/skills/dist/bridge/tool-result-caps.d.ts +0 -14
  137. package/node_modules/@comis/skills/dist/bridge/tool-result-caps.js +0 -36
  138. package/node_modules/@comis/skills/dist/bridge/tool-search-hints.d.ts +0 -15
  139. package/node_modules/@comis/skills/dist/bridge/tool-search-hints.js +0 -68
  140. package/node_modules/@comis/skills/dist/bridge/tool-validators.d.ts +0 -11
  141. package/node_modules/@comis/skills/dist/bridge/tool-validators.js +0 -105
  142. package/node_modules/@comis/skills/dist/builtin/file/find-sort-wrapper.d.ts +0 -22
  143. package/node_modules/@comis/skills/dist/builtin/file/find-sort-wrapper.js +0 -95
  144. package/node_modules/@comis/skills/dist/builtin/file/grep-output-mode-wrapper.d.ts +0 -24
  145. package/node_modules/@comis/skills/dist/builtin/file/grep-output-mode-wrapper.js +0 -167
  146. package/node_modules/@comis/skills/dist/builtin/task-plan-tool.d.ts +0 -25
  147. package/node_modules/@comis/skills/dist/builtin/task-plan-tool.js +0 -67
  148. package/node_modules/@comis/skills/dist/integrations/mcp-tool-bridge.d.ts +0 -75
  149. package/node_modules/@comis/skills/dist/integrations/mcp-tool-bridge.js +0 -235
@@ -281,6 +281,22 @@ export interface MessagingEvents {
281
281
  escalatedMaxTokens: number;
282
282
  timestamp: number;
283
283
  };
284
+ /** Signed-replay self-heal fired: provider rejected stored signed thinking /
285
+ * reasoning state on the latest assistant turn (Anthropic `cannot be
286
+ * modified`, Gemini `thought_signature mismatch`, OpenAI Responses
287
+ * `reasoning_item not found`, OpenAI Completions `reasoning_id expired`,
288
+ * Mistral `encrypted_content verification failed`, etc.). The runner in
289
+ * `executor-prompt-runner.ts` scrubbed signed thinking state from the
290
+ * in-memory message array and re-entered the model retry chain. `succeeded`
291
+ * reports whether the retry produced a non-empty response. */
292
+ "execution:signed_replay_recovered": {
293
+ agentId: string;
294
+ sessionKey: string;
295
+ blocksRemoved: number;
296
+ thoughtSignaturesStripped: number;
297
+ succeeded: boolean;
298
+ timestamp: number;
299
+ };
284
300
  /** Failed announcement persisted to dead-letter queue */
285
301
  "announcement:dead_lettered": {
286
302
  runId: string;
@@ -1,2 +1,2 @@
1
- export { AppConfigSchema, AgentConfigSchema, AgentsMapSchema, BudgetConfigSchema, CircuitBreakerConfigSchema, DmScopeConfigSchema, ElevatedReplyConfigSchema, ModelRoutesSchema, HeartbeatConfigSchema, HeartbeatTargetSchema, PerAgentConfigSchema, PerAgentCronConfigSchema, PerAgentHeartbeatConfigSchema, PerAgentSchedulerConfigSchema, PruningConfigSchema, RagConfigSchema, ResetPolicyOverrideSchema, RoutingBindingSchema, RoutingConfigSchema, SessionResetPolicySchema, TracingConfigSchema, ChannelConfigSchema, ChannelEntrySchema, ChannelHealthCheckSchema, MemoryConfigSchema, CompactionConfigSchema, RetentionConfigSchema, SecurityConfigSchema, PermissionConfigSchema, ActionConfirmationConfigSchema, AgentToAgentConfigSchema, SkillsConfigSchema, DaemonConfigSchema, LoggingConfigSchema, TracingDefaultsSchema, ConfigWebhookSchema, SchedulerConfigSchema, GatewayConfigSchema, GatewayTlsConfigSchema, GatewayTokenSchema, GatewayRateLimitSchema, IntegrationsConfigSchema, BraveSearchConfigSchema, McpServerEntrySchema, McpConfigSchema, TranscriptionConfigSchema, TtsConfigSchema, TtsAutoModeSchema, ElevenLabsVoiceSettingsSchema, TtsOutputFormatSchema, ImageAnalysisConfigSchema, VisionScopeRuleSchema, VisionConfigSchema, LinkUnderstandingConfigSchema, MediaConfigSchema, DOCUMENT_MIME_WHITELIST, FileExtractionConfigSchema, AutoReplyRuleSchema, AutoReplyConfigSchema, MonitoringConfigSchema, PluginsConfigSchema, PluginEntrySchema, QueueConfigSchema, QueueModeSchema, OverflowPolicySchema, PerChannelQueueConfigSchema, OverflowConfigSchema, DebounceBufferConfigSchema, FollowupConfigSchema, PriorityLaneConfigSchema, LaneAssignmentConfigSchema, StreamingConfigSchema, PerChannelStreamingConfigSchema, TypingModeSchema, ChunkModeSchema, DeliveryMirrorConfigSchema, DeliveryQueueConfigSchema, DeliveryTimingConfigSchema, DeliveryTimingModeSchema, CoalescerConfigSchema, AutoReplyEngineConfigSchema, GroupActivationModeSchema, SendPolicyConfigSchema, SendPolicyRuleSchema, SendActionSchema, EnvelopeConfigSchema, RetryConfigSchema, WebhooksConfigSchema, WebhookMappingConfigSchema, WebhookMappingMatchSchema, AgentSecretsConfigSchema, SecretsConfigSchema, DocumentationConfigSchema, DocumentationLinkSchema, ImageGenerationConfigSchema, NotificationConfigSchema, VerbosityConfigSchema, VerbosityLevelSchema, VerbosityOverrideSchema, ContextEngineConfigSchema, BackgroundTasksConfigSchema, MemoryReviewConfigSchema, UserModelSchema, ModelCostSchema, OperationModelEntrySchema, OperationModelsSchema, substituteEnvVars, warnSuspiciousEnvValues, loadConfigFile, validateConfig, deepMerge, mergeLayered, loadLayered, IMMUTABLE_CONFIG_PREFIXES, MUTABLE_CONFIG_OVERRIDES, isImmutableConfigPath, matchesOverridePattern, getMutableOverridesForSection, getConfigSchema, getConfigSections, getFieldMetadata, validatePartial, createConfigGitManager, checkApprovalsConfig, } from "../config/index.js";
1
+ export { AppConfigSchema, AgentConfigSchema, AgentsMapSchema, BudgetConfigSchema, CircuitBreakerConfigSchema, DmScopeConfigSchema, ElevatedReplyConfigSchema, ModelRoutesSchema, HeartbeatConfigSchema, HeartbeatTargetSchema, PerAgentConfigSchema, PerAgentCronConfigSchema, PerAgentHeartbeatConfigSchema, PerAgentSchedulerConfigSchema, PruningConfigSchema, RagConfigSchema, ResetPolicyOverrideSchema, RoutingBindingSchema, RoutingConfigSchema, SessionResetPolicySchema, TracingConfigSchema, ChannelConfigSchema, ChannelEntrySchema, ChannelHealthCheckSchema, MemoryConfigSchema, CompactionConfigSchema, RetentionConfigSchema, SecurityConfigSchema, PermissionConfigSchema, ActionConfirmationConfigSchema, AgentToAgentConfigSchema, SkillsConfigSchema, DaemonConfigSchema, LoggingConfigSchema, TracingDefaultsSchema, ConfigWebhookSchema, SchedulerConfigSchema, GatewayConfigSchema, GatewayTlsConfigSchema, GatewayTokenSchema, GatewayRateLimitSchema, IntegrationsConfigSchema, BraveSearchConfigSchema, McpServerEntrySchema, McpConfigSchema, TranscriptionConfigSchema, TtsConfigSchema, TtsAutoModeSchema, ElevenLabsVoiceSettingsSchema, TtsOutputFormatSchema, ImageAnalysisConfigSchema, VisionScopeRuleSchema, VisionConfigSchema, LinkUnderstandingConfigSchema, MediaConfigSchema, DOCUMENT_MIME_WHITELIST, FileExtractionConfigSchema, AutoReplyRuleSchema, AutoReplyConfigSchema, MonitoringConfigSchema, PluginsConfigSchema, PluginEntrySchema, QueueConfigSchema, QueueModeSchema, OverflowPolicySchema, PerChannelQueueConfigSchema, OverflowConfigSchema, DebounceBufferConfigSchema, FollowupConfigSchema, PriorityLaneConfigSchema, LaneAssignmentConfigSchema, StreamingConfigSchema, PerChannelStreamingConfigSchema, TypingModeSchema, ChunkModeSchema, DeliveryMirrorConfigSchema, DeliveryQueueConfigSchema, DeliveryTimingConfigSchema, DeliveryTimingModeSchema, CoalescerConfigSchema, AutoReplyEngineConfigSchema, GroupActivationModeSchema, SendPolicyConfigSchema, SendPolicyRuleSchema, SendActionSchema, EnvelopeConfigSchema, RetryConfigSchema, WebhooksConfigSchema, WebhookMappingConfigSchema, WebhookMappingMatchSchema, AgentSecretsConfigSchema, SecretsConfigSchema, DocumentationConfigSchema, DocumentationLinkSchema, ImageGenerationConfigSchema, NotificationConfigSchema, VerbosityConfigSchema, VerbosityLevelSchema, VerbosityOverrideSchema, ContextEngineConfigSchema, BackgroundTasksConfigSchema, MemoryReviewConfigSchema, UserModelSchema, ModelCostSchema, OperationModelEntrySchema, OperationModelsSchema, substituteEnvVars, warnSuspiciousEnvValues, loadConfigFile, validateConfig, deepMerge, mergeLayered, loadLayered, IMMUTABLE_CONFIG_PREFIXES, MUTABLE_CONFIG_OVERRIDES, isImmutableConfigPath, matchesOverridePattern, getMutableOverridesForSection, MANAGED_SECTIONS, getManagedSectionRedirect, formatRedirectHint, getConfigSchema, getConfigSections, getFieldMetadata, validatePartial, createConfigGitManager, checkApprovalsConfig, } from "../config/index.js";
2
2
  export type { AppConfig, AgentConfig, BudgetConfig, CircuitBreakerConfig, DmScopeConfig, ElevatedReplyConfig, ModelRoutes, PruningConfig, HeartbeatConfig, HeartbeatTarget, PerAgentConfig, PerAgentCronConfig, PerAgentHeartbeatConfig, PerAgentSchedulerConfig, RagConfig, ResetPolicyOverride, RoutingBinding, RoutingConfig, SessionResetPolicyConfig, TracingConfig, ChannelConfig, ChannelEntry, ChannelHealthCheckConfig, AckReactionConfig, MemoryConfig, CompactionConfig, RetentionConfig, SecurityConfig, PermissionConfig, ActionConfirmationConfig, AgentToAgentConfig, SkillsConfig, DaemonConfig, LoggingConfig, TracingDefaults, ConfigWebhook, SchedulerConfig, GatewayConfig, GatewayTlsConfig, GatewayToken, GatewayRateLimit, IntegrationsConfig, BraveSearchConfig, McpServerEntry, McpConfig, TranscriptionConfig, TtsConfig, TtsAutoMode, ElevenLabsVoiceSettings, TtsOutputFormat, ImageAnalysisConfig, VisionScopeRule, VisionConfig, LinkUnderstandingConfig, MediaConfig, FileExtractionConfig, AutoReplyRule, AutoReplyConfig, MonitoringConfig, DiskMonitorConfig, ResourceMonitorConfig, SystemdMonitorConfig, SecurityUpdateMonitorConfig, GitMonitorConfig, PluginsConfig, PluginEntry, QueueConfig, PerChannelQueueConfig, QueueMode, OverflowPolicy, OverflowConfig, DebounceBufferConfig, FollowupConfig, PriorityLaneConfig, LaneAssignmentConfig, StreamingConfig, PerChannelStreamingConfig, TypingMode, ChunkMode, DeliveryMirrorConfig, DeliveryQueueConfig, DeliveryTimingConfig, DeliveryTimingMode, CoalescerConfig, AutoReplyEngineConfig, GroupActivationMode, SendPolicyConfig, SendPolicyRule, SendAction, EnvelopeConfig, RetryConfig, WebhooksConfig, WebhookMappingConfig, AgentSecretsConfig, SecretsConfig, ConfigError, ConfigErrorCode, FieldMetadata, PartialValidationResult, ConfigGitManager, GitCommitMetadata, HistoryEntry, GitManagerDeps, ExecGitFn, EnvValueWarning, LifecycleReactionsConfig, LifecycleReactionsTimingConfig, SenderTrustDisplayConfig, DocumentationConfig, DocumentationLink, ImageGenerationConfig, NotificationConfig, VerbosityConfig, VerbosityLevel, VerbosityOverride, ContextEngineConfig, BackgroundTasksConfig, MemoryReviewConfig, UserModel, ModelCost, OperationModelEntry, OperationModels, ModelOperationType, } from "../config/index.js";
@@ -1,3 +1,3 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  // @comis/core exports — Config (layered configuration with Zod validation)
3
- export { AppConfigSchema, AgentConfigSchema, AgentsMapSchema, BudgetConfigSchema, CircuitBreakerConfigSchema, DmScopeConfigSchema, ElevatedReplyConfigSchema, ModelRoutesSchema, HeartbeatConfigSchema, HeartbeatTargetSchema, PerAgentConfigSchema, PerAgentCronConfigSchema, PerAgentHeartbeatConfigSchema, PerAgentSchedulerConfigSchema, PruningConfigSchema, RagConfigSchema, ResetPolicyOverrideSchema, RoutingBindingSchema, RoutingConfigSchema, SessionResetPolicySchema, TracingConfigSchema, ChannelConfigSchema, ChannelEntrySchema, ChannelHealthCheckSchema, MemoryConfigSchema, CompactionConfigSchema, RetentionConfigSchema, SecurityConfigSchema, PermissionConfigSchema, ActionConfirmationConfigSchema, AgentToAgentConfigSchema, SkillsConfigSchema, DaemonConfigSchema, LoggingConfigSchema, TracingDefaultsSchema, ConfigWebhookSchema, SchedulerConfigSchema, GatewayConfigSchema, GatewayTlsConfigSchema, GatewayTokenSchema, GatewayRateLimitSchema, IntegrationsConfigSchema, BraveSearchConfigSchema, McpServerEntrySchema, McpConfigSchema, TranscriptionConfigSchema, TtsConfigSchema, TtsAutoModeSchema, ElevenLabsVoiceSettingsSchema, TtsOutputFormatSchema, ImageAnalysisConfigSchema, VisionScopeRuleSchema, VisionConfigSchema, LinkUnderstandingConfigSchema, MediaConfigSchema, DOCUMENT_MIME_WHITELIST, FileExtractionConfigSchema, AutoReplyRuleSchema, AutoReplyConfigSchema, MonitoringConfigSchema, PluginsConfigSchema, PluginEntrySchema, QueueConfigSchema, QueueModeSchema, OverflowPolicySchema, PerChannelQueueConfigSchema, OverflowConfigSchema, DebounceBufferConfigSchema, FollowupConfigSchema, PriorityLaneConfigSchema, LaneAssignmentConfigSchema, StreamingConfigSchema, PerChannelStreamingConfigSchema, TypingModeSchema, ChunkModeSchema, DeliveryMirrorConfigSchema, DeliveryQueueConfigSchema, DeliveryTimingConfigSchema, DeliveryTimingModeSchema, CoalescerConfigSchema, AutoReplyEngineConfigSchema, GroupActivationModeSchema, SendPolicyConfigSchema, SendPolicyRuleSchema, SendActionSchema, EnvelopeConfigSchema, RetryConfigSchema, WebhooksConfigSchema, WebhookMappingConfigSchema, WebhookMappingMatchSchema, AgentSecretsConfigSchema, SecretsConfigSchema, DocumentationConfigSchema, DocumentationLinkSchema, ImageGenerationConfigSchema, NotificationConfigSchema, VerbosityConfigSchema, VerbosityLevelSchema, VerbosityOverrideSchema, ContextEngineConfigSchema, BackgroundTasksConfigSchema, MemoryReviewConfigSchema, UserModelSchema, ModelCostSchema, OperationModelEntrySchema, OperationModelsSchema, substituteEnvVars, warnSuspiciousEnvValues, loadConfigFile, validateConfig, deepMerge, mergeLayered, loadLayered, IMMUTABLE_CONFIG_PREFIXES, MUTABLE_CONFIG_OVERRIDES, isImmutableConfigPath, matchesOverridePattern, getMutableOverridesForSection, getConfigSchema, getConfigSections, getFieldMetadata, validatePartial, createConfigGitManager, checkApprovalsConfig, } from "../config/index.js";
3
+ export { AppConfigSchema, AgentConfigSchema, AgentsMapSchema, BudgetConfigSchema, CircuitBreakerConfigSchema, DmScopeConfigSchema, ElevatedReplyConfigSchema, ModelRoutesSchema, HeartbeatConfigSchema, HeartbeatTargetSchema, PerAgentConfigSchema, PerAgentCronConfigSchema, PerAgentHeartbeatConfigSchema, PerAgentSchedulerConfigSchema, PruningConfigSchema, RagConfigSchema, ResetPolicyOverrideSchema, RoutingBindingSchema, RoutingConfigSchema, SessionResetPolicySchema, TracingConfigSchema, ChannelConfigSchema, ChannelEntrySchema, ChannelHealthCheckSchema, MemoryConfigSchema, CompactionConfigSchema, RetentionConfigSchema, SecurityConfigSchema, PermissionConfigSchema, ActionConfirmationConfigSchema, AgentToAgentConfigSchema, SkillsConfigSchema, DaemonConfigSchema, LoggingConfigSchema, TracingDefaultsSchema, ConfigWebhookSchema, SchedulerConfigSchema, GatewayConfigSchema, GatewayTlsConfigSchema, GatewayTokenSchema, GatewayRateLimitSchema, IntegrationsConfigSchema, BraveSearchConfigSchema, McpServerEntrySchema, McpConfigSchema, TranscriptionConfigSchema, TtsConfigSchema, TtsAutoModeSchema, ElevenLabsVoiceSettingsSchema, TtsOutputFormatSchema, ImageAnalysisConfigSchema, VisionScopeRuleSchema, VisionConfigSchema, LinkUnderstandingConfigSchema, MediaConfigSchema, DOCUMENT_MIME_WHITELIST, FileExtractionConfigSchema, AutoReplyRuleSchema, AutoReplyConfigSchema, MonitoringConfigSchema, PluginsConfigSchema, PluginEntrySchema, QueueConfigSchema, QueueModeSchema, OverflowPolicySchema, PerChannelQueueConfigSchema, OverflowConfigSchema, DebounceBufferConfigSchema, FollowupConfigSchema, PriorityLaneConfigSchema, LaneAssignmentConfigSchema, StreamingConfigSchema, PerChannelStreamingConfigSchema, TypingModeSchema, ChunkModeSchema, DeliveryMirrorConfigSchema, DeliveryQueueConfigSchema, DeliveryTimingConfigSchema, DeliveryTimingModeSchema, CoalescerConfigSchema, AutoReplyEngineConfigSchema, GroupActivationModeSchema, SendPolicyConfigSchema, SendPolicyRuleSchema, SendActionSchema, EnvelopeConfigSchema, RetryConfigSchema, WebhooksConfigSchema, WebhookMappingConfigSchema, WebhookMappingMatchSchema, AgentSecretsConfigSchema, SecretsConfigSchema, DocumentationConfigSchema, DocumentationLinkSchema, ImageGenerationConfigSchema, NotificationConfigSchema, VerbosityConfigSchema, VerbosityLevelSchema, VerbosityOverrideSchema, ContextEngineConfigSchema, BackgroundTasksConfigSchema, MemoryReviewConfigSchema, UserModelSchema, ModelCostSchema, OperationModelEntrySchema, OperationModelsSchema, substituteEnvVars, warnSuspiciousEnvValues, loadConfigFile, validateConfig, deepMerge, mergeLayered, loadLayered, IMMUTABLE_CONFIG_PREFIXES, MUTABLE_CONFIG_OVERRIDES, isImmutableConfigPath, matchesOverridePattern, getMutableOverridesForSection, MANAGED_SECTIONS, getManagedSectionRedirect, formatRedirectHint, getConfigSchema, getConfigSections, getFieldMetadata, validatePartial, createConfigGitManager, checkApprovalsConfig, } from "../config/index.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/core",
3
3
  "private": true,
4
- "version": "1.0.18",
4
+ "version": "1.0.22",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Core domain types, ports, event bus, security, and config for Comis",
File without changes
@@ -8,7 +8,7 @@
8
8
  * Extracted from daemon.ts rpcCallInner switch block
9
9
  * @module
10
10
  */
11
- import { isImmutableConfigPath, getConfigSchema, getConfigSections, deepMerge, AppConfigSchema, redactConfigSecrets, warnSuspiciousEnvValues, } from "@comis/core";
11
+ import { isImmutableConfigPath, getConfigSchema, getConfigSections, deepMerge, AppConfigSchema, redactConfigSecrets, warnSuspiciousEnvValues, getManagedSectionRedirect, formatRedirectHint, } from "@comis/core";
12
12
  import { suppressError } from "@comis/shared";
13
13
  import { stringify as yamlStringify } from "yaml";
14
14
  import { existsSync, readFileSync, writeFileSync, mkdirSync, renameSync } from "node:fs";
@@ -406,10 +406,18 @@ export function createConfigHandlers(deps) {
406
406
  const coercedValue = coerceConfigValue(value, subSchema);
407
407
  const ctx = params._context;
408
408
  try {
409
- // Check immutable paths
409
+ // Check immutable paths.
410
+ // Backstop for direct-RPC clients (web UI, CLI). The gateway tool
411
+ // pre-flight and bridge metadata validator catch this earlier for
412
+ // LLM tool calls -- this path is reached when those layers are
413
+ // bypassed. Emit the same redirect hint so all clients see
414
+ // identical, model-agnostic recovery instructions (quick-260425-t40).
410
415
  if (isImmutableConfigPath(section, key)) {
411
- throw new Error(`Config path "${key ? `${section}.${key}` : section}" is immutable and cannot be modified at runtime. ` +
412
- "This setting requires manual operator intervention via config files.");
416
+ const redirect = getManagedSectionRedirect(section, key);
417
+ const suffix = redirect
418
+ ? ` ${formatRedirectHint(redirect)}`
419
+ : " This setting requires manual operator intervention via config files.";
420
+ throw new Error(`Config path "${key ? `${section}.${key}` : section}" is immutable and cannot be modified at runtime.${suffix}`);
413
421
  }
414
422
  // Build patch object (use coerced value for the actual data, keep original for audit)
415
423
  let patch;
@@ -582,10 +590,15 @@ export function createConfigHandlers(deps) {
582
590
  if (!(section in deps.container.config)) {
583
591
  throw new Error(`Unknown config section: "${section}". Valid sections: ${getConfigSections().join(", ")}.`);
584
592
  }
585
- // Check immutable paths -- entire section is being replaced
593
+ // Check immutable paths -- entire section is being replaced.
594
+ // Backstop for direct-RPC clients; LLM tool calls hit the same redirect
595
+ // earlier via gateway-tool / bridge validator (quick-260425-t40).
586
596
  if (isImmutableConfigPath(section)) {
587
- throw new Error(`Config section "${section}" is immutable and cannot be replaced at runtime. ` +
588
- "This section requires manual operator intervention via config files.");
597
+ const redirect = getManagedSectionRedirect(section);
598
+ const suffix = redirect
599
+ ? ` ${formatRedirectHint(redirect)}`
600
+ : " This section requires manual operator intervention via config files.";
601
+ throw new Error(`Config section "${section}" is immutable and cannot be replaced at runtime.${suffix}`);
589
602
  }
590
603
  // Build replacement: replace the section entirely (NOT deep merge)
591
604
  const currentConfig = structuredClone(deps.container.config);
@@ -181,6 +181,28 @@ function loadJsonlSession(filePath) {
181
181
  }
182
182
  }
183
183
  // ---------------------------------------------------------------------------
184
+ // Helpers
185
+ // ---------------------------------------------------------------------------
186
+ /**
187
+ * Collect available session keys from all sources (SQLite, JSONL, workspace)
188
+ * for inclusion in "session not found" error messages.
189
+ */
190
+ function collectAvailableSessionKeys(deps) {
191
+ const keys = [];
192
+ for (const s of deps.sessionStore.listDetailed()) {
193
+ keys.push(s.sessionKey);
194
+ }
195
+ if (deps.defaultWorkspaceDir) {
196
+ const existing = new Set(keys);
197
+ for (const ws of scanWorkspaceSessions(deps.defaultWorkspaceDir)) {
198
+ if (!existing.has(ws.sessionKey)) {
199
+ keys.push(ws.sessionKey);
200
+ }
201
+ }
202
+ }
203
+ return keys;
204
+ }
205
+ // ---------------------------------------------------------------------------
184
206
  // Factory
185
207
  // ---------------------------------------------------------------------------
186
208
  /**
@@ -428,7 +450,11 @@ export function createSessionHandlers(deps) {
428
450
  }
429
451
  }
430
452
  if (!data) {
431
- throw new Error(`Session not found: ${sessionKey}`);
453
+ const available = collectAvailableSessionKeys(deps);
454
+ const hint = available.length > 0
455
+ ? `. Available session keys: ${available.join(", ")}`
456
+ : ". Use action 'list' to discover available session keys";
457
+ throw new Error(`Session not found: ${sessionKey}${hint}`);
432
458
  }
433
459
  // Parse session key for metadata
434
460
  const parsed = parseFormattedSessionKey(sessionKey);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/daemon",
3
3
  "private": true,
4
- "version": "1.0.18",
4
+ "version": "1.0.22",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Background daemon and orchestrator for the Comis platform",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/gateway",
3
3
  "private": true,
4
- "version": "1.0.18",
4
+ "version": "1.0.22",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "HTTP, JSON-RPC, and WebSocket gateway for Comis",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/infra",
3
3
  "private": true,
4
- "version": "1.0.18",
4
+ "version": "1.0.22",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Structured logging infrastructure for Comis",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/memory",
3
3
  "private": true,
4
- "version": "1.0.18",
4
+ "version": "1.0.22",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "SQLite memory, embeddings, and RAG storage for Comis agents",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/scheduler",
3
3
  "private": true,
4
- "version": "1.0.18",
4
+ "version": "1.0.22",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Task scheduling and cron management for Comis",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/shared",
3
3
  "private": true,
4
- "version": "1.0.18",
4
+ "version": "1.0.22",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Shared types and utilities for the Comis platform",
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * @module
13
13
  */
14
- import { registerToolMetadata, isImmutableConfigPath, getMutableOverridesForSection } from "@comis/core";
14
+ import { registerToolMetadata, isImmutableConfigPath, getMutableOverridesForSection, getManagedSectionRedirect, formatRedirectHint, } from "@comis/core";
15
15
  import { validateExecCommand } from "../builtin/exec-security.js";
16
16
  import { GATEWAY_ACTIONS } from "../builtin/platform/gateway-tool.js";
17
17
  export function registerAllToolMetadata() {
@@ -149,25 +149,40 @@ export function registerAllToolMetadata() {
149
149
  return undefined;
150
150
  },
151
151
  });
152
- // Gateway tool -- action enum + immutable path rejection for patch.
152
+ // Gateway tool -- action enum + immutable path rejection for patch and apply.
153
153
  // Whitelist is derived from the tool's exported GATEWAY_ACTIONS tuple so
154
154
  // bridge + handler cannot drift (quick-260420-iv2 regression fix).
155
+ // When the rejected section has a dedicated *_manage tool, the message
156
+ // includes a parameter-correct redirect via formatRedirectHint() so any
157
+ // LLM (Opus/Sonnet/Haiku, GPT-5, Gemini, Mistral, etc.) can self-recover
158
+ // without model-specific prompting (quick-260425-t40).
155
159
  registerToolMetadata("gateway", {
156
160
  validateInput: (params) => {
157
161
  const action = typeof params.action === "string" ? params.action : undefined;
158
162
  if (!action || !GATEWAY_ACTIONS.includes(action)) {
159
163
  return `Invalid action: "${action ?? ""}". Valid: ${GATEWAY_ACTIONS.join(", ")}`;
160
164
  }
161
- // Only check immutability for patch action (reads must succeed on immutable paths)
165
+ const section = typeof params.section === "string" ? params.section : undefined;
166
+ // Only check immutability for mutating actions (reads must succeed on immutable paths).
162
167
  if (action === "patch") {
163
- const section = typeof params.section === "string" ? params.section : undefined;
164
168
  const key = typeof params.key === "string" ? params.key : undefined;
165
169
  if (section && isImmutableConfigPath(section, key)) {
166
170
  const mutablePaths = getMutableOverridesForSection(section, key);
167
- const pathHint = mutablePaths.length > 0
168
- ? ` Patchable: ${mutablePaths.join(", ")}`
169
- : "";
170
- return `Cannot patch immutable config path: ${section}${key ? "." + key : ""}.${pathHint}`;
171
+ const redirect = getManagedSectionRedirect(section, key);
172
+ const fullPath = `${section}${key ? "." + key : ""}`;
173
+ const suffix = redirect
174
+ ? ` ${formatRedirectHint(redirect, mutablePaths)}`
175
+ : mutablePaths.length > 0
176
+ ? ` Patchable: ${mutablePaths.join(", ")}.`
177
+ : "";
178
+ return `Cannot patch immutable config path: ${fullPath}.${suffix}`;
179
+ }
180
+ }
181
+ if (action === "apply") {
182
+ if (section && isImmutableConfigPath(section)) {
183
+ const redirect = getManagedSectionRedirect(section);
184
+ const suffix = redirect ? ` ${formatRedirectHint(redirect)}` : "";
185
+ return `Cannot apply to immutable config section: ${section}.${suffix}`;
171
186
  }
172
187
  }
173
188
  return undefined;
@@ -21,7 +21,7 @@ import type { RpcCall } from "./cron-tool.js";
21
21
  export declare const GATEWAY_ACTIONS: readonly ["read", "patch", "apply", "restart", "schema", "status", "history", "diff", "rollback", "env_set", "env_list"];
22
22
  export type GatewayAction = typeof GATEWAY_ACTIONS[number];
23
23
  declare const GatewayToolParams: import("@sinclair/typebox").TObject<{
24
- action: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"status" | "read" | "patch" | "apply" | "restart" | "schema" | "history" | "diff" | "rollback" | "env_set" | "env_list">[]>;
24
+ action: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"status" | "read" | "patch" | "diff" | "apply" | "restart" | "schema" | "history" | "rollback" | "env_set" | "env_list">[]>;
25
25
  section: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
26
26
  key: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
27
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
@@ -10,7 +10,7 @@
10
10
  * @module
11
11
  */
12
12
  import { Type } from "@sinclair/typebox";
13
- import { tryGetContext, isImmutableConfigPath, MUTABLE_CONFIG_OVERRIDES, matchesOverridePattern, getMutableOverridesForSection } from "@comis/core";
13
+ import { tryGetContext, isImmutableConfigPath, MUTABLE_CONFIG_OVERRIDES, matchesOverridePattern, getMutableOverridesForSection, getManagedSectionRedirect, formatRedirectHint, } from "@comis/core";
14
14
  import { readStringParam, throwToolError, createActionGate, } from "./tool-helpers.js";
15
15
  import { createMultiActionDispatchTool } from "./messaging-factory.js";
16
16
  // ---------------------------------------------------------------------------
@@ -123,19 +123,18 @@ export function createGatewayTool(rpcCall) {
123
123
  case "patch": {
124
124
  const section = readStringParam(p, "section");
125
125
  const key = readStringParam(p, "key");
126
- // Pre-gate immutability check: reject before asking for confirmation
126
+ // Pre-gate immutability check: reject before asking for confirmation.
127
+ // When the section has a dedicated *_manage tool, redirect there with
128
+ // a parameter-correct example call so the LLM can self-recover without
129
+ // needing model-specific prompting.
127
130
  if (isImmutableConfigPath(section, key)) {
128
131
  const mutablePaths = getMutableOverridesForSection(section, key);
129
- let hint;
130
- if (mutablePaths.length > 0) {
131
- hint = `Patchable paths under "${section}": ${mutablePaths.join(", ")}`;
132
- }
133
- else if (section === "agents") {
134
- hint = `Key must start with the agent ID. Use action="read" section="agents" first to see agent IDs, then patch as e.g. key="<agentId>.model"`;
135
- }
136
- else {
137
- hint = "This section has no runtime-patchable paths.";
138
- }
132
+ const redirect = getManagedSectionRedirect(section, key);
133
+ const hint = redirect
134
+ ? formatRedirectHint(redirect, mutablePaths)
135
+ : mutablePaths.length > 0
136
+ ? `Patchable paths under "${section}": ${mutablePaths.join(", ")}.`
137
+ : "This section has no runtime-patchable paths and no dedicated management tool.";
139
138
  throwToolError("permission_denied", `Cannot patch immutable config path: ${section}.${key}.`, { hint });
140
139
  }
141
140
  // Skip confirmation gate for known mutable override paths (no round-trip needed)
@@ -183,9 +182,14 @@ export function createGatewayTool(rpcCall) {
183
182
  }
184
183
  case "apply": {
185
184
  const section = readStringParam(p, "section");
186
- // Pre-gate immutability check: reject before asking for confirmation
185
+ // Pre-gate immutability check: reject before asking for confirmation.
186
+ // Redirect to the dedicated *_manage tool when one exists for this section.
187
187
  if (isImmutableConfigPath(section)) {
188
- throwToolError("permission_denied", `Cannot apply to immutable config section: ${section}.`, { hint: "Security-sensitive sections cannot be replaced at runtime." });
188
+ const redirect = getManagedSectionRedirect(section);
189
+ const hint = redirect
190
+ ? formatRedirectHint(redirect)
191
+ : "Security-sensitive sections cannot be replaced at runtime.";
192
+ throwToolError("permission_denied", `Cannot apply to immutable config section: ${section}.`, { hint });
189
193
  }
190
194
  const gate = applyGate(p);
191
195
  if (gate.requiresConfirmation) {
@@ -36,7 +36,7 @@ const UnifiedSessionParams = Type.Object({
36
36
  ], { description: "Filter by message role: 'all' (default), 'user', 'assistant', 'tool' (action: search)" })),
37
37
  summarize: Type.Optional(Type.Boolean({ description: "Summarize matched sessions using LLM (default: true when query provided) (action: search)" })),
38
38
  // history params
39
- session_key: Type.Optional(Type.String({ description: "Target session key to retrieve history for (action: history)" })),
39
+ session_key: Type.Optional(Type.String({ description: "Session key for action: history. Use action 'list' first to discover available keys. Format: {tenantId}:{filename}, e.g. 'default:678314278~peer~678314278'" })),
40
40
  offset: Type.Optional(Type.Integer({ description: "Pagination offset (default: 0) (action: history)" })),
41
41
  // shared params
42
42
  limit: Type.Optional(Type.Integer({ description: "Maximum results to return (action: search default 10 max 30, action: history default 20)" })),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comis/skills",
3
3
  "private": true,
4
- "version": "1.0.18",
4
+ "version": "1.0.22",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
7
7
  "description": "Skill system, MCP integration, and tool sandbox for Comis agents",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comis/web",
3
- "version": "1.0.18",
3
+ "version": "1.0.22",
4
4
  "description": "Web dashboard SPA for Comis agent management",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comisai",
3
- "version": "1.0.18",
3
+ "version": "1.0.22",
4
4
  "author": "Moshe Anconina",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Security-first AI agent platform — connects AI agents to Discord, Telegram, Slack, WhatsApp, and more",
@@ -96,11 +96,6 @@
96
96
  "import": "./dist/daemon.js"
97
97
  }
98
98
  },
99
- "scripts": {
100
- "build": "tsc",
101
- "prepack": "node scripts/prepack.js",
102
- "postpack": "node scripts/postpack.js"
103
- },
104
99
  "bundledDependencies": [
105
100
  "@comis/shared",
106
101
  "@comis/core",
@@ -116,24 +111,24 @@
116
111
  "@comis/web"
117
112
  ],
118
113
  "dependencies": {
119
- "@comis/shared": "1.0.18",
120
- "@comis/core": "1.0.18",
121
- "@comis/infra": "1.0.18",
122
- "@comis/memory": "1.0.18",
123
- "@comis/gateway": "1.0.18",
124
- "@comis/skills": "1.0.18",
125
- "@comis/scheduler": "1.0.18",
126
- "@comis/agent": "1.0.18",
127
- "@comis/channels": "1.0.18",
128
- "@comis/cli": "1.0.18",
129
- "@comis/daemon": "1.0.18",
130
- "@comis/web": "1.0.18",
131
- "@agentclientprotocol/sdk": "^0.15.0",
114
+ "@comis/shared": "1.0.22",
115
+ "@comis/core": "1.0.22",
116
+ "@comis/infra": "1.0.22",
117
+ "@comis/memory": "1.0.22",
118
+ "@comis/gateway": "1.0.22",
119
+ "@comis/skills": "1.0.22",
120
+ "@comis/scheduler": "1.0.22",
121
+ "@comis/agent": "1.0.22",
122
+ "@comis/channels": "1.0.22",
123
+ "@comis/cli": "1.0.22",
124
+ "@comis/daemon": "1.0.22",
125
+ "@comis/web": "1.0.22",
126
+ "@agentclientprotocol/sdk": "^0.19.0",
132
127
  "@clack/core": "^1.1.0",
133
128
  "@clack/prompts": "^1.1.0",
134
129
  "@elevenlabs/elevenlabs-js": "^2.38.1",
135
130
  "@fal-ai/client": "1.9.5",
136
- "@google/genai": "1.47.0",
131
+ "@google/genai": "1.50.1",
137
132
  "@grammyjs/auto-retry": "^2.0.2",
138
133
  "@grammyjs/files": "^1.2.0",
139
134
  "@grammyjs/runner": "^2.0.3",
@@ -142,9 +137,9 @@
142
137
  "@hono/node-server": "^1.19.13",
143
138
  "@hono/node-ws": "^1.3.0",
144
139
  "@line/bot-sdk": "^10.6.0",
145
- "@mariozechner/pi-agent-core": "0.67.68",
146
- "@mariozechner/pi-ai": "0.67.68",
147
- "@mariozechner/pi-coding-agent": "0.67.68",
140
+ "@mariozechner/pi-agent-core": "0.68.0",
141
+ "@mariozechner/pi-ai": "0.68.0",
142
+ "@mariozechner/pi-coding-agent": "0.68.0",
148
143
  "@modelcontextprotocol/sdk": "^1.27.1",
149
144
  "@mozilla/readability": "^0.6.0",
150
145
  "@napi-rs/canvas": "^0.1.96",
@@ -169,7 +164,7 @@
169
164
  "iconv-lite": "^0.7.2",
170
165
  "ignore": "^7.0.5",
171
166
  "imapflow": "^1.2.18",
172
- "impit": "^0.8.2",
167
+ "impit": "^0.13.0",
173
168
  "ipaddr.js": "^2.3.0",
174
169
  "irc-framework": "^4.14.0",
175
170
  "json-rpc-2.0": "^1.7.1",
@@ -188,7 +183,7 @@
188
183
  "playwright-core": "^1.58.2",
189
184
  "proper-lockfile": "^4.1.2",
190
185
  "sharp": "^0.34.5",
191
- "sqlite-vec": "0.1.7-alpha.2",
186
+ "sqlite-vec": "0.1.9",
192
187
  "undici": "^7.24.0",
193
188
  "ws": "^8.19.0",
194
189
  "yaml": "^2.8.3",
@@ -199,5 +194,8 @@
199
194
  },
200
195
  "devDependencies": {
201
196
  "typescript": "^5.9.3"
197
+ },
198
+ "scripts": {
199
+ "build": "tsc"
202
200
  }
203
- }
201
+ }
@@ -1,9 +0,0 @@
1
- /**
2
- * Strip Minimax's malformed tool call XML from LLM responses.
3
- *
4
- * Minimax models sometimes emit `<invoke name="..." type="minimax:tool_call">...</invoke>`
5
- * blocks and `<minimax:tool_call>` wrapper tags in their text output.
6
- *
7
- * @module
8
- */
9
- export declare function stripMinimaxToolCallXml(text: string): string;
@@ -1,17 +0,0 @@
1
- /**
2
- * Strip Minimax's malformed tool call XML from LLM responses.
3
- *
4
- * Minimax models sometimes emit `<invoke name="..." type="minimax:tool_call">...</invoke>`
5
- * blocks and `<minimax:tool_call>` wrapper tags in their text output.
6
- *
7
- * @module
8
- */
9
- export function stripMinimaxToolCallXml(text) {
10
- if (!text)
11
- return text;
12
- if (!/minimax:tool_call/i.test(text))
13
- return text;
14
- let cleaned = text.replace(/<invoke\b[^>]*>[\s\S]*?<\/invoke>/gi, "");
15
- cleaned = cleaned.replace(/<\/?minimax:tool_call>/gi, "");
16
- return cleaned;
17
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Strip model control tokens (`<|...|>` and fullwidth variants) from LLM responses.
3
- *
4
- * GLM, DeepSeek, and similar models sometimes leak internal control tokens
5
- * like `<|endoftext|>`, `<|user|>`, `<|assistant|>` into their text output.
6
- *
7
- * CRITICAL: The `/g` regex is module-level. The function calls `.replace()` directly
8
- * (not `.test()` first on the same regex) to avoid lastIndex state pollution.
9
- * `.replace()` resets lastIndex internally.
10
- *
11
- * @module
12
- */
13
- export declare function stripModelSpecialTokens(text: string): string;
@@ -1,19 +0,0 @@
1
- /**
2
- * Strip model control tokens (`<|...|>` and fullwidth variants) from LLM responses.
3
- *
4
- * GLM, DeepSeek, and similar models sometimes leak internal control tokens
5
- * like `<|endoftext|>`, `<|user|>`, `<|assistant|>` into their text output.
6
- *
7
- * CRITICAL: The `/g` regex is module-level. The function calls `.replace()` directly
8
- * (not `.test()` first on the same regex) to avoid lastIndex state pollution.
9
- * `.replace()` resets lastIndex internally.
10
- *
11
- * @module
12
- */
13
- // Match both ASCII pipe <|...|> and full-width pipe <\uFF5C...\uFF5C> variants.
14
- const MODEL_SPECIAL_TOKEN_RE = /<[|\uFF5C][^|\uFF5C]*[|\uFF5C]>/g;
15
- export function stripModelSpecialTokens(text) {
16
- if (!text)
17
- return text;
18
- return text.replace(MODEL_SPECIAL_TOKEN_RE, " ").replace(/ +/g, " ").trim();
19
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Strip downgraded tool call/result text blocks from LLM responses.
3
- *
4
- * When Gemini (or other providers) cannot emit structured tool calls,
5
- * they fall back to text-based `[Tool Call: name (ID: ...)]` markers,
6
- * Arguments JSON blocks, `[Tool Result for ID ...]` blocks, and
7
- * `[Historical context: ...]` markers.
8
- *
9
- * @module
10
- */
11
- export declare function stripDowngradedToolCallText(text: string): string;
@@ -1,32 +0,0 @@
1
- /**
2
- * Strip downgraded tool call/result text blocks from LLM responses.
3
- *
4
- * When Gemini (or other providers) cannot emit structured tool calls,
5
- * they fall back to text-based `[Tool Call: name (ID: ...)]` markers,
6
- * Arguments JSON blocks, `[Tool Result for ID ...]` blocks, and
7
- * `[Historical context: ...]` markers.
8
- *
9
- * @module
10
- */
11
- /**
12
- * Strip [Tool Call: name (ID: id)] markers and their Arguments JSON blocks.
13
- */
14
- function stripToolCallMarkers(text) {
15
- return text.replace(/\[Tool Call:\s*\S+\s*\(ID:\s*[^\)]*\)\]\n?(?:Arguments:\s*```json\n[\s\S]*?```\n?)?/gi, "");
16
- }
17
- export function stripDowngradedToolCallText(text) {
18
- if (!text)
19
- return text;
20
- if (!/\[Tool (?:Call|Result)/i.test(text) && !/\[Historical context/i.test(text)) {
21
- return text;
22
- }
23
- // Strip [Tool Call: name (ID: ...)] blocks and their Arguments JSON
24
- let cleaned = stripToolCallMarkers(text);
25
- // Strip [Tool Result for ID ...] blocks.
26
- // Uses blank-line delimiter (\n\n) or next [Tool marker as boundary to avoid
27
- // eating legitimate content after a garbled tool result.
28
- cleaned = cleaned.replace(/\[Tool Result for ID[^\]]*\]\n?[\s\S]*?(?=\n\n|\n*\[Tool |\n*$)/gi, "");
29
- // Strip [Historical context: ...] markers
30
- cleaned = cleaned.replace(/\[Historical context:[^\]]*\]\n?/gi, "");
31
- return cleaned.trim();
32
- }