@osolmaz/pi-workflows 0.12.0 → 0.13.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 (257) hide show
  1. package/README.md +56 -31
  2. package/dist/builtins/autodoc.workflow.d.ts +4 -4
  3. package/dist/builtins/autoimplement.workflow.d.ts +797 -142
  4. package/dist/builtins/autoimplement.workflow.js +17 -105
  5. package/dist/builtins/autoimplement.workflow.js.map +1 -1
  6. package/dist/builtins/autoplan.workflow.d.ts +126 -13
  7. package/dist/builtins/autoplan.workflow.js +200 -29
  8. package/dist/builtins/autoplan.workflow.js.map +1 -1
  9. package/dist/builtins/catalog.js +7 -5
  10. package/dist/builtins/catalog.js.map +1 -1
  11. package/dist/builtins/index.d.ts +4 -2
  12. package/dist/builtins/index.js +3 -1
  13. package/dist/builtins/index.js.map +1 -1
  14. package/dist/builtins/monitor.workflow.d.ts +56 -23
  15. package/dist/builtins/monitor.workflow.js +508 -329
  16. package/dist/builtins/monitor.workflow.js.map +1 -1
  17. package/dist/builtins/pi-agent-group.d.ts +72 -0
  18. package/dist/builtins/pi-agent-group.js +1087 -0
  19. package/dist/builtins/pi-agent-group.js.map +1 -0
  20. package/dist/builtins/plain-summary.workflow.d.ts +32 -0
  21. package/dist/builtins/plain-summary.workflow.js +134 -0
  22. package/dist/builtins/plain-summary.workflow.js.map +1 -0
  23. package/dist/builtins/plan-approval.workflow.d.ts +39 -5
  24. package/dist/builtins/plan-approval.workflow.js +92 -14
  25. package/dist/builtins/plan-approval.workflow.js.map +1 -1
  26. package/dist/builtins/plan-change.workflow.d.ts +449 -0
  27. package/dist/builtins/plan-change.workflow.js +256 -0
  28. package/dist/builtins/plan-change.workflow.js.map +1 -0
  29. package/dist/builtins/plan-presentation.js +2 -2
  30. package/dist/builtins/plan-presentation.js.map +1 -1
  31. package/dist/builtins/sanity-check.workflow.d.ts +50 -6
  32. package/dist/builtins/sanity-check.workflow.js +150 -28
  33. package/dist/builtins/sanity-check.workflow.js.map +1 -1
  34. package/dist/controllers/effects.d.ts +3 -2
  35. package/dist/controllers/effects.js +8 -1
  36. package/dist/controllers/effects.js.map +1 -1
  37. package/dist/controllers/index.d.ts +1 -1
  38. package/dist/controllers/index.js +1 -1
  39. package/dist/controllers/index.js.map +1 -1
  40. package/dist/controllers/manager.d.ts +1 -0
  41. package/dist/controllers/manager.js +41 -17
  42. package/dist/controllers/manager.js.map +1 -1
  43. package/dist/controllers/sqlite.d.ts +107 -85
  44. package/dist/controllers/sqlite.js +1611 -1486
  45. package/dist/controllers/sqlite.js.map +1 -1
  46. package/dist/controllers/store.d.ts +9 -8
  47. package/dist/controllers/store.js +1 -31
  48. package/dist/controllers/store.js.map +1 -1
  49. package/dist/controllers/types.d.ts +3 -0
  50. package/dist/controllers/workflow-engine-scheduler.d.ts +1 -1
  51. package/dist/controllers/workflow-engine-scheduler.js +3 -5
  52. package/dist/controllers/workflow-engine-scheduler.js.map +1 -1
  53. package/dist/controllers/workflows.d.ts +2 -2
  54. package/dist/controllers/workflows.js +11 -10
  55. package/dist/controllers/workflows.js.map +1 -1
  56. package/dist/extension/controller-host.js +2 -2
  57. package/dist/extension/controller-host.js.map +1 -1
  58. package/dist/extension/decision-channels.d.ts +4 -2
  59. package/dist/extension/decision-channels.js +333 -146
  60. package/dist/extension/decision-channels.js.map +1 -1
  61. package/dist/extension/executor.d.ts +9 -2
  62. package/dist/extension/executor.js +89 -2
  63. package/dist/extension/executor.js.map +1 -1
  64. package/dist/extension/herdr-viewer.d.ts +0 -1
  65. package/dist/extension/herdr-viewer.js +0 -4
  66. package/dist/extension/herdr-viewer.js.map +1 -1
  67. package/dist/extension/index.js +209 -127
  68. package/dist/extension/index.js.map +1 -1
  69. package/dist/extension/recorder.d.ts +3 -10
  70. package/dist/extension/recorder.js +13 -22
  71. package/dist/extension/recorder.js.map +1 -1
  72. package/dist/extension/session-events.d.ts +2 -2
  73. package/dist/extension/step-message.d.ts +7 -2
  74. package/dist/extension/step-message.js +94 -2
  75. package/dist/extension/step-message.js.map +1 -1
  76. package/dist/extension/widget.js +29 -3
  77. package/dist/extension/widget.js.map +1 -1
  78. package/dist/host/rpc-executor.d.ts +3 -0
  79. package/dist/host/rpc-executor.js +2 -0
  80. package/dist/host/rpc-executor.js.map +1 -1
  81. package/dist/host/runner.d.ts +3 -6
  82. package/dist/host/runner.js +83 -32
  83. package/dist/host/runner.js.map +1 -1
  84. package/dist/render/graph-render.js +15 -10
  85. package/dist/render/graph-render.js.map +1 -1
  86. package/dist/state/database.d.ts +35 -0
  87. package/dist/state/database.js +287 -0
  88. package/dist/state/database.js.map +1 -0
  89. package/dist/state/index.d.ts +4 -0
  90. package/dist/state/index.js +5 -0
  91. package/dist/state/index.js.map +1 -0
  92. package/dist/state/json.d.ts +6 -0
  93. package/dist/state/json.js +38 -0
  94. package/dist/state/json.js.map +1 -0
  95. package/dist/state/mutation.d.ts +57 -0
  96. package/dist/state/mutation.js +255 -0
  97. package/dist/state/mutation.js.map +1 -0
  98. package/dist/state/schema.d.ts +6 -0
  99. package/dist/state/schema.js +473 -0
  100. package/dist/state/schema.js.map +1 -0
  101. package/dist/viewer/cli.d.ts +2 -2
  102. package/dist/viewer/cli.js +142 -122
  103. package/dist/viewer/cli.js.map +1 -1
  104. package/dist/viewer/render.d.ts +4 -4
  105. package/dist/viewer/render.js +9 -23
  106. package/dist/viewer/render.js.map +1 -1
  107. package/dist/viewer/session-reducer.d.ts +1 -1
  108. package/dist/viewer/session-reducer.js +1 -1
  109. package/dist/viewer/tui.d.ts +3 -3
  110. package/dist/viewer/tui.js +15 -13
  111. package/dist/viewer/tui.js.map +1 -1
  112. package/dist/viewer/watch.d.ts +2 -5
  113. package/dist/viewer/watch.js +13 -13
  114. package/dist/viewer/watch.js.map +1 -1
  115. package/dist/workflows/catalog.js +7 -2
  116. package/dist/workflows/catalog.js.map +1 -1
  117. package/dist/workflows/composition.js +20 -2
  118. package/dist/workflows/composition.js.map +1 -1
  119. package/dist/workflows/decision-presentation.d.ts +1 -1
  120. package/dist/workflows/decision-presentation.js +51 -38
  121. package/dist/workflows/decision-presentation.js.map +1 -1
  122. package/dist/workflows/definition.d.ts +6 -2
  123. package/dist/workflows/definition.js +17 -0
  124. package/dist/workflows/definition.js.map +1 -1
  125. package/dist/workflows/engine.d.ts +7 -7
  126. package/dist/workflows/engine.js +196 -115
  127. package/dist/workflows/engine.js.map +1 -1
  128. package/dist/workflows/errors.d.ts +16 -3
  129. package/dist/workflows/errors.js +18 -3
  130. package/dist/workflows/errors.js.map +1 -1
  131. package/dist/workflows/human-decision.d.ts +45 -8
  132. package/dist/workflows/human-decision.js +641 -274
  133. package/dist/workflows/human-decision.js.map +1 -1
  134. package/dist/workflows/index.d.ts +5 -6
  135. package/dist/workflows/index.js +4 -5
  136. package/dist/workflows/index.js.map +1 -1
  137. package/dist/workflows/progress.d.ts +1 -0
  138. package/dist/workflows/progress.js +15 -3
  139. package/dist/workflows/progress.js.map +1 -1
  140. package/dist/workflows/schema.js +27 -1
  141. package/dist/workflows/schema.js.map +1 -1
  142. package/dist/workflows/store.d.ts +83 -103
  143. package/dist/workflows/store.js +907 -951
  144. package/dist/workflows/store.js.map +1 -1
  145. package/dist/workflows/types.d.ts +88 -126
  146. package/docs/CONTROLLERS.md +10 -8
  147. package/docs/DEFERRED_TURNS.md +2 -2
  148. package/docs/DESIGN_PHILOSOPHY.md +4 -2
  149. package/docs/HUMAN_DECISIONS.md +36 -47
  150. package/docs/HUMAN_DECISION_PRESENTATIONS.md +14 -24
  151. package/docs/MONITOR.md +179 -237
  152. package/docs/SQLITE_STATE.md +219 -0
  153. package/docs/WORKFLOW_COMPOSITION.md +27 -26
  154. package/docs/WORKFLOW_STEP_MESSAGES.md +20 -18
  155. package/docs/WORKFLOW_UPDATES.md +10 -9
  156. package/docs/development.md +9 -9
  157. package/docs/live-replay-protocol.md +28 -37
  158. package/docs/plans/2026-08-16-workflow-updates-plan.md +1 -1
  159. package/docs/plans/2026-08-19-human-decision-gates-plan.md +1 -1
  160. package/docs/plans/2026-08-21-autoimplement-timeout-fallback-plan.md +1 -1
  161. package/docs/plans/2026-08-21-plan-change-approval-policy-plan.md +322 -0
  162. package/docs/plans/2026-08-21-sanity-check-plan.md +217 -95
  163. package/docs/plans/2026-08-22-goal-finishing-monitor-plan.md +200 -0
  164. package/docs/plans/2026-08-23-assistant-agent-completion-plan.md +701 -0
  165. package/docs/plans/2026-08-23-sqlite-state-plan.md +970 -0
  166. package/docs/plans/replayable-run-bundles-implementation-plan.md +2 -2
  167. package/docs/plans/session-event-replay-implementation-plan.md +1 -1
  168. package/docs/plans/tui-viewer-implementation-plan.md +1 -1
  169. package/docs/session-event-journal.md +63 -434
  170. package/docs/tui-viewer.md +13 -15
  171. package/docs/workflows.md +127 -53
  172. package/examples/workflows/approved-plan.workflow.ts +19 -46
  173. package/examples/workflows/plain-summary.workflow.ts +1 -0
  174. package/herdr-plugin.toml +1 -1
  175. package/package.json +7 -7
  176. package/plugins/herdr/viewer.mjs +1 -11
  177. package/schemas/human-decision-accepted-v1.schema.json +15 -3
  178. package/schemas/human-decision-continuation-v1.schema.json +10 -1
  179. package/schemas/human-decision-delivery-v1.schema.json +8 -0
  180. package/schemas/human-decision-receipt-v1.schema.json +8 -0
  181. package/schemas/human-decision-request-v1.schema.json +24 -4
  182. package/skills/autoimplement/SKILL.md +27 -0
  183. package/skills/autoplan/SKILL.md +5 -4
  184. package/skills/monitor/SKILL.md +91 -135
  185. package/skills/pi-workflows/SKILL.md +9 -8
  186. package/skills/sanity-check/SKILL.md +44 -0
  187. package/src/builtins/autoimplement.workflow.ts +19 -118
  188. package/src/builtins/autoplan.workflow.ts +290 -40
  189. package/src/builtins/catalog.ts +7 -5
  190. package/src/builtins/index.ts +18 -1
  191. package/src/builtins/monitor.workflow.ts +673 -382
  192. package/src/builtins/pi-agent-group.ts +1407 -0
  193. package/src/builtins/plain-summary.workflow.ts +185 -0
  194. package/src/builtins/plan-approval.workflow.ts +157 -24
  195. package/src/builtins/plan-change.workflow.ts +321 -0
  196. package/src/builtins/plan-presentation.ts +2 -2
  197. package/src/builtins/sanity-check.workflow.ts +248 -48
  198. package/src/controllers/effects.ts +7 -0
  199. package/src/controllers/index.ts +0 -6
  200. package/src/controllers/manager.ts +72 -32
  201. package/src/controllers/sqlite.ts +2420 -1948
  202. package/src/controllers/store.ts +17 -38
  203. package/src/controllers/types.ts +3 -0
  204. package/src/controllers/workflow-engine-scheduler.ts +4 -8
  205. package/src/controllers/workflows.ts +45 -21
  206. package/src/extension/controller-host.ts +1 -2
  207. package/src/extension/decision-channels.ts +456 -203
  208. package/src/extension/executor.ts +105 -2
  209. package/src/extension/herdr-viewer.ts +0 -5
  210. package/src/extension/index.ts +251 -151
  211. package/src/extension/recorder.ts +13 -22
  212. package/src/extension/session-events.ts +2 -2
  213. package/src/extension/step-message.ts +106 -4
  214. package/src/extension/widget.ts +32 -5
  215. package/src/host/rpc-executor.ts +4 -0
  216. package/src/host/runner.ts +93 -41
  217. package/src/render/graph-render.ts +12 -6
  218. package/src/state/database.ts +375 -0
  219. package/src/state/index.ts +29 -0
  220. package/src/state/json.ts +42 -0
  221. package/src/state/mutation.ts +435 -0
  222. package/src/state/schema.ts +475 -0
  223. package/src/viewer/cli.ts +151 -144
  224. package/src/viewer/render.ts +19 -30
  225. package/src/viewer/session-reducer.ts +1 -1
  226. package/src/viewer/tui.ts +18 -17
  227. package/src/viewer/watch.ts +13 -17
  228. package/src/workflows/catalog.ts +7 -2
  229. package/src/workflows/composition.ts +21 -3
  230. package/src/workflows/decision-presentation.ts +56 -43
  231. package/src/workflows/definition.ts +36 -3
  232. package/src/workflows/engine.ts +228 -130
  233. package/src/workflows/errors.ts +27 -3
  234. package/src/workflows/human-decision.ts +921 -349
  235. package/src/workflows/index.ts +20 -30
  236. package/src/workflows/progress.ts +18 -3
  237. package/src/workflows/schema.ts +36 -1
  238. package/src/workflows/store.ts +1300 -1163
  239. package/src/workflows/types.ts +100 -137
  240. package/dist/builtins/sanity-check-session.d.ts +0 -17
  241. package/dist/builtins/sanity-check-session.js +0 -168
  242. package/dist/builtins/sanity-check-session.js.map +0 -1
  243. package/dist/workflows/artifacts.d.ts +0 -40
  244. package/dist/workflows/artifacts.js +0 -155
  245. package/dist/workflows/artifacts.js.map +0 -1
  246. package/dist/workflows/migrate-sources.d.ts +0 -42
  247. package/dist/workflows/migrate-sources.js +0 -133
  248. package/dist/workflows/migrate-sources.js.map +0 -1
  249. package/docs/run-bundles.md +0 -481
  250. package/schemas/human-decision-accepted-v2.schema.json +0 -50
  251. package/schemas/human-decision-delivery-v2.schema.json +0 -36
  252. package/schemas/human-decision-receipt-v2.schema.json +0 -39
  253. package/schemas/human-decision-request-v2.schema.json +0 -69
  254. package/schemas/human-decision-resolution-v2.schema.json +0 -27
  255. package/src/builtins/sanity-check-session.ts +0 -205
  256. package/src/workflows/artifacts.ts +0 -188
  257. package/src/workflows/migrate-sources.ts +0 -178
