@alva-ai/toolkit 0.19.0 → 0.21.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.cjs CHANGED
@@ -77,6 +77,11 @@ var CliUsageError = class extends Error {
77
77
  }
78
78
  };
79
79
 
80
+ // src/arrayBuffer.ts
81
+ function isArrayBuffer(value) {
82
+ return Object.prototype.toString.call(value) === "[object ArrayBuffer]";
83
+ }
84
+
80
85
  // src/resources/fs.ts
81
86
  var WRITE_FLAG_APPEND = 1 << 0;
82
87
  function isValidUtf8(bytes) {
@@ -128,7 +133,7 @@ var FsResource = class {
128
133
  const result = await this.client._request("GET", "/api/v1/fs/read", {
129
134
  query: { path: params.path, offset: params.offset, size: params.size }
130
135
  });
131
- if (!(result instanceof ArrayBuffer)) return result;
136
+ if (!isArrayBuffer(result)) return result;
132
137
  if (!isValidUtf8(new Uint8Array(result))) {
133
138
  return result;
134
139
  }
@@ -327,6 +332,8 @@ var DeployResource = class {
327
332
  }
328
333
  /**
329
334
  * Fire the cronjob workflow once, immediately, bypassing the schedule.
335
+ * This is not a dry run: when publisher push and subscriber alert bindings
336
+ * are enabled, a successful Feed execution may send real notifications.
330
337
  * Async — returns the Hatchet workflow run id at enqueue. The
331
338
  * `cronjob_runs` row can appear as DISPATCHED/RUNNING before it reaches a
332
339
  * terminal status; callers verify completion by polling
@@ -1544,40 +1551,40 @@ var SKILL_ENDPOINT_METADATA = [
1544
1551
  file: "contracts",
1545
1552
  method: "GET",
1546
1553
  path: "/api/v1/options/contracts",
1547
- tier: "alternative",
1548
- required_subscription_tier: "pro",
1549
- access: "pro_only",
1550
- pro_required: true
1554
+ tier: "public",
1555
+ required_subscription_tier: "free",
1556
+ access: "free_and_pro",
1557
+ pro_required: false
1551
1558
  },
1552
1559
  {
1553
1560
  skill: "arrays-data-api-options",
1554
1561
  file: "kline",
1555
1562
  method: "GET",
1556
1563
  path: "/api/v1/options/kline",
1557
- tier: "alternative",
1558
- required_subscription_tier: "pro",
1559
- access: "pro_only",
1560
- pro_required: true
1564
+ tier: "public",
1565
+ required_subscription_tier: "free",
1566
+ access: "free_and_pro",
1567
+ pro_required: false
1561
1568
  },
1562
1569
  {
1563
1570
  skill: "arrays-data-api-options",
1564
1571
  file: "greeks",
1565
1572
  method: "GET",
1566
1573
  path: "/api/v1/options/greeks",
1567
- tier: "alternative",
1568
- required_subscription_tier: "pro",
1569
- access: "pro_only",
1570
- pro_required: true
1574
+ tier: "public",
1575
+ required_subscription_tier: "free",
1576
+ access: "free_and_pro",
1577
+ pro_required: false
1571
1578
  },
1572
1579
  {
1573
1580
  skill: "arrays-data-api-options",
1574
1581
  file: "chain",
1575
1582
  method: "GET",
1576
1583
  path: "/api/v1/options/chain",
1577
- tier: "alternative",
1578
- required_subscription_tier: "pro",
1579
- access: "pro_only",
1580
- pro_required: true
1584
+ tier: "public",
1585
+ required_subscription_tier: "free",
1586
+ access: "free_and_pro",
1587
+ pro_required: false
1581
1588
  },
1582
1589
  {
1583
1590
  skill: "arrays-data-api-equity-fundamentals",
@@ -2494,7 +2501,15 @@ var SubscriptionsResource = class {
2494
2501
  async subscribeFeed(params) {
2495
2502
  this.client._requireAuth();
2496
2503
  const path = `/api/v1/subscriptions/feed/${encodeURIComponent(params.username)}/${encodeURIComponent(params.name)}`;
2497
- return this.client._request("POST", path);
2504
+ if (params.channelId === void 0) {
2505
+ return this.client._request(
2506
+ "POST",
2507
+ path
2508
+ );
2509
+ }
2510
+ return this.client._request("POST", path, {
2511
+ body: { channel_id: params.channelId }
2512
+ });
2498
2513
  }
2499
2514
  /**
2500
2515
  * Unsubscribe from one feed `(username, name)` — disable that automation's
@@ -3771,7 +3786,7 @@ var installPlaybookRuntime = (targetWindow) => {
3771
3786
  };
3772
3787
 
3773
3788
  // src/index.ts
3774
- var VERSION = true ? "0.19.0" : "dev";
3789
+ var VERSION = true ? "0.21.0" : "dev";
3775
3790
  // Annotate the CommonJS export names for ESM import in node:
3776
3791
  0 && (module.exports = {
3777
3792
  AlertsResource,