@deksden-com/dd-flow-cli 0.9.0-beta.45 → 0.9.0-beta.47
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
package/dist/build-info.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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.47",
|
|
4
|
+
"cli_commit": "c6ad5bc48196d4f9a616667b737363c04d837e4e",
|
|
5
|
+
"built_at": "2026-09-10T20:41:49.668Z",
|
|
6
6
|
"built_with_canon": {
|
|
7
7
|
"version": "4.1.0",
|
|
8
8
|
"commit": "ef349bf47cba1c987468e51d73a0dbadbd48dc1f",
|
|
9
9
|
"flow_contract": "dd-flow-canonical-2026-08",
|
|
10
|
-
"repo_root": "/
|
|
11
|
-
"memorybank_root": "/
|
|
12
|
-
"flow_root": "/
|
|
10
|
+
"repo_root": "/home/runner/work/dd-flow-cli/dd-flow-cli/dd-memorybank",
|
|
11
|
+
"memorybank_root": "/home/runner/work/dd-flow-cli/dd-flow-cli/dd-memorybank/.memory-bank",
|
|
12
|
+
"flow_root": "/home/runner/work/dd-flow-cli/dd-flow-cli/dd-memorybank/.memory-bank/dd-flow",
|
|
13
13
|
"layout": "dot_memory_bank"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -9,6 +9,7 @@ import { harnessRuntimeArguments, resolveHarnessCommand } from "./harness-config
|
|
|
9
9
|
import { resolveExecutionPolicy, runtimeHarness, validateExecutionOverride } from "./execution-policy.js";
|
|
10
10
|
import { assertRunMutationAllowed } from "./run-recovery.js";
|
|
11
11
|
import { assertWorkLaunchReady, workStartCommand } from "./work-registry.js";
|
|
12
|
+
import { initCodexHome } from "./hooks.js";
|
|
12
13
|
/**
|
|
13
14
|
* Creates an external provider root for one already-created Work. The launch
|
|
14
15
|
* is not a Work claim: only the worker's trusted `work start` hook binds it.
|
|
@@ -33,7 +34,7 @@ export async function launchExternalWork(context, input) {
|
|
|
33
34
|
throw new AppError("execution_profile_not_frozen", "External dispatch requires a RUN with frozen agent profiles; recreate the RUN with the current engine", 1, { work_id: work.work_id });
|
|
34
35
|
const override = workOverride(work.payload_json);
|
|
35
36
|
const policy = snapshot.execution_profile?.settings?.execution ?? {};
|
|
36
|
-
const stage = snapshot.current_stage;
|
|
37
|
+
const stage = snapshot.current_stage ?? [...(snapshot.stage_runs ?? [])].reverse().find((entry) => entry.status === "running")?.stage;
|
|
37
38
|
if (input.stage !== undefined && input.stage !== stage)
|
|
38
39
|
throw new AppError("execution_stage_mismatch", "Requested stage does not match the RUN's current stage", 2, { requested_stage: input.stage, current_stage: stage ?? null });
|
|
39
40
|
if (!stage && Object.keys(policy.stage_overrides ?? {}).length)
|
|
@@ -47,7 +48,16 @@ export async function launchExternalWork(context, input) {
|
|
|
47
48
|
fs.mkdirSync(root, { recursive: true });
|
|
48
49
|
const now = context.now();
|
|
49
50
|
const flowExecutable = prepareHarnessFlowExecutable(context, root);
|
|
50
|
-
const
|
|
51
|
+
const env = { ...context.env, DD_FLOW_BIN: flowExecutable };
|
|
52
|
+
// An external Codex root is a fresh thread, so it does not inherit the
|
|
53
|
+
// coordinator's managed PreToolUse hook. Its first `work start` must emit
|
|
54
|
+
// that hook event to bind the Work to the physical session.
|
|
55
|
+
if (runtimeHarness(resolved.worker) === "codex-desktop") {
|
|
56
|
+
const codexHome = path.join(root, "codex-home");
|
|
57
|
+
initCodexHome(context, { projectRoot: run.project_root, profile: `external-${operationId}`, targetHome: codexHome, ...(context.env.CODEX_HOME ? { sourceHome: context.env.CODEX_HOME } : {}) });
|
|
58
|
+
env.CODEX_HOME = codexHome;
|
|
59
|
+
}
|
|
60
|
+
const runtimeContext = { ...context, env };
|
|
51
61
|
const runtimeOwner = { schema_id: "dd-flow/runtime-owner@1", owner_id: `run:${work.run_id}:work:${work.work_id}`, role: "worker", project_id: work.project_id, run_id: work.run_id, work_id: work.work_id, operation_id: operationId, state_dir: root, dd_flow_home: context.ddFlowHome, dd_flow_bin: flowExecutable, resource_home: context.env.DD_FLOW_RESOURCE_HOME ?? context.ddFlowHome, budget: runtimeBudgetForRun(context, work.project_id, work.run_id) };
|
|
52
62
|
const executable = resolveHarnessCommand(context.ddFlowHome, runtimeHarness(resolved.worker), "adapter");
|
|
53
63
|
context.db.run("INSERT INTO work_launches (operation_id, work_id, profile_json, profile_hash, status, state_dir, journal_path, provider_session_id, adapter_receipt_json, created_at, updated_at) VALUES (?, ?, ?, ?, 'launching', ?, ?, NULL, NULL, ?, ?)", [operationId, work.work_id, JSON.stringify({ ...resolved, runtime_adapter: { executable, owner: runtimeOwner } }), resolved.profile_hash, root, journal, now, now]);
|