@outputai/cli 0.9.2-next.40ae759.0 → 0.9.2-next.52c7f0a.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.
@@ -7,10 +7,10 @@
7
7
  */
8
8
  import { type ApiRequestOptions } from '../http_client.js';
9
9
  /**
10
- * API error body (WorkflowNotFoundError, WorkflowExecutionTimedOutError, WorkflowNotCompletedError, CatalogNotAvailableError, or server error)
10
+ * API error body (WorkflowNotFoundError, UnsupportedWorkflowError, WorkflowExecutionTimedOutError, WorkflowNotCompletedError, CatalogNotAvailableError, or server error)
11
11
  */
12
12
  export interface ErrorResponse {
13
- /** Error type name (e.g. WorkflowNotFoundError, CatalogNotAvailableError) */
13
+ /** Error type name (e.g. WorkflowNotFoundError, UnsupportedWorkflowError, CatalogNotAvailableError) */
14
14
  error?: string;
15
15
  /** Human-readable error message */
16
16
  message?: string;
@@ -309,7 +309,7 @@ export type NotFoundResponse = ErrorResponse;
309
309
  */
310
310
  export type RequestTimeoutResponse = ErrorResponse;
311
311
  /**
312
- * Workflow not in a terminal state (still running)
312
+ * Workflow dependency failed (e.g. workflow not in a terminal state, or workflow type is unsupported by the selected catalog)
313
313
  */
314
314
  export type FailedDependencyResponse = ErrorResponse;
315
315
  /**
@@ -589,6 +589,10 @@ export type postWorkflowRunResponse408 = {
589
589
  data: RequestTimeoutResponse;
590
590
  status: 408;
591
591
  };
592
+ export type postWorkflowRunResponse424 = {
593
+ data: FailedDependencyResponse;
594
+ status: 424;
595
+ };
592
596
  export type postWorkflowRunResponse500 = {
593
597
  data: InternalServerErrorResponse;
594
598
  status: 500;
@@ -600,7 +604,7 @@ export type postWorkflowRunResponse503 = {
600
604
  export type postWorkflowRunResponseSuccess = (postWorkflowRunResponse200) & {
601
605
  headers: Headers;
602
606
  };
603
- export type postWorkflowRunResponseError = (postWorkflowRunResponse400 | postWorkflowRunResponse404 | postWorkflowRunResponse408 | postWorkflowRunResponse500 | postWorkflowRunResponse503) & {
607
+ export type postWorkflowRunResponseError = (postWorkflowRunResponse400 | postWorkflowRunResponse404 | postWorkflowRunResponse408 | postWorkflowRunResponse424 | postWorkflowRunResponse500 | postWorkflowRunResponse503) & {
604
608
  headers: Headers;
605
609
  };
606
610
  export type postWorkflowRunResponse = (postWorkflowRunResponseSuccess | postWorkflowRunResponseError);
@@ -621,14 +625,22 @@ export type postWorkflowStartResponse404 = {
621
625
  data: NotFoundResponse;
622
626
  status: 404;
623
627
  };
628
+ export type postWorkflowStartResponse424 = {
629
+ data: FailedDependencyResponse;
630
+ status: 424;
631
+ };
624
632
  export type postWorkflowStartResponse500 = {
625
633
  data: InternalServerErrorResponse;
626
634
  status: 500;
627
635
  };
636
+ export type postWorkflowStartResponse503 = {
637
+ data: ServiceUnavailableResponse;
638
+ status: 503;
639
+ };
628
640
  export type postWorkflowStartResponseSuccess = (postWorkflowStartResponse200) & {
629
641
  headers: Headers;
630
642
  };
631
- export type postWorkflowStartResponseError = (postWorkflowStartResponse400 | postWorkflowStartResponse404 | postWorkflowStartResponse500) & {
643
+ export type postWorkflowStartResponseError = (postWorkflowStartResponse400 | postWorkflowStartResponse404 | postWorkflowStartResponse424 | postWorkflowStartResponse500 | postWorkflowStartResponse503) & {
632
644
  headers: Headers;
633
645
  };
634
646
  export type postWorkflowStartResponse = (postWorkflowStartResponseSuccess | postWorkflowStartResponseError);
@@ -80,7 +80,7 @@ services:
80
80
  condition: service_healthy
81
81
  worker:
82
82
  condition: service_healthy
83
- image: outputai/api:${OUTPUT_API_VERSION:-0.9.2-next.40ae759.0}
83
+ image: outputai/api:${OUTPUT_API_VERSION:-0.9.2-next.52c7f0a.0}
84
84
  init: true
85
85
  networks:
86
86
  - main
@@ -1,3 +1,3 @@
1
1
  {
2
- "framework": "0.9.2-next.40ae759.0"
2
+ "framework": "0.9.2-next.52c7f0a.0"
3
3
  }
@@ -11,17 +11,10 @@
11
11
  * START_CHILD_WORKFLOW_EXECUTION_INITIATED opens the span, then
12
12
  * CHILD_WORKFLOW_EXECUTION_STARTED / _COMPLETED / _FAILED / _TIMED_OUT /
13
13
  * _CANCELED / _TERMINATED reference it via `initiatedEventId`.
14
- *
15
- * Pure function — no I/O. A TypeScript port of Atlas's
16
- * `OutputWorkflows::WorkflowHistory::Correlator` (Ruby). Kept structurally
17
- * faithful so the two stay easy to diff. The CLI has no step catalog, so a
18
- * span's display name is the humanized step name rather than a catalog label.
19
14
  */
20
15
  import { capitalCase } from 'change-case';
21
- // Framework-level activities the user doesn't care about — Output's own trace
22
- // destination resolution and the lifecycle webhook back to Atlas.
23
- const NOISE_STEP_PREFIXES = ['__internal#'];
24
- const NOISE_STEP_EXACT = ['$shared#callWebhook'];
16
+ // These are internal activities of the framework
17
+ const INTERNAL_ACTIVITIES_PREFIX = ['__internal#'];
25
18
  const ACTIVITY_TERMINAL_TYPES = [
26
19
  'ACTIVITY_TASK_COMPLETED', 'ACTIVITY_TASK_FAILED',
27
20
  'ACTIVITY_TASK_TIMED_OUT', 'ACTIVITY_TASK_CANCELED'
@@ -86,8 +79,7 @@ function cleanStepName(scheduled) {
86
79
  return 'unknown';
87
80
  }
88
81
  function isNoise(stepName) {
89
- return NOISE_STEP_EXACT.includes(stepName) ||
90
- NOISE_STEP_PREFIXES.some(prefix => stepName.startsWith(prefix));
82
+ return INTERNAL_ACTIVITIES_PREFIX.some(prefix => stepName.startsWith(prefix));
91
83
  }
92
84
  function failureMessageOf(attrs) {
93
85
  const failure = attrs.failure;
@@ -115,8 +107,7 @@ function toMs(iso) {
115
107
  const ms = Date.parse(iso);
116
108
  return Number.isNaN(ms) ? null : ms;
117
109
  }
118
- // Offset math relative to the workflow start (timeline origin). Mirrors
119
- // Atlas's Span#start_offset_ms / #end_offset_ms / #duration_ms.
110
+ // Offset math relative to the workflow start (timeline origin).
120
111
  function withOffsets(span, startMs) {
121
112
  const startAnchor = toMs(span.startedAt) ?? toMs(span.scheduledAt);
122
113
  const startOffsetMs = startMs !== null && startAnchor !== null ? Math.round(startAnchor - startMs) : 0;
@@ -42,8 +42,6 @@ function buildEvents() {
42
42
  completed('9', '5', 31),
43
43
  failed('10', '6', 38, 'boom'),
44
44
  // Noise steps — must be filtered out
45
- scheduled('11', '$shared#callWebhook', 35),
46
- started('11s', '11', 35),
47
45
  scheduled('12', '__internal#resolveTrace', 35),
48
46
  // Pending activity (scheduled, never started)
49
47
  scheduled('13', 'contentBrief#generateBrief', 40),
@@ -67,7 +65,6 @@ describe('correlate', () => {
67
65
  const byId = (id) => spans.find(s => s.id === id);
68
66
  it('filters framework noise steps', () => {
69
67
  expect(spans.every(s => !s.technicalName.startsWith('__internal#'))).toBe(true);
70
- expect(spans.some(s => s.technicalName === '$shared#callWebhook')).toBe(false);
71
68
  });
72
69
  it('produces one span per real activity plus the child workflow', () => {
73
70
  expect(spans).toHaveLength(5);
@@ -1534,5 +1534,5 @@
1534
1534
  ]
1535
1535
  }
1536
1536
  },
1537
- "version": "0.9.2-next.40ae759.0"
1537
+ "version": "0.9.2-next.52c7f0a.0"
1538
1538
  }
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@outputai/cli",
3
- "version": "0.9.2-next.40ae759.0",
3
+ "version": "0.9.2-next.52c7f0a.0",
4
4
  "description": "CLI for Output.ai workflow generation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "engines": {
9
+ "node": ">=24.15.0"
10
+ },
8
11
  "files": [
9
12
  "./bin",
10
13
  "./dist",
@@ -36,9 +39,9 @@
36
39
  "semver": "7.7.4",
37
40
  "undici": "8.5.0",
38
41
  "yaml": "^2.8.3",
39
- "@outputai/credentials": "0.9.2-next.40ae759.0",
40
- "@outputai/llm": "0.9.2-next.40ae759.0",
41
- "@outputai/evals": "0.9.2-next.40ae759.0"
42
+ "@outputai/evals": "0.9.2-next.52c7f0a.0",
43
+ "@outputai/credentials": "0.9.2-next.52c7f0a.0",
44
+ "@outputai/llm": "0.9.2-next.52c7f0a.0"
42
45
  },
43
46
  "devDependencies": {
44
47
  "@types/cli-progress": "3.11.6",