pi-harness-runtime 1.1.460 → 1.1.461
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 +39 -0
- package/harness/pending-wait.ts +69 -0
- package/index.ts +37 -25
- 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/package.json +1 -1
- 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,45 @@
|
|
|
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.461](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.461) (2026-10-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **delegation:** a child is only a child when it really ran ([ac4e678](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ac4e6782d7d4bc4941e458425c8a9f38a51fc9d4))
|
|
11
|
+
* **delegation:** the scope of a request is measured before it is judged ([684b6a5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/684b6a55184f63d3be24c48dcecfb0b13410dc15))
|
|
12
|
+
* **honcho:** the memory service speaks the native MCP of Pi ([f9f740c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f9f740c12869bae4c4380afbe8c76e12388bb744))
|
|
13
|
+
* **jev:** the pending question carries the ask and the answer ([a792133](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a792133e517fb8c12d3363e98942f3af30270f27))
|
|
14
|
+
* **jev:** the pending question counts down to the decision ([d0cc171](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d0cc171223986b2d32c670b6c1c74712fe0a4ad8))
|
|
15
|
+
* **keys:** the key files are repaired when their permissions are unsafe ([e9c2c26](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e9c2c26b287665b56ed749de269737e8403bb8af))
|
|
16
|
+
* **merge:** a manual run can leave the merge to the pull request event ([b3d1950](https://github.com/ManotLuijiu/pi-harness-runtime/commit/b3d1950b5941c78ccd56951acdafd1d4afbe1bff))
|
|
17
|
+
* **phase:** the agent owns the todo list and the harness says so ([c489370](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c489370bd7926aece8cb1a77aa20ca2d2672f1fb))
|
|
18
|
+
* **review:** the review starts on its own when the implementation is done ([04f51f5](https://github.com/ManotLuijiu/pi-harness-runtime/commit/04f51f599cd3222b6c74dd8fadb1373bd72d9bd7))
|
|
19
|
+
* **status:** the status line names the phase, the progress and the children ([0167bf3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/0167bf396a0b987c1d44f3b869351976a951dd65))
|
|
20
|
+
* **test:** the task waits for the final tier of the validation plan ([fa147db](https://github.com/ManotLuijiu/pi-harness-runtime/commit/fa147dbf7d50d56e6ea48c6d8fbb4fcb190caf8a))
|
|
21
|
+
* **validation:** a large job starts with a measured pilot ([425964b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/425964b04a3d4fa02adfabed47ff62c5ec2b9c28))
|
|
22
|
+
* **validation:** the size of a job is a fact, not a phrase ([8aa6c11](https://github.com/ManotLuijiu/pi-harness-runtime/commit/8aa6c119565d0f8412dc8aeafa6b295d47d3f093))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **ci:** every run of a required check counts, and the worst one decides ([da9e0da](https://github.com/ManotLuijiu/pi-harness-runtime/commit/da9e0da6b0ca29cb320764fd5fc1b8a8dee8b1e0))
|
|
28
|
+
* **ci:** the newest attempt of a run decides, not the attempt that failed ([9d7adcc](https://github.com/ManotLuijiu/pi-harness-runtime/commit/9d7adcc31cbacc517c3c1a9bcd3956be94c908ef))
|
|
29
|
+
* **hooks:** a tag is checked through the commit behind it ([c823e8e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/c823e8e1f6973c62b5449a97c101759a4d5cbba5))
|
|
30
|
+
* **jev:** a session switch ends the wait of the old session ([ca03d39](https://github.com/ManotLuijiu/pi-harness-runtime/commit/ca03d399c0d4a1b2dd428ac39836ab53c0e51ab6))
|
|
31
|
+
* **jev:** the alternatives of a question are parsed without a quadratic pattern ([63016a3](https://github.com/ManotLuijiu/pi-harness-runtime/commit/63016a3f0488acb801990dd46770c00d382b5858))
|
|
32
|
+
* **keys:** the key directory is audited as a tree ([081cc75](https://github.com/ManotLuijiu/pi-harness-runtime/commit/081cc75ac8ceff36b0d619c3f76371dc08459d3c))
|
|
33
|
+
* **merge:** the boolean input is read as a boolean ([971b716](https://github.com/ManotLuijiu/pi-harness-runtime/commit/971b7169a43db382dbdeb6bb9bab02ab56e0351c))
|
|
34
|
+
* **merge:** the manual job needs the right of the merge ([7ba685e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7ba685ec43d815f90aa35b742579e87e76c69209))
|
|
35
|
+
* **merge:** the merge of the pull request is the GraphQL mutation ([972bab4](https://github.com/ManotLuijiu/pi-harness-runtime/commit/972bab4b0f7faf1b0047f3bb767ef6db3de4b2fa))
|
|
36
|
+
* **merge:** the workflow merges the pull request the gates cleared ([d7639ec](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d7639ec9b83723510acb4a5c4e23d5d6167c3af6))
|
|
37
|
+
* **release:** a manual release keeps the version of its manifest ([122e661](https://github.com/ManotLuijiu/pi-harness-runtime/commit/122e661ea48cb8aff14c71dbd0221a4cf0ba4c8e))
|
|
38
|
+
* **release:** the alignment names the reason of a failure ([5814dd0](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5814dd0b780f5839cf8011ed0cbbbb31e7eb0418))
|
|
39
|
+
* **release:** the channels of the package name the release ([a7a273f](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a7a273ffe8398e2b5b07ef1c321777de41792c6e))
|
|
40
|
+
* **release:** the release publishes and leaves the channels alone ([5871746](https://github.com/ManotLuijiu/pi-harness-runtime/commit/5871746589c1281d855dbeb591b02419fa43f22e))
|
|
41
|
+
* **release:** the release pull request names the version of its branch ([a846e83](https://github.com/ManotLuijiu/pi-harness-runtime/commit/a846e83e6de6e529f4bca05e869db0b5eebb37c5))
|
|
42
|
+
* **release:** the release scans the tree of the commit it publishes ([7d47a0b](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7d47a0b5406480a1e1d3a52623a76aabd1e2d0ba))
|
|
43
|
+
|
|
5
44
|
### [1.1.460](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.448...v1.1.460) (2026-10-28)
|
|
6
45
|
|
|
7
46
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The end of a wait for a pending question.
|
|
3
|
+
*
|
|
4
|
+
* The countdown, the wait state and the pending question belong together:
|
|
5
|
+
* when one of them ends, the others end with it. A wait that outlives its
|
|
6
|
+
* question lets the judge decide about a question that belongs to a session
|
|
7
|
+
* that is gone - the fallback poll would ask about a question nobody can
|
|
8
|
+
* answer any more.
|
|
9
|
+
*
|
|
10
|
+
* The helper owns that release, so every way out of a wait ends the same
|
|
11
|
+
* way.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** The question that is waiting for an answer. */
|
|
15
|
+
export interface PendingWaitQuestion {
|
|
16
|
+
requestId: string;
|
|
17
|
+
state: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** The pieces of the harness that the release of a wait touches. */
|
|
21
|
+
export interface PendingWaitOwner {
|
|
22
|
+
/** The question that is waiting for an answer, if there is one. */
|
|
23
|
+
currentQuestion(): PendingWaitQuestion | null | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Close the question.
|
|
26
|
+
*
|
|
27
|
+
* Returns true when the question was closed. A question that is not
|
|
28
|
+
* pending any more needs no closing.
|
|
29
|
+
*/
|
|
30
|
+
expireQuestion(requestId: string, reason: string): boolean;
|
|
31
|
+
/** Clear the wait state: the wait is over. */
|
|
32
|
+
clearWait(): void;
|
|
33
|
+
/** Stop the countdown of the wait and release its timer. */
|
|
34
|
+
stopCountdown(): void;
|
|
35
|
+
/** Clear the status row of the wait. */
|
|
36
|
+
clearStatus(): void;
|
|
37
|
+
/** Record the transition of the question. */
|
|
38
|
+
logTransition(requestId: string, outcome: string, reason: string): void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* End the wait for a pending question.
|
|
43
|
+
*
|
|
44
|
+
* The question is closed first, so nothing can decide about it any more,
|
|
45
|
+
* and the wait state follows. The reason names the way out, so the log of
|
|
46
|
+
* the transition says why the question was closed.
|
|
47
|
+
*/
|
|
48
|
+
export function endPendingWait(reason: string, owner: PendingWaitOwner): void {
|
|
49
|
+
// The countdown of the question is over with the wait: a tick of it
|
|
50
|
+
// must not draw a status and must not start a decision.
|
|
51
|
+
owner.stopCountdown();
|
|
52
|
+
|
|
53
|
+
// The question is closed explicitly, so the buttons of that request do
|
|
54
|
+
// not stay open and look like a request that is still waiting.
|
|
55
|
+
const question = owner.currentQuestion();
|
|
56
|
+
if (question && question.state === "pending") {
|
|
57
|
+
const expired = owner.expireQuestion(question.requestId, reason) === true;
|
|
58
|
+
owner.logTransition(
|
|
59
|
+
question.requestId,
|
|
60
|
+
expired ? "expired" : "closed",
|
|
61
|
+
reason,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// The wait state is over with the question: the judge is not asked
|
|
66
|
+
// about a question of a session that is gone.
|
|
67
|
+
owner.clearWait();
|
|
68
|
+
owner.clearStatus();
|
|
69
|
+
}
|
package/index.ts
CHANGED
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
PendingQuestionCountdown,
|
|
47
47
|
type CountdownView,
|
|
48
48
|
} from "./harness/pending-countdown.ts";
|
|
49
|
+
import { endPendingWait } from "./harness/pending-wait.ts";
|
|
49
50
|
import { isChannelDisabled, setChannelDisabled } from "./harness/notification-settings.ts";
|
|
50
51
|
// The Honcho contract lives with the Honcho integration. A type-only import
|
|
51
52
|
// is erased at runtime, so the startup keeps loading the module lazily.
|
|
@@ -1208,6 +1209,31 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
1208
1209
|
}
|
|
1209
1210
|
}
|
|
1210
1211
|
|
|
1212
|
+
/**
|
|
1213
|
+
* End the wait for a pending question.
|
|
1214
|
+
*
|
|
1215
|
+
* The countdown, the wait state and the pending question belong
|
|
1216
|
+
* together: when one of them ends, the others end with it. A wait
|
|
1217
|
+
* that outlives its question would let the judge decide about a
|
|
1218
|
+
* question of a session that is gone.
|
|
1219
|
+
*/
|
|
1220
|
+
function endWait(reason: string): void {
|
|
1221
|
+
endPendingWait(reason, {
|
|
1222
|
+
currentQuestion: () => sharedState.pqController?.getCurrentQuestion?.(),
|
|
1223
|
+
expireQuestion: (requestId: string, why: string) =>
|
|
1224
|
+
sharedState.pqController?.expireByTimeout?.(requestId, why) === true,
|
|
1225
|
+
clearWait: () => {
|
|
1226
|
+
waitingForUserSince = null;
|
|
1227
|
+
sharedState.waitingForUserSince = null;
|
|
1228
|
+
_lastNotifiedQuestion = "";
|
|
1229
|
+
},
|
|
1230
|
+
stopCountdown: () => pendingCountdown.stop(),
|
|
1231
|
+
clearStatus: () => updateAutoContinueStatus("IDLE"),
|
|
1232
|
+
logTransition: (requestId: string, outcome: string, why: string) =>
|
|
1233
|
+
logQuestionTransition(requestId, outcome, why),
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1211
1237
|
// Capture UI context from session_start
|
|
1212
1238
|
pi.on("session_start", (_event, ctx) => {
|
|
1213
1239
|
// The session of the runtime: the countdown of a question belongs
|
|
@@ -1217,9 +1243,11 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
1217
1243
|
).sessionManager?.getSessionId?.();
|
|
1218
1244
|
if (typeof sessionId === "string" && sessionId) {
|
|
1219
1245
|
if (_piSessionId && _piSessionId !== sessionId) {
|
|
1220
|
-
// The session changed: the
|
|
1221
|
-
//
|
|
1222
|
-
|
|
1246
|
+
// The session changed: the wait of the old session is
|
|
1247
|
+
// over with it. The question is closed and the wait
|
|
1248
|
+
// state is cleared, so the judge is not asked about a
|
|
1249
|
+
// question that nobody can answer any more.
|
|
1250
|
+
endWait("session-switched");
|
|
1223
1251
|
}
|
|
1224
1252
|
_piSessionId = sessionId;
|
|
1225
1253
|
}
|
|
@@ -1242,8 +1270,12 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
1242
1270
|
autoContinueTimer = null;
|
|
1243
1271
|
}
|
|
1244
1272
|
|
|
1245
|
-
//
|
|
1246
|
-
|
|
1273
|
+
// A restart does not survive in memory: the wait state and the
|
|
1274
|
+
// pending question are gone with the process. The question is
|
|
1275
|
+
// therefore closed explicitly, so the buttons of that request
|
|
1276
|
+
// do not stay open and look like a request that is still
|
|
1277
|
+
// waiting.
|
|
1278
|
+
endWait("session-ended");
|
|
1247
1279
|
|
|
1248
1280
|
// Clear UI binding and status
|
|
1249
1281
|
if (_setAutoContinueStatus) {
|
|
@@ -1252,27 +1284,7 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
1252
1284
|
}
|
|
1253
1285
|
_currentAutoContinueState = "";
|
|
1254
1286
|
|
|
1255
|
-
// A restart does not survive in memory: the wait state and the
|
|
1256
|
-
// pending question are gone with the process. The question is
|
|
1257
|
-
// therefore closed explicitly, so the buttons of that request
|
|
1258
|
-
// do not stay open and look like a request that is still
|
|
1259
|
-
// waiting.
|
|
1260
|
-
const pending = sharedState.pqController?.getCurrentQuestion?.();
|
|
1261
|
-
if (pending && pending.state === "pending") {
|
|
1262
|
-
const expired = sharedState.pqController?.expireByTimeout?.(
|
|
1263
|
-
pending.requestId,
|
|
1264
|
-
"session-ended",
|
|
1265
|
-
) === true;
|
|
1266
|
-
logQuestionTransition(
|
|
1267
|
-
pending.requestId,
|
|
1268
|
-
expired ? "expired" : "closed",
|
|
1269
|
-
"session-ended",
|
|
1270
|
-
);
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
1287
|
// Reset state
|
|
1274
|
-
waitingForUserSince = null;
|
|
1275
|
-
_lastNotifiedQuestion = "";
|
|
1276
1288
|
_inferenceInProgress = false;
|
|
1277
1289
|
});
|
|
1278
1290
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/two-phase-review",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.461",
|
|
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",
|