perttool 0.9.3 → 0.10.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 (233) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/README.md +63 -31
  3. package/dist/application/cli-facade.d.ts +33 -8
  4. package/dist/application/cli-facade.d.ts.map +1 -1
  5. package/dist/application/cli-facade.js +1 -2
  6. package/dist/application/cli-facade.js.map +1 -1
  7. package/dist/application/contract9-assurance-mutation.d.ts +35 -0
  8. package/dist/application/contract9-assurance-mutation.d.ts.map +1 -0
  9. package/dist/application/contract9-assurance-mutation.js +146 -0
  10. package/dist/application/contract9-assurance-mutation.js.map +1 -0
  11. package/dist/application/contract9-assurance.d.ts +23 -0
  12. package/dist/application/contract9-assurance.d.ts.map +1 -0
  13. package/dist/application/contract9-assurance.js +114 -0
  14. package/dist/application/contract9-assurance.js.map +1 -0
  15. package/dist/application/contract9-candidate.d.ts +33 -0
  16. package/dist/application/contract9-candidate.d.ts.map +1 -0
  17. package/dist/application/contract9-candidate.js +39 -0
  18. package/dist/application/contract9-candidate.js.map +1 -0
  19. package/dist/application/contract9-format-migration.d.ts +22 -0
  20. package/dist/application/contract9-format-migration.d.ts.map +1 -0
  21. package/dist/application/contract9-format-migration.js +52 -0
  22. package/dist/application/contract9-format-migration.js.map +1 -0
  23. package/dist/application/contract9-mixed-mutation.d.ts +14 -0
  24. package/dist/application/contract9-mixed-mutation.d.ts.map +1 -0
  25. package/dist/application/contract9-mixed-mutation.js +88 -0
  26. package/dist/application/contract9-mixed-mutation.js.map +1 -0
  27. package/dist/application/contract9-project.d.ts +15 -0
  28. package/dist/application/contract9-project.d.ts.map +1 -0
  29. package/dist/application/contract9-project.js +24 -0
  30. package/dist/application/contract9-project.js.map +1 -0
  31. package/dist/application/contract9-projection.d.ts +23 -0
  32. package/dist/application/contract9-projection.d.ts.map +1 -0
  33. package/dist/application/contract9-projection.js +89 -0
  34. package/dist/application/contract9-projection.js.map +1 -0
  35. package/dist/application/contract9-runtime.d.ts +43 -0
  36. package/dist/application/contract9-runtime.d.ts.map +1 -0
  37. package/dist/application/contract9-runtime.js +36 -0
  38. package/dist/application/contract9-runtime.js.map +1 -0
  39. package/dist/application/contract9-temporal-context.d.ts +15 -0
  40. package/dist/application/contract9-temporal-context.d.ts.map +1 -0
  41. package/dist/application/contract9-temporal-context.js +127 -0
  42. package/dist/application/contract9-temporal-context.js.map +1 -0
  43. package/dist/application/contract9-temporal-mutation.d.ts +20 -0
  44. package/dist/application/contract9-temporal-mutation.d.ts.map +1 -0
  45. package/dist/application/contract9-temporal-mutation.js +78 -0
  46. package/dist/application/contract9-temporal-mutation.js.map +1 -0
  47. package/dist/application/contract9-temporal.d.ts +17 -0
  48. package/dist/application/contract9-temporal.d.ts.map +1 -0
  49. package/dist/application/contract9-temporal.js +65 -0
  50. package/dist/application/contract9-temporal.js.map +1 -0
  51. package/dist/application/contract9-write.d.ts +28 -0
  52. package/dist/application/contract9-write.d.ts.map +1 -0
  53. package/dist/application/contract9-write.js +25 -0
  54. package/dist/application/contract9-write.js.map +1 -0
  55. package/dist/application/editor-milestone-acceptance.d.ts +4 -0
  56. package/dist/application/editor-milestone-acceptance.d.ts.map +1 -1
  57. package/dist/application/editor-milestone-acceptance.js +90 -0
  58. package/dist/application/editor-milestone-acceptance.js.map +1 -1
  59. package/dist/application/editor-repair.d.ts +12 -0
  60. package/dist/application/editor-repair.d.ts.map +1 -0
  61. package/dist/application/editor-repair.js +74 -0
  62. package/dist/application/editor-repair.js.map +1 -0
  63. package/dist/application/target-postdue-analysis.d.ts +18 -0
  64. package/dist/application/target-postdue-analysis.d.ts.map +1 -0
  65. package/dist/application/target-postdue-analysis.js +26 -0
  66. package/dist/application/target-postdue-analysis.js.map +1 -0
  67. package/dist/application/target-postdue-check.d.ts +10 -0
  68. package/dist/application/target-postdue-check.d.ts.map +1 -0
  69. package/dist/application/target-postdue-check.js +18 -0
  70. package/dist/application/target-postdue-check.js.map +1 -0
  71. package/dist/application/target-postdue-next.d.ts +10 -0
  72. package/dist/application/target-postdue-next.d.ts.map +1 -0
  73. package/dist/application/target-postdue-next.js +13 -0
  74. package/dist/application/target-postdue-next.js.map +1 -0
  75. package/dist/application/target-postdue-projection.d.ts +11 -0
  76. package/dist/application/target-postdue-projection.d.ts.map +1 -0
  77. package/dist/application/target-postdue-projection.js +17 -0
  78. package/dist/application/target-postdue-projection.js.map +1 -0
  79. package/dist/assurance/canonical.d.ts +3 -3
  80. package/dist/assurance/canonical.d.ts.map +1 -1
  81. package/dist/assurance/canonical.js +19 -6
  82. package/dist/assurance/canonical.js.map +1 -1
  83. package/dist/assurance/evaluate.d.ts.map +1 -1
  84. package/dist/assurance/evaluate.js +10 -2
  85. package/dist/assurance/evaluate.js.map +1 -1
  86. package/dist/assurance/types.d.ts +11 -1
  87. package/dist/assurance/types.d.ts.map +1 -1
  88. package/dist/cli.js +215 -92
  89. package/dist/cli.js.map +1 -1
  90. package/dist/command/contract9-discovery.d.ts +17 -0
  91. package/dist/command/contract9-discovery.d.ts.map +1 -0
  92. package/dist/command/contract9-discovery.js +126 -0
  93. package/dist/command/contract9-discovery.js.map +1 -0
  94. package/dist/command/contract9-usage.d.ts +24 -0
  95. package/dist/command/contract9-usage.d.ts.map +1 -0
  96. package/dist/command/contract9-usage.js +23 -0
  97. package/dist/command/contract9-usage.js.map +1 -0
  98. package/dist/core/index.d.ts +4 -3
  99. package/dist/core/index.d.ts.map +1 -1
  100. package/dist/core/index.js +1 -1
  101. package/dist/editor/repair.d.ts +95 -0
  102. package/dist/editor/repair.d.ts.map +1 -0
  103. package/dist/editor/repair.js +232 -0
  104. package/dist/editor/repair.js.map +1 -0
  105. package/dist/editor/semantic-fingerprint.d.ts +8 -0
  106. package/dist/editor/semantic-fingerprint.d.ts.map +1 -0
  107. package/dist/editor/semantic-fingerprint.js +177 -0
  108. package/dist/editor/semantic-fingerprint.js.map +1 -0
  109. package/dist/help/assurance-guide.js +7 -7
  110. package/dist/help/assurance-guide.js.map +1 -1
  111. package/dist/help/contract9-guide.d.ts +10 -0
  112. package/dist/help/contract9-guide.d.ts.map +1 -0
  113. package/dist/help/contract9-guide.js +32 -0
  114. package/dist/help/contract9-guide.js.map +1 -0
  115. package/dist/help/guide.d.ts +1 -1
  116. package/dist/help/guide.d.ts.map +1 -1
  117. package/dist/index.d.ts +10 -8
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +4 -4
  120. package/dist/index.js.map +1 -1
  121. package/dist/milestone-acceptance/advance.js +1 -1
  122. package/dist/milestone-acceptance/advance.js.map +1 -1
  123. package/dist/mutation/advance.d.ts.map +1 -1
  124. package/dist/mutation/advance.js.map +1 -1
  125. package/dist/perttool-vscode-private-0.0.0-d1578b9.vsix +0 -0
  126. package/dist/recommendation/override-types.d.ts +2 -2
  127. package/dist/recommendation/override.js +2 -2
  128. package/dist/schema/registry.d.ts +1 -1
  129. package/dist/schema/registry.js +8 -8
  130. package/dist/session/document-session.d.ts +23 -0
  131. package/dist/session/document-session.d.ts.map +1 -1
  132. package/dist/session/document-session.js +104 -2
  133. package/dist/session/document-session.js.map +1 -1
  134. package/dist/temporal-schedule/alert-types.d.ts +109 -0
  135. package/dist/temporal-schedule/alert-types.d.ts.map +1 -0
  136. package/dist/temporal-schedule/alert-types.js +2 -0
  137. package/dist/temporal-schedule/alert-types.js.map +1 -0
  138. package/dist/temporal-schedule/alert.d.ts +4 -0
  139. package/dist/temporal-schedule/alert.d.ts.map +1 -0
  140. package/dist/temporal-schedule/alert.js +214 -0
  141. package/dist/temporal-schedule/alert.js.map +1 -0
  142. package/dist/temporal-schedule/calendar-mutation.d.ts +11 -0
  143. package/dist/temporal-schedule/calendar-mutation.d.ts.map +1 -0
  144. package/dist/temporal-schedule/calendar-mutation.js +59 -0
  145. package/dist/temporal-schedule/calendar-mutation.js.map +1 -0
  146. package/dist/temporal-schedule/calendar.d.ts +16 -0
  147. package/dist/temporal-schedule/calendar.d.ts.map +1 -0
  148. package/dist/temporal-schedule/calendar.js +179 -0
  149. package/dist/temporal-schedule/calendar.js.map +1 -0
  150. package/dist/temporal-schedule/constraint-types.d.ts +47 -0
  151. package/dist/temporal-schedule/constraint-types.d.ts.map +1 -0
  152. package/dist/temporal-schedule/constraint-types.js +2 -0
  153. package/dist/temporal-schedule/constraint-types.js.map +1 -0
  154. package/dist/temporal-schedule/constraint.d.ts +7 -0
  155. package/dist/temporal-schedule/constraint.d.ts.map +1 -0
  156. package/dist/temporal-schedule/constraint.js +224 -0
  157. package/dist/temporal-schedule/constraint.js.map +1 -0
  158. package/dist/temporal-schedule/entity-mutation.d.ts +31 -0
  159. package/dist/temporal-schedule/entity-mutation.d.ts.map +1 -0
  160. package/dist/temporal-schedule/entity-mutation.js +107 -0
  161. package/dist/temporal-schedule/entity-mutation.js.map +1 -0
  162. package/dist/temporal-schedule/format.d.ts +9 -0
  163. package/dist/temporal-schedule/format.d.ts.map +1 -0
  164. package/dist/temporal-schedule/format.js +183 -0
  165. package/dist/temporal-schedule/format.js.map +1 -0
  166. package/dist/temporal-schedule/required-types.d.ts +68 -0
  167. package/dist/temporal-schedule/required-types.d.ts.map +1 -0
  168. package/dist/temporal-schedule/required-types.js +2 -0
  169. package/dist/temporal-schedule/required-types.js.map +1 -0
  170. package/dist/temporal-schedule/required.d.ts +5 -0
  171. package/dist/temporal-schedule/required.d.ts.map +1 -0
  172. package/dist/temporal-schedule/required.js +183 -0
  173. package/dist/temporal-schedule/required.js.map +1 -0
  174. package/dist/temporal-schedule/schedule-graph.d.ts +8 -0
  175. package/dist/temporal-schedule/schedule-graph.d.ts.map +1 -0
  176. package/dist/temporal-schedule/schedule-graph.js +33 -0
  177. package/dist/temporal-schedule/schedule-graph.js.map +1 -0
  178. package/dist/temporal-schedule/scheduler-types.d.ts +115 -0
  179. package/dist/temporal-schedule/scheduler-types.d.ts.map +1 -0
  180. package/dist/temporal-schedule/scheduler-types.js +2 -0
  181. package/dist/temporal-schedule/scheduler-types.js.map +1 -0
  182. package/dist/temporal-schedule/scheduler.d.ts +12 -0
  183. package/dist/temporal-schedule/scheduler.d.ts.map +1 -0
  184. package/dist/temporal-schedule/scheduler.js +584 -0
  185. package/dist/temporal-schedule/scheduler.js.map +1 -0
  186. package/dist/temporal-schedule/source-lexical.d.ts +30 -0
  187. package/dist/temporal-schedule/source-lexical.d.ts.map +1 -0
  188. package/dist/temporal-schedule/source-lexical.js +166 -0
  189. package/dist/temporal-schedule/source-lexical.js.map +1 -0
  190. package/dist/temporal-schedule/source-types.d.ts +124 -0
  191. package/dist/temporal-schedule/source-types.d.ts.map +1 -0
  192. package/dist/temporal-schedule/source-types.js +2 -0
  193. package/dist/temporal-schedule/source-types.js.map +1 -0
  194. package/dist/temporal-schedule/source-values.d.ts +17 -0
  195. package/dist/temporal-schedule/source-values.d.ts.map +1 -0
  196. package/dist/temporal-schedule/source-values.js +138 -0
  197. package/dist/temporal-schedule/source-values.js.map +1 -0
  198. package/dist/temporal-schedule/source.d.ts +17 -0
  199. package/dist/temporal-schedule/source.d.ts.map +1 -0
  200. package/dist/temporal-schedule/source.js +520 -0
  201. package/dist/temporal-schedule/source.js.map +1 -0
  202. package/dist/temporal-schedule/tzdb-2026c.d.ts +7 -0
  203. package/dist/temporal-schedule/tzdb-2026c.d.ts.map +1 -0
  204. package/dist/temporal-schedule/tzdb-2026c.js +611 -0
  205. package/dist/temporal-schedule/tzdb-2026c.js.map +1 -0
  206. package/dist/version.d.ts +1 -1
  207. package/dist/version.d.ts.map +1 -1
  208. package/dist/version.js +1 -1
  209. package/dist/version.js.map +1 -1
  210. package/package.json +6 -2
  211. package/schemas/Perttool.AdvanceResult.v3.schema.json +1 -1
  212. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +1 -1
  213. package/schemas/{Perttool.AnalysisResult.v6.schema.json → Perttool.AnalysisResult.v7.schema.json} +178 -6
  214. package/schemas/{Perttool.CheckResult.v5.schema.json → Perttool.CheckResult.v6.schema.json} +10 -6
  215. package/schemas/Perttool.CliError.v1.schema.json +1 -1
  216. package/schemas/Perttool.CommandHelpResult.v1.schema.json +2 -2
  217. package/schemas/Perttool.ExportResult.v1.schema.json +1 -1
  218. package/schemas/Perttool.FormatResult.v1.schema.json +1 -1
  219. package/schemas/Perttool.GuideResult.v1.schema.json +1 -1
  220. package/schemas/Perttool.HistoricalGraphResult.v1.schema.json +1 -1
  221. package/schemas/Perttool.ImportResult.v1.schema.json +1 -1
  222. package/schemas/Perttool.InitResult.v1.schema.json +1 -1
  223. package/schemas/Perttool.MilestoneAcceptanceMigrationResult.v1.schema.json +1 -1
  224. package/schemas/Perttool.MilestoneAcceptanceResult.v1.schema.json +1 -1
  225. package/schemas/{Perttool.MutationResult.v5.schema.json → Perttool.MutationResult.v6.schema.json} +4 -4
  226. package/schemas/{Perttool.NextResult.v7.schema.json → Perttool.NextResult.v8.schema.json} +10 -6
  227. package/schemas/Perttool.OverrideDecision.v1.schema.json +1 -1
  228. package/schemas/{Perttool.PlanAssuranceResult.v1.schema.json → Perttool.PlanAssuranceResult.v2.schema.json} +5 -5
  229. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +1 -1
  230. package/schemas/{Perttool.ProjectResult.v4.schema.json → Perttool.ProjectResult.v5.schema.json} +70 -7
  231. package/schemas/Perttool.SchemaResult.v1.schema.json +1 -1
  232. package/schemas/{Perttool.UnitMigrationResult.v3.schema.json → Perttool.UnitMigrationResult.v4.schema.json} +5 -5
  233. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,54 @@ This project records its notable changes here. The format is based on [Keep a Ch
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.10.0] - 2026-08-18
8
+
9
+ Breaking Grammar 8 and CLI Contract 9 beta minor. This version publishes
10
+ calendar-aware temporal scheduling across the public CLI and package surfaces.
11
+
12
+ ### Added
13
+
14
+ - Added reusable weekly calendars, capacity exceptions, generic resource
15
+ availability, event-bound task constraints, pinned zone-data validation,
16
+ and source-preserving maintenance commands.
17
+ - Added forward and backward-required calendar schedules, signed slack,
18
+ infeasibility evidence, and current and forecast POSTDUE projections.
19
+ - Added three calendar command paths and the `temporal-schedule` Guide topic.
20
+
21
+ ### Changed
22
+
23
+ - Activated Grammar 8 and CLI Contract 9 with
24
+ `Perttool.ProjectResult.v5`, `Perttool.CheckResult.v6`,
25
+ `Perttool.AnalysisResult.v7`, `Perttool.NextResult.v8`,
26
+ `Perttool.MutationResult.v6`, `Perttool.PlanAssuranceResult.v2`, and
27
+ `Perttool.UnitMigrationResult.v4`.
28
+ - Retained 23 active command-result root schemas by replacing seven Contract 8
29
+ roots, retained 129 root and Node exports and 45 Core exports, and kept
30
+ `Perttool.AdvanceResult.v3` unchanged.
31
+ - Added source-preserving Grammar 7 to Grammar 8 migration while retaining
32
+ Grammar 1 through 7 reads and existing authorization and persistence guards.
33
+
34
+ ## [0.9.4] - 2026-08-14
35
+
36
+ Backward-compatible Grammar 7 and CLI Contract 8 emergency beta patch. This
37
+ version corrects acceptance-record retention and final candidate validation
38
+ for GitHub Issue #19 and adds pinned repository duplicate and complexity
39
+ ratchets.
40
+
41
+ ### Fixed
42
+
43
+ - Made `dag advance` preserve criterion sets and receipts for every milestone
44
+ retained in the residual graph, including unchanged successor, branch, and
45
+ project-finish milestones.
46
+ - Made the complete composed Contract 8 advance candidate pass document
47
+ validation before history and persistence decisions, with deterministic
48
+ candidate and operation diagnostics.
49
+
50
+ ### Development
51
+
52
+ - Added pinned jscpd 5.0.15 duplication and Lizard 1.23.0 complexity gates to
53
+ the local `check:static` workflow and Node.js 22/24 CI.
54
+
7
55
  ## [0.9.3] - 2026-08-14
