@vapi-network/cli 0.2.0-dev.2 → 0.2.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.
@@ -0,0 +1,52 @@
1
+ export declare const MARK_STEP_MS = 70;
2
+ export declare const WORDMARK = "vAPI Network";
3
+ /** `ink` renders in the terminal's default foreground, like the black mark on paper. */
4
+ export declare const MARK_PALETTE: {
5
+ readonly orange: "#FF6A1A";
6
+ readonly pink: "#FF3D8B";
7
+ readonly lime: "#B8F32D";
8
+ readonly cyan: "#22D3EE";
9
+ readonly blue: "#0052FF";
10
+ readonly purple: "#8B5CF6";
11
+ readonly ink: null;
12
+ };
13
+ export type MarkColorName = keyof typeof MARK_PALETTE;
14
+ export type MarkBlock = {
15
+ row: number;
16
+ x: number;
17
+ width: number;
18
+ color: MarkColorName;
19
+ /** Reveal step; blocks that share a delay appear in the same frame. */
20
+ delay: number;
21
+ };
22
+ export declare const MARK_BLOCKS: readonly MarkBlock[];
23
+ export type MarkRenderOptions = {
24
+ /** Emit 24-bit ANSI colour. Defaults to false so output stays pipe-safe. */
25
+ color?: boolean;
26
+ };
27
+ export type BannerOptions = MarkRenderOptions & {
28
+ version: string;
29
+ };
30
+ export type AnimateBannerOptions = BannerOptions & {
31
+ write(chunk: string): void;
32
+ stepMs?: number;
33
+ sleep?(milliseconds: number): Promise<void>;
34
+ };
35
+ export type AnimationEnvironment = {
36
+ isTty?: boolean;
37
+ json?: boolean;
38
+ env?: NodeJS.ProcessEnv;
39
+ };
40
+ /** Colour is off whenever `NO_COLOR` is set or stdout is not a terminal. */
41
+ export declare function markColorEnabled(environment?: AnimationEnvironment): boolean;
42
+ /** Animate only in an interactive, colour-capable, human-facing terminal. */
43
+ export declare function shouldAnimateMark(environment?: AnimationEnvironment): boolean;
44
+ /**
45
+ * Every reveal step of the mark, oldest first. Pure: the last frame is the
46
+ * complete mark and each frame is exactly `MARK_ROWS` lines.
47
+ */
48
+ export declare function renderMarkFrames(options?: MarkRenderOptions): string[];
49
+ /** The complete mark with the wordmark and version beneath it. */
50
+ export declare function renderBanner(options: BannerOptions): string;
51
+ /** Reveal the mark in place, then print the wordmark and version. */
52
+ export declare function animateBanner(options: AnimateBannerOptions): Promise<void>;
package/dist/cli.d.ts CHANGED
@@ -1,7 +1,15 @@
1
- export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--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 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 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
+ };
11
+ export type CliDependencies = {
12
+ fetchImpl?: typeof fetch;
5
13
  };
6
14
  /** Run one CLI invocation and return its process exit code. */
7
- export declare function runCli(argv?: string[], io?: CliIo): Promise<number>;
15
+ export declare function runCli(argv?: string[], io?: CliIo, dependencies?: CliDependencies): Promise<number>;