@cleocode/core 2026.3.76 → 2026.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. package/dist/agents/agent-schema.d.ts.map +1 -1
  2. package/dist/audit.d.ts +1 -1
  3. package/dist/audit.d.ts.map +1 -1
  4. package/dist/bootstrap.d.ts +2 -2
  5. package/dist/bootstrap.d.ts.map +1 -1
  6. package/dist/caamp/adapter.d.ts +6 -49
  7. package/dist/caamp/adapter.d.ts.map +1 -1
  8. package/dist/caamp/index.d.ts +2 -2
  9. package/dist/caamp/index.d.ts.map +1 -1
  10. package/dist/code/index.d.ts +10 -0
  11. package/dist/code/index.d.ts.map +1 -0
  12. package/dist/code/outline.d.ts +51 -0
  13. package/dist/code/outline.d.ts.map +1 -0
  14. package/dist/code/parser.d.ts +32 -0
  15. package/dist/code/parser.d.ts.map +1 -0
  16. package/dist/code/search.d.ts +42 -0
  17. package/dist/code/search.d.ts.map +1 -0
  18. package/dist/code/unfold.d.ts +44 -0
  19. package/dist/code/unfold.d.ts.map +1 -0
  20. package/dist/compliance/protocol-enforcement.d.ts +1 -1
  21. package/dist/compliance/protocol-rules.d.ts +1 -1
  22. package/dist/compliance/protocol-types.d.ts +2 -3
  23. package/dist/compliance/protocol-types.d.ts.map +1 -1
  24. package/dist/conduit/conduit-client.d.ts +14 -0
  25. package/dist/conduit/conduit-client.d.ts.map +1 -1
  26. package/dist/conduit/factory.d.ts +11 -1
  27. package/dist/conduit/factory.d.ts.map +1 -1
  28. package/dist/conduit/http-transport.d.ts +17 -5
  29. package/dist/conduit/http-transport.d.ts.map +1 -1
  30. package/dist/conduit/index.d.ts +5 -2
  31. package/dist/conduit/index.d.ts.map +1 -1
  32. package/dist/conduit/local-transport.d.ts +91 -0
  33. package/dist/conduit/local-transport.d.ts.map +1 -0
  34. package/dist/conduit/sse-transport.d.ts +68 -0
  35. package/dist/conduit/sse-transport.d.ts.map +1 -0
  36. package/dist/crypto/credentials.d.ts.map +1 -1
  37. package/dist/error-catalog.d.ts +3 -3
  38. package/dist/error-catalog.d.ts.map +1 -1
  39. package/dist/errors.d.ts +1 -1
  40. package/dist/hooks/handlers/index.d.ts +2 -2
  41. package/dist/hooks/handlers/index.d.ts.map +1 -1
  42. package/dist/hooks/handlers/notification-hooks.d.ts +31 -0
  43. package/dist/hooks/handlers/notification-hooks.d.ts.map +1 -0
  44. package/dist/index.d.ts +1 -1
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +4646 -3476
  47. package/dist/index.js.map +4 -4
  48. package/dist/init.d.ts +6 -6
  49. package/dist/init.d.ts.map +1 -1
  50. package/dist/injection.d.ts.map +1 -1
  51. package/dist/internal.d.ts +7 -5
  52. package/dist/internal.d.ts.map +1 -1
  53. package/dist/lib/index.d.ts +1 -0
  54. package/dist/lib/index.d.ts.map +1 -1
  55. package/dist/lib/tree-sitter-languages.d.ts +29 -0
  56. package/dist/lib/tree-sitter-languages.d.ts.map +1 -0
  57. package/dist/logger.d.ts +3 -3
  58. package/dist/memory/brain-links.d.ts.map +1 -1
  59. package/dist/memory/brain-maintenance.d.ts +13 -0
  60. package/dist/memory/brain-maintenance.d.ts.map +1 -1
  61. package/dist/memory/brain-retrieval.d.ts +1 -1
  62. package/dist/memory/brain-retrieval.d.ts.map +1 -1
  63. package/dist/memory/decisions.d.ts.map +1 -1
  64. package/dist/memory/engine-compat.d.ts +392 -25
  65. package/dist/memory/engine-compat.d.ts.map +1 -1
  66. package/dist/memory/index.d.ts +416 -3
  67. package/dist/memory/index.d.ts.map +1 -1
  68. package/dist/metrics/token-service.d.ts +3 -3
  69. package/dist/metrics/token-service.d.ts.map +1 -1
  70. package/dist/orchestration/hierarchy.d.ts +32 -0
  71. package/dist/orchestration/hierarchy.d.ts.map +1 -0
  72. package/dist/orchestration/index.d.ts +1 -0
  73. package/dist/orchestration/index.d.ts.map +1 -1
  74. package/dist/paths.d.ts +335 -2
  75. package/dist/paths.d.ts.map +1 -1
  76. package/dist/routing/capability-matrix.d.ts +3 -3
  77. package/dist/routing/capability-matrix.d.ts.map +1 -1
  78. package/dist/scaffold.d.ts +422 -11
  79. package/dist/scaffold.d.ts.map +1 -1
  80. package/dist/security/input-sanitization.d.ts +2 -2
  81. package/dist/skills/dynamic-skill-generator.d.ts +3 -2
  82. package/dist/skills/dynamic-skill-generator.d.ts.map +1 -1
  83. package/dist/skills/routing-table.d.ts +4 -4
  84. package/dist/skills/routing-table.d.ts.map +1 -1
  85. package/dist/store/agent-registry-accessor.d.ts +10 -433
  86. package/dist/store/agent-registry-accessor.d.ts.map +1 -1
  87. package/dist/store/cross-db-cleanup.d.ts +34 -0
  88. package/dist/store/cross-db-cleanup.d.ts.map +1 -1
  89. package/dist/store/provider.d.ts +1 -1
  90. package/dist/store/signaldock-sqlite.d.ts.map +1 -1
  91. package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
  92. package/dist/store/sqlite.d.ts +1 -1
  93. package/dist/store/task-store.d.ts.map +1 -1
  94. package/dist/store/tasks-schema.d.ts +4 -228
  95. package/dist/store/tasks-schema.d.ts.map +1 -1
  96. package/dist/store/validation-schemas.d.ts +4 -5
  97. package/dist/store/validation-schemas.d.ts.map +1 -1
  98. package/dist/system/archive-analytics.d.ts +1 -1
  99. package/dist/system/health.d.ts +2 -2
  100. package/dist/system/health.d.ts.map +1 -1
  101. package/dist/system/runtime.d.ts +2 -1
  102. package/dist/system/runtime.d.ts.map +1 -1
  103. package/dist/tasks/list.d.ts +1 -1
  104. package/dist/tasks/list.d.ts.map +1 -1
  105. package/dist/tasks/task-ops.d.ts +415 -3
  106. package/dist/tasks/task-ops.d.ts.map +1 -1
  107. package/dist/templates/parser.d.ts +1 -1
  108. package/dist/ui/index.d.ts +1 -1
  109. package/dist/upgrade.d.ts +1 -1
  110. package/dist/upgrade.d.ts.map +1 -1
  111. package/dist/validation/operation-gate-validators.d.ts +1 -1
  112. package/dist/validation/operation-verification-gates.d.ts +3 -3
  113. package/dist/validation/param-utils.d.ts +6 -5
  114. package/dist/validation/param-utils.d.ts.map +1 -1
  115. package/dist/validation/validate-ops.d.ts +1 -1
  116. package/dist/validation/validate-ops.d.ts.map +1 -1
  117. package/package.json +19 -7
  118. package/src/__tests__/caamp-skill-install.test.js +0 -15
  119. package/src/__tests__/caamp-skill-install.test.js.map +1 -1
  120. package/src/__tests__/caamp-skill-install.test.ts +0 -16
  121. package/src/__tests__/injection-mvi-tiers.test.js +7 -7
  122. package/src/__tests__/injection-mvi-tiers.test.js.map +1 -1
  123. package/src/__tests__/injection-mvi-tiers.test.ts +55 -103
  124. package/src/agents/agent-schema.ts +2 -5
  125. package/src/audit.ts +2 -2
  126. package/src/bootstrap.ts +5 -39
  127. package/src/caamp/adapter.ts +3 -219
  128. package/src/caamp/index.ts +1 -13
  129. package/src/cant/__tests__/cant-agent-parse.test.d.ts.map +1 -0
  130. package/src/cant/__tests__/cant-agent-parse.test.js +77 -0
  131. package/src/cant/__tests__/cant-agent-parse.test.js.map +1 -0
  132. package/src/code/index.ts +10 -0
  133. package/src/code/outline.ts +214 -0
  134. package/src/code/parser.ts +331 -0
  135. package/src/code/search.ts +173 -0
  136. package/src/code/unfold.ts +204 -0
  137. package/src/codebase-map/analyzers/architecture.ts +2 -2
  138. package/src/compliance/protocol-enforcement.ts +1 -1
  139. package/src/compliance/protocol-rules.ts +1 -1
  140. package/src/compliance/protocol-types.ts +2 -3
  141. package/src/conduit/__tests__/dual-api-e2e.test.d.ts.map +1 -0
  142. package/src/conduit/__tests__/dual-api-e2e.test.js +178 -0
  143. package/src/conduit/__tests__/dual-api-e2e.test.js.map +1 -0
  144. package/src/conduit/__tests__/dual-api-e2e.test.ts +212 -0
  145. package/src/conduit/__tests__/local-credential-flow.test.d.ts.map +1 -0
  146. package/src/conduit/__tests__/local-credential-flow.test.js +185 -0
  147. package/src/conduit/__tests__/local-credential-flow.test.js.map +1 -0
  148. package/src/conduit/__tests__/local-credential-flow.test.ts +230 -0
  149. package/src/conduit/__tests__/local-transport.test.d.ts.map +1 -0
  150. package/src/conduit/__tests__/local-transport.test.js +404 -0
  151. package/src/conduit/__tests__/local-transport.test.js.map +1 -0
  152. package/src/conduit/__tests__/local-transport.test.ts +509 -0
  153. package/src/conduit/__tests__/sse-transport.test.d.ts.map +1 -0
  154. package/src/conduit/__tests__/sse-transport.test.js +291 -0
  155. package/src/conduit/__tests__/sse-transport.test.js.map +1 -0
  156. package/src/conduit/__tests__/sse-transport.test.ts +344 -0
  157. package/src/conduit/conduit-client.ts +14 -0
  158. package/src/conduit/factory.ts +29 -8
  159. package/src/conduit/http-transport.ts +78 -16
  160. package/src/conduit/index.ts +5 -2
  161. package/src/conduit/local-transport.ts +309 -0
  162. package/src/conduit/sse-transport.ts +382 -0
  163. package/src/crypto/credentials.ts +59 -13
  164. package/src/error-catalog.ts +3 -3
  165. package/src/errors.ts +1 -1
  166. package/src/hooks/__tests__/provider-hooks.test.js +4 -4
  167. package/src/hooks/__tests__/provider-hooks.test.js.map +1 -1
  168. package/src/hooks/__tests__/provider-hooks.test.ts +4 -4
  169. package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js +2 -2
  170. package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js.map +1 -1
  171. package/src/hooks/handlers/__tests__/hook-automation-e2e.test.ts +6 -4
  172. package/src/hooks/handlers/index.ts +2 -6
  173. package/src/hooks/handlers/notification-hooks.ts +65 -0
  174. package/src/index.ts +2 -1
  175. package/src/init.ts +14 -54
  176. package/src/injection.ts +4 -3
  177. package/src/internal.ts +7 -5
  178. package/src/lib/index.ts +8 -0
  179. package/src/lib/tree-sitter-languages.ts +88 -0
  180. package/src/logger.ts +5 -5
  181. package/src/memory/__tests__/brain-links.test.js +13 -0
  182. package/src/memory/__tests__/brain-links.test.js.map +1 -1
  183. package/src/memory/__tests__/brain-links.test.ts +14 -0
  184. package/src/memory/__tests__/brain-retrieval.test.js +9 -0
  185. package/src/memory/__tests__/brain-retrieval.test.js.map +1 -1
  186. package/src/memory/__tests__/brain-retrieval.test.ts +10 -0
  187. package/src/memory/__tests__/session-memory.test.js +16 -0
  188. package/src/memory/__tests__/session-memory.test.js.map +1 -1
  189. package/src/memory/__tests__/session-memory.test.ts +17 -0
  190. package/src/memory/brain-links.ts +17 -0
  191. package/src/memory/brain-maintenance.ts +33 -1
  192. package/src/memory/brain-retrieval.ts +19 -3
  193. package/src/memory/decisions.ts +18 -2
  194. package/src/memory/engine-compat.ts +392 -25
  195. package/src/memory/index.ts +417 -4
  196. package/src/metrics/token-service.ts +4 -4
  197. package/src/migration/index.ts +1 -1
  198. package/src/orchestration/hierarchy.ts +202 -0
  199. package/src/orchestration/index.ts +1 -0
  200. package/src/paths.ts +340 -5
  201. package/src/routing/capability-matrix.ts +49 -49
  202. package/src/scaffold.ts +428 -70
  203. package/src/security/input-sanitization.ts +4 -4
  204. package/src/sessions/__tests__/session-grade.integration.test.js +9 -9
  205. package/src/sessions/__tests__/session-grade.integration.test.ts +9 -9
  206. package/src/sessions/__tests__/session-grade.test.js +10 -10
  207. package/src/sessions/__tests__/session-grade.test.js.map +1 -1
  208. package/src/sessions/__tests__/session-grade.test.ts +10 -10
  209. package/src/sessions/session-grade.ts +4 -4
  210. package/src/skills/__tests__/dynamic-skill-generator.test.js +24 -26
  211. package/src/skills/__tests__/dynamic-skill-generator.test.js.map +1 -1
  212. package/src/skills/__tests__/dynamic-skill-generator.test.ts +24 -26
  213. package/src/skills/__tests__/routing-table.test.js +22 -22
  214. package/src/skills/__tests__/routing-table.test.js.map +1 -1
  215. package/src/skills/__tests__/routing-table.test.ts +23 -23
  216. package/src/skills/dynamic-skill-generator.ts +13 -24
  217. package/src/skills/routing-table.ts +4 -4
  218. package/src/store/__tests__/data-safety-central.test.js +8 -0
  219. package/src/store/__tests__/data-safety-central.test.js.map +1 -1
  220. package/src/store/__tests__/data-safety-central.test.ts +8 -0
  221. package/src/store/__tests__/safety-accessor.test.js +8 -0
  222. package/src/store/__tests__/safety-accessor.test.js.map +1 -1
  223. package/src/store/__tests__/safety-accessor.test.ts +8 -0
  224. package/src/store/agent-registry-accessor.ts +284 -108
  225. package/src/store/cross-db-cleanup.ts +175 -1
  226. package/src/store/provider.ts +2 -2
  227. package/src/store/signaldock-sqlite.ts +262 -60
  228. package/src/store/sqlite-data-accessor.ts +3 -0
  229. package/src/store/sqlite.ts +2 -2
  230. package/src/store/task-store.ts +8 -1
  231. package/src/store/tasks-schema.ts +5 -40
  232. package/src/system/__tests__/health.test.js +2 -2
  233. package/src/system/__tests__/health.test.js.map +1 -1
  234. package/src/system/__tests__/health.test.ts +2 -2
  235. package/src/system/archive-analytics.ts +1 -1
  236. package/src/system/health.ts +43 -19
  237. package/src/system/inject-generate.ts +20 -20
  238. package/src/system/runtime.ts +5 -4
  239. package/src/tasks/atomicity.ts +1 -1
  240. package/src/tasks/list.ts +1 -1
  241. package/src/tasks/task-ops.ts +415 -3
  242. package/src/templates/parser.ts +1 -1
  243. package/src/ui/index.ts +4 -4
  244. package/src/upgrade.ts +3 -14
  245. package/src/validation/operation-gate-validators.ts +1 -1
  246. package/src/validation/operation-verification-gates.ts +3 -3
  247. package/src/validation/param-utils.ts +11 -10
  248. package/src/validation/validate-ops.ts +6 -6
  249. package/templates/CLEO-INJECTION.md +38 -110
  250. package/dist/hooks/handlers/mcp-hooks.d.ts +0 -48
  251. package/dist/hooks/handlers/mcp-hooks.d.ts.map +0 -1
  252. package/dist/mcp/index.d.ts +0 -42
  253. package/dist/mcp/index.d.ts.map +0 -1
  254. package/src/__tests__/audit-prune.test.d.ts +0 -2
  255. package/src/__tests__/caamp-skill-install.test.d.ts +0 -14
  256. package/src/__tests__/cli-mcp-parity.integration.test.d.ts +0 -34
  257. package/src/__tests__/cli-mcp-parity.integration.test.d.ts.map +0 -1
  258. package/src/__tests__/cli-mcp-parity.integration.test.js +0 -898
  259. package/src/__tests__/cli-mcp-parity.integration.test.js.map +0 -1
  260. package/src/__tests__/cli-parity.test.d.ts +0 -9
  261. package/src/__tests__/config.test.d.ts +0 -7
  262. package/src/__tests__/core-parity.test.d.ts +0 -17
  263. package/src/__tests__/error-catalog.test.d.ts +0 -2
  264. package/src/__tests__/golden-parity.test.d.ts +0 -12
  265. package/src/__tests__/hooks.test.d.ts +0 -5
  266. package/src/__tests__/human-output.test.d.ts +0 -12
  267. package/src/__tests__/index-api-compat.test.d.ts +0 -2
  268. package/src/__tests__/init-e2e.test.d.ts +0 -12
  269. package/src/__tests__/injection-chain.test.d.ts +0 -18
  270. package/src/__tests__/injection-mvi-tiers.test.d.ts +0 -14
  271. package/src/__tests__/injection-shared.test.d.ts +0 -10
  272. package/src/__tests__/lafs-conformance.test.d.ts +0 -18
  273. package/src/__tests__/logger.test.d.ts +0 -2
  274. package/src/__tests__/mcp-install-verify.test.d.ts +0 -13
  275. package/src/__tests__/mcp-install-verify.test.d.ts.map +0 -1
  276. package/src/__tests__/mcp-install-verify.test.js +0 -177
  277. package/src/__tests__/mcp-install-verify.test.js.map +0 -1
  278. package/src/__tests__/mcp-install-verify.test.ts +0 -217
  279. package/src/__tests__/paths.test.d.ts +0 -7
  280. package/src/__tests__/project-info.test.d.ts +0 -2
  281. package/src/__tests__/rcsd-pipeline-e2e.test.d.ts +0 -14
  282. package/src/__tests__/remote.test.d.ts +0 -6
  283. package/src/__tests__/scaffold.test.d.ts +0 -6
  284. package/src/__tests__/schema-management.test.d.ts +0 -5
  285. package/src/__tests__/schema.test.d.ts +0 -2
  286. package/src/__tests__/sharing.test.d.ts +0 -6
  287. package/src/__tests__/snapshot.test.d.ts +0 -6
  288. package/src/__tests__/upgrade.test.d.ts +0 -7
  289. package/src/adapters/__tests__/discovery.test.d.ts +0 -6
  290. package/src/adapters/__tests__/manager.test.d.ts +0 -6
  291. package/src/agents/__tests__/agent-registry.test.d.ts +0 -12
  292. package/src/agents/__tests__/capacity.test.d.ts +0 -7
  293. package/src/agents/__tests__/execution-learning.test.d.ts +0 -14
  294. package/src/agents/__tests__/health-monitor.test.d.ts +0 -10
  295. package/src/agents/__tests__/registry.test.d.ts +0 -8
  296. package/src/agents/__tests__/retry.test.d.ts +0 -7
  297. package/src/compliance/__tests__/sync.test.d.ts +0 -5
  298. package/src/hooks/__tests__/provider-hooks.test.d.ts +0 -2
  299. package/src/hooks/__tests__/registry.test.d.ts +0 -2
  300. package/src/hooks/handlers/__tests__/error-hooks.test.d.ts +0 -2
  301. package/src/hooks/handlers/__tests__/file-hooks.test.d.ts +0 -2
  302. package/src/hooks/handlers/__tests__/hook-automation-e2e.test.d.ts +0 -13
  303. package/src/hooks/handlers/__tests__/mcp-hooks.test.d.ts +0 -2
  304. package/src/hooks/handlers/__tests__/mcp-hooks.test.d.ts.map +0 -1
  305. package/src/hooks/handlers/__tests__/mcp-hooks.test.js +0 -119
  306. package/src/hooks/handlers/__tests__/mcp-hooks.test.js.map +0 -1
  307. package/src/hooks/handlers/__tests__/mcp-hooks.test.ts +0 -150
  308. package/src/hooks/handlers/__tests__/session-hooks.test.d.ts +0 -2
  309. package/src/hooks/handlers/__tests__/task-hooks.test.d.ts +0 -2
  310. package/src/hooks/handlers/mcp-hooks.ts +0 -162
  311. package/src/intelligence/__tests__/adaptive-validation.test.d.ts +0 -11
  312. package/src/intelligence/__tests__/impact.test.d.ts +0 -16
  313. package/src/intelligence/__tests__/patterns.test.d.ts +0 -8
  314. package/src/intelligence/__tests__/prediction.test.d.ts +0 -8
  315. package/src/lib/__tests__/retry.test.d.ts +0 -7
  316. package/src/lifecycle/__tests__/chain-store.test.d.ts +0 -10
  317. package/src/lifecycle/__tests__/consolidate-rcasd.test.d.ts +0 -7
  318. package/src/lifecycle/__tests__/default-chain.test.d.ts +0 -7
  319. package/src/lifecycle/__tests__/frontmatter.test.d.ts +0 -7
  320. package/src/lifecycle/__tests__/lifecycle.test.d.ts +0 -7
  321. package/src/lifecycle/__tests__/pipeline.integration.test.d.ts +0 -19
  322. package/src/lifecycle/__tests__/rcasd-paths.test.d.ts +0 -7
  323. package/src/lifecycle/__tests__/resume-schema-contract.test.d.ts +0 -16
  324. package/src/lifecycle/__tests__/stage-record-provenance.integration.test.d.ts +0 -7
  325. package/src/lifecycle/__tests__/tessera-engine.test.d.ts +0 -10
  326. package/src/mcp/index.ts +0 -163
  327. package/src/memory/__tests__/auto-extract.test.d.ts +0 -7
  328. package/src/memory/__tests__/brain-automation.test.d.ts +0 -11
  329. package/src/memory/__tests__/brain-embedding.test.d.ts +0 -2
  330. package/src/memory/__tests__/brain-links.test.d.ts +0 -8
  331. package/src/memory/__tests__/brain-migration.test.d.ts +0 -8
  332. package/src/memory/__tests__/brain-retrieval.test.d.ts +0 -10
  333. package/src/memory/__tests__/brain-search.test.d.ts +0 -8
  334. package/src/memory/__tests__/claude-mem-migration.test.d.ts +0 -12
  335. package/src/memory/__tests__/decisions.test.d.ts +0 -8
  336. package/src/memory/__tests__/engine-compat.test.d.ts +0 -12
  337. package/src/memory/__tests__/memory-bridge.test.d.ts +0 -10
  338. package/src/memory/__tests__/pipeline-manifest-sqlite.test.d.ts +0 -13
  339. package/src/memory/__tests__/session-memory.test.d.ts +0 -9
  340. package/src/metrics/__tests__/model-provider-registry.test.d.ts +0 -2
  341. package/src/metrics/__tests__/provider-detection.test.d.ts +0 -2
  342. package/src/migration/__tests__/checksum.test.d.ts +0 -8
  343. package/src/migration/__tests__/logger.test.d.ts +0 -5
  344. package/src/migration/__tests__/migration-failure.integration.test.d.ts +0 -15
  345. package/src/migration/__tests__/migration.test.d.ts +0 -13
  346. package/src/migration/__tests__/state.test.d.ts +0 -8
  347. package/src/migration/__tests__/validate.test.d.ts +0 -8
  348. package/src/nexus/__tests__/deps.test.d.ts +0 -7
  349. package/src/nexus/__tests__/nexus-e2e.test.d.ts +0 -12
  350. package/src/nexus/__tests__/permissions.test.d.ts +0 -7
  351. package/src/nexus/__tests__/query.test.d.ts +0 -7
  352. package/src/nexus/__tests__/reconcile.test.d.ts +0 -7
  353. package/src/nexus/__tests__/registry.test.d.ts +0 -7
  354. package/src/nexus/__tests__/transfer.test.d.ts +0 -8
  355. package/src/observability/__tests__/index.test.d.ts +0 -7
  356. package/src/observability/__tests__/log-filter.test.d.ts +0 -7
  357. package/src/observability/__tests__/log-parser.test.d.ts +0 -7
  358. package/src/observability/__tests__/log-reader.test.d.ts +0 -7
  359. package/src/orchestration/__tests__/autonomous-spec.test.d.ts +0 -9
  360. package/src/orchestration/__tests__/orchestration.test.d.ts +0 -7
  361. package/src/orchestration/__tests__/protocol-validators.test.d.ts +0 -9
  362. package/src/phases/__tests__/deps.test.d.ts +0 -7
  363. package/src/phases/__tests__/phases.test.d.ts +0 -7
  364. package/src/release/__tests__/artifacts.test.d.ts +0 -7
  365. package/src/release/__tests__/cancel-release.test.d.ts +0 -10
  366. package/src/release/__tests__/changelog-writer.test.d.ts +0 -6
  367. package/src/release/__tests__/push-policy.test.d.ts +0 -14
  368. package/src/release/__tests__/release.test.d.ts +0 -11
  369. package/src/sequence/__tests__/allocate.test.d.ts +0 -6
  370. package/src/sessions/__tests__/briefing-blocked.test.d.ts +0 -6
  371. package/src/sessions/__tests__/briefing.test.d.ts +0 -11
  372. package/src/sessions/__tests__/handoff-integration.test.d.ts +0 -8
  373. package/src/sessions/__tests__/handoff.test.d.ts +0 -11
  374. package/src/sessions/__tests__/index.test.d.ts +0 -2
  375. package/src/sessions/__tests__/session-cleanup.test.d.ts +0 -7
  376. package/src/sessions/__tests__/session-edge-cases.test.d.ts +0 -9
  377. package/src/sessions/__tests__/session-find.test.d.ts +0 -9
  378. package/src/sessions/__tests__/session-grade.integration.test.d.ts +0 -11
  379. package/src/sessions/__tests__/session-grade.test.d.ts +0 -6
  380. package/src/sessions/__tests__/session-memory-bridge.test.d.ts +0 -2
  381. package/src/sessions/__tests__/sessions.test.d.ts +0 -7
  382. package/src/skills/__tests__/discovery.test.d.ts +0 -6
  383. package/src/skills/__tests__/dispatch.test.d.ts +0 -6
  384. package/src/skills/__tests__/dynamic-skill-generator.test.d.ts +0 -2
  385. package/src/skills/__tests__/manifests.test.d.ts +0 -6
  386. package/src/skills/__tests__/precedence.test.d.ts +0 -6
  387. package/src/skills/__tests__/routing-table.test.d.ts +0 -2
  388. package/src/skills/__tests__/skill-paths.test.d.ts +0 -7
  389. package/src/skills/__tests__/test-utility.test.d.ts +0 -7
  390. package/src/skills/__tests__/token.test.d.ts +0 -6
  391. package/src/skills/__tests__/validation.test.d.ts +0 -6
  392. package/src/skills/__tests__/version.test.d.ts +0 -5
  393. package/src/skills/injection/__tests__/subagent.test.d.ts +0 -2
  394. package/src/skills/orchestrator/__tests__/spawn-tier.test.d.ts +0 -2
  395. package/src/spawn/__tests__/adapter-registry.test.d.ts +0 -2
  396. package/src/stats/__tests__/stats.test.d.ts +0 -7
  397. package/src/sticky/__tests__/purge.test.d.ts +0 -9
  398. package/src/store/__tests__/atomic.test.d.ts +0 -7
  399. package/src/store/__tests__/backup.test.d.ts +0 -7
  400. package/src/store/__tests__/brain-accessor-pageindex.test.d.ts +0 -12
  401. package/src/store/__tests__/brain-accessor.test.d.ts +0 -10
  402. package/src/store/__tests__/brain-pageindex.test.d.ts +0 -11
  403. package/src/store/__tests__/brain-schema.test.d.ts +0 -11
  404. package/src/store/__tests__/brain-vec.test.d.ts +0 -11
  405. package/src/store/__tests__/collision-detection.test.d.ts +0 -11
  406. package/src/store/__tests__/data-safety-central.test.d.ts +0 -20
  407. package/src/store/__tests__/db-helpers.test.d.ts +0 -7
  408. package/src/store/__tests__/e2e-safety-integration.test.d.ts +0 -13
  409. package/src/store/__tests__/git-checkpoint.test.d.ts +0 -7
  410. package/src/store/__tests__/idempotent-migration.test.d.ts +0 -5
  411. package/src/store/__tests__/import-logging.test.d.ts +0 -7
  412. package/src/store/__tests__/import-sort.test.d.ts +0 -7
  413. package/src/store/__tests__/json.test.d.ts +0 -7
  414. package/src/store/__tests__/lifecycle-schema-parity.test.d.ts +0 -2
  415. package/src/store/__tests__/migration-integration.test.d.ts +0 -15
  416. package/src/store/__tests__/migration-retry.test.d.ts +0 -10
  417. package/src/store/__tests__/migration-safety.test.d.ts +0 -21
  418. package/src/store/__tests__/migration-sqlite.test.d.ts +0 -11
  419. package/src/store/__tests__/performance-safety.test.d.ts +0 -17
  420. package/src/store/__tests__/project-detect.test.d.ts +0 -6
  421. package/src/store/__tests__/project-registry.test.d.ts +0 -7
  422. package/src/store/__tests__/provider.test.d.ts +0 -9
  423. package/src/store/__tests__/relations.test.d.ts +0 -9
  424. package/src/store/__tests__/safety-accessor.test.d.ts +0 -18
  425. package/src/store/__tests__/sequence-validation.test.d.ts +0 -11
  426. package/src/store/__tests__/session-store.test.d.ts +0 -11
  427. package/src/store/__tests__/sqlite-backup.test.d.ts +0 -14
  428. package/src/store/__tests__/sqlite.test.d.ts +0 -11
  429. package/src/store/__tests__/task-store.test.d.ts +0 -11
  430. package/src/store/__tests__/test-db-helper.d.ts +0 -61
  431. package/src/store/__tests__/write-verification.test.d.ts +0 -11
  432. package/src/system/__tests__/cleanup.test.d.ts +0 -2
  433. package/src/system/__tests__/health.test.d.ts +0 -2
  434. package/src/task-work/__tests__/start-deps.test.d.ts +0 -6
  435. package/src/tasks/__tests__/add.test.d.ts +0 -7
  436. package/src/tasks/__tests__/archive.test.d.ts +0 -7
  437. package/src/tasks/__tests__/assignee.test.d.ts +0 -14
  438. package/src/tasks/__tests__/atomicity.test.d.ts +0 -6
  439. package/src/tasks/__tests__/cancel-ops.test.d.ts +0 -7
  440. package/src/tasks/__tests__/complete-unblocks.test.d.ts +0 -6
  441. package/src/tasks/__tests__/complete.test.d.ts +0 -7
  442. package/src/tasks/__tests__/delete.test.d.ts +0 -7
  443. package/src/tasks/__tests__/dependency-check.test.d.ts +0 -7
  444. package/src/tasks/__tests__/deps-ready.test.d.ts +0 -6
  445. package/src/tasks/__tests__/epic-enforcement.test.d.ts +0 -15
  446. package/src/tasks/__tests__/find.test.d.ts +0 -7
  447. package/src/tasks/__tests__/graph-ops.test.d.ts +0 -7
  448. package/src/tasks/__tests__/hierarchy-policy.test.d.ts +0 -6
  449. package/src/tasks/__tests__/hierarchy.test.d.ts +0 -7
  450. package/src/tasks/__tests__/id-generator.test.d.ts +0 -2
  451. package/src/tasks/__tests__/labels.test.d.ts +0 -7
  452. package/src/tasks/__tests__/list.test.d.ts +0 -7
  453. package/src/tasks/__tests__/minimal-test.test.d.ts +0 -2
  454. package/src/tasks/__tests__/phase-tracking.test.d.ts +0 -7
  455. package/src/tasks/__tests__/pipeline-stage.test.d.ts +0 -14
  456. package/src/tasks/__tests__/plan-priority.test.d.ts +0 -10
  457. package/src/tasks/__tests__/priority-normalization.test.d.ts +0 -7
  458. package/src/tasks/__tests__/relates.test.d.ts +0 -9
  459. package/src/tasks/__tests__/show-deps.test.d.ts +0 -6
  460. package/src/tasks/__tests__/show.test.d.ts +0 -7
  461. package/src/tasks/__tests__/staleness.test.d.ts +0 -7
  462. package/src/tasks/__tests__/task-ops-depends.test.d.ts +0 -6
  463. package/src/tasks/__tests__/update.test.d.ts +0 -7
  464. package/src/validation/__tests__/chain-validation.test.d.ts +0 -7
  465. package/src/validation/__tests__/compliance.test.d.ts +0 -7
  466. package/src/validation/__tests__/docs-sync.test.d.ts +0 -7
  467. package/src/validation/__tests__/doctor-gitignore.test.d.ts +0 -7
  468. package/src/validation/__tests__/doctor-injection.test.d.ts +0 -11
  469. package/src/validation/__tests__/doctor.test.d.ts +0 -7
  470. package/src/validation/__tests__/engine.test.d.ts +0 -7
  471. package/src/validation/__tests__/manifest.test.d.ts +0 -7
  472. package/src/validation/__tests__/protocol-common.test.d.ts +0 -7
  473. package/src/validation/__tests__/verification.test.d.ts +0 -7
