@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/README.md +4 -1
- package/dist/browser.global.js +2 -2
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.d.ts +37 -3
- package/dist/cli.js +913 -274
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +29 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -2
- package/dist/index.d.ts +28 -2
- package/dist/index.js +29 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.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:
|
|
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:
|
|
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>;
|
|
@@ -1867,6 +1893,11 @@ declare class CliUsageError extends Error {
|
|
|
1867
1893
|
|
|
1868
1894
|
declare const CLI_VERSION: string;
|
|
1869
1895
|
declare const DEFAULT_RUN_TIMEOUT_MS = 600000;
|
|
1896
|
+
/**
|
|
1897
|
+
* @deprecated Internal command handling uses the strict declarative parser.
|
|
1898
|
+
* Retained for compatibility with existing `@alva-ai/toolkit/cli` consumers.
|
|
1899
|
+
*/
|
|
1900
|
+
declare const BOOLEAN_FLAGS: Set<string>;
|
|
1870
1901
|
/**
|
|
1871
1902
|
* Returns true if version `a` is strictly older than version `b`.
|
|
1872
1903
|
* Compares major.minor.patch as integers. Returns false on malformed input.
|
|
@@ -1896,7 +1927,10 @@ declare function handleConfigure(args: string[], deps?: WriteConfigDeps): Promis
|
|
|
1896
1927
|
baseUrl?: string;
|
|
1897
1928
|
profile: string;
|
|
1898
1929
|
}>;
|
|
1899
|
-
|
|
1930
|
+
/**
|
|
1931
|
+
* @deprecated Use `dispatch()` for validated command execution. This permissive
|
|
1932
|
+
* parser remains available only to preserve the existing `./cli` export.
|
|
1933
|
+
*/
|
|
1900
1934
|
declare function parseFlags(argv: string[]): Record<string, string>;
|
|
1901
1935
|
declare function dispatch(client: AlvaClient, args: string[], meta?: {
|
|
1902
1936
|
profile?: string;
|