@oneie/cli 4.0.3 → 4.0.4
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/package.json +2 -2
- package/dist/src/workflow.js +32 -0
- package/package.json +2 -2
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneie/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "ONE agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"commander": "^12.0.0",
|
|
23
|
-
"@oneie/sdk": "^0.14.
|
|
23
|
+
"@oneie/sdk": "^0.14.11"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@oneie/evals": "workspace:*",
|
package/dist/src/workflow.js
CHANGED
|
@@ -78,6 +78,38 @@ export function workflowCmd() {
|
|
|
78
78
|
const r = await call(opts.api, opts.slug, 'workflow:run', { workflowId: id });
|
|
79
79
|
out(cmd, { ok: !!r.runId, ...r });
|
|
80
80
|
});
|
|
81
|
+
cmd.command('validate <id> <file>')
|
|
82
|
+
.description('Validate a diff-JSON file against a workflow (§9 gate, never persists)')
|
|
83
|
+
.requiredOption('--slug <slug>', 'Workspace slug')
|
|
84
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
85
|
+
.action(async (id, file, opts) => {
|
|
86
|
+
if (!existsSync(file)) {
|
|
87
|
+
out(cmd, { ok: false, error: `not found: ${file}` });
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const diff = JSON.parse(readFileSync(file, 'utf8'));
|
|
91
|
+
const r = await call(opts.api, opts.slug, 'workflow:validate', { workflowId: id, diff });
|
|
92
|
+
out(cmd, { ok: !!r.ok, ...r });
|
|
93
|
+
});
|
|
94
|
+
cmd.command('resolve <runId> <stepId>')
|
|
95
|
+
.description('Resolve a suspended human step in a run (--decision approved|rejected)')
|
|
96
|
+
.requiredOption('--slug <slug>', 'Workspace slug')
|
|
97
|
+
.option('--decision <d>', 'approved | rejected')
|
|
98
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
99
|
+
.action(async (runId, stepId, opts) => {
|
|
100
|
+
const r = await call(opts.api, opts.slug, 'human:resolve', { runId, stepId, ...(opts.decision ? { decision: opts.decision } : {}) });
|
|
101
|
+
out(cmd, { ok: !!r.ok, ...r });
|
|
102
|
+
});
|
|
103
|
+
cmd.command('logs <id>')
|
|
104
|
+
.description("List recent runs of a workflow; --run <runId> for one run's step-event timeline")
|
|
105
|
+
.requiredOption('--slug <slug>', 'Workspace slug')
|
|
106
|
+
.option('--run <runId>', "Return this run's event timeline")
|
|
107
|
+
.option('--limit <n>', 'Max runs to list', (v) => parseInt(v, 10))
|
|
108
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
109
|
+
.action(async (id, opts) => {
|
|
110
|
+
const r = await call(opts.api, opts.slug, 'workflow:runs', { workflowId: id, ...(opts.run ? { runId: opts.run } : {}), ...(opts.limit ? { limit: opts.limit } : {}) });
|
|
111
|
+
out(cmd, { ok: !r.error, ...r });
|
|
112
|
+
});
|
|
81
113
|
return cmd;
|
|
82
114
|
}
|
|
83
115
|
// out() mirrors agent.ts — human `✓ k=v` or --json. W3: reuse the shared helper if
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneie/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "ONE agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"commander": "^12.0.0",
|
|
23
|
-
"@oneie/sdk": "^0.14.
|
|
23
|
+
"@oneie/sdk": "^0.14.11"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@oneie/evals": "workspace:*",
|