package/src/bootstrap.ts CHANGED
@@ -67,8 +67,7 @@ export async function bootstrapGlobalCleo(options?: BootstrapOptions): Promise<B
67
67
  // Step 2: CAAMP injection into ~/.agents/AGENTS.md
68
68
  await injectAgentsHub(ctx);
69
69
 
70
- // Step 3: Install MCP server to detected providers
71
- await installMcpToProviders(ctx);
70
+ // Step 3: (removed)
72
71
 
73
72
  // Step 4: Install core skills globally
74
73
  await installSkillsGlobally(ctx);
@@ -286,46 +285,13 @@ async function injectAgentsHub(ctx: BootstrapContext): Promise<void> {
286
285
  }
287
286
  }
288
287
 
289
- // ── Step 3: MCP server installation ──────────────────────────────────
288
+ // ── Step 3: (removed) ───────────────────────────────────────────────
290
289
 
291
290
  /**
292
- * Install the CLEO MCP server config to all detected providers.
291
+ * No-op. Kept for API compatibility.
293
292
  */
294
- export async function installMcpToProviders(ctx: BootstrapContext): Promise<void> {
295
- try {
296
- const { detectEnvMode, generateMcpServerEntry, getMcpServerName } = await import(
297
- './mcp/index.js'
298
- );
299
- const { getInstalledProviders, installMcpServerToAll } = await import('@cleocode/caamp');
300
- type McpServerConfig = import('@cleocode/caamp').McpServerConfig;
301
-
302
- const env = detectEnvMode();
303
- const serverEntry = generateMcpServerEntry(env) as McpServerConfig;
304
- const serverName = getMcpServerName(env);
305
- const providers = getInstalledProviders();
306
-
307
- if (providers.length > 0) {
308
- if (!ctx.isDryRun) {
309
- const results = await installMcpServerToAll(
310
- providers,
311
- serverName,
312
- serverEntry,
313
- 'global',
314
- homedir(),
315
- );
316
- const successes = results.filter((r: { success: boolean }) => r.success);
317
- if (successes.length > 0) {
318
- ctx.created.push(
319
- `MCP configs: ${successes.map((r: { provider: { id: string } }) => r.provider.id).join(', ')}`,
320
- );
321
- }
322
- } else {
323
- ctx.created.push('MCP configs (would update)');
324
- }
325
- }
326
- } catch {
327
- ctx.warnings.push('MCP config update skipped (non-critical)');
328
- }
293
+ export async function installMcpToProviders(_ctx: BootstrapContext): Promise<void> {
294
+ // No-op: removed
329
295
  }
330
296
 
331
297
  // ── Step 4: Core skills installation ─────────────────────────────────
@@ -2,11 +2,11 @@
2
2
  * CAAMP Adapter - Canonical implementation
3
3
  *
4
4
  * Wraps @cleocode/caamp APIs for use across CLEO subsystems.
5
- * Provides provider registry, MCP config management, injection operations,
5
+ * Provides provider registry, injection operations,
6
6
  * and batch/orchestration functions as EngineResult-returning functions.
7
7
  *
8
8
  * This is the SINGLE SOURCE OF TRUTH for all CAAMP adapter logic.
9
- * MCP engine layer re-exports from here.
9
+ * CLI dispatch layer re-exports from here.
10
10
  *
11
11
  * @task T4678
12
12
  * @task T4705
@@ -16,13 +16,9 @@
16
16
  import {
17
17
  type BatchInstallOptions,
18
18
  type BatchInstallResult,
19
- buildServerConfig,
20
19
  checkAllInjections,
21
20
  checkInjection,
22
- configureProviderGlobalAndProject,
23
21
  type DetectionResult,
24
- type DualScopeConfigureOptions,
25
- type DualScopeConfigureResult,
26
22
  detectAllProviders,
27
23
  generateInjectionContent,
28
24
  // Provider Registry
@@ -33,22 +29,14 @@ import {
33
29
  getProviderCount,
34
30
  getRegistryVersion,
35
31
  type InjectionStatus,
36
- type InstallResult,
37
32
  // Instructions
38
33
  inject,
39
34
  injectAll,
40
35
  // Batch / Orchestration
41
36
  installBatchWithRollback,
42
- // MCP Config
43
- installMcpServer,
44
- listAllMcpServers,
45
- listMcpServers,
46
- type McpServerConfig,
47
37
  // Types
48
38
  type Provider,
49
- removeMcpServer,
50
39
  resolveAlias,
51
- resolveConfigPath,
52
40
  } from '@cleocode/caamp';
53
41
 
54
42
  // ============================================================
@@ -186,168 +174,6 @@ export function registryVersion(): EngineResult<{ version: string }> {
186
174
  }
187
175
  }
188
176
 
189
- // ============================================================
190
- // MCP Config Operations
191
- // ============================================================
192
-
193
- /**
194
- * List MCP servers for a specific provider.
195
- * @task T4332
196
- */
197
- export async function mcpList(
198
- providerId: string,
199
- scope: 'project' | 'global',
200
- projectDir?: string,
201
- ): Promise<EngineResult<{ servers: unknown[] }>> {
202
- try {
203
- const provider = getProvider(providerId);
204
- if (!provider) {
205
- return {
206
- success: false,
207
- error: {
208
- code: 'E_CAAMP_PROVIDER_NOT_FOUND',
209
- message: `Provider not found: ${providerId}`,
210
- },
211
- };
212
- }
213
- const servers = await listMcpServers(provider, scope, projectDir);
214
- return { success: true, data: { servers } };
215
- } catch (err) {
216
- return {
217
- success: false,
218
- error: {
219
- code: 'E_CAAMP_MCP_LIST',
220
- message: err instanceof Error ? err.message : String(err),
221
- },
222
- };
223
- }
224
- }
225
-
226
- /**
227
- * List MCP servers across all installed providers.
228
- * @task T4332
229
- */
230
- export async function mcpListAll(
231
- scope: 'project' | 'global',
232
- projectDir?: string,
233
- ): Promise<EngineResult<{ servers: unknown[] }>> {
234
- try {
235
- const providers = getInstalledProviders();
236
- const servers = await listAllMcpServers(providers, scope, projectDir);
237
- return { success: true, data: { servers } };
238
- } catch (err) {
239
- return {
240
- success: false,
241
- error: {
242
- code: 'E_CAAMP_MCP_LIST_ALL',
243
- message: err instanceof Error ? err.message : String(err),
244
- },
245
- };
246
- }
247
- }
248
-
249
- /**
250
- * Install an MCP server to a provider's config.
251
- * @task T4332
252
- */
253
- export async function mcpInstall(
254
- providerId: string,
255
- serverName: string,
256
- config: McpServerConfig,
257
- scope?: 'project' | 'global',
258
- projectDir?: string,
259
- ): Promise<EngineResult<InstallResult>> {
260
- try {
261
- const provider = getProvider(providerId);
262
- if (!provider) {
263
- return {
264
- success: false,
265
- error: {
266
- code: 'E_CAAMP_PROVIDER_NOT_FOUND',
267
- message: `Provider not found: ${providerId}`,
268
- },
269
- };
270
- }
271
- const result = await installMcpServer(provider, serverName, config, scope, projectDir);
272
- return { success: true, data: result };
273
- } catch (err) {
274
- return {
275
- success: false,
276
- error: {
277
- code: 'E_CAAMP_MCP_INSTALL',
278
- message: err instanceof Error ? err.message : String(err),
279
- },
280
- };
281
- }
282
- }
283
-
284
- /**
285
- * Remove an MCP server from a provider's config.
286
- * @task T4332
287
- */
288
- export async function mcpRemove(
289
- providerId: string,
290
- serverName: string,
291
- scope: 'project' | 'global',
292
- projectDir?: string,
293
- ): Promise<EngineResult<{ removed: boolean }>> {
294
- try {
295
- const provider = getProvider(providerId);
296
- if (!provider) {
297
- return {
298
- success: false,
299
- error: {
300
- code: 'E_CAAMP_PROVIDER_NOT_FOUND',
301
- message: `Provider not found: ${providerId}`,
302
- },
303
- };
304
- }
305
- const removed = await removeMcpServer(provider, serverName, scope, projectDir);
306
- return { success: true, data: { removed } };
307
- } catch (err) {
308
- return {
309
- success: false,
310
- error: {
311
- code: 'E_CAAMP_MCP_REMOVE',
312
- message: err instanceof Error ? err.message : String(err),
313
- },
314
- };
315
- }
316
- }
317
-
318
- /**
319
- * Resolve the config file path for a provider.
320
- * @task T4332
321
- */
322
- export function mcpConfigPath(
323
- providerId: string,
324
- scope: 'project' | 'global',
325
- projectDir?: string,
326
- ): EngineResult<{ path: string | null }> {
327
- try {
328
- const provider = getProvider(providerId);
329
- if (!provider) {
330
- return {
331
- success: false,
332
- error: {
333
- code: 'E_CAAMP_PROVIDER_NOT_FOUND',
334
- message: `Provider not found: ${providerId}`,
335
- },
336
- };
337
- }
338
- const path = resolveConfigPath(provider, scope, projectDir);
339
- return { success: true, data: { path } };
340
- } catch (err) {
341
- return {
342
- success: false,
343
- error: {
344
- code: 'E_CAAMP_MCP_CONFIG_PATH',
345
- message: err instanceof Error ? err.message : String(err),
346
- },
347
- };
348
- }
349
- }
350
-
351
177
  // ============================================================
352
178
  // Injection Operations
353
179
  // ============================================================
@@ -454,9 +280,7 @@ export async function injectionUpdateAll(
454
280
  // ============================================================
455
281
 
456
282
  /**
457
- * Install multiple MCP servers atomically with rollback on failure.
458
- * Supports Wave 4 init rewrite which needs to install multiple
459
- * skills/configs as a single atomic operation.
283
+ * Install multiple skills atomically with rollback on failure.
460
284
  *
461
285
  * @task T4705
462
286
  * @epic T4663
@@ -478,41 +302,6 @@ export async function batchInstallWithRollback(
478
302
  }
479
303
  }
480
304
 
481
- /**
482
- * Configure a provider at both global and project scope simultaneously.
483
- * Used during init to set up MCP configs in both scopes atomically.
484
- *
485
- * @task T4705
486
- * @epic T4663
487
- */
488
- export async function dualScopeConfigure(
489
- providerId: string,
490
- options: DualScopeConfigureOptions,
491
- ): Promise<EngineResult<DualScopeConfigureResult>> {
492
- try {
493
- const provider = getProvider(providerId);
494
- if (!provider) {
495
- return {
496
- success: false,
497
- error: {
498
- code: 'E_CAAMP_PROVIDER_NOT_FOUND',
499
- message: `Provider not found: ${providerId}`,
500
- },
501
- };
502
- }
503
- const result = await configureProviderGlobalAndProject(provider, options);
504
- return { success: true, data: result };
505
- } catch (err) {
506
- return {
507
- success: false,
508
- error: {
509
- code: 'E_CAAMP_DUAL_SCOPE_CONFIGURE',
510
- message: err instanceof Error ? err.message : String(err),
511
- },
512
- };
513
- }
514
- }
515
-
516
305
  // ============================================================
517
306
  // Utility Re-exports (passthrough, no EngineResult wrapping)
518
307
  // ============================================================
@@ -522,15 +311,10 @@ export type {
522
311
  BatchInstallOptions as CaampBatchInstallOptions,
523
312
  BatchInstallResult as CaampBatchInstallResult,
524
313
  DetectionResult as CaampDetectionResult,
525
- DualScopeConfigureOptions as CaampDualScopeConfigureOptions,
526
- DualScopeConfigureResult as CaampDualScopeConfigureResult,
527
314
  InjectionStatus as CaampInjectionStatus,
528
- InstallResult as CaampInstallResult,
529
- McpServerConfig as CaampMcpServerConfig,
530
315
  Provider as CaampProvider,
531
316
  };
532
317
  export {
533
- buildServerConfig as caampBuildServerConfig,
534
318
  generateInjectionContent as caampGenerateInjectionContent,
535
319
  getInstructionFiles as caampGetInstructionFiles,
536
320
  resolveAlias as caampResolveAlias,
@@ -2,7 +2,7 @@
2
2
  * CAAMP integration module - barrel export.
3
3
  *
4
4
  * All CAAMP adapter logic lives here as the single source of truth.
5
- * MCP engine layer and CLI commands re-export from this module.
5
+ * CLI dispatch layer re-exports from this module.
6
6
  *
7
7
  * @task T4678
8
8
  * @epic T4663
@@ -14,18 +14,12 @@ export {
14
14
  type CaampBatchInstallOptions,
15
15
  type CaampBatchInstallResult,
16
16
  type CaampDetectionResult,
17
- type CaampDualScopeConfigureOptions,
18
- type CaampDualScopeConfigureResult,
19
17
  type CaampInjectionStatus,
20
- type CaampInstallResult,
21
- type CaampMcpServerConfig,
22
18
  type CaampProvider,
23
- caampBuildServerConfig,
24
19
  caampGenerateInjectionContent,
25
20
  caampGetInstructionFiles,
26
21
  // Utility Re-exports
27
22
  caampResolveAlias,
28
- dualScopeConfigure,
29
23
  // Types
30
24
  type EngineResult,
31
25
  // Injection Operations
@@ -33,12 +27,6 @@ export {
33
27
  injectionCheckAll,
34
28
  injectionUpdate,
35
29
  injectionUpdateAll,
36
- mcpConfigPath,
37
- mcpInstall,
38
- // MCP Config Operations
39
- mcpList,
40
- mcpListAll,
41
- mcpRemove,
42
30
  providerCount,
43
31
  providerDetect,
44
32
  providerGet,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cant-agent-parse.test.d.ts","sourceRoot":"","sources":["cant-agent-parse.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Integration test: .cant agent file → cant-napi parse_document → TypeScript AST.
3
+ *
4
+ * This test validates the full pipeline from .cant file on disk through the
5
+ * Rust parser (via napi-rs bridge) to a TypeScript-consumable AST.
6
+ *
7
+ * BLOCKED: cant-napi does not yet export parse_document (only Layer 1 cant_parse).
8
+ * Once cleo-rust-lead extends cant-napi, remove the .skip from these tests.
9
+ *
10
+ * @see docs/specs/CANT-DSL-SPEC.md Section 7.2 (Workflow Execution)
11
+ * @see docs/specs/CANT-EXECUTION-SEMANTICS.md Section 5 (Session Blocking)
12
+ * @see docs/specs/CLEO-ORCH-PLAN.md Section 3.1 (Agent Profile System)
13
+ */
14
+ import { readFileSync } from 'node:fs';
15
+ import { join } from 'node:path';
16
+ import { describe, expect, it } from 'vitest';
17
+ // BLOCKED: uncomment when cant-napi exports parse_document
18
+ // import { cantParseDocument } from 'cant-napi';
19
+ describe('CANT Agent .cant File Parsing', () => {
20
+ const AGENTS_DIR = join(process.cwd(), '.cleo', 'agents');
21
+ it.skip('parses cleo-historian.cant through napi bridge', () => {
22
+ const content = readFileSync(join(AGENTS_DIR, 'cleo-historian.cant'), 'utf-8');
23
+ // BLOCKED: cantParseDocument not yet exported from cant-napi
24
+ // const doc = cantParseDocument(content);
25
+ // expect(doc.kind).toBe('agent');
26
+ // expect(doc.sections).toHaveLength(1);
27
+ // const agent = doc.sections[0];
28
+ // expect(agent.type).toBe('Agent');
29
+ // expect(agent.name).toBe('cleo-historian');
30
+ // expect(agent.permissions).toHaveLength(6);
31
+ // expect(agent.hooks).toHaveLength(4); // SessionStart, TaskCompleted, MemoryObserved, PipelineStageCompleted
32
+ // expect(agent.properties.find((p: { key: string }) => p.key === 'model')?.value).toBe('opus');
33
+ });
34
+ it.skip('parses cleo-rust-lead.cant through napi bridge', () => {
35
+ const content = readFileSync(join(AGENTS_DIR, 'cleo-rust-lead.cant'), 'utf-8');
36
+ // BLOCKED: cantParseDocument not yet exported from cant-napi
37
+ // const doc = cantParseDocument(content);
38
+ // expect(doc.kind).toBe('agent');
39
+ // expect(doc.sections[0].name).toBe('cleo-rust-lead');
40
+ });
41
+ it('.cant files exist on disk', () => {
42
+ const historianContent = readFileSync(join(AGENTS_DIR, 'cleo-historian.cant'), 'utf-8');
43
+ expect(historianContent).toContain('kind: agent');
44
+ expect(historianContent).toContain('agent cleo-historian:');
45
+ expect(historianContent).toContain('model: opus');
46
+ expect(historianContent).toContain('permissions:');
47
+ expect(historianContent).toContain('on SessionStart:');
48
+ expect(historianContent).toContain('on TaskCompleted:');
49
+ expect(historianContent).toContain('on MemoryObserved:');
50
+ expect(historianContent).toContain('on PipelineStageCompleted:');
51
+ });
52
+ it('.cant file uses canonical CANT grammar elements', () => {
53
+ const content = readFileSync(join(AGENTS_DIR, 'cleo-historian.cant'), 'utf-8');
54
+ // Frontmatter
55
+ expect(content).toMatch(/^---\nkind: agent\nversion: 1\n---/);
56
+ // Agent block with proper indentation (2 spaces)
57
+ expect(content).toMatch(/^agent cleo-historian:$/m);
58
+ expect(content).toMatch(/^ {2}model: opus$/m);
59
+ expect(content).toMatch(/^ {2}permissions:$/m);
60
+ expect(content).toMatch(/^ {4}tasks: read$/m);
61
+ expect(content).toMatch(/^ {4}memory: read, write$/m);
62
+ // Hook blocks with canonical event names (PascalCase)
63
+ expect(content).toMatch(/^ {2}on SessionStart:$/m);
64
+ expect(content).toMatch(/^ {2}on TaskCompleted:$/m);
65
+ expect(content).toMatch(/^ {2}on MemoryObserved:$/m);
66
+ expect(content).toMatch(/^ {2}on PipelineStageCompleted:$/m);
67
+ // Discretion conditions (** delimiters)
68
+ expect(content).toMatch(/\*\*.+\*\*/);
69
+ // CANT directives in hook bodies
70
+ expect(content).toMatch(/\/checkin @all/);
71
+ expect(content).toMatch(/\/review @cleo-historian/);
72
+ expect(content).toMatch(/\/action @cleo-historian/);
73
+ // No tabs (CANT spec rule: tabs rejected)
74
+ expect(content).not.toMatch(/\t/);
75
+ });
76
+ });
77
+ //# sourceMappingURL=cant-agent-parse.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cant-agent-parse.test.js","sourceRoot":"","sources":["cant-agent-parse.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,2DAA2D;AAC3D,iDAAiD;AAEjD,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE1D,EAAE,CAAC,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE;QAC7D,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,EAAE,OAAO,CAAC,CAAC;QAE/E,6DAA6D;QAC7D,0CAA0C;QAE1C,kCAAkC;QAClC,wCAAwC;QAExC,iCAAiC;QACjC,oCAAoC;QACpC,6CAA6C;QAC7C,6CAA6C;QAC7C,8GAA8G;QAC9G,gGAAgG;IAClG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE;QAC7D,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,EAAE,OAAO,CAAC,CAAC;QAE/E,6DAA6D;QAC7D,0CAA0C;QAE1C,kCAAkC;QAClC,uDAAuD;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACnC,MAAM,gBAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,EAAE,OAAO,CAAC,CAAC;QACxF,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAClD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAC5D,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAClD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QACnD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACvD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACxD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QACzD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,EAAE,OAAO,CAAC,CAAC;QAE/E,cAAc;QACd,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC;QAE9D,iDAAiD;QACjD,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;QACpD,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAC/C,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC;QAEtD,sDAAsD;QACtD,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QACnD,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;QACpD,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;QAE7D,wCAAwC;QACxC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAEtC,iCAAiC;QACjC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;QACpD,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;QAEpD,0CAA0C;QAC1C,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Code analysis via tree-sitter AST parsing.
3
+ *
4
+ * @module code
5
+ */
6
+
7
+ export { type OutlineNode, type SmartOutlineResult, smartOutline } from './outline.js';
8
+ export { batchParse, parseFile } from './parser.js';
9
+ export { type SmartSearchOptions, type SmartSearchResult, smartSearch } from './search.js';
10
+ export { type SmartUnfoldResult, smartUnfold } from './unfold.js';