@wildo-ai/wildo-cli 1.1.9 → 1.1.10

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 (833) hide show
  1. package/dist/bin/wildo.d.ts.map +1 -1
  2. package/dist/bin/wildo.js +0 -0
  3. package/dist/bin/wildo.js.map +1 -1
  4. package/dist/src/commands/acp/probe.command.d.ts.map +1 -1
  5. package/dist/src/commands/acp/probe.command.js.map +1 -1
  6. package/dist/src/commands/align-deps.command.d.ts.map +1 -1
  7. package/dist/src/commands/align-deps.command.js.map +1 -1
  8. package/dist/src/commands/assets/sync.command.d.ts.map +1 -1
  9. package/dist/src/commands/assets/sync.command.js.map +1 -1
  10. package/dist/src/commands/brand/propagate.command.d.ts.map +1 -1
  11. package/dist/src/commands/brand/propagate.command.js.map +1 -1
  12. package/dist/src/commands/build/accept.command.d.ts.map +1 -1
  13. package/dist/src/commands/build/accept.command.js.map +1 -1
  14. package/dist/src/commands/build/dispatches.command.d.ts.map +1 -1
  15. package/dist/src/commands/build/dispatches.command.js.map +1 -1
  16. package/dist/src/commands/build/next.command.d.ts.map +1 -1
  17. package/dist/src/commands/build/next.command.js.map +1 -1
  18. package/dist/src/commands/build/rearm.command.d.ts.map +1 -1
  19. package/dist/src/commands/build/rearm.command.js.map +1 -1
  20. package/dist/src/commands/build/run.command.d.ts.map +1 -1
  21. package/dist/src/commands/build/run.command.js.map +1 -1
  22. package/dist/src/commands/build/tasks.command.d.ts.map +1 -1
  23. package/dist/src/commands/build/tasks.command.js.map +1 -1
  24. package/dist/src/commands/compose.command.d.ts.map +1 -1
  25. package/dist/src/commands/compose.command.js.map +1 -1
  26. package/dist/src/commands/config/check-resources.command.d.ts +50 -0
  27. package/dist/src/commands/config/check-resources.command.d.ts.map +1 -0
  28. package/dist/src/commands/config/check-resources.command.js +121 -0
  29. package/dist/src/commands/config/check-resources.command.js.map +1 -0
  30. package/dist/src/commands/config/data-retention.command.d.ts.map +1 -1
  31. package/dist/src/commands/config/data-retention.command.js.map +1 -1
  32. package/dist/src/commands/config/document-releases.command.d.ts.map +1 -1
  33. package/dist/src/commands/config/document-releases.command.js.map +1 -1
  34. package/dist/src/commands/config/legal-notice.command.d.ts +17 -0
  35. package/dist/src/commands/config/legal-notice.command.d.ts.map +1 -0
  36. package/dist/src/commands/config/legal-notice.command.js +59 -0
  37. package/dist/src/commands/config/legal-notice.command.js.map +1 -0
  38. package/dist/src/commands/config/mutate.command.d.ts.map +1 -1
  39. package/dist/src/commands/config/mutate.command.js.map +1 -1
  40. package/dist/src/commands/config/reapply-declaration.command.d.ts.map +1 -1
  41. package/dist/src/commands/config/reapply-declaration.command.js.map +1 -1
  42. package/dist/src/commands/config/service-consent.command.d.ts.map +1 -1
  43. package/dist/src/commands/config/service-consent.command.js.map +1 -1
  44. package/dist/src/commands/config/subject-data-recipients.command.d.ts.map +1 -1
  45. package/dist/src/commands/config/subject-data-recipients.command.js.map +1 -1
  46. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  47. package/dist/src/commands/config/sync.command.js.map +1 -1
  48. package/dist/src/commands/config/validate.command.d.ts +8 -0
  49. package/dist/src/commands/config/validate.command.d.ts.map +1 -1
  50. package/dist/src/commands/config/validate.command.js +65 -4
  51. package/dist/src/commands/config/validate.command.js.map +1 -1
  52. package/dist/src/commands/context/assurance-basis.command.d.ts.map +1 -1
  53. package/dist/src/commands/context/assurance-basis.command.js.map +1 -1
  54. package/dist/src/commands/context/coherence.command.d.ts.map +1 -1
  55. package/dist/src/commands/context/coherence.command.js.map +1 -1
  56. package/dist/src/commands/context/context-command.utils.d.ts.map +1 -1
  57. package/dist/src/commands/context/context-command.utils.js.map +1 -1
  58. package/dist/src/commands/context/elements.command.d.ts.map +1 -1
  59. package/dist/src/commands/context/elements.command.js.map +1 -1
  60. package/dist/src/commands/context/health.command.d.ts.map +1 -1
  61. package/dist/src/commands/context/health.command.js.map +1 -1
  62. package/dist/src/commands/context/info.command.d.ts.map +1 -1
  63. package/dist/src/commands/context/info.command.js.map +1 -1
  64. package/dist/src/commands/context/journey.command.d.ts +8 -2
  65. package/dist/src/commands/context/journey.command.d.ts.map +1 -1
  66. package/dist/src/commands/context/journey.command.js +102 -12
  67. package/dist/src/commands/context/journey.command.js.map +1 -1
  68. package/dist/src/commands/context/jurisdictions.command.d.ts.map +1 -1
  69. package/dist/src/commands/context/jurisdictions.command.js.map +1 -1
  70. package/dist/src/commands/context/launch-blockers.command.d.ts +2 -1
  71. package/dist/src/commands/context/launch-blockers.command.d.ts.map +1 -1
  72. package/dist/src/commands/context/launch-blockers.command.js +3 -2
  73. package/dist/src/commands/context/launch-blockers.command.js.map +1 -1
  74. package/dist/src/commands/context/list.command.d.ts.map +1 -1
  75. package/dist/src/commands/context/list.command.js.map +1 -1
  76. package/dist/src/commands/context/pipelines.command.d.ts.map +1 -1
  77. package/dist/src/commands/context/pipelines.command.js.map +1 -1
  78. package/dist/src/commands/context/workspace.command.d.ts.map +1 -1
  79. package/dist/src/commands/context/workspace.command.js.map +1 -1
  80. package/dist/src/commands/creation/accept.command.d.ts +4 -0
  81. package/dist/src/commands/creation/accept.command.d.ts.map +1 -1
  82. package/dist/src/commands/creation/accept.command.js +29 -4
  83. package/dist/src/commands/creation/accept.command.js.map +1 -1
  84. package/dist/src/commands/creation/answer.command.d.ts.map +1 -1
  85. package/dist/src/commands/creation/answer.command.js.map +1 -1
  86. package/dist/src/commands/creation/brand-logo.command.d.ts +18 -0
  87. package/dist/src/commands/creation/brand-logo.command.d.ts.map +1 -0
  88. package/dist/src/commands/creation/brand-logo.command.js +43 -0
  89. package/dist/src/commands/creation/brand-logo.command.js.map +1 -0
  90. package/dist/src/commands/creation/brief.command.d.ts.map +1 -1
  91. package/dist/src/commands/creation/brief.command.js.map +1 -1
  92. package/dist/src/commands/creation/deliberate.command.d.ts +2 -2
  93. package/dist/src/commands/creation/deliberate.command.d.ts.map +1 -1
  94. package/dist/src/commands/creation/deliberate.command.js +2 -2
  95. package/dist/src/commands/creation/deliberate.command.js.map +1 -1
  96. package/dist/src/commands/creation/depth.command.d.ts.map +1 -1
  97. package/dist/src/commands/creation/depth.command.js +1 -1
  98. package/dist/src/commands/creation/depth.command.js.map +1 -1
  99. package/dist/src/commands/creation/diff.command.d.ts.map +1 -1
  100. package/dist/src/commands/creation/diff.command.js.map +1 -1
  101. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  102. package/dist/src/commands/creation/feed.command.js.map +1 -1
  103. package/dist/src/commands/creation/loop.command.d.ts.map +1 -1
  104. package/dist/src/commands/creation/loop.command.js.map +1 -1
  105. package/dist/src/commands/creation/persona.command.d.ts +3 -2
  106. package/dist/src/commands/creation/persona.command.d.ts.map +1 -1
  107. package/dist/src/commands/creation/persona.command.js +10 -3
  108. package/dist/src/commands/creation/persona.command.js.map +1 -1
  109. package/dist/src/commands/creation/preflight.command.d.ts.map +1 -1
  110. package/dist/src/commands/creation/preflight.command.js.map +1 -1
  111. package/dist/src/commands/creation/prompt-hook.command.d.ts.map +1 -1
  112. package/dist/src/commands/creation/prompt-hook.command.js.map +1 -1
  113. package/dist/src/commands/creation/propose.command.d.ts.map +1 -1
  114. package/dist/src/commands/creation/propose.command.js.map +1 -1
  115. package/dist/src/commands/creation/pulse.command.d.ts.map +1 -1
  116. package/dist/src/commands/creation/pulse.command.js.map +1 -1
  117. package/dist/src/commands/creation/questions.command.d.ts.map +1 -1
  118. package/dist/src/commands/creation/questions.command.js.map +1 -1
  119. package/dist/src/commands/creation/reason.command.d.ts.map +1 -1
  120. package/dist/src/commands/creation/reason.command.js.map +1 -1
  121. package/dist/src/commands/creation/report.command.d.ts.map +1 -1
  122. package/dist/src/commands/creation/report.command.js.map +1 -1
  123. package/dist/src/commands/creation/revert.command.d.ts.map +1 -1
  124. package/dist/src/commands/creation/revert.command.js.map +1 -1
  125. package/dist/src/commands/creation/run.command.d.ts.map +1 -1
  126. package/dist/src/commands/creation/run.command.js.map +1 -1
  127. package/dist/src/commands/creation/statusline.command.d.ts.map +1 -1
  128. package/dist/src/commands/creation/statusline.command.js.map +1 -1
  129. package/dist/src/commands/creation/watch.command.d.ts.map +1 -1
  130. package/dist/src/commands/creation/watch.command.js.map +1 -1
  131. package/dist/src/commands/creation/why.command.d.ts +3 -1
  132. package/dist/src/commands/creation/why.command.d.ts.map +1 -1
  133. package/dist/src/commands/creation/why.command.js +28 -9
  134. package/dist/src/commands/creation/why.command.js.map +1 -1
  135. package/dist/src/commands/creation/writes.command.d.ts.map +1 -1
  136. package/dist/src/commands/creation/writes.command.js.map +1 -1
  137. package/dist/src/commands/db/db-schema-plan-migration.utils.d.ts.map +1 -1
  138. package/dist/src/commands/db/db-schema-plan-migration.utils.js.map +1 -1
  139. package/dist/src/commands/db/db-schema-plan.utils.d.ts.map +1 -1
  140. package/dist/src/commands/db/db-schema-plan.utils.js.map +1 -1
  141. package/dist/src/commands/db/diff.command.d.ts.map +1 -1
  142. package/dist/src/commands/db/diff.command.js.map +1 -1
  143. package/dist/src/commands/db/generate.command.d.ts.map +1 -1
  144. package/dist/src/commands/db/generate.command.js.map +1 -1
  145. package/dist/src/commands/db/migrate.command.d.ts.map +1 -1
  146. package/dist/src/commands/db/migrate.command.js.map +1 -1
  147. package/dist/src/commands/db/resolve.command.d.ts.map +1 -1
  148. package/dist/src/commands/db/resolve.command.js.map +1 -1
  149. package/dist/src/commands/dev/charts-audit.command.d.ts.map +1 -1
  150. package/dist/src/commands/dev/charts-audit.command.js.map +1 -1
  151. package/dist/src/commands/dev/design-tokens-generate.command.d.ts.map +1 -1
  152. package/dist/src/commands/dev/design-tokens-generate.command.js.map +1 -1
  153. package/dist/src/commands/dev/design-tokens-init.command.d.ts.map +1 -1
  154. package/dist/src/commands/dev/design-tokens-init.command.js.map +1 -1
  155. package/dist/src/commands/dev/design-tokens-validate.command.d.ts.map +1 -1
  156. package/dist/src/commands/dev/design-tokens-validate.command.js.map +1 -1
  157. package/dist/src/commands/dev/force-stop.command.d.ts.map +1 -1
  158. package/dist/src/commands/dev/force-stop.command.js.map +1 -1
  159. package/dist/src/commands/dev/resources.command.d.ts.map +1 -1
  160. package/dist/src/commands/dev/resources.command.js.map +1 -1
  161. package/dist/src/commands/dev/start.command.d.ts.map +1 -1
  162. package/dist/src/commands/dev/start.command.js.map +1 -1
  163. package/dist/src/commands/dev/stop-all.command.d.ts.map +1 -1
  164. package/dist/src/commands/dev/stop-all.command.js.map +1 -1
  165. package/dist/src/commands/dev/sync-csp.command.d.ts.map +1 -1
  166. package/dist/src/commands/dev/sync-csp.command.js.map +1 -1
  167. package/dist/src/commands/docs/publish.command.d.ts.map +1 -1
  168. package/dist/src/commands/docs/publish.command.js.map +1 -1
  169. package/dist/src/commands/frontend/publish.command.d.ts.map +1 -1
  170. package/dist/src/commands/frontend/publish.command.js.map +1 -1
  171. package/dist/src/commands/fwk/audit.command.d.ts.map +1 -1
  172. package/dist/src/commands/fwk/audit.command.js.map +1 -1
  173. package/dist/src/commands/fwk/dev-skills.command.d.ts.map +1 -1
  174. package/dist/src/commands/fwk/dev-skills.command.js.map +1 -1
  175. package/dist/src/commands/fwk/generate-docs.command.d.ts.map +1 -1
  176. package/dist/src/commands/fwk/generate-docs.command.js.map +1 -1
  177. package/dist/src/commands/fwk/generate-providers.command.d.ts.map +1 -1
  178. package/dist/src/commands/fwk/generate-providers.command.js.map +1 -1
  179. package/dist/src/commands/fwk/graph.command.d.ts.map +1 -1
  180. package/dist/src/commands/fwk/graph.command.js.map +1 -1
  181. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  182. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  183. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  184. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  185. package/dist/src/commands/fwk/publish-npm.command.d.ts.map +1 -1
  186. package/dist/src/commands/fwk/publish-npm.command.js.map +1 -1
  187. package/dist/src/commands/fwk/version-bump.command.d.ts.map +1 -1
  188. package/dist/src/commands/fwk/version-bump.command.js.map +1 -1
  189. package/dist/src/commands/fwk/version-set.command.d.ts.map +1 -1
  190. package/dist/src/commands/fwk/version-set.command.js.map +1 -1
  191. package/dist/src/commands/fwk/version-show.command.d.ts.map +1 -1
  192. package/dist/src/commands/fwk/version-show.command.js.map +1 -1
  193. package/dist/src/commands/fwk/version-sync.command.d.ts.map +1 -1
  194. package/dist/src/commands/fwk/version-sync.command.js.map +1 -1
  195. package/dist/src/commands/fwk/what-touches.command.d.ts.map +1 -1
  196. package/dist/src/commands/fwk/what-touches.command.js.map +1 -1
  197. package/dist/src/commands/fwk/wt-status.command.d.ts.map +1 -1
  198. package/dist/src/commands/fwk/wt-status.command.js.map +1 -1
  199. package/dist/src/commands/fwk/wt-tail.command.d.ts.map +1 -1
  200. package/dist/src/commands/fwk/wt-tail.command.js.map +1 -1
  201. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  202. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  203. package/dist/src/commands/generate/email-preview.command.d.ts.map +1 -1
  204. package/dist/src/commands/generate/email-preview.command.js.map +1 -1
  205. package/dist/src/commands/generate/email-status.command.d.ts.map +1 -1
  206. package/dist/src/commands/generate/email-status.command.js.map +1 -1
  207. package/dist/src/commands/generate/email-test-send.command.d.ts.map +1 -1
  208. package/dist/src/commands/generate/email-test-send.command.js.map +1 -1
  209. package/dist/src/commands/generate/email-translate.command.d.ts.map +1 -1
  210. package/dist/src/commands/generate/email-translate.command.js.map +1 -1
  211. package/dist/src/commands/generate/email.command.d.ts.map +1 -1
  212. package/dist/src/commands/generate/email.command.js.map +1 -1
  213. package/dist/src/commands/generate/labelling-command.utils.d.ts.map +1 -1
  214. package/dist/src/commands/generate/labelling-command.utils.js.map +1 -1
  215. package/dist/src/commands/generate/labels-plan.command.d.ts.map +1 -1
  216. package/dist/src/commands/generate/labels-plan.command.js.map +1 -1
  217. package/dist/src/commands/generate/labels.command.d.ts.map +1 -1
  218. package/dist/src/commands/generate/labels.command.js.map +1 -1
  219. package/dist/src/commands/generate/translate.command.d.ts.map +1 -1
  220. package/dist/src/commands/generate/translate.command.js.map +1 -1
  221. package/dist/src/commands/help.command.d.ts.map +1 -1
  222. package/dist/src/commands/help.command.js.map +1 -1
  223. package/dist/src/commands/init.command.d.ts.map +1 -1
  224. package/dist/src/commands/init.command.js.map +1 -1
  225. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  226. package/dist/src/commands/local/deregister.command.js.map +1 -1
  227. package/dist/src/commands/local/dev-status.command.d.ts.map +1 -1
  228. package/dist/src/commands/local/dev-status.command.js.map +1 -1
  229. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  230. package/dist/src/commands/local/dev.command.js.map +1 -1
  231. package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
  232. package/dist/src/commands/local/doctor.command.js.map +1 -1
  233. package/dist/src/commands/local/down.command.d.ts.map +1 -1
  234. package/dist/src/commands/local/down.command.js.map +1 -1
  235. package/dist/src/commands/local/init.command.d.ts.map +1 -1
  236. package/dist/src/commands/local/init.command.js.map +1 -1
  237. package/dist/src/commands/local/logs.command.d.ts.map +1 -1
  238. package/dist/src/commands/local/logs.command.js.map +1 -1
  239. package/dist/src/commands/local/reinit.command.d.ts.map +1 -1
  240. package/dist/src/commands/local/reinit.command.js.map +1 -1
  241. package/dist/src/commands/local/reset.command.d.ts.map +1 -1
  242. package/dist/src/commands/local/reset.command.js.map +1 -1
  243. package/dist/src/commands/local/restore.command.d.ts.map +1 -1
  244. package/dist/src/commands/local/restore.command.js.map +1 -1
  245. package/dist/src/commands/local/smoke.command.d.ts.map +1 -1
  246. package/dist/src/commands/local/smoke.command.js.map +1 -1
  247. package/dist/src/commands/local/status.command.d.ts.map +1 -1
  248. package/dist/src/commands/local/status.command.js.map +1 -1
  249. package/dist/src/commands/local/up.command.d.ts.map +1 -1
  250. package/dist/src/commands/local/up.command.js.map +1 -1
  251. package/dist/src/commands/local-defaults/capture.command.d.ts.map +1 -1
  252. package/dist/src/commands/local-defaults/capture.command.js.map +1 -1
  253. package/dist/src/commands/lock/check.command.d.ts.map +1 -1
  254. package/dist/src/commands/lock/check.command.js.map +1 -1
  255. package/dist/src/commands/market/generate.command.d.ts.map +1 -1
  256. package/dist/src/commands/market/generate.command.js.map +1 -1
  257. package/dist/src/commands/market/market-command.utils.d.ts.map +1 -1
  258. package/dist/src/commands/market/market-command.utils.js.map +1 -1
  259. package/dist/src/commands/prefs/set.command.d.ts.map +1 -1
  260. package/dist/src/commands/prefs/set.command.js.map +1 -1
  261. package/dist/src/commands/providers/show.command.d.ts.map +1 -1
  262. package/dist/src/commands/providers/show.command.js.map +1 -1
  263. package/dist/src/commands/registry/add.command.d.ts.map +1 -1
  264. package/dist/src/commands/registry/add.command.js.map +1 -1
  265. package/dist/src/commands/registry/info.command.d.ts.map +1 -1
  266. package/dist/src/commands/registry/info.command.js.map +1 -1
  267. package/dist/src/commands/registry/key.command.d.ts.map +1 -1
  268. package/dist/src/commands/registry/key.command.js.map +1 -1
  269. package/dist/src/commands/registry/lockfile-smoke.command.d.ts.map +1 -1
  270. package/dist/src/commands/registry/lockfile-smoke.command.js.map +1 -1
  271. package/dist/src/commands/registry/login.command.d.ts.map +1 -1
  272. package/dist/src/commands/registry/login.command.js.map +1 -1
  273. package/dist/src/commands/registry/logout.command.d.ts.map +1 -1
  274. package/dist/src/commands/registry/logout.command.js.map +1 -1
  275. package/dist/src/commands/registry/outdated.command.d.ts.map +1 -1
  276. package/dist/src/commands/registry/outdated.command.js.map +1 -1
  277. package/dist/src/commands/registry/ping.command.d.ts.map +1 -1
  278. package/dist/src/commands/registry/ping.command.js.map +1 -1
  279. package/dist/src/commands/registry/publish.command.d.ts.map +1 -1
  280. package/dist/src/commands/registry/publish.command.js.map +1 -1
  281. package/dist/src/commands/registry/registry-transport.constants.d.ts.map +1 -1
  282. package/dist/src/commands/registry/registry-transport.constants.js.map +1 -1
  283. package/dist/src/commands/registry/remove.command.d.ts.map +1 -1
  284. package/dist/src/commands/registry/remove.command.js.map +1 -1
  285. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  286. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  287. package/dist/src/commands/registry/search.command.d.ts.map +1 -1
  288. package/dist/src/commands/registry/search.command.js.map +1 -1
  289. package/dist/src/commands/registry/status.command.d.ts.map +1 -1
  290. package/dist/src/commands/registry/status.command.js.map +1 -1
  291. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  292. package/dist/src/commands/registry/update.command.js.map +1 -1
  293. package/dist/src/commands/registry/whoami.command.d.ts.map +1 -1
  294. package/dist/src/commands/registry/whoami.command.js.map +1 -1
  295. package/dist/src/commands/registry/yank.command.d.ts.map +1 -1
  296. package/dist/src/commands/registry/yank.command.js.map +1 -1
  297. package/dist/src/commands/remote/create.command.d.ts.map +1 -1
  298. package/dist/src/commands/remote/create.command.js.map +1 -1
  299. package/dist/src/commands/remote/list.command.d.ts.map +1 -1
  300. package/dist/src/commands/remote/list.command.js.map +1 -1
  301. package/dist/src/commands/remote/status.command.d.ts.map +1 -1
  302. package/dist/src/commands/remote/status.command.js.map +1 -1
  303. package/dist/src/commands/remote/sync.command.d.ts.map +1 -1
  304. package/dist/src/commands/remote/sync.command.js.map +1 -1
  305. package/dist/src/commands/secrets/github.command.d.ts.map +1 -1
  306. package/dist/src/commands/secrets/github.command.js.map +1 -1
  307. package/dist/src/commands/secrets/list.command.d.ts.map +1 -1
  308. package/dist/src/commands/secrets/list.command.js.map +1 -1
  309. package/dist/src/commands/secrets/set.command.d.ts.map +1 -1
  310. package/dist/src/commands/secrets/set.command.js.map +1 -1
  311. package/dist/src/commands/secrets/unset.command.d.ts.map +1 -1
  312. package/dist/src/commands/secrets/unset.command.js.map +1 -1
  313. package/dist/src/commands/setup.command.d.ts.map +1 -1
  314. package/dist/src/commands/setup.command.js.map +1 -1
  315. package/dist/src/commands/update.command.d.ts.map +1 -1
  316. package/dist/src/commands/update.command.js.map +1 -1
  317. package/dist/src/commands/version.command.d.ts.map +1 -1
  318. package/dist/src/commands/version.command.js.map +1 -1
  319. package/dist/src/commands/website/audit.command.d.ts.map +1 -1
  320. package/dist/src/commands/website/audit.command.js.map +1 -1
  321. package/dist/src/commands/workbench/open.command.d.ts.map +1 -1
  322. package/dist/src/commands/workbench/open.command.js.map +1 -1
  323. package/dist/src/commands/workbench/parallelism.command.d.ts.map +1 -1
  324. package/dist/src/commands/workbench/parallelism.command.js.map +1 -1
  325. package/dist/src/commands/workbench/status.command.d.ts.map +1 -1
  326. package/dist/src/commands/workbench/status.command.js.map +1 -1
  327. package/dist/src/infrastructure/errors/error.utils.d.ts.map +1 -1
  328. package/dist/src/infrastructure/errors/error.utils.js.map +1 -1
  329. package/dist/src/infrastructure/io/file.utils.d.ts.map +1 -1
  330. package/dist/src/infrastructure/io/file.utils.js.map +1 -1
  331. package/dist/src/infrastructure/io/io.schemas.d.ts.map +1 -1
  332. package/dist/src/infrastructure/io/io.schemas.js.map +1 -1
  333. package/dist/src/infrastructure/io/template-processor.d.ts.map +1 -1
  334. package/dist/src/infrastructure/io/template-processor.js.map +1 -1
  335. package/dist/src/infrastructure/logger/logger.service.d.ts.map +1 -1
  336. package/dist/src/infrastructure/logger/logger.service.js.map +1 -1
  337. package/dist/src/infrastructure/process/spawn.utils.d.ts.map +1 -1
  338. package/dist/src/infrastructure/process/spawn.utils.js.map +1 -1
  339. package/dist/src/infrastructure/ui/formatting.service.d.ts.map +1 -1
  340. package/dist/src/infrastructure/ui/formatting.service.js.map +1 -1
  341. package/dist/src/infrastructure/ui/interaction-engine.service.d.ts.map +1 -1
  342. package/dist/src/infrastructure/ui/interaction-engine.service.js.map +1 -1
  343. package/dist/src/infrastructure/ui/markdown-renderer.service.d.ts.map +1 -1
  344. package/dist/src/infrastructure/ui/markdown-renderer.service.js.map +1 -1
  345. package/dist/src/infrastructure/ui/ui.schemas.d.ts.map +1 -1
  346. package/dist/src/infrastructure/ui/ui.schemas.js.map +1 -1
  347. package/dist/src/infrastructure/utils/string.utils.d.ts.map +1 -1
  348. package/dist/src/infrastructure/utils/string.utils.js.map +1 -1
  349. package/dist/src/infrastructure/validation/validator.service.d.ts.map +1 -1
  350. package/dist/src/infrastructure/validation/validator.service.js.map +1 -1
  351. package/dist/src/kernel/base-command.d.ts.map +1 -1
  352. package/dist/src/kernel/base-command.js.map +1 -1
  353. package/dist/src/kernel/bootstrap.d.ts.map +1 -1
  354. package/dist/src/kernel/bootstrap.js.map +1 -1
  355. package/dist/src/kernel/command-index-cache.d.ts.map +1 -1
  356. package/dist/src/kernel/command-index-cache.js.map +1 -1
  357. package/dist/src/kernel/command-registry.d.ts.map +1 -1
  358. package/dist/src/kernel/command-registry.js.map +1 -1
  359. package/dist/src/kernel/command-runner.d.ts.map +1 -1
  360. package/dist/src/kernel/command-runner.js.map +1 -1
  361. package/dist/src/kernel/command-scope-utils.d.ts.map +1 -1
  362. package/dist/src/kernel/command-scope-utils.js.map +1 -1
  363. package/dist/src/kernel/flag-utils.d.ts.map +1 -1
  364. package/dist/src/kernel/flag-utils.js.map +1 -1
  365. package/dist/src/kernel/hooks.d.ts.map +1 -1
  366. package/dist/src/kernel/hooks.js.map +1 -1
  367. package/dist/src/kernel/logger.d.ts.map +1 -1
  368. package/dist/src/kernel/logger.js.map +1 -1
  369. package/dist/src/kernel/types.d.ts.map +1 -1
  370. package/dist/src/kernel/types.js.map +1 -1
  371. package/dist/src/main.d.ts.map +1 -1
  372. package/dist/src/main.js.map +1 -1
  373. package/dist/src/modules/domain/credentials/admin-user.module.d.ts.map +1 -1
  374. package/dist/src/modules/domain/credentials/admin-user.module.js.map +1 -1
  375. package/dist/src/modules/domain/credentials/approver-user.module.d.ts.map +1 -1
  376. package/dist/src/modules/domain/credentials/approver-user.module.js.map +1 -1
  377. package/dist/src/modules/domain/credentials/creation-essentials.module.d.ts.map +1 -1
  378. package/dist/src/modules/domain/credentials/creation-essentials.module.js.map +1 -1
  379. package/dist/src/modules/domain/credentials/module.types.d.ts.map +1 -1
  380. package/dist/src/modules/domain/credentials/module.types.js.map +1 -1
  381. package/dist/src/modules/domain/environment/database-config.module.d.ts.map +1 -1
  382. package/dist/src/modules/domain/environment/database-config.module.js.map +1 -1
  383. package/dist/src/modules/domain/environment/module.types.d.ts.map +1 -1
  384. package/dist/src/modules/domain/environment/module.types.js.map +1 -1
  385. package/dist/src/modules/domain/environment/paths-config.module.d.ts.map +1 -1
  386. package/dist/src/modules/domain/environment/paths-config.module.js.map +1 -1
  387. package/dist/src/modules/domain/environment/runtime-selector.module.d.ts.map +1 -1
  388. package/dist/src/modules/domain/environment/runtime-selector.module.js.map +1 -1
  389. package/dist/src/modules/domain/environment/runtime-semantics.module.d.ts.map +1 -1
  390. package/dist/src/modules/domain/environment/runtime-semantics.module.js.map +1 -1
  391. package/dist/src/modules/domain/module.types.d.ts.map +1 -1
  392. package/dist/src/modules/domain/module.types.js.map +1 -1
  393. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  394. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  395. package/dist/src/services/application/app-env.service.d.ts.map +1 -1
  396. package/dist/src/services/application/app-env.service.js.map +1 -1
  397. package/dist/src/services/application/app-local-runtime-addresses.service.d.ts.map +1 -1
  398. package/dist/src/services/application/app-local-runtime-addresses.service.js.map +1 -1
  399. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  400. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  401. package/dist/src/services/application/app-schema-bootstrap.service.d.ts.map +1 -1
  402. package/dist/src/services/application/app-schema-bootstrap.service.js.map +1 -1
  403. package/dist/src/services/application/application-assets-delivery.service.d.ts.map +1 -1
  404. package/dist/src/services/application/application-assets-delivery.service.js.map +1 -1
  405. package/dist/src/services/application/application-browser-smoke.service.d.ts.map +1 -1
  406. package/dist/src/services/application/application-browser-smoke.service.js.map +1 -1
  407. package/dist/src/services/application/application-creation-readiness.service.d.ts.map +1 -1
  408. package/dist/src/services/application/application-creation-readiness.service.js.map +1 -1
  409. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  410. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  411. package/dist/src/services/application/application-dev-port-offsets.d.ts.map +1 -1
  412. package/dist/src/services/application/application-dev-port-offsets.js.map +1 -1
  413. package/dist/src/services/application/application-initialization-verification.service.d.ts.map +1 -1
  414. package/dist/src/services/application/application-initialization-verification.service.js.map +1 -1
  415. package/dist/src/services/application/application-root.utils.d.ts.map +1 -1
  416. package/dist/src/services/application/application-root.utils.js.map +1 -1
  417. package/dist/src/services/application/application-runtime-bootstrap.service.d.ts.map +1 -1
  418. package/dist/src/services/application/application-runtime-bootstrap.service.js.map +1 -1
  419. package/dist/src/services/application/backend-config.paths.d.ts.map +1 -1
  420. package/dist/src/services/application/backend-config.paths.js.map +1 -1
  421. package/dist/src/services/application/composition-provider-plan.service.d.ts.map +1 -1
  422. package/dist/src/services/application/composition-provider-plan.service.js.map +1 -1
  423. package/dist/src/services/application/creation-host-readiness.service.d.ts.map +1 -1
  424. package/dist/src/services/application/creation-host-readiness.service.js.map +1 -1
  425. package/dist/src/services/application/creation-preflight.service.d.ts.map +1 -1
  426. package/dist/src/services/application/creation-preflight.service.js.map +1 -1
  427. package/dist/src/services/application/degraded-registration-declaration-convergence.service.d.ts.map +1 -1
  428. package/dist/src/services/application/degraded-registration-declaration-convergence.service.js.map +1 -1
  429. package/dist/src/services/application/dev-orchestrator.service.d.ts.map +1 -1
  430. package/dist/src/services/application/dev-orchestrator.service.js.map +1 -1
  431. package/dist/src/services/application/dev-schema-drift.service.d.ts.map +1 -1
  432. package/dist/src/services/application/dev-schema-drift.service.js.map +1 -1
  433. package/dist/src/services/application/environment-provider-configurations.service.d.ts.map +1 -1
  434. package/dist/src/services/application/environment-provider-configurations.service.js.map +1 -1
  435. package/dist/src/services/application/existing-app-bootstrap.service.d.ts.map +1 -1
  436. package/dist/src/services/application/existing-app-bootstrap.service.js.map +1 -1
  437. package/dist/src/services/application/frontend-provider-source.service.d.ts.map +1 -1
  438. package/dist/src/services/application/frontend-provider-source.service.js.map +1 -1
  439. package/dist/src/services/application/frontend-public-config-secret-screen.service.d.ts.map +1 -1
  440. package/dist/src/services/application/frontend-public-config-secret-screen.service.js.map +1 -1
  441. package/dist/src/services/application/local-app-reinit.service.d.ts.map +1 -1
  442. package/dist/src/services/application/local-app-reinit.service.js.map +1 -1
  443. package/dist/src/services/application/local-application-initialization.service.d.ts.map +1 -1
  444. package/dist/src/services/application/local-application-initialization.service.js.map +1 -1
  445. package/dist/src/services/application/provider-package-links.service.d.ts.map +1 -1
  446. package/dist/src/services/application/provider-package-links.service.js.map +1 -1
  447. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  448. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  449. package/dist/src/services/application/saas-scaffold.service.d.ts.map +1 -1
  450. package/dist/src/services/application/saas-scaffold.service.js.map +1 -1
  451. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  452. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  453. package/dist/src/services/application/stored-declaration-currency.service.d.ts.map +1 -1
  454. package/dist/src/services/application/stored-declaration-currency.service.js.map +1 -1
  455. package/dist/src/services/application/systems-of-record-library.service.d.ts.map +1 -1
  456. package/dist/src/services/application/systems-of-record-library.service.js.map +1 -1
  457. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  458. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  459. package/dist/src/services/catalog/service-catalog.schemas.d.ts.map +1 -1
  460. package/dist/src/services/catalog/service-catalog.schemas.js.map +1 -1
  461. package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts.map +1 -1
  462. package/dist/src/services/coding-agents/acp-conformance-probe.service.js.map +1 -1
  463. package/dist/src/services/coding-agents/coding-agent-login.service.d.ts.map +1 -1
  464. package/dist/src/services/coding-agents/coding-agent-login.service.js.map +1 -1
  465. package/dist/src/services/companion/build-console.service.d.ts +62 -2
  466. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  467. package/dist/src/services/companion/build-console.service.js +70 -5
  468. package/dist/src/services/companion/build-console.service.js.map +1 -1
  469. package/dist/src/services/companion/companion-client-options.utils.d.ts.map +1 -1
  470. package/dist/src/services/companion/companion-client-options.utils.js.map +1 -1
  471. package/dist/src/services/companion/companion-client.service.d.ts.map +1 -1
  472. package/dist/src/services/companion/companion-client.service.js.map +1 -1
  473. package/dist/src/services/companion/companion-health-hint.utils.d.ts.map +1 -1
  474. package/dist/src/services/companion/companion-health-hint.utils.js.map +1 -1
  475. package/dist/src/services/companion/companion-lifecycle.service.d.ts.map +1 -1
  476. package/dist/src/services/companion/companion-lifecycle.service.js.map +1 -1
  477. package/dist/src/services/companion/companion-local-token.utils.d.ts.map +1 -1
  478. package/dist/src/services/companion/companion-local-token.utils.js.map +1 -1
  479. package/dist/src/services/companion/companion.schemas.d.ts.map +1 -1
  480. package/dist/src/services/companion/companion.schemas.js.map +1 -1
  481. package/dist/src/services/companion/console-fast-path.d.ts +21 -3
  482. package/dist/src/services/companion/console-fast-path.d.ts.map +1 -1
  483. package/dist/src/services/companion/console-fast-path.js +57 -12
  484. package/dist/src/services/companion/console-fast-path.js.map +1 -1
  485. package/dist/src/services/companion/console-verb.utils.d.ts.map +1 -1
  486. package/dist/src/services/companion/console-verb.utils.js.map +1 -1
  487. package/dist/src/services/companion/creation-console.service.d.ts +76 -0
  488. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  489. package/dist/src/services/companion/creation-console.service.js +124 -11
  490. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  491. package/dist/src/services/companion/creation-run-report.models.d.ts.map +1 -1
  492. package/dist/src/services/companion/creation-run-report.models.js.map +1 -1
  493. package/dist/src/services/companion/git-helper.service.d.ts.map +1 -1
  494. package/dist/src/services/companion/git-helper.service.js.map +1 -1
  495. package/dist/src/services/companion/local-companion-authority.service.d.ts.map +1 -1
  496. package/dist/src/services/companion/local-companion-authority.service.js.map +1 -1
  497. package/dist/src/services/companion/workbench-browser-launcher.service.d.ts.map +1 -1
  498. package/dist/src/services/companion/workbench-browser-launcher.service.js.map +1 -1
  499. package/dist/src/services/companion/workbench-cli.service.d.ts.map +1 -1
  500. package/dist/src/services/companion/workbench-cli.service.js.map +1 -1
  501. package/dist/src/services/compliance/data-retention-schedule.generator.d.ts.map +1 -1
  502. package/dist/src/services/compliance/data-retention-schedule.generator.js.map +1 -1
  503. package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts +5 -3
  504. package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts.map +1 -1
  505. package/dist/src/services/compliance/generated-compliance-module-wiring.js +4 -2
  506. package/dist/src/services/compliance/generated-compliance-module-wiring.js.map +1 -1
  507. package/dist/src/services/compliance/governed-document-releases.generator.d.ts.map +1 -1
  508. package/dist/src/services/compliance/governed-document-releases.generator.js.map +1 -1
  509. package/dist/src/services/compliance/legal-notice.generator.d.ts +45 -0
  510. package/dist/src/services/compliance/legal-notice.generator.d.ts.map +1 -0
  511. package/dist/src/services/compliance/legal-notice.generator.js +97 -0
  512. package/dist/src/services/compliance/legal-notice.generator.js.map +1 -0
  513. package/dist/src/services/compliance/service-consent-requirement.generator.d.ts.map +1 -1
  514. package/dist/src/services/compliance/service-consent-requirement.generator.js.map +1 -1
  515. package/dist/src/services/compliance/subject-data-recipients.generator.d.ts.map +1 -1
  516. package/dist/src/services/compliance/subject-data-recipients.generator.js.map +1 -1
  517. package/dist/src/services/context/context-manager.service.d.ts.map +1 -1
  518. package/dist/src/services/context/context-manager.service.js.map +1 -1
  519. package/dist/src/services/context/context.schemas.d.ts.map +1 -1
  520. package/dist/src/services/context/context.schemas.js.map +1 -1
  521. package/dist/src/services/context/machine-preferences.writer.d.ts.map +1 -1
  522. package/dist/src/services/context/machine-preferences.writer.js.map +1 -1
  523. package/dist/src/services/context/state-manager.service.d.ts.map +1 -1
  524. package/dist/src/services/context/state-manager.service.js.map +1 -1
  525. package/dist/src/services/credentials/application-secret-owners.service.d.ts.map +1 -1
  526. package/dist/src/services/credentials/application-secret-owners.service.js.map +1 -1
  527. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  528. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  529. package/dist/src/services/credentials/ci-secrets-adapter.service.d.ts.map +1 -1
  530. package/dist/src/services/credentials/ci-secrets-adapter.service.js.map +1 -1
  531. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  532. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  533. package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
  534. package/dist/src/services/credentials/credentials.schemas.js.map +1 -1
  535. package/dist/src/services/credentials/credentials.service.d.ts.map +1 -1
  536. package/dist/src/services/credentials/credentials.service.js.map +1 -1
  537. package/dist/src/services/credentials/framework-managed-secrets.d.ts.map +1 -1
  538. package/dist/src/services/credentials/framework-managed-secrets.js.map +1 -1
  539. package/dist/src/services/credentials/local-defaults.service.d.ts.map +1 -1
  540. package/dist/src/services/credentials/local-defaults.service.js.map +1 -1
  541. package/dist/src/services/credentials/local-secrets-store.service.d.ts.map +1 -1
  542. package/dist/src/services/credentials/local-secrets-store.service.js.map +1 -1
  543. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  544. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  545. package/dist/src/services/credentials/provider-secret-format.d.ts.map +1 -1
  546. package/dist/src/services/credentials/provider-secret-format.js.map +1 -1
  547. package/dist/src/services/credentials/remote-secrets-store.service.d.ts.map +1 -1
  548. package/dist/src/services/credentials/remote-secrets-store.service.js.map +1 -1
  549. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  550. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  551. package/dist/src/services/credentials/secrets-provisioning.service.d.ts.map +1 -1
  552. package/dist/src/services/credentials/secrets-provisioning.service.js.map +1 -1
  553. package/dist/src/services/credentials/secrets-reader.service.d.ts.map +1 -1
  554. package/dist/src/services/credentials/secrets-reader.service.js.map +1 -1
  555. package/dist/src/services/credentials/secrets-rotation.service.d.ts.map +1 -1
  556. package/dist/src/services/credentials/secrets-rotation.service.js.map +1 -1
  557. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  558. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  559. package/dist/src/services/data-services/data-services.schemas.d.ts.map +1 -1
  560. package/dist/src/services/data-services/data-services.schemas.js.map +1 -1
  561. package/dist/src/services/data-services/data-services.service.d.ts.map +1 -1
  562. package/dist/src/services/data-services/data-services.service.js.map +1 -1
  563. package/dist/src/services/deployment/apps-manager-diagnostics.service.d.ts.map +1 -1
  564. package/dist/src/services/deployment/apps-manager-diagnostics.service.js.map +1 -1
  565. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  566. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  567. package/dist/src/services/deployment/ci-workflow-generator.service.d.ts.map +1 -1
  568. package/dist/src/services/deployment/ci-workflow-generator.service.js.map +1 -1
  569. package/dist/src/services/deployment/docker/backing-service-health-watch.d.ts.map +1 -1
  570. package/dist/src/services/deployment/docker/backing-service-health-watch.js.map +1 -1
  571. package/dist/src/services/deployment/docker/compose-service-health.d.ts.map +1 -1
  572. package/dist/src/services/deployment/docker/compose-service-health.js.map +1 -1
  573. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  574. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  575. package/dist/src/services/deployment/docker/docker-compose-readiness.service.d.ts.map +1 -1
  576. package/dist/src/services/deployment/docker/docker-compose-readiness.service.js.map +1 -1
  577. package/dist/src/services/deployment/docker/docker.schemas.d.ts.map +1 -1
  578. package/dist/src/services/deployment/docker/docker.schemas.js.map +1 -1
  579. package/dist/src/services/deployment/docker/docker.service.d.ts.map +1 -1
  580. package/dist/src/services/deployment/docker/docker.service.js.map +1 -1
  581. package/dist/src/services/deployment/docker/local-data-adoption.service.d.ts.map +1 -1
  582. package/dist/src/services/deployment/docker/local-data-adoption.service.js.map +1 -1
  583. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts.map +1 -1
  584. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  585. package/dist/src/services/deployment/infra-writer.service.d.ts.map +1 -1
  586. package/dist/src/services/deployment/infra-writer.service.js.map +1 -1
  587. package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.d.ts.map +1 -1
  588. package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.js.map +1 -1
  589. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts.map +1 -1
  590. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js.map +1 -1
  591. package/dist/src/services/deployment/k8s/k8s-local-infra-readiness.service.d.ts.map +1 -1
  592. package/dist/src/services/deployment/k8s/k8s-local-infra-readiness.service.js.map +1 -1
  593. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  594. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  595. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  596. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  597. package/dist/src/services/deployment/k8s/k8s-operations.service.d.ts.map +1 -1
  598. package/dist/src/services/deployment/k8s/k8s-operations.service.js.map +1 -1
  599. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  600. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  601. package/dist/src/services/deployment/k8s/k8s.schemas.d.ts.map +1 -1
  602. package/dist/src/services/deployment/k8s/k8s.schemas.js.map +1 -1
  603. package/dist/src/services/deployment/k8s/kind.service.d.ts.map +1 -1
  604. package/dist/src/services/deployment/k8s/kind.service.js.map +1 -1
  605. package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.d.ts.map +1 -1
  606. package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.js.map +1 -1
  607. package/dist/src/services/deployment/local-dev-observer-lifecycle.d.ts.map +1 -1
  608. package/dist/src/services/deployment/local-dev-observer-lifecycle.js.map +1 -1
  609. package/dist/src/services/deployment/local-dev-output-boundary.d.ts.map +1 -1
  610. package/dist/src/services/deployment/local-dev-output-boundary.js.map +1 -1
  611. package/dist/src/services/deployment/local-dev-session-lease.service.d.ts.map +1 -1
  612. package/dist/src/services/deployment/local-dev-session-lease.service.js.map +1 -1
  613. package/dist/src/services/deployment/local-dev-shutdown-coordinator.d.ts.map +1 -1
  614. package/dist/src/services/deployment/local-dev-shutdown-coordinator.js.map +1 -1
  615. package/dist/src/services/deployment/local-infrastructure-initialization.service.d.ts.map +1 -1
  616. package/dist/src/services/deployment/local-infrastructure-initialization.service.js.map +1 -1
  617. package/dist/src/services/deployment/local-precondition-checks.schemas.d.ts.map +1 -1
  618. package/dist/src/services/deployment/local-precondition-checks.schemas.js.map +1 -1
  619. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  620. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  621. package/dist/src/services/deployment/local-runtime-process-cleanup.service.d.ts.map +1 -1
  622. package/dist/src/services/deployment/local-runtime-process-cleanup.service.js.map +1 -1
  623. package/dist/src/services/deployment/platform-lifecycle.service.d.ts.map +1 -1
  624. package/dist/src/services/deployment/platform-lifecycle.service.js.map +1 -1
  625. package/dist/src/services/deployment/platform-runtime-policy.service.d.ts.map +1 -1
  626. package/dist/src/services/deployment/platform-runtime-policy.service.js.map +1 -1
  627. package/dist/src/services/deployment/version-compare.utils.d.ts.map +1 -1
  628. package/dist/src/services/deployment/version-compare.utils.js.map +1 -1
  629. package/dist/src/services/design-tokens/design-tokens-command.service.d.ts.map +1 -1
  630. package/dist/src/services/design-tokens/design-tokens-command.service.js.map +1 -1
  631. package/dist/src/services/design-tokens/design-tokens-config.service.d.ts.map +1 -1
  632. package/dist/src/services/design-tokens/design-tokens-config.service.js.map +1 -1
  633. package/dist/src/services/design-tokens/design-tokens-config.template.d.ts.map +1 -1
  634. package/dist/src/services/design-tokens/design-tokens-config.template.js.map +1 -1
  635. package/dist/src/services/design-tokens/design-tokens-css-block.service.d.ts.map +1 -1
  636. package/dist/src/services/design-tokens/design-tokens-css-block.service.js.map +1 -1
  637. package/dist/src/services/design-tokens/design-tokens-paths.service.d.ts.map +1 -1
  638. package/dist/src/services/design-tokens/design-tokens-paths.service.js.map +1 -1
  639. package/dist/src/services/design-tokens/design-tokens.constants.d.ts.map +1 -1
  640. package/dist/src/services/design-tokens/design-tokens.constants.js.map +1 -1
  641. package/dist/src/services/design-tokens/design-tokens.models.d.ts.map +1 -1
  642. package/dist/src/services/design-tokens/design-tokens.models.js.map +1 -1
  643. package/dist/src/services/environment/application-backing-service-addressing.utils.d.ts.map +1 -1
  644. package/dist/src/services/environment/application-backing-service-addressing.utils.js.map +1 -1
  645. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  646. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  647. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  648. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  649. package/dist/src/services/environment/env-sync.service.d.ts.map +1 -1
  650. package/dist/src/services/environment/env-sync.service.js.map +1 -1
  651. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  652. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  653. package/dist/src/services/environment/environment-hydration.utils.d.ts.map +1 -1
  654. package/dist/src/services/environment/environment-hydration.utils.js.map +1 -1
  655. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  656. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  657. package/dist/src/services/environment/environment-paths.service.d.ts.map +1 -1
  658. package/dist/src/services/environment/environment-paths.service.js.map +1 -1
  659. package/dist/src/services/environment/environment-registry.service.d.ts.map +1 -1
  660. package/dist/src/services/environment/environment-registry.service.js.map +1 -1
  661. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  662. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  663. package/dist/src/services/environment/environment.schemas.d.ts.map +1 -1
  664. package/dist/src/services/environment/environment.schemas.js.map +1 -1
  665. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  666. package/dist/src/services/environment/environment.service.js.map +1 -1
  667. package/dist/src/services/environment/hosted-infrastructure-leftovers.service.d.ts.map +1 -1
  668. package/dist/src/services/environment/hosted-infrastructure-leftovers.service.js.map +1 -1
  669. package/dist/src/services/environment/infrastructure-host.service.d.ts.map +1 -1
  670. package/dist/src/services/environment/infrastructure-host.service.js.map +1 -1
  671. package/dist/src/services/environment/platform-engine-change.utils.d.ts.map +1 -1
  672. package/dist/src/services/environment/platform-engine-change.utils.js.map +1 -1
  673. package/dist/src/services/environment/platform-runtime-state.service.d.ts.map +1 -1
  674. package/dist/src/services/environment/platform-runtime-state.service.js.map +1 -1
  675. package/dist/src/services/environment/platform-runtime.schemas.d.ts.map +1 -1
  676. package/dist/src/services/environment/platform-runtime.schemas.js.map +1 -1
  677. package/dist/src/services/environment/runtime-bootstrap.service.d.ts.map +1 -1
  678. package/dist/src/services/environment/runtime-bootstrap.service.js.map +1 -1
  679. package/dist/src/services/framework/application-claude-settings.d.ts +39 -5
  680. package/dist/src/services/framework/application-claude-settings.d.ts.map +1 -1
  681. package/dist/src/services/framework/application-claude-settings.js +100 -25
  682. package/dist/src/services/framework/application-claude-settings.js.map +1 -1
  683. package/dist/src/services/framework/application-rule-imports.d.ts.map +1 -1
  684. package/dist/src/services/framework/application-rule-imports.js.map +1 -1
  685. package/dist/src/services/framework/claude-plugin-compiler.d.ts.map +1 -1
  686. package/dist/src/services/framework/claude-plugin-compiler.js +3 -2
  687. package/dist/src/services/framework/claude-plugin-compiler.js.map +1 -1
  688. package/dist/src/services/framework/dev-compile-status.paths.d.ts.map +1 -1
  689. package/dist/src/services/framework/dev-compile-status.paths.js.map +1 -1
  690. package/dist/src/services/framework/framework-development-skills-sync.service.d.ts.map +1 -1
  691. package/dist/src/services/framework/framework-development-skills-sync.service.js.map +1 -1
  692. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  693. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  694. package/dist/src/services/framework/framework-knowledge-application-guidance.validator.d.ts.map +1 -1
  695. package/dist/src/services/framework/framework-knowledge-application-guidance.validator.js.map +1 -1
  696. package/dist/src/services/framework/framework-knowledge-audit.service.d.ts.map +1 -1
  697. package/dist/src/services/framework/framework-knowledge-audit.service.js.map +1 -1
  698. package/dist/src/services/framework/framework-knowledge-generation.service.d.ts.map +1 -1
  699. package/dist/src/services/framework/framework-knowledge-generation.service.js.map +1 -1
  700. package/dist/src/services/framework/framework-knowledge-scan.constants.d.ts.map +1 -1
  701. package/dist/src/services/framework/framework-knowledge-scan.constants.js.map +1 -1
  702. package/dist/src/services/framework/framework-npm-publish.service.d.ts.map +1 -1
  703. package/dist/src/services/framework/framework-npm-publish.service.js.map +1 -1
  704. package/dist/src/services/framework/framework-publish-manifest.service.d.ts.map +1 -1
  705. package/dist/src/services/framework/framework-publish-manifest.service.js.map +1 -1
  706. package/dist/src/services/framework/framework-release.service.d.ts.map +1 -1
  707. package/dist/src/services/framework/framework-release.service.js.map +1 -1
  708. package/dist/src/services/framework/framework-update.service.d.ts.map +1 -1
  709. package/dist/src/services/framework/framework-update.service.js.map +1 -1
  710. package/dist/src/services/framework/framework-version.service.d.ts.map +1 -1
  711. package/dist/src/services/framework/framework-version.service.js.map +1 -1
  712. package/dist/src/services/framework/frontend-component-catalog.generator.d.ts.map +1 -1
  713. package/dist/src/services/framework/frontend-component-catalog.generator.js.map +1 -1
  714. package/dist/src/services/framework/frontend-library-root-exports.d.ts.map +1 -1
  715. package/dist/src/services/framework/frontend-library-root-exports.js.map +1 -1
  716. package/dist/src/services/framework/installed-framework-assets.service.d.ts.map +1 -1
  717. package/dist/src/services/framework/installed-framework-assets.service.js.map +1 -1
  718. package/dist/src/services/framework/npm-registry-output.d.ts.map +1 -1
  719. package/dist/src/services/framework/npm-registry-output.js.map +1 -1
  720. package/dist/src/services/framework/package-install.service.d.ts.map +1 -1
  721. package/dist/src/services/framework/package-install.service.js.map +1 -1
  722. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts.map +1 -1
  723. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js.map +1 -1
  724. package/dist/src/services/framework/provider-transposition/api-version-settlement.d.ts.map +1 -1
  725. package/dist/src/services/framework/provider-transposition/api-version-settlement.js.map +1 -1
  726. package/dist/src/services/framework/provider-transposition/base-url-settlement.d.ts.map +1 -1
  727. package/dist/src/services/framework/provider-transposition/base-url-settlement.js.map +1 -1
  728. package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts.map +1 -1
  729. package/dist/src/services/framework/provider-transposition/openapi-enrichment.js.map +1 -1
  730. package/dist/src/services/framework/provider-transposition/openapi-source.reader.d.ts.map +1 -1
  731. package/dist/src/services/framework/provider-transposition/openapi-source.reader.js.map +1 -1
  732. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts.map +1 -1
  733. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js.map +1 -1
  734. package/dist/src/services/framework/provider-transposition/provider-merge.d.ts.map +1 -1
  735. package/dist/src/services/framework/provider-transposition/provider-merge.js.map +1 -1
  736. package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts.map +1 -1
  737. package/dist/src/services/framework/provider-transposition/provider-package.emitter.js.map +1 -1
  738. package/dist/src/services/framework/provider-transposition/request-helper-url.d.ts.map +1 -1
  739. package/dist/src/services/framework/provider-transposition/request-helper-url.js.map +1 -1
  740. package/dist/src/services/framework/provider-transposition/sim-source.reader.d.ts.map +1 -1
  741. package/dist/src/services/framework/provider-transposition/sim-source.reader.js.map +1 -1
  742. package/dist/src/services/framework/provider-transposition/source-static-evaluator.d.ts.map +1 -1
  743. package/dist/src/services/framework/provider-transposition/source-static-evaluator.js.map +1 -1
  744. package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts.map +1 -1
  745. package/dist/src/services/framework/provider-transposition/transposed-provider.model.js.map +1 -1
  746. package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts.map +1 -1
  747. package/dist/src/services/framework/provider-transposition/url-template.extractor.js.map +1 -1
  748. package/dist/src/services/frontend/cloudflare-cdn.service.d.ts.map +1 -1
  749. package/dist/src/services/frontend/cloudflare-cdn.service.js.map +1 -1
  750. package/dist/src/services/frontend/frontend-dist-uploader.service.d.ts.map +1 -1
  751. package/dist/src/services/frontend/frontend-dist-uploader.service.js.map +1 -1
  752. package/dist/src/services/frontend/frontend-publish.service.d.ts.map +1 -1
  753. package/dist/src/services/frontend/frontend-publish.service.js.map +1 -1
  754. package/dist/src/services/generation/domain-generator.service.d.ts.map +1 -1
  755. package/dist/src/services/generation/domain-generator.service.js.map +1 -1
  756. package/dist/src/services/generation/generator.schemas.d.ts.map +1 -1
  757. package/dist/src/services/generation/generator.schemas.js.map +1 -1
  758. package/dist/src/services/generation/operation-generator.service.d.ts.map +1 -1
  759. package/dist/src/services/generation/operation-generator.service.js.map +1 -1
  760. package/dist/src/services/generation/resource-generator.service.d.ts.map +1 -1
  761. package/dist/src/services/generation/resource-generator.service.js.map +1 -1
  762. package/dist/src/services/generation/template-registry.service.d.ts.map +1 -1
  763. package/dist/src/services/generation/template-registry.service.js.map +1 -1
  764. package/dist/src/services/registry/artifact-extractor.utils.d.ts.map +1 -1
  765. package/dist/src/services/registry/artifact-extractor.utils.js.map +1 -1
  766. package/dist/src/services/registry/artifact-trust.utils.d.ts.map +1 -1
  767. package/dist/src/services/registry/artifact-trust.utils.js.map +1 -1
  768. package/dist/src/services/registry/boundary-fanout.utils.d.ts.map +1 -1
  769. package/dist/src/services/registry/boundary-fanout.utils.js.map +1 -1
  770. package/dist/src/services/registry/git-ignored-paths.utils.d.ts.map +1 -1
  771. package/dist/src/services/registry/git-ignored-paths.utils.js.map +1 -1
  772. package/dist/src/services/registry/index.d.ts.map +1 -1
  773. package/dist/src/services/registry/index.js.map +1 -1
  774. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  775. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  776. package/dist/src/services/registry/local-checkout-module-source.service.d.ts.map +1 -1
  777. package/dist/src/services/registry/local-checkout-module-source.service.js.map +1 -1
  778. package/dist/src/services/registry/migration-obligation.utils.d.ts.map +1 -1
  779. package/dist/src/services/registry/migration-obligation.utils.js.map +1 -1
  780. package/dist/src/services/registry/module-acquisition.utils.d.ts.map +1 -1
  781. package/dist/src/services/registry/module-acquisition.utils.js.map +1 -1
  782. package/dist/src/services/registry/module-artifact-files.utils.d.ts.map +1 -1
  783. package/dist/src/services/registry/module-artifact-files.utils.js.map +1 -1
  784. package/dist/src/services/registry/module-registration.service.d.ts.map +1 -1
  785. package/dist/src/services/registry/module-registration.service.js.map +1 -1
  786. package/dist/src/services/registry/module-requirements.service.d.ts.map +1 -1
  787. package/dist/src/services/registry/module-requirements.service.js.map +1 -1
  788. package/dist/src/services/registry/provider-install-step.d.ts.map +1 -1
  789. package/dist/src/services/registry/provider-install-step.js.map +1 -1
  790. package/dist/src/services/registry/provider-module-checks.service.d.ts.map +1 -1
  791. package/dist/src/services/registry/provider-module-checks.service.js.map +1 -1
  792. package/dist/src/services/registry/provider-module-identity.service.d.ts.map +1 -1
  793. package/dist/src/services/registry/provider-module-identity.service.js.map +1 -1
  794. package/dist/src/services/registry/provider-wiring.service.d.ts.map +1 -1
  795. package/dist/src/services/registry/provider-wiring.service.js.map +1 -1
  796. package/dist/src/services/registry/registry-command.utils.d.ts.map +1 -1
  797. package/dist/src/services/registry/registry-command.utils.js.map +1 -1
  798. package/dist/src/services/registry/registry-config-resolver.service.d.ts.map +1 -1
  799. package/dist/src/services/registry/registry-config-resolver.service.js.map +1 -1
  800. package/dist/src/services/registry/registry-credentials.service.d.ts.map +1 -1
  801. package/dist/src/services/registry/registry-credentials.service.js.map +1 -1
  802. package/dist/src/services/registry/saas-root-required.error.d.ts.map +1 -1
  803. package/dist/src/services/registry/saas-root-required.error.js.map +1 -1
  804. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  805. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  806. package/dist/src/services/tools/utility-tools.service.d.ts.map +1 -1
  807. package/dist/src/services/tools/utility-tools.service.js.map +1 -1
  808. package/dist/src/services/tracker/creation-run-tracker.service.d.ts.map +1 -1
  809. package/dist/src/services/tracker/creation-run-tracker.service.js.map +1 -1
  810. package/dist/src/services/website/website-label-pack-audit.service.d.ts.map +1 -1
  811. package/dist/src/services/website/website-label-pack-audit.service.js.map +1 -1
  812. package/dist/src/services/website/website-structured-data-audit.service.d.ts.map +1 -1
  813. package/dist/src/services/website/website-structured-data-audit.service.js.map +1 -1
  814. package/dist/src/services/website/website-workspace.service.d.ts.map +1 -1
  815. package/dist/src/services/website/website-workspace.service.js.map +1 -1
  816. package/dist/tsconfig.build.tsbuildinfo +1 -0
  817. package/dist/tsconfig.tsbuildinfo +1 -0
  818. package/package.json +17 -17
  819. package/templates/saas/i18n/email/email-template-definitions.ts +5 -1
  820. package/templates/saas/scenarios/add-locale/files/website/src/i18n/__localePath__.json.hbs +21 -1
  821. package/templates/saas/scenarios/add-locale/files/website/src/pages/__localePath__/index.astro +1 -0
  822. package/templates/saas/scenarios/add-marketing-page/files/website/src/pages/__pageRef__.astro.hbs +1 -0
  823. package/templates/saas/scenarios/add-module/scenario.json +5 -0
  824. package/templates/saas/scenarios/add-website/files/website/src/components/FooterComponent.tsx.hbs +14 -6
  825. package/templates/saas/scenarios/add-website/files/website/src/content/llms.txt.hbs +3 -3
  826. package/templates/saas/scenarios/add-website/files/website/src/i18n/en.json.hbs +4 -0
  827. package/templates/saas/scenarios/add-website/files/website/src/pages/index.astro +1 -0
  828. package/templates/saas/scenarios/add-website/files/website/src/pages/llms.txt.ts +3 -1
  829. package/templates/saas/scenarios/add-website/files/website/src/styles/website.css +14 -0
  830. package/templates/saas/skeleton/backend-api/src/engine/email/email-template-definitions.ts +5 -1
  831. package/templates/saas/skeleton/shared-lib/src/engine/roles.ts +10 -2
  832. package/templates/saas/skeleton/specifications/src/companion-exports.ts +28 -3
  833. package/wildo-framework.info.json +1 -1