8
56
 
9
57
  Backward-compatible Grammar 7 and CLI Contract 8 emergency beta patch. This
@@ -495,7 +543,9 @@ First public development preview. Intended to evaluate the DSL and CLI, read-onl
495
543
  - Not published to the npm registry; use the GitHub Release asset
496
544
  - Requires Node.js 24 or later
497
545
 
498
- [Unreleased]: https://github.com/mako10k/perttool/compare/v0.9.3...HEAD
546
+ [Unreleased]: https://github.com/mako10k/perttool/compare/v0.10.0...HEAD
547
+ [0.10.0]: https://github.com/mako10k/perttool/compare/v0.9.4...v0.10.0
548
+ [0.9.4]: https://github.com/mako10k/perttool/compare/v0.9.3...v0.9.4
499
549
  [0.9.3]: https://github.com/mako10k/perttool/compare/v0.9.2...v0.9.3
500
550
  [0.9.2]: https://github.com/mako10k/perttool/compare/v0.9.1...v0.9.2
501
551
  [0.9.1]: https://github.com/mako10k/perttool/compare/v0.9.0...v0.9.1
package/README.md CHANGED
@@ -75,32 +75,52 @@ commands, 23 root schemas, 129 root and Node runtime exports,
75
75
  criterion-set replacement, caller-asserted receipts, and acceptance-aware
