wingfoil 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/README.md +83 -43
  2. package/dist/agent/discovery.d.ts +72 -0
  3. package/dist/agent/discovery.d.ts.map +1 -0
  4. package/dist/agent/discovery.js +210 -0
  5. package/dist/agent/discovery.js.map +1 -0
  6. package/dist/agent/execute.d.ts +206 -0
  7. package/dist/agent/execute.d.ts.map +1 -0
  8. package/dist/agent/execute.js +581 -0
  9. package/dist/agent/execute.js.map +1 -0
  10. package/dist/agent/index.d.ts +23 -0
  11. package/dist/agent/index.d.ts.map +1 -0
  12. package/dist/agent/index.js +85 -0
  13. package/dist/agent/index.js.map +1 -0
  14. package/dist/agent/launch.d.ts +133 -0
  15. package/dist/agent/launch.d.ts.map +1 -0
  16. package/dist/agent/launch.js +380 -0
  17. package/dist/agent/launch.js.map +1 -0
  18. package/dist/agent/manifest.d.ts +30 -0
  19. package/dist/agent/manifest.d.ts.map +1 -0
  20. package/dist/agent/manifest.js +93 -0
  21. package/dist/agent/manifest.js.map +1 -0
  22. package/dist/agent/placeholders.d.ts +49 -0
  23. package/dist/agent/placeholders.d.ts.map +1 -0
  24. package/dist/agent/placeholders.js +177 -0
  25. package/dist/agent/placeholders.js.map +1 -0
  26. package/dist/agent/run-log.d.ts +254 -0
  27. package/dist/agent/run-log.d.ts.map +1 -0
  28. package/dist/agent/run-log.js +612 -0
  29. package/dist/agent/run-log.js.map +1 -0
  30. package/dist/agent/schema.d.ts +100 -0
  31. package/dist/agent/schema.d.ts.map +1 -0
  32. package/dist/agent/schema.js +89 -0
  33. package/dist/agent/schema.js.map +1 -0
  34. package/dist/agent/step.d.ts +41 -0
  35. package/dist/agent/step.d.ts.map +1 -0
  36. package/dist/agent/step.js +95 -0
  37. package/dist/agent/step.js.map +1 -0
  38. package/dist/build-info.json +4 -0
  39. package/dist/cli/error.d.ts +11 -2
  40. package/dist/cli/error.d.ts.map +1 -1
  41. package/dist/cli/error.js +27 -6
  42. package/dist/cli/error.js.map +1 -1
  43. package/dist/cli/exit.d.ts +33 -3
  44. package/dist/cli/exit.d.ts.map +1 -1
  45. package/dist/cli/exit.js +54 -3
  46. package/dist/cli/exit.js.map +1 -1
  47. package/dist/cli/index.d.ts +1 -1
  48. package/dist/cli/index.d.ts.map +1 -1
  49. package/dist/cli/index.js +2 -1
  50. package/dist/cli/index.js.map +1 -1
  51. package/dist/cli/init-command.d.ts.map +1 -1
  52. package/dist/cli/init-command.js +4 -2
  53. package/dist/cli/init-command.js.map +1 -1
  54. package/dist/cli/mcp-command.d.ts +13 -4
  55. package/dist/cli/mcp-command.d.ts.map +1 -1
  56. package/dist/cli/mcp-command.js +25 -8
  57. package/dist/cli/mcp-command.js.map +1 -1
  58. package/dist/cli/output.d.ts +12 -4
  59. package/dist/cli/output.d.ts.map +1 -1
  60. package/dist/cli/output.js +15 -4
  61. package/dist/cli/output.js.map +1 -1
  62. package/dist/cli/program.d.ts +1 -1
  63. package/dist/cli/program.d.ts.map +1 -1
  64. package/dist/cli/program.js +162 -40
  65. package/dist/cli/program.js.map +1 -1
  66. package/dist/cli/registrar.d.ts +1 -1
  67. package/dist/cli/registrar.d.ts.map +1 -1
  68. package/dist/cli/registrar.js +67 -6
  69. package/dist/cli/registrar.js.map +1 -1
  70. package/dist/cli/suggest.d.ts +20 -0
  71. package/dist/cli/suggest.d.ts.map +1 -0
  72. package/dist/cli/suggest.js +49 -0
  73. package/dist/cli/suggest.js.map +1 -0
  74. package/dist/cli/warning.d.ts +26 -0
  75. package/dist/cli/warning.d.ts.map +1 -0
  76. package/dist/cli/warning.js +66 -0
  77. package/dist/cli/warning.js.map +1 -0
  78. package/dist/cli.js +11 -2
  79. package/dist/cli.js.map +1 -1
  80. package/dist/core/agent-execute.d.ts +44 -0
  81. package/dist/core/agent-execute.d.ts.map +1 -0
  82. package/dist/core/agent-execute.js +71 -0
  83. package/dist/core/agent-execute.js.map +1 -0
  84. package/dist/core/agent-list.d.ts +95 -0
  85. package/dist/core/agent-list.d.ts.map +1 -0
  86. package/dist/core/agent-list.js +207 -0
  87. package/dist/core/agent-list.js.map +1 -0
  88. package/dist/core/agent-show.d.ts +44 -0
  89. package/dist/core/agent-show.d.ts.map +1 -0
  90. package/dist/core/agent-show.js +188 -0
  91. package/dist/core/agent-show.js.map +1 -0
  92. package/dist/core/approval-authority.d.ts +17 -14
  93. package/dist/core/approval-authority.d.ts.map +1 -1
  94. package/dist/core/approval-authority.js +9 -9
  95. package/dist/core/approval-authority.js.map +1 -1
  96. package/dist/core/builtin-asset.d.ts +18 -15
  97. package/dist/core/builtin-asset.d.ts.map +1 -1
  98. package/dist/core/builtin-asset.js +17 -14
  99. package/dist/core/builtin-asset.js.map +1 -1
  100. package/dist/core/builtin-integrity.d.ts +12 -2
  101. package/dist/core/builtin-integrity.d.ts.map +1 -1
  102. package/dist/core/builtin-integrity.js +85 -9
  103. package/dist/core/builtin-integrity.js.map +1 -1
  104. package/dist/core/confinement.d.ts +3 -1
  105. package/dist/core/confinement.d.ts.map +1 -1
  106. package/dist/core/confinement.js +7 -4
  107. package/dist/core/confinement.js.map +1 -1
  108. package/dist/core/context.d.ts +150 -98
  109. package/dist/core/context.d.ts.map +1 -1
  110. package/dist/core/context.js +602 -66
  111. package/dist/core/context.js.map +1 -1
  112. package/dist/core/directive-assign.d.ts +33 -7
  113. package/dist/core/directive-assign.d.ts.map +1 -1
  114. package/dist/core/directive-assign.js +67 -27
  115. package/dist/core/directive-assign.js.map +1 -1
  116. package/dist/core/directive-scope.d.ts +36 -0
  117. package/dist/core/directive-scope.d.ts.map +1 -0
  118. package/dist/core/directive-scope.js +34 -0
  119. package/dist/core/directive-scope.js.map +1 -0
  120. package/dist/core/directives-list.d.ts +13 -3
  121. package/dist/core/directives-list.d.ts.map +1 -1
  122. package/dist/core/directives-list.js +18 -6
  123. package/dist/core/directives-list.js.map +1 -1
  124. package/dist/core/dry-run.d.ts +33 -0
  125. package/dist/core/dry-run.d.ts.map +1 -0
  126. package/dist/core/dry-run.js +45 -0
  127. package/dist/core/dry-run.js.map +1 -0
  128. package/dist/core/element-ref.d.ts +23 -0
  129. package/dist/core/element-ref.d.ts.map +1 -0
  130. package/dist/core/element-ref.js +24 -0
  131. package/dist/core/element-ref.js.map +1 -0
  132. package/dist/core/error-details.d.ts +20 -0
  133. package/dist/core/error-details.d.ts.map +1 -0
  134. package/dist/core/error-details.js +65 -0
  135. package/dist/core/error-details.js.map +1 -0
  136. package/dist/core/exit-code.d.ts.map +1 -1
  137. package/dist/core/exit-code.js +6 -7
  138. package/dist/core/exit-code.js.map +1 -1
  139. package/dist/core/git-identity.d.ts +46 -11
  140. package/dist/core/git-identity.d.ts.map +1 -1
  141. package/dist/core/git-identity.js +140 -27
  142. package/dist/core/git-identity.js.map +1 -1
  143. package/dist/core/index.d.ts +184 -10
  144. package/dist/core/index.d.ts.map +1 -1
  145. package/dist/core/index.js +1045 -185
  146. package/dist/core/index.js.map +1 -1
  147. package/dist/core/init.d.ts +45 -5
  148. package/dist/core/init.d.ts.map +1 -1
  149. package/dist/core/init.js +134 -24
  150. package/dist/core/init.js.map +1 -1
  151. package/dist/core/loaders.d.ts +170 -14
  152. package/dist/core/loaders.d.ts.map +1 -1
  153. package/dist/core/loaders.js +570 -89
  154. package/dist/core/loaders.js.map +1 -1
  155. package/dist/core/memory-add-link.d.ts +28 -0
  156. package/dist/core/memory-add-link.d.ts.map +1 -0
  157. package/dist/core/memory-add-link.js +67 -0
  158. package/dist/core/memory-add-link.js.map +1 -0
  159. package/dist/core/memory-add-type.d.ts +25 -1
  160. package/dist/core/memory-add-type.d.ts.map +1 -1
  161. package/dist/core/memory-add-type.js +59 -1
  162. package/dist/core/memory-add-type.js.map +1 -1
  163. package/dist/core/memory-amend.d.ts +80 -0
  164. package/dist/core/memory-amend.d.ts.map +1 -0
  165. package/dist/core/memory-amend.js +160 -0
  166. package/dist/core/memory-amend.js.map +1 -0
  167. package/dist/core/memory-supersede.d.ts +28 -0
  168. package/dist/core/memory-supersede.d.ts.map +1 -0
  169. package/dist/core/memory-supersede.js +79 -0
  170. package/dist/core/memory-supersede.js.map +1 -0
  171. package/dist/core/memory-transition.d.ts +190 -30
  172. package/dist/core/memory-transition.d.ts.map +1 -1
  173. package/dist/core/memory-transition.js +480 -59
  174. package/dist/core/memory-transition.js.map +1 -1
  175. package/dist/core/registry.d.ts +82 -10
  176. package/dist/core/registry.d.ts.map +1 -1
  177. package/dist/core/registry.js +50 -0
  178. package/dist/core/registry.js.map +1 -1
  179. package/dist/core/relevance.d.ts +74 -12
  180. package/dist/core/relevance.d.ts.map +1 -1
  181. package/dist/core/relevance.js +45 -27
  182. package/dist/core/relevance.js.map +1 -1
  183. package/dist/core/require-reason.d.ts.map +1 -1
  184. package/dist/core/require-reason.js +6 -5
  185. package/dist/core/require-reason.js.map +1 -1
  186. package/dist/core/required-fields.d.ts +28 -0
  187. package/dist/core/required-fields.d.ts.map +1 -0
  188. package/dist/core/required-fields.js +60 -0
  189. package/dist/core/required-fields.js.map +1 -0
  190. package/dist/core/revision.d.ts +82 -0
  191. package/dist/core/revision.d.ts.map +1 -0
  192. package/dist/core/revision.js +144 -0
  193. package/dist/core/revision.js.map +1 -0
  194. package/dist/core/types.d.ts +28 -2
  195. package/dist/core/types.d.ts.map +1 -1
  196. package/dist/core/types.js +12 -3
  197. package/dist/core/types.js.map +1 -1
  198. package/dist/core/workflow-core-checks.d.ts +34 -0
  199. package/dist/core/workflow-core-checks.d.ts.map +1 -0
  200. package/dist/core/workflow-core-checks.js +403 -0
  201. package/dist/core/workflow-core-checks.js.map +1 -0
  202. package/dist/core/workflow-create-remove.d.ts +65 -0
  203. package/dist/core/workflow-create-remove.d.ts.map +1 -0
  204. package/dist/core/workflow-create-remove.js +277 -0
  205. package/dist/core/workflow-create-remove.js.map +1 -0
  206. package/dist/core/workflow-deduction.d.ts +48 -0
  207. package/dist/core/workflow-deduction.d.ts.map +1 -0
  208. package/dist/core/workflow-deduction.js +523 -0
  209. package/dist/core/workflow-deduction.js.map +1 -0
  210. package/dist/core/workflow-diagnostics.d.ts +83 -0
  211. package/dist/core/workflow-diagnostics.d.ts.map +1 -0
  212. package/dist/core/workflow-diagnostics.js +375 -0
  213. package/dist/core/workflow-diagnostics.js.map +1 -0
  214. package/dist/core/workflow-exit-state.d.ts +125 -0
  215. package/dist/core/workflow-exit-state.d.ts.map +1 -0
  216. package/dist/core/workflow-exit-state.js +243 -0
  217. package/dist/core/workflow-exit-state.js.map +1 -0
  218. package/dist/core/workflow-finalize.d.ts +37 -0
  219. package/dist/core/workflow-finalize.d.ts.map +1 -0
  220. package/dist/core/workflow-finalize.js +153 -0
  221. package/dist/core/workflow-finalize.js.map +1 -0
  222. package/dist/core/workflow-list-show.d.ts +176 -0
  223. package/dist/core/workflow-list-show.d.ts.map +1 -0
  224. package/dist/core/workflow-list-show.js +268 -0
  225. package/dist/core/workflow-list-show.js.map +1 -0
  226. package/dist/core/workflow-next.d.ts +268 -0
  227. package/dist/core/workflow-next.d.ts.map +1 -0
  228. package/dist/core/workflow-next.js +503 -0
  229. package/dist/core/workflow-next.js.map +1 -0
  230. package/dist/core/workflow-registry.d.ts +52 -0
  231. package/dist/core/workflow-registry.d.ts.map +1 -0
  232. package/dist/core/workflow-registry.js +158 -0
  233. package/dist/core/workflow-registry.js.map +1 -0
  234. package/dist/core/workflow-start-end.d.ts +71 -0
  235. package/dist/core/workflow-start-end.d.ts.map +1 -0
  236. package/dist/core/workflow-start-end.js +298 -0
  237. package/dist/core/workflow-start-end.js.map +1 -0
  238. package/dist/core/workflow-status.d.ts +83 -0
  239. package/dist/core/workflow-status.d.ts.map +1 -0
  240. package/dist/core/workflow-status.js +125 -0
  241. package/dist/core/workflow-status.js.map +1 -0
  242. package/dist/core/write-guard.d.ts +51 -8
  243. package/dist/core/write-guard.d.ts.map +1 -1
  244. package/dist/core/write-guard.js +139 -9
  245. package/dist/core/write-guard.js.map +1 -1
  246. package/dist/directives/index.d.ts +3 -2
  247. package/dist/directives/index.d.ts.map +1 -1
  248. package/dist/directives/index.js +5 -3
  249. package/dist/directives/index.js.map +1 -1
  250. package/dist/directives/schema.d.ts +34 -29
  251. package/dist/directives/schema.d.ts.map +1 -1
  252. package/dist/directives/schema.js +35 -29
  253. package/dist/directives/schema.js.map +1 -1
  254. package/dist/directives/version.d.ts +28 -0
  255. package/dist/directives/version.d.ts.map +1 -0
  256. package/dist/directives/version.js +51 -0
  257. package/dist/directives/version.js.map +1 -0
  258. package/dist/dna/edit.d.ts +7 -6
  259. package/dist/dna/edit.d.ts.map +1 -1
  260. package/dist/dna/edit.js +96 -41
  261. package/dist/dna/edit.js.map +1 -1
  262. package/dist/dna/mutate.js +18 -3
  263. package/dist/dna/mutate.js.map +1 -1
  264. package/dist/dna/path.d.ts +2 -2
  265. package/dist/dna/roles.d.ts +1 -1
  266. package/dist/dna/schema.d.ts +61 -3
  267. package/dist/dna/schema.d.ts.map +1 -1
  268. package/dist/dna/schema.js +121 -6
  269. package/dist/dna/schema.js.map +1 -1
  270. package/dist/mcp/dna-resource.d.ts.map +1 -1
  271. package/dist/mcp/dna-resource.js +4 -4
  272. package/dist/mcp/dna-resource.js.map +1 -1
  273. package/dist/mcp/index.d.ts +8 -4
  274. package/dist/mcp/index.d.ts.map +1 -1
  275. package/dist/mcp/index.js +13 -2
  276. package/dist/mcp/index.js.map +1 -1
  277. package/dist/mcp/memory-resource.d.ts.map +1 -1
  278. package/dist/mcp/memory-resource.js +30 -19
  279. package/dist/mcp/memory-resource.js.map +1 -1
  280. package/dist/mcp/prompt.d.ts +61 -24
  281. package/dist/mcp/prompt.d.ts.map +1 -1
  282. package/dist/mcp/prompt.js +176 -47
  283. package/dist/mcp/prompt.js.map +1 -1
  284. package/dist/mcp/read-only.d.ts +39 -0
  285. package/dist/mcp/read-only.d.ts.map +1 -1
  286. package/dist/mcp/read-only.js +61 -0
  287. package/dist/mcp/read-only.js.map +1 -1
  288. package/dist/mcp/registrar.d.ts +10 -0
  289. package/dist/mcp/registrar.d.ts.map +1 -1
  290. package/dist/mcp/registrar.js +48 -12
  291. package/dist/mcp/registrar.js.map +1 -1
  292. package/dist/mcp/server.d.ts +21 -14
  293. package/dist/mcp/server.d.ts.map +1 -1
  294. package/dist/mcp/server.js +41 -15
  295. package/dist/mcp/server.js.map +1 -1
  296. package/dist/mcp/session-resource.d.ts +13 -0
  297. package/dist/mcp/session-resource.d.ts.map +1 -0
  298. package/dist/mcp/session-resource.js +65 -0
  299. package/dist/mcp/session-resource.js.map +1 -0
  300. package/dist/mcp/workflow-resource.d.ts +18 -0
  301. package/dist/mcp/workflow-resource.d.ts.map +1 -1
  302. package/dist/mcp/workflow-resource.js +37 -8
  303. package/dist/mcp/workflow-resource.js.map +1 -1
  304. package/dist/memory/add.d.ts +110 -24
  305. package/dist/memory/add.d.ts.map +1 -1
  306. package/dist/memory/add.js +251 -64
  307. package/dist/memory/add.js.map +1 -1
  308. package/dist/memory/audit.d.ts +152 -39
  309. package/dist/memory/audit.d.ts.map +1 -1
  310. package/dist/memory/audit.js +257 -103
  311. package/dist/memory/audit.js.map +1 -1
  312. package/dist/memory/commit-message.d.ts +60 -38
  313. package/dist/memory/commit-message.d.ts.map +1 -1
  314. package/dist/memory/commit-message.js +167 -21
  315. package/dist/memory/commit-message.js.map +1 -1
  316. package/dist/memory/entry.d.ts.map +1 -1
  317. package/dist/memory/entry.js +1 -2
  318. package/dist/memory/entry.js.map +1 -1
  319. package/dist/memory/frontmatter-edit.d.ts +16 -4
  320. package/dist/memory/frontmatter-edit.d.ts.map +1 -1
  321. package/dist/memory/frontmatter-edit.js +13 -1
  322. package/dist/memory/frontmatter-edit.js.map +1 -1
  323. package/dist/memory/git-log.d.ts +18 -6
  324. package/dist/memory/git-log.d.ts.map +1 -1
  325. package/dist/memory/git-log.js +40 -13
  326. package/dist/memory/git-log.js.map +1 -1
  327. package/dist/memory/history.d.ts +73 -12
  328. package/dist/memory/history.d.ts.map +1 -1
  329. package/dist/memory/history.js +128 -44
  330. package/dist/memory/history.js.map +1 -1
  331. package/dist/memory/index.d.ts +13 -11
  332. package/dist/memory/index.d.ts.map +1 -1
  333. package/dist/memory/index.js +34 -3
  334. package/dist/memory/index.js.map +1 -1
  335. package/dist/memory/query.d.ts +161 -19
  336. package/dist/memory/query.d.ts.map +1 -1
  337. package/dist/memory/query.js +435 -55
  338. package/dist/memory/query.js.map +1 -1
  339. package/dist/memory/schema.d.ts +52 -3
  340. package/dist/memory/schema.d.ts.map +1 -1
  341. package/dist/memory/schema.js +132 -8
  342. package/dist/memory/schema.js.map +1 -1
  343. package/dist/memory/state-machine.d.ts +65 -10
  344. package/dist/memory/state-machine.d.ts.map +1 -1
  345. package/dist/memory/state-machine.js +134 -46
  346. package/dist/memory/state-machine.js.map +1 -1
  347. package/dist/memory/submit.d.ts +52 -3
  348. package/dist/memory/submit.d.ts.map +1 -1
  349. package/dist/memory/submit.js +118 -11
  350. package/dist/memory/submit.js.map +1 -1
  351. package/dist/storage/build-stamp.d.ts +18 -0
  352. package/dist/storage/build-stamp.d.ts.map +1 -0
  353. package/dist/storage/build-stamp.js +68 -0
  354. package/dist/storage/build-stamp.js.map +1 -0
  355. package/dist/storage/builtin-adapters.d.ts +32 -0
  356. package/dist/storage/builtin-adapters.d.ts.map +1 -0
  357. package/dist/storage/builtin-adapters.js +100 -0
  358. package/dist/storage/builtin-adapters.js.map +1 -0
  359. package/dist/storage/builtin-directives.d.ts +0 -29
  360. package/dist/storage/builtin-directives.d.ts.map +1 -1
  361. package/dist/storage/builtin-directives.js +9 -4
  362. package/dist/storage/builtin-directives.js.map +1 -1
  363. package/dist/storage/commit.d.ts +310 -3
  364. package/dist/storage/commit.d.ts.map +1 -1
  365. package/dist/storage/commit.js +807 -33
  366. package/dist/storage/commit.js.map +1 -1
  367. package/dist/storage/document.d.ts +6 -0
  368. package/dist/storage/document.d.ts.map +1 -1
  369. package/dist/storage/document.js +10 -1
  370. package/dist/storage/document.js.map +1 -1
  371. package/dist/storage/dry-run.d.ts +65 -0
  372. package/dist/storage/dry-run.d.ts.map +1 -0
  373. package/dist/storage/dry-run.js +150 -0
  374. package/dist/storage/dry-run.js.map +1 -0
  375. package/dist/storage/errors.d.ts +26 -0
  376. package/dist/storage/errors.d.ts.map +1 -1
  377. package/dist/storage/errors.js +27 -1
  378. package/dist/storage/errors.js.map +1 -1
  379. package/dist/storage/frontmatter.d.ts +1 -1
  380. package/dist/storage/frontmatter.js +1 -1
  381. package/dist/storage/git-read.d.ts +64 -0
  382. package/dist/storage/git-read.d.ts.map +1 -0
  383. package/dist/storage/git-read.js +107 -0
  384. package/dist/storage/git-read.js.map +1 -0
  385. package/dist/storage/index.d.ts +13 -5
  386. package/dist/storage/index.d.ts.map +1 -1
  387. package/dist/storage/index.js +39 -2
  388. package/dist/storage/index.js.map +1 -1
  389. package/dist/storage/layout.d.ts +2 -2
  390. package/dist/storage/layout.d.ts.map +1 -1
  391. package/dist/storage/layout.js +2 -7
  392. package/dist/storage/layout.js.map +1 -1
  393. package/dist/storage/memory-path.d.ts +18 -5
  394. package/dist/storage/memory-path.d.ts.map +1 -1
  395. package/dist/storage/memory-path.js +41 -5
  396. package/dist/storage/memory-path.js.map +1 -1
  397. package/dist/storage/snapshot.js +1 -1
  398. package/dist/storage/templates.d.ts +33 -6
  399. package/dist/storage/templates.d.ts.map +1 -1
  400. package/dist/storage/templates.js +170 -16
  401. package/dist/storage/templates.js.map +1 -1
  402. package/dist/validation/config-version.d.ts +19 -0
  403. package/dist/validation/config-version.d.ts.map +1 -0
  404. package/dist/validation/config-version.js +53 -0
  405. package/dist/validation/config-version.js.map +1 -0
  406. package/dist/validation/diagnostic.d.ts +40 -0
  407. package/dist/validation/diagnostic.d.ts.map +1 -0
  408. package/dist/validation/diagnostic.js +41 -0
  409. package/dist/validation/diagnostic.js.map +1 -0
  410. package/dist/validation/format.d.ts +74 -0
  411. package/dist/validation/format.d.ts.map +1 -0
  412. package/dist/validation/format.js +104 -0
  413. package/dist/validation/format.js.map +1 -0
  414. package/dist/validation/id.d.ts +14 -0
  415. package/dist/validation/id.d.ts.map +1 -1
  416. package/dist/validation/id.js +35 -11
  417. package/dist/validation/id.js.map +1 -1
  418. package/dist/validation/identity.d.ts +40 -0
  419. package/dist/validation/identity.d.ts.map +1 -0
  420. package/dist/validation/identity.js +78 -0
  421. package/dist/validation/identity.js.map +1 -0
  422. package/dist/validation/index.d.ts +9 -3
  423. package/dist/validation/index.d.ts.map +1 -1
  424. package/dist/validation/index.js +30 -1
  425. package/dist/validation/index.js.map +1 -1
  426. package/dist/validation/secret-scan.d.ts +3 -2
  427. package/dist/validation/secret-scan.d.ts.map +1 -1
  428. package/dist/validation/secret-scan.js +32 -11
  429. package/dist/validation/secret-scan.js.map +1 -1
  430. package/dist/validation/warning.d.ts +30 -16
  431. package/dist/validation/warning.d.ts.map +1 -1
  432. package/dist/validation/warning.js +74 -7
  433. package/dist/validation/warning.js.map +1 -1
  434. package/dist/workflow/bindings.d.ts +152 -0
  435. package/dist/workflow/bindings.d.ts.map +1 -0
  436. package/dist/workflow/bindings.js +249 -0
  437. package/dist/workflow/bindings.js.map +1 -0
  438. package/dist/workflow/create.d.ts +13 -0
  439. package/dist/workflow/create.d.ts.map +1 -0
  440. package/dist/workflow/create.js +41 -0
  441. package/dist/workflow/create.js.map +1 -0
  442. package/dist/workflow/deduce.d.ts +400 -0
  443. package/dist/workflow/deduce.d.ts.map +1 -0
  444. package/dist/workflow/deduce.js +1109 -0
  445. package/dist/workflow/deduce.js.map +1 -0
  446. package/dist/workflow/manifest-edit.d.ts +19 -0
  447. package/dist/workflow/manifest-edit.d.ts.map +1 -0
  448. package/dist/workflow/manifest-edit.js +124 -0
  449. package/dist/workflow/manifest-edit.js.map +1 -0
  450. package/dist/workflow/schema.d.ts +158 -19
  451. package/dist/workflow/schema.d.ts.map +1 -1
  452. package/dist/workflow/schema.js +163 -15
  453. package/dist/workflow/schema.js.map +1 -1
  454. package/package.json +18 -8