@@ -1,28 +1,49 @@
1
1
  ---
2
- title: Add the Sanity Check Workflow
2
+ title: Run Sanity Check with Provider Extensions
3
3
  author: Onur Solmaz <2453968+osolmaz@users.noreply.github.com>
4
4
  date: 2026-08-21
5
+ updated: 2026-08-23
6
+ status: implemented
5
7
  ---
6
8
 
7
- # Add the Sanity Check Workflow
9
+ # Run Sanity Check with Provider Extensions
8
10
 
9
11
  ## Goal
10
12
 
11
- Add a built-in `sanity-check` workflow that reviews a pull request or local contribution before implementation, approval, or merge. The review checks whether the change is needed, duplicates existing code, should use a simpler design, adds unnecessary data models or public plugin APIs, or has scope and test problems.
13
+ Use direct Pi SDK sessions for the built-in `sanity-check` workflow. Each reviewer gets an independent in-memory context. Each child can load the extension that owns its exact configured model provider, while only the parent workflow action can control workflow state.
12
14
 
13
- The workflow runs its model work in temporary read-only Pi sessions. It does not put review prompts or model replies in the Pi session that started the workflow. The origin session receives the final report through a workflow notification that does not start another model turn.
15
+ The child must use the configured provider, model, thinking level, and provider-owned authentication. It must fail before prompting if that exact dispatch is not available. It must never silently use OpenRouter, Kimi, a local model, or another fallback.
16
+
17
+ The workflow keeps only the final bounded answer and safe operational facts. It does not keep child prompts, reasoning, message history, tool arguments, tool results, repository content, credentials, or extension-private state.
14
18
 
