video-director 1.0.0-alpha.3 → 1.0.0-alpha.5

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 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 with `--update`. 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 alternatively install it as a plugin from this repository. Other assistants that read skill folders work the same way, using their own skills folder.
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 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",
3
+ "version": "1.0.0-alpha.5",
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.3"
4
+ version = "1.0.0-alpha.5"
5
5
 
6
6
  greeting = """
7
7
  Your Video Director crew is ready. Start with the Screenwriter
@@ -9,7 +9,7 @@ JSON from stdin (`cwd`, `source`), and acts only when `source` is "startup" (the
9
9
  resumes every chat turn, so any other source must stay silent), the folder is a Video Director
10
10
  project, and `VDR_NO_UPDATE_CHECK` is not set to a value other than "0". It compares the
11
11
  installed version (the `version = "..."` line of `assets/setup.toml`) with the one published on
12
- the npm `latest` tag, and the `beta` tag too when the install is a prerelease. When a newer
12
+ the npm `latest` tag, and the install's own prerelease tag (`alpha` or `beta`) when it is a prerelease. When a newer
13
13
  version exists it prints one JSON object on one line, holding only `systemMessage` (shown to the
14
14
  user) and `hookSpecificOutput` (`hookEventName` and `additionalContext`, given to the model).
15
15
  Otherwise it prints nothing. Hook mode always exits 0, so a launch is never blocked or failed.
@@ -55,9 +55,9 @@ sys.dont_write_bytecode = True
55
55
 
56
56
  # The fragment is never sent to the server; it only tells fetch_version which channel is asked for.
57
57
  # The repo is private, so the default source is the npm registry: it answers `{"version": "x.y.z"}`
58
- # for a dist-tag. The `main` channel is npm's `latest` tag; `beta` is the `beta` tag.
58
+ # for a dist-tag. The `main` channel is npm's `latest` tag; `alpha` and `beta` are the tags of the same name.
59
59
  SOURCE_TEMPLATE = "https://registry.npmjs.org/video-director/{branch}"
60
- NPM_TAGS = {"main": "latest", "beta": "beta"}
60
+ NPM_TAGS = {"main": "latest", "alpha": "alpha", "beta": "beta"}
61
61
  SETUP_TOML = Path(__file__).resolve().parent.parent / "assets" / "setup.toml"
62
62
  CHECK_EVERY = 86400
63
63
  TIMEOUT = 2
@@ -117,9 +117,14 @@ def is_vdr_project(start: str | Path, home: str | Path | None = None) -> bool:
117
117
 
118
118
 
119
119
  def channels(current: str) -> list[str]:
120
- """A prerelease install hears about betas and stable releases; a stable install only stable."""
120
+ """A prerelease install follows its own channel (alpha, beta...) and stable; a stable install only stable.
121
+
122
+ An alpha install never hears about a beta: beta.3 sorts above alpha.4 by semver, but the alpha is
123
+ newer code, so offering the beta would be a downgrade.
124
+ """
121
125
  core, _, pre = current.partition("-")
122
- return ["main", "beta"] if pre else ["main"]
126
+ channel = re.sub(r"[^0-9A-Za-z]", "", pre.split(".")[0])
127
+ return ["main", channel] if channel else ["main"]
123
128
 
124
129
 
125
130
  def source_template(env: Any) -> str:
@@ -99,6 +99,7 @@ class Versions(unittest.TestCase):
99
99
 
100
100
  def test_channels(self):
101
101
  self.assertEqual(cu.channels("1.0.0-beta.3"), ["main", "beta"])
102
+ self.assertEqual(cu.channels("1.0.0-alpha.4"), ["main", "alpha"])
102
103
  self.assertEqual(cu.channels("1.0.0"), ["main"])
103
104
 
104
105
  def test_installed_version(self):
@@ -146,7 +147,7 @@ class ReleasesJson(Base):
146
147
 
147
148
  def test_default_source_is_the_npm_registry(self):
148
149
  self.assertTrue(cu.SOURCE_TEMPLATE.startswith("https://registry.npmjs.org/"))
149
- self.assertEqual(cu.NPM_TAGS, {"main": "latest", "beta": "beta"})
150
+ self.assertEqual(cu.NPM_TAGS, {"main": "latest", "alpha": "alpha", "beta": "beta"})
150
151
 
151
152
  def test_beta_channel_takes_the_highest_non_draft(self):
152
153
  self.assertEqual(cu.version_from_releases(self.RELEASES, stable_only=False), "1.0.0-beta.5")
@@ -253,6 +254,22 @@ class Hook(Base):
253
254
  self.remote("beta", "0.9.0-beta.1")
254
255
  self.assertIsNone(self.hook())
255
256
 
257
+ def test_an_alpha_install_is_not_offered_the_older_beta(self):
258
+ write(self.installed, toml_with("1.0.0-alpha.4"))
259
+ self.remote("main", "0.9.0")
260
+ self.remote("beta", "1.0.0-beta.3")
261
+ self.remote("alpha", "1.0.0-alpha.4")
262
+ self.assertIsNone(self.hook())
263
+
264
+ def test_an_alpha_install_hears_about_a_newer_alpha(self):
265
+ write(self.installed, toml_with("1.0.0-alpha.4"))
266
+ self.remote("main", "0.9.0")
267
+ self.remote("beta", "1.0.0-beta.3")
268
+ self.remote("alpha", "1.0.0-alpha.5")
269
+ out = self.hook()
270
+ self.assertIn("1.0.0-alpha.5", out["systemMessage"])
271
+ self.assertNotIn("beta.3", out["systemMessage"])
272
+
256
273
  def cache_reset(self):
257
274
  shutil.rmtree(self.cache, ignore_errors=True)
258
275
 
@@ -7,11 +7,12 @@
7
7
  // From a download: npm install (once, in the download), then
8
8
  // node tools/install-skills.mjs [--provider ... --project <folder>] [--link]
9
9
  //
10
- // Copies the skills by default, so it works from npx's temporary cache; re-run with
11
- // --update to refresh the copies. --link points at the download instead, so updating
12
- // the download updates every project. Anything already in the project is left alone
13
- // (a link or a folder you changed is never overwritten). Also creates the project
14
- // folders the crew expects, so there is nothing to create by hand.
10
+ // Copies the skills by default, so it works from npx's temporary cache. Re-running it
11
+ // replaces the crew's own skill folders with the version you run, so an upgrade needs no
12
+ // flag. A symlink (a developer's checkout) is never replaced, and nothing outside the
13
+ // skill folders is touched: project.md, bible/, episodes/ and .vdr/ stay as they are.
14
+ // --link points at the download instead, so updating the download updates every project.
15
+ // Also creates the project folders the crew expects, so there is nothing to create by hand.
15
16
 
16
17
  import fs from 'node:fs';
17
18
  import os from 'node:os';
@@ -46,7 +47,7 @@ export function ensureLayout(projectRoot) {
46
47
  for (const dir of LAYOUT) fs.mkdirSync(path.join(projectRoot, ...dir.split('/')), { recursive: true });
47
48
  }
48
49
 
49
- export function linkSkills(provider, projectRoot, { link = false, update = false } = {}) {
50
+ export function linkSkills(provider, projectRoot, { link = false } = {}) {
50
51
  const destination = path.join(projectRoot, PROVIDERS[provider].skillsDir);
51
52
  fs.mkdirSync(destination, { recursive: true });
52
53
  const linked = [];
@@ -57,8 +58,8 @@ export function linkSkills(provider, projectRoot, { link = false, update = false
57
58
  const to = path.join(destination, name);
58
59
  let stat = null;
59
60
  try { stat = fs.lstatSync(to); } catch { /* not there yet */ }
60
- // --update refreshes our own copies only; a symlink (a developer's checkout) always wins.
61
- if (stat && !(update && !link && stat.isDirectory() && !stat.isSymbolicLink())) { skipped.push(name); continue; }
61
+ // Our own copies are replaced on every run; a symlink (a developer's checkout) always wins.
62
+ if (stat && (link || stat.isSymbolicLink() || !stat.isDirectory())) { skipped.push(name); continue; }
62
63
  if (stat) fs.rmSync(to, { recursive: true, force: true });
63
64
  if (link) fs.symlinkSync(from, to, process.platform === 'win32' ? 'junction' : 'dir');
64
65
  else fs.cpSync(from, to, { recursive: true, filter: (src) => !/(^|[\\/])__pycache__([\\/]|$)/.test(src) });
@@ -77,7 +78,7 @@ function parseArgs(argv) {
77
78
  for (let i = 0; i < argv.length; i++) {
78
79
  if (argv[i] === '--yes' || argv[i] === '-y') out.yes = true;
79
80
  else if (argv[i] === '--link') out.link = true;
80
- else if (argv[i] === '--update') out.update = true;
81
+ else if (argv[i] === '--update') out.update = true; // accepted for older scripts: re-running always updates
81
82
  else if (argv[i] === '--provider') out.provider = argv[++i];
82
83
  else if (argv[i] === '--project') out.project = argv[++i];
83
84
  else fail(`Unknown option: ${argv[i]}`);