yarkr-cli 1.0.5 → 1.0.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.
Files changed (3) hide show
  1. package/README.md +9 -9
  2. package/dist/yarkr.js +195 -153
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,8 +4,8 @@ Install skills, agents and MCP toolsets from [Yarkr](https://yarkr.com) into the
4
4
  Claude Code, Codex, opencode, Cursor and more.
5
5
 
6
6
  ```sh
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
7
+ npx yarkr-cli add anthropics/frontend-design # a public package, no account needed (Node 22 or newer)
8
+ npx yarkr-cli add anthropics/webapp-testing --harness codex # pick the harnesses to write
9
9
  ```
10
10
 
11
11
  With `npx`, the command is always `npx yarkr-cli …`. Installed globally (`npm install -g yarkr-cli`), it answers to
@@ -17,11 +17,11 @@ An ark is a curated set of skills, agents and toolsets hosted in the registry. `
17
17
  the harness's own layout (`~/.claude/skills/…`, `~/.agents/…`, MCP configs and so on):
18
18
 
19
19
  ```sh
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
20
+ npx yarkr-cli arks # list public arks
21
+ npx yarkr-cli sync anthropics/skills # install one into this folder
22
+ npx yarkr-cli sync anthropics/skills -g # …or into your home directory
23
+ npx yarkr-cli sync anthropics/skills --harness claude-code # only write Claude Code's files
24
+ npx yarkr-cli ark # what your arks give you, and which version
25
25
  ```
26
26
 
27
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
@@ -36,7 +36,7 @@ releases:
36
36
  ```sh
37
37
  cd my-repo
38
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
39
+ npx yarkr-cli add anthropics/mcp-builder
40
40
  git add yarkr.json yarkr.lock .yarkrrc .claude AGENTS.md && git commit
41
41
  npx yarkr-cli sync --check # in CI: exit 1 when anything is out of date
42
42
  ```
@@ -64,4 +64,4 @@ npx yarkr-cli whoami # check who you're signed in as
64
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
65
  unless you point it at your own instance with `npx yarkr-cli login --registry <url>`.
66
66
 
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
67
+ Full command reference: [yarkr.com/docs/install-with-the-cli](https://yarkr.com/docs/install-with-the-cli) · All docs: [yarkr.com/docs](https://yarkr.com/docs)
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 path19 = __require("path");
1209
+ var path20 = __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 = path19.resolve(baseDir, baseName);
2222
+ const localBin = path20.resolve(baseDir, baseName);
2223
2223
  if (fs.existsSync(localBin)) return localBin;
2224
- if (sourceExt.includes(path19.extname(baseName))) return void 0;
2224
+ if (sourceExt.includes(path20.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 = path19.resolve(
2243
- path19.dirname(resolvedScriptPath),
2242
+ executableDir = path20.resolve(
2243
+ path20.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 = path19.basename(
2250
+ const legacyName = path20.basename(
2251
2251
  this._scriptPath,
2252
- path19.extname(this._scriptPath)
2252
+ path20.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(path19.extname(executableFile));
2263
+ launchWithNode = sourceExt.includes(path20.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 = path19.basename(filename, path19.extname(filename));
3178
+ this._name = path20.basename(filename, path20.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(path20) {
3193
- if (path20 === void 0) return this._executableDir;
3194
- this._executableDir = path20;
3192
+ executableDir(path21) {
3193
+ if (path21 === void 0) return this._executableDir;
3194
+ this._executableDir = path21;
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, path19) {
3551
- const ctrl = callVisitor(key, node2, visitor, path19);
3550
+ function visit_(key, node2, visitor, path20) {
3551
+ const ctrl = callVisitor(key, node2, visitor, path20);
3552
3552
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
3553
- replaceNode(key, path19, ctrl);
3554
- return visit_(key, ctrl, visitor, path19);
3553
+ replaceNode(key, path20, ctrl);
3554
+ return visit_(key, ctrl, visitor, path20);
3555
3555
  }
3556
3556
  if (typeof ctrl !== "symbol") {
3557
3557
  if (identity.isCollection(node2)) {
3558
- path19 = Object.freeze(path19.concat(node2));
3558
+ path20 = Object.freeze(path20.concat(node2));
3559
3559
  for (let i = 0; i < node2.items.length; ++i) {
3560
- const ci = visit_(i, node2.items[i], visitor, path19);
3560
+ const ci = visit_(i, node2.items[i], visitor, path20);
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
- path19 = Object.freeze(path19.concat(node2));
3572
- const ck = visit_("key", node2.key, visitor, path19);
3571
+ path20 = Object.freeze(path20.concat(node2));
3572
+ const ck = visit_("key", node2.key, visitor, path20);
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, path19);
3577
+ const cv = visit_("value", node2.value, visitor, path20);
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, path19) {
3599
- const ctrl = await callVisitor(key, node2, visitor, path19);
3598
+ async function visitAsync_(key, node2, visitor, path20) {
3599
+ const ctrl = await callVisitor(key, node2, visitor, path20);
3600
3600
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
3601
- replaceNode(key, path19, ctrl);
3602
- return visitAsync_(key, ctrl, visitor, path19);
3601
+ replaceNode(key, path20, ctrl);
3602
+ return visitAsync_(key, ctrl, visitor, path20);
3603
3603
  }
3604
3604
  if (typeof ctrl !== "symbol") {
3605
3605
  if (identity.isCollection(node2)) {
3606
- path19 = Object.freeze(path19.concat(node2));
3606
+ path20 = Object.freeze(path20.concat(node2));
3607
3607
  for (let i = 0; i < node2.items.length; ++i) {
3608
- const ci = await visitAsync_(i, node2.items[i], visitor, path19);
3608
+ const ci = await visitAsync_(i, node2.items[i], visitor, path20);
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
- path19 = Object.freeze(path19.concat(node2));
3620
- const ck = await visitAsync_("key", node2.key, visitor, path19);
3619
+ path20 = Object.freeze(path20.concat(node2));
3620
+ const ck = await visitAsync_("key", node2.key, visitor, path20);
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, path19);
3625
+ const cv = await visitAsync_("value", node2.value, visitor, path20);
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, path19) {
3652
+ function callVisitor(key, node2, visitor, path20) {
3653
3653
  if (typeof visitor === "function")
3654
- return visitor(key, node2, path19);
3654
+ return visitor(key, node2, path20);
3655
3655
  if (identity.isMap(node2))
3656
- return visitor.Map?.(key, node2, path19);
3656
+ return visitor.Map?.(key, node2, path20);
3657
3657
  if (identity.isSeq(node2))
3658
- return visitor.Seq?.(key, node2, path19);
3658
+ return visitor.Seq?.(key, node2, path20);
3659
3659
  if (identity.isPair(node2))
3660
- return visitor.Pair?.(key, node2, path19);
3660
+ return visitor.Pair?.(key, node2, path20);
3661
3661
  if (identity.isScalar(node2))
3662
- return visitor.Scalar?.(key, node2, path19);
3662
+ return visitor.Scalar?.(key, node2, path20);
3663
3663
  if (identity.isAlias(node2))
3664
- return visitor.Alias?.(key, node2, path19);
3664
+ return visitor.Alias?.(key, node2, path20);
3665
3665
  return void 0;
3666
3666
  }
3667
- function replaceNode(key, path19, node2) {
3668
- const parent = path19[path19.length - 1];
3667
+ function replaceNode(key, path20, node2) {
3668
+ const parent = path20[path20.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, path19, value) {
4280
+ function collectionFromPath(schema, path20, value) {
4281
4281
  let v = value;
4282
- for (let i = path19.length - 1; i >= 0; --i) {
4283
- const k = path19[i];
4282
+ for (let i = path20.length - 1; i >= 0; --i) {
4283
+ const k = path20[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 = (path19) => path19 == null || typeof path19 === "object" && !!path19[Symbol.iterator]().next().done;
4302
+ var isEmptyPath = (path20) => path20 == null || typeof path20 === "object" && !!path20[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(path19, value) {
4333
- if (isEmptyPath(path19))
4332
+ addIn(path20, value) {
4333
+ if (isEmptyPath(path20))
4334
4334
  this.add(value);
4335
4335
  else {
4336
- const [key, ...rest] = path19;
4336
+ const [key, ...rest] = path20;
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(path19) {
4351
- const [key, ...rest] = path19;
4350
+ deleteIn(path20) {
4351
+ const [key, ...rest] = path20;
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(path19, keepScalar) {
4366
- const [key, ...rest] = path19;
4365
+ getIn(path20, keepScalar) {
4366
+ const [key, ...rest] = path20;
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(path19) {
4385
- const [key, ...rest] = path19;
4384
+ hasIn(path20) {
4385
+ const [key, ...rest] = path20;
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(path19, value) {
4396
- const [key, ...rest] = path19;
4395
+ setIn(path20, value) {
4396
+ const [key, ...rest] = path20;
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(path19, value) {
6911
+ addIn(path20, value) {
6912
6912
  if (assertCollection(this.contents))
6913
- this.contents.addIn(path19, value);
6913
+ this.contents.addIn(path20, 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(path19) {
6989
- if (Collection.isEmptyPath(path19)) {
6988
+ deleteIn(path20) {
6989
+ if (Collection.isEmptyPath(path20)) {
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(path19) : false;
6995
+ return assertCollection(this.contents) ? this.contents.deleteIn(path20) : 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(path19, keepScalar) {
7011
- if (Collection.isEmptyPath(path19))
7010
+ getIn(path20, keepScalar) {
7011
+ if (Collection.isEmptyPath(path20))
7012
7012
  return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
7013
- return identity.isCollection(this.contents) ? this.contents.getIn(path19, keepScalar) : void 0;
7013
+ return identity.isCollection(this.contents) ? this.contents.getIn(path20, 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(path19) {
7025
- if (Collection.isEmptyPath(path19))
7024
+ hasIn(path20) {
7025
+ if (Collection.isEmptyPath(path20))
7026
7026
  return this.contents !== void 0;
7027
- return identity.isCollection(this.contents) ? this.contents.hasIn(path19) : false;
7027
+ return identity.isCollection(this.contents) ? this.contents.hasIn(path20) : 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(path19, value) {
7045
- if (Collection.isEmptyPath(path19)) {
7044
+ setIn(path20, value) {
7045
+ if (Collection.isEmptyPath(path20)) {
7046
7046
  this.contents = value;
7047
7047
  } else if (this.contents == null) {
7048
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path19), value);
7048
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path20), value);
7049
7049
  } else if (assertCollection(this.contents)) {
7050
- this.contents.setIn(path19, value);
7050
+ this.contents.setIn(path20, 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, path19) => {
9011
+ visit2.itemAtPath = (cst, path20) => {
9012
9012
  let item = cst;
9013
- for (const [field, index2] of path19) {
9013
+ for (const [field, index2] of path20) {
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, path19) => {
9023
- const parent = visit2.itemAtPath(cst, path19.slice(0, -1));
9024
- const field = path19[path19.length - 1][0];
9022
+ visit2.parentCollection = (cst, path20) => {
9023
+ const parent = visit2.itemAtPath(cst, path20.slice(0, -1));
9024
+ const field = path20[path20.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(path19, item, visitor) {
9031
- let ctrl = visitor(item, path19);
9030
+ function _visit(path20, item, visitor) {
9031
+ let ctrl = visitor(item, path20);
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(path19.concat([[field, i]])), token.items[i], visitor);
9038
+ const ci = _visit(Object.freeze(path20.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, path19);
9049
+ ctrl = ctrl(item, path20);
9050
9050
  }
9051
9051
  }
9052
- return typeof ctrl === "function" ? ctrl(item, path19) : ctrl;
9052
+ return typeof ctrl === "function" ? ctrl(item, path20) : 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(path19) {
16027
- let input2 = path19;
16026
+ function removeDotSegments(path20) {
16027
+ let input2 = path20;
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 path19 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
16437
- wsComponent.path = path19 && path19 !== "/" ? path19 : void 0;
16436
+ const path20 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
16437
+ wsComponent.path = path20 && path20 !== "/" ? path20 : void 0;
16438
16438
  wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
16439
16439
  wsComponent.resourceName = void 0;
16440
16440
  }
@@ -19644,7 +19644,7 @@ var require_ajv = __commonJS({
19644
19644
  });
19645
19645
 
19646
19646
  // src/index.ts
19647
- import path18 from "path";
19647
+ import path19 from "path";
19648
19648
 
19649
19649
  // ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/esm.mjs
19650
19650
  var import_index = __toESM(require_commander(), 1);
@@ -20479,10 +20479,10 @@ function mergeDefs(...defs) {
20479
20479
  function cloneDef(schema) {
20480
20480
  return mergeDefs(schema._zod.def);
20481
20481
  }
20482
- function getElementAtPath(obj, path19) {
20483
- if (!path19)
20482
+ function getElementAtPath(obj, path20) {
20483
+ if (!path20)
20484
20484
  return obj;
20485
- return path19.reduce((acc, key) => acc?.[key], obj);
20485
+ return path20.reduce((acc, key) => acc?.[key], obj);
20486
20486
  }
20487
20487
  function promiseAllObject(promisesObj) {
20488
20488
  const keys = Object.keys(promisesObj);
@@ -20822,11 +20822,11 @@ function explicitlyAborted(x, startIndex = 0) {
20822
20822
  }
20823
20823
  return false;
20824
20824
  }
20825
- function prefixIssues(path19, issues) {
20825
+ function prefixIssues(path20, issues) {
20826
20826
  return issues.map((iss) => {
20827
20827
  var _a3;
20828
20828
  (_a3 = iss).path ?? (_a3.path = []);
20829
- iss.path.unshift(path19);
20829
+ iss.path.unshift(path20);
20830
20830
  return iss;
20831
20831
  });
20832
20832
  }
@@ -21276,16 +21276,16 @@ function flattenError(error62, mapper = (issue2) => issue2.message) {
21276
21276
  }
21277
21277
  function formatError(error62, mapper = (issue2) => issue2.message) {
21278
21278
  const fieldErrors = { _errors: [] };
21279
- const processError = (error63, path19 = []) => {
21279
+ const processError = (error63, path20 = []) => {
21280
21280
  for (const issue2 of error63.issues) {
21281
21281
  if (issue2.code === "invalid_union" && issue2.errors.length) {
21282
- issue2.errors.map((issues) => processError({ issues }, [...path19, ...issue2.path]));
21282
+ issue2.errors.map((issues) => processError({ issues }, [...path20, ...issue2.path]));
21283
21283
  } else if (issue2.code === "invalid_key") {
21284
- processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
21284
+ processError({ issues: issue2.issues }, [...path20, ...issue2.path]);
21285
21285
  } else if (issue2.code === "invalid_element") {
21286
- processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
21286
+ processError({ issues: issue2.issues }, [...path20, ...issue2.path]);
21287
21287
  } else {
21288
- const fullpath = [...path19, ...issue2.path];
21288
+ const fullpath = [...path20, ...issue2.path];
21289
21289
  if (fullpath.length === 0) {
21290
21290
  fieldErrors._errors.push(mapper(issue2));
21291
21291
  } else {
@@ -21324,17 +21324,17 @@ function formatError(error62, mapper = (issue2) => issue2.message) {
21324
21324
  }
21325
21325
  function treeifyError(error62, mapper = (issue2) => issue2.message) {
21326
21326
  const result = { errors: [] };
21327
- const processError = (error63, path19 = []) => {
21327
+ const processError = (error63, path20 = []) => {
21328
21328
  var _a3;
21329
21329
  for (const issue2 of error63.issues) {
21330
21330
  if (issue2.code === "invalid_union" && issue2.errors.length) {
21331
- issue2.errors.map((issues) => processError({ issues }, [...path19, ...issue2.path]));
21331
+ issue2.errors.map((issues) => processError({ issues }, [...path20, ...issue2.path]));
21332
21332
  } else if (issue2.code === "invalid_key") {
21333
- processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
21333
+ processError({ issues: issue2.issues }, [...path20, ...issue2.path]);
21334
21334
  } else if (issue2.code === "invalid_element") {
21335
- processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
21335
+ processError({ issues: issue2.issues }, [...path20, ...issue2.path]);
21336
21336
  } else {
21337
- const fullpath = [...path19, ...issue2.path];
21337
+ const fullpath = [...path20, ...issue2.path];
21338
21338
  if (fullpath.length === 0) {
21339
21339
  result.errors.push(mapper(issue2));
21340
21340
  continue;
@@ -21373,8 +21373,8 @@ function treeifyError(error62, mapper = (issue2) => issue2.message) {
21373
21373
  }
21374
21374
  function toDotPath(_path) {
21375
21375
  const segs = [];
21376
- const path19 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
21377
- for (const seg of path19) {
21376
+ const path20 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
21377
+ for (const seg of path20) {
21378
21378
  if (typeof seg === "number")
21379
21379
  segs.push(`[${seg}]`);
21380
21380
  else if (typeof seg === "symbol")
@@ -38476,13 +38476,13 @@ function resolveRef(ref, ctx) {
38476
38476
  if (!ref.startsWith("#")) {
38477
38477
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
38478
38478
  }
38479
- const path19 = ref.slice(1).split("/").filter(Boolean);
38480
- if (path19.length === 0) {
38479
+ const path20 = ref.slice(1).split("/").filter(Boolean);
38480
+ if (path20.length === 0) {
38481
38481
  return ctx.rootSchema;
38482
38482
  }
38483
38483
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
38484
- if (path19[0] === defsKey) {
38485
- const key = path19[1] === void 0 ? void 0 : decodeJSONPointerSegment(path19[1]);
38484
+ if (path20[0] === defsKey) {
38485
+ const key = path20[1] === void 0 ? void 0 : decodeJSONPointerSegment(path20[1]);
38486
38486
  if (!key || !ctx.defs[key]) {
38487
38487
  throw new Error(`Reference not found: ${ref}`);
38488
38488
  }
@@ -39765,8 +39765,8 @@ var Api = class {
39765
39765
  this.conn = conn;
39766
39766
  }
39767
39767
  conn;
39768
- async request(method, path19, body, { allow404 = false } = {}) {
39769
- const url2 = `${this.conn.server}/api/v1${path19}`;
39768
+ async request(method, path20, body, { allow404 = false } = {}) {
39769
+ const url2 = `${this.conn.server}/api/v1${path20}`;
39770
39770
  let res;
39771
39771
  try {
39772
39772
  res = await fetch(url2, {
@@ -39788,7 +39788,7 @@ var Api = class {
39788
39788
  payload = await res.json();
39789
39789
  } catch {
39790
39790
  }
39791
- const msg = payload.message ?? `${method} ${path19} failed with HTTP ${res.status}.`;
39791
+ const msg = payload.message ?? `${method} ${path20} failed with HTTP ${res.status}.`;
39792
39792
  if (res.status === 401) {
39793
39793
  throw new CliError(
39794
39794
  msg,
@@ -39879,17 +39879,17 @@ function parseManifest(text) {
39879
39879
  }
39880
39880
  return manifest;
39881
39881
  }
39882
- function parseEvalSuite(text, path19 = "suite") {
39882
+ function parseEvalSuite(text, path20 = "suite") {
39883
39883
  let raw;
39884
39884
  try {
39885
39885
  raw = import_yaml.default.parse(text);
39886
39886
  } catch (err) {
39887
- throw new ManifestError(`${path19} is not valid YAML: ${err.message}`);
39887
+ throw new ManifestError(`${path20} is not valid YAML: ${err.message}`);
39888
39888
  }
39889
39889
  const res = EvalSuite.safeParse(raw);
39890
39890
  if (!res.success) {
39891
39891
  const issues = res.error.issues.map((i) => ({ path: i.path.join("."), message: i.message }));
39892
- throw new ManifestError(`${path19} is invalid: ${issues.map((i) => `${i.path}: ${i.message}`).join("; ")}`, issues);
39892
+ throw new ManifestError(`${path20} is invalid: ${issues.map((i) => `${i.path}: ${i.message}`).join("; ")}`, issues);
39893
39893
  }
39894
39894
  return res.data;
39895
39895
  }
@@ -39946,8 +39946,8 @@ function asText(content) {
39946
39946
  return null;
39947
39947
  return typeof content === "string" ? content : new TextDecoder().decode(content);
39948
39948
  }
39949
- function isYarkrOnly(path19) {
39950
- return path19 === MANIFEST_FILE || path19 === INDEX_FILE || path19.startsWith("evals/") || path19.startsWith("fixtures/");
39949
+ function isYarkrOnly(path20) {
39950
+ return path20 === MANIFEST_FILE || path20 === INDEX_FILE || path20.startsWith("evals/") || path20.startsWith("fixtures/");
39951
39951
  }
39952
39952
  function skillEntryPath(m) {
39953
39953
  return m.entry ?? "SKILL.md";
@@ -39975,10 +39975,10 @@ ${body.replace(/^\n+/, "")}`);
39975
39975
  function skillFolderFiles(pkg, dir, folderName) {
39976
39976
  const entry = skillEntryPath(pkg.manifest);
39977
39977
  const files = [{ package: pkg.manifest.name, path: join(dir, folderName, "SKILL.md"), content: renderSkillMd(pkg, folderName) }];
39978
- for (const [path19, content] of Object.entries(pkg.files)) {
39979
- if (path19 === entry || path19 === "SKILL.md" || isYarkrOnly(path19))
39978
+ for (const [path20, content] of Object.entries(pkg.files)) {
39979
+ if (path20 === entry || path20 === "SKILL.md" || isYarkrOnly(path20))
39980
39980
  continue;
39981
- files.push({ package: pkg.manifest.name, path: join(dir, folderName, path19), content });
39981
+ files.push({ package: pkg.manifest.name, path: join(dir, folderName, path20), content });
39982
39982
  }
39983
39983
  return files;
39984
39984
  }
@@ -40072,13 +40072,13 @@ function nativeFolderHarness(o) {
40072
40072
  ...o.mcp ? {
40073
40073
  toolsets(servers, ctx) {
40074
40074
  const mcp = o.mcp;
40075
- const path19 = ctx.layout[slot];
40076
- if (!path19) {
40075
+ const path20 = ctx.layout[slot];
40076
+ if (!path20) {
40077
40077
  if (mcp.unavailable)
40078
40078
  ctx.out.notes.push(mcp.unavailable(servers));
40079
40079
  return;
40080
40080
  }
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)])) });
40081
+ ctx.out.mcp.push({ path: path20, key: mcp.key, servers: Object.fromEntries(servers.map(({ pkg, server }) => [server.name, mcp.entry(pkg, server, ctx.out.notes)])) });
40082
40082
  }
