@cleocode/core 2026.3.74 → 2026.4.0
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/README.md +1 -1
- package/dist/agents/agent-schema.d.ts.map +1 -1
- package/dist/agents/retry.js +26 -21
- package/dist/agents/retry.js.map +1 -1
- package/dist/cant/approval.d.ts +110 -0
- package/dist/cant/approval.d.ts.map +1 -0
- package/dist/cant/approval.js +185 -0
- package/dist/cant/approval.js.map +1 -0
- package/dist/cant/context-builder.d.ts +79 -0
- package/dist/cant/context-builder.d.ts.map +1 -0
- package/dist/cant/context-builder.js +117 -0
- package/dist/cant/context-builder.js.map +1 -0
- package/dist/cant/discretion.d.ts +95 -0
- package/dist/cant/discretion.d.ts.map +1 -0
- package/dist/cant/discretion.js +116 -0
- package/dist/cant/discretion.js.map +1 -0
- package/dist/cant/index.d.ts +25 -0
- package/dist/cant/index.d.ts.map +1 -0
- package/dist/cant/index.js +23 -0
- package/dist/cant/index.js.map +1 -0
- package/dist/cant/parallel-runner.d.ts +38 -0
- package/dist/cant/parallel-runner.d.ts.map +1 -0
- package/dist/cant/parallel-runner.js +173 -0
- package/dist/cant/parallel-runner.js.map +1 -0
- package/dist/cant/types.d.ts +127 -0
- package/dist/cant/types.d.ts.map +1 -0
- package/dist/cant/types.js +11 -0
- package/dist/cant/types.js.map +1 -0
- package/dist/cant/workflow-executor.d.ts +105 -0
- package/dist/cant/workflow-executor.d.ts.map +1 -0
- package/dist/cant/workflow-executor.js +440 -0
- package/dist/cant/workflow-executor.js.map +1 -0
- package/dist/cleo.js +21 -1
- package/dist/cleo.js.map +1 -1
- package/dist/code/index.d.ts +10 -0
- package/dist/code/index.d.ts.map +1 -0
- package/dist/code/outline.d.ts +51 -0
- package/dist/code/outline.d.ts.map +1 -0
- package/dist/code/parser.d.ts +30 -0
- package/dist/code/parser.d.ts.map +1 -0
- package/dist/code/search.d.ts +42 -0
- package/dist/code/search.d.ts.map +1 -0
- package/dist/code/unfold.d.ts +44 -0
- package/dist/code/unfold.d.ts.map +1 -0
- package/dist/conduit/conduit-client.d.ts +35 -0
- package/dist/conduit/conduit-client.d.ts.map +1 -0
- package/dist/conduit/conduit-client.js +94 -0
- package/dist/conduit/conduit-client.js.map +1 -0
- package/dist/conduit/factory.d.ts +15 -0
- package/dist/conduit/factory.d.ts.map +1 -0
- package/dist/conduit/factory.js +35 -0
- package/dist/conduit/factory.js.map +1 -0
- package/dist/conduit/http-transport.d.ts +44 -0
- package/dist/conduit/http-transport.d.ts.map +1 -0
- package/dist/conduit/http-transport.js +165 -0
- package/dist/conduit/http-transport.js.map +1 -0
- package/dist/conduit/index.d.ts +15 -0
- package/dist/conduit/index.d.ts.map +1 -0
- package/dist/conduit/index.js +12 -0
- package/dist/conduit/index.js.map +1 -0
- package/dist/conduit/local-transport.d.ts +91 -0
- package/dist/conduit/local-transport.d.ts.map +1 -0
- package/dist/conduit/sse-transport.d.ts +68 -0
- package/dist/conduit/sse-transport.d.ts.map +1 -0
- package/dist/config.js +4 -3
- package/dist/config.js.map +1 -1
- package/dist/crypto/credentials.d.ts +40 -0
- package/dist/crypto/credentials.d.ts.map +1 -0
- package/dist/crypto/credentials.js +144 -0
- package/dist/crypto/credentials.js.map +1 -0
- package/dist/engine-result.d.ts +1 -1
- package/dist/engine-result.d.ts.map +1 -1
- package/dist/error-catalog.d.ts +1 -1
- package/dist/error-catalog.d.ts.map +1 -1
- package/dist/error-registry.d.ts +1 -1
- package/dist/error-registry.d.ts.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/hooks/handlers/agent-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/agent-hooks.js +106 -0
- package/dist/hooks/handlers/agent-hooks.js.map +1 -0
- package/dist/hooks/handlers/context-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/context-hooks.js +111 -0
- package/dist/hooks/handlers/context-hooks.js.map +1 -0
- package/dist/hooks/handlers/error-hooks.d.ts +14 -5
- package/dist/hooks/handlers/error-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/error-hooks.js +15 -6
- package/dist/hooks/handlers/error-hooks.js.map +1 -1
- package/dist/hooks/handlers/file-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/file-hooks.js +35 -11
- package/dist/hooks/handlers/file-hooks.js.map +1 -1
- package/dist/hooks/handlers/handler-helpers.d.ts +41 -0
- package/dist/hooks/handlers/handler-helpers.d.ts.map +1 -0
- package/dist/hooks/handlers/handler-helpers.js +61 -0
- package/dist/hooks/handlers/handler-helpers.js.map +1 -0
- package/dist/hooks/handlers/index.js +10 -1
- package/dist/hooks/handlers/index.js.map +1 -1
- package/dist/hooks/handlers/mcp-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/mcp-hooks.js +88 -21
- package/dist/hooks/handlers/mcp-hooks.js.map +1 -1
- package/dist/hooks/handlers/session-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/session-hooks.js +5 -10
- package/dist/hooks/handlers/session-hooks.js.map +1 -1
- package/dist/hooks/handlers/task-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/task-hooks.js +5 -10
- package/dist/hooks/handlers/task-hooks.js.map +1 -1
- package/dist/hooks/handlers/work-capture-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/work-capture-hooks.js +165 -0
- package/dist/hooks/handlers/work-capture-hooks.js.map +1 -0
- package/dist/hooks/payload-schemas.js +83 -26
- package/dist/hooks/payload-schemas.js.map +1 -1
- package/dist/hooks/provider-hooks.js +37 -5
- package/dist/hooks/provider-hooks.js.map +1 -1
- package/dist/hooks/registry.js +76 -23
- package/dist/hooks/registry.js.map +1 -1
- package/dist/hooks/types.js +17 -13
- package/dist/hooks/types.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6452 -3371
- package/dist/index.js.map +4 -4
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +12 -0
- package/dist/init.js.map +1 -1
- package/dist/internal.d.ts +11 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +10 -0
- package/dist/internal.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/tree-sitter-languages.d.ts +29 -0
- package/dist/lib/tree-sitter-languages.d.ts.map +1 -0
- package/dist/memory/brain-links.d.ts.map +1 -1
- package/dist/memory/brain-maintenance.d.ts +13 -0
- package/dist/memory/brain-maintenance.d.ts.map +1 -1
- package/dist/memory/brain-retrieval.d.ts +3 -0
- package/dist/memory/brain-retrieval.d.ts.map +1 -1
- package/dist/memory/brain-retrieval.js +5 -0
- package/dist/memory/brain-retrieval.js.map +1 -1
- package/dist/memory/decisions.d.ts.map +1 -1
- package/dist/mvi-helpers.d.ts +52 -0
- package/dist/mvi-helpers.d.ts.map +1 -0
- package/dist/mvi-helpers.js +74 -0
- package/dist/mvi-helpers.js.map +1 -0
- package/dist/nexus/index.js +2 -0
- package/dist/nexus/index.js.map +1 -1
- package/dist/nexus/workspace.d.ts.map +1 -1
- package/dist/nexus/workspace.js +355 -0
- package/dist/nexus/workspace.js.map +1 -0
- package/dist/orchestration/hierarchy.d.ts +32 -0
- package/dist/orchestration/hierarchy.d.ts.map +1 -0
- package/dist/orchestration/index.d.ts +1 -0
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/output.d.ts +2 -2
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +40 -8
- package/dist/output.js.map +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/sessions/find.d.ts +3 -0
- package/dist/sessions/find.d.ts.map +1 -1
- package/dist/sessions/find.js +3 -1
- package/dist/sessions/find.js.map +1 -1
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +11 -4
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/snapshot.js +213 -0
- package/dist/sessions/snapshot.js.map +1 -0
- package/dist/store/agent-registry-accessor.d.ts +31 -0
- package/dist/store/agent-registry-accessor.d.ts.map +1 -0
- package/dist/store/agent-registry-accessor.js +169 -0
- package/dist/store/agent-registry-accessor.js.map +1 -0
- package/dist/store/converters.d.ts.map +1 -1
- package/dist/store/converters.js +2 -0
- package/dist/store/converters.js.map +1 -1
- package/dist/store/cross-db-cleanup.d.ts +34 -0
- package/dist/store/cross-db-cleanup.d.ts.map +1 -1
- package/dist/store/db-helpers.d.ts.map +1 -1
- package/dist/store/db-helpers.js +1 -0
- package/dist/store/db-helpers.js.map +1 -1
- package/dist/store/json.js +2 -2
- package/dist/store/safety-data-accessor.d.ts +7 -0
- package/dist/store/safety-data-accessor.d.ts.map +1 -1
- package/dist/store/safety-data-accessor.js +14 -0
- package/dist/store/safety-data-accessor.js.map +1 -1
- package/dist/store/signaldock-sqlite.d.ts +48 -0
- package/dist/store/signaldock-sqlite.d.ts.map +1 -0
- package/dist/store/signaldock-sqlite.js +178 -0
- package/dist/store/signaldock-sqlite.js.map +1 -0
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +50 -0
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +30 -1
- package/dist/store/sqlite.js.map +1 -1
- package/dist/store/task-store.d.ts.map +1 -1
- package/dist/store/task-store.js +2 -0
- package/dist/store/task-store.js.map +1 -1
- package/dist/store/tasks-schema.d.ts +16 -0
- package/dist/store/tasks-schema.d.ts.map +1 -1
- package/dist/store/tasks-schema.js +33 -0
- package/dist/store/tasks-schema.js.map +1 -1
- package/dist/store/validation-schemas.d.ts +32 -0
- package/dist/store/validation-schemas.d.ts.map +1 -1
- package/dist/system/health.d.ts +1 -1
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/health.js +35 -0
- package/dist/system/health.js.map +1 -1
- package/dist/task-work/index.d.ts.map +1 -1
- package/dist/task-work/index.js +8 -4
- package/dist/task-work/index.js.map +1 -1
- package/dist/tasks/complete.js +5 -2
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/find.d.ts +3 -0
- package/dist/tasks/find.d.ts.map +1 -1
- package/dist/tasks/find.js +7 -1
- package/dist/tasks/find.js.map +1 -1
- package/dist/tasks/list.d.ts +5 -2
- package/dist/tasks/list.d.ts.map +1 -1
- package/dist/tasks/list.js +9 -2
- package/dist/tasks/list.js.map +1 -1
- package/dist/tasks/show.d.ts +3 -0
- package/dist/tasks/show.d.ts.map +1 -1
- package/dist/tasks/show.js +2 -0
- package/dist/tasks/show.js.map +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +15 -0
- package/dist/upgrade.js.map +1 -1
- package/migrations/drizzle-tasks/20260324000000_assignee-column/migration.sql +6 -0
- package/migrations/drizzle-tasks/20260324000000_assignee-column/snapshot.json +9 -0
- package/migrations/drizzle-tasks/20260327000000_agent-credentials/migration.sql +23 -0
- package/package.json +17 -7
- package/src/__tests__/cli-parity.test.js +11 -1
- package/src/__tests__/cli-parity.test.js.map +1 -1
- package/src/__tests__/cli-parity.test.ts +17 -1
- package/src/__tests__/human-output.test.js +11 -1
- package/src/__tests__/human-output.test.js.map +1 -1
- package/src/__tests__/human-output.test.ts +18 -1
- package/src/__tests__/injection-chain.test.js +3 -2
- package/src/__tests__/injection-chain.test.js.map +1 -1
- package/src/__tests__/injection-mvi-tiers.test.d.ts +2 -2
- package/src/__tests__/injection-mvi-tiers.test.js +15 -15
- package/src/__tests__/injection-mvi-tiers.test.js.map +1 -1
- package/src/__tests__/lafs-conformance.test.d.ts +1 -1
- package/src/__tests__/lafs-conformance.test.js +2 -2
- package/src/__tests__/sharing.test.js +19 -0
- package/src/__tests__/sharing.test.js.map +1 -1
- package/src/agents/__tests__/agent-registry.test.d.ts +12 -0
- package/src/agents/__tests__/agent-registry.test.d.ts.map +1 -0
- package/src/agents/__tests__/agent-registry.test.js +262 -0
- package/src/agents/__tests__/agent-registry.test.js.map +1 -0
- package/src/agents/__tests__/execution-learning.test.d.ts +14 -0
- package/src/agents/__tests__/execution-learning.test.d.ts.map +1 -0
- package/src/agents/__tests__/execution-learning.test.js +533 -0
- package/src/agents/__tests__/execution-learning.test.js.map +1 -0
- package/src/agents/__tests__/health-monitor.test.d.ts +10 -0
- package/src/agents/__tests__/health-monitor.test.d.ts.map +1 -0
- package/src/agents/__tests__/health-monitor.test.js +259 -0
- package/src/agents/__tests__/health-monitor.test.js.map +1 -0
- package/src/agents/__tests__/registry.test.js +27 -2
- package/src/agents/__tests__/registry.test.js.map +1 -1
- package/src/agents/agent-schema.ts +2 -5
- package/src/cant/__tests__/cant-agent-parse.test.ts +94 -0
- package/src/cant/approval.ts +218 -0
- package/src/cant/context-builder.ts +135 -0
- package/src/cant/discretion.ts +149 -0
- package/src/cant/index.ts +58 -0
- package/src/cant/parallel-runner.ts +205 -0
- package/src/cant/types.ts +158 -0
- package/src/cant/workflow-executor.ts +618 -0
- package/src/code/index.ts +10 -0
- package/src/code/outline.ts +214 -0
- package/src/code/parser.ts +299 -0
- package/src/code/search.ts +173 -0
- package/src/code/unfold.ts +204 -0
- package/src/conduit/__tests__/dual-api-e2e.test.ts +212 -0
- package/src/conduit/__tests__/local-credential-flow.test.ts +230 -0
- package/src/conduit/__tests__/local-transport.test.ts +320 -0
- package/src/conduit/__tests__/sse-transport.test.ts +344 -0
- package/src/conduit/conduit-client.ts +123 -0
- package/src/conduit/factory.ts +49 -0
- package/src/conduit/http-transport.ts +201 -0
- package/src/conduit/index.ts +15 -0
- package/src/conduit/local-transport.ts +309 -0
- package/src/conduit/sse-transport.ts +382 -0
- package/src/crypto/credentials.ts +166 -0
- package/src/engine-result.ts +1 -1
- package/src/error-catalog.ts +1 -1
- package/src/error-registry.ts +1 -1
- package/src/errors.ts +1 -1
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.d.ts +13 -0
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.d.ts.map +1 -0
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js +501 -0
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js.map +1 -0
- package/src/hooks/handlers/agent-hooks.ts +1 -30
- package/src/hooks/handlers/context-hooks.ts +1 -30
- package/src/hooks/handlers/error-hooks.ts +14 -5
- package/src/hooks/handlers/file-hooks.ts +1 -6
- package/src/hooks/handlers/handler-helpers.ts +62 -0
- package/src/hooks/handlers/mcp-hooks.ts +2 -14
- package/src/hooks/handlers/session-hooks.ts +1 -6
- package/src/hooks/handlers/task-hooks.ts +1 -6
- package/src/hooks/handlers/work-capture-hooks.ts +1 -10
- package/src/index.ts +12 -1
- package/src/init.ts +12 -0
- package/src/intelligence/__tests__/adaptive-validation.test.d.ts +11 -0
- package/src/intelligence/__tests__/adaptive-validation.test.d.ts.map +1 -0
- package/src/intelligence/__tests__/adaptive-validation.test.js +517 -0
- package/src/intelligence/__tests__/adaptive-validation.test.js.map +1 -0
- package/src/intelligence/__tests__/impact.test.d.ts +1 -0
- package/src/intelligence/__tests__/impact.test.d.ts.map +1 -1
- package/src/intelligence/__tests__/impact.test.js +132 -1
- package/src/intelligence/__tests__/impact.test.js.map +1 -1
- package/src/internal.ts +22 -0
- package/src/lib/__tests__/retry.test.d.ts +7 -0
- package/src/lib/__tests__/retry.test.d.ts.map +1 -0
- package/src/lib/__tests__/retry.test.js +225 -0
- package/src/lib/__tests__/retry.test.js.map +1 -0
- package/src/lib/index.ts +8 -0
- package/src/lib/tree-sitter-languages.ts +88 -0
- package/src/lifecycle/__tests__/chain-store.test.js +6 -0
- package/src/lifecycle/__tests__/chain-store.test.js.map +1 -1
- package/src/lifecycle/__tests__/tessera-engine.test.js +52 -0
- package/src/lifecycle/__tests__/tessera-engine.test.js.map +1 -1
- package/src/memory/__tests__/brain-automation.test.d.ts +11 -0
- package/src/memory/__tests__/brain-automation.test.d.ts.map +1 -0
- package/src/memory/__tests__/brain-automation.test.js +730 -0
- package/src/memory/__tests__/brain-automation.test.js.map +1 -0
- package/src/memory/__tests__/brain-links.test.ts +14 -0
- package/src/memory/__tests__/brain-retrieval.test.ts +10 -0
- package/src/memory/__tests__/session-memory.test.ts +17 -0
- package/src/memory/brain-links.ts +17 -0
- package/src/memory/brain-maintenance.ts +33 -1
- package/src/memory/brain-retrieval.ts +27 -2
- package/src/memory/decisions.ts +18 -2
- package/src/mvi-helpers.ts +81 -0
- package/src/nexus/workspace.ts +19 -7
- package/src/orchestration/hierarchy.ts +202 -0
- package/src/orchestration/index.ts +1 -0
- package/src/output.ts +43 -10
- package/src/pagination.ts +1 -1
- package/src/sessions/__tests__/session-edge-cases.test.js +20 -1
- package/src/sessions/__tests__/session-edge-cases.test.js.map +1 -1
- package/src/sessions/__tests__/session-find.test.js +1 -1
- package/src/sessions/__tests__/session-find.test.js.map +1 -1
- package/src/sessions/__tests__/session-find.test.ts +1 -1
- package/src/sessions/find.ts +6 -1
- package/src/sessions/index.ts +9 -0
- package/src/store/__tests__/migration-safety.test.js +3 -0
- package/src/store/__tests__/migration-safety.test.js.map +1 -1
- package/src/store/__tests__/session-store.test.js +128 -1
- package/src/store/__tests__/session-store.test.js.map +1 -1
- package/src/store/__tests__/task-store.test.js +18 -1
- package/src/store/__tests__/task-store.test.js.map +1 -1
- package/src/store/__tests__/test-db-helper.d.ts.map +1 -1
- package/src/store/__tests__/test-db-helper.js +12 -0
- package/src/store/__tests__/test-db-helper.js.map +1 -1
- package/src/store/agent-registry-accessor.ts +375 -0
- package/src/store/converters.ts +2 -0
- package/src/store/cross-db-cleanup.ts +175 -1
- package/src/store/db-helpers.ts +1 -0
- package/src/store/safety-data-accessor.ts +23 -0
- package/src/store/signaldock-sqlite.ts +429 -0
- package/src/store/sqlite-data-accessor.ts +72 -0
- package/src/store/sqlite.ts +4 -1
- package/src/store/task-store.ts +9 -1
- package/src/store/tasks-schema.ts +7 -0
- package/src/system/__tests__/health.test.ts +2 -2
- package/src/system/health.ts +54 -2
- package/src/task-work/index.ts +5 -0
- package/src/tasks/__tests__/add.test.js +19 -1
- package/src/tasks/__tests__/add.test.js.map +1 -1
- package/src/tasks/__tests__/assignee.test.d.ts +14 -0
- package/src/tasks/__tests__/assignee.test.d.ts.map +1 -0
- package/src/tasks/__tests__/assignee.test.js +125 -0
- package/src/tasks/__tests__/assignee.test.js.map +1 -0
- package/src/tasks/__tests__/assignee.test.ts +162 -0
- package/src/tasks/__tests__/complete-unblocks.test.js +13 -1
- package/src/tasks/__tests__/complete-unblocks.test.js.map +1 -1
- package/src/tasks/__tests__/complete.test.js +28 -7
- package/src/tasks/__tests__/complete.test.js.map +1 -1
- package/src/tasks/__tests__/epic-enforcement.test.d.ts +15 -0
- package/src/tasks/__tests__/epic-enforcement.test.d.ts.map +1 -0
- package/src/tasks/__tests__/epic-enforcement.test.js +669 -0
- package/src/tasks/__tests__/epic-enforcement.test.js.map +1 -0
- package/src/tasks/__tests__/hierarchy-policy.test.js +5 -0
- package/src/tasks/__tests__/hierarchy-policy.test.js.map +1 -1
- package/src/tasks/__tests__/minimal-test.test.d.ts +2 -0
- package/src/tasks/__tests__/minimal-test.test.d.ts.map +1 -0
- package/src/tasks/__tests__/minimal-test.test.js +25 -0
- package/src/tasks/__tests__/minimal-test.test.js.map +1 -0
- package/src/tasks/__tests__/pipeline-stage.test.d.ts +14 -0
- package/src/tasks/__tests__/pipeline-stage.test.d.ts.map +1 -0
- package/src/tasks/__tests__/pipeline-stage.test.js +277 -0
- package/src/tasks/__tests__/pipeline-stage.test.js.map +1 -0
- package/src/tasks/__tests__/update.test.js +43 -6
- package/src/tasks/__tests__/update.test.js.map +1 -1
- package/src/tasks/find.ts +11 -1
- package/src/tasks/list.ts +14 -3
- package/src/tasks/show.ts +6 -0
- package/src/upgrade.ts +16 -0
- package/dist/tasks/reparent.d.ts +0 -38
- package/dist/tasks/reparent.d.ts.map +0 -1
- package/dist/ui/injection-legacy.d.ts +0 -26
- package/dist/ui/injection-legacy.d.ts.map +0 -1
- package/dist/ui/injection-legacy.js +0 -42
- package/dist/ui/injection-legacy.js.map +0 -1
- package/src/signaldock/__tests__/claude-code-transport.test.d.ts +0 -7
- package/src/signaldock/__tests__/claude-code-transport.test.d.ts.map +0 -1
- package/src/signaldock/__tests__/claude-code-transport.test.js +0 -147
- package/src/signaldock/__tests__/claude-code-transport.test.js.map +0 -1
- package/src/signaldock/__tests__/claude-code-transport.test.ts +0 -180
- package/src/signaldock/__tests__/factory.test.d.ts +0 -7
- package/src/signaldock/__tests__/factory.test.d.ts.map +0 -1
- package/src/signaldock/__tests__/factory.test.js +0 -55
- package/src/signaldock/__tests__/factory.test.js.map +0 -1
- package/src/signaldock/__tests__/factory.test.ts +0 -61
- package/src/signaldock/__tests__/signaldock-transport.test.d.ts +0 -9
- package/src/signaldock/__tests__/signaldock-transport.test.d.ts.map +0 -1
- package/src/signaldock/__tests__/signaldock-transport.test.js +0 -321
- package/src/signaldock/__tests__/signaldock-transport.test.js.map +0 -1
- package/src/signaldock/__tests__/signaldock-transport.test.ts +0 -421
- package/src/signaldock/claude-code-transport.ts +0 -137
- package/src/signaldock/factory.ts +0 -39
- package/src/signaldock/index.ts +0 -28
- package/src/signaldock/signaldock-transport.ts +0 -194
- package/src/signaldock/transport.ts +0 -78
- package/src/signaldock/types.ts +0 -100
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SignalDock HTTP transport — provider-neutral agent messaging via SignalDock REST API.
|
|
3
|
-
*
|
|
4
|
-
* This transport enables CLEO agents to communicate through SignalDock's
|
|
5
|
-
* infrastructure regardless of which AI coding tool hosts them.
|
|
6
|
-
*
|
|
7
|
-
* IMPORTANT: This is a TypeScript HTTP client. No SignalDock source code
|
|
8
|
-
* has been copied. All interactions use the public REST API.
|
|
9
|
-
*
|
|
10
|
-
* @task T5671
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import type { AgentRegistration, AgentTransport, MessageResult } from './transport.js';
|
|
14
|
-
import type {
|
|
15
|
-
Agent,
|
|
16
|
-
AgentClass,
|
|
17
|
-
ApiResponse,
|
|
18
|
-
Conversation,
|
|
19
|
-
ConversationVisibility,
|
|
20
|
-
Message,
|
|
21
|
-
NewAgent,
|
|
22
|
-
NewConversation,
|
|
23
|
-
NewMessage,
|
|
24
|
-
PrivacyTier,
|
|
25
|
-
} from './types.js';
|
|
26
|
-
|
|
27
|
-
/** Configuration for SignalDockTransport. */
|
|
28
|
-
export interface SignalDockTransportConfig {
|
|
29
|
-
/** Base URL of the SignalDock API server. */
|
|
30
|
-
endpoint: string;
|
|
31
|
-
/** Prefix for agent names (e.g., "cleo-" -> "cleo-orchestrator"). */
|
|
32
|
-
agentPrefix: string;
|
|
33
|
-
/** Default privacy tier for registered agents. */
|
|
34
|
-
privacyTier: PrivacyTier;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* SignalDock HTTP transport implementation.
|
|
39
|
-
*
|
|
40
|
-
* Communicates with a SignalDock server via its REST API to provide
|
|
41
|
-
* provider-neutral inter-agent messaging with delivery guarantees.
|
|
42
|
-
*/
|
|
43
|
-
export class SignalDockTransport implements AgentTransport {
|
|
44
|
-
readonly name = 'signaldock';
|
|
45
|
-
private readonly config: SignalDockTransportConfig;
|
|
46
|
-
|
|
47
|
-
constructor(config: SignalDockTransportConfig) {
|
|
48
|
-
this.config = config;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
async register(
|
|
52
|
-
name: string,
|
|
53
|
-
agentClass: AgentClass,
|
|
54
|
-
privacyTier: PrivacyTier,
|
|
55
|
-
): Promise<AgentRegistration> {
|
|
56
|
-
const prefixedName = `${this.config.agentPrefix}${name}`;
|
|
57
|
-
const body: NewAgent = {
|
|
58
|
-
name: prefixedName,
|
|
59
|
-
agentClass,
|
|
60
|
-
privacyTier,
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const response = await this.request<Agent>('POST', '/agents', body);
|
|
64
|
-
|
|
65
|
-
return {
|
|
66
|
-
agentId: response.id,
|
|
67
|
-
name: response.name,
|
|
68
|
-
agentClass: response.agentClass,
|
|
69
|
-
privacyTier: response.privacyTier,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
async deregister(agentId: string): Promise<void> {
|
|
74
|
-
await this.request<void>('DELETE', `/agents/${encodeURIComponent(agentId)}`);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async send(
|
|
78
|
-
fromAgentId: string,
|
|
79
|
-
toAgentId: string,
|
|
80
|
-
content: string,
|
|
81
|
-
conversationId?: string,
|
|
82
|
-
): Promise<MessageResult> {
|
|
83
|
-
let convId = conversationId;
|
|
84
|
-
|
|
85
|
-
if (!convId) {
|
|
86
|
-
const conversation = await this.createConversation([fromAgentId, toAgentId], 'private');
|
|
87
|
-
convId = conversation.id;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const body: NewMessage = {
|
|
91
|
-
conversationId: convId,
|
|
92
|
-
fromAgentId,
|
|
93
|
-
toAgentId,
|
|
94
|
-
content,
|
|
95
|
-
contentType: 'text',
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const message = await this.request<Message>('POST', '/messages', body, fromAgentId);
|
|
99
|
-
|
|
100
|
-
return {
|
|
101
|
-
messageId: message.id,
|
|
102
|
-
conversationId: message.conversationId,
|
|
103
|
-
status: message.status === 'delivered' ? 'delivered' : 'pending',
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
async poll(agentId: string, since?: string): Promise<Message[]> {
|
|
108
|
-
const path = since
|
|
109
|
-
? `/messages/poll/new?since=${encodeURIComponent(since)}`
|
|
110
|
-
: '/messages/poll/new';
|
|
111
|
-
const messages = await this.request<Message[]>('GET', path, undefined, agentId);
|
|
112
|
-
return messages;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
async heartbeat(agentId: string): Promise<void> {
|
|
116
|
-
await this.request<void>(
|
|
117
|
-
'POST',
|
|
118
|
-
`/agents/${encodeURIComponent(agentId)}/heartbeat`,
|
|
119
|
-
undefined,
|
|
120
|
-
agentId,
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
async createConversation(
|
|
125
|
-
participants: string[],
|
|
126
|
-
visibility: ConversationVisibility = 'private',
|
|
127
|
-
): Promise<Conversation> {
|
|
128
|
-
const body: NewConversation = {
|
|
129
|
-
participants: [...participants].sort(),
|
|
130
|
-
visibility,
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
return this.request<Conversation>('POST', '/conversations', body);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
async getAgent(agentId: string): Promise<Agent | null> {
|
|
137
|
-
try {
|
|
138
|
-
return await this.request<Agent>('GET', `/agents/${encodeURIComponent(agentId)}`);
|
|
139
|
-
} catch {
|
|
140
|
-
return null;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Make an HTTP request to the SignalDock API.
|
|
146
|
-
*/
|
|
147
|
-
private async request<T>(
|
|
148
|
-
method: string,
|
|
149
|
-
path: string,
|
|
150
|
-
body?: unknown,
|
|
151
|
-
agentId?: string,
|
|
152
|
-
): Promise<T> {
|
|
153
|
-
const url = `${this.config.endpoint}${path}`;
|
|
154
|
-
const headers: Record<string, string> = {
|
|
155
|
-
'Content-Type': 'application/json',
|
|
156
|
-
Accept: 'application/json',
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
if (agentId) {
|
|
160
|
-
headers['X-Agent-Id'] = agentId;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const init: RequestInit = {
|
|
164
|
-
method,
|
|
165
|
-
headers,
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
if (body !== undefined) {
|
|
169
|
-
init.body = JSON.stringify(body);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
const response = await fetch(url, init);
|
|
173
|
-
|
|
174
|
-
if (!response.ok) {
|
|
175
|
-
const text = await response.text().catch(() => '');
|
|
176
|
-
throw new Error(
|
|
177
|
-
`SignalDock API error: ${method} ${path} returned ${response.status}: ${text}`,
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// DELETE may return no content
|
|
182
|
-
if (response.status === 204) {
|
|
183
|
-
return undefined as T;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const envelope = (await response.json()) as ApiResponse<T>;
|
|
187
|
-
|
|
188
|
-
if (!envelope.success && envelope.error) {
|
|
189
|
-
throw new Error(`SignalDock error [${envelope.error.code}]: ${envelope.error.message}`);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return envelope.data as T;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AgentTransport interface — provider-neutral abstraction for inter-agent communication.
|
|
3
|
-
*
|
|
4
|
-
* This interface enables CLEO's multi-tier orchestration to work with any
|
|
5
|
-
* agent messaging backend: SignalDock (provider-neutral), Claude Code SDK
|
|
6
|
-
* (provider-specific), or future Conduit implementations.
|
|
7
|
-
*
|
|
8
|
-
* @task T5671
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type {
|
|
12
|
-
Agent,
|
|
13
|
-
AgentClass,
|
|
14
|
-
Conversation,
|
|
15
|
-
ConversationVisibility,
|
|
16
|
-
Message,
|
|
17
|
-
PrivacyTier,
|
|
18
|
-
} from './types.js';
|
|
19
|
-
|
|
20
|
-
/** Result of agent registration. */
|
|
21
|
-
export interface AgentRegistration {
|
|
22
|
-
agentId: string;
|
|
23
|
-
name: string;
|
|
24
|
-
agentClass: AgentClass;
|
|
25
|
-
privacyTier: PrivacyTier;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** Result of sending a message. */
|
|
29
|
-
export interface MessageResult {
|
|
30
|
-
messageId: string;
|
|
31
|
-
conversationId: string;
|
|
32
|
-
status: 'pending' | 'delivered';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Provider-neutral interface for inter-agent communication.
|
|
37
|
-
*
|
|
38
|
-
* Implementations:
|
|
39
|
-
* - SignalDockTransport: HTTP client for SignalDock REST API (provider-neutral)
|
|
40
|
-
* - ClaudeCodeTransport: Wrapper around Claude Code SDK SendMessage (provider-specific)
|
|
41
|
-
*/
|
|
42
|
-
export interface AgentTransport {
|
|
43
|
-
/** Transport name for logging and diagnostics. */
|
|
44
|
-
readonly name: string;
|
|
45
|
-
|
|
46
|
-
/** Register an agent with the transport layer. */
|
|
47
|
-
register(
|
|
48
|
-
name: string,
|
|
49
|
-
agentClass: AgentClass,
|
|
50
|
-
privacyTier: PrivacyTier,
|
|
51
|
-
): Promise<AgentRegistration>;
|
|
52
|
-
|
|
53
|
-
/** Deregister an agent from the transport layer. */
|
|
54
|
-
deregister(agentId: string): Promise<void>;
|
|
55
|
-
|
|
56
|
-
/** Send a message to another agent. */
|
|
57
|
-
send(
|
|
58
|
-
fromAgentId: string,
|
|
59
|
-
toAgentId: string,
|
|
60
|
-
content: string,
|
|
61
|
-
conversationId?: string,
|
|
62
|
-
): Promise<MessageResult>;
|
|
63
|
-
|
|
64
|
-
/** Poll for new messages addressed to this agent. */
|
|
65
|
-
poll(agentId: string, since?: string): Promise<Message[]>;
|
|
66
|
-
|
|
67
|
-
/** Send a heartbeat to keep the agent connection alive. */
|
|
68
|
-
heartbeat(agentId: string): Promise<void>;
|
|
69
|
-
|
|
70
|
-
/** Create a conversation between agents. */
|
|
71
|
-
createConversation(
|
|
72
|
-
participants: string[],
|
|
73
|
-
visibility?: ConversationVisibility,
|
|
74
|
-
): Promise<Conversation>;
|
|
75
|
-
|
|
76
|
-
/** Get agent info by ID. */
|
|
77
|
-
getAgent(agentId: string): Promise<Agent | null>;
|
|
78
|
-
}
|
package/src/signaldock/types.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TypeScript types for SignalDock protocol integration.
|
|
3
|
-
* These mirror the public API surface of SignalDock-core.
|
|
4
|
-
*
|
|
5
|
-
* IMPORTANT: These types are derived from SignalDock's public REST API.
|
|
6
|
-
* No proprietary source code has been copied.
|
|
7
|
-
*
|
|
8
|
-
* @task T5671
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/** Functional classification of an agent. */
|
|
12
|
-
export type AgentClass = 'personal_assistant' | 'code_dev' | 'research' | 'utility_bot' | 'custom';
|
|
13
|
-
|
|
14
|
-
/** Visibility tier controlling agent discoverability. */
|
|
15
|
-
export type PrivacyTier = 'public' | 'discoverable' | 'private';
|
|
16
|
-
|
|
17
|
-
/** Current online status of an agent. */
|
|
18
|
-
export type AgentStatus = 'online' | 'offline' | 'busy';
|
|
19
|
-
|
|
20
|
-
/** Delivery status of a message. */
|
|
21
|
-
export type MessageStatus = 'pending' | 'delivered' | 'read';
|
|
22
|
-
|
|
23
|
-
/** Content type for message payloads. */
|
|
24
|
-
export type ContentType = 'text';
|
|
25
|
-
|
|
26
|
-
/** Visibility setting for a conversation. */
|
|
27
|
-
export type ConversationVisibility = 'private' | 'public' | 'shared';
|
|
28
|
-
|
|
29
|
-
/** A registered agent. */
|
|
30
|
-
export interface Agent {
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
agentClass: AgentClass;
|
|
34
|
-
privacyTier: PrivacyTier;
|
|
35
|
-
status: AgentStatus;
|
|
36
|
-
createdAt: string;
|
|
37
|
-
updatedAt: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/** Payload for registering a new agent. */
|
|
41
|
-
export interface NewAgent {
|
|
42
|
-
name: string;
|
|
43
|
-
agentClass: AgentClass;
|
|
44
|
-
privacyTier: PrivacyTier;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/** A message exchanged between two agents. */
|
|
48
|
-
export interface Message {
|
|
49
|
-
id: string;
|
|
50
|
-
conversationId: string;
|
|
51
|
-
fromAgentId: string;
|
|
52
|
-
toAgentId: string;
|
|
53
|
-
content: string;
|
|
54
|
-
contentType: ContentType;
|
|
55
|
-
status: MessageStatus;
|
|
56
|
-
createdAt: string;
|
|
57
|
-
deliveredAt?: string;
|
|
58
|
-
readAt?: string;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/** Payload for creating a new message. */
|
|
62
|
-
export interface NewMessage {
|
|
63
|
-
conversationId: string;
|
|
64
|
-
fromAgentId: string;
|
|
65
|
-
toAgentId: string;
|
|
66
|
-
content: string;
|
|
67
|
-
contentType: ContentType;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** A conversation between agents. */
|
|
71
|
-
export interface Conversation {
|
|
72
|
-
id: string;
|
|
73
|
-
participants: string[];
|
|
74
|
-
visibility: ConversationVisibility;
|
|
75
|
-
messageCount: number;
|
|
76
|
-
lastMessageAt?: string;
|
|
77
|
-
createdAt: string;
|
|
78
|
-
updatedAt: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/** Payload for creating a new conversation. */
|
|
82
|
-
export interface NewConversation {
|
|
83
|
-
participants: string[];
|
|
84
|
-
visibility: ConversationVisibility;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/** Standard API response envelope. */
|
|
88
|
-
export interface ApiResponse<T> {
|
|
89
|
-
success: boolean;
|
|
90
|
-
data?: T;
|
|
91
|
-
error?: {
|
|
92
|
-
code: string;
|
|
93
|
-
message: string;
|
|
94
|
-
};
|
|
95
|
-
meta?: {
|
|
96
|
-
page?: number;
|
|
97
|
-
pageSize?: number;
|
|
98
|
-
total?: number;
|
|
99
|
-
};
|
|
100
|
-
}
|