@diagonal-hq/cli 0.26.0 → 0.26.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,13 +1,31 @@
1
+ /**
2
+ * The failure that a graph step records when its task throws, which the step's error edge reads.
3
+ * A task failure has `type`, `message`, and `status_code`. An unexpected exception also has
4
+ * `original_type`, a validation failure has `errors`, and a refused input has `invalid_input`.
5
+ * A declared error is keyed by its type, and a failed child workflow gives its own failure.
6
+ */
7
+ export type HostFailure = {
8
+ type?: string;
9
+ message?: string;
10
+ original_type?: string;
11
+ status_code?: number;
12
+ errors?: Record<string, string[]>;
13
+ invalid_input?: unknown;
14
+ [key: string]: unknown;
15
+ };
1
16
  export declare class HostError extends Error {
2
17
  readonly code: string;
3
18
  readonly status: number;
4
19
  readonly details: unknown;
5
20
  readonly failureId: number | null;
21
+ readonly failure: HostFailure | null;
6
22
  /**
7
23
  * @param failureId The host's ID for the failure of the call. When the error ends the run, the
8
24
  * host records that failure, so a run records the failure of the call that it rethrows.
25
+ * @param failure The failure that a graph step records for the same error, or null for a
26
+ * refusal that only a script call can receive, such as an unknown capability.
9
27
  */
10
- constructor(message: string, code: string, status: number, details: unknown, failureId?: number | null);
28
+ constructor(message: string, code: string, status: number, details: unknown, failureId?: number | null, failure?: HostFailure | null);
11
29
  }
12
30
  export declare class WorkflowFailure extends Error {
13
31
  readonly status: number;
@@ -1,6 +1,6 @@
1
1
  import type { ResourceKeyWith } from '../data';
2
2
  import type { ContentDocument } from '../input';
3
- export declare const SDK_VERSION = 68;
3
+ export declare const SDK_VERSION = 69;
4
4
  export interface WorkspaceSystemFields {
5
5
  "ai_custom_system_prompt": string | null;
6
6
  "brand_kit": {
@@ -1,5 +1,6 @@
1
1
  import './console';
2
2
  export { HostError, WorkflowFailure, fail, validationError } from './errors';
3
+ export type { HostFailure } from './errors';
3
4
  export { invoke, setTransport, type HostTransport } from './transport';
4
5
  export { transaction } from './transaction';
5
6
  export { data } from './data';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagonal-hq/cli",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "description": "The diagonal CLI and the configuration helpers for file-based Diagonal workspaces.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {