pi-harness-runtime 1.1.492 → 1.1.494

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 (57) hide show
  1. package/CHANGELOG.md +141 -0
  2. package/harness/jev-wait-eligibility.ts +249 -0
  3. package/harness/provider-recovery-runtime.ts +9 -0
  4. package/harness/provider-recovery.ts +34 -0
  5. package/index.ts +263 -63
  6. package/package.json +1 -1
  7. package/packages/agent-policy/package.json +1 -1
  8. package/packages/auth/package.json +1 -1
  9. package/packages/autonomous-runtime/package.json +1 -1
  10. package/packages/checkpoint/package.json +1 -1
  11. package/packages/clipboard/package.json +1 -1
  12. package/packages/codex-watcher/package.json +1 -1
  13. package/packages/config-capture/package.json +1 -1
  14. package/packages/contracts/package.json +1 -1
  15. package/packages/cookie-sanitizer/package.json +1 -1
  16. package/packages/evaluation-engine/package.json +1 -1
  17. package/packages/event-bus/package.json +1 -1
  18. package/packages/event-store/package.json +1 -1
  19. package/packages/experience-replay/package.json +1 -1
  20. package/packages/file-copy-helper/package.json +1 -1
  21. package/packages/intent-analyzer/package.json +1 -1
  22. package/packages/jev-judge/dist/wait-lifecycle.d.ts +22 -1
  23. package/packages/jev-judge/dist/wait-lifecycle.d.ts.map +1 -1
  24. package/packages/jev-judge/dist/wait-lifecycle.js +28 -0
  25. package/packages/jev-judge/dist/wait-lifecycle.js.map +1 -1
  26. package/packages/jev-judge/package.json +1 -1
  27. package/packages/jev-judge/src/wait-lifecycle.ts +49 -0
  28. package/packages/knowledge-retrieval/package.json +1 -1
  29. package/packages/learning-engine/package.json +1 -1
  30. package/packages/logging/package.json +1 -1
  31. package/packages/memory-engine/package.json +1 -1
  32. package/packages/notification/dist/pending-question.d.ts +9 -0
  33. package/packages/notification/dist/pending-question.d.ts.map +1 -1
  34. package/packages/notification/dist/pending-question.js +1 -0
  35. package/packages/notification/dist/pending-question.js.map +1 -1
  36. package/packages/notification/package.json +1 -1
  37. package/packages/notification/src/pending-question.ts +10 -0
  38. package/packages/paperclip-integration/package.json +1 -1
  39. package/packages/performance-optimizer/package.json +1 -1
  40. package/packages/privilege-broker/package.json +1 -1
  41. package/packages/prompt-compiler/package.json +1 -1
  42. package/packages/providers/package.json +1 -1
  43. package/packages/qdrant-skills/package.json +1 -1
  44. package/packages/quota-manager/package.json +1 -1
  45. package/packages/relay/package.json +1 -1
  46. package/packages/skill-mcp-client/package.json +1 -1
  47. package/packages/skills/package.json +1 -1
  48. package/packages/todo-bd-sync/package.json +1 -1
  49. package/packages/token-estimation/package.json +1 -1
  50. package/packages/tooling-preference/package.json +1 -1
  51. package/packages/trajectory/package.json +1 -1
  52. package/packages/tui/package.json +1 -1
  53. package/packages/two-phase-review/package.json +1 -1
  54. package/packages/types/package.json +1 -1
  55. package/packages/webmcp-tester/package.json +1 -1
  56. package/packages/wiki/package.json +1 -1
  57. package/packages/write-review/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,147 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.494](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.494) (2026-11-09)