@@ -1,12 +1,16 @@
1
1
  /**
2
2
  * Immutable built-in assets pre-flight check (REQ-SEC-07 — task-042-immutable-builtin-assets).
3
3
  *
4
- * **The rule is REQ-SEC-07's, the layout is spec-011's.** REQ-SEC-07 states that built-in directives
5
- * and built-in workflow templates cannot be removed; `spec-011-storage-layout` supplies the structure
4
+ * **The rule is REQ-SEC-07's, the layout is spec-011's.** REQ-SEC-07 states that built-in directives,
5
+ * built-in workflow templates and (since task-196) built-in agent adapters cannot be removed. This
6
+ * module checks the first two only: no operation removes an adapter (`spec-016` §2.1), and
7
+ * `test/core/builtin-adapter-writers.test.ts` keeps it so. `spec-011-storage-layout` supplies the structure
6
8
  * that rule is expressed over — the `directives/{built-in,custom}/` and `workflows/{built-in,custom}/`
7
- * split, where `built-in/` is "reserved for the official … templates shipped by the `wingfoil` npm
8
- * package" (empty today, `.gitkeep` only) and `custom/` holds every asset that exists right now. Only
9
- * the removability rule comes from REQ-SEC-07; spec-011 never speaks about removal or protection.
9
+ * split, where `built-in/` holds the official templates shipped by the `wingfoil` npm package (the P3.8
10
+ * directive templates `wingfoil init` installs, task-057; no workflow templates ship yet) and `custom/`
11
+ * holds the project's own assets. This repository's own `directives/built-in/` holds only `.gitkeep`:
12
+ * its hand-authored configuration predates the templates. Only the removability rule comes from
13
+ * REQ-SEC-07; spec-011 never speaks about removal or protection.
10
14
  *
11
15
  * Classification is **structural** (which subdirectory holds the file), not the directive
12
16
  * frontmatter's `kind:` field — and that is the one point spec-011 does settle: the six P3.8 template
@@ -32,20 +36,19 @@
32
36
  * This lives in `src/core` (not `src/directives`/`src/workflow`) because REQ-SEC-07 crosscuts both
33
37
  * pillars identically and both the CLI and MCP surfaces must enforce it the same way (REQ-SYS-05) —
34
38
  * the same reasoning `requireGitIdentity` (REQ-SEC-01, task-014) already established for a
35
- * cross-cutting mutating-op pre-flight. Neither `directive remove` nor `workflow remove` exists yet in
36
- * `CORE_MODULES` (spec-006 §3 reserves both as future `mutates: true` operations); per the same
37
- * precedent (task-014, task-016), this task delivers the shared, fully-tested primitive now and defers
38
- * wiring it into the actual mutating op to the dependent task (task-052-directive-remove for
39
- * `directive.remove`; a future task for `workflow.remove`).
39
+ * cross-cutting mutating-op pre-flight. It shipped (task-042) before either remove operation; both now
40
+ * call it: `directive remove` (task-052-directive-remove) and `workflow remove` (task-211,
41
+ * `./workflow-create-remove.ts`).
40
42
  *
41
43
  * **Scope:** this module delivers REQ-SEC-07's *first* clause only. The second — "removal of a
42
- * still-referenced custom asset is rejected naming the referrer" — is deliberately not implemented
43
- * here; per `dl-030-req-sec-07-referenced-asset-ownership` (`ready`) the directive half belongs to
44
- * `task-052-directive-remove` and the workflow half (P4.9) is carried to the next `release-planning`
45
- * run. `requireCustomAsset` is therefore the FIRST of two checks a remove op runs, never the only one.
44
+ * still-referenced custom asset is rejected naming the referrer" — is each remove operation's own, per
45
+ * `dl-030-req-sec-07-referenced-asset-ownership` (`ready`): the directive half is `checkUnreferenced`
46
+ * (`./directive-assign.ts`, task-052), the workflow half `workflow remove`'s include and open-instance
47
+ * refusals (task-211). `requireCustomAsset` is therefore the FIRST of two checks a remove op runs, never
48
+ * the only one.
46
49
  */