15
19
  ## Scope
16
20
 
17
- The change is limited to pi-workflows. It adds the built-in workflow, the smallest supporting code needed to run isolated read-only Pi sessions, workflow discovery and exports, documentation, unit tests, and real-Pi end-to-end coverage.
21
+ The change is limited to Pi Workflows. It changes the private SDK agent-group runner, Sanity Check composition, extension admission, model runtime construction, tests, and canonical documentation.
22
+
23
+ The workflow uses existing `action`, `agent`, and `compute` nodes and includes the existing `plain-summary` workflow. `src/workflows` and `WorkflowActionContext` remain Pi-independent. The change does not add a workflow primitive, public agent-group export, persisted schema, child workflow run, service, queue, store, transport, Pi core change, or private Pi API.
24
+
25
+ Sanity Check keeps its existing input, review areas, child prompts, evidence rules, session counts, strict result validation, verdicts, and progress schema. After verification, it shows two ordered normal assistant responses: the full detailed report first, then a short plain-language summary.
26
+
27
+ ## Child session contract
28
+
29
+ Each child session:
18
30
 
19
- The workflow uses existing `action`, `compute`, and `notify` nodes. It does not add a workflow primitive, change a persisted schema, change Pi core, or change the Pi plugin SDK.
31
+ - has independent in-memory context and history;
32
+ - uses `SessionManager.inMemory` and creates no Pi session file;
33
+ - owns a separate `ModelRuntime`, provider instance, extension runtime, resource loader, and `AgentSession`;
34
+ - can use only the verified built-in `read`, `grep`, `find`, and `ls` tools;
35
+ - may load the extension that registers the exact configured provider;
36
+ - may load another behavior extension only through an explicit private allowlist;
37
+ - loads no skills, prompt templates, themes, or context files;
38
+ - does not receive the workflow tool, workflow commands, parent run id, node id, attempt id, update channel, or workflow callback;
39
+ - returns only bounded final assistant text and bounded safe lifecycle facts;
40
+ - shares the parent Node process and does not provide OS process isolation.
20
41
 