@@ -10,8 +10,8 @@
10
10
  * framework version the application installed. Claude Code reaches it through three keys of the
11
11
  * application's PROJECT settings:
12
12
  *
13
- * - `extraKnownMarketplaces.wildo` — a `directory` source pointing at that compiled marketplace;
14
- * - `enabledPlugins["wildo@wildo"]` — turn the plugin on;
13
+ * - `extraKnownMarketplaces["wildo-<version>"]` — a `directory` source pointing at that compiled marketplace;
14
+ * - `enabledPlugins["wildo@wildo-<version>"]` — turn the plugin on (#2417: the marketplace is named after the version);
15
15
  * - `permissions.allow` — the read-only `wildo` verbs the console calls constantly, so the session
16
16
  * does not stop on a prompt for each (calibrated on EFFECT, as the framework's own settings are:
17
17
  * reading is allowed, anything that spends or leaves the machine is not listed here).
@@ -37,10 +37,37 @@
37
37
  * record is gitignored, the settings are not) infers it by exact value match —
38
38
  * {@link inferClaudeSettingsOwnership}.
39
39
  */
40
- /** The marketplace and plugin names — the install id is `wildo@wildo`, and commands answer as `/wildo:<name>`. */
41
- export declare const WILDO_CLAUDE_MARKETPLACE_NAME = "wildo";
40
+ /**
41
+ * The plugin's name — commands answer as `/wildo:<name>` whatever marketplace carries it, because Claude Code namespaces
42
+ * a plugin's components under its MANIFEST name.
43
+ */
42
44
  export declare const WILDO_CLAUDE_PLUGIN_NAME = "wildo";
43
- export declare const WILDO_CLAUDE_PLUGIN_ID = "wildo@wildo";
45
+ /**
46
+ * The marketplace name a framework version publishes its plugin under: `wildo-<version>` (#2417).
47
+ *
48
+ * Claude Code keeps ONE `known_marketplaces.json` per user and registers one marketplace per name, so when every
49
+ * application declared the same name `wildo`, whichever application had registered last decided which copy every
50
+ * other application's session loaded. On app-creation-test-005 (1.1.9) the session loaded app-creation-test-004's
51
+ * 1.1.8 plugin. The name must equal the `name` in `marketplace.json`, which is compiled once per package version and
52
+ * shared by every application that installs it, so the version is the finest identity the name can carry: two
53
+ * applications on different framework versions no longer collide, and two on the same version load the same bytes.
54
+ *
55
+ * spec-cite: Claude Code docs, Plugin loading reference §"Check which stage a plugin reached" (one
56
+ * `known_marketplaces.json` per user) and Marketplace reference §"Marketplace file" (one marketplace per `name`) and
57
+ * §"Top-level fields" (`name`: letters, digits, `.`, `_`, `-`); Settings reference §`extraKnownMarketplaces` (the name
58
+ * must match `marketplace.json`). https://code.claude.com/docs/en/plugins/loading ·
59
+ * https://code.claude.com/docs/en/plugins/marketplace-reference · https://code.claude.com/docs/en/settings-reference
60
+ *
61
+ * Rejected: a name per APPLICATION, which would need a `marketplace.json` generated in each application and the plugin
62
+ * copied beside it (a local marketplace whose plugin source is a symlink is not read), and would stop the framework
63
+ * checkout's dogfood applications from loading the plugin in place as it is edited. Residual: a dogfood application
64
+ * (the checkout's build) and an installed application on the SAME version string still share a name.
65
+ */
66
+ export declare function wildoClaudeMarketplaceName(version: string): string;
67
+ /** Whether a marketplace name is one this module may own: the versioned form, or the bare name written before #2417. */
68
+ export declare function isWildoClaudeMarketplaceName(name: string): boolean;
69
+ /** The install id the application's settings enable: `wildo@<marketplace name>`. */
70
+ export declare function wildoClaudePluginId(marketplaceName: string): string;
44
71
  /** Where the compiled marketplace sits beside `dist/knowledge` in `@wildo-ai/framework-knowledge`. */
