@vibeframe/cli 0.115.10 → 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.
Files changed (51) hide show
  1. package/dist/commands/_shared/build-video-providers.d.ts +9 -2
  2. package/dist/commands/_shared/image-cost.d.ts +3 -2
  3. package/dist/commands/_shared/storyboard-parse.d.ts +1 -1
  4. package/dist/commands/_shared/video-jobs.d.ts +0 -2
  5. package/dist/commands/ai-video.d.ts +2 -6
  6. package/dist/commands/generate/thumbnail.d.ts +2 -3
  7. package/dist/commands/generate/video-extend.d.ts +1 -1
  8. package/dist/commands/generate/video.d.ts +2 -2
  9. package/dist/commands/generate.d.ts +2 -2
  10. package/dist/config/index.d.ts +2 -7
  11. package/dist/config/schema.d.ts +2 -17
  12. package/dist/index.d.ts +1 -4
  13. package/dist/index.js +23605 -37134
  14. package/dist/tools/adapters/mcp.d.ts +1 -1
  15. package/dist/tools/adapters/mcp.js +2 -6
  16. package/dist/tools/define-tool.d.ts +8 -26
  17. package/dist/tools/define-tool.js +0 -14
  18. package/dist/tools/manifest/edit.d.ts +4 -4
  19. package/dist/tools/manifest/generate.d.ts +8 -14
  20. package/dist/tools/manifest/handlers.test.d.ts +7 -0
  21. package/dist/tools/manifest/index.d.ts +2 -3
  22. package/dist/tools/manifest/index.js +500 -3174
  23. package/dist/tools/manifest/scene.d.ts +7 -7
  24. package/dist/tools/manifest/storyboard.d.ts +7 -7
  25. package/dist/tools/manifest.test.d.ts +1 -3
  26. package/dist/utils/model-lifecycle.d.ts +0 -1
  27. package/package.json +4 -12
  28. package/dist/agent/adapters/claude.d.ts +0 -14
  29. package/dist/agent/adapters/evolink.d.ts +0 -15
  30. package/dist/agent/adapters/evolink.test.d.ts +0 -4
  31. package/dist/agent/adapters/gemini.d.ts +0 -16
  32. package/dist/agent/adapters/index.d.ts +0 -30
  33. package/dist/agent/adapters/ollama.d.ts +0 -19
  34. package/dist/agent/adapters/openai.d.ts +0 -14
  35. package/dist/agent/adapters/openrouter.d.ts +0 -15
  36. package/dist/agent/adapters/openrouter.test.d.ts +0 -4
  37. package/dist/agent/adapters/provider-content.test.d.ts +0 -6
  38. package/dist/agent/adapters/xai.d.ts +0 -14
  39. package/dist/agent/index.d.ts +0 -109
  40. package/dist/agent/memory/index.d.ts +0 -69
  41. package/dist/agent/prompts/system.d.ts +0 -5
  42. package/dist/agent/tools/e2e.test.d.ts +0 -25
  43. package/dist/agent/tools/index.d.ts +0 -59
  44. package/dist/agent/tools/integration.test.d.ts +0 -10
  45. package/dist/agent/tools/scene.test.d.ts +0 -1
  46. package/dist/agent/types.d.ts +0 -80
  47. package/dist/commands/agent.d.ts +0 -30
  48. package/dist/tools/adapters/agent.d.ts +0 -9
  49. package/dist/tools/adapters/agent.js +0 -188
  50. package/dist/tools/manifest/agent-only.d.ts +0 -236
  51. /package/dist/{agent/index.test.d.ts → commands/_shared/image-jobs.test.d.ts} +0 -0
