pi-harness-runtime 1.1.502 → 1.1.504
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.
- package/CHANGELOG.md +158 -0
- package/harness/jev-request-scope.ts +170 -16
- package/index.ts +57 -2
- package/package.json +1 -1
- package/packages/agent-policy/package.json +1 -1
- package/packages/auth/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/codex-watcher/package.json +1 -1
- package/packages/config-capture/package.json +1 -1
- package/packages/contracts/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/event-bus/package.json +1 -1
- package/packages/event-store/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/file-copy-helper/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/jev-judge/dist/continuation-controller.d.ts +10 -1
- package/packages/jev-judge/dist/continuation-controller.d.ts.map +1 -1
- package/packages/jev-judge/dist/continuation-controller.js +11 -0
- package/packages/jev-judge/dist/continuation-controller.js.map +1 -1
- package/packages/jev-judge/dist/todo-provider.d.ts +25 -0
- package/packages/jev-judge/dist/todo-provider.d.ts.map +1 -1
- package/packages/jev-judge/dist/todo-provider.js +56 -0
- package/packages/jev-judge/dist/todo-provider.js.map +1 -1
- package/packages/jev-judge/package.json +1 -1
- package/packages/jev-judge/src/continuation-controller.ts +13 -1
- package/packages/jev-judge/src/todo-provider.ts +83 -0
- package/packages/knowledge-retrieval/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/logging/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/paperclip-integration/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/privilege-broker/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/qdrant-skills/package.json +1 -1
- package/packages/quota-manager/package.json +1 -1
- package/packages/relay/package.json +1 -1
- package/packages/skill-mcp-client/package.json +1 -1
- package/packages/skills/package.json +1 -1
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/tooling-preference/package.json +1 -1
- package/packages/trajectory/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/two-phase-review/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/wiki/package.json +1 -1
- package/packages/write-review/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,164 @@
|
|
|
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.504](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.504) (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 scope of a request on every human path, and the todos it touched ([cec8f36](https://github.com/ManotLuijiu/pi-harness-runtime/commit/cec8f3644333b1d13a203340df80a30fef5c1ac0))
|
|
59
|
+
* **jev:** the subject of the scope decides, a clarification is preserved ([faf6a0f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/faf6a0fe7d0dce94d4fa48d0d7a57d126556ba6d))
|
|
60
|
+
* **keys:** the key directory is audited as a tree ([081cc75](https://github.com/ManotLuijiu/pi-harness-runtime/commit/081cc75ac8ceff36b0d619c3f76371dc08459d3c))
|
|
61
|
+
* **logging:** the sanitizer of a message writes its control characters as escapes ([f4bbdb9](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f4bbdb94bc1801d4228142bc1a1b31505c42a575))
|
|
62
|
+
* **mcp:** the connector and the watcher stop with the session ([4d1b87d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/4d1b87d14d015749025b62bf54d6d0b6137295f7))
|
|
63
|
+
* **mcp:** the connector survives a runtime that cannot list the servers ([d0f555f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0f555fa14f51de33591e572a41ded5b59a3e4dd))
|
|
64
|
+
* **merge:** the boolean input is read as a boolean ([971b716](https://github.com/ManotLuijiu/pi-harness-runtime/commit/971b7169a43db382dbdeb6bb9bab02ab56e0351c))
|
|
65
|
+
* **merge:** the manual job needs the right of the merge ([7ba685e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7ba685ec43d815f90aa35b742579e87e76c69209))
|
|
66
|
+
* **merge:** the merge of the pull request is the GraphQL mutation ([972bab4](https://github.com/ManotLuijiu/pi-harness-runtime/commit/972bab4b0f7faf1b0047f3bb767ef6db3de4b2fa))
|
|
67
|
+
* **merge:** the workflow merges the pull request the gates cleared ([d7639ec](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d7639ec9b83723510acb4a5c4e23d5d6167c3af6))
|
|
68
|
+
* **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))
|
|
69
|
+
* **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))
|
|
70
|
+
* **recovery:** a cancelled countdown does not own the next attempt ([7b79f30](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7b79f301389fae48201e696d3086d257ed722fb9))
|
|
71
|
+
* **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))
|
|
72
|
+
* **recovery:** a manual request takes the work back from the countdown ([fa81d8f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa81d8fd9d6160166a095e07bdf17049bbafa32d))
|
|
73
|
+
* **recovery:** the predicate of Pi decides the retry, the provider identity is normalized ([6c8c17b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/6c8c17b53302cea1602d192251eacd0ebbd3e8c9))
|
|
74
|
+
* **release:** a manual release keeps the version of its manifest ([122e661](https://github.com/ManotLuijiu/pi-harness-runtime/commit/122e661ea48cb8aff14c71dbd0221a4cf0ba4c8e))
|
|
75
|
+
* **release:** the alignment names the reason of a failure ([5814dd0](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5814dd0b780f5839cf8011ed0cbbbb31e7eb0418))
|
|
76
|
+
* **release:** the channels of the package name the release ([a7a273f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a7a273ffe8398e2b5b07ef1c321777de41792c6e))
|
|
77
|
+
* **release:** the release publishes and leaves the channels alone ([5871746](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5871746589c1281d855dbeb591b02419fa43f22e))
|
|
78
|
+
* **release:** the release pull request names the version of its branch ([a846e83](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a846e83e6de6e529f4bca05e869db0b5eebb37c5))
|
|
79
|
+
* **release:** the release scans the tree of the commit it publishes ([7d47a0b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7d47a0b5406480a1e1d3a52623a76aabd1e2d0ba))
|
|
80
|
+
* **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))
|
|
81
|
+
* **workspace:** keep a client name out of the comment about the search depth ([b572e0a](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b572e0af16ff562203bda2b5c47b41807cff5a95))
|
|
82
|
+
* **workspace:** the repository names the mode before the mode stays unknown ([188a32c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/188a32c7a6af1465dd24714278fccc73d06f6477))
|
|
83
|
+
|
|
84
|
+
### [1.1.503](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.503) (2026-11-10)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
* **actions:** register the job resume, the GLM countdown and the queued continuations ([177c964](https://github.com/ManotLuijiu/pi-harness-runtime/commit/177c964555b0057e6bc7d293dafab10c95eabbf9))
|
|
90
|
+
* **delegation:** a child is only a child when it really ran ([ac4e678](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ac4e6782d7d4bc4941e458425c8a9f38a51fc9d4))
|
|
91
|
+
* **delegation:** the scope of a request is measured before it is judged ([684b6a5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/684b6a55184f63d3be24c48dcecfb0b13410dc15))
|
|
92
|
+
* **honcho:** the memory service speaks the native MCP of Pi ([f9f740c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f9f740c12869bae4c4380afbe8c76e12388bb744))
|
|
93
|
+
* **jev:** one decision per question, bound to the question it was evaluated for ([03448aa](https://github.com/ManotLuijiu/pi-harness-runtime/commit/03448aaa17f2d0c3bcf644b0b1d5949727dfff8c))
|
|
94
|
+
* **jev:** the evaluation of a choice sees what the options mean ([f0c207e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f0c207e074701e6b7dab0965170ec39453d9d502))
|
|
95
|
+
* **jev:** the pending question carries the ask and the answer ([a792133](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a792133e517fb8c12d3363e98942f3af30270f27))
|
|
96
|
+
* **jev:** the pending question counts down to the decision ([d0cc171](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0cc171223986b2d32c670b6c1c74712fe0a4ad8))
|
|
97
|
+
* **keys:** tell the user what to do about an exposed key file ([7031003](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7031003574307351b7a8f28ee14159b58e17b793))
|
|
98
|
+
* **keys:** the key files are repaired when their permissions are unsafe ([e9c2c26](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e9c2c26b287665b56ed749de269737e8403bb8af))
|
|
99
|
+
* **mcp:** the harness connects the registered servers when nobody else does ([7fef951](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7fef95137ad4664df57f045cd91b7d233315b0bc))
|
|
100
|
+
* **merge:** a manual run can leave the merge to the pull request event ([b3d1950](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b3d1950b5941c78ccd56951acdafd1d4afbe1bff))
|
|
101
|
+
* **phase:** the agent owns the todo list and the harness says so ([c489370](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c489370bd7926aece8cb1a77aa20ca2d2672f1fb))
|
|
102
|
+
* **providers:** a shared registry of the pending automatic actions and a bounded recovery ([c5f955b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c5f955bc82adcb6999a89d5bc278fa87fccee022))
|
|
103
|
+
* **providers:** one failure has one executor, and the retry bridge is checked ([e73c4c7](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e73c4c76ff20a9708083659bdcefe74870a84837))
|
|
104
|
+
* **review:** the review starts on its own when the implementation is done ([04f51f5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/04f51f599cd3222b6c74dd8fadb1373bd72d9bd7))
|
|
105
|
+
* **status:** the status line names the phase, the progress and the children ([0167bf3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0167bf396a0b987c1d44f3b869351976a951dd65))
|
|
106
|
+
* **test:** the task waits for the final tier of the validation plan ([fa147db](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa147dbf7d50d56e6ea48c6d8fbb4fcb190caf8a))
|
|
107
|
+
* **validation:** a large job starts with a measured pilot ([425964b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/425964b04a3d4fa02adfabed47ff62c5ec2b9c28))
|
|
108
|
+
* **validation:** the size of a job is a fact, not a phrase ([8aa6c11](https://github.com/ManotLuijiu/pi-harness-runtime/commit/8aa6c119565d0f8412dc8aeafa6b295d47d3f093))
|
|
109
|
+
* **workspace:** a Frappe bench names the mode of the workspace ([9d58517](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d585172063a330992fee933316e268ae9985e3c))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### Bug Fixes
|
|
113
|
+
|
|
114
|
+
* **ci:** every run of a required check counts, and the worst one decides ([da9e0da](https://github.com/ManotLuijiu/pi-harness-runtime/commit/da9e0da6b0ca29cb320764fd5fc1b8a8dee8b1e0))
|
|
115
|
+
* **ci:** the newest attempt of a run decides, not the attempt that failed ([9d7adcc](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d7adcc31cbacc517c3c1a9bcd3956be94c908ef))
|
|
116
|
+
* **harness:** a raw control byte hid the request scope from the review ([852b1ff](https://github.com/ManotLuijiu/pi-harness-runtime/commit/852b1ff3afc21adb71e92b85d21ff1c88e14816a))
|
|
117
|
+
* **honcho:** a handshake that never finishes is named instead of hanging the startup ([d66005f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d66005f928a4f8df5de5b8a0579cbd4f8df37ff9))
|
|
118
|
+
* **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))
|
|
119
|
+
* **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))
|
|
120
|
+
* **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))
|
|
121
|
+
* **honcho:** the report names the state of the MCP server, not the registration ([762f4d5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/762f4d59e4eabcab9a1c21a61aa522c3267621b3))
|
|
122
|
+
* **hooks:** a tag is checked through the commit behind it ([c823e8e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c823e8e1f6973c62b5449a97c101759a4d5cbba5))
|
|
123
|
+
* **jev:** a completion question, a stale check and a pending validation ([827120b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/827120b4138b6f5ae253e69154de190085703de8))
|
|
124
|
+
* **jev:** a new request does not inherit the completion of the old one ([0f863c7](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0f863c7fcaf35e261beabebef15b8ab634132fdc))
|
|
125
|
+
* **jev:** a prohibition must not hide a destructive action ([78a6cc1](https://github.com/ManotLuijiu/pi-harness-runtime/commit/78a6cc199e647f812e145483f7e94991358d8f34))
|
|
126
|
+
* **jev:** a refusal without punctuation, and only a decline of an action ([ef3dbf8](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ef3dbf87a2a1725373281613a0d48881ed5d2239))
|
|
127
|
+
* **jev:** a rejection during the countdown pauses the work ([9b018ce](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9b018ce1152b6724dee73cdc901b8a360ecc91ab))
|
|
128
|
+
* **jev:** a session switch ends the wait of the old session ([ca03d39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ca03d399c0d4a1b2dd428ac39836ab53c0e51ab6))
|
|
129
|
+
* **jev:** an open question is not a permission to answer it ([e20eca2](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e20eca24bb88d385198bb12ee3ebf573af9aea86))
|
|
130
|
+
* **jev:** keep a comparative caveat with the option it constrains ([7be306b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7be306b0d0872713ebca9386d613ae5a8da9d5b6))
|
|
131
|
+
* **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))
|
|
132
|
+
* **jev:** the action of the question, and an open question blocks the work ([1f9ff39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1f9ff39efc4ee17464c54c2ca9b583245093dbac))
|
|
133
|
+
* **jev:** the alternatives of a question are parsed without a quadratic pattern ([63016a3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/63016a3f0488acb801990dd46770c00d382b5858))
|
|
134
|
+
* **jev:** the countdown of an obsolete question does not outlive the work ([fe78b29](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fe78b29e6fc513b11a6993bc68fd9418dc77f79b))
|
|
135
|
+
* **jev:** the facts of an option survive the wording of the agent ([5a6250c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5a6250c07aa8d965bc6ae242cccbf519477598f8))
|
|
136
|
+
* **jev:** the scope decides the question, the identity guards the awaits ([ed348b2](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ed348b2f94460a3b3ac11c01afd4420ee4ec1020))
|
|
137
|
+
* **jev:** the scope of a request on every human path, and the todos it touched ([cec8f36](https://github.com/ManotLuijiu/pi-harness-runtime/commit/cec8f3644333b1d13a203340df80a30fef5c1ac0))
|
|
138
|
+
* **jev:** the subject of the scope decides, a clarification is preserved ([faf6a0f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/faf6a0fe7d0dce94d4fa48d0d7a57d126556ba6d))
|
|
139
|
+
* **keys:** the key directory is audited as a tree ([081cc75](https://github.com/ManotLuijiu/pi-harness-runtime/commit/081cc75ac8ceff36b0d619c3f76371dc08459d3c))
|
|
140
|
+
* **logging:** the sanitizer of a message writes its control characters as escapes ([f4bbdb9](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f4bbdb94bc1801d4228142bc1a1b31505c42a575))
|
|
141
|
+
* **mcp:** the connector and the watcher stop with the session ([4d1b87d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/4d1b87d14d015749025b62bf54d6d0b6137295f7))
|
|
142
|
+
* **mcp:** the connector survives a runtime that cannot list the servers ([d0f555f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0f555fa14f51de33591e572a41ded5b59a3e4dd))
|
|
143
|
+
* **merge:** the boolean input is read as a boolean ([971b716](https://github.com/ManotLuijiu/pi-harness-runtime/commit/971b7169a43db382dbdeb6bb9bab02ab56e0351c))
|
|
144
|
+
* **merge:** the manual job needs the right of the merge ([7ba685e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7ba685ec43d815f90aa35b742579e87e76c69209))
|
|
145
|
+
* **merge:** the merge of the pull request is the GraphQL mutation ([972bab4](https://github.com/ManotLuijiu/pi-harness-runtime/commit/972bab4b0f7faf1b0047f3bb767ef6db3de4b2fa))
|
|
146
|
+
* **merge:** the workflow merges the pull request the gates cleared ([d7639ec](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d7639ec9b83723510acb4a5c4e23d5d6167c3af6))
|
|
147
|
+
* **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))
|
|
148
|
+
* **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))
|
|
149
|
+
* **recovery:** a cancelled countdown does not own the next attempt ([7b79f30](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7b79f301389fae48201e696d3086d257ed722fb9))
|
|
150
|
+
* **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))
|
|
151
|
+
* **recovery:** a manual request takes the work back from the countdown ([fa81d8f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa81d8fd9d6160166a095e07bdf17049bbafa32d))
|
|
152
|
+
* **recovery:** the predicate of Pi decides the retry, the provider identity is normalized ([6c8c17b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/6c8c17b53302cea1602d192251eacd0ebbd3e8c9))
|
|
153
|
+
* **release:** a manual release keeps the version of its manifest ([122e661](https://github.com/ManotLuijiu/pi-harness-runtime/commit/122e661ea48cb8aff14c71dbd0221a4cf0ba4c8e))
|
|
154
|
+
* **release:** the alignment names the reason of a failure ([5814dd0](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5814dd0b780f5839cf8011ed0cbbbb31e7eb0418))
|
|
155
|
+
* **release:** the channels of the package name the release ([a7a273f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a7a273ffe8398e2b5b07ef1c321777de41792c6e))
|
|
156
|
+
* **release:** the release publishes and leaves the channels alone ([5871746](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5871746589c1281d855dbeb591b02419fa43f22e))
|
|
157
|
+
* **release:** the release pull request names the version of its branch ([a846e83](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a846e83e6de6e529f4bca05e869db0b5eebb37c5))
|
|
158
|
+
* **release:** the release scans the tree of the commit it publishes ([7d47a0b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7d47a0b5406480a1e1d3a52623a76aabd1e2d0ba))
|
|
159
|
+
* **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))
|
|
160
|
+
* **workspace:** keep a client name out of the comment about the search depth ([b572e0a](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b572e0af16ff562203bda2b5c47b41807cff5a95))
|
|
161
|
+
* **workspace:** the repository names the mode before the mode stays unknown ([188a32c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/188a32c7a6af1465dd24714278fccc73d06f6477))
|
|
162
|
+
|
|
5
163
|
### [1.1.502](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.502) (2026-11-10)
|
|
6
164
|
|
|
7
165
|
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
* how the list looked when the request started, and it derives from that
|
|
11
11
|
* memory which todos belong to the request that is running.
|
|
12
12
|
*
|
|
13
|
+
* The list alone is not enough to tell that: a todo that the request
|
|
14
|
+
* reopened and finished again looks exactly like the todo it was before.
|
|
15
|
+
* The history of the list says what a change touched, so the request keeps
|
|
16
|
+
* the todo it worked on.
|
|
17
|
+
*
|
|
13
18
|
* Nothing here touches the list: the history stays a record of what
|
|
14
19
|
* happened, and the scope is only a reading of it.
|
|
15
20
|
*/
|
|
@@ -26,6 +31,14 @@ export interface RequestTodoLike {
|
|
|
26
31
|
status: string;
|
|
27
32
|
}
|
|
28
33
|
|
|
34
|
+
/**
|
|
35
|
+
* One state of the list in its history.
|
|
36
|
+
*/
|
|
37
|
+
export interface TodoHistoryLike {
|
|
38
|
+
/** The list as it was after the change. */
|
|
39
|
+
items: readonly RequestTodoLike[];
|
|
40
|
+
}
|
|
41
|
+
|
|
29
42
|
/**
|
|
30
43
|
* The scope of the request that is running.
|
|
31
44
|
*/
|
|
@@ -37,6 +50,27 @@ export interface JevRequestScope {
|
|
|
37
50
|
* the shape it had then.
|
|
38
51
|
*/
|
|
39
52
|
readonly baseline: ReadonlyMap<string, string>;
|
|
53
|
+
/**
|
|
54
|
+
* The keys of the todos that the request touched.
|
|
55
|
+
*
|
|
56
|
+
* A todo belongs to the request when the request changed it, also when
|
|
57
|
+
* the change left it in the state it had before.
|
|
58
|
+
*/
|
|
59
|
+
readonly touched: ReadonlySet<string>;
|
|
60
|
+
/**
|
|
61
|
+
* The number of states the list had when the request started.
|
|
62
|
+
*
|
|
63
|
+
* The states after this number are the changes of the request.
|
|
64
|
+
*/
|
|
65
|
+
readonly historyIndex: number;
|
|
66
|
+
/**
|
|
67
|
+
* Is the number of states known?
|
|
68
|
+
*
|
|
69
|
+
* The history of the list could not be read when the request started:
|
|
70
|
+
* the changes of the request cannot be told from the changes of the
|
|
71
|
+
* earlier requests, so the history is not used at all.
|
|
72
|
+
*/
|
|
73
|
+
readonly historyKnown: boolean;
|
|
40
74
|
}
|
|
41
75
|
|
|
42
76
|
/**
|
|
@@ -64,12 +98,70 @@ function itemShape(item: RequestTodoLike): string {
|
|
|
64
98
|
return `${item.status}\0${(item.subject ?? "").trim()}`;
|
|
65
99
|
}
|
|
66
100
|
|
|
101
|
+
/**
|
|
102
|
+
* The keys of the items that a change touched.
|
|
103
|
+
*
|
|
104
|
+
* The history is a sequence of states. A change touched an item when the
|
|
105
|
+
* item is new, when its status or its subject changed, and when it is gone.
|
|
106
|
+
* An item that was reopened and finished again is touched twice: the
|
|
107
|
+
* request that did it keeps the item.
|
|
108
|
+
*/
|
|
109
|
+
export function touchedKeys(
|
|
110
|
+
history: readonly TodoHistoryLike[] | null | undefined,
|
|
111
|
+
from: number,
|
|
112
|
+
): Set<string> {
|
|
113
|
+
const touched = new Set<string>();
|
|
114
|
+
if (!history || history.length === 0) return touched;
|
|
115
|
+
// The state before the request is the last one before its first change.
|
|
116
|
+
const start = Math.max(1, from);
|
|
117
|
+
for (let index = start; index < history.length; index += 1) {
|
|
118
|
+
const before = new Map<string, RequestTodoLike>();
|
|
119
|
+
for (const item of history[index - 1]?.items ?? []) {
|
|
120
|
+
const key = itemKey(item);
|
|
121
|
+
if (key !== null) before.set(key, item);
|
|
122
|
+
}
|
|
123
|
+
const after = new Map<string, RequestTodoLike>();
|
|
124
|
+
for (const item of history[index]?.items ?? []) {
|
|
125
|
+
const key = itemKey(item);
|
|
126
|
+
if (key !== null) after.set(key, item);
|
|
127
|
+
}
|
|
128
|
+
for (const [key, item] of after) {
|
|
129
|
+
const previous = before.get(key);
|
|
130
|
+
if (
|
|
131
|
+
!previous ||
|
|
132
|
+
previous.status !== item.status ||
|
|
133
|
+
(previous.subject ?? "").trim() !== (item.subject ?? "").trim()
|
|
134
|
+
) {
|
|
135
|
+
touched.add(key);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
for (const key of before.keys()) {
|
|
139
|
+
// The item is gone: the change that removed it touched it.
|
|
140
|
+
if (!after.has(key)) touched.add(key);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return touched;
|
|
144
|
+
}
|
|
145
|
+
|
|
67
146
|
/**
|
|
68
147
|
* Remember how the list looked when the request started.
|
|
69
148
|
*/
|
|
70
149
|
export function captureRequestScope(
|
|
71
150
|
items: readonly RequestTodoLike[] | null | undefined,
|
|
72
151
|
generation: number,
|
|
152
|
+
options: {
|
|
153
|
+
/** The keys of the todos that the request touched. */
|
|
154
|
+
touched?: ReadonlySet<string>;
|
|
155
|
+
/** The number of states the list had when the request started. */
|
|
156
|
+
historyIndex?: number;
|
|
157
|
+
/**
|
|
158
|
+
* Is the number of states known?
|
|
159
|
+
*
|
|
160
|
+
* Without it the history is not read: the changes of the request
|
|
161
|
+
* cannot be told from the changes of the earlier requests.
|
|
162
|
+
*/
|
|
163
|
+
historyKnown?: boolean;
|
|
164
|
+
} = {},
|
|
73
165
|
): JevRequestScope {
|
|
74
166
|
const baseline = new Map<string, string>();
|
|
75
167
|
for (const item of items ?? []) {
|
|
@@ -77,7 +169,13 @@ export function captureRequestScope(
|
|
|
77
169
|
if (key === null) continue;
|
|
78
170
|
baseline.set(key, itemShape(item));
|
|
79
171
|
}
|
|
80
|
-
return {
|
|
172
|
+
return {
|
|
173
|
+
generation,
|
|
174
|
+
baseline,
|
|
175
|
+
touched: options.touched ?? new Set<string>(),
|
|
176
|
+
historyIndex: options.historyIndex ?? 0,
|
|
177
|
+
historyKnown: options.historyKnown ?? options.touched !== undefined,
|
|
178
|
+
};
|
|
81
179
|
}
|
|
82
180
|
|
|
83
181
|
/**
|
|
@@ -97,6 +195,9 @@ export function itemsOfRequest(
|
|
|
97
195
|
// An item without an id cannot be told apart: it belongs to the
|
|
98
196
|
// request that is running.
|
|
99
197
|
if (key === null) return true;
|
|
198
|
+
// The request touched the item, also when the change left it in the
|
|
199
|
+
// state it had before.
|
|
200
|
+
if (scope.touched.has(key)) return true;
|
|
100
201
|
const before = scope.baseline.get(key);
|
|
101
202
|
// The item was not there when the request started.
|
|
102
203
|
if (before === undefined) return true;
|
|
@@ -130,14 +231,25 @@ export class RequestScopeTracker {
|
|
|
130
231
|
private readonly readTodos: () => Promise<
|
|
131
232
|
readonly RequestTodoLike[] | null | undefined
|
|
132
233
|
>;
|
|
234
|
+
/** The read of the history of the task list. */
|
|
235
|
+
private readonly readHistory?: () => Promise<
|
|
236
|
+
readonly TodoHistoryLike[] | null | undefined
|
|
237
|
+
>;
|
|
133
238
|
|
|
134
239
|
constructor(options: {
|
|
135
240
|
/** Read the task list as it is now. */
|
|
136
|
-
readTodos: () => Promise<
|
|
137
|
-
|
|
138
|
-
|
|
241
|
+
readTodos: () => Promise<readonly RequestTodoLike[] | null | undefined>;
|
|
242
|
+
/**
|
|
243
|
+
* Read the history of the task list: the state after every change.
|
|
244
|
+
*
|
|
245
|
+
* Without it the tracker sees the list alone, and a todo that the
|
|
246
|
+
* request reopened and finished again looks like the todo it was
|
|
247
|
+
* before.
|
|
248
|
+
*/
|
|
249
|
+
readHistory?: () => Promise<readonly TodoHistoryLike[] | null | undefined>;
|
|
139
250
|
}) {
|
|
140
251
|
this.readTodos = options.readTodos;
|
|
252
|
+
this.readHistory = options.readHistory;
|
|
141
253
|
}
|
|
142
254
|
|
|
143
255
|
/**
|
|
@@ -153,7 +265,9 @@ export class RequestScopeTracker {
|
|
|
153
265
|
* The list is read now, while the request has not touched it: this is
|
|
154
266
|
* the work that the request inherits. The read of the list is
|
|
155
267
|
* asynchronous, so the capture happens when the list arrives: the
|
|
156
|
-
* scope is the list of that moment and not of a later one.
|
|
268
|
+
* scope is the list of that moment and not of a later one. The history
|
|
269
|
+
* is read after the list, so the changes of the request are never
|
|
270
|
+
* counted as the changes of an earlier one.
|
|
157
271
|
*
|
|
158
272
|
* A message of the harness itself does not begin a request: it is the
|
|
159
273
|
* harness that continues the work, not the human that asks for it.
|
|
@@ -161,19 +275,42 @@ export class RequestScopeTracker {
|
|
|
161
275
|
begin(): number {
|
|
162
276
|
this._generation += 1;
|
|
163
277
|
const generation = this._generation;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
278
|
+
this._pending = (async () => {
|
|
279
|
+
let items: readonly RequestTodoLike[] | null | undefined;
|
|
280
|
+
try {
|
|
281
|
+
items = await this.readTodos();
|
|
282
|
+
} catch {
|
|
283
|
+
// The list could not be read: there is no evidence of what
|
|
284
|
+
// the request inherits, so there is no scope.
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
let history: readonly TodoHistoryLike[] | null = null;
|
|
288
|
+
try {
|
|
289
|
+
history = (await this.readHistory?.()) ?? null;
|
|
290
|
+
} catch {
|
|
291
|
+
history = null;
|
|
292
|
+
}
|
|
293
|
+
return captureRequestScope(items ?? null, generation, {
|
|
294
|
+
historyIndex: history?.length ?? 0,
|
|
295
|
+
historyKnown: history !== null,
|
|
296
|
+
});
|
|
297
|
+
})();
|
|
174
298
|
return generation;
|
|
175
299
|
}
|
|
176
300
|
|
|
301
|
+
/**
|
|
302
|
+
* The session changed.
|
|
303
|
+
*
|
|
304
|
+
* The scope of the previous session says nothing about the new one: the
|
|
305
|
+
* todos of the previous session are the history of that session. The
|
|
306
|
+
* scope is dropped, and the work of the new session is read without a
|
|
307
|
+
* scope until the human asks for something.
|
|
308
|
+
*/
|
|
309
|
+
reset(): void {
|
|
310
|
+
this._generation += 1;
|
|
311
|
+
this._pending = null;
|
|
312
|
+
}
|
|
313
|
+
|
|
177
314
|
/**
|
|
178
315
|
* The scope of the request that is running.
|
|
179
316
|
*
|
|
@@ -195,7 +332,24 @@ export class RequestScopeTracker {
|
|
|
195
332
|
}
|
|
196
333
|
const scope = pending ? await pending : null;
|
|
197
334
|
// A request that started in the meantime owns the work now.
|
|
198
|
-
if (pending
|
|
335
|
+
if (pending !== this._pending) continue;
|
|
336
|
+
let history: readonly TodoHistoryLike[] | null = null;
|
|
337
|
+
try {
|
|
338
|
+
history = (await this.readHistory?.()) ?? null;
|
|
339
|
+
} catch {
|
|
340
|
+
history = null;
|
|
341
|
+
}
|
|
342
|
+
// A request that started while the history was read owns the
|
|
343
|
+
// work now: the scope of the older request is stale.
|
|
344
|
+
if (pending !== this._pending) continue;
|
|
345
|
+
// The history is only read when the number of states was known
|
|
346
|
+
// when the request started: otherwise the changes of the earlier
|
|
347
|
+
// requests would look like the changes of this one.
|
|
348
|
+
const touched =
|
|
349
|
+
scope?.historyKnown === true
|
|
350
|
+
? touchedKeys(history, scope.historyIndex)
|
|
351
|
+
: new Set<string>();
|
|
352
|
+
return { scope: scope ? { ...scope, touched } : null, items };
|
|
199
353
|
}
|
|
200
354
|
return { scope: null, items: null };
|
|
201
355
|
}
|
package/index.ts
CHANGED
|
@@ -612,8 +612,44 @@ const requestScopeTracker = new RequestScopeTracker({
|
|
|
612
612
|
const snapshot = await controller.getSnapshot();
|
|
613
613
|
return snapshot?.items ?? null;
|
|
614
614
|
},
|
|
615
|
+
readHistory: async () => {
|
|
616
|
+
// The history says what a change touched, also when the todo is
|
|
617
|
+
// back in the state it had before: a todo that the request
|
|
618
|
+
// reopened and finished again is work of the request that did it.
|
|
619
|
+
const controller = sharedState.todoContinuationController as {
|
|
620
|
+
getHistory?: () => Promise<
|
|
621
|
+
{ items: TodoStateLike[] }[]
|
|
622
|
+
>;
|
|
623
|
+
} | null;
|
|
624
|
+
if (!controller || typeof controller.getHistory !== "function") {
|
|
625
|
+
return null;
|
|
626
|
+
}
|
|
627
|
+
const history = await controller.getHistory();
|
|
628
|
+
return Array.isArray(history) ? history : null;
|
|
629
|
+
},
|
|
615
630
|
});
|
|
616
631
|
|
|
632
|
+
/**
|
|
633
|
+
* A request of the human begins.
|
|
634
|
+
*
|
|
635
|
+
* Every path that carries the words or the decision of the human into Pi
|
|
636
|
+
* is a boundary of a request. The interactive input event is one. A
|
|
637
|
+
* message of a channel is another, because it reaches Pi as a message of
|
|
638
|
+
* the harness and the input event cannot tell it apart from the traffic
|
|
639
|
+
* of the harness itself.
|
|
640
|
+
*
|
|
641
|
+
* A path that forwards the human without this boundary leaves the scope of
|
|
642
|
+
* the previous request in place, and the new request inherits the
|
|
643
|
+
* completion of the old one: a question of the new request is then a
|
|
644
|
+
* question about work that was already done, and it is dropped.
|
|
645
|
+
*
|
|
646
|
+
* The messages of the harness itself begin nothing. They continue the work
|
|
647
|
+
* of the request that is running.
|
|
648
|
+
*/
|
|
649
|
+
function beginHumanRequest(): void {
|
|
650
|
+
requestScopeTracker.begin();
|
|
651
|
+
}
|
|
652
|
+
|
|
617
653
|
/**
|
|
618
654
|
* Apply an approval decision from a channel to the pending question.
|
|
619
655
|
*
|
|
@@ -1108,6 +1144,10 @@ async function startBiomeImplementation(
|
|
|
1108
1144
|
try {
|
|
1109
1145
|
const mod = await import("./packages/tooling-preference/dist/index.js");
|
|
1110
1146
|
const context = mod.detectToolingContext(workspaceRoot);
|
|
1147
|
+
// The decision of the human starts new work: it begins a request.
|
|
1148
|
+
// The prompt reaches Pi as a message of the harness, so the input
|
|
1149
|
+
// event cannot begin the scope of the request.
|
|
1150
|
+
beginHumanRequest();
|
|
1111
1151
|
await pi.sendUserMessage(
|
|
1112
1152
|
mod.buildToolingImplementationPrompt(context, workspaceRoot),
|
|
1113
1153
|
{ deliverAs: "steer" },
|
|
@@ -2792,6 +2832,9 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
2792
2832
|
// The runtime of the provider recovery reads the pause state
|
|
2793
2833
|
// of the user through this handle.
|
|
2794
2834
|
todoContinuationHandle = todoContinuationController;
|
|
2835
|
+
// The scope of the previous session says nothing about this
|
|
2836
|
+
// one: the todos of that session are its history.
|
|
2837
|
+
requestScopeTracker.reset();
|
|
2795
2838
|
// The callbacks that answer a question in a channel, and the
|
|
2796
2839
|
// replies of the user, reach the controller through the
|
|
2797
2840
|
// shared state. Without it every pause and every resume of
|
|
@@ -2813,6 +2856,8 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
2813
2856
|
todoContinuationHandle = null;
|
|
2814
2857
|
sharedState.todoContinuationController = null;
|
|
2815
2858
|
sharedState.validationLedger = null;
|
|
2859
|
+
// The scope belongs to the session that is ending.
|
|
2860
|
+
requestScopeTracker.reset();
|
|
2816
2861
|
});
|
|
2817
2862
|
|
|
2818
2863
|
// --- task-intake: Automatic todo capture from user requests -----------
|
|
@@ -3410,6 +3455,10 @@ async function advanceCodexTask(
|
|
|
3410
3455
|
|
|
3411
3456
|
// Execute action
|
|
3412
3457
|
if (action === "code" || action === "code_again") {
|
|
3458
|
+
// The decision of the human starts new work: it begins a request.
|
|
3459
|
+
// The message reaches Pi as a message of the harness, so the input
|
|
3460
|
+
// event cannot begin the scope of the request.
|
|
3461
|
+
beginHumanRequest();
|
|
3413
3462
|
await pi.sendUserMessage(
|
|
3414
3463
|
`Human approved. Proceed to implement: ${event.planPath}`,
|
|
3415
3464
|
{ deliverAs: "steer" }
|
|
@@ -3417,6 +3466,8 @@ async function advanceCodexTask(
|
|
|
3417
3466
|
event.status = "triggered";
|
|
3418
3467
|
logToFile("[codex-trigger]", `Advanced to code: ${event.planPath}`);
|
|
3419
3468
|
} else if (action === "review") {
|
|
3469
|
+
// The decision of the human starts new work: it begins a request.
|
|
3470
|
+
beginHumanRequest();
|
|
3420
3471
|
await pi.sendUserMessage(
|
|
3421
3472
|
"Human requests a review of the implementation.",
|
|
3422
3473
|
{ deliverAs: "steer" }
|
|
@@ -3744,7 +3795,7 @@ async function initTelegram(pi: ExtensionAPI): Promise<void> {
|
|
|
3744
3795
|
// request that ran before it is history now. The message reaches
|
|
3745
3796
|
// Pi as a message of the harness, so the input event cannot
|
|
3746
3797
|
// tell that it is a request.
|
|
3747
|
-
|
|
3798
|
+
beginHumanRequest();
|
|
3748
3799
|
// Forward the message to Pi as a user message
|
|
3749
3800
|
await pi.sendUserMessage(text, { deliverAs: "steer" });
|
|
3750
3801
|
});
|
|
@@ -5957,6 +6008,10 @@ function initLineVoiceQueue(pi: ExtensionAPI): void {
|
|
|
5957
6008
|
|
|
5958
6009
|
if (cmd.type === "voice-prompt" && cmd.text) {
|
|
5959
6010
|
logToFile("[LineVoice]", `Injecting voice prompt: "${cmd.text}"`);
|
|
6011
|
+
// The voice of the human is a request: it reaches Pi as a
|
|
6012
|
+
// message of the harness, so the input event cannot begin
|
|
6013
|
+
// the scope of the request.
|
|
6014
|
+
beginHumanRequest();
|
|
5960
6015
|
pi.sendUserMessage(cmd.text, { deliverAs: "steer" });
|
|
5961
6016
|
logToFile("[LineVoice]", "Voice prompt injected via steer");
|
|
5962
6017
|
}
|
|
@@ -6810,7 +6865,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
6810
6865
|
// previous request are history, and the completion of that request
|
|
6811
6866
|
// is not the completion of this one. The message of the harness
|
|
6812
6867
|
// itself carries the source `extension` and begins nothing.
|
|
6813
|
-
|
|
6868
|
+
beginHumanRequest();
|
|
6814
6869
|
});
|
|
6815
6870
|
|
|
6816
6871
|
// The run settled: the internal retries of Pi are over, so a failure
|
package/package.json
CHANGED