@vapi-network/cli 0.7.0 → 0.8.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/agent.d.ts +23 -2
- package/dist/cli.d.ts +25 -2
- package/dist/cli.js +18032 -7298
- package/dist/cli.js.map +3 -3
- package/dist/cloud-backup.d.ts +7 -0
- package/dist/headless.d.ts +37 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18031 -7297
- package/dist/index.js.map +3 -3
- package/dist/runtime-local.d.ts +40 -0
- package/dist/runtime-railway.d.ts +198 -0
- package/dist/swarm.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/cloud-backup.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { type UploadBackupResult } from "@vapi-network/core/cloud-backup";
|
|
1
2
|
import { type CliDependencies, type CliIo } from "./cli.js";
|
|
2
3
|
type EnrollResult = {
|
|
3
4
|
status: "uploaded";
|
|
4
5
|
device: string;
|
|
5
6
|
bytes: number;
|
|
6
7
|
uploadedAt: string;
|
|
8
|
+
omitted?: NonNullable<Extract<UploadBackupResult, {
|
|
9
|
+
status: "uploaded";
|
|
10
|
+
}>["omitted"]>;
|
|
11
|
+
skipped?: NonNullable<Extract<UploadBackupResult, {
|
|
12
|
+
status: "uploaded";
|
|
13
|
+
}>["skipped"]>;
|
|
7
14
|
} | {
|
|
8
15
|
status: "skipped";
|
|
9
16
|
device: string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type SecretStore } from "@vapi-network/core";
|
|
2
|
+
import { type MemberBundle } from "@vapi-network/core/secrets";
|
|
3
|
+
import { type CliDependencies, type CliIo } from "./cli.js";
|
|
4
|
+
export type HeadlessHome = {
|
|
5
|
+
home: string;
|
|
6
|
+
secrets: SecretStore;
|
|
7
|
+
cleanup(): Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export type HeadlessHomeOptions = {
|
|
10
|
+
/** Parent directory of the ephemeral home. Defaults to `os.tmpdir()`. */
|
|
11
|
+
tmpdir?: string;
|
|
12
|
+
/** Randomness for the throwaway device vault key. */
|
|
13
|
+
randomBytes?: (size: number) => Uint8Array;
|
|
14
|
+
/** Injected clock for the wallet registry and vault records. */
|
|
15
|
+
now?: () => Date;
|
|
16
|
+
/** Called with the home path as soon as it exists, before any secret is written into it. */
|
|
17
|
+
onCreated?: (home: string) => void;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Builds an ephemeral VAPI_HOME for one member bundle: an imported-key vault
|
|
21
|
+
* sealed with a random in-memory device key, `wallets.json` with the bundle's
|
|
22
|
+
* caps, ceiling and link as the default wallet, the member's link credentials
|
|
23
|
+
* in an in-memory secret store, the agent profile without delegate/allocate,
|
|
24
|
+
* and `config.json` on the public RPC defaults. The home is removed again if
|
|
25
|
+
* any step fails.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createHeadlessHome(bundle: MemberBundle, options?: HeadlessHomeOptions): Promise<HeadlessHome>;
|
|
28
|
+
/** Runs one member bundle headlessly and returns the process exit code. */
|
|
29
|
+
export declare function runHeadlessAgent(input: {
|
|
30
|
+
variable: string;
|
|
31
|
+
task: string;
|
|
32
|
+
budgetUsd?: string;
|
|
33
|
+
resultFile?: string;
|
|
34
|
+
json: boolean;
|
|
35
|
+
io: CliIo;
|
|
36
|
+
dependencies: CliDependencies;
|
|
37
|
+
}): Promise<number>;
|
package/dist/index.d.ts
CHANGED