76
76
  canonical advance. Its accepted release commit, annotated tag, GitHub
77
77
  prerelease, and npm artifact agree, and npm currently reports
78
- `latest=0.9.0`, `beta=0.9.1`, and no `alpha`. Version `0.8.1` remains the
78
+ `latest=0.9.0`, `beta=0.9.4`, and no `alpha`. Source is prepared for the
79
+ unpublished `0.10.0` Grammar 8 and CLI Contract 9 beta candidate. Version `0.8.1` remains the
79
80
  exact Grammar 6 and CLI Contract 7 rollback pin.
80
81
 
81
- Version `0.9.1` is the published compatible Contract 8 patch for `ACT-003` and
82
- GitHub Issue #8. It makes declared velocity observation use the exact current
83
- operand, including a just-written uncommitted finish, while keeping
84
- Git-recorded evidence bound to the selected first-parent revision. It retains
85
- all 53 commands, 23 root schemas, 129 root and Node exports, 45 Core exports,
86
- result and schema identities, and authority. npm `beta=0.9.1` while `latest`
87
- remains `0.9.0`.
88
-
89
- Version `0.9.2` is the selected compatible Contract 8 emergency patch for
90
- `ANALYSIS-001` and GitHub Issue #15. It keeps valid Point plans without a
82
+ Version `0.9.1` is the durably accepted compatible Contract 8 patch for
83
+ `ACT-003` and GitHub Issue #8. It makes declared velocity observation use the
84
+ exact current operand, including a just-written uncommitted finish, while
85
+ keeping Git-recorded evidence bound to the selected first-parent revision. It
86
+ retains all 53 commands, 23 root schemas, 129 root and Node exports, 45 Core
87
+ exports, result and schema identities, and authority. Release commit, peeled
88
+ tag, GitHub prerelease, npm artifact, and installed regression agree; Issue #8
89
+ is closed.
90
+
91
+ Version `0.9.2` is the durably accepted compatible Contract 8 emergency patch
92
+ for `ANALYSIS-001` and GitHub Issue #15. It keeps valid Point plans without a
91
93
  declared velocity Point-valued through `dag analyze` and `dag next`, leaves
92
94
  velocity forecasts null, and reports calendar conversion as unavailable
93
- without inventing a rate. It retains all public identities and authority.
94
- Publication moves only npm `beta`; `latest`, plan advance, public VSIX
95
- publication, and unrelated work remain separate.
95
+ without inventing a rate. It retains all public identities and authority;
96
+ Issue #15 is closed, and `0.9.2` remains the exact rollback pin for `0.9.3`.
96
97
 
