yarkr-cli 1.0.3 → 1.0.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.
Files changed (3) hide show
  1. package/README.md +29 -26
  2. package/dist/yarkr.js +153 -149
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -1,41 +1,44 @@
1
- # yarkr
1
+ # yarkr-cli
2
2
 
3
3
  Install skills, agents and MCP toolsets from [Yarkr](https://yarkr.com) into the native layout of every harness you use:
4
4
  Claude Code, Codex, opencode, Cursor and more.
5
5
 
6
6
  ```sh
7
- npm install -g yarkr-cli # Node 22 or newer; or run any command with `npx yarkr-cli …`
8
- yarkr add posterus-ltd/code-review-checklist # a public package, no account needed
9
- yarkr add posterus-ltd/github --harness codex # pick the harnesses to write
7
+ npx yarkr-cli add posterus-ltd/code-review-checklist # a public package, no account needed (Node 22 or newer)
8
+ npx yarkr-cli add posterus-ltd/github --harness codex # pick the harnesses to write
10
9
  ```
11
10
 
11
+ With `npx`, the command is always `npx yarkr-cli …`. Installed globally (`npm install -g yarkr-cli`), it answers to
12
+ both `yarkr-cli` and the shorter `yarkr`, so `yarkr sync` works the same as `yarkr-cli sync`.
13
+
12
14
  ## Sync an ark to your machine
13
15
 
14
- An ark is a curated set of skills, agents and toolsets hosted in the registry. `yarkr sync` writes each one into the
15
- harness's own layout (`~/.claude/skills/…`, `~/.agents/…`, MCP configs and so on):
16
+ An ark is a curated set of skills, agents and toolsets hosted in the registry. `npx yarkr-cli sync` writes each one into
17
+ the harness's own layout (`~/.claude/skills/…`, `~/.agents/…`, MCP configs and so on):
16
18
 
17
19
  ```sh
18
- yarkr arks # list public arks
19
- yarkr sync acme/starter # install one into this folder
20
- yarkr sync acme/starter -g # …or into your home directory
21
- yarkr sync acme/starter --harness claude-code # only write Claude Code's files
22
- yarkr ark # what your arks give you, and which version
20
+ npx yarkr-cli arks # list public arks
21
+ npx yarkr-cli sync acme/starter # install one into this folder
22
+ npx yarkr-cli sync acme/starter -g # …or into your home directory
23
+ npx yarkr-cli sync acme/starter --harness claude-code # only write Claude Code's files
24
+ npx yarkr-cli ark # what your arks give you, and which version
23
25
  ```
24
26
 
25
- Signed in, a bare `yarkr sync` installs every ark you're a member of, plus your personal ark. Run it again to pick up
26
- whatever an admin added or removed; `yarkr sync --check` exits 1 when you're behind.
27
+ Signed in, a bare `npx yarkr-cli sync` installs every ark you're a member of, plus your personal ark. Run it again to
28
+ pick up whatever an admin added or removed; `npx yarkr-cli sync --check` exits 1 when you're behind.
27
29
 
28
30
  ## Set up an existing repo
29
31
 
30
- In a project, `yarkr init` creates `yarkr.json` (and `.yarkrrc`), detecting the harnesses already used there.
31
- `yarkr add` and `yarkr sync` then pin every package in `yarkr.lock`, so teammates and CI get the same releases:
32
+ In a project, `npx yarkr-cli init` creates `yarkr.json` (and `.yarkrrc`), detecting the harnesses already used there.
33
+ `npx yarkr-cli add` and `npx yarkr-cli sync` then pin every package in `yarkr.lock`, so teammates and CI get the same
34
+ releases:
32
35
 
33
36
  ```sh
34
37
  cd my-repo
35
- yarkr init --ark acme/engineering # optional: install a team's ark into this project
36
- yarkr add posterus-ltd/playwright-test-authoring
38
+ npx yarkr-cli init --ark acme/engineering # optional: install a team's ark into this project
39
+ npx yarkr-cli add posterus-ltd/playwright-test-authoring
37
40
  git add yarkr.json yarkr.lock .yarkrrc .claude AGENTS.md && git commit
38
- yarkr sync --check # in CI: exit 1 when anything is out of date
41
+ npx yarkr-cli sync --check # in CI: exit 1 when anything is out of date
39
42
  ```
40
43
 
41
44
  To publish from the repo instead, there's nothing to init: Yarkr finds `SKILL.md` folders, `agents/*.md` and
@@ -43,9 +46,9 @@ To publish from the repo instead, there's nothing to init: Yarkr finds `SKILL.md
43
46
  SKILL.md) goes in one `yarkr.index.yaml` at the root, and nothing has to move. Lint it before you push:
44
47
 
45
48
  ```sh
46
- yarkr lint # what will be published, and what the hub would refuse
47
- yarkr lint --strict # in CI: fail on warnings too
48
- yarkr guide index-repo -o ~/.claude/skills/index-repo/ # a skill your agent uses to write the index
49
+ npx yarkr-cli lint # what will be published, and what the hub would refuse
50
+ npx yarkr-cli lint --strict # in CI: fail on warnings too
51
+ npx yarkr-cli guide index-repo -o ~/.claude/skills/index-repo/ # a skill your agent uses to write the index
49
52
  ```
50
53
 
51
54
  ## Sign in for private packages
@@ -53,12 +56,12 @@ yarkr guide index-repo -o ~/.claude/skills/index-repo/ # a skill your agent us
53
56
  Public packages and public arks work signed out. Your org's private packages and arks need a token:
54
57
 
55
58
  ```sh
56
- yarkr login # signs in in the browser; the token goes to your keychain (or ~/.yarkrrc)
57
- yarkr login --no-browser # over SSH: open the printed link anywhere, then paste the token
58
- yarkr whoami # check who you're signed in as
59
+ npx yarkr-cli login # signs in in the browser; the token goes to your keychain (or ~/.yarkrrc)
60
+ npx yarkr-cli login --no-browser # over SSH: open the printed link anywhere, then paste the token
61
+ npx yarkr-cli whoami # check who you're signed in as
59
62
  ```
60
63
 
61
- In CI, store a read-only token as a secret and set `YARKR_TOKEN`. `yarkr` uses the public hub at `https://yarkr.com`
62
- unless you point it at your own instance with `yarkr login --registry <url>`.
64
+ In CI, store a read-only token as a secret and set `YARKR_TOKEN`. The CLI uses the public hub at `https://yarkr.com`
65
+ unless you point it at your own instance with `npx yarkr-cli login --registry <url>`.
63
66
 