40083
40083
  } : {}
40084
40084
  });
@@ -40263,10 +40263,10 @@ var cursor = defineHarness({
40263
40263
  const entry = skillEntryPath(pkg.manifest);
40264
40264
  const { data, body } = splitFrontmatter(asText(pkg.files[entry]) ?? "");
40265
40265
  const extra = [];
40266
- for (const [path19, content] of Object.entries(pkg.files)) {
40267
- if (path19 === entry || isYarkrOnly(path19))
40266
+ for (const [path20, content] of Object.entries(pkg.files)) {
40267
+ if (path20 === entry || isYarkrOnly(path20))
40268
40268
  continue;
40269
- const p = join(l.assets, name, path19);
40269
+ const p = join(l.assets, name, path20);
40270
40270
  ctx.out.files.push({ package: pkg.manifest.name, path: p, content });
40271
40271
  extra.push(`- \`${p}\``);
40272
40272
  }
@@ -40337,9 +40337,9 @@ function folderExportHarness(id, rootDefault, opts = {}) {
40337
40337
  for (const pkg of byKind(input2, "agent")) {
40338
40338
  const name = names.get(pkg.manifest.name);
40339
40339
  const parts = agentParts(pkg, id, names, out);
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
+ for (const [path20, content] of Object.entries(pkg.files))
40341
+ if (!isYarkrOnly(path20))
40342
+ out.files.push({ package: pkg.manifest.name, path: join(root, "agents", name, path20), content });
40343
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 ?? "") });
40344
40344
  }
40345
40345
  for (const pkg of byKind(input2, "toolset")) {
@@ -41148,36 +41148,36 @@ var dirname = (p) => p.includes("/") ? p.slice(0, p.lastIndexOf("/")) : "";
41148
41148
  var basename = (p) => p.slice(p.lastIndexOf("/") + 1);
41149
41149
  var under = (dir, p) => dir ? p.startsWith(`${dir}/`) : true;
41150
41150
  var rel = (dir, p) => dir ? p.slice(dir.length + 1) : p;
41151
- function parseOverrides(text, path19, problems) {
41151
+ function parseOverrides(text, path20, problems) {
41152
41152
  if (text === null)
41153
41153
  return null;
41154
41154
  try {
41155
41155
  const raw = import_yaml3.default.parse(text);
41156
41156
  return raw && typeof raw === "object" ? raw : null;
41157
41157
  } catch (err) {
41158
- problems.push({ path: path19, message: `${MANIFEST_FILE} isn't valid YAML: ${err.message}` });
41158
+ problems.push({ path: path20, message: `${MANIFEST_FILE} isn't valid YAML: ${err.message}` });
41159
41159
  return null;
41160
41160
  }
41161
41161
  }
41162
- function parseIndex(text, path19, problems) {
41162
+ function parseIndex(text, path20, problems) {
41163
41163
  let raw;
41164
41164
  try {
41165
41165
  raw = import_yaml3.default.parse(text ?? "");
41166
41166
  } catch (err) {
41167
- problems.push({ path: path19, message: `isn't valid YAML: ${err.message}` });
41167
+ problems.push({ path: path20, message: `isn't valid YAML: ${err.message}` });
41168
41168
  return null;
41169
41169
  }
41170
41170
  const entries = (key) => {
41171
41171
  const list = raw?.[key] ?? [];
41172
41172
  if (!Array.isArray(list)) {
41173
- problems.push({ path: path19, message: `\`${key}\` must be a list.` });
41173
+ problems.push({ path: path20, message: `\`${key}\` must be a list.` });
41174
41174
  return [];
41175
41175
  }
41176
41176
  return list.flatMap((e, i) => {
41177
41177
  const entry = typeof e === "string" ? { path: e } : e;
41178
41178
  if (entry && typeof entry === "object" && typeof entry.path === "string" && entry.path.trim())
41179
41179
  return [{ ...entry, path: entry.path.replace(/^\.?\/+|\/+$/g, "") }];
41180
- problems.push({ path: path19, message: `${key}[${i}] needs a \`path\`.` });
41180
+ problems.push({ path: path20, message: `${key}[${i}] needs a \`path\`.` });
41181
41181
  return [];
41182
41182
  });
41183
41183
  };
@@ -41193,7 +41193,7 @@ async function detectAssets(input2) {
41193
41193
  const claimed = [];
41194
41194
  const isClaimed = (p) => claimed.some((d) => d ? p === d || p.startsWith(`${d}/`) : true);
41195
41195
  const filesBelow = (dir) => new Map(paths.filter((p) => under(dir, p)).map((p) => [rel(dir, p), p]));
41196
- const make = (name, kind, path19, files, o, extra) => {
41196
+ const make = (name, kind, path20, files, o, extra) => {
41197
41197
  const suites = [...files.keys()].filter((p) => SUITE.test(p));
41198
41198
  const raw = {
41199
41199
  name: `${input2.namespace}/${slugify2(name)}`,
@@ -41212,10 +41212,10 @@ async function detectAssets(input2) {
41212
41212
  };
41213
41213
  const res = Manifest.safeParse(raw);
41214
41214
  if (!res.success) {
41215
- problems.push({ path: path19, message: res.error.issues.map((i) => `${i.path.join(".") || "manifest"}: ${i.message}`).join("; ") });
41215
+ problems.push({ path: path20, message: res.error.issues.map((i) => `${i.path.join(".") || "manifest"}: ${i.message}`).join("; ") });
41216
41216
  return null;
41217
41217
  }
41218
- return { name: slugify2(name), kind, path: path19, manifest: res.data, files };
41218
+ return { name: slugify2(name), kind, path: path20, manifest: res.data, files };
41219
41219
  };
41220
41220
  const manifestNear = async (dir, from) => {
41221
41221
  const mp = dir ? `${dir}/${MANIFEST_FILE}` : MANIFEST_FILE;
@@ -41388,12 +41388,12 @@ async function sameFiles(a, b, read) {
41388
41388
  }
41389
41389
  return true;
41390
41390
  }
41391
- function toolsetServers2(text, path19, problems) {
41391
+ function toolsetServers2(text, path20, problems) {
41392
41392
  let doc;
41393
41393
  try {
41394
41394
  doc = JSON.parse(text ?? "");
41395
41395
  } catch (err) {
41396
- problems.push({ path: path19, message: `isn't valid JSON: ${err.message}` });
41396
+ problems.push({ path: path20, message: `isn't valid JSON: ${err.message}` });
41397
41397
  return null;
41398
41398
  }
41399
41399
  const out = [];
@@ -41406,7 +41406,7 @@ function toolsetServers2(text, path19, problems) {
41406
41406
  const ref = String(v).replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-[^}]*)?\}/g, "${env:$1}");
41407
41407
  const plain = ref.replace(/^Bearer /, "");
41408
41408
  if (!SECRET_REF.test(plain)) {
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.` });
41409
+ problems.push({ path: path20, 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.` });
41410
41410
  return null;
41411
41411
  }
41412
41412
  res[k] = ref;
@@ -41426,7 +41426,7 @@ function toolsetServers2(text, path19, problems) {
41426
41426
  });
41427
41427
  }
41428
41428
  if (!out.length) {
41429
- problems.push({ path: path19, message: "has no mcpServers." });
41429
+ problems.push({ path: path20, message: "has no mcpServers." });
41430
41430
  return null;
41431
41431
  }
41432
41432
  return out;
@@ -41550,8 +41550,8 @@ function verifyBundle(b, key, requireSignature) {
41550
41550
  return { manifest: b.manifest, files, content_hash: b.content_hash };
41551
41551
  }
41552
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;
41553
- function looksText(path19, bytes) {
41554
- if (TEXT_EXT.test(path19)) return true;
41553
+ function looksText(path20, bytes) {
41554
+ if (TEXT_EXT.test(path20)) return true;
41555
41555
  const n = Math.min(bytes.length, 4096);
41556
41556
  for (let i = 0; i < n; i++) if (bytes[i] === 0) return false;
41557
41557
  try {
@@ -42121,16 +42121,16 @@ var Diff = class {
42121
42121
  }
42122
42122
  }
42123
42123
  }
42124
- addToPath(path19, added, removed, oldPosInc, options) {
42125
- const last = path19.lastComponent;
42124
+ addToPath(path20, added, removed, oldPosInc, options) {
42125
+ const last = path20.lastComponent;
42126
42126
  if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {
42127
42127
  return {
42128
- oldPos: path19.oldPos + oldPosInc,
42128
+ oldPos: path20.oldPos + oldPosInc,
42129
42129
  lastComponent: { count: last.count + 1, added, removed, previousComponent: last.previousComponent }
42130
42130
  };
42131
42131
  } else {
42132
42132
  return {
42133
- oldPos: path19.oldPos + oldPosInc,
42133
+ oldPos: path20.oldPos + oldPosInc,
42134
42134
  lastComponent: { count: 1, added, removed, previousComponent: last }
42135
42135
  };
42136
42136
  }
@@ -42772,10 +42772,10 @@ async function loadSuites(candidate, candFiles, shared) {
42772
42772
  }
42773
42773
  return out;
42774
42774
  }
42775
- function parseSuite(bytes, ref, path19, source) {
42775
+ function parseSuite(bytes, ref, path20, source) {
42776
42776
  const text = bytes.toString("utf8");
42777
42777
  try {
42778
- return { suite: parseEvalSuite(text, path19), ref, path: path19, source, hash: sha256(text) };
42778
+ return { suite: parseEvalSuite(text, path20), ref, path: path20, source, hash: sha256(text) };
42779
42779
  } catch (err) {
42780
42780
  throw new SuiteError(err.message);
42781
42781
  }
@@ -44276,7 +44276,7 @@ async function registrySnapshot(api, name, opts = {}) {
44276
44276
  const rel2 = await api.resolve(name, { channel: opts.channel ?? "stable", range: opts.range });
44277
44277
  const bundle = await api.bundle(name, rel2.version);
44278
44278
  const files = new Map(bundle.files.map((f) => [f.path, Buffer.from(f.content, "base64")]));
44279
- const tree = buildTree([...files].map(([path19, bytes]) => ({ path: path19, bytes })));
44279
+ const tree = buildTree([...files].map(([path20, bytes]) => ({ path: path20, bytes })));
44280
44280
  return { snapshot: { name, label: bundle.version, contentHash: bundle.content_hash, manifest: bundle.manifest, tree }, files };
44281
44281
  }
44282
44282
  function registrySuiteResolver(getApi) {
@@ -45086,26 +45086,66 @@ var petrol = rgb(74, 163, 191);
45086
45086
  function link(url2, text = url2) {
45087
45087
  return kleur_default.enabled ? `\x1B]8;;${url2}\x1B\\${text}\x1B]8;;\x1B\\` : text;
45088
45088
  }
45089
- function banner(version2, invokedAs = "yarkr") {
45089
+ function banner(version2, longName = false, update2) {
45090
45090
  return [
45091
45091
  "",
45092
45092
  ...WORDMARK.map((l) => ` ${petrol(l)}`),
45093
45093
  "",
45094
45094
  ` ${kleur_default.bold("yarkr")} ${kleur_default.dim(`v${version2}`)} ${kleur_default.dim("\xB7")} skills, agents and MCP toolsets for every harness`,
45095
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")}.`] : [],
45096
+ ...update2 ? ["", ` ${kleur_default.yellow(`\u26A0 yarkr-cli ${update2.latest} is available (you have ${version2}).`)} Update: ${kleur_default.bold(update2.command)}`] : [],
45097
+ ...longName ? ["", ` ${kleur_default.dim("Tip:")} install it with ${kleur_default.bold("npm install -g yarkr-cli")}, then just run ${kleur_default.bold("yarkr")}.`] : [],
45097
45098
  ""
45098
45099
  ].join("\n");
45099
45100
  }
45100
45101
 
45102
+ // src/update-check.ts
45103
+ var import_semver4 = __toESM(require_semver2(), 1);
45104
+ import { mkdir as mkdir9, readFile as readFile11, writeFile as writeFile8 } from "fs/promises";
45105
+ import path18 from "path";
45106
+ var LATEST_URL = "https://registry.npmjs.org/yarkr-cli/latest";
45107
+ var CHECK_EVERY_MS = 24 * 60 * 60 * 1e3;
45108
+ var TIMEOUT_MS = 1500;
45109
+ var cacheFile = () => path18.join(userStateDir(), "update-check.json");
45110
+ async function newerVersion(current, env = process.env) {
45111
+ if (env.CI || env.YARKR_NO_UPDATE_CHECK || env.NO_UPDATE_NOTIFIER || !import_semver4.default.valid(current) || current === "0.0.0-dev") return null;
45112
+ const latest = await latestVersion();
45113
+ return latest && import_semver4.default.gt(latest, current) ? latest : null;
45114
+ }
45115
+ async function latestVersion() {
45116
+ try {
45117
+ const cached2 = JSON.parse(await readFile11(cacheFile(), "utf8"));
45118
+ if (Date.now() - cached2.checked_at < CHECK_EVERY_MS && import_semver4.default.valid(cached2.latest)) return cached2.latest;
45119
+ } catch {
45120
+ }
45121
+ try {
45122
+ const res = await fetch(LATEST_URL, { signal: AbortSignal.timeout(TIMEOUT_MS), headers: { accept: "application/json" } });
45123
+ if (!res.ok) return null;
45124
+ const { version: version2 } = await res.json();
45125
+ if (!version2 || !import_semver4.default.valid(version2)) return null;
45126
+ await mkdir9(userStateDir(), { recursive: true });
45127
+ await writeFile8(cacheFile(), JSON.stringify({ checked_at: Date.now(), latest: version2 }));
45128
+ return version2;
45129
+ } catch {
45130
+ return null;
45131
+ }
45132
+ }
45133
+ var viaNpx = (scriptPath = process.argv[1] ?? "") => /[\\/]_npx[\\/]/.test(scriptPath);
45134
+ function updateCommand(latest, scriptPath = process.argv[1] ?? "") {
45135
+ return viaNpx(scriptPath) ? `npx yarkr-cli@${latest}` : `npm install -g yarkr-cli@${latest}`;
45136
+ }
45137
+
45101
45138
  // src/index.ts
45102
- var VERSION = true ? "1.0.5" : "0.0.0-dev";
45139
+ var VERSION = true ? "1.0.6" : "0.0.0-dev";
45103
45140
  var act = (fn) => async (...a) => {
45104
45141
  await fn(...a);
45105
45142
  };
45106
45143
  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)");
45107
- function buildProgram() {
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) => {
45144
+ function buildProgram(latest = null) {
45145
+ const program2 = new Command().name("yarkr").description("Yarkr: install your org's skills, agents and MCP configs into every harness.").version(VERSION).addHelpText(
45146
+ "before",
45147
+ () => banner(VERSION, viaNpx() || path19.basename(process.argv[1] ?? "", ".js") === "yarkr-cli", latest ? { latest, command: updateCommand(latest) } : null)
45148
+ ).option("-q, --quiet", "only print warnings and errors").hook("preAction", (cmd) => {
45109
45149
  ui.quiet = !!cmd.opts().quiet;
45110
45150
  });
45111
45151
  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));
@@ -45150,9 +45190,11 @@ function buildProgram() {
45150
45190
  program2.command("mcp-config").argument("<harness>", HARNESS_IDS.join(" | ")).description("print the config that connects a harness to Yarkr's MCP server").option("--token-env <name>", "environment variable holding the token", "YARKR_TOKEN").option("--registry <url>").action(act(mcpConfig));
45151
45191
  return program2;
45152
45192
  }
45193
+ var showsBanner = (args) => args.length === 0 || args.length === 1 && (args[0] === "-h" || args[0] === "--help");
45153
45194
  async function main(argv = process.argv) {
45154
45195
  try {
45155
- await buildProgram().parseAsync(argv);
45196
+ const latest = showsBanner(argv.slice(2)) ? await newerVersion(VERSION) : null;
45197
+ await buildProgram(latest).parseAsync(argv);
45156
45198
  } catch (err) {
45157
45199
  if (err instanceof CliError) {
45158
45200
  ui.error(err.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yarkr-cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
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",