@alva-ai/toolkit 0.23.1 → 0.25.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/cli.d.ts CHANGED
@@ -229,7 +229,8 @@ interface Cronjob {
229
229
  path: string;
230
230
  cron_expression: string;
231
231
  status: string;
232
- args: Record<string, unknown>;
232
+ /** Valid current rows are objects; legacy invalid rows are returned as strings. */
233
+ args: Record<string, unknown> | string | null;
233
234
  /** Whether successful Feed runs may deliver alerts to subscribers. */
234
235
  push_notify: boolean;
235
236
  /** Per-cronjob V8 heap cap (MB). null when using the server default. */
@@ -371,8 +372,8 @@ interface FeedReleaseResponse {
371
372
  feed_path: string;
372
373
  }
373
374
  interface FeedDeleteRequest {
374
- /** Numeric feed id to delete. */
375
- id: number;
375
+ /** Positive decimal feed id. String form preserves int64 precision. */
376
+ id: number | string;
376
377
  }
377
378
  type FeedListStatus = 'active' | 'paused' | 'all';
378
379
  interface FeedListParams {
@@ -399,14 +400,16 @@ interface FeedListResponse {
399
400
  has_more: boolean;
400
401
  }
401
402
  interface AutomationInspectRequest {
402
- /** Numeric automation id. Currently the same underlying feed id. */
403
- id: number;
403
+ /** Positive decimal automation id. String form preserves int64 precision. */
404
+ id: number | string;
404
405
  }
405
406
  interface AutomationInspectResponse {
406
407
  /** Numeric automation id encoded as a string, matching the gateway response. */
407
408
  id: string;
408
409
  /** Backing feed id encoded as a string. */
409
410
  feed_id: string;
411
+ /** Backing producer cronjob id used by lifecycle and run operations. */
412
+ cronjob_id?: number;
410
413
  name: string;
411
414
  description?: string;
412
415
  /** Automation runtime status. */
@@ -448,9 +451,45 @@ interface AutomationUpdateResponse {
448
451
  version: string;
449
452
  cronjob_id: number;
450
453
  }
454
+ interface AutomationEmailDelivery {
455
+ isEnabled: boolean;
456
+ isAvailable: boolean;
457
+ address: string | null;
458
+ }
459
+ interface AutomationAlertDelivery {
460
+ isEnabled: boolean;
461
+ alvaChannels: Array<{
462
+ id: string;
463
+ }>;
464
+ email: AutomationEmailDelivery;
465
+ }
466
+ interface AutomationAlertDeliveryGetRequest {
467
+ /** Positive decimal automation id kept as a string to preserve int64 precision. */
468
+ id: string;
469
+ }
470
+ interface AutomationAlertDeliveryUpdateRequest {
471
+ /** Positive decimal automation id kept as a string to preserve int64 precision. */
472
+ id: string;
473
+ /** Replace Alva destinations when present; an explicit empty list clears them. */
474
+ alvaChannelIds?: readonly string[];
475
+ /** Update only the verified-account email destination when present. */
476
+ emailEnabled?: boolean;
477
+ }
478
+ interface AutomationAlertDeliveryUpdateResponse {
479
+ automation: {
480
+ id: string;
481
+ };
482
+ alertDelivery: {
483
+ isEnabled: boolean;
484
+ alvaChannels?: Array<{
485
+ id: string;
486
+ }>;
487
+ email?: AutomationEmailDelivery;
488
+ };
489
+ }
451
490
  interface FeedStatusUpdateRequest {
452
- /** Numeric feed id to stop/resume. */
453
- id: number;
491
+ /** Positive decimal feed id. String form preserves int64 precision. */
492
+ id: number | string;
454
493
  }
455
494
  interface FeedStatusUpdateResponse {
456
495
  /** Echoed feed id (string form, matching gateway response). */
@@ -465,8 +504,8 @@ interface FeedDeleteResponse {
465
504
  /** Feed visibility: 'public' publishes the feed, 'private' unpublishes it. */
466
505
  type FeedVisibility = 'public' | 'private';
467
506
  interface FeedSetVisibilityRequest {
468
- /** Numeric feed id to publish/unpublish. */
469
- id: number;
507
+ /** Positive decimal feed id. String form preserves int64 precision. */
508
+ id: number | string;
470
509
  /** Target visibility. */
471
510
  visibility: FeedVisibility;
472
511
  }
@@ -1085,17 +1124,26 @@ declare class RunResource {
1085
1124
  private client;
1086
1125
  constructor(client: AlvaClient);
1087
1126
  execute(params: RunRequest): Promise<RunResponse>;
1127
+ /** @internal Used by the CLI to preserve the exact --args JSON text. */
1128
+ _executeSerializedArgs(params: RunRequest, serializedArgs: string): Promise<RunResponse>;
1129
+ private request;
1088
1130
  }
1089
1131
 
1090
1132
  declare class DeployResource {
1091
1133
  private client;
1092
1134
  constructor(client: AlvaClient);
1093
1135
  create(params: CronjobCreateRequest): Promise<Cronjob>;
1136
+ /** @internal Used by the CLI to preserve the exact --args JSON text. */
1137
+ _createSerializedArgs(params: CronjobCreateRequest, serializedArgs: string): Promise<Cronjob>;
1138
+ private createRequest;
1094
1139
  list(params?: CronjobListParams): Promise<CronjobListResponse>;
1095
1140
  get(params: {
1096
1141
  id: number;
1097
1142
  }): Promise<Cronjob>;
1098
1143
  update(params: CronjobUpdateRequest): Promise<Cronjob>;
1144
+ /** @internal Used by the CLI to preserve the exact --args JSON text. */
1145
+ _updateSerializedArgs(params: CronjobUpdateRequest, serializedArgs: string): Promise<Cronjob>;
1146
+ private updateRequest;
1099
1147
  delete(params: {
1100
1148
  id: number;
1101
1149
  }): Promise<void>;
@@ -1211,6 +1259,7 @@ declare class FeedResource {
1211
1259
  */
1212
1260
  declare class AutomationResource {
1213
1261
  private client;
1262
+ readonly delivery: AutomationAlertDeliveryResource;
1214
1263
  constructor(client: AlvaClient);
1215
1264
  list(params?: FeedListParams): Promise<FeedListResponse>;
1216
1265
  /**
@@ -1224,6 +1273,13 @@ declare class AutomationResource {
1224
1273
  delete(params: FeedDeleteRequest): Promise<FeedDeleteResponse>;
1225
1274
  publish(params: FeedReleaseRequest): Promise<FeedReleaseResponse>;
1226
1275
  }
1276
+ declare class AutomationAlertDeliveryResource {
1277
+ private client;
1278
+ constructor(client: AlvaClient);
1279
+ get(params: AutomationAlertDeliveryGetRequest): Promise<AutomationAlertDelivery>;
1280
+ update(params: AutomationAlertDeliveryUpdateRequest): Promise<AutomationAlertDeliveryUpdateResponse>;
1281
+ private graphql;
1282
+ }
1227
1283
 
1228
1284
  /** Playbook visibility states understood by the gateway. */
1229
1285
  type PlaybookVisibility = 'public' | 'private' | 'paid';
@@ -2102,14 +2158,14 @@ declare const BOOLEAN_FLAGS: Set<string>;
2102
2158
  * Compares major.minor.patch as integers. Returns false on malformed input.
2103
2159
  */
2104
2160
  declare function isVersionOlderThan(a: string, b: string): boolean;
2105
- type AlvaCliRuntimeMode = 'nodejs' | 'jagent';
2161
+ type DispatchRuntime = 'nodejs' | 'jagent';
2106
2162
  interface DispatchLocalFiles {
2107
2163
  readText(path: string): string;
2108
2164
  readBytes(path: string): BodyInit;
2109
2165
  writeBytes(path: string, data: Uint8Array): void;
2110
2166
  }
2111
2167
  interface DispatchRuntimeDeps {
2112
- mode?: AlvaCliRuntimeMode;
2168
+ runtime?: DispatchRuntime;
2113
2169
  env?: Record<string, string | undefined>;
2114
2170
  stderr?: {
2115
2171
  write(value: string): unknown;
@@ -2156,4 +2212,4 @@ declare function handleConfigure(args: string[], deps?: WriteConfigDeps): Promis
2156
2212
  profile: string;
2157
2213
  }>;
2158
2214
 
2159
- export { type AlvaCliRuntimeMode, BOOLEAN_FLAGS, CLI_VERSION, CliUsageError, DEFAULT_RUN_TIMEOUT_MS, type DispatchLocalFiles, type DispatchRuntimeDeps, dispatch, handleConfigure, isVersionOlderThan, parseFlags, stripGlobalFlags };
2215
+ export { BOOLEAN_FLAGS, CLI_VERSION, CliUsageError, DEFAULT_RUN_TIMEOUT_MS, type DispatchLocalFiles, type DispatchRuntime, type DispatchRuntimeDeps, dispatch, handleConfigure, isVersionOlderThan, parseFlags, stripGlobalFlags };