6
+
7
+
8
+ ### Features
9
+
10
+ * **actions:** register the job resume, the GLM countdown and the queued continuations ([177c964](https://github.com/ManotLuijiu/pi-harness-runtime/commit/177c964555b0057e6bc7d293dafab10c95eabbf9))
11
+ * **delegation:** a child is only a child when it really ran ([ac4e678](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ac4e6782d7d4bc4941e458425c8a9f38a51fc9d4))
12
+ * **delegation:** the scope of a request is measured before it is judged ([684b6a5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/684b6a55184f63d3be24c48dcecfb0b13410dc15))
13
+ * **honcho:** the memory service speaks the native MCP of Pi ([f9f740c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f9f740c12869bae4c4380afbe8c76e12388bb744))
14
+ * **jev:** one decision per question, bound to the question it was evaluated for ([03448aa](https://github.com/ManotLuijiu/pi-harness-runtime/commit/03448aaa17f2d0c3bcf644b0b1d5949727dfff8c))
15
+ * **jev:** the evaluation of a choice sees what the options mean ([f0c207e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f0c207e074701e6b7dab0965170ec39453d9d502))
16
+ * **jev:** the pending question carries the ask and the answer ([a792133](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a792133e517fb8c12d3363e98942f3af30270f27))
17
+ * **jev:** the pending question counts down to the decision ([d0cc171](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0cc171223986b2d32c670b6c1c74712fe0a4ad8))
18
+ * **keys:** tell the user what to do about an exposed key file ([7031003](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7031003574307351b7a8f28ee14159b58e17b793))
19
+ * **keys:** the key files are repaired when their permissions are unsafe ([e9c2c26](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e9c2c26b287665b56ed749de269737e8403bb8af))
20
+ * **mcp:** the harness connects the registered servers when nobody else does ([7fef951](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7fef95137ad4664df57f045cd91b7d233315b0bc))
21
+ * **merge:** a manual run can leave the merge to the pull request event ([b3d1950](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b3d1950b5941c78ccd56951acdafd1d4afbe1bff))
22
+ * **phase:** the agent owns the todo list and the harness says so ([c489370](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c489370bd7926aece8cb1a77aa20ca2d2672f1fb))
23
+ * **providers:** a shared registry of the pending automatic actions and a bounded recovery ([c5f955b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c5f955bc82adcb6999a89d5bc278fa87fccee022))
24
+ * **providers:** one failure has one executor, and the retry bridge is checked ([e73c4c7](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e73c4c76ff20a9708083659bdcefe74870a84837))
25
+ * **review:** the review starts on its own when the implementation is done ([04f51f5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/04f51f599cd3222b6c74dd8fadb1373bd72d9bd7))
26
+ * **status:** the status line names the phase, the progress and the children ([0167bf3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0167bf396a0b987c1d44f3b869351976a951dd65))
27
+ * **test:** the task waits for the final tier of the validation plan ([fa147db](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa147dbf7d50d56e6ea48c6d8fbb4fcb190caf8a))
28
+ * **validation:** a large job starts with a measured pilot ([425964b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/425964b04a3d4fa02adfabed47ff62c5ec2b9c28))
29
+ * **validation:** the size of a job is a fact, not a phrase ([8aa6c11](https://github.com/ManotLuijiu/pi-harness-runtime/commit/8aa6c119565d0f8412dc8aeafa6b295d47d3f093))
30
+ * **workspace:** a Frappe bench names the mode of the workspace ([9d58517](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d585172063a330992fee933316e268ae9985e3c))
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * **ci:** every run of a required check counts, and the worst one decides ([da9e0da](https://github.com/ManotLuijiu/pi-harness-runtime/commit/da9e0da6b0ca29cb320764fd5fc1b8a8dee8b1e0))
36
+ * **ci:** the newest attempt of a run decides, not the attempt that failed ([9d7adcc](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d7adcc31cbacc517c3c1a9bcd3956be94c908ef))
37
+ * **honcho:** a handshake that never finishes is named instead of hanging the startup ([d66005f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d66005f928a4f8df5de5b8a0579cbd4f8df37ff9))
38
+ * **honcho:** a probe that the end of the session cuts off is not a failure ([493fd93](https://github.com/ManotLuijiu/pi-harness-runtime/commit/493fd938ba09fdcf57bed4aaf259d81c4040909e))
39
+ * **honcho:** a slow connector is not a failed one, the row is corrected when the tools appear ([b62ac5b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b62ac5b16ad93e2bfb10cbec589b80a09b7e20b3))
40
+ * **honcho:** a tools listing that the end of the session cuts off is not a failure ([62cc8c3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/62cc8c376aade01c953ce2a1c6501ed07b74a1e9))
41
+ * **honcho:** the report names the state of the MCP server, not the registration ([762f4d5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/762f4d59e4eabcab9a1c21a61aa522c3267621b3))
42
+ * **hooks:** a tag is checked through the commit behind it ([c823e8e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c823e8e1f6973c62b5449a97c101759a4d5cbba5))
43
+ * **jev:** a prohibition must not hide a destructive action ([78a6cc1](https://github.com/ManotLuijiu/pi-harness-runtime/commit/78a6cc199e647f812e145483f7e94991358d8f34))
44
+ * **jev:** a refusal without punctuation, and only a decline of an action ([ef3dbf8](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ef3dbf87a2a1725373281613a0d48881ed5d2239))
45
+ * **jev:** a rejection during the countdown pauses the work ([9b018ce](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9b018ce1152b6724dee73cdc901b8a360ecc91ab))
46
+ * **jev:** a session switch ends the wait of the old session ([ca03d39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ca03d399c0d4a1b2dd428ac39836ab53c0e51ab6))
47
+ * **jev:** keep a comparative caveat with the option it constrains ([7be306b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7be306b0d0872713ebca9386d613ae5a8da9d5b6))
48
+ * **jev:** the action of the question on its own text, and a reply is not an authorization ([7c3fdd6](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7c3fdd6822b58bd6ccfa3bcdf1c5282cb3db52dd))
49
+ * **jev:** the action of the question, and an open question blocks the work ([1f9ff39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1f9ff39efc4ee17464c54c2ca9b583245093dbac))
50
+ * **jev:** the alternatives of a question are parsed without a quadratic pattern ([63016a3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/63016a3f0488acb801990dd46770c00d382b5858))
51
+ * **jev:** the countdown of an obsolete question does not outlive the work ([fe78b29](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fe78b29e6fc513b11a6993bc68fd9418dc77f79b))
52
+ * **jev:** the facts of an option survive the wording of the agent ([5a6250c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5a6250c07aa8d965bc6ae242cccbf519477598f8))
53
+ * **keys:** the key directory is audited as a tree ([081cc75](https://github.com/ManotLuijiu/pi-harness-runtime/commit/081cc75ac8ceff36b0d619c3f76371dc08459d3c))
54
+ * **mcp:** the connector and the watcher stop with the session ([4d1b87d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/4d1b87d14d015749025b62bf54d6d0b6137295f7))
55
+ * **mcp:** the connector survives a runtime that cannot list the servers ([d0f555f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0f555fa14f51de33591e572a41ded5b59a3e4dd))
56
+ * **merge:** the boolean input is read as a boolean ([971b716](https://github.com/ManotLuijiu/pi-harness-runtime/commit/971b7169a43db382dbdeb6bb9bab02ab56e0351c))
57
+ * **merge:** the manual job needs the right of the merge ([7ba685e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7ba685ec43d815f90aa35b742579e87e76c69209))
58
+ * **merge:** the merge of the pull request is the GraphQL mutation ([972bab4](https://github.com/ManotLuijiu/pi-harness-runtime/commit/972bab4b0f7faf1b0047f3bb767ef6db3de4b2fa))
59
+ * **merge:** the workflow merges the pull request the gates cleared ([d7639ec](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d7639ec9b83723510acb4a5c4e23d5d6167c3af6))
60
+ * **providers:** the escape of the user stops the recovery, and a permanent failure clears it ([cfe5797](https://github.com/ManotLuijiu/pi-harness-runtime/commit/cfe57976bf463c327e45b874fd297c3e942246b8))
61
+ * **providers:** the pause wins over a retry, and the retry starts when the run settles ([e016dd2](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e016dd2a5add5b0f3c848a225a28a59e0f5fc7f3))
62
+ * **recovery:** a cancelled countdown does not own the next attempt ([7b79f30](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7b79f301389fae48201e696d3086d257ed722fb9))
63
+ * **recovery:** a cancelled retry of Pi is a cancelled decision, a spent budget is not ([7e13f15](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7e13f156a279cded2b2d4b0c99358100b3d5e038))
64
+ * **recovery:** a manual request takes the work back from the countdown ([fa81d8f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa81d8fd9d6160166a095e07bdf17049bbafa32d))
65
+ * **recovery:** the predicate of Pi decides the retry, the provider identity is normalized ([6c8c17b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/6c8c17b53302cea1602d192251eacd0ebbd3e8c9))
66
+ * **release:** a manual release keeps the version of its manifest ([122e661](https://github.com/ManotLuijiu/pi-harness-runtime/commit/122e661ea48cb8aff14c71dbd0221a4cf0ba4c8e))
67
+ * **release:** the alignment names the reason of a failure ([5814dd0](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5814dd0b780f5839cf8011ed0cbbbb31e7eb0418))
68
+ * **release:** the channels of the package name the release ([a7a273f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a7a273ffe8398e2b5b07ef1c321777de41792c6e))
69
+ * **release:** the release publishes and leaves the channels alone ([5871746](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5871746589c1281d855dbeb591b02419fa43f22e))
70
+ * **release:** the release pull request names the version of its branch ([a846e83](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a846e83e6de6e529f4bca05e869db0b5eebb37c5))
71
+ * **release:** the release scans the tree of the commit it publishes ([7d47a0b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7d47a0b5406480a1e1d3a52623a76aabd1e2d0ba))
72
+ * **workspace:** a strong bench signal decides, and the question is not a fact of an option ([303a828](https://github.com/ManotLuijiu/pi-harness-runtime/commit/303a828f55aa7c4e0a611231f482489b530ff5a3))
73
+ * **workspace:** keep a client name out of the comment about the search depth ([b572e0a](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b572e0af16ff562203bda2b5c47b41807cff5a95))
74
+ * **workspace:** the repository names the mode before the mode stays unknown ([188a32c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/188a32c7a6af1465dd24714278fccc73d06f6477))
75
+
76
+ ### [1.1.493](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.493) (2026-11-09)
77
+
78
+
79
+ ### Features
80
+
81
+ * **actions:** register the job resume, the GLM countdown and the queued continuations ([177c964](https://github.com/ManotLuijiu/pi-harness-runtime/commit/177c964555b0057e6bc7d293dafab10c95eabbf9))
82
+ * **delegation:** a child is only a child when it really ran ([ac4e678](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ac4e6782d7d4bc4941e458425c8a9f38a51fc9d4))
83
+ * **delegation:** the scope of a request is measured before it is judged ([684b6a5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/684b6a55184f63d3be24c48dcecfb0b13410dc15))
84
+ * **honcho:** the memory service speaks the native MCP of Pi ([f9f740c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f9f740c12869bae4c4380afbe8c76e12388bb744))
85
+ * **jev:** one decision per question, bound to the question it was evaluated for ([03448aa](https://github.com/ManotLuijiu/pi-harness-runtime/commit/03448aaa17f2d0c3bcf644b0b1d5949727dfff8c))
86
+ * **jev:** the evaluation of a choice sees what the options mean ([f0c207e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f0c207e074701e6b7dab0965170ec39453d9d502))
87
+ * **jev:** the pending question carries the ask and the answer ([a792133](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a792133e517fb8c12d3363e98942f3af30270f27))
88
+ * **jev:** the pending question counts down to the decision ([d0cc171](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0cc171223986b2d32c670b6c1c74712fe0a4ad8))
89
+ * **keys:** tell the user what to do about an exposed key file ([7031003](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7031003574307351b7a8f28ee14159b58e17b793))
90
+ * **keys:** the key files are repaired when their permissions are unsafe ([e9c2c26](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e9c2c26b287665b56ed749de269737e8403bb8af))
91
+ * **mcp:** the harness connects the registered servers when nobody else does ([7fef951](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7fef95137ad4664df57f045cd91b7d233315b0bc))
92
+ * **merge:** a manual run can leave the merge to the pull request event ([b3d1950](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b3d1950b5941c78ccd56951acdafd1d4afbe1bff))
93
+ * **phase:** the agent owns the todo list and the harness says so ([c489370](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c489370bd7926aece8cb1a77aa20ca2d2672f1fb))
94
+ * **providers:** a shared registry of the pending automatic actions and a bounded recovery ([c5f955b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c5f955bc82adcb6999a89d5bc278fa87fccee022))
95
+ * **providers:** one failure has one executor, and the retry bridge is checked ([e73c4c7](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e73c4c76ff20a9708083659bdcefe74870a84837))
96
+ * **review:** the review starts on its own when the implementation is done ([04f51f5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/04f51f599cd3222b6c74dd8fadb1373bd72d9bd7))
97
+ * **status:** the status line names the phase, the progress and the children ([0167bf3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0167bf396a0b987c1d44f3b869351976a951dd65))
98
+ * **test:** the task waits for the final tier of the validation plan ([fa147db](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa147dbf7d50d56e6ea48c6d8fbb4fcb190caf8a))
99
+ * **validation:** a large job starts with a measured pilot ([425964b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/425964b04a3d4fa02adfabed47ff62c5ec2b9c28))
100
+ * **validation:** the size of a job is a fact, not a phrase ([8aa6c11](https://github.com/ManotLuijiu/pi-harness-runtime/commit/8aa6c119565d0f8412dc8aeafa6b295d47d3f093))
101
+ * **workspace:** a Frappe bench names the mode of the workspace ([9d58517](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d585172063a330992fee933316e268ae9985e3c))
102
+
103
+
104
+ ### Bug Fixes
105
+
106
+ * **ci:** every run of a required check counts, and the worst one decides ([da9e0da](https://github.com/ManotLuijiu/pi-harness-runtime/commit/da9e0da6b0ca29cb320764fd5fc1b8a8dee8b1e0))
107
+ * **ci:** the newest attempt of a run decides, not the attempt that failed ([9d7adcc](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d7adcc31cbacc517c3c1a9bcd3956be94c908ef))
108
+ * **honcho:** a handshake that never finishes is named instead of hanging the startup ([d66005f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d66005f928a4f8df5de5b8a0579cbd4f8df37ff9))
109
+ * **honcho:** a probe that the end of the session cuts off is not a failure ([493fd93](https://github.com/ManotLuijiu/pi-harness-runtime/commit/493fd938ba09fdcf57bed4aaf259d81c4040909e))
110
+ * **honcho:** a slow connector is not a failed one, the row is corrected when the tools appear ([b62ac5b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b62ac5b16ad93e2bfb10cbec589b80a09b7e20b3))
111
+ * **honcho:** a tools listing that the end of the session cuts off is not a failure ([62cc8c3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/62cc8c376aade01c953ce2a1c6501ed07b74a1e9))
112
+ * **honcho:** the report names the state of the MCP server, not the registration ([762f4d5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/762f4d59e4eabcab9a1c21a61aa522c3267621b3))
113
+ * **hooks:** a tag is checked through the commit behind it ([c823e8e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c823e8e1f6973c62b5449a97c101759a4d5cbba5))
114
+ * **jev:** a prohibition must not hide a destructive action ([78a6cc1](https://github.com/ManotLuijiu/pi-harness-runtime/commit/78a6cc199e647f812e145483f7e94991358d8f34))
115
+ * **jev:** a refusal without punctuation, and only a decline of an action ([ef3dbf8](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ef3dbf87a2a1725373281613a0d48881ed5d2239))
116
+ * **jev:** a rejection during the countdown pauses the work ([9b018ce](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9b018ce1152b6724dee73cdc901b8a360ecc91ab))
117
+ * **jev:** a session switch ends the wait of the old session ([ca03d39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ca03d399c0d4a1b2dd428ac39836ab53c0e51ab6))
118
+ * **jev:** keep a comparative caveat with the option it constrains ([7be306b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7be306b0d0872713ebca9386d613ae5a8da9d5b6))
119
+ * **jev:** the action of the question on its own text, and a reply is not an authorization ([7c3fdd6](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7c3fdd6822b58bd6ccfa3bcdf1c5282cb3db52dd))
120
+ * **jev:** the action of the question, and an open question blocks the work ([1f9ff39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1f9ff39efc4ee17464c54c2ca9b583245093dbac))
121
+ * **jev:** the alternatives of a question are parsed without a quadratic pattern ([63016a3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/63016a3f0488acb801990dd46770c00d382b5858))
122
+ * **jev:** the facts of an option survive the wording of the agent ([5a6250c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5a6250c07aa8d965bc6ae242cccbf519477598f8))
123
+ * **keys:** the key directory is audited as a tree ([081cc75](https://github.com/ManotLuijiu/pi-harness-runtime/commit/081cc75ac8ceff36b0d619c3f76371dc08459d3c))
124
+ * **mcp:** the connector and the watcher stop with the session ([4d1b87d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/4d1b87d14d015749025b62bf54d6d0b6137295f7))
125
+ * **mcp:** the connector survives a runtime that cannot list the servers ([d0f555f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0f555fa14f51de33591e572a41ded5b59a3e4dd))
126
+ * **merge:** the boolean input is read as a boolean ([971b716](https://github.com/ManotLuijiu/pi-harness-runtime/commit/971b7169a43db382dbdeb6bb9bab02ab56e0351c))
127
+ * **merge:** the manual job needs the right of the merge ([7ba685e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7ba685ec43d815f90aa35b742579e87e76c69209))
128
+ * **merge:** the merge of the pull request is the GraphQL mutation ([972bab4](https://github.com/ManotLuijiu/pi-harness-runtime/commit/972bab4b0f7faf1b0047f3bb767ef6db3de4b2fa))
129
+ * **merge:** the workflow merges the pull request the gates cleared ([d7639ec](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d7639ec9b83723510acb4a5c4e23d5d6167c3af6))
130
+ * **providers:** the escape of the user stops the recovery, and a permanent failure clears it ([cfe5797](https://github.com/ManotLuijiu/pi-harness-runtime/commit/cfe57976bf463c327e45b874fd297c3e942246b8))
131
+ * **providers:** the pause wins over a retry, and the retry starts when the run settles ([e016dd2](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e016dd2a5add5b0f3c848a225a28a59e0f5fc7f3))
132
+ * **recovery:** a cancelled countdown does not own the next attempt ([7b79f30](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7b79f301389fae48201e696d3086d257ed722fb9))
133
+ * **recovery:** a cancelled retry of Pi is a cancelled decision, a spent budget is not ([7e13f15](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7e13f156a279cded2b2d4b0c99358100b3d5e038))
134
+ * **recovery:** a manual request takes the work back from the countdown ([fa81d8f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa81d8fd9d6160166a095e07bdf17049bbafa32d))
135
+ * **recovery:** the predicate of Pi decides the retry, the provider identity is normalized ([6c8c17b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/6c8c17b53302cea1602d192251eacd0ebbd3e8c9))
136
+ * **release:** a manual release keeps the version of its manifest ([122e661](https://github.com/ManotLuijiu/pi-harness-runtime/commit/122e661ea48cb8aff14c71dbd0221a4cf0ba4c8e))
137
+ * **release:** the alignment names the reason of a failure ([5814dd0](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5814dd0b780f5839cf8011ed0cbbbb31e7eb0418))
138
+ * **release:** the channels of the package name the release ([a7a273f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a7a273ffe8398e2b5b07ef1c321777de41792c6e))
139
+ * **release:** the release publishes and leaves the channels alone ([5871746](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5871746589c1281d855dbeb591b02419fa43f22e))
140
+ * **release:** the release pull request names the version of its branch ([a846e83](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a846e83e6de6e529f4bca05e869db0b5eebb37c5))
141
+ * **release:** the release scans the tree of the commit it publishes ([7d47a0b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7d47a0b5406480a1e1d3a52623a76aabd1e2d0ba))
142
+ * **workspace:** a strong bench signal decides, and the question is not a fact of an option ([303a828](https://github.com/ManotLuijiu/pi-harness-runtime/commit/303a828f55aa7c4e0a611231f482489b530ff5a3))
143
+ * **workspace:** keep a client name out of the comment about the search depth ([b572e0a](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b572e0af16ff562203bda2b5c47b41807cff5a95))
144
+ * **workspace:** the repository names the mode before the mode stays unknown ([188a32c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/188a32c7a6af1465dd24714278fccc73d06f6477))
145
+
5
146
  ### [1.1.492](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.492) (2026-11-09)
6
147
 
7
148
 
@@ -0,0 +1,249 @@
1
+ /**
2
+ * The eligibility of an automatic Jev wait.
3
+ *
4
+ * One decision, shared by the creation of a wait, the reconciliation with the
5
+ * finished work, the evaluation at the deadline and the application of a
6
+ * result. The rule lives here, so the four places cannot disagree.
7
+ *
8
+ * The decision answers one question: may the silence of the human be read as
9
+ * "yes"?
10
+ *
11
+ * - An offer of work that was not asked for is never answered by silence.
12
+ * It waits for an explicit new request.
13
+ * - A question about work that has been done is obsolete. It blocks
14
+ * nothing.
15
+ * - A question about work that remains keeps its policy: the judge decides
16
+ * it as before.
17
+ * - An unknown state of the work is never a completion. The question is
18
+ * preserved.
19
+ */
20
+
21
+ /**
22
+ * The state of the work of the current request.
23
+ *
24
+ * - `unfinished`: work remains, so a question can belong to it.
25
+ * - `complete`: work was there and it is done.
26
+ * - `unknown`: there is no evidence. The task list is empty, the provider is
27
+ * unavailable, or the read failed.
28
+ */
29
+ export type JevWorkState = "unfinished" | "complete" | "unknown";
30
+
31
+ /**
32
+ * What the question is about.
33
+ *
34
+ * - `current-request`: the question asks for a decision about work that
35
+ * remained when it was asked.
36
+ * - `optional-offer`: the question offers work that was not asked for.
37
+ * - `final-request`: the question asks for a decision after the work of the
38
+ * request was already done.
39
+ */
40
+ export type JevQuestionRelevance =
41
+ | "current-request"
42
+ | "optional-offer"
43
+ | "final-request";
44
+
45
+ /** The part of a todo item the rules need. */
46
+ export interface TodoStateLike {
47
+ /** The status of the item ("pending", "in_progress", "completed", ...). */
48
+ status: string;
49
+ }
50
+
51
+ /** The decision about an automatic wait. */
52
+ export interface JevWaitEligibility {
53
+ /** May the wait count down and let the judge decide? */
54
+ eligible: boolean;
55
+ /** Why, in words. */
56
+ reason: string;
57
+ }
58
+
59
+ /**
60
+ * The wordings that offer work instead of asking about the work at hand.
61
+ *
62
+ * An offer is not a question about the request: it proposes something that
63
+ * was never asked for. Silence must not authorize it, so an offer never
64
+ * reaches the judge.
65
+ *
66
+ * The list is deliberately narrow. A wording that is not in the list is
67
+ * treated as a question about the request, which keeps the judge useful.
68
+ */
69
+ const OFFER_WORDINGS: readonly RegExp[] = [
70
+ /\bwould you like me to\b/i,
71
+ /\bdo you want me to\b/i,
72
+ /\bwould you like me if\b/i,
73
+ /\bwant me to\b/i,
74
+ /\bshall i also\b/i,
75
+ /\bshould i also\b/i,
76
+ /\bcan i also\b/i,
77
+ /\banything else\b/i,
78
+ /\banything more\b/i,
79
+ /\bis there anything\b/i,
80
+ ];
81
+
82
+ /**
83
+ * Is the question an offer of work that was not asked for?
84
+ *
85
+ * The wording of the question decides, not the wording of the message around
86
+ * it: a long message that talks about many things must not turn a question
87
+ * about the request into an offer.
88
+ */
89
+ export function classifyQuestionRelevance(text: string | undefined): {
90
+ offer: boolean;
91
+ reason: string;
92
+ } {
93
+ const value = (text ?? "").trim();
94
+ if (!value) {
95
+ return { offer: false, reason: "the question has no text" };
96
+ }
97
+ for (const wording of OFFER_WORDINGS) {
98
+ if (wording.test(value)) {
99
+ return {
100
+ offer: true,
101
+ reason: "the question offers work that was not asked for",
102
+ };
103
+ }
104
+ }
105
+ return { offer: false, reason: "the question asks about the request" };
106
+ }
107
+
108
+ /**
109
+ * The state of the work, from the task list.
110
+ *
111
+ * The list must not be read as "the work is done" when it says nothing: an
112
+ * empty list is no evidence, and a list that could not be read is no
113
+ * evidence either. Only a list that had work and has none left is complete.
114
+ */
115
+ export function workStateFromTodos(
116
+ items: readonly TodoStateLike[] | null | undefined,
117
+ options: { available?: boolean; error?: string } = {},
118
+ ): JevWorkState {
119
+ if (options.available === false) {
120
+ return "unknown";
121
+ }
122
+ if (!items) {
123
+ return "unknown";
124
+ }
125
+ const relevant = items.filter((item) => item.status !== "deleted");
126
+ if (relevant.length === 0) {
127
+ // There was no work to do. That is not a proof that the request is
128
+ // finished: a question can be the reason no task was ever created.
129
+ return "unknown";
130
+ }
131
+ const unfinished = relevant.some(
132
+ (item) => item.status === "pending" || item.status === "in_progress",
133
+ );
134
+ return unfinished ? "unfinished" : "complete";
135
+ }
136
+
137
+ /**
138
+ * The relevance of a question, from its wording and the state of the work.
139
+ */
140
+ export function questionRelevance(input: {
141
+ /** The text of the question. */
142
+ text: string | undefined;
143
+ /** The state of the work when the question was asked. */
144
+ work: JevWorkState;
145
+ }): JevQuestionRelevance {
146
+ const offer = classifyQuestionRelevance(input.text);
147
+ if (offer.offer) return "optional-offer";
148
+ if (input.work === "complete") return "final-request";
149
+ return "current-request";
150
+ }
151
+
152
+ /**
153
+ * Is the open question obsolete?
154
+ *
155
+ * A question about work that has been done is obsolete: it blocks nothing
156
+ * and it keeps no countdown. A question about work that remains, and a
157
+ * question whose state is unknown, stay.
158
+ */
159
+ export function isObsoleteQuestion(input: {
160
+ /** What the question is about. */
161
+ relevance: JevQuestionRelevance;
162
+ /** The state of the work now. */
163
+ work: JevWorkState;
164
+ }): { obsolete: boolean; reason: string } {
165
+ if (input.relevance !== "current-request") {
166
+ return {
167
+ obsolete: false,
168
+ reason: "the question is not about work that remained",
169
+ };
170
+ }
171
+ if (input.work === "complete") {
172
+ return { obsolete: true, reason: "the work of the question is done" };
173
+ }
174
+ return {
175
+ obsolete: false,
176
+ reason: "the work of the question may still remain",
177
+ };
178
+ }
179
+
180
+ /**
181
+ * End an obsolete wait.
182
+ *
183
+ * The question and the wait die together: the timer, the row of the judge
184
+ * and the evaluation of that request. No answer is injected, because nobody
185
+ * answered anything.
186
+ *
187
+ * Only the owner of the wait is touched. A countdown of another owner keeps
188
+ * its deadline and its state.
189
+ */
190
+ export function clearObsoleteWait(options: {
191
+ /** The identity of the question that is closed. */
192
+ requestId: string;
193
+ /** Cancel the question of the controller. */
194
+ cancelQuestion: (reason: string) => void;
195
+ /** End the wait of the lifecycle. */
196
+ cancelWait: () => void;
197
+ /** Remove the row of the judge, when there is one. */
198
+ removeRow?: (requestId: string) => void;
199
+ /** The reason of the cleanup. */
200
+ reason?: string;
201
+ }): void {
202
+ const reason = options.reason ?? "the work of the question is done";
203
+ options.cancelQuestion(reason);
204
+ options.cancelWait();
205
+ options.removeRow?.(options.requestId);
206
+ }
207
+
208
+ /**
209
+ * May the wait count down and let the judge decide?
210
+ *
211
+ * The rules:
212
+ *
213
+ * - An offer is never eligible: the silence of the human must not start
214
+ * work that nobody asked for.
215
+ * - A question about work that has been done is obsolete: the work it
216
+ * belongs to is finished, so it blocks nothing.
217
+ * - Everything else is eligible, including an unknown state of the work:
218
+ * uncertainty is never a completion.
219
+ */
220
+ export function jevWaitEligibility(input: {
221
+ /** What the question is about. */
222
+ relevance: JevQuestionRelevance;
223
+ /** The state of the work now. */
224
+ work: JevWorkState;
225
+ }): JevWaitEligibility {
226
+ if (input.relevance === "optional-offer") {
227
+ return {
228
+ eligible: false,
229
+ reason:
230
+ "the question offers work that was not asked for; the silence of the user must not authorize it",
231
+ };
232
+ }
233
+ if (input.relevance === "current-request" && input.work === "complete") {
234
+ return {
235
+ eligible: false,
236
+ reason: "the work of the question is done; the question is obsolete",
237
+ };
238
+ }
239
+ if (input.work === "unknown") {
240
+ return {
241
+ eligible: true,
242
+ reason: "the state of the work is unknown; the question is preserved",
243
+ };
244
+ }
245
+ return {
246
+ eligible: true,
247
+ reason: "the question belongs to work that remains",
248
+ };
249
+ }
@@ -298,11 +298,20 @@ export class ProviderRecoveryRuntime {
298
298
  * The cycle keeps its budget: a cancelled attempt is not an attempt of
299
299
  * the budget, but the failure that caused it is still the failure of
300
300
  * the cycle.
301
+ *
302
+ * The deadline of the controller is cancelled with the timer of the
303
+ * runtime. A deadline that nobody waits for must not own the next
304
+ * attempt: the next failure of the cycle has to schedule its own
305
+ * countdown, or the recovery would answer "already scheduled" to a
306
+ * failure that has no timer.
301
307
  */
302
308
  cancelPending(): void {
303
309
  this.candidate = null;
304
310
  this.cancelRecoveryAttempt();
305
311
  this.cancelOverloadResume();
312
+ this.options.controller.invalidatePending({
313
+ sessionId: this.options.context().sessionId,
314
+ });
306
315
  }
307
316
 
308
317
  /**
@@ -185,6 +185,18 @@ export interface ProviderRecoveryController {
185
185
  noteSuccess(key: { sessionId: string; provider: string }): void;
186
186
  /** A cancellation ends the cycle. */
187
187
  cancel(key: { sessionId: string; provider: string }): void;
188
+ /**
189
+ * Invalidate the pending attempt of the cycles of a session.
190
+ *
191
+ * A countdown that nobody waits for must not own the next deadline:
192
+ * the next failure has to schedule its own attempt, or the recovery
193
+ * would answer "already scheduled" to a failure that has no timer.
194
+ *
195
+ * The cancelled attempt never ran, so it is not an attempt of the
196
+ * budget: the counter of the attempts goes back, and the cycle keeps
197
+ * its identity and its failures.
198
+ */
199
+ invalidatePending(key: { sessionId: string }): void;
188
200
  /** The state of a cycle, for the status row and the tests. */
189
201
  cycle(key: {
190
202
  sessionId: string;
@@ -357,6 +369,28 @@ export function createProviderRecoveryController(
357
369
  }
358
370
  },
359
371
 
372
+ invalidatePending(key): void {
373
+ const observedAt = now();
374
+ for (const [id, cycle] of [...cycles.entries()]) {
375
+ if (cycle.sessionId !== key.sessionId) continue;
376
+ // Only a deadline that is still ahead is a pending attempt.
377
+ // A deadline in the past belongs to an attempt that ran.
378
+ if (cycle.dueAt === null || cycle.dueAt <= observedAt) continue;
379
+ cycles.set(id, {
380
+ ...cycle,
381
+ // The attempt never ran, so it is not an attempt of the
382
+ // budget of the cycle.
383
+ attempt: Math.max(0, cycle.attempt - 1),
384
+ dueAt: null,
385
+ // The duplicate marker protects a pending deadline: a
386
+ // repeated copy of the same error must not create a
387
+ // second timer. There is no timer anymore, so the next
388
+ // failure may schedule its own attempt.
389
+ lastFailureKey: null,
390
+ });
391
+ }
392
+ },
393
+
360
394
  cycle(key): RecoveryCycleState | null {
361
395
  return cycles.get(cycleKey(key)) ?? null;
362
396
  },