97
- Version `0.9.3` is the selected compatible Contract 8 emergency patch for
98
+ Version `0.9.3` is the published compatible Contract 8 emergency patch for
98
99
  GitHub Issues #14, #16, and #17. It restores Grammar 7 `plan-assurance
99
100
  show|hash`, composes acceptance-aware terminal deletions without weakening the
100
101
  shared edit guard, and preserves complete criterion-set/receipt evidence for
101
102
  retained reached milestones. It retains all public identities and authority.
102
- Publication moves only npm `beta`; `latest`, plan advance, public VSIX
103
- publication, and unrelated work remain separate.
103
+ The accepted release commit, annotated tag, GitHub prerelease, and npm
104
+ artifact agree; at its publication npm reported `beta=0.9.3`,
105
+ `latest=0.9.0`, and no `alpha`.
106
+ Issues #14, #16, and #17 are closed with release evidence. Plan advance,
107
+ public VSIX publication, and unrelated work remain separate.
108
+
109
+ Version `0.9.4` is the compatible Contract 8 emergency patch for GitHub Issue
110
+ #19. It is published and preserves criterion sets and receipts for every milestone retained by
111
+ `dag advance`, validates the complete final candidate before history or
112
+ persistence decisions, and projects deterministic candidate diagnostics. It
113
+ also makes pinned jscpd duplicate and Lizard complexity ratchets part of the
114
+ repository and CI static-analysis gate. Grammar 7, CLI Contract 8, all 53
115
+ commands, 23 root schemas, 129 root and Node exports, 45 Core exports, public
116
+ authority, and force semantics remain unchanged. Its release commit, peeled
117
+ tag, Node.js 22 and 24 CI, GitHub prerelease, npm artifact, and common
118
+ SHA-256 `63a12ddf...d6fe53b` agree. npm reports `beta=0.9.4`,
119
+ `latest=0.9.0`, and no `alpha`; Issue #19 is closed with release evidence.
120
+ The completed release plan was migrated with committed provenance, given six
121
+ artifact-bound criteria and receipts, and canonically advanced. Its residual
122
+ retains only accepted reached `RELEASE_094_ACCEPTED` and has no diagnostic or
123
+ task. Version `0.9.3` is the exact rollback pin.
104
124
 
105
125
  The private adapters now project that same Contract 8 acceptance model without
106
126
  adding write authority. The LSP negotiates a separate version-bound milestone
@@ -121,19 +141,19 @@ After beta publication, use `npx` for an occasional Contract 8 invocation and
121
141
  select the version explicitly:
122
142
 
123
143
  ```sh
124
- npx --yes --package=perttool@0.9.3 -- perttool --version
125
- npx --yes --package=perttool@0.9.3 -- perttool document check PLAN.pert
126
- npx --yes --package=perttool@0.9.3 -- perttool dag next PLAN.pert --format json
127
- npx --yes --package=perttool@0.9.3 -- perttool plan-assurance show PLAN.pert --format json
144
+ npx --yes --package=perttool@0.9.4 -- perttool --version
145
+ npx --yes --package=perttool@0.9.4 -- perttool document check PLAN.pert
146
+ npx --yes --package=perttool@0.9.4 -- perttool dag next PLAN.pert --format json
147
+ npx --yes --package=perttool@0.9.4 -- perttool plan-assurance show PLAN.pert --format json
128
148
  ```
129
149
 
130
150
  The equivalent explicit `npm exec` form is:
131
151
 
132
152
  ```sh
133
- npm exec --yes --package=perttool@0.9.3 -- perttool --version
134
- npm exec --yes --package=perttool@0.9.3 -- perttool document check PLAN.pert
135
- npm exec --yes --package=perttool@0.9.3 -- perttool dag analyze PLAN.pert
136
- npm exec --yes --package=perttool@0.9.3 -- perttool plan-assurance hash PLAN.pert WORK --kind contract
153
+ npm exec --yes --package=perttool@0.9.4 -- perttool --version
154
+ npm exec --yes --package=perttool@0.9.4 -- perttool document check PLAN.pert
155
+ npm exec --yes --package=perttool@0.9.4 -- perttool dag analyze PLAN.pert
156
+ npm exec --yes --package=perttool@0.9.4 -- perttool plan-assurance hash PLAN.pert WORK --kind contract
137
157
  ```
138
158
 
139
159
  `npx` and `npm exec` may download the selected package version into the npm
@@ -147,16 +167,16 @@ Install the Contract 8 CLI globally by exact version when it is used
147
167
  regularly:
148
168
 
149
169
  ```sh
150
- npm install --global perttool@0.9.3
170
+ npm install --global perttool@0.9.4
151
171
  perttool --version
