@vibeframe/cli 0.27.0 → 0.30.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 (118) hide show
  1. package/LICENSE +21 -0
  2. package/dist/agent/adapters/index.d.ts +1 -0
  3. package/dist/agent/adapters/index.d.ts.map +1 -1
  4. package/dist/agent/adapters/index.js +5 -0
  5. package/dist/agent/adapters/index.js.map +1 -1
  6. package/dist/agent/adapters/openrouter.d.ts +16 -0
  7. package/dist/agent/adapters/openrouter.d.ts.map +1 -0
  8. package/dist/agent/adapters/openrouter.js +100 -0
  9. package/dist/agent/adapters/openrouter.js.map +1 -0
  10. package/dist/agent/types.d.ts +1 -1
  11. package/dist/agent/types.d.ts.map +1 -1
  12. package/dist/commands/agent.d.ts.map +1 -1
  13. package/dist/commands/agent.js +3 -1
  14. package/dist/commands/agent.js.map +1 -1
  15. package/dist/commands/ai-edit-cli.d.ts.map +1 -1
  16. package/dist/commands/ai-edit-cli.js +18 -0
  17. package/dist/commands/ai-edit-cli.js.map +1 -1
  18. package/dist/commands/generate.js +14 -0
  19. package/dist/commands/generate.js.map +1 -1
  20. package/dist/commands/schema.d.ts +1 -0
  21. package/dist/commands/schema.d.ts.map +1 -1
  22. package/dist/commands/schema.js +122 -21
  23. package/dist/commands/schema.js.map +1 -1
  24. package/dist/commands/setup.js +5 -2
  25. package/dist/commands/setup.js.map +1 -1
  26. package/dist/config/schema.d.ts +2 -1
  27. package/dist/config/schema.d.ts.map +1 -1
  28. package/dist/config/schema.js +2 -0
  29. package/dist/config/schema.js.map +1 -1
  30. package/dist/index.js +0 -0
  31. package/package.json +16 -12
  32. package/.turbo/turbo-build.log +0 -4
  33. package/.turbo/turbo-lint.log +0 -21
  34. package/.turbo/turbo-test.log +0 -689
  35. package/src/agent/adapters/claude.ts +0 -143
  36. package/src/agent/adapters/gemini.ts +0 -159
  37. package/src/agent/adapters/index.ts +0 -61
  38. package/src/agent/adapters/ollama.ts +0 -231
  39. package/src/agent/adapters/openai.ts +0 -116
  40. package/src/agent/adapters/xai.ts +0 -119
  41. package/src/agent/index.ts +0 -251
  42. package/src/agent/memory/index.ts +0 -151
  43. package/src/agent/prompts/system.ts +0 -106
  44. package/src/agent/tools/ai-editing.ts +0 -845
  45. package/src/agent/tools/ai-generation.ts +0 -1073
  46. package/src/agent/tools/ai-pipeline.ts +0 -1055
  47. package/src/agent/tools/ai.ts +0 -21
  48. package/src/agent/tools/batch.ts +0 -429
  49. package/src/agent/tools/e2e.test.ts +0 -545
  50. package/src/agent/tools/export.ts +0 -184
  51. package/src/agent/tools/filesystem.ts +0 -237
  52. package/src/agent/tools/index.ts +0 -150
  53. package/src/agent/tools/integration.test.ts +0 -775
  54. package/src/agent/tools/media.ts +0 -697
  55. package/src/agent/tools/project.ts +0 -313
  56. package/src/agent/tools/timeline.ts +0 -951
  57. package/src/agent/types.ts +0 -68
  58. package/src/commands/agent.ts +0 -340
  59. package/src/commands/ai-analyze.ts +0 -429
  60. package/src/commands/ai-animated-caption.ts +0 -390
  61. package/src/commands/ai-audio.ts +0 -941
  62. package/src/commands/ai-broll.ts +0 -490
  63. package/src/commands/ai-edit-cli.ts +0 -658
  64. package/src/commands/ai-edit.ts +0 -1542
  65. package/src/commands/ai-fill-gaps.ts +0 -566
  66. package/src/commands/ai-helpers.ts +0 -65
  67. package/src/commands/ai-highlights.ts +0 -1303
  68. package/src/commands/ai-image.ts +0 -761
  69. package/src/commands/ai-motion.ts +0 -347
  70. package/src/commands/ai-narrate.ts +0 -451
  71. package/src/commands/ai-review.ts +0 -309
  72. package/src/commands/ai-script-pipeline-cli.ts +0 -1710
  73. package/src/commands/ai-script-pipeline.ts +0 -1365
  74. package/src/commands/ai-suggest-edit.ts +0 -264
  75. package/src/commands/ai-video-fx.ts +0 -445
  76. package/src/commands/ai-video.ts +0 -915
  77. package/src/commands/ai-viral.ts +0 -595
  78. package/src/commands/ai-visual-fx.ts +0 -601
  79. package/src/commands/ai.test.ts +0 -627
  80. package/src/commands/ai.ts +0 -307
  81. package/src/commands/analyze.ts +0 -282
  82. package/src/commands/audio.ts +0 -644
  83. package/src/commands/batch.test.ts +0 -279
  84. package/src/commands/batch.ts +0 -440
  85. package/src/commands/detect.ts +0 -329
  86. package/src/commands/doctor.ts +0 -237
  87. package/src/commands/edit-cmd.ts +0 -1014
  88. package/src/commands/export.ts +0 -918
  89. package/src/commands/generate.ts +0 -2146
  90. package/src/commands/media.ts +0 -177
  91. package/src/commands/output.ts +0 -142
  92. package/src/commands/pipeline.ts +0 -398
  93. package/src/commands/project.test.ts +0 -127
  94. package/src/commands/project.ts +0 -149
  95. package/src/commands/sanitize.ts +0 -60
  96. package/src/commands/schema.ts +0 -130
  97. package/src/commands/setup.ts +0 -509
  98. package/src/commands/timeline.test.ts +0 -499
  99. package/src/commands/timeline.ts +0 -529
  100. package/src/commands/validate.ts +0 -77
  101. package/src/config/config.test.ts +0 -197
  102. package/src/config/index.ts +0 -125
  103. package/src/config/schema.ts +0 -82
  104. package/src/engine/index.ts +0 -2
  105. package/src/engine/project.test.ts +0 -702
  106. package/src/engine/project.ts +0 -439
  107. package/src/index.ts +0 -146
  108. package/src/utils/api-key.test.ts +0 -41
  109. package/src/utils/api-key.ts +0 -247
  110. package/src/utils/audio.ts +0 -83
  111. package/src/utils/exec-safe.ts +0 -75
  112. package/src/utils/first-run.ts +0 -52
  113. package/src/utils/provider-resolver.ts +0 -56
  114. package/src/utils/remotion.ts +0 -951
  115. package/src/utils/subtitle.test.ts +0 -227
  116. package/src/utils/subtitle.ts +0 -169
  117. package/src/utils/tty.ts +0 -196
  118. package/tsconfig.json +0 -20
