@vibeframe/cli 0.115.9 → 0.116.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/commands/_shared/build-video-providers.d.ts +9 -2
- package/dist/commands/_shared/image-cost.d.ts +5 -4
- package/dist/commands/_shared/storyboard-draft.d.ts +14 -0
- package/dist/commands/_shared/storyboard-parse.d.ts +1 -1
- package/dist/commands/_shared/storyboard-revise.d.ts +8 -3
- package/dist/commands/_shared/video-jobs.d.ts +0 -2
- package/dist/commands/ai-video.d.ts +2 -6
- package/dist/commands/generate/thumbnail.d.ts +2 -3
- package/dist/commands/generate/video-extend.d.ts +1 -1
- package/dist/commands/generate/video.d.ts +2 -2
- package/dist/commands/generate.d.ts +2 -2
- package/dist/config/index.d.ts +2 -7
- package/dist/config/schema.d.ts +2 -17
- package/dist/index.d.ts +1 -4
- package/dist/index.js +30772 -44024
- package/dist/tools/adapters/mcp.d.ts +1 -1
- package/dist/tools/adapters/mcp.js +2 -6
- package/dist/tools/define-tool.d.ts +8 -26
- package/dist/tools/define-tool.js +0 -14
- package/dist/tools/manifest/edit.d.ts +4 -4
- package/dist/tools/manifest/generate.d.ts +8 -14
- package/dist/tools/manifest/handlers.test.d.ts +7 -0
- package/dist/tools/manifest/index.d.ts +2 -3
- package/dist/tools/manifest/index.js +6760 -10081
- package/dist/tools/manifest/scene.d.ts +7 -7
- package/dist/tools/manifest/storyboard.d.ts +7 -7
- package/dist/tools/manifest.test.d.ts +1 -3
- package/dist/utils/model-lifecycle.d.ts +0 -1
- package/package.json +4 -12
- package/dist/agent/adapters/claude.d.ts +0 -14
- package/dist/agent/adapters/evolink.d.ts +0 -15
- package/dist/agent/adapters/evolink.test.d.ts +0 -4
- package/dist/agent/adapters/gemini.d.ts +0 -16
- package/dist/agent/adapters/index.d.ts +0 -30
- package/dist/agent/adapters/ollama.d.ts +0 -19
- package/dist/agent/adapters/openai.d.ts +0 -14
- package/dist/agent/adapters/openrouter.d.ts +0 -15
- package/dist/agent/adapters/openrouter.test.d.ts +0 -4
- package/dist/agent/adapters/provider-content.test.d.ts +0 -6
- package/dist/agent/adapters/xai.d.ts +0 -14
- package/dist/agent/index.d.ts +0 -109
- package/dist/agent/memory/index.d.ts +0 -69
- package/dist/agent/prompts/system.d.ts +0 -5
- package/dist/agent/tools/e2e.test.d.ts +0 -25
- package/dist/agent/tools/index.d.ts +0 -59
- package/dist/agent/tools/integration.test.d.ts +0 -10
- package/dist/agent/tools/scene.test.d.ts +0 -1
- package/dist/agent/types.d.ts +0 -80
- package/dist/commands/agent.d.ts +0 -30
- package/dist/tools/adapters/agent.d.ts +0 -9
- package/dist/tools/adapters/agent.js +0 -188
- package/dist/tools/manifest/agent-only.d.ts +0 -236
- /package/dist/{agent/index.test.d.ts → commands/_shared/image-jobs.test.d.ts} +0 -0
|
@@ -53,7 +53,7 @@ export declare const sceneAddTool: import("../define-tool.js").ToolDefinition<z.
|
|
|
53
53
|
headline?: string | undefined;
|
|
54
54
|
projectDir?: string | undefined;
|
|
55
55
|
force?: boolean | undefined;
|
|
56
|
-
imageProvider?: "
|
|
56
|
+
imageProvider?: "gemini" | "openai" | "grok" | undefined;
|
|
57
57
|
visuals?: string | undefined;
|
|
58
58
|
insertInto?: string | undefined;
|
|
59
59
|
syncStoryboard?: boolean | undefined;
|
|
@@ -69,7 +69,7 @@ export declare const sceneAddTool: import("../define-tool.js").ToolDefinition<z.
|
|
|
69
69
|
headline?: string | undefined;
|
|
70
70
|
projectDir?: string | undefined;
|
|
71
71
|
force?: boolean | undefined;
|
|
72
|
-
imageProvider?: "
|
|
72
|
+
imageProvider?: "gemini" | "openai" | "grok" | undefined;
|
|
73
73
|
visuals?: string | undefined;
|
|
74
74
|
insertInto?: string | undefined;
|
|
75
75
|
syncStoryboard?: boolean | undefined;
|
|
@@ -150,7 +150,7 @@ export declare const sceneBuildTool: import("../define-tool.js").ToolDefinition<
|
|
|
150
150
|
ttsProvider: z.ZodOptional<z.ZodEnum<["auto", "elevenlabs", "openai", "kokoro"]>>;
|
|
151
151
|
voice: z.ZodOptional<z.ZodString>;
|
|
152
152
|
imageProvider: z.ZodOptional<z.ZodEnum<["openai", "gemini", "grok"]>>;
|
|
153
|
-
videoProvider: z.ZodOptional<z.ZodEnum<["seedance", "grok", "kling", "runway", "omni"
|
|
153
|
+
videoProvider: z.ZodOptional<z.ZodEnum<["seedance", "grok", "kling", "runway", "omni"]>>;
|
|
154
154
|
musicProvider: z.ZodOptional<z.ZodEnum<["elevenlabs", "replicate"]>>;
|
|
155
155
|
imageQuality: z.ZodOptional<z.ZodEnum<["standard", "hd"]>>;
|
|
156
156
|
imageModel: z.ZodOptional<z.ZodString>;
|
|
@@ -168,12 +168,12 @@ export declare const sceneBuildTool: import("../define-tool.js").ToolDefinition<
|
|
|
168
168
|
skipNarration?: boolean | undefined;
|
|
169
169
|
skipBackdrop?: boolean | undefined;
|
|
170
170
|
skipRender?: boolean | undefined;
|
|
171
|
-
imageProvider?: "
|
|
171
|
+
imageProvider?: "gemini" | "openai" | "grok" | undefined;
|
|
172
172
|
imageModel?: string | undefined;
|
|
173
|
+
videoProvider?: "grok" | "seedance" | "kling" | "runway" | "omni" | undefined;
|
|
173
174
|
ttsProvider?: "openai" | "elevenlabs" | "auto" | "kokoro" | undefined;
|
|
174
175
|
skipVideo?: boolean | undefined;
|
|
175
176
|
skipMusic?: boolean | undefined;
|
|
176
|
-
videoProvider?: "grok" | "seedance" | "kling" | "runway" | "omni" | "veo" | undefined;
|
|
177
177
|
musicProvider?: "elevenlabs" | "replicate" | undefined;
|
|
178
178
|
imageQuality?: "standard" | "hd" | undefined;
|
|
179
179
|
imageSize?: "1024x1024" | "1536x1024" | "1024x1536" | undefined;
|
|
@@ -189,12 +189,12 @@ export declare const sceneBuildTool: import("../define-tool.js").ToolDefinition<
|
|
|
189
189
|
skipNarration?: boolean | undefined;
|
|
190
190
|
skipBackdrop?: boolean | undefined;
|
|
191
191
|
skipRender?: boolean | undefined;
|
|
192
|
-
imageProvider?: "
|
|
192
|
+
imageProvider?: "gemini" | "openai" | "grok" | undefined;
|
|
193
193
|
imageModel?: string | undefined;
|
|
194
|
+
videoProvider?: "grok" | "seedance" | "kling" | "runway" | "omni" | undefined;
|
|
194
195
|
ttsProvider?: "openai" | "elevenlabs" | "auto" | "kokoro" | undefined;
|
|
195
196
|
skipVideo?: boolean | undefined;
|
|
196
197
|
skipMusic?: boolean | undefined;
|
|
197
|
-
videoProvider?: "grok" | "seedance" | "kling" | "runway" | "omni" | "veo" | undefined;
|
|
198
198
|
musicProvider?: "elevenlabs" | "replicate" | undefined;
|
|
199
199
|
imageQuality?: "standard" | "hd" | undefined;
|
|
200
200
|
imageSize?: "1024x1024" | "1536x1024" | "1024x1536" | undefined;
|
|
@@ -70,13 +70,13 @@ export declare const storyboardReviseTool: import("../define-tool.js").ToolDefin
|
|
|
70
70
|
dryRun?: boolean | undefined;
|
|
71
71
|
projectDir?: string | undefined;
|
|
72
72
|
durationSec?: number | undefined;
|
|
73
|
-
composer?: "
|
|
73
|
+
composer?: "gemini" | "openai" | "claude" | undefined;
|
|
74
74
|
}, {
|
|
75
75
|
request: string;
|
|
76
76
|
dryRun?: boolean | undefined;
|
|
77
77
|
projectDir?: string | undefined;
|
|
78
78
|
durationSec?: number | undefined;
|
|
79
|
-
composer?: "
|
|
79
|
+
composer?: "gemini" | "openai" | "claude" | undefined;
|
|
80
80
|
}>>;
|
|
81
81
|
export declare const planTool: import("../define-tool.js").ToolDefinition<z.ZodObject<{
|
|
82
82
|
projectDir: z.ZodOptional<z.ZodString>;
|
|
@@ -92,7 +92,7 @@ export declare const planTool: import("../define-tool.js").ToolDefinition<z.ZodO
|
|
|
92
92
|
imageProvider: z.ZodOptional<z.ZodString>;
|
|
93
93
|
imageQuality: z.ZodOptional<z.ZodEnum<["standard", "hd"]>>;
|
|
94
94
|
imageSize: z.ZodOptional<z.ZodString>;
|
|
95
|
-
videoProvider: z.ZodOptional<z.ZodEnum<["seedance", "grok", "kling", "runway", "omni"
|
|
95
|
+
videoProvider: z.ZodOptional<z.ZodEnum<["seedance", "grok", "kling", "runway", "omni"]>>;
|
|
96
96
|
musicProvider: z.ZodOptional<z.ZodEnum<["elevenlabs", "replicate"]>>;
|
|
97
97
|
composer: z.ZodOptional<z.ZodEnum<["claude", "openai", "gemini"]>>;
|
|
98
98
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -103,14 +103,14 @@ export declare const planTool: import("../define-tool.js").ToolDefinition<z.ZodO
|
|
|
103
103
|
force?: boolean | undefined;
|
|
104
104
|
mode?: "auto" | "agent" | "batch" | undefined;
|
|
105
105
|
stage?: "all" | "assets" | "compose" | "sync" | "render" | undefined;
|
|
106
|
-
composer?: "
|
|
106
|
+
composer?: "gemini" | "openai" | "claude" | undefined;
|
|
107
107
|
skipNarration?: boolean | undefined;
|
|
108
108
|
skipBackdrop?: boolean | undefined;
|
|
109
109
|
imageProvider?: string | undefined;
|
|
110
|
+
videoProvider?: "grok" | "seedance" | "kling" | "runway" | "omni" | undefined;
|
|
110
111
|
ttsProvider?: "openai" | "elevenlabs" | "auto" | "kokoro" | undefined;
|
|
111
112
|
skipVideo?: boolean | undefined;
|
|
112
113
|
skipMusic?: boolean | undefined;
|
|
113
|
-
videoProvider?: "grok" | "seedance" | "kling" | "runway" | "omni" | "veo" | undefined;
|
|
114
114
|
musicProvider?: "elevenlabs" | "replicate" | undefined;
|
|
115
115
|
imageQuality?: "standard" | "hd" | undefined;
|
|
116
116
|
imageSize?: string | undefined;
|
|
@@ -121,14 +121,14 @@ export declare const planTool: import("../define-tool.js").ToolDefinition<z.ZodO
|
|
|
121
121
|
force?: boolean | undefined;
|
|
122
122
|
mode?: "auto" | "agent" | "batch" | undefined;
|
|
123
123
|
stage?: "all" | "assets" | "compose" | "sync" | "render" | undefined;
|
|
124
|
-
composer?: "
|
|
124
|
+
composer?: "gemini" | "openai" | "claude" | undefined;
|
|
125
125
|
skipNarration?: boolean | undefined;
|
|
126
126
|
skipBackdrop?: boolean | undefined;
|
|
127
127
|
imageProvider?: string | undefined;
|
|
128
|
+
videoProvider?: "grok" | "seedance" | "kling" | "runway" | "omni" | undefined;
|
|
128
129
|
ttsProvider?: "openai" | "elevenlabs" | "auto" | "kokoro" | undefined;
|
|
129
130
|
skipVideo?: boolean | undefined;
|
|
130
131
|
skipMusic?: boolean | undefined;
|
|
131
|
-
videoProvider?: "grok" | "seedance" | "kling" | "runway" | "omni" | "veo" | undefined;
|
|
132
132
|
musicProvider?: "elevenlabs" | "replicate" | undefined;
|
|
133
133
|
imageQuality?: "standard" | "hd" | undefined;
|
|
134
134
|
imageSize?: string | undefined;
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* - Name uniqueness + snake_case form
|
|
8
8
|
* - Schema is a ZodObject (so adapters can derive properties/required)
|
|
9
|
-
* - MCP adapter round-trip: every entry
|
|
10
|
-
* inputSchema
|
|
11
|
-
* - Agent adapter round-trip: every entry tagged `agent` registers cleanly
|
|
9
|
+
* - MCP adapter round-trip: every entry produces a valid inputSchema
|
|
12
10
|
*/
|
|
13
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeframe/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Frontier AI video generation for coding agents - Seedance, Runway,
|
|
3
|
+
"version": "0.116.0",
|
|
4
|
+
"description": "Frontier AI video generation for coding agents - Seedance, Runway, Kling, and Gemini Omni on your own keys, behind a hard cost cap",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"image-to-video",
|
|
23
23
|
"seedance",
|
|
24
24
|
"runway",
|
|
25
|
-
"veo",
|
|
26
25
|
"kling",
|
|
27
26
|
"ai-agent",
|
|
28
27
|
"mcp",
|
|
@@ -59,15 +58,9 @@
|
|
|
59
58
|
"./tools/adapters/mcp": {
|
|
60
59
|
"types": "./dist/tools/adapters/mcp.d.ts",
|
|
61
60
|
"import": "./dist/tools/adapters/mcp.js"
|
|
62
|
-
},
|
|
63
|
-
"./tools/adapters/agent": {
|
|
64
|
-
"types": "./dist/tools/adapters/agent.d.ts",
|
|
65
|
-
"import": "./dist/tools/adapters/agent.js"
|
|
66
61
|
}
|
|
67
62
|
},
|
|
68
63
|
"dependencies": {
|
|
69
|
-
"@anthropic-ai/sdk": "^0.39.0",
|
|
70
|
-
"@google/generative-ai": "^0.21.0",
|
|
71
64
|
"@hyperframes/producer": "^0.7.71",
|
|
72
65
|
"@lottiefiles/dotlottie-web": "0.71.0",
|
|
73
66
|
"chalk": "^5.3.0",
|
|
@@ -75,7 +68,6 @@
|
|
|
75
68
|
"dotenv": "^17.2.3",
|
|
76
69
|
"image-size": "^2.0.2",
|
|
77
70
|
"music-metadata": "^11.11.1",
|
|
78
|
-
"openai": "^4.77.0",
|
|
79
71
|
"ora": "^8.0.1",
|
|
80
72
|
"yaml": "^2.3.4",
|
|
81
73
|
"zod": "^3.22.4"
|
|
@@ -89,8 +81,8 @@
|
|
|
89
81
|
"tsx": "^4.21.0",
|
|
90
82
|
"typescript": "^5.3.3",
|
|
91
83
|
"vitest": "^1.2.2",
|
|
92
|
-
"@vibeframe/ai-providers": "0.
|
|
93
|
-
"@vibeframe/core": "0.
|
|
84
|
+
"@vibeframe/ai-providers": "0.116.0",
|
|
85
|
+
"@vibeframe/core": "0.116.0"
|
|
94
86
|
},
|
|
95
87
|
"engines": {
|
|
96
88
|
"node": ">=20"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude LLM Adapter with tool_use
|
|
3
|
-
*/
|
|
4
|
-
import type { LLMAdapter } from "./index.js";
|
|
5
|
-
import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
|
|
6
|
-
export declare class ClaudeAdapter implements LLMAdapter {
|
|
7
|
-
readonly provider: LLMProvider;
|
|
8
|
-
private client;
|
|
9
|
-
private model;
|
|
10
|
-
initialize(apiKey: string): Promise<void>;
|
|
11
|
-
isInitialized(): boolean;
|
|
12
|
-
setModel(model: string): void;
|
|
13
|
-
chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
|
|
14
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Evolink LLM Adapter (OpenAI-compatible)
|
|
3
|
-
* Routes to GPT-5, Claude, Gemini, DeepSeek & more via https://direct.evolink.ai/v1
|
|
4
|
-
*/
|
|
5
|
-
import type { LLMAdapter } from "./index.js";
|
|
6
|
-
import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
|
|
7
|
-
export declare class EvolinkAdapter implements LLMAdapter {
|
|
8
|
-
readonly provider: LLMProvider;
|
|
9
|
-
private client;
|
|
10
|
-
private model;
|
|
11
|
-
initialize(apiKey: string): Promise<void>;
|
|
12
|
-
isInitialized(): boolean;
|
|
13
|
-
setModel(model: string): void;
|
|
14
|
-
chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gemini LLM Adapter with Function Calling
|
|
3
|
-
*/
|
|
4
|
-
import type { LLMAdapter } from "./index.js";
|
|
5
|
-
import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
|
|
6
|
-
/** Drop schema keys Gemini rejects, recursing into properties and items. */
|
|
7
|
-
export declare function toGeminiSchema(schema: unknown): unknown;
|
|
8
|
-
export declare class GeminiAdapter implements LLMAdapter {
|
|
9
|
-
readonly provider: LLMProvider;
|
|
10
|
-
private client;
|
|
11
|
-
private model;
|
|
12
|
-
initialize(apiKey: string): Promise<void>;
|
|
13
|
-
isInitialized(): boolean;
|
|
14
|
-
setModel(model: string): void;
|
|
15
|
-
chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
|
|
16
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LLM Adapter Interface and Factory
|
|
3
|
-
*/
|
|
4
|
-
import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
|
|
5
|
-
/**
|
|
6
|
-
* Abstract interface for LLM providers
|
|
7
|
-
*/
|
|
8
|
-
export interface LLMAdapter {
|
|
9
|
-
/** Provider name */
|
|
10
|
-
readonly provider: LLMProvider;
|
|
11
|
-
/** Initialize the adapter with API key */
|
|
12
|
-
initialize(apiKey: string): Promise<void>;
|
|
13
|
-
/** Check if adapter is initialized */
|
|
14
|
-
isInitialized(): boolean;
|
|
15
|
-
/** Override the provider model for this session. */
|
|
16
|
-
setModel?(model: string): void;
|
|
17
|
-
/** Send messages with tools and get response */
|
|
18
|
-
chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Factory for creating LLM adapters
|
|
22
|
-
*/
|
|
23
|
-
export declare function createAdapter(provider: LLMProvider): Promise<LLMAdapter>;
|
|
24
|
-
export { OpenAIAdapter } from "./openai.js";
|
|
25
|
-
export { ClaudeAdapter } from "./claude.js";
|
|
26
|
-
export { GeminiAdapter } from "./gemini.js";
|
|
27
|
-
export { OllamaAdapter } from "./ollama.js";
|
|
28
|
-
export { XAIAdapter } from "./xai.js";
|
|
29
|
-
export { OpenRouterAdapter } from "./openrouter.js";
|
|
30
|
-
export { EvolinkAdapter } from "./evolink.js";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ollama LLM Adapter with JSON-based tool calling
|
|
3
|
-
* Uses prompt engineering to simulate tool calling for local models
|
|
4
|
-
*/
|
|
5
|
-
import type { LLMAdapter } from "./index.js";
|
|
6
|
-
import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
|
|
7
|
-
export declare class OllamaAdapter implements LLMAdapter {
|
|
8
|
-
readonly provider: LLMProvider;
|
|
9
|
-
private baseUrl;
|
|
10
|
-
private model;
|
|
11
|
-
private initialized;
|
|
12
|
-
initialize(apiKey: string): Promise<void>;
|
|
13
|
-
isInitialized(): boolean;
|
|
14
|
-
setModel(model: string): void;
|
|
15
|
-
setBaseUrl(url: string): void;
|
|
16
|
-
chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
|
|
17
|
-
private parseToolCalls;
|
|
18
|
-
private extractTextBeforeJson;
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenAI LLM Adapter with Function Calling
|
|
3
|
-
*/
|
|
4
|
-
import type { LLMAdapter } from "./index.js";
|
|
5
|
-
import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
|
|
6
|
-
export declare class OpenAIAdapter implements LLMAdapter {
|
|
7
|
-
readonly provider: LLMProvider;
|
|
8
|
-
private client;
|
|
9
|
-
private model;
|
|
10
|
-
initialize(apiKey: string): Promise<void>;
|
|
11
|
-
isInitialized(): boolean;
|
|
12
|
-
setModel(model: string): void;
|
|
13
|
-
chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
|
|
14
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenRouter LLM Adapter (OpenAI-compatible)
|
|
3
|
-
* Routes to 300+ models via https://openrouter.ai/api/v1
|
|
4
|
-
*/
|
|
5
|
-
import type { LLMAdapter } from "./index.js";
|
|
6
|
-
import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
|
|
7
|
-
export declare class OpenRouterAdapter implements LLMAdapter {
|
|
8
|
-
readonly provider: LLMProvider;
|
|
9
|
-
private client;
|
|
10
|
-
private model;
|
|
11
|
-
initialize(apiKey: string): Promise<void>;
|
|
12
|
-
isInitialized(): boolean;
|
|
13
|
-
setModel(model: string): void;
|
|
14
|
-
chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* xAI Grok LLM Adapter (OpenAI-compatible)
|
|
3
|
-
*/
|
|
4
|
-
import type { LLMAdapter } from "./index.js";
|
|
5
|
-
import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
|
|
6
|
-
export declare class XAIAdapter implements LLMAdapter {
|
|
7
|
-
readonly provider: LLMProvider;
|
|
8
|
-
private client;
|
|
9
|
-
private model;
|
|
10
|
-
initialize(apiKey: string): Promise<void>;
|
|
11
|
-
isInitialized(): boolean;
|
|
12
|
-
setModel(model: string): void;
|
|
13
|
-
chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
|
|
14
|
-
}
|
package/dist/agent/index.d.ts
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AgentExecutor - Main Agentic Loop
|
|
3
|
-
* Orchestrates LLM reasoning and tool execution
|
|
4
|
-
*/
|
|
5
|
-
import type { AgentMessage, AgentContext, ToolDefinition, LLMProvider } from "./types.js";
|
|
6
|
-
export interface AgentExecutorOptions {
|
|
7
|
-
provider: LLMProvider;
|
|
8
|
-
apiKey: string;
|
|
9
|
-
model?: string;
|
|
10
|
-
maxTurns?: number;
|
|
11
|
-
verbose?: boolean;
|
|
12
|
-
projectPath?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Callback to confirm before executing each tool.
|
|
15
|
-
* Return true to execute, false to skip.
|
|
16
|
-
*
|
|
17
|
-
* The `cost` argument is the tool's declared cost tier (free / low /
|
|
18
|
-
* medium / high / very-high) so the prompt can warn about expensive
|
|
19
|
-
* calls. `undefined` for tools that didn't declare a tier.
|
|
20
|
-
*/
|
|
21
|
-
confirmCallback?: (toolName: string, args: Record<string, unknown>, cost: ToolDefinition["cost"]) => Promise<boolean>;
|
|
22
|
-
/**
|
|
23
|
-
* When true, prompt before every tool call. When false (default), the
|
|
24
|
-
* cost gate in `executeTool` fires only for high/very-high tools.
|
|
25
|
-
* Set by `--confirm` CLI flag.
|
|
26
|
-
*/
|
|
27
|
-
confirmAlways?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Disable all confirm prompts, even for high/very-high cost tools.
|
|
30
|
-
* For automated agent sessions where every tool call must run
|
|
31
|
-
* unattended. Set by `--no-confirm` CLI flag.
|
|
32
|
-
*/
|
|
33
|
-
noConfirm?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Cumulative USD ceiling for the agent session. When set, each tool
|
|
36
|
-
* call's tier-derived estimate is added to a running total; if the
|
|
37
|
-
* next call would push the total over `budgetUsd`, the executor
|
|
38
|
-
* skips it and returns a "budget exceeded" tool result so the LLM
|
|
39
|
-
* can adapt or stop. Mirrors `vibe run --budget-usd`. `undefined`
|
|
40
|
-
* disables the cap.
|
|
41
|
-
*/
|
|
42
|
-
budgetUsd?: number;
|
|
43
|
-
}
|
|
44
|
-
export interface ExecutionResult {
|
|
45
|
-
response: string;
|
|
46
|
-
toolsUsed: string[];
|
|
47
|
-
turns: number;
|
|
48
|
-
}
|
|
49
|
-
export declare class AgentExecutor {
|
|
50
|
-
private adapter;
|
|
51
|
-
private registry;
|
|
52
|
-
private memory;
|
|
53
|
-
private cumulativeUsd;
|
|
54
|
-
private context;
|
|
55
|
-
private config;
|
|
56
|
-
private initialized;
|
|
57
|
-
constructor(options: AgentExecutorOptions);
|
|
58
|
-
/**
|
|
59
|
-
* Initialize the agent
|
|
60
|
-
*/
|
|
61
|
-
initialize(): Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
* Execute a user request
|
|
64
|
-
*/
|
|
65
|
-
execute(userInput: string): Promise<ExecutionResult>;
|
|
66
|
-
/**
|
|
67
|
-
* Execute a single tool
|
|
68
|
-
*
|
|
69
|
-
* Confirm-prompt logic:
|
|
70
|
-
* - `noConfirm: true` → never prompt (automation / CI)
|
|
71
|
-
* - `confirmAlways: true` → prompt for every tool call
|
|
72
|
-
* - default → prompt only when the tool's
|
|
73
|
-
* cost is high/very-high (the
|
|
74
|
-
* `costGate`)
|
|
75
|
-
*
|
|
76
|
-
* The two non-trivial cases require `confirmCallback` to be set; if
|
|
77
|
-
* it isn't, no prompt fires and the tool runs.
|
|
78
|
-
*/
|
|
79
|
-
private executeTool;
|
|
80
|
-
/**
|
|
81
|
-
* Cumulative tier-estimated USD spent in this session. Updates after
|
|
82
|
-
* every successful tool call. Useful for status output / `tools` REPL.
|
|
83
|
-
*/
|
|
84
|
-
getCumulativeUsd(): number;
|
|
85
|
-
/**
|
|
86
|
-
* Update context (e.g., when project changes)
|
|
87
|
-
*/
|
|
88
|
-
updateContext(updates: Partial<AgentContext>): void;
|
|
89
|
-
/**
|
|
90
|
-
* Reset conversation memory
|
|
91
|
-
*/
|
|
92
|
-
reset(): void;
|
|
93
|
-
/**
|
|
94
|
-
* Get current context
|
|
95
|
-
*/
|
|
96
|
-
getContext(): AgentContext;
|
|
97
|
-
/**
|
|
98
|
-
* Get conversation history
|
|
99
|
-
*/
|
|
100
|
-
getHistory(): AgentMessage[];
|
|
101
|
-
/**
|
|
102
|
-
* Get available tools
|
|
103
|
-
*/
|
|
104
|
-
getTools(): string[];
|
|
105
|
-
}
|
|
106
|
-
export type { AgentConfig, AgentContext, AgentMessage, ToolCall, ToolResult } from "./types.js";
|
|
107
|
-
export type { LLMAdapter } from "./adapters/index.js";
|
|
108
|
-
export { ToolRegistry, registerAllTools } from "./tools/index.js";
|
|
109
|
-
export { ConversationMemory } from "./memory/index.js";
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation Memory Management
|
|
3
|
-
*/
|
|
4
|
-
import type { AgentMessage, ToolCall, ToolResult } from "../types.js";
|
|
5
|
-
/**
|
|
6
|
-
* ConversationMemory class
|
|
7
|
-
* Manages conversation history for the agent
|
|
8
|
-
*/
|
|
9
|
-
export declare class ConversationMemory {
|
|
10
|
-
private messages;
|
|
11
|
-
private maxMessages;
|
|
12
|
-
constructor(maxMessages?: number);
|
|
13
|
-
/**
|
|
14
|
-
* Add a system message
|
|
15
|
-
*/
|
|
16
|
-
addSystem(content: string): void;
|
|
17
|
-
/**
|
|
18
|
-
* Add a user message
|
|
19
|
-
*/
|
|
20
|
-
addUser(content: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Add an assistant message
|
|
23
|
-
*/
|
|
24
|
-
addAssistant(content: string, toolCalls?: ToolCall[], providerContent?: unknown): void;
|
|
25
|
-
/**
|
|
26
|
-
* Add a tool result message
|
|
27
|
-
*/
|
|
28
|
-
addToolResult(toolCallId: string, result: ToolResult): void;
|
|
29
|
-
/**
|
|
30
|
-
* Get all messages
|
|
31
|
-
*/
|
|
32
|
-
getMessages(): AgentMessage[];
|
|
33
|
-
/**
|
|
34
|
-
* Get messages for a specific role
|
|
35
|
-
*/
|
|
36
|
-
getByRole(role: AgentMessage["role"]): AgentMessage[];
|
|
37
|
-
/**
|
|
38
|
-
* Get the last N messages
|
|
39
|
-
*/
|
|
40
|
-
getLast(n: number): AgentMessage[];
|
|
41
|
-
/**
|
|
42
|
-
* Clear all messages except system
|
|
43
|
-
*/
|
|
44
|
-
clear(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Clear all messages including system
|
|
47
|
-
*/
|
|
48
|
-
clearAll(): void;
|
|
49
|
-
/**
|
|
50
|
-
* Get message count
|
|
51
|
-
*/
|
|
52
|
-
get length(): number;
|
|
53
|
-
/**
|
|
54
|
-
* Trim messages to max limit (keep system + most recent)
|
|
55
|
-
*/
|
|
56
|
-
private trim;
|
|
57
|
-
/**
|
|
58
|
-
* Summarize conversation for context compression
|
|
59
|
-
*/
|
|
60
|
-
summarize(): string;
|
|
61
|
-
/**
|
|
62
|
-
* Export conversation as JSON
|
|
63
|
-
*/
|
|
64
|
-
toJSON(): AgentMessage[];
|
|
65
|
-
/**
|
|
66
|
-
* Import conversation from JSON
|
|
67
|
-
*/
|
|
68
|
-
fromJSON(messages: AgentMessage[]): void;
|
|
69
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* E2E Tests: AI Pipeline Tools with Real API Calls
|
|
3
|
-
*
|
|
4
|
-
* ⚠️ WARNING: These tests make REAL API calls and incur COSTS!
|
|
5
|
-
*
|
|
6
|
-
* To run these tests:
|
|
7
|
-
* RUN_E2E=1 pnpm vitest run src/agent/tools/e2e.test.ts
|
|
8
|
-
*
|
|
9
|
-
* Required API keys (set in ~/.vibeframe/config.yaml or env):
|
|
10
|
-
* - ANTHROPIC_API_KEY (Claude - storyboard)
|
|
11
|
-
* - GOOGLE_API_KEY (Gemini - image, video analysis)
|
|
12
|
-
* - OPENAI_API_KEY (Whisper - transcription)
|
|
13
|
-
* - ELEVENLABS_API_KEY (TTS)
|
|
14
|
-
*
|
|
15
|
-
* Estimated costs per full run:
|
|
16
|
-
* - ai_gemini_video: ~$0.01-0.05 (depending on video length)
|
|
17
|
-
* - ai_storyboard: ~$0.01-0.02
|
|
18
|
-
* - ai_image (gemini): Free tier available
|
|
19
|
-
* - ai_tts: ~$0.01-0.05 (depending on text length)
|
|
20
|
-
* - ai_script_to_video (images-only): ~$0.05-0.20
|
|
21
|
-
* - ai_highlights (with Gemini): ~$0.05-0.20
|
|
22
|
-
*
|
|
23
|
-
* Total estimated cost: $0.10-0.50 per full run
|
|
24
|
-
*/
|
|
25
|
-
export {};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool Registry - Central registry for all agent tools
|
|
3
|
-
*/
|
|
4
|
-
import type { ToolDefinition, ToolResult, AgentContext } from "../types.js";
|
|
5
|
-
export type ToolHandler = (args: Record<string, unknown>, context: AgentContext) => Promise<ToolResult>;
|
|
6
|
-
/**
|
|
7
|
-
* Tool Registry class
|
|
8
|
-
* Manages tool definitions and execution
|
|
9
|
-
*/
|
|
10
|
-
export declare class ToolRegistry {
|
|
11
|
-
private tools;
|
|
12
|
-
/**
|
|
13
|
-
* Register a tool
|
|
14
|
-
*/
|
|
15
|
-
register(definition: ToolDefinition, handler: ToolHandler): void;
|
|
16
|
-
/**
|
|
17
|
-
* Get all tool definitions
|
|
18
|
-
*/
|
|
19
|
-
getDefinitions(): ToolDefinition[];
|
|
20
|
-
/**
|
|
21
|
-
* Get a specific tool definition
|
|
22
|
-
*/
|
|
23
|
-
getDefinition(name: string): ToolDefinition | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Get a specific tool definition (alias for getDefinition)
|
|
26
|
-
*/
|
|
27
|
-
get(name: string): ToolDefinition | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Get all tool definitions (alias for getDefinitions)
|
|
30
|
-
*/
|
|
31
|
-
getAll(): ToolDefinition[];
|
|
32
|
-
/**
|
|
33
|
-
* Get a tool handler by name
|
|
34
|
-
*/
|
|
35
|
-
getHandler(name: string): ToolHandler | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Execute a tool
|
|
38
|
-
*/
|
|
39
|
-
execute(name: string, args: Record<string, unknown>, context: AgentContext): Promise<ToolResult>;
|
|
40
|
-
/**
|
|
41
|
-
* Check if a tool exists
|
|
42
|
-
*/
|
|
43
|
-
has(name: string): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Get tool count
|
|
46
|
-
*/
|
|
47
|
-
get size(): number;
|
|
48
|
-
/**
|
|
49
|
-
* List all tool names
|
|
50
|
-
*/
|
|
51
|
-
list(): string[];
|
|
52
|
-
}
|
|
53
|
-
export declare const toolRegistry: ToolRegistry;
|
|
54
|
-
/**
|
|
55
|
-
* Register all tools. The manifest (`packages/cli/src/tools/manifest/`) is
|
|
56
|
-
* now the single source of truth for every Agent tool. v0.67 PR2 finished
|
|
57
|
-
* the migration — there are no legacy `register*Tools` left.
|
|
58
|
-
*/
|
|
59
|
-
export declare function registerAllTools(registry: ToolRegistry): Promise<void>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Integration Tests: CLI ↔ Agent Tool Synchronization
|
|
3
|
-
*
|
|
4
|
-
* These tests verify that:
|
|
5
|
-
* 1. All Agent tools are properly registered
|
|
6
|
-
* 2. Agent tools correctly wrap CLI functions
|
|
7
|
-
* 3. Parameter schemas match between CLI and Agent
|
|
8
|
-
* 4. Tool handlers produce expected output formats
|
|
9
|
-
*/
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|