@diagonal-hq/cli 0.26.0 → 0.26.2

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.
@@ -11004,8 +11004,8 @@ type FormFieldInputProps = {
11004
11004
 
11005
11005
  /**
11006
11006
  * Prefix segments for `context.errors` lookups. Location fields read
11007
- * `<prefix>.<subfield>` errors for `line1`, `line2`, `city`, `state`,
11008
- * `postal_code`, and `country`. Pass `['display_address']` for errors such as
11007
+ * `<prefix>.<subfield>` errors for `display_name`, `line1`, `line2`, `city`,
11008
+ * `state`, `postal_code`, and `country`. Pass `['display_address']` for errors such as
11009
11009
  * `display_address.line1`, shown beside Address line 1.
11010
11010
  * Nested inline-create drafts append their draft index and child field key,
11011
11011
  * so a caller rendering the `files` relation passes `['files']` for errors
@@ -11579,9 +11579,15 @@ type FormLocationInputProps = PrimitiveFormFieldProps & {
11579
11579
 
11580
11580
  /**
11581
11581
  * Per-subfield validation errors, keyed by address field name
11582
- * (`line1`, `line2`, `city`, `state`, `postal_code`, `country`).
11582
+ * (`display_name`, `line1`, `line2`, `city`, `state`, `postal_code`, `country`).
11583
11583
  */
11584
11584
  errors?: LocationAddressFormErrors;
11585
+
11586
+ /**
11587
+ * Show the editable Display name row above Address line 1 in the expanded fields.
11588
+ * Defaults to `true`. Pass `false` on a form that should not collect a display name.
11589
+ */
11590
+ showDisplayName?: boolean;
11585
11591
  };
11586
11592
 
11587
11593
  type LocationValue = {
@@ -11599,7 +11605,10 @@ type LocationValue = {
11599
11605
  };
11600
11606
 
11601
11607
  type LocationAddressFormErrors = Partial<
11602
- Record<'line1' | 'line2' | 'city' | 'state' | 'postal_code' | 'country', string | string[]>
11608
+ Record<
11609
+ 'display_name' | 'line1' | 'line2' | 'city' | 'state' | 'postal_code' | 'country',
11610
+ string | string[]
11611
+ >
11603
11612
  >;
11604
11613
 
11605
11614
  type FormMarkdownInputProps = Omit<
@@ -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.2",
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": {