47
50
  import { type CoreResult } from './types';
48
- /** The two pillars REQ-SEC-07 protects — `built-in/` is immutable in both. */
51
+ /** The two pillars whose removal this check guards — `built-in/` is immutable in both (REQ-SEC-07 also names built-in agent adapters, which no operation removes). */
49
52
  export type AssetKind = 'directive' | 'workflow';
50
53
  /**
51
54
  * The allow-list: true only when `relativePath` is positively recognised as a removable `custom/`
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-asset.d.ts","sourceRoot":"","sources":["../../src/core/builtin-asset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAiDjD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAEzF;AAcD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAQ1F"}
1
+ {"version":3,"file":"builtin-asset.d.ts","sourceRoot":"","sources":["../../src/core/builtin-asset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D,sKAAsK;AACtK,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAiDjD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAEzF;AAcD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAQ1F"}
@@ -5,12 +5,16 @@ exports.requireCustomAsset = requireCustomAsset;
5
5
  /**
6
6
  * Immutable built-in assets pre-flight check (REQ-SEC-07 — task-042-immutable-builtin-assets).
7
7
  *
8
- * **The rule is REQ-SEC-07's, the layout is spec-011's.** REQ-SEC-07 states that built-in directives
9
- * and built-in workflow templates cannot be removed; `spec-011-storage-layout` supplies the structure
8
+ * **The rule is REQ-SEC-07's, the layout is spec-011's.** REQ-SEC-07 states that built-in directives,
9
+ * built-in workflow templates and (since task-196) built-in agent adapters cannot be removed. This
10
+ * module checks the first two only: no operation removes an adapter (`spec-016` §2.1), and
11
+ * `test/core/builtin-adapter-writers.test.ts` keeps it so. `spec-011-storage-layout` supplies the structure
10
12
  * that rule is expressed over — the `directives/{built-in,custom}/` and `workflows/{built-in,custom}/`
11
- * split, where `built-in/` is "reserved for the official … templates shipped by the `wingfoil` npm
12
- * package" (empty today, `.gitkeep` only) and `custom/` holds every asset that exists right now. Only
13
- * the removability rule comes from REQ-SEC-07; spec-011 never speaks about removal or protection.
13
+ * split, where `built-in/` holds the official templates shipped by the `wingfoil` npm package (the P3.8
14
+ * directive templates `wingfoil init` installs, task-057; no workflow templates ship yet) and `custom/`
15
+ * holds the project's own assets. This repository's own `directives/built-in/` holds only `.gitkeep`:
16
+ * its hand-authored configuration predates the templates. Only the removability rule comes from
17
+ * REQ-SEC-07; spec-011 never speaks about removal or protection.
14
18
  *
15
19
  * Classification is **structural** (which subdirectory holds the file), not the directive
16
20
  * frontmatter's `kind:` field — and that is the one point spec-011 does settle: the six P3.8 template
@@ -36,17 +40,16 @@ exports.requireCustomAsset = requireCustomAsset;
36
40
  * This lives in `src/core` (not `src/directives`/`src/workflow`) because REQ-SEC-07 crosscuts both
37
41
  * pillars identically and both the CLI and MCP surfaces must enforce it the same way (REQ-SYS-05) —
38
42
  * the same reasoning `requireGitIdentity` (REQ-SEC-01, task-014) already established for a
39
- * cross-cutting mutating-op pre-flight. Neither `directive remove` nor `workflow remove` exists yet in
40
- * `CORE_MODULES` (spec-006 §3 reserves both as future `mutates: true` operations); per the same
41
- * precedent (task-014, task-016), this task delivers the shared, fully-tested primitive now and defers
42
- * wiring it into the actual mutating op to the dependent task (task-052-directive-remove for
43
- * `directive.remove`; a future task for `workflow.remove`).
43
+ * cross-cutting mutating-op pre-flight. It shipped (task-042) before either remove operation; both now
44
+ * call it: `directive remove` (task-052-directive-remove) and `workflow remove` (task-211,
45
+ * `./workflow-create-remove.ts`).
44
46
  *
45
47
  * **Scope:** this module delivers REQ-SEC-07's *first* clause only. The second — "removal of a
46
- * still-referenced custom asset is rejected naming the referrer" — is deliberately not implemented
47
- * here; per `dl-030-req-sec-07-referenced-asset-ownership` (`ready`) the directive half belongs to
48
- * `task-052-directive-remove` and the workflow half (P4.9) is carried to the next `release-planning`
49
- * run. `requireCustomAsset` is therefore the FIRST of two checks a remove op runs, never the only one.
48
+ * still-referenced custom asset is rejected naming the referrer" — is each remove operation's own, per
49
+ * `dl-030-req-sec-07-referenced-asset-ownership` (`ready`): the directive half is `checkUnreferenced`
50
+ * (`./directive-assign.ts`, task-052), the workflow half `workflow remove`'s include and open-instance
51
+ * refusals (task-211). `requireCustomAsset` is therefore the FIRST of two checks a remove op runs, never
52
+ * the only one.
50
53
  */