21
- The child sessions can use only `read`, `grep`, `find`, and `ls`. They cannot edit files or run shell commands. They are temporary and do not write Pi session files.
42
+ Pi extensions are trusted in-process code. The runner prevents normal model, tool, command, and callback access to workflow state. It does not sandbox an extension that directly uses the filesystem or network.
22
43
 
23
- ## Input
44
+ ## Input and review modes
24
45
 
25
- The workflow accepts a review mode and the base reference needed to inspect the current change. Serial mode is the default.
46
+ The workflow input stays unchanged. Serial mode remains the default.
26
47
 
27
48
  ```json
28
49
  {
@@ -31,118 +52,203 @@ The workflow accepts a review mode and the base reference needed to inspect the
31
52
  }
32
53
  ```
33
54
 
34
- `mode` is `serial` or `parallel`. The current repository and checked-out branch are the contribution under review. When `baseRef` is omitted, the workflow tries the remote default branch, the current branch upstream, and the first parent, then uses `HEAD` for a working-tree-only review. Pull request intent, linked issue context, and acceptance criteria are collected when they are available. The workflow also supports a local contribution with no pull request metadata.
55
+ `mode` is `serial` or `parallel`. The current repository and checked-out branch are the contribution under review. When `baseRef` is omitted, the workflow tries the remote default branch, the current branch upstream, and the first parent, then uses `HEAD` for a working-tree-only review.
35
56
 
36
- ## Evidence
57
+ Serial mode creates one review session for all four review areas, then one verification session. It uses two model sessions.
58
+
59
+ Parallel mode creates four focused review sessions at the same time, then one verification session. It uses five model sessions.
60
+
61
+ The agent-group runner enforces maximum concurrency and returns results in request order. A material failure stops queued work, aborts active siblings, waits for every started child to settle, and keeps the first failure as the primary cause.
62
+
63
+ ## Evidence and results
37
64
 
38
65
  The first node collects facts without model judgment. It uses fixed, non-mutating commands to collect:
39
66
 
40
- - the pull request description and linked issue context when available;
67
+ - pull request intent and linked issue context when available;
41
68
  - stated acceptance criteria;
42
- - the base and head revisions;
69
+ - base and head revisions;
43
70
  - changed files;
44
71
  - the diff and diff statistics;
45
72
  - relevant new exports, schemas, persisted fields, and nearby existing code.
46
73
 
47
- Untrusted pull request and repository text is treated as evidence, not as workflow instructions. The evidence is bounded before it enters a model prompt or run bundle.
74
+ Pull request and repository text is untrusted evidence, not instructions. Evidence and review inputs stay bounded before they enter a model prompt or run bundle.
48
75
 
49
- ## Review modes
76
+ The verification session receives the evidence and review results. It must remove unsupported claims, require exact file and symbol references, separate facts from assumptions, resolve supported conflicts, and place unresolved questions in `unknowns` or contributor questions. It returns `keep`, `simplify`, `refactor`, `drop`, or `needs_evidence`.
50
77
 
51
- ### Serial mode
78
+ The existing strict result parsers stay unchanged. They continue to enforce all review areas, evidence, acceptance case, verdict, string, and item limits.
52
79
 
53
- Serial mode starts one temporary review session. That session checks all four areas in order:
80
+ ## Provider-first extension profile
54
81
 
55
- 1. Whether the change is needed.
56
- 2. Duplication and refactoring opportunities.
57
- 3. New data models and public plugin or SDK APIs.
58
- 4. Scope and tests.
82
+ The runner resolves one immutable child profile before it starts the group.
59
83
 
60
- The review session must give exact evidence and the strongest case for accepting the current design. A second temporary session verifies and combines the findings. Serial mode therefore uses two model sessions.
84
+ ### Resolve candidate paths
61
85
 
62
- ### Parallel mode
86
+ Use `SettingsManager` and `DefaultPackageManager.resolve()` to find enabled extension paths without executing extension factories. Canonicalize and deduplicate the paths.
63
87
 
64
- Parallel mode starts four temporary review sessions at the same time. Each session checks one area:
88
+ The default candidate set contains enabled user-scope extensions. Project extensions are excluded unless the private policy admits them explicitly. Direct and wrapper paths for Pi Workflows are excluded before any extension factory runs.
65
89
 
66
- 1. Whether the change is needed.
67
- 2. Duplication and refactoring opportunities.
68
- 3. New data models and public plugin or SDK APIs.
69
- 4. Scope and tests.
90
+ ### Preflight provider ownership
70
91
 
71
- Each session must give exact evidence and the strongest case for accepting the current design. After all four sessions finish, one temporary session verifies and combines their findings. Parallel mode therefore uses five model sessions.
92
+ Load candidate extensions in a no-session `DefaultResourceLoader` preflight. Pass the paths through `additionalExtensionPaths` and set `noExtensions: true` so the loader does not perform a second discovery pass.
72
93
 
73
- ## Verification
94
+ Inspect documented pending native and legacy provider registrations. Admit the one extension path that registers the exact configured provider. Permit other behavior extensions only through an explicit private allowlist.
74
95
 
75
- The final session receives the collected evidence and all review results. It must:
96
+ Fail before session creation when:
76
97
 
77
- - remove claims that the evidence does not support;
78
- - require exact file and symbol references for repository claims;
79
- - separate facts from assumptions;
80
- - resolve conflicting findings when the evidence permits it;
81
- - place unresolved questions in the final `unknowns` or contributor questions;
82
- - return one of `keep`, `simplify`, `refactor`, `drop`, or `needs_evidence`.
98
+ - no extension registers the configured provider;
99
+ - more than one extension claims the configured provider;
100
+ - an extension fails to load;
101
+ - an admitted extension registers a reserved workflow tool or command;
102
+ - an extension replaces `read`, `grep`, `find`, or `ls`;
103
+ - a loaded path is outside the frozen candidate snapshot.
83
104
 