45
72
  export declare const WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME = "claude-marketplace";
46
73
  /**
@@ -67,6 +94,11 @@ export declare const WILDO_STATUS_LINE_REFRESH_SECONDS = 5;
67
94
  export interface ApplicationClaudeSettingsOwnership {
68
95
  readonly schemaVersion: 1;
69
96
  readonly marketplaceSourcePath: string | null;
97
+ /**
98
+ * The marketplace NAME written, so a version change can retire the previous key and plugin id (#2417). A record
99
+ * written before the field read as the bare `wildo` whenever it owned a marketplace.
100
+ */
101
+ readonly marketplaceName: string | null;
70
102
  readonly enabledPluginWritten: boolean;
71
103
  readonly permissionsAllow: readonly string[];
72
104
  /** Whether the `statusLine` in the file is the one this module wrote. */
@@ -76,6 +108,8 @@ export declare const EMPTY_CLAUDE_SETTINGS_OWNERSHIP: ApplicationClaudeSettingsO
76
108
  export interface ApplicationClaudeSettingsDesired {
77
109
  /** The marketplace `path`, relative to the git root and `./`-prefixed; `null` when there is no plugin to point at. */
78
110
  readonly marketplaceSourcePath: string | null;
111
+ /** The `name` in the compiled `marketplace.json` — the settings key must equal it. Ignored when the path is `null`. */
112
+ readonly marketplaceName: string;
79
113
  readonly permissionsAllow: readonly string[];
80
114
  }
81
115
  type JsonObject = Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"application-claude-settings.d.ts","sourceRoot":"","sources":["../../../../../../src/services/framework/application-claude-settings.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,kHAAkH;AAClH,eAAO,MAAM,6BAA6B,UAAU,CAAC;AACrD,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAChD,eAAO,MAAM,sBAAsB,gBAAiE,CAAC;AAErG,sGAAsG;AACtG,eAAO,MAAM,uCAAuC,uBAAuB,CAAC;AAE5E;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,SAAS,MAAM,EAc/D,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,wFAAwF;AACxF,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9C,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,yEAAyE;IACzE,QAAQ,CA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,CAAC,KAAK,EAAE;IACnD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,6FAA6F;IAC7F,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9C,GAAG,gCAAgC,CA0BnC"}
