@alva-ai/toolkit 0.24.0 → 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/README.md +19 -16
- package/dist/browser.global.js +6 -6
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.d.ts +13 -11
- package/dist/cli.js +53 -28
- package/dist/cli.js.map +1 -1
- package/dist/dispatch.d.ts +16 -34
- package/dist/dispatch.js +1401 -485
- package/dist/dispatch.js.map +1 -1
- package/dist/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/dispatch.d.ts
CHANGED
|
@@ -372,8 +372,8 @@ interface FeedReleaseResponse {
|
|
|
372
372
|
feed_path: string;
|
|
373
373
|
}
|
|
374
374
|
interface FeedDeleteRequest {
|
|
375
|
-
/**
|
|
376
|
-
id: number;
|
|
375
|
+
/** Positive decimal feed id. String form preserves int64 precision. */
|
|
376
|
+
id: number | string;
|
|
377
377
|
}
|
|
378
378
|
type FeedListStatus = 'active' | 'paused' | 'all';
|
|
379
379
|
interface FeedListParams {
|
|
@@ -400,14 +400,16 @@ interface FeedListResponse {
|
|
|
400
400
|
has_more: boolean;
|
|
401
401
|
}
|
|
402
402
|
interface AutomationInspectRequest {
|
|
403
|
-
/**
|
|
404
|
-
id: number;
|
|
403
|
+
/** Positive decimal automation id. String form preserves int64 precision. */
|
|
404
|
+
id: number | string;
|
|
405
405
|
}
|
|
406
406
|
interface AutomationInspectResponse {
|
|
407
407
|
/** Numeric automation id encoded as a string, matching the gateway response. */
|
|
408
408
|
id: string;
|
|
409
409
|
/** Backing feed id encoded as a string. */
|
|
410
410
|
feed_id: string;
|
|
411
|
+
/** Backing producer cronjob id used by lifecycle and run operations. */
|
|
412
|
+
cronjob_id?: number;
|
|
411
413
|
name: string;
|
|
412
414
|
description?: string;
|
|
413
415
|
/** Automation runtime status. */
|
|
@@ -486,8 +488,8 @@ interface AutomationAlertDeliveryUpdateResponse {
|
|
|
486
488
|
};
|
|
487
489
|
}
|
|
488
490
|
interface FeedStatusUpdateRequest {
|
|
489
|
-
/**
|
|
490
|
-
id: number;
|
|
491
|
+
/** Positive decimal feed id. String form preserves int64 precision. */
|
|
492
|
+
id: number | string;
|
|
491
493
|
}
|
|
492
494
|
interface FeedStatusUpdateResponse {
|
|
493
495
|
/** Echoed feed id (string form, matching gateway response). */
|
|
@@ -502,8 +504,8 @@ interface FeedDeleteResponse {
|
|
|
502
504
|
/** Feed visibility: 'public' publishes the feed, 'private' unpublishes it. */
|
|
503
505
|
type FeedVisibility = 'public' | 'private';
|
|
504
506
|
interface FeedSetVisibilityRequest {
|
|
505
|
-
/**
|
|
506
|
-
id: number;
|
|
507
|
+
/** Positive decimal feed id. String form preserves int64 precision. */
|
|
508
|
+
id: number | string;
|
|
507
509
|
/** Target visibility. */
|
|
508
510
|
visibility: FeedVisibility;
|
|
509
511
|
}
|
|
@@ -2146,26 +2148,14 @@ declare class CliUsageError extends Error {
|
|
|
2146
2148
|
|
|
2147
2149
|
declare const CLI_VERSION: string;
|
|
2148
2150
|
declare const DEFAULT_RUN_TIMEOUT_MS = 600000;
|
|
2149
|
-
|
|
2150
|
-
* @deprecated Internal command handling uses the strict declarative parser.
|
|
2151
|
-
* Retained for compatibility with existing `@alva-ai/toolkit/cli` consumers.
|
|
2152
|
-
*/
|
|
2153
|
-
declare const BOOLEAN_FLAGS: Set<string>;
|
|
2154
|
-
/**
|
|
2155
|
-
* Returns true if version `a` is strictly older than version `b`.
|
|
2156
|
-
* Compares major.minor.patch as integers. Returns false on malformed input.
|
|
2157
|
-
*/
|
|
2158
|
-
declare function isVersionOlderThan(a: string, b: string): boolean;
|
|
2159
|
-
declare const HELP_TEXT = "Usage: alva <command> [options]\n\nCommands:\n configure Save API key and endpoint to a named profile\n whoami Verify credentials and show current identity\n user User profile operations (me)\n fs Filesystem operations (read, write, stat, readdir, mkdir, remove, rename, copy, symlink, readlink, chmod, grant, revoke)\n run Execute code in the Alva runtime\n deploy Cronjob management (create, list, get, update, delete, pause, resume, runs, run-logs)\n loop Self-scheduled in-channel goal loops (create)\n service-account Restricted run-as identities (create, list, delete, grant, revoke)\n release Feed and playbook releases (feed, playbook-draft, playbook)\n lint Design-system lint (playbook)\n automation Automation management (list, inspect, publish, update, delivery, stop, resume, delete)\n alert Alert management (list, follows, enable, disable, history, preferences, enable-session-completed, disable-session-completed)\n feed Legacy automation alias (list, stop, resume, delete, set-visibility)\n playbooks Playbook discovery (trending, get, list) and visibility\n functions Playbook UDF function management (register, list, delete, invoke, allowance)\n credits Credit wallet and self-scoped usage history (wallet, items)\n secrets Secret management (create, list, get, update, delete)\n sdk SDK documentation (doc, partitions, partition-summary)\n skillhub Playbook skills (list, tags, get, file)\n data-skills Data-skill documentation from the Arrays backend (list, summary, endpoint)\n comments Playbook comments (create, pin, unpin)\n notification-history Feed notification delivery history (list-feed)\n notification-preferences Notification preferences (list, enable-session-completed, disable-session-completed)\n feedback Submit user-confirmed Alva platform feedback (submit)\n subscriptions Playbook follows and feed alert subscriptions\n remix Save playbook remix lineage\n portfolio Connected-account portfolio (accounts, summary, activities)\n markets Company narrative and earnings context (narrative, earnings)\n trading Trading operations (accounts, portfolio, orders, subscriptions, equity-history, risk-rules, subscribe, unsubscribe, execute, update-risk-rules)\n broker Agentic order execution \u2014 venue-native passthrough to trex (accounts, quote, order, balance, positions, ...; run 'alva broker describe')\n auth Authentication (login)\n screenshot Capture a web screenshot as PNG\n arrays Arrays backend operations (token ensure, token status)\n\nGlobal options:\n --api-key <key> API key (overrides env and config file)\n --base-url <url> API base URL (overrides env and config file)\n --profile <name> Named profile to use (default: \"default\")\n --arrays-endpoint <url> Arrays backend URL (or ARRAYS_ENDPOINT env; default: https://data-tools.prd.space.id)\n -v, --version Show CLI version\n --help Show help (use 'alva <command> --help' for command details)\n\nConfig resolution: --api-key flag > ALVA_API_KEY env > profile in ~/.config/alva/config.json\nProfile resolution: --profile flag > ALVA_PROFILE env > \"default\"\n\nQuick start:\n npm install -g @alva-ai/toolkit\n alva configure --api-key alva_your_key_here\n alva whoami";
|
|
2160
|
-
declare const COMMAND_HELP: Record<string, string>;
|
|
2161
|
-
type AlvaCliRuntimeMode = 'nodejs' | 'jagent';
|
|
2151
|
+
type DispatchRuntime = 'nodejs' | 'jagent';
|
|
2162
2152
|
interface DispatchLocalFiles {
|
|
2163
2153
|
readText(path: string): string;
|
|
2164
2154
|
readBytes(path: string): BodyInit;
|
|
2165
2155
|
writeBytes(path: string, data: Uint8Array): void;
|
|
2166
2156
|
}
|
|
2167
2157
|
interface DispatchRuntimeDeps {
|
|
2168
|
-
|
|
2158
|
+
runtime?: DispatchRuntime;
|
|
2169
2159
|
env?: Record<string, string | undefined>;
|
|
2170
2160
|
stderr?: {
|
|
2171
2161
|
write(value: string): unknown;
|
|
@@ -2176,21 +2166,13 @@ interface DispatchRuntimeDeps {
|
|
|
2176
2166
|
configureFetchTimeout?: (timeoutMs: number) => void;
|
|
2177
2167
|
writeBrokerResult?: (envelope: unknown, exitCode: number) => Promise<void>;
|
|
2178
2168
|
}
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
*/
|
|
2183
|
-
declare function parseFlags(argv: string[]): Record<string, string>;
|
|
2169
|
+
|
|
2170
|
+
/** Stable leaf inventory for Alpi Alva safety smokes and tooling. */
|
|
2171
|
+
declare const ALPI_ALVA_COMMAND_PATHS: readonly string[];
|
|
2184
2172
|
declare function dispatch(client: AlvaClient, args: string[], meta?: {
|
|
2185
2173
|
profile?: string;
|
|
2186
2174
|
baseUrl?: string;
|
|
2187
2175
|
cliVersion?: string;
|
|
2188
2176
|
}, deps?: DispatchRuntimeDeps): Promise<unknown>;
|
|
2189
|
-
/**
|
|
2190
|
-
* Strips global flags (--api-key, --base-url, --profile, --arrays-endpoint)
|
|
2191
|
-
* and their associated values from an argv list. Supports both
|
|
2192
|
-
* `--flag value` and `--flag=value` forms.
|
|
2193
|
-
*/
|
|
2194
|
-
declare function stripGlobalFlags(argv: string[]): string[];
|
|
2195
2177
|
|
|
2196
|
-
export {
|
|
2178
|
+
export { ALPI_ALVA_COMMAND_PATHS, CLI_VERSION, CliUsageError, DEFAULT_RUN_TIMEOUT_MS, type DispatchLocalFiles, type DispatchRuntime, type DispatchRuntimeDeps, dispatch };
|