@kenkaiiii/gg-editor 0.1.0 → 0.3.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/cli.js +37 -5
- package/dist/cli.js.map +1 -1
- package/dist/core/doctor-render.d.ts +9 -0
- package/dist/core/doctor-render.d.ts.map +1 -0
- package/dist/core/doctor-render.js +145 -0
- package/dist/core/doctor-render.js.map +1 -0
- package/dist/core/doctor-render.test.d.ts +2 -0
- package/dist/core/doctor-render.test.d.ts.map +1 -0
- package/dist/core/doctor-render.test.js +151 -0
- package/dist/core/doctor-render.test.js.map +1 -0
- package/dist/core/doctor-runner.d.ts +15 -0
- package/dist/core/doctor-runner.d.ts.map +1 -0
- package/dist/core/doctor-runner.js +212 -0
- package/dist/core/doctor-runner.js.map +1 -0
- package/dist/core/doctor.d.ts +92 -0
- package/dist/core/doctor.d.ts.map +1 -0
- package/dist/core/doctor.js +429 -0
- package/dist/core/doctor.js.map +1 -0
- package/dist/core/doctor.test.d.ts +2 -0
- package/dist/core/doctor.test.d.ts.map +1 -0
- package/dist/core/doctor.test.js +143 -0
- package/dist/core/doctor.test.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/transcribe.d.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* First-run doctor — environment probes + actionable install hints.
|
|
3
|
+
*
|
|
4
|
+
* The CLI runs onboarding on first launch (no `~/.gg/auth.json` and no
|
|
5
|
+
* `~/.gg/onboarded-ggeditor` marker). The same checks are exposed via
|
|
6
|
+
* `ggeditor doctor` so users can re-run it any time.
|
|
7
|
+
*
|
|
8
|
+
* Design rules:
|
|
9
|
+
* - Probes only. We never auto-install anything — surprise sudo
|
|
10
|
+
* prompts are worse than a missing dep.
|
|
11
|
+
* - Each check carries `severity`:
|
|
12
|
+
* block — nothing meaningful works without it (none currently;
|
|
13
|
+
* the agent can run with zero deps)
|
|
14
|
+
* required — most tools need it (ffmpeg / ffprobe)
|
|
15
|
+
* optional — unlocks a feature group (openai-key, resolve,
|
|
16
|
+
* premiere, whisper-cpp, whisperx)
|
|
17
|
+
* info — purely informational (auth status)
|
|
18
|
+
* - Each check tells the user EXACTLY what to do to fix it, including
|
|
19
|
+
* the platform-appropriate install command.
|
|
20
|
+
* - Pure module — no I/O writes, no side effects beyond `spawnSync` /
|
|
21
|
+
* `existsSync` probes.
|
|
22
|
+
*/
|
|
23
|
+
import { existsSync, statSync } from "node:fs";
|
|
24
|
+
import { homedir, platform } from "node:os";
|
|
25
|
+
import { join } from "node:path";
|
|
26
|
+
import { spawnSync } from "node:child_process";
|
|
27
|
+
import { detectHost } from "./hosts/detect.js";
|
|
28
|
+
import { checkFfmpeg, checkFfprobe } from "./media/ffmpeg.js";
|
|
29
|
+
const ONBOARDED_MARKER = "onboarded-ggeditor";
|
|
30
|
+
export function onboardedMarkerPath(home = homedir()) {
|
|
31
|
+
return join(home, ".gg", ONBOARDED_MARKER);
|
|
32
|
+
}
|
|
33
|
+
export function isOnboarded(home = homedir()) {
|
|
34
|
+
try {
|
|
35
|
+
return statSync(onboardedMarkerPath(home)).isFile();
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Run every check. Synchronous and quick — only spawns short-lived
|
|
43
|
+
* `--version` style probes.
|
|
44
|
+
*/
|
|
45
|
+
export function runDoctor(home = homedir()) {
|
|
46
|
+
const checks = [
|
|
47
|
+
checkFfmpegProbe(),
|
|
48
|
+
checkFfprobeProbe(),
|
|
49
|
+
checkOpenAIKey(),
|
|
50
|
+
checkAnthropicKey(),
|
|
51
|
+
checkPython(),
|
|
52
|
+
checkResolve(),
|
|
53
|
+
checkPremiere(),
|
|
54
|
+
checkWhisperCpp(),
|
|
55
|
+
checkWhisperX(),
|
|
56
|
+
checkAuthFile(home),
|
|
57
|
+
];
|
|
58
|
+
const ready = checks.every((c) => c.severity !== "required" || c.status === "ok");
|
|
59
|
+
return {
|
|
60
|
+
checks,
|
|
61
|
+
ready,
|
|
62
|
+
markerPath: onboardedMarkerPath(home),
|
|
63
|
+
onboarded: isOnboarded(home),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
// ── Individual probes ──────────────────────────────────────
|
|
67
|
+
function checkFfmpegProbe() {
|
|
68
|
+
const ok = checkFfmpeg();
|
|
69
|
+
return {
|
|
70
|
+
id: "ffmpeg",
|
|
71
|
+
label: "ffmpeg",
|
|
72
|
+
status: ok ? "ok" : "missing",
|
|
73
|
+
severity: "required",
|
|
74
|
+
detail: ok ? versionLine("ffmpeg") : "not on PATH",
|
|
75
|
+
unlocks: "Most tools (transcoding, captions, color grading, silence/filler cuts, transitions, " +
|
|
76
|
+
"audio mixing, GIF/thumbnail generation). ~70% of the toolkit.",
|
|
77
|
+
fix: ok ? undefined : ffmpegInstallHint(),
|
|
78
|
+
installable: ok
|
|
79
|
+
? undefined
|
|
80
|
+
: buildInstallable({
|
|
81
|
+
pkg: { darwin: "ffmpeg", linux: "ffmpeg", win32: "Gyan.FFmpeg" },
|
|
82
|
+
label: "Install ffmpeg",
|
|
83
|
+
}),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function checkFfprobeProbe() {
|
|
87
|
+
const ok = checkFfprobe();
|
|
88
|
+
return {
|
|
89
|
+
id: "ffprobe",
|
|
90
|
+
label: "ffprobe",
|
|
91
|
+
status: ok ? "ok" : "missing",
|
|
92
|
+
severity: "required",
|
|
93
|
+
detail: ok ? versionLine("ffprobe") : "not on PATH",
|
|
94
|
+
unlocks: "probe_media (fps / duration / codec detection — runs on every input file).",
|
|
95
|
+
fix: ok ? undefined : ffmpegInstallHint(),
|
|
96
|
+
// ffprobe ships in the same Homebrew/winget/apt package as ffmpeg.
|
|
97
|
+
installable: ok
|
|
98
|
+
? undefined
|
|
99
|
+
: buildInstallable({
|
|
100
|
+
pkg: { darwin: "ffmpeg", linux: "ffmpeg", win32: "Gyan.FFmpeg" },
|
|
101
|
+
label: "Install ffmpeg (includes ffprobe)",
|
|
102
|
+
}),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function checkOpenAIKey() {
|
|
106
|
+
const present = !!process.env.OPENAI_API_KEY;
|
|
107
|
+
return {
|
|
108
|
+
id: "openai-key",
|
|
109
|
+
label: "OPENAI_API_KEY",
|
|
110
|
+
status: present ? "ok" : "missing",
|
|
111
|
+
severity: "optional",
|
|
112
|
+
detail: present ? "set in environment" : "not set",
|
|
113
|
+
unlocks: "Vision tools: analyze_hook (retention scoring), score_shot, color_match, " +
|
|
114
|
+
"grade_skin_tones, match_clip_color, and the OpenAI transcription backend.",
|
|
115
|
+
fix: present
|
|
116
|
+
? undefined
|
|
117
|
+
: "Get a key at https://platform.openai.com/api-keys, then:\n" +
|
|
118
|
+
" export OPENAI_API_KEY=sk-...\n" +
|
|
119
|
+
" # add to ~/.zshrc / ~/.bashrc to persist",
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function checkAnthropicKey() {
|
|
123
|
+
// Anthropic auth normally goes through OAuth (~/.gg/auth.json). The env
|
|
124
|
+
// var only matters for users who prefer raw API keys. We mark it as
|
|
125
|
+
// info — auth status is what really matters.
|
|
126
|
+
const present = !!process.env.ANTHROPIC_API_KEY;
|
|
127
|
+
return {
|
|
128
|
+
id: "anthropic-key",
|
|
129
|
+
label: "ANTHROPIC_API_KEY",
|
|
130
|
+
status: present ? "ok" : "missing",
|
|
131
|
+
severity: "info",
|
|
132
|
+
detail: present
|
|
133
|
+
? "set in environment (overrides OAuth token if present)"
|
|
134
|
+
: "not set (OAuth is the recommended path)",
|
|
135
|
+
unlocks: "Direct Anthropic API auth without OAuth. Most users should `ggeditor login` instead.",
|
|
136
|
+
fix: undefined,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function checkPython() {
|
|
140
|
+
const candidates = platform() === "win32" ? ["py", "python", "python3"] : ["python3", "python"];
|
|
141
|
+
for (const cmd of candidates) {
|
|
142
|
+
const r = spawnSync(cmd, cmd === "py" ? ["-3", "--version"] : ["--version"], {
|
|
143
|
+
encoding: "utf8",
|
|
144
|
+
});
|
|
145
|
+
if (r.status === 0) {
|
|
146
|
+
const out = (r.stdout || r.stderr).trim();
|
|
147
|
+
return {
|
|
148
|
+
id: "python",
|
|
149
|
+
label: "Python 3",
|
|
150
|
+
status: "ok",
|
|
151
|
+
severity: "optional",
|
|
152
|
+
detail: `${cmd}: ${out}`,
|
|
153
|
+
unlocks: "DaVinci Resolve scripting bridge (host integration). Without Python, file-only " +
|
|
154
|
+
"mode still works.",
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
id: "python",
|
|
160
|
+
label: "Python 3",
|
|
161
|
+
status: "missing",
|
|
162
|
+
severity: "optional",
|
|
163
|
+
detail: "no python3 / python / py interpreter found",
|
|
164
|
+
unlocks: "DaVinci Resolve scripting bridge (host integration). File-only mode works without it.",
|
|
165
|
+
fix: platform() === "darwin"
|
|
166
|
+
? "brew install python@3.12 # or use python.org installer"
|
|
167
|
+
: platform() === "linux"
|
|
168
|
+
? "sudo apt install python3 # debian/ubuntu — your distro's package manager otherwise"
|
|
169
|
+
: "winget install Python.Python.3 # or python.org installer",
|
|
170
|
+
installable: buildInstallable({
|
|
171
|
+
pkg: { darwin: "python@3.12", linux: "python3", win32: "Python.Python.3" },
|
|
172
|
+
label: "Install Python 3",
|
|
173
|
+
}),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function checkResolve() {
|
|
177
|
+
const detected = detectHost();
|
|
178
|
+
if (detected.name === "resolve") {
|
|
179
|
+
return {
|
|
180
|
+
id: "resolve",
|
|
181
|
+
label: "DaVinci Resolve",
|
|
182
|
+
status: "ok",
|
|
183
|
+
severity: "optional",
|
|
184
|
+
detail: "running",
|
|
185
|
+
unlocks: "Live timeline editing on Resolve: cut, marker, append, color grade, smart reframe, render.",
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
// Resolve isn't running — but is it INSTALLED? Check the canonical
|
|
189
|
+
// install path so the message is precise.
|
|
190
|
+
const installed = isResolveInstalled();
|
|
191
|
+
return {
|
|
192
|
+
id: "resolve",
|
|
193
|
+
label: "DaVinci Resolve",
|
|
194
|
+
status: "missing",
|
|
195
|
+
severity: "optional",
|
|
196
|
+
detail: installed ? "installed but not running" : "not installed",
|
|
197
|
+
unlocks: "Live timeline editing on Resolve. Open Resolve before launching ggeditor (or " +
|
|
198
|
+
"mid-session — the agent re-detects every 2s).",
|
|
199
|
+
fix: installed
|
|
200
|
+
? "Open DaVinci Resolve, then re-run ggeditor (or just keep going — ggeditor will pick " +
|
|
201
|
+
"it up automatically within a few seconds)."
|
|
202
|
+
: "Install the free version from https://www.blackmagicdesign.com/products/davinciresolve",
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function checkPremiere() {
|
|
206
|
+
const detected = detectHost();
|
|
207
|
+
if (detected.name === "premiere") {
|
|
208
|
+
return {
|
|
209
|
+
id: "premiere",
|
|
210
|
+
label: "Adobe Premiere Pro",
|
|
211
|
+
status: "ok",
|
|
212
|
+
severity: "optional",
|
|
213
|
+
detail: "running",
|
|
214
|
+
unlocks: "Live timeline editing on Premiere via the gg-editor UXP panel (insert / cut / marker " +
|
|
215
|
+
"/ render). Requires the panel installed (`ggeditor-premiere-panel install`).",
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
// Premiere is paid; we don't try to detect installation. Just note it.
|
|
219
|
+
return {
|
|
220
|
+
id: "premiere",
|
|
221
|
+
label: "Adobe Premiere Pro",
|
|
222
|
+
status: "missing",
|
|
223
|
+
severity: "optional",
|
|
224
|
+
detail: "not running",
|
|
225
|
+
unlocks: "Live timeline editing on Premiere. Open Premiere + install the gg-editor panel.",
|
|
226
|
+
fix: "Open Premiere Pro, then install the panel:\n npx @kenkaiiii/gg-editor-premiere-panel install",
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
function checkWhisperCpp() {
|
|
230
|
+
for (const cmd of ["whisper-cli", "whisper", "main"]) {
|
|
231
|
+
const r = spawnSync(cmd, ["--help"], { encoding: "utf8" });
|
|
232
|
+
if (r.status === 0 && (r.stdout + r.stderr).toLowerCase().includes("whisper")) {
|
|
233
|
+
return {
|
|
234
|
+
id: "whisper-cpp",
|
|
235
|
+
label: "whisper.cpp",
|
|
236
|
+
status: "ok",
|
|
237
|
+
severity: "optional",
|
|
238
|
+
detail: `${cmd} on PATH`,
|
|
239
|
+
unlocks: "Local transcription (free, fast, private). Without it, transcribe falls back to " +
|
|
240
|
+
"the OpenAI API (requires OPENAI_API_KEY).",
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
id: "whisper-cpp",
|
|
246
|
+
label: "whisper.cpp",
|
|
247
|
+
status: "missing",
|
|
248
|
+
severity: "optional",
|
|
249
|
+
detail: "not on PATH",
|
|
250
|
+
unlocks: "Local transcription. Without it, transcribe uses the OpenAI API (requires OPENAI_API_KEY).",
|
|
251
|
+
fix: platform() === "darwin"
|
|
252
|
+
? "brew install whisper-cpp # then download a model from https://huggingface.co/ggerganov/whisper.cpp"
|
|
253
|
+
: "Build from source: https://github.com/ggml-org/whisper.cpp",
|
|
254
|
+
// Only Homebrew packages whisper.cpp cleanly. Linux / Windows users
|
|
255
|
+
// need to build from source — we leave them with the `fix` string.
|
|
256
|
+
installable: buildInstallable({
|
|
257
|
+
pkg: { darwin: "whisper-cpp" },
|
|
258
|
+
label: "Install whisper.cpp (you'll still need to download a model)",
|
|
259
|
+
}),
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function checkWhisperX() {
|
|
263
|
+
const r = spawnSync("whisperx", ["--help"], { encoding: "utf8" });
|
|
264
|
+
const ok = r.status === 0;
|
|
265
|
+
const hfToken = !!process.env.HF_TOKEN;
|
|
266
|
+
if (ok && hfToken) {
|
|
267
|
+
return {
|
|
268
|
+
id: "whisperx",
|
|
269
|
+
label: "whisperx + HF_TOKEN",
|
|
270
|
+
status: "ok",
|
|
271
|
+
severity: "optional",
|
|
272
|
+
detail: "whisperx on PATH, HF_TOKEN set",
|
|
273
|
+
unlocks: "Speaker diarization (transcribe with diarize=true). Required for read_transcript with " +
|
|
274
|
+
"speaker filters.",
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
if (ok && !hfToken) {
|
|
278
|
+
return {
|
|
279
|
+
id: "whisperx",
|
|
280
|
+
label: "whisperx + HF_TOKEN",
|
|
281
|
+
status: "warn",
|
|
282
|
+
severity: "optional",
|
|
283
|
+
detail: "whisperx on PATH but HF_TOKEN not set",
|
|
284
|
+
unlocks: "Speaker diarization (transcribe with diarize=true).",
|
|
285
|
+
fix: "Get a token at https://huggingface.co/settings/tokens (free), then:\n" +
|
|
286
|
+
" export HF_TOKEN=hf_...\n" +
|
|
287
|
+
"Also accept the pyannote model terms: https://huggingface.co/pyannote/speaker-diarization-3.1",
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
return {
|
|
291
|
+
id: "whisperx",
|
|
292
|
+
label: "whisperx + HF_TOKEN",
|
|
293
|
+
status: "missing",
|
|
294
|
+
severity: "optional",
|
|
295
|
+
detail: "whisperx not on PATH",
|
|
296
|
+
unlocks: "Speaker diarization (transcribe with diarize=true).",
|
|
297
|
+
fix: "pip install whisperx\n" +
|
|
298
|
+
"export HF_TOKEN=hf_... # https://huggingface.co/settings/tokens\n" +
|
|
299
|
+
"Then accept https://huggingface.co/pyannote/speaker-diarization-3.1 model terms.",
|
|
300
|
+
// pip install handles the package; HF_TOKEN + license acceptance
|
|
301
|
+
// remain manual (handled via the `fix` text on the post-install run).
|
|
302
|
+
installable: hasManager("pip3")
|
|
303
|
+
? {
|
|
304
|
+
label: "Install whisperx (you'll still need HF_TOKEN + accept model terms)",
|
|
305
|
+
command: "pip3",
|
|
306
|
+
args: ["install", "--user", "whisperx"],
|
|
307
|
+
manager: "pip",
|
|
308
|
+
}
|
|
309
|
+
: hasManager("pip")
|
|
310
|
+
? {
|
|
311
|
+
label: "Install whisperx (you'll still need HF_TOKEN + accept model terms)",
|
|
312
|
+
command: "pip",
|
|
313
|
+
args: ["install", "--user", "whisperx"],
|
|
314
|
+
manager: "pip",
|
|
315
|
+
}
|
|
316
|
+
: undefined,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
function checkAuthFile(home) {
|
|
320
|
+
const path = join(home, ".gg", "auth.json");
|
|
321
|
+
const exists = (() => {
|
|
322
|
+
try {
|
|
323
|
+
return statSync(path).isFile();
|
|
324
|
+
}
|
|
325
|
+
catch {
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
})();
|
|
329
|
+
return {
|
|
330
|
+
id: "auth",
|
|
331
|
+
label: "Auth (~/.gg/auth.json)",
|
|
332
|
+
status: exists ? "ok" : "missing",
|
|
333
|
+
severity: "required",
|
|
334
|
+
detail: exists ? `present at ${path}` : "not configured",
|
|
335
|
+
unlocks: "The agent itself. Without auth, ggeditor can't talk to a model provider.",
|
|
336
|
+
fix: exists
|
|
337
|
+
? undefined
|
|
338
|
+
: "Run `ggeditor login` and pick a provider (Anthropic OAuth recommended; OpenAI / GLM / " +
|
|
339
|
+
"Moonshot also supported). Auth is shared with ggcoder via ~/.gg/auth.json — log in once.",
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
// ── Helpers ────────────────────────────────────────────────
|
|
343
|
+
function versionLine(cmd) {
|
|
344
|
+
const r = spawnSync(cmd, ["-version"], { encoding: "utf8" });
|
|
345
|
+
if (r.status !== 0)
|
|
346
|
+
return "found";
|
|
347
|
+
const first = (r.stdout.split(/\r?\n/)[0] || "").trim();
|
|
348
|
+
return first || "found";
|
|
349
|
+
}
|
|
350
|
+
function ffmpegInstallHint() {
|
|
351
|
+
switch (platform()) {
|
|
352
|
+
case "darwin":
|
|
353
|
+
return "brew install ffmpeg";
|
|
354
|
+
case "linux":
|
|
355
|
+
return "sudo apt install ffmpeg # debian/ubuntu — your distro's package manager otherwise";
|
|
356
|
+
case "win32":
|
|
357
|
+
return "winget install ffmpeg # or scoop install ffmpeg";
|
|
358
|
+
default:
|
|
359
|
+
return "Install ffmpeg from https://ffmpeg.org/download.html";
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* True when `cmd --version` (or `--help` for managers that don't have
|
|
364
|
+
* a version flag) exits 0. Cached for the lifetime of the process so we
|
|
365
|
+
* don't re-spawn the same probe across multiple checks.
|
|
366
|
+
*/
|
|
367
|
+
const _managerCache = new Map();
|
|
368
|
+
function hasManager(cmd) {
|
|
369
|
+
const cached = _managerCache.get(cmd);
|
|
370
|
+
if (cached !== undefined)
|
|
371
|
+
return cached;
|
|
372
|
+
const r = spawnSync(cmd, ["--version"], { encoding: "utf8" });
|
|
373
|
+
const ok = r.status === 0;
|
|
374
|
+
_managerCache.set(cmd, ok);
|
|
375
|
+
return ok;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Build an InstallableHint for a package whose name matches across the
|
|
379
|
+
* common managers we support. Returns undefined when no supported
|
|
380
|
+
* manager is available on this platform — in which case the check just
|
|
381
|
+
* surfaces a `fix` string instead.
|
|
382
|
+
*/
|
|
383
|
+
function buildInstallable(opts) {
|
|
384
|
+
const p = platform();
|
|
385
|
+
if (p === "darwin" && opts.pkg.darwin && hasManager("brew")) {
|
|
386
|
+
return {
|
|
387
|
+
label: opts.label,
|
|
388
|
+
command: "brew",
|
|
389
|
+
args: ["install", opts.pkg.darwin],
|
|
390
|
+
manager: "homebrew",
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
if (p === "linux" && opts.pkg.linux && hasManager("apt")) {
|
|
394
|
+
return {
|
|
395
|
+
label: opts.label,
|
|
396
|
+
command: "sudo",
|
|
397
|
+
args: ["apt", "install", "-y", opts.pkg.linux],
|
|
398
|
+
manager: "apt",
|
|
399
|
+
needsSudo: true,
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
if (p === "win32" && opts.pkg.win32 && hasManager("winget")) {
|
|
403
|
+
return {
|
|
404
|
+
label: opts.label,
|
|
405
|
+
command: "winget",
|
|
406
|
+
args: [
|
|
407
|
+
"install",
|
|
408
|
+
"--id",
|
|
409
|
+
opts.pkg.win32,
|
|
410
|
+
"-e",
|
|
411
|
+
"--accept-source-agreements",
|
|
412
|
+
"--accept-package-agreements",
|
|
413
|
+
],
|
|
414
|
+
manager: "winget",
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
return undefined;
|
|
418
|
+
}
|
|
419
|
+
function isResolveInstalled() {
|
|
420
|
+
if (platform() === "darwin") {
|
|
421
|
+
return existsSync("/Applications/DaVinci Resolve/DaVinci Resolve.app");
|
|
422
|
+
}
|
|
423
|
+
if (platform() === "win32") {
|
|
424
|
+
return existsSync("C:\\Program Files\\Blackmagic Design\\DaVinci Resolve\\Resolve.exe");
|
|
425
|
+
}
|
|
426
|
+
// Linux: Resolve installs into /opt/resolve by default.
|
|
427
|
+
return existsSync("/opt/resolve/bin/resolve");
|
|
428
|
+
}
|
|
429
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/core/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EA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,CAAC;IACD,IAAI,CAAC,KAAK,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5D,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE;gBACJ,SAAS;gBACT,MAAM;gBACN,IAAI,CAAC,GAAG,CAAC,KAAK;gBACd,IAAI;gBACJ,4BAA4B;gBAC5B,6BAA6B;aAC9B;YACD,OAAO,EAAE,QAAQ;SAClB,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,kBAAkB;IACzB,IAAI,QAAQ,EAAE,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,UAAU,CAAC,mDAAmD,CAAC,CAAC;IACzE,CAAC;IACD,IAAI,QAAQ,EAAE,KAAK,OAAO,EAAE,CAAC;QAC3B,OAAO,UAAU,CAAC,oEAAoE,CAAC,CAAC;IAC1F,CAAC;IACD,wDAAwD;IACxD,OAAO,UAAU,CAAC,0BAA0B,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.test.d.ts","sourceRoot":"","sources":["../../src/core/doctor.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
import { isOnboarded, onboardedMarkerPath, runDoctor } from "./doctor.js";
|
|
6
|
+
/**
|
|
7
|
+
* The doctor module is mostly env probes; we don't try to mock spawn.
|
|
8
|
+
* What we DO test is:
|
|
9
|
+
* - Every check is present and well-formed.
|
|
10
|
+
* - severity / status semantics are consistent.
|
|
11
|
+
* - The marker file plumbing works against a synthetic home dir.
|
|
12
|
+
* - `ready` reflects required-check status correctly.
|
|
13
|
+
*/
|
|
14
|
+
describe("runDoctor", () => {
|
|
15
|
+
it("returns a check for every documented id", () => {
|
|
16
|
+
const r = runDoctor();
|
|
17
|
+
const ids = r.checks.map((c) => c.id).sort();
|
|
18
|
+
expect(ids).toEqual([
|
|
19
|
+
"anthropic-key",
|
|
20
|
+
"auth",
|
|
21
|
+
"ffmpeg",
|
|
22
|
+
"ffprobe",
|
|
23
|
+
"openai-key",
|
|
24
|
+
"premiere",
|
|
25
|
+
"python",
|
|
26
|
+
"resolve",
|
|
27
|
+
"whisper-cpp",
|
|
28
|
+
"whisperx",
|
|
29
|
+
].sort());
|
|
30
|
+
});
|
|
31
|
+
it("every check has label / detail / unlocks populated", () => {
|
|
32
|
+
const r = runDoctor();
|
|
33
|
+
for (const c of r.checks) {
|
|
34
|
+
expect(c.label.length).toBeGreaterThan(0);
|
|
35
|
+
expect(c.label.length).toBeLessThanOrEqual(40);
|
|
36
|
+
expect(c.detail.length).toBeGreaterThan(0);
|
|
37
|
+
expect(c.unlocks.length).toBeGreaterThan(0);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
it("only checks with status='missing' or 'warn' carry a fix message", () => {
|
|
41
|
+
const r = runDoctor();
|
|
42
|
+
for (const c of r.checks) {
|
|
43
|
+
if (c.status === "ok") {
|
|
44
|
+
expect(c.fix).toBeUndefined();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
it("ready === true only when every required check is ok", () => {
|
|
49
|
+
const r = runDoctor();
|
|
50
|
+
const requiredOk = r.checks
|
|
51
|
+
.filter((c) => c.severity === "required")
|
|
52
|
+
.every((c) => c.status === "ok");
|
|
53
|
+
expect(r.ready).toBe(requiredOk);
|
|
54
|
+
});
|
|
55
|
+
it("returns a markerPath inside the user's home", () => {
|
|
56
|
+
const r = runDoctor();
|
|
57
|
+
expect(r.markerPath).toContain(".gg");
|
|
58
|
+
expect(r.markerPath).toContain("onboarded-ggeditor");
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
describe("isOnboarded / onboardedMarkerPath", () => {
|
|
62
|
+
it("returns false when the marker is absent", () => {
|
|
63
|
+
const home = mkdtempSync(join(tmpdir(), "gg-doctor-"));
|
|
64
|
+
expect(isOnboarded(home)).toBe(false);
|
|
65
|
+
});
|
|
66
|
+
it("returns true once the marker file exists", () => {
|
|
67
|
+
const home = mkdtempSync(join(tmpdir(), "gg-doctor-"));
|
|
68
|
+
const path = onboardedMarkerPath(home);
|
|
69
|
+
mkdirSync(join(home, ".gg"), { recursive: true });
|
|
70
|
+
writeFileSync(path, "2026-04-30T00:00:00.000Z\n", "utf8");
|
|
71
|
+
expect(isOnboarded(home)).toBe(true);
|
|
72
|
+
});
|
|
73
|
+
it("returns false when the marker path exists but isn't a regular file", () => {
|
|
74
|
+
const home = mkdtempSync(join(tmpdir(), "gg-doctor-"));
|
|
75
|
+
// Create a directory at the marker path instead of a file.
|
|
76
|
+
mkdirSync(onboardedMarkerPath(home), { recursive: true });
|
|
77
|
+
expect(isOnboarded(home)).toBe(false);
|
|
78
|
+
});
|
|
79
|
+
it("auth check sees a present auth.json under the synthetic home", () => {
|
|
80
|
+
const home = mkdtempSync(join(tmpdir(), "gg-doctor-"));
|
|
81
|
+
mkdirSync(join(home, ".gg"), { recursive: true });
|
|
82
|
+
writeFileSync(join(home, ".gg", "auth.json"), "{}", "utf8");
|
|
83
|
+
const r = runDoctor(home);
|
|
84
|
+
const auth = r.checks.find((c) => c.id === "auth");
|
|
85
|
+
expect(auth.status).toBe("ok");
|
|
86
|
+
expect(auth.detail).toContain("auth.json");
|
|
87
|
+
});
|
|
88
|
+
it("auth check reports missing on a fresh home", () => {
|
|
89
|
+
const home = mkdtempSync(join(tmpdir(), "gg-doctor-"));
|
|
90
|
+
const r = runDoctor(home);
|
|
91
|
+
const auth = r.checks.find((c) => c.id === "auth");
|
|
92
|
+
expect(auth.status).toBe("missing");
|
|
93
|
+
expect(auth.fix).toContain("ggeditor login");
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
describe("doctor severity / status invariants", () => {
|
|
97
|
+
it("OPENAI_API_KEY status follows the env var", () => {
|
|
98
|
+
const prev = process.env.OPENAI_API_KEY;
|
|
99
|
+
delete process.env.OPENAI_API_KEY;
|
|
100
|
+
try {
|
|
101
|
+
const r = runDoctor();
|
|
102
|
+
const k = r.checks.find((c) => c.id === "openai-key");
|
|
103
|
+
expect(k.status).toBe("missing");
|
|
104
|
+
expect(k.severity).toBe("optional");
|
|
105
|
+
expect(k.fix).toContain("OPENAI_API_KEY");
|
|
106
|
+
}
|
|
107
|
+
finally {
|
|
108
|
+
if (prev !== undefined)
|
|
109
|
+
process.env.OPENAI_API_KEY = prev;
|
|
110
|
+
}
|
|
111
|
+
process.env.OPENAI_API_KEY = "test-fake-key";
|
|
112
|
+
try {
|
|
113
|
+
const r = runDoctor();
|
|
114
|
+
const k = r.checks.find((c) => c.id === "openai-key");
|
|
115
|
+
expect(k.status).toBe("ok");
|
|
116
|
+
expect(k.fix).toBeUndefined();
|
|
117
|
+
}
|
|
118
|
+
finally {
|
|
119
|
+
if (prev === undefined)
|
|
120
|
+
delete process.env.OPENAI_API_KEY;
|
|
121
|
+
else
|
|
122
|
+
process.env.OPENAI_API_KEY = prev;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
it("ANTHROPIC_API_KEY check is informational (never blocks)", () => {
|
|
126
|
+
const r = runDoctor();
|
|
127
|
+
const k = r.checks.find((c) => c.id === "anthropic-key");
|
|
128
|
+
expect(k.severity).toBe("info");
|
|
129
|
+
});
|
|
130
|
+
it("ffmpeg / ffprobe checks are required", () => {
|
|
131
|
+
const r = runDoctor();
|
|
132
|
+
const ff = r.checks.find((c) => c.id === "ffmpeg");
|
|
133
|
+
const fp = r.checks.find((c) => c.id === "ffprobe");
|
|
134
|
+
expect(ff.severity).toBe("required");
|
|
135
|
+
expect(fp.severity).toBe("required");
|
|
136
|
+
});
|
|
137
|
+
it("host probes (resolve/premiere) are optional", () => {
|
|
138
|
+
const r = runDoctor();
|
|
139
|
+
expect(r.checks.find((c) => c.id === "resolve").severity).toBe("optional");
|
|
140
|
+
expect(r.checks.find((c) => c.id === "premiere").severity).toBe("optional");
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
//# sourceMappingURL=doctor.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.test.js","sourceRoot":"","sources":["../../src/core/doctor.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE1E;;;;;;;GAOG;AAEH,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,CAAC,GAAG,SAAS,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CACjB;YACE,eAAe;YACf,MAAM;YACN,QAAQ;YACR,SAAS;YACT,YAAY;YACZ,UAAU;YACV,QAAQ;YACR,SAAS;YACT,aAAa;YACb,UAAU;SACX,CAAC,IAAI,EAAE,CACT,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,CAAC,GAAG,SAAS,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AAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAE,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5E,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAE,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export { createLazyHost } from "./core/hosts/lazy.js";
|
|
|
6
6
|
export type { LazyHost, LazyHostOptions } from "./core/hosts/lazy.js";
|
|
7
7
|
export { checkFfmpeg, checkFfprobe, probeMedia, runFfmpeg } from "./core/media/ffmpeg.js";
|
|
8
8
|
export type { FfmpegResult, MediaProbe } from "./core/media/ffmpeg.js";
|
|
9
|
+
export { isOnboarded, onboardedMarkerPath, runDoctor } from "./core/doctor.js";
|
|
10
|
+
export type { CheckSeverity, CheckStatus, DoctorCheck, DoctorReport, InstallableHint, } from "./core/doctor.js";
|
|
11
|
+
export { renderDoctorReport } from "./core/doctor-render.js";
|
|
12
|
+
export { runDoctorInteractive } from "./core/doctor-runner.js";
|
|
13
|
+
export type { DoctorRunOptions } from "./core/doctor-runner.js";
|
|
9
14
|
export { buildEditorSystemPrompt, buildEditorStaticBody, buildEditorHostBlock, spliceHostBlock, } from "./system-prompt.js";
|
|
10
15
|
export type { StaticPromptOptions } from "./system-prompt.js";
|
|
11
16
|
export { AuthStorage, AUTH_FILE, NotLoggedInError, generatePKCE, loginAnthropic, loginOpenAI, refreshAnthropicToken, refreshOpenAIToken, runLogin, runLogout, runStatus, } from "./core/auth/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EACL,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGtE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC1F,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGvE,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,SAAS,GACV,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,aAAa,GACd,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAA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AG9B,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,aAAa,GACd,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,10 @@ export { createHost, detectHost, HostUnreachableError, HostUnsupportedError, Non
|
|
|
5
5
|
export { createLazyHost } from "./core/hosts/lazy.js";
|
|
6
6
|
// Media
|
|
7
7
|
export { checkFfmpeg, checkFfprobe, probeMedia, runFfmpeg } from "./core/media/ffmpeg.js";
|
|
8
|
+
// Doctor / first-run onboarding
|
|
9
|
+
export { isOnboarded, onboardedMarkerPath, runDoctor } from "./core/doctor.js";
|
|
10
|
+
export { renderDoctorReport } from "./core/doctor-render.js";
|
|
11
|
+
export { runDoctorInteractive } from "./core/doctor-runner.js";
|
|
8
12
|
// System prompt
|
|
9
13
|
export { buildEditorSystemPrompt, buildEditorStaticBody, buildEditorHostBlock, spliceHostBlock, } from "./system-prompt.js";
|
|
10
14
|
// Auth (shared with ggcoder via ~/.gg/auth.json)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,QAAQ;AACR,OAAO,EACL,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,QAAQ;AACR,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG1F,gBAAgB;AAChB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,GAChB,MAAM,oBAAoB,CA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