@cleocode/cleo 2026.4.10 → 2026.4.12
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/dist/cli/commander-shim.d.ts +112 -0
- package/dist/cli/commander-shim.d.ts.map +1 -0
- package/dist/cli/commander-shim.js +233 -0
- package/dist/cli/commander-shim.js.map +1 -0
- package/dist/cli/commands/add.d.ts +12 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +202 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/admin.d.ts +12 -0
- package/dist/cli/commands/admin.d.ts.map +1 -0
- package/dist/cli/commands/admin.js +59 -0
- package/dist/cli/commands/admin.js.map +1 -0
- package/dist/cli/commands/adr.d.ts +27 -0
- package/dist/cli/commands/adr.d.ts.map +1 -0
- package/dist/cli/commands/adr.js +79 -0
- package/dist/cli/commands/adr.js.map +1 -0
- package/dist/cli/commands/agent-profile-status.d.ts +98 -0
- package/dist/cli/commands/agent-profile-status.d.ts.map +1 -0
- package/dist/cli/commands/agent-profile-status.js +71 -0
- package/dist/cli/commands/agent-profile-status.js.map +1 -0
- package/dist/cli/commands/agent.d.ts +38 -0
- package/dist/cli/commands/agent.d.ts.map +1 -0
- package/dist/cli/commands/agent.js +1169 -0
- package/dist/cli/commands/agent.js.map +1 -0
- package/dist/cli/commands/agents.d.ts +17 -0
- package/dist/cli/commands/agents.d.ts.map +1 -0
- package/dist/cli/commands/agents.js +20 -0
- package/dist/cli/commands/agents.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +12 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +20 -0
- package/dist/cli/commands/analyze.js.map +1 -0
- package/dist/cli/commands/archive-stats.d.ts +18 -0
- package/dist/cli/commands/archive-stats.d.ts.map +1 -0
- package/dist/cli/commands/archive-stats.js +49 -0
- package/dist/cli/commands/archive-stats.js.map +1 -0
- package/dist/cli/commands/archive.d.ts +12 -0
- package/dist/cli/commands/archive.d.ts.map +1 -0
- package/dist/cli/commands/archive.js +32 -0
- package/dist/cli/commands/archive.js.map +1 -0
- package/dist/cli/commands/backfill.d.ts +38 -0
- package/dist/cli/commands/backfill.d.ts.map +1 -0
- package/dist/cli/commands/backfill.js +147 -0
- package/dist/cli/commands/backfill.js.map +1 -0
- package/dist/cli/commands/backup.d.ts +9 -0
- package/dist/cli/commands/backup.d.ts.map +1 -0
- package/dist/cli/commands/backup.js +41 -0
- package/dist/cli/commands/backup.js.map +1 -0
- package/dist/cli/commands/blockers.d.ts +7 -0
- package/dist/cli/commands/blockers.d.ts.map +1 -0
- package/dist/cli/commands/blockers.js +16 -0
- package/dist/cli/commands/blockers.js.map +1 -0
- package/dist/cli/commands/brain.d.ts +29 -0
- package/dist/cli/commands/brain.d.ts.map +1 -0
- package/dist/cli/commands/brain.js +107 -0
- package/dist/cli/commands/brain.js.map +1 -0
- package/dist/cli/commands/briefing.d.ts +22 -0
- package/dist/cli/commands/briefing.d.ts.map +1 -0
- package/dist/cli/commands/briefing.js +45 -0
- package/dist/cli/commands/briefing.js.map +1 -0
- package/dist/cli/commands/bug.d.ts +12 -0
- package/dist/cli/commands/bug.d.ts.map +1 -0
- package/dist/cli/commands/bug.js +81 -0
- package/dist/cli/commands/bug.js.map +1 -0
- package/dist/cli/commands/cant.d.ts +32 -0
- package/dist/cli/commands/cant.d.ts.map +1 -0
- package/dist/cli/commands/cant.js +281 -0
- package/dist/cli/commands/cant.js.map +1 -0
- package/dist/cli/commands/check.d.ts +22 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/check.js +164 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/checkpoint.d.ts +15 -0
- package/dist/cli/commands/checkpoint.d.ts.map +1 -0
- package/dist/cli/commands/checkpoint.js +91 -0
- package/dist/cli/commands/checkpoint.js.map +1 -0
- package/dist/cli/commands/code.d.ts +11 -0
- package/dist/cli/commands/code.d.ts.map +1 -0
- package/dist/cli/commands/code.js +114 -0
- package/dist/cli/commands/code.js.map +1 -0
- package/dist/cli/commands/commands.d.ts +13 -0
- package/dist/cli/commands/commands.d.ts.map +1 -0
- package/dist/cli/commands/commands.js +29 -0
- package/dist/cli/commands/commands.js.map +1 -0
- package/dist/cli/commands/complete.d.ts +12 -0
- package/dist/cli/commands/complete.d.ts.map +1 -0
- package/dist/cli/commands/complete.js +92 -0
- package/dist/cli/commands/complete.js.map +1 -0
- package/dist/cli/commands/compliance.d.ts +8 -0
- package/dist/cli/commands/compliance.d.ts.map +1 -0
- package/dist/cli/commands/compliance.js +85 -0
- package/dist/cli/commands/compliance.js.map +1 -0
- package/dist/cli/commands/config.d.ts +10 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +69 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/consensus.d.ts +13 -0
- package/dist/cli/commands/consensus.d.ts.map +1 -0
- package/dist/cli/commands/consensus.js +45 -0
- package/dist/cli/commands/consensus.js.map +1 -0
- package/dist/cli/commands/context.d.ts +8 -0
- package/dist/cli/commands/context.d.ts.map +1 -0
- package/dist/cli/commands/context.js +40 -0
- package/dist/cli/commands/context.js.map +1 -0
- package/dist/cli/commands/contribution.d.ts +13 -0
- package/dist/cli/commands/contribution.d.ts.map +1 -0
- package/dist/cli/commands/contribution.js +41 -0
- package/dist/cli/commands/contribution.js.map +1 -0
- package/dist/cli/commands/current.d.ts +13 -0
- package/dist/cli/commands/current.d.ts.map +1 -0
- package/dist/cli/commands/current.js +20 -0
- package/dist/cli/commands/current.js.map +1 -0
- package/dist/cli/commands/dash.d.ts +12 -0
- package/dist/cli/commands/dash.d.ts.map +1 -0
- package/dist/cli/commands/dash.js +24 -0
- package/dist/cli/commands/dash.js.map +1 -0
- package/dist/cli/commands/decomposition.d.ts +13 -0
- package/dist/cli/commands/decomposition.d.ts.map +1 -0
- package/dist/cli/commands/decomposition.js +45 -0
- package/dist/cli/commands/decomposition.js.map +1 -0
- package/dist/cli/commands/delete.d.ts +12 -0
- package/dist/cli/commands/delete.d.ts.map +1 -0
- package/dist/cli/commands/delete.js +37 -0
- package/dist/cli/commands/delete.js.map +1 -0
- package/dist/cli/commands/deps.d.ts +24 -0
- package/dist/cli/commands/deps.d.ts.map +1 -0
- package/dist/cli/commands/deps.js +98 -0
- package/dist/cli/commands/deps.js.map +1 -0
- package/dist/cli/commands/detect-drift.d.ts +15 -0
- package/dist/cli/commands/detect-drift.d.ts.map +1 -0
- package/dist/cli/commands/detect-drift.js +424 -0
- package/dist/cli/commands/detect-drift.js.map +1 -0
- package/dist/cli/commands/detect.d.ts +10 -0
- package/dist/cli/commands/detect.d.ts.map +1 -0
- package/dist/cli/commands/detect.js +24 -0
- package/dist/cli/commands/detect.js.map +1 -0
- package/dist/cli/commands/docs.d.ts +13 -0
- package/dist/cli/commands/docs.d.ts.map +1 -0
- package/dist/cli/commands/docs.js +169 -0
- package/dist/cli/commands/docs.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +15 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +133 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/dynamic.d.ts +24 -0
- package/dist/cli/commands/dynamic.d.ts.map +1 -0
- package/dist/cli/commands/dynamic.js +27 -0
- package/dist/cli/commands/dynamic.js.map +1 -0
- package/dist/cli/commands/env.d.ts +12 -0
- package/dist/cli/commands/env.d.ts.map +1 -0
- package/dist/cli/commands/env.js +44 -0
- package/dist/cli/commands/env.js.map +1 -0
- package/dist/cli/commands/exists.d.ts +22 -0
- package/dist/cli/commands/exists.d.ts.map +1 -0
- package/dist/cli/commands/exists.js +51 -0
- package/dist/cli/commands/exists.js.map +1 -0
- package/dist/cli/commands/export-tasks.d.ts +10 -0
- package/dist/cli/commands/export-tasks.d.ts.map +1 -0
- package/dist/cli/commands/export-tasks.js +47 -0
- package/dist/cli/commands/export-tasks.js.map +1 -0
- package/dist/cli/commands/export.d.ts +9 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +46 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/find.d.ts +14 -0
- package/dist/cli/commands/find.d.ts.map +1 -0
- package/dist/cli/commands/find.js +134 -0
- package/dist/cli/commands/find.js.map +1 -0
- package/dist/cli/commands/generate-changelog.d.ts +14 -0
- package/dist/cli/commands/generate-changelog.d.ts.map +1 -0
- package/dist/cli/commands/generate-changelog.js +252 -0
- package/dist/cli/commands/generate-changelog.js.map +1 -0
- package/dist/cli/commands/grade.d.ts +13 -0
- package/dist/cli/commands/grade.d.ts.map +1 -0
- package/dist/cli/commands/grade.js +26 -0
- package/dist/cli/commands/grade.js.map +1 -0
- package/dist/cli/commands/history.d.ts +9 -0
- package/dist/cli/commands/history.d.ts.map +1 -0
- package/dist/cli/commands/history.js +30 -0
- package/dist/cli/commands/history.js.map +1 -0
- package/dist/cli/commands/implementation.d.ts +13 -0
- package/dist/cli/commands/implementation.d.ts.map +1 -0
- package/dist/cli/commands/implementation.js +41 -0
- package/dist/cli/commands/implementation.js.map +1 -0
- package/dist/cli/commands/import-tasks.d.ts +10 -0
- package/dist/cli/commands/import-tasks.d.ts.map +1 -0
- package/dist/cli/commands/import-tasks.js +38 -0
- package/dist/cli/commands/import-tasks.js.map +1 -0
- package/dist/cli/commands/import.d.ts +9 -0
- package/dist/cli/commands/import.d.ts.map +1 -0
- package/dist/cli/commands/import.js +28 -0
- package/dist/cli/commands/import.js.map +1 -0
- package/dist/cli/commands/init.d.ts +34 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +96 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/inject.d.ts +8 -0
- package/dist/cli/commands/inject.d.ts.map +1 -0
- package/dist/cli/commands/inject.js +28 -0
- package/dist/cli/commands/inject.js.map +1 -0
- package/dist/cli/commands/issue.d.ts +17 -0
- package/dist/cli/commands/issue.d.ts.map +1 -0
- package/dist/cli/commands/issue.js +107 -0
- package/dist/cli/commands/issue.js.map +1 -0
- package/dist/cli/commands/labels.d.ts +13 -0
- package/dist/cli/commands/labels.d.ts.map +1 -0
- package/dist/cli/commands/labels.js +44 -0
- package/dist/cli/commands/labels.js.map +1 -0
- package/dist/cli/commands/lifecycle.d.ts +8 -0
- package/dist/cli/commands/lifecycle.d.ts.map +1 -0
- package/dist/cli/commands/lifecycle.js +84 -0
- package/dist/cli/commands/lifecycle.js.map +1 -0
- package/dist/cli/commands/list.d.ts +14 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +143 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/log.d.ts +12 -0
- package/dist/cli/commands/log.d.ts.map +1 -0
- package/dist/cli/commands/log.js +30 -0
- package/dist/cli/commands/log.js.map +1 -0
- package/dist/cli/commands/map.d.ts +10 -0
- package/dist/cli/commands/map.d.ts.map +1 -0
- package/dist/cli/commands/map.js +23 -0
- package/dist/cli/commands/map.js.map +1 -0
- package/dist/cli/commands/memory-brain.d.ts +14 -0
- package/dist/cli/commands/memory-brain.d.ts.map +1 -0
- package/dist/cli/commands/memory-brain.js +157 -0
- package/dist/cli/commands/memory-brain.js.map +1 -0
- package/dist/cli/commands/migrate-claude-mem.d.ts +18 -0
- package/dist/cli/commands/migrate-claude-mem.d.ts.map +1 -0
- package/dist/cli/commands/migrate-claude-mem.js +60 -0
- package/dist/cli/commands/migrate-claude-mem.js.map +1 -0
- package/dist/cli/commands/next.d.ts +9 -0
- package/dist/cli/commands/next.d.ts.map +1 -0
- package/dist/cli/commands/next.js +20 -0
- package/dist/cli/commands/next.js.map +1 -0
- package/dist/cli/commands/nexus.d.ts +16 -0
- package/dist/cli/commands/nexus.d.ts.map +1 -0
- package/dist/cli/commands/nexus.js +155 -0
- package/dist/cli/commands/nexus.js.map +1 -0
- package/dist/cli/commands/observe.d.ts +12 -0
- package/dist/cli/commands/observe.d.ts.map +1 -0
- package/dist/cli/commands/observe.js +42 -0
- package/dist/cli/commands/observe.js.map +1 -0
- package/dist/cli/commands/ops.d.ts +10 -0
- package/dist/cli/commands/ops.d.ts.map +1 -0
- package/dist/cli/commands/ops.js +19 -0
- package/dist/cli/commands/ops.js.map +1 -0
- package/dist/cli/commands/orchestrate.d.ts +8 -0
- package/dist/cli/commands/orchestrate.d.ts.map +1 -0
- package/dist/cli/commands/orchestrate.js +58 -0
- package/dist/cli/commands/orchestrate.js.map +1 -0
- package/dist/cli/commands/otel.d.ts +12 -0
- package/dist/cli/commands/otel.d.ts.map +1 -0
- package/dist/cli/commands/otel.js +128 -0
- package/dist/cli/commands/otel.js.map +1 -0
- package/dist/cli/commands/phase.d.ts +12 -0
- package/dist/cli/commands/phase.d.ts.map +1 -0
- package/dist/cli/commands/phase.js +91 -0
- package/dist/cli/commands/phase.js.map +1 -0
- package/dist/cli/commands/phases.d.ts +12 -0
- package/dist/cli/commands/phases.d.ts.map +1 -0
- package/dist/cli/commands/phases.js +37 -0
- package/dist/cli/commands/phases.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +8 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +15 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/promote.d.ts +7 -0
- package/dist/cli/commands/promote.d.ts.map +1 -0
- package/dist/cli/commands/promote.js +15 -0
- package/dist/cli/commands/promote.js.map +1 -0
- package/dist/cli/commands/reason.d.ts +35 -0
- package/dist/cli/commands/reason.d.ts.map +1 -0
- package/dist/cli/commands/reason.js +104 -0
- package/dist/cli/commands/reason.js.map +1 -0
- package/dist/cli/commands/refresh-memory.d.ts +9 -0
- package/dist/cli/commands/refresh-memory.d.ts.map +1 -0
- package/dist/cli/commands/refresh-memory.js +24 -0
- package/dist/cli/commands/refresh-memory.js.map +1 -0
- package/dist/cli/commands/relates.d.ts +12 -0
- package/dist/cli/commands/relates.d.ts.map +1 -0
- package/dist/cli/commands/relates.js +53 -0
- package/dist/cli/commands/relates.js.map +1 -0
- package/dist/cli/commands/release.d.ts +8 -0
- package/dist/cli/commands/release.d.ts.map +1 -0
- package/dist/cli/commands/release.js +72 -0
- package/dist/cli/commands/release.js.map +1 -0
- package/dist/cli/commands/remote.d.ts +12 -0
- package/dist/cli/commands/remote.d.ts.map +1 -0
- package/dist/cli/commands/remote.js +207 -0
- package/dist/cli/commands/remote.js.map +1 -0
- package/dist/cli/commands/reorder.d.ts +7 -0
- package/dist/cli/commands/reorder.d.ts.map +1 -0
- package/dist/cli/commands/reorder.js +20 -0
- package/dist/cli/commands/reorder.js.map +1 -0
- package/dist/cli/commands/reparent.d.ts +10 -0
- package/dist/cli/commands/reparent.d.ts.map +1 -0
- package/dist/cli/commands/reparent.js +19 -0
- package/dist/cli/commands/reparent.js.map +1 -0
- package/dist/cli/commands/research.d.ts +8 -0
- package/dist/cli/commands/research.d.ts.map +1 -0
- package/dist/cli/commands/research.js +129 -0
- package/dist/cli/commands/research.js.map +1 -0
- package/dist/cli/commands/restore.d.ts +12 -0
- package/dist/cli/commands/restore.d.ts.map +1 -0
- package/dist/cli/commands/restore.js +228 -0
- package/dist/cli/commands/restore.js.map +1 -0
- package/dist/cli/commands/roadmap.d.ts +8 -0
- package/dist/cli/commands/roadmap.d.ts.map +1 -0
- package/dist/cli/commands/roadmap.js +21 -0
- package/dist/cli/commands/roadmap.js.map +1 -0
- package/dist/cli/commands/safestop.d.ts +14 -0
- package/dist/cli/commands/safestop.d.ts.map +1 -0
- package/dist/cli/commands/safestop.js +32 -0
- package/dist/cli/commands/safestop.js.map +1 -0
- package/dist/cli/commands/schema.d.ts +27 -0
- package/dist/cli/commands/schema.d.ts.map +1 -0
- package/dist/cli/commands/schema.js +160 -0
- package/dist/cli/commands/schema.js.map +1 -0
- package/dist/cli/commands/self-update.d.ts +15 -0
- package/dist/cli/commands/self-update.d.ts.map +1 -0
- package/dist/cli/commands/self-update.js +329 -0
- package/dist/cli/commands/self-update.js.map +1 -0
- package/dist/cli/commands/sequence.d.ts +8 -0
- package/dist/cli/commands/sequence.d.ts.map +1 -0
- package/dist/cli/commands/sequence.js +30 -0
- package/dist/cli/commands/sequence.js.map +1 -0
- package/dist/cli/commands/session.d.ts +12 -0
- package/dist/cli/commands/session.d.ts.map +1 -0
- package/dist/cli/commands/session.js +175 -0
- package/dist/cli/commands/session.js.map +1 -0
- package/dist/cli/commands/show.d.ts +13 -0
- package/dist/cli/commands/show.d.ts.map +1 -0
- package/dist/cli/commands/show.js +40 -0
- package/dist/cli/commands/show.js.map +1 -0
- package/dist/cli/commands/skills.d.ts +13 -0
- package/dist/cli/commands/skills.d.ts.map +1 -0
- package/dist/cli/commands/skills.js +131 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/commands/snapshot.d.ts +9 -0
- package/dist/cli/commands/snapshot.d.ts.map +1 -0
- package/dist/cli/commands/snapshot.js +50 -0
- package/dist/cli/commands/snapshot.js.map +1 -0
- package/dist/cli/commands/specification.d.ts +13 -0
- package/dist/cli/commands/specification.d.ts.map +1 -0
- package/dist/cli/commands/specification.js +45 -0
- package/dist/cli/commands/specification.js.map +1 -0
- package/dist/cli/commands/start.d.ts +13 -0
- package/dist/cli/commands/start.d.ts.map +1 -0
- package/dist/cli/commands/start.js +20 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +12 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/stats.js +35 -0
- package/dist/cli/commands/stats.js.map +1 -0
- package/dist/cli/commands/sticky.d.ts +16 -0
- package/dist/cli/commands/sticky.d.ts.map +1 -0
- package/dist/cli/commands/sticky.js +211 -0
- package/dist/cli/commands/sticky.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +13 -0
- package/dist/cli/commands/stop.d.ts.map +1 -0
- package/dist/cli/commands/stop.js +20 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/testing.d.ts +13 -0
- package/dist/cli/commands/testing.d.ts.map +1 -0
- package/dist/cli/commands/testing.js +64 -0
- package/dist/cli/commands/testing.js.map +1 -0
- package/dist/cli/commands/token.d.ts +10 -0
- package/dist/cli/commands/token.d.ts.map +1 -0
- package/dist/cli/commands/token.js +135 -0
- package/dist/cli/commands/token.js.map +1 -0
- package/dist/cli/commands/update.d.ts +12 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +83 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/commands/upgrade.d.ts +18 -0
- package/dist/cli/commands/upgrade.d.ts.map +1 -0
- package/dist/cli/commands/upgrade.js +103 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +12 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +23 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/commands/verify.d.ts +8 -0
- package/dist/cli/commands/verify.d.ts.map +1 -0
- package/dist/cli/commands/verify.js +28 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/commands/web.d.ts +13 -0
- package/dist/cli/commands/web.d.ts.map +1 -0
- package/dist/cli/commands/web.js +277 -0
- package/dist/cli/commands/web.js.map +1 -0
- package/dist/cli/field-context.d.ts +32 -0
- package/dist/cli/field-context.d.ts.map +1 -0
- package/dist/cli/field-context.js +47 -0
- package/dist/cli/field-context.js.map +1 -0
- package/dist/cli/format-context.d.ts +32 -0
- package/dist/cli/format-context.d.ts.map +1 -0
- package/dist/cli/format-context.js +50 -0
- package/dist/cli/format-context.js.map +1 -0
- package/dist/cli/help-generator.d.ts +74 -0
- package/dist/cli/help-generator.d.ts.map +1 -0
- package/dist/cli/help-generator.js +229 -0
- package/dist/cli/help-generator.js.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +342 -107611
- package/dist/cli/index.js.map +1 -7
- package/dist/cli/logger-bootstrap.d.ts +6 -0
- package/dist/cli/logger-bootstrap.d.ts.map +1 -0
- package/dist/cli/logger-bootstrap.js +10 -0
- package/dist/cli/logger-bootstrap.js.map +1 -0
- package/dist/cli/middleware/output-format.d.ts +30 -0
- package/dist/cli/middleware/output-format.d.ts.map +1 -0
- package/dist/cli/middleware/output-format.js +35 -0
- package/dist/cli/middleware/output-format.js.map +1 -0
- package/dist/cli/progress.d.ts +84 -0
- package/dist/cli/progress.d.ts.map +1 -0
- package/dist/cli/progress.js +169 -0
- package/dist/cli/progress.js.map +1 -0
- package/dist/cli/renderers/colors.d.ts +32 -0
- package/dist/cli/renderers/colors.d.ts.map +1 -0
- package/dist/cli/renderers/colors.js +141 -0
- package/dist/cli/renderers/colors.js.map +1 -0
- package/dist/cli/renderers/error.d.ts +13 -0
- package/dist/cli/renderers/error.d.ts.map +1 -0
- package/dist/cli/renderers/error.js +42 -0
- package/dist/cli/renderers/error.js.map +1 -0
- package/dist/cli/renderers/index.d.ts +87 -0
- package/dist/cli/renderers/index.d.ts.map +1 -0
- package/dist/cli/renderers/index.js +262 -0
- package/dist/cli/renderers/index.js.map +1 -0
- package/dist/cli/renderers/lafs-validator.d.ts +91 -0
- package/dist/cli/renderers/lafs-validator.d.ts.map +1 -0
- package/dist/cli/renderers/lafs-validator.js +176 -0
- package/dist/cli/renderers/lafs-validator.js.map +1 -0
- package/dist/cli/renderers/normalizer.d.ts +21 -0
- package/dist/cli/renderers/normalizer.d.ts.map +1 -0
- package/dist/cli/renderers/normalizer.js +106 -0
- package/dist/cli/renderers/normalizer.js.map +1 -0
- package/dist/cli/renderers/system.d.ts +25 -0
- package/dist/cli/renderers/system.d.ts.map +1 -0
- package/dist/cli/renderers/system.js +416 -0
- package/dist/cli/renderers/system.js.map +1 -0
- package/dist/cli/renderers/tasks.d.ts +28 -0
- package/dist/cli/renderers/tasks.d.ts.map +1 -0
- package/dist/cli/renderers/tasks.js +306 -0
- package/dist/cli/renderers/tasks.js.map +1 -0
- package/dist/dispatch/adapters/cli.d.ts +67 -0
- package/dist/dispatch/adapters/cli.d.ts.map +1 -0
- package/dist/dispatch/adapters/cli.js +276 -0
- package/dist/dispatch/adapters/cli.js.map +1 -0
- package/dist/dispatch/context/session-context.d.ts +54 -0
- package/dist/dispatch/context/session-context.d.ts.map +1 -0
- package/dist/dispatch/context/session-context.js +61 -0
- package/dist/dispatch/context/session-context.js.map +1 -0
- package/dist/dispatch/dispatcher.d.ts +23 -0
- package/dist/dispatch/dispatcher.d.ts.map +1 -0
- package/dist/dispatch/dispatcher.js +84 -0
- package/dist/dispatch/dispatcher.js.map +1 -0
- package/dist/dispatch/domains/_base.d.ts +59 -0
- package/dist/dispatch/domains/_base.d.ts.map +1 -0
- package/dist/dispatch/domains/_base.js +77 -0
- package/dist/dispatch/domains/_base.js.map +1 -0
- package/dist/dispatch/domains/_meta.d.ts +23 -0
- package/dist/dispatch/domains/_meta.d.ts.map +1 -0
- package/dist/dispatch/domains/_meta.js +25 -0
- package/dist/dispatch/domains/_meta.js.map +1 -0
- package/dist/dispatch/domains/_routing.d.ts +8 -0
- package/dist/dispatch/domains/_routing.d.ts.map +1 -0
- package/dist/dispatch/domains/_routing.js +20 -0
- package/dist/dispatch/domains/_routing.js.map +1 -0
- package/dist/dispatch/domains/admin.d.ts +25 -0
- package/dist/dispatch/domains/admin.d.ts.map +1 -0
- package/dist/dispatch/domains/admin.js +719 -0
- package/dist/dispatch/domains/admin.js.map +1 -0
- package/dist/dispatch/domains/check.d.ts +22 -0
- package/dist/dispatch/domains/check.d.ts.map +1 -0
- package/dist/dispatch/domains/check.js +360 -0
- package/dist/dispatch/domains/check.js.map +1 -0
- package/dist/dispatch/domains/conduit.d.ts +38 -0
- package/dist/dispatch/domains/conduit.d.ts.map +1 -0
- package/dist/dispatch/domains/conduit.js +247 -0
- package/dist/dispatch/domains/conduit.js.map +1 -0
- package/dist/dispatch/domains/index.d.ts +27 -0
- package/dist/dispatch/domains/index.d.ts.map +1 -0
- package/dist/dispatch/domains/index.js +40 -0
- package/dist/dispatch/domains/index.js.map +1 -0
- package/dist/dispatch/domains/memory.d.ts +22 -0
- package/dist/dispatch/domains/memory.d.ts.map +1 -0
- package/dist/dispatch/domains/memory.js +303 -0
- package/dist/dispatch/domains/memory.js.map +1 -0
- package/dist/dispatch/domains/nexus.d.ts +22 -0
- package/dist/dispatch/domains/nexus.d.ts.map +1 -0
- package/dist/dispatch/domains/nexus.js +286 -0
- package/dist/dispatch/domains/nexus.js.map +1 -0
- package/dist/dispatch/domains/orchestrate.d.ts +19 -0
- package/dist/dispatch/domains/orchestrate.d.ts.map +1 -0
- package/dist/dispatch/domains/orchestrate.js +259 -0
- package/dist/dispatch/domains/orchestrate.js.map +1 -0
- package/dist/dispatch/domains/pipeline.d.ts +35 -0
- package/dist/dispatch/domains/pipeline.d.ts.map +1 -0
- package/dist/dispatch/domains/pipeline.js +593 -0
- package/dist/dispatch/domains/pipeline.js.map +1 -0
- package/dist/dispatch/domains/session.d.ts +22 -0
- package/dist/dispatch/domains/session.d.ts.map +1 -0
- package/dist/dispatch/domains/session.js +257 -0
- package/dist/dispatch/domains/session.js.map +1 -0
- package/dist/dispatch/domains/sticky.d.ts +20 -0
- package/dist/dispatch/domains/sticky.d.ts.map +1 -0
- package/dist/dispatch/domains/sticky.js +164 -0
- package/dist/dispatch/domains/sticky.js.map +1 -0
- package/dist/dispatch/domains/tasks.d.ts +25 -0
- package/dist/dispatch/domains/tasks.d.ts.map +1 -0
- package/dist/dispatch/domains/tasks.js +361 -0
- package/dist/dispatch/domains/tasks.js.map +1 -0
- package/dist/dispatch/domains/tools.d.ts +37 -0
- package/dist/dispatch/domains/tools.d.ts.map +1 -0
- package/dist/dispatch/domains/tools.js +481 -0
- package/dist/dispatch/domains/tools.js.map +1 -0
- package/dist/dispatch/engines/_error.d.ts +119 -0
- package/dist/dispatch/engines/_error.d.ts.map +1 -0
- package/dist/dispatch/engines/_error.js +288 -0
- package/dist/dispatch/engines/_error.js.map +1 -0
- package/dist/dispatch/engines/code-engine.d.ts +18 -0
- package/dist/dispatch/engines/code-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/code-engine.js +71 -0
- package/dist/dispatch/engines/code-engine.js.map +1 -0
- package/dist/dispatch/engines/codebase-map-engine.d.ts +31 -0
- package/dist/dispatch/engines/codebase-map-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/codebase-map-engine.js +43 -0
- package/dist/dispatch/engines/codebase-map-engine.js.map +1 -0
- package/dist/dispatch/engines/config-engine.d.ts +32 -0
- package/dist/dispatch/engines/config-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/config-engine.js +70 -0
- package/dist/dispatch/engines/config-engine.js.map +1 -0
- package/dist/dispatch/engines/hooks-engine.d.ts +96 -0
- package/dist/dispatch/engines/hooks-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/hooks-engine.js +144 -0
- package/dist/dispatch/engines/hooks-engine.js.map +1 -0
- package/dist/dispatch/engines/init-engine.d.ts +56 -0
- package/dist/dispatch/engines/init-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/init-engine.js +78 -0
- package/dist/dispatch/engines/init-engine.js.map +1 -0
- package/dist/dispatch/engines/lifecycle-engine.d.ts +66 -0
- package/dist/dispatch/engines/lifecycle-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/lifecycle-engine.js +224 -0
- package/dist/dispatch/engines/lifecycle-engine.js.map +1 -0
- package/dist/dispatch/engines/memory-engine.d.ts +10 -0
- package/dist/dispatch/engines/memory-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/memory-engine.js +10 -0
- package/dist/dispatch/engines/memory-engine.js.map +1 -0
- package/dist/dispatch/engines/nexus-engine.d.ts +167 -0
- package/dist/dispatch/engines/nexus-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/nexus-engine.js +356 -0
- package/dist/dispatch/engines/nexus-engine.js.map +1 -0
- package/dist/dispatch/engines/orchestrate-engine.d.ts +133 -0
- package/dist/dispatch/engines/orchestrate-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/orchestrate-engine.js +769 -0
- package/dist/dispatch/engines/orchestrate-engine.js.map +1 -0
- package/dist/dispatch/engines/pipeline-engine.d.ts +51 -0
- package/dist/dispatch/engines/pipeline-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/pipeline-engine.js +191 -0
- package/dist/dispatch/engines/pipeline-engine.js.map +1 -0
- package/dist/dispatch/engines/release-engine.d.ts +94 -0
- package/dist/dispatch/engines/release-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/release-engine.js +763 -0
- package/dist/dispatch/engines/release-engine.js.map +1 -0
- package/dist/dispatch/engines/session-engine.d.ts +383 -0
- package/dist/dispatch/engines/session-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/session-engine.js +910 -0
- package/dist/dispatch/engines/session-engine.js.map +1 -0
- package/dist/dispatch/engines/sticky-engine.d.ts +100 -0
- package/dist/dispatch/engines/sticky-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/sticky-engine.js +181 -0
- package/dist/dispatch/engines/sticky-engine.js.map +1 -0
- package/dist/dispatch/engines/system-engine.d.ts +539 -0
- package/dist/dispatch/engines/system-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/system-engine.js +1258 -0
- package/dist/dispatch/engines/system-engine.js.map +1 -0
- package/dist/dispatch/engines/task-engine.d.ts +1055 -0
- package/dist/dispatch/engines/task-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/task-engine.js +1193 -0
- package/dist/dispatch/engines/task-engine.js.map +1 -0
- package/dist/dispatch/engines/template-parser.d.ts +85 -0
- package/dist/dispatch/engines/template-parser.d.ts.map +1 -0
- package/dist/dispatch/engines/template-parser.js +108 -0
- package/dist/dispatch/engines/template-parser.js.map +1 -0
- package/dist/dispatch/engines/tools-engine.d.ts +270 -0
- package/dist/dispatch/engines/tools-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/tools-engine.js +636 -0
- package/dist/dispatch/engines/tools-engine.js.map +1 -0
- package/dist/dispatch/engines/validate-engine.d.ts +218 -0
- package/dist/dispatch/engines/validate-engine.d.ts.map +1 -0
- package/dist/dispatch/engines/validate-engine.js +737 -0
- package/dist/dispatch/engines/validate-engine.js.map +1 -0
- package/dist/dispatch/index.d.ts +20 -0
- package/dist/dispatch/index.d.ts.map +1 -0
- package/dist/dispatch/index.js +19 -0
- package/dist/dispatch/index.js.map +1 -0
- package/dist/dispatch/lib/background-jobs.d.ts +86 -0
- package/dist/dispatch/lib/background-jobs.d.ts.map +1 -0
- package/dist/dispatch/lib/background-jobs.js +183 -0
- package/dist/dispatch/lib/background-jobs.js.map +1 -0
- package/dist/dispatch/lib/budget.d.ts +36 -0
- package/dist/dispatch/lib/budget.d.ts.map +1 -0
- package/dist/dispatch/lib/budget.js +109 -0
- package/dist/dispatch/lib/budget.js.map +1 -0
- package/dist/dispatch/lib/capability-matrix.d.ts +11 -0
- package/dist/dispatch/lib/capability-matrix.d.ts.map +1 -0
- package/dist/dispatch/lib/capability-matrix.js +10 -0
- package/dist/dispatch/lib/capability-matrix.js.map +1 -0
- package/dist/dispatch/lib/config-loader.d.ts +42 -0
- package/dist/dispatch/lib/config-loader.d.ts.map +1 -0
- package/dist/dispatch/lib/config-loader.js +217 -0
- package/dist/dispatch/lib/config-loader.js.map +1 -0
- package/dist/dispatch/lib/config.d.ts +11 -0
- package/dist/dispatch/lib/config.d.ts.map +1 -0
- package/dist/dispatch/lib/config.js +10 -0
- package/dist/dispatch/lib/config.js.map +1 -0
- package/dist/dispatch/lib/defaults.d.ts +115 -0
- package/dist/dispatch/lib/defaults.d.ts.map +1 -0
- package/dist/dispatch/lib/defaults.js +61 -0
- package/dist/dispatch/lib/defaults.js.map +1 -0
- package/dist/dispatch/lib/engine.d.ts +26 -0
- package/dist/dispatch/lib/engine.d.ts.map +1 -0
- package/dist/dispatch/lib/engine.js +46 -0
- package/dist/dispatch/lib/engine.js.map +1 -0
- package/dist/dispatch/lib/exit-codes.d.ts +35 -0
- package/dist/dispatch/lib/exit-codes.d.ts.map +1 -0
- package/dist/dispatch/lib/exit-codes.js +60 -0
- package/dist/dispatch/lib/exit-codes.js.map +1 -0
- package/dist/dispatch/lib/gateway-meta.d.ts +37 -0
- package/dist/dispatch/lib/gateway-meta.d.ts.map +1 -0
- package/dist/dispatch/lib/gateway-meta.js +50 -0
- package/dist/dispatch/lib/gateway-meta.js.map +1 -0
- package/dist/dispatch/lib/job-manager-accessor.d.ts +9 -0
- package/dist/dispatch/lib/job-manager-accessor.d.ts.map +1 -0
- package/dist/dispatch/lib/job-manager-accessor.js +13 -0
- package/dist/dispatch/lib/job-manager-accessor.js.map +1 -0
- package/dist/dispatch/lib/meta.d.ts +26 -0
- package/dist/dispatch/lib/meta.d.ts.map +1 -0
- package/dist/dispatch/lib/meta.js +37 -0
- package/dist/dispatch/lib/meta.js.map +1 -0
- package/dist/dispatch/lib/param-utils.d.ts +11 -0
- package/dist/dispatch/lib/param-utils.d.ts.map +1 -0
- package/dist/dispatch/lib/param-utils.js +10 -0
- package/dist/dispatch/lib/param-utils.js.map +1 -0
- package/dist/dispatch/lib/projections.d.ts +56 -0
- package/dist/dispatch/lib/projections.d.ts.map +1 -0
- package/dist/dispatch/lib/projections.js +65 -0
- package/dist/dispatch/lib/projections.js.map +1 -0
- package/dist/dispatch/lib/proto-envelope.d.ts +56 -0
- package/dist/dispatch/lib/proto-envelope.d.ts.map +1 -0
- package/dist/dispatch/lib/proto-envelope.js +17 -0
- package/dist/dispatch/lib/proto-envelope.js.map +1 -0
- package/dist/dispatch/lib/schema-utils.d.ts +39 -0
- package/dist/dispatch/lib/schema-utils.d.ts.map +1 -0
- package/dist/dispatch/lib/schema-utils.js +88 -0
- package/dist/dispatch/lib/schema-utils.js.map +1 -0
- package/dist/dispatch/lib/security.d.ts +11 -0
- package/dist/dispatch/lib/security.d.ts.map +1 -0
- package/dist/dispatch/lib/security.js +10 -0
- package/dist/dispatch/lib/security.js.map +1 -0
- package/dist/dispatch/middleware/audit.d.ts +23 -0
- package/dist/dispatch/middleware/audit.d.ts.map +1 -0
- package/dist/dispatch/middleware/audit.js +169 -0
- package/dist/dispatch/middleware/audit.js.map +1 -0
- package/dist/dispatch/middleware/field-filter.d.ts +25 -0
- package/dist/dispatch/middleware/field-filter.d.ts.map +1 -0
- package/dist/dispatch/middleware/field-filter.js +70 -0
- package/dist/dispatch/middleware/field-filter.js.map +1 -0
- package/dist/dispatch/middleware/pipeline.d.ts +33 -0
- package/dist/dispatch/middleware/pipeline.d.ts.map +1 -0
- package/dist/dispatch/middleware/pipeline.js +60 -0
- package/dist/dispatch/middleware/pipeline.js.map +1 -0
- package/dist/dispatch/middleware/projection.d.ts +35 -0
- package/dist/dispatch/middleware/projection.d.ts.map +1 -0
- package/dist/dispatch/middleware/projection.js +146 -0
- package/dist/dispatch/middleware/projection.js.map +1 -0
- package/dist/dispatch/middleware/protocol-enforcement.d.ts +30 -0
- package/dist/dispatch/middleware/protocol-enforcement.d.ts.map +1 -0
- package/dist/dispatch/middleware/protocol-enforcement.js +56 -0
- package/dist/dispatch/middleware/protocol-enforcement.js.map +1 -0
- package/dist/dispatch/middleware/rate-limiter.d.ts +72 -0
- package/dist/dispatch/middleware/rate-limiter.d.ts.map +1 -0
- package/dist/dispatch/middleware/rate-limiter.js +127 -0
- package/dist/dispatch/middleware/rate-limiter.js.map +1 -0
- package/dist/dispatch/middleware/sanitizer.d.ts +24 -0
- package/dist/dispatch/middleware/sanitizer.d.ts.map +1 -0
- package/dist/dispatch/middleware/sanitizer.js +56 -0
- package/dist/dispatch/middleware/sanitizer.js.map +1 -0
- package/dist/dispatch/middleware/session-resolver.d.ts +26 -0
- package/dist/dispatch/middleware/session-resolver.d.ts.map +1 -0
- package/dist/dispatch/middleware/session-resolver.js +65 -0
- package/dist/dispatch/middleware/session-resolver.js.map +1 -0
- package/dist/dispatch/middleware/verification-gates.d.ts +22 -0
- package/dist/dispatch/middleware/verification-gates.d.ts.map +1 -0
- package/dist/dispatch/middleware/verification-gates.js +59 -0
- package/dist/dispatch/middleware/verification-gates.js.map +1 -0
- package/dist/dispatch/registry.d.ts +91 -0
- package/dist/dispatch/registry.d.ts.map +1 -0
- package/dist/dispatch/registry.js +3133 -0
- package/dist/dispatch/registry.js.map +1 -0
- package/dist/dispatch/types.d.ts +206 -0
- package/dist/dispatch/types.d.ts.map +1 -0
- package/dist/dispatch/types.js +26 -0
- package/dist/dispatch/types.js.map +1 -0
- package/package.json +7 -7
- package/templates/cleoos-hub/pi-extensions/cleo-cant-bridge.ts +180 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command group: cleo brain
|
|
3
|
+
*
|
|
4
|
+
* Subcommands:
|
|
5
|
+
* cleo brain maintenance — run temporal decay + consolidation + embedding backfill
|
|
6
|
+
*
|
|
7
|
+
* @task T143
|
|
8
|
+
* @epic T134
|
|
9
|
+
* @why Provide a single CLI entry point for brain optimization operations
|
|
10
|
+
* @what Parent command group with maintenance subcommand and progress reporting
|
|
11
|
+
*/
|
|
12
|
+
import type { ShimCommand as Command } from '../commander-shim.js';
|
|
13
|
+
/**
|
|
14
|
+
* Register the `cleo brain` command group.
|
|
15
|
+
*
|
|
16
|
+
* Registers a `brain` parent command and a `maintenance` subcommand that
|
|
17
|
+
* combines temporal decay, memory consolidation, and embedding backfill
|
|
18
|
+
* into one idempotent pass.
|
|
19
|
+
*
|
|
20
|
+
* @param program - The root CLI command to attach to
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* registerBrainCommand(rootCommand);
|
|
25
|
+
* // Adds: cleo brain maintenance [--skip-decay] [--skip-consolidation] [--skip-embeddings] [--json]
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function registerBrainCommand(program: Command): void;
|
|
29
|
+
//# sourceMappingURL=brain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/brain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmG3D"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command group: cleo brain
|
|
3
|
+
*
|
|
4
|
+
* Subcommands:
|
|
5
|
+
* cleo brain maintenance — run temporal decay + consolidation + embedding backfill
|
|
6
|
+
*
|
|
7
|
+
* @task T143
|
|
8
|
+
* @epic T134
|
|
9
|
+
* @why Provide a single CLI entry point for brain optimization operations
|
|
10
|
+
* @what Parent command group with maintenance subcommand and progress reporting
|
|
11
|
+
*/
|
|
12
|
+
import { getProjectRoot, runBrainMaintenance } from '@cleocode/core/internal';
|
|
13
|
+
/**
|
|
14
|
+
* Register the `cleo brain` command group.
|
|
15
|
+
*
|
|
16
|
+
* Registers a `brain` parent command and a `maintenance` subcommand that
|
|
17
|
+
* combines temporal decay, memory consolidation, and embedding backfill
|
|
18
|
+
* into one idempotent pass.
|
|
19
|
+
*
|
|
20
|
+
* @param program - The root CLI command to attach to
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* registerBrainCommand(rootCommand);
|
|
25
|
+
* // Adds: cleo brain maintenance [--skip-decay] [--skip-consolidation] [--skip-embeddings] [--json]
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function registerBrainCommand(program) {
|
|
29
|
+
const brain = program.command('brain').description('Brain memory optimization operations');
|
|
30
|
+
brain
|
|
31
|
+
.command('maintenance')
|
|
32
|
+
.description('Run brain maintenance: temporal decay, consolidation, and embedding backfill')
|
|
33
|
+
.option('--skip-decay', 'Skip the temporal decay step (confidence reduction on stale learnings)')
|
|
34
|
+
.option('--skip-consolidation', 'Skip the memory consolidation step (merging old observations)')
|
|
35
|
+
.option('--skip-reconciliation', 'Skip the cross-DB orphaned reference reconciliation step')
|
|
36
|
+
.option('--skip-embeddings', 'Skip the embedding backfill step (vector generation for observations)')
|
|
37
|
+
.option('--json', 'Output results as JSON')
|
|
38
|
+
.action(async (opts) => {
|
|
39
|
+
const root = getProjectRoot();
|
|
40
|
+
const isJson = !!opts.json;
|
|
41
|
+
if (!isJson) {
|
|
42
|
+
console.log('Running brain maintenance...');
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const result = await runBrainMaintenance(root, {
|
|
46
|
+
skipDecay: !!opts.skipDecay,
|
|
47
|
+
skipConsolidation: !!opts.skipConsolidation,
|
|
48
|
+
skipReconciliation: !!opts.skipReconciliation,
|
|
49
|
+
skipEmbeddings: !!opts.skipEmbeddings,
|
|
50
|
+
onProgress: isJson
|
|
51
|
+
? undefined
|
|
52
|
+
: (step, current, total) => {
|
|
53
|
+
if (step === 'embeddings' && total > 0) {
|
|
54
|
+
// Inline progress for embeddings (the only long-running step)
|
|
55
|
+
if (process.stdout.isTTY) {
|
|
56
|
+
process.stdout.clearLine(0);
|
|
57
|
+
process.stdout.cursorTo(0);
|
|
58
|
+
process.stdout.write(` [embeddings] ${current}/${total}...`);
|
|
59
|
+
}
|
|
60
|
+
else if (current === 1 || current === total) {
|
|
61
|
+
console.log(` [embeddings] ${current}/${total}...`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else if (current === 0) {
|
|
65
|
+
console.log(` [${step}] starting...`);
|
|
66
|
+
}
|
|
67
|
+
else if (current === total && total > 0) {
|
|
68
|
+
if (step === 'embeddings' && process.stdout.isTTY) {
|
|
69
|
+
process.stdout.write('\n');
|
|
70
|
+
}
|
|
71
|
+
console.log(` [${step}] done`);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
if (isJson) {
|
|
76
|
+
console.log(JSON.stringify(result, null, 2));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// Human-readable summary
|
|
80
|
+
console.log('\nMaintenance complete.');
|
|
81
|
+
console.log(` Duration: ${result.duration}ms`);
|
|
82
|
+
if (!opts.skipDecay) {
|
|
83
|
+
console.log(` Decay: ${result.decay.affected} learning(s) updated`);
|
|
84
|
+
}
|
|
85
|
+
if (!opts.skipConsolidation) {
|
|
86
|
+
console.log(` Consolidation: ${result.consolidation.merged} merged, ${result.consolidation.removed} archived`);
|
|
87
|
+
}
|
|
88
|
+
if (!opts.skipReconciliation) {
|
|
89
|
+
console.log(` Reconcile: ${result.reconciliation.decisionsFixed} decisions, ${result.reconciliation.observationsFixed} observations, ${result.reconciliation.linksRemoved} links`);
|
|
90
|
+
}
|
|
91
|
+
if (!opts.skipEmbeddings) {
|
|
92
|
+
console.log(` Embeddings: ${result.embeddings.processed} processed, ${result.embeddings.skipped} skipped, ${result.embeddings.errors} errors`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
97
|
+
if (isJson) {
|
|
98
|
+
console.log(JSON.stringify({ error: message }));
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
console.error(`Brain maintenance failed: ${message}`);
|
|
102
|
+
}
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=brain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain.js","sourceRoot":"","sources":["../../../src/cli/commands/brain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9E;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,sCAAsC,CAAC,CAAC;IAE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BAAoB,MAAM,CAAC,aAAa,CAAC,MAAM,YAAY,MAAM,CAAC,aAAa,CAAC,OAAO,WAAW,CACnG,CAAC;YACJ,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC7B,OAAO,CAAC,GAAG,CACT,oBAAoB,MAAM,CAAC,cAAc,CAAC,cAAc,eAAe,MAAM,CAAC,cAAc,CAAC,iBAAiB,kBAAkB,MAAM,CAAC,cAAc,CAAC,YAAY,QAAQ,CAC3K,CAAC;YACJ,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;gBACzB,OAAO,CAAC,GAAG,CACT,oBAAoB,MAAM,CAAC,UAAU,CAAC,SAAS,eAAe,MAAM,CAAC,UAAU,CAAC,OAAO,aAAa,MAAM,CAAC,UAAU,CAAC,MAAM,SAAS,CACtI,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YAClD,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,6BAA6B,OAAO,EAAE,CAAC,CAAC;YACxD,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CACF,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI briefing command - show composite session-start context.
|
|
3
|
+
*
|
|
4
|
+
* Aggregates session-start context from multiple sources:
|
|
5
|
+
* - Last session handoff
|
|
6
|
+
* - Current focus
|
|
7
|
+
* - Top-N next tasks
|
|
8
|
+
* - Open bugs
|
|
9
|
+
* - Blocked tasks
|
|
10
|
+
* - Active epics
|
|
11
|
+
* - Pipeline stage
|
|
12
|
+
*
|
|
13
|
+
* @task T4916
|
|
14
|
+
* @epic T4914
|
|
15
|
+
*/
|
|
16
|
+
import type { ShimCommand as Command } from '../commander-shim.js';
|
|
17
|
+
/**
|
|
18
|
+
* Register the briefing command.
|
|
19
|
+
* @task T4916
|
|
20
|
+
*/
|
|
21
|
+
export declare function registerBriefingCommand(program: Command): void;
|
|
22
|
+
//# sourceMappingURL=briefing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"briefing.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/briefing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgC9D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI briefing command - show composite session-start context.
|
|
3
|
+
*
|
|
4
|
+
* Aggregates session-start context from multiple sources:
|
|
5
|
+
* - Last session handoff
|
|
6
|
+
* - Current focus
|
|
7
|
+
* - Top-N next tasks
|
|
8
|
+
* - Open bugs
|
|
9
|
+
* - Blocked tasks
|
|
10
|
+
* - Active epics
|
|
11
|
+
* - Pipeline stage
|
|
12
|
+
*
|
|
13
|
+
* @task T4916
|
|
14
|
+
* @epic T4914
|
|
15
|
+
*/
|
|
16
|
+
import { dispatchFromCli } from '../../dispatch/adapters/cli.js';
|
|
17
|
+
/**
|
|
18
|
+
* Register the briefing command.
|
|
19
|
+
* @task T4916
|
|
20
|
+
*/
|
|
21
|
+
export function registerBriefingCommand(program) {
|
|
22
|
+
program
|
|
23
|
+
.command('briefing')
|
|
24
|
+
.description('Show composite session-start context (handoff, focus, next tasks, bugs, blockers, epics)')
|
|
25
|
+
.option('-s, --scope <scope>', 'Scope filter (global or epic:T###)')
|
|
26
|
+
.option('--max-next <n>', 'Maximum next tasks to show', '5')
|
|
27
|
+
.option('--max-bugs <n>', 'Maximum bugs to show', '10')
|
|
28
|
+
.option('--max-blocked <n>', 'Maximum blocked tasks to show', '10')
|
|
29
|
+
.option('--max-epics <n>', 'Maximum active epics to show', '5')
|
|
30
|
+
.action(async (opts) => {
|
|
31
|
+
const scope = opts['scope'];
|
|
32
|
+
const maxNextTasks = parseInt(opts['maxNext'], 10);
|
|
33
|
+
const maxBugs = parseInt(opts['maxBugs'], 10);
|
|
34
|
+
const maxBlocked = parseInt(opts['maxBlocked'], 10);
|
|
35
|
+
const maxEpics = parseInt(opts['maxEpics'], 10);
|
|
36
|
+
await dispatchFromCli('query', 'session', 'briefing.show', {
|
|
37
|
+
scope,
|
|
38
|
+
maxNextTasks,
|
|
39
|
+
maxBugs,
|
|
40
|
+
maxBlocked,
|
|
41
|
+
maxEpics,
|
|
42
|
+
}, { command: 'briefing' });
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=briefing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"briefing.js","sourceRoot":"","sources":["../../../src/cli/commands/briefing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGjE;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,OAAO;SACJ,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CACV,0FAA0F,CAC3F;SACA,MAAM,CAAC,qBAAqB,EAAE,oCAAoC,CAAC;SACnE,MAAM,CAAC,gBAAgB,EAAE,4BAA4B,EAAE,GAAG,CAAC;SAC3D,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,IAAI,CAAC;SACtD,MAAM,CAAC,mBAAmB,EAAE,+BAA+B,EAAE,IAAI,CAAC;SAClE,MAAM,CAAC,iBAAiB,EAAE,8BAA8B,EAAE,GAAG,CAAC;SAC9D,MAAM,CAAC,KAAK,EAAE,IAA6B,EAAE,EAAE;QAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAuB,CAAC;QAClD,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAW,EAAE,EAAE,CAAC,CAAC;QAC7D,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAW,EAAE,EAAE,CAAC,CAAC;QACxD,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAW,EAAE,EAAE,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAW,EAAE,EAAE,CAAC,CAAC;QAE1D,MAAM,eAAe,CACnB,OAAO,EACP,SAAS,EACT,eAAe,EACf;YACE,KAAK;YACL,YAAY;YACZ,OAAO;YACP,UAAU;YACV,QAAQ;SACT,EACD,EAAE,OAAO,EAAE,UAAU,EAAE,CACxB,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI bug command - shorthand for creating bug report tasks.
|
|
3
|
+
* @task T4913
|
|
4
|
+
* @epic T4454
|
|
5
|
+
*/
|
|
6
|
+
import type { ShimCommand as Command } from '../commander-shim.js';
|
|
7
|
+
/**
|
|
8
|
+
* Register the bug command.
|
|
9
|
+
* @task T4913
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerBugCommand(program: Command): void;
|
|
12
|
+
//# sourceMappingURL=bug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/bug.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAmBnE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8DzD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI bug command - shorthand for creating bug report tasks.
|
|
3
|
+
* @task T4913
|
|
4
|
+
* @epic T4454
|
|
5
|
+
*/
|
|
6
|
+
import { dispatchRaw, handleRawError } from '../../dispatch/adapters/cli.js';
|
|
7
|
+
import { cliOutput } from '../renderers/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Severity mapping configuration.
|
|
10
|
+
* Maps severity levels to priority and labels.
|
|
11
|
+
*/
|
|
12
|
+
const SEVERITY_MAP = {
|
|
13
|
+
P0: { priority: 'critical', labels: ['bug', 'p0'] },
|
|
14
|
+
P1: { priority: 'high', labels: ['bug', 'p1'] },
|
|
15
|
+
P2: { priority: 'medium', labels: ['bug', 'p2'] },
|
|
16
|
+
P3: { priority: 'low', labels: ['bug', 'p3'] },
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Valid severity levels for error messages.
|
|
20
|
+
*/
|
|
21
|
+
const VALID_SEVERITIES = Object.keys(SEVERITY_MAP);
|
|
22
|
+
/**
|
|
23
|
+
* Register the bug command.
|
|
24
|
+
* @task T4913
|
|
25
|
+
*/
|
|
26
|
+
export function registerBugCommand(program) {
|
|
27
|
+
program
|
|
28
|
+
.command('bug <title>')
|
|
29
|
+
.description('Create a bug report task with severity mapping')
|
|
30
|
+
.option('-s, --severity <level>', 'Severity level (P0, P1, P2, P3) - required', 'P2')
|
|
31
|
+
.option('-e, --epic <id>', 'Epic ID to link as parent (optional)')
|
|
32
|
+
.option('-d, --description <desc>', 'Bug description')
|
|
33
|
+
.option('--dry-run', 'Show what would be created without making changes')
|
|
34
|
+
.action(async (title, opts) => {
|
|
35
|
+
const severity = opts['severity'] || 'P2';
|
|
36
|
+
// Validate severity level
|
|
37
|
+
if (!VALID_SEVERITIES.includes(severity)) {
|
|
38
|
+
console.error(`Error: Invalid severity "${severity}". Must be one of: ${VALID_SEVERITIES.join(', ')}`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
const mapping = SEVERITY_MAP[severity];
|
|
42
|
+
const params = {
|
|
43
|
+
title,
|
|
44
|
+
type: 'task',
|
|
45
|
+
priority: mapping.priority,
|
|
46
|
+
labels: mapping.labels,
|
|
47
|
+
origin: 'bug-report',
|
|
48
|
+
description: opts['description'] || title,
|
|
49
|
+
};
|
|
50
|
+
// Link to epic if provided
|
|
51
|
+
if (opts['epic'] !== undefined) {
|
|
52
|
+
params['parent'] = opts['epic'];
|
|
53
|
+
}
|
|
54
|
+
if (opts['dryRun'] !== undefined) {
|
|
55
|
+
params['dryRun'] = opts['dryRun'];
|
|
56
|
+
}
|
|
57
|
+
const response = await dispatchRaw('mutate', 'tasks', 'add', params);
|
|
58
|
+
if (!response.success) {
|
|
59
|
+
handleRawError(response, { command: 'bug', operation: 'tasks.add' });
|
|
60
|
+
}
|
|
61
|
+
const data = response.data;
|
|
62
|
+
if (data?.duplicate) {
|
|
63
|
+
cliOutput(data, {
|
|
64
|
+
command: 'add',
|
|
65
|
+
message: 'Task with identical title was created recently',
|
|
66
|
+
operation: 'tasks.add',
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else if (data?.dryRun) {
|
|
70
|
+
cliOutput(data, {
|
|
71
|
+
command: 'add',
|
|
72
|
+
message: 'Dry run - no changes made',
|
|
73
|
+
operation: 'tasks.add',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
cliOutput(data, { command: 'add', operation: 'tasks.add' });
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=bug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug.js","sourceRoot":"","sources":["../../../src/cli/commands/bug.ts"],"names":[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AAM,EAAE,CAAC;YACxB,SAAS,CAAC,IAAI,EAAE;gBACd,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,2BAA2B;gBACpC,SAAS,EAAE,WAAW;aACvB,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command group: cleo cant
|
|
3
|
+
*
|
|
4
|
+
* Subcommands:
|
|
5
|
+
* cleo cant migrate <file> -- Convert markdown to .cant files
|
|
6
|
+
* cleo cant parse <file> -- Parse a .cant file and emit AST
|
|
7
|
+
* cleo cant validate <file> -- 42-rule validation report
|
|
8
|
+
* cleo cant list <file> [--kind ...] -- List agents / pipelines / workflows
|
|
9
|
+
* cleo cant execute <file> --pipeline <name> -- Run a deterministic pipeline
|
|
10
|
+
*
|
|
11
|
+
* Phase 4 originally shelled out to a `cant-cli` Rust binary. T282 replaced
|
|
12
|
+
* the binary with the async `cant-napi` napi-rs binding, so all subcommands
|
|
13
|
+
* now call the `@cleocode/cant` TypeScript API directly (zero subprocess
|
|
14
|
+
* overhead, single binary distribution).
|
|
15
|
+
*/
|
|
16
|
+
import type { ShimCommand as Command } from '../commander-shim.js';
|
|
17
|
+
/**
|
|
18
|
+
* Register the `cleo cant` command group.
|
|
19
|
+
*
|
|
20
|
+
* Registers a `cant` parent command and subcommands for parsing,
|
|
21
|
+
* validating, listing, executing, and migrating CANT DSL files.
|
|
22
|
+
*
|
|
23
|
+
* @param program - The root CLI command to attach to
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* registerCantCommand(rootCommand);
|
|
28
|
+
* // Adds: cleo cant parse|validate|list|execute|migrate
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function registerCantCommand(program: Command): void;
|
|
32
|
+
//# sourceMappingURL=cant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cant.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/cant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AA8CnE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmL1D"}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command group: cleo cant
|
|
3
|
+
*
|
|
4
|
+
* Subcommands:
|
|
5
|
+
* cleo cant migrate <file> -- Convert markdown to .cant files
|
|
6
|
+
* cleo cant parse <file> -- Parse a .cant file and emit AST
|
|
7
|
+
* cleo cant validate <file> -- 42-rule validation report
|
|
8
|
+
* cleo cant list <file> [--kind ...] -- List agents / pipelines / workflows
|
|
9
|
+
* cleo cant execute <file> --pipeline <name> -- Run a deterministic pipeline
|
|
10
|
+
*
|
|
11
|
+
* Phase 4 originally shelled out to a `cant-cli` Rust binary. T282 replaced
|
|
12
|
+
* the binary with the async `cant-napi` napi-rs binding, so all subcommands
|
|
13
|
+
* now call the `@cleocode/cant` TypeScript API directly (zero subprocess
|
|
14
|
+
* overhead, single binary distribution).
|
|
15
|
+
*/
|
|
16
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
17
|
+
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
18
|
+
import { cliError, cliOutput } from '../renderers/index.js';
|
|
19
|
+
/**
|
|
20
|
+
* Register the `cleo cant` command group.
|
|
21
|
+
*
|
|
22
|
+
* Registers a `cant` parent command and subcommands for parsing,
|
|
23
|
+
* validating, listing, executing, and migrating CANT DSL files.
|
|
24
|
+
*
|
|
25
|
+
* @param program - The root CLI command to attach to
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* registerCantCommand(rootCommand);
|
|
30
|
+
* // Adds: cleo cant parse|validate|list|execute|migrate
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export function registerCantCommand(program) {
|
|
34
|
+
const cant = program.command('cant').description('CANT DSL tooling');
|
|
35
|
+
cant
|
|
36
|
+
.command('parse <file>')
|
|
37
|
+
.description('Parse a .cant file and emit the AST')
|
|
38
|
+
.action(async (file) => {
|
|
39
|
+
const filePath = resolveFilePath(file);
|
|
40
|
+
if (!ensureExists(filePath, 'cant.parse'))
|
|
41
|
+
return;
|
|
42
|
+
try {
|
|
43
|
+
const mod = await loadCantDocument();
|
|
44
|
+
const result = await mod.parseDocument(filePath);
|
|
45
|
+
cliOutput(result, { command: 'cant', operation: 'cant.parse' });
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
emitFailure('cant.parse', 'E_PARSE_FAILED', err);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
cant
|
|
52
|
+
.command('validate <file>')
|
|
53
|
+
.description('Run the 42-rule validation suite on a .cant file')
|
|
54
|
+
.action(async (file) => {
|
|
55
|
+
const filePath = resolveFilePath(file);
|
|
56
|
+
if (!ensureExists(filePath, 'cant.validate'))
|
|
57
|
+
return;
|
|
58
|
+
try {
|
|
59
|
+
const mod = await loadCantDocument();
|
|
60
|
+
const result = await mod.validateDocument(filePath);
|
|
61
|
+
cliOutput(result, { command: 'cant', operation: 'cant.validate' });
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
emitFailure('cant.validate', 'E_VALIDATE_FAILED', err);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
cant
|
|
68
|
+
.command('list <file>')
|
|
69
|
+
.description('List agents, workflows, or pipelines in a .cant file')
|
|
70
|
+
.option('--kind <kind>', 'One of: agent | workflow | pipeline (default: agent)', 'agent')
|
|
71
|
+
.action(async (file, opts) => {
|
|
72
|
+
const filePath = resolveFilePath(file);
|
|
73
|
+
if (!ensureExists(filePath, 'cant.list'))
|
|
74
|
+
return;
|
|
75
|
+
const kind = (opts['kind'] ?? 'agent').toLowerCase();
|
|
76
|
+
if (kind !== 'agent' && kind !== 'pipeline' && kind !== 'workflow') {
|
|
77
|
+
cliError(`Invalid --kind '${kind}'. Use one of: agent, pipeline, workflow.`, 'E_BAD_KIND');
|
|
78
|
+
process.exitCode = 2;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
const mod = await loadCantDocument();
|
|
83
|
+
const result = await mod.listSections(filePath, kind);
|
|
84
|
+
cliOutput(result, { command: 'cant', operation: `cant.list-${kind}s` });
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
emitFailure(`cant.list-${kind}s`, 'E_LIST_FAILED', err);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
cant
|
|
91
|
+
.command('execute <file>')
|
|
92
|
+
.description('Execute a deterministic pipeline from a .cant file. LLM-dependent workflow constructs run via the cant-bridge.')
|
|
93
|
+
.requiredOption('--pipeline <name>', 'Pipeline name to execute')
|
|
94
|
+
.action(async (file, opts) => {
|
|
95
|
+
const filePath = resolveFilePath(file);
|
|
96
|
+
if (!ensureExists(filePath, 'cant.execute'))
|
|
97
|
+
return;
|
|
98
|
+
const pipelineName = opts['pipeline'];
|
|
99
|
+
try {
|
|
100
|
+
const mod = await loadCantDocument();
|
|
101
|
+
const result = (await mod.executePipeline(filePath, pipelineName));
|
|
102
|
+
cliOutput(result, { command: 'cant', operation: 'cant.execute' });
|
|
103
|
+
if (!result.success) {
|
|
104
|
+
process.exitCode = 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
emitFailure('cant.execute', 'E_PIPELINE_RUNTIME', err);
|
|
109
|
+
process.exitCode = 1;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
cant
|
|
113
|
+
.command('migrate <file>')
|
|
114
|
+
.description('Convert markdown instruction files to .cant format')
|
|
115
|
+
.option('--write', 'Write .cant files to disk (default: dry-run preview)')
|
|
116
|
+
.option('--dry-run', 'Preview conversion without writing files (default behavior)')
|
|
117
|
+
.option('--output-dir <dir>', 'Output directory for .cant files (default: .cleo/agents/)')
|
|
118
|
+
.option('--verbose', 'Show detailed conversion log')
|
|
119
|
+
.option('--json', 'Output results as JSON')
|
|
120
|
+
.action(async (file, opts) => {
|
|
121
|
+
const isJson = !!opts.json;
|
|
122
|
+
const isWrite = !!opts.write && !opts.dryRun;
|
|
123
|
+
const isVerbose = !!opts.verbose;
|
|
124
|
+
// Resolve file path
|
|
125
|
+
const filePath = isAbsolute(file) ? file : resolve(process.cwd(), file);
|
|
126
|
+
if (!existsSync(filePath)) {
|
|
127
|
+
const errMsg = `File not found: ${filePath}`;
|
|
128
|
+
if (isJson) {
|
|
129
|
+
console.log(JSON.stringify({ error: errMsg }));
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
console.error(errMsg);
|
|
133
|
+
}
|
|
134
|
+
process.exit(1);
|
|
135
|
+
}
|
|
136
|
+
try {
|
|
137
|
+
// Dynamic import to avoid pulling cant into the main bundle
|
|
138
|
+
// when the command is not used.
|
|
139
|
+
const mod = await loadMigrateEngine();
|
|
140
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
141
|
+
const result = mod.migrateMarkdown(content, filePath, {
|
|
142
|
+
write: isWrite,
|
|
143
|
+
verbose: isVerbose,
|
|
144
|
+
outputDir: opts.outputDir,
|
|
145
|
+
});
|
|
146
|
+
if (isJson) {
|
|
147
|
+
console.log(JSON.stringify(result, null, 2));
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (isWrite) {
|
|
151
|
+
// Write .cant files to disk
|
|
152
|
+
const projectRoot = process.cwd();
|
|
153
|
+
let written = 0;
|
|
154
|
+
for (const outputFile of result.outputFiles) {
|
|
155
|
+
const outputPath = isAbsolute(outputFile.path)
|
|
156
|
+
? outputFile.path
|
|
157
|
+
: join(projectRoot, outputFile.path);
|
|
158
|
+
mkdirSync(dirname(outputPath), { recursive: true });
|
|
159
|
+
writeFileSync(outputPath, outputFile.content, 'utf-8');
|
|
160
|
+
written++;
|
|
161
|
+
if (isVerbose) {
|
|
162
|
+
console.log(` Created: ${outputFile.path} (${outputFile.kind})`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
console.log(`Wrote ${written} .cant file(s).`);
|
|
166
|
+
console.log(result.summary);
|
|
167
|
+
if (result.unconverted.length > 0) {
|
|
168
|
+
console.log('');
|
|
169
|
+
console.log(`${result.unconverted.length} section(s) need manual conversion.`);
|
|
170
|
+
for (const section of result.unconverted) {
|
|
171
|
+
console.log(` Lines ${section.lineStart}-${section.lineEnd}: ${section.reason}`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
// Dry-run: show diff preview
|
|
177
|
+
const diffOutput = mod.showDiff(result, process.stdout.isTTY ?? false);
|
|
178
|
+
console.log(diffOutput);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
183
|
+
if (isJson) {
|
|
184
|
+
console.log(JSON.stringify({ error: message }));
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
console.error(`Migration failed: ${message}`);
|
|
188
|
+
}
|
|
189
|
+
process.exit(1);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Resolve a file argument to an absolute path against the current working
|
|
195
|
+
* directory. Used by every cant subcommand for consistent input handling.
|
|
196
|
+
*/
|
|
197
|
+
function resolveFilePath(file) {
|
|
198
|
+
return isAbsolute(file) ? file : resolve(process.cwd(), file);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Verify that a file exists, emitting a LAFS-shaped error envelope and
|
|
202
|
+
* setting `process.exitCode` to 3 when it doesn't.
|
|
203
|
+
*
|
|
204
|
+
* @returns `true` when the file exists and execution can proceed.
|
|
205
|
+
*/
|
|
206
|
+
function ensureExists(filePath, operation) {
|
|
207
|
+
if (existsSync(filePath))
|
|
208
|
+
return true;
|
|
209
|
+
cliError(`File not found: ${filePath}`, 'E_FILE_READ');
|
|
210
|
+
process.exitCode = 3;
|
|
211
|
+
// Surface operation context in stderr for human readers when debugging.
|
|
212
|
+
if (process.env['CLEO_DEBUG']) {
|
|
213
|
+
console.error(`(operation: ${operation})`);
|
|
214
|
+
}
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Emit a failure envelope for an unexpected exception thrown by the cant
|
|
219
|
+
* document API. The error code is caller-provided so each subcommand can
|
|
220
|
+
* report a meaningful classification.
|
|
221
|
+
*/
|
|
222
|
+
function emitFailure(operation, code, err) {
|
|
223
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
224
|
+
cliError(`${operation} failed: ${message}`, code);
|
|
225
|
+
process.exitCode = process.exitCode ?? 1;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Dynamically load the high-level CANT document API.
|
|
229
|
+
*
|
|
230
|
+
* Tries multiple import paths to support both installed packages and
|
|
231
|
+
* development workspace layouts. Uses dynamic import to keep the cant
|
|
232
|
+
* (and napi binding) lazy-loaded.
|
|
233
|
+
*
|
|
234
|
+
* @returns The loaded document module
|
|
235
|
+
* @throws Error if the module cannot be found
|
|
236
|
+
*/
|
|
237
|
+
async function loadCantDocument() {
|
|
238
|
+
const paths = ['@cleocode/cant', '../../../../cant/dist/index', '../../../../cant/src/index'];
|
|
239
|
+
for (const p of paths) {
|
|
240
|
+
try {
|
|
241
|
+
const mod = (await import(p));
|
|
242
|
+
if (typeof mod['parseDocument'] === 'function' &&
|
|
243
|
+
typeof mod['validateDocument'] === 'function' &&
|
|
244
|
+
typeof mod['listSections'] === 'function' &&
|
|
245
|
+
typeof mod['executePipeline'] === 'function') {
|
|
246
|
+
return mod;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
catch {
|
|
250
|
+
// Try next path
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
throw new Error('Cannot load CANT document API. Ensure @cleocode/cant is installed.');
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Dynamically load the CANT migration engine.
|
|
257
|
+
*
|
|
258
|
+
* Tries multiple import paths to support both installed packages
|
|
259
|
+
* and development workspace layouts. Uses dynamic import to keep
|
|
260
|
+
* the cant dependency lazy-loaded.
|
|
261
|
+
*
|
|
262
|
+
* @returns The loaded migration module
|
|
263
|
+
* @throws Error if the module cannot be found
|
|
264
|
+
*/
|
|
265
|
+
async function loadMigrateEngine() {
|
|
266
|
+
// Try loading paths in order of preference
|
|
267
|
+
const paths = ['@cleocode/cant', '../../../../cant/dist/index', '../../../../cant/src/index'];
|
|
268
|
+
for (const p of paths) {
|
|
269
|
+
try {
|
|
270
|
+
const mod = (await import(p));
|
|
271
|
+
if (typeof mod['migrateMarkdown'] === 'function' && typeof mod['showDiff'] === 'function') {
|
|
272
|
+
return mod;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
// Try next path
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
throw new Error('Cannot load CANT migration engine. Ensure @cleocode/cant is installed.');
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=cant.js.map
|