84
- There is no extra review loop. Missing product intent or unresolved evidence produces `needs_evidence` instead of an invented conclusion.
105
+ Before invalidation, dispatch `session_shutdown` through a temporary public `ExtensionRunner` so factory-owned setup can clean up. Preflight does not create a session or dispatch `session_start`. Always invalidate the preflight extension runtime in `finally`.
85
106
 
86
- ## Result
107
+ Extension factories run before their registrations can be inspected. Pi documents that factories must not start background resources. Pi Workflows relies on that contract and does not claim to contain a factory that violates it.
87
108
 
88
- The accepted result contains a verdict, a short summary, findings with evidence, required changes, contributor questions, and unknowns. Findings cover necessity, duplication, data models, public APIs, scope, and tests.
109
+ ## Exact model dispatch
89
110
 
90
- The workflow formats the accepted result as a concise report and sends it to the origin session with `notify({ kind: "final" })`. The notification has `triggerTurn: false`, so the origin model does not restate the report.
111
+ Resolve one immutable `{ provider, modelId, thinkingLevel }` value for the group. A complete explicit override wins. Otherwise, use the configured `SettingsManager` defaults. Reject partial overrides, missing defaults, unsupported thinking values, and prompts that start with an extension slash command.
91
112
 
92
- ## Implementation
113
+ Read and strictly validate the configured cached model catalog once. Keep it as an in-memory group snapshot. Create a deep-cloned in-memory model store for each child. Do the same for ordinary Pi credentials read from `auth.json`. Pi Workflows never writes these snapshots back.
93
114
 
94
- Add a built-in definition named `sanity-check` and register it in the built-in catalog and exports. The graph has these stages:
115
+ Provider extensions use their existing provider-owned credential store in place. Pi Workflows does not copy, inspect, print, migrate, or persist those credentials.
95
116
 
96
- ```text
97
- collect evidence
98
- |
99
- run serial review or four parallel reviews
100
- |
101
- verify and combine
102
- |
103
- notify origin session
104
- ```
117
+ For each child:
118
+
119
+ 1. Create a fresh non-networked `ModelRuntime` from cloned snapshots.
120
+ 2. Create a fresh resource loader with only the frozen admitted extension paths.
121
+ 3. Disable secondary extension discovery, skills, prompt templates, themes, and context files.
122
+ 4. Load a fresh extension and provider instance.
123
+ 5. Find the exact cached model and pass it to `createAgentSession`.
124
+ 6. Pass the exact configured thinking level.
125
+ 7. Verify the session's actual provider, model, thinking level, authentication, extension state, active tools, and built-in tool sources.
126
+ 8. Start the prompt only after all checks pass.
127
+
128
+ Any mismatch is terminal. The runner does not select another provider, model, or thinking level.
129
+
130
+ A transient model selected only in the parent TUI is not inherited. The runner enforces the configured process default unless the private request gives a complete explicit dispatch.
131
+
132
+ ## Workflow authority boundary
133
+
134
+ The parent Sanity Check action is the only workflow owner.
135
+
136
+ Children receive only the built-in read-only tool instances requested by Sanity Check. Extension tools can register but remain inactive. The runner rejects same-name replacements for the built-in tools.
137
+
138
+ Children receive no:
105
139
 
106
- The review nodes are function actions. The isolated runner starts Pi in non-interactive JSON mode with no saved session, no discovered extensions or skills, and only the read-only tools:
140
+ - `workflow` tool;
141
+ - `/workflow`, `/piw`, `/controller`, or workflow-channel command;
142
+ - run, node, or attempt identifier;
143
+ - workflow update, answer, submit, pause, resume, or cancel callback;
144
+ - child workflow run or parent workflow handle.
145
+
146
+ The runner rejects prompts that would invoke extension slash commands. These controls prevent the normal child model and admitted extension bindings from inspecting or changing workflow state.
147
+
148
+ ## Lifecycle and privacy
149
+
150
+ One owner controls each child from creation through cleanup.
151
+
152
+ The owner:
153
+
154
+ 1. Creates the child runtime and session.
155
+ 2. Subscribes before prompting.
156
+ 3. Emits only bounded safe lifecycle phases.
157
+ 4. Waits for prompt settlement.
158
+ 5. Extracts only the latest final assistant text.
159
+ 6. Bounds the returned text before validation.
160
+ 7. Calls and awaits `abort()` on timeout or cancellation.
161
+ 8. Waits for prompt settlement after abort.
162
+ 9. Unsubscribes.
163
+ 10. Disposes the session so extension shutdown runs.
164
+ 11. Invalidates remaining extension runtime state.
165
+ 12. Releases provider resources.
166
+
167
+ Cleanup runs for success, creation failure, authentication failure, provider failure, malformed output, timeout, parent cancellation, sibling failure, and disposal failure. A cleanup failure remains a bounded secondary diagnostic and does not replace an earlier primary error.
168
+
169
+ The workflow never copies extension events or extension-private state into progress or run bundles.
170
+
171
+ ## Progress and visibility
172
+
173
+ Sanity Check keeps the existing `pi-workflows.progress.v1` records and keys:
107
174
 
108
175
  ```text
109
- --mode json
110
- --print
111
- --no-session
112
- --no-extensions
113
- --no-skills
114
- --no-context-files
115
- --tools read,grep,find,ls
176
+ agents/review
177
+ agents/review/necessity
178
+ agents/review/duplication
179
+ agents/review/contracts
180
+ agents/review/scope_tests
181
+ agents/verification
182
+ agents/verification/verification
116
183
  ```
117
184
 
118
- Serial mode starts one combined review and then one verification session. Parallel mode starts the four focused reviews concurrently, waits for all of them, and then starts one verification session. Cancellation and timeout stop every affected child process. Output and error text are bounded. Serialized evidence and review results are also bounded before prompt construction, with an explicit truncation marker when the full input does not fit.
185
+ Aggregate tracks report completed and total sessions. Child tracks report a bounded role label, the verified actual model when known, and a safe phase such as `starting`, `thinking`, `tool: read`, `finalizing`, or a terminal phase.
119
186
 
120
- The workflow validates its input and every model result. A missing child result, failed child process, malformed result, cancellation, or timeout fails the active action with a clear bounded error.
187
+ Updates are deduplicated, throttled, and observational. They cannot change agent execution.
121
188
 
