@sensigo/realm-cli 0.7.0 → 0.7.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../src/commands/resume.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAC7B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,iBAAiB,GAC/B,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../src/commands/resume.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAC7B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,iBAAiB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAqDf;AAED,eAAO,MAAM,aAAa,SAkBtB,CAAC"}
|
package/dist/commands/resume.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// resume command — removes a step from failed_steps so it can be re-executed.
|
|
2
2
|
import { Command } from 'commander';
|
|
3
3
|
import { WorkflowError } from '@sensigo/realm';
|
|
4
|
-
import { RESUMABLE_PHASES } from '@sensigo/realm';
|
|
4
|
+
import { RESUMABLE_PHASES, propagateSkips } from '@sensigo/realm';
|
|
5
5
|
/**
|
|
6
6
|
* Removes `stepName` from `failed_steps` so the DAG engine can re-evaluate its
|
|
7
7
|
* eligibility on the next execute-step call.
|
|
@@ -38,9 +38,20 @@ export async function resumeRun(runId, stepName, runStore, workflowStore) {
|
|
|
38
38
|
retryable: false,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
// Re-enable the failed step AND make the run runnable again. Filtering failed_steps alone leaves
|
|
42
|
+
// the run terminal (terminal_state:true), so `realm agent --run-id` throws on it and the
|
|
43
|
+
// `while (!terminal_state)` drivers skip it. Mirror the test-harness reference: strip
|
|
44
|
+
// terminal_reason (destructure-and-omit to honour exactOptionalPropertyTypes), re-derive
|
|
45
|
+
// skipped_steps from scratch so steps skipped only because of this failure become eligible again,
|
|
46
|
+
// and reset terminal_state to false. update() recomputes run_phase → 'running'.
|
|
47
|
+
const { terminal_reason: _terminalReason, ...rest } = run;
|
|
48
|
+
const failedSteps = rest.failed_steps.filter((s) => s !== stepName);
|
|
49
|
+
const skippedSteps = propagateSkips({ ...rest, failed_steps: failedSteps, skipped_steps: [] }, workflow);
|
|
41
50
|
await runStore.update({
|
|
42
|
-
...
|
|
43
|
-
failed_steps:
|
|
51
|
+
...rest,
|
|
52
|
+
failed_steps: failedSteps,
|
|
53
|
+
skipped_steps: skippedSteps,
|
|
54
|
+
terminal_state: false,
|
|
44
55
|
});
|
|
45
56
|
}
|
|
46
57
|
export const resumeCommand = new Command('resume')
|
|
@@ -53,7 +64,8 @@ export const resumeCommand = new Command('resume')
|
|
|
53
64
|
const workflowStore = new JsonWorkflowStore();
|
|
54
65
|
try {
|
|
55
66
|
await resumeRun(runId, opts.from, runStore, workflowStore);
|
|
56
|
-
console.log(`Resumed: step '${opts.from}'
|
|
67
|
+
console.log(`Resumed run '${runId}': step '${opts.from}' re-enabled and run reset to 'running'.\n` +
|
|
68
|
+
`Drive it with: realm agent --run-id ${runId}`);
|
|
57
69
|
}
|
|
58
70
|
catch (err) {
|
|
59
71
|
console.error(err instanceof Error ? err.message : String(err));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../src/commands/resume.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../src/commands/resume.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,KAAa,EACb,QAAgB,EAChB,QAAkB,EAClB,aAAgC;IAEhC,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAEtC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,aAAa,CACrB,OAAO,KAAK,iBAAiB,GAAG,CAAC,SAAS,4BAA4B,EACtE;YACE,IAAI,EAAE,yBAAyB;YAC/B,QAAQ,EAAE,OAAO;YACjB,WAAW,EAAE,gBAAgB;YAC7B,SAAS,EAAE,KAAK;SACjB,CACF,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE1D,IAAI,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;QAC3C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eAAe,EAAE,sCAAsC,CAAC;KACvE,MAAM,CAAC,KAAK,EAAE,KAAa,EAAE,IAAsB,EAAE,EAAE;IACtD,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC5E,MAAM,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAC;IACrC,MAAM,aAAa,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC9C,IAAI,CAAC;QACH,MAAM,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CACT,gBAAgB,KAAK,YAAY,IAAI,CAAC,IAAI,4CAA4C;YACpF,uCAAuC,KAAK,EAAE,CACjD,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import 'dotenv/config';
|
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import { workflowCommands, runCommands, topLevelCommands } from './commands-registry.js';
|
|
6
6
|
const program = new Command();
|
|
7
|
-
program.name('realm').description('Realm workflow engine CLI').version('0.7.
|
|
7
|
+
program.name('realm').description('Realm workflow engine CLI').version('0.7.1');
|
|
8
8
|
// realm workflow — operations on workflow definitions
|
|
9
9
|
const workflowCmd = new Command('workflow').description('Manage workflow definitions');
|
|
10
10
|
for (const cmd of workflowCommands)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sensigo/realm-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"vitest": "^4.1.0"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@sensigo/realm": "^0.7.
|
|
65
|
-
"@sensigo/realm-mcp": "^0.7.
|
|
66
|
-
"@sensigo/realm-testing": "^0.7.
|
|
64
|
+
"@sensigo/realm": "^0.7.1",
|
|
65
|
+
"@sensigo/realm-mcp": "^0.7.1",
|
|
66
|
+
"@sensigo/realm-testing": "^0.7.1",
|
|
67
67
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
68
68
|
"chalk": "^5.0.0",
|
|
69
69
|
"commander": "^14.0.3",
|