@guanlin4924/devflow-pi 0.1.29 → 0.1.31
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/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1605,7 +1605,11 @@ export default function devflowCore(pi: ExtensionAPI) {
|
|
|
1605
1605
|
// artifact metadata and never advances STATE, checkpoints, or ownership.
|
|
1606
1606
|
const isRegistryReconciliation =
|
|
1607
1607
|
toolName === "devflow_artifact" && toolInput?.action === "sync" && toolInput?.preserve === false;
|
|
1608
|
-
|
|
1608
|
+
const isUserConfirmedStepTransition =
|
|
1609
|
+
toolName === "devflow_transition" &&
|
|
1610
|
+
toolInput?.action === "complete-step" &&
|
|
1611
|
+
toolInput?.confirm === true;
|
|
1612
|
+
if (isStateMutationTool(toolName) && !isRegistryReconciliation && !isUserConfirmedStepTransition) {
|
|
1609
1613
|
return {
|
|
1610
1614
|
block: true,
|
|
1611
1615
|
reason:
|
|
@@ -2427,7 +2431,21 @@ export default function devflowCore(pi: ExtensionAPI) {
|
|
|
2427
2431
|
if (!params.step) {
|
|
2428
2432
|
return renderResult({ ok: false, exitCode: 2, stdout: "", stderr: "step is required" });
|
|
2429
2433
|
}
|
|
2434
|
+
if (params.confirm !== true) {
|
|
2435
|
+
return renderResult({ ok: false, exitCode: 2, stdout: "", stderr: "complete-step requires explicit user confirmation (confirm=true)" });
|
|
2436
|
+
}
|
|
2430
2437
|
const snapshot = parseJsonResult(await runRuby(ctx.cwd, "workflow-orchestrator/scripts/inspect_state.rb", ["--json"]));
|
|
2438
|
+
const currentStep = snapshot?.current_step && typeof snapshot.current_step === "object"
|
|
2439
|
+
? (snapshot.current_step as Record<string, unknown>).id
|
|
2440
|
+
: undefined;
|
|
2441
|
+
if (snapshot?.revision !== params.expectedRevision || currentStep !== params.step) {
|
|
2442
|
+
return renderResult({
|
|
2443
|
+
ok: false,
|
|
2444
|
+
exitCode: 2,
|
|
2445
|
+
stdout: "",
|
|
2446
|
+
stderr: `confirmed transition is stale or targets a different step (expected revision ${params.expectedRevision}, current revision ${String(snapshot?.revision)}, current step ${String(currentStep)})`,
|
|
2447
|
+
});
|
|
2448
|
+
}
|
|
2431
2449
|
const feature = snapshot?.snapshot && typeof snapshot.snapshot === "object" ? (snapshot.snapshot as Record<string, unknown>).feature : undefined;
|
|
2432
2450
|
if (typeof feature === "string" && feature) {
|
|
2433
2451
|
const evidenceArgs = ["--feature", feature, "--step", params.step, "--write"];
|
package/src/constants.ts
CHANGED