@vapi-network/cli 0.2.1 → 0.2.3
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/brand.d.ts +55 -36
- package/dist/cli.d.ts +1 -6
- package/dist/cli.js +316 -153
- package/dist/cli.js.map +2 -2
- package/dist/index.js +316 -153
- package/dist/index.js.map +2 -2
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/brand.d.ts
CHANGED
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
/** Terminal cells are about twice as tall as wide; 21x9 keeps the 743x659 aspect. */
|
|
2
|
+
export declare const MARK_COLUMNS = 21;
|
|
3
|
+
export declare const MARK_ROWS = 9;
|
|
2
4
|
export declare const WORDMARK = "vAPI Network";
|
|
3
5
|
export declare const WELCOME = "Welcome to the vAPI Network";
|
|
4
|
-
export declare const TAGLINE: readonly ["The trusted network where agents and humans do business.", "Search APIs, pay per call, keep receipts. More coming soon."];
|
|
5
|
-
/** Design-token colours; `ink` renders in the terminal's foreground
|
|
6
|
+
export declare const TAGLINE: readonly ["The trusted network where agents", "and humans do business.", "", "Search APIs, pay per call, keep", "receipts. More coming soon."];
|
|
7
|
+
/** Design-token colours; `ink` renders in the terminal's own foreground colour. */
|
|
6
8
|
export declare const MARK_PALETTE: {
|
|
7
|
-
readonly orange:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
|
|
9
|
+
readonly orange: {
|
|
10
|
+
readonly hex: "#ff7300";
|
|
11
|
+
readonly ansi16: 33;
|
|
12
|
+
};
|
|
13
|
+
readonly pink: {
|
|
14
|
+
readonly hex: "#ff337c";
|
|
15
|
+
readonly ansi16: 95;
|
|
16
|
+
};
|
|
17
|
+
readonly lime: {
|
|
18
|
+
readonly hex: "#c3ff3d";
|
|
19
|
+
readonly ansi16: 92;
|
|
20
|
+
};
|
|
21
|
+
readonly cyan: {
|
|
22
|
+
readonly hex: "#97efff";
|
|
23
|
+
readonly ansi16: 96;
|
|
24
|
+
};
|
|
25
|
+
readonly blue: {
|
|
26
|
+
readonly hex: "#0041eb";
|
|
27
|
+
readonly ansi16: 34;
|
|
28
|
+
};
|
|
29
|
+
readonly purple: {
|
|
30
|
+
readonly hex: "#8a37fb";
|
|
31
|
+
readonly ansi16: 35;
|
|
32
|
+
};
|
|
13
33
|
readonly ink: null;
|
|
14
34
|
};
|
|
15
35
|
export type MarkColorName = keyof typeof MARK_PALETTE;
|
|
@@ -18,38 +38,37 @@ export type MarkBlock = {
|
|
|
18
38
|
x: number;
|
|
19
39
|
width: number;
|
|
20
40
|
color: MarkColorName;
|
|
21
|
-
/** Reveal step; blocks that share a delay appear in the same frame. */
|
|
22
|
-
delay: number;
|
|
23
41
|
};
|
|
24
42
|
export declare const MARK_BLOCKS: readonly MarkBlock[];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
export type BannerOptions = MarkRenderOptions & {
|
|
30
|
-
version: string;
|
|
31
|
-
};
|
|
32
|
-
export type AnimateBannerOptions = BannerOptions & {
|
|
33
|
-
write(chunk: string): void;
|
|
34
|
-
stepMs?: number;
|
|
35
|
-
sleep?(milliseconds: number): Promise<void>;
|
|
36
|
-
};
|
|
37
|
-
export type AnimationEnvironment = {
|
|
43
|
+
/** 0 = no colour, 1 = 16 colours, 2 = 256 colours, 3 = truecolour (the supports-color scale). */
|
|
44
|
+
export type ColorLevel = 0 | 1 | 2 | 3;
|
|
45
|
+
export type TerminalEnvironment = {
|
|
38
46
|
isTty?: boolean;
|
|
39
|
-
json?: boolean;
|
|
40
47
|
env?: NodeJS.ProcessEnv;
|
|
41
48
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
|
|
49
|
+
export type BannerOptions = {
|
|
50
|
+
version: string;
|
|
51
|
+
/** Defaults to 0 so output stays pipe-safe. */
|
|
52
|
+
colorLevel?: ColorLevel;
|
|
53
|
+
/** Terminal width; below the framed width the banner falls back to plain text. */
|
|
54
|
+
columns?: number;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Colour capability the way chalk's supports-color decides it: NO_COLOR and
|
|
58
|
+
* a redirected stdout disable colour, FORCE_COLOR overrides, and otherwise
|
|
59
|
+
* the terminal's own advertisement (COLORTERM, TERM, TERM_PROGRAM) picks
|
|
60
|
+
* the level. Apple Terminal advertises 256 colours, not truecolour.
|
|
61
|
+
*/
|
|
62
|
+
export declare function detectColorLevel(environment?: TerminalEnvironment): ColorLevel;
|
|
63
|
+
/** The complete mark: `MARK_ROWS` lines of exactly `MARK_COLUMNS` visible cells. */
|
|
64
|
+
export declare function renderMark(colorLevel?: ColorLevel): string;
|
|
65
|
+
/** Width in columns of the framed banner. */
|
|
66
|
+
export declare function bannerWidth(): number;
|
|
46
67
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
68
|
+
* The welcome banner: the mark on the left, the welcome text on the right,
|
|
69
|
+
* inside a rounded frame. When the terminal is narrower than the frame, the
|
|
70
|
+
* text alone is printed so nothing wraps.
|
|
50
71
|
*/
|
|
51
|
-
export declare function renderMarkFrames(options?: MarkRenderOptions): string[];
|
|
52
|
-
/** The framed welcome banner: the mark on the left, the welcome text on the right. */
|
|
53
72
|
export declare function renderBanner(options: BannerOptions): string;
|
|
54
|
-
/**
|
|
55
|
-
export declare function
|
|
73
|
+
/** Nearest xterm 256-colour index, the same cube mapping chalk's ansi-styles uses. */
|
|
74
|
+
export declare function rgbToAnsi256(red: number, green: number, blue: number): number;
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--networks <base,solana>] [--json]\n vapi fund [--amount <usd>] [--json]\n vapi accounts [--enable solana] [--json]\n vapi search [query] [--kind <kind>] [--network <caip2>] [--limit <n>] [--cursor <cursor>] [--json]\n vapi inspect <id> [--endpoint <name>] [--json]\n vapi pay <id-or-url> [--method <method>] [--endpoint <name>] [--body <json>] [--content-type <type>] [--network <caip2>] [--expected-pay-to <address>] [--max <amount>] [--json]\n vapi balance [--json]\n vapi receipts [--limit <n>] [--json]\n vapi receipts export --format <json|csv> [--range <24h|7d|30d>]\n vapi stats [--range <24h|7d|30d>] [--json]\n vapi sweep <address> [--network <caip2>] [--json]\n vapi report \"<what happened>\" [--include-addresses] [--send] [--json]\n vapi mcp [--json]\n vapi serve [--json]\n vapi version [--json]\n vapi publish [--json]\n\nWith no command, vapi shows this help. The MCP server starts only with `vapi mcp`.";
|
|
1
|
+
export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--networks <base,solana>] [--json]\n vapi fund [--amount <usd>] [--json]\n vapi accounts [--enable solana] [--json]\n vapi search [query] [--kind <kind>] [--network <caip2>] [--limit <n>] [--cursor <cursor>] [--json]\n vapi inspect <id> [--endpoint <name>] [--json]\n vapi pay <id-or-url> [--method <method>] [--endpoint <name>] [--body <json>] [--content-type <type>] [--network <caip2>] [--expected-pay-to <address>] [--max <amount>] [--json]\n vapi balance [--json]\n vapi receipts [--limit <n>] [--json]\n vapi receipts export --format <json|csv> [--range <24h|7d|30d>]\n vapi stats [--range <24h|7d|30d>] [--json]\n vapi sweep <address> [--network <caip2>] [--json]\n vapi export-key [--network <caip2>] [--json]\n vapi report \"<what happened>\" [--include-addresses] [--send] [--json]\n vapi mcp [--json]\n vapi serve [--json]\n vapi version [--json]\n vapi publish [--json]\n\nWith no command, vapi shows this help. The MCP server starts only with `vapi mcp`.";
|
|
2
2
|
export type CliIo = {
|
|
3
3
|
stdout(message: string): void;
|
|
4
4
|
stderr(message: string): void;
|
|
5
|
-
/**
|
|
6
|
-
* Raw stdout sink for cursor control. Only an interactive terminal supplies
|
|
7
|
-
* one; without it every banner falls back to a single static frame.
|
|
8
|
-
*/
|
|
9
|
-
write?(chunk: string): void;
|
|
10
5
|
};
|
|
11
6
|
export type CliDependencies = {
|
|
12
7
|
fetchImpl?: typeof fetch;
|