@agentxm/client-core 0.1.6 → 0.3.1

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 (500) hide show
  1. package/dist/src/unstable/agents/coding-agent.d.ts +1 -1
  2. package/dist/src/unstable/agents/coding-agent.d.ts.map +1 -1
  3. package/dist/src/unstable/agents/coding-agent.js +1 -1
  4. package/dist/src/unstable/agents/coding-agent.js.map +1 -1
  5. package/dist/src/unstable/auth/auth-client.d.ts +1 -1
  6. package/dist/src/unstable/auth/auth-client.d.ts.map +1 -1
  7. package/dist/src/unstable/auth/auth-client.js +1 -1
  8. package/dist/src/unstable/auth/auth-client.js.map +1 -1
  9. package/dist/src/unstable/auth/credential-store.d.ts +1 -1
  10. package/dist/src/unstable/auth/credential-store.d.ts.map +1 -1
  11. package/dist/src/unstable/auth/credential-store.js +1 -1
  12. package/dist/src/unstable/auth/credential-store.js.map +1 -1
  13. package/dist/src/unstable/auth/device-login.d.ts +1 -1
  14. package/dist/src/unstable/auth/device-login.d.ts.map +1 -1
  15. package/dist/src/unstable/auth/device-login.js +1 -1
  16. package/dist/src/unstable/auth/device-login.js.map +1 -1
  17. package/dist/src/unstable/auth/guard-interaction.d.ts +1 -1
  18. package/dist/src/unstable/auth/guard-interaction.d.ts.map +1 -1
  19. package/dist/src/unstable/auth/guard-interaction.js +1 -1
  20. package/dist/src/unstable/auth/guard-interaction.js.map +1 -1
  21. package/dist/src/unstable/auth/login-interaction.d.ts +1 -1
  22. package/dist/src/unstable/auth/login-interaction.d.ts.map +1 -1
  23. package/dist/src/unstable/auth/login-interaction.js +1 -1
  24. package/dist/src/unstable/auth/login-interaction.js.map +1 -1
  25. package/dist/src/unstable/auth/registry-url.d.ts +1 -1
  26. package/dist/src/unstable/auth/registry-url.d.ts.map +1 -1
  27. package/dist/src/unstable/auth/registry-url.js +1 -1
  28. package/dist/src/unstable/auth/registry-url.js.map +1 -1
  29. package/dist/src/unstable/auth/schema.d.ts +3 -3
  30. package/dist/src/unstable/cli-flags/verbosity.d.ts +1 -1
  31. package/dist/src/unstable/cli-flags/verbosity.d.ts.map +1 -1
  32. package/dist/src/unstable/cli-flags/verbosity.js +1 -1
  33. package/dist/src/unstable/cli-flags/verbosity.js.map +1 -1
  34. package/dist/src/unstable/cli-renderer/cli-renderer.d.ts +1 -1
  35. package/dist/src/unstable/cli-renderer/cli-renderer.d.ts.map +1 -1
  36. package/dist/src/unstable/cli-renderer/cli-renderer.js +1 -1
  37. package/dist/src/unstable/cli-renderer/cli-renderer.js.map +1 -1
  38. package/dist/src/unstable/cli-runtime/command-argv.d.ts +1 -1
  39. package/dist/src/unstable/cli-runtime/command-argv.d.ts.map +1 -1
  40. package/dist/src/unstable/cli-runtime/command-argv.js +1 -1
  41. package/dist/src/unstable/cli-runtime/command-argv.js.map +1 -1
  42. package/dist/src/unstable/cli-runtime/graceful-shutdown.js +1 -1
  43. package/dist/src/unstable/cli-runtime/graceful-shutdown.js.map +1 -1
  44. package/dist/src/unstable/cli-runtime/telemetry.d.ts +1 -1
  45. package/dist/src/unstable/cli-runtime/telemetry.d.ts.map +1 -1
  46. package/dist/src/unstable/cli-runtime/telemetry.js +1 -1
  47. package/dist/src/unstable/cli-runtime/telemetry.js.map +1 -1
  48. package/dist/src/unstable/commands/manager.d.ts +1 -1
  49. package/dist/src/unstable/commands/manager.d.ts.map +1 -1
  50. package/dist/src/unstable/commands/manager.js +1 -1
  51. package/dist/src/unstable/commands/manager.js.map +1 -1
  52. package/dist/src/unstable/commands/operations/disable.d.ts +2 -2
  53. package/dist/src/unstable/commands/operations/disable.d.ts.map +1 -1
  54. package/dist/src/unstable/commands/operations/enable.d.ts +2 -2
  55. package/dist/src/unstable/commands/operations/enable.d.ts.map +1 -1
  56. package/dist/src/unstable/commands/operations/install.d.ts +1 -1
  57. package/dist/src/unstable/commands/operations/install.d.ts.map +1 -1
  58. package/dist/src/unstable/commands/operations/new-command.d.ts +2 -2
  59. package/dist/src/unstable/commands/operations/new-command.d.ts.map +1 -1
  60. package/dist/src/unstable/commands/operations/publish.d.ts +1 -1
  61. package/dist/src/unstable/commands/operations/publish.d.ts.map +1 -1
  62. package/dist/src/unstable/commands/operations/uninstall.d.ts +1 -1
  63. package/dist/src/unstable/commands/operations/uninstall.d.ts.map +1 -1
  64. package/dist/src/unstable/date-time.d.ts +2 -2
  65. package/dist/src/unstable/date-time.d.ts.map +1 -1
  66. package/dist/src/unstable/extensions/operations.d.ts +1 -1
  67. package/dist/src/unstable/extensions/operations.d.ts.map +1 -1
  68. package/dist/src/unstable/install-meta/install-meta.d.ts +1 -1
  69. package/dist/src/unstable/install-meta/install-meta.d.ts.map +1 -1
  70. package/dist/src/unstable/install-meta/install-meta.js +1 -1
  71. package/dist/src/unstable/install-meta/install-meta.js.map +1 -1
  72. package/dist/src/unstable/install-method/install-method.d.ts +1 -1
  73. package/dist/src/unstable/install-method/install-method.d.ts.map +1 -1
  74. package/dist/src/unstable/install-method/install-method.js +1 -1
  75. package/dist/src/unstable/install-method/install-method.js.map +1 -1
  76. package/dist/src/unstable/lint/catalog/index.d.ts +39 -0
  77. package/dist/src/unstable/lint/catalog/index.d.ts.map +1 -0
  78. package/dist/src/unstable/lint/catalog/index.js +49 -0
  79. package/dist/src/unstable/lint/catalog/index.js.map +1 -0
  80. package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.d.ts +31 -0
  81. package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.d.ts.map +1 -0
  82. package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.js +41 -0
  83. package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.js.map +1 -0
  84. package/dist/src/unstable/lint/catalog/pack/manifest-present.d.ts +18 -0
  85. package/dist/src/unstable/lint/catalog/pack/manifest-present.d.ts.map +1 -0
  86. package/dist/src/unstable/lint/catalog/pack/manifest-present.js +41 -0
  87. package/dist/src/unstable/lint/catalog/pack/manifest-present.js.map +1 -0
  88. package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.d.ts +26 -0
  89. package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.d.ts.map +1 -0
  90. package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.js +34 -0
  91. package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.js.map +1 -0
  92. package/dist/src/unstable/lint/catalog/pack-accessor/contexts.d.ts +61 -0
  93. package/dist/src/unstable/lint/catalog/pack-accessor/contexts.d.ts.map +1 -0
  94. package/dist/src/unstable/lint/catalog/pack-accessor/contexts.js +46 -0
  95. package/dist/src/unstable/lint/catalog/pack-accessor/contexts.js.map +1 -0
  96. package/dist/src/unstable/lint/catalog/pack-accessor/platform.d.ts +53 -0
  97. package/dist/src/unstable/lint/catalog/pack-accessor/platform.d.ts.map +1 -0
  98. package/dist/src/unstable/lint/catalog/pack-accessor/platform.js +90 -0
  99. package/dist/src/unstable/lint/catalog/pack-accessor/platform.js.map +1 -0
  100. package/dist/src/unstable/lint/catalog/pack-accessor/vft.d.ts +60 -0
  101. package/dist/src/unstable/lint/catalog/pack-accessor/vft.d.ts.map +1 -0
  102. package/dist/src/unstable/lint/catalog/pack-accessor/vft.js +85 -0
  103. package/dist/src/unstable/lint/catalog/pack-accessor/vft.js.map +1 -0
  104. package/dist/src/unstable/lint/catalog/pack.d.ts +37 -0
  105. package/dist/src/unstable/lint/catalog/pack.d.ts.map +1 -0
  106. package/dist/src/unstable/lint/catalog/pack.js +47 -0
  107. package/dist/src/unstable/lint/catalog/pack.js.map +1 -0
  108. package/dist/src/unstable/lint/catalog/shared/schema-rule.d.ts +59 -0
  109. package/dist/src/unstable/lint/catalog/shared/schema-rule.d.ts.map +1 -0
  110. package/dist/src/unstable/lint/catalog/shared/schema-rule.js +99 -0
  111. package/dist/src/unstable/lint/catalog/shared/schema-rule.js.map +1 -0
  112. package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.d.ts +31 -0
  113. package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.d.ts.map +1 -0
  114. package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.js +151 -0
  115. package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.js.map +1 -0
  116. package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.d.ts +26 -0
  117. package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.d.ts.map +1 -0
  118. package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.js +41 -0
  119. package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.js.map +1 -0
  120. package/dist/src/unstable/lint/catalog/skill/manifest-present.d.ts +18 -0
  121. package/dist/src/unstable/lint/catalog/skill/manifest-present.d.ts.map +1 -0
  122. package/dist/src/unstable/lint/catalog/skill/manifest-present.js +46 -0
  123. package/dist/src/unstable/lint/catalog/skill/manifest-present.js.map +1 -0
  124. package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.d.ts +22 -0
  125. package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.d.ts.map +1 -0
  126. package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.js +37 -0
  127. package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.js.map +1 -0
  128. package/dist/src/unstable/lint/catalog/skill/skill-md-present.d.ts +17 -0
  129. package/dist/src/unstable/lint/catalog/skill/skill-md-present.d.ts.map +1 -0
  130. package/dist/src/unstable/lint/catalog/skill/skill-md-present.js +38 -0
  131. package/dist/src/unstable/lint/catalog/skill/skill-md-present.js.map +1 -0
  132. package/dist/src/unstable/lint/catalog/skill-accessor/contexts.d.ts +65 -0
  133. package/dist/src/unstable/lint/catalog/skill-accessor/contexts.d.ts.map +1 -0
  134. package/dist/src/unstable/lint/catalog/skill-accessor/contexts.js +50 -0
  135. package/dist/src/unstable/lint/catalog/skill-accessor/contexts.js.map +1 -0
  136. package/dist/src/unstable/lint/catalog/skill-accessor/platform.d.ts +52 -0
  137. package/dist/src/unstable/lint/catalog/skill-accessor/platform.d.ts.map +1 -0
  138. package/dist/src/unstable/lint/catalog/skill-accessor/platform.js +89 -0
  139. package/dist/src/unstable/lint/catalog/skill-accessor/platform.js.map +1 -0
  140. package/dist/src/unstable/lint/catalog/skill-accessor/vft.d.ts +58 -0
  141. package/dist/src/unstable/lint/catalog/skill-accessor/vft.d.ts.map +1 -0
  142. package/dist/src/unstable/lint/catalog/skill-accessor/vft.js +83 -0
  143. package/dist/src/unstable/lint/catalog/skill-accessor/vft.js.map +1 -0
  144. package/dist/src/unstable/lint/catalog/skill.d.ts +38 -0
  145. package/dist/src/unstable/lint/catalog/skill.d.ts.map +1 -0
  146. package/dist/src/unstable/lint/catalog/skill.js +52 -0
  147. package/dist/src/unstable/lint/catalog/skill.js.map +1 -0
  148. package/dist/src/unstable/lint/catalog/workspace/agents-detected-declared.d.ts +23 -0
  149. package/dist/src/unstable/lint/catalog/workspace/agents-detected-declared.d.ts.map +1 -0
  150. package/dist/src/unstable/lint/catalog/workspace/agents-detected-declared.js +75 -0
  151. package/dist/src/unstable/lint/catalog/workspace/agents-detected-declared.js.map +1 -0
  152. package/dist/src/unstable/lint/catalog/workspace/agents-recognized.d.ts +23 -0
  153. package/dist/src/unstable/lint/catalog/workspace/agents-recognized.d.ts.map +1 -0
  154. package/dist/src/unstable/lint/catalog/workspace/agents-recognized.js +76 -0
  155. package/dist/src/unstable/lint/catalog/workspace/agents-recognized.js.map +1 -0
  156. package/dist/src/unstable/lint/catalog/workspace/helpers/empty.d.ts +18 -0
  157. package/dist/src/unstable/lint/catalog/workspace/helpers/empty.d.ts.map +1 -0
  158. package/dist/src/unstable/lint/catalog/workspace/helpers/empty.js +16 -0
  159. package/dist/src/unstable/lint/catalog/workspace/helpers/empty.js.map +1 -0
  160. package/dist/src/unstable/lint/catalog/workspace/helpers/install-ops.d.ts +133 -0
  161. package/dist/src/unstable/lint/catalog/workspace/helpers/install-ops.d.ts.map +1 -0
  162. package/dist/src/unstable/lint/catalog/workspace/helpers/install-ops.js +149 -0
  163. package/dist/src/unstable/lint/catalog/workspace/helpers/install-ops.js.map +1 -0
  164. package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.d.ts +25 -0
  165. package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.d.ts.map +1 -0
  166. package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.js +30 -0
  167. package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.js.map +1 -0
  168. package/dist/src/unstable/lint/catalog/workspace/initialized.d.ts +22 -0
  169. package/dist/src/unstable/lint/catalog/workspace/initialized.d.ts.map +1 -0
  170. package/dist/src/unstable/lint/catalog/workspace/initialized.js +55 -0
  171. package/dist/src/unstable/lint/catalog/workspace/initialized.js.map +1 -0
  172. package/dist/src/unstable/lint/catalog/workspace/lockfile-valid.d.ts +33 -0
  173. package/dist/src/unstable/lint/catalog/workspace/lockfile-valid.d.ts.map +1 -0
  174. package/dist/src/unstable/lint/catalog/workspace/lockfile-valid.js +125 -0
  175. package/dist/src/unstable/lint/catalog/workspace/lockfile-valid.js.map +1 -0
  176. package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.d.ts +19 -0
  177. package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.d.ts.map +1 -0
  178. package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.js +145 -0
  179. package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.js.map +1 -0
  180. package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.d.ts +17 -0
  181. package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.d.ts.map +1 -0
  182. package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.js +107 -0
  183. package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.js.map +1 -0
  184. package/dist/src/unstable/lint/catalog/workspace/packs-members-retained.d.ts +22 -0
  185. package/dist/src/unstable/lint/catalog/workspace/packs-members-retained.d.ts.map +1 -0
  186. package/dist/src/unstable/lint/catalog/workspace/packs-members-retained.js +163 -0
  187. package/dist/src/unstable/lint/catalog/workspace/packs-members-retained.js.map +1 -0
  188. package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.d.ts +28 -0
  189. package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.d.ts.map +1 -0
  190. package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.js +67 -0
  191. package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.js.map +1 -0
  192. package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-clean.d.ts +30 -0
  193. package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-clean.d.ts.map +1 -0
  194. package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-clean.js +232 -0
  195. package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-clean.js.map +1 -0
  196. package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-correct.d.ts +26 -0
  197. package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-correct.d.ts.map +1 -0
  198. package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-correct.js +129 -0
  199. package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-correct.js.map +1 -0
  200. package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.d.ts +26 -0
  201. package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.d.ts.map +1 -0
  202. package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.js +151 -0
  203. package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.js.map +1 -0
  204. package/dist/src/unstable/lint/catalog/workspace/skills-integrity-valid.d.ts +29 -0
  205. package/dist/src/unstable/lint/catalog/workspace/skills-integrity-valid.d.ts.map +1 -0
  206. package/dist/src/unstable/lint/catalog/workspace/skills-integrity-valid.js +149 -0
  207. package/dist/src/unstable/lint/catalog/workspace/skills-integrity-valid.js.map +1 -0
  208. package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.d.ts +29 -0
  209. package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.d.ts.map +1 -0
  210. package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.js +242 -0
  211. package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.js.map +1 -0
  212. package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.d.ts +141 -0
  213. package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.d.ts.map +1 -0
  214. package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.js +123 -0
  215. package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.js.map +1 -0
  216. package/dist/src/unstable/lint/catalog/workspace-accessor/interpret-ops.d.ts +38 -0
  217. package/dist/src/unstable/lint/catalog/workspace-accessor/interpret-ops.d.ts.map +1 -0
  218. package/dist/src/unstable/lint/catalog/workspace-accessor/interpret-ops.js +311 -0
  219. package/dist/src/unstable/lint/catalog/workspace-accessor/interpret-ops.js.map +1 -0
  220. package/dist/src/unstable/lint/catalog/workspace-accessor/platform.d.ts +60 -0
  221. package/dist/src/unstable/lint/catalog/workspace-accessor/platform.d.ts.map +1 -0
  222. package/dist/src/unstable/lint/catalog/workspace-accessor/platform.js +201 -0
  223. package/dist/src/unstable/lint/catalog/workspace-accessor/platform.js.map +1 -0
  224. package/dist/src/unstable/lint/catalog/workspace-accessor/test-state.d.ts +65 -0
  225. package/dist/src/unstable/lint/catalog/workspace-accessor/test-state.d.ts.map +1 -0
  226. package/dist/src/unstable/lint/catalog/workspace-accessor/test-state.js +95 -0
  227. package/dist/src/unstable/lint/catalog/workspace-accessor/test-state.js.map +1 -0
  228. package/dist/src/unstable/lint/catalog/workspace.d.ts +47 -0
  229. package/dist/src/unstable/lint/catalog/workspace.d.ts.map +1 -0
  230. package/dist/src/unstable/lint/catalog/workspace.js +80 -0
  231. package/dist/src/unstable/lint/catalog/workspace.js.map +1 -0
  232. package/dist/src/unstable/lint/cli.d.ts +297 -0
  233. package/dist/src/unstable/lint/cli.d.ts.map +1 -0
  234. package/dist/src/unstable/lint/cli.js +388 -0
  235. package/dist/src/unstable/lint/cli.js.map +1 -0
  236. package/dist/src/unstable/lint/compose-path.d.ts +27 -0
  237. package/dist/src/unstable/lint/compose-path.d.ts.map +1 -0
  238. package/dist/src/unstable/lint/compose-path.js +61 -0
  239. package/dist/src/unstable/lint/compose-path.js.map +1 -0
  240. package/dist/src/unstable/lint/config.d.ts +103 -0
  241. package/dist/src/unstable/lint/config.d.ts.map +1 -0
  242. package/dist/src/unstable/lint/config.js +137 -0
  243. package/dist/src/unstable/lint/config.js.map +1 -0
  244. package/dist/src/unstable/lint/context.d.ts +265 -0
  245. package/dist/src/unstable/lint/context.d.ts.map +1 -0
  246. package/dist/src/unstable/lint/context.js +21 -0
  247. package/dist/src/unstable/lint/context.js.map +1 -0
  248. package/dist/src/unstable/lint/evaluate.d.ts +68 -0
  249. package/dist/src/unstable/lint/evaluate.d.ts.map +1 -0
  250. package/dist/src/unstable/lint/evaluate.js +147 -0
  251. package/dist/src/unstable/lint/evaluate.js.map +1 -0
  252. package/dist/src/unstable/lint/index.d.ts +28 -0
  253. package/dist/src/unstable/lint/index.d.ts.map +1 -0
  254. package/dist/src/unstable/lint/index.js +35 -0
  255. package/dist/src/unstable/lint/index.js.map +1 -0
  256. package/dist/src/unstable/lint/issues-to-findings.d.ts +35 -0
  257. package/dist/src/unstable/lint/issues-to-findings.d.ts.map +1 -0
  258. package/dist/src/unstable/lint/issues-to-findings.js +97 -0
  259. package/dist/src/unstable/lint/issues-to-findings.js.map +1 -0
  260. package/dist/src/unstable/lint/rule.d.ts +139 -0
  261. package/dist/src/unstable/lint/rule.d.ts.map +1 -0
  262. package/dist/src/unstable/lint/rule.js +25 -0
  263. package/dist/src/unstable/lint/rule.js.map +1 -0
  264. package/dist/src/unstable/lockfile/schema.d.ts +404 -404
  265. package/dist/src/unstable/mcp-servers/manager.d.ts +1 -1
  266. package/dist/src/unstable/mcp-servers/manager.d.ts.map +1 -1
  267. package/dist/src/unstable/mcp-servers/manager.js +1 -1
  268. package/dist/src/unstable/mcp-servers/manager.js.map +1 -1
  269. package/dist/src/unstable/mcp-servers/operations/install.d.ts +1 -1
  270. package/dist/src/unstable/mcp-servers/operations/install.d.ts.map +1 -1
  271. package/dist/src/unstable/mcp-servers/operations/publish.d.ts +1 -1
  272. package/dist/src/unstable/mcp-servers/operations/publish.d.ts.map +1 -1
  273. package/dist/src/unstable/mcp-servers/operations/uninstall.d.ts +1 -1
  274. package/dist/src/unstable/mcp-servers/operations/uninstall.d.ts.map +1 -1
  275. package/dist/src/unstable/packs/manager.d.ts +1 -1
  276. package/dist/src/unstable/packs/manager.d.ts.map +1 -1
  277. package/dist/src/unstable/packs/manager.js +1 -1
  278. package/dist/src/unstable/packs/manager.js.map +1 -1
  279. package/dist/src/unstable/packs/operations/add-to-pack.d.ts +2 -2
  280. package/dist/src/unstable/packs/operations/add-to-pack.d.ts.map +1 -1
  281. package/dist/src/unstable/packs/operations/install.d.ts +2 -2
  282. package/dist/src/unstable/packs/operations/install.d.ts.map +1 -1
  283. package/dist/src/unstable/packs/operations/install.js +41 -0
  284. package/dist/src/unstable/packs/operations/install.js.map +1 -1
  285. package/dist/src/unstable/packs/operations/new-pack.d.ts +2 -2
  286. package/dist/src/unstable/packs/operations/new-pack.d.ts.map +1 -1
  287. package/dist/src/unstable/packs/operations/publish.d.ts +2 -2
  288. package/dist/src/unstable/packs/operations/publish.d.ts.map +1 -1
  289. package/dist/src/unstable/packs/operations/publish.js +1 -0
  290. package/dist/src/unstable/packs/operations/publish.js.map +1 -1
  291. package/dist/src/unstable/packs/operations/remove-from-pack.d.ts +2 -2
  292. package/dist/src/unstable/packs/operations/remove-from-pack.d.ts.map +1 -1
  293. package/dist/src/unstable/packs/operations/uninstall.d.ts +2 -2
  294. package/dist/src/unstable/packs/operations/uninstall.d.ts.map +1 -1
  295. package/dist/src/unstable/packs/operations/unpack.d.ts +2 -2
  296. package/dist/src/unstable/packs/operations/unpack.d.ts.map +1 -1
  297. package/dist/src/unstable/{workspace → plan}/apply-plan.d.ts +9 -0
  298. package/dist/src/unstable/plan/apply-plan.d.ts.map +1 -0
  299. package/dist/src/unstable/{workspace → plan}/apply-plan.js +10 -1
  300. package/dist/src/unstable/plan/apply-plan.js.map +1 -0
  301. package/dist/src/unstable/plan/index.d.ts +24 -0
  302. package/dist/src/unstable/plan/index.d.ts.map +1 -0
  303. package/dist/src/unstable/plan/index.js +28 -0
  304. package/dist/src/unstable/plan/index.js.map +1 -0
  305. package/dist/src/unstable/{workspace → plan}/plan.d.ts +6 -0
  306. package/dist/src/unstable/plan/plan.d.ts.map +1 -0
  307. package/dist/src/unstable/{workspace → plan}/plan.js +6 -0
  308. package/dist/src/unstable/plan/plan.js.map +1 -0
  309. package/dist/src/unstable/{workspace → plan}/resolve-plan.d.ts +30 -2
  310. package/dist/src/unstable/plan/resolve-plan.d.ts.map +1 -0
  311. package/dist/src/unstable/{workspace → plan}/resolve-plan.js +37 -6
  312. package/dist/src/unstable/plan/resolve-plan.js.map +1 -0
  313. package/dist/src/unstable/publish/manifest-policy.d.ts +8 -8
  314. package/dist/src/unstable/registry/__generated__/registry-client.d.ts +675 -518
  315. package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
  316. package/dist/src/unstable/registry/__generated__/registry-client.js +546 -396
  317. package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
  318. package/dist/src/unstable/registry/remote-client.d.ts.map +1 -1
  319. package/dist/src/unstable/registry/remote-client.js +123 -18
  320. package/dist/src/unstable/registry/remote-client.js.map +1 -1
  321. package/dist/src/unstable/registry/schema.d.ts +2 -2
  322. package/dist/src/unstable/settings/index.d.ts +2 -0
  323. package/dist/src/unstable/settings/index.d.ts.map +1 -1
  324. package/dist/src/unstable/settings/index.js +1 -0
  325. package/dist/src/unstable/settings/index.js.map +1 -1
  326. package/dist/src/unstable/settings/schema.d.ts +3 -0
  327. package/dist/src/unstable/settings/schema.d.ts.map +1 -1
  328. package/dist/src/unstable/settings/schema.js +3 -0
  329. package/dist/src/unstable/settings/schema.js.map +1 -1
  330. package/dist/src/unstable/settings/settings.d.ts +10 -0
  331. package/dist/src/unstable/settings/settings.d.ts.map +1 -1
  332. package/dist/src/unstable/skills/manager.d.ts +1 -1
  333. package/dist/src/unstable/skills/manager.d.ts.map +1 -1
  334. package/dist/src/unstable/skills/manager.js +2 -2
  335. package/dist/src/unstable/skills/manager.js.map +1 -1
  336. package/dist/src/unstable/skills/materialization.js +1 -1
  337. package/dist/src/unstable/skills/materialization.js.map +1 -1
  338. package/dist/src/unstable/skills/operations/copy.d.ts +2 -2
  339. package/dist/src/unstable/skills/operations/copy.d.ts.map +1 -1
  340. package/dist/src/unstable/skills/operations/disable.d.ts +2 -2
  341. package/dist/src/unstable/skills/operations/disable.d.ts.map +1 -1
  342. package/dist/src/unstable/skills/operations/enable.d.ts +2 -2
  343. package/dist/src/unstable/skills/operations/enable.d.ts.map +1 -1
  344. package/dist/src/unstable/skills/operations/install.d.ts +2 -2
  345. package/dist/src/unstable/skills/operations/install.d.ts.map +1 -1
  346. package/dist/src/unstable/skills/operations/install.js +1 -1
  347. package/dist/src/unstable/skills/operations/install.js.map +1 -1
  348. package/dist/src/unstable/skills/operations/new-skill.d.ts +2 -2
  349. package/dist/src/unstable/skills/operations/new-skill.d.ts.map +1 -1
  350. package/dist/src/unstable/skills/operations/publish.d.ts +2 -2
  351. package/dist/src/unstable/skills/operations/publish.d.ts.map +1 -1
  352. package/dist/src/unstable/skills/operations/rename.d.ts +2 -2
  353. package/dist/src/unstable/skills/operations/rename.d.ts.map +1 -1
  354. package/dist/src/unstable/skills/operations/uninstall.d.ts +2 -2
  355. package/dist/src/unstable/skills/operations/uninstall.d.ts.map +1 -1
  356. package/dist/src/unstable/skills/operations/uninstall.js +1 -1
  357. package/dist/src/unstable/skills/operations/uninstall.js.map +1 -1
  358. package/dist/src/unstable/source-resolution/service.d.ts +1 -1
  359. package/dist/src/unstable/source-resolution/service.d.ts.map +1 -1
  360. package/dist/src/unstable/source-resolution/service.js +1 -1
  361. package/dist/src/unstable/source-resolution/service.js.map +1 -1
  362. package/dist/src/unstable/sources/types.d.ts +29 -29
  363. package/dist/src/unstable/sources/types.d.ts.map +1 -1
  364. package/dist/src/unstable/subagents/manager.d.ts +1 -1
  365. package/dist/src/unstable/subagents/manager.d.ts.map +1 -1
  366. package/dist/src/unstable/subagents/manager.js +4 -4
  367. package/dist/src/unstable/subagents/manager.js.map +1 -1
  368. package/dist/src/unstable/subagents/manifest-schema.js +2 -2
  369. package/dist/src/unstable/subagents/manifest-schema.js.map +1 -1
  370. package/dist/src/unstable/subagents/operations/disable.d.ts +2 -2
  371. package/dist/src/unstable/subagents/operations/disable.d.ts.map +1 -1
  372. package/dist/src/unstable/subagents/operations/enable.d.ts +2 -2
  373. package/dist/src/unstable/subagents/operations/enable.d.ts.map +1 -1
  374. package/dist/src/unstable/subagents/operations/publish.d.ts +2 -2
  375. package/dist/src/unstable/subagents/operations/publish.d.ts.map +1 -1
  376. package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts +20 -12
  377. package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts.map +1 -1
  378. package/dist/src/unstable/telemetry/__generated__/telemetry-client.js +11 -3
  379. package/dist/src/unstable/telemetry/__generated__/telemetry-client.js.map +1 -1
  380. package/dist/src/unstable/telemetry/client.d.ts +1 -1
  381. package/dist/src/unstable/telemetry/client.d.ts.map +1 -1
  382. package/dist/src/unstable/telemetry/client.js +1 -1
  383. package/dist/src/unstable/telemetry/client.js.map +1 -1
  384. package/dist/src/unstable/update-check/update-check.d.ts +1 -1
  385. package/dist/src/unstable/update-check/update-check.d.ts.map +1 -1
  386. package/dist/src/unstable/update-check/update-check.js +1 -1
  387. package/dist/src/unstable/update-check/update-check.js.map +1 -1
  388. package/dist/src/unstable/utils/fs-helpers.d.ts +7 -6
  389. package/dist/src/unstable/utils/fs-helpers.d.ts.map +1 -1
  390. package/dist/src/unstable/utils/fs-helpers.js +9 -9
  391. package/dist/src/unstable/utils/fs-helpers.js.map +1 -1
  392. package/dist/src/unstable/workflows/install-command/workflow.d.ts +1 -1
  393. package/dist/src/unstable/workflows/install-command/workflow.d.ts.map +1 -1
  394. package/dist/src/unstable/workflows/install-command/workflow.js +1 -1
  395. package/dist/src/unstable/workflows/install-command/workflow.js.map +1 -1
  396. package/dist/src/unstable/workflows/uninstall-command/workflow.d.ts +1 -1
  397. package/dist/src/unstable/workflows/uninstall-command/workflow.d.ts.map +1 -1
  398. package/dist/src/unstable/workflows/uninstall-command/workflow.js +1 -1
  399. package/dist/src/unstable/workflows/uninstall-command/workflow.js.map +1 -1
  400. package/dist/src/unstable/workspace/augment-plan.d.ts +1 -1
  401. package/dist/src/unstable/workspace/augment-plan.d.ts.map +1 -1
  402. package/dist/src/unstable/workspace/display-plan.d.ts +1 -1
  403. package/dist/src/unstable/workspace/display-plan.d.ts.map +1 -1
  404. package/dist/src/unstable/workspace/display-plan.js +1 -1
  405. package/dist/src/unstable/workspace/display-plan.js.map +1 -1
  406. package/dist/src/unstable/workspace/index.d.ts +1 -5
  407. package/dist/src/unstable/workspace/index.d.ts.map +1 -1
  408. package/dist/src/unstable/workspace/index.js +5 -7
  409. package/dist/src/unstable/workspace/index.js.map +1 -1
  410. package/dist/src/unstable/workspace/initialization-interaction.d.ts +1 -1
  411. package/dist/src/unstable/workspace/initialization-interaction.d.ts.map +1 -1
  412. package/dist/src/unstable/workspace/initialization-interaction.js +1 -1
  413. package/dist/src/unstable/workspace/initialization-interaction.js.map +1 -1
  414. package/dist/src/unstable/workspace/initialization.d.ts +15 -0
  415. package/dist/src/unstable/workspace/initialization.d.ts.map +1 -1
  416. package/dist/src/unstable/workspace/initialization.js +2 -2
  417. package/dist/src/unstable/workspace/initialization.js.map +1 -1
  418. package/dist/src/unstable/workspace/paths.d.ts +4 -21
  419. package/dist/src/unstable/workspace/paths.d.ts.map +1 -1
  420. package/dist/src/unstable/workspace/paths.js +19 -8
  421. package/dist/src/unstable/workspace/paths.js.map +1 -1
  422. package/dist/src/unstable/workspace/reconciliation.d.ts +1 -1
  423. package/dist/src/unstable/workspace/reconciliation.d.ts.map +1 -1
  424. package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts +1 -1
  425. package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts.map +1 -1
  426. package/dist/src/unstable/workspace/resolve-plan-interaction.js +1 -1
  427. package/dist/src/unstable/workspace/resolve-plan-interaction.js.map +1 -1
  428. package/dist/src/unstable/workspace/scan-plan-readiness.d.ts +1 -1
  429. package/dist/src/unstable/workspace/scan-plan-readiness.d.ts.map +1 -1
  430. package/dist/src/unstable/workspace/service-interface.d.ts +3 -1
  431. package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
  432. package/dist/src/unstable/workspace/service-interface.js +1 -1
  433. package/dist/src/unstable/workspace/service-interface.js.map +1 -1
  434. package/dist/src/unstable/workspace/service.js +1 -1
  435. package/dist/src/unstable/workspace/service.js.map +1 -1
  436. package/dist/src/unstable/workspace/settings-validation/types.d.ts +11 -1
  437. package/dist/src/unstable/workspace/settings-validation/types.d.ts.map +1 -1
  438. package/dist/src/unstable/workspace/version-currency/check-currency.d.ts +41 -0
  439. package/dist/src/unstable/workspace/version-currency/check-currency.d.ts.map +1 -0
  440. package/dist/src/unstable/workspace/version-currency/check-currency.js +50 -0
  441. package/dist/src/unstable/workspace/version-currency/check-currency.js.map +1 -0
  442. package/dist/src/unstable/workspace/version-currency/collectors.d.ts +55 -0
  443. package/dist/src/unstable/workspace/version-currency/collectors.d.ts.map +1 -0
  444. package/dist/src/unstable/workspace/version-currency/collectors.js +127 -0
  445. package/dist/src/unstable/workspace/version-currency/collectors.js.map +1 -0
  446. package/dist/src/unstable/workspace/version-currency/index.d.ts +11 -0
  447. package/dist/src/unstable/workspace/version-currency/index.d.ts.map +1 -0
  448. package/dist/src/unstable/workspace/version-currency/index.js +11 -0
  449. package/dist/src/unstable/workspace/version-currency/index.js.map +1 -0
  450. package/dist/src/unstable/workspace/version-currency/test-stubs.d.ts +5 -0
  451. package/dist/src/unstable/workspace/version-currency/test-stubs.d.ts.map +1 -0
  452. package/dist/src/unstable/workspace/version-currency/test-stubs.js +31 -0
  453. package/dist/src/unstable/workspace/version-currency/test-stubs.js.map +1 -0
  454. package/package.json +14 -6
  455. package/dist/src/unstable/workspace/apply-plan.d.ts.map +0 -1
  456. package/dist/src/unstable/workspace/apply-plan.js.map +0 -1
  457. package/dist/src/unstable/workspace/doctor/check-def.d.ts +0 -29
  458. package/dist/src/unstable/workspace/doctor/check-def.d.ts.map +0 -1
  459. package/dist/src/unstable/workspace/doctor/check-def.js +0 -17
  460. package/dist/src/unstable/workspace/doctor/check-def.js.map +0 -1
  461. package/dist/src/unstable/workspace/doctor/checks/agents-configured.d.ts +0 -5
  462. package/dist/src/unstable/workspace/doctor/checks/agents-configured.d.ts.map +0 -1
  463. package/dist/src/unstable/workspace/doctor/checks/agents-configured.js +0 -170
  464. package/dist/src/unstable/workspace/doctor/checks/agents-configured.js.map +0 -1
  465. package/dist/src/unstable/workspace/doctor/checks/extensions-installed.d.ts +0 -5
  466. package/dist/src/unstable/workspace/doctor/checks/extensions-installed.d.ts.map +0 -1
  467. package/dist/src/unstable/workspace/doctor/checks/extensions-installed.js +0 -472
  468. package/dist/src/unstable/workspace/doctor/checks/extensions-installed.js.map +0 -1
  469. package/dist/src/unstable/workspace/doctor/checks/workspace-ready.d.ts +0 -5
  470. package/dist/src/unstable/workspace/doctor/checks/workspace-ready.d.ts.map +0 -1
  471. package/dist/src/unstable/workspace/doctor/checks/workspace-ready.js +0 -201
  472. package/dist/src/unstable/workspace/doctor/checks/workspace-ready.js.map +0 -1
  473. package/dist/src/unstable/workspace/doctor/diagnose.d.ts +0 -49
  474. package/dist/src/unstable/workspace/doctor/diagnose.d.ts.map +0 -1
  475. package/dist/src/unstable/workspace/doctor/diagnose.js +0 -65
  476. package/dist/src/unstable/workspace/doctor/diagnose.js.map +0 -1
  477. package/dist/src/unstable/workspace/doctor/index.d.ts +0 -8
  478. package/dist/src/unstable/workspace/doctor/index.d.ts.map +0 -1
  479. package/dist/src/unstable/workspace/doctor/index.js +0 -6
  480. package/dist/src/unstable/workspace/doctor/index.js.map +0 -1
  481. package/dist/src/unstable/workspace/doctor/rollup.d.ts +0 -4
  482. package/dist/src/unstable/workspace/doctor/rollup.d.ts.map +0 -1
  483. package/dist/src/unstable/workspace/doctor/rollup.js +0 -28
  484. package/dist/src/unstable/workspace/doctor/rollup.js.map +0 -1
  485. package/dist/src/unstable/workspace/doctor/runner.d.ts +0 -6
  486. package/dist/src/unstable/workspace/doctor/runner.d.ts.map +0 -1
  487. package/dist/src/unstable/workspace/doctor/runner.js +0 -179
  488. package/dist/src/unstable/workspace/doctor/runner.js.map +0 -1
  489. package/dist/src/unstable/workspace/doctor/types.d.ts +0 -125
  490. package/dist/src/unstable/workspace/doctor/types.d.ts.map +0 -1
  491. package/dist/src/unstable/workspace/doctor/types.js +0 -58
  492. package/dist/src/unstable/workspace/doctor/types.js.map +0 -1
  493. package/dist/src/unstable/workspace/plan.d.ts.map +0 -1
  494. package/dist/src/unstable/workspace/plan.js.map +0 -1
  495. package/dist/src/unstable/workspace/resolve-plan.d.ts.map +0 -1
  496. package/dist/src/unstable/workspace/resolve-plan.js.map +0 -1
  497. package/dist/src/unstable/workspace/sync.d.ts +0 -17
  498. package/dist/src/unstable/workspace/sync.d.ts.map +0 -1
  499. package/dist/src/unstable/workspace/sync.js +0 -142
  500. package/dist/src/unstable/workspace/sync.js.map +0 -1
