@fractary/faber-cli 1.5.15 → 1.5.16
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/dist/commands/runs.d.ts +3 -0
- package/dist/commands/runs.d.ts.map +1 -1
- package/dist/commands/runs.js +32 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/commands/runs.d.ts
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
* All run files are stored in: .fractary/faber/runs/{run_id}/
|
|
8
8
|
* - plan.json: The execution plan
|
|
9
9
|
* - state.json: The workflow state
|
|
10
|
+
*
|
|
11
|
+
* Active workflow tracking: .fractary/faber/runs/.active-run-id
|
|
12
|
+
* - Contains the run ID of the currently active workflow in this worktree
|
|
10
13
|
*/
|
|
11
14
|
import { Command } from 'commander';
|
|
12
15
|
export declare function createRunsCommand(): Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,wBAAgB,iBAAiB,IAAI,OAAO,CA0I3C"}
|
package/dist/commands/runs.js
CHANGED
|
@@ -7,9 +7,12 @@
|
|
|
7
7
|
* All run files are stored in: .fractary/faber/runs/{run_id}/
|
|
8
8
|
* - plan.json: The execution plan
|
|
9
9
|
* - state.json: The workflow state
|
|
10
|
+
*
|
|
11
|
+
* Active workflow tracking: .fractary/faber/runs/.active-run-id
|
|
12
|
+
* - Contains the run ID of the currently active workflow in this worktree
|
|
10
13
|
*/
|
|
11
14
|
import { Command } from 'commander';
|
|
12
|
-
import { FABER_RUNS_DIR, getRunsDir, getRunDir, getPlanPath, getStatePath, RELATIVE_PATHS, } from '@fractary/faber';
|
|
15
|
+
import { FABER_RUNS_DIR, ACTIVE_RUN_ID_FILE, getRunsDir, getRunDir, getPlanPath, getStatePath, getActiveRunIdPath, RELATIVE_PATHS, } from '@fractary/faber';
|
|
13
16
|
export function createRunsCommand() {
|
|
14
17
|
const runsCmd = new Command('runs')
|
|
15
18
|
.description('Query FABER run paths');
|
|
@@ -107,6 +110,29 @@ export function createRunsCommand() {
|
|
|
107
110
|
process.exit(1);
|
|
108
111
|
}
|
|
109
112
|
});
|
|
113
|
+
runsCmd
|
|
114
|
+
.command('active-run-id-path')
|
|
115
|
+
.description('Show active run ID file path')
|
|
116
|
+
.option('--relative', 'Output relative path instead of absolute')
|
|
117
|
+
.option('--json', 'Output as JSON')
|
|
118
|
+
.action((options) => {
|
|
119
|
+
try {
|
|
120
|
+
const absPath = getActiveRunIdPath();
|
|
121
|
+
if (options.json) {
|
|
122
|
+
console.log(JSON.stringify({
|
|
123
|
+
absolute: absPath,
|
|
124
|
+
relative: ACTIVE_RUN_ID_FILE,
|
|
125
|
+
}, null, 2));
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
console.log(options.relative ? ACTIVE_RUN_ID_FILE : absPath);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
133
|
+
process.exit(1);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
110
136
|
runsCmd
|
|
111
137
|
.command('paths')
|
|
112
138
|
.description('Show all path templates')
|
|
@@ -117,10 +143,11 @@ export function createRunsCommand() {
|
|
|
117
143
|
}
|
|
118
144
|
else {
|
|
119
145
|
console.log('FABER Run Path Templates:');
|
|
120
|
-
console.log(` Runs Directory:
|
|
121
|
-
console.log(` Run Directory:
|
|
122
|
-
console.log(` Plan File:
|
|
123
|
-
console.log(` State File:
|
|
146
|
+
console.log(` Runs Directory: ${RELATIVE_PATHS.RUNS_DIR}`);
|
|
147
|
+
console.log(` Run Directory: ${RELATIVE_PATHS.RUN_DIR_TEMPLATE}`);
|
|
148
|
+
console.log(` Plan File: ${RELATIVE_PATHS.PLAN_PATH_TEMPLATE}`);
|
|
149
|
+
console.log(` State File: ${RELATIVE_PATHS.STATE_PATH_TEMPLATE}`);
|
|
150
|
+
console.log(` Active Run ID File: ${RELATIVE_PATHS.ACTIVE_RUN_ID_FILE}`);
|
|
124
151
|
}
|
|
125
152
|
});
|
|
126
153
|
return runsCmd;
|
package/dist/index.js
CHANGED