51
54
  const types_1 = require("./types");
52
55
  /** The `.wingfoil/` top-level directory that holds each pillar's assets (spec-011 layout). */
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-asset.js","sourceRoot":"","sources":["../../src/core/builtin-asset.ts"],"names":[],"mappings":";;AA2GA,gEAEC;AAwBD,gDAQC;AA7ID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,mCAA2D;AAK3D,8FAA8F;AAC9F,MAAM,kBAAkB,GAA8B;IACpD,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE,WAAW;CACtB,CAAC;AAEF,oGAAoG;AACpG,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC,8EAA8E;AAC9E,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,sBAAsB,GAA8B;IACxD,SAAS,EAAE,uCAAuC;IAClD,QAAQ,EAAE,sCAAsC;CACjD,CAAC;AAEF;;;;GAIG;AACH,SAAS,UAAU,CAAC,YAAoB;IACtC,OAAO,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,IAAe,EAAE,YAAoB,EAAE,YAAoB;IACpF,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IAC1C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,CAAC,Q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gB,CAAC,CAAC;AACjE,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAAC,IAAe,EAAE,YAAoB;IACtE,IAAI,0BAA0B,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC;QACnD,OAAO,IAAA,cAAM,EAAO,SAAS,CAAC,CAAC;IACjC,CAAC;IACD,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,EAAE,YAAY,CAAC;QACrD,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,kBAAkB,YAAY,YAAY,IAAI,WAAW,kBAAkB,CAAC,IAAI,CAAC,IAAI,cAAc,IAAI,CAAC;IAC5G,OAAO,IAAA,eAAO,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC"}
@@ -9,10 +9,15 @@ export interface BuiltinIntegrityFailure {
9
9
  readonly name: string;
10
10
  readonly kind: BuiltinTemplateKind;
11
11
  readonly message: string;
12
+ /**
13
+ * The spec-007 §2 `pattern_id` of the blocking finding, present only when the source failed the
14
+ * secret scan ({@link secretScanFailure}) rather than its schema check.
15
+ */
16
+ readonly patternId?: string;
12
17
  }
