@vosjs/cli 0.75.0 → 0.76.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/README.md CHANGED
@@ -37,13 +37,13 @@ Until 0.9 the take pipeline and the vos.so verbs shipped separately as `@vosso/v
37
37
  Node 18 or newer and a Chromium-family browser. A system Chrome is used when present; otherwise `npx playwright install chromium` once, or set `VOS_BROWSER_PATH`. mp4 output needs Chrome (Chromium ships no AVC encoder). Render pages load `three` and mediabunny from a CDN, so rendering needs network access.
38
38
 
39
39
  ```bash
40
- vos setup [--agent claude,cursor,codex,copilot|all] [--global] [--no-skills] [--no-rules] [--no-browser] [--url <dev server>]
40
+ vos setup [--agent claude,cursor,codex,copilot|all] [--global] [--no-skills] [--skills-from-catalog] [--no-rules] [--no-browser] [--url <dev server>]
41
41
  vos doctor [--url <dev server>] # what is ready, in words; exit 3 when no browser
42
42
  vos whoami # the key's name and the account it belongs to, never the key
43
43
  vos logout # remove ~/.config/vos/credentials
44
44
  ```
45
45
 
46
- `vos setup` detects the agents present by their directories (`.claude/`, `.cursor/`, `.codex/` or `.agents/`, `.github/copilot`; the home forms under `--global`), installs the skills into them through skills.sh (`npx skills add vosjs/skills -y`) or, when that cannot be reached, from the copy of the catalog this package ships (`skills/`), finds a browser in the recorder's own order or installs Chromium, writes one block between `<!-- vos:begin -->` and `<!-- vos:end -->` markers into `AGENTS.md` (or `CLAUDE.md` when only that exists), so a second run replaces its own text and never yours, and ends with `doctor`. These four verbs print NDJSON whenever stdout is not a TTY, and every `done` event carries `next_step`.
46
+ `vos setup` detects the agents present by their directories (`.claude/`, `.cursor/`, `.codex/` or `.agents/`, `.github/copilot`; the home forms under `--global`), installs the skills into them from the copy of the catalog this package ships (`skills/`, the catalog at the tag this release was cut from; `--skills-from-catalog` fetches that same tag through skills.sh instead, with the bundled copy as the fallback when it cannot be reached), finds a browser in the recorder's own order or installs Chromium, writes one block between `<!-- vos:begin -->` and `<!-- vos:end -->` markers into `AGENTS.md` (or `CLAUDE.md` when only that exists), so a second run replaces its own text and never yours, and ends with `doctor`. These four verbs print NDJSON whenever stdout is not a TTY, and every `done` event carries `next_step`.
47
47
 
48
48
  ## Engine verbs
49
49
 
@@ -12053,6 +12053,14 @@ function doctorReport(facts) {
12053
12053
  next_step = "Record: npx vos record --actions actions.json --out take --strict (the product-video skill writes actions.json)";
12054
12054
  return { ok: nodeOk && browserOk, lines, next_step, facts };
12055
12055
  }
12056
+ function bundledSkillsVersion(dir) {
12057
+ try {
12058
+ const v = readFileSync10(join23(dir, "VERSION"), "utf8").trim();
12059
+ return /^\d+\.\d+\.\d+$/.test(v) ? v : null;
12060
+ } catch {
12061
+ return null;
12062
+ }
12063
+ }
12056
12064
  function bundledSkillsDir(from) {
12057
12065
  let dir = dirname8(from);
12058
12066
  for (let i = 0; i < 6; i++) {
@@ -12080,10 +12088,15 @@ var BOOLEAN_FLAGS11 = /* @__PURE__ */ new Set([
12080
12088
  "help",
12081
12089
  "global",
12082
12090
  "no-skills",
12091
+ "skills-from-catalog",
12083
12092
  "no-rules",
12084
12093
  "no-browser"
12085
12094
  ]);
12086
12095
  var SKILLS_SOURCE = "vosjs/skills";
12096
+ var SKILLS_CLI_VERSION = "1.7.2";
12097
+ function skillsCatalogAt(version) {
12098
+ return `https://github.com/${SKILLS_SOURCE}/tree/v${version}`;
12099
+ }
12087
12100
  function reporterFor(flags) {
12088
12101
  return createReporter(flags.json === true || process.stdout.isTTY !== true);
12089
12102
  }