122
- ## Documentation
189
+ The Pi widget shows the aggregate plus failed and active children within its ten-line limit. `piw` shows all durable child tracks and samples. Both views use existing progress records. No new persisted field or schema is added.
123
190
 
124
- Add `sanity-check` to the built-in workflow list and document its input, review modes, read-only session boundary, result, and notification behavior in `docs/workflows.md`. Keep this plan as the record of the selected implementation.
191
+ ## Ordered assistant reports
125
192
 
126
- ## Tests
193
+ After strict verification succeeds, an assistant-message `agent` shows the complete bounded report. Its prompt supplies the deterministic report and requires a verbatim response without tools. A mismatch stops before summary generation. This replaces the old final workflow notification.
194
+
195
+ The graph then includes `plain-summary`. The summarizer receives the verified verdict and detailed report, keeps the verdict, and writes one short plain-language response. It uses the plain-summary workflow limits of 2,000 characters and five sentences. The detailed response always settles before the summary starts.
196
+
197
+ Neither response uses `presentationPrompt`, and neither can change the verified verdict. A final compute node returns the original strict `SanityCheckResult` as the workflow result. Both visible responses and their normal assistant receipts use existing Pi session and SQLite records. A detached host parks before these session-visible nodes until the origin Pi session can continue them.
198
+
199
+ ## Implementation plan
127
200
 
128
- Unit tests must cover:
201
+ 1. Update the Pi SDK development baseline to one compatible 0.84.x release. Keep the Pi coding-agent, Pi AI, and Pi TUI packages aligned and set an honest peer compatibility floor. Do not add Pi Factory or a provider extension as a dependency.
202
+ 2. Add the private dispatch and child extension profile contracts under `src/builtins`. Do not export them from package entry points.
203
+ 3. Resolve enabled extension paths without execution. Canonicalize paths, exclude project extensions by default, and exclude direct and wrapper Pi Workflows paths.
204
+ 4. Add the no-session extension preflight. Identify the exact native or legacy provider owner and reject reserved workflow capabilities, provider conflicts, load errors, and built-in tool overrides.
205
+ 5. Keep the model-catalog snapshot work, but change it to one validated group snapshot and one clone per child. Add the same ownership for ordinary Pi credentials. Remove the previous empty-catalog behavior.
206
+ 6. Replace the shared group `ModelRuntime` with one complete runtime per child.
207
+ 7. Verify exact provider, model, thinking, authentication, admitted extensions, active tools, and tool sources before every prompt.
208
+ 8. Complete provider, extension, and session cleanup on every exit path.
209
+ 9. Pass the private profile and exact dispatch through Sanity Check without changing its review behavior or progress schema. Remove any `--no-extensions` launch guidance.
210
+ 10. Add the ordered detailed assistant response and included plain summary, then return the original verified result from a final compute node.
211
+ 11. Change the built-in Sanity Check revision from 3 to 4 for the presentation graph change.
212
+ 12. Add temporary fixture extensions and full unit, integration, interactive Pi, and standalone host coverage.
213
+ 13. Update this plan and `docs/workflows.md` to match the shipped behavior.
214
+ 14. Run the complete repository gate and inspect the full public diff.
215
+ 15. After mock-provider verification of the provider architecture, run one bounded real acceptance on OpenClaw pull request 126028 with `openai-codex/gpt-5.6-sol` and high thinking. Abort immediately if any child reports another provider or model. Do not modify OpenClaw.
129
216
 
130
- - input validation and the serial default;
131
- - serial mode starting exactly one review session and one verification session;
132
- - parallel mode starting exactly four concurrent review sessions and one verification session;
133
- - the four required review areas;
134
- - the acceptance case and evidence requirements in every review prompt;
135
- - read-only child tool arguments and disabled session, extension, and skill discovery;
136
- - structured result validation and all five verdicts;
137
- - unsupported and conflicting finding handling in the verification prompt;
138
- - bounded output and error handling;
139
- - child failure, malformed output, timeout, cancellation, and process cleanup;
140
- - final notification delivery without a model turn;
141
- - built-in discovery and export behavior.
217
+ ## Revision and compatibility
142
218
 
143
- The real-Pi end-to-end test must use the repository test provider. It must not call a real model or make destructive changes.
219
+ Sanity Check revision 3 introduced the provider-first child runtime. Revision 4 replaces the final notification with the ordered detailed and plain assistant responses.
144
220
 
145
- Before completion, run all checks required by `AGENTS.md`:
221
+ This is an alpha hard cutover. Do not retain the revision-3 notification graph, compatibility runner, migration, alias, dual path, or feature flag. An unfinished revision-3 run must fail with clear cancel-and-restart guidance. Terminal older runs remain readable historical evidence because the persisted schema does not change.
222
+
223
+ ## Tests
224
+
225
+ Unit and integration tests must cover:
226
+
227
+ - dispatch parsing and exact provider, model, and thinking enforcement;
228
+ - missing authentication and no fallback;
229
+ - extension path resolution, canonicalization, scope filtering, disabled paths, and explicit behavior paths;
230
+ - direct and wrapper Pi Workflows exclusion;
231
+ - native and legacy provider-owner discovery;
232
+ - reserved workflow command and tool rejection;
233
+ - inactive extension tools and built-in tool override rejection;
234
+ - per-child runtime, provider, extension, loader, and history isolation under parallel execution;
235
+ - validated model and credential snapshots, deep clones, cancellation, malformed input, and no writes;
236
+ - provider-owned mock authentication without credential exposure;
237
+ - success, provider error, empty output, malformed output, oversized output, timeout, cancellation, fail-fast, and cleanup-error precedence;
238
+ - final-only retention and absence of private child content in results, errors, updates, and bundles;
239
+ - serial two-session and parallel five-session behavior;
240
+ - existing progress keys, model labels, throttling, and rendering;
241
+ - interactive Pi with normal extensions enabled and the local mock provider;
242
+ - standalone `WorkflowHost` through the same private runtime path;
243
+ - no child session files or child workflow runs;
244
+ - built-in revision 4 and historical terminal run reading;
245
+ - one full detailed assistant response followed by one short plain-language assistant response;
246
+ - unchanged strict final result after both visible responses;
247
+ - no final notification or root presentation turn.
248
+
249
+ Tests use mock providers and temporary directories. They do not call real models or write outside temporary directories.
250
+
251
+ Before completion, run:
146
252
 
147
253
  ```bash
148
254
  npm run check
@@ -151,25 +257,41 @@ npx slophammer-ts@latest dry .
151
257
  npx slophammer-ts@latest check . --only ts.dependency-boundaries-required
152
258
  ```
