open-agreements 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/README.md +148 -34
  2. package/bin/open-agreements.js +3 -1
  3. package/{external → content/external}/yc-safe-discount/metadata.yaml +17 -21
  4. package/{external → content/external}/yc-safe-mfn/metadata.yaml +16 -16
  5. package/{external → content/external}/yc-safe-pro-rata-side-letter/metadata.yaml +13 -13
  6. package/{external → content/external}/yc-safe-valuation-cap/metadata.yaml +16 -16
  7. package/{recipes → content/recipes}/nvca-certificate-of-incorporation/metadata.yaml +13 -13
  8. package/{recipes → content/recipes}/nvca-indemnification-agreement/metadata.yaml +17 -21
  9. package/{recipes → content/recipes}/nvca-investors-rights-agreement/metadata.yaml +18 -22
  10. package/{recipes → content/recipes}/nvca-management-rights-letter/metadata.yaml +13 -16
  11. package/{recipes → content/recipes}/nvca-rofr-co-sale-agreement/metadata.yaml +20 -24
  12. package/content/recipes/nvca-stock-purchase-agreement/clean.json +13 -0
  13. package/content/recipes/nvca-stock-purchase-agreement/computed.json +103 -0
  14. package/content/recipes/nvca-stock-purchase-agreement/metadata.yaml +138 -0
  15. package/content/recipes/nvca-stock-purchase-agreement/normalize.json +83 -0
  16. package/content/recipes/nvca-stock-purchase-agreement/replacements.json +41 -0
  17. package/{recipes → content/recipes}/nvca-voting-agreement/metadata.yaml +19 -23
  18. package/{templates → content/templates}/bonterms-mutual-nda/metadata.yaml +14 -14
  19. package/{templates → content/templates}/bonterms-professional-services-agreement/metadata.yaml +11 -13
  20. package/content/templates/closing-checklist/metadata.yaml +39 -0
  21. package/content/templates/closing-checklist/template.docx +0 -0
  22. package/{templates → content/templates}/common-paper-ai-addendum/metadata.yaml +8 -10
  23. package/{templates → content/templates}/common-paper-ai-addendum-in-app/metadata.yaml +6 -8
  24. package/{templates → content/templates}/common-paper-amendment/metadata.yaml +14 -14
  25. package/{templates → content/templates}/common-paper-business-associate-agreement/metadata.yaml +9 -16
  26. package/{templates → content/templates}/common-paper-cloud-service-agreement/metadata.yaml +53 -187
  27. package/{templates → content/templates}/common-paper-cloud-service-agreement/template.docx +0 -0
  28. package/{templates → content/templates}/common-paper-csa-click-through/metadata.yaml +10 -20
  29. package/{templates → content/templates}/common-paper-csa-with-ai/metadata.yaml +14 -37
  30. package/{templates → content/templates}/common-paper-csa-with-sla/metadata.yaml +14 -40
  31. package/{templates → content/templates}/common-paper-csa-without-sla/metadata.yaml +14 -34
  32. package/{templates → content/templates}/common-paper-data-processing-agreement/metadata.yaml +15 -34
  33. package/{templates → content/templates}/common-paper-design-partner-agreement/metadata.yaml +10 -16
  34. package/{templates → content/templates}/common-paper-independent-contractor-agreement/metadata.yaml +14 -14
  35. package/{templates → content/templates}/common-paper-letter-of-intent/metadata.yaml +11 -12
  36. package/{templates → content/templates}/common-paper-mutual-nda/metadata.yaml +13 -13
  37. package/{templates → content/templates}/common-paper-one-way-nda/metadata.yaml +13 -14
  38. package/{templates → content/templates}/common-paper-order-form/metadata.yaml +12 -23
  39. package/{templates → content/templates}/common-paper-order-form-with-sla/metadata.yaml +12 -30
  40. package/{templates → content/templates}/common-paper-partnership-agreement/metadata.yaml +9 -21
  41. package/{templates → content/templates}/common-paper-pilot-agreement/metadata.yaml +15 -29
  42. package/{templates → content/templates}/common-paper-professional-services-agreement/metadata.yaml +15 -32
  43. package/{templates → content/templates}/common-paper-software-license-agreement/metadata.yaml +6 -6
  44. package/{templates → content/templates}/common-paper-statement-of-work/metadata.yaml +12 -19
  45. package/{templates → content/templates}/common-paper-term-sheet/metadata.yaml +9 -9
  46. package/content/templates/openagreements-employee-ip-inventions-assignment/README.md +31 -0
  47. package/content/templates/openagreements-employee-ip-inventions-assignment/metadata.yaml +71 -0
  48. package/content/templates/openagreements-employee-ip-inventions-assignment/template.docx +0 -0
  49. package/content/templates/openagreements-employee-ip-inventions-assignment/template.md +80 -0
  50. package/content/templates/openagreements-employment-confidentiality-acknowledgement/README.md +30 -0
  51. package/content/templates/openagreements-employment-confidentiality-acknowledgement/metadata.yaml +60 -0
  52. package/content/templates/openagreements-employment-confidentiality-acknowledgement/template.docx +0 -0
  53. package/content/templates/openagreements-employment-confidentiality-acknowledgement/template.md +51 -0
  54. package/content/templates/openagreements-employment-offer-letter/README.md +33 -0
  55. package/content/templates/openagreements-employment-offer-letter/metadata.yaml +75 -0
  56. package/content/templates/openagreements-employment-offer-letter/template.docx +0 -0
  57. package/content/templates/openagreements-employment-offer-letter/template.md +90 -0
  58. package/content/templates/working-group-list/metadata.yaml +22 -0
  59. package/content/templates/working-group-list/template.docx +0 -0
  60. package/dist/cli/index.d.ts +3 -1
  61. package/dist/cli/index.d.ts.map +1 -1
  62. package/dist/cli/index.js +185 -89
  63. package/dist/cli/index.js.map +1 -1
  64. package/dist/commands/checklist.d.ts +22 -0
  65. package/dist/commands/checklist.d.ts.map +1 -0
  66. package/dist/commands/checklist.js +222 -0
  67. package/dist/commands/checklist.js.map +1 -0
  68. package/dist/commands/fill.d.ts +11 -0
  69. package/dist/commands/fill.d.ts.map +1 -1
  70. package/dist/commands/fill.js +56 -1
  71. package/dist/commands/fill.js.map +1 -1
  72. package/dist/commands/list.d.ts +1 -0
  73. package/dist/commands/list.d.ts.map +1 -1
  74. package/dist/commands/list.js +147 -72
  75. package/dist/commands/list.js.map +1 -1
  76. package/dist/commands/recipe.d.ts +2 -0
  77. package/dist/commands/recipe.d.ts.map +1 -1
  78. package/dist/commands/recipe.js +5 -0
  79. package/dist/commands/recipe.js.map +1 -1
  80. package/dist/commands/scan.d.ts +16 -0
  81. package/dist/commands/scan.d.ts.map +1 -1
  82. package/dist/commands/scan.js +36 -20
  83. package/dist/commands/scan.js.map +1 -1
  84. package/dist/core/checklist/index.d.ts +38 -0
  85. package/dist/core/checklist/index.d.ts.map +1 -0
  86. package/dist/core/checklist/index.js +229 -0
  87. package/dist/core/checklist/index.js.map +1 -0
  88. package/dist/core/checklist/patch-apply.d.ts +65 -0
  89. package/dist/core/checklist/patch-apply.d.ts.map +1 -0
  90. package/dist/core/checklist/patch-apply.js +274 -0
  91. package/dist/core/checklist/patch-apply.js.map +1 -0
  92. package/dist/core/checklist/patch-schemas.d.ts +86 -0
  93. package/dist/core/checklist/patch-schemas.d.ts.map +1 -0
  94. package/dist/core/checklist/patch-schemas.js +89 -0
  95. package/dist/core/checklist/patch-schemas.js.map +1 -0
  96. package/dist/core/checklist/patch-validator.d.ts +76 -0
  97. package/dist/core/checklist/patch-validator.d.ts.map +1 -0
  98. package/dist/core/checklist/patch-validator.js +404 -0
  99. package/dist/core/checklist/patch-validator.js.map +1 -0
  100. package/dist/core/checklist/schemas.d.ts +270 -0
  101. package/dist/core/checklist/schemas.d.ts.map +1 -0
  102. package/dist/core/checklist/schemas.js +229 -0
  103. package/dist/core/checklist/schemas.js.map +1 -0
  104. package/dist/core/checklist/test-utils.d.ts +7 -0
  105. package/dist/core/checklist/test-utils.d.ts.map +1 -0
  106. package/dist/core/checklist/test-utils.js +13 -0
  107. package/dist/core/checklist/test-utils.js.map +1 -0
  108. package/dist/core/command-generation/adapters/claude.d.ts.map +1 -1
  109. package/dist/core/command-generation/adapters/claude.js +8 -2
  110. package/dist/core/command-generation/adapters/claude.js.map +1 -1
  111. package/dist/core/employment/jurisdiction-rules.d.ts +20 -0
  112. package/dist/core/employment/jurisdiction-rules.d.ts.map +1 -0
  113. package/dist/core/employment/jurisdiction-rules.js +57 -0
  114. package/dist/core/employment/jurisdiction-rules.js.map +1 -0
  115. package/dist/core/employment/memo.d.ts +57 -0
  116. package/dist/core/employment/memo.d.ts.map +1 -0
  117. package/dist/core/employment/memo.js +589 -0
  118. package/dist/core/employment/memo.js.map +1 -0
  119. package/dist/core/engine.d.ts +1 -1
  120. package/dist/core/engine.d.ts.map +1 -1
  121. package/dist/core/engine.js +33 -1
  122. package/dist/core/engine.js.map +1 -1
  123. package/dist/core/external/index.d.ts.map +1 -1
  124. package/dist/core/external/index.js +1 -0
  125. package/dist/core/external/index.js.map +1 -1
  126. package/dist/core/external/types.d.ts +1 -1
  127. package/dist/core/external/types.d.ts.map +1 -1
  128. package/dist/core/fill-pipeline.d.ts +8 -5
  129. package/dist/core/fill-pipeline.d.ts.map +1 -1
  130. package/dist/core/fill-pipeline.js +85 -14
  131. package/dist/core/fill-pipeline.js.map +1 -1
  132. package/dist/core/fill-utils.d.ts +1 -1
  133. package/dist/core/fill-utils.d.ts.map +1 -1
  134. package/dist/core/fill-utils.js.map +1 -1
  135. package/dist/core/metadata.d.ts +110 -409
  136. package/dist/core/metadata.d.ts.map +1 -1
  137. package/dist/core/metadata.js +56 -4
  138. package/dist/core/metadata.js.map +1 -1
  139. package/dist/core/recipe/bracket-normalizer.d.ts +46 -0
  140. package/dist/core/recipe/bracket-normalizer.d.ts.map +1 -0
  141. package/dist/core/recipe/bracket-normalizer.js +354 -0
  142. package/dist/core/recipe/bracket-normalizer.js.map +1 -0
  143. package/dist/core/recipe/cleaner.d.ts +2 -2
  144. package/dist/core/recipe/cleaner.d.ts.map +1 -1
  145. package/dist/core/recipe/cleaner.js +13 -9
  146. package/dist/core/recipe/cleaner.js.map +1 -1
  147. package/dist/core/recipe/computed.d.ts +136 -0
  148. package/dist/core/recipe/computed.d.ts.map +1 -0
  149. package/dist/core/recipe/computed.js +225 -0
  150. package/dist/core/recipe/computed.js.map +1 -0
  151. package/dist/core/recipe/index.d.ts +2 -0
  152. package/dist/core/recipe/index.d.ts.map +1 -1
  153. package/dist/core/recipe/index.js +51 -4
  154. package/dist/core/recipe/index.js.map +1 -1
  155. package/dist/core/recipe/source-drift.d.ts +33 -0
  156. package/dist/core/recipe/source-drift.d.ts.map +1 -0
  157. package/dist/core/recipe/source-drift.js +113 -0
  158. package/dist/core/recipe/source-drift.js.map +1 -0
  159. package/dist/core/recipe/types.d.ts +6 -1
  160. package/dist/core/recipe/types.d.ts.map +1 -1
  161. package/dist/core/recipe/verifier.d.ts +1 -1
  162. package/dist/core/recipe/verifier.d.ts.map +1 -1
  163. package/dist/core/recipe/verifier.js +2 -2
  164. package/dist/core/recipe/verifier.js.map +1 -1
  165. package/dist/core/selector.d.ts +12 -87
  166. package/dist/core/selector.d.ts.map +1 -1
  167. package/dist/core/selector.js +5 -7
  168. package/dist/core/selector.js.map +1 -1
  169. package/dist/core/unified-pipeline.d.ts +4 -2
  170. package/dist/core/unified-pipeline.d.ts.map +1 -1
  171. package/dist/core/unified-pipeline.js +6 -1
  172. package/dist/core/unified-pipeline.js.map +1 -1
  173. package/dist/core/validation/recipe.d.ts +1 -1
  174. package/dist/core/validation/recipe.d.ts.map +1 -1
  175. package/dist/core/validation/recipe.js +43 -40
  176. package/dist/core/validation/recipe.js.map +1 -1
  177. package/dist/core/validation/scan-metadata.d.ts +21 -0
  178. package/dist/core/validation/scan-metadata.d.ts.map +1 -0
  179. package/dist/core/validation/scan-metadata.js +70 -0
  180. package/dist/core/validation/scan-metadata.js.map +1 -0
  181. package/dist/core/validation/template.d.ts.map +1 -1
  182. package/dist/core/validation/template.js +19 -6
  183. package/dist/core/validation/template.js.map +1 -1
  184. package/dist/index.d.ts +4 -1
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.js +5 -1
  187. package/dist/index.js.map +1 -1
  188. package/dist/utils/paths.d.ts.map +1 -1
  189. package/dist/utils/paths.js +13 -6
  190. package/dist/utils/paths.js.map +1 -1
  191. package/package.json +60 -10
  192. package/skills/cloud-service-agreement/CONNECTORS.md +19 -0
  193. package/skills/cloud-service-agreement/SKILL.md +172 -0
  194. package/skills/data-privacy-agreement/CONNECTORS.md +19 -0
  195. package/skills/data-privacy-agreement/SKILL.md +158 -0
  196. package/skills/delaware-franchise-tax/CONNECTORS.md +16 -0
  197. package/skills/delaware-franchise-tax/SKILL.md +206 -0
  198. package/skills/delaware-franchise-tax/reference/ecorp-portal-playwright-notes.md +136 -0
  199. package/skills/delaware-franchise-tax/reference/faq.md +101 -0
  200. package/skills/delaware-franchise-tax/reference/filing-instructions.md +111 -0
  201. package/skills/delaware-franchise-tax/reference/tax-calculation.md +167 -0
  202. package/skills/employment-contract/CONNECTORS.md +19 -0
  203. package/skills/employment-contract/SKILL.md +157 -0
  204. package/skills/nda/CONNECTORS.md +19 -0
  205. package/skills/nda/SKILL.md +153 -0
  206. package/skills/open-agreements/CONNECTORS.md +19 -0
  207. package/skills/open-agreements/SKILL.md +86 -70
  208. package/skills/safe/CONNECTORS.md +19 -0
  209. package/skills/safe/SKILL.md +161 -0
  210. package/skills/services-agreement/CONNECTORS.md +19 -0
  211. package/skills/services-agreement/SKILL.md +156 -0
  212. package/skills/unit-test-philosophy/SKILL.md +113 -0
  213. package/skills/unit-test-philosophy/references/allure-test-spec-writing-guide.md +164 -0
  214. package/skills/venture-financing/CONNECTORS.md +19 -0
  215. package/skills/venture-financing/SKILL.md +169 -0
  216. package/recipes/nvca-certificate-of-incorporation/schema.json +0 -11
  217. package/recipes/nvca-indemnification-agreement/schema.json +0 -19
  218. package/recipes/nvca-investors-rights-agreement/schema.json +0 -18
  219. package/recipes/nvca-management-rights-letter/schema.json +0 -13
  220. package/recipes/nvca-rofr-co-sale-agreement/schema.json +0 -19
  221. package/recipes/nvca-stock-purchase-agreement/clean.json +0 -10
  222. package/recipes/nvca-stock-purchase-agreement/metadata.yaml +0 -74
  223. package/recipes/nvca-stock-purchase-agreement/replacements.json +0 -20
  224. package/recipes/nvca-stock-purchase-agreement/schema.json +0 -19
  225. package/recipes/nvca-voting-agreement/schema.json +0 -28
  226. /package/{external → content/external}/LICENSE +0 -0
  227. /package/{external → content/external}/README.md +0 -0
  228. /package/{external → content/external}/yc-safe-discount/README.md +0 -0
  229. /package/{external → content/external}/yc-safe-discount/clean.json +0 -0
  230. /package/{external → content/external}/yc-safe-discount/replacements.json +0 -0
  231. /package/{external → content/external}/yc-safe-discount/template.docx +0 -0
  232. /package/{external → content/external}/yc-safe-mfn/README.md +0 -0
  233. /package/{external → content/external}/yc-safe-mfn/clean.json +0 -0
  234. /package/{external → content/external}/yc-safe-mfn/replacements.json +0 -0
  235. /package/{external → content/external}/yc-safe-mfn/template.docx +0 -0
  236. /package/{external → content/external}/yc-safe-pro-rata-side-letter/README.md +0 -0
  237. /package/{external → content/external}/yc-safe-pro-rata-side-letter/clean.json +0 -0
  238. /package/{external → content/external}/yc-safe-pro-rata-side-letter/replacements.json +0 -0
  239. /package/{external → content/external}/yc-safe-pro-rata-side-letter/template.docx +0 -0
  240. /package/{external → content/external}/yc-safe-valuation-cap/README.md +0 -0
  241. /package/{external → content/external}/yc-safe-valuation-cap/clean.json +0 -0
  242. /package/{external → content/external}/yc-safe-valuation-cap/replacements.json +0 -0
  243. /package/{external → content/external}/yc-safe-valuation-cap/template.docx +0 -0
  244. /package/{recipes → content/recipes}/nvca-certificate-of-incorporation/clean.json +0 -0
  245. /package/{recipes → content/recipes}/nvca-certificate-of-incorporation/replacements.json +0 -0
  246. /package/{recipes → content/recipes}/nvca-indemnification-agreement/clean.json +0 -0
  247. /package/{recipes → content/recipes}/nvca-indemnification-agreement/replacements.json +0 -0
  248. /package/{recipes → content/recipes}/nvca-investors-rights-agreement/clean.json +0 -0
  249. /package/{recipes → content/recipes}/nvca-investors-rights-agreement/replacements.json +0 -0
  250. /package/{recipes → content/recipes}/nvca-management-rights-letter/clean.json +0 -0
  251. /package/{recipes → content/recipes}/nvca-management-rights-letter/replacements.json +0 -0
  252. /package/{recipes → content/recipes}/nvca-rofr-co-sale-agreement/clean.json +0 -0
  253. /package/{recipes → content/recipes}/nvca-rofr-co-sale-agreement/replacements.json +0 -0
  254. /package/{recipes → content/recipes}/nvca-voting-agreement/README.md +0 -0
  255. /package/{recipes → content/recipes}/nvca-voting-agreement/clean.json +0 -0
  256. /package/{recipes → content/recipes}/nvca-voting-agreement/replacements.json +0 -0
  257. /package/{templates → content/templates}/bonterms-mutual-nda/README.md +0 -0
  258. /package/{templates → content/templates}/bonterms-mutual-nda/source.json +0 -0
  259. /package/{templates → content/templates}/bonterms-mutual-nda/template.docx +0 -0
  260. /package/{templates → content/templates}/bonterms-professional-services-agreement/README.md +0 -0
  261. /package/{templates → content/templates}/bonterms-professional-services-agreement/selections.json +0 -0
  262. /package/{templates → content/templates}/bonterms-professional-services-agreement/source.json +0 -0
  263. /package/{templates → content/templates}/bonterms-professional-services-agreement/template.docx +0 -0
  264. /package/{templates → content/templates}/common-paper-ai-addendum/README.md +0 -0
  265. /package/{templates → content/templates}/common-paper-ai-addendum/template.docx +0 -0
  266. /package/{templates → content/templates}/common-paper-ai-addendum-in-app/README.md +0 -0
  267. /package/{templates → content/templates}/common-paper-ai-addendum-in-app/template.docx +0 -0
  268. /package/{templates → content/templates}/common-paper-amendment/README.md +0 -0
  269. /package/{templates → content/templates}/common-paper-amendment/template.docx +0 -0
  270. /package/{templates → content/templates}/common-paper-business-associate-agreement/README.md +0 -0
  271. /package/{templates → content/templates}/common-paper-business-associate-agreement/replacements.json +0 -0
  272. /package/{templates → content/templates}/common-paper-business-associate-agreement/template.docx +0 -0
  273. /package/{templates → content/templates}/common-paper-cloud-service-agreement/README.md +0 -0
  274. /package/{templates → content/templates}/common-paper-csa-click-through/README.md +0 -0
  275. /package/{templates → content/templates}/common-paper-csa-click-through/template.docx +0 -0
  276. /package/{templates → content/templates}/common-paper-csa-with-ai/README.md +0 -0
  277. /package/{templates → content/templates}/common-paper-csa-with-ai/replacements.json +0 -0
  278. /package/{templates → content/templates}/common-paper-csa-with-ai/template.docx +0 -0
  279. /package/{templates → content/templates}/common-paper-csa-with-sla/README.md +0 -0
  280. /package/{templates → content/templates}/common-paper-csa-with-sla/replacements.json +0 -0
  281. /package/{templates → content/templates}/common-paper-csa-with-sla/template.docx +0 -0
  282. /package/{templates → content/templates}/common-paper-csa-without-sla/README.md +0 -0
  283. /package/{templates → content/templates}/common-paper-csa-without-sla/replacements.json +0 -0
  284. /package/{templates → content/templates}/common-paper-csa-without-sla/template.docx +0 -0
  285. /package/{templates → content/templates}/common-paper-data-processing-agreement/README.md +0 -0
  286. /package/{templates → content/templates}/common-paper-data-processing-agreement/replacements.json +0 -0
  287. /package/{templates → content/templates}/common-paper-data-processing-agreement/template.docx +0 -0
  288. /package/{templates → content/templates}/common-paper-design-partner-agreement/README.md +0 -0
  289. /package/{templates → content/templates}/common-paper-design-partner-agreement/replacements.json +0 -0
  290. /package/{templates → content/templates}/common-paper-design-partner-agreement/template.docx +0 -0
  291. /package/{templates → content/templates}/common-paper-independent-contractor-agreement/README.md +0 -0
  292. /package/{templates → content/templates}/common-paper-independent-contractor-agreement/template.docx +0 -0
  293. /package/{templates → content/templates}/common-paper-letter-of-intent/README.md +0 -0
  294. /package/{templates → content/templates}/common-paper-letter-of-intent/template.docx +0 -0
  295. /package/{templates → content/templates}/common-paper-mutual-nda/README.md +0 -0
  296. /package/{templates → content/templates}/common-paper-mutual-nda/selections.json +0 -0
  297. /package/{templates → content/templates}/common-paper-mutual-nda/template.docx +0 -0
  298. /package/{templates → content/templates}/common-paper-one-way-nda/README.md +0 -0
  299. /package/{templates → content/templates}/common-paper-one-way-nda/template.docx +0 -0
  300. /package/{templates → content/templates}/common-paper-order-form/README.md +0 -0
  301. /package/{templates → content/templates}/common-paper-order-form/replacements.json +0 -0
  302. /package/{templates → content/templates}/common-paper-order-form/template.docx +0 -0
  303. /package/{templates → content/templates}/common-paper-order-form-with-sla/README.md +0 -0
  304. /package/{templates → content/templates}/common-paper-order-form-with-sla/replacements.json +0 -0
  305. /package/{templates → content/templates}/common-paper-order-form-with-sla/template.docx +0 -0
  306. /package/{templates → content/templates}/common-paper-partnership-agreement/README.md +0 -0
  307. /package/{templates → content/templates}/common-paper-partnership-agreement/replacements.json +0 -0
  308. /package/{templates → content/templates}/common-paper-partnership-agreement/template.docx +0 -0
  309. /package/{templates → content/templates}/common-paper-pilot-agreement/README.md +0 -0
  310. /package/{templates → content/templates}/common-paper-pilot-agreement/replacements.json +0 -0
  311. /package/{templates → content/templates}/common-paper-pilot-agreement/selections.json +0 -0
  312. /package/{templates → content/templates}/common-paper-pilot-agreement/template.docx +0 -0
  313. /package/{templates → content/templates}/common-paper-professional-services-agreement/README.md +0 -0
  314. /package/{templates → content/templates}/common-paper-professional-services-agreement/replacements.json +0 -0
  315. /package/{templates → content/templates}/common-paper-professional-services-agreement/template.docx +0 -0
  316. /package/{templates → content/templates}/common-paper-software-license-agreement/README.md +0 -0
  317. /package/{templates → content/templates}/common-paper-software-license-agreement/template.docx +0 -0
  318. /package/{templates → content/templates}/common-paper-statement-of-work/README.md +0 -0
  319. /package/{templates → content/templates}/common-paper-statement-of-work/replacements.json +0 -0
  320. /package/{templates → content/templates}/common-paper-statement-of-work/template.docx +0 -0
  321. /package/{templates → content/templates}/common-paper-term-sheet/README.md +0 -0
  322. /package/{templates → content/templates}/common-paper-term-sheet/template.docx +0 -0