@@ -12159,6 +12172,7 @@ async function cmdSetup(argv) {
12159
12172
  const global = flags.global === true;
12160
12173
  const url = strFlag(flags, "url");
12161
12174
  const noSkills = flags["no-skills"] === true;
12175
+ const fromCatalog = flags["skills-from-catalog"] === true;
12162
12176
  const noRules = flags["no-rules"] === true;
12163
12177
  const noBrowser = flags["no-browser"] === true;
12164
12178
  const wanted = strFlag(flags, "agent");
@@ -12178,48 +12192,61 @@ async function cmdSetup(argv) {
12178
12192
  let skillsVia = "skipped";
12179
12193
  let skillNames = [];
12180
12194
  if (!noSkills) {
12181
- const args = [
12182
- "skills",
12183
- "add",
12184
- SKILLS_SOURCE,
12185
- "-y",
12186
- ...global ? ["-g"] : []
12187
- ];
12188
- r.log(`installing the vos skills: npx ${args.join(" ")}`);
12189
- const res = spawnSync4(npx(), args, {
12190
- cwd: root,
12191
- encoding: "utf8",
12192
- stdio: ["ignore", "pipe", "pipe"],
12193
- shell: process.platform === "win32",
12194
- timeout: 12e4
12195
- });
12196
- if (res.status === 0) {
12197
- skillsVia = "skills.sh";
12198
- } else {
12199
- const bundled = bundledSkillsDir(import.meta.url.replace("file://", ""));
12200
- if (!bundled)
12201
- throw new Error(
12202
- `could not install the skills: npx skills add ${SKILLS_SOURCE} failed (${(res.stderr ?? "").trim().split("\n").at(-1) ?? res.error?.message ?? "no output"}) and this build carries no bundled copy`
12203
- );
12204
- const targets = homes.length ? homes : [fallbackSkillsHome(root)];
12195
+ const bundled = bundledSkillsDir(import.meta.url.replace("file://", ""));
12196
+ const version = bundled ? bundledSkillsVersion(bundled) : null;
12197
+ const targets = homes.length ? homes : [fallbackSkillsHome(root)];
12198
+ const copyBundled = (dir) => {
12205
12199
  for (const home of targets) {
12206
12200
  const dest = skillsDirFor(home);
12207
12201
  mkdirSync6(dest, { recursive: true });
12208
- for (const name of installedSkills(bundled)) {
12209
- cpSync(join24(bundled, name), join24(dest, name), { recursive: true });
12202
+ for (const name of installedSkills(dir)) {
12203
+ cpSync(join24(dir, name), join24(dest, name), { recursive: true });
12210
12204
  }
12211
12205
  }
12206
+ };
12207
+ if (fromCatalog) {
12208
+ const source = version ? skillsCatalogAt(version) : SKILLS_SOURCE;
12209
+ const args = [
12210
+ `skills@${SKILLS_CLI_VERSION}`,
12211
+ "add",
12212
+ source,
12213
+ "-y",
12214
+ ...global ? ["-g"] : []
12215
+ ];
12216
+ r.log(`installing the vos skills: npx ${args.join(" ")}`);
12217
+ const res = spawnSync4(npx(), args, {
12218
+ cwd: root,
12219
+ encoding: "utf8",
12220
+ stdio: ["ignore", "pipe", "pipe"],
12221
+ shell: process.platform === "win32",
12222
+ timeout: 12e4
12223
+ });
12224
+ if (res.status === 0) {
12225
+ skillsVia = "skills.sh";
12226
+ } else {
12227
+ if (!bundled)
12228
+ throw new Error(
12229
+ `could not install the skills: npx ${args.join(" ")} failed (${(res.stderr ?? "").trim().split("\n").at(-1) ?? res.error?.message ?? "no output"}) and this build carries no bundled copy`
12230
+ );
12231
+ copyBundled(bundled);
12232
+ skillsVia = "bundled";
12233
+ r.log(
12234
+ `skills.sh did not answer; copied the bundled skills into ${targets.map((t) => skillsDirFor(t)).join(", ")}`
12235
+ );
12236
+ }
12237
+ } else {
12238
+ if (!bundled)
12239
+ throw new Error(
12240
+ "this build carries no bundled skills; run with --skills-from-catalog"
12241
+ );
12242
+ copyBundled(bundled);
12212
12243
  skillsVia = "bundled";
12213
12244
  r.log(
12214
- `skills.sh did not answer; copied the bundled skills into ${targets.map((t) => skillsDirFor(t)).join(", ")}`
12245
+ `installed the bundled vos skills${version ? ` (catalog ${version})` : ""} into ${targets.map((t) => skillsDirFor(t)).join(", ")}`
12215
12246
  );
12216
12247
  }
12217
12248
  skillNames = [
12218
- ...new Set(
12219
- (homes.length ? homes : [fallbackSkillsHome(root)]).flatMap(
12220
- (h) => installedSkills(skillsDirFor(h))
12221
- )
12222
- )
12249
+ ...new Set(targets.flatMap((h) => installedSkills(skillsDirFor(h))))
12223
12250
  ].sort();
12224
12251
  }
12225
12252
  r.event({ event: "skills", via: skillsVia, names: skillNames });
@@ -12432,11 +12459,12 @@ Take pipeline
12432
12459
  the flow as numbered beats in words, for a person recording it by hand
12433
12460
 
12434
12461
  This machine (no account)
12435
- vos setup [--agent claude,cursor,codex,copilot|all] [--global] [--no-skills] [--no-rules] [--no-browser] [--url <dev server>] [--json]
12462
+ vos setup [--agent claude,cursor,codex,copilot|all] [--global] [--no-skills] [--skills-from-catalog] [--no-rules] [--no-browser] [--url <dev server>] [--json]
12436
12463
  ready this computer for the loop: the vos skills into your
12437
- agent's directories (npx skills add vosjs/skills, else the copy
12438
- bundled in this package), a browser found or installed, one
12439
- idempotent block in AGENTS.md (or CLAUDE.md), then doctor.
12464
+ agent's directories (the copy bundled in this package, or with
12465
+ --skills-from-catalog the same tag through skills.sh), a
12466
+ browser found or installed, one idempotent block in AGENTS.md
12467
+ (or CLAUDE.md), then doctor.
12440
12468
  NDJSON whenever stdout is not a TTY; done carries next_step
12441
12469
  vos doctor [--url <dev server>] [--json]
12442
12470
  what is ready, in words: node, browser, ffmpeg, the skills per
@@ -14447,4 +14475,4 @@ export {
14447
14475
  verbHelp,
14448
14476
  run
14449
14477
  };
14450
- //# sourceMappingURL=chunk-X6NQNBDF.js.map
14478
+ //# sourceMappingURL=chunk-OJ3ZCPYS.js.map