153
259
 
260
+ After these checks and Pi Reviewer pass, perform the one explicitly authorized bounded GPT-5.6 Sol acceptance run.
261
+
154
262
  ## Acceptance criteria
155
263
 
156
264
  The implementation is complete when:
157
265
 
158
- - `/workflow sanity-check` discovers and starts the built-in workflow;
159
- - omitted mode selects serial mode;
160
- - serial mode uses two temporary model sessions;
161
- - parallel mode uses five temporary model sessions, with the four review sessions running concurrently;
162
- - child sessions have only read-only repository tools and create no session files;
163
- - both modes cover all required review questions and the case for accepting the design;
164
- - final verification rejects unsupported claims and requires exact repository evidence;
165
- - the final verdict is one of the five selected values;
166
- - the origin session receives the report without another model turn;
167
- - documentation and all required checks pass.
266
+ - `/workflow sanity-check` discovers built-in revision 4;
267
+ - the parent Pi process runs with its normal configured extensions;
268
+ - serial mode uses two independent in-memory SDK sessions;
269
+ - parallel mode uses five independent in-memory SDK sessions, with four reviews running concurrently;
270
+ - every child loads the extension that owns the exact configured provider;
271
+ - every child reports the exact required provider, model, and thinking level before prompting;
272
+ - no child silently falls back to OpenRouter, Kimi, a local model, or another dispatch;
273
+ - children use only verified built-in read-only tools and create no session files;
274
+ - children cannot use normal workflow tools, commands, identifiers, or callbacks;
275
+ - the workflow keeps only bounded final answers and safe operational facts;
276
+ - child prompts, reasoning, tool payloads, histories, credentials, and extension state do not enter run bundles or progress updates;
277
+ - provider, extension, and session cleanup completes on every exit path;
278
+ - Sanity Check review behavior, strict validation, verdicts, and progress remain unchanged;
279
+ - the full detailed assistant response appears before the short plain-language summary;
280
+ - the final workflow result remains the strict verified result;
281
+ - interactive and headless runs use the same private SDK path, while session-visible reports wait for the origin Pi session;
282
+ - all required checks pass with coverage margin;
283
+ - the bounded acceptance run on OpenClaw pull request 126028 reports GPT-5.6 Sol for every child and completes with a strict verdict without modifying OpenClaw.
168
284
 
169
285
  ## Contract impact
170
286
 