13
18
  /**
14
- * Schema-check every `sources` entry, in list order (REQ-SYS-07: deterministic, no unordered
15
- * iteration), and return the FIRST one that fails — or `null` when every source is valid (including
19
+ * Schema-check, then secret-scan, every `sources` entry, in list order (REQ-SYS-07: deterministic,
20
+ * no unordered iteration), and return the FIRST one that fails — or `null` when every source is valid (including
16
21
  * the trivial, always-passing case of an empty list, which is what `src/storage/templates.ts`'s
17
22
  * `builtinTemplateSources` derives from the P1.1 minimal skeleton, whose built-in directory holds only
18
23
  * a `.gitkeep`; `templateScaffold` yields the six P3.8 built-in directives since
@@ -22,6 +27,11 @@ export interface BuiltinIntegrityFailure {
22
27
  * reported as a failure ({@link unknownKindMessage}) rather than skipped or thrown on — it cannot be
23
28
  * checked, so it must not be installed.
24
29
  *
30
+ * The secret scan ({@link secretScanFailure}) is spec-007 §4 step 5's "additional integrity gate run
31
+ * in the same pre-write pass" (task-135, `bug-038`): a source that passes its schema check but
32
+ * carries a `blocking` spec-007 §2 finding fails too, naming the template and the `pattern_id`. A
33
+ * source is scanned only once its schema check has passed, so each source reports one failure.
34
+ *
25
35
  * Callers — `initWingfoilProject` AND `initWingfoilStorage`, both in `src/core/init.ts`; every
26
36
  * `initStorage` write path there is one — MUST run this before writing any file: REQ-SEC-10's fit
27
37
  * criterion requires the abort to happen "before writing partial assets". This function itself never
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-integrity.d.ts","sourceRoot":"","sources":["../../src/core/builtin-integrity.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAsB,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAItG,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAuFD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,uBAAuB,GAAG,IAAI,CAehC"}
1
+ {"version":3,"file":"builtin-integrity.d.ts","sourceRoot":"","sources":["../../src/core/builtin-integrity.ts"],"names":[],"mappings":"AAuCA,OAAO,EAA4C,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAM5H,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE7E;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAkJD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,uBAAuB,GAAG,IAAI,CAiBhC"}
@@ -16,9 +16,17 @@ exports.verifyBuiltinTemplates = verifyBuiltinTemplates;
16
16
  * ordering determinism surface against REQ-SYS-07. Distribution-channel assurance lives in `adr-009`
17
17
  * / `spec-015` (npm provenance) instead. Do not "strengthen" this module with hashing.
18
18
  *
19
+ * The same pre-write pass also runs the spec-007 §4 step 5 secret scan over each source (task-135,
20
+ * `bug-038`), which is a separate gate from the REQ-SEC-10 schema check, serving REQ-SEC-08: a
21
+ * secret in a shipped template would be installed into every new project. It is a regex scan of
22
+ * the content, not a digest, so the paragraph above still holds.
23
+ *
24
+ * Since task-196 it also checks the built-in agent adapter manifests `init` installs under
25
+ * `.wingfoil/agents/built-in/` (kind `adapter`, `spec-016` §2.1), against the task-177 manifest schema.
26
+ *
19
27
  * A cross-pillar concern by construction — checking a directive source needs the Directives pillar's
20
28
  * `DirectiveFrontmatter` schema, checking a workflow source needs the Workflow pillar's `Workflow`
21
- * schema — so, per `src/core/loaders.ts`'s own precedent ("Cross-file concerns ... need the caller to
29
+ * schema and its loader rules, an adapter source the `agent` module's manifest parser — so, per `src/core/loaders.ts`'s own precedent ("Cross-file concerns ... need the caller to
22
30
  * have actually loaded the referenced files ... live in the loader, not [a pillar] schema module"),
23
31
  * this lives in `core`, not in either pillar module or in `storage` (which only carries the raw
24
32
  * {@link BuiltinTemplateSource} shape — see `src/storage/templates.ts`). Reuses the exact same
@@ -30,10 +38,12 @@ exports.verifyBuiltinTemplates = verifyBuiltinTemplates;
30
38
  * randomness) — the same corrupted input always yields the same failure, and callers may pass a
31
39
  * fixture list in tests via {@link BuiltinTemplateSource} without touching disk.
32
40
  */