1
+ {"version":3,"file":"application-claude-settings.d.ts","sourceRoot":"","sources":["../../../../src/services/framework/application-claude-settings.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,wHAAwH;AACxH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAElE;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,sGAAsG;AACtG,eAAO,MAAM,uCAAuC,uBAAuB,CAAC;AAE5E;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,SAAS,MAAM,EAc/D,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,wFAAwF;AACxF,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9C;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAA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;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACnD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,6FAA6F;IAC7F,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9C,GAAG,gCAAgC,CA8BnC"}
@@ -14,8 +14,8 @@ import { describeCaughtError } from '@wildo-ai/saas-models';
14
14
  * framework version the application installed. Claude Code reaches it through three keys of the
15
15
  * application's PROJECT settings:
16
16
  *
17
- * - `extraKnownMarketplaces.wildo` — a `directory` source pointing at that compiled marketplace;
18
- * - `enabledPlugins["wildo@wildo"]` — turn the plugin on;
17
+ * - `extraKnownMarketplaces["wildo-<version>"]` — a `directory` source pointing at that compiled marketplace;
18
+ * - `enabledPlugins["wildo@wildo-<version>"]` — turn the plugin on (#2417: the marketplace is named after the version);
19
19
  * - `permissions.allow` — the read-only `wildo` verbs the console calls constantly, so the session
20
20
  * does not stop on a prompt for each (calibrated on EFFECT, as the framework's own settings are:
21
21
  * reading is allowed, anything that spends or leaves the machine is not listed here).
@@ -41,10 +41,43 @@ import { describeCaughtError } from '@wildo-ai/saas-models';
41
41
  * record is gitignored, the settings are not) infers it by exact value match —
42
42
  * {@link inferClaudeSettingsOwnership}.
43
43
  */
44
- /** The marketplace and plugin names — the install id is `wildo@wildo`, and commands answer as `/wildo:<name>`. */
45
- export const WILDO_CLAUDE_MARKETPLACE_NAME = 'wildo';
44
+ /**
45
+ * The plugin's name — commands answer as `/wildo:<name>` whatever marketplace carries it, because Claude Code namespaces
46
+ * a plugin's components under its MANIFEST name.
47
+ */
46
48
  export const WILDO_CLAUDE_PLUGIN_NAME = 'wildo';
47
- export const WILDO_CLAUDE_PLUGIN_ID = `${WILDO_CLAUDE_PLUGIN_NAME}@${WILDO_CLAUDE_MARKETPLACE_NAME}`;
49
+ /**
50
+ * The marketplace name a framework version publishes its plugin under: `wildo-<version>` (#2417).
51
+ *
52
+ * Claude Code keeps ONE `known_marketplaces.json` per user and registers one marketplace per name, so when every
53
+ * application declared the same name `wildo`, whichever application had registered last decided which copy every
54
+ * other application's session loaded. On app-creation-test-005 (1.1.9) the session loaded app-creation-test-004's
55
+ * 1.1.8 plugin. The name must equal the `name` in `marketplace.json`, which is compiled once per package version and
56
+ * shared by every application that installs it, so the version is the finest identity the name can carry: two
57
+ * applications on different framework versions no longer collide, and two on the same version load the same bytes.
58
+ *
59
+ * spec-cite: Claude Code docs, Plugin loading reference §"Check which stage a plugin reached" (one
60
+ * `known_marketplaces.json` per user) and Marketplace reference §"Marketplace file" (one marketplace per `name`) and
61
+ * §"Top-level fields" (`name`: letters, digits, `.`, `_`, `-`); Settings reference §`extraKnownMarketplaces` (the name
62
+ * must match `marketplace.json`). https://code.claude.com/docs/en/plugins/loading ·
63
+ * https://code.claude.com/docs/en/plugins/marketplace-reference · https://code.claude.com/docs/en/settings-reference
64
+ *
65
+ * Rejected: a name per APPLICATION, which would need a `marketplace.json` generated in each application and the plugin
66
+ * copied beside it (a local marketplace whose plugin source is a symlink is not read), and would stop the framework
67
+ * checkout's dogfood applications from loading the plugin in place as it is edited. Residual: a dogfood application
68
+ * (the checkout's build) and an installed application on the SAME version string still share a name.
69
+ */
70
+ export function wildoClaudeMarketplaceName(version) {
71
+ return `${WILDO_CLAUDE_PLUGIN_NAME}-${version.replace(/[^A-Za-z0-9._-]/gu, '-').replace(/\.{2,}/gu, '.')}`;
72
+ }
73
+ /** Whether a marketplace name is one this module may own: the versioned form, or the bare name written before #2417. */
74
+ export function isWildoClaudeMarketplaceName(name) {
75
+ return name === WILDO_CLAUDE_PLUGIN_NAME || name.startsWith(`${WILDO_CLAUDE_PLUGIN_NAME}-`);
76
+ }
77
+ /** The install id the application's settings enable: `wildo@<marketplace name>`. */
78
+ export function wildoClaudePluginId(marketplaceName) {
79
+ return `${WILDO_CLAUDE_PLUGIN_NAME}@${marketplaceName}`;
80
+ }
48
81
  /** Where the compiled marketplace sits beside `dist/knowledge` in `@wildo-ai/framework-knowledge`. */
49
82
  export const WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME = 'claude-marketplace';
50
83
  /**
@@ -84,6 +117,7 @@ export const WILDO_STATUS_LINE_REFRESH_SECONDS = 5;
84
117
  export const EMPTY_CLAUDE_SETTINGS_OWNERSHIP = Object.freeze({
85
118
  schemaVersion: 1,
86
119
  marketplaceSourcePath: null,
120
+ marketplaceName: null,
87
121
  enabledPluginWritten: false,
88
122
  permissionsAllow: [],
89
123
  statusLineWritten: false,
@@ -100,15 +134,19 @@ function asObject(value) {
100
134
  */
101
135
  export function applyApplicationClaudeSettings(current, desired, previous) {
102
136
  const next = structuredClone(current);
103
- /* The marketplace entry: ours by name. Removed when there is no plugin to point at any more. */
137
+ /*
138
+ * The marketplace entry: ours by name. Removed when there is no plugin to point at any more, and RENAMED when the
139
+ * framework version (and so the compiled name) changed (#2417): the previous key would keep pointing a user-global
140
+ * registration at a name nothing compiles any more.
141
+ */
104
142
  const marketplaces = asObject(next.extraKnownMarketplaces) ?? {};
105
- if (desired.marketplaceSourcePath === null) {
106
- if (previous.marketplaceSourcePath !== null)
107
- delete marketplaces[WILDO_CLAUDE_MARKETPLACE_NAME];
108
- }
109
- else {
143
+ const previousName = previous.marketplaceSourcePath !== null ? previous.marketplaceName : null;
144
+ const desiredName = desired.marketplaceSourcePath === null ? null : desired.marketplaceName;
145
+ if (previousName !== null && previousName !== desiredName)
146
+ delete marketplaces[previousName];
147
+ if (desiredName !== null) {
110
148
  // semantic-literal-boundary: `directory` is Claude Code's own marketplace source type, written into its settings file.
111
- marketplaces[WILDO_CLAUDE_MARKETPLACE_NAME] = { source: { source: 'directory', path: desired.marketplaceSourcePath } };
149
+ marketplaces[desiredName] = { source: { source: 'directory', path: desired.marketplaceSourcePath } };
112
150
  }
113
151
  if (Object.keys(marketplaces).length > 0)
114
152
  next.extraKnownMarketplaces = marketplaces;
@@ -116,18 +154,28 @@ export function applyApplicationClaudeSettings(current, desired, previous) {
116
154
  delete next.extraKnownMarketplaces;
117
155
  /*
118
156
  * The plugin switch. Written `true` when absent. A value that differs from what we last wrote is the
119
- * developer's own decision (they turned the plugin off) and is left alone.
157
+ * developer's own decision (they turned the plugin off) and is left alone — and carried to the new id when the
158
+ * marketplace is renamed, so an upgrade never turns back on a plugin the developer turned off.
120
159
  */
121
160
  const enabled = asObject(next.enabledPlugins) ?? {};
122
161
  let enabledPluginWritten = previous.enabledPluginWritten;
123
- if (desired.marketplaceSourcePath === null) {
124
- if (previous.enabledPluginWritten && enabled[WILDO_CLAUDE_PLUGIN_ID] === true)
125
- delete enabled[WILDO_CLAUDE_PLUGIN_ID];
162
+ const previousId = previousName === null ? null : wildoClaudePluginId(previousName);
163
+ const desiredId = desiredName === null ? null : wildoClaudePluginId(desiredName);
164
+ let turnedOffByDeveloper = false;
165
+ if (previousId !== null && previousId !== desiredId) {
166
+ if (previous.enabledPluginWritten && enabled[previousId] === true)
167
+ delete enabled[previousId];
168
+ else if (enabled[previousId] === false) {
169
+ turnedOffByDeveloper = true;
170
+ delete enabled[previousId];
171
+ }
172
+ }
173
+ if (desiredId === null) {
126
174
  enabledPluginWritten = false;
127
175
  }
128
- else if (!(WILDO_CLAUDE_PLUGIN_ID in enabled)) {
129
- enabled[WILDO_CLAUDE_PLUGIN_ID] = true;
130
- enabledPluginWritten = true;
176
+ else if (!(desiredId in enabled)) {
177
+ enabled[desiredId] = !turnedOffByDeveloper;
178
+ enabledPluginWritten = !turnedOffByDeveloper;
131
179
  }
132
180
  if (Object.keys(enabled).length > 0)
133
181
  next.enabledPlugins = enabled;
@@ -168,6 +216,7 @@ export function applyApplicationClaudeSettings(current, desired, previous) {
168
216
  const ownership = {
169
217
  schemaVersion: 1,
170
218
  marketplaceSourcePath: desired.marketplaceSourcePath,
219
+ marketplaceName: desiredName,
171
220
  enabledPluginWritten,
172
221
  permissionsAllow: [...desired.permissionsAllow],
173
222
  statusLineWritten,
@@ -217,13 +266,24 @@ const SETTINGS_FILE_RELATIVE = ['.claude', 'settings.json'];
217
266
  * read-only `wildo` verb, and a stale allowance of one is harmless.
218
267
  */
219
268
  export function inferClaudeSettingsOwnership(current, desired) {
220
- const marketplace = asObject(asObject(current.extraKnownMarketplaces)?.[WILDO_CLAUDE_MARKETPLACE_NAME]);
221
- const source = asObject(marketplace?.source);
269
+ /*
270
+ * The marketplace this module wrote: a key it may own (`wildo` or `wildo-<version>`) whose directory source is the
271
+ * path it would write, or a path of the shape it writes (`…/dist/claude-marketplace`, so a moved package or a removed
272
+ * plugin is still recognised). Matching the PATH, not only the name, is what keeps a developer's own `wildo-*`
273
+ * marketplace pointing elsewhere theirs (#2417).
274
+ */
275
+ const writtenShape = (path) => typeof path === 'string'
276
+ && (path === desired.marketplaceSourcePath || path.endsWith(`/dist/${WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME}`));
277
+ const ours = Object.entries(asObject(current.extraKnownMarketplaces) ?? {}).find(([name, entry]) => isWildoClaudeMarketplaceName(name)
278
+ && writtenShape(asObject(asObject(entry)?.source)?.path));
279
+ const ownedName = ours?.[0] ?? null;
280
+ const ownedPath = ours === undefined ? null : asObject(asObject(ours[1])?.source)?.path;
222
281
  const allow = asObject(current.permissions)?.allow;
223
282
  return {
224
283
  schemaVersion: 1,
225
- marketplaceSourcePath: typeof source?.path === 'string' ? source.path : null,
226
- enabledPluginWritten: asObject(current.enabledPlugins)?.[WILDO_CLAUDE_PLUGIN_ID] === true,
284
+ marketplaceSourcePath: ownedPath,
285
+ marketplaceName: ownedName,
286
+ enabledPluginWritten: ownedName !== null && asObject(current.enabledPlugins)?.[wildoClaudePluginId(ownedName)] === true,
227
287
  permissionsAllow: Array.isArray(allow) ? allow.filter((entry) => typeof entry === 'string' && desired.permissionsAllow.includes(entry)) : [],
228
288
  statusLineWritten: asObject(current.statusLine)?.command === WILDO_STATUS_LINE_COMMAND,
229
289
  };
@@ -237,15 +297,26 @@ function readOwnership(applicationRoot) {
237
297
  if (parsed.schemaVersion !== 1 || !Array.isArray(parsed.permissionsAllow)) {
238
298
  throw new Error(`${path} is not a claude-settings ownership record this version understands; delete it to let the next sync start over.`);
239
299
  }
300
+ const marketplaceSourcePath = typeof parsed.marketplaceSourcePath === 'string' ? parsed.marketplaceSourcePath : null;
240
301
  return {
241
302
  schemaVersion: 1,
242
- marketplaceSourcePath: typeof parsed.marketplaceSourcePath === 'string' ? parsed.marketplaceSourcePath : null,
303
+ marketplaceSourcePath,
304
+ // A record from before #2417 owned the bare name whenever it owned a marketplace.
305
+ marketplaceName: typeof parsed.marketplaceName === 'string' ? parsed.marketplaceName : (marketplaceSourcePath === null ? null : WILDO_CLAUDE_PLUGIN_NAME),
243
306
  enabledPluginWritten: parsed.enabledPluginWritten === true,
244
307
  permissionsAllow: parsed.permissionsAllow.filter((entry) => typeof entry === 'string'),
245
308
  /* Absent in a record written before the status line existed: nothing of ours is in the file yet. */
246
309
  statusLineWritten: parsed.statusLineWritten === true,
247
310
  };
248
311
  }
312
+ /**
313
+ * The `name` the compiled `marketplace.json` declares, which the settings key must equal (#2417). A package compiled
314
+ * before the versioned name, or a manifest with no usable name, answers the bare `wildo` it was compiled with.
315
+ */
316
+ function readCompiledMarketplaceName(marketplaceDirectory) {
317
+ const manifest = JSON.parse(readFileSync(join(marketplaceDirectory, '.claude-plugin', 'marketplace.json'), 'utf8'));
318
+ return typeof manifest.name === 'string' && isWildoClaudeMarketplaceName(manifest.name) ? manifest.name : WILDO_CLAUDE_PLUGIN_NAME;
319
+ }
249
320
  /**
250
321
  * Read, merge and write the application's `.claude/settings.json`.
251
322
  *
@@ -264,7 +335,11 @@ export function syncApplicationClaudeSettings(input) {
264
335
  if (currentObject === null) {
265
336
  return { updated: false, marketplaceSourcePath: null, warning: `${settingsPath} is not a JSON object; the wildo plugin and console permissions were NOT wired.` };
266
337
  }
267
- const desired = { marketplaceSourcePath, permissionsAllow: WILDO_CONSOLE_READ_ONLY_PERMISSIONS };
338
+ const desired = {
339
+ marketplaceSourcePath,
340
+ marketplaceName: present ? readCompiledMarketplaceName(input.marketplaceDirectory) : WILDO_CLAUDE_PLUGIN_NAME,
341
+ permissionsAllow: WILDO_CONSOLE_READ_ONLY_PERMISSIONS,
342
+ };
268
343
  const previous = readOwnership(input.applicationRoot) ?? inferClaudeSettingsOwnership(currentObject, desired);
269
344
  const { next, ownership, changed } = applyApplicationClaudeSettings(currentObject, desired, previous);
270
345
  if (changed)
@@ -1 +1 @@
1
- {"version":3,"file":"application-claude-settings.js","sourceRoot":"","sources":["../../../../../../src/services/framework/application-claude-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,kHAAkH;AAClH,MAAM,CAAC,MAAM,6BAA6B,GAAG,OAAO,CAAC;AACrD,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAChD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,wBAAwB,IAAI,6BAA6B,EAAE,CAAC;AAErG,sGAAsG;AACtG,MAAM,CAAC,MAAM,uCAAuC,GAAG,oBAAoB,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAsB,MAAM,CAAC,MAAM,CAAC;IAClF,6BAA6B;IAC7B,kCAAkC;IAClC,4BAA4B;IAC5B,+BAA+B;IAC/B,6BAA6B;IAC7B,8BAA8B;IAC9B,8BAA8B;IAC9B,0BAA0B;IAC1B,2BAA2B;IAC3B,gCAAgC;IAChC,uBAAuB;IACvB,gCAAgC;IAChC,4BAA4B;CAC7B,CA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AAC,CAAC,qBAAqB,KAAK,IAAI;gBAC9B,CAAC,CAAC,yJAAyJ;gBAC3J,CAAC,CAAC,SAAS,CAAC;QAChB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACpG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,YAAY,KAAK,mBAAmB,CAAC,KAAK,CAAC,6DAA6D,EAAE,CAAC;IAChM,CAAC;AACH,CAAC","sourcesContent":["import { execFileSync } from 'node:child_process';\nimport { existsSync, readFileSync, realpathSync, writeFileSync } from 'node:fs';\nimport { isAbsolute, join, relative, resolve, sep } from 'node:path';\n\nimport { describeCaughtError } from '@wildo-ai/saas-models';\n\n/**\n * Keeps a generated application's `.claude/settings.json` wired to the `wildo` Claude Code plugin\n * (#1651, epic #1659).\n *\n * ## What the application gets, and why each key\n *\n * The developer drives application creation from a Claude Code session (the CONSOLE). The `wildo`\n * plugin — the `/wildo:*` commands, and later the hooks, background monitor and agents — is compiled\n * into `@wildo-ai/framework-knowledge` (`dist/claude-marketplace`), so it is always exactly the\n * framework version the application installed. Claude Code reaches it through three keys of the\n * application's PROJECT settings:\n *\n * - `extraKnownMarketplaces.wildo` — a `directory` source pointing at that compiled marketplace;\n * - `enabledPlugins[\"wildo@wildo\"]` — turn the plugin on;\n * - `permissions.allow` — the read-only `wildo` verbs the console calls constantly, so the session\n * does not stop on a prompt for each (calibrated on EFFECT, as the framework's own settings are:\n * reading is allowed, anything that spends or leaves the machine is not listed here).\n *\n * ## The path is relative to the GIT ROOT, not to the application — measured, not assumed\n *\n * Measured 2026-09-25 against Claude Code 2.1.281 (recorded on #1651): a project marketplace applies\n * only after the workspace-trust dialog, and for an application inside a larger repository BOTH the\n * trust and a relative `path` are keyed to the repository root. A path relative to the application\n * loaded nothing; the same path relative to the repository root loaded the plugin. So the path is\n * expressed from `git rev-parse --show-toplevel` — `./node_modules/…` for a standalone application,\n * `./platform/factory/framework-knowledge/dist/claude-marketplace` for the monorepo's dogfood\n * applications. A marketplace outside the repository is never written: the file is committed, and a\n * machine-specific absolute path would be wrong on every other checkout.\n *\n * ## Why a MERGE with recorded ownership, never a rewrite\n *\n * `.claude/settings.json` belongs to the application — a developer adds hooks, permissions and\n * plugins of their own. This writes only the keys it owns and records, beside the managed-file\n * manifest, exactly which values it wrote. On the next sync it removes what it wrote and no longer\n * wants, and leaves everything else alone. A value the developer CHANGED after it was written (the\n * plugin turned off) is the developer's decision and is not reverted. A checkout with no record (the\n * record is gitignored, the settings are not) infers it by exact value match —\n * {@link inferClaudeSettingsOwnership}.\n */\n\n/** The marketplace and plugin names — the install id is `wildo@wildo`, and commands answer as `/wildo:<name>`. */\nexport const WILDO_CLAUDE_MARKETPLACE_NAME = 'wildo';\nexport const WILDO_CLAUDE_PLUGIN_NAME = 'wildo';\nexport const WILDO_CLAUDE_PLUGIN_ID = `${WILDO_CLAUDE_PLUGIN_NAME}@${WILDO_CLAUDE_MARKETPLACE_NAME}`;\n\n/** Where the compiled marketplace sits beside `dist/knowledge` in `@wildo-ai/framework-knowledge`. */\nexport const WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME = 'claude-marketplace';\n\n/**\n * The console verbs allowed without a prompt: READ-ONLY ones only.\n *\n * `wildo creation run|answer` and `wildo build …` are deliberately absent: they spend model money or\n * resume work, and each `/wildo:*` command that calls them pre-approves exactly the verb it needs\n * through its own `allowed-tools` — so the approval travels with the person's explicit invocation\n * instead of standing in the project for any prompt to use.\n */\nexport const WILDO_CONSOLE_READ_ONLY_PERMISSIONS: readonly string[] = Object.freeze([\n 'Bash(wildo creation feed:*)',\n 'Bash(wildo creation questions:*)',\n 'Bash(wildo creation why:*)',\n 'Bash(wildo creation writes:*)',\n 'Bash(wildo creation diff:*)',\n 'Bash(wildo creation pulse:*)',\n 'Bash(wildo creation brief:*)',\n 'Bash(wildo build next:*)',\n 'Bash(wildo build tasks:*)',\n 'Bash(wildo build dispatches:*)',\n 'Bash(wildo context:*)',\n 'Bash(wildo workbench status:*)',\n 'Bash(wildo local doctor:*)',\n]);\n\n/**\n * The console's status line (#1657). A plugin cannot carry `statusLine` (only `agent` and\n * `subagentStatusLine` are honoured from a plugin's settings), so it is written into the application's\n * project settings beside the plugin wiring.\n *\n * `refreshInterval` because the status line otherwise refreshes only on session events, and goes quiet\n * while the session is idle — exactly when the companion finishes a run. The verb is answered by the\n * CLI's fast path, so a refresh costs milliseconds, not the kernel's load.\n */\nexport const WILDO_STATUS_LINE_COMMAND = 'wildo creation statusline';\nexport const WILDO_STATUS_LINE_REFRESH_SECONDS = 5;\n\n/** What this module wrote last time — the only values it may later change or remove. */\nexport interface ApplicationClaudeSettingsOwnership {\n readonly schemaVersion: 1;\n readonly marketplaceSourcePath: string | null;\n readonly enabledPluginWritten: boolean;\n readonly permissionsAllow: readonly string[];\n /** Whether the `statusLine` in the file is the one this module wrote. */\n readonly statusLineWritten: boolean;\n}\n\nexport const EMPTY_CLAUDE_SETTINGS_OWNERSHIP: ApplicationClaudeSettingsOwnership = Object.freeze({\n schemaVersion: 1,\n marketplaceSourcePath: null,\n enabledPluginWritten: false,\n permissionsAllow: [],\n statusLineWritten: false,\n});\n\nexport interface ApplicationClaudeSettingsDesired {\n /** The marketplace `path`, relative to the git root and `./`-prefixed; `null` when there is no plugin to point at. */\n readonly marketplaceSourcePath: string | null;\n readonly permissionsAllow: readonly string[];\n}\n\ntype JsonObject = Record<string, unknown>;\n\nfunction asObject(value: unknown): JsonObject | null {\n return typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as JsonObject) : null;\n}\n\n/**\n * `current` with this module's keys set to `desired`, given what it wrote last time.\n *\n * Pure: the caller reads and writes the file. Returns `changed: false` when nothing would move, so a\n * sync leaves the file's bytes and mtime alone — a settings file that looks edited on every sync is\n * one a developer stops reading diffs of.\n */\nexport function applyApplicationClaudeSettings(\n current: JsonObject,\n desired: ApplicationClaudeSettingsDesired,\n previous: ApplicationClaudeSettingsOwnership,\n): { readonly next: JsonObject; readonly ownership: ApplicationClaudeSettingsOwnership; readonly changed: boolean } {\n const next: JsonObject = structuredClone(current);\n\n /* The marketplace entry: ours by name. Removed when there is no plugin to point at any more. */\n const marketplaces = asObject(next.extraKnownMarketplaces) ?? {};\n if (desired.marketplaceSourcePath === null) {\n if (previous.marketplaceSourcePath !== null) delete marketplaces[WILDO_CLAUDE_MARKETPLACE_NAME];\n } else {\n // semantic-literal-boundary: `directory` is Claude Code's own marketplace source type, written into its settings file.\n marketplaces[WILDO_CLAUDE_MARKETPLACE_NAME] = { source: { source: 'directory', path: desired.marketplaceSourcePath } };\n }\n if (Object.keys(marketplaces).length > 0) next.extraKnownMarketplaces = marketplaces;\n else delete next.extraKnownMarketplaces;\n\n /*\n * The plugin switch. Written `true` when absent. A value that differs from what we last wrote is the\n * developer's own decision (they turned the plugin off) and is left alone.\n */\n const enabled = asObject(next.enabledPlugins) ?? {};\n let enabledPluginWritten = previous.enabledPluginWritten;\n if (desired.marketplaceSourcePath === null) {\n if (previous.enabledPluginWritten && enabled[WILDO_CLAUDE_PLUGIN_ID] === true) delete enabled[WILDO_CLAUDE_PLUGIN_ID];\n enabledPluginWritten = false;\n } else if (!(WILDO_CLAUDE_PLUGIN_ID in enabled)) {\n enabled[WILDO_CLAUDE_PLUGIN_ID] = true;\n enabledPluginWritten = true;\n }\n if (Object.keys(enabled).length > 0) next.enabledPlugins = enabled;\n else delete next.enabledPlugins;\n\n /* Permissions: remove what we wrote and no longer want, add what we want; never touch the rest. */\n const permissions = asObject(next.permissions) ?? {};\n const allow = Array.isArray(permissions.allow) ? (permissions.allow as unknown[]).filter((entry) => typeof entry === 'string') as string[] : [];\n const desiredAllow = new Set(desired.permissionsAllow);\n const withoutStale = allow.filter((entry) => !(previous.permissionsAllow.includes(entry) && !desiredAllow.has(entry)));\n const nextAllow = [...withoutStale, ...desired.permissionsAllow.filter((entry) => !withoutStale.includes(entry))];\n if (nextAllow.length > 0) permissions.allow = nextAllow;\n else delete permissions.allow;\n if (Object.keys(permissions).length > 0) next.permissions = permissions;\n else delete next.permissions;\n\n /*\n * The status line: written when there is none; kept current while it is still the one we wrote;\n * never replaces one the developer set; removed with the plugin. It is ours only if we wrote it AND it\n * still runs our command — a developer who edited it has taken it over.\n */\n const statusLine = asObject(next.statusLine);\n const statusLineIsOurs = previous.statusLineWritten && statusLine?.command === WILDO_STATUS_LINE_COMMAND;\n let statusLineWritten = statusLineIsOurs;\n if (desired.marketplaceSourcePath === null) {\n if (statusLineIsOurs) delete next.statusLine;\n statusLineWritten = false;\n } else if (statusLine === null || statusLineIsOurs) {\n // semantic-literal-boundary: `command` is Claude Code's own status-line type, written into its settings file.\n next.statusLine = { type: 'command', command: WILDO_STATUS_LINE_COMMAND, refreshInterval: WILDO_STATUS_LINE_REFRESH_SECONDS };\n statusLineWritten = true;\n }\n\n const ownership: ApplicationClaudeSettingsOwnership = {\n schemaVersion: 1,\n marketplaceSourcePath: desired.marketplaceSourcePath,\n enabledPluginWritten,\n permissionsAllow: [...desired.permissionsAllow],\n statusLineWritten,\n };\n return { next, ownership, changed: JSON.stringify(next) !== JSON.stringify(current) };\n}\n\n/** The repository root Claude Code keys trust and relative marketplace paths to; the application root when it is not in a repository. */\nexport function resolveRepositoryRoot(applicationRoot: string): string {\n try {\n const top = execFileSync('git', ['-C', applicationRoot, 'rev-parse', '--show-toplevel'], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();\n return top.length > 0 ? realpathSync(top) : realpathSync(applicationRoot);\n } catch {\n return realpathSync(applicationRoot);\n }\n}\n\n/**\n * The marketplace `path` for project settings: relative to the repository root, `./`-prefixed, POSIX\n * separators. `null` when the marketplace lies outside the repository — a committed settings file\n * cannot carry a path that exists only on this machine.\n *\n * `marketplaceDirectory` is taken LOGICALLY relative to the application (so an installed package is\n * addressed as `node_modules/@wildo-ai/framework-knowledge/…`, not as the version-specific store path\n * pnpm links it to — a store path would break at the next upgrade until the next sync).\n */\nexport function computeMarketplaceSourcePath(applicationRoot: string, marketplaceDirectory: string, repositoryRoot: string): string | null {\n const anchored = resolve(realpathSync(applicationRoot), relative(applicationRoot, marketplaceDirectory));\n const fromRepositoryRoot = relative(repositoryRoot, anchored);\n if (fromRepositoryRoot === '' || fromRepositoryRoot.startsWith('..') || isAbsolute(fromRepositoryRoot)) return null;\n return `./${fromRepositoryRoot.split(sep).join('/')}`;\n}\n\nconst OWNERSHIP_FILE_RELATIVE = ['.claude', '.wildo-framework-knowledge', 'claude-settings-ownership.json'] as const;\nconst SETTINGS_FILE_RELATIVE = ['.claude', 'settings.json'] as const;\n\n/**\n * Ownership when there is NO record: inferred from the committed settings by EXACT value match.\n *\n * `settings.json` is committed and the ownership record is gitignored, so every fresh clone, and every\n * other developer's checkout, starts with the file wired and no record. Reading \"no record\" as \"nothing\n * is ours\" left the status line and the permissions this module wrote belonging to nobody: never kept\n * current, and never removed with the plugin (#1659 review L4).\n *\n * A value identical to what this module writes is claimed; anything else stays the developer's. Claiming\n * a developer's identical value costs nothing — keeping it current rewrites the same value, and removing\n * it happens only when the plugin itself goes. The residual, accepted: a permission this module wrote in\n * an EARLIER version and no longer writes cannot be recognized on such a clone, so it stays; it is a\n * read-only `wildo` verb, and a stale allowance of one is harmless.\n */\nexport function inferClaudeSettingsOwnership(current: Record<string, unknown>, desired: ApplicationClaudeSettingsDesired): ApplicationClaudeSettingsOwnership {\n const marketplace = asObject(asObject(current.extraKnownMarketplaces)?.[WILDO_CLAUDE_MARKETPLACE_NAME]);\n const source = asObject(marketplace?.source);\n const allow = asObject(current.permissions)?.allow;\n return {\n schemaVersion: 1,\n marketplaceSourcePath: typeof source?.path === 'string' ? source.path : null,\n enabledPluginWritten: asObject(current.enabledPlugins)?.[WILDO_CLAUDE_PLUGIN_ID] === true,\n permissionsAllow: Array.isArray(allow) ? allow.filter((entry): entry is string => typeof entry === 'string' && desired.permissionsAllow.includes(entry)) : [],\n statusLineWritten: asObject(current.statusLine)?.command === WILDO_STATUS_LINE_COMMAND,\n };\n}\n\n/** The recorded ownership, or `null` when this checkout has none (a fresh clone): see {@link inferClaudeSettingsOwnership}. */\nfunction readOwnership(applicationRoot: string): ApplicationClaudeSettingsOwnership | null {\n const path = join(applicationRoot, ...OWNERSHIP_FILE_RELATIVE);\n if (!existsSync(path)) return null;\n const parsed = JSON.parse(readFileSync(path, 'utf8')) as Partial<ApplicationClaudeSettingsOwnership>;\n if (parsed.schemaVersion !== 1 || !Array.isArray(parsed.permissionsAllow)) {\n throw new Error(`${path} is not a claude-settings ownership record this version understands; delete it to let the next sync start over.`);\n }\n return {\n schemaVersion: 1,\n marketplaceSourcePath: typeof parsed.marketplaceSourcePath === 'string' ? parsed.marketplaceSourcePath : null,\n enabledPluginWritten: parsed.enabledPluginWritten === true,\n permissionsAllow: parsed.permissionsAllow.filter((entry): entry is string => typeof entry === 'string'),\n /* Absent in a record written before the status line existed: nothing of ours is in the file yet. */\n statusLineWritten: parsed.statusLineWritten === true,\n };\n}\n\n/** What became of the application's Claude Code settings — returned, never logged, like the rule imports. */\nexport interface ApplicationClaudeSettingsOutcome {\n readonly updated: boolean;\n /** The marketplace path written, or `null` when no plugin was wired. */\n readonly marketplaceSourcePath: string | null;\n /** Present when the settings could NOT be written, or the plugin could not be wired. */\n readonly warning?: string;\n}\n\n/**\n * Read, merge and write the application's `.claude/settings.json`.\n *\n * Non-fatal by design, for the same reason the rule imports are: a knowledge sync that succeeded must\n * not be reported as failed because the settings could not be updated. The absence is returned.\n */\nexport function syncApplicationClaudeSettings(input: {\n readonly applicationRoot: string;\n /** The compiled marketplace directory, or `null` when the knowledge payload carries none. */\n readonly marketplaceDirectory: string | null;\n}): ApplicationClaudeSettingsOutcome {\n const settingsPath = join(input.applicationRoot, ...SETTINGS_FILE_RELATIVE);\n try {\n const present = input.marketplaceDirectory !== null && existsSync(join(input.marketplaceDirectory, '.claude-plugin', 'marketplace.json'));\n const marketplaceSourcePath = present\n ? computeMarketplaceSourcePath(input.applicationRoot, input.marketplaceDirectory as string, resolveRepositoryRoot(input.applicationRoot))\n : null;\n const current = existsSync(settingsPath) ? JSON.parse(readFileSync(settingsPath, 'utf8')) as unknown : {};\n const currentObject = asObject(current);\n if (currentObject === null) {\n return { updated: false, marketplaceSourcePath: null, warning: `${settingsPath} is not a JSON object; the wildo plugin and console permissions were NOT wired.` };\n }\n const desired = { marketplaceSourcePath, permissionsAllow: WILDO_CONSOLE_READ_ONLY_PERMISSIONS };\n const previous = readOwnership(input.applicationRoot) ?? inferClaudeSettingsOwnership(currentObject, desired);\n const { next, ownership, changed } = applyApplicationClaudeSettings(currentObject, desired, previous);\n if (changed) writeFileSync(settingsPath, `${JSON.stringify(next, null, 2)}\\n`, 'utf8');\n writeFileSync(join(input.applicationRoot, ...OWNERSHIP_FILE_RELATIVE), `${JSON.stringify(ownership, null, 2)}\\n`, 'utf8');\n const warning = !present\n ? 'The installed framework knowledge carries no Claude Code plugin (dist/claude-marketplace); the /wildo:* commands are not wired.'\n : marketplaceSourcePath === null\n ? 'The wildo plugin lies outside this application\\'s git repository, so it cannot be named in the committed settings; the /wildo:* commands are not wired.'\n : undefined;\n return { updated: changed, marketplaceSourcePath, ...(warning === undefined ? {} : { warning }) };\n } catch (error) {\n return { updated: false, marketplaceSourcePath: null, warning: `Could not update ${settingsPath} (${describeCaughtError(error)}); the wildo plugin and console permissions were NOT wired.` };\n }\n}\n"]}
1
+ {"version":3,"file":"application-claude-settings.js","sourceRoot":"","sources":["../../../../src/services/framework/application-claude-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChF,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'node:fs';\nimport { isAbsolute, join, relative, resolve, sep } from 'node:path';\n\nimport { describeCaughtError } from '@wildo-ai/saas-models';\n\n/**\n * Keeps a generated application's `.claude/settings.json` wired to the `wildo` Claude Code plugin\n * (#1651, epic #1659).\n *\n * ## What the application gets, and why each key\n *\n * The developer drives application creation from a Claude Code session (the CONSOLE). The `wildo`\n * plugin — the `/wildo:*` commands, and later the hooks, background monitor and agents — is compiled\n * into `@wildo-ai/framework-knowledge` (`dist/claude-marketplace`), so it is always exactly the\n * framework version the application installed. Claude Code reaches it through three keys of the\n * application's PROJECT settings:\n *\n * - `extraKnownMarketplaces[\"wildo-<version>\"]` — a `directory` source pointing at that compiled marketplace;\n * - `enabledPlugins[\"wildo@wildo-<version>\"]` — turn the plugin on (#2417: the marketplace is named after the version);\n * - `permissions.allow` — the read-only `wildo` verbs the console calls constantly, so the session\n * does not stop on a prompt for each (calibrated on EFFECT, as the framework's own settings are:\n * reading is allowed, anything that spends or leaves the machine is not listed here).\n *\n * ## The path is relative to the GIT ROOT, not to the application — measured, not assumed\n *\n * Measured 2026-09-25 against Claude Code 2.1.281 (recorded on #1651): a project marketplace applies\n * only after the workspace-trust dialog, and for an application inside a larger repository BOTH the\n * trust and a relative `path` are keyed to the repository root. A path relative to the application\n * loaded nothing; the same path relative to the repository root loaded the plugin. So the path is\n * expressed from `git rev-parse --show-toplevel` — `./node_modules/…` for a standalone application,\n * `./platform/factory/framework-knowledge/dist/claude-marketplace` for the monorepo's dogfood\n * applications. A marketplace outside the repository is never written: the file is committed, and a\n * machine-specific absolute path would be wrong on every other checkout.\n *\n * ## Why a MERGE with recorded ownership, never a rewrite\n *\n * `.claude/settings.json` belongs to the application — a developer adds hooks, permissions and\n * plugins of their own. This writes only the keys it owns and records, beside the managed-file\n * manifest, exactly which values it wrote. On the next sync it removes what it wrote and no longer\n * wants, and leaves everything else alone. A value the developer CHANGED after it was written (the\n * plugin turned off) is the developer's decision and is not reverted. A checkout with no record (the\n * record is gitignored, the settings are not) infers it by exact value match —\n * {@link inferClaudeSettingsOwnership}.\n */\n\n/**\n * The plugin's name — commands answer as `/wildo:<name>` whatever marketplace carries it, because Claude Code namespaces\n * a plugin's components under its MANIFEST name.\n */\nexport const WILDO_CLAUDE_PLUGIN_NAME = 'wildo';\n\n/**\n * The marketplace name a framework version publishes its plugin under: `wildo-<version>` (#2417).\n *\n * Claude Code keeps ONE `known_marketplaces.json` per user and registers one marketplace per name, so when every\n * application declared the same name `wildo`, whichever application had registered last decided which copy every\n * other application's session loaded. On app-creation-test-005 (1.1.9) the session loaded app-creation-test-004's\n * 1.1.8 plugin. The name must equal the `name` in `marketplace.json`, which is compiled once per package version and\n * shared by every application that installs it, so the version is the finest identity the name can carry: two\n * applications on different framework versions no longer collide, and two on the same version load the same bytes.\n *\n * spec-cite: Claude Code docs, Plugin loading reference §\"Check which stage a plugin reached\" (one\n * `known_marketplaces.json` per user) and Marketplace reference §\"Marketplace file\" (one marketplace per `name`) and\n * §\"Top-level fields\" (`name`: letters, digits, `.`, `_`, `-`); Settings reference §`extraKnownMarketplaces` (the name\n * must match `marketplace.json`). https://code.claude.com/docs/en/plugins/loading ·\n * https://code.claude.com/docs/en/plugins/marketplace-reference · https://code.claude.com/docs/en/settings-reference\n *\n * Rejected: a name per APPLICATION, which would need a `marketplace.json` generated in each application and the plugin\n * copied beside it (a local marketplace whose plugin source is a symlink is not read), and would stop the framework\n * checkout's dogfood applications from loading the plugin in place as it is edited. Residual: a dogfood application\n * (the checkout's build) and an installed application on the SAME version string still share a name.\n */\nexport function wildoClaudeMarketplaceName(version: string): string {\n return `${WILDO_CLAUDE_PLUGIN_NAME}-${version.replace(/[^A-Za-z0-9._-]/gu, '-').replace(/\\.{2,}/gu, '.')}`;\n}\n\n/** Whether a marketplace name is one this module may own: the versioned form, or the bare name written before #2417. */\nexport function isWildoClaudeMarketplaceName(name: string): boolean {\n return name === WILDO_CLAUDE_PLUGIN_NAME || name.startsWith(`${WILDO_CLAUDE_PLUGIN_NAME}-`);\n}\n\n/** The install id the application's settings enable: `wildo@<marketplace name>`. */\nexport function wildoClaudePluginId(marketplaceName: string): string {\n return `${WILDO_CLAUDE_PLUGIN_NAME}@${marketplaceName}`;\n}\n\n/** Where the compiled marketplace sits beside `dist/knowledge` in `@wildo-ai/framework-knowledge`. */\nexport const WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME = 'claude-marketplace';\n\n/**\n * The console verbs allowed without a prompt: READ-ONLY ones only.\n *\n * `wildo creation run|answer` and `wildo build …` are deliberately absent: they spend model money or\n * resume work, and each `/wildo:*` command that calls them pre-approves exactly the verb it needs\n * through its own `allowed-tools` — so the approval travels with the person's explicit invocation\n * instead of standing in the project for any prompt to use.\n */\nexport const WILDO_CONSOLE_READ_ONLY_PERMISSIONS: readonly string[] = Object.freeze([\n 'Bash(wildo creation feed:*)',\n 'Bash(wildo creation questions:*)',\n 'Bash(wildo creation why:*)',\n 'Bash(wildo creation writes:*)',\n 'Bash(wildo creation diff:*)',\n 'Bash(wildo creation pulse:*)',\n 'Bash(wildo creation brief:*)',\n 'Bash(wildo build next:*)',\n 'Bash(wildo build tasks:*)',\n 'Bash(wildo build dispatches:*)',\n 'Bash(wildo context:*)',\n 'Bash(wildo workbench status:*)',\n 'Bash(wildo local doctor:*)',\n]);\n\n/**\n * The console's status line (#1657). A plugin cannot carry `statusLine` (only `agent` and\n * `subagentStatusLine` are honoured from a plugin's settings), so it is written into the application's\n * project settings beside the plugin wiring.\n *\n * `refreshInterval` because the status line otherwise refreshes only on session events, and goes quiet\n * while the session is idle — exactly when the companion finishes a run. The verb is answered by the\n * CLI's fast path, so a refresh costs milliseconds, not the kernel's load.\n */\nexport const WILDO_STATUS_LINE_COMMAND = 'wildo creation statusline';\nexport const WILDO_STATUS_LINE_REFRESH_SECONDS = 5;\n\n/** What this module wrote last time — the only values it may later change or remove. */\nexport interface ApplicationClaudeSettingsOwnership {\n readonly schemaVersion: 1;\n readonly marketplaceSourcePath: string | null;\n /**\n * The marketplace NAME written, so a version change can retire the previous key and plugin id (#2417). A record\n * written before the field read as the bare `wildo` whenever it owned a marketplace.\n */\n readonly marketplaceName: string | null;\n readonly enabledPluginWritten: boolean;\n readonly permissionsAllow: readonly string[];\n /** Whether the `statusLine` in the file is the one this module wrote. */\n readonly statusLineWritten: boolean;\n}\n\nexport const EMPTY_CLAUDE_SETTINGS_OWNERSHIP: ApplicationClaudeSettingsOwnership = Object.freeze({\n schemaVersion: 1,\n marketplaceSourcePath: null,\n marketplaceName: null,\n enabledPluginWritten: false,\n permissionsAllow: [],\n statusLineWritten: false,\n});\n\nexport interface ApplicationClaudeSettingsDesired {\n /** The marketplace `path`, relative to the git root and `./`-prefixed; `null` when there is no plugin to point at. */\n readonly marketplaceSourcePath: string | null;\n /** The `name` in the compiled `marketplace.json` — the settings key must equal it. Ignored when the path is `null`. */\n readonly marketplaceName: string;\n readonly permissionsAllow: readonly string[];\n}\n\ntype JsonObject = Record<string, unknown>;\n\nfunction asObject(value: unknown): JsonObject | null {\n return typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as JsonObject) : null;\n}\n\n/**\n * `current` with this module's keys set to `desired`, given what it wrote last time.\n *\n * Pure: the caller reads and writes the file. Returns `changed: false` when nothing would move, so a\n * sync leaves the file's bytes and mtime alone — a settings file that looks edited on every sync is\n * one a developer stops reading diffs of.\n */\nexport function applyApplicationClaudeSettings(\n current: JsonObject,\n desired: ApplicationClaudeSettingsDesired,\n previous: ApplicationClaudeSettingsOwnership,\n): { readonly next: JsonObject; readonly ownership: ApplicationClaudeSettingsOwnership; readonly changed: boolean } {\n const next: JsonObject = structuredClone(current);\n\n /*\n * The marketplace entry: ours by name. Removed when there is no plugin to point at any more, and RENAMED when the\n * framework version (and so the compiled name) changed (#2417): the previous key would keep pointing a user-global\n * registration at a name nothing compiles any more.\n */\n const marketplaces = asObject(next.extraKnownMarketplaces) ?? {};\n const previousName = previous.marketplaceSourcePath !== null ? previous.marketplaceName : null;\n const desiredName = desired.marketplaceSourcePath === null ? null : desired.marketplaceName;\n if (previousName !== null && previousName !== desiredName) delete marketplaces[previousName];\n if (desiredName !== null) {\n // semantic-literal-boundary: `directory` is Claude Code's own marketplace source type, written into its settings file.\n marketplaces[desiredName] = { source: { source: 'directory', path: desired.marketplaceSourcePath } };\n }\n if (Object.keys(marketplaces).length > 0) next.extraKnownMarketplaces = marketplaces;\n else delete next.extraKnownMarketplaces;\n\n /*\n * The plugin switch. Written `true` when absent. A value that differs from what we last wrote is the\n * developer's own decision (they turned the plugin off) and is left alone — and carried to the new id when the\n * marketplace is renamed, so an upgrade never turns back on a plugin the developer turned off.\n */\n const enabled = asObject(next.enabledPlugins) ?? {};\n let enabledPluginWritten = previous.enabledPluginWritten;\n const previousId = previousName === null ? null : wildoClaudePluginId(previousName);\n const desiredId = desiredName === null ? null : wildoClaudePluginId(desiredName);\n let turnedOffByDeveloper = false;\n if (previousId !== null && previousId !== desiredId) {\n if (previous.enabledPluginWritten && enabled[previousId] === true) delete enabled[previousId];\n else if (enabled[previousId] === false) {\n turnedOffByDeveloper = true;\n delete enabled[previousId];\n }\n }\n if (desiredId === null) {\n enabledPluginWritten = false;\n } else if (!(desiredId in enabled)) {\n enabled[desiredId] = !turnedOffByDeveloper;\n enabledPluginWritten = !turnedOffByDeveloper;\n }\n if (Object.keys(enabled).length > 0) next.enabledPlugins = enabled;\n else delete next.enabledPlugins;\n\n /* Permissions: remove what we wrote and no longer want, add what we want; never touch the rest. */\n const permissions = asObject(next.permissions) ?? {};\n const allow = Array.isArray(permissions.allow) ? (permissions.allow as unknown[]).filter((entry) => typeof entry === 'string') as string[] : [];\n const desiredAllow = new Set(desired.permissionsAllow);\n const withoutStale = allow.filter((entry) => !(previous.permissionsAllow.includes(entry) && !desiredAllow.has(entry)));\n const nextAllow = [...withoutStale, ...desired.permissionsAllow.filter((entry) => !withoutStale.includes(entry))];\n if (nextAllow.length > 0) permissions.allow = nextAllow;\n else delete permissions.allow;\n if (Object.keys(permissions).length > 0) next.permissions = permissions;\n else delete next.permissions;\n\n /*\n * The status line: written when there is none; kept current while it is still the one we wrote;\n * never replaces one the developer set; removed with the plugin. It is ours only if we wrote it AND it\n * still runs our command — a developer who edited it has taken it over.\n */\n const statusLine = asObject(next.statusLine);\n const statusLineIsOurs = previous.statusLineWritten && statusLine?.command === WILDO_STATUS_LINE_COMMAND;\n let statusLineWritten = statusLineIsOurs;\n if (desired.marketplaceSourcePath === null) {\n if (statusLineIsOurs) delete next.statusLine;\n statusLineWritten = false;\n } else if (statusLine === null || statusLineIsOurs) {\n // semantic-literal-boundary: `command` is Claude Code's own status-line type, written into its settings file.\n next.statusLine = { type: 'command', command: WILDO_STATUS_LINE_COMMAND, refreshInterval: WILDO_STATUS_LINE_REFRESH_SECONDS };\n statusLineWritten = true;\n }\n\n const ownership: ApplicationClaudeSettingsOwnership = {\n schemaVersion: 1,\n marketplaceSourcePath: desired.marketplaceSourcePath,\n marketplaceName: desiredName,\n enabledPluginWritten,\n permissionsAllow: [...desired.permissionsAllow],\n statusLineWritten,\n };\n return { next, ownership, changed: JSON.stringify(next) !== JSON.stringify(current) };\n}\n\n/** The repository root Claude Code keys trust and relative marketplace paths to; the application root when it is not in a repository. */\nexport function resolveRepositoryRoot(applicationRoot: string): string {\n try {\n const top = execFileSync('git', ['-C', applicationRoot, 'rev-parse', '--show-toplevel'], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();\n return top.length > 0 ? realpathSync(top) : realpathSync(applicationRoot);\n } catch {\n return realpathSync(applicationRoot);\n }\n}\n\n/**\n * The marketplace `path` for project settings: relative to the repository root, `./`-prefixed, POSIX\n * separators. `null` when the marketplace lies outside the repository — a committed settings file\n * cannot carry a path that exists only on this machine.\n *\n * `marketplaceDirectory` is taken LOGICALLY relative to the application (so an installed package is\n * addressed as `node_modules/@wildo-ai/framework-knowledge/…`, not as the version-specific store path\n * pnpm links it to — a store path would break at the next upgrade until the next sync).\n */\nexport function computeMarketplaceSourcePath(applicationRoot: string, marketplaceDirectory: string, repositoryRoot: string): string | null {\n const anchored = resolve(realpathSync(applicationRoot), relative(applicationRoot, marketplaceDirectory));\n const fromRepositoryRoot = relative(repositoryRoot, anchored);\n if (fromRepositoryRoot === '' || fromRepositoryRoot.startsWith('..') || isAbsolute(fromRepositoryRoot)) return null;\n return `./${fromRepositoryRoot.split(sep).join('/')}`;\n}\n\nconst OWNERSHIP_FILE_RELATIVE = ['.claude', '.wildo-framework-knowledge', 'claude-settings-ownership.json'] as const;\nconst SETTINGS_FILE_RELATIVE = ['.claude', 'settings.json'] as const;\n\n/**\n * Ownership when there is NO record: inferred from the committed settings by EXACT value match.\n *\n * `settings.json` is committed and the ownership record is gitignored, so every fresh clone, and every\n * other developer's checkout, starts with the file wired and no record. Reading \"no record\" as \"nothing\n * is ours\" left the status line and the permissions this module wrote belonging to nobody: never kept\n * current, and never removed with the plugin (#1659 review L4).\n *\n * A value identical to what this module writes is claimed; anything else stays the developer's. Claiming\n * a developer's identical value costs nothing — keeping it current rewrites the same value, and removing\n * it happens only when the plugin itself goes. The residual, accepted: a permission this module wrote in\n * an EARLIER version and no longer writes cannot be recognized on such a clone, so it stays; it is a\n * read-only `wildo` verb, and a stale allowance of one is harmless.\n */\nexport function inferClaudeSettingsOwnership(current: Record<string, unknown>, desired: ApplicationClaudeSettingsDesired): ApplicationClaudeSettingsOwnership {\n /*\n * The marketplace this module wrote: a key it may own (`wildo` or `wildo-<version>`) whose directory source is the\n * path it would write, or a path of the shape it writes (`…/dist/claude-marketplace`, so a moved package or a removed\n * plugin is still recognised). Matching the PATH, not only the name, is what keeps a developer's own `wildo-*`\n * marketplace pointing elsewhere theirs (#2417).\n */\n const writtenShape = (path: unknown): boolean => typeof path === 'string'\n && (path === desired.marketplaceSourcePath || path.endsWith(`/dist/${WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME}`));\n const ours = Object.entries(asObject(current.extraKnownMarketplaces) ?? {}).find(([name, entry]) => isWildoClaudeMarketplaceName(name)\n && writtenShape(asObject(asObject(entry)?.source)?.path));\n const ownedName = ours?.[0] ?? null;\n const ownedPath = ours === undefined ? null : asObject(asObject(ours[1])?.source)?.path as string;\n const allow = asObject(current.permissions)?.allow;\n return {\n schemaVersion: 1,\n marketplaceSourcePath: ownedPath,\n marketplaceName: ownedName,\n enabledPluginWritten: ownedName !== null && asObject(current.enabledPlugins)?.[wildoClaudePluginId(ownedName)] === true,\n permissionsAllow: Array.isArray(allow) ? allow.filter((entry): entry is string => typeof entry === 'string' && desired.permissionsAllow.includes(entry)) : [],\n statusLineWritten: asObject(current.statusLine)?.command === WILDO_STATUS_LINE_COMMAND,\n };\n}\n\n/** The recorded ownership, or `null` when this checkout has none (a fresh clone): see {@link inferClaudeSettingsOwnership}. */\nfunction readOwnership(applicationRoot: string): ApplicationClaudeSettingsOwnership | null {\n const path = join(applicationRoot, ...OWNERSHIP_FILE_RELATIVE);\n if (!existsSync(path)) return null;\n const parsed = JSON.parse(readFileSync(path, 'utf8')) as Partial<ApplicationClaudeSettingsOwnership>;\n if (parsed.schemaVersion !== 1 || !Array.isArray(parsed.permissionsAllow)) {\n throw new Error(`${path} is not a claude-settings ownership record this version understands; delete it to let the next sync start over.`);\n }\n const marketplaceSourcePath = typeof parsed.marketplaceSourcePath === 'string' ? parsed.marketplaceSourcePath : null;\n return {\n schemaVersion: 1,\n marketplaceSourcePath,\n // A record from before #2417 owned the bare name whenever it owned a marketplace.\n marketplaceName: typeof parsed.marketplaceName === 'string' ? parsed.marketplaceName : (marketplaceSourcePath === null ? null : WILDO_CLAUDE_PLUGIN_NAME),\n enabledPluginWritten: parsed.enabledPluginWritten === true,\n permissionsAllow: parsed.permissionsAllow.filter((entry): entry is string => typeof entry === 'string'),\n /* Absent in a record written before the status line existed: nothing of ours is in the file yet. */\n statusLineWritten: parsed.statusLineWritten === true,\n };\n}\n\n/**\n * The `name` the compiled `marketplace.json` declares, which the settings key must equal (#2417). A package compiled\n * before the versioned name, or a manifest with no usable name, answers the bare `wildo` it was compiled with.\n */\nfunction readCompiledMarketplaceName(marketplaceDirectory: string): string {\n const manifest = JSON.parse(readFileSync(join(marketplaceDirectory, '.claude-plugin', 'marketplace.json'), 'utf8')) as { name?: unknown };\n return typeof manifest.name === 'string' && isWildoClaudeMarketplaceName(manifest.name) ? manifest.name : WILDO_CLAUDE_PLUGIN_NAME;\n}\n\n/** What became of the application's Claude Code settings — returned, never logged, like the rule imports. */\nexport interface ApplicationClaudeSettingsOutcome {\n readonly updated: boolean;\n /** The marketplace path written, or `null` when no plugin was wired. */\n readonly marketplaceSourcePath: string | null;\n /** Present when the settings could NOT be written, or the plugin could not be wired. */\n readonly warning?: string;\n}\n\n/**\n * Read, merge and write the application's `.claude/settings.json`.\n *\n * Non-fatal by design, for the same reason the rule imports are: a knowledge sync that succeeded must\n * not be reported as failed because the settings could not be updated. The absence is returned.\n */\nexport function syncApplicationClaudeSettings(input: {\n readonly applicationRoot: string;\n /** The compiled marketplace directory, or `null` when the knowledge payload carries none. */\n readonly marketplaceDirectory: string | null;\n}): ApplicationClaudeSettingsOutcome {\n const settingsPath = join(input.applicationRoot, ...SETTINGS_FILE_RELATIVE);\n try {\n const present = input.marketplaceDirectory !== null && existsSync(join(input.marketplaceDirectory, '.claude-plugin', 'marketplace.json'));\n const marketplaceSourcePath = present\n ? computeMarketplaceSourcePath(input.applicationRoot, input.marketplaceDirectory as string, resolveRepositoryRoot(input.applicationRoot))\n : null;\n const current = existsSync(settingsPath) ? JSON.parse(readFileSync(settingsPath, 'utf8')) as unknown : {};\n const currentObject = asObject(current);\n if (currentObject === null) {\n return { updated: false, marketplaceSourcePath: null, warning: `${settingsPath} is not a JSON object; the wildo plugin and console permissions were NOT wired.` };\n }\n const desired = {\n marketplaceSourcePath,\n marketplaceName: present ? readCompiledMarketplaceName(input.marketplaceDirectory as string) : WILDO_CLAUDE_PLUGIN_NAME,\n permissionsAllow: WILDO_CONSOLE_READ_ONLY_PERMISSIONS,\n };\n const previous = readOwnership(input.applicationRoot) ?? inferClaudeSettingsOwnership(currentObject, desired);\n const { next, ownership, changed } = applyApplicationClaudeSettings(currentObject, desired, previous);\n if (changed) writeFileSync(settingsPath, `${JSON.stringify(next, null, 2)}\\n`, 'utf8');\n writeFileSync(join(input.applicationRoot, ...OWNERSHIP_FILE_RELATIVE), `${JSON.stringify(ownership, null, 2)}\\n`, 'utf8');\n const warning = !present\n ? 'The installed framework knowledge carries no Claude Code plugin (dist/claude-marketplace); the /wildo:* commands are not wired.'\n : marketplaceSourcePath === null\n ? 'The wildo plugin lies outside this application\\'s git repository, so it cannot be named in the committed settings; the /wildo:* commands are not wired.'\n : undefined;\n return { updated: changed, marketplaceSourcePath, ...(warning === undefined ? {} : { warning }) };\n } catch (error) {\n return { updated: false, marketplaceSourcePath: null, warning: `Could not update ${settingsPath} (${describeCaughtError(error)}); the wildo plugin and console permissions were NOT wired.` };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-rule-imports.d.ts","sourceRoot":"","sources":["../../../../../../src/services/framework/application-rule-imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,eAAO,MAAM,yBAAyB,8CAA8C,CAAC;AACrF,eAAO,MAAM,uBAAuB,4CAA4C,CAAC;AAyBjF;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,MAAM,CAsBR"}
1
+ {"version":3,"file":"application-rule-imports.d.ts","sourceRoot":"","sources":["../../../../src/services/framework/application-rule-imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,eAAO,MAAM,yBAAyB,8CAA8C,CAAC;AACrF,eAAO,MAAM,uBAAuB,4CAA4C,CAAC;AAyBjF;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,MAAM,CAsBR"}
@@ -1 +1 @@
1
- {"version":3,"file":"application-rule-imports.js","sourceRoot":"","sources":["../../../../../../src/services/framework/application-rule-imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,2CAA2C,CAAC;AACrF,MAAM,CAAC,MAAM,uBAAuB,GAAG,yCAAyC,CAAC;AAEjF,MAAM,eAAe,GAAG,+BAA+B,CAAC;AAExD;;;;;;GAMG;AACH,SAAS,qBAAqB,CAAC,aAAgC;IAC7D,MAAM,MAAM,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5G,MAAM,KAAK,GAAG;QACZ,yBAAyB;QACzB,EAAE;QACF,GAAG,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;YACrB,CAAC,CAAC,CAAC,2EAA2E,CAAC;YAC/E,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;QACnD,EAAE;QACF,uBAAuB;KACxB,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CACzC,cAAsB,EACtB,aAAgC;IAEhC,MAAM,KAAK,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACrE,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAEjE,IAAI,UAAU,KAAK,CAAC,CAAC,IAAI,QAAQ,GAAG,UAAU,EAAE,CAAC;QAC/C,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACnD,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,QAAQ,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAC9E,MAAM,OAAO,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;QAC5C,OAAO,OAAO,KAAK,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC;IAC/D,CAAC;IAED;;;;OAIG;IACH,MAAM,SAAS,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5D,OAAO,GAAG,cAAc,GAAG,SAAS,KAAK,eAAe,MAAM;UAC1D,gGAAgG;UAChG,wFAAwF;UACxF,GAAG,KAAK,IAAI,CAAC;AACnB,CAAC","sourcesContent":["/**\n * Keeps a generated application's `CLAUDE.md` importing the rules the framework installed for it.\n *\n * ## Why this exists (issue #314, found by executing #146)\n *\n * The `rules/` delivery channel writes `.claude/rules/<rule>.md` into every generated application\n * and stops there. Measured 2026-09-04: the rule was installed in both dogfood applications, and\n * **no host could reach it** — the application's `CLAUDE.md` carried zero `@`-imports, there was no\n * `.cursor/rules/` directory for the frontmatter's own host to read, and no other loader existed.\n * `wildo fwk audit` was green, `dev-skills` reported success, and the guidance reached nobody.\n *\n * ## Why a flat import list rather than an index file\n *\n * An index that imports the rules, imported in turn by `CLAUDE.md`, is the tidier shape and rests on\n * NESTED import resolution — which is exercised nowhere in this repository (measured: not one of the\n * framework's own imported rules contains an `@` import). Building the fix on an unverified\n * mechanism is exactly how #146 happened. The framework's own `CLAUDE.md` proves the flat form\n * works, so the flat form is what an application gets.\n *\n * ## Why a MARKED block rather than a rewrite\n *\n * The application's `CLAUDE.md` is scaffolded once and then belongs to the application — it carries\n * project instructions nobody else may overwrite. The block is delimited, replaced in place, and\n * appended only when absent, so a sync is idempotent and never touches authored prose.\n */\n\nexport const RULE_IMPORTS_BEGIN_MARKER = '<!-- BEGIN WILDO MANAGED RULE IMPORTS -->';\nexport const RULE_IMPORTS_END_MARKER = '<!-- END WILDO MANAGED RULE IMPORTS -->';\n\nconst SECTION_HEADING = '## Always-on rules (imported)';\n\n/**\n * The managed block's body for a set of installed rule files.\n *\n * Sorted, so two syncs of the same payload produce byte-identical output and a diff means something\n * actually changed. An empty set still emits the block — its absence would read as \"this\n * application was never synced\", which is a different fact.\n */\nfunction renderRuleImportBlock(ruleFileNames: readonly string[]): string {\n const sorted = [...ruleFileNames].filter((name) => name.endsWith('.md')).sort((a, b) => a.localeCompare(b));\n const lines = [\n RULE_IMPORTS_BEGIN_MARKER,\n '',\n ...(sorted.length === 0\n ? ['<!-- The framework installed no always-on rules for this application. -->']\n : sorted.map((name) => `@.claude/rules/${name}`)),\n '',\n RULE_IMPORTS_END_MARKER,\n ];\n return lines.join('\\n');\n}\n\n/**\n * `claudeMarkdown` with its managed rule-import block set to `ruleFileNames`.\n *\n * Returns the input UNCHANGED when nothing would move, so a caller can skip the write and leave the\n * file's mtime alone — a `CLAUDE.md` that appears edited on every sync is one a developer stops\n * reading diffs of.\n */\nexport function applyApplicationRuleImports(\n claudeMarkdown: string,\n ruleFileNames: readonly string[],\n): string {\n const block = renderRuleImportBlock(ruleFileNames);\n const beginIndex = claudeMarkdown.indexOf(RULE_IMPORTS_BEGIN_MARKER);\n const endIndex = claudeMarkdown.indexOf(RULE_IMPORTS_END_MARKER);\n\n if (beginIndex !== -1 && endIndex > beginIndex) {\n const before = claudeMarkdown.slice(0, beginIndex);\n const after = claudeMarkdown.slice(endIndex + RULE_IMPORTS_END_MARKER.length);\n const updated = `${before}${block}${after}`;\n return updated === claudeMarkdown ? claudeMarkdown : updated;\n }\n\n /*\n * No markers: append the section. A half-open block (one marker, or END before BEGIN) is treated\n * as absent rather than repaired in place — guessing at a damaged boundary risks eating authored\n * prose, and appending is visible and reversible.\n */\n const separator = claudeMarkdown.endsWith('\\n') ? '' : '\\n';\n return `${claudeMarkdown}${separator}\\n${SECTION_HEADING}\\n\\n`\n + 'These are installed by the framework and kept in step with it. The block between the markers\\n'\n + 'is regenerated on every knowledge sync — edit the rules themselves, not this list.\\n\\n'\n + `${block}\\n`;\n}\n"]}
1
+ {"version":3,"file":"application-rule-imports.js","sourceRoot":"","sources":["../../../../src/services/framework/application-rule-imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,2CAA2C,CAAC;AACrF,MAAM,CAAC,MAAM,uBAAuB,GAAG,yCAAyC,CAAC;AAEjF,MAAM,eAAe,GAAG,+BAA+B,CAAC;AAExD;;;;;;GAMG;AACH,SAAS,qBAAqB,CAAC,aAAgC;IAC7D,MAAM,MAAM,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5G,MAAM,KAAK,GAAG;QACZ,yBAAyB;QACzB,EAAE;QACF,GAAG,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;YACrB,CAAC,CAAC,CAAC,2EAA2E,CAAC;YAC/E,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;QACnD,EAAE;QACF,uBAAuB;KACxB,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CACzC,cAAsB,EACtB,aAAgC;IAEhC,MAAM,KAAK,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACrE,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAEjE,IAAI,UAAU,KAAK,CAAC,CAAC,IAAI,QAAQ,GAAG,UAAU,EAAE,CAAC;QAC/C,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACnD,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,QAAQ,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAC9E,MAAM,OAAO,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;QAC5C,OAAO,OAAO,KAAK,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC;IAC/D,CAAC;IAED;;;;OAIG;IACH,MAAM,SAAS,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5D,OAAO,GAAG,cAAc,GAAG,SAAS,KAAK,eAAe,MAAM;UAC1D,gGAAgG;UAChG,wFAAwF;UACxF,GAAG,KAAK,IAAI,CAAC;AACnB,CAAC","sourcesContent":["/**\n * Keeps a generated application's `CLAUDE.md` importing the rules the framework installed for it.\n *\n * ## Why this exists (issue #314, found by executing #146)\n *\n * The `rules/` delivery channel writes `.claude/rules/<rule>.md` into every generated application\n * and stops there. Measured 2026-09-04: the rule was installed in both dogfood applications, and\n * **no host could reach it** — the application's `CLAUDE.md` carried zero `@`-imports, there was no\n * `.cursor/rules/` directory for the frontmatter's own host to read, and no other loader existed.\n * `wildo fwk audit` was green, `dev-skills` reported success, and the guidance reached nobody.\n *\n * ## Why a flat import list rather than an index file\n *\n * An index that imports the rules, imported in turn by `CLAUDE.md`, is the tidier shape and rests on\n * NESTED import resolution — which is exercised nowhere in this repository (measured: not one of the\n * framework's own imported rules contains an `@` import). Building the fix on an unverified\n * mechanism is exactly how #146 happened. The framework's own `CLAUDE.md` proves the flat form\n * works, so the flat form is what an application gets.\n *\n * ## Why a MARKED block rather than a rewrite\n *\n * The application's `CLAUDE.md` is scaffolded once and then belongs to the application — it carries\n * project instructions nobody else may overwrite. The block is delimited, replaced in place, and\n * appended only when absent, so a sync is idempotent and never touches authored prose.\n */\n\nexport const RULE_IMPORTS_BEGIN_MARKER = '<!-- BEGIN WILDO MANAGED RULE IMPORTS -->';\nexport const RULE_IMPORTS_END_MARKER = '<!-- END WILDO MANAGED RULE IMPORTS -->';\n\nconst SECTION_HEADING = '## Always-on rules (imported)';\n\n/**\n * The managed block's body for a set of installed rule files.\n *\n * Sorted, so two syncs of the same payload produce byte-identical output and a diff means something\n * actually changed. An empty set still emits the block — its absence would read as \"this\n * application was never synced\", which is a different fact.\n */\nfunction renderRuleImportBlock(ruleFileNames: readonly string[]): string {\n const sorted = [...ruleFileNames].filter((name) => name.endsWith('.md')).sort((a, b) => a.localeCompare(b));\n const lines = [\n RULE_IMPORTS_BEGIN_MARKER,\n '',\n ...(sorted.length === 0\n ? ['<!-- The framework installed no always-on rules for this application. -->']\n : sorted.map((name) => `@.claude/rules/${name}`)),\n '',\n RULE_IMPORTS_END_MARKER,\n ];\n return lines.join('\\n');\n}\n\n/**\n * `claudeMarkdown` with its managed rule-import block set to `ruleFileNames`.\n *\n * Returns the input UNCHANGED when nothing would move, so a caller can skip the write and leave the\n * file's mtime alone — a `CLAUDE.md` that appears edited on every sync is one a developer stops\n * reading diffs of.\n */\nexport function applyApplicationRuleImports(\n claudeMarkdown: string,\n ruleFileNames: readonly string[],\n): string {\n const block = renderRuleImportBlock(ruleFileNames);\n const beginIndex = claudeMarkdown.indexOf(RULE_IMPORTS_BEGIN_MARKER);\n const endIndex = claudeMarkdown.indexOf(RULE_IMPORTS_END_MARKER);\n\n if (beginIndex !== -1 && endIndex > beginIndex) {\n const before = claudeMarkdown.slice(0, beginIndex);\n const after = claudeMarkdown.slice(endIndex + RULE_IMPORTS_END_MARKER.length);\n const updated = `${before}${block}${after}`;\n return updated === claudeMarkdown ? claudeMarkdown : updated;\n }\n\n /*\n * No markers: append the section. A half-open block (one marker, or END before BEGIN) is treated\n * as absent rather than repaired in place — guessing at a damaged boundary risks eating authored\n * prose, and appending is visible and reversible.\n */\n const separator = claudeMarkdown.endsWith('\\n') ? '' : '\\n';\n return `${claudeMarkdown}${separator}\\n${SECTION_HEADING}\\n\\n`\n + 'These are installed by the framework and kept in step with it. The block between the markers\\n'\n + 'is regenerated on every knowledge sync — edit the rules themselves, not this list.\\n\\n'\n + `${block}\\n`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"claude-plugin-compiler.d.ts","sourceRoot":"","sources":["../../../../../../src/services/framework/claude-plugin-compiler.ts"],"names":[],"mappings":"AA2DA,MAAM,WAAW,6BAA6B;IAC5C,+FAA+F;IAC/F,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAwBD,wHAAwH;AACxH,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAmB3E;AAED;;;GAGG;AACH,iIAAiI;AACjI,MAAM,MAAM,4BAA4B,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;AAY3F,wBAAgB,mBAAmB,CAAC,oBAAoB,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,4BAA4B,GAAG,6BAA6B,CA+D9I"}
1
+ {"version":3,"file":"claude-plugin-compiler.d.ts","sourceRoot":"","sources":["../../../../src/services/framework/claude-plugin-compiler.ts"],"names":[],"mappings":"AA2DA,MAAM,WAAW,6BAA6B;IAC5C,+FAA+F;IAC/F,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAwBD,wHAAwH;AACxH,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAmB3E;AAED;;;GAGG;AACH,iIAAiI;AACjI,MAAM,MAAM,4BAA4B,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;AAY3F,wBAAgB,mBAAmB,CAAC,oBAAoB,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,4BAA4B,GAAG,6BAA6B,CAgE9I"}
@@ -1,6 +1,6 @@
1
1
  import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';
2
2
  import { dirname, join, relative, sep } from 'node:path';
3
- import { WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME, WILDO_CLAUDE_MARKETPLACE_NAME, WILDO_CLAUDE_PLUGIN_NAME, } from './application-claude-settings.js';
3
+ import { WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME, wildoClaudeMarketplaceName, WILDO_CLAUDE_PLUGIN_NAME, } from './application-claude-settings.js';
4
4
  /**
5
5
  * Compiles the `wildo` Claude Code plugin from `framework-knowledge/src/claude-plugin/` into
6
6
  * `framework-knowledge/dist/claude-marketplace/` (#1651, epic #1659).
@@ -124,7 +124,8 @@ export function compileClaudePlugin(knowledgePackageHome, renderMarkdown) {
124
124
  mkdirSync(join(pluginRoot, '.claude-plugin'), { recursive: true });
125
125
  const description = 'Drive Wildo application creation from Claude Code: run playbooks, follow the companion, answer its questions.';
126
126
  writeFileSync(join(staging, '.claude-plugin', 'marketplace.json'), `${JSON.stringify({
127
- name: WILDO_CLAUDE_MARKETPLACE_NAME,
127
+ // Named after the version (#2417): one user-global registration per name, so one name per framework version.
128
+ name: wildoClaudeMarketplaceName(packageJson.version),
128
129
  // `claude plugin validate` warns on a marketplace with no description (measured on 2.1.281).
129
130
  description: 'The Wildo framework\'s Claude Code plugin, published with the framework knowledge it belongs to.',
130
131
  owner: { name: 'Wildo' },
@@ -1 +1 @@
1
- {"version":3,"file":"claude-plugin-compiler.js","sourceRoot":"","sources":["../../../../../../src/services/framework/claude-plugin-compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9I,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EACL,uCAAuC,EACvC,6BAA6B,EAC7B,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,MAAM,8BAA8B,GAAG,eAAe,CAAC;AACvD,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AACvC,+EAA+E;AAC/E,MAAM,yBAAyB,GAAsB,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;AAC5H;;;;GAIG;AACH,MAAM,sBAAsB,GAAG,sCAAsC,CAAC;AACtE,MAAM,UAAU,GAAG,4BAA4B,CAAC;AAChD,MAAM,2BAA2B,GAAG,oBAAoB,CAAC;AASzD,SAAS,eAAe,CAAC,QAAgB;IACvC,MAAM,KAAK,GAAG,yBAAyB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvD,IAAI,CA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,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACjE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC;gBAAE,UAAU,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;YAC5F,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC;IACzE,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,CAAC;AACH,CAAC","sourcesContent":["import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';\nimport { dirname, join, relative, sep } from 'node:path';\n\nimport {\n WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME,\n WILDO_CLAUDE_MARKETPLACE_NAME,\n WILDO_CLAUDE_PLUGIN_NAME,\n} from './application-claude-settings';\n\n/**\n * Compiles the `wildo` Claude Code plugin from `framework-knowledge/src/claude-plugin/` into\n * `framework-knowledge/dist/claude-marketplace/` (#1651, epic #1659).\n *\n * ## What it produces\n *\n * ```\n * dist/claude-marketplace/\n * .claude-plugin/marketplace.json one entry: the `wildo` plugin, relative source\n * plugins/wildo/\n * .claude-plugin/plugin.json name, VERSION = the framework-knowledge package version\n * skills/<command>/SKILL.md the `/wildo:<command>` commands\n * agents/*.md, hooks/, monitors/ when authored (later children of #1659)\n * ```\n *\n * An application's `.claude/settings.json` points a `directory` marketplace at this folder\n * (`application-claude-settings.ts`), and Claude Code loads the plugin IN PLACE — so the version is\n * the package version, with no second channel to drift.\n *\n * ## What it refuses, and why each\n *\n * - **A command with no `description`.** It is what a person sees in the `/` menu and what Claude\n * matches a request against; a command without one is unreachable in practice.\n * - **A command directory that is not kebab-case.** Claude Code names the command after the\n * directory and refuses any other shape — the same refusal `wildo fwk audit` rule 22 exists for.\n * - **A placeholder that does not expand.** Markdown is rendered through the knowledge renderer, so a\n * `{{PARTIAL:…}}` or `{{REFERENCE:<anchor>}}` is expanded exactly as in a rule — a reference cites an\n * anchored framework surface and stays in step with the code instead of being a hand copy that drifts.\n * Any other placeholder, and anything left unexpanded, is refused: it would ship verbatim.\n * - **An instruction to call `/api/companion/…`**, checked on the RENDERED file so an expanded partial\n * is held to it too. The console's verbs are its supported surface (#1659 principle 2); a command\n * teaching the transport is how the `journey-*` skills drifted (#1656).\n *\n * Staged beside the live folder and swapped only after validation, like the knowledge payload, so a\n * failed compile never removes the last working plugin.\n */\n\nconst AUTHORED_PLUGIN_DIRECTORY_NAME = 'claude-plugin';\nconst SKILLS_DIRECTORY_NAME = 'skills';\n/** The component directories copied from the authored source, when present. */\nconst COMPONENT_DIRECTORY_NAMES: readonly string[] = Object.freeze(['skills', 'agents', 'hooks', 'monitors', 'references']);\n/**\n * The only placeholders a plugin file may carry: the ones the knowledge renderer expands without a\n * topic, exactly as for a rule. `{{TITLE}}`, `{{SOURCE_EXCERPTS_*}}` and the like have no topic to\n * resolve against here, so they are refused at the SOURCE rather than shipped verbatim.\n */\nconst RENDERABLE_PLACEHOLDER = /\\{\\{(?:PARTIAL|REFERENCE):[^}]+\\}\\}/g;\nconst KEBAB_CASE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;\nconst COMPANION_ROUTE_INSTRUCTION = /\\/api\\/companion\\//;\n\nexport interface ClaudePluginCompilationResult {\n /** `null` when no plugin is authored — the knowledge payload is still complete without one. */\n readonly outputDirectory: string | null;\n readonly commandNames: readonly string[];\n readonly version: string | null;\n}\n\nfunction readFrontmatter(markdown: string): Record<string, string> | null {\n const match = /^---\\n([\\s\\S]*?)\\n---\\n/.exec(markdown);\n if (!match) return null;\n const fields: Record<string, string> = {};\n for (const line of match[1]!.split('\\n')) {\n const field = /^([a-zA-Z-]+):\\s*(.*)$/.exec(line);\n if (field) fields[field[1]!] = field[2]!.trim();\n }\n return fields;\n}\n\nfunction listFiles(root: string, current = root): string[] {\n const files: string[] = [];\n for (const entry of readdirSync(current, { withFileTypes: true })) {\n const path = join(current, entry.name);\n if (lstatSync(path).isSymbolicLink()) throw new Error(`The authored Claude plugin contains a symbolic link: ${path}`);\n if (entry.isDirectory()) files.push(...listFiles(root, path));\n else if (entry.isFile()) files.push(relative(root, path).split(sep).join('/'));\n }\n return files;\n}\n\n/** Validate the authored plugin source, returning the command names in order. Throws one sentence per first finding. */\nexport function validateAuthoredClaudePlugin(authoredRoot: string): string[] {\n const skillsRoot = join(authoredRoot, SKILLS_DIRECTORY_NAME);\n const commandNames = existsSync(skillsRoot)\n ? readdirSync(skillsRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort()\n : [];\n for (const name of commandNames) {\n if (!KEBAB_CASE.test(name)) throw new Error(`Claude plugin command \"${name}\" is not kebab-case; Claude Code names a command after its directory and refuses any other shape.`);\n const skillPath = join(skillsRoot, name, 'SKILL.md');\n if (!existsSync(skillPath)) throw new Error(`Claude plugin command \"${name}\" has no SKILL.md.`);\n const frontmatter = readFrontmatter(readFileSync(skillPath, 'utf8'));\n if (!frontmatter?.description) throw new Error(`Claude plugin command \"${name}\" has no frontmatter description — it would be unreachable from the / menu.`);\n }\n for (const file of listFiles(authoredRoot)) {\n const text = readFileSync(join(authoredRoot, ...file.split('/')), 'utf8');\n if (text.replace(RENDERABLE_PLACEHOLDER, '').includes('{{')) {\n throw new Error(`Claude plugin file ${file} carries a {{…}} placeholder the knowledge renderer cannot expand without a topic; only PARTIAL and REFERENCE are.`);\n }\n }\n return commandNames;\n}\n\n/**\n * Compile and publish the plugin. `knowledgePackageHome` is the `@wildo-ai/framework-knowledge`\n * package root of a framework checkout; the output lands beside its `dist/knowledge`.\n */\n/** Renders one authored markdown file — `{{PARTIAL:…}}` and `{{REFERENCE:…}}` expanded — supplied by the knowledge generator. */\nexport type ClaudePluginMarkdownRenderer = (sourcePath: string, content: string) => string;\n\n/** Every published file is checked AFTER rendering: nothing unexpanded, and no companion route. */\nfunction assertRenderedPluginFile(file: string, text: string): void {\n if (text.includes('{{')) {\n throw new Error(`Claude plugin file ${file} still carries an unexpanded {{…}} placeholder after rendering; it would ship verbatim.`);\n }\n if (COMPANION_ROUTE_INSTRUCTION.test(text)) {\n throw new Error(`Claude plugin file ${file} names a /api/companion/ route; commands drive the companion through wildo verbs only (#1659).`);\n }\n}\n\nexport function compileClaudePlugin(knowledgePackageHome: string, renderMarkdown?: ClaudePluginMarkdownRenderer): ClaudePluginCompilationResult {\n const authoredRoot = join(knowledgePackageHome, 'src', AUTHORED_PLUGIN_DIRECTORY_NAME);\n if (!existsSync(authoredRoot)) return { outputDirectory: null, commandNames: [], version: null };\n\n const commandNames = validateAuthoredClaudePlugin(authoredRoot);\n const packageJson = JSON.parse(readFileSync(join(knowledgePackageHome, 'package.json'), 'utf8')) as { version?: string; description?: string };\n if (!packageJson.version) throw new Error(`${join(knowledgePackageHome, 'package.json')} has no version; the Claude plugin takes the package's.`);\n\n const outputDirectory = join(knowledgePackageHome, 'dist', WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME);\n mkdirSync(dirname(outputDirectory), { recursive: true });\n const staging = mkdtempSync(join(dirname(outputDirectory), '.claude-marketplace-staging-'));\n try {\n const pluginRoot = join(staging, 'plugins', WILDO_CLAUDE_PLUGIN_NAME);\n mkdirSync(join(staging, '.claude-plugin'), { recursive: true });\n mkdirSync(join(pluginRoot, '.claude-plugin'), { recursive: true });\n const description = 'Drive Wildo application creation from Claude Code: run playbooks, follow the companion, answer its questions.';\n writeFileSync(join(staging, '.claude-plugin', 'marketplace.json'), `${JSON.stringify({\n name: WILDO_CLAUDE_MARKETPLACE_NAME,\n // `claude plugin validate` warns on a marketplace with no description (measured on 2.1.281).\n description: 'The Wildo framework\\'s Claude Code plugin, published with the framework knowledge it belongs to.',\n owner: { name: 'Wildo' },\n plugins: [{ name: WILDO_CLAUDE_PLUGIN_NAME, source: `./plugins/${WILDO_CLAUDE_PLUGIN_NAME}`, description }],\n }, null, 2)}\\n`);\n writeFileSync(join(pluginRoot, '.claude-plugin', 'plugin.json'), `${JSON.stringify({\n name: WILDO_CLAUDE_PLUGIN_NAME,\n version: packageJson.version,\n description,\n author: { name: 'Wildo' },\n }, null, 2)}\\n`);\n for (const component of COMPONENT_DIRECTORY_NAMES) {\n const source = join(authoredRoot, component);\n if (existsSync(source)) cpSync(source, join(pluginRoot, component), { recursive: true, filter: (entry) => !entry.endsWith('.DS_Store') });\n }\n /*\n * Render every markdown file through the knowledge renderer, then check what will actually ship.\n * Without a renderer (a caller outside the generator) a placeholder stays literal and is refused\n * below, so an unrendered plugin can never be published by accident.\n */\n for (const file of listFiles(pluginRoot)) {\n const path = join(pluginRoot, ...file.split('/'));\n const authoredPath = join(authoredRoot, ...file.split('/'));\n let text = readFileSync(path, 'utf8');\n if (renderMarkdown && file.endsWith('.md')) {\n text = renderMarkdown(authoredPath, text);\n writeFileSync(path, text);\n }\n assertRenderedPluginFile(file, text);\n }\n\n const backup = `${outputDirectory}.publication-backup-${process.pid}-${Date.now()}`;\n const hadPrior = existsSync(outputDirectory);\n try {\n if (hadPrior) renameSync(outputDirectory, backup);\n renameSync(staging, outputDirectory);\n if (hadPrior) rmSync(backup, { recursive: true, force: true });\n } catch (error) {\n if (!existsSync(outputDirectory) && existsSync(backup)) renameSync(backup, outputDirectory);\n throw error;\n }\n return { outputDirectory, commandNames, version: packageJson.version };\n } finally {\n rmSync(staging, { recursive: true, force: true });\n }\n}\n"]}
1
+ {"version":3,"file":"claude-plugin-compiler.js","sourceRoot":"","sources":["../../../../src/services/framework/claude-plugin-compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,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C,CAAC;IACpD,CAAC;AACH,CAAC","sourcesContent":["import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';\nimport { dirname, join, relative, sep } from 'node:path';\n\nimport {\n WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME,\n wildoClaudeMarketplaceName,\n WILDO_CLAUDE_PLUGIN_NAME,\n} from './application-claude-settings';\n\n/**\n * Compiles the `wildo` Claude Code plugin from `framework-knowledge/src/claude-plugin/` into\n * `framework-knowledge/dist/claude-marketplace/` (#1651, epic #1659).\n *\n * ## What it produces\n *\n * ```\n * dist/claude-marketplace/\n * .claude-plugin/marketplace.json one entry: the `wildo` plugin, relative source\n * plugins/wildo/\n * .claude-plugin/plugin.json name, VERSION = the framework-knowledge package version\n * skills/<command>/SKILL.md the `/wildo:<command>` commands\n * agents/*.md, hooks/, monitors/ when authored (later children of #1659)\n * ```\n *\n * An application's `.claude/settings.json` points a `directory` marketplace at this folder\n * (`application-claude-settings.ts`), and Claude Code loads the plugin IN PLACE — so the version is\n * the package version, with no second channel to drift.\n *\n * ## What it refuses, and why each\n *\n * - **A command with no `description`.** It is what a person sees in the `/` menu and what Claude\n * matches a request against; a command without one is unreachable in practice.\n * - **A command directory that is not kebab-case.** Claude Code names the command after the\n * directory and refuses any other shape — the same refusal `wildo fwk audit` rule 22 exists for.\n * - **A placeholder that does not expand.** Markdown is rendered through the knowledge renderer, so a\n * `{{PARTIAL:…}}` or `{{REFERENCE:<anchor>}}` is expanded exactly as in a rule — a reference cites an\n * anchored framework surface and stays in step with the code instead of being a hand copy that drifts.\n * Any other placeholder, and anything left unexpanded, is refused: it would ship verbatim.\n * - **An instruction to call `/api/companion/…`**, checked on the RENDERED file so an expanded partial\n * is held to it too. The console's verbs are its supported surface (#1659 principle 2); a command\n * teaching the transport is how the `journey-*` skills drifted (#1656).\n *\n * Staged beside the live folder and swapped only after validation, like the knowledge payload, so a\n * failed compile never removes the last working plugin.\n */\n\nconst AUTHORED_PLUGIN_DIRECTORY_NAME = 'claude-plugin';\nconst SKILLS_DIRECTORY_NAME = 'skills';\n/** The component directories copied from the authored source, when present. */\nconst COMPONENT_DIRECTORY_NAMES: readonly string[] = Object.freeze(['skills', 'agents', 'hooks', 'monitors', 'references']);\n/**\n * The only placeholders a plugin file may carry: the ones the knowledge renderer expands without a\n * topic, exactly as for a rule. `{{TITLE}}`, `{{SOURCE_EXCERPTS_*}}` and the like have no topic to\n * resolve against here, so they are refused at the SOURCE rather than shipped verbatim.\n */\nconst RENDERABLE_PLACEHOLDER = /\\{\\{(?:PARTIAL|REFERENCE):[^}]+\\}\\}/g;\nconst KEBAB_CASE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;\nconst COMPANION_ROUTE_INSTRUCTION = /\\/api\\/companion\\//;\n\nexport interface ClaudePluginCompilationResult {\n /** `null` when no plugin is authored — the knowledge payload is still complete without one. */\n readonly outputDirectory: string | null;\n readonly commandNames: readonly string[];\n readonly version: string | null;\n}\n\nfunction readFrontmatter(markdown: string): Record<string, string> | null {\n const match = /^---\\n([\\s\\S]*?)\\n---\\n/.exec(markdown);\n if (!match) return null;\n const fields: Record<string, string> = {};\n for (const line of match[1]!.split('\\n')) {\n const field = /^([a-zA-Z-]+):\\s*(.*)$/.exec(line);\n if (field) fields[field[1]!] = field[2]!.trim();\n }\n return fields;\n}\n\nfunction listFiles(root: string, current = root): string[] {\n const files: string[] = [];\n for (const entry of readdirSync(current, { withFileTypes: true })) {\n const path = join(current, entry.name);\n if (lstatSync(path).isSymbolicLink()) throw new Error(`The authored Claude plugin contains a symbolic link: ${path}`);\n if (entry.isDirectory()) files.push(...listFiles(root, path));\n else if (entry.isFile()) files.push(relative(root, path).split(sep).join('/'));\n }\n return files;\n}\n\n/** Validate the authored plugin source, returning the command names in order. Throws one sentence per first finding. */\nexport function validateAuthoredClaudePlugin(authoredRoot: string): string[] {\n const skillsRoot = join(authoredRoot, SKILLS_DIRECTORY_NAME);\n const commandNames = existsSync(skillsRoot)\n ? readdirSync(skillsRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort()\n : [];\n for (const name of commandNames) {\n if (!KEBAB_CASE.test(name)) throw new Error(`Claude plugin command \"${name}\" is not kebab-case; Claude Code names a command after its directory and refuses any other shape.`);\n const skillPath = join(skillsRoot, name, 'SKILL.md');\n if (!existsSync(skillPath)) throw new Error(`Claude plugin command \"${name}\" has no SKILL.md.`);\n const frontmatter = readFrontmatter(readFileSync(skillPath, 'utf8'));\n if (!frontmatter?.description) throw new Error(`Claude plugin command \"${name}\" has no frontmatter description — it would be unreachable from the / menu.`);\n }\n for (const file of listFiles(authoredRoot)) {\n const text = readFileSync(join(authoredRoot, ...file.split('/')), 'utf8');\n if (text.replace(RENDERABLE_PLACEHOLDER, '').includes('{{')) {\n throw new Error(`Claude plugin file ${file} carries a {{…}} placeholder the knowledge renderer cannot expand without a topic; only PARTIAL and REFERENCE are.`);\n }\n }\n return commandNames;\n}\n\n/**\n * Compile and publish the plugin. `knowledgePackageHome` is the `@wildo-ai/framework-knowledge`\n * package root of a framework checkout; the output lands beside its `dist/knowledge`.\n */\n/** Renders one authored markdown file — `{{PARTIAL:…}}` and `{{REFERENCE:…}}` expanded — supplied by the knowledge generator. */\nexport type ClaudePluginMarkdownRenderer = (sourcePath: string, content: string) => string;\n\n/** Every published file is checked AFTER rendering: nothing unexpanded, and no companion route. */\nfunction assertRenderedPluginFile(file: string, text: string): void {\n if (text.includes('{{')) {\n throw new Error(`Claude plugin file ${file} still carries an unexpanded {{…}} placeholder after rendering; it would ship verbatim.`);\n }\n if (COMPANION_ROUTE_INSTRUCTION.test(text)) {\n throw new Error(`Claude plugin file ${file} names a /api/companion/ route; commands drive the companion through wildo verbs only (#1659).`);\n }\n}\n\nexport function compileClaudePlugin(knowledgePackageHome: string, renderMarkdown?: ClaudePluginMarkdownRenderer): ClaudePluginCompilationResult {\n const authoredRoot = join(knowledgePackageHome, 'src', AUTHORED_PLUGIN_DIRECTORY_NAME);\n if (!existsSync(authoredRoot)) return { outputDirectory: null, commandNames: [], version: null };\n\n const commandNames = validateAuthoredClaudePlugin(authoredRoot);\n const packageJson = JSON.parse(readFileSync(join(knowledgePackageHome, 'package.json'), 'utf8')) as { version?: string; description?: string };\n if (!packageJson.version) throw new Error(`${join(knowledgePackageHome, 'package.json')} has no version; the Claude plugin takes the package's.`);\n\n const outputDirectory = join(knowledgePackageHome, 'dist', WILDO_CLAUDE_MARKETPLACE_DIRECTORY_NAME);\n mkdirSync(dirname(outputDirectory), { recursive: true });\n const staging = mkdtempSync(join(dirname(outputDirectory), '.claude-marketplace-staging-'));\n try {\n const pluginRoot = join(staging, 'plugins', WILDO_CLAUDE_PLUGIN_NAME);\n mkdirSync(join(staging, '.claude-plugin'), { recursive: true });\n mkdirSync(join(pluginRoot, '.claude-plugin'), { recursive: true });\n const description = 'Drive Wildo application creation from Claude Code: run playbooks, follow the companion, answer its questions.';\n writeFileSync(join(staging, '.claude-plugin', 'marketplace.json'), `${JSON.stringify({\n // Named after the version (#2417): one user-global registration per name, so one name per framework version.\n name: wildoClaudeMarketplaceName(packageJson.version),\n // `claude plugin validate` warns on a marketplace with no description (measured on 2.1.281).\n description: 'The Wildo framework\\'s Claude Code plugin, published with the framework knowledge it belongs to.',\n owner: { name: 'Wildo' },\n plugins: [{ name: WILDO_CLAUDE_PLUGIN_NAME, source: `./plugins/${WILDO_CLAUDE_PLUGIN_NAME}`, description }],\n }, null, 2)}\\n`);\n writeFileSync(join(pluginRoot, '.claude-plugin', 'plugin.json'), `${JSON.stringify({\n name: WILDO_CLAUDE_PLUGIN_NAME,\n version: packageJson.version,\n description,\n author: { name: 'Wildo' },\n }, null, 2)}\\n`);\n for (const component of COMPONENT_DIRECTORY_NAMES) {\n const source = join(authoredRoot, component);\n if (existsSync(source)) cpSync(source, join(pluginRoot, component), { recursive: true, filter: (entry) => !entry.endsWith('.DS_Store') });\n }\n /*\n * Render every markdown file through the knowledge renderer, then check what will actually ship.\n * Without a renderer (a caller outside the generator) a placeholder stays literal and is refused\n * below, so an unrendered plugin can never be published by accident.\n */\n for (const file of listFiles(pluginRoot)) {\n const path = join(pluginRoot, ...file.split('/'));\n const authoredPath = join(authoredRoot, ...file.split('/'));\n let text = readFileSync(path, 'utf8');\n if (renderMarkdown && file.endsWith('.md')) {\n text = renderMarkdown(authoredPath, text);\n writeFileSync(path, text);\n }\n assertRenderedPluginFile(file, text);\n }\n\n const backup = `${outputDirectory}.publication-backup-${process.pid}-${Date.now()}`;\n const hadPrior = existsSync(outputDirectory);\n try {\n if (hadPrior) renameSync(outputDirectory, backup);\n renameSync(staging, outputDirectory);\n if (hadPrior) rmSync(backup, { recursive: true, force: true });\n } catch (error) {\n if (!existsSync(outputDirectory) && existsSync(backup)) renameSync(backup, outputDirectory);\n throw error;\n }\n return { outputDirectory, commandNames, version: packageJson.version };\n } finally {\n rmSync(staging, { recursive: true, force: true });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dev-compile-status.paths.d.ts","sourceRoot":"","sources":["../../../../../../src/services/framework/dev-compile-status.paths.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,QAA4D,CAAC"}
1
+ {"version":3,"file":"dev-compile-status.paths.d.ts","sourceRoot":"","sources":["../../../../src/services/framework/dev-compile-status.paths.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,QAA4D,CAAC"}