pi-harness-runtime 1.1.498 → 1.1.500

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 (46) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/harness/jev-request-scope.ts +202 -0
  3. package/harness/jev-wait-eligibility.ts +98 -17
  4. package/index.ts +60 -13
  5. package/package.json +1 -1
  6. package/packages/agent-policy/package.json +1 -1
  7. package/packages/auth/package.json +1 -1
  8. package/packages/autonomous-runtime/package.json +1 -1
  9. package/packages/checkpoint/package.json +1 -1
  10. package/packages/clipboard/package.json +1 -1
  11. package/packages/codex-watcher/package.json +1 -1
  12. package/packages/config-capture/package.json +1 -1
  13. package/packages/contracts/package.json +1 -1
  14. package/packages/cookie-sanitizer/package.json +1 -1
  15. package/packages/evaluation-engine/package.json +1 -1
  16. package/packages/event-bus/package.json +1 -1
  17. package/packages/event-store/package.json +1 -1
  18. package/packages/experience-replay/package.json +1 -1
  19. package/packages/file-copy-helper/package.json +1 -1
  20. package/packages/intent-analyzer/package.json +1 -1
  21. package/packages/jev-judge/package.json +1 -1
  22. package/packages/knowledge-retrieval/package.json +1 -1
  23. package/packages/learning-engine/package.json +1 -1
  24. package/packages/logging/package.json +1 -1
  25. package/packages/memory-engine/package.json +1 -1
  26. package/packages/notification/package.json +1 -1
  27. package/packages/paperclip-integration/package.json +1 -1
  28. package/packages/performance-optimizer/package.json +1 -1
  29. package/packages/privilege-broker/package.json +1 -1
  30. package/packages/prompt-compiler/package.json +1 -1
  31. package/packages/providers/package.json +1 -1
  32. package/packages/qdrant-skills/package.json +1 -1
  33. package/packages/quota-manager/package.json +1 -1
  34. package/packages/relay/package.json +1 -1
  35. package/packages/skill-mcp-client/package.json +1 -1
  36. package/packages/skills/package.json +1 -1
  37. package/packages/todo-bd-sync/package.json +1 -1
  38. package/packages/token-estimation/package.json +1 -1
  39. package/packages/tooling-preference/package.json +1 -1
  40. package/packages/trajectory/package.json +1 -1
  41. package/packages/tui/package.json +1 -1
  42. package/packages/two-phase-review/package.json +1 -1
  43. package/packages/types/package.json +1 -1
  44. package/packages/webmcp-tester/package.json +1 -1
  45. package/packages/wiki/package.json +1 -1
  46. package/packages/write-review/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,159 @@
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.500](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.500) (2026-11-10)
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
+ * **harness:** a raw control byte hid the request scope from the review ([852b1ff](https://github.com/ManotLuijiu/pi-harness-runtime/commit/852b1ff3afc21adb71e92b85d21ff1c88e14816a))
38
+ * **honcho:** a handshake that never finishes is named instead of hanging the startup ([d66005f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d66005f928a4f8df5de5b8a0579cbd4f8df37ff9))
39
+ * **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))
40
+ * **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))
41
+ * **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))
42
+ * **honcho:** the report names the state of the MCP server, not the registration ([762f4d5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/762f4d59e4eabcab9a1c21a61aa522c3267621b3))
43
+ * **hooks:** a tag is checked through the commit behind it ([c823e8e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c823e8e1f6973c62b5449a97c101759a4d5cbba5))
44
+ * **jev:** a completion question, a stale check and a pending validation ([827120b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/827120b4138b6f5ae253e69154de190085703de8))
45
+ * **jev:** a new request does not inherit the completion of the old one ([0f863c7](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0f863c7fcaf35e261beabebef15b8ab634132fdc))
46
+ * **jev:** a prohibition must not hide a destructive action ([78a6cc1](https://github.com/ManotLuijiu/pi-harness-runtime/commit/78a6cc199e647f812e145483f7e94991358d8f34))
47
+ * **jev:** a refusal without punctuation, and only a decline of an action ([ef3dbf8](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ef3dbf87a2a1725373281613a0d48881ed5d2239))
48
+ * **jev:** a rejection during the countdown pauses the work ([9b018ce](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9b018ce1152b6724dee73cdc901b8a360ecc91ab))
49
+ * **jev:** a session switch ends the wait of the old session ([ca03d39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ca03d399c0d4a1b2dd428ac39836ab53c0e51ab6))
50
+ * **jev:** an open question is not a permission to answer it ([e20eca2](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e20eca24bb88d385198bb12ee3ebf573af9aea86))
51
+ * **jev:** keep a comparative caveat with the option it constrains ([7be306b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7be306b0d0872713ebca9386d613ae5a8da9d5b6))
52
+ * **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))
53
+ * **jev:** the action of the question, and an open question blocks the work ([1f9ff39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1f9ff39efc4ee17464c54c2ca9b583245093dbac))
54
+ * **jev:** the alternatives of a question are parsed without a quadratic pattern ([63016a3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/63016a3f0488acb801990dd46770c00d382b5858))
55
+ * **jev:** the countdown of an obsolete question does not outlive the work ([fe78b29](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fe78b29e6fc513b11a6993bc68fd9418dc77f79b))
56
+ * **jev:** the facts of an option survive the wording of the agent ([5a6250c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5a6250c07aa8d965bc6ae242cccbf519477598f8))
57
+ * **jev:** the scope decides the question, the identity guards the awaits ([ed348b2](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ed348b2f94460a3b3ac11c01afd4420ee4ec1020))
58
+ * **jev:** the subject of the scope decides, a clarification is preserved ([faf6a0f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/faf6a0fe7d0dce94d4fa48d0d7a57d126556ba6d))
59
+ * **keys:** the key directory is audited as a tree ([081cc75](https://github.com/ManotLuijiu/pi-harness-runtime/commit/081cc75ac8ceff36b0d619c3f76371dc08459d3c))
60
+ * **mcp:** the connector and the watcher stop with the session ([4d1b87d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/4d1b87d14d015749025b62bf54d6d0b6137295f7))
61
+ * **mcp:** the connector survives a runtime that cannot list the servers ([d0f555f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0f555fa14f51de33591e572a41ded5b59a3e4dd))
62
+ * **merge:** the boolean input is read as a boolean ([971b716](https://github.com/ManotLuijiu/pi-harness-runtime/commit/971b7169a43db382dbdeb6bb9bab02ab56e0351c))
63
+ * **merge:** the manual job needs the right of the merge ([7ba685e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7ba685ec43d815f90aa35b742579e87e76c69209))
64
+ * **merge:** the merge of the pull request is the GraphQL mutation ([972bab4](https://github.com/ManotLuijiu/pi-harness-runtime/commit/972bab4b0f7faf1b0047f3bb767ef6db3de4b2fa))
65
+ * **merge:** the workflow merges the pull request the gates cleared ([d7639ec](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d7639ec9b83723510acb4a5c4e23d5d6167c3af6))
66
+ * **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))
67
+ * **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))
68
+ * **recovery:** a cancelled countdown does not own the next attempt ([7b79f30](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7b79f301389fae48201e696d3086d257ed722fb9))
69
+ * **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))
70
+ * **recovery:** a manual request takes the work back from the countdown ([fa81d8f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa81d8fd9d6160166a095e07bdf17049bbafa32d))
71
+ * **recovery:** the predicate of Pi decides the retry, the provider identity is normalized ([6c8c17b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/6c8c17b53302cea1602d192251eacd0ebbd3e8c9))
72
+ * **release:** a manual release keeps the version of its manifest ([122e661](https://github.com/ManotLuijiu/pi-harness-runtime/commit/122e661ea48cb8aff14c71dbd0221a4cf0ba4c8e))
73
+ * **release:** the alignment names the reason of a failure ([5814dd0](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5814dd0b780f5839cf8011ed0cbbbb31e7eb0418))
74
+ * **release:** the channels of the package name the release ([a7a273f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a7a273ffe8398e2b5b07ef1c321777de41792c6e))
75
+ * **release:** the release publishes and leaves the channels alone ([5871746](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5871746589c1281d855dbeb591b02419fa43f22e))
76
+ * **release:** the release pull request names the version of its branch ([a846e83](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a846e83e6de6e529f4bca05e869db0b5eebb37c5))
77
+ * **release:** the release scans the tree of the commit it publishes ([7d47a0b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7d47a0b5406480a1e1d3a52623a76aabd1e2d0ba))
78
+ * **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))
79
+ * **workspace:** keep a client name out of the comment about the search depth ([b572e0a](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b572e0af16ff562203bda2b5c47b41807cff5a95))
80
+ * **workspace:** the repository names the mode before the mode stays unknown ([188a32c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/188a32c7a6af1465dd24714278fccc73d06f6477))
81
+
82
+ ### [1.1.499](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.499) (2026-11-09)
83
+
84
+
85
+ ### Features
86
+
87
+ * **actions:** register the job resume, the GLM countdown and the queued continuations ([177c964](https://github.com/ManotLuijiu/pi-harness-runtime/commit/177c964555b0057e6bc7d293dafab10c95eabbf9))
88
+ * **delegation:** a child is only a child when it really ran ([ac4e678](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ac4e6782d7d4bc4941e458425c8a9f38a51fc9d4))
89
+ * **delegation:** the scope of a request is measured before it is judged ([684b6a5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/684b6a55184f63d3be24c48dcecfb0b13410dc15))
90
+ * **honcho:** the memory service speaks the native MCP of Pi ([f9f740c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f9f740c12869bae4c4380afbe8c76e12388bb744))
91
+ * **jev:** one decision per question, bound to the question it was evaluated for ([03448aa](https://github.com/ManotLuijiu/pi-harness-runtime/commit/03448aaa17f2d0c3bcf644b0b1d5949727dfff8c))
92
+ * **jev:** the evaluation of a choice sees what the options mean ([f0c207e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f0c207e074701e6b7dab0965170ec39453d9d502))
93
+ * **jev:** the pending question carries the ask and the answer ([a792133](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a792133e517fb8c12d3363e98942f3af30270f27))
94
+ * **jev:** the pending question counts down to the decision ([d0cc171](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0cc171223986b2d32c670b6c1c74712fe0a4ad8))
95
+ * **keys:** tell the user what to do about an exposed key file ([7031003](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7031003574307351b7a8f28ee14159b58e17b793))
96
+ * **keys:** the key files are repaired when their permissions are unsafe ([e9c2c26](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e9c2c26b287665b56ed749de269737e8403bb8af))
97
+ * **mcp:** the harness connects the registered servers when nobody else does ([7fef951](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7fef95137ad4664df57f045cd91b7d233315b0bc))
98
+ * **merge:** a manual run can leave the merge to the pull request event ([b3d1950](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b3d1950b5941c78ccd56951acdafd1d4afbe1bff))
99
+ * **phase:** the agent owns the todo list and the harness says so ([c489370](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c489370bd7926aece8cb1a77aa20ca2d2672f1fb))
100
+ * **providers:** a shared registry of the pending automatic actions and a bounded recovery ([c5f955b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c5f955bc82adcb6999a89d5bc278fa87fccee022))
101
+ * **providers:** one failure has one executor, and the retry bridge is checked ([e73c4c7](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e73c4c76ff20a9708083659bdcefe74870a84837))
102
+ * **review:** the review starts on its own when the implementation is done ([04f51f5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/04f51f599cd3222b6c74dd8fadb1373bd72d9bd7))
103
+ * **status:** the status line names the phase, the progress and the children ([0167bf3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0167bf396a0b987c1d44f3b869351976a951dd65))
104
+ * **test:** the task waits for the final tier of the validation plan ([fa147db](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa147dbf7d50d56e6ea48c6d8fbb4fcb190caf8a))
105
+ * **validation:** a large job starts with a measured pilot ([425964b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/425964b04a3d4fa02adfabed47ff62c5ec2b9c28))
106
+ * **validation:** the size of a job is a fact, not a phrase ([8aa6c11](https://github.com/ManotLuijiu/pi-harness-runtime/commit/8aa6c119565d0f8412dc8aeafa6b295d47d3f093))
107
+ * **workspace:** a Frappe bench names the mode of the workspace ([9d58517](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d585172063a330992fee933316e268ae9985e3c))
108
+
109
+
110
+ ### Bug Fixes
111
+
112
+ * **ci:** every run of a required check counts, and the worst one decides ([da9e0da](https://github.com/ManotLuijiu/pi-harness-runtime/commit/da9e0da6b0ca29cb320764fd5fc1b8a8dee8b1e0))
113
+ * **ci:** the newest attempt of a run decides, not the attempt that failed ([9d7adcc](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d7adcc31cbacc517c3c1a9bcd3956be94c908ef))
114
+ * **honcho:** a handshake that never finishes is named instead of hanging the startup ([d66005f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d66005f928a4f8df5de5b8a0579cbd4f8df37ff9))
115
+ * **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))
116
+ * **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))
117
+ * **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))
118
+ * **honcho:** the report names the state of the MCP server, not the registration ([762f4d5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/762f4d59e4eabcab9a1c21a61aa522c3267621b3))
119
+ * **hooks:** a tag is checked through the commit behind it ([c823e8e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c823e8e1f6973c62b5449a97c101759a4d5cbba5))
120
+ * **jev:** a completion question, a stale check and a pending validation ([827120b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/827120b4138b6f5ae253e69154de190085703de8))
121
+ * **jev:** a new request does not inherit the completion of the old one ([0f863c7](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0f863c7fcaf35e261beabebef15b8ab634132fdc))
122
+ * **jev:** a prohibition must not hide a destructive action ([78a6cc1](https://github.com/ManotLuijiu/pi-harness-runtime/commit/78a6cc199e647f812e145483f7e94991358d8f34))
123
+ * **jev:** a refusal without punctuation, and only a decline of an action ([ef3dbf8](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ef3dbf87a2a1725373281613a0d48881ed5d2239))
124
+ * **jev:** a rejection during the countdown pauses the work ([9b018ce](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9b018ce1152b6724dee73cdc901b8a360ecc91ab))
125
+ * **jev:** a session switch ends the wait of the old session ([ca03d39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ca03d399c0d4a1b2dd428ac39836ab53c0e51ab6))
126
+ * **jev:** an open question is not a permission to answer it ([e20eca2](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e20eca24bb88d385198bb12ee3ebf573af9aea86))
127
+ * **jev:** keep a comparative caveat with the option it constrains ([7be306b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7be306b0d0872713ebca9386d613ae5a8da9d5b6))
128
+ * **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))
129
+ * **jev:** the action of the question, and an open question blocks the work ([1f9ff39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1f9ff39efc4ee17464c54c2ca9b583245093dbac))
130
+ * **jev:** the alternatives of a question are parsed without a quadratic pattern ([63016a3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/63016a3f0488acb801990dd46770c00d382b5858))
131
+ * **jev:** the countdown of an obsolete question does not outlive the work ([fe78b29](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fe78b29e6fc513b11a6993bc68fd9418dc77f79b))
132
+ * **jev:** the facts of an option survive the wording of the agent ([5a6250c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5a6250c07aa8d965bc6ae242cccbf519477598f8))
133
+ * **jev:** the scope decides the question, the identity guards the awaits ([ed348b2](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ed348b2f94460a3b3ac11c01afd4420ee4ec1020))
134
+ * **jev:** the subject of the scope decides, a clarification is preserved ([faf6a0f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/faf6a0fe7d0dce94d4fa48d0d7a57d126556ba6d))
135
+ * **keys:** the key directory is audited as a tree ([081cc75](https://github.com/ManotLuijiu/pi-harness-runtime/commit/081cc75ac8ceff36b0d619c3f76371dc08459d3c))
136
+ * **mcp:** the connector and the watcher stop with the session ([4d1b87d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/4d1b87d14d015749025b62bf54d6d0b6137295f7))
137
+ * **mcp:** the connector survives a runtime that cannot list the servers ([d0f555f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0f555fa14f51de33591e572a41ded5b59a3e4dd))
138
+ * **merge:** the boolean input is read as a boolean ([971b716](https://github.com/ManotLuijiu/pi-harness-runtime/commit/971b7169a43db382dbdeb6bb9bab02ab56e0351c))
139
+ * **merge:** the manual job needs the right of the merge ([7ba685e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7ba685ec43d815f90aa35b742579e87e76c69209))
140
+ * **merge:** the merge of the pull request is the GraphQL mutation ([972bab4](https://github.com/ManotLuijiu/pi-harness-runtime/commit/972bab4b0f7faf1b0047f3bb767ef6db3de4b2fa))
141
+ * **merge:** the workflow merges the pull request the gates cleared ([d7639ec](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d7639ec9b83723510acb4a5c4e23d5d6167c3af6))
142
+ * **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))
143
+ * **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))
144
+ * **recovery:** a cancelled countdown does not own the next attempt ([7b79f30](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7b79f301389fae48201e696d3086d257ed722fb9))
145
+ * **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))
146
+ * **recovery:** a manual request takes the work back from the countdown ([fa81d8f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa81d8fd9d6160166a095e07bdf17049bbafa32d))
147
+ * **recovery:** the predicate of Pi decides the retry, the provider identity is normalized ([6c8c17b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/6c8c17b53302cea1602d192251eacd0ebbd3e8c9))
148
+ * **release:** a manual release keeps the version of its manifest ([122e661](https://github.com/ManotLuijiu/pi-harness-runtime/commit/122e661ea48cb8aff14c71dbd0221a4cf0ba4c8e))
149
+ * **release:** the alignment names the reason of a failure ([5814dd0](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5814dd0b780f5839cf8011ed0cbbbb31e7eb0418))
150
+ * **release:** the channels of the package name the release ([a7a273f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a7a273ffe8398e2b5b07ef1c321777de41792c6e))
151
+ * **release:** the release publishes and leaves the channels alone ([5871746](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5871746589c1281d855dbeb591b02419fa43f22e))
152
+ * **release:** the release pull request names the version of its branch ([a846e83](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a846e83e6de6e529f4bca05e869db0b5eebb37c5))
153
+ * **release:** the release scans the tree of the commit it publishes ([7d47a0b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7d47a0b5406480a1e1d3a52623a76aabd1e2d0ba))
154
+ * **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))
155
+ * **workspace:** keep a client name out of the comment about the search depth ([b572e0a](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b572e0af16ff562203bda2b5c47b41807cff5a95))
156
+ * **workspace:** the repository names the mode before the mode stays unknown ([188a32c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/188a32c7a6af1465dd24714278fccc73d06f6477))
157
+
5
158
  ### [1.1.498](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.498) (2026-11-09)
6
159
 
7
160
 
@@ -0,0 +1,202 @@
1
+ /**
2
+ * The scope of a request in the task list.
3
+ *
4
+ * The task list is the history of the session: the todos of a request that
5
+ * was finished stay in it. A new request therefore inherits a list that is
6
+ * already complete, and the completion of the old request says nothing
7
+ * about the new one.
8
+ *
9
+ * This module keeps the two apart without deleting anything. It remembers
10
+ * how the list looked when the request started, and it derives from that
11
+ * memory which todos belong to the request that is running.
12
+ *
13
+ * Nothing here touches the list: the history stays a record of what
14
+ * happened, and the scope is only a reading of it.
15
+ */
16
+
17
+ /**
18
+ * The part of a todo item the scope needs.
19
+ */
20
+ export interface RequestTodoLike {
21
+ /** The id of the item, when the list has one. */
22
+ id?: number | string;
23
+ /** The subject of the item. */
24
+ subject?: string;
25
+ /** The status of the item ("pending", "in_progress", "completed", ...). */
26
+ status: string;
27
+ }
28
+
29
+ /**
30
+ * The scope of the request that is running.
31
+ */
32
+ export interface JevRequestScope {
33
+ /** The number of the request. It grows with every request of the human. */
34
+ readonly generation: number;
35
+ /**
36
+ * The list as it was when the request started: the key of the item and
37
+ * the shape it had then.
38
+ */
39
+ readonly baseline: ReadonlyMap<string, string>;
40
+ }
41
+
42
+ /**
43
+ * Is the todo still open?
44
+ */
45
+ export function isOpenTodo(item: RequestTodoLike): boolean {
46
+ return item.status === "pending" || item.status === "in_progress";
47
+ }
48
+
49
+ /**
50
+ * The key of an item.
51
+ *
52
+ * An item without an id has no key: it cannot be told apart from another
53
+ * one, so it is always treated as new.
54
+ */
55
+ function itemKey(item: RequestTodoLike): string | null {
56
+ if (item.id === undefined || item.id === null) return null;
57
+ return `id:${String(item.id)}`;
58
+ }
59
+
60
+ /**
61
+ * The shape of an item: what a request may change about it.
62
+ */
63
+ function itemShape(item: RequestTodoLike): string {
64
+ return `${item.status}\0${(item.subject ?? "").trim()}`;
65
+ }
66
+
67
+ /**
68
+ * Remember how the list looked when the request started.
69
+ */
70
+ export function captureRequestScope(
71
+ items: readonly RequestTodoLike[] | null | undefined,
72
+ generation: number,
73
+ ): JevRequestScope {
74
+ const baseline = new Map<string, string>();
75
+ for (const item of items ?? []) {
76
+ const key = itemKey(item);
77
+ if (key === null) continue;
78
+ baseline.set(key, itemShape(item));
79
+ }
80
+ return { generation, baseline };
81
+ }
82
+
83
+ /**
84
+ * The todos that belong to the request.
85
+ *
86
+ * A todo belongs to the request when the request created it or changed it.
87
+ * A todo that was already finished when the request started belongs to the
88
+ * request that finished it, and its completion says nothing about this one.
89
+ */
90
+ export function itemsOfRequest(
91
+ items: readonly RequestTodoLike[],
92
+ scope: JevRequestScope | null | undefined,
93
+ ): RequestTodoLike[] {
94
+ if (!scope) return [...items];
95
+ return items.filter((item) => {
96
+ const key = itemKey(item);
97
+ // An item without an id cannot be told apart: it belongs to the
98
+ // request that is running.
99
+ if (key === null) return true;
100
+ const before = scope.baseline.get(key);
101
+ // The item was not there when the request started.
102
+ if (before === undefined) return true;
103
+ // The request changed it.
104
+ return before !== itemShape(item);
105
+ });
106
+ }
107
+
108
+ /**
109
+ * The subjects of the todos, without the empty ones.
110
+ */
111
+ export function scopeSubjects(items: readonly RequestTodoLike[]): string[] {
112
+ return items
113
+ .map((item) => (item.subject ?? "").trim())
114
+ .filter((subject) => subject.length > 0);
115
+ }
116
+
117
+ /**
118
+ * The scope of the request that is running.
119
+ *
120
+ * The tracker is the boundary between the requests of the human and the
121
+ * history of the task list. It reads the list when a request starts, so the
122
+ * scope of the request is the list as it was before the request touched it.
123
+ */
124
+ export class RequestScopeTracker {
125
+ /** The number of the request that is running. */
126
+ private _generation = 0;
127
+ /** The scope of the request that is running, once it was read. */
128
+ private _pending: Promise<JevRequestScope | null> | null = null;
129
+ /** The read of the task list. */
130
+ private readonly readTodos: () => Promise<
131
+ readonly RequestTodoLike[] | null | undefined
132
+ >;
133
+
134
+ constructor(options: {
135
+ /** Read the task list as it is now. */
136
+ readTodos: () => Promise<
137
+ readonly RequestTodoLike[] | null | undefined
138
+ >;
139
+ }) {
140
+ this.readTodos = options.readTodos;
141
+ }
142
+
143
+ /**
144
+ * The number of the request that is running.
145
+ */
146
+ get generation(): number {
147
+ return this._generation;
148
+ }
149
+
150
+ /**
151
+ * A new request of the human begins.
152
+ *
153
+ * The list is read now, while the request has not touched it: this is
154
+ * the work that the request inherits. The read of the list is
155
+ * asynchronous, so the capture happens when the list arrives: the
156
+ * scope is the list of that moment and not of a later one.
157
+ *
158
+ * A message of the harness itself does not begin a request: it is the
159
+ * harness that continues the work, not the human that asks for it.
160
+ */
161
+ begin(): number {
162
+ this._generation += 1;
163
+ const generation = this._generation;
164
+ let captured: Promise<JevRequestScope | null>;
165
+ try {
166
+ captured = Promise.resolve(this.readTodos()).then(
167
+ (items) => captureRequestScope(items, generation),
168
+ () => null,
169
+ );
170
+ } catch {
171
+ captured = Promise.resolve(null);
172
+ }
173
+ this._pending = captured;
174
+ return generation;
175
+ }
176
+
177
+ /**
178
+ * The scope of the request that is running.
179
+ *
180
+ * The scope is read together with the list, so the two belong to the
181
+ * same request: a request that starts while the list is read owns the
182
+ * work now, and the read of the old scope is stale.
183
+ */
184
+ async read(): Promise<{
185
+ scope: JevRequestScope | null;
186
+ items: readonly RequestTodoLike[] | null;
187
+ }> {
188
+ for (let attempt = 0; attempt < 5; attempt++) {
189
+ const pending = this._pending;
190
+ let items: readonly RequestTodoLike[] | null = null;
191
+ try {
192
+ items = (await this.readTodos()) ?? null;
193
+ } catch {
194
+ items = null;
195
+ }
196
+ const scope = pending ? await pending : null;
197
+ // A request that started in the meantime owns the work now.
198
+ if (pending === this._pending) return { scope, items };
199
+ }
200
+ return { scope: null, items: null };
201
+ }
202
+ }
@@ -18,6 +18,14 @@
18
18
  * preserved.
19
19
  */
20
20
 
21
+ import {
22
+ itemsOfRequest,
23
+ isOpenTodo,
24
+ scopeSubjects,
25
+ type JevRequestScope,
26
+ type RequestTodoLike,
27
+ } from "./jev-request-scope.ts";
28
+
21
29
  /**
22
30
  * The state of the work of the current request.
23
31
  *
@@ -43,7 +51,7 @@ export type JevQuestionRelevance =
43
51
  | "final-request";
44
52
 
45
53
  /** The part of a todo item the rules need. */
46
- export interface TodoStateLike {
54
+ export interface TodoStateLike extends RequestTodoLike {
47
55
  /** The status of the item ("pending", "in_progress", "completed", ...). */
48
56
  status: string;
49
57
  }
@@ -337,6 +345,91 @@ export function ownsQuestion(
337
345
  return current != null && current.requestId === requestId;
338
346
  }
339
347
 
348
+ /**
349
+ * The state of the work and the scope that was requested.
350
+ *
351
+ * The two belong together: the scope is the work that was asked for, and
352
+ * the state says whether that work remains. A reading that returns one
353
+ * without the other can disagree with itself.
354
+ */
355
+ export interface JevWorkContext {
356
+ /** The state of the work of the request. */
357
+ work: JevWorkState;
358
+ /** The work that was requested: the subjects of the todos of the request. */
359
+ scope: string[];
360
+ }
361
+
362
+ /**
363
+ * The state of the work of the request, and the scope it asked for.
364
+ *
365
+ * The list is the history of the session, so the scope of the request
366
+ * delimits what belongs to it:
367
+ *
368
+ * - A todo that the request created or changed belongs to the request.
369
+ * - A todo that was already finished when the request started belongs to
370
+ * the request that finished it. Its completion says nothing about the
371
+ * request that is running, so the request is not complete because of it:
372
+ * there is no evidence, and no evidence is never a completion.
373
+ * - A todo that is still open is work that remains, whoever made it.
374
+ *
375
+ * Without a scope the whole list is the work of the request: the harness
376
+ * reads the list this way when it cannot tell the requests apart.
377
+ */
378
+ export function jevWorkContext(
379
+ items: readonly TodoStateLike[] | null | undefined,
380
+ options: {
381
+ /**
382
+ * The scope of the request that is running.
383
+ *
384
+ * Without it the whole list belongs to the request.
385
+ */
386
+ scope?: JevRequestScope | null | undefined;
387
+ /**
388
+ * Is a required validation still pending for this item?
389
+ *
390
+ * A todo that is marked complete while its final tier has not passed
391
+ * is not done: the required validation is work that remains, so the
392
+ * request is not finished.
393
+ */
394
+ validationPending?: (item: TodoStateLike) => boolean;
395
+ } = {},
396
+ ): JevWorkContext {
397
+ if (!items) return { work: "unknown", scope: [] };
398
+ const relevant = items.filter((item) => item.status !== "deleted");
399
+ if (relevant.length === 0) {
400
+ // There was no work to do. That is not a proof that the request is
401
+ // finished: a question can be the reason no task was ever created.
402
+ return { work: "unknown", scope: [] };
403
+ }
404
+ const open = relevant.filter((item) => isOpenTodo(item));
405
+ // The todos of the request: what it created or changed.
406
+ const own = options.scope
407
+ ? itemsOfRequest(relevant, options.scope)
408
+ : [...relevant];
409
+ // The work that the request is responsible for: what it created or
410
+ // changed, and what is still open.
411
+ const responsible = options.scope
412
+ ? [...new Set([...own, ...open])]
413
+ : [...relevant];
414
+ const scope = scopeSubjects(responsible);
415
+ if (open.length > 0) return { work: "unfinished", scope };
416
+ const validationPending = responsible.some((item) =>
417
+ Boolean(options.validationPending?.(item)),
418
+ );
419
+ if (validationPending) {
420
+ // The todos are done, but the required validation has not passed.
421
+ // The request is not finished.
422
+ return { work: "unfinished", scope };
423
+ }
424
+ if (options.scope && own.length === 0) {
425
+ // Nothing of the request is in the list: the finished todos belong
426
+ // to an earlier request. Their completion is not the completion of
427
+ // this one, and there is no evidence about this one.
428
+ return { work: "unknown", scope };
429
+ }
430
+ return { work: "complete", scope };
431
+ }
432
+
340
433
  /**
341
434
  * The state of the work, from the task list.
342
435
  *
@@ -365,22 +458,10 @@ export function workStateFromTodos(
365
458
  if (!items) {
366
459
  return "unknown";
367
460
  }
368
- const relevant = items.filter((item) => item.status !== "deleted");
369
- if (relevant.length === 0) {
370
- // There was no work to do. That is not a proof that the request is
371
- // finished: a question can be the reason no task was ever created.
372
- return "unknown";
373
- }
374
- const unfinished = relevant.some(
375
- (item) => item.status === "pending" || item.status === "in_progress",
376
- );
377
- if (unfinished) return "unfinished";
378
- if (options.validationPending === true) {
379
- // The todos are done, but the required validation has not passed.
380
- // The request is not finished.
381
- return "unfinished";
382
- }
383
- return "complete";
461
+ return jevWorkContext(items, {
462
+ validationPending:
463
+ options.validationPending === true ? () => true : undefined,
464
+ }).work;
384
465
  }
385
466
 
386
467
  /**
package/index.ts CHANGED
@@ -44,12 +44,14 @@ import {
44
44
  isObsoleteQuestion,
45
45
  jevWaitEligibility,
46
46
  jevWaitRegistration,
47
+ jevWorkContext,
47
48
  ownsQuestion,
48
49
  questionRelevance,
49
- workStateFromTodos,
50
50
  type JevQuestionRelevance,
51
51
  type JevWorkState,
52
+ type TodoStateLike,
52
53
  } from "./harness/jev-wait-eligibility.ts";
54
+ import { RequestScopeTracker } from "./harness/jev-request-scope.ts";
53
55
  import { describeInboundAccess, getAllowedUserIds } from "./harness/telegram-auth.ts";
54
56
  import { buildTelegramCallbackUpdate, buildTelegramMessageUpdate } from "./harness/telegram-update.ts";
55
57
  import { installConsoleGuard } from "./harness/console-guard.ts";
@@ -587,6 +589,31 @@ const sharedState = {
587
589
  workspaceEnvMessage: null as string | null,
588
590
  };
589
591
 
592
+ /**
593
+ * The scope of the request that is running.
594
+ *
595
+ * The task list is the history of the session: the todos of a request that
596
+ * was finished stay in it. A new request therefore inherits a list that is
597
+ * already complete, and the completion of the old request says nothing
598
+ * about the new one.
599
+ *
600
+ * The tracker remembers the list as it was when the request started, so the
601
+ * work of the request is told apart from the work that was done before it.
602
+ * Nothing is deleted: the history stays a record of what happened.
603
+ */
604
+ const requestScopeTracker = new RequestScopeTracker({
605
+ readTodos: async () => {
606
+ const controller = sharedState.todoContinuationController as {
607
+ getSnapshot?: () => Promise<{ items?: TodoStateLike[] }>;
608
+ } | null;
609
+ if (!controller || typeof controller.getSnapshot !== "function") {
610
+ return null;
611
+ }
612
+ const snapshot = await controller.getSnapshot();
613
+ return snapshot?.items ?? null;
614
+ },
615
+ });
616
+
590
617
  /**
591
618
  * Apply an approval decision from a channel to the pending question.
592
619
  *
@@ -1317,23 +1344,26 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
1317
1344
  const controller = todoContinuationController;
1318
1345
  if (!controller) return { work: "unknown", scope: [] };
1319
1346
  try {
1320
- const snapshot = await controller.getSnapshot();
1347
+ // The scope of the request delimits the work that belongs to
1348
+ // it: the todos of an earlier request are history, and their
1349
+ // completion is not the completion of this one. The list and
1350
+ // the scope are read together, so they belong to the same
1351
+ // request.
1352
+ const read = await requestScopeTracker.read();
1353
+ if (!read.items) return { work: "unknown", scope: [] };
1321
1354
  // A todo that is marked complete while its final tier has not
1322
1355
  // passed is not done: the required validation is work that
1323
1356
  // remains, so the request is not finished.
1324
- const validationPending = validationLedger
1325
- ? snapshot.items.some((item) =>
1326
- validationLedger?.isFinalTierPending(item),
1327
- )
1328
- : false;
1329
- const work = workStateFromTodos(snapshot.items, {
1330
- available: true,
1357
+ const validationPending = (item: TodoStateLike) =>
1358
+ Boolean(
1359
+ validationLedger?.isFinalTierPending(
1360
+ item as unknown as import("./packages/jev-judge/dist/todo-provider.js").TodoItem,
1361
+ ),
1362
+ );
1363
+ return jevWorkContext(read.items, {
1364
+ scope: read.scope,
1331
1365
  validationPending,
1332
1366
  });
1333
- const scope = snapshot.items
1334
- .map((item) => (item.subject ?? "").trim())
1335
- .filter((subject) => subject.length > 0);
1336
- return { work, scope };
1337
1367
  } catch {
1338
1368
  return { work: "unknown", scope: [] };
1339
1369
  }
@@ -2762,6 +2792,12 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
2762
2792
  // The runtime of the provider recovery reads the pause state
2763
2793
  // of the user through this handle.
2764
2794
  todoContinuationHandle = todoContinuationController;
2795
+ // The callbacks that answer a question in a channel, and the
2796
+ // replies of the user, reach the controller through the
2797
+ // shared state. Without it every pause and every resume of
2798
+ // the work was a call on nothing, so a decline of the user
2799
+ // never stopped the work.
2800
+ sharedState.todoContinuationController = todoContinuationController;
2765
2801
  logToFile("[auto-continue]", "Todo continuation controller initialized");
2766
2802
  } catch (err) {
2767
2803
  logToFile("[auto-continue]", "Failed to create todo continuation controller:", String(err));
@@ -2775,6 +2811,7 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
2775
2811
  todoContinuationController?.dispose?.();
2776
2812
  todoContinuationController = null;
2777
2813
  todoContinuationHandle = null;
2814
+ sharedState.todoContinuationController = null;
2778
2815
  sharedState.validationLedger = null;
2779
2816
  });
2780
2817
 
@@ -3703,6 +3740,11 @@ async function initTelegram(pi: ExtensionAPI): Promise<void> {
3703
3740
  // The user's own words stay out of the log files: only the length
3704
3741
  // is recorded.
3705
3742
  logToFile("[TelegramInbound]", `Forwarding message to Pi (${text.length} chars)`);
3743
+ // A message of the human begins a new request: the work of the
3744
+ // request that ran before it is history now. The message reaches
3745
+ // Pi as a message of the harness, so the input event cannot
3746
+ // tell that it is a request.
3747
+ requestScopeTracker.begin();
3706
3748
  // Forward the message to Pi as a user message
3707
3749
  await pi.sendUserMessage(text, { deliverAs: "steer" });
3708
3750
  });
@@ -6764,6 +6806,11 @@ Run \`bd ready\` to see current bd issues.
6764
6806
  pi.on("input", (event) => {
6765
6807
  if (event.source === "extension") return;
6766
6808
  providerRecoveryRuntime?.cancelPending();
6809
+ // A request of the human begins a new scope: the todos of the
6810
+ // previous request are history, and the completion of that request
6811
+ // is not the completion of this one. The message of the harness
6812
+ // itself carries the source `extension` and begins nothing.
6813
+ requestScopeTracker.begin();
6767
6814
  });
6768
6815
 
6769
6816
  // The run settled: the internal retries of Pi are over, so a failure
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-harness-runtime",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "[BETA] Codex-style /usage status + autonomous coding harness for pi. Not production ready — expect breaking changes.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/agent-policy",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Agent policy runtime for pi-harness - enforces mandatory rule delivery and mutation gating",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/auth",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-runtime",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Autonomous Operations Runtime — task inbox, lease management, and worker lifecycle (RFC-0101)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/checkpoint",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Enhanced checkpoint system with incremental snapshots, diff-based storage, and recovery strategies",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/clipboard",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/codex-watcher",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Watches Codex CLI sessions and emits visible messages for PING-PONG monitoring",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/config-capture",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Auto-capture API-fetched configuration values to AGENTS.md",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/contracts",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "type": "module",
5
5
  "description": "RPC schema definitions for pi-harness runtime",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/cookie-sanitizer",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — cookie sanitizer (provider-quota cookie file normaliser)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/evaluation-engine",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Evaluation engine for pi-harness runtime (RFC-0057)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-bus",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-store",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/experience-replay",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Experience replay for debugging and reproducibility (RFC-0059)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/file-copy-helper",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Injects cp/sudo cp rule when user asks to mimic/copy files",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/intent-analyzer",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/jev-judge",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Jev Judge - Structured decision model for agent routing, E2E testing, and automated decisions",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/knowledge-retrieval",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Knowledge retrieval via TencentDB-Agent-Memory MCP (RFC-0105)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/learning-engine",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Learning engine for extracting lessons from runtime execution (RFC-0058)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/logging",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "type": "module",
5
5
  "description": "Centralized structured application logging with buffered Cloudflare R2 and webhook transports",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/memory-engine",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Memory engine with OKF integration for durable knowledge management (RFC-0060)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/notification",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — notification",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/paperclip-integration",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Paperclip API integration: poll agent inbox, route tasks to pi.dev, Telegram alerts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/performance-optimizer",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Performance optimization analyzer for pi-harness runtime (RFC-0056)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/privilege-broker",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Privilege Broker — capability registry and command executor for autonomous runtime (RFC-0101 §7)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/prompt-compiler",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Deterministic prompt compiler for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/providers",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — providers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/qdrant-skills",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Qdrant vector search integration for Hermes-style skill system",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/quota-manager",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — quota-manager",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/relay",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "type": "module",
5
5
  "description": "Cloud relay for remote access - T3 Connect style for pi-harness",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/skill-mcp-client",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "MCP client for Skills SaaS backend",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/skills",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "File-based skill system with pi.dev compatibility and Hermes self-improvement",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/todo-bd-sync",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Two-way sync between rpiv-todo overlay and bd issue tracker",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/token-estimation",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — token-estimation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tooling-preference",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — JS/TS tooling preference (Biome vs ESLint/Prettier) proposal",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/trajectory",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Trajectory capture for the write-review loop — persists cycle records for learning",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/tui",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — tui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/two-phase-review",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "pi-harness-runtime — two-phase implementation and review workflow (queue review signals, gate the phase, scope the diff)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/types",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Shared TypeScript types for pi-harness-runtime packages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/webmcp-tester",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "WebMCP-powered E2E testing for pi-harness - natural language test scenarios",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/wiki",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "LLM Wiki integration for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/write-review",
3
- "version": "1.1.498",
3
+ "version": "1.1.500",
4
4
  "description": "Two-agent write-review loop with blackboard coordination",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",