@outputai/cli 0.7.1-dev.144d64f.0 → 0.7.1-next.0e958f3.0
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/api/generated/api.d.ts +20 -12
- package/dist/api/generated/api.js +9 -0
- package/dist/assets/docker/docker-compose-dev.yml +1 -1
- package/dist/generated/framework_version.json +1 -1
- package/dist/services/fix_package.spec.js +3 -2
- package/dist/templates/agent_instructions/CLAUDE.md.template +1 -0
- package/dist/templates/project/README.md.template +32 -0
- package/dist/templates/project/package.json.template +1 -0
- package/dist/utils/format_workflow_result.spec.js +0 -2
- package/dist/views/dev/panels/runs_panel.js +4 -8
- package/dist/views/dev/state/ui_state.d.ts +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
|
@@ -207,13 +207,6 @@ export interface WorkflowStatusResponse {
|
|
|
207
207
|
/** An epoch timestamp representing when the workflow ended */
|
|
208
208
|
completedAt?: number;
|
|
209
209
|
}
|
|
210
|
-
/**
|
|
211
|
-
* Convenience totals aggregated from LLM and http usage and cost
|
|
212
|
-
* @nullable
|
|
213
|
-
*/
|
|
214
|
-
export type WorkflowResultResponseAggregations = {
|
|
215
|
-
[key: string]: unknown;
|
|
216
|
-
} | null;
|
|
217
210
|
/**
|
|
218
211
|
* The workflow execution status
|
|
219
212
|
*/
|
|
@@ -269,11 +262,6 @@ export interface WorkflowResultResponse {
|
|
|
269
262
|
/** The result of workflow, null if workflow failed */
|
|
270
263
|
output?: unknown;
|
|
271
264
|
trace?: TraceInfo;
|
|
272
|
-
/**
|
|
273
|
-
* Convenience totals aggregated from LLM and http usage and cost
|
|
274
|
-
* @nullable
|
|
275
|
-
*/
|
|
276
|
-
aggregations?: WorkflowResultResponseAggregations;
|
|
277
265
|
/** The workflow execution status */
|
|
278
266
|
status?: WorkflowResultResponseStatus;
|
|
279
267
|
/**
|
|
@@ -541,6 +529,26 @@ export type getHealthResponseSuccess = (getHealthResponse200) & {
|
|
|
541
529
|
export type getHealthResponse = (getHealthResponseSuccess);
|
|
542
530
|
export declare const getGetHealthUrl: () => string;
|
|
543
531
|
export declare const getHealth: (options?: ApiRequestOptions) => Promise<getHealthResponse>;
|
|
532
|
+
/**
|
|
533
|
+
* @summary Check if the API is ready to answer requests
|
|
534
|
+
*/
|
|
535
|
+
export type getReadyResponse200 = {
|
|
536
|
+
data: void;
|
|
537
|
+
status: 200;
|
|
538
|
+
};
|
|
539
|
+
export type getReadyResponse503 = {
|
|
540
|
+
data: void;
|
|
541
|
+
status: 503;
|
|
542
|
+
};
|
|
543
|
+
export type getReadyResponseSuccess = (getReadyResponse200) & {
|
|
544
|
+
headers: Headers;
|
|
545
|
+
};
|
|
546
|
+
export type getReadyResponseError = (getReadyResponse503) & {
|
|
547
|
+
headers: Headers;
|
|
548
|
+
};
|
|
549
|
+
export type getReadyResponse = (getReadyResponseSuccess | getReadyResponseError);
|
|
550
|
+
export declare const getGetReadyUrl: () => string;
|
|
551
|
+
export declare const getReady: (options?: ApiRequestOptions) => Promise<getReadyResponse>;
|
|
544
552
|
/**
|
|
545
553
|
* Executes a workflow and waits for it to complete before returning the result
|
|
546
554
|
* @summary Execute a workflow synchronously
|
|
@@ -52,6 +52,15 @@ export const getHealth = async (options) => {
|
|
|
52
52
|
method: 'GET'
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
+
export const getGetReadyUrl = () => {
|
|
56
|
+
return `/ready`;
|
|
57
|
+
};
|
|
58
|
+
export const getReady = async (options) => {
|
|
59
|
+
return customFetchInstance(getGetReadyUrl(), {
|
|
60
|
+
...options,
|
|
61
|
+
method: 'GET'
|
|
62
|
+
});
|
|
63
|
+
};
|
|
55
64
|
export const getPostWorkflowRunUrl = () => {
|
|
56
65
|
return `/workflow/run`;
|
|
57
66
|
};
|
|
@@ -19,7 +19,7 @@ describe('fix package', () => {
|
|
|
19
19
|
expect(plan.scriptsToRemove.map(r => r.key).sort()).toEqual([...legacyScripts].sort());
|
|
20
20
|
expect(plan.hasChanges).toBe(true);
|
|
21
21
|
expect(plan.scriptsToReplace).toEqual([]);
|
|
22
|
-
expect(plan.scriptsToAdd).toHaveLength(
|
|
22
|
+
expect(plan.scriptsToAdd).toHaveLength(7);
|
|
23
23
|
applyFix(plan);
|
|
24
24
|
const next = JSON.parse(await fs.readFile(path.join(tmpDir, 'package.json'), 'utf-8'));
|
|
25
25
|
expect(next.scripts['dev']).toBeUndefined();
|
|
@@ -42,10 +42,11 @@ describe('fix package', () => {
|
|
|
42
42
|
expect(plan.scriptsToReplace).toEqual([
|
|
43
43
|
{ key: 'output:dev', before: 'bad-dev-command', after: 'output dev' }
|
|
44
44
|
]);
|
|
45
|
-
expect(plan.scriptsToAdd).toHaveLength(
|
|
45
|
+
expect(plan.scriptsToAdd).toHaveLength(6);
|
|
46
46
|
expect(plan.scriptsToAdd.map(a => a.key).sort()).toEqual([
|
|
47
47
|
'output:worker',
|
|
48
48
|
'output:worker:build',
|
|
49
|
+
'output:worker:check',
|
|
49
50
|
'output:worker:install',
|
|
50
51
|
'output:worker:start',
|
|
51
52
|
'output:worker:watch'
|
|
@@ -16,6 +16,7 @@ claude plugin install outputai@outputai --scope project
|
|
|
16
16
|
```bash
|
|
17
17
|
npm run output:dev # Start dev environment (worker + Temporal)
|
|
18
18
|
npm run output:worker:build # Build TypeScript to dist/
|
|
19
|
+
npm run output:worker:check # Optional: bundle-check workflows for bad imports (node: built-ins)
|
|
19
20
|
npm run output:worker:watch # Build + restart on file changes
|
|
20
21
|
npm run output:worker # Install, build, and start worker
|
|
21
22
|
```
|
|
@@ -100,3 +100,35 @@ Monitor workflow execution and system status in the Temporal UI:
|
|
|
100
100
|
```bash
|
|
101
101
|
open http://localhost:8080
|
|
102
102
|
```
|
|
103
|
+
|
|
104
|
+
## Checking Workflows for Bad Imports
|
|
105
|
+
|
|
106
|
+
Temporal bundles your workflows before they run. If a workflow — or anything it
|
|
107
|
+
transitively imports — pulls in a `node:` built-in (e.g. `node:fs`), the bundle fails
|
|
108
|
+
**at worker startup**, not at `tsc` build time. The optional bundle check reproduces
|
|
109
|
+
that bundling so you catch it early:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm run output:worker:build # compile to dist/
|
|
113
|
+
npm run output:worker:check # bundle-check workflows (runs output-worker --check)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
It exits non-zero and names the offending module when a workflow can't be bundled.
|
|
117
|
+
|
|
118
|
+
To gate merges, wire it into your CI — for example, GitHub Actions:
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
# .github/workflows/output-check.yml
|
|
122
|
+
name: Output checks
|
|
123
|
+
on: [pull_request]
|
|
124
|
+
jobs:
|
|
125
|
+
workflows:
|
|
126
|
+
runs-on: ubuntu-latest
|
|
127
|
+
steps:
|
|
128
|
+
- uses: actions/checkout@v4
|
|
129
|
+
- uses: actions/setup-node@v4
|
|
130
|
+
with: { node-version: 24 }
|
|
131
|
+
- run: npm ci
|
|
132
|
+
- run: npm run output:worker:build
|
|
133
|
+
- run: npm run output:worker:check
|
|
134
|
+
```
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"output:worker:install": "npm install",
|
|
9
9
|
"output:worker:build": "rm -rf dist/* && tsc -p ./ && output-copy-assets",
|
|
10
10
|
"output:worker:start": "output-worker",
|
|
11
|
+
"output:worker:check": "output-worker --check",
|
|
11
12
|
"output:worker": "npm run output:worker:install && npm run output:worker:build && npm run output:worker:start",
|
|
12
13
|
"output:worker:watch": "npx nodemon --watch src --watch package.json --ext ts,js,json,prompt,md --ignore 'dist/**' --ignore '**/*.spec.*' --ignore '**/*.test.*' --exec 'npm run output:worker'",
|
|
13
14
|
"output:dev": "output dev"
|
|
@@ -81,13 +81,11 @@ describe('formatWorkflowResult', () => {
|
|
|
81
81
|
workflowId: 'wf-456',
|
|
82
82
|
status: 'failed',
|
|
83
83
|
output: null,
|
|
84
|
-
aggregations: { cost: { total: 0.4 }, tokens: { total: 20 }, httpRequests: { total: 0 } },
|
|
85
84
|
error: 'Activity task failed'
|
|
86
85
|
};
|
|
87
86
|
const output = formatOutput(data, 'json', formatWorkflowResult);
|
|
88
87
|
const parsed = JSON.parse(output);
|
|
89
88
|
expect(parsed.status).toBe('failed');
|
|
90
|
-
expect(parsed.aggregations).toEqual({ cost: { total: 0.4 }, tokens: { total: 20 }, httpRequests: { total: 0 } });
|
|
91
89
|
expect(parsed.error).toBe('Activity task failed');
|
|
92
90
|
});
|
|
93
91
|
});
|
|
@@ -60,10 +60,9 @@ const COL = {
|
|
|
60
60
|
const RUN_INFO_TABS = [
|
|
61
61
|
{ id: 'status', label: 'Status' },
|
|
62
62
|
{ id: 'input', label: 'Input' },
|
|
63
|
-
{ id: 'output', label: 'Output' }
|
|
64
|
-
{ id: 'aggregations', label: 'Aggregations' }
|
|
63
|
+
{ id: 'output', label: 'Output' }
|
|
65
64
|
];
|
|
66
|
-
const RUN_INFO_TAB_ORDER = ['status', 'input', 'output'
|
|
65
|
+
const RUN_INFO_TAB_ORDER = ['status', 'input', 'output'];
|
|
67
66
|
const HeaderRow = () => (_jsxs(Box, { children: [_jsx(Box, { width: COL.indicator, children: _jsx(Text, { children: "\u00A0" }) }), _jsx(Box, { width: COL.icon, children: _jsx(Text, { children: "\u00A0" }) }), _jsx(Box, { width: COL.status, children: _jsx(Text, { dimColor: true, bold: true, children: "STATUS" }) }), _jsx(Box, { width: COL.type, children: _jsx(Text, { dimColor: true, bold: true, children: "TYPE" }) }), _jsx(Box, { width: COL.id, children: _jsx(Text, { dimColor: true, bold: true, children: "ID" }) }), _jsx(Box, { width: COL.duration, justifyContent: "flex-end", children: _jsx(Text, { dimColor: true, bold: true, children: "DURATION" }) }), _jsx(Box, { width: COL.started, marginLeft: 2, children: _jsx(Text, { dimColor: true, bold: true, children: "STARTED" }) })] }));
|
|
68
67
|
const RunRow = ({ run, selected }) => {
|
|
69
68
|
const status = run.status ?? 'running';
|
|
@@ -86,10 +85,8 @@ const runPaneValue = (run, pane, activePane) => {
|
|
|
86
85
|
if (activePane === 'input') {
|
|
87
86
|
return pane.input;
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
return pane.aggregations;
|
|
88
|
+
// 'output'
|
|
89
|
+
return pane.error ?? pane.output;
|
|
93
90
|
};
|
|
94
91
|
const DetailPane = ({ run, pane, rows }) => {
|
|
95
92
|
const ui = useUiState();
|
|
@@ -148,7 +145,6 @@ export const RunsPanel = ({ runs, height }) => {
|
|
|
148
145
|
input: result?.input,
|
|
149
146
|
output: result?.output,
|
|
150
147
|
error: result?.error,
|
|
151
|
-
aggregations: result?.aggregations,
|
|
152
148
|
status: result?.status ?? selectedRun.status ?? 'unknown',
|
|
153
149
|
loading
|
|
154
150
|
} : null;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export type Tab = 'workflows' | 'runs' | 'services' | 'help';
|
|
3
3
|
export declare const TAB_ORDER: Tab[];
|
|
4
4
|
export declare const TAB_LABELS: Record<Tab, string>;
|
|
5
|
-
export type RunListPaneTab = 'status' | 'input' | 'output'
|
|
5
|
+
export type RunListPaneTab = 'status' | 'input' | 'output';
|
|
6
6
|
export type RunStepPaneTab = 'input' | 'output' | 'meta';
|
|
7
7
|
export type RunsView = 'list' | 'detail';
|
|
8
8
|
export interface Selection {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outputai/cli",
|
|
3
|
-
"version": "0.7.1-
|
|
3
|
+
"version": "0.7.1-next.0e958f3.0",
|
|
4
4
|
"description": "CLI for Output.ai workflow generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"semver": "7.7.4",
|
|
37
37
|
"undici": "8.1.0",
|
|
38
38
|
"yaml": "^2.8.3",
|
|
39
|
-
"@outputai/credentials": "0.7.1-
|
|
40
|
-
"@outputai/evals": "0.7.1-
|
|
41
|
-
"@outputai/llm": "0.7.1-
|
|
39
|
+
"@outputai/credentials": "0.7.1-next.0e958f3.0",
|
|
40
|
+
"@outputai/evals": "0.7.1-next.0e958f3.0",
|
|
41
|
+
"@outputai/llm": "0.7.1-next.0e958f3.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/cli-progress": "3.11.6",
|