152
172
  ```
153
173
 
154
174
  The accepted `0.9.0` release was separately promoted to both public tags. The
155
- `0.9.3` publication changes only npm `beta`; until an independent promotion is
175
+ `0.9.4` publication changes only npm `beta`; until an independent promotion is
156
176
  authorized, an unqualified global installation continues to select `0.9.0`.
157
- The exact `0.9.3` pin is the reproducible form for the Issues #14, #16, and #17
158
- corrections. Version `0.9.2` remains the rollback pin that includes the Issue
159
- #15 correction.
177
+ The exact `0.9.4` pin is the reproducible form for the Issue #19 correction.
178
+ Version `0.9.3` remains the rollback pin for the Issues #14, #16, and #17
179
+ corrections.
160
180
  Contract 6 remains available by exact pinning `perttool@0.6.0`; the pre-schema
161
181
  Contract 6 artifact remains available as
162
182
  `perttool@0.5.0`. Contract 5,
@@ -610,7 +630,7 @@ the Core and Node subpaths without changing CLI Contract 7; see the
610
630
  [`0.7.1` to `0.8.0` migration](docs/process/0.7.1-to-0.8.0-migration.md).
611
631
  Version `0.8.1` retains those interfaces and corrects assurance-receipt
612
632
  placement in an advance-owned terminal deletion suffix. Versions `0.9.0`,
613
- `0.9.1`, `0.9.2`, and `0.9.3` use CLI Contract 8.
633
+ `0.9.1`, `0.9.2`, `0.9.3`, and `0.9.4` use CLI Contract 8.
614
634
  A complete, known, non-truncated `Perttool.NextResult.v7` with policy
615
635
  `recommendation_v1_plus_release_gate_plus_plan_assurance_v1` is required for
616
636
  the current source. Start only task IDs in
@@ -650,8 +670,13 @@ diagnostics, and future or unavailable temporal eligibility must fail closed.
650
670
  - [`0.8.1` to `0.9.0` migration](docs/process/0.8.1-to-0.9.0-migration.md)
651
671
  - [`v0.9.0` release procedure](docs/process/0.9.0-release.md)
652
672
  - [`v0.9.1` release procedure](docs/process/0.9.1-release.md)
673
+ - [`v0.9.1` durable release acceptance](docs/process/0.9.1-release-acceptance.md)
653
674
  - [`v0.9.2` release procedure](docs/process/0.9.2-release.md)
675
+ - [`v0.9.2` durable release acceptance](docs/process/0.9.2-release-acceptance.md)
654
676
  - [`v0.9.3` release procedure](docs/process/0.9.3-release.md)
677
+ - [`v0.9.3` publication record](docs/process/0.9.3-publish.md)
678
+ - [`v0.9.3` durable release acceptance](docs/process/0.9.3-release-acceptance.md)
679
+ - [`v0.9.4` release procedure](docs/process/0.9.4-release.md)
655
680
  - [Conditional Plan Assurance interface acceptance](docs/process/plan-assurance-interface-acceptance.md)
656
681
  - [Shared Library Boundary](docs/specs/shared-library.md)
657
682
  - [Editor Protocol Contract](docs/specs/editor-protocol.md)
@@ -678,6 +703,7 @@ diagnostics, and future or unavailable temporal eligibility must fail closed.
678
703
  - [`v0.9.1` release plan](plans/release-0.9.1.pert)
679
704
  - [`v0.9.2` release plan](plans/release-0.9.2.pert)
680
705
  - [`v0.9.3` release plan](plans/release-0.9.3.pert)
706
+ - [`v0.9.4` release plan](plans/release-0.9.4.pert)
681
707
  - [JSON Schema Artifact Contract](docs/specs/json-schema.md)
682
708
  - [JSON Schema source acceptance](docs/process/json-schema-acceptance.md)
683
709
  - [Contract 5-to-6 migration](docs/process/cli-contract-6-migration.md)
@@ -698,3 +724,9 @@ diagnostics, and future or unavailable temporal eligibility must fail closed.
698
724
  Report vulnerabilities privately according to [SECURITY.md](SECURITY.md).
699
725
  perttool is released under the [MIT License](LICENSE). See
700
726
  [CHANGELOG.md](CHANGELOG.md) for release changes and known limitations.
727
+ The current repository source identifies `0.10.0` and activates Grammar 8,
728
+ CLI Contract 9, 56 commands, and the seven replacement result identities. It
729
+ is preparation state only: no `v0.10.0` tag, GitHub Release, or npm package is
730
+ claimed until candidate acceptance and separately authorized PUBLISH succeed.
731
+ Migration guidance is in
732
+ [`0.9.4-to-0.10.0-migration.md`](docs/process/0.9.4-to-0.10.0-migration.md).
@@ -1,11 +1,10 @@
1
1
  import type { CreateDocumentOptions, DocumentWriteResult, ReplaceDocumentOptions } from "../io/safe-write.js";
2
2
  import type { TargetGrammar6Capability } from "../parser/document-parser.js";
3
3
  import type { NodeHostPorts } from "../ports/node-host.js";
4
- import { analyzeDocument, checkDocument, getProjectMetadata, planAssuranceMutation, planBatchMutation, planFinishActuals, planFormat, inspectPlanAssurance, planLifecycle, planMutation, planUnitMigration, selectNextTasks } from "./contract8-milestone-acceptance.js";
4
+ import { analyzeDocument, checkDocument, getProjectMetadata, planFormat, inspectPlanAssurance, selectNextTasks, withUnitMigrationWrite } from "./contract9-runtime.js";
5
5
  import { planAdvance } from "./contract7-mutation.js";
6
6
  import { contract7ProjectResultToJson, renderContract7ProjectText } from "./contract7-project.js";
7
7
  import { contract7InspectionResultToJson, contract7MutationResultToJson, contract7SnakeJson } from "./contract7-projection.js";
8
- import { withUnitMigrationWrite } from "./contract7-unit-migration.js";
9
8
  import { contract6WorkEventToJson } from "./contract6-projection.js";
10
9
  import { getAgentHelp } from "./agent-help.js";
11
10
  import { renderAdvanceHistoryGuard, withAdvanceHistoryRace } from "./advance-history.js";
@@ -31,17 +30,43 @@ export declare function createCliApplicationFacade(host: NodeHostPorts, historic
31
30
  projectInitResultToJson: typeof projectInitResultToJson;
32
31
  renderProjectInitResult: typeof renderProjectInitResult;
33
32
  withProjectInitOutput: typeof withProjectInitOutput;
34
- planUnitMigration: typeof planUnitMigration;
33
+ planUnitMigration: (text: string, request: import("../index.js").UnitMigrationRequest, options?: import("./target-unit-migration-candidate.js").TargetUnitMigrationCandidateOptions | undefined) => Omit<import("./target-unit-migration-result.js").TargetUnitMigrationResult, "schemaVersion" | "unitMigration"> & {
34
+ readonly schemaVersion: "Perttool.UnitMigrationResult.v4";
35
+ readonly unitMigration: {
36
+ readonly id: "perttool.unit-migration";
37
+ readonly version: 4;
38
+ };
39
+ };
35
40
  withUnitMigrationWrite: typeof withUnitMigrationWrite;
36
41
  getProjectMetadata: typeof getProjectMetadata;
37
42
  contract7ProjectResultToJson: typeof contract7ProjectResultToJson;
38
43
  renderContract7ProjectText: typeof renderContract7ProjectText;
39
44
  planAdvance: typeof planAdvance;
40
- planAssuranceMutation: typeof planAssuranceMutation;
41
- planBatchMutation: typeof planBatchMutation;
42
- planFinishActuals: typeof planFinishActuals;
43
- planLifecycle: typeof planLifecycle;
44
- planMutation: typeof planMutation;
45
+ planAssuranceMutation: (text: string, mutation: import("../index.js").PlanAssuranceMutation, options?: import("../index.js").PlanAssuranceMutationOptions | undefined) => Omit<Omit<import("../assurance/mutation.js").TargetPlanAssuranceMutationResultV4, "schemaVersion"> & {
46
+ readonly schemaVersion: "Perttool.MutationResult.v5";
47
+ }, "schemaVersion"> & {
48
+ readonly schemaVersion: "Perttool.MutationResult.v6";
49
+ };
50
+ planBatchMutation: (text: string, mutation: import("../index.js").BatchMutation | import("../assurance/mutation.js").PlanAssuranceBatchMutation, options?: import("../index.js").PlanAssuranceMutationOptions | undefined) => Omit<Omit<import("../assurance/mutation.js").TargetPlanAssuranceMutationResultV4, "schemaVersion"> & {
51
+ readonly schemaVersion: "Perttool.MutationResult.v5";
52
+ }, "schemaVersion"> & {
53
+ readonly schemaVersion: "Perttool.MutationResult.v6";
54
+ };
55
+ planFinishActuals: (text: string, mutation: import("../index.js").FinishActualsMutation, options?: import("./contract7-mutation.js").Contract7LifecycleOptions | undefined) => Omit<Omit<import("./contract7-mutation.js").LifecycleResultV4, "schemaVersion"> & {
56
+ readonly schemaVersion: "Perttool.MutationResult.v5";
57
+ }, "schemaVersion"> & {
58
+ readonly schemaVersion: "Perttool.MutationResult.v6";
59
+ };
60
+ planLifecycle: (text: string, mutation: import("../index.js").LifecycleMutation, options?: import("./contract7-mutation.js").Contract7LifecycleOptions | undefined) => Omit<Omit<import("./contract7-mutation.js").LifecycleResultV4, "schemaVersion"> & {
61
+ readonly schemaVersion: "Perttool.MutationResult.v5";
62
+ }, "schemaVersion"> & {
63
+ readonly schemaVersion: "Perttool.MutationResult.v6";
64
+ };
65
+ planMutation: (text: string, mutation: import("../index.js").Mutation, options?: import("../index.js").PlanAssuranceMutationOptions | undefined) => Omit<Omit<import("../assurance/mutation.js").TargetPlanAssuranceMutationResultV4, "schemaVersion"> & {
66
+ readonly schemaVersion: "Perttool.MutationResult.v5";
67
+ }, "schemaVersion"> & {
68
+ readonly schemaVersion: "Perttool.MutationResult.v6";
69
+ };
45
70
  renderTargetGovernanceDecision: typeof renderTargetGovernanceDecision;
46
71
  contract7InspectionResultToJson: typeof contract7InspectionResultToJson;
47
72
  contract7MutationResultToJson: typeof contract7MutationResultToJson;
@@ -1 +1 @@
1
- {"version":3,"file":"cli-facade.d.ts","sourceRoot":"","sources":["../../src/application/cli-facade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,sBAAsB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,EACb,MAAM,iB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WAC3B,sBAAsB,KAC9B,OAAO,CAAC,mBAAmB,CAAC;;GA6GhC;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAC3C,OAAO,0BAA0B,CAClC,CAAC;AAEF,YAAY,EACV,6CAA6C,GAC9C,CAAC"}
1
+ {"version":3,"file":"cli-facade.d.ts","sourceRoot":"","sources":["../../src/application/cli-facade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAIlB,UAAU,EACV,oBAAoB,EAIpB,eAAe,EACf,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,wCAAwC,EACxC,yCAAyC,EACzC,KAAK,wCAAwC,EAC7C,KAAK,6CAA6C,EACnD,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,KAAK,qCAAqC,EAC1C,KAAK,iCAAiC,EACvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,8BAA8B,EAC/B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,kCAAkC,EAElC,8BAA8B,EAC9B,gCAAgC,EAChC,KAAK,+BAA+B,EACrC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,EACnC,qCAAqC,EACtC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,+BAA+B,EAC/B,iCAAiC,EACjC,KAAK,gCAAgC,EACrC,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAC;AAsBtC;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,aAAa,EACnB,qBAAqB,CAAC,EAAE,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAoChD,MAAM,UACJ,UAAU,CAAC,OAAO,wCAAwC,CAAC,CAAC,CAAC,CAAC,cAC1D,wBAAwB,WAC3B,wCAAwC;;;;+CAiBzC,iCAAiC,cAC7B,wBAAwB,WAC3B,qCAAqC;;;+CA/BrC,+BAA+B,cAC5B,wBAAwB;;;;;;gDAsC3B,wBAAwB;;;;sCAmDC,UAAU;;;;;gCAnHL,MAAM;;;;;;;;;;+CAGrC,MAAM,iBACC,MAAM,cACT,wBAAwB,YAC3B,qBAAqB,KAC7B,OAAO,CAAC,mBAAmB,CAAC;gDAOrB,MAAM,iBACC,MAAM,cACT,wBAAwB,WAC3B,sBAAsB,KAC9B,OAAO,CAAC,mBAAmB,CAAC;;GA6GhC;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAC3C,OAAO,0BAA0B,CAClC,CAAC;AAEF,YAAY,EACV,6CAA6C,GAC9C,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import { validateTargetGrammar6Document, } from "../semantic/target-validator.js";
2
- import { analyzeDocument, checkDocument, getProjectMetadata, planAssuranceMutation, planBatchMutation, planFinishActuals, planFormat, inspectPlanAssurance, planLifecycle, planMutation, planUnitMigration, selectNextTasks, } from "./contract8-milestone-acceptance.js";
2
+ import { analyzeDocument, checkDocument, getProjectMetadata, planAssuranceMutation, planBatchMutation, planFinishActuals, planFormat, inspectPlanAssurance, planLifecycle, planMutation, planUnitMigration, selectNextTasks, withUnitMigrationWrite, } from "./contract9-runtime.js";
3
3
  import { planAdvance, } from "./contract7-mutation.js";
4
4
  import { contract7ProjectResultToJson, renderContract7ProjectText, } from "./contract7-project.js";
5
5
  import { contract7InspectionResultToJson, contract7MutationResultToJson, contract7SnakeJson, } from "./contract7-projection.js";
6
- import { withUnitMigrationWrite, } from "./contract7-unit-migration.js";
7
6
  import { contract6WorkEventToJson, } from "./contract6-projection.js";
8
7
  import { getAgentHelp, } from "./agent-help.js";
9
8
  import { prepareAdvanceHistory as prepareGenericAdvanceHistory, renderAdvanceHistoryGuard, withAdvanceHistoryRace, } from "./advance-history.js";
@@ -1 +1 @@
1
- {"version":3,"file":"cli-facade.js","sourceRoot":"","sources":["../../src/application/cli-facade.ts"],"names":[],"mappings":"AASA,OAAO,EACL,8BAA8B,GAC/B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,GACb,MAAM,iBAAiB,CAA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AAE,0BAA0B;QAC5D,+BAA+B;QAC/B,iCAAiC;QACjC,YAAY;QACZ,wBAAwB,EAAE,CAAC,KAAiB,EAAE,EAAE,CAC9C,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC;QAClC,mBAAmB;QACnB,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;QAClC,6BAA6B,EAAE,IAAI,CAAC,WAAW,CAAC,sBAAsB;QACtE,6BAA6B,EAAE,IAAI,CAAC,WAAW,CAAC,sBAAsB;QACtE,kBAAkB,EAAE,IAAI,CAAC,eAAe,CAAC,cAAc;QACvD,2BAA2B,EAAE,IAAI,CAAC,eAAe,CAAC,uBAAuB;QACzE,gCAAgC,EAAE,4BAA4B;QAC9D,iCAAiC,EAAE,6BAA6B;QAChE,4BAA4B,EAAE,IAAI,CAAC,eAAe,CAAC,wBAAwB;KAC5E,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"cli-facade.js","sourceRoot":"","sources":["../../src/application/cli-facade.ts"],"names":[],"mappings":"AASA,OAAO,EACL,8BAA8B,GAC/B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,IAAI,4BAA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AAiC;QACjC,YAAY;QACZ,wBAAwB,EAAE,CAAC,KAAiB,EAAE,EAAE,CAC9C,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC;QAClC,mBAAmB;QACnB,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;QAClC,6BAA6B,EAAE,IAAI,CAAC,WAAW,CAAC,sBAAsB;QACtE,6BAA6B,EAAE,IAAI,CAAC,WAAW,CAAC,sBAAsB;QACtE,kBAAkB,EAAE,IAAI,CAAC,eAAe,CAAC,cAAc;QACvD,2BAA2B,EAAE,IAAI,CAAC,eAAe,CAAC,uBAAuB;QACzE,gCAAgC,EAAE,4BAA4B;QAC9D,iCAAiC,EAAE,6BAA6B;QAChE,4BAA4B,EAAE,IAAI,CAAC,eAAe,CAAC,wBAAwB;KAC5E,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { PlanAssuranceEvaluationV1 } from "../assurance/types.js";
2
+ import type { Diagnostic } from "../model/diagnostics.js";
3
+ import { type TextEdit } from "../mutation/text-edits.js";
4
+ import { type PlanAssuranceGovernanceDecisionV2 } from "../assurance/governance.js";
5
+ import type { GovernanceRequestInput } from "../governance/types.js";
6
+ export type Contract9SealMutation = {
7
+ readonly kind: "plan_assurance.seal";
8
+ readonly reason: string;
9
+ } | {
10
+ readonly kind: "plan_assurance.reseal";
11
+ readonly taskIds: readonly string[];
12
+ readonly reason: string;
13
+ };
14
+ export interface Contract9AssuranceMutationResultV6 {
15
+ readonly schemaVersion: "Perttool.MutationResult.v6";
16
+ readonly ok: boolean;
17
+ readonly documentId: string | null;
18
+ readonly changed: boolean;
19
+ readonly originalDigest: string;
20
+ readonly updatedDigest: string | null;
21
+ readonly updatedText: string | null;
22
+ readonly diff: string | null;
23
+ readonly edits: readonly TextEdit[];
24
+ readonly diagnostics: readonly Diagnostic[];
25
+ readonly diagnosticsTruncated: false;
26
+ readonly assuranceImpact: Readonly<{
27
+ before: PlanAssuranceEvaluationV1;
28
+ after: PlanAssuranceEvaluationV1;
29
+ }> | null;
30
+ readonly governance: PlanAssuranceGovernanceDecisionV2 | null;
31
+ }
32
+ export declare function planContract9AssuranceSealMutation(text: string, mutation: Contract9SealMutation, options?: Readonly<{
33
+ governance?: GovernanceRequestInput;
34
+ }>): Contract9AssuranceMutationResultV6;
35
+ //# sourceMappingURL=contract9-assurance-mutation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract9-assurance-mutation.d.ts","sourceRoot":"","sources":["../../src/application/contract9-assurance-mutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAA6B,MAAM,uBAAuB,CAAC;AAGlG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAQ9F,OAAO,EAC+B,KAAK,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AACjH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjE;IAAE,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7G,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,aAAa,EAAE,4BAA4B,CAAC;IACrD,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,QAAQ,CAAC,oBAAoB,EAAE,KAAK,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC;QAAE,MAAM,EAAE,yBAAyB,CAAC;QAAC,KAAK,EAAE,yBAAyB,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IACnH,QAAQ,CAAC,UAAU,EAAE,iCAAiC,GAAG,IAAI,CAAC;CAC/D;AAyDD,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,qBAAqB,EAC9F,OAAO,GAAE,QAAQ,CAAC;IAAE,UAAU,CAAC,EAAE,sBAAsB,CAAA;CAAE,CAAM,GAAG,kCAAkC,CAwErG"}
@@ -0,0 +1,146 @@
1
+ import { createUnifiedDiff } from "../editing/unified-diff.js";
2
+ import { sha256DigestUtf8 } from "../model/sha256.js";
3
+ import { applyTextEdits, normalizeTextEdits } from "../mutation/text-edits.js";
4
+ import { scanTemporalDeclarationBlocks, temporalScheduleBaseText } from "../temporal-schedule/source-lexical.js";
5
+ import { parseTemporalScheduleSource, TEMPORAL_SCHEDULE_SOURCE_CAPABILITY } from "../temporal-schedule/source.js";
6
+ import { evaluateContract9PlanAssurance } from "./contract9-assurance.js";
7
+ import { milestoneAcceptanceBaseText } from "../milestone-acceptance/source.js";
8
+ import { validateTargetGrammar6Document } from "../semantic/target-validator.js";
9
+ import { TARGET_GRAMMAR_6_CAPABILITY } from "../parser/document-parser.js";
10
+ import { governanceMetadataFromDocument } from "../governance/source.js";
11
+ import { evaluatePlanAssuranceGovernance, normalizePlanAssuranceGovernanceRequest, planAssuranceGovernanceDiagnostics } from "../assurance/governance.js";
12
+ function ending(text) { return text.includes("\r\n") ? "\r\n" : "\n"; }
13
+ function failure(text, documentId, code, message, entityId) {
14
+ return Object.freeze({ schemaVersion: "Perttool.MutationResult.v6", ok: false, documentId, changed: false,
15
+ originalDigest: sha256DigestUtf8(text), updatedDigest: null, updatedText: null, diff: null, edits: Object.freeze([]),
16
+ diagnostics: Object.freeze([Object.freeze({ code, severity: "error", message, ...(entityId === undefined ? {} : { entityId }) })]),
17
+ diagnosticsTruncated: false, assuranceImpact: null, governance: null });
18
+ }
19
+ function sealText(result, reason, lineEnding) {
20
+ if (result.contractHash === null || result.computedBasisHash === null || result.exportedAssuranceHash === null)
21
+ throw new Error(`task ${result.taskId} has no sealable model-2 basis`);
22
+ return [`plan_seal ${result.taskId}:`, ` accepted_contract ${result.contractHash}`, ` accepted_basis ${result.computedBasisHash}`,
23
+ ...(result.computedInputs.length === 0 ? [] : [" accepted_inputs:", ...result.computedInputs.map((input) => ` ${input.predecessorTaskId} ${input.relationMode} ${input.assuranceHash}`)]),
24
+ ` reason ${JSON.stringify(reason)}`].join(lineEnding);
25
+ }
26
+ function enablementEdit(text, project) {
27
+ const before = project.lines.find(({ text: line }) => /^ (?:critical_epsilon|target_duration|time_zone|tzdb|calendar|workday) /u.test(line));
28
+ const offset = before?.start ?? project.lines.at(-1)?.end ?? project.header.end;
29
+ const eol = ending(text);
30
+ return Object.freeze({ startOffset: offset, endOffset: offset,
31
+ replacement: ` plan_assurance_model 1${eol} plan_assurance_hash_model 2${eol}` });
32
+ }
33
+ function declarationInsertion(text, blocks, records) {
34
+ const later = blocks.find(({ header }) => /^(?:task_outcome|assurance_receipt|work_event) /u.test(header.text));
35
+ const offset = later?.header.start ?? text.length;
36
+ const eol = ending(text);
37
+ const prefix = offset > 0 && !text.slice(0, offset).endsWith(`${eol}${eol}`) ? eol : "";
38
+ return Object.freeze({ startOffset: offset, endOffset: offset, replacement: `${prefix}${records.join(`${eol}${eol}`)}${eol}${eol}` });
39
+ }
40
+ function sealRecordEdits(block, result, reason, text) {
41
+ if (result.contractHash === null || result.computedBasisHash === null)
42
+ throw new Error(`task ${result.taskId} has no resealable model-2 basis`);
43
+ const field = (name) => block.lines.find(({ text: line }) => line.startsWith(` ${name} `));
44
+ const scalar = (line, replacement) => Object.freeze({ startOffset: line.start, endOffset: line.contentEnd, replacement });
45
+ const contract = field("accepted_contract");
46
+ const basis = field("accepted_basis");
47
+ const reasonLine = field("reason");
48
+ const edits = [scalar(contract, ` accepted_contract ${result.contractHash}`),
49
+ scalar(basis, ` accepted_basis ${result.computedBasisHash}`), scalar(reasonLine, ` reason ${JSON.stringify(reason)}`)];
50
+ const inputHeader = block.lines.find(({ text: line }) => line === " accepted_inputs:");
51
+ const nested = inputHeader === undefined ? [] : block.lines.filter((line) => line.start > inputHeader.start && line.start < reasonLine.start && line.text.startsWith(" "));
52
+ const inputText = result.computedInputs.length === 0 ? "" : [" accepted_inputs:", ...result.computedInputs.map((input) => ` ${input.predecessorTaskId} ${input.relationMode} ${input.assuranceHash}`)].join(ending(text)) + ending(text);
53
+ if (inputHeader === undefined && inputText !== "")
54
+ edits.push(Object.freeze({ startOffset: reasonLine.start, endOffset: reasonLine.start, replacement: inputText }));
55
+ if (inputHeader !== undefined)
56
+ edits.push(Object.freeze({ startOffset: inputHeader.start,
57
+ endOffset: nested.at(-1)?.end ?? inputHeader.end, replacement: inputText }));
58
+ return Object.freeze(edits);
59
+ }
60
+ export function planContract9AssuranceSealMutation(text, mutation, options = {}) {
61
+ const source = parseTemporalScheduleSource(text, TEMPORAL_SCHEDULE_SOURCE_CAPABILITY);
62
+ if (!source.ok || source.model === null || source.grammarVersion !== 8)
63
+ return failure(text, source.documentId, "PTASSURE-301", "model-2 assurance mutation requires valid Grammar 8 source");
64
+ if (mutation.reason.length === 0)
65
+ return failure(text, source.documentId, "PTASSURE-301", "seal mutation requires a nonempty reason");
66
+ if (mutation.kind === "plan_assurance.reseal" &&
67
+ (mutation.taskIds.length === 0 || new Set(mutation.taskIds).size !== mutation.taskIds.length))
68
+ return failure(text, source.documentId, "PTASSURE-301", "reseal requires unique task IDs");
69
+ const blocks = scanTemporalDeclarationBlocks(text);
70
+ let preparedText = text;
71
+ const preEdits = [];
72
+ const before = evaluateContract9PlanAssurance(text);
73
+ if (before === null)
74
+ return failure(text, source.documentId, "PTASSURE-303", "model-2 assurance basis is unavailable");
75
+ if (before.modelVersion === null && before.hashModelVersion === null) {
76
+ const project = blocks.find(({ kind }) => kind === "project");
77
+ preEdits.push(enablementEdit(text, project));
78
+ preparedText = applyTextEdits(text, preEdits);
79
+ }
80
+ else if (before.modelVersion !== 1 || before.hashModelVersion !== 2) {
81
+ return failure(text, source.documentId, "PTASSURE-303", "Grammar 8 assurance mutation requires model 1 and hash model 2");
82
+ }
83
+ const evaluated = evaluateContract9PlanAssurance(preparedText);
84
+ if (evaluated === null || !evaluated.ok)
85
+ return failure(text, source.documentId, "PTASSURE-303", "model-2 assurance basis is unavailable");
86
+ const selectedIds = mutation.kind === "plan_assurance.seal"
87
+ ? evaluated.taskResults.filter(({ acceptedBasisHash }) => acceptedBasisHash === null).map(({ taskId }) => taskId)
88
+ : [...mutation.taskIds];
89
+ if (selectedIds.length === 0)
90
+ return failure(text, source.documentId, "PTASSURE-304", "seal mutation selects no task");
91
+ const byId = new Map(evaluated.taskResults.map((result) => [result.taskId, result]));
92
+ const preparedBlocks = scanTemporalDeclarationBlocks(preparedText);
93
+ const recordEdits = [];
94
+ const additions = [];
95
+ try {
96
+ for (const taskId of selectedIds) {
97
+ const result = byId.get(taskId);
98
+ if (result === undefined)
99
+ return failure(text, source.documentId, "PTASSURE-304", `task ${taskId} has no sealable current basis`, taskId);
100
+ const serialized = sealText(result, mutation.reason, ending(text));
101
+ const current = preparedBlocks.find(({ header, id }) => id === taskId && header.text.startsWith("plan_seal "));
102
+ if (mutation.kind === "plan_assurance.reseal" && current === undefined)
103
+ return failure(text, source.documentId, "PTASSURE-304", `task ${taskId} has no existing seal`, taskId);
104
+ if (current === undefined)
105
+ additions.push(serialized);
106
+ else
107
+ recordEdits.push(...sealRecordEdits(current, result, mutation.reason, preparedText));
108
+ }
109
+ }
110
+ catch (error) {
111
+ return failure(text, source.documentId, "PTASSURE-304", error instanceof Error ? error.message : "model-2 seal is unavailable");
112
+ }
113
+ if (additions.length > 0)
114
+ recordEdits.push(declarationInsertion(preparedText, preparedBlocks, additions));
115
+ const second = normalizeTextEdits(preparedText, recordEdits, "Contract 9 assurance seal mutation");
116
+ const candidate = applyTextEdits(preparedText, second);
117
+ const checked = parseTemporalScheduleSource(candidate, TEMPORAL_SCHEDULE_SOURCE_CAPABILITY);
118
+ const after = evaluateContract9PlanAssurance(candidate);
119
+ if (!checked.ok || checked.model === null || after === null || !after.ok)
120
+ return failure(text, source.documentId, "PTASSURE-304", "model-2 seal candidate failed complete Grammar 8 validation");
121
+ const edits = normalizeTextEdits(text, [...preEdits, ...second.map((edit) => preEdits.length === 0 ? edit : Object.freeze({
122
+ ...edit, startOffset: edit.startOffset - preEdits[0].replacement.length * Number(edit.startOffset > preEdits[0].startOffset),
123
+ endOffset: edit.endOffset - preEdits[0].replacement.length * Number(edit.endOffset > preEdits[0].startOffset),
124
+ }))], "Contract 9 complete assurance seal mutation");
125
+ const updatedText = applyTextEdits(text, edits);
126
+ if (updatedText !== candidate)
127
+ throw new Error("Contract 9 seal edit composition changed candidate bytes");
128
+ const base = milestoneAcceptanceBaseText(temporalScheduleBaseText(text, blocks));
129
+ const validated = validateTargetGrammar6Document(base, TARGET_GRAMMAR_6_CAPABILITY).validatedDocument;
130
+ if (validated === null)
131
+ throw new Error("validated Grammar 8 base lost governance metadata");
132
+ const metadata = governanceMetadataFromDocument(validated.document);
133
+ const normalized = normalizePlanAssuranceGovernanceRequest(options.governance);
134
+ if (!normalized.ok)
135
+ return failure(text, source.documentId, "PTGOV-101", "invalid governance request");
136
+ const governance = evaluatePlanAssuranceGovernance({ sourceDigest: sha256DigestUtf8(text),
137
+ goalOwner: metadata.effective.goalOwner, goalDelegates: metadata.effective.goalDelegates,
138
+ dagOwner: metadata.effective.dagOwner, dagDelegates: metadata.effective.dagDelegates }, ["plan_assurance"], normalized.request);
139
+ const governanceDiagnostics = planAssuranceGovernanceDiagnostics(governance);
140
+ return Object.freeze({ schemaVersion: "Perttool.MutationResult.v6", ok: !governanceDiagnostics.some(({ severity }) => severity === "error"), documentId: source.documentId, changed: true,
141
+ originalDigest: sha256DigestUtf8(text), updatedDigest: sha256DigestUtf8(candidate), updatedText: candidate,
142
+ diff: createUnifiedDiff(text, candidate, { originalLabel: "original", updatedLabel: "candidate" }), edits,
143
+ diagnostics: governanceDiagnostics, diagnosticsTruncated: false,
144
+ assuranceImpact: Object.freeze({ before, after }), governance });
145
+ }
146
+ //# sourceMappingURL=contract9-assurance-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract9-assurance-mutation.js","sourceRoot":"","sources":["../../src/application/contract9-assurance-mutation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAiB,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAiC,MAAM,wCAAwC,CAAC;AAChJ,OAAO,EAAE,2BAA2B,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAC;AAClH,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,+BAA+B,EAA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D,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { PlanAssuranceEvaluationV1 } from "../assurance/types.js";
2
+ import type { PlanAssuranceProjectionV1 } from "../assurance/authority.js";
3
+ import type { Diagnostic } from "../model/diagnostics.js";
4
+ import type { PlanAssuranceHashKind, PlanAssuranceInspectionRequest } from "./target-assurance-inspection.js";
5
+ export declare function evaluateContract9PlanAssurance(text: string): PlanAssuranceEvaluationV1 | null;
6
+ export interface Contract9PlanAssuranceResultV2 {
7
+ readonly schemaVersion: "Perttool.PlanAssuranceResult.v2";
8
+ readonly cliContractVersion: 9;
9
+ readonly operation: PlanAssuranceInspectionRequest["operation"];
10
+ readonly ok: boolean;
11
+ readonly documentId: string | null;
12
+ readonly grammarVersion: number | null;
13
+ readonly sourceDigest: string;
14
+ readonly selectedTaskIds: readonly string[];
15
+ readonly taskId: string | null;
16
+ readonly kind: PlanAssuranceHashKind | null;
17
+ readonly selectedHash: string | null;
18
+ readonly assurance: PlanAssuranceProjectionV1 | null;
19
+ readonly diagnostics: readonly Diagnostic[];
20
+ readonly diagnosticsTruncated: boolean;
21
+ }
22
+ export declare function inspectContract9PlanAssurance(text: string, request: PlanAssuranceInspectionRequest): Contract9PlanAssuranceResultV2;
23
+ //# sourceMappingURL=contract9-assurance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract9-assurance.d.ts","sourceRoot":"","sources":["../../src/application/contract9-assurance.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAA4B,yBAAyB,EAA0C,MAAM,uBAAuB,CAAC;AACzI,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,8BAA8B,EA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