@alva-ai/toolkit 0.20.0 → 0.22.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 +7 -3
- package/dist/browser.global.js +3 -3
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.d.ts +116 -33
- package/dist/cli.js +5505 -5904
- package/dist/cli.js.map +1 -1
- package/dist/dispatch.d.ts +2013 -0
- package/dist/dispatch.js +13782 -0
- package/dist/dispatch.js.map +1 -0
- package/dist/index.cjs +193 -610
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +80 -10
- package/dist/index.d.ts +80 -10
- package/dist/index.js +193 -610
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/cli.d.ts
CHANGED
|
@@ -424,6 +424,30 @@ interface AutomationInspectResponse {
|
|
|
424
424
|
*/
|
|
425
425
|
flow_config_path: string | null;
|
|
426
426
|
}
|
|
427
|
+
interface AutomationUpdateRequest {
|
|
428
|
+
/** Positive decimal automation id kept as a string to preserve int64 precision. */
|
|
429
|
+
id: string;
|
|
430
|
+
/** Contract version to republish. Omitted preserves the current version. */
|
|
431
|
+
version?: string;
|
|
432
|
+
/** Replacement producer cronjob. Omitted preserves the current producer. */
|
|
433
|
+
cronjob_id?: number;
|
|
434
|
+
/** Omitted preserves; an explicit empty string clears the field. */
|
|
435
|
+
description?: string;
|
|
436
|
+
/** Omitted preserves; an explicit empty string clears the field. */
|
|
437
|
+
changelog?: string;
|
|
438
|
+
/** Omitted preserves; an explicit empty string clears the agent marker. */
|
|
439
|
+
agent_type?: string;
|
|
440
|
+
/** Trigger the effective producer once after the update commits. */
|
|
441
|
+
trigger?: boolean;
|
|
442
|
+
}
|
|
443
|
+
interface AutomationUpdateResponse {
|
|
444
|
+
id: string;
|
|
445
|
+
feed_id: string;
|
|
446
|
+
name: string;
|
|
447
|
+
feed_major: number;
|
|
448
|
+
version: string;
|
|
449
|
+
cronjob_id: number;
|
|
450
|
+
}
|
|
427
451
|
interface FeedStatusUpdateRequest {
|
|
428
452
|
/** Numeric feed id to stop/resume. */
|
|
429
453
|
id: number;
|
|
@@ -1193,6 +1217,8 @@ declare class AutomationResource {
|
|
|
1193
1217
|
* Inspect one automation. Backed by GET /api/v1/automation/:id.
|
|
1194
1218
|
*/
|
|
1195
1219
|
inspect(params: AutomationInspectRequest): Promise<AutomationInspectResponse>;
|
|
1220
|
+
/** Partially update one existing automation by immutable decimal-string id. */
|
|
1221
|
+
update(params: AutomationUpdateRequest): Promise<AutomationUpdateResponse>;
|
|
1196
1222
|
stop(params: FeedStatusUpdateRequest): Promise<FeedStatusUpdateResponse>;
|
|
1197
1223
|
resume(params: FeedStatusUpdateRequest): Promise<FeedStatusUpdateResponse>;
|
|
1198
1224
|
delete(params: FeedDeleteRequest): Promise<FeedDeleteResponse>;
|
|
@@ -1288,6 +1314,33 @@ interface ListByOwnerResponse {
|
|
|
1288
1314
|
has_next: boolean;
|
|
1289
1315
|
next_cursor?: string;
|
|
1290
1316
|
}
|
|
1317
|
+
/** Lifecycle filters for the owner-scoped list (GET /api/v1/playbook). */
|
|
1318
|
+
declare const OWNED_PLAYBOOK_FILTERS: readonly ["draft", "running", "paused"];
|
|
1319
|
+
type OwnedPlaybookFilter = (typeof OWNED_PLAYBOOK_FILTERS)[number];
|
|
1320
|
+
interface ListOwnParams {
|
|
1321
|
+
/** draft | running | paused. Omit to list all your published playbooks. */
|
|
1322
|
+
filter?: OwnedPlaybookFilter;
|
|
1323
|
+
/** Page size, default 50, max 100 server-side. */
|
|
1324
|
+
limit?: number;
|
|
1325
|
+
cursor?: string;
|
|
1326
|
+
}
|
|
1327
|
+
/** One row from the owner-scoped list (GET /api/v1/playbook). */
|
|
1328
|
+
interface OwnedPlaybookItem {
|
|
1329
|
+
/** Numeric playbook id encoded as a string. */
|
|
1330
|
+
id: string;
|
|
1331
|
+
/** URL-safe playbook name. */
|
|
1332
|
+
name: string;
|
|
1333
|
+
display_name?: string;
|
|
1334
|
+
visibility?: string;
|
|
1335
|
+
created_at?: string;
|
|
1336
|
+
updated_at?: string;
|
|
1337
|
+
/** Cursor to pass as `cursor` for the next page. */
|
|
1338
|
+
cursor?: string;
|
|
1339
|
+
}
|
|
1340
|
+
interface ListOwnResponse {
|
|
1341
|
+
playbooks: OwnedPlaybookItem[];
|
|
1342
|
+
has_next: boolean;
|
|
1343
|
+
}
|
|
1291
1344
|
declare class PlaybooksResource {
|
|
1292
1345
|
private client;
|
|
1293
1346
|
constructor(client: AlvaClient);
|
|
@@ -1310,6 +1363,16 @@ declare class PlaybooksResource {
|
|
|
1310
1363
|
* playbooks are listed.
|
|
1311
1364
|
*/
|
|
1312
1365
|
listByOwner(params: ListByOwnerParams): Promise<ListByOwnerResponse>;
|
|
1366
|
+
/**
|
|
1367
|
+
* List the authenticated user's OWN playbooks via GET /api/v1/playbook —
|
|
1368
|
+
* the owner-scoped surface that INCLUDES drafts. Unlike `listByOwner` (the
|
|
1369
|
+
* public discovery view, which requires at least one release and therefore
|
|
1370
|
+
* hides drafts), this shows work-in-progress playbooks you created but
|
|
1371
|
+
* never released. Requires an API key: the owner is derived from auth, not
|
|
1372
|
+
* a username argument. Optional `filter` narrows to draft | running |
|
|
1373
|
+
* paused.
|
|
1374
|
+
*/
|
|
1375
|
+
listOwn(params?: ListOwnParams): Promise<ListOwnResponse>;
|
|
1313
1376
|
/**
|
|
1314
1377
|
* Get one playbook by numeric id or by "owner/name" ref. Returns null when
|
|
1315
1378
|
* not found / not visible / deleted.
|
|
@@ -1369,30 +1432,36 @@ declare class SdkDocsResource {
|
|
|
1369
1432
|
}): Promise<PartitionSummaryResponse>;
|
|
1370
1433
|
}
|
|
1371
1434
|
|
|
1435
|
+
/** @deprecated Arrays no longer uses endpoint subscription tiers. */
|
|
1372
1436
|
type SkillEndpointTier = 'public' | 'alternative' | 'unstructured';
|
|
1373
1437
|
interface SkillEndpointMetadata {
|
|
1374
1438
|
skill: string;
|
|
1375
1439
|
file: string;
|
|
1376
1440
|
method: string;
|
|
1377
1441
|
path: string;
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1442
|
+
/** @deprecated Arrays no longer uses endpoint subscription tiers. */
|
|
1443
|
+
tier?: SkillEndpointTier;
|
|
1444
|
+
/** @deprecated Arrays no longer uses endpoint subscription tiers. */
|
|
1445
|
+
required_subscription_tier?: 'free' | 'pro';
|
|
1446
|
+
/** @deprecated Arrays no longer uses endpoint subscription tiers. */
|
|
1447
|
+
access?: 'free_and_pro' | 'pro_only';
|
|
1448
|
+
/** @deprecated Arrays no longer uses endpoint subscription tiers. */
|
|
1449
|
+
pro_required?: boolean;
|
|
1382
1450
|
}
|
|
1383
1451
|
|
|
1384
|
-
type SkillTierCounts = Partial<Record<SkillEndpointTier, number>>;
|
|
1385
|
-
|
|
1386
1452
|
interface SkillMetadata {
|
|
1387
1453
|
endpoint_count: number;
|
|
1388
|
-
|
|
1389
|
-
|
|
1454
|
+
/** @deprecated Data-skills no longer adds local endpoint tier metadata. */
|
|
1455
|
+
endpoint_tier_counts?: Partial<Record<SkillEndpointTier, number>>;
|
|
1456
|
+
/** @deprecated Data-skills no longer adds local endpoint tier metadata. */
|
|
1457
|
+
pro_count?: number;
|
|
1390
1458
|
}
|
|
1391
1459
|
interface SkillSummary {
|
|
1392
1460
|
name: string;
|
|
1393
1461
|
description: string;
|
|
1394
1462
|
metadata?: SkillMetadata;
|
|
1395
|
-
|
|
1463
|
+
/** @deprecated Data-skills no longer adds this local metadata. */
|
|
1464
|
+
endpoint_tier_counts?: Partial<Record<SkillEndpointTier, number>>;
|
|
1396
1465
|
}
|
|
1397
1466
|
interface SkillDoc {
|
|
1398
1467
|
name: string;
|
|
@@ -1400,7 +1469,8 @@ interface SkillDoc {
|
|
|
1400
1469
|
content: string;
|
|
1401
1470
|
metadata?: SkillMetadata | SkillEndpointMetadata;
|
|
1402
1471
|
endpoint_metadata?: SkillEndpointMetadata[];
|
|
1403
|
-
|
|
1472
|
+
/** @deprecated Data-skills no longer adds this local metadata. */
|
|
1473
|
+
endpoint_tier_counts?: Partial<Record<SkillEndpointTier, number>>;
|
|
1404
1474
|
}
|
|
1405
1475
|
declare class DataSkillsResource {
|
|
1406
1476
|
private client;
|
|
@@ -1903,6 +1973,36 @@ declare const BOOLEAN_FLAGS: Set<string>;
|
|
|
1903
1973
|
* Compares major.minor.patch as integers. Returns false on malformed input.
|
|
1904
1974
|
*/
|
|
1905
1975
|
declare function isVersionOlderThan(a: string, b: string): boolean;
|
|
1976
|
+
type AlvaCliRuntimeMode = 'nodejs' | 'jagent';
|
|
1977
|
+
interface DispatchLocalFiles {
|
|
1978
|
+
readText(path: string): string;
|
|
1979
|
+
readBytes(path: string): BodyInit;
|
|
1980
|
+
writeBytes(path: string, data: Uint8Array): void;
|
|
1981
|
+
}
|
|
1982
|
+
interface DispatchRuntimeDeps {
|
|
1983
|
+
mode?: AlvaCliRuntimeMode;
|
|
1984
|
+
env?: Record<string, string | undefined>;
|
|
1985
|
+
stderr?: {
|
|
1986
|
+
write(value: string): unknown;
|
|
1987
|
+
};
|
|
1988
|
+
localFiles?: DispatchLocalFiles;
|
|
1989
|
+
readStdin?: () => Promise<string>;
|
|
1990
|
+
randomUUID?: () => string;
|
|
1991
|
+
configureFetchTimeout?: (timeoutMs: number) => void;
|
|
1992
|
+
writeBrokerResult?: (envelope: unknown, exitCode: number) => Promise<void>;
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* @deprecated Use `dispatch()` for validated command execution. This permissive
|
|
1996
|
+
* parser remains available only to preserve the existing `./cli` export.
|
|
1997
|
+
*/
|
|
1998
|
+
declare function parseFlags(argv: string[]): Record<string, string>;
|
|
1999
|
+
/**
|
|
2000
|
+
* Strips global flags (--api-key, --base-url, --profile, --arrays-endpoint)
|
|
2001
|
+
* and their associated values from an argv list. Supports both
|
|
2002
|
+
* `--flag value` and `--flag=value` forms.
|
|
2003
|
+
*/
|
|
2004
|
+
declare function stripGlobalFlags(argv: string[]): string[];
|
|
2005
|
+
|
|
1906
2006
|
interface WriteConfigDeps {
|
|
1907
2007
|
env: Record<string, string | undefined>;
|
|
1908
2008
|
homedir: () => string;
|
|
@@ -1915,33 +2015,16 @@ interface WriteConfigDeps {
|
|
|
1915
2015
|
readFile: (path: string) => Promise<string>;
|
|
1916
2016
|
runHooks?: (client: AlvaClient) => Promise<void>;
|
|
1917
2017
|
}
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
}
|
|
2018
|
+
declare function dispatch(client: AlvaClient, args: string[], meta?: {
|
|
2019
|
+
profile?: string;
|
|
2020
|
+
baseUrl?: string;
|
|
2021
|
+
cliVersion?: string;
|
|
2022
|
+
}, deps?: DispatchRuntimeDeps): Promise<unknown>;
|
|
1924
2023
|
declare function handleConfigure(args: string[], deps?: WriteConfigDeps): Promise<{
|
|
1925
2024
|
status: string;
|
|
1926
2025
|
apiKey: string;
|
|
1927
2026
|
baseUrl?: string;
|
|
1928
2027
|
profile: string;
|
|
1929
2028
|
}>;
|
|
1930
|
-
/**
|
|
1931
|
-
* @deprecated Use `dispatch()` for validated command execution. This permissive
|
|
1932
|
-
* parser remains available only to preserve the existing `./cli` export.
|
|
1933
|
-
*/
|
|
1934
|
-
declare function parseFlags(argv: string[]): Record<string, string>;
|
|
1935
|
-
declare function dispatch(client: AlvaClient, args: string[], meta?: {
|
|
1936
|
-
profile?: string;
|
|
1937
|
-
baseUrl?: string;
|
|
1938
|
-
cliVersion?: string;
|
|
1939
|
-
}, deps?: DispatchRuntimeDeps): Promise<unknown>;
|
|
1940
|
-
/**
|
|
1941
|
-
* Strips global flags (--api-key, --base-url, --profile, --arrays-endpoint)
|
|
1942
|
-
* and their associated values from an argv list. Supports both
|
|
1943
|
-
* `--flag value` and `--flag=value` forms.
|
|
1944
|
-
*/
|
|
1945
|
-
declare function stripGlobalFlags(argv: string[]): string[];
|
|
1946
2029
|
|
|
1947
|
-
export { type AlvaCliRuntimeMode, BOOLEAN_FLAGS, CLI_VERSION, CliUsageError, DEFAULT_RUN_TIMEOUT_MS, type DispatchRuntimeDeps, dispatch, handleConfigure, isVersionOlderThan, parseFlags, stripGlobalFlags };
|
|
2030
|
+
export { type AlvaCliRuntimeMode, BOOLEAN_FLAGS, CLI_VERSION, CliUsageError, DEFAULT_RUN_TIMEOUT_MS, type DispatchLocalFiles, type DispatchRuntimeDeps, dispatch, handleConfigure, isVersionOlderThan, parseFlags, stripGlobalFlags };
|