@alva-ai/toolkit 0.18.0 → 0.20.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
@@ -196,9 +196,18 @@ interface CronjobCreateRequest {
196
196
  cron_expression: string;
197
197
  name: string;
198
198
  args?: Record<string, unknown>;
199
+ /**
200
+ * Let successful scheduled and manually triggered Feed runs deliver declared
201
+ * alert outputs to eligible subscribers. Does not create subscriptions.
202
+ */
199
203
  push_notify?: boolean;
200
204
  /** Override per-cronjob V8 heap limit (MB). Valid range 1–2046. */
201
205
  max_heap_size_mb?: number;
206
+ /**
207
+ * Maximum wall-clock execution time in seconds. Valid range 1–3600.
208
+ * Omitted means the server uses its default (1800 seconds).
209
+ */
210
+ execution_timeout_seconds?: number;
202
211
  /**
203
212
  * Run the cronjob under a restricted service-account identity (an SA id
204
213
  * owned by the caller) instead of the owner (#602). Omitted ⇒ runs as owner.
@@ -221,9 +230,12 @@ interface Cronjob {
221
230
  cron_expression: string;
222
231
  status: string;
223
232
  args: Record<string, unknown>;
233
+ /** Whether successful Feed runs may deliver alerts to subscribers. */
224
234
  push_notify: boolean;
225
235
  /** Per-cronjob V8 heap cap (MB). null when using the server default. */
226
236
  max_heap_size_mb: number | null;
237
+ /** Effective wall-clock execution timeout in seconds. */
238
+ execution_timeout_seconds: number;
227
239
  /**
228
240
  * SA id the cronjob runs as, or "0" when it runs as the owner (#602).
229
241
  * A string: snowflake int64 ids overflow JS number precision.
@@ -256,9 +268,15 @@ interface CronjobUpdateRequest {
256
268
  name?: string;
257
269
  cron_expression?: string;
258
270
  args?: Record<string, unknown>;
271
+ /** Enable or disable delivery of declared Feed alert outputs. */
259
272
  push_notify?: boolean;
260
273
  /** Override per-cronjob V8 heap limit (MB). Valid range 1–2046. */
261
274
  max_heap_size_mb?: number;
275
+ /**
276
+ * Maximum wall-clock execution time in seconds. Valid range 1–3600.
277
+ * Omitted means the existing value is preserved.
278
+ */
279
+ execution_timeout_seconds?: number;
262
280
  /**
263
281
  * Re-point the cronjob at a service-account identity, or "0" to clear it back
264
282
  * to the owner (#602). Omitted ⇒ run_as unchanged.
@@ -795,6 +813,8 @@ interface PushSubscription {
795
813
  target: PushTarget;
796
814
  created_at_ms: number;
797
815
  updated_at_ms: number;
816
+ /** Alva delivery channel id. "0" denotes the agent/home channel. */
817
+ channel_id?: string;
798
818
  /** Present on list responses. */
799
819
  cursor?: string;
800
820
  /** Feed metadata is present for FEED targets when available. */
@@ -828,6 +848,10 @@ interface PushSubscriptionFeedParams {
828
848
  username: string;
829
849
  name: string;
830
850
  }
851
+ interface SubscribeFeedParams extends PushSubscriptionFeedParams {
852
+ /** Delivery channel id. Omit for the user's agent/home channel. */
853
+ channelId?: string;
854
+ }
831
855
  interface PushSubscriptionListParams {
832
856
  /** Page size, default 50, max 200 server-side. */
833
857
  first?: number;
@@ -1059,6 +1083,8 @@ declare class DeployResource {
1059
1083
  }): Promise<void>;
1060
1084
  /**
1061
1085
  * Fire the cronjob workflow once, immediately, bypassing the schedule.
1086
+ * This is not a dry run: when publisher push and subscriber alert bindings
1087
+ * are enabled, a successful Feed execution may send real notifications.
1062
1088
  * Async — returns the Hatchet workflow run id at enqueue. The
1063
1089
  * `cronjob_runs` row can appear as DISPATCHED/RUNNING before it reaches a
1064
1090
  * terminal status; callers verify completion by polling
@@ -1586,7 +1612,7 @@ declare class SubscriptionsResource {
1586
1612
  * single automation's alerts, regardless of which playbook(s) consume it.
1587
1613
  * Does NOT follow any playbook. Idempotent.
1588
1614
  */
1589
- subscribeFeed(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
1615
+ subscribeFeed(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
1590
1616
  /**
1591
1617
  * Unsubscribe from one feed `(username, name)` — disable that automation's
1592
1618
  * alerts for the caller. Idempotent.
@@ -1621,7 +1647,7 @@ declare class AlertsResource {
1621
1647
  constructor(client: AlvaClient);
1622
1648
  list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
1623
1649
  follows(params?: FollowsListParams): Promise<FollowsListResponse>;
1624
- enableAutomation(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
1650
+ enableAutomation(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
1625
1651
  disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
1626
1652
  enableBatch(params: SubscribeBatchParams): Promise<SubscribeBatchResponse>;
1627
1653
  disableBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
package/dist/index.d.ts CHANGED
@@ -196,9 +196,18 @@ interface CronjobCreateRequest {
196
196
  cron_expression: string;
197
197
  name: string;
198
198
  args?: Record<string, unknown>;
199
+ /**
200
+ * Let successful scheduled and manually triggered Feed runs deliver declared
201
+ * alert outputs to eligible subscribers. Does not create subscriptions.
202
+ */
199
203
  push_notify?: boolean;
200
204
  /** Override per-cronjob V8 heap limit (MB). Valid range 1–2046. */
201
205
  max_heap_size_mb?: number;
206
+ /**
207
+ * Maximum wall-clock execution time in seconds. Valid range 1–3600.
208
+ * Omitted means the server uses its default (1800 seconds).
209
+ */
210
+ execution_timeout_seconds?: number;
202
211
  /**
203
212
  * Run the cronjob under a restricted service-account identity (an SA id
204
213
  * owned by the caller) instead of the owner (#602). Omitted ⇒ runs as owner.
@@ -221,9 +230,12 @@ interface Cronjob {
221
230
  cron_expression: string;
222
231
  status: string;
223
232
  args: Record<string, unknown>;
233
+ /** Whether successful Feed runs may deliver alerts to subscribers. */
224
234
  push_notify: boolean;
225
235
  /** Per-cronjob V8 heap cap (MB). null when using the server default. */
226
236
  max_heap_size_mb: number | null;
237
+ /** Effective wall-clock execution timeout in seconds. */
238
+ execution_timeout_seconds: number;
227
239
  /**
228
240
  * SA id the cronjob runs as, or "0" when it runs as the owner (#602).
229
241
  * A string: snowflake int64 ids overflow JS number precision.
@@ -256,9 +268,15 @@ interface CronjobUpdateRequest {
256
268
  name?: string;
257
269
  cron_expression?: string;
258
270
  args?: Record<string, unknown>;
271
+ /** Enable or disable delivery of declared Feed alert outputs. */
259
272
  push_notify?: boolean;
260
273
  /** Override per-cronjob V8 heap limit (MB). Valid range 1–2046. */
261
274
  max_heap_size_mb?: number;
275
+ /**
276
+ * Maximum wall-clock execution time in seconds. Valid range 1–3600.
277
+ * Omitted means the existing value is preserved.
278
+ */
279
+ execution_timeout_seconds?: number;
262
280
  /**
263
281
  * Re-point the cronjob at a service-account identity, or "0" to clear it back
264
282
  * to the owner (#602). Omitted ⇒ run_as unchanged.
@@ -795,6 +813,8 @@ interface PushSubscription {
795
813
  target: PushTarget;
796
814
  created_at_ms: number;
797
815
  updated_at_ms: number;
816
+ /** Alva delivery channel id. "0" denotes the agent/home channel. */
817
+ channel_id?: string;
798
818
  /** Present on list responses. */
799
819
  cursor?: string;
800
820
  /** Feed metadata is present for FEED targets when available. */
@@ -828,6 +848,10 @@ interface PushSubscriptionFeedParams {
828
848
  username: string;
829
849
  name: string;
830
850
  }
851
+ interface SubscribeFeedParams extends PushSubscriptionFeedParams {
852
+ /** Delivery channel id. Omit for the user's agent/home channel. */
853
+ channelId?: string;
854
+ }
831
855
  interface PushSubscriptionListParams {
832
856
  /** Page size, default 50, max 200 server-side. */
833
857
  first?: number;
@@ -1059,6 +1083,8 @@ declare class DeployResource {
1059
1083
  }): Promise<void>;
1060
1084
  /**
1061
1085
  * Fire the cronjob workflow once, immediately, bypassing the schedule.
1086
+ * This is not a dry run: when publisher push and subscriber alert bindings
1087
+ * are enabled, a successful Feed execution may send real notifications.
1062
1088
  * Async — returns the Hatchet workflow run id at enqueue. The
1063
1089
  * `cronjob_runs` row can appear as DISPATCHED/RUNNING before it reaches a
1064
1090
  * terminal status; callers verify completion by polling
@@ -1586,7 +1612,7 @@ declare class SubscriptionsResource {
1586
1612
  * single automation's alerts, regardless of which playbook(s) consume it.
1587
1613
  * Does NOT follow any playbook. Idempotent.
1588
1614
  */
1589
- subscribeFeed(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
1615
+ subscribeFeed(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
1590
1616
  /**
1591
1617
  * Unsubscribe from one feed `(username, name)` — disable that automation's
1592
1618
  * alerts for the caller. Idempotent.
@@ -1621,7 +1647,7 @@ declare class AlertsResource {
1621
1647
  constructor(client: AlvaClient);
1622
1648
  list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
1623
1649
  follows(params?: FollowsListParams): Promise<FollowsListResponse>;
1624
- enableAutomation(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
1650
+ enableAutomation(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
1625
1651
  disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
1626
1652
  enableBatch(params: SubscribeBatchParams): Promise<SubscribeBatchResponse>;
1627
1653
  disableBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
package/dist/index.js CHANGED
@@ -222,6 +222,7 @@ var DeployResource = class {
222
222
  args: params.args,
223
223
  push_notify: params.push_notify,
224
224
  max_heap_size_mb: params.max_heap_size_mb,
225
+ execution_timeout_seconds: params.execution_timeout_seconds,
225
226
  run_as_user_id: params.run_as_user_id,
226
227
  start_at: params.start_at,
227
228
  end_at: params.end_at,
@@ -269,6 +270,8 @@ var DeployResource = class {
269
270
  }
270
271
  /**
271
272
  * Fire the cronjob workflow once, immediately, bypassing the schedule.
273
+ * This is not a dry run: when publisher push and subscriber alert bindings
274
+ * are enabled, a successful Feed execution may send real notifications.
272
275
  * Async — returns the Hatchet workflow run id at enqueue. The
273
276
  * `cronjob_runs` row can appear as DISPATCHED/RUNNING before it reaches a
274
277
  * terminal status; callers verify completion by polling
@@ -1486,40 +1489,40 @@ var SKILL_ENDPOINT_METADATA = [
1486
1489
  file: "contracts",
1487
1490
  method: "GET",
1488
1491
  path: "/api/v1/options/contracts",
1489
- tier: "alternative",
1490
- required_subscription_tier: "pro",
1491
- access: "pro_only",
1492
- pro_required: true
1492
+ tier: "public",
1493
+ required_subscription_tier: "free",
1494
+ access: "free_and_pro",
1495
+ pro_required: false
1493
1496
  },
1494
1497
  {
1495
1498
  skill: "arrays-data-api-options",
1496
1499
  file: "kline",
1497
1500
  method: "GET",
1498
1501
  path: "/api/v1/options/kline",
1499
- tier: "alternative",
1500
- required_subscription_tier: "pro",
1501
- access: "pro_only",
1502
- pro_required: true
1502
+ tier: "public",
1503
+ required_subscription_tier: "free",
1504
+ access: "free_and_pro",
1505
+ pro_required: false
1503
1506
  },
1504
1507
  {
1505
1508
  skill: "arrays-data-api-options",
1506
1509
  file: "greeks",
1507
1510
  method: "GET",
1508
1511
  path: "/api/v1/options/greeks",
1509
- tier: "alternative",
1510
- required_subscription_tier: "pro",
1511
- access: "pro_only",
1512
- pro_required: true
1512
+ tier: "public",
1513
+ required_subscription_tier: "free",
1514
+ access: "free_and_pro",
1515
+ pro_required: false
1513
1516
  },
1514
1517
  {
1515
1518
  skill: "arrays-data-api-options",
1516
1519
  file: "chain",
1517
1520
  method: "GET",
1518
1521
  path: "/api/v1/options/chain",
1519
- tier: "alternative",
1520
- required_subscription_tier: "pro",
1521
- access: "pro_only",
1522
- pro_required: true
1522
+ tier: "public",
1523
+ required_subscription_tier: "free",
1524
+ access: "free_and_pro",
1525
+ pro_required: false
1523
1526
  },
1524
1527
  {
1525
1528
  skill: "arrays-data-api-equity-fundamentals",
@@ -2436,7 +2439,15 @@ var SubscriptionsResource = class {
2436
2439
  async subscribeFeed(params) {
2437
2440
  this.client._requireAuth();
2438
2441
  const path = `/api/v1/subscriptions/feed/${encodeURIComponent(params.username)}/${encodeURIComponent(params.name)}`;
2439
- return this.client._request("POST", path);
2442
+ if (params.channelId === void 0) {
2443
+ return this.client._request(
2444
+ "POST",
2445
+ path
2446
+ );
2447
+ }
2448
+ return this.client._request("POST", path, {
2449
+ body: { channel_id: params.channelId }
2450
+ });
2440
2451
  }
2441
2452
  /**
2442
2453
  * Unsubscribe from one feed `(username, name)` — disable that automation's
@@ -3713,7 +3724,7 @@ var installPlaybookRuntime = (targetWindow) => {
3713
3724
  };
3714
3725
 
3715
3726
  // src/index.ts
3716
- var VERSION = true ? "0.18.0" : "dev";
3727
+ var VERSION = true ? "0.20.0" : "dev";
3717
3728
  export {
3718
3729
  AlertsResource,
3719
3730
  AlvaClient,