video-director 1.0.0-alpha.13 → 1.0.0-alpha.15
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/README.md +1 -1
- package/package.json +1 -1
- package/skills/vdr-setup/assets/setup.toml +1 -1
- package/tools/install-skills.mjs +40 -26
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ To skip the questions (for a script, or to have your assistant run it), pass the
|
|
|
146
146
|
npx video-director --provider claude --project /path/to/your-project
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
The crew is copied into your project. To get a newer version later, run the same command again: it replaces the crew's skills with the new version and leaves your project files (`project.md`, `bible/`, `episodes/`, `.vdr/`) alone. Running from a download of this repo instead? Run `npm install` once in it, then `node tools/install-skills.mjs`, and add `--link` to point your project at the download rather than copy. Claude Code users can also open a live **Director pane** beside the chat (stage, approvals, characters, next step, and whether the crew needs an update). The installer offers to install or update it at the end, or add `--mod`; restart Claude Code to apply it, then type `/director` in your project. The pane ships inside the package: run `npx video-director --mod` again to install or update it, then restart Claude Code. It is
|
|
149
|
+
The crew is copied into your project. To get a newer version later, run the same command again: it replaces the crew's skills with the new version and leaves your project files (`project.md`, `bible/`, `episodes/`, `.vdr/`) alone. Running from a download of this repo instead? Run `npm install` once in it, then `node tools/install-skills.mjs`, and add `--link` to point your project at the download rather than copy. Claude Code users can also open a live **Director pane** beside the chat (stage, approvals, characters, next step, and whether the crew needs an update). The installer offers to install or update it at the end, or add `--mod`; restart Claude Code to apply it, then type `/director` in your project. The pane ships inside the package: run `npx video-director --mod` again to install or update it, then restart Claude Code. It is installed for that project only, never for your other projects. Claude Code users can alternatively install it as a plugin from this repository. Other assistants that read skill folders work the same way, using their own skills folder.
|
|
150
150
|
|
|
151
151
|
> Install **all** the skills together. They find each other by sitting side by side, so leaving one out will break the others.
|
|
152
152
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "video-director",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.15",
|
|
4
4
|
"description": "Video Director: an AI film crew (Screenwriter, Production Designer, Editor) as agent skills. Run `npx video-director` to install it into a video project.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Video Director setup questions and module metadata.
|
|
2
2
|
# Read by scripts/write-config.py. The version line is bumped by .github/scripts/set-version.mjs.
|
|
3
3
|
|
|
4
|
-
version = "1.0.0-alpha.
|
|
4
|
+
version = "1.0.0-alpha.15"
|
|
5
5
|
|
|
6
6
|
greeting = """
|
|
7
7
|
Your Video Director crew is ready. Start with the Screenwriter
|
package/tools/install-skills.mjs
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// --link points at the download instead, so updating the download updates every project.
|
|
15
15
|
// Also creates the project folders the crew expects, so there is nothing to create by hand.
|
|
16
16
|
// For Claude Code it can also install or update the Director pane, a live side panel (a Claude Code mod):
|
|
17
|
-
// the wizard asks, --mod says yes and --no-mod says no. It
|
|
17
|
+
// the wizard asks, --mod says yes and --no-mod says no. It is installed for this project only.
|
|
18
18
|
|
|
19
19
|
import fs from 'node:fs';
|
|
20
20
|
import os from 'node:os';
|
|
@@ -70,51 +70,65 @@ export function linkSkills(provider, projectRoot, { link = false } = {}) {
|
|
|
70
70
|
return { destination, linked, skipped };
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
// The Director pane is a Claude Code mod. It ships inside this package, and the installer copies it
|
|
74
|
-
//
|
|
75
|
-
// installed version
|
|
73
|
+
// The Director pane is a Claude Code mod. It ships inside this package, and the installer copies it into the
|
|
74
|
+
// project (.vdr/claude-marketplace) and registers that folder as a marketplace for this project only, so the
|
|
75
|
+
// pane matches the installed version, needs no GitHub access and is not added to any other project.
|
|
76
|
+
// "local" scope keeps the setting in the project's personal, gitignored .claude/settings.local.json.
|
|
76
77
|
const MOD_NAME = 'vdr-director';
|
|
77
78
|
const MOD_MARKETPLACE = 'vdr-mods';
|
|
78
79
|
const MOD_SOURCE = path.join(REPO_ROOT, 'mods', MOD_NAME);
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
`
|
|
80
|
+
const modHome = (projectRoot) => path.join(projectRoot, '.vdr', 'claude-marketplace');
|
|
81
|
+
const modCommands = (projectRoot) => [
|
|
82
|
+
`cd ${projectRoot}`,
|
|
83
|
+
`claude plugin marketplace add ${modHome(projectRoot)} --scope local`,
|
|
82
84
|
`claude plugin marketplace update ${MOD_MARKETPLACE}`,
|
|
83
|
-
`claude plugin install ${MOD_NAME}@${MOD_MARKETPLACE}`,
|
|
84
|
-
`claude plugin update ${MOD_NAME}@${MOD_MARKETPLACE}`,
|
|
85
|
+
`claude plugin install ${MOD_NAME}@${MOD_MARKETPLACE} --scope local`,
|
|
86
|
+
`claude plugin update ${MOD_NAME}@${MOD_MARKETPLACE} --scope local`,
|
|
85
87
|
];
|
|
86
88
|
|
|
87
89
|
// Puts this version's pane where the marketplace reads it from. Only our own folder is replaced.
|
|
88
|
-
export function stageMod() {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
export function stageMod(projectRoot) {
|
|
91
|
+
const home = modHome(projectRoot);
|
|
92
|
+
// Never write or delete through a link: each folder on the way must be absent or a plain directory,
|
|
93
|
+
// and the result must still resolve inside the project.
|
|
94
|
+
for (const part of [path.join(projectRoot, '.vdr'), home, path.join(home, '.claude-plugin'), path.join(home, MOD_NAME)]) {
|
|
95
|
+
let stat = null;
|
|
96
|
+
try { stat = fs.lstatSync(part); } catch { /* not there yet */ }
|
|
97
|
+
if (stat && (stat.isSymbolicLink() || !stat.isDirectory())) throw new Error(`${part} is a link or not a folder`);
|
|
98
|
+
}
|
|
99
|
+
const realProject = fs.realpathSync(projectRoot);
|
|
100
|
+
const realParent = fs.realpathSync(fs.existsSync(path.dirname(home)) ? path.dirname(home) : projectRoot);
|
|
101
|
+
if (realParent !== realProject && !realParent.startsWith(realProject + path.sep)) throw new Error('the pane folder would be outside the project');
|
|
102
|
+
fs.mkdirSync(path.join(home, '.claude-plugin'), { recursive: true });
|
|
103
|
+
fs.rmSync(path.join(home, MOD_NAME), { recursive: true, force: true });
|
|
104
|
+
fs.cpSync(MOD_SOURCE, path.join(home, MOD_NAME), {
|
|
92
105
|
recursive: true,
|
|
93
106
|
filter: (src) => !/(^|[\\/])\.claude-plugin[\\/]types([\\/]|$)/.test(src),
|
|
94
107
|
});
|
|
95
|
-
fs.writeFileSync(path.join(
|
|
108
|
+
fs.writeFileSync(path.join(home, '.claude-plugin', 'marketplace.json'), JSON.stringify({
|
|
96
109
|
name: MOD_MARKETPLACE,
|
|
97
110
|
owner: { name: 'Video Director' },
|
|
98
111
|
plugins: [{ name: MOD_NAME, source: `./${MOD_NAME}`, description: 'A live Video Director pane beside the chat.' }],
|
|
99
112
|
}, null, 2) + '\n');
|
|
100
113
|
}
|
|
101
114
|
|
|
102
|
-
// Installs the pane, or brings an installed one up to date, so one run of the installer is enough.
|
|
115
|
+
// Installs the pane for this project, or brings an installed one up to date, so one run of the installer is enough.
|
|
103
116
|
// Never throws and never stops the install: the pane is optional, so a failure only prints the manual commands.
|
|
104
117
|
// Claude Code applies the result at its next start.
|
|
105
|
-
export function installMod() {
|
|
118
|
+
export function installMod(projectRoot) {
|
|
106
119
|
try {
|
|
107
|
-
stageMod();
|
|
120
|
+
stageMod(projectRoot);
|
|
108
121
|
} catch (error) {
|
|
109
122
|
return { ok: false, detail: `could not prepare the pane: ${error.message}` };
|
|
110
123
|
}
|
|
111
|
-
const run = (args) => spawnSync('claude', args, { encoding: 'utf8', shell: process.platform === 'win32' });
|
|
112
|
-
const
|
|
124
|
+
const run = (args) => spawnSync('claude', args, { cwd: projectRoot, encoding: 'utf8', shell: process.platform === 'win32' });
|
|
125
|
+
const plugin = `${MOD_NAME}@${MOD_MARKETPLACE}`;
|
|
126
|
+
const added = run(['plugin', 'marketplace', 'add', modHome(projectRoot), '--scope', 'local']);
|
|
113
127
|
// An existing marketplace makes `add` complain; refreshing it is what picks up the files just copied.
|
|
114
128
|
run(['plugin', 'marketplace', 'update', MOD_MARKETPLACE]);
|
|
115
|
-
const installed = run(['plugin', 'install',
|
|
129
|
+
const installed = run(['plugin', 'install', plugin, '--scope', 'local']);
|
|
116
130
|
// An installed pane is not replaced by `install`; `update` is what moves it to the new version.
|
|
117
|
-
const updated = run(['plugin', 'update',
|
|
131
|
+
const updated = run(['plugin', 'update', plugin, '--scope', 'local']);
|
|
118
132
|
if (installed.status === 0 || updated.status === 0) return { ok: true };
|
|
119
133
|
const detail = `${updated.stderr || installed.stderr || installed.stdout || added.stderr || ''}`.trim().split('\n').slice(-2).join(' ');
|
|
120
134
|
return { ok: false, detail };
|
|
@@ -175,9 +189,9 @@ function runPlain({ provider, project, link, update, mod }) {
|
|
|
175
189
|
if (skipped.length) console.log(`Left alone (already there): ${skipped.join(', ')}`);
|
|
176
190
|
}
|
|
177
191
|
if (mod && parseProviders(provider).includes('claude')) {
|
|
178
|
-
const result = installMod();
|
|
192
|
+
const result = installMod(resolveProject(project));
|
|
179
193
|
if (result.ok) console.log(c.green('Installed or updated the Director pane.') + ' Restart Claude Code to apply it, then type /director in your project.');
|
|
180
|
-
else console.log(`Could not install or update the Director pane${result.detail ? ` (${result.detail})` : ''}. Run by hand:\n ${
|
|
194
|
+
else console.log(`Could not install or update the Director pane${result.detail ? ` (${result.detail})` : ''}. Run by hand:\n ${modCommands(resolveProject(project)).join('\n ')}`);
|
|
181
195
|
}
|
|
182
196
|
const uv = uvLine();
|
|
183
197
|
if (uv) console.log(uv);
|
|
@@ -268,16 +282,16 @@ async function runWizard(args) {
|
|
|
268
282
|
|
|
269
283
|
if (providers.includes('claude') && !args.noMod && hasCommand('claude')) {
|
|
270
284
|
const wantsMod = args.mod || await ask(confirm({
|
|
271
|
-
message: 'Install or update the Director pane, a live side panel for Claude Code that shows your stage, approvals and next step? (
|
|
285
|
+
message: 'Install or update the Director pane, a live side panel for Claude Code that shows your stage, approvals and next step? (for this project only)',
|
|
272
286
|
}));
|
|
273
287
|
if (wantsMod) {
|
|
274
288
|
const spinMod = spinner();
|
|
275
289
|
spinMod.start('Installing or updating the Director pane');
|
|
276
|
-
const result = installMod();
|
|
290
|
+
const result = installMod(projectRoot);
|
|
277
291
|
if (result.ok) spinMod.stop(c.green('Director pane installed or updated') + ' - restart Claude Code to apply it, then type /director in your project');
|
|
278
292
|
else {
|
|
279
293
|
spinMod.stop(c.yellow('Could not install or update the Director pane') + (result.detail ? c.dim(` (${result.detail})`) : ''));
|
|
280
|
-
log.warn(`Run these by hand if you want it:\n ${
|
|
294
|
+
log.warn(`Run these by hand if you want it:\n ${modCommands(projectRoot).join('\n ')}`);
|
|
281
295
|
}
|
|
282
296
|
}
|
|
283
297
|
}
|