video-director 1.0.0-alpha.4 → 1.0.0-alpha.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "video-director",
3
- "version": "1.0.0-alpha.4",
3
+ "version": "1.0.0-alpha.6",
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"
4
+ version = "1.0.0-alpha.6"
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