171
- - **Origin session:** The normal workflow start record and one final workflow notification.
172
- - **Other persistent data:** The normal workflow run bundle only. Child Pi sessions are not saved.
173
- - **Pi internals:** None.
174
- - **Pi public API:** Existing documented CLI and extension behavior only.
175
- - **Pi Workflows public API:** Existing workflow definitions and `action`, `compute`, and `notify` nodes only.
287
+ - **Origin session:** The normal workflow start record, one detailed assistant response, and one short plain-language assistant response.
288
+ - **Parent extensions:** The parent Pi process loads its normal configured extensions.
289
+ - **Child extensions:** Only the exact provider owner and explicit private behavior paths are admitted.
290
+ - **Child sessions:** Independent in-memory contexts and complete per-child runtimes in the same Node process. No child session file or child workflow run.
291
+ - **Model dispatch:** Exact provider, model, and thinking are required. Fallback is forbidden.
292
+ - **Credentials:** Pi Workflows does not copy or persist credentials. Provider extensions use their existing stores in place.
293
+ - **Other persistent data:** The normal workflow run bundle and existing progress updates only.
294
+ - **Private content:** Prompts, reasoning, intermediate messages, tool payloads, histories, credentials, and extension-private state are not persisted by Pi Workflows.
295
+ - **Pi public API:** Documented package manager, resource loader, extension and provider registration, model runtime, session, event, abort, and disposal APIs only.
296
+ - **Pi Workflows public API:** No change.
297
+ - **Isolation:** Workflow capability is withheld from normal child bindings. Arbitrary trusted in-process extension code is not sandboxed.
@@ -0,0 +1,200 @@
1
+ ---
2
+ title: Make Monitor finish authorized goals
3
+ author: Onur Solmaz <2453968+osolmaz@users.noreply.github.com>
4
+ date: 2026-08-22
5
+ status: implemented
6
+ ---
7
+
8
+ # Goal-finishing Monitor plan
9
+
10
+ ## Goal
11
+
12
+ Change the built-in Monitor workflow so it finishes the user's authorized goal instead of only checking it.
13
+
14
+ A request such as "resume this work and monitor it" must resume the work, prove that useful work is moving, and then check it on schedule. Monitor continues until the full goal is complete or cannot continue safely.
15
+
16
+ The canonical behavior is specified in [Built-in monitor](../MONITOR.md).
17
+
18
+ ## Boundaries
19
+
20
+ The implementation must:
21
+
22
+ - preserve the full goal and authority from `task`, `stopWhen`, repository instructions, and the conversation
23
+ - keep the first observation read-only
24
+ - use normal Pi tools for observations and actions
25
+ - keep only `task`, `stopWhen`, `everyMinutes`, and `maxChecks` as public inputs
26
+ - reject unknown input fields before run creation
27
+ - keep target processes and systems independent of Pi Workflows
28
+ - use the existing plan-change and Autoimplement workflows for real repairs
29
+ - keep normal starts, resumes, and restarts direct and small
30
+ - stop before an action exceeds authority, cost, provider, runtime, credential, or safety limits
31
+ - stop paid workers before repairing a shared code or data defect
32
+ - avoid compatibility aliases or shims for removed alpha inputs and routes
33
+
34
+ The work may change the Pi Workflows source, Monitor tests, the Monitor skill, and relevant documentation. It may run local checks and the non-destructive real-Pi end-to-end suite. It may commit and push the verified change directly to `origin/main`.
35
+
36
+ The work must not:
37
+
38
+ - add a target-specific Pi API, transport, schema, store, file, command, service, or dependency
39
+ - copy the planning, documentation, implementation, review, or delivery logic from existing workflows
40
+ - open a pull request
41
+ - deploy, publish an npm package, or create a release
42
+ - change OnurPi or another repository
43
+
44
+ ## Selected design
45
+
46
+ ### Strict input
47
+
48
+ Replace the Monitor input parser with strict validation for:
49
+
50
+ - `task`
51
+ - `stopWhen`
52
+ - `everyMinutes`
53
+ - `maxChecks`
54
+
55
+ Keep the full goal, scope, authority, constraints, and recovery contract in `task` instead of adding process-specific or provider-specific fields. Reject all other fields with a direct unsupported-field error.
56
+
57
+ ### Read-only observation
58
+
59
+ Replace the current check result with a read-only observation result. Its route is one of:
60
+
61
+ - `wait`: Work is moving, or an external event must finish.
62
+ - `act`: The goal is incomplete and a safe authorized action is available.
63
+ - `stop`: The goal is complete or cannot continue safely.
64
+
65
+ The observation records goal state and target work state separately. It includes factual evidence, the safe actions already authorized by the user, optional progress, a stable target-state ID, and a concise report.
66
+
67
+ An `act` result also includes:
68
+
69
+ - action kind: `advance`, `recover`, or `repair`
70
+ - what is incomplete
71
+ - evidence that proves it
72
+ - the exact next action
73
+ - why existing authority covers it
74
+ - files, systems, and resources it may change
75
+ - how to verify it
76
+ - a stable failure ID
77
+
78
+ The observation cannot grant new authority.
79
+
80
+ ### Direct action step
81
+
82
+ Add one mutation-capable agent step that uses normal Pi tools. It performs only the action stated by the observation.
83
+
84
+ Route `advance` and `recover` directly to this step. These actions cover normal starts, resumes, restarts, next commands, launch-file refreshes, safe retries, and verified checkpoint continuation. They do not run planning or documentation workflows.
85
+
86
+ The step returns a factual success, failure, or blocked result with verification evidence.
87
+
88
+ ### Existing repair path
89
+
90
+ Route `repair` through the existing shared plan-change workflow and Autoimplement workflow. Pass the observed defect, evidence, repository, authority, constraints, and delivery boundaries into those workflows.
91
+
92
+ Do not copy or replace their design, documentation, approval, implementation, test, review, or delivery behavior.
93
+
94
+ Stop affected paid workers at safe boundaries before repairing a shared code or data defect.
95
+
96
+ ### Immediate verification
97
+
98
+ Run a new read-only observation immediately after every direct action or completed repair. Do not schedule or sleep first.
99
+
100
+ The immediate observation must establish one of these states:
101
+
102
+ - the goal is complete
103
+ - useful work is moving
104
+ - the action failed in a new way
105
+ - the same failure returned
106
+ - a blocker exists
107
+
108
+ Only the `wait` route can publish the next schedule and enter the timer.
109
+
110
+ ### Repeated failure guard
111
+
112
+ Store stable failure and target-state IDs in accepted outputs. After one repair completes, compare the next observation with prior repaired failures.
113
+
114
+ If the same failure ID and target-state ID return, stop. Do not run the same repair cycle again.
115
+
116
+ A failed direct action can produce a new `recover` action when the new observation proves that recovery is authorized. All loops remain bounded by accepted observations and the Monitor safety limit.
117
+
118
+ ### Reports
119
+
120
+ Format every observation report with separate facts for:
121
+
122
+ - Monitor state
123
+ - goal state
124
+ - target work state
125
+ - factual progress when available
126
+ - last action or next action
127
+ - next check when scheduled
128
+
129
+ Never report target work as running only because Monitor is active.
130
+
131
+ ### Workflow graph
132
+
133
+ ```text
134
+ observe
135
+ ├─ stop → finish
136
+ ├─ wait → report → schedule → sleep → observe
137
+ └─ act
138
+ ├─ advance → direct action → observe immediately
139
+ ├─ recover → direct action → observe immediately
140
+ └─ repair → plan change → Autoimplement → observe immediately
141
+ ```
142
+
143
+ The timer belongs only on the `wait` path.
144
+
145
+ ## Implementation steps
146
+
147
+ 1. Replace Monitor's public input parser with strict validation for `task`, `stopWhen`, `everyMinutes`, and `maxChecks` only.
148
+ 2. Replace `continue`, `repair`, and `stop` observation routes with `wait`, `act`, and `stop`.
149
+ 3. Add structured goal state, work state, evidence, progress, stable IDs, and complete action details to observation output validation.
150
+ 4. Add the direct mutation-capable action step for `advance` and `recover`.
151
+ 5. Keep the existing shared plan-change and Autoimplement includes for `repair`.
152
+ 6. Route every action result directly back to read-only observation.
153
+ 7. Route only `wait` through report, schedule, sleep, and the next observation.
154
+ 8. Add the repeated repaired-failure guard using stable failure and target-state IDs.
155
+ 9. Update report formatting so Monitor, goal, and target work states remain separate.
156
+ 10. Update the Monitor skill and workflow documentation for the new graph and simple input contract.
157
+ 11. Replace and extend Monitor tests for the new behavior.
158
+ 12. Run all required checks, review the diff, commit, and push directly to `origin/main`.
159
+
160
+ ## Tests
161
+
162
+ Add tests for these cases:
163
+
164
+ 1. The goal is already complete.
165
+ 2. Work is active, so Monitor waits.
166
+ 3. Work is idle, so Monitor starts it.
167
+ 4. Saved work exists, so Monitor resumes it.
168
+ 5. An action succeeds, so Monitor observes again immediately.
169
+ 6. An action fails once, then recovery succeeds.
170
+ 7. The same repaired failure returns, so Monitor stops.
171
+ 8. An action is outside authority, so Monitor stops.
172
+ 9. A paid action exceeds the limit, so Monitor does not launch it.
173
+ 10. Monitor is active while the target is idle.
174
+ 11. The target completes between timed observations.
175
+ 12. Unknown input fields fail clearly before run creation.
176
+ 13. A normal restart does not trigger planning or documentation.
177
+ 14. A real code defect uses the existing repair path.
178
+ 15. No target-specific monitoring API is required.
179
+
180
+ Keep applicable existing tests for progress, reports, notifications, schedule updates, safety limits, cancellation, interruption, resume, and the widget.
181
+
182
+ ## Verification
183
+
184
+ Run:
185
+
186
+ ```bash
187
+ npm run check
188
+ npm run test:e2e
189
+ npx slophammer-ts@latest dry .
190
+ npx slophammer-ts@latest check . --only ts.dependency-boundaries-required
191
+ git diff --check
192
+ ```
193
+
194
+ Review the full diff and fix each valid issue before delivery.
195
+
196
+ ## Delivery
197
+
198
+ Commit the verified change with a Conventional Commit message and push it directly to `origin/main` without a pull request.
199
+
200
+ Do not deploy, publish, or create a release.