64
67
  Docs: [docs/cli.md](https://github.com/posterus-ltd/yarkr-public/blob/main/docs/cli.md) · Source: [github.com/posterus-ltd/yarkr-public](https://github.com/posterus-ltd/yarkr-public) · MIT
package/dist/yarkr.js CHANGED
@@ -1206,7 +1206,7 @@ var require_command = __commonJS({
1206
1206
  "use strict";
1207
1207
  var EventEmitter = __require("events").EventEmitter;
1208
1208
  var childProcess = __require("child_process");
1209
- var path18 = __require("path");
1209
+ var path19 = __require("path");
1210
1210
  var fs = __require("fs");
1211
1211
  var process2 = __require("process");
1212
1212
  var { Argument: Argument2, humanReadableArgName } = require_argument();
@@ -2219,9 +2219,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
2219
2219
  let launchWithNode = false;
2220
2220
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
2221
2221
  function findFile(baseDir, baseName) {
2222
- const localBin = path18.resolve(baseDir, baseName);
2222
+ const localBin = path19.resolve(baseDir, baseName);
2223
2223
  if (fs.existsSync(localBin)) return localBin;
2224
- if (sourceExt.includes(path18.extname(baseName))) return void 0;
2224
+ if (sourceExt.includes(path19.extname(baseName))) return void 0;
2225
2225
  const foundExt = sourceExt.find(
2226
2226
  (ext) => fs.existsSync(`${localBin}${ext}`)
2227
2227
  );
@@ -2239,17 +2239,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
2239
2239
  } catch {
2240
2240
  resolvedScriptPath = this._scriptPath;
2241
2241
  }
2242
- executableDir = path18.resolve(
2243
- path18.dirname(resolvedScriptPath),
2242
+ executableDir = path19.resolve(
2243
+ path19.dirname(resolvedScriptPath),
2244
2244
  executableDir
2245
2245
  );
2246
2246
  }
2247
2247
  if (executableDir) {
2248
2248
  let localFile = findFile(executableDir, executableFile);
2249
2249
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
2250
- const legacyName = path18.basename(
2250
+ const legacyName = path19.basename(
2251
2251
  this._scriptPath,
2252
- path18.extname(this._scriptPath)
2252
+ path19.extname(this._scriptPath)
2253
2253
  );
2254
2254
  if (legacyName !== this._name) {
2255
2255
  localFile = findFile(
@@ -2260,7 +2260,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2260
2260
  }
2261
2261
  executableFile = localFile || executableFile;
2262
2262
  }
2263
- launchWithNode = sourceExt.includes(path18.extname(executableFile));
2263
+ launchWithNode = sourceExt.includes(path19.extname(executableFile));
2264
2264
  let proc;
2265
2265
  if (process2.platform !== "win32") {
2266
2266
  if (launchWithNode) {
@@ -3175,7 +3175,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
3175
3175
  * @return {Command}
3176
3176
  */
3177
3177
  nameFromFilename(filename) {
3178
- this._name = path18.basename(filename, path18.extname(filename));
3178
+ this._name = path19.basename(filename, path19.extname(filename));
3179
3179
  return this;
3180
3180
  }
3181
3181
  /**
@@ -3189,9 +3189,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
3189
3189
  * @param {string} [path]
3190
3190
  * @return {(string|null|Command)}
3191
3191
  */
3192
- executableDir(path19) {
3193
- if (path19 === void 0) return this._executableDir;
3194
- this._executableDir = path19;
3192
+ executableDir(path20) {
3193
+ if (path20 === void 0) return this._executableDir;
3194
+ this._executableDir = path20;
3195
3195
  return this;
3196
3196
  }
3197
3197
  /**
@@ -3547,17 +3547,17 @@ var require_visit = __commonJS({
3547
3547
  visit2.BREAK = BREAK;
3548
3548
  visit2.SKIP = SKIP2;
3549
3549
  visit2.REMOVE = REMOVE;
3550
- function visit_(key, node2, visitor, path18) {
3551
- const ctrl = callVisitor(key, node2, visitor, path18);
3550
+ function visit_(key, node2, visitor, path19) {
3551
+ const ctrl = callVisitor(key, node2, visitor, path19);
3552
3552
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
3553
- replaceNode(key, path18, ctrl);
3554
- return visit_(key, ctrl, visitor, path18);
3553
+ replaceNode(key, path19, ctrl);
3554
+ return visit_(key, ctrl, visitor, path19);
3555
3555
  }
3556
3556
  if (typeof ctrl !== "symbol") {
3557
3557
  if (identity.isCollection(node2)) {
3558
- path18 = Object.freeze(path18.concat(node2));
3558
+ path19 = Object.freeze(path19.concat(node2));
3559
3559
  for (let i = 0; i < node2.items.length; ++i) {
3560
- const ci = visit_(i, node2.items[i], visitor, path18);
3560
+ const ci = visit_(i, node2.items[i], visitor, path19);
3561
3561
  if (typeof ci === "number")
3562
3562
  i = ci - 1;
3563
3563
  else if (ci === BREAK)
@@ -3568,13 +3568,13 @@ var require_visit = __commonJS({
3568
3568
  }
3569
3569
  }
3570
3570
  } else if (identity.isPair(node2)) {
3571
- path18 = Object.freeze(path18.concat(node2));
3572
- const ck = visit_("key", node2.key, visitor, path18);
3571
+ path19 = Object.freeze(path19.concat(node2));
3572
+ const ck = visit_("key", node2.key, visitor, path19);
3573
3573
  if (ck === BREAK)
3574
3574
  return BREAK;
3575
3575
  else if (ck === REMOVE)
3576
3576
  node2.key = null;
3577
- const cv = visit_("value", node2.value, visitor, path18);
3577
+ const cv = visit_("value", node2.value, visitor, path19);
3578
3578
  if (cv === BREAK)
3579
3579
  return BREAK;
3580
3580
  else if (cv === REMOVE)
@@ -3595,17 +3595,17 @@ var require_visit = __commonJS({
3595
3595
  visitAsync.BREAK = BREAK;
3596
3596
  visitAsync.SKIP = SKIP2;
3597
3597
  visitAsync.REMOVE = REMOVE;
3598
- async function visitAsync_(key, node2, visitor, path18) {
3599
- const ctrl = await callVisitor(key, node2, visitor, path18);
3598
+ async function visitAsync_(key, node2, visitor, path19) {
3599
+ const ctrl = await callVisitor(key, node2, visitor, path19);
3600
3600
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
3601
- replaceNode(key, path18, ctrl);
3602
- return visitAsync_(key, ctrl, visitor, path18);
3601
+ replaceNode(key, path19, ctrl);
3602
+ return visitAsync_(key, ctrl, visitor, path19);
3603
3603
  }
3604
3604
  if (typeof ctrl !== "symbol") {
3605
3605
  if (identity.isCollection(node2)) {
3606
- path18 = Object.freeze(path18.concat(node2));
3606
+ path19 = Object.freeze(path19.concat(node2));
3607
3607
  for (let i = 0; i < node2.items.length; ++i) {
3608
- const ci = await visitAsync_(i, node2.items[i], visitor, path18);
3608
+ const ci = await visitAsync_(i, node2.items[i], visitor, path19);
3609
3609
  if (typeof ci === "number")
3610
3610
  i = ci - 1;
3611
3611
  else if (ci === BREAK)
@@ -3616,13 +3616,13 @@ var require_visit = __commonJS({
3616
3616
  }
3617
3617
  }
3618
3618
  } else if (identity.isPair(node2)) {
3619
- path18 = Object.freeze(path18.concat(node2));
3620
- const ck = await visitAsync_("key", node2.key, visitor, path18);
3619
+ path19 = Object.freeze(path19.concat(node2));
3620
+ const ck = await visitAsync_("key", node2.key, visitor, path19);
3621
3621
  if (ck === BREAK)
3622
3622
  return BREAK;
3623
3623
  else if (ck === REMOVE)
3624
3624
  node2.key = null;
3625
- const cv = await visitAsync_("value", node2.value, visitor, path18);
3625
+ const cv = await visitAsync_("value", node2.value, visitor, path19);
3626
3626
  if (cv === BREAK)
3627
3627
  return BREAK;
3628
3628
  else if (cv === REMOVE)
@@ -3649,23 +3649,23 @@ var require_visit = __commonJS({
3649
3649
  }
3650
3650
  return visitor;
3651
3651
  }
3652
- function callVisitor(key, node2, visitor, path18) {
3652
+ function callVisitor(key, node2, visitor, path19) {
3653
3653
  if (typeof visitor === "function")
3654
- return visitor(key, node2, path18);
3654
+ return visitor(key, node2, path19);
3655
3655
  if (identity.isMap(node2))
3656
- return visitor.Map?.(key, node2, path18);
3656
+ return visitor.Map?.(key, node2, path19);
3657
3657
  if (identity.isSeq(node2))
3658
- return visitor.Seq?.(key, node2, path18);
3658
+ return visitor.Seq?.(key, node2, path19);
3659
3659
  if (identity.isPair(node2))
3660
- return visitor.Pair?.(key, node2, path18);
3660
+ return visitor.Pair?.(key, node2, path19);
3661
3661
  if (identity.isScalar(node2))
3662
- return visitor.Scalar?.(key, node2, path18);
3662
+ return visitor.Scalar?.(key, node2, path19);
3663
3663
  if (identity.isAlias(node2))
3664
- return visitor.Alias?.(key, node2, path18);
3664
+ return visitor.Alias?.(key, node2, path19);
3665
3665
  return void 0;
3666
3666
  }
3667
- function replaceNode(key, path18, node2) {
3668
- const parent = path18[path18.length - 1];
3667
+ function replaceNode(key, path19, node2) {
3668
+ const parent = path19[path19.length - 1];
3669
3669
  if (identity.isCollection(parent)) {
3670
3670
  parent.items[key] = node2;
3671
3671
  } else if (identity.isPair(parent)) {
@@ -4277,10 +4277,10 @@ var require_Collection = __commonJS({
4277
4277
  var createNode = require_createNode();
4278
4278
  var identity = require_identity();
4279
4279
  var Node = require_Node();
4280
- function collectionFromPath(schema, path18, value) {
4280
+ function collectionFromPath(schema, path19, value) {
4281
4281
  let v = value;
4282
- for (let i = path18.length - 1; i >= 0; --i) {
4283
- const k = path18[i];
4282
+ for (let i = path19.length - 1; i >= 0; --i) {
4283
+ const k = path19[i];
4284
4284
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
4285
4285
  const a = [];
4286
4286
  a[k] = v;
@@ -4299,7 +4299,7 @@ var require_Collection = __commonJS({
4299
4299
  sourceObjects: /* @__PURE__ */ new Map()
4300
4300
  });
4301
4301
  }
4302
- var isEmptyPath = (path18) => path18 == null || typeof path18 === "object" && !!path18[Symbol.iterator]().next().done;
4302
+ var isEmptyPath = (path19) => path19 == null || typeof path19 === "object" && !!path19[Symbol.iterator]().next().done;
4303
4303
  var Collection = class extends Node.NodeBase {
4304
4304
  constructor(type, schema) {
4305
4305
  super(type);
@@ -4329,11 +4329,11 @@ var require_Collection = __commonJS({
4329
4329
  * be a Pair instance or a `{ key, value }` object, which may not have a key
4330
4330
  * that already exists in the map.
4331
4331
  */
4332
- addIn(path18, value) {
4333
- if (isEmptyPath(path18))
4332
+ addIn(path19, value) {
4333
+ if (isEmptyPath(path19))
4334
4334
  this.add(value);
4335
4335
  else {
4336
- const [key, ...rest] = path18;
4336
+ const [key, ...rest] = path19;
4337
4337
  const node2 = this.get(key, true);
4338
4338
  if (identity.isCollection(node2))
4339
4339
  node2.addIn(rest, value);
@@ -4347,8 +4347,8 @@ var require_Collection = __commonJS({
4347
4347
  * Removes a value from the collection.
4348
4348
  * @returns `true` if the item was found and removed.
4349
4349
  */
4350
- deleteIn(path18) {
4351
- const [key, ...rest] = path18;
4350
+ deleteIn(path19) {
4351
+ const [key, ...rest] = path19;
4352
4352
  if (rest.length === 0)
4353
4353
  return this.delete(key);
4354
4354
  const node2 = this.get(key, true);
@@ -4362,8 +4362,8 @@ var require_Collection = __commonJS({
4362
4362
  * scalar values from their surrounding node; to disable set `keepScalar` to
4363
4363
  * `true` (collections are always returned intact).
4364
4364
  */
4365
- getIn(path18, keepScalar) {
4366
- const [key, ...rest] = path18;
4365
+ getIn(path19, keepScalar) {
4366
+ const [key, ...rest] = path19;
4367
4367
  const node2 = this.get(key, true);
4368
4368
  if (rest.length === 0)
4369
4369
  return !keepScalar && identity.isScalar(node2) ? node2.value : node2;
@@ -4381,8 +4381,8 @@ var require_Collection = __commonJS({
4381
4381
  /**
4382
4382
  * Checks if the collection includes a value with the key `key`.
4383
4383
  */
4384
- hasIn(path18) {
4385
- const [key, ...rest] = path18;
4384
+ hasIn(path19) {
4385
+ const [key, ...rest] = path19;
4386
4386
  if (rest.length === 0)
4387
4387
  return this.has(key);
4388
4388
  const node2 = this.get(key, true);
@@ -4392,8 +4392,8 @@ var require_Collection = __commonJS({
4392
4392
  * Sets a value in this collection. For `!!set`, `value` needs to be a
4393
4393
  * boolean to add/remove the item from the set.
4394
4394
  */
4395
- setIn(path18, value) {
4396
- const [key, ...rest] = path18;
4395
+ setIn(path19, value) {
4396
+ const [key, ...rest] = path19;
4397
4397
  if (rest.length === 0) {
4398
4398
  this.set(key, value);
4399
4399
  } else {
@@ -6908,9 +6908,9 @@ var require_Document = __commonJS({
6908
6908
  this.contents.add(value);
6909
6909
  }
6910
6910
  /** Adds a value to the document. */
6911
- addIn(path18, value) {
6911
+ addIn(path19, value) {
6912
6912
  if (assertCollection(this.contents))
6913
- this.contents.addIn(path18, value);
6913
+ this.contents.addIn(path19, value);
6914
6914
  }
6915
6915
  /**
6916
6916
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -6985,14 +6985,14 @@ var require_Document = __commonJS({
6985
6985
  * Removes a value from the document.
6986
6986
  * @returns `true` if the item was found and removed.
6987
6987
  */
6988
- deleteIn(path18) {
6989
- if (Collection.isEmptyPath(path18)) {
6988
+ deleteIn(path19) {
6989
+ if (Collection.isEmptyPath(path19)) {
6990
6990
  if (this.contents == null)
6991
6991
  return false;
6992
6992
  this.contents = null;
6993
6993
  return true;
6994
6994
  }
6995
- return assertCollection(this.contents) ? this.contents.deleteIn(path18) : false;
6995
+ return assertCollection(this.contents) ? this.contents.deleteIn(path19) : false;
6996
6996
  }
6997
6997
  /**
6998
6998
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -7007,10 +7007,10 @@ var require_Document = __commonJS({
7007
7007
  * scalar values from their surrounding node; to disable set `keepScalar` to
7008
7008
  * `true` (collections are always returned intact).
7009
7009
  */
7010
- getIn(path18, keepScalar) {
7011
- if (Collection.isEmptyPath(path18))
7010
+ getIn(path19, keepScalar) {
7011
+ if (Collection.isEmptyPath(path19))
7012
7012
  return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
7013
- return identity.isCollection(this.contents) ? this.contents.getIn(path18, keepScalar) : void 0;
7013
+ return identity.isCollection(this.contents) ? this.contents.getIn(path19, keepScalar) : void 0;
7014
7014
  }
7015
7015
  /**
7016
7016
  * Checks if the document includes a value with the key `key`.
@@ -7021,10 +7021,10 @@ var require_Document = __commonJS({
7021
7021
  /**
7022
7022
  * Checks if the document includes a value at `path`.
7023
7023
  */
7024
- hasIn(path18) {
7025
- if (Collection.isEmptyPath(path18))
7024
+ hasIn(path19) {
7025
+ if (Collection.isEmptyPath(path19))
7026
7026
  return this.contents !== void 0;
7027
- return identity.isCollection(this.contents) ? this.contents.hasIn(path18) : false;
7027
+ return identity.isCollection(this.contents) ? this.contents.hasIn(path19) : false;
7028
7028
  }
7029
7029
  /**
7030
7030
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -7041,13 +7041,13 @@ var require_Document = __commonJS({
7041
7041
  * Sets a value in this document. For `!!set`, `value` needs to be a
7042
7042
  * boolean to add/remove the item from the set.
7043
7043
  */
7044
- setIn(path18, value) {
7045
- if (Collection.isEmptyPath(path18)) {
7044
+ setIn(path19, value) {
7045
+ if (Collection.isEmptyPath(path19)) {
7046
7046
  this.contents = value;
7047
7047
  } else if (this.contents == null) {
7048
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path18), value);
7048
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path19), value);
7049
7049
  } else if (assertCollection(this.contents)) {
7050
- this.contents.setIn(path18, value);
7050
+ this.contents.setIn(path19, value);
7051
7051
  }
7052
7052
  }
7053
7053
  /**
@@ -9008,9 +9008,9 @@ var require_cst_visit = __commonJS({
9008
9008
  visit2.BREAK = BREAK;
9009
9009
  visit2.SKIP = SKIP2;
9010
9010
  visit2.REMOVE = REMOVE;
9011
- visit2.itemAtPath = (cst, path18) => {
9011
+ visit2.itemAtPath = (cst, path19) => {
9012
9012
  let item = cst;
9013
- for (const [field, index2] of path18) {
9013
+ for (const [field, index2] of path19) {
9014
9014
  const tok = item?.[field];
9015
9015
  if (tok && "items" in tok) {
9016
9016
  item = tok.items[index2];
@@ -9019,23 +9019,23 @@ var require_cst_visit = __commonJS({
9019
9019
  }
9020
9020
  return item;
9021
9021
  };
9022
- visit2.parentCollection = (cst, path18) => {
9023
- const parent = visit2.itemAtPath(cst, path18.slice(0, -1));
9024
- const field = path18[path18.length - 1][0];
9022
+ visit2.parentCollection = (cst, path19) => {
9023
+ const parent = visit2.itemAtPath(cst, path19.slice(0, -1));
9024
+ const field = path19[path19.length - 1][0];
9025
9025
  const coll = parent?.[field];
9026
9026
  if (coll && "items" in coll)
9027
9027
  return coll;
9028
9028
  throw new Error("Parent collection not found");
9029
9029
  };
9030
- function _visit(path18, item, visitor) {
9031
- let ctrl = visitor(item, path18);
9030
+ function _visit(path19, item, visitor) {
9031
+ let ctrl = visitor(item, path19);
9032
9032
  if (typeof ctrl === "symbol")
9033
9033
  return ctrl;
9034
9034
  for (const field of ["key", "value"]) {
9035
9035
  const token = item[field];
9036
9036
  if (token && "items" in token) {
9037
9037
  for (let i = 0; i < token.items.length; ++i) {
9038
- const ci = _visit(Object.freeze(path18.concat([[field, i]])), token.items[i], visitor);
9038
+ const ci = _visit(Object.freeze(path19.concat([[field, i]])), token.items[i], visitor);
9039
9039
  if (typeof ci === "number")
9040
9040
  i = ci - 1;
9041
9041
  else if (ci === BREAK)
@@ -9046,10 +9046,10 @@ var require_cst_visit = __commonJS({
9046
9046
  }
9047
9047
  }
9048
9048
  if (typeof ctrl === "function" && field === "key")
9049
- ctrl = ctrl(item, path18);
9049
+ ctrl = ctrl(item, path19);
9050
9050
  }
9051
9051
  }
9052
- return typeof ctrl === "function" ? ctrl(item, path18) : ctrl;
9052
+ return typeof ctrl === "function" ? ctrl(item, path19) : ctrl;
9053
9053
  }
9054
9054
  exports.visit = visit2;
9055
9055
  }
@@ -16023,8 +16023,8 @@ var require_utils = __commonJS({
16023
16023
  }
16024
16024
  return ind;
16025
16025
  }
16026
- function removeDotSegments(path18) {
16027
- let input2 = path18;
16026
+ function removeDotSegments(path19) {
16027
+ let input2 = path19;
16028
16028
  const output3 = [];
16029
16029
  let nextSlash = -1;
16030
16030
  let len = 0;
@@ -16433,8 +16433,8 @@ var require_schemes = __commonJS({
16433
16433
  }
16434
16434
  if (wsComponent.resourceName) {
16435
16435
  const queryIndex = wsComponent.resourceName.indexOf("?");
16436
- const path18 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
16437
- wsComponent.path = path18 && path18 !== "/" ? path18 : void 0;
16436
+ const path19 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
16437
+ wsComponent.path = path19 && path19 !== "/" ? path19 : void 0;
16438
16438
  wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
16439
16439
  wsComponent.resourceName = void 0;
16440
16440
  }
@@ -19643,6 +19643,9 @@ var require_ajv = __commonJS({
19643
19643
  }
19644
19644
  });
19645
19645
 
19646
+ // src/index.ts
19647
+ import path18 from "path";
19648
+
19646
19649
  // ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/esm.mjs
19647
19650
  var import_index = __toESM(require_commander(), 1);
19648
19651
  var {
@@ -20476,10 +20479,10 @@ function mergeDefs(...defs) {
20476
20479
  function cloneDef(schema) {
20477
20480
  return mergeDefs(schema._zod.def);
20478
20481
  }
20479
- function getElementAtPath(obj, path18) {
20480
- if (!path18)
20482
+ function getElementAtPath(obj, path19) {
20483
+ if (!path19)
20481
20484
  return obj;
20482
- return path18.reduce((acc, key) => acc?.[key], obj);
20485
+ return path19.reduce((acc, key) => acc?.[key], obj);
20483
20486
  }
20484
20487
  function promiseAllObject(promisesObj) {
20485
20488
  const keys = Object.keys(promisesObj);
@@ -20819,11 +20822,11 @@ function explicitlyAborted(x, startIndex = 0) {
20819
20822
  }
20820
20823
  return false;
20821
20824
  }
20822
- function prefixIssues(path18, issues) {
20825
+ function prefixIssues(path19, issues) {
20823
20826
  return issues.map((iss) => {
20824
20827
  var _a3;
20825
20828
  (_a3 = iss).path ?? (_a3.path = []);
20826
- iss.path.unshift(path18);
20829
+ iss.path.unshift(path19);
20827
20830
  return iss;
20828
20831
  });
20829
20832
  }
@@ -21273,16 +21276,16 @@ function flattenError(error62, mapper = (issue2) => issue2.message) {
21273
21276
  }
21274
21277
  function formatError(error62, mapper = (issue2) => issue2.message) {
21275
21278
  const fieldErrors = { _errors: [] };
21276
- const processError = (error63, path18 = []) => {
21279
+ const processError = (error63, path19 = []) => {
21277
21280
  for (const issue2 of error63.issues) {
21278
21281
  if (issue2.code === "invalid_union" && issue2.errors.length) {
21279
- issue2.errors.map((issues) => processError({ issues }, [...path18, ...issue2.path]));
21282
+ issue2.errors.map((issues) => processError({ issues }, [...path19, ...issue2.path]));
21280
21283
  } else if (issue2.code === "invalid_key") {
21281
- processError({ issues: issue2.issues }, [...path18, ...issue2.path]);
21284
+ processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
21282
21285
  } else if (issue2.code === "invalid_element") {
21283
- processError({ issues: issue2.issues }, [...path18, ...issue2.path]);
21286
+ processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
21284
21287
  } else {
21285
- const fullpath = [...path18, ...issue2.path];
21288
+ const fullpath = [...path19, ...issue2.path];
21286
21289
  if (fullpath.length === 0) {
21287
21290
  fieldErrors._errors.push(mapper(issue2));
21288
21291
  } else {
@@ -21321,17 +21324,17 @@ function formatError(error62, mapper = (issue2) => issue2.message) {
21321
21324
  }
21322
21325
  function treeifyError(error62, mapper = (issue2) => issue2.message) {
21323
21326
  const result = { errors: [] };
21324
- const processError = (error63, path18 = []) => {
21327
+ const processError = (error63, path19 = []) => {
21325
21328
  var _a3;
21326
21329
  for (const issue2 of error63.issues) {
21327
21330
  if (issue2.code === "invalid_union" && issue2.errors.length) {
21328
- issue2.errors.map((issues) => processError({ issues }, [...path18, ...issue2.path]));
21331
+ issue2.errors.map((issues) => processError({ issues }, [...path19, ...issue2.path]));
21329
21332
  } else if (issue2.code === "invalid_key") {
21330
- processError({ issues: issue2.issues }, [...path18, ...issue2.path]);
21333
+ processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
21331
21334
  } else if (issue2.code === "invalid_element") {
21332
- processError({ issues: issue2.issues }, [...path18, ...issue2.path]);
21335
+ processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
21333
21336
  } else {
21334
- const fullpath = [...path18, ...issue2.path];
21337
+ const fullpath = [...path19, ...issue2.path];
21335
21338
  if (fullpath.length === 0) {
21336
21339
  result.errors.push(mapper(issue2));
21337
21340
  continue;
@@ -21370,8 +21373,8 @@ function treeifyError(error62, mapper = (issue2) => issue2.message) {
21370
21373
  }
21371
21374
  function toDotPath(_path) {
21372
21375
  const segs = [];
21373
- const path18 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
21374
- for (const seg of path18) {
21376
+ const path19 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
21377
+ for (const seg of path19) {
21375
21378
  if (typeof seg === "number")
21376
21379
  segs.push(`[${seg}]`);
21377
21380
  else if (typeof seg === "symbol")
@@ -38473,13 +38476,13 @@ function resolveRef(ref, ctx) {
38473
38476
  if (!ref.startsWith("#")) {
38474
38477
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
38475
38478
  }
38476
- const path18 = ref.slice(1).split("/").filter(Boolean);
38477
- if (path18.length === 0) {
38479
+ const path19 = ref.slice(1).split("/").filter(Boolean);
38480
+ if (path19.length === 0) {
38478
38481
  return ctx.rootSchema;
38479
38482
  }
38480
38483
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
38481
- if (path18[0] === defsKey) {
38482
- const key = path18[1] === void 0 ? void 0 : decodeJSONPointerSegment(path18[1]);
38484
+ if (path19[0] === defsKey) {
38485
+ const key = path19[1] === void 0 ? void 0 : decodeJSONPointerSegment(path19[1]);
38483
38486
  if (!key || !ctx.defs[key]) {
38484
38487
  throw new Error(`Reference not found: ${ref}`);
38485
38488
  }
@@ -39762,8 +39765,8 @@ var Api = class {
39762
39765
  this.conn = conn;
39763
39766
  }
39764
39767
  conn;
39765
- async request(method, path18, body, { allow404 = false } = {}) {
39766
- const url2 = `${this.conn.server}/api/v1${path18}`;
39768
+ async request(method, path19, body, { allow404 = false } = {}) {
39769
+ const url2 = `${this.conn.server}/api/v1${path19}`;
39767
39770
  let res;
39768
39771
  try {
39769
39772
  res = await fetch(url2, {
@@ -39785,7 +39788,7 @@ var Api = class {
39785
39788
  payload = await res.json();
39786
39789
  } catch {
39787
39790
  }
39788
- const msg = payload.message ?? `${method} ${path18} failed with HTTP ${res.status}.`;
39791
+ const msg = payload.message ?? `${method} ${path19} failed with HTTP ${res.status}.`;
39789
39792
  if (res.status === 401) {
39790
39793
  throw new CliError(
39791
39794
  msg,
@@ -39876,17 +39879,17 @@ function parseManifest(text) {
39876
39879
  }
39877
39880
  return manifest;
39878
39881
  }
39879
- function parseEvalSuite(text, path18 = "suite") {
39882
+ function parseEvalSuite(text, path19 = "suite") {
39880
39883
  let raw;
39881
39884
  try {
39882
39885
  raw = import_yaml.default.parse(text);
39883
39886
  } catch (err) {
39884
- throw new ManifestError(`${path18} is not valid YAML: ${err.message}`);
39887
+ throw new ManifestError(`${path19} is not valid YAML: ${err.message}`);
39885
39888
  }
39886
39889
  const res = EvalSuite.safeParse(raw);
39887
39890
  if (!res.success) {
39888
39891
  const issues = res.error.issues.map((i) => ({ path: i.path.join("."), message: i.message }));
39889
- throw new ManifestError(`${path18} is invalid: ${issues.map((i) => `${i.path}: ${i.message}`).join("; ")}`, issues);
39892
+ throw new ManifestError(`${path19} is invalid: ${issues.map((i) => `${i.path}: ${i.message}`).join("; ")}`, issues);
39890
39893
  }
39891
39894
  return res.data;
39892
39895
  }
@@ -39943,8 +39946,8 @@ function asText(content) {
39943
39946
  return null;
39944
39947
  return typeof content === "string" ? content : new TextDecoder().decode(content);
39945
39948
  }
39946
- function isYarkrOnly(path18) {
39947
- return path18 === MANIFEST_FILE || path18 === INDEX_FILE || path18.startsWith("evals/") || path18.startsWith("fixtures/");
39949
+ function isYarkrOnly(path19) {
39950
+ return path19 === MANIFEST_FILE || path19 === INDEX_FILE || path19.startsWith("evals/") || path19.startsWith("fixtures/");
39948
39951
  }
39949
39952
  function skillEntryPath(m) {
39950
39953
  return m.entry ?? "SKILL.md";
@@ -39972,10 +39975,10 @@ ${body.replace(/^\n+/, "")}`);
39972
39975
  function skillFolderFiles(pkg, dir, folderName) {
39973
39976
  const entry = skillEntryPath(pkg.manifest);
39974
39977
  const files = [{ package: pkg.manifest.name, path: join(dir, folderName, "SKILL.md"), content: renderSkillMd(pkg, folderName) }];
39975
- for (const [path18, content] of Object.entries(pkg.files)) {
39976
- if (path18 === entry || path18 === "SKILL.md" || isYarkrOnly(path18))
39978
+ for (const [path19, content] of Object.entries(pkg.files)) {
39979
+ if (path19 === entry || path19 === "SKILL.md" || isYarkrOnly(path19))
39977
39980
  continue;
39978
- files.push({ package: pkg.manifest.name, path: join(dir, folderName, path18), content });
39981
+ files.push({ package: pkg.manifest.name, path: join(dir, folderName, path19), content });
39979
39982
  }
39980
39983
  return files;
39981
39984
  }
@@ -40069,13 +40072,13 @@ function nativeFolderHarness(o) {
40069
40072
  ...o.mcp ? {
40070
40073
  toolsets(servers, ctx) {
40071
40074
  const mcp = o.mcp;
40072
- const path18 = ctx.layout[slot];
40073
- if (!path18) {
40075
+ const path19 = ctx.layout[slot];
40076
+ if (!path19) {
40074
40077
  if (mcp.unavailable)
40075
40078
  ctx.out.notes.push(mcp.unavailable(servers));
40076
40079
  return;
40077
40080
  }
40078
- ctx.out.mcp.push({ path: path18, key: mcp.key, servers: Object.fromEntries(servers.map(({ pkg, server }) => [server.name, mcp.entry(pkg, server, ctx.out.notes)])) });
40081
+ ctx.out.mcp.push({ path: path19, key: mcp.key, servers: Object.fromEntries(servers.map(({ pkg, server }) => [server.name, mcp.entry(pkg, server, ctx.out.notes)])) });
40079
40082
  }
40080
40083
  } : {}
40081
40084
  });
@@ -40260,10 +40263,10 @@ var cursor = defineHarness({
40260
40263
  const entry = skillEntryPath(pkg.manifest);
40261
40264
  const { data, body } = splitFrontmatter(asText(pkg.files[entry]) ?? "");
40262
40265
  const extra = [];
40263
- for (const [path18, content] of Object.entries(pkg.files)) {
40264
- if (path18 === entry || isYarkrOnly(path18))
40266
+ for (const [path19, content] of Object.entries(pkg.files)) {
40267
+ if (path19 === entry || isYarkrOnly(path19))
40265
40268
  continue;
40266
- const p = join(l.assets, name, path18);
40269
+ const p = join(l.assets, name, path19);
40267
40270
  ctx.out.files.push({ package: pkg.manifest.name, path: p, content });
40268
40271
  extra.push(`- \`${p}\``);
40269
40272
  }
@@ -40334,9 +40337,9 @@ function folderExportHarness(id, rootDefault, opts = {}) {
40334
40337
  for (const pkg of byKind(input2, "agent")) {
40335
40338
  const name = names.get(pkg.manifest.name);
40336
40339
  const parts = agentParts(pkg, id, names, out);
40337
- for (const [path18, content] of Object.entries(pkg.files))
40338
- if (!isYarkrOnly(path18))
40339
- out.files.push({ package: pkg.manifest.name, path: join(root, "agents", name, path18), content });
40340
+ for (const [path19, content] of Object.entries(pkg.files))
40341
+ if (!isYarkrOnly(path19))
40342
+ out.files.push({ package: pkg.manifest.name, path: join(root, "agents", name, path19), content });
40340
40343
  index2.push({ kind: "agent", name, package: pkg.manifest.name, version: pkg.manifest.version, description: pkg.manifest.description, model: parts.model, tools: parts.tools, skills: parts.skills, subagents: parts.subagents, system_prompt: join("agents", name, pkg.manifest.agent?.system_prompt ?? "") });
40341
40344
  }
40342
40345
  for (const pkg of byKind(input2, "toolset")) {
@@ -41145,36 +41148,36 @@ var dirname = (p) => p.includes("/") ? p.slice(0, p.lastIndexOf("/")) : "";
41145
41148
  var basename = (p) => p.slice(p.lastIndexOf("/") + 1);
41146
41149
  var under = (dir, p) => dir ? p.startsWith(`${dir}/`) : true;
41147
41150
  var rel = (dir, p) => dir ? p.slice(dir.length + 1) : p;
41148
- function parseOverrides(text, path18, problems) {
41151
+ function parseOverrides(text, path19, problems) {
41149
41152
  if (text === null)
41150
41153
  return null;
41151
41154
  try {
41152
41155
  const raw = import_yaml3.default.parse(text);
41153
41156
  return raw && typeof raw === "object" ? raw : null;
41154
41157
  } catch (err) {
41155
- problems.push({ path: path18, message: `${MANIFEST_FILE} isn't valid YAML: ${err.message}` });
41158
+ problems.push({ path: path19, message: `${MANIFEST_FILE} isn't valid YAML: ${err.message}` });
41156
41159
  return null;
41157
41160
  }
41158
41161
  }
41159
- function parseIndex(text, path18, problems) {
41162
+ function parseIndex(text, path19, problems) {
41160
41163
  let raw;
41161
41164
  try {
41162
41165
  raw = import_yaml3.default.parse(text ?? "");
41163
41166
  } catch (err) {
41164
- problems.push({ path: path18, message: `isn't valid YAML: ${err.message}` });
41167
+ problems.push({ path: path19, message: `isn't valid YAML: ${err.message}` });
41165
41168
  return null;
41166
41169
  }
41167
41170
  const entries = (key) => {
41168
41171
  const list = raw?.[key] ?? [];
41169
41172
  if (!Array.isArray(list)) {
41170
- problems.push({ path: path18, message: `\`${key}\` must be a list.` });
41173
+ problems.push({ path: path19, message: `\`${key}\` must be a list.` });
41171
41174
  return [];
41172
41175
  }
41173
41176
  return list.flatMap((e, i) => {
41174
41177
  const entry = typeof e === "string" ? { path: e } : e;
41175
41178
  if (entry && typeof entry === "object" && typeof entry.path === "string" && entry.path.trim())
41176
41179
  return [{ ...entry, path: entry.path.replace(/^\.?\/+|\/+$/g, "") }];
41177
- problems.push({ path: path18, message: `${key}[${i}] needs a \`path\`.` });
41180
+ problems.push({ path: path19, message: `${key}[${i}] needs a \`path\`.` });
41178
41181
  return [];
41179
41182
  });
41180
41183
  };
@@ -41190,7 +41193,7 @@ async function detectAssets(input2) {
41190
41193
  const claimed = [];
41191
41194
  const isClaimed = (p) => claimed.some((d) => d ? p === d || p.startsWith(`${d}/`) : true);
41192
41195
  const filesBelow = (dir) => new Map(paths.filter((p) => under(dir, p)).map((p) => [rel(dir, p), p]));
41193
- const make = (name, kind, path18, files, o, extra) => {
41196
+ const make = (name, kind, path19, files, o, extra) => {
41194
41197
  const suites = [...files.keys()].filter((p) => SUITE.test(p));
41195
41198
  const raw = {
41196
41199
  name: `${input2.namespace}/${slugify2(name)}`,
@@ -41209,10 +41212,10 @@ async function detectAssets(input2) {
41209
41212
  };
41210
41213
  const res = Manifest.safeParse(raw);
41211
41214
  if (!res.success) {
41212
- problems.push({ path: path18, message: res.error.issues.map((i) => `${i.path.join(".") || "manifest"}: ${i.message}`).join("; ") });
41215
+ problems.push({ path: path19, message: res.error.issues.map((i) => `${i.path.join(".") || "manifest"}: ${i.message}`).join("; ") });
41213
41216
  return null;
41214
41217
  }
41215
- return { name: slugify2(name), kind, path: path18, manifest: res.data, files };
41218
+ return { name: slugify2(name), kind, path: path19, manifest: res.data, files };
41216
41219
  };
41217
41220
  const manifestNear = async (dir, from) => {
41218
41221
  const mp = dir ? `${dir}/${MANIFEST_FILE}` : MANIFEST_FILE;
@@ -41385,12 +41388,12 @@ async function sameFiles(a, b, read) {
41385
41388
  }
41386
41389
  return true;
41387
41390
  }
41388
- function toolsetServers2(text, path18, problems) {
41391
+ function toolsetServers2(text, path19, problems) {
41389
41392
  let doc;
41390
41393
  try {
41391
41394
  doc = JSON.parse(text ?? "");
41392
41395
  } catch (err) {
41393
- problems.push({ path: path18, message: `isn't valid JSON: ${err.message}` });
41396
+ problems.push({ path: path19, message: `isn't valid JSON: ${err.message}` });
41394
41397
  return null;
41395
41398
  }
41396
41399
  const out = [];
@@ -41403,7 +41406,7 @@ function toolsetServers2(text, path18, problems) {
41403
41406
  const ref = String(v).replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-[^}]*)?\}/g, "${env:$1}");
41404
41407
  const plain = ref.replace(/^Bearer /, "");
41405
41408
  if (!SECRET_REF.test(plain)) {
41406
- problems.push({ path: path18, message: `${name}.${field}.${k} is a literal value. Use \${${k.toUpperCase().replace(/[^A-Z0-9]+/g, "_")}} or \${vault:path#key} so no secret lives in the repo.` });
41409
+ problems.push({ path: path19, message: `${name}.${field}.${k} is a literal value. Use \${${k.toUpperCase().replace(/[^A-Z0-9]+/g, "_")}} or \${vault:path#key} so no secret lives in the repo.` });
41407
41410
  return null;
41408
41411
  }
41409
41412
  res[k] = ref;
@@ -41423,7 +41426,7 @@ function toolsetServers2(text, path18, problems) {
41423
41426
  });
41424
41427
  }
41425
41428
  if (!out.length) {
41426
- problems.push({ path: path18, message: "has no mcpServers." });
41429
+ problems.push({ path: path19, message: "has no mcpServers." });
41427
41430
  return null;
41428
41431
  }
41429
41432
  return out;
@@ -41547,8 +41550,8 @@ function verifyBundle(b, key, requireSignature) {
41547
41550
  return { manifest: b.manifest, files, content_hash: b.content_hash };
41548
41551
  }
41549
41552
  var TEXT_EXT = /\.(md|mdc|mdx|markdown|txt|ya?ml|json|toml|py|sh|bash|js|mjs|cjs|ts|tsx|csv|html|css|xml|sql|rb|go|rs|java|ini|cfg|env)$/i;
41550
- function looksText(path18, bytes) {
41551
- if (TEXT_EXT.test(path18)) return true;
41553
+ function looksText(path19, bytes) {
41554
+ if (TEXT_EXT.test(path19)) return true;
41552
41555
  const n = Math.min(bytes.length, 4096);
41553
41556
  for (let i = 0; i < n; i++) if (bytes[i] === 0) return false;
41554
41557
  try {
@@ -42118,16 +42121,16 @@ var Diff = class {
42118
42121
  }
42119
42122
  }
42120
42123
  }
42121
- addToPath(path18, added, removed, oldPosInc, options) {
42122
- const last = path18.lastComponent;
42124
+ addToPath(path19, added, removed, oldPosInc, options) {
42125
+ const last = path19.lastComponent;
42123
42126
  if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {
42124
42127
  return {
42125
- oldPos: path18.oldPos + oldPosInc,
42128
+ oldPos: path19.oldPos + oldPosInc,
42126
42129
  lastComponent: { count: last.count + 1, added, removed, previousComponent: last.previousComponent }
42127
42130
  };
42128
42131
  } else {
42129
42132
  return {
42130
- oldPos: path18.oldPos + oldPosInc,
42133
+ oldPos: path19.oldPos + oldPosInc,
42131
42134
  lastComponent: { count: 1, added, removed, previousComponent: last }
42132
42135
  };
42133
42136
  }
@@ -42769,10 +42772,10 @@ async function loadSuites(candidate, candFiles, shared) {
42769
42772
  }
42770
42773
  return out;
42771
42774
  }
42772
- function parseSuite(bytes, ref, path18, source) {
42775
+ function parseSuite(bytes, ref, path19, source) {
42773
42776
  const text = bytes.toString("utf8");
42774
42777
  try {
42775
- return { suite: parseEvalSuite(text, path18), ref, path: path18, source, hash: sha256(text) };
42778
+ return { suite: parseEvalSuite(text, path19), ref, path: path19, source, hash: sha256(text) };
42776
42779
  } catch (err) {
42777
42780
  throw new SuiteError(err.message);
42778
42781
  }
@@ -44273,7 +44276,7 @@ async function registrySnapshot(api, name, opts = {}) {
44273
44276
  const rel2 = await api.resolve(name, { channel: opts.channel ?? "stable", range: opts.range });
44274
44277
  const bundle = await api.bundle(name, rel2.version);
44275
44278
  const files = new Map(bundle.files.map((f) => [f.path, Buffer.from(f.content, "base64")]));
44276
- const tree = buildTree([...files].map(([path18, bytes]) => ({ path: path18, bytes })));
44279
+ const tree = buildTree([...files].map(([path19, bytes]) => ({ path: path19, bytes })));
44277
44280
  return { snapshot: { name, label: bundle.version, contentHash: bundle.content_hash, manifest: bundle.manifest, tree }, files };
44278
44281
  }
44279
44282
  function registrySuiteResolver(getApi) {
@@ -45083,25 +45086,26 @@ var petrol = rgb(74, 163, 191);
45083
45086
  function link(url2, text = url2) {
45084
45087
  return kleur_default.enabled ? `\x1B]8;;${url2}\x1B\\${text}\x1B]8;;\x1B\\` : text;
45085
45088
  }
45086
- function banner(version2) {
45089
+ function banner(version2, invokedAs = "yarkr") {
45087
45090
  return [
45088
45091
  "",
45089
45092
  ...WORDMARK.map((l) => ` ${petrol(l)}`),
45090
45093
  "",
45091
45094
  ` ${kleur_default.bold("yarkr")} ${kleur_default.dim(`v${version2}`)} ${kleur_default.dim("\xB7")} skills, agents and MCP toolsets for every harness`,
45092
45095
  ` ${petrol("\u2192")} ${kleur_default.underline(petrol(link(WEBSITE)))}`,
45096
+ ...invokedAs === "yarkr-cli" ? ["", ` ${kleur_default.dim("Tip:")} install it with ${kleur_default.bold("npm install -g yarkr-cli")}, then just run ${kleur_default.bold("yarkr")}.`] : [],
45093
45097
  ""
45094
45098
  ].join("\n");
45095
45099
  }
45096
45100
 
45097
45101
  // src/index.ts
45098
- var VERSION = true ? "1.0.3" : "0.0.0-dev";
45102
+ var VERSION = true ? "1.0.5" : "0.0.0-dev";
45099
45103
  var act = (fn) => async (...a) => {
45100
45104
  await fn(...a);
45101
45105
  };
45102
45106
  var syncFlags = (c) => c.option("--harness <ids...>", `limit to some harnesses (${HARNESS_IDS.join(", ")})`).option("--dry-run", "show what would change; write nothing").option("--check", "exit 1 if anything is out of date (for CI)").option("--force", "overwrite files edited locally").option("--require-signatures", "refuse unsigned releases").option("-g, --global", "install into your home directory instead of this folder").addOption(new Option("--user").hideHelp()).option("--registry <url>", "registry to use (default: from .yarkrrc)");
45103
45107
  function buildProgram() {
45104
- const program2 = new Command().name("yarkr").description("Yarkr: install your org's skills, agents and MCP configs into every harness.").version(VERSION).addHelpText("before", () => banner(VERSION)).option("-q, --quiet", "only print warnings and errors").hook("preAction", (cmd) => {
45108
+ const program2 = new Command().name("yarkr").description("Yarkr: install your org's skills, agents and MCP configs into every harness.").version(VERSION).addHelpText("before", () => banner(VERSION, path18.basename(process.argv[1] ?? "", ".js"))).option("-q, --quiet", "only print warnings and errors").hook("preAction", (cmd) => {
45105
45109
  ui.quiet = !!cmd.opts().quiet;
45106
45110
  });
45107
45111
  program2.command("login").description("sign in in the browser and keep a token in your keychain (or ~/.yarkrrc)").option("--registry <url>").option("--token <token>", "use this token instead of the browser (or pipe it on stdin)").option("--no-browser", "print a link to open on any device, then paste the token it shows").action(act(login));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yarkr-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Install skills, agents and MCP toolsets from Yarkr into Claude Code, Codex, opencode, Cursor and more",
5
5
  "license": "MIT",
6
6
  "homepage": "https://yarkr.com",
@@ -27,7 +27,8 @@
27
27
  "node": ">=22"
28
28
  },
29
29
  "bin": {
30
- "yarkr": "./dist/yarkr.js"
30
+ "yarkr": "./dist/yarkr.js",
31
+ "yarkr-cli": "./dist/yarkr.js"
31
32
  },
32
33
  "files": [
33
34
  "dist/yarkr.js",