@@ -1,313 +0,0 @@
1
- /**
2
- * Project Tools - Create, open, save, and manage projects
3
- */
4
-
5
- import { readFile, writeFile, stat } from "node:fs/promises";
6
- import { resolve } from "node:path";
7
- import { Project, type ProjectFile } from "../../engine/index.js";
8
- import type { ToolRegistry, ToolHandler } from "./index.js";
9
- import type { ToolDefinition, ToolResult } from "../types.js";
10
-
11
- // Tool Definitions
12
- const projectCreateDef: ToolDefinition = {
13
- name: "project_create",
14
- description: "Create a new video project",
15
- parameters: {
16
- type: "object",
17
- properties: {
18
- name: {
19
- type: "string",
20
- description: "Project name",
21
- },
22
- output: {
23
- type: "string",
24
- description: "Output file path (default: ./project.vibe.json)",
25
- },
26
- aspectRatio: {
27
- type: "string",
28
- description: "Aspect ratio (16:9, 9:16, 1:1, 4:5)",
29
- enum: ["16:9", "9:16", "1:1", "4:5"],
30
- },
31
- fps: {
32
- type: "number",
33
- description: "Frame rate (default: 30)",
34
- },
35
- },
36
- required: ["name"],
37
- },
38
- };
39
-
40
- const projectInfoDef: ToolDefinition = {
41
- name: "project_info",
42
- description: "Get information about a project",
43
- parameters: {
44
- type: "object",
45
- properties: {
46
- path: {
47
- type: "string",
48
- description: "Project file path",
49
- },
50
- },
51
- required: ["path"],
52
- },
53
- };
54
-
55
- const projectSetDef: ToolDefinition = {
56
- name: "project_set",
57
- description: "Update project settings",
58
- parameters: {
59
- type: "object",
60
- properties: {
61
- path: {
62
- type: "string",
63
- description: "Project file path",
64
- },
65
- name: {
66
- type: "string",
67
- description: "New project name",
68
- },
69
- aspectRatio: {
70
- type: "string",
71
- description: "New aspect ratio",
72
- enum: ["16:9", "9:16", "1:1", "4:5"],
73
- },
74
- fps: {
75
- type: "number",
76
- description: "New frame rate",
77
- },
78
- },
79
- required: ["path"],
80
- },
81
- };
82
-
83
- const projectOpenDef: ToolDefinition = {
84
- name: "project_open",
85
- description: "Open an existing project and set it as the current context",
86
- parameters: {
87
- type: "object",
88
- properties: {
89
- path: {
90
- type: "string",
91
- description: "Project file path",
92
- },
93
- },
94
- required: ["path"],
95
- },
96
- };
97
-
98
- const projectSaveDef: ToolDefinition = {
99
- name: "project_save",
100
- description: "Save the current project",
101
- parameters: {
102
- type: "object",
103
- properties: {
104
- path: {
105
- type: "string",
106
- description: "Project file path (uses context if not provided)",
107
- },
108
- },
109
- required: [],
110
- },
111
- };
112
-
113
- // Helper function to resolve project path
114
- async function resolveProjectPath(inputPath: string, cwd: string): Promise<string> {
115
- const filePath = resolve(cwd, inputPath);
116
-
117
- try {
118
- const stats = await stat(filePath);
119
- if (stats.isDirectory()) {
120
- return resolve(filePath, "project.vibe.json");
121
- }
122
- } catch {
123
- // Path doesn't exist - will be handled by caller
124
- }
125
-
126
- return filePath;
127
- }
128
-
129
- // Tool Handlers
130
- const projectCreate: ToolHandler = async (args, context): Promise<ToolResult> => {
131
- const name = args.name as string;
132
- const output = (args.output as string) || "./project.vibe.json";
133
- const aspectRatio = (args.aspectRatio as string) || "16:9";
134
- const fps = (args.fps as number) || 30;
135
-
136
- try {
137
- const project = new Project(name);
138
- project.setAspectRatio(aspectRatio as "16:9" | "9:16" | "1:1" | "4:5");
139
- project.setFrameRate(fps);
140
-
141
- const outputPath = resolve(context.workingDirectory, output);
142
- const data = JSON.stringify(project.toJSON(), null, 2);
143
- await writeFile(outputPath, data, "utf-8");
144
-
145
- // Update context
146
- context.projectPath = outputPath;
147
-
148
- return {
149
- toolCallId: "",
150
- success: true,
151
- output: `Project created: ${outputPath}\nName: ${name}\nAspect Ratio: ${aspectRatio}\nFrame Rate: ${fps} fps`,
152
- };
153
- } catch (error) {
154
- return {
155
- toolCallId: "",
156
- success: false,
157
- output: "",
158
- error: `Failed to create project: ${error instanceof Error ? error.message : String(error)}`,
159
- };
160
- }
161
- };
162
-
163
- const projectInfo: ToolHandler = async (args, context): Promise<ToolResult> => {
164
- const path = (args.path || args.project) as string;
165
-
166
- try {
167
- const filePath = await resolveProjectPath(path, context.workingDirectory);
168
- const content = await readFile(filePath, "utf-8");
169
- const data: ProjectFile = JSON.parse(content);
170
- const project = Project.fromJSON(data);
171
-
172
- const summary = project.getSummary();
173
- const meta = project.getMeta();
174
-
175
- const info = [
176
- `Project: ${summary.name}`,
177
- `Duration: ${summary.duration.toFixed(1)}s`,
178
- `Aspect Ratio: ${summary.aspectRatio}`,
179
- `Frame Rate: ${summary.frameRate} fps`,
180
- `Tracks: ${summary.trackCount}`,
181
- `Clips: ${summary.clipCount}`,
182
- `Sources: ${summary.sourceCount}`,
183
- `Created: ${meta.createdAt.toLocaleString()}`,
184
- `Updated: ${meta.updatedAt.toLocaleString()}`,
185
- ].join("\n");
186
-
187
- return {
188
- toolCallId: "",
189
- success: true,
190
- output: info,
191
- };
192
- } catch (error) {
193
- return {
194
- toolCallId: "",
195
- success: false,
196
- output: "",
197
- error: `Failed to load project: ${error instanceof Error ? error.message : String(error)}`,
198
- };
199
- }
200
- };
201
-
202
- const projectSet: ToolHandler = async (args, context): Promise<ToolResult> => {
203
- const path = (args.path || args.project) as string;
204
- const updates: string[] = [];
205
-
206
- try {
207
- const filePath = await resolveProjectPath(path, context.workingDirectory);
208
- const content = await readFile(filePath, "utf-8");
209
- const data: ProjectFile = JSON.parse(content);
210
- const project = Project.fromJSON(data);
211
-
212
- if (args.name) {
213
- project.setName(args.name as string);
214
- updates.push(`Name: ${args.name}`);
215
- }
216
- if (args.aspectRatio) {
217
- project.setAspectRatio(args.aspectRatio as "16:9" | "9:16" | "1:1" | "4:5");
218
- updates.push(`Aspect Ratio: ${args.aspectRatio}`);
219
- }
220
- if (args.fps) {
221
- project.setFrameRate(args.fps as number);
222
- updates.push(`Frame Rate: ${args.fps} fps`);
223
- }
224
-
225
- await writeFile(filePath, JSON.stringify(project.toJSON(), null, 2), "utf-8");
226
-
227
- return {
228
- toolCallId: "",
229
- success: true,
230
- output: `Project updated:\n${updates.join("\n")}`,
231
- };
232
- } catch (error) {
233
- return {
234
- toolCallId: "",
235
- success: false,
236
- output: "",
237
- error: `Failed to update project: ${error instanceof Error ? error.message : String(error)}`,
238
- };
239
- }
240
- };
241
-
242
- const projectOpen: ToolHandler = async (args, context): Promise<ToolResult> => {
243
- const path = (args.path || args.project) as string;
244
-
245
- try {
246
- const filePath = await resolveProjectPath(path, context.workingDirectory);
247
- const content = await readFile(filePath, "utf-8");
248
- const data: ProjectFile = JSON.parse(content);
249
- const project = Project.fromJSON(data);
250
-
251
- // Update context
252
- context.projectPath = filePath;
253
-
254
- const summary = project.getSummary();
255
- return {
256
- toolCallId: "",
257
- success: true,
258
- output: `Project opened: ${filePath}\nName: ${summary.name}\nClips: ${summary.clipCount}\nDuration: ${summary.duration.toFixed(1)}s`,
259
- };
260
- } catch (error) {
261
- return {
262
- toolCallId: "",
263
- success: false,
264
- output: "",
265
- error: `Failed to open project: ${error instanceof Error ? error.message : String(error)}`,
266
- };
267
- }
268
- };
269
-
270
- const projectSave: ToolHandler = async (args, context): Promise<ToolResult> => {
271
- const path = (args.path as string) || context.projectPath;
272
-
273
- if (!path) {
274
- return {
275
- toolCallId: "",
276
- success: false,
277
- output: "",
278
- error: "No project path specified and no project in context",
279
- };
280
- }
281
-
282
- try {
283
- const filePath = await resolveProjectPath(path, context.workingDirectory);
284
- const content = await readFile(filePath, "utf-8");
285
- const data: ProjectFile = JSON.parse(content);
286
- const project = Project.fromJSON(data);
287
-
288
- // Update timestamp and save
289
- await writeFile(filePath, JSON.stringify(project.toJSON(), null, 2), "utf-8");
290
-
291
- return {
292
- toolCallId: "",
293
- success: true,
294
- output: `Project saved: ${filePath}`,
295
- };
296
- } catch (error) {
297
- return {
298
- toolCallId: "",
299
- success: false,
300
- output: "",
301
- error: `Failed to save project: ${error instanceof Error ? error.message : String(error)}`,
302
- };
303
- }
304
- };
305
-
306
- // Registration function
307
- export function registerProjectTools(registry: ToolRegistry): void {
308
- registry.register(projectCreateDef, projectCreate);
309
- registry.register(projectInfoDef, projectInfo);
310
- registry.register(projectSetDef, projectSet);
311
- registry.register(projectOpenDef, projectOpen);
312
- registry.register(projectSaveDef, projectSave);
313
- }