@@ -0,0 +1,137 @@
1
+ /**
2
+ * `LintConfig` — workspace-settings-level lint configuration.
3
+ *
4
+ * Workspace `.axm/settings.json` carries a `lint` section whose `rules` map
5
+ * binds rule ids to `"off" | "info" | "warn" | "error"`. The registry publish
6
+ * gate ignores workspace overrides; this config affects `axm lint` only.
7
+ *
8
+ * Keys are **exact** rule ids (`<namespace>/<name>`). No glob, wildcard, or
9
+ * regex syntax is accepted in v1. The accepted-key set is built at schema
10
+ * construction time from rule ids registered via `registerLintRuleIds` — the
11
+ * three v1 catalogs (`skill/*`, `pack/*`, `workspace/*`) each register their
12
+ * ids so adding a catalog in a later phase extends the set by construction.
13
+ *
14
+ * @experimental This API is unstable and may change without notice.
15
+ * @packageDocumentation
16
+ */
17
+ import * as Schema from "effect/Schema";
18
+ // -----------------------------------------------------------------------------
19
+ // Config value schema
20
+ // -----------------------------------------------------------------------------
21
+ /**
22
+ * Accepted values for a `lint.rules` entry.
23
+ *
24
+ * Note: `"warn"` is the config surface for `Severity` `"warning"`; mirror's
25
+ * ESLint convention. The evaluator treats `"warn"` as equivalent to `warning`
26
+ * severity; `"off"` suppresses emission.
27
+ *
28
+ * @experimental This API is unstable and may change without notice.
29
+ */
30
+ export const LintRuleSeveritySchema = Schema.Literals(["off", "info", "warn", "error"]).annotate({
31
+ identifier: "LintRuleSeverity",
32
+ title: "Lint Rule Severity",
33
+ description: "Severity override for a lint rule: 'off' silences it, 'info'/'warn'/'error' raise or lower severity.",
34
+ });
35
+ // -----------------------------------------------------------------------------
36
+ // Registered rule-id allowlist
37
+ // -----------------------------------------------------------------------------
38
+ /**
39
+ * Internal mutable registry of accepted rule ids, populated at module-load
40
+ * time by each rule catalog's side-effecting `registerLintRuleIds` call.
41
+ *
42
+ * The registry is module-local so callers in other packages can't extend it
43
+ * without going through `registerLintRuleIds`; the v1 catalogs register from
44
+ * `./catalog/skill.ts`, `./catalog/pack.ts`, and `./catalog/workspace.ts` in
45
+ * Phases 3a/3b/3c.
46
+ */
47
+ const registeredRuleIds = new Set();
48
+ /**
49
+ * Register one or more rule ids into the config allowlist.
50
+ *
51
+ * Each v1 rule catalog calls this once at module-load to extend the set of
52
+ * accepted `lint.rules` keys. Calls are additive and idempotent — registering
53
+ * an id twice is a no-op. A rule id that isn't registered will cause
54
+ * `SettingsSchema` decode to fail at the `lint.rules` key, surfacing the
55
+ * unknown id in the error path.
56
+ *
57
+ * Consumers (Phases 3a/3b/3c) should register from the catalog module by
58
+ * iterating the catalog's own rule array: no copy-paste of rule ids into this
59
+ * file.
60
+ *
61
+ * @experimental This API is unstable and may change without notice.
62
+ */
63
+ export const registerLintRuleIds = (ids) => {
64
+ for (const id of ids) {
65
+ registeredRuleIds.add(id);
66
+ }
67
+ };
68
+ /**
69
+ * Read-only view of the currently-registered rule ids.
70
+ *
71
+ * Mainly useful for tests and snapshots; production callers should not depend
72
+ * on ordering.
73
+ *
74
+ * @experimental This API is unstable and may change without notice.
75
+ */
76
+ export const registeredLintRuleIds = () => registeredRuleIds;
77
+ // -----------------------------------------------------------------------------
78
+ // Rules map schema
79
+ // -----------------------------------------------------------------------------
80
+ const ruleIdKeyFilter = Schema.makeFilter((input) => {
81
+ const invalid = [];
82
+ for (const key of Object.keys(input)) {
83
+ if (!registeredRuleIds.has(key)) {
84
+ invalid.push(key);
85
+ }
86
+ }
87
+ if (invalid.length === 0) {
88
+ return undefined;
89
+ }
90
+ return `Unknown lint rule id(s) in lint.rules: ${invalid.join(", ")}. Keys must be exact <namespace>/<name> ids; wildcards and globs are not supported.`;
91
+ });
92
+ /**
93
+ * Record of `<namespace>/<name>` ids to severity overrides.
94
+ *
95
+ * Unknown / wildcard / regex keys are rejected at decode by the filter — the
96
+ * filter walks the decoded record's keys and checks every key against the
97
+ * registered rule-id set. Wildcard patterns like `"skill/*"` fail the filter
98
+ * because they are not registered ids.
99
+ *
100
+ * @experimental This API is unstable and may change without notice.
101
+ */
102
+ export const LintRulesMapSchema = Schema.Record(Schema.String, LintRuleSeveritySchema)
103
+ .check(ruleIdKeyFilter)
104
+ .annotate({
105
+ identifier: "LintRulesMap",
106
+ title: "Lint Rules Map",
107
+ description: "Map of exact <namespace>/<name> rule ids to severity overrides for `axm lint`.",
108
+ });
109
+ // -----------------------------------------------------------------------------
110
+ // LintConfig schema
111
+ // -----------------------------------------------------------------------------
112
+ /**
113
+ * `lint` section of `.axm/settings.json`.
114
+ *
115
+ * Today only `rules` is defined; future fields (per-rule options, reporter
116
+ * selection) extend this struct. The schema rejects excess top-level keys so
117
+ * typos surface at decode.
118
+ *
119
+ * @experimental This API is unstable and may change without notice.
120
+ */
121
+ export const LintConfigSchema = Schema.Struct({
122
+ rules: Schema.optional(LintRulesMapSchema),
123
+ }).annotate({
124
+ identifier: "LintConfig",
125
+ title: "Lint Config",
126
+ description: "Workspace lint configuration under `lint` in `.axm/settings.json`.",
127
+ });
128
+ /**
129
+ * The platform-canonical `LintConfig` — empty rules, no overrides.
130
+ *
131
+ * Registry publish uses this config; it carries no overrides so every rule
132
+ * fires at its catalog severity.
133
+ *
134
+ * @experimental This API is unstable and may change without notice.
135
+ */
136
+ export const platformCanonicalLintConfig = { rules: {} };
137
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/unstable/lint/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,gFAAgF;AAChF,sBAAsB;AACtB,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/F,UAAU,EAAE,kBAAkB;IAC9B,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,sGAAsG;CACzG,CAAC,CAAC;AASH,gFAAgF;AAChF,+BAA+B;AAC/B,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;AAE5C;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAAqB,EAAQ,EAAE;IACjE,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA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AK,EAAE,EAAE,EAAE,CAAC"}
@@ -0,0 +1,265 @@
1
+ /**
2
+ * Rule-context types and narrow accessors.
3
+ *
4
+ * Each rule-context type bundles a caller-decoded `subject` with a narrow
5
+ * caller-bound accessor and a `displayRoot` used for path rendering. Rules
6
+ * consume accessors as ordinary property access (no Layer wiring); tests pass
7
+ * literal fakes.
8
+ *
9
+ * Phase 2 pins the context shapes and accessor interfaces. Phases 3a, 3b, and
10
+ * 3c land the concrete `subject` decoders and VFT-/platform-backed accessor
11
+ * implementations.
12
+ *
13
+ * Accessor surfaces are intentionally minimal — rules SHALL see only the
14
+ * methods the v1 catalog requires. Extending a surface is a Phase 3a/3b/3c
15
+ * action with a documented rule consumer, not a free action.
16
+ *
17
+ * @experimental This API is unstable and may change without notice.
18
+ * @packageDocumentation
19
+ */
20
+ import type * as Effect from "effect/Effect";
21
+ import type * as Option from "effect/Option";
22
+ import type { AgentDescriptor, AgentId } from "../agents/types.js";
23
+ /**
24
+ * Tagged error surfaced by `SkillFileAccessor` / `PackFileAccessor` when a
25
+ * read fails for reasons other than "file not found" (which is represented
26
+ * by `exists -> false`).
27
+ *
28
+ * Concrete implementations live in Phases 3a/3b; this interface fixes the
29
+ * error shape rules can rely on.
30
+ *
31
+ * @experimental This API is unstable and may change without notice.
32
+ */
33
+ export interface FileAccessError {
34
+ readonly _tag: "FileAccessError";
35
+ /** Accessor-relative posix path that failed. */
36
+ readonly path: string;
37
+ /** Machine-readable reason. */
38
+ readonly reason: "path-escape" | "read-error" | "io-error";
39
+ /** Human-readable detail; no rendered display path. */
40
+ readonly message: string;
41
+ }
42
+ /**
43
+ * Narrow skill-rooted file accessor.
44
+ *
45
+ * Root is the directory containing `SKILL.md`. Paths are posix and relative
46
+ * to the root; implementations MUST reject path-traversal attempts (`..`,
47
+ * absolute paths, symlink escapes) by returning `false` from `exists` or
48
+ * failing `readBytes` with `FileAccessError { reason: "path-escape" }`.
49
+ *
50
+ * @experimental This API is unstable and may change without notice.
51
+ */
52
+ export interface SkillFileAccessor {
53
+ readonly exists: (path: string) => Effect.Effect<boolean>;
54
+ readonly readBytes: (path: string) => Effect.Effect<Uint8Array, FileAccessError>;
55
+ }
56
+ /**
57
+ * Narrow pack-rooted file accessor.
58
+ *
59
+ * Root is the directory containing `extension-pack.json`. Same traversal
60
+ * constraints as `SkillFileAccessor`.
61
+ *
62
+ * @experimental This API is unstable and may change without notice.
63
+ */
64
+ export interface PackFileAccessor {
65
+ readonly exists: (path: string) => Effect.Effect<boolean>;
66
+ readonly readBytes: (path: string) => Effect.Effect<Uint8Array, FileAccessError>;
67
+ }
68
+ /**
69
+ * Raw workspace `settings.json` document as returned by the accessor.
70
+ *
71
+ * The accessor parses JSON but does NOT decode via `SettingsSchema` — the
72
+ * decode arm is the job of `workspace/settings-schema-valid`. Rules that
73
+ * need a typed shape call `Schema.decodeUnknown(SettingsSchema)` locally;
74
+ * those decodes produce no findings because `workspace/settings-schema-valid`
75
+ * already emits them.
76
+ *
77
+ * A `SettingsReadError` on the accessor's `settings` Effect means the bytes
78
+ * were unreadable or failed JSON.parse. Absence of the file surfaces via
79
+ * `exists(".axm/settings.json") -> false` and is owned by
80
+ * `workspace/initialized`.
81
+ *
82
+ * @experimental This API is unstable and may change without notice.
83
+ */
84
+ export type SettingsDocument = unknown;
85
+ /**
86
+ * Raw workspace `axm-lock.yaml` document as returned by the accessor.
87
+ *
88
+ * The accessor parses YAML but does NOT decode via `LockfileSchema` — the
89
+ * decode arm is the job of `workspace/lockfile-valid`. Rules that need a
90
+ * typed shape call `Schema.decodeUnknown(LockfileSchema)` locally; those
91
+ * decodes produce no findings because `workspace/lockfile-valid` already
92
+ * emits them.
93
+ *
94
+ * @experimental This API is unstable and may change without notice.
95
+ */
96
+ export type LockfileDocument = unknown;
97
+ /**
98
+ * Tagged error surfaced by workspace-level reads.
99
+ *
100
+ * @experimental This API is unstable and may change without notice.
101
+ */
102
+ export interface SettingsReadError {
103
+ readonly _tag: "SettingsReadError";
104
+ readonly message: string;
105
+ }
106
+ /**
107
+ * Tagged error surfaced by workspace lockfile reads.
108
+ *
109
+ * @experimental This API is unstable and may change without notice.
110
+ */
111
+ export interface LockfileReadError {
112
+ readonly _tag: "LockfileReadError";
113
+ readonly message: string;
114
+ }
115
+ /**
116
+ * A detected-but-not-declared coding agent surfaced by
117
+ * `WorkspaceLintAccessor.detectAgents`. Phase 3c refines this if the detector
118
+ * lands additional probe metadata.
119
+ *
120
+ * @experimental This API is unstable and may change without notice.
121
+ */
122
+ export interface AgentDetection {
123
+ readonly id: AgentId;
124
+ /** Path (posix, accessor-relative) that led to the detection. */
125
+ readonly markerPath: string;
126
+ }
127
+ /**
128
+ * Narrow workspace-rooted accessor.
129
+ *
130
+ * Exposes only the methods the v1 workspace catalog consumes; see `lint-engine`
131
+ * spec "Workspace accessor exposes only v1 methods." Extending this interface
132
+ * requires a concrete rule that needs the added method.
133
+ *
134
+ * @experimental This API is unstable and may change without notice.
135
+ */
136
+ export interface WorkspaceLintAccessor {
137
+ readonly settings: Effect.Effect<SettingsDocument, SettingsReadError>;
138
+ readonly lockfile: Effect.Effect<Option.Option<LockfileDocument>, LockfileReadError>;
139
+ readonly installedSkills: Effect.Effect<ReadonlyArray<SkillRuleContext>>;
140
+ readonly installedPacks: Effect.Effect<ReadonlyArray<PackRuleContext>>;
141
+ readonly knownAgents: Effect.Effect<ReadonlyArray<AgentDescriptor>>;
142
+ readonly detectAgents: (scope: "project" | "user") => Effect.Effect<ReadonlyArray<AgentDetection>>;
143
+ readonly exists: (path: string) => Effect.Effect<boolean>;
144
+ readonly isWritable: (path: string) => Effect.Effect<boolean>;
145
+ readonly list: (path: string) => Effect.Effect<ReadonlyArray<string>, FileAccessError>;
146
+ }
147
+ /**
148
+ * Context passed to `skill/*` rules.
149
+ *
150
+ * `subject` is the caller-decoded skill content (SKILL.md frontmatter +
151
+ * optional skill.json). Phase 3a refines the `subject` type to the concrete
152
+ * `SkillContent` shape; Phase 2 leaves it structurally open so the rule
153
+ * primitives don't need a circular dependency on the skill module.
154
+ *
155
+ * `displayRoot` is posix and relative; `""` means the accessor root is the
156
+ * rendering base. See `./compose-path.ts` for the four documented cases.
157
+ *
158
+ * @experimental This API is unstable and may change without notice.
159
+ */
160
+ export interface SkillRuleContext<S = SkillContent> {
161
+ readonly subject: S;
162
+ readonly files: SkillFileAccessor;
163
+ readonly displayRoot: string;
164
+ }
165
+ /**
166
+ * Concrete subject shape passed to `skill/*` rules.
167
+ *
168
+ * Rules read `SKILL.md` bytes through `context.files` (the authoritative
169
+ * source shared across publish and `axm lint`). The `subject` carries only
170
+ * what rules can't efficiently re-derive from bytes:
171
+ *
172
+ * - `isNative` — whether the caller expects this skill to carry a
173
+ * `skill.json` manifest. Native (registry-installed) skills set this to
174
+ * `true`; non-native (managed external) skills set it to `false`. Rules
175
+ * that depend on `skill.json` (`skill/manifest-present`,
176
+ * `skill/manifest-schema-valid`, `skill/manifest-keys-recognized`)
177
+ * early-return `[]` when `isNative === false`, so the same catalog covers
178
+ * both.
179
+ * - `skillJson` — the already-decoded `skill.json` contents when present
180
+ * (caller decodes once, rules don't re-read + re-parse). `undefined` when
181
+ * the file is absent. Schema-valid rules pipe this into
182
+ * `Schema.decodeUnknownResult(SkillManifestSchema)`; keys-recognized
183
+ * enumerates top-level keys after narrowing to `Record<string, unknown>`.
184
+ *
185
+ * Phase 3b and 3c consumers build `SkillContent` via
186
+ * `buildSkillRuleContexts` (this phase) against the `WorkspaceIndex`
187
+ * surface; publish (Phase 4, this-repo) builds one `SkillContent` per
188
+ * incoming archive.
189
+ *
190
+ * @experimental This API is unstable and may change without notice.
191
+ */
192
+ export interface SkillContent {
193
+ readonly isNative: boolean;
194
+ readonly skillJson: unknown;
195
+ }
196
+ /**
197
+ * Context passed to `pack/*` rules.
198
+ *
199
+ * `subject` is the caller-decoded pack content — concrete `PackContent` shape
200
+ * defined below. Packs are registry-only at v1 (no non-native arm), so the
201
+ * subject carries only the already-decoded manifest and rules read
202
+ * `extension-pack.json` bytes through `context.files` as needed.
203
+ *
204
+ * @experimental This API is unstable and may change without notice.
205
+ */
206
+ export interface PackRuleContext<S = PackContent> {
207
+ readonly subject: S;
208
+ readonly files: PackFileAccessor;
209
+ readonly displayRoot: string;
210
+ }
211
+ /**
212
+ * Concrete subject shape passed to `pack/*` rules.
213
+ *
214
+ * Rules read `extension-pack.json` bytes through `context.files` (the
215
+ * authoritative source shared across publish and `axm lint`). The `subject`
216
+ * carries only what rules can't efficiently re-derive from bytes:
217
+ *
218
+ * - `packJson` — the already-decoded `extension-pack.json` contents when
219
+ * present (caller decodes once, rules don't re-read + re-parse).
220
+ * `undefined` when the file is absent. Schema-valid rules pipe this into
221
+ * `Schema.decodeUnknownResult(ExtensionPackManifestSchema)`;
222
+ * keys-recognized enumerates top-level keys after narrowing to
223
+ * `Record<string, unknown>`.
224
+ *
225
+ * Unlike `SkillContent`, there is no `isNative` discriminator — packs are
226
+ * registry-only and every pack context is expected to expose a manifest.
227
+ * The presence rule (`pack/manifest-present`) owns the absence arm.
228
+ *
229
+ * Phase 3c consumers build `PackContent` via `buildPackRuleContexts`
230
+ * against the `WorkspaceIndex` surface; publish (Phase 4, this-repo) builds
231
+ * one `PackContent` per incoming archive.
232
+ *
233
+ * @experimental This API is unstable and may change without notice.
234
+ */
235
+ export interface PackContent {
236
+ readonly packJson: unknown;
237
+ }
238
+ /**
239
+ * Context passed to `workspace/*` rules.
240
+ *
241
+ * `subject.scope` is `"project"` (default) or `"user"` (user-level `.axm/`).
242
+ * Rules whose invariants apply at only one scope early-return `[]` via the
243
+ * `check` body.
244
+ *
245
+ * `subject.root` is an absolute filesystem path pinning the workspace root;
246
+ * typed as `string` in Phase 2 so the rule primitives don't depend on a
247
+ * platform-specific path brand.
248
+ *
249
+ * @experimental This API is unstable and may change without notice.
250
+ */
251
+ export interface WorkspaceRuleContext {
252
+ readonly subject: WorkspaceSubject;
253
+ readonly workspace: WorkspaceLintAccessor;
254
+ readonly displayRoot: string;
255
+ }
256
+ /**
257
+ * Workspace subject: the rule-addressable identity of the workspace under lint.
258
+ *
259
+ * @experimental This API is unstable and may change without notice.
260
+ */
261
+ export interface WorkspaceSubject {
262
+ readonly root: string;
263
+ readonly scope: "project" | "user";
264
+ }
265
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/unstable/lint/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAMnE;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,YAAY,GAAG,UAAU,CAAC;IAC3D,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAMD;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1D,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;CAClF;AAMD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1D,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,M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AAS,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;CACpC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Rule-context types and narrow accessors.
3
+ *
4
+ * Each rule-context type bundles a caller-decoded `subject` with a narrow
5
+ * caller-bound accessor and a `displayRoot` used for path rendering. Rules
6
+ * consume accessors as ordinary property access (no Layer wiring); tests pass
7
+ * literal fakes.
8
+ *
9
+ * Phase 2 pins the context shapes and accessor interfaces. Phases 3a, 3b, and
10
+ * 3c land the concrete `subject` decoders and VFT-/platform-backed accessor
11
+ * implementations.
12
+ *
13
+ * Accessor surfaces are intentionally minimal — rules SHALL see only the
14
+ * methods the v1 catalog requires. Extending a surface is a Phase 3a/3b/3c
15
+ * action with a documented rule consumer, not a free action.
16
+ *
17
+ * @experimental This API is unstable and may change without notice.
18
+ * @packageDocumentation
19
+ */
20
+ export {};
21
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/unstable/lint/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Pure evaluator for the lint engine.
3
+ *
4
+ * `evaluateContexts(rules, contexts, config)` pairs each rule with each context,
5
+ * invokes `rule.check`, applies severity overrides from `config.rules`, and
6
+ * drops findings whose configured severity is `"off"`. It never invokes
7
+ * `rule.fix` — that is the caller's job via `collectFixOperations` plus the
8
+ * plan pipeline.
9
+ *
10
+ * `collectFixOperations(evaluated)` walks the `AutofixableFinding`s produced
11
+ * above, invokes the matched rule's `fix`, flattens the returned operations
12
+ * and deduplicates them by structural equality. Two rules that emit the same
13
+ * `install-skill` Operation for the same target contribute it once.
14
+ *
15
+ * Both functions are plain `Effect` values; neither requires a Layer or an
16
+ * ambient service. See the `lint-engine` design doc §3 for the rationale
17
+ * behind library primitives over a central engine service.
18
+ *
19
+ * @experimental This API is unstable and may change without notice.
20
+ * @packageDocumentation
21
+ */
22
+ import * as Effect from "effect/Effect";
23
+ import type { Operation } from "../plan/plan.js";
24
+ import type { LintConfig } from "./config.js";
25
+ import type { LintFinding, LintRule } from "./rule.js";
26
+ /**
27
+ * One `(rule, context, findings)` evaluation result.
28
+ *
29
+ * `findings` is emitted after severity overrides from `config.rules` have been
30
+ * applied; rule-level severity is the platform default, finding-level severity
31
+ * is the effective post-override severity.
32
+ *
33
+ * @experimental This API is unstable and may change without notice.
34
+ */
35
+ export interface Evaluated<C> {
36
+ readonly rule: LintRule<C>;
37
+ readonly context: C;
38
+ readonly findings: ReadonlyArray<LintFinding>;
39
+ }
40
+ /**
41
+ * Pair each rule with each context, run `rule.check`, apply severity overrides
42
+ * from `config.rules`, and return one `Evaluated<C>` per pair.
43
+ *
44
+ * Findings whose configured severity is `"off"` are suppressed entirely; the
45
+ * `Evaluated` entry still ships (with an empty `findings` array) so consumers
46
+ * that group by rule still see the rule ran.
47
+ *
48
+ * Rules are evaluated in catalog order; contexts are evaluated in caller
49
+ * order. Rule-context invocation is sequential within a single
50
+ * `evaluateContexts` call so tests can observe deterministic ordering.
51
+ *
52
+ * @experimental This API is unstable and may change without notice.
53
+ */
54
+ export declare const evaluateContexts: <C>(rules: ReadonlyArray<LintRule<C>>, contexts: ReadonlyArray<C>, config: LintConfig) => Effect.Effect<ReadonlyArray<Evaluated<C>>>;
55
+ /**
56
+ * Walk the `AutofixableFinding`s in `evaluated`, invoke each matched rule's
57
+ * `fix`, flatten the returned operations, and deduplicate by structural
58
+ * equality of the Operation value.
59
+ *
60
+ * Structural equality is defined as JSON-serializable deep equality on
61
+ * `{ name, args }`. v1 operations are plain POJOs; if an operation later grows
62
+ * non-serializable fields, the dedupe key extraction lands alongside that
63
+ * change.
64
+ *
65
+ * @experimental This API is unstable and may change without notice.
66
+ */
67
+ export declare const collectFixOperations: <C>(evaluated: ReadonlyArray<Evaluated<C>>) => Effect.Effect<ReadonlyArray<Operation<string, unknown>>>;
68
+ //# sourceMappingURL=evaluate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/unstable/lint/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAIV,WAAW,EACX,QAAQ,EAET,MAAM,WAAW,CAAC;AAMnB;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CAC/C;AAgDD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAChC,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EACjC,UAAU,aAAa,CAAC,CAAC,CAAC,EAC1B,QAAQ,UAAU,KACjB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAKzC,CAAC;AA8BJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,EACpC,WAAW,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KACrC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA4BtD,CAAC"}
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Pure evaluator for the lint engine.
3
+ *
4
+ * `evaluateContexts(rules, contexts, config)` pairs each rule with each context,
5
+ * invokes `rule.check`, applies severity overrides from `config.rules`, and
6
+ * drops findings whose configured severity is `"off"`. It never invokes
7
+ * `rule.fix` — that is the caller's job via `collectFixOperations` plus the
8
+ * plan pipeline.
9
+ *
10
+ * `collectFixOperations(evaluated)` walks the `AutofixableFinding`s produced
11
+ * above, invokes the matched rule's `fix`, flattens the returned operations
12
+ * and deduplicates them by structural equality. Two rules that emit the same
13
+ * `install-skill` Operation for the same target contribute it once.
14
+ *
15
+ * Both functions are plain `Effect` values; neither requires a Layer or an
16
+ * ambient service. See the `lint-engine` design doc §3 for the rationale
17
+ * behind library primitives over a central engine service.
18
+ *
19
+ * @experimental This API is unstable and may change without notice.
20
+ * @packageDocumentation
21
+ */
22
+ import * as Array from "effect/Array";
23
+ import * as Effect from "effect/Effect";
24
+ // -----------------------------------------------------------------------------
25
+ // Severity override
26
+ // -----------------------------------------------------------------------------
27
+ /**
28
+ * Translate a `LintRuleSeverity` config value into an effective `Severity`
29
+ * or the `"off"` sentinel. `"warn"` maps to `"warning"` so downstream code
30
+ * sees the canonical three-severity alphabet.
31
+ *
32
+ * `config.rules` keys are exact rule ids with no wildcard / glob support in v1;
33
+ * see `./config.ts` for the schema.
34
+ */
35
+ const translateConfigValue = (value) => {
36
+ switch (value) {
37
+ case "warn":
38
+ return "warning";
39
+ case "off":
40
+ case "info":
41
+ case "error":
42
+ return value;
43
+ }
44
+ };
45
+ const applyOverride = (defaultSeverity, override) => {
46
+ if (override === undefined) {
47
+ return defaultSeverity;
48
+ }
49
+ return translateConfigValue(override);
50
+ };
51
+ const withSeverity = (finding, severity) => {
52
+ if (finding.kind === "autofixable") {
53
+ const next = { ...finding, severity };
54
+ return next;
55
+ }
56
+ const next = { ...finding, severity };
57
+ return next;
58
+ };
59
+ // -----------------------------------------------------------------------------
60
+ // evaluateContexts
61
+ // -----------------------------------------------------------------------------
62
+ /**
63
+ * Pair each rule with each context, run `rule.check`, apply severity overrides
64
+ * from `config.rules`, and return one `Evaluated<C>` per pair.
65
+ *
66
+ * Findings whose configured severity is `"off"` are suppressed entirely; the
67
+ * `Evaluated` entry still ships (with an empty `findings` array) so consumers
68
+ * that group by rule still see the rule ran.
69
+ *
70
+ * Rules are evaluated in catalog order; contexts are evaluated in caller
71
+ * order. Rule-context invocation is sequential within a single
72
+ * `evaluateContexts` call so tests can observe deterministic ordering.
73
+ *
74
+ * @experimental This API is unstable and may change without notice.
75
+ */
76
+ export const evaluateContexts = (rules, contexts, config) => Effect.forEach(rules.flatMap((rule) => contexts.map((context) => ({ rule, context }))), ({ rule, context }) => evaluateOne(rule, context, config), { concurrency: 1 });
77
+ const evaluateOne = (rule, context, config) => Effect.map(rule.check(context), (rawFindings) => ({
78
+ rule,
79
+ context,
80
+ findings: applySeverityConfig(rule, rawFindings, config),
81
+ }));
82
+ const applySeverityConfig = (rule, findings, config) => {
83
+ const override = config.rules?.[rule.id];
84
+ const effective = applyOverride(rule.severity, override);
85
+ if (effective === "off") {
86
+ return [];
87
+ }
88
+ return Array.map(findings, (finding) => withSeverity(finding, effective));
89
+ };
90
+ // -----------------------------------------------------------------------------
91
+ // collectFixOperations
92
+ // -----------------------------------------------------------------------------
93
+ /**
94
+ * Walk the `AutofixableFinding`s in `evaluated`, invoke each matched rule's
95
+ * `fix`, flatten the returned operations, and deduplicate by structural
96
+ * equality of the Operation value.
97
+ *
98
+ * Structural equality is defined as JSON-serializable deep equality on
99
+ * `{ name, args }`. v1 operations are plain POJOs; if an operation later grows
100
+ * non-serializable fields, the dedupe key extraction lands alongside that
101
+ * change.
102
+ *
103
+ * @experimental This API is unstable and may change without notice.
104
+ */
105
+ export const collectFixOperations = (evaluated) => Effect.gen(function* () {
106
+ const collected = [];
107
+ const seen = new Set();
108
+ for (const entry of evaluated) {
109
+ if (entry.rule.kind !== "autofixing") {
110
+ continue;
111
+ }
112
+ const rule = entry.rule;
113
+ for (const finding of entry.findings) {
114
+ if (finding.kind !== "autofixable") {
115
+ continue;
116
+ }
117
+ const ops = yield* rule.fix(entry.context, finding);
118
+ for (const op of ops) {
119
+ const key = dedupeKey(op);
120
+ if (seen.has(key)) {
121
+ continue;
122
+ }
123
+ seen.add(key);
124
+ collected.push(op);
125
+ }
126
+ }
127
+ }
128
+ return collected;
129
+ });
130
+ const dedupeKey = (op) => {
131
+ // Stable serialization: sort keys recursively to avoid collisions from
132
+ // property-order differences. v1 Operation args are plain JSON-compatible
133
+ // values; when that stops being true, dedupe extraction changes alongside.
134
+ return JSON.stringify(op, canonicalReplacer);
135
+ };
136
+ const canonicalReplacer = (_key, value) => {
137
+ if (!isPlainRecord(value)) {
138
+ return value;
139
+ }
140
+ const sorted = {};
141
+ for (const k of Object.keys(value).sort()) {
142
+ sorted[k] = value[k];
143
+ }
144
+ return sorted;
145
+ };
146
+ const isPlainRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
147
+ //# sourceMappingURL=evaluate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate.js","sourceRoot":"","sources":["../../../../src/unstable/lint/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AA+BxC,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAAG,CAAC,KAAuB,EAAoB,EAAE;IACzE,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,MAAM;YACT,OAAO,SAAS,CAAC;QACnB,KAAK,KAAK,CAAC;QACX,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACV,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CACpB,eAAyB,EACzB,QAA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