comisai 1.0.11 → 1.0.13
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/model/operation-model-defaults.js +1 -0
- package/node_modules/@comis/agent/dist/session/comis-session-manager.js +9 -9
- package/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/event-bus/events-infra.d.ts +2 -0
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-channels.js +12 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.js +1 -0
- package/node_modules/@comis/daemon/dist/wiring/setup-schedulers.js +1 -0
- package/node_modules/@comis/daemon/package.json +1 -1
- 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 +6 -0
- package/node_modules/@comis/scheduler/dist/cron/cron-types.js +2 -0
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.d.ts +1 -1
- package/node_modules/@comis/skills/package.json +1 -1
- package/package.json +18 -18
- package/node_modules/@comis/core/dist/approval/approval-gate.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/approval/approval-gate.test.js +0 -1003
- package/node_modules/@comis/core/dist/bootstrap.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/bootstrap.test.js +0 -150
- package/node_modules/@comis/core/dist/config/backup.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/backup.test.js +0 -160
- package/node_modules/@comis/core/dist/config/env-substitution.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/env-substitution.test.js +0 -259
- package/node_modules/@comis/core/dist/config/field-metadata.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/field-metadata.test.js +0 -72
- package/node_modules/@comis/core/dist/config/git-manager.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/git-manager.test.js +0 -1042
- package/node_modules/@comis/core/dist/config/immutable-keys.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/immutable-keys.test.js +0 -283
- package/node_modules/@comis/core/dist/config/include-resolver.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/include-resolver.test.js +0 -292
- package/node_modules/@comis/core/dist/config/layered.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/layered.test.js +0 -211
- package/node_modules/@comis/core/dist/config/loader.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/loader.test.js +0 -300
- package/node_modules/@comis/core/dist/config/migrate.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/migrate.test.js +0 -244
- package/node_modules/@comis/core/dist/config/partial-validator.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/partial-validator.test.js +0 -98
- package/node_modules/@comis/core/dist/config/schema-agent-model.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-agent-model.test.js +0 -279
- package/node_modules/@comis/core/dist/config/schema-agent-session.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-agent-session.test.js +0 -242
- package/node_modules/@comis/core/dist/config/schema-agent.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-agent.test.js +0 -645
- package/node_modules/@comis/core/dist/config/schema-channel.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-channel.test.js +0 -341
- package/node_modules/@comis/core/dist/config/schema-coalescer.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-coalescer.test.js +0 -51
- package/node_modules/@comis/core/dist/config/schema-context-engine.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-context-engine.test.js +0 -797
- package/node_modules/@comis/core/dist/config/schema-context-guard.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-context-guard.test.js +0 -111
- package/node_modules/@comis/core/dist/config/schema-daemon.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-daemon.test.js +0 -107
- package/node_modules/@comis/core/dist/config/schema-delivery-timing.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-delivery-timing.test.js +0 -51
- package/node_modules/@comis/core/dist/config/schema-documentation.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-documentation.test.js +0 -63
- package/node_modules/@comis/core/dist/config/schema-gateway.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-gateway.test.js +0 -219
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-gemini-cache.test.js +0 -41
- package/node_modules/@comis/core/dist/config/schema-integrations.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-integrations.test.js +0 -92
- package/node_modules/@comis/core/dist/config/schema-lifecycle-reactions.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-lifecycle-reactions.test.js +0 -61
- package/node_modules/@comis/core/dist/config/schema-misc.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-misc.test.js +0 -394
- package/node_modules/@comis/core/dist/config/schema-observability.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-observability.test.js +0 -76
- package/node_modules/@comis/core/dist/config/schema-providers.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-providers.test.js +0 -294
- package/node_modules/@comis/core/dist/config/schema-queue.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-queue.test.js +0 -234
- package/node_modules/@comis/core/dist/config/schema-response-prefix.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-response-prefix.test.js +0 -36
- package/node_modules/@comis/core/dist/config/schema-security.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-security.test.js +0 -54
- package/node_modules/@comis/core/dist/config/schema-sender-trust-display.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-sender-trust-display.test.js +0 -60
- package/node_modules/@comis/core/dist/config/schema-serializer.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-serializer.test.js +0 -73
- package/node_modules/@comis/core/dist/config/schema-telegram-file-guard.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/config/schema-telegram-file-guard.test.js +0 -39
- package/node_modules/@comis/core/dist/context/context.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/context/context.test.js +0 -276
- package/node_modules/@comis/core/dist/domain/agent-response.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/agent-response.test.js +0 -159
- package/node_modules/@comis/core/dist/domain/credential-mapping.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/credential-mapping.test.js +0 -135
- package/node_modules/@comis/core/dist/domain/delivery-origin.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/delivery-origin.test.js +0 -68
- package/node_modules/@comis/core/dist/domain/execution-graph.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/execution-graph.test.js +0 -441
- package/node_modules/@comis/core/dist/domain/memory-entry.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/memory-entry.test.js +0 -193
- package/node_modules/@comis/core/dist/domain/normalized-message.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/normalized-message.test.js +0 -255
- package/node_modules/@comis/core/dist/domain/session-key.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/session-key.test.js +0 -291
- package/node_modules/@comis/core/dist/domain/subagent-context-config.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/subagent-context-config.test.js +0 -131
- package/node_modules/@comis/core/dist/domain/subagent-context-types.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/domain/subagent-context-types.test.js +0 -182
- package/node_modules/@comis/core/dist/event-bus/bus.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/event-bus/bus.test.js +0 -152
- package/node_modules/@comis/core/dist/event-bus/events-agent.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/event-bus/events-agent.test.js +0 -409
- package/node_modules/@comis/core/dist/event-bus/events-channel.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/event-bus/events-channel.test.js +0 -240
- package/node_modules/@comis/core/dist/event-bus/events-infra.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/event-bus/events-infra.test.js +0 -416
- package/node_modules/@comis/core/dist/event-bus/events-messaging.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/event-bus/events-messaging.test.js +0 -433
- package/node_modules/@comis/core/dist/event-bus/events.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/event-bus/events.test.js +0 -93
- package/node_modules/@comis/core/dist/hooks/hook-runner-global.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/hooks/hook-runner-global.test.js +0 -29
- package/node_modules/@comis/core/dist/hooks/hook-runner.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/hooks/hook-runner.test.js +0 -490
- package/node_modules/@comis/core/dist/hooks/hook-strategies.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/hooks/hook-strategies.test.js +0 -209
- package/node_modules/@comis/core/dist/hooks/integration.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/hooks/integration.test.js +0 -235
- package/node_modules/@comis/core/dist/hooks/plugin-registry.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/hooks/plugin-registry.test.js +0 -470
- package/node_modules/@comis/core/dist/load-env.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/load-env.test.js +0 -21
- package/node_modules/@comis/core/dist/security/action-classifier.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/action-classifier.test.js +0 -298
- package/node_modules/@comis/core/dist/security/audit-aggregator.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/audit-aggregator.test.js +0 -128
- package/node_modules/@comis/core/dist/security/audit.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/audit.test.js +0 -154
- package/node_modules/@comis/core/dist/security/canary-token.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/canary-token.test.js +0 -45
- package/node_modules/@comis/core/dist/security/config-redaction.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/config-redaction.test.js +0 -107
- package/node_modules/@comis/core/dist/security/external-content.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/external-content.test.js +0 -210
- package/node_modules/@comis/core/dist/security/injection-patterns.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/injection-patterns.test.js +0 -213
- package/node_modules/@comis/core/dist/security/injection-rate-limiter.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/injection-rate-limiter.test.js +0 -194
- package/node_modules/@comis/core/dist/security/input-guard.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/input-guard.test.js +0 -215
- package/node_modules/@comis/core/dist/security/input-security-guard.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/input-security-guard.test.js +0 -215
- package/node_modules/@comis/core/dist/security/input-validator.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/input-validator.test.js +0 -133
- package/node_modules/@comis/core/dist/security/log-sanitizer.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/log-sanitizer.test.js +0 -260
- package/node_modules/@comis/core/dist/security/memory-write-validator.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/memory-write-validator.test.js +0 -62
- package/node_modules/@comis/core/dist/security/output-guard.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/output-guard.test.js +0 -397
- package/node_modules/@comis/core/dist/security/safe-path.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/safe-path.test.js +0 -95
- package/node_modules/@comis/core/dist/security/scoped-secret-manager.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/scoped-secret-manager.test.js +0 -231
- package/node_modules/@comis/core/dist/security/secret-access.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/secret-access.test.js +0 -41
- package/node_modules/@comis/core/dist/security/secret-crypto.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/secret-crypto.test.js +0 -113
- package/node_modules/@comis/core/dist/security/secret-manager.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/secret-manager.test.js +0 -394
- package/node_modules/@comis/core/dist/security/secret-ref-resolver.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/secret-ref-resolver.test.js +0 -268
- package/node_modules/@comis/core/dist/security/secrets-audit.test.d.ts +0 -10
- package/node_modules/@comis/core/dist/security/secrets-audit.test.js +0 -295
- package/node_modules/@comis/core/dist/security/ssrf-guard.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/ssrf-guard.test.js +0 -127
- package/node_modules/@comis/core/dist/security/token-generator.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/security/token-generator.test.js +0 -35
- package/node_modules/@comis/core/dist/tool-metadata.test.d.ts +0 -1
- package/node_modules/@comis/core/dist/tool-metadata.test.js +0 -112
- package/node_modules/@comis/memory/dist/compaction.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/compaction.test.js +0 -298
- package/node_modules/@comis/memory/dist/context-schema.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/context-schema.test.js +0 -246
- package/node_modules/@comis/memory/dist/context-store.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/context-store.test.js +0 -708
- package/node_modules/@comis/memory/dist/credential-mapping-schema.test.d.ts +0 -7
- package/node_modules/@comis/memory/dist/credential-mapping-schema.test.js +0 -73
- package/node_modules/@comis/memory/dist/credential-mapping-store.test.d.ts +0 -8
- package/node_modules/@comis/memory/dist/credential-mapping-store.test.js +0 -340
- package/node_modules/@comis/memory/dist/delivery-mirror-adapter.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/delivery-mirror-adapter.test.js +0 -165
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/delivery-queue-adapter.test.js +0 -263
- package/node_modules/@comis/memory/dist/embedding-batch-indexer.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/embedding-batch-indexer.test.js +0 -202
- package/node_modules/@comis/memory/dist/embedding-cache-lru.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/embedding-cache-lru.test.js +0 -241
- package/node_modules/@comis/memory/dist/embedding-cache-sqlite.test.d.ts +0 -8
- package/node_modules/@comis/memory/dist/embedding-cache-sqlite.test.js +0 -678
- package/node_modules/@comis/memory/dist/embedding-cache.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/embedding-cache.test.js +0 -213
- package/node_modules/@comis/memory/dist/embedding-fingerprint.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/embedding-fingerprint.test.js +0 -87
- package/node_modules/@comis/memory/dist/embedding-hash.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/embedding-hash.test.js +0 -31
- package/node_modules/@comis/memory/dist/embedding-integration.test.d.ts +0 -8
- package/node_modules/@comis/memory/dist/embedding-integration.test.js +0 -232
- package/node_modules/@comis/memory/dist/embedding-provider-factory.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/embedding-provider-factory.test.js +0 -176
- package/node_modules/@comis/memory/dist/embedding-provider-local.test.d.ts +0 -8
- package/node_modules/@comis/memory/dist/embedding-provider-local.test.js +0 -76
- package/node_modules/@comis/memory/dist/embedding-provider-openai.test.d.ts +0 -8
- package/node_modules/@comis/memory/dist/embedding-provider-openai.test.js +0 -100
- package/node_modules/@comis/memory/dist/embedding-queue.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/embedding-queue.test.js +0 -236
- package/node_modules/@comis/memory/dist/hybrid-search.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/hybrid-search.test.js +0 -476
- package/node_modules/@comis/memory/dist/identity-link-store.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/identity-link-store.test.js +0 -88
- package/node_modules/@comis/memory/dist/memory-api.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/memory-api.test.js +0 -495
- package/node_modules/@comis/memory/dist/memory-concurrency.test.d.ts +0 -20
- package/node_modules/@comis/memory/dist/memory-concurrency.test.js +0 -222
- package/node_modules/@comis/memory/dist/named-graph-store.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/named-graph-store.test.js +0 -227
- package/node_modules/@comis/memory/dist/observability-store.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/observability-store.test.js +0 -704
- package/node_modules/@comis/memory/dist/row-mapper.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/row-mapper.test.js +0 -409
- package/node_modules/@comis/memory/dist/schema.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/schema.test.js +0 -240
- package/node_modules/@comis/memory/dist/secret-store-schema.test.d.ts +0 -7
- package/node_modules/@comis/memory/dist/secret-store-schema.test.js +0 -90
- package/node_modules/@comis/memory/dist/session-store.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/session-store.test.js +0 -262
- package/node_modules/@comis/memory/dist/setup-secrets.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/setup-secrets.test.js +0 -140
- package/node_modules/@comis/memory/dist/sqlite-memory-adapter.test.d.ts +0 -1
- package/node_modules/@comis/memory/dist/sqlite-memory-adapter.test.js +0 -888
- package/node_modules/@comis/memory/dist/sqlite-secret-store.test.d.ts +0 -8
- package/node_modules/@comis/memory/dist/sqlite-secret-store.test.js +0 -245
- package/node_modules/@comis/shared/dist/abort.test.d.ts +0 -1
- package/node_modules/@comis/shared/dist/abort.test.js +0 -71
- package/node_modules/@comis/shared/dist/result.test.d.ts +0 -1
- package/node_modules/@comis/shared/dist/result.test.js +0 -178
- package/node_modules/@comis/shared/dist/suppress-error.test.d.ts +0 -1
- package/node_modules/@comis/shared/dist/suppress-error.test.js +0 -50
- package/node_modules/@comis/shared/dist/timeout.test.d.ts +0 -1
- package/node_modules/@comis/shared/dist/timeout.test.js +0 -75
- package/node_modules/@comis/shared/dist/ttl-cache.test.d.ts +0 -1
- package/node_modules/@comis/shared/dist/ttl-cache.test.js +0 -81
|
@@ -55,15 +55,15 @@ export function createComisSessionManager(deps) {
|
|
|
55
55
|
},
|
|
56
56
|
async destroySession(sessionKey) {
|
|
57
57
|
const sessionPath = sessionKeyToPath(sessionKey, deps.sessionBaseDir);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
const sessionKeyStr = formatSessionKey(sessionKey);
|
|
59
|
+
await withSessionLock(deps.lockDir, sessionKeyStr, async () => {
|
|
60
|
+
try {
|
|
61
|
+
await unlink(sessionPath);
|
|
62
|
+
}
|
|
63
|
+
catch { /* ENOENT ok */ }
|
|
64
|
+
const toolResultsDir = safePath(dirname(sessionPath), "tool-results");
|
|
65
|
+
await suppressError(rm(toolResultsDir, { recursive: true, force: true }), "tool-results dir may not exist");
|
|
66
|
+
}, { retries: 10, retryMinTimeout: 500 });
|
|
67
67
|
},
|
|
68
68
|
writeSessionMetadata(sessionKey, metadata) {
|
|
69
69
|
const sessionPath = sessionKeyToPath(sessionKey, deps.sessionBaseDir);
|
|
@@ -187,6 +187,8 @@ export interface InfraEvents {
|
|
|
187
187
|
maxHistoryTurns?: number;
|
|
188
188
|
/** Per-cron-job model override from CronPayload.agent_turn.model. */
|
|
189
189
|
cronJobModel?: string;
|
|
190
|
+
/** Per-cron-job cache retention override from CronJob config. */
|
|
191
|
+
cacheRetention?: "none" | "short" | "long";
|
|
190
192
|
/** Callback for agent_turn jobs to report execution result back to the scheduler.
|
|
191
193
|
* Called by the event handler after agent execution completes. */
|
|
192
194
|
onComplete?: (result: {
|
|
@@ -159,7 +159,7 @@ export async function setupChannels(deps) {
|
|
|
159
159
|
model: resolution.model,
|
|
160
160
|
operationType: "cron",
|
|
161
161
|
promptTimeout: { promptTimeoutMs: resolution.timeoutMs },
|
|
162
|
-
cacheRetention: resolution.cacheRetention,
|
|
162
|
+
cacheRetention: payload.cacheRetention ?? resolution.cacheRetention,
|
|
163
163
|
};
|
|
164
164
|
logger.info({ jobName, model: resolution.model, source: resolution.source, agentId: payload.agentId }, "Cron model resolved");
|
|
165
165
|
}
|
|
@@ -171,6 +171,15 @@ export async function setupChannels(deps) {
|
|
|
171
171
|
// Fresh strategy — expire existing session before each execution
|
|
172
172
|
if (sessionStrategy === "fresh") {
|
|
173
173
|
sessionManager.expire(sessionKey);
|
|
174
|
+
const piAdapter = deps.piSessionAdapters?.get(payload.agentId)
|
|
175
|
+
?? deps.piSessionAdapters?.get(defaultAgentId);
|
|
176
|
+
if (piAdapter) {
|
|
177
|
+
await piAdapter.destroySession(sessionKey);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
logger.warn({ agentId: payload.agentId, jobName, hint: "No piSessionAdapter found — JSONL may accumulate", errorKind: "config" }, "Cron fresh strategy could not destroy JSONL");
|
|
181
|
+
}
|
|
182
|
+
container.eventBus.emit("session:expired", { sessionKey, reason: "cron-fresh" });
|
|
174
183
|
}
|
|
175
184
|
const syntheticMsg = {
|
|
176
185
|
id: `cron-${payload.jobId}-${Date.now()}`,
|
|
@@ -584,10 +593,12 @@ export async function setupChannels(deps) {
|
|
|
584
593
|
if (adapter) {
|
|
585
594
|
// eslint-disable-next-line no-restricted-syntax -- intentional fire-and-forget
|
|
586
595
|
adapter.destroySession(key).catch(() => { });
|
|
596
|
+
container.eventBus.emit("session:expired", { sessionKey: key, reason: "chat-reset" });
|
|
587
597
|
return;
|
|
588
598
|
}
|
|
589
599
|
// Fallback: expire via session manager
|
|
590
600
|
deps.sessionManager.expire(key);
|
|
601
|
+
container.eventBus.emit("session:expired", { sessionKey: key, reason: "chat-reset" });
|
|
591
602
|
},
|
|
592
603
|
getAvailableModels: () => [],
|
|
593
604
|
getUsageBreakdown: () => {
|
|
@@ -549,6 +549,7 @@ export async function setupGateway(deps) {
|
|
|
549
549
|
const adapter = piSessionAdapters?.get(execAgentId);
|
|
550
550
|
if (adapter) {
|
|
551
551
|
suppressError(adapter.destroySession(key), "fire-and-forget session destroy");
|
|
552
|
+
container.eventBus.emit("session:expired", { sessionKey: key, reason: "gateway-reset" });
|
|
552
553
|
return;
|
|
553
554
|
}
|
|
554
555
|
},
|
|
@@ -109,6 +109,7 @@ export async function setupSchedulers(deps) {
|
|
|
109
109
|
sessionStrategy: job.sessionStrategy,
|
|
110
110
|
maxHistoryTurns: job.maxHistoryTurns,
|
|
111
111
|
cronJobModel: job.payload.kind === "agent_turn" ? job.payload.model : undefined,
|
|
112
|
+
cacheRetention: job.cacheRetention,
|
|
112
113
|
onComplete: deferredResolve,
|
|
113
114
|
});
|
|
114
115
|
// Forward isolated results to main session if requested
|
|
@@ -138,6 +138,12 @@ export declare const CronJobSchema: z.ZodObject<{
|
|
|
138
138
|
}>>;
|
|
139
139
|
/** Number of recent turns to keep for rolling strategy (default 3). */
|
|
140
140
|
maxHistoryTurns: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
141
|
+
/** Per-job cache retention override. Default inherits OPERATION_CACHE_DEFAULTS["cron"] = "short". */
|
|
142
|
+
cacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
143
|
+
none: "none";
|
|
144
|
+
short: "short";
|
|
145
|
+
long: "long";
|
|
146
|
+
}>>;
|
|
141
147
|
/** Delivery target for routing results to originating channel */
|
|
142
148
|
deliveryTarget: z.ZodOptional<z.ZodObject<{
|
|
143
149
|
channelId: z.ZodString;
|
|
@@ -96,6 +96,8 @@ export const CronJobSchema = z.strictObject({
|
|
|
96
96
|
sessionStrategy: CronSessionStrategySchema.default("fresh"),
|
|
97
97
|
/** Number of recent turns to keep for rolling strategy (default 3). */
|
|
98
98
|
maxHistoryTurns: z.number().int().positive().default(3).optional(),
|
|
99
|
+
/** Per-job cache retention override. Default inherits OPERATION_CACHE_DEFAULTS["cron"] = "short". */
|
|
100
|
+
cacheRetention: z.enum(["none", "short", "long"]).optional(),
|
|
99
101
|
/** Delivery target for routing results to originating channel */
|
|
100
102
|
deliveryTarget: CronDeliveryTargetSchema.optional(),
|
|
101
103
|
/** Whether this job is currently enabled */
|
|
@@ -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" | "
|
|
24
|
+
action: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"status" | "read" | "patch" | "apply" | "restart" | "schema" | "history" | "diff" | "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>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comisai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
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,17 +115,17 @@
|
|
|
115
115
|
"@comis/daemon"
|
|
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.
|
|
118
|
+
"@comis/shared": "1.0.13",
|
|
119
|
+
"@comis/core": "1.0.13",
|
|
120
|
+
"@comis/infra": "1.0.13",
|
|
121
|
+
"@comis/memory": "1.0.13",
|
|
122
|
+
"@comis/gateway": "1.0.13",
|
|
123
|
+
"@comis/skills": "1.0.13",
|
|
124
|
+
"@comis/scheduler": "1.0.13",
|
|
125
|
+
"@comis/agent": "1.0.13",
|
|
126
|
+
"@comis/channels": "1.0.13",
|
|
127
|
+
"@comis/cli": "1.0.13",
|
|
128
|
+
"@comis/daemon": "1.0.13",
|
|
129
129
|
"@agentclientprotocol/sdk": "^0.15.0",
|
|
130
130
|
"@clack/core": "^1.1.0",
|
|
131
131
|
"@clack/prompts": "^1.1.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"@grammyjs/runner": "^2.0.3",
|
|
138
138
|
"@hapi/boom": "^10.0.1",
|
|
139
139
|
"@homebridge/ciao": "^1.3.5",
|
|
140
|
-
"@hono/node-server": "^1.19.
|
|
140
|
+
"@hono/node-server": "^1.19.13",
|
|
141
141
|
"@hono/node-ws": "^1.3.0",
|
|
142
142
|
"@line/bot-sdk": "^10.6.0",
|
|
143
143
|
"@mariozechner/pi-agent-core": "0.67.68",
|
|
@@ -160,9 +160,9 @@
|
|
|
160
160
|
"diff": "8.0.4",
|
|
161
161
|
"discord.js": "^14.25.1",
|
|
162
162
|
"edge-tts-universal": "^1.4.0",
|
|
163
|
-
"file-type": "^21.3.
|
|
163
|
+
"file-type": "^21.3.2",
|
|
164
164
|
"grammy": "^1.41.1",
|
|
165
|
-
"hono": "^4.12.
|
|
165
|
+
"hono": "^4.12.14",
|
|
166
166
|
"hono-rate-limiter": "^0.5.3",
|
|
167
167
|
"iconv-lite": "^0.7.2",
|
|
168
168
|
"ignore": "^7.0.5",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"linkedom": "^0.18.12",
|
|
175
175
|
"lru-cache": "^11.2.6",
|
|
176
176
|
"mailparser": "^3.9.6",
|
|
177
|
-
"music-metadata": "^11.12.
|
|
177
|
+
"music-metadata": "^11.12.3",
|
|
178
178
|
"node-llama-cpp": "^3.17.1",
|
|
179
179
|
"nodemailer": "^8.0.5",
|
|
180
180
|
"openai": "^6.27.0",
|
|
@@ -187,9 +187,9 @@
|
|
|
187
187
|
"proper-lockfile": "^4.1.2",
|
|
188
188
|
"sharp": "^0.34.5",
|
|
189
189
|
"sqlite-vec": "0.1.7-alpha.2",
|
|
190
|
-
"undici": "^7.
|
|
190
|
+
"undici": "^7.24.0",
|
|
191
191
|
"ws": "^8.19.0",
|
|
192
|
-
"yaml": "^2.8.
|
|
192
|
+
"yaml": "^2.8.3",
|
|
193
193
|
"zod": "^4.3.6"
|
|
194
194
|
},
|
|
195
195
|
"optionalDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|