@deksden-com/dd-flow-cli 0.9.0-beta.115 → 0.9.0-beta.116
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,5 +1,11 @@
|
|
|
1
1
|
# @deksden-com/dd-flow-cli
|
|
2
2
|
|
|
3
|
+
## 0.9.0-beta.116
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Reject ZCode managed lifecycle commands launched as background Bash before execution, and give all harnesses one foreground lifecycle instruction so their native admission receipts remain observable.
|
|
8
|
+
|
|
3
9
|
## 0.9.0-beta.115
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/build-info.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"cli_package": "@deksden-com/dd-flow-cli",
|
|
3
|
-
"cli_version": "0.9.0-beta.
|
|
4
|
-
"cli_commit": "
|
|
5
|
-
"built_at": "2026-09-
|
|
3
|
+
"cli_version": "0.9.0-beta.116",
|
|
4
|
+
"cli_commit": "c30f54c04930f51d7982c49369a96bca51eabe65",
|
|
5
|
+
"built_at": "2026-09-27T20:17:11.827Z",
|
|
6
6
|
"built_with_canon": {
|
|
7
7
|
"version": "4.1.1",
|
|
8
8
|
"commit": "678daa038287c948ada5b2d785a6dcc925c7b891",
|
|
@@ -49,7 +49,7 @@ export function delegationContract(harness) {
|
|
|
49
49
|
return `dd-flow/delegation/${key}@${key === "codex" ? 2 : 1}`;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
export const lifecycleCommandCompletionInstruction = "A shell tool may yield before the lifecycle process exits. Retain and poll its exact process/session handle to completion, including inside a tool wrapper; empty interim output is not a CLI result. Read final stdout or response_file before deciding continuation, and never reissue the command while it is pending.";
|
|
52
|
+
export const lifecycleCommandCompletionInstruction = "Run runtime-issued lifecycle CLI calls in the foreground, never with a native background or detached-shell option. A shell tool may yield before the lifecycle process exits. Retain and poll its exact process/session handle to completion, including inside a tool wrapper; empty interim output is not a CLI result. Read final stdout or response_file before deciding continuation, and never reissue the command while it is pending.";
|
|
53
53
|
|
|
54
54
|
export const lifecycleRetryInstruction = `${lifecycleCommandCompletionInstruction} A failure is not permission to replay a lifecycle command. For proven effect=no_effect with recoverable=true and retry_command, correct the input and execute that exact issued successor. A check failure can retain receipts while leaving Work running: correct the evidenced cause first, then use the CLI's exact retry_command for an intentional fresh check attempt; never replay a check merely because Work is unsettled. If continuation.kind=repair_required, or a successful result has outcome=repair_required and a repair Work ID, end this Turn for the registered repair child; use any retry_command only after that repair settles and verification is refreshed. Unknown effects require reconciliation, never replay. A committed effect without an explicit continuation is not retryable. A native shell launch refusal before the CLI starts permits correcting only that shell-form error and retrying the same exact command. Otherwise report the primary error and stop; never invent IDs, call hooks directly, or run status as a substitute.`;
|
|
55
55
|
|
package/dist/services/hooks.js
CHANGED
|
@@ -509,9 +509,9 @@ export function handleZcodeEvent(context, input) {
|
|
|
509
509
|
* admission; the native hook must not create a competing receipt for them.
|
|
510
510
|
*/
|
|
511
511
|
export function handleZcodeHook(context, input) {
|
|
512
|
-
return recordZcodeLifecycle(context, input);
|
|
512
|
+
return recordZcodeLifecycle(context, input, undefined, true);
|
|
513
513
|
}
|
|
514
|
-
function recordZcodeLifecycle(context, input, invocationId) {
|
|
514
|
+
function recordZcodeLifecycle(context, input, invocationId, nativePreTool = false) {
|
|
515
515
|
const hook = parseJsonObject(input.stdin || "{}", "ZCode hook event");
|
|
516
516
|
const eventName = stringValue(hook.hook_event_name) ?? stringValue(hook.hookEventName);
|
|
517
517
|
if (eventName && eventName !== "PreToolUse" && eventName !== "pre_tool_use")
|
|
@@ -524,6 +524,11 @@ function recordZcodeLifecycle(context, input, invocationId) {
|
|
|
524
524
|
const lifecycle = lifecycleFacts(command);
|
|
525
525
|
if (!lifecycle && !continuationCommand(command))
|
|
526
526
|
return { ok: true, observed: false, reason: "event_not_participating" };
|
|
527
|
+
// ZCode can execute background Bash without emitting the ACP tool_call that admits an issued CLI invocation.
|
|
528
|
+
if (nativePreTool && lifecycle && rawInput.run_in_background === true) {
|
|
529
|
+
const reason = "Run dd-flow lifecycle commands in the foreground; ZCode background Bash does not provide the required admission receipt.";
|
|
530
|
+
return { continue: false, reason, hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny", permissionDecisionReason: reason } };
|
|
531
|
+
}
|
|
527
532
|
if (!invocationId && lifecycle && commandOption(lifecycle.invocation, "invocation-id"))
|
|
528
533
|
return { ok: true, observed: false, reason: "cli_invocation_owns_admission" };
|
|
529
534
|
const expectedRoot = resolveProjectRoot(input.projectRoot);
|