@alva-ai/toolkit 0.11.3-beta.0 → 0.12.1-beta.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/index.d.cts CHANGED
@@ -7,6 +7,10 @@ interface AlvaClientConfig {
7
7
  gaClientId?: string;
8
8
  gaSessionId?: string;
9
9
  utmParams?: string;
10
+ /** Optional default AbortSignal applied to every request from this client. */
11
+ signal?: AbortSignal;
12
+ /** Alva chat session owning produced artifacts; sent as X-Alva-Origin-Session-Id. */
13
+ originSessionId?: string;
10
14
  }
11
15
  interface UserProfile {
12
16
  id: string;
@@ -115,6 +119,11 @@ interface RunRequest {
115
119
  * 1–2048. Omitted means the server uses its default heap (256 MB).
116
120
  */
117
121
  max_heap_size_mb?: number;
122
+ /**
123
+ * Client-side HTTP timeout for waiting on POST /api/v1/run, in
124
+ * milliseconds. This is not sent to the server.
125
+ */
126
+ timeout_ms?: number;
118
127
  }
119
128
  interface RunResponse {
120
129
  result: string;
@@ -167,7 +176,7 @@ interface CronjobUpdateRequest {
167
176
  interface CronjobRunsListParams {
168
177
  cronjob_id: number;
169
178
  first?: number;
170
- cursor?: number;
179
+ cursor?: string;
171
180
  }
172
181
  interface CronjobRun {
173
182
  id: number;
@@ -629,6 +638,29 @@ interface PushSubscription {
629
638
  /** Playbooks whose latest release currently references this feed. */
630
639
  used_by?: PushSubscriptionUsedBy[];
631
640
  used_by_total?: number;
641
+ /**
642
+ * Row-shape discriminator: PLAYBOOK_ALERTS = a playbook-level wildcard
643
+ * (alerts for every push-enabled automation of the playbook);
644
+ * FEED_ALERT = a single feed's alert.
645
+ */
646
+ kind?: 'PLAYBOOK_ALERTS' | 'FEED_ALERT' | 'UNSPECIFIED' | string;
647
+ /**
648
+ * Whether the caller also FOLLOWS the target playbook — the social
649
+ * relation, distinct from this alert row. Always false for FEED targets.
650
+ */
651
+ following?: boolean;
652
+ /**
653
+ * Target lifecycle: TARGET_DELETED marks a ghost row (the playbook/feed
654
+ * was deleted) — clear it with unsubscribeBatch by target id.
655
+ */
656
+ target_status?: 'ACTIVE' | 'TARGET_DELETED' | 'PAUSED' | 'UNSPECIFIED' | string;
657
+ /** Playbook identity, present for PLAYBOOK targets on list responses. */
658
+ playbook?: PushSubscriptionPlaybookInfo;
659
+ }
660
+ interface PushSubscriptionPlaybookInfo {
661
+ owner_username: string;
662
+ name: string;
663
+ display_name: string;
632
664
  }
633
665
  interface PushSubscriptionUsedBy {
634
666
  playbook_id: string;
@@ -655,6 +687,46 @@ interface PushSubscriptionListResponse {
655
687
  items: PushSubscription[];
656
688
  /** Empty when there is no next page. */
657
689
  next_cursor?: string;
690
+ /**
691
+ * Total active subscription rows independent of pagination — when
692
+ * items.length < total_count, the page is truncated; keep paginating.
693
+ */
694
+ total_count?: number;
695
+ }
696
+ interface FollowsListParams {
697
+ /** Page size, default 50, max 100 server-side. */
698
+ limit?: number;
699
+ /** Opaque cursor from the previous page's `next_cursor`. */
700
+ cursor?: string;
701
+ }
702
+ interface PlaybookFollowItem {
703
+ playbook_id: string;
704
+ owner_username: string;
705
+ name: string;
706
+ display_name: string;
707
+ followed_at_ms: number;
708
+ cursor: string;
709
+ }
710
+ interface FollowsListResponse {
711
+ items: PlaybookFollowItem[];
712
+ has_next: boolean;
713
+ next_cursor?: string;
714
+ }
715
+ interface UnsubscribeBatchParams {
716
+ /** Playbook target ids (strings — snowflake ids exceed JS safe integers). */
717
+ playbookIds?: string[];
718
+ /** Feed target ids (strings). */
719
+ feedIds?: string[];
720
+ }
721
+ interface UnsubscribeBatchResult {
722
+ id: string;
723
+ kind: 'PLAYBOOK' | 'FEED' | string;
724
+ ok: boolean;
725
+ status: 'UNSUBSCRIBED' | 'INVALID_ID' | string;
726
+ }
727
+ interface UnsubscribeBatchResponse {
728
+ results: UnsubscribeBatchResult[];
729
+ ok_count: number;
658
730
  }
659
731
  interface PlaybookFollow {
660
732
  id: string;
@@ -896,9 +968,65 @@ interface TrendingPlaybooksResponse {
896
968
  * Public playbook discovery. Backed by alva-gateway REST and mirrors the
897
969
  * GraphQL `trendingPlaybooks(cursor, sort, tags, keyword)` query.
898
970
  */
971
+ /** Compact discovery record returned by getByIds / listByOwner / get. */
972
+ interface PlaybookDiscoveryItem {
973
+ /** Numeric playbook id encoded as a string. */
974
+ id: string;
975
+ /** Owner username (empty when not resolvable). */
976
+ owner_username: string;
977
+ /** URL-safe playbook name. */
978
+ name: string;
979
+ display_name: string;
980
+ visibility: string;
981
+ /** Stable "owner/name" handle for name-addressed operations. */
982
+ ref?: string;
983
+ /** Present on listByOwner rows. */
984
+ cursor?: string;
985
+ }
986
+ interface DiscoveryByIDsResponse {
987
+ items: PlaybookDiscoveryItem[];
988
+ }
989
+ interface ListByOwnerParams {
990
+ owner: string;
991
+ /** Page size, default 50, max 100 server-side. */
992
+ limit?: number;
993
+ cursor?: string;
994
+ }
995
+ interface ListByOwnerResponse {
996
+ items: PlaybookDiscoveryItem[];
997
+ has_next: boolean;
998
+ next_cursor?: string;
999
+ }
899
1000
  declare class PlaybooksResource {
900
1001
  private client;
901
1002
  constructor(client: AlvaClient);
1003
+ /**
1004
+ * Resolve playbook ids to named, addressable records (mono-meta#584 A2).
1005
+ * Visibility-gated server-side; ids the caller cannot see — and DELETED
1006
+ * playbook ids — return no row. Treat a missing id as "deleted or not
1007
+ * visible" (the subscriptions list's `target_status` distinguishes ghosts).
1008
+ * Ids are strings (snowflake-safe). Max 100 per call.
1009
+ *
1010
+ * Auth is optional (like `trending`): with an API key, private/paid
1011
+ * visibility is evaluated for the caller; without one, only public
1012
+ * playbooks resolve. The server decides — no client-side gate.
1013
+ */
1014
+ getByIds(ids: string[]): Promise<DiscoveryByIDsResponse>;
1015
+ /**
1016
+ * List a user's playbooks by owner username (mono-meta#584 C10).
1017
+ * Visibility-gated: another user's private playbooks are omitted.
1018
+ * Auth is optional (like `trending`); without credentials only public
1019
+ * playbooks are listed.
1020
+ */
1021
+ listByOwner(params: ListByOwnerParams): Promise<ListByOwnerResponse>;
1022
+ /**
1023
+ * Get one playbook by numeric id or by "owner/name" ref. Returns null when
1024
+ * not found / not visible / deleted.
1025
+ */
1026
+ get(params: {
1027
+ id?: string;
1028
+ ref?: string;
1029
+ }): Promise<PlaybookDiscoveryItem | null>;
902
1030
  /**
903
1031
  * List trending / searchable playbooks. Auth is optional: when the client
904
1032
  * has an API key it is forwarded, otherwise this uses the public surface.
@@ -1166,12 +1294,24 @@ declare class NotificationPreferencesResource {
1166
1294
  /**
1167
1295
  * Subscriptions — subscribe the caller to playbooks and feeds.
1168
1296
  *
1297
+ * Three DISTINCT concepts share the word "subscribe" in the product; this
1298
+ * resource touches the first two and never the third:
1299
+ *
1300
+ * - **follow** — the social relation ("Subscribed Playbooks" in the UI).
1301
+ * Enumerate with `follows()`.
1302
+ * - **alerts** — push/notification opt-ins (what `list()` returns).
1303
+ * - **purchase** — paid playbook access / the SaaS plan. NOT this resource.
1304
+ *
1305
+ * Operations:
1169
1306
  * - `subscribePlaybook` is a CASCADE: it follows the playbook AND enables
1170
1307
  * personal push for every push-enabled automation of its latest release,
1171
1308
  * in one call. `unsubscribePlaybook` reverses both (unfollow + disable
1172
- * all of the playbook's push alerts).
1309
+ * the playbook-level alert) and reports exactly what it changed.
1173
1310
  * - `subscribeFeed` / `unsubscribeFeed` toggle personal push for ONE feed
1174
1311
  * (a single automation's alert) without touching the playbook follow.
1312
+ * - `unsubscribeBatch` disables alerts by TARGET ID — bulk, idempotent,
1313
+ * and the only way to clear ghost rows whose target was deleted
1314
+ * (name-addressed unsubscribe 404s on deleted playbooks).
1175
1315
  *
1176
1316
  * Backed by alva-gateway REST under `/api/v1/subscriptions/...`.
1177
1317
  */
@@ -1206,6 +1346,20 @@ declare class SubscriptionsResource {
1206
1346
  * Results are cursor-paginated.
1207
1347
  */
1208
1348
  list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
1349
+ /**
1350
+ * List the playbooks the caller FOLLOWS (the social relation — the UI's
1351
+ * "Subscribed Playbooks"). Rows carry the playbook identity; follows of
1352
+ * deleted playbooks are filtered server-side. Cursor-paginated.
1353
+ */
1354
+ follows(params?: FollowsListParams): Promise<FollowsListResponse>;
1355
+ /**
1356
+ * Disable alerts for many playbook/feed targets BY TARGET ID in one
1357
+ * idempotent call (max 100 ids). Ids are strings (snowflake-safe). Works
1358
+ * for ghost rows (deleted targets) because no name resolution happens —
1359
+ * the per-id results report `INVALID_ID` for malformed entries while
1360
+ * valid ones proceed. Safe to re-run: already-gone rows are no-ops.
1361
+ */
1362
+ unsubscribeBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
1209
1363
  }
1210
1364
 
1211
1365
  /**
@@ -1330,6 +1484,10 @@ interface RequestOptions {
1330
1484
  baseUrl?: string;
1331
1485
  /** If true, skip attaching any Alva auth header (X-Alva-Api-Key / x-Playbook-Viewer). */
1332
1486
  noAuth?: boolean;
1487
+ /** Client-side HTTP timeout in milliseconds. */
1488
+ timeoutMs?: number;
1489
+ /** Optional AbortSignal for this request. Defaults to the client-level signal. */
1490
+ signal?: AbortSignal;
1333
1491
  }
1334
1492
  declare class AlvaClient {
1335
1493
  readonly baseUrl: string;
@@ -1340,6 +1498,16 @@ declare class AlvaClient {
1340
1498
  readonly gaClientId?: string;
1341
1499
  readonly gaSessionId?: string;
1342
1500
  readonly utmParams?: string;
1501
+ readonly signal?: AbortSignal;
1502
+ /**
1503
+ * Alva chat session that owns work produced through this client (playbooks,
1504
+ * feeds, uploaded files). Forwarded as `X-Alva-Origin-Session-Id` so the
1505
+ * backend can attribute created artifacts to the originating session. This
1506
+ * is a request-context hint, NOT auth — the backend still verifies the
1507
+ * session belongs to the authenticated user before honoring it. Distinct
1508
+ * from `gaSessionId` (browser analytics).
1509
+ */
1510
+ readonly originSessionId?: string;
1343
1511
  private _fs?;
1344
1512
  private _run?;
1345
1513
  private _deploy?;
@@ -1394,7 +1562,8 @@ declare class AlvaClient {
1394
1562
  declare class AlvaError extends Error {
1395
1563
  readonly code: string;
1396
1564
  readonly status: number;
1397
- constructor(code: string, message: string, status: number);
1565
+ readonly details?: unknown;
1566
+ constructor(code: string, message: string, status: number, details?: unknown);
1398
1567
  }
1399
1568
 
1400
1569
  type UdfErrorCode = 'PBSV_EXPIRED' | 'PBSV_INVALID' | 'PBSV_PID_MISMATCH' | 'CONSENT_REQUIRED' | 'INSUFFICIENT_CREDITS' | 'FUNCTION_NOT_FOUND' | 'FUNCTION_DISABLED' | 'RESOURCE_EXHAUSTED' | 'EXECUTION_FAILED' | 'UNAUTHENTICATED' | 'PERMISSION_DENIED' | 'INTERNAL';
package/dist/index.d.ts CHANGED
@@ -7,6 +7,10 @@ interface AlvaClientConfig {
7
7
  gaClientId?: string;
8
8
  gaSessionId?: string;
9
9
  utmParams?: string;
10
+ /** Optional default AbortSignal applied to every request from this client. */
11
+ signal?: AbortSignal;
12
+ /** Alva chat session owning produced artifacts; sent as X-Alva-Origin-Session-Id. */
13
+ originSessionId?: string;
10
14
  }
11
15
  interface UserProfile {
12
16
  id: string;
@@ -115,6 +119,11 @@ interface RunRequest {
115
119
  * 1–2048. Omitted means the server uses its default heap (256 MB).
116
120
  */
117
121
  max_heap_size_mb?: number;
122
+ /**
123
+ * Client-side HTTP timeout for waiting on POST /api/v1/run, in
124
+ * milliseconds. This is not sent to the server.
125
+ */
126
+ timeout_ms?: number;
118
127
  }
119
128
  interface RunResponse {
120
129
  result: string;
@@ -167,7 +176,7 @@ interface CronjobUpdateRequest {
167
176
  interface CronjobRunsListParams {
168
177
  cronjob_id: number;
169
178
  first?: number;
170
- cursor?: number;
179
+ cursor?: string;
171
180
  }
172
181
  interface CronjobRun {
173
182
  id: number;
@@ -629,6 +638,29 @@ interface PushSubscription {
629
638
  /** Playbooks whose latest release currently references this feed. */
630
639
  used_by?: PushSubscriptionUsedBy[];
631
640
  used_by_total?: number;
641
+ /**
642
+ * Row-shape discriminator: PLAYBOOK_ALERTS = a playbook-level wildcard
643
+ * (alerts for every push-enabled automation of the playbook);
644
+ * FEED_ALERT = a single feed's alert.
645
+ */
646
+ kind?: 'PLAYBOOK_ALERTS' | 'FEED_ALERT' | 'UNSPECIFIED' | string;
647
+ /**
648
+ * Whether the caller also FOLLOWS the target playbook — the social
649
+ * relation, distinct from this alert row. Always false for FEED targets.
650
+ */
651
+ following?: boolean;
652
+ /**
653
+ * Target lifecycle: TARGET_DELETED marks a ghost row (the playbook/feed
654
+ * was deleted) — clear it with unsubscribeBatch by target id.
655
+ */
656
+ target_status?: 'ACTIVE' | 'TARGET_DELETED' | 'PAUSED' | 'UNSPECIFIED' | string;
657
+ /** Playbook identity, present for PLAYBOOK targets on list responses. */
658
+ playbook?: PushSubscriptionPlaybookInfo;
659
+ }
660
+ interface PushSubscriptionPlaybookInfo {
661
+ owner_username: string;
662
+ name: string;
663
+ display_name: string;
632
664
  }
633
665
  interface PushSubscriptionUsedBy {
634
666
  playbook_id: string;
@@ -655,6 +687,46 @@ interface PushSubscriptionListResponse {
655
687
  items: PushSubscription[];
656
688
  /** Empty when there is no next page. */
657
689
  next_cursor?: string;
690
+ /**
691
+ * Total active subscription rows independent of pagination — when
692
+ * items.length < total_count, the page is truncated; keep paginating.
693
+ */
694
+ total_count?: number;
695
+ }
696
+ interface FollowsListParams {
697
+ /** Page size, default 50, max 100 server-side. */
698
+ limit?: number;
699
+ /** Opaque cursor from the previous page's `next_cursor`. */
700
+ cursor?: string;
701
+ }
702
+ interface PlaybookFollowItem {
703
+ playbook_id: string;
704
+ owner_username: string;
705
+ name: string;
706
+ display_name: string;
707
+ followed_at_ms: number;
708
+ cursor: string;
709
+ }
710
+ interface FollowsListResponse {
711
+ items: PlaybookFollowItem[];
712
+ has_next: boolean;
713
+ next_cursor?: string;
714
+ }
715
+ interface UnsubscribeBatchParams {
716
+ /** Playbook target ids (strings — snowflake ids exceed JS safe integers). */
717
+ playbookIds?: string[];
718
+ /** Feed target ids (strings). */
719
+ feedIds?: string[];
720
+ }
721
+ interface UnsubscribeBatchResult {
722
+ id: string;
723
+ kind: 'PLAYBOOK' | 'FEED' | string;
724
+ ok: boolean;
725
+ status: 'UNSUBSCRIBED' | 'INVALID_ID' | string;
726
+ }
727
+ interface UnsubscribeBatchResponse {
728
+ results: UnsubscribeBatchResult[];
729
+ ok_count: number;
658
730
  }
659
731
  interface PlaybookFollow {
660
732
  id: string;
@@ -896,9 +968,65 @@ interface TrendingPlaybooksResponse {
896
968
  * Public playbook discovery. Backed by alva-gateway REST and mirrors the
897
969
  * GraphQL `trendingPlaybooks(cursor, sort, tags, keyword)` query.
898
970
  */
971
+ /** Compact discovery record returned by getByIds / listByOwner / get. */
972
+ interface PlaybookDiscoveryItem {
973
+ /** Numeric playbook id encoded as a string. */
974
+ id: string;
975
+ /** Owner username (empty when not resolvable). */
976
+ owner_username: string;
977
+ /** URL-safe playbook name. */
978
+ name: string;
979
+ display_name: string;
980
+ visibility: string;
981
+ /** Stable "owner/name" handle for name-addressed operations. */
982
+ ref?: string;
983
+ /** Present on listByOwner rows. */
984
+ cursor?: string;
985
+ }
986
+ interface DiscoveryByIDsResponse {
987
+ items: PlaybookDiscoveryItem[];
988
+ }
989
+ interface ListByOwnerParams {
990
+ owner: string;
991
+ /** Page size, default 50, max 100 server-side. */
992
+ limit?: number;
993
+ cursor?: string;
994
+ }
995
+ interface ListByOwnerResponse {
996
+ items: PlaybookDiscoveryItem[];
997
+ has_next: boolean;
998
+ next_cursor?: string;
999
+ }
899
1000
  declare class PlaybooksResource {
900
1001
  private client;
901
1002
  constructor(client: AlvaClient);
1003
+ /**
1004
+ * Resolve playbook ids to named, addressable records (mono-meta#584 A2).
1005
+ * Visibility-gated server-side; ids the caller cannot see — and DELETED
1006
+ * playbook ids — return no row. Treat a missing id as "deleted or not
1007
+ * visible" (the subscriptions list's `target_status` distinguishes ghosts).
1008
+ * Ids are strings (snowflake-safe). Max 100 per call.
1009
+ *
1010
+ * Auth is optional (like `trending`): with an API key, private/paid
1011
+ * visibility is evaluated for the caller; without one, only public
1012
+ * playbooks resolve. The server decides — no client-side gate.
1013
+ */
1014
+ getByIds(ids: string[]): Promise<DiscoveryByIDsResponse>;
1015
+ /**
1016
+ * List a user's playbooks by owner username (mono-meta#584 C10).
1017
+ * Visibility-gated: another user's private playbooks are omitted.
1018
+ * Auth is optional (like `trending`); without credentials only public
1019
+ * playbooks are listed.
1020
+ */
1021
+ listByOwner(params: ListByOwnerParams): Promise<ListByOwnerResponse>;
1022
+ /**
1023
+ * Get one playbook by numeric id or by "owner/name" ref. Returns null when
1024
+ * not found / not visible / deleted.
1025
+ */
1026
+ get(params: {
1027
+ id?: string;
1028
+ ref?: string;
1029
+ }): Promise<PlaybookDiscoveryItem | null>;
902
1030
  /**
903
1031
  * List trending / searchable playbooks. Auth is optional: when the client
904
1032
  * has an API key it is forwarded, otherwise this uses the public surface.
@@ -1166,12 +1294,24 @@ declare class NotificationPreferencesResource {
1166
1294
  /**
1167
1295
  * Subscriptions — subscribe the caller to playbooks and feeds.
1168
1296
  *
1297
+ * Three DISTINCT concepts share the word "subscribe" in the product; this
1298
+ * resource touches the first two and never the third:
1299
+ *
1300
+ * - **follow** — the social relation ("Subscribed Playbooks" in the UI).
1301
+ * Enumerate with `follows()`.
1302
+ * - **alerts** — push/notification opt-ins (what `list()` returns).
1303
+ * - **purchase** — paid playbook access / the SaaS plan. NOT this resource.
1304
+ *
1305
+ * Operations:
1169
1306
  * - `subscribePlaybook` is a CASCADE: it follows the playbook AND enables
1170
1307
  * personal push for every push-enabled automation of its latest release,
1171
1308
  * in one call. `unsubscribePlaybook` reverses both (unfollow + disable
1172
- * all of the playbook's push alerts).
1309
+ * the playbook-level alert) and reports exactly what it changed.
1173
1310
  * - `subscribeFeed` / `unsubscribeFeed` toggle personal push for ONE feed
1174
1311
  * (a single automation's alert) without touching the playbook follow.
1312
+ * - `unsubscribeBatch` disables alerts by TARGET ID — bulk, idempotent,
1313
+ * and the only way to clear ghost rows whose target was deleted
1314
+ * (name-addressed unsubscribe 404s on deleted playbooks).
1175
1315
  *
1176
1316
  * Backed by alva-gateway REST under `/api/v1/subscriptions/...`.
1177
1317
  */
@@ -1206,6 +1346,20 @@ declare class SubscriptionsResource {
1206
1346
  * Results are cursor-paginated.
1207
1347
  */
1208
1348
  list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
1349
+ /**
1350
+ * List the playbooks the caller FOLLOWS (the social relation — the UI's
1351
+ * "Subscribed Playbooks"). Rows carry the playbook identity; follows of
1352
+ * deleted playbooks are filtered server-side. Cursor-paginated.
1353
+ */
1354
+ follows(params?: FollowsListParams): Promise<FollowsListResponse>;
1355
+ /**
1356
+ * Disable alerts for many playbook/feed targets BY TARGET ID in one
1357
+ * idempotent call (max 100 ids). Ids are strings (snowflake-safe). Works
1358
+ * for ghost rows (deleted targets) because no name resolution happens —
1359
+ * the per-id results report `INVALID_ID` for malformed entries while
1360
+ * valid ones proceed. Safe to re-run: already-gone rows are no-ops.
1361
+ */
1362
+ unsubscribeBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
1209
1363
  }
1210
1364
 
1211
1365
  /**
@@ -1330,6 +1484,10 @@ interface RequestOptions {
1330
1484
  baseUrl?: string;
1331
1485
  /** If true, skip attaching any Alva auth header (X-Alva-Api-Key / x-Playbook-Viewer). */
1332
1486
  noAuth?: boolean;
1487
+ /** Client-side HTTP timeout in milliseconds. */
1488
+ timeoutMs?: number;
1489
+ /** Optional AbortSignal for this request. Defaults to the client-level signal. */
1490
+ signal?: AbortSignal;
1333
1491
  }
1334
1492
  declare class AlvaClient {
1335
1493
  readonly baseUrl: string;
@@ -1340,6 +1498,16 @@ declare class AlvaClient {
1340
1498
  readonly gaClientId?: string;
1341
1499
  readonly gaSessionId?: string;
1342
1500
  readonly utmParams?: string;
1501
+ readonly signal?: AbortSignal;
1502
+ /**
1503
+ * Alva chat session that owns work produced through this client (playbooks,
1504
+ * feeds, uploaded files). Forwarded as `X-Alva-Origin-Session-Id` so the
1505
+ * backend can attribute created artifacts to the originating session. This
1506
+ * is a request-context hint, NOT auth — the backend still verifies the
1507
+ * session belongs to the authenticated user before honoring it. Distinct
1508
+ * from `gaSessionId` (browser analytics).
1509
+ */
1510
+ readonly originSessionId?: string;
1343
1511
  private _fs?;
1344
1512
  private _run?;
1345
1513
  private _deploy?;
@@ -1394,7 +1562,8 @@ declare class AlvaClient {
1394
1562
  declare class AlvaError extends Error {
1395
1563
  readonly code: string;
1396
1564
  readonly status: number;
1397
- constructor(code: string, message: string, status: number);
1565
+ readonly details?: unknown;
1566
+ constructor(code: string, message: string, status: number, details?: unknown);
1398
1567
  }
1399
1568
 
1400
1569
  type UdfErrorCode = 'PBSV_EXPIRED' | 'PBSV_INVALID' | 'PBSV_PID_MISMATCH' | 'CONSENT_REQUIRED' | 'INSUFFICIENT_CREDITS' | 'FUNCTION_NOT_FOUND' | 'FUNCTION_DISABLED' | 'RESOURCE_EXHAUSTED' | 'EXECUTION_FAILED' | 'UNAUTHENTICATED' | 'PERMISSION_DENIED' | 'INTERNAL';