41
+ const manifest_1 = require("../agent/manifest");
33
42
  const schema_1 = require("../directives/schema");
34
43
  const storage_1 = require("../storage");
35
44
  const validation_1 = require("../validation");
36
45
  const schema_2 = require("../workflow/schema");
46
+ const workflow_diagnostics_1 = require("./workflow-diagnostics");
37
47
  /**
38
48
  * `true` iff `source.content` parses as a `.md` document with a frontmatter block that validates
39
49
  * against `DirectiveFrontmatter` (the same schema `core/loaders.ts`'s `loadDirectives` runs custom
@@ -55,13 +65,41 @@ function isValidDirectiveSource(source) {
55
65
  }
56
66
  }
57
67
  /**
58
- * `true` iff `source.content` parses as YAML and validates against the `Workflow` schema (the same
59
- * schema `core/loaders.ts`'s `loadWorkflowsYaml` runs every included workflow file through).
68
+ * `true` iff `source.content` parses as YAML, validates against the `Workflow` schema (the same
69
+ * schema `core/loaders.ts`'s `loadWorkflowsYaml` runs every included workflow file through), and
70
+ * raises no error under the loader's per-file rules (`workflowFileDiagnostics`, spec-003 §
71
+ * "Diagnostics") — so a template that passes integrity also loads (task-196, `bug-183`: a template
72
+ * with neither `kind` nor `startable`/`includable` used to pass here and be refused by the loader).
73
+ *
74
+ * The template is checked as the only file of a registry whose names are NOT complete: a rule that
75
+ * needs another file (an `include` naming a workflow outside the template) is undecidable here, and
76
+ * the loader's own rule is to report nothing it cannot decide. Warnings never fail it, as they never
77
+ * fail a load.
60
78
  */
