@linimin/pi-letscook 0.1.72 → 0.1.73
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
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.73
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- fixed `/cook` await-user-input resumptions so a user's exact reply in the active workflow can dispatch the mandatory follow-up completion role without forcing an extra `/cook` rerun
|
|
8
|
+
- kept active-workflow completion-role gating strict for ordinary main-chat turns while adding regression coverage that fails if await-user-input replies lose their workflow dispatch rights
|
|
9
|
+
|
|
3
10
|
## 0.1.72
|
|
4
11
|
|
|
5
12
|
### Fixed
|
|
6
13
|
|
|
7
14
|
- relaxed reviewer no-follow-up routing parsing so `Acceptable as-is: yes` now also accepts `none, proceed to completion-auditor` and `none - proceed to auditor` in addition to the original exact allowance, reducing avoidable completion transcription warnings without weakening the follow-up-slice guard
|
|
8
15
|
- fixed completion-role continuation gating so an already-active `/cook` workflow with `continuation_policy: continue` can keep dispatching mandatory follow-up roles even when the harness no longer recognizes the current turn text as an explicit `/cook` or workflow-driver prompt, while still blocking ordinary main-chat turns from calling `completion_role`
|
|
9
|
-
-
|
|
16
|
+
- fixed `/cook` await-user-input resumptions so a user's exact reply in the active workflow can dispatch the mandatory follow-up completion role without forcing an extra `/cook` rerun
|
|
17
|
+
- added a dedicated `completion-role-gating-test` regression so release-check now fails if active-workflow continuation falls back to the old prompt-only dispatch gate, await-user-input replies lose workflow dispatch rights, or ordinary main-chat turns stop being rejected
|
|
10
18
|
|
|
11
19
|
## 0.1.71
|
|
12
20
|
|
|
@@ -274,6 +274,15 @@ function isOrdinaryMainChatTurnDuringActiveWorkflow(
|
|
|
274
274
|
return true;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
function isAwaitingUserInputWorkflowReplyTurn(
|
|
278
|
+
snapshot: CompletionStateSnapshot | undefined,
|
|
279
|
+
ctx: { sessionManager?: any },
|
|
280
|
+
): boolean {
|
|
281
|
+
if (!hasActiveWorkflowEntry(snapshot)) return false;
|
|
282
|
+
if (!isOrdinaryMainChatTurnDuringActiveWorkflow(snapshot, ctx)) return false;
|
|
283
|
+
return asString(snapshot?.state?.continuation_policy) === "await_user_input";
|
|
284
|
+
}
|
|
285
|
+
|
|
277
286
|
function isCompletionRoleDispatchAllowedTurn(
|
|
278
287
|
snapshot: CompletionStateSnapshot | undefined,
|
|
279
288
|
ctx: { sessionManager?: any },
|
|
@@ -281,6 +290,7 @@ function isCompletionRoleDispatchAllowedTurn(
|
|
|
281
290
|
if (hasCompletionRoutingActivation(snapshot)) return true;
|
|
282
291
|
if (!hasActiveWorkflowEntry(snapshot)) return false;
|
|
283
292
|
if (isCompletionWorkflowSessionTurn(snapshot, ctx)) return true;
|
|
293
|
+
if (isAwaitingUserInputWorkflowReplyTurn(snapshot, ctx)) return true;
|
|
284
294
|
if (isOrdinaryMainChatTurnDuringActiveWorkflow(snapshot, ctx)) return false;
|
|
285
295
|
return asString(snapshot?.state?.continuation_policy) === "continue";
|
|
286
296
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linimin/pi-letscook",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
4
|
"description": "Pi package for long-running completion workflows with canonical .agent state, role-based subagents, continuity, and verification helpers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -23,13 +23,17 @@ const assertNotIncludes = (file, snippet) => {
|
|
|
23
23
|
|
|
24
24
|
assertIncludes('extensions/completion/index.ts', 'function isOrdinaryMainChatTurnDuringActiveWorkflow(');
|
|
25
25
|
assertIncludes('extensions/completion/index.ts', 'function isCompletionRoleDispatchAllowedTurn(');
|
|
26
|
+
assertIncludes('extensions/completion/index.ts', 'function isAwaitingUserInputWorkflowReplyTurn(');
|
|
27
|
+
assertIncludes('extensions/completion/index.ts', 'if (isAwaitingUserInputWorkflowReplyTurn(snapshot, ctx)) return true;');
|
|
26
28
|
assertIncludes('extensions/completion/index.ts', 'if (isOrdinaryMainChatTurnDuringActiveWorkflow(snapshot, ctx)) return false;');
|
|
29
|
+
assertIncludes('extensions/completion/index.ts', 'return asString(snapshot?.state?.continuation_policy) === "await_user_input";');
|
|
27
30
|
assertIncludes('extensions/completion/index.ts', 'return asString(snapshot?.state?.continuation_policy) === "continue";');
|
|
28
31
|
assertIncludes('extensions/completion/index.ts', 'const completionRoleDispatchAllowed = Boolean(role) || isCompletionRoleDispatchAllowedTurn(snapshot, ctx);');
|
|
29
32
|
assertIncludes('extensions/completion/index.ts', 'if (isCookCommandTurn(ctx)) return false;');
|
|
30
33
|
assertIncludes('extensions/completion/index.ts', 'if (isCompletionDriverPromptTurn(snapshot, ctx)) return false;');
|
|
31
34
|
assertIncludes('extensions/completion/policy-guards.ts', 'return "completion_role may only be used from an active /cook workflow session.";');
|
|
32
35
|
assertIncludes('CHANGELOG.md', 'fixed completion-role continuation gating so an already-active `/cook` workflow with `continuation_policy: continue` can keep dispatching mandatory follow-up roles');
|
|
36
|
+
assertIncludes('CHANGELOG.md', 'fixed `/cook` await-user-input resumptions so a user\'s exact reply in the active workflow can dispatch the mandatory follow-up completion role without forcing an extra `/cook` rerun');
|
|
33
37
|
|
|
34
38
|
assertNotIncludes(
|
|
35
39
|
'extensions/completion/index.ts',
|
|
@@ -38,7 +42,11 @@ assertNotIncludes(
|
|
|
38
42
|
|
|
39
43
|
const indexText = read('extensions/completion/index.ts');
|
|
40
44
|
const ordinaryGuardIndex = indexText.indexOf('if (isOrdinaryMainChatTurnDuringActiveWorkflow(snapshot, ctx)) return false;');
|
|
45
|
+
const awaitReplyAllowIndex = indexText.indexOf('if (isAwaitingUserInputWorkflowReplyTurn(snapshot, ctx)) return true;');
|
|
41
46
|
const continueFallbackIndex = indexText.indexOf('return asString(snapshot?.state?.continuation_policy) === "continue";');
|
|
47
|
+
if (awaitReplyAllowIndex === -1 || ordinaryGuardIndex === -1 || awaitReplyAllowIndex > ordinaryGuardIndex) {
|
|
48
|
+
throw new Error('extensions/completion/index.ts must allow active await_user_input reply turns before the ordinary main-chat rejection guard.');
|
|
49
|
+
}
|
|
42
50
|
if (ordinaryGuardIndex === -1 || continueFallbackIndex === -1 || ordinaryGuardIndex > continueFallbackIndex) {
|
|
43
51
|
throw new Error('extensions/completion/index.ts must reject ordinary main-chat turns before allowing the continuation_policy=continue fallback.');
|
|
44
52
|
}
|