@guanlin4924/devflow-pi 0.1.29 → 0.1.30

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
@@ -11,7 +11,7 @@ Devflow Pi 是一个面向项目研发交付的独立 OMP 产品入口,内置
11
11
  安装与启动:
12
12
 
13
13
  ```bash
14
- npm install -g @guanlin4924/devflow-pi@0.1.29
14
+ npm install -g @guanlin4924/devflow-pi@0.1.30
15
15
  cd /path/to/your-project
16
16
  devflow-pi init
17
17
  devflow-pi doctor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guanlin4924/devflow-pi",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "type": "module",
5
5
  "description": "Devflow 专项研发 Pi,基于固定版本 OMP Runtime 组装研发状态机、代码智能、设计、实现与质量门禁。",
6
6
  "license": "UNLICENSED",
@@ -1605,7 +1605,12 @@ 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
- if (isStateMutationTool(toolName) && !isRegistryReconciliation) {
1608
+ const isUserConfirmedStepTransition =
1609
+ toolName === "devflow_transition" &&
1610
+ toolInput?.action === "complete-step" &&
1611
+ toolInput?.confirm === true &&
1612
+ ["waiting-user", "awaiting-approval"].includes(controlState.phase);
1613
+ if (isStateMutationTool(toolName) && !isRegistryReconciliation && !isUserConfirmedStepTransition) {
1609
1614
  return {
1610
1615
  block: true,
1611
1616
  reason:
@@ -2427,7 +2432,21 @@ export default function devflowCore(pi: ExtensionAPI) {
2427
2432
  if (!params.step) {
2428
2433
  return renderResult({ ok: false, exitCode: 2, stdout: "", stderr: "step is required" });
2429
2434
  }
2435
+ if (params.confirm !== true) {
2436
+ return renderResult({ ok: false, exitCode: 2, stdout: "", stderr: "complete-step requires explicit user confirmation (confirm=true)" });
2437
+ }
2430
2438
  const snapshot = parseJsonResult(await runRuby(ctx.cwd, "workflow-orchestrator/scripts/inspect_state.rb", ["--json"]));
2439
+ const currentStep = snapshot?.current_step && typeof snapshot.current_step === "object"
2440
+ ? (snapshot.current_step as Record<string, unknown>).id
2441
+ : undefined;
2442
+ if (snapshot?.revision !== params.expectedRevision || currentStep !== params.step) {
2443
+ return renderResult({
2444
+ ok: false,
2445
+ exitCode: 2,
2446
+ stdout: "",
2447
+ stderr: `confirmed transition is stale or targets a different step (expected revision ${params.expectedRevision}, current revision ${String(snapshot?.revision)}, current step ${String(currentStep)})`,
2448
+ });
2449
+ }
2431
2450
  const feature = snapshot?.snapshot && typeof snapshot.snapshot === "object" ? (snapshot.snapshot as Record<string, unknown>).feature : undefined;
2432
2451
  if (typeof feature === "string" && feature) {
2433
2452
  const evidenceArgs = ["--feature", feature, "--step", params.step, "--write"];
package/src/constants.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export const PRODUCT_NAME = "Devflow Pi";
2
- export const PRODUCT_VERSION = "0.1.29";
2
+ export const PRODUCT_VERSION = "0.1.30";
3
3
  export const PROJECT_SCHEMA_VERSION = 1;
4
4
  export const OMP_RUNTIME_VERSION = "17.2.7";
5
5