@alva-ai/toolkit 0.20.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/README.md +7 -3
- package/dist/browser.global.js +3 -3
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.d.ts +36 -23
- package/dist/cli.js +5149 -5266
- package/dist/cli.js.map +1 -1
- package/dist/dispatch.d.ts +1943 -0
- package/dist/dispatch.js +13642 -0
- package/dist/dispatch.js.map +1 -0
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/cli.d.ts
CHANGED
|
@@ -1903,6 +1903,36 @@ declare const BOOLEAN_FLAGS: Set<string>;
|
|
|
1903
1903
|
* Compares major.minor.patch as integers. Returns false on malformed input.
|
|
1904
1904
|
*/
|
|
1905
1905
|
declare function isVersionOlderThan(a: string, b: string): boolean;
|
|
1906
|
+
type AlvaCliRuntimeMode = 'nodejs' | 'jagent';
|
|
1907
|
+
interface DispatchLocalFiles {
|
|
1908
|
+
readText(path: string): string;
|
|
1909
|
+
readBytes(path: string): BodyInit;
|
|
1910
|
+
writeBytes(path: string, data: Uint8Array): void;
|
|
1911
|
+
}
|
|
1912
|
+
interface DispatchRuntimeDeps {
|
|
1913
|
+
mode?: AlvaCliRuntimeMode;
|
|
1914
|
+
env?: Record<string, string | undefined>;
|
|
1915
|
+
stderr?: {
|
|
1916
|
+
write(value: string): unknown;
|
|
1917
|
+
};
|
|
1918
|
+
localFiles?: DispatchLocalFiles;
|
|
1919
|
+
readStdin?: () => Promise<string>;
|
|
1920
|
+
randomUUID?: () => string;
|
|
1921
|
+
configureFetchTimeout?: (timeoutMs: number) => void;
|
|
1922
|
+
writeBrokerResult?: (envelope: unknown, exitCode: number) => Promise<void>;
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* @deprecated Use `dispatch()` for validated command execution. This permissive
|
|
1926
|
+
* parser remains available only to preserve the existing `./cli` export.
|
|
1927
|
+
*/
|
|
1928
|
+
declare function parseFlags(argv: string[]): Record<string, string>;
|
|
1929
|
+
/**
|
|
1930
|
+
* Strips global flags (--api-key, --base-url, --profile, --arrays-endpoint)
|
|
1931
|
+
* and their associated values from an argv list. Supports both
|
|
1932
|
+
* `--flag value` and `--flag=value` forms.
|
|
1933
|
+
*/
|
|
1934
|
+
declare function stripGlobalFlags(argv: string[]): string[];
|
|
1935
|
+
|
|
1906
1936
|
interface WriteConfigDeps {
|
|
1907
1937
|
env: Record<string, string | undefined>;
|
|
1908
1938
|
homedir: () => string;
|
|
@@ -1915,33 +1945,16 @@ interface WriteConfigDeps {
|
|
|
1915
1945
|
readFile: (path: string) => Promise<string>;
|
|
1916
1946
|
runHooks?: (client: AlvaClient) => Promise<void>;
|
|
1917
1947
|
}
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
}
|
|
1948
|
+
declare function dispatch(client: AlvaClient, args: string[], meta?: {
|
|
1949
|
+
profile?: string;
|
|
1950
|
+
baseUrl?: string;
|
|
1951
|
+
cliVersion?: string;
|
|
1952
|
+
}, deps?: DispatchRuntimeDeps): Promise<unknown>;
|
|
1924
1953
|
declare function handleConfigure(args: string[], deps?: WriteConfigDeps): Promise<{
|
|
1925
1954
|
status: string;
|
|
1926
1955
|
apiKey: string;
|
|
1927
1956
|
baseUrl?: string;
|
|
1928
1957
|
profile: string;
|
|
1929
1958
|
}>;
|
|
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
1959
|
|
|
1947
|
-
export { type AlvaCliRuntimeMode, BOOLEAN_FLAGS, CLI_VERSION, CliUsageError, DEFAULT_RUN_TIMEOUT_MS, type DispatchRuntimeDeps, dispatch, handleConfigure, isVersionOlderThan, parseFlags, stripGlobalFlags };
|
|
1960
|
+
export { type AlvaCliRuntimeMode, BOOLEAN_FLAGS, CLI_VERSION, CliUsageError, DEFAULT_RUN_TIMEOUT_MS, type DispatchLocalFiles, type DispatchRuntimeDeps, dispatch, handleConfigure, isVersionOlderThan, parseFlags, stripGlobalFlags };
|