package/dist/cli/index.js CHANGED
@@ -1,103 +1,199 @@
1
1
  import { Command } from 'commander';
2
2
  import { readFileSync } from 'node:fs';
3
3
  import { join, dirname } from 'node:path';
4
- import { fileURLToPath } from 'node:url';
4
+ import { fileURLToPath, pathToFileURL } from 'node:url';
5
5
  import { runFill } from '../commands/fill.js';
6
6
  import { runValidate } from '../commands/validate.js';
7
7
  import { runList } from '../commands/list.js';
8
8
  import { runRecipeCommand, runRecipeClean, runRecipePatch } from '../commands/recipe.js';
9
9
  import { runScan } from '../commands/scan.js';
10
+ import { runChecklistCreate, runChecklistPatchValidate, runChecklistPatchApply, } from '../commands/checklist.js';
10
11
  const __filename = fileURLToPath(import.meta.url);
11
12
  const __dirname = dirname(__filename);
12
13
  const pkg = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf-8'));
13
- const program = new Command();
14
- program
15
- .name('open-agreements')
16
- .description('Open-source legal template and recipe filling CLI')
17
- .version(pkg.version);
18
- // --- Fill command ---
19
- const fillCmd = new Command('fill');
20
- fillCmd
21
- .description('Fill a template with provided values and render a DOCX file')
22
- .argument('<template>', 'Template name to fill')
23
- .option('-o, --output <path>', 'Output file path')
24
- .option('-d, --data <json-file>', 'JSON file with field values')
25
- .option('--set <key=value...>', 'Set a field value (repeatable)')
26
- .action(async (template, opts) => {
27
- let values = {};
28
- if (opts.data) {
29
- values = JSON.parse(readFileSync(opts.data, 'utf-8'));
14
+ export function createProgram() {
15
+ const program = new Command();
16
+ program
17
+ .name('open-agreements')
18
+ .description('Open-source legal template and recipe filling CLI')
19
+ .version(pkg.version);
20
+ // --- Fill command ---
21
+ const fillCmd = new Command('fill');
22
+ fillCmd
23
+ .description('Fill a template with provided values and render a DOCX file')
24
+ .argument('<template>', 'Template name to fill')
25
+ .option('-o, --output <path>', 'Output file path')
26
+ .option('-d, --data <json-file>', 'JSON file with field values')
27
+ .option('--set <key=value...>', 'Set a field value (repeatable)')
28
+ .option('--memo [format]', 'Generate memo artifact(s): json, markdown, or both (default: both)')
29
+ .option('--memo-json <path>', 'Output path for memo JSON')
30
+ .option('--memo-md <path>', 'Output path for memo Markdown')
31
+ .option('--memo-jurisdiction <name>', 'Jurisdiction override used for memo warning rules')
32
+ .option('--memo-baseline <template-id>', 'Baseline template id for deterministic variance checks')
33
+ .action(async (template, opts) => {
34
+ let values = {};
35
+ if (opts.data) {
36
+ values = JSON.parse(readFileSync(opts.data, 'utf-8'));
37
+ }
38
+ for (const pair of opts.set ?? []) {
39
+ const eq = pair.indexOf('=');
40
+ if (eq < 1)
41
+ throw new Error(`Invalid --set format: "${pair}" (expected key=value)`);
42
+ values[pair.slice(0, eq)] = pair.slice(eq + 1);
43
+ }
44
+ await runFill({
45
+ template,
46
+ output: opts.output,
47
+ values,
48
+ memo: buildMemoArgs(opts),
49
+ });
50
+ });
51
+ program.addCommand(fillCmd);
52
+ // --- Validate command ---
53
+ program
54
+ .command('validate [template]')
55
+ .description('Run validation pipeline on all templates and recipes')
56
+ .option('--strict', 'Treat warnings (scaffolds, missing files) as errors')
57
+ .action((template, opts) => {
58
+ runValidate({ template, strict: opts.strict });
59
+ });
60
+ // --- List command ---
61
+ program
62
+ .command('list')
63
+ .description('Show all available agreements (templates, external, and recipes)')
64
+ .option('--json', 'Output machine-readable JSON with full field definitions')
65
+ .option('--json-strict', 'Like --json but exit non-zero if any metadata fails')
66
+ .option('--templates-only', 'List only bundled templates (exclude external and recipes)')
67
+ .action((opts) => {
68
+ runList({ json: opts.json, jsonStrict: opts.jsonStrict, templatesOnly: opts.templatesOnly });
69
+ });
70
+ // --- Recipe command ---
71
+ const recipeCmd = new Command('recipe');
72
+ recipeCmd.description('Work with recipe-based document pipelines');
73
+ recipeCmd
74
+ .command('run <recipe-id>')
75
+ .description('Run the full recipe pipeline (clean → patch → fill → verify)')
76
+ .option('-i, --input <path>', 'Source DOCX file (auto-downloads if omitted)')
77
+ .option('-o, --output <path>', 'Output file path')
78
+ .option('-d, --data <json-file>', 'JSON file with field values')
79
+ .option('--keep-intermediate', 'Preserve intermediate files')
80
+ .option('--computed-out <path>', 'Write computed interaction artifact JSON')
81
+ .option('--no-normalize-brackets', 'Disable post-fill bracket artifact normalization')
82
+ .action(async (recipeId, opts) => {
83
+ await runRecipeCommand({
84
+ recipeId,
85
+ input: opts.input,
86
+ output: opts.output,
87
+ data: opts.data,
88
+ keepIntermediate: opts.keepIntermediate,
89
+ computedOut: opts.computedOut,
90
+ normalizeBrackets: opts.normalizeBrackets,
91
+ });
92
+ });
93
+ recipeCmd
94
+ .command('clean <input>')
95
+ .description('Run only the clean stage of a recipe')
96
+ .requiredOption('-o, --output <path>', 'Output file path')
97
+ .requiredOption('--recipe <id>', 'Recipe ID to use for clean config')
98
+ .option('--extract-guidance <path>', 'Extract removed content as guidance JSON to the specified path')
99
+ .action(async (input, opts) => {
100
+ await runRecipeClean({ input, output: opts.output, recipe: opts.recipe, extractGuidance: opts.extractGuidance });
101
+ });
102
+ recipeCmd
103
+ .command('patch <input>')
104
+ .description('Run only the patch stage of a recipe')
105
+ .requiredOption('-o, --output <path>', 'Output file path')
106
+ .requiredOption('--recipe <id>', 'Recipe ID to use for replacements')
107
+ .action(async (input, opts) => {
108
+ await runRecipePatch({ input, output: opts.output, recipe: opts.recipe });
109
+ });
110
+ program.addCommand(recipeCmd);
111
+ // --- Scan command ---
112
+ program
113
+ .command('scan <input>')
114
+ .description('Scan a DOCX file for bracketed placeholders')
115
+ .option('--output-replacements <path>', 'Write a draft replacements.json')
116
+ .action((input, opts) => {
117
+ runScan({ input, outputReplacements: opts.outputReplacements });
118
+ });
119
+ // --- Checklist command ---
120
+ const checklistCmd = new Command('checklist');
121
+ checklistCmd.description('Work with closing checklists');
122
+ checklistCmd
123
+ .command('create')
124
+ .description('Create a closing checklist DOCX from JSON data')
125
+ .requiredOption('-d, --data <json-file>', 'JSON file with checklist data')
126
+ .option('-o, --output <path>', 'Output file path (default: closing-checklist.docx)')
127
+ .action(async (opts) => {
128
+ await runChecklistCreate({ data: opts.data, output: opts.output });
129
+ });
130
+ checklistCmd
131
+ .command('patch-validate')
132
+ .description('Validate a checklist patch against checklist state (dry run, no mutation)')
133
+ .requiredOption('--state <json-file>', 'Checklist state JSON ({ checklist_id, revision, checklist })')
134
+ .requiredOption('--patch <json-file>', 'Patch envelope JSON file')
135
+ .option('-o, --output <json-file>', 'Output JSON path for validation result')
136
+ .option('--validation-store <json-file>', 'Persist validation artifacts to this JSON file')
137
+ .action(async (opts) => {
138
+ await runChecklistPatchValidate({
139
+ state: opts.state,
140
+ patch: opts.patch,
141
+ output: opts.output,
142
+ validationStore: opts.validationStore,
143
+ });
144
+ });
145
+ checklistCmd
146
+ .command('patch-apply')
147
+ .description('Apply a previously validated checklist patch to checklist state')
148
+ .requiredOption('--state <json-file>', 'Checklist state JSON ({ checklist_id, revision, checklist })')
149
+ .requiredOption('--request <json-file>', 'Patch apply request JSON ({ validation_id, patch })')
150
+ .option('-o, --output <json-file>', 'Output JSON path for apply result')
151
+ .option('--validation-store <json-file>', 'Validation artifact JSON store (must match validate step)')
152
+ .option('--applied-store <json-file>', 'Applied patch JSON store (for idempotency + patch_id conflicts)')
153
+ .option('--proposed-store <json-file>', 'Proposed patch JSON store (for mode=PROPOSED)')
154
+ .action(async (opts) => {
155
+ await runChecklistPatchApply({
156
+ state: opts.state,
157
+ request: opts.request,
158
+ output: opts.output,
159
+ validationStore: opts.validationStore,
160
+ appliedStore: opts.appliedStore,
161
+ proposedStore: opts.proposedStore,
162
+ });
163
+ });
164
+ program.addCommand(checklistCmd);
165
+ return program;
166
+ }
167
+ function buildMemoArgs(opts) {
168
+ const hasMemoRelatedFlag = Boolean(opts.memo !== undefined
169
+ || opts.memoJson
170
+ || opts.memoMd
171
+ || opts.memoJurisdiction
172
+ || opts.memoBaseline);
173
+ if (!hasMemoRelatedFlag) {
174
+ return undefined;
30
175
  }
31
- for (const pair of opts.set ?? []) {
32
- const eq = pair.indexOf('=');
33
- if (eq < 1)
34
- throw new Error(`Invalid --set format: "${pair}" (expected key=value)`);
35
- values[pair.slice(0, eq)] = pair.slice(eq + 1);
176
+ let format = 'both';
177
+ if (typeof opts.memo === 'string') {
178
+ if (opts.memo !== 'json' && opts.memo !== 'markdown' && opts.memo !== 'both') {
179
+ throw new Error(`Invalid --memo format: "${opts.memo}" (expected json, markdown, or both)`);
180
+ }
181
+ format = opts.memo;
36
182
  }
37
- await runFill({ template, output: opts.output, values });
38
- });
39
- program.addCommand(fillCmd);
40
- // --- Validate command ---
41
- program
42
- .command('validate [template]')
43
- .description('Run validation pipeline on all templates and recipes')
44
- .option('--strict', 'Treat warnings (scaffolds, missing files) as errors')
45
- .action((template, opts) => {
46
- runValidate({ template, strict: opts.strict });
47
- });
48
- // --- List command ---
49
- program
50
- .command('list')
51
- .description('Show all available agreements (templates, external, and recipes)')
52
- .option('--json', 'Output machine-readable JSON with full field definitions')
53
- .option('--json-strict', 'Like --json but exit non-zero if any metadata fails')
54
- .action((opts) => {
55
- runList({ json: opts.json, jsonStrict: opts.jsonStrict });
56
- });
57
- // --- Recipe command ---
58
- const recipeCmd = new Command('recipe');
59
- recipeCmd.description('Work with recipe-based document pipelines');
60
- recipeCmd
61
- .command('run <recipe-id>')
62
- .description('Run the full recipe pipeline (clean → patch → fill → verify)')
63
- .option('-i, --input <path>', 'Source DOCX file (auto-downloads if omitted)')
64
- .option('-o, --output <path>', 'Output file path')
65
- .option('-d, --data <json-file>', 'JSON file with field values')
66
- .option('--keep-intermediate', 'Preserve intermediate files')
67
- .action(async (recipeId, opts) => {
68
- await runRecipeCommand({
69
- recipeId,
70
- input: opts.input,
71
- output: opts.output,
72
- data: opts.data,
73
- keepIntermediate: opts.keepIntermediate,
74
- });
75
- });
76
- recipeCmd
77
- .command('clean <input>')
78
- .description('Run only the clean stage of a recipe')
79
- .requiredOption('-o, --output <path>', 'Output file path')
80
- .requiredOption('--recipe <id>', 'Recipe ID to use for clean config')
81
- .option('--extract-guidance <path>', 'Extract removed content as guidance JSON to the specified path')
82
- .action(async (input, opts) => {
83
- await runRecipeClean({ input, output: opts.output, recipe: opts.recipe, extractGuidance: opts.extractGuidance });
84
- });
85
- recipeCmd
86
- .command('patch <input>')
87
- .description('Run only the patch stage of a recipe')
88
- .requiredOption('-o, --output <path>', 'Output file path')
89
- .requiredOption('--recipe <id>', 'Recipe ID to use for replacements')
90
- .action(async (input, opts) => {
91
- await runRecipePatch({ input, output: opts.output, recipe: opts.recipe });
92
- });
93
- program.addCommand(recipeCmd);
94
- // --- Scan command ---
95
- program
96
- .command('scan <input>')
97
- .description('Scan a DOCX file for bracketed placeholders')
98
- .option('--output-replacements <path>', 'Write a draft replacements.json')
99
- .action((input, opts) => {
100
- runScan({ input, outputReplacements: opts.outputReplacements });
101
- });
102
- program.parse();
183
+ return {
184
+ enabled: true,
185
+ format,
186
+ jsonOutputPath: opts.memoJson,
187
+ markdownOutputPath: opts.memoMd,
188
+ jurisdiction: opts.memoJurisdiction,
189
+ baselineTemplateId: opts.memoBaseline,
190
+ };
191
+ }
192
+ export async function runCli(argv = process.argv) {
193
+ const program = createProgram();
194
+ await program.parseAsync(argv);
195
+ }
196
+ if (process.argv[1] && pathToFileURL(process.argv[1]).href === import.meta.url) {
197
+ await runCli(process.argv);
198
+ }
103
199
  //# sourceMappingURL=index.js.map
@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,IAAI,KAAK,MAAM,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,CAAC,IAAI,sCAAsC,CAAC,CAAC;QAC9F,CAAC;QACD,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM;QACN,cAAc,EAAE,IAAI,CAAC,QAAQ;QAC7B,kBAAkB,EAAE,IAAI,CAAC,MAAM;QAC/B,YAAY,EAAE,IAAI,CAAC,gBAAgB;QACnC,kBAAkB,EAAE,IAAI,CAAC,YAAY;KACtC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI;IAC9C,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IAC/E,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,22 @@
1
+ export interface ChecklistCreateArgs {
2
+ data: string;
3
+ output?: string;
4
+ }
5
+ export interface ChecklistPatchValidateArgs {
6
+ state: string;
7
+ patch: string;
8
+ output?: string;
9
+ validationStore?: string;
10
+ }
11
+ export interface ChecklistPatchApplyArgs {
12
+ state: string;
13
+ request: string;
14
+ output?: string;
15
+ validationStore?: string;
16
+ appliedStore?: string;
17
+ proposedStore?: string;
18
+ }
19
+ export declare function runChecklistCreate(args: ChecklistCreateArgs): Promise<void>;
20
+ export declare function runChecklistPatchValidate(args: ChecklistPatchValidateArgs): Promise<void>;
21
+ export declare function runChecklistPatchApply(args: ChecklistPatchApplyArgs): Promise<void>;
22
+ //# sourceMappingURL=checklist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../src/commands/checklist.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA4GD,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0CjF;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B/F;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyDzF"}
@@ -0,0 +1,222 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { mkdir, writeFile } from 'node:fs/promises';
3
+ import { dirname } from 'node:path';
4
+ import { resolve } from 'node:path';
5
+ import { z } from 'zod';
6
+ import { ChecklistPatchApplyRequestSchema, ChecklistPatchEnvelopeSchema, ClosingChecklistSchema, applyChecklistPatch, buildChecklistTemplateContext, validateChecklistPatch, } from '../core/checklist/index.js';
7
+ import { fillTemplate } from '../core/engine.js';
8
+ import { findTemplateDir } from '../utils/paths.js';
9
+ const ChecklistStateSchema = z.object({
10
+ checklist_id: z.string().min(1),
11
+ revision: z.number().int().nonnegative(),
12
+ checklist: ClosingChecklistSchema,
13
+ });
14
+ async function writeJsonFile(path, value) {
15
+ await mkdir(dirname(path), { recursive: true });
16
+ await writeFile(path, `${JSON.stringify(value, null, 2)}\n`, 'utf-8');
17
+ }
18
+ function loadJsonFile(path) {
19
+ return JSON.parse(readFileSync(path, 'utf-8'));
20
+ }
21
+ class JsonFileValidationStore {
22
+ filePath;
23
+ constructor(filePath) {
24
+ this.filePath = filePath;
25
+ }
26
+ load() {
27
+ if (!existsSync(this.filePath))
28
+ return {};
29
+ const raw = loadJsonFile(this.filePath);
30
+ return typeof raw === 'object' && raw !== null ? raw : {};
31
+ }
32
+ async save(data) {
33
+ await writeJsonFile(this.filePath, data);
34
+ }
35
+ async set(artifact) {
36
+ const data = this.load();
37
+ data[artifact.validation_id] = artifact;
38
+ await this.save(data);
39
+ }
40
+ async get(validationId) {
41
+ const data = this.load();
42
+ return data[validationId] ?? null;
43
+ }
44
+ async delete(validationId) {
45
+ const data = this.load();
46
+ delete data[validationId];
47
+ await this.save(data);
48
+ }
49
+ }
50
+ class JsonFileAppliedPatchStore {
51
+ filePath;
52
+ constructor(filePath) {
53
+ this.filePath = filePath;
54
+ }
55
+ key(checklistId, patchId) {
56
+ return `${checklistId}:${patchId}`;
57
+ }
58
+ load() {
59
+ if (!existsSync(this.filePath))
60
+ return {};
61
+ const raw = loadJsonFile(this.filePath);
62
+ return typeof raw === 'object' && raw !== null ? raw : {};
63
+ }
64
+ async save(data) {
65
+ await writeJsonFile(this.filePath, data);
66
+ }
67
+ async get(checklistId, patchId) {
68
+ const data = this.load();
69
+ return data[this.key(checklistId, patchId)] ?? null;
70
+ }
71
+ async set(record) {
72
+ const data = this.load();
73
+ data[this.key(record.checklist_id, record.patch_id)] = record;
74
+ await this.save(data);
75
+ }
76
+ }
77
+ class JsonFileProposedPatchStore {
78
+ filePath;
79
+ constructor(filePath) {
80
+ this.filePath = filePath;
81
+ }
82
+ key(checklistId, patchId) {
83
+ return `${checklistId}:${patchId}`;
84
+ }
85
+ load() {
86
+ if (!existsSync(this.filePath))
87
+ return {};
88
+ const raw = loadJsonFile(this.filePath);
89
+ return typeof raw === 'object' && raw !== null ? raw : {};
90
+ }
91
+ async save(data) {
92
+ await writeJsonFile(this.filePath, data);
93
+ }
94
+ async get(checklistId, patchId) {
95
+ const data = this.load();
96
+ return data[this.key(checklistId, patchId)] ?? null;
97
+ }
98
+ async set(record) {
99
+ const data = this.load();
100
+ data[this.key(record.checklist_id, record.patch_id)] = record;
101
+ await this.save(data);
102
+ }
103
+ }
104
+ export async function runChecklistCreate(args) {
105
+ const raw = JSON.parse(readFileSync(args.data, 'utf-8'));
106
+ const outputPath = resolve(args.output ?? 'closing-checklist.docx');
107
+ // Pre-validate with the Zod schema for good error messages
108
+ const parseResult = ClosingChecklistSchema.safeParse(raw);
109
+ if (!parseResult.success) {
110
+ const issues = parseResult.error.issues.map((i) => ` ${i.path.join('.')}: ${i.message}`);
111
+ console.error(`Validation errors:\n${issues.join('\n')}`);
112
+ process.exit(1);
113
+ }
114
+ const c = parseResult.data;
115
+ try {
116
+ const templateDir = findTemplateDir('closing-checklist');
117
+ if (!templateDir) {
118
+ console.error('Error: closing-checklist template not found');
119
+ process.exit(1);
120
+ }
121
+ await fillTemplate({
122
+ templateDir,
123
+ values: buildChecklistTemplateContext(c),
124
+ outputPath,
125
+ });
126
+ const countItems = (collection) => Array.isArray(collection) ? collection.length : Object.keys(collection).length;
127
+ console.log(`Created closing checklist for "${c.deal_name}"`);
128
+ console.log(`Output: ${outputPath}`);
129
+ console.log(`Documents: ${countItems(c.documents)}`);
130
+ console.log(`Checklist entries: ${countItems(c.checklist_entries)}`);
131
+ console.log(`Action items: ${countItems(c.action_items)}`);
132
+ console.log(`Issues: ${countItems(c.issues)}`);
133
+ }
134
+ catch (err) {
135
+ console.error(`Error: ${err.message}`);
136
+ process.exit(1);
137
+ }
138
+ }
139
+ export async function runChecklistPatchValidate(args) {
140
+ const state = ChecklistStateSchema.parse(loadJsonFile(args.state));
141
+ const patchRaw = loadJsonFile(args.patch);
142
+ const patchParsed = ChecklistPatchEnvelopeSchema.safeParse(patchRaw);
143
+ if (!patchParsed.success) {
144
+ const issues = patchParsed.error.issues.map((i) => ` ${i.path.join('.')}: ${i.message}`);
145
+ console.error(`Patch validation errors:\n${issues.join('\n')}`);
146
+ process.exit(1);
147
+ }
148
+ const store = args.validationStore ? new JsonFileValidationStore(resolve(args.validationStore)) : undefined;
149
+ const result = await validateChecklistPatch({
150
+ checklist_id: state.checklist_id,
151
+ checklist: state.checklist,
152
+ current_revision: state.revision,
153
+ patch: patchParsed.data,
154
+ store,
155
+ });
156
+ if (args.output) {
157
+ const out = resolve(args.output);
158
+ await writeJsonFile(out, result);
159
+ console.log(`Patch validation result written to: ${out}`);
160
+ }
161
+ else {
162
+ console.log(JSON.stringify(result, null, 2));
163
+ }
164
+ if (!result.ok) {
165
+ process.exit(1);
166
+ }
167
+ }
168
+ export async function runChecklistPatchApply(args) {
169
+ const statePath = resolve(args.state);
170
+ const state = ChecklistStateSchema.parse(loadJsonFile(statePath));
171
+ const requestRaw = loadJsonFile(args.request);
172
+ const requestParsed = ChecklistPatchApplyRequestSchema.safeParse(requestRaw);
173
+ if (!requestParsed.success) {
174
+ const issues = requestParsed.error.issues.map((i) => ` ${i.path.join('.')}: ${i.message}`);
175
+ console.error(`Patch apply request errors:\n${issues.join('\n')}`);
176
+ process.exit(1);
177
+ }
178
+ const validationStore = args.validationStore
179
+ ? new JsonFileValidationStore(resolve(args.validationStore))
180
+ : undefined;
181
+ const appliedPatchStore = args.appliedStore
182
+ ? new JsonFileAppliedPatchStore(resolve(args.appliedStore))
183
+ : undefined;
184
+ const proposedPatchStore = args.proposedStore
185
+ ? new JsonFileProposedPatchStore(resolve(args.proposedStore))
186
+ : undefined;
187
+ const result = await applyChecklistPatch({
188
+ checklist_id: state.checklist_id,
189
+ checklist: state.checklist,
190
+ current_revision: state.revision,
191
+ request: requestParsed.data,
192
+ validation_store: validationStore,
193
+ applied_patch_store: appliedPatchStore,
194
+ proposed_patch_store: proposedPatchStore,
195
+ });
196
+ if (!result.ok) {
197
+ console.error(JSON.stringify(result, null, 2));
198
+ process.exit(1);
199
+ }
200
+ const shouldUpdateState = result.applied && !result.idempotent_replay;
201
+ if (shouldUpdateState) {
202
+ const nextState = {
203
+ checklist_id: state.checklist_id,
204
+ revision: result.new_revision,
205
+ checklist: result.checklist,
206
+ };
207
+ await writeJsonFile(statePath, nextState);
208
+ console.log(`Checklist state updated: ${statePath}`);
209
+ }
210
+ else {
211
+ console.log('Checklist state unchanged.');
212
+ }
213
+ if (args.output) {
214
+ const out = resolve(args.output);
215
+ await writeJsonFile(out, result);
216
+ console.log(`Patch apply result written to: ${out}`);
217
+ }
218
+ else {
219
+ console.log(JSON.stringify(result, null, 2));
220
+ }
221
+ }
222
+ //# sourceMappingURL=checklist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist.js","sourceRoot":"","sources":["../../src/commands/checklist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gCAAgC,EAChC,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAO7B,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAuBpD,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,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,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
@@ -1,7 +1,18 @@
1
+ import { type MemoFormat } from '../core/employment/memo.js';
2
+ interface FillMemoArgs {
3
+ enabled: boolean;
4
+ format: MemoFormat;
5
+ jsonOutputPath?: string;
6
+ markdownOutputPath?: string;
7
+ jurisdiction?: string;
8
+ baselineTemplateId?: string;
9
+ }
1
10
  export interface FillArgs {
2
11
  template: string;
3
12
  output?: string;
4
13
  values: Record<string, string>;
14
+ memo?: FillMemoArgs;
5
15
  }
6
16
  export declare function runFill(args: FillArgs): Promise<void>;
17
+ export {};
7
18
  //# sourceMappingURL=fill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../src/commands/fill.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD3D"}
1
+ {"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../src/commands/fill.ts"],"names":[],"mappings":"AAcA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,4BAA4B,CAAC;AAEpC,UAAU,YAAY;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAkBD,wBAAsB,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA0F3D"}