@@ -92,7 +92,7 @@ export interface ProgressSink {
92
92
  * request's result has been sent.
93
93
  */
94
94
  export declare function makeProgressSink(raw: McpCallExtra["onProgress"], minIntervalMs?: number): ProgressSink;
95
- /** Filter manifest by `surfaces.mcp` (default: included) and project to MCP tool shape. */
95
+ /** Project the manifest to MCP tool shape. */
96
96
  export declare function manifestToMcpTools(manifest: readonly ToolDefinition[]): McpTool[];
97
97
  /** Build the dispatcher used by `handleToolCall` in the MCP server. */
98
98
  export declare function buildMcpDispatcher(manifest: readonly ToolDefinition[]): McpDispatcher;
@@ -207,7 +207,7 @@ function formatZodError(err) {
207
207
  return err.issues.map((i) => `${i.path.join(".") || "(root)"}: ${i.message}`).join("; ");
208
208
  }
209
209
  function manifestToMcpTools(manifest) {
210
- return manifest.filter((t) => !t.surfaces || t.surfaces.includes("mcp")).map((t) => {
210
+ return manifest.map((t) => {
211
211
  const inputSchema = zodToJsonSchema(t.schema);
212
212
  return {
213
213
  name: t.name,
@@ -236,11 +236,7 @@ function toMcpAnnotations(a) {
236
236
  }
237
237
  function buildMcpDispatcher(manifest) {
238
238
  const byName = /* @__PURE__ */ new Map();
239
- for (const t of manifest) {
240
- if (!t.surfaces || t.surfaces.includes("mcp")) {
241
- byName.set(t.name, t);
242
- }
243
- }
239
+ for (const t of manifest) byName.set(t.name, t);
244
240
  return async (name, args, extra) => {
245
241
  const tool = byName.get(name);
246
242
  if (!tool) {
@@ -4,9 +4,7 @@
4
4
  *
5
5
  * Each tool is declared once via `defineTool({...})` with a Zod schema, an
6
6
  * `execute` function, and metadata. The MCP server (`packages/mcp-server`)
7
- * and the in-process Agent (`packages/cli/src/agent/tools`) both consume the
8
- * manifest via thin adapters — no tool definition is ever duplicated across
9
- * surfaces.
7
+ * consumes the manifest through a thin adapter.
10
8
  *
11
9
  * The CLI Commander tree (`packages/cli/src/commands/*.ts`) is intentionally
12
10
  * left hand-written. Its short flags, `--no-foo` negations, variadic args,
@@ -14,33 +12,19 @@
14
12
  * Commander chains call the same `executeXxx` engine functions that the
15
13
  * manifest entries call, so the CLI stays in sync via the existing
16
14
  * `cli-sync.test.ts` invariant.
17
- *
18
- * See `/Users/kiyeonjeon/.claude/plans/logical-wibbling-sonnet.md` for the
19
- * full v0.65 migration plan.
20
15
  */
21
16
  import { z, type ZodTypeAny } from "zod";
22
17
  import { type ProductSurface } from "../commands/_shared/product-surface.js";
23
18
  export type CostTier = "free" | "low" | "medium" | "high" | "very-high";
24
- export type Surface = "mcp" | "agent";
25
19
  export interface ExecuteContext {
26
- /** Resolves relative paths in tool args (`process.cwd()` for MCP/CLI; `AgentContext.workingDirectory` for Agent). */
20
+ /** Resolves relative paths in tool args (`process.cwd()` for MCP and the CLI). */
27
21
  workingDirectory: string;
28
22
  /** The surface invoking the tool. Lets executes branch on JSON vs human output if needed. */
29
- surface: "cli" | Surface;
30
- /**
31
- * Agent-only mutable state. Populated when invoked via the in-process agent
32
- * REPL; `undefined` for MCP/CLI. Tools that read or set the "current
33
- * project" pointer (e.g. project_open/project_save) declare
34
- * `surfaces: ["agent"]` and access this via `ctx.agent?`.
35
- */
36
- agent?: {
37
- projectPath: string | null;
38
- setProjectPath(path: string): void;
39
- };
23
+ surface: "cli" | "mcp";
40
24
  /**
41
25
  * Optional progress sink. The MCP adapter wires this to MCP
42
26
  * `notifications/progress` when the client supplied a progressToken;
43
- * CLI/Agent surfaces leave it undefined. Omitting `progress` advances an
27
+ * the CLI leaves it undefined. Omitting `progress` advances an
44
28
  * internal monotonic counter; the adapter also throttles and enforces
45
29
  * monotonicity defensively.
46
30
  */
@@ -51,7 +35,7 @@ export interface ExecuteContext {
51
35
  }) => void;
52
36
  /**
53
37
  * Optional MCP elicitation channel. Present only when the connected MCP
54
- * client advertises the elicitation capability; CLI/Agent surfaces leave
38
+ * client advertises the elicitation capability; the CLI leaves
55
39
  * it undefined, so CLI behavior never changes. See adapters/mcp.ts for
56
40
  * the structural types.
57
41
  */
@@ -76,13 +60,13 @@ export interface ToolExecuteResult {
76
60
  error?: string;
77
61
  }
78
62
  export interface ToolDefinition<S extends ZodTypeAny = ZodTypeAny> {
79
- /** snake_case canonical name (used by MCP `tools/list` and Agent registry). */
63
+ /** snake_case canonical name (used by MCP `tools/list`). */
80
64
  name: string;
81
65
  /** Group this tool belongs to ("scene" | "audio" | "edit" | …). Drives skill regen + sync-counts. */
82
66
  category: string;
83
67
  /** Cost tier from `.claude/rules/architecture.md` cost table. */
84
68
  cost: CostTier;
85
- /** Product-facing command classification. Transport surfaces use `surfaces`. */
69
+ /** Product-facing command classification. */
86
70
  productSurface?: ProductSurface;
87
71
  /** Preferred replacement when `productSurface` is legacy. */
88
72
  replacement?: string;
@@ -114,12 +98,10 @@ export interface ToolDefinition<S extends ZodTypeAny = ZodTypeAny> {
114
98
  idempotent?: boolean;
115
99
  openWorld: boolean;
116
100
  };
117
- /** Identical for MCP description and Agent description. One paragraph. */
101
+ /** The MCP tool description. One paragraph. */
118
102
  description: string;
119
103
  /** Single source of truth for argument shape. Must be a `z.object({...})`. */
120
104
  schema: S;
121
- /** Surfaces the tool lives on. Defaults to `["mcp", "agent"]` when omitted. */
122
- surfaces?: readonly Surface[];
123
105
  /** Engine fn. Receives Zod-validated args. */
124
106
  execute: (args: z.infer<S>, ctx: ExecuteContext) => Promise<ToolExecuteResult>;
125
107
  }
@@ -18,11 +18,6 @@ var EXPLICIT_COMMAND_METADATA = {
18
18
  context: { surface: "agent", note: "Host-agent integration contract." },
19
19
  schema: { surface: "agent", note: "Machine-readable command discovery." },
20
20
  completion: { surface: "advanced", note: "Shell ergonomics helper." },
21
- agent: {
22
- surface: "legacy",
23
- replacement: "a host agent (Claude Code, Codex, Cursor) or the MCP server via `vibe host setup`",
24
- note: "Deprecated built-in REPL, removed before 1.0."
25
- },
26
21
  "design.validate": { surface: "public", note: "Validate the DESIGN.md visual contract." },
27
22
  "generate.image": { surface: "public" },
28
23
  "generate.video": { surface: "public" },
@@ -123,14 +118,10 @@ function productSurfaceForCommandPath(path) {
123
118
  if (path.startsWith("export.")) {
124
119
  return { surface: "advanced", note: "Lower-level export helper." };
125
120
  }
126
- if (path.startsWith("fs.")) {
127
- return { surface: "internal", note: "In-process agent filesystem helper." };
128
- }
129
121
  return { surface: "advanced" };
130
122
  }
131
123
  function commandPathFromToolName(name) {
132
124
  if (["init", "plan", "build", "render", "guide"].includes(name)) return name;
133
- if (name.startsWith("fs_")) return name.replace("_", ".");
134
125
  const firstUnderscore = name.indexOf("_");
135
126
  if (firstUnderscore === -1) return name;
136
127
  const group = name.slice(0, firstUnderscore);
@@ -158,11 +149,6 @@ function validateToolDefinition(t) {
158
149
  if (schemaTypeName !== "ZodObject") {
159
150
  throw new Error(`Tool "${t.name}" schema must be a z.object({...}); got ${schemaTypeName}`);
160
151
  }
161
- if (t.surfaces && t.surfaces.length === 0) {
162
- throw new Error(
163
- `Tool "${t.name}" has empty surfaces array; use [] only via explicit type override`
164
- );
165
- }
166
152
  }
167
153
  function defineTool(t) {
168
154
  validateToolDefinition(t);
@@ -207,13 +207,13 @@ export declare const editTranslateSrtTool: import("../define-tool.js").ToolDefin
207
207
  outputPath: string;
208
208
  srtPath: string;
209
209
  targetLanguage: string;
210
- provider?: "claude" | "openai" | undefined;
210
+ provider?: "openai" | "claude" | undefined;
211
211
  sourceLanguage?: string | undefined;
212
212
  }, {
213
213
  outputPath: string;
214
214
  srtPath: string;
215
215
  targetLanguage: string;
216
- provider?: "claude" | "openai" | undefined;
216
+ provider?: "openai" | "claude" | undefined;
217
217
  sourceLanguage?: string | undefined;
218
218
  }>>;
219
219
  export declare const editGradeTool: import("../define-tool.js").ToolDefinition<z.ZodObject<{
@@ -359,7 +359,7 @@ export declare const editImageTool: import("../define-tool.js").ToolDefinition<z
359
359
  }, "strip", z.ZodTypeAny, {
360
360
  prompt: string;
361
361
  imagePaths: string[];
362
- provider?: "openai" | "gemini" | "grok" | undefined;
362
+ provider?: "gemini" | "openai" | "grok" | undefined;
363
363
  output?: string | undefined;
364
364
  model?: string | undefined;
365
365
  ratio?: string | undefined;
@@ -367,7 +367,7 @@ export declare const editImageTool: import("../define-tool.js").ToolDefinition<z
367
367
  }, {
368
368
  prompt: string;
369
369
  imagePaths: string[];
370
- provider?: "openai" | "gemini" | "grok" | undefined;
370
+ provider?: "gemini" | "openai" | "grok" | undefined;
371
371
  output?: string | undefined;
372
372
  model?: string | undefined;
373
373
  ratio?: string | undefined;
@@ -120,7 +120,7 @@ export declare const generateImageTool: import("../define-tool.js").ToolDefiniti
120
120
  model: z.ZodOptional<z.ZodString>;
121
121
  }, "strip", z.ZodTypeAny, {
122
122
  prompt: string;
123
- provider?: "openai" | "gemini" | "grok" | undefined;
123
+ provider?: "gemini" | "openai" | "grok" | undefined;
124
124
  output?: string | undefined;
125
125
  model?: string | undefined;
126
126
  count?: number | undefined;
@@ -130,7 +130,7 @@ export declare const generateImageTool: import("../define-tool.js").ToolDefiniti
130
130
  size?: string | undefined;
131
131
  }, {
132
132
  prompt: string;
133
- provider?: "openai" | "gemini" | "grok" | undefined;
133
+ provider?: "gemini" | "openai" | "grok" | undefined;
134
134
  output?: string | undefined;
135
135
  model?: string | undefined;
136
136
  count?: number | undefined;
@@ -157,7 +157,7 @@ export declare const generateThumbnailTool: import("../define-tool.js").ToolDefi
157
157
  }>>;
158
158
  export declare const generateVideoTool: import("../define-tool.js").ToolDefinition<z.ZodObject<{
159
159
  prompt: z.ZodString;
160
- provider: z.ZodOptional<z.ZodEnum<["seedance", "grok", "kling", "runway", "veo", "omni"]>>;
160
+ provider: z.ZodOptional<z.ZodEnum<["seedance", "grok", "kling", "runway", "omni"]>>;
161
161
  image: z.ZodOptional<z.ZodString>;
162
162
  endImage: z.ZodOptional<z.ZodString>;
163
163
  refImages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -168,7 +168,6 @@ export declare const generateVideoTool: import("../define-tool.js").ToolDefiniti
168
168
  mode: z.ZodOptional<z.ZodString>;
169
169
  negative: z.ZodOptional<z.ZodString>;
170
170
  resolution: z.ZodOptional<z.ZodString>;
171
- veoModel: z.ZodOptional<z.ZodString>;
172
171
  runwayModel: z.ZodOptional<z.ZodString>;
173
172
  seedanceModel: z.ZodOptional<z.ZodString>;
174
173
  grokModel: z.ZodOptional<z.ZodString>;
@@ -180,12 +179,11 @@ export declare const generateVideoTool: import("../define-tool.js").ToolDefiniti
180
179
  prompt: string;
181
180
  image?: string | undefined;
182
181
  duration?: number | undefined;
183
- provider?: "grok" | "seedance" | "kling" | "runway" | "omni" | "veo" | undefined;
182
+ provider?: "grok" | "seedance" | "kling" | "runway" | "omni" | undefined;
184
183
  output?: string | undefined;
185
184
  seedanceModel?: string | undefined;
186
185
  grokModel?: string | undefined;
187
186
  klingModel?: string | undefined;
188
- veoModel?: string | undefined;
189
187
  runwayModel?: string | undefined;
190
188
  endImage?: string | undefined;
191
189
  refImages?: string[] | undefined;
@@ -201,12 +199,11 @@ export declare const generateVideoTool: import("../define-tool.js").ToolDefiniti
201
199
  prompt: string;
202
200
  image?: string | undefined;
203
201
  duration?: number | undefined;
204
- provider?: "grok" | "seedance" | "kling" | "runway" | "omni" | "veo" | undefined;
202
+ provider?: "grok" | "seedance" | "kling" | "runway" | "omni" | undefined;
205
203
  output?: string | undefined;
206
204
  seedanceModel?: string | undefined;
207
205
  grokModel?: string | undefined;
208
206
  klingModel?: string | undefined;
209
- veoModel?: string | undefined;
210
207
  runwayModel?: string | undefined;
211
208
  endImage?: string | undefined;
212
209
  refImages?: string[] | undefined;
@@ -231,28 +228,25 @@ export declare const generateVideoCancelTool: import("../define-tool.js").ToolDe
231
228
  }>>;
232
229
  export declare const generateVideoExtendTool: import("../define-tool.js").ToolDefinition<z.ZodObject<{
233
230
  videoId: z.ZodString;
234
- provider: z.ZodOptional<z.ZodEnum<["kling", "grok", "omni", "veo"]>>;
231
+ provider: z.ZodOptional<z.ZodEnum<["kling", "grok", "omni"]>>;
235
232
  prompt: z.ZodOptional<z.ZodString>;
236
233
  duration: z.ZodOptional<z.ZodNumber>;
237
234
  negative: z.ZodOptional<z.ZodString>;
238
- veoModel: z.ZodOptional<z.ZodString>;
239
235
  output: z.ZodOptional<z.ZodString>;
240
236
  wait: z.ZodOptional<z.ZodBoolean>;
241
237
  }, "strip", z.ZodTypeAny, {
242
238
  videoId: string;
243
239
  duration?: number | undefined;
244
- provider?: "grok" | "kling" | "omni" | "veo" | undefined;
240
+ provider?: "grok" | "kling" | "omni" | undefined;
245
241
  output?: string | undefined;
246
- veoModel?: string | undefined;
247
242
  prompt?: string | undefined;
248
243
  negative?: string | undefined;
249
244
  wait?: boolean | undefined;
250
245
  }, {
251
246
  videoId: string;
252
247
  duration?: number | undefined;
253
- provider?: "grok" | "kling" | "omni" | "veo" | undefined;
248
+ provider?: "grok" | "kling" | "omni" | undefined;
254
249
  output?: string | undefined;
255
- veoModel?: string | undefined;
256
250
  prompt?: string | undefined;
257
251
  negative?: string | undefined;
258
252
  wait?: boolean | undefined;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Manifest tool handlers, called the way the MCP adapter calls them: args
3
+ * validated by the tool's own schema, then `execute` with a working
4
+ * directory. Provider-backed handlers run against mocked executors; the
5
+ * scene handlers run for real against a temp project.
6
+ */
7
+ export {};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module manifest
3
3
  * @description Aggregated tool manifest. Concatenation of all category files.
4
- * MCP server and Agent registry both consume this single export.
4
+ * The MCP server consumes this single export.
5
5
  */
6
6
  import type { AnyTool } from "../define-tool.js";
7
7
  import { sceneTools } from "./scene.js";
@@ -16,8 +16,7 @@ import { detectTools } from "./detect.js";
16
16
  import { timelineTools } from "./timeline.js";
17
17
  import { projectTools } from "./project.js";
18
18
  import { exportTools } from "./export.js";
19
- import { agentOnlyTools } from "./agent-only.js";
20
19
  import { guideTools } from "./walkthrough.js";
21
20
  import { statusTools } from "./status.js";
22
21
  export declare const manifest: readonly AnyTool[];
23
- export { sceneTools, audioTools, editTools, inspectTools, generateTools, storyboardTools, designTools, remixTools, detectTools, timelineTools, projectTools, exportTools, agentOnlyTools, guideTools, statusTools, };
22
+ export { sceneTools, audioTools, editTools, inspectTools, generateTools, storyboardTools, designTools, remixTools, detectTools, timelineTools, projectTools, exportTools, guideTools, statusTools, };