61
79
  function isValidWorkflowSource(source) {
80
+ let workflow;
62
81
  try {
63
- const data = (0, validation_1.parseYaml)(source.content, source.name);
64
- (0, validation_1.runValidation)(schema_2.Workflow, data, source.name);
82
+ workflow = (0, validation_1.runValidation)(schema_2.Workflow, (0, validation_1.parseYaml)(source.content, source.name), source.name);
83
+ }
84
+ catch {
85
+ return false;
86
+ }
87
+ const index = { byName: new Map([[workflow.name, 0]]), namesComplete: false };
88
+ const loaded = [{ file: source.name, workflow, rawName: workflow.name }];
89
+ return !(0, workflow_diagnostics_1.workflowFileDiagnostics)(loaded, index, 0).some((diagnostic) => diagnostic.severity === 'error');
90
+ }
91
+ /**
92
+ * `true` iff `source.content` is a valid BUILT-IN adapter manifest (`spec-016` §2.2–§2.3, task-196):
93
+ * the task-177 parser `loadAdapter` runs, with kind `built-in` (so `verified_with` is required) and
94
+ * the source's name as the file basename the manifest's `name` must equal.
95
+ */
96
+ function isValidAdapterSource(source) {
97
+ try {
98
+ (0, manifest_1.parseAdapterManifest)(source.content, {
99
+ name: source.name,
100
+ kind: 'built-in',
101
+ file: `${storage_1.BUILTIN_ADAPTERS_DIR}/${source.name}.yaml`,
102
+ });
65
103
  return true;
66
104
  }
67
105
  catch {
@@ -72,8 +110,9 @@ function isValidWorkflowSource(source) {
72
110
  * Per-kind schema-check policy: the `isValid` predicate to apply and the exact REQ-SEC-10 abort-message
73
111
  * builder to use when it fails. Keyed by {@link BuiltinTemplateKind} so each kind's validator and its
74
112
  * BDD wording live together and `verifyBuiltinTemplates` branches on `kind` exactly once. The message
75
- * strings are verbatim BDD contracts — P3.8 "Error - a built-in template fails its integrity check"
76
- * and P4.17 "Error - a built-in workflow template is structurally invalid" — do not reword.
113
+ * strings of the first two kinds are verbatim BDD contracts — P3.8 "Error - a built-in template fails
114
+ * its integrity check" and P4.17 "Error - a built-in workflow template is structurally invalid" — do
115
+ * not reword. The `adapter` kind (task-196) follows the directive message's shape.
77
116
  *
78
117
  * Declared as an EXHAUSTIVE `Record` so widening {@link BuiltinTemplateKind} is a compile error until
79
118
  * the new kind gets a policy; look it up only through {@link policyFor}, never by bare indexing.
@@ -87,6 +126,11 @@ const INTEGRITY_POLICY = {
87
126
  isValid: isValidWorkflowSource,
88
127
  message: (name) => `built-in workflow template invalid: ${name}`,
89
128
  },
129
+ // task-196: the built-in directive's message shape; no BDD scenario pins this wording yet.
130
+ adapter: {
131
+ isValid: isValidAdapterSource,
132
+ message: (name) => `built-in adapter template integrity check failed: ${name}`,
133
+ },
90
134
  };
91
135
  /**
92
136
  * The REQ-SEC-10 message for a source whose `kind` has no policy — the fail-closed branch. Not a BDD
@@ -112,8 +156,32 @@ function policyFor(kind) {
112
156
  return Object.prototype.hasOwnProperty.call(INTEGRITY_POLICY, kind) ? INTEGRITY_POLICY[kind] : undefined;
113
157
  }
114
158
  /**
115
- * Schema-check every `sources` entry, in list order (REQ-SYS-07: deterministic, no unordered
116
- * iteration), and return the FIRST one that fails — or `null` when every source is valid (including
159
+ * The spec-007 §4 step 5 secret scan of one built-in source (task-135, `bug-038`): `null` when the
160
+ * content carries no `blocking` finding, otherwise a failure naming the template and the FIRST
161
+ * blocking finding's `pattern_id` and line (`scanText` reports findings in line order, then in the
162
+ * declared pattern order, so the choice is deterministic, REQ-SYS-07).
163
+ *
164
+ * The scan runs on the source's content exactly as it would be written, with the §3 exclusions
165
+ * `scanText` applies (fenced examples, placeholder values) and no `security-ignore` list: an ignore
166
+ * file belongs to the project being initialized, which does not exist yet. `warn` findings never
167
+ * fail it (§4 step 6), and they are not surfaced: `init` has no warning channel, and a built-in
168
+ * template is not the operator's to review.
169
+ */
170
+ function secretScanFailure(source) {
171
+ const [finding] = (0, validation_1.scanText)(source.content, source.name).blocking;
172
+ if (finding === undefined)
173
+ return null;
174
+ return {
175
+ name: source.name,
176
+ kind: source.kind,
177
+ patternId: finding.patternId,
178
+ message: `built-in ${source.kind} template secret scan failed: ${source.name} ` +
179
+ `(${finding.patternId}, line ${finding.line})`,
180
+ };
181
+ }
182
+ /**
183
+ * Schema-check, then secret-scan, every `sources` entry, in list order (REQ-SYS-07: deterministic,
184
+ * no unordered iteration), and return the FIRST one that fails — or `null` when every source is valid (including
117
185
  * the trivial, always-passing case of an empty list, which is what `src/storage/templates.ts`'s
118
186
  * `builtinTemplateSources` derives from the P1.1 minimal skeleton, whose built-in directory holds only
119
187
  * a `.gitkeep`; `templateScaffold` yields the six P3.8 built-in directives since
@@ -123,6 +191,11 @@ function policyFor(kind) {
123
191
  * reported as a failure ({@link unknownKindMessage}) rather than skipped or thrown on — it cannot be
124
192
  * checked, so it must not be installed.
125
193
  *
194
+ * The secret scan ({@link secretScanFailure}) is spec-007 §4 step 5's "additional integrity gate run
195
+ * in the same pre-write pass" (task-135, `bug-038`): a source that passes its schema check but
196
+ * carries a `blocking` spec-007 §2 finding fails too, naming the template and the `pattern_id`. A
197
+ * source is scanned only once its schema check has passed, so each source reports one failure.
198
+ *
126
199
  * Callers — `initWingfoilProject` AND `initWingfoilStorage`, both in `src/core/init.ts`; every
127
200
  * `initStorage` write path there is one — MUST run this before writing any file: REQ-SEC-10's fit
128
201
  * criterion requires the abort to happen "before writing partial assets". This function itself never
@@ -142,6 +215,9 @@ function verifyBuiltinTemplates(sources) {
142
215
  if (!policy.isValid(source)) {
143
216
  return { name: source.name, kind: source.kind, message: policy.message(source.name) };
144
217
  }
218
+ const secret = secretScanFailure(source);
219
+ if (secret !== null)
220
+ return secret;
145
221
  }
146
222
  return null;
147
223
  }
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-integrity.js","sourceRoot":"","sources":["../../src/core/builtin-integrity.ts"],"names":[],"mappings":";;AAsJA,wDAiBC;AAvKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,iDAA4D;AAC5D,wCAAsG;AACtG,8CAAyD;AACzD,+CAA8C;AAe9C;;;;;;GAMG;AACH,SAAS,sBAAsB,CAAC,MAA6B;IAC3D,MAAM,eAAe,GAAG,IAAA,4BAAkB,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3D,IAAI,eAAe,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC3C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAA,sBAAS,EAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QACrD,IAAA,0BAAa,EAAC,6BAAoB,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;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yC;IAEzC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO;gBACL,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAC9D,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QACxF,CAAC;QACD,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,MAAM,CAAC;IACrC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -22,7 +22,9 @@ import { type CoreResult } from './types';
22
22
  * does not ask.
23
23
  *
24
24
  * @param root - Project root.
25
- * @param relativePath - Root-relative POSIX path of the file the operation is about to touch.
25
+ * @param relativePath - The path of the file the operation is about to touch, as the refusal should
26
+ * name it: root-relative POSIX, or absolute (resolved as is) — the run log passes its configured
27
+ * `paths.runs` spelling, so a refusal names `/etc/<id>.jsonl` rather than a `../` climb (bug-288).
26
28
  * @param action - The verb for the refusal's first clause, e.g. `'remove'` → `cannot remove '<path>'`
27
29
  * (P3.3's own message shape, shared with `requireCustomAsset`).
28
30
  */
@@ -1 +1 @@
1
- {"version":3,"file":"confinement.d.ts","sourceRoot":"","sources":["../../src/core/confinement.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,UAAU,CAAC,IAAI,CAAC,CAUlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,UAAU,CAAC,IAAI,CAAC,CAKlB"}
1
+ {"version":3,"file":"confinement.d.ts","sourceRoot":"","sources":["../../src/core/confinement.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,UAAU,CAAC,IAAI,CAAC,CAUlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,UAAU,CAAC,IAAI,CAAC,CAKlB"}
@@ -24,9 +24,10 @@ exports.requireConfinedWriteTarget = requireConfinedWriteTarget;
24
24
  * have prevented; the refusal has to land before the filesystem is touched at all.
25
25
  *
26
26
  * **Baseline.** This guard resolves against the **working tree**, not `HEAD`, and that is deliberate
27
- * — a departure from the `command-baseline` directive's read half, argued (as that directive
28
- * requires) in `task-102`'s Execution Notes and in the decision-log filed from them, never settled
29
- * here. The one-line reason: what this predicts is where `unlinkSync` — or, on the write path,
27
+ * — the filesystem-effect read the `command-baseline` directive and `spec-006-core-domain-api` §6
28
+ * declare, argued in `task-102`'s Execution Notes and ratified in
29
+ * `dl-086-a-guard-over-a-filesystem-effect-resolves-on-the-filesystem`, never settled here. The
30
+ * one-line reason: what this predicts is where `unlinkSync` — or, on the write path,
30
31
  * `writeFileSync` — will land, and both follow the symlinks that are on disk, not the ones a commit
31
32
  * records.
32
33
  */
@@ -56,7 +57,9 @@ const types_1 = require("./types");
56
57
  * does not ask.
57
58
  *
58
59
  * @param root - Project root.
59
- * @param relativePath - Root-relative POSIX path of the file the operation is about to touch.
60
+ * @param relativePath - The path of the file the operation is about to touch, as the refusal should
61
+ * name it: root-relative POSIX, or absolute (resolved as is) — the run log passes its configured
62
+ * `paths.runs` spelling, so a refusal names `/etc/<id>.jsonl` rather than a `../` climb (bug-288).
60
63
  * @param action - The verb for the refusal's first clause, e.g. `'remove'` → `cannot remove '<path>'`
61
64
  * (P3.3's own message shape, shared with `requireCustomAsset`).
62
65
  */
@@ -1 +1 @@
1
- {"version":3,"file":"confinement.js","sourceRoot":"","sources":["../../src/core/confinement.ts"],"names":[],"mappings":";;AA6DA,sDAcC;AA4BD,gEASC;AAhHD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,yCAAiC;AAEjC,wDAAsG;AAEtG,mCAA2D;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,qBAAqB,CACnC,IAAY,EACZ,YAAoB,EACpB,MAAc;IAEd,MAAM,QAAQ,GAAG,IAAA,mCAAqB,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC3D,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAA,cAAM,EAAO,SAAS,CAAC,CAAC;IACpD,OAAO,IAAA,eAAO,EAAC;QACb,IAAI,EAAE,YAAY;QAClB,OAAO,EACL,UAAU,MAAM,KAAK,YAAY,sBAAsB,QAAQ,CAAC,IAAI,+BAA+B;YACnG,qGAAqG;YACrG,0DAA0D;KAC7D,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;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