comisai 1.0.36 → 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.js +9 -0
- 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 +48 -41
- package/node_modules/@comis/agent/dist/background/background-task-persistence.js +28 -5
- package/node_modules/@comis/agent/dist/background/background-task-types.d.ts +49 -0
- 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-runner.d.ts +10 -1
- package/node_modules/@comis/agent/dist/background/completion-runner.js +98 -15
- package/node_modules/@comis/agent/dist/background/index.d.ts +6 -1
- package/node_modules/@comis/agent/dist/background/index.js +2 -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 +26 -0
- package/node_modules/@comis/agent/dist/bridge/bridge-metrics.js +3 -0
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.d.ts +9 -0
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +73 -2
- 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/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-post-execution.d.ts +48 -4
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.js +134 -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 +25 -4
- 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 +19 -16
- 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/pi-executor.d.ts +8 -2
- package/node_modules/@comis/agent/dist/executor/pi-executor.js +25 -12
- 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/tool-deferral.d.ts +18 -27
- package/node_modules/@comis/agent/dist/executor/tool-deferral.js +29 -38
- 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/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 +16 -2
- 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/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/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/package.json +1 -1
- 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/package.json +1 -1
- 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 +4 -0
- package/node_modules/@comis/core/dist/config/index.js +2 -0
- package/node_modules/@comis/core/dist/config/schema-agent.d.ts +0 -792
- 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 +0 -12
- 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 +0 -18
- 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 -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 +0 -5
- 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 -61
- 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 +41 -38
- package/node_modules/@comis/core/dist/config/schema.js +6 -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 +0 -10
- 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 +5 -0
- 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/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/index.d.ts +2 -0
- package/node_modules/@comis/core/dist/ports/index.js +4 -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/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 +21 -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.js +89 -14
- 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 +1 -1
- package/node_modules/@comis/daemon/dist/rpc/builtin-provider-guard.js +2 -2
- package/node_modules/@comis/daemon/dist/rpc/credential-resolver.js +1 -1
- 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/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 +2 -0
- package/node_modules/@comis/daemon/dist/wiring/index.js +1 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.d.ts +36 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-agents.js +45 -8
- package/node_modules/@comis/daemon/dist/wiring/setup-background-completion-runner.d.ts +28 -9
- package/node_modules/@comis/daemon/dist/wiring/setup-background-completion-runner.js +36 -9
- package/node_modules/@comis/daemon/dist/wiring/setup-background-tasks.js +2 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.d.ts +9 -2
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.js +15 -9
- 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 +20 -15
- package/node_modules/@comis/daemon/dist/wiring/setup-delivery.js +14 -2
- 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-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/webhook/webhook-endpoint.d.ts +0 -4
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/package.json +1 -1
- 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/heartbeat/agent-heartbeat-source.d.ts +29 -8
- package/node_modules/@comis/scheduler/dist/heartbeat/agent-heartbeat-source.js +19 -7
- 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/tool-metadata-enforcement.js +1 -1
- package/node_modules/@comis/skills/dist/bridge/tool-metadata-registry.js +4 -4
- package/node_modules/@comis/skills/dist/builtin/exec-tool.d.ts +55 -9
- package/node_modules/@comis/skills/dist/builtin/exec-tool.js +383 -19
- 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 +2 -2
- package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.js +2 -2
- 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 +1 -1
- package/node_modules/@comis/skills/dist/builtin/sandbox/bwrap-provider.js +9 -0
- 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/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/package.json +1 -1
- package/package.json +21 -21
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
import { ok, err } from "@comis/shared";
|
|
15
15
|
import * as fs from "node:fs";
|
|
16
16
|
import { emitSkillAudit } from "../audit/skill-audit.js";
|
|
17
|
-
import {
|
|
17
|
+
import { parseComisCapabilityDefensively } from "../manifest/capability-parser.js";
|
|
18
|
+
import { parseFrontmatter } from "../manifest/parser.js";
|
|
19
|
+
import { SkillManifestSchema } from "../manifest/schema.js";
|
|
18
20
|
import { formatAvailableSkillsXml } from "../prompt/processor.js";
|
|
19
21
|
import { sanitizeSkillBody } from "../prompt/sanitizer.js";
|
|
20
22
|
import { scanSkillContent } from "../prompt/content-scanner.js";
|
|
@@ -161,7 +163,10 @@ export function createSkillRegistry(config, eventBus, auditContext, logger, elig
|
|
|
161
163
|
catch (e) {
|
|
162
164
|
return err(new Error(`Failed to read prompt skill file for ${name}: ${e instanceof Error ? e.message : String(e)}`));
|
|
163
165
|
}
|
|
164
|
-
// Parse frontmatter
|
|
166
|
+
// Parse frontmatter; defensively strip a malformed comis.capability
|
|
167
|
+
// block before strict validation so a typo in capability does NOT hide
|
|
168
|
+
// the skill at load time. Mirrors the discovery-side enrichment in
|
|
169
|
+
// discovery.ts.
|
|
165
170
|
const fmResult = parseFrontmatter(fileContent);
|
|
166
171
|
if (!fmResult.ok) {
|
|
167
172
|
return err(fmResult.error);
|
|
@@ -171,11 +176,28 @@ export function createSkillRegistry(config, eventBus, auditContext, logger, elig
|
|
|
171
176
|
if (!rawBody.trim()) {
|
|
172
177
|
return err(new Error(`Prompt skill "${name}" has no body content`));
|
|
173
178
|
}
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
179
|
+
const frontmatter = fmResult.value.frontmatter;
|
|
180
|
+
const ns = typeof frontmatter["comis"] === "object" &&
|
|
181
|
+
frontmatter["comis"] !== null &&
|
|
182
|
+
!Array.isArray(frontmatter["comis"])
|
|
183
|
+
? frontmatter["comis"]
|
|
184
|
+
: undefined;
|
|
185
|
+
if (ns && ns["capability"] !== undefined) {
|
|
186
|
+
// Logger omitted: discovery enrichment already emitted the WARN for
|
|
187
|
+
// this file; a second identical line at load time is just noise.
|
|
188
|
+
const cap = parseComisCapabilityDefensively(ns["capability"], name, undefined);
|
|
189
|
+
if (cap === undefined) {
|
|
190
|
+
delete ns["capability"];
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const manifestValidation = SkillManifestSchema.safeParse(frontmatter);
|
|
194
|
+
if (!manifestValidation.success) {
|
|
195
|
+
const issues = manifestValidation.error.issues
|
|
196
|
+
.map((issue) => `${issue.path.join(".")}: ${issue.message}`)
|
|
197
|
+
.join("; ");
|
|
198
|
+
return err(new Error(`Manifest validation failed: ${issues}`));
|
|
178
199
|
}
|
|
200
|
+
const manifest = manifestValidation.data;
|
|
179
201
|
// Sanitize body content
|
|
180
202
|
const sanitized = sanitizeSkillBody(rawBody, config.promptSkills.maxBodyLength);
|
|
181
203
|
// Validate sanitized body is non-empty
|
|
@@ -250,7 +272,7 @@ export function createSkillRegistry(config, eventBus, auditContext, logger, elig
|
|
|
250
272
|
location: metadata.path,
|
|
251
273
|
userInvocable: metadata.userInvocable,
|
|
252
274
|
disableModelInvocation: metadata.disableModelInvocation,
|
|
253
|
-
allowedTools:
|
|
275
|
+
allowedTools: manifest.allowedTools,
|
|
254
276
|
argumentHint: metadata.argumentHint,
|
|
255
277
|
source: metadata.source,
|
|
256
278
|
};
|
|
@@ -360,6 +382,41 @@ export function createSkillRegistry(config, eventBus, auditContext, logger, elig
|
|
|
360
382
|
}
|
|
361
383
|
return names;
|
|
362
384
|
},
|
|
385
|
+
getPromptSkillCapabilities(getOperatorHint) {
|
|
386
|
+
const out = [];
|
|
387
|
+
for (const metadata of metadataMap.values()) {
|
|
388
|
+
// Filter chain -- mirrors getPromptSkillDescriptions PLUS the extra
|
|
389
|
+
// disableModelInvocation filter (skills hidden from the model are
|
|
390
|
+
// not capability-index entries).
|
|
391
|
+
if (!isSkillEligible(metadata.name, config.promptSkills))
|
|
392
|
+
continue;
|
|
393
|
+
if (!checkRuntimeEligibility(metadata))
|
|
394
|
+
continue;
|
|
395
|
+
if (metadata.disableModelInvocation)
|
|
396
|
+
continue;
|
|
397
|
+
// Precedence:
|
|
398
|
+
// operator(skillKey) > operator(skillName) > comis.capability > fallback.
|
|
399
|
+
const opByKey = metadata.skillKey
|
|
400
|
+
? getOperatorHint(metadata.name, metadata.skillKey)
|
|
401
|
+
: undefined;
|
|
402
|
+
const opByName = !opByKey ? getOperatorHint(metadata.name) : undefined;
|
|
403
|
+
const operatorHint = opByKey ?? opByName;
|
|
404
|
+
const comisHint = metadata.capability;
|
|
405
|
+
const cluster = operatorHint?.cluster ?? comisHint?.cluster;
|
|
406
|
+
const summary = operatorHint?.description ?? comisHint?.summary ?? metadata.description;
|
|
407
|
+
const rawReplaces = operatorHint?.replacesPackages ?? comisHint?.replacesPackages ?? [];
|
|
408
|
+
out.push(Object.freeze({
|
|
409
|
+
name: metadata.name,
|
|
410
|
+
skillKey: metadata.skillKey,
|
|
411
|
+
description: metadata.description,
|
|
412
|
+
cluster,
|
|
413
|
+
summary,
|
|
414
|
+
replacesPackages: Object.freeze([...rawReplaces]),
|
|
415
|
+
source: metadata.source,
|
|
416
|
+
}));
|
|
417
|
+
}
|
|
418
|
+
return Object.freeze(out);
|
|
419
|
+
},
|
|
363
420
|
initFromSdkSkills(sdkSkills) {
|
|
364
421
|
const prevMetadataCount = metadataMap.size;
|
|
365
422
|
const prevCacheCount = promptCache.size;
|
|
@@ -379,6 +436,7 @@ export function createSkillRegistry(config, eventBus, auditContext, logger, elig
|
|
|
379
436
|
let skillKey;
|
|
380
437
|
let primaryEnv;
|
|
381
438
|
let commandDispatch;
|
|
439
|
+
let capability;
|
|
382
440
|
// Enrichment: read comis: namespace from skill file frontmatter
|
|
383
441
|
try {
|
|
384
442
|
const content = fs.readFileSync(sdkSkill.filePath, "utf-8");
|
|
@@ -441,6 +499,10 @@ export function createSkillRegistry(config, eventBus, auditContext, logger, elig
|
|
|
441
499
|
if (typeof rawCommandDispatch === "string") {
|
|
442
500
|
commandDispatch = rawCommandDispatch;
|
|
443
501
|
}
|
|
502
|
+
// Capability layer -- defensive parse. A typo or type mismatch
|
|
503
|
+
// in the inner block returns undefined + emits a WARN; the skill
|
|
504
|
+
// itself is NEVER hidden by malformed capability metadata.
|
|
505
|
+
capability = parseComisCapabilityDefensively(ns?.["capability"], sdkSkill.name, logger);
|
|
444
506
|
}
|
|
445
507
|
}
|
|
446
508
|
catch {
|
|
@@ -462,6 +524,7 @@ export function createSkillRegistry(config, eventBus, auditContext, logger, elig
|
|
|
462
524
|
skillKey,
|
|
463
525
|
primaryEnv,
|
|
464
526
|
commandDispatch,
|
|
527
|
+
capability,
|
|
465
528
|
};
|
|
466
529
|
// Apply eligibility filtering during population
|
|
467
530
|
if (!isSkillEligible(metadata.name, config.promptSkills))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comisai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
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",
|
|
@@ -115,19 +115,19 @@
|
|
|
115
115
|
"file-uri-to-path"
|
|
116
116
|
],
|
|
117
117
|
"dependencies": {
|
|
118
|
-
"@comis/shared": "1.0.
|
|
119
|
-
"@comis/core": "1.0.
|
|
120
|
-
"@comis/infra": "1.0.
|
|
121
|
-
"@comis/memory": "1.0.
|
|
122
|
-
"@comis/gateway": "1.0.
|
|
123
|
-
"@comis/skills": "1.0.
|
|
124
|
-
"@comis/scheduler": "1.0.
|
|
125
|
-
"@comis/agent": "1.0.
|
|
126
|
-
"@comis/channels": "1.0.
|
|
127
|
-
"@comis/cli": "1.0.
|
|
128
|
-
"@comis/daemon": "1.0.
|
|
129
|
-
"@comis/web": "1.0.
|
|
130
|
-
"@agentclientprotocol/sdk": "0.
|
|
118
|
+
"@comis/shared": "1.0.37",
|
|
119
|
+
"@comis/core": "1.0.37",
|
|
120
|
+
"@comis/infra": "1.0.37",
|
|
121
|
+
"@comis/memory": "1.0.37",
|
|
122
|
+
"@comis/gateway": "1.0.37",
|
|
123
|
+
"@comis/skills": "1.0.37",
|
|
124
|
+
"@comis/scheduler": "1.0.37",
|
|
125
|
+
"@comis/agent": "1.0.37",
|
|
126
|
+
"@comis/channels": "1.0.37",
|
|
127
|
+
"@comis/cli": "1.0.37",
|
|
128
|
+
"@comis/daemon": "1.0.37",
|
|
129
|
+
"@comis/web": "1.0.37",
|
|
130
|
+
"@agentclientprotocol/sdk": "0.21.0",
|
|
131
131
|
"@clack/core": "1.2.0",
|
|
132
132
|
"@clack/prompts": "1.2.0",
|
|
133
133
|
"@elevenlabs/elevenlabs-js": "2.45.0",
|
|
@@ -147,8 +147,8 @@
|
|
|
147
147
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
148
148
|
"@mozilla/readability": "0.6.0",
|
|
149
149
|
"@napi-rs/canvas": "0.1.100",
|
|
150
|
-
"typebox": "1.1.
|
|
151
|
-
"@slack/bolt": "4.7.
|
|
150
|
+
"typebox": "1.1.37",
|
|
151
|
+
"@slack/bolt": "4.7.2",
|
|
152
152
|
"@slack/web-api": "7.15.1",
|
|
153
153
|
"@whiskeysockets/baileys": "7.0.0-rc.9",
|
|
154
154
|
"better-sqlite3": "12.9.0",
|
|
@@ -160,16 +160,16 @@
|
|
|
160
160
|
"commander": "14.0.3",
|
|
161
161
|
"croner": "10.0.1",
|
|
162
162
|
"diff": "8.0.4",
|
|
163
|
-
"discord.js": "14.26.
|
|
163
|
+
"discord.js": "14.26.4",
|
|
164
164
|
"edge-tts-universal": "1.4.0",
|
|
165
165
|
"file-type": "21.3.4",
|
|
166
166
|
"file-uri-to-path": "1.0.0",
|
|
167
167
|
"grammy": "1.42.0",
|
|
168
|
-
"hono": "4.12.
|
|
168
|
+
"hono": "4.12.16",
|
|
169
169
|
"hono-rate-limiter": "0.5.3",
|
|
170
170
|
"iconv-lite": "0.7.2",
|
|
171
171
|
"ignore": "7.0.5",
|
|
172
|
-
"imapflow": "1.3.
|
|
172
|
+
"imapflow": "1.3.3",
|
|
173
173
|
"impit": "0.13.0",
|
|
174
174
|
"ipaddr.js": "2.3.0",
|
|
175
175
|
"irc-framework": "4.14.0",
|
|
@@ -193,8 +193,8 @@
|
|
|
193
193
|
"sqlite-vec": "0.1.9",
|
|
194
194
|
"undici": "8.1.0",
|
|
195
195
|
"ws": "8.20.0",
|
|
196
|
-
"yaml": "2.8.
|
|
197
|
-
"zod": "4.
|
|
196
|
+
"yaml": "2.8.4",
|
|
197
|
+
"zod": "4.4.2"
|
|
198
198
|
},
|
|
199
199
|
"optionalDependencies": {
|
|
200
200
|
"sd-notify": "2.8.0"
|