@warmhub/cli 0.68.0 → 0.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/wh.js +85 -281
  2. package/package.json +1 -1
package/dist/wh.js CHANGED
@@ -18618,6 +18618,26 @@ function stableJsonEquals(left, right) {
18618
18618
  return stableJson(left) === stableJson(right);
18619
18619
  }
18620
18620
 
18621
+ // ../../packages/rules/src/subscribable-events.ts
18622
+ var COMMIT_EVENT_TYPE = "commit";
18623
+ var REPO_RENAMED_EVENT_TYPE = "repo.renamed";
18624
+ var ORG_RENAMED_EVENT_TYPE = "org.renamed";
18625
+ var THING_RENAMED_EVENT_TYPE = "thing.renamed";
18626
+ var SHAPE_RENAMED_EVENT_TYPE = "shape.renamed";
18627
+ var SUBSCRIBABLE_EVENT_TYPES = [
18628
+ COMMIT_EVENT_TYPE,
18629
+ REPO_RENAMED_EVENT_TYPE,
18630
+ ORG_RENAMED_EVENT_TYPE,
18631
+ THING_RENAMED_EVENT_TYPE,
18632
+ SHAPE_RENAMED_EVENT_TYPE
18633
+ ];
18634
+ var REPO_SCOPED_EVENT_TYPES = [
18635
+ COMMIT_EVENT_TYPE,
18636
+ REPO_RENAMED_EVENT_TYPE,
18637
+ THING_RENAMED_EVENT_TYPE,
18638
+ SHAPE_RENAMED_EVENT_TYPE
18639
+ ];
18640
+
18621
18641
  // ../../packages/rules/src/component-install.ts
18622
18642
  function manifestShapeData(shape) {
18623
18643
  const data = { fields: shape.fields };
@@ -19168,6 +19188,24 @@ function validateCredential(cred, i, errors) {
19168
19188
  }
19169
19189
  validateProvisioning(cred, path, errors);
19170
19190
  }
19191
+ function validateEventTrigger(trigger, path, errors) {
19192
+ const event = trigger.event;
19193
+ if (event !== undefined) {
19194
+ if (typeof event !== "string" || !REPO_SCOPED_EVENT_TYPES.includes(event)) {
19195
+ errors.push(`${path}.event must be one of: ${REPO_SCOPED_EVENT_TYPES.join(", ")}`);
19196
+ return;
19197
+ }
19198
+ }
19199
+ if (event === undefined || event === COMMIT_EVENT_TYPE) {
19200
+ requireString(trigger, "shape", path, errors);
19201
+ return;
19202
+ }
19203
+ for (const field of ["shape", "filter"]) {
19204
+ if (trigger[field] !== undefined) {
19205
+ errors.push(`${path}.${field} is not valid for a "${event}" trigger — metadata events have no shape or filter`);
19206
+ }
19207
+ }
19208
+ }
19171
19209
  function validateSubscription(sub, i, errors) {
19172
19210
  const path = `manifest.subscriptions[${i}]`;
19173
19211
  if (!isObject2(sub)) {
@@ -19188,7 +19226,7 @@ function validateSubscription(sub, i, errors) {
19188
19226
  errors.push(`${path}.trigger must be an object`);
19189
19227
  } else {
19190
19228
  if (sub.trigger.kind === "event") {
19191
- requireString(sub.trigger, "shape", `${path}.trigger`, errors);
19229
+ validateEventTrigger(sub.trigger, `${path}.trigger`, errors);
19192
19230
  } else if (sub.trigger.kind === "cron") {
19193
19231
  errors.push(`${path}.trigger.kind "cron" is no longer supported; cron subscriptions were removed from the public surface — use an "event" trigger`);
19194
19232
  } else {
@@ -19407,7 +19445,7 @@ function validateManifestSemantics(manifest) {
19407
19445
  ]);
19408
19446
  const knownSeedShapes = new Set([...shapeNames, "ComponentConfig"]);
19409
19447
  for (const sub of manifest.subscriptions) {
19410
- if (sub.trigger.kind === "event" && !knownSubscriptionTriggerShapes.has(sub.trigger.shape)) {
19448
+ if (sub.trigger.kind === "event" && sub.trigger.shape !== undefined && !knownSubscriptionTriggerShapes.has(sub.trigger.shape)) {
19411
19449
  findings.push({
19412
19450
  level: "error",
19413
19451
  code: "MISSING_SUBSCRIPTION_TRIGGER_SHAPE_REF",
@@ -20040,12 +20078,17 @@ function builtinShapeGuard(op, operationIndex) {
20040
20078
  operationIndex,
20041
20079
  message: `Shape "${op.newName}" is a retired collection shape and cannot be written manually`
20042
20080
  });
20043
- } else if (op.operation !== "retract" && op.kind === "shape" && name && isBuiltinShape(name)) {
20044
- errors.push({
20045
- code: "RESERVED_NAME",
20046
- operationIndex,
20047
- message: `Shape "${name}" is a built-in shape and cannot be ${op.operation === "add" ? "created" : "revised"} manually`
20048
- });
20081
+ } else {
20082
+ const isShapeRename = op.operation === "rename" && (op.kind === "shape" || op.name !== undefined && !splitLocalPath(op.name));
20083
+ const builtinShapeName = name && isBuiltinShape(name) ? name : isShapeRename && op.newName && isBuiltinShape(op.newName) ? op.newName : undefined;
20084
+ if (builtinShapeName && (isShapeRename || op.operation !== "retract" && op.kind === "shape")) {
20085
+ const action = op.operation === "add" ? "created" : op.operation === "rename" ? "renamed" : "revised";
20086
+ errors.push({
20087
+ code: "RESERVED_NAME",
20088
+ operationIndex,
20089
+ message: `Shape "${builtinShapeName}" is a built-in shape and cannot be ${action} manually`
20090
+ });
20091
+ }
20049
20092
  }
20050
20093
  if (name) {
20051
20094
  const local = splitLocalPath(name);
@@ -27356,15 +27399,6 @@ function validateShapeDefinition(data, options = {}) {
27356
27399
  }
27357
27400
  return { valid: true };
27358
27401
  }
27359
- // ../../packages/rules/src/subscribable-events.ts
27360
- var COMMIT_EVENT_TYPE = "commit";
27361
- var REPO_RENAMED_EVENT_TYPE = "repo.renamed";
27362
- var ORG_RENAMED_EVENT_TYPE = "org.renamed";
27363
- var SUBSCRIBABLE_EVENT_TYPES = [
27364
- COMMIT_EVENT_TYPE,
27365
- REPO_RENAMED_EVENT_TYPE,
27366
- ORG_RENAMED_EVENT_TYPE
27367
- ];
27368
27402
  // ../../packages/rules/src/system-components/system.ts
27369
27403
  var SYSTEM_COMPONENT_ID = "com.warmhub.system";
27370
27404
  var COMPONENT_INSTALL_FIELDS = {
@@ -27427,7 +27461,7 @@ function findSystemComponent(componentId) {
27427
27461
  // ../../packages/sdk-ts/package.json
27428
27462
  var package_default = {
27429
27463
  name: "@warmhub/sdk-ts",
27430
- version: "0.67.0",
27464
+ version: "0.68.0",
27431
27465
  private: false,
27432
27466
  type: "module",
27433
27467
  description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -33255,21 +33289,21 @@ var createFlags = {
33255
33289
  about: flag.string({ description: "Target wref" }),
33256
33290
  message: flag.string({ short: "m", description: "Commit message" }),
33257
33291
  committer: flag.string({
33258
- description: "Committer thing wref (e.g. Agent/bot-1)"
33292
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
33259
33293
  })
33260
33294
  };
33261
33295
  var reviseFlags = {
33262
33296
  data: flag.string({ description: "Data payload (JSON)" }),
33263
33297
  message: flag.string({ short: "m", description: "Commit message" }),
33264
33298
  committer: flag.string({
33265
- description: "Committer thing wref (e.g. Agent/bot-1)"
33299
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
33266
33300
  })
33267
33301
  };
33268
33302
  var retractFlags = {
33269
33303
  reason: flag.string({ description: "Reason for retraction (<=500 chars)" }),
33270
33304
  message: flag.string({ short: "m", description: "Commit message" }),
33271
33305
  committer: flag.string({
33272
- description: "Committer thing wref (e.g. Agent/bot-1)"
33306
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
33273
33307
  })
33274
33308
  };
33275
33309
  var handleRevise = async (ctx, { flags, args }) => {
@@ -33356,9 +33390,14 @@ var handleCreate = async (ctx, { flags, args }) => {
33356
33390
 
33357
33391
  // ../../packages/warmhub-cli/src/domains/thing/shared.ts
33358
33392
  var DURABLE_ID_PATTERN_RE = /^[0-9a-zA-HJ-NP-Tv-z]{60}(@(v\d+|HEAD|ALL))?$/i;
33393
+ var WREF_SEGMENT = String.raw`[^/?#@:\s$]+`;
33394
+ var CANONICAL_WREF_PATTERN_RE = new RegExp(String.raw`^wh:${WREF_SEGMENT}/${WREF_SEGMENT}/${WREF_SEGMENT}(?:/${WREF_SEGMENT})*(?:@(?:v[1-9]\d*|HEAD|ALL))?$`, "i");
33359
33395
  function looksLikeDurableId(wref) {
33360
33396
  return DURABLE_ID_PATTERN_RE.test(wref);
33361
33397
  }
33398
+ function looksLikeCanonicalWref(wref) {
33399
+ return CANONICAL_WREF_PATTERN_RE.test(wref);
33400
+ }
33362
33401
  var DEFAULT_PAGE_LIMIT = 50;
33363
33402
  var DEFAULT_SEARCH_LIMIT = 25;
33364
33403
  var MAX_PAGE_LIMIT = 500;
@@ -33510,7 +33549,7 @@ var createFlags2 = {
33510
33549
  }),
33511
33550
  message: flag.string({ short: "m", description: "Commit message" }),
33512
33551
  committer: flag.string({
33513
- description: "Committer thing wref (e.g. Agent/bot-1)"
33552
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
33514
33553
  })
33515
33554
  };
33516
33555
  var handleCreate2 = async (ctx, { flags, args }) => {
@@ -34414,10 +34453,10 @@ function renderQueryResults(out, c, result) {
34414
34453
  // ../../packages/warmhub-cli/src/domains/thing/refs.ts
34415
34454
  var refsFlags = {
34416
34455
  inbound: flag.boolean({
34417
- description: "Show inbound refs (what references this thing) [default]"
34456
+ description: "Show inbound refs (what references this target) [default]"
34418
34457
  }),
34419
34458
  outbound: flag.boolean({
34420
- description: "Show outbound refs (what this thing references)"
34459
+ description: "Show outbound refs (what this target references)"
34421
34460
  }),
34422
34461
  field: flag.string({ description: "Filter by field path (inbound only)" }),
34423
34462
  limit: flag.number({
@@ -34532,7 +34571,7 @@ var handleResolve = async (ctx, { args }) => {
34532
34571
  if (!wref) {
34533
34572
  usageError("Usage: wh thing resolve <wref>", "wh thing resolve player");
34534
34573
  }
34535
- const { org, repo } = looksLikeDurableId(wref) ? parseOrgRepoOptional(getRepoRef(ctx), ctx.config) : parseOrgRepo(getRepoRef(ctx), ctx.config);
34574
+ const { org, repo } = looksLikeDurableId(wref) || looksLikeCanonicalWref(wref) ? parseOrgRepoOptional(getRepoRef(ctx), ctx.config) : parseOrgRepo(getRepoRef(ctx), ctx.config);
34536
34575
  const c = ctx.colors;
34537
34576
  const result = await ctx.client.thing.resolve(org, repo, wref);
34538
34577
  writeOutput(ctx, result, () => {
@@ -34552,7 +34591,7 @@ var retractFlags2 = {
34552
34591
  reason: flag.string({ description: "Reason for retraction (<=500 chars)" }),
34553
34592
  message: flag.string({ short: "m", description: "Commit message" }),
34554
34593
  committer: flag.string({
34555
- description: "Committer thing wref (e.g. Agent/bot-1)"
34594
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
34556
34595
  }),
34557
34596
  "lease-id": flag.string({
34558
34597
  description: "Read-lease token from `wh thing lease` (auto-released on success)"
@@ -34592,7 +34631,7 @@ var reviseFlags2 = {
34592
34631
  data: flag.string({ description: "Data payload (JSON)" }),
34593
34632
  message: flag.string({ short: "m", description: "Commit message" }),
34594
34633
  committer: flag.string({
34595
- description: "Committer thing wref (e.g. Agent/bot-1)"
34634
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
34596
34635
  }),
34597
34636
  "expected-version": flag.number({
34598
34637
  description: "Only apply if the target is still at this version (optimistic concurrency)"
@@ -34805,7 +34844,7 @@ var viewFlags = {
34805
34844
  description: "Resolve embedded graph to this depth (1-5)"
34806
34845
  }),
34807
34846
  "include-retracted": flag.boolean({
34808
- description: "View a retracted thing"
34847
+ description: "View a retracted shape or shaped thing"
34809
34848
  }),
34810
34849
  file: flag.string({
34811
34850
  description: "Read additional wrefs from <path>, one per line. Use `--file=-` for stdin (the `=` form is required) or pass bare `-` as a positional. Lines starting with '#' and blank lines are ignored; lines are not split on any other character."
@@ -35032,7 +35071,7 @@ var THING_DOMAIN = defineDomain({
35032
35071
  },
35033
35072
  resolve: {
35034
35073
  prime: true,
35035
- summary: "Resolve wref to thing",
35074
+ summary: "Resolve a wref to its canonical thing identity",
35036
35075
  args: "<wref>",
35037
35076
  handler: handleResolve
35038
35077
  },
@@ -35056,7 +35095,7 @@ var THING_DOMAIN = defineDomain({
35056
35095
  },
35057
35096
  retract: {
35058
35097
  prime: true,
35059
- summary: "Withdraw a thing, assertion, shape, or collection. Irreversible for the given identity.",
35098
+ summary: "Withdraw a thing. Irreversible for the given identity.",
35060
35099
  args: "<wref>",
35061
35100
  flags: retractFlags2,
35062
35101
  examples: [
@@ -35094,7 +35133,7 @@ var THING_DOMAIN = defineDomain({
35094
35133
  },
35095
35134
  refs: {
35096
35135
  prime: true,
35097
- summary: "Show refs (backlinks or cross-references) for a thing",
35136
+ summary: "Show refs (backlinks or cross-references) for a target",
35098
35137
  args: "<wref>",
35099
35138
  flags: refsFlags,
35100
35139
  examples: [
@@ -35126,7 +35165,7 @@ var THING_DOMAIN = defineDomain({
35126
35165
  "wh thing graph Game/base --depth 2"
35127
35166
  ],
35128
35167
  notes: [
35129
- "`graph` does not traverse inbound wref-field references; use `wh thing refs <wref> --inbound` to find things whose fields point at this thing."
35168
+ "`graph` does not traverse inbound wref-field references; use `wh thing refs <wref> --inbound` to find things whose fields point at this target."
35130
35169
  ],
35131
35170
  handler: handleThingGraph
35132
35171
  }
@@ -35151,9 +35190,9 @@ var handleView2 = async (ctx, { flags, args }) => {
35151
35190
  if (!wref) {
35152
35191
  usageError("Usage: wh assertion view <wref> [--version <n>] [--depth <n>]", "wh assertion view Belief/cave-safe --depth 2");
35153
35192
  }
35154
- const { org, repo } = parseOrgRepo(getRepoRef(ctx), ctx.config);
35155
35193
  const version = flags.version;
35156
35194
  const depth = flags.depth;
35195
+ const { org, repo } = looksLikeDurableId(wref) && depth === undefined ? parseOrgRepoOptional(getRepoRef(ctx), ctx.config) : parseOrgRepo(getRepoRef(ctx), ctx.config);
35157
35196
  const includeRetracted = flags["include-retracted"] || version !== undefined;
35158
35197
  if (depth !== undefined && (depth < 1 || depth > 5)) {
35159
35198
  usageError("Usage: wh assertion view <wref> --depth <1-5>", "wh assertion view Belief/cave-safe --depth 2");
@@ -35215,7 +35254,7 @@ var handleHistory2 = async (ctx, { flags, args }) => {
35215
35254
  if (ctx.liveMode && flags.all) {
35216
35255
  usageError("Usage: wh assertion history <wref> [--limit N] [--cursor TOKEN] [--live]", "wh assertion history Belief/cave-safe --limit 50 --live");
35217
35256
  }
35218
- const { org, repo } = parseOrgRepo(getRepoRef(ctx), ctx.config);
35257
+ const { org, repo } = looksLikeDurableId(wref) ? parseOrgRepoOptional(getRepoRef(ctx), ctx.config) : parseOrgRepo(getRepoRef(ctx), ctx.config);
35219
35258
  const limit = Math.min(flags.limit ?? DEFAULT_PAGE_LIMIT2, MAX_PAGE_LIMIT2);
35220
35259
  if (ctx.liveMode) {
35221
35260
  await runLive({
@@ -37009,7 +37048,7 @@ var COLLECTION_TYPES = ["pair", "set", "list"];
37009
37048
  var commonWriteFlags = {
37010
37049
  message: flag.string({ short: "m", description: "Commit message" }),
37011
37050
  committer: flag.string({
37012
- description: "Committer thing wref (e.g. Agent/bot-1)"
37051
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
37013
37052
  })
37014
37053
  };
37015
37054
  var collectionInputFlags = {
@@ -37573,7 +37612,7 @@ var createFlags3 = {
37573
37612
  }),
37574
37613
  message: flag.string({ short: "m", description: "Commit message" }),
37575
37614
  committer: flag.string({
37576
- description: "Committer thing wref (e.g. Agent/bot-1)"
37615
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
37577
37616
  }),
37578
37617
  add: flag.string({
37579
37618
  description: "Add a new thing (bare name — use --shape to set the shape). Repeatable; pair each --add with its own --data. For >20 ops, use --file <path>.",
@@ -37597,7 +37636,7 @@ var createFlags3 = {
37597
37636
  multiple: true
37598
37637
  }),
37599
37638
  about: flag.string({
37600
- description: "Target thing for assertions. Repeatable; one per --add, or a single value broadcast to all.",
37639
+ description: "Target shape or shaped thing for assertions. Repeatable; one per --add, or a single value broadcast to all.",
37601
37640
  multiple: true
37602
37641
  }),
37603
37642
  reason: flag.string({
@@ -42440,242 +42479,7 @@ var ORG_DOMAIN = defineDomain({
42440
42479
  });
42441
42480
 
42442
42481
  // ../../packages/warmhub-cli/src/domains/prime-content.md
42443
- var prime_content_default = `# WarmHub CLI Context
42444
- > **Context Recovery**: Run \`wh prime\` after compaction or new session
42445
-
42446
- ## Environment
42447
- {{REPO_LINE}}
42448
-
42449
- ## Core Concepts
42450
- - **Thing**: A named entity versioned by write operations. **Assertion**: A claim about a thing with shape-validated data.
42451
- - **Shape**: Schema defining data structure. **Write**: One or more add/revise/retract operations with per-operation results.
42452
- - **wref**: Reference as \`Shape/name\` (e.g., \`Player/alice\`). Cross-repo: \`wh:org/repo/Shape/name\`.
42453
-
42454
- ## Versioned Things
42455
- - \`Shape/name\` identifies the logical thing. \`Shape/name@vN\` pins an exact version.
42456
- - Read surfaces may show pinned wrefs (\`@vN\`) in data. Treat them as version metadata, not a different thing.
42457
-
42458
- ## Key Workflows
42459
-
42460
- **Write data** (discover shapes → scaffold ops → submit):
42461
- \`\`\`bash
42462
- wh shape list --repo org/repo # list available shapes
42463
- wh shape view ShapeName --repo org/repo # inspect fields
42464
- wh shape template ShapeName -o ops.json --repo org/repo # scaffold write ops (supports --kind assertion)
42465
- # edit ops.json — fill FILL_IN placeholders — then:
42466
- wh commit submit --file ops.json -m "msg" --repo org/repo # submit operations (bare \`wh commit\` also works)
42467
- # or single assertion (no file needed):
42468
- wh assertion create --shape ShapeName --about Target/name --name my-assertion --data '{"field":1}' --repo org/repo
42469
- # Relay failed operation details when present. Never hand-guess ops JSON — use \`wh shape template <Shape>\`.
42470
- \`\`\`
42471
-
42472
- **Read data:**
42473
- \`\`\`bash
42474
- wh thing list --repo org/repo # all things at HEAD
42475
- wh thing view Shape/name --repo org/repo # inspect a thing
42476
- wh thing query --shape MyShape --repo org/repo # find things by shape
42477
- wh thing about Shape/name --repo org/repo # assertions about thing/shape
42478
- wh assertion list --repo org/repo # all assertions at HEAD
42479
- wh thing history Shape/name --repo org/repo # version history
42480
-
42481
- # Batch read — wh thing view is variadic (max 500 wrefs/call):
42482
- wh thing view Player/alice Player/bob # variadic positionals
42483
- wh thing view --file wrefs.txt --json # one wref per line
42484
- cat wrefs.txt | wh thing view --format jsonl # one JSON line per *deduped* requested wref
42485
- \`\`\`
42486
-
42487
- ## Wref Quick Reference
42488
-
42489
- Write operations use explicit names and explicit wrefs. To connect operations
42490
- inside one commit, create the first thing with a deterministic name and point
42491
- later operations at that wref.
42492
-
42493
- ## Command Reference
42494
-
42495
- **Global flags**: \`--repo\`, \`--format\`, \`--json\`, \`--live\`
42496
- ### thing — Thing operations
42497
- - \`wh thing list [--shape] [--kind] [--match] [--include-retracted]\` — Current HEAD state
42498
- - \`wh thing view [<wref>...] [--file <path>] [--version] [--depth] [--include-retracted] [--data-mode auto|full]\` — Thing details. Variadic (max 500). \`--version\` implies \`--include-retracted\`. Batch JSON returns \`{ requested, items, missing }\`; jsonl emits one row per deduped requested wref. Large Set/List bodies summarize by default; use \`--data-mode full\` for canonical collection JSON.
42499
- - \`wh thing history [wref] [--shape] [--about] [--include-retracted]\` — Version history
42500
- - \`wh thing resolve <wref>\` — Resolve wref
42501
- - \`wh thing create <name|Shape/name> --data <json-object> [--shape] [--message] [--committer]\` — Create
42502
- - \`wh thing revise <name> [--data] [--message] [--committer] [--expected-version]\` — Revise (CONFLICT if HEAD≠n)
42503
- - \`wh thing retract <wref> -m <message> [--reason] [--kind]\` — Retract
42504
- - \`wh thing query [--shape] [--kind] [--about] [--match]\` — Query by filters
42505
- - \`wh thing search <query> [--shape] [--kind] [--about] [--mode]\` — Search text
42506
- - \`wh thing rename <Shape/oldName> <newName>\` — Rename
42507
- - \`wh thing refs <wref> [--inbound] [--outbound] [--field]\` — Show field references; use \`wh thing about\` for assertions about things/shapes
42508
- - \`wh thing about <wref> [--shape] [--match] [--depth] [--resolve-collections] [--limit] [--include-retracted]\` — Show assertions about the target identity; \`--resolve-collections\` expands collection members for bare/@HEAD/@ALL inputs, not pinned @vN
42509
-
42510
- ### commit — Write operations
42511
- - \`wh commit submit [--ops|--file|--add|--revise|--retract] [--kind] [--data] [--reason] [--expected-version] [--chunk-size] [--skip-existing] [--progress] [--stream-id]\` — Submit operations (bare \`wh commit\` is equivalent). Use \`--file ops.jsonl --stream-id <id> --chunk-size 5000 --skip-existing\` for bulk ingest.
42512
- - \`wh shape template <shape> [shape2 ...] [--kind] [--operation add|revise|retract] [-o file]\` — Generate sample ops
42513
-
42514
- ### assertion — Assertion operations
42515
- - \`wh assertion list [--about wref] [--shape] [--match] [--include-retracted]\` — Browse assertions
42516
- - \`wh assertion view <wref> [--version] [--include-retracted]\` — Assertion details
42517
- - \`wh assertion create [--name] [--shape] [--data] [--about] [--message] [--committer]\` — Create assertion
42518
- - \`wh assertion revise <wref> --data <json> [--message] [--committer]\` — Revise assertion
42519
- - \`wh assertion retract <wref> -m <message> [--reason] [--committer]\` — Retract assertion
42520
- - \`wh assertion history <wref> [--include-retracted]\` — Assertion history
42521
-
42522
- ### shape — Shape management
42523
- - \`wh shape list [--match] [--include-retracted]\` — List all shapes
42524
- - \`wh shape view <name> [--include-retracted]\` — Shape details
42525
- - \`wh shape revise <name> [--fields]\` — Revise shape
42526
- - \`wh shape create <name> [--fields]\` — Create shape
42527
- - \`wh shape retract <name> -m <message> [--reason]\` — Retract shape
42528
- - \`wh shape history <name> [--include-retracted]\` — Shape history
42529
- - \`wh shape rename <oldName> <newName>\` — Rename shape
42530
-
42531
- ### repo — Repository management
42532
- - \`wh repo create <org/name> [--display-name] [--description] [--visibility]\` — Create repo
42533
- - \`wh repo list [org]\` — List repos
42534
- - \`wh repo view [org/repo]\` — Repo details
42535
-
42536
- ### org — Organization management
42537
- - \`wh org create <name> [--display-name]\` — Create a new organization
42538
- - \`wh org view <name>\` — View organization details (alias: info)
42539
- - \`wh org list\` — List all organizations
42540
-
42541
- ### sub — Subscription management
42542
- - \`wh sub create <name> [flags]\` — Create a subscription
42543
- - \`wh sub view <name>\` — View subscription details
42544
- - \`wh sub list\` — List all subscriptions
42545
- - \`wh sub log <name>\` — Tail subscription delivery feed
42546
- - \`wh sub attempts <runId>\` — Show attempt history for a run
42547
- - \`wh sub pause <name>\` — Pause a subscription
42548
- - \`wh sub resume <name>\` — Resume a paused subscription
42549
- - \`wh sub bind <name> [--credentials]\` — Bind a credential set to a subscription for webhook auth
42550
- - \`wh sub unbind <name>\` — Remove credential binding from a subscription
42551
- - \`wh sub delete <name>\` — Delete a subscription
42552
-
42553
- ### notifications — Action notification listing
42554
- - \`wh notifications [--limit] [--since]\` — List repo-scoped action notifications
42555
-
42556
- ### credential — Credential set management
42557
- - \`wh credential create <name> [--repo org/repo | --org org] [--scope] [--description]\` — Create an empty credential set
42558
- - \`wh credential list [--repo org/repo | --org org]\` — List credential sets accessible from a repo or org
42559
- - \`wh credential view <name> [--repo org/repo | --org org]\` — View a credential set (key names only, no values)
42560
- - \`wh credential delete <name> [--repo org/repo | --org org]\` — Delete a credential set and its Vault object
42561
- - \`wh credential set <setName> [<keyName>] [--repo org/repo | --org org] [--value]\` — Set credential key(s). With \`<keyName>\`: single-key form (reads value from \`--value\` or stdin). Without \`<keyName>\`: batch form (reads JSON object from stdin, e.g. \`{"KEY":"val"}\`)
42562
- - \`wh credential unset <setName> <keyName> [--repo org/repo | --org org]\` — Remove a key from a credential set
42563
- - \`wh credential audit <setName> [--repo org/repo | --org org]\` — View audit log for a credential set
42564
- - \`wh credential revoke <setName> [--repo org/repo | --org org] [--reason]\` — Revoke a credential set (blocks new binds and strips auth from existing webhook deliveries)
42565
-
42566
- ### component — Component management
42567
- - \`wh component validate <path>\` — Validate package
42568
- - \`wh component install <org/name>\` — Install a registered component
42569
- - \`wh component register <name> --org <org> --manifest <path> [flags]\` — Register component identity
42570
- - \`wh component unregister <org/name>\` — Remove a registered component identity
42571
- - \`wh component registry list --org <org>\` — List registered components
42572
- - \`wh component registry view <org/name>\` — View a registered component
42573
- - \`wh component registry update <org/name> [flags]\` — Update a registered component
42574
- - \`wh component list\` — List installed components
42575
- - \`wh component update <org/name>\` — Update installed component
42576
- - \`wh component view <org/name>\` — Show component details (alias: show)
42577
- - \`wh component doctor <org/name>\` — Run component health checks
42578
- - \`wh component teardown <org/name>\` — Pause component subscriptions
42579
-
42580
- ### Getting More Info
42581
- - \`wh help\` — full help overview
42582
- - \`wh <domain>\` — list verbs for a domain
42583
- - \`wh <domain> <verb> --help\` — verb details with flags and examples
42584
- - \`wh help --format json\` — full CLI spec as JSON (best for agents)
42585
-
42586
- ## Common Workflows
42587
-
42588
- **Explore a repo:**
42589
- \`\`\`bash
42590
- wh thing list --repo org/repo # see all things in HEAD
42591
- wh thing view Shape/name --repo org/repo # inspect a specific thing
42592
- wh thing history Shape/name --repo org/repo # inspect version history
42593
- wh thing about Shape/name # assertions about thing/shape
42594
- \`\`\`
42595
-
42596
- **Create an assertion** (most common write):
42597
- \`\`\`bash
42598
- # --about takes a target wref: Shape/name thing, or Shape itself.
42599
- wh assertion create --shape MyShape --about TargetShape/target-name \\
42600
- --name my-assertion --data '{"field_a":1,"field_b":"value"}' --repo org/repo
42601
- # Output includes per-operation status; relay failures when present.
42602
- \`\`\`
42603
-
42604
- **Create via write entrypoint** (alternative, supports batches and streams):
42605
- \`\`\`bash
42606
- wh commit submit --add my-item --shape MyShape --kind assertion \\
42607
- --about TargetShape/target-name --data '{"field_a":1}' --repo org/repo
42608
- \`\`\`
42609
-
42610
- **Batch write via file** (generate template → edit → submit):
42611
- \`\`\`bash
42612
- wh shape template Hypothesis Evidence -o ops.json # add --kind assertion --about TargetShape/name for assertions
42613
- # edit ops.json — fill FILL_IN placeholders
42614
- wh commit submit --file ops.json -m "batch update" # submit all operations (bare \`wh commit\` is equivalent)
42615
- # --file format: docs.warmhub.ai/cli-reference/commit-operations
42616
- \`\`\`
42617
-
42618
- **Bulk write (JSONL stream, >1k ops)** — one chunked stream beats per-record commits (~60× faster):
42619
- \`\`\`bash
42620
- wh shape template MyShape -o ops.jsonl # one op per line (.jsonl)
42621
- ID="bulk-$(date +%s)" # choose your own; set it up front so reruns are safe
42622
- wh commit submit --file ops.jsonl --stream-id "$ID" --chunk-size 5000 \\
42623
- --skip-existing --progress -m "bulk ingest" --repo org/repo
42624
- # --chunk-size: ops per append chunk (default 1000, max 10000); chunk≈1 is ~60× slower
42625
- # --skip-existing: skips already-written add ops (drops per-row read-before-write)
42626
- # Add-stream restart: rerun the WHOLE file with the SAME --stream-id.
42627
- # Fixed-name adds are idempotent via --skip-existing. Mid-stream resume is not
42628
- # a CLI mode. Mixed revise/retract JSONL streams are not full-rerun safe after
42629
- # an ambiguous append; inspect repo state and reconcile explicitly.
42630
- \`\`\`
42631
-
42632
- **Create collections:**
42633
- \`\`\`bash
42634
- wh commit submit --type pair --name location-distance --members Location/a,Location/b --repo org/repo
42635
- wh assertion create --shape Distance --about Pair/location-distance --data '{"value":5}' --repo org/repo
42636
- \`\`\`
42637
-
42638
- **Modify data:**
42639
- \`\`\`bash
42640
- wh thing revise Shape/name --data '{"x":5,"y":3}' -m "update" --repo org/repo
42641
- wh thing retract Shape/old-item -m "withdrawn" --reason "data feed contaminated" --repo org/repo
42642
- \`\`\`
42643
-
42644
- **Query and filter:**
42645
- \`\`\`bash
42646
- wh thing query --shape MyShape # by shape
42647
- wh thing query --kind assertion --about Shape/name # by kind + target
42648
- wh thing history Shape/name --limit 10 # version history
42649
- \`\`\`
42650
-
42651
- ## Built-in Content shape
42652
-
42653
- WarmHub repos expose three well-known content wrefs:
42654
- - \`Content/Readme\` — stored markdown for humans
42655
- - \`Content/Agents\` — stored markdown guidance for AI agents
42656
- - \`Content/LlmsTxt\` — synthesized per-request sitemap (read-only)
42657
-
42658
- Fetch via \`wh repo content get --kind readme|agents|llms-txt\`,
42659
- \`client.repo.getReadme/getAgents/getLlmsTxt\`, MCP \`warmhub_repo_content_get\`,
42660
- or raw HTTP \`GET /{org}/{repo}/readme.md|agents.md|llms.txt\`.
42661
- See \`wh repo describe\` → \`additionalInformation\` for the discovery field.
42662
-
42663
- ## Query Discipline
42664
- - Plan the repo, shapes, and wrefs you need before the first query.
42665
- - Gather the needed facts from one repo before switching to another.
42666
- - Do the queries first, then write one complete answer.
42667
-
42668
- ## Agent Tips
42669
- - **Always run commands for live data** — this context describes the CLI, not repo contents
42670
- - **Before writing, discover wrefs** — run \`wh thing list\` or \`wh shape list\`
42671
- - **Shape field types**: \`string\`, \`number\`, \`boolean\`, \`wref\`, arrays, optionals, nested objects
42672
- - **Write commands return per-operation results** — relay failures and affected wrefs to the user
42673
- - **Pass data inline** with \`--data '{...}'\` — do NOT create temp files
42674
- - Add \`--json\` to any command for machine-readable JSON output
42675
- - **Aliases teach canonical commands** — executing aliases emit a status hint; misleading lifecycle aliases reject and point to \`retract\`
42676
- - Writes go through \`wh commit submit\` (or bare \`wh commit\`) or wrappers (\`create\`, \`revise\`, \`retract\`, \`assertion create\`). \`retract\` irreversibly withdraws an identity and creates a history entry.
42677
- - Use \`wh doctor\` to check environment health
42678
- `;
42482
+ var prime_content_default = "# WarmHub CLI Context\n> **Context Recovery**: Run `wh prime` after compaction or new session\n\n## Environment\n{{REPO_LINE}}\n\n## Core Concepts\n- **Thing**: A named entity versioned by writes. **Assertion**: A thing that makes a shape-validated claim about another thing.\n- **Shape**: A thing defining data structure; every other thing has one. **Write**: One or more add/revise/retract operations with per-operation results.\n- **wref**: A reference to a thing. Local: `Player` (the shape) or `Player/alice` (a thing with that shape). Cross-repo: `wh:org/repo/Shape` or `wh:org/repo/Shape/name`.\n\n## Versioned Wrefs\n- `Shape` addresses the shape itself; `Shape/name` addresses a thing with that shape. `@vN` pins either.\n- Floating write refs to retracted targets fail; existing pinned versions remain valid.\n- Rename invalidates old spellings, including `@vN`; the new name resolves history.\n- Untyped wrefs accept any thing. `wref<T>` requires the target's shape to be `T`; a shape has no shape, so never satisfies it. `wref?` coalesces only `thing_absent`, never a missing shape.\n\n## Key Workflows\n\n**Write data** (discover shapes → scaffold ops → submit):\n```bash\nwh shape list --repo org/repo # list available shapes\nwh shape view ShapeName --repo org/repo # inspect fields\nwh shape template ShapeName -o ops.json --repo org/repo # scaffold write ops (supports --kind assertion)\n# edit ops.json — fill FILL_IN placeholders — then:\nwh commit submit --file ops.json -m \"msg\" --repo org/repo # submit operations (bare `wh commit` also works)\n# or single assertion (no file needed):\nwh assertion create --shape ShapeName --about Target/name --name my-assertion --data '{\"field\":1}' --repo org/repo\n# Relay failed operation details when present. Never hand-guess ops JSON — use `wh shape template <Shape>`.\n```\n\n**Read data:**\n```bash\nwh thing list --repo org/repo # all things at HEAD\nwh thing view Shape/name --repo org/repo # inspect a thing\nwh thing query --shape MyShape --repo org/repo # find things by shape\nwh thing about Shape --repo org/repo # assertions about a shape\nwh assertion list --repo org/repo # all assertions at HEAD\nwh thing history Shape/name --repo org/repo # version history\n\n# Batch read — wh thing view is variadic (max 500 wrefs/call):\nwh thing view Player/alice Player/bob # variadic positionals\nwh thing view --file wrefs.txt --json # one wref per line\ncat wrefs.txt | wh thing view --format jsonl # one JSON line per *deduped* requested wref\n```\n\n## Wref Quick Reference\n\nWrites use explicit names and wrefs. Untyped fields, collection members,\nassertion `about`, and committers accept any thing. Create a deterministic\ntarget before referencing it in the same commit.\n\n## Command Reference\n\n**Global flags**: `--repo`, `--format`, `--json`, `--live`\n### thing — Thing operations\n- `wh thing list [--shape] [--kind] [--match] [--include-retracted]` — Current HEAD state\n- `wh thing view [<wref>...] [--file <path>] [--version] [--depth] [--include-retracted] [--data-mode auto|full]` — Thing details. Variadic (max 500). `--version` implies `--include-retracted`. Batch JSON returns `{ requested, items, missing }`; jsonl emits one row per deduped requested wref. Large Set/List bodies summarize by default; use `--data-mode full` for canonical collection JSON.\n- `wh thing history [wref] [--shape] [--about] [--include-retracted]` — Version history\n- `wh thing resolve <wref>` — Resolve a wref to its canonical thing identity\n- `wh thing create <name|Shape/name> --data <json-object> [--shape] [--message] [--committer]` — Create\n- `wh thing revise <name> [--data] [--message] [--committer] [--expected-version]` — Revise (CONFLICT if HEAD≠n)\n- `wh thing retract <wref> -m <message> [--reason] [--kind]` — Retract\n- `wh thing query [--shape] [--kind] [--about] [--match]` — Query by filters\n- `wh thing search <query> [--shape] [--kind] [--about] [--mode]` — Search text\n- `wh thing rename <Shape/oldName> <newName>` — Rename\n- `wh thing refs <wref> [--inbound] [--outbound] [--field]` — Show field references; use `wh thing about` for assertions about the target thing\n- `wh thing about <wref> [--shape] [--match] [--depth] [--resolve-collections] [--limit] [--include-retracted]` — Show assertions about the target identity; `--resolve-collections` expands collection members for bare/@HEAD/@ALL inputs, not pinned @vN\n\n### commit — Write operations\n- `wh commit submit [--ops|--file|--add|--revise|--retract] [--kind] [--data] [--reason] [--expected-version] [--chunk-size] [--skip-existing] [--progress] [--stream-id]` — Submit operations (bare `wh commit` is equivalent). Use `--file ops.jsonl --stream-id <id> --chunk-size 5000 --skip-existing` for bulk ingest.\n- `wh shape template <shape> [shape2 ...] [--kind] [--operation add|revise|retract] [-o file]` — Generate sample ops\n\n### assertion — Assertion operations\n- `wh assertion list [--about wref] [--shape] [--match] [--include-retracted]` — Browse assertions\n- `wh assertion view <wref> [--version] [--include-retracted]` — Assertion details\n- `wh assertion create [--name] [--shape] [--data] [--about] [--message] [--committer]` — Create assertion\n- `wh assertion revise <wref> --data <json> [--message] [--committer]` — Revise assertion\n- `wh assertion retract <wref> -m <message> [--reason] [--committer]` — Retract assertion\n- `wh assertion history <wref> [--include-retracted]` — Assertion history\n\n### shape — Shape management\n- `wh shape list [--match] [--include-retracted]` — List all shapes\n- `wh shape view <name> [--include-retracted]` — Shape details\n- `wh shape revise <name> [--fields]` — Revise shape\n- `wh shape create <name> [--fields]` — Create shape\n- `wh shape retract <name> -m <message> [--reason]` — Retract shape\n- `wh shape history <name> [--include-retracted]` — Shape history\n- `wh shape rename <oldName> <newName>` — Rename shape\n\n### repo — Repository management\n- `wh repo create <org/name> [--display-name] [--description] [--visibility]` — Create repo\n- `wh repo list [org]` — List repos\n- `wh repo view [org/repo]` — Repo details\n\n### org — Organization management\n- `wh org create <name> [--display-name]` — Create a new organization\n- `wh org view <name>` — View organization details (alias: info)\n- `wh org list` — List all organizations\n\n### sub — Subscription management\n- `wh sub create <name> [flags]` — Create a subscription\n- `wh sub view <name>` — View subscription details\n- `wh sub list` — List all subscriptions\n- `wh sub log <name>` — Tail subscription delivery feed\n- `wh sub attempts <runId>` — Show attempt history for a run\n- `wh sub pause <name>` — Pause a subscription\n- `wh sub resume <name>` — Resume a paused subscription\n- `wh sub bind <name> [--credentials]` — Bind a credential set to a subscription for webhook auth\n- `wh sub unbind <name>` — Remove credential binding from a subscription\n- `wh sub delete <name>` — Delete a subscription\n\n### notifications — Action notification listing\n- `wh notifications [--limit] [--since]` — List repo-scoped action notifications\n\n### credential — Credential set management\n- `wh credential create <name> [--repo org/repo | --org org] [--scope] [--description]` — Create an empty credential set\n- `wh credential list [--repo org/repo | --org org]` — List credential sets accessible from a repo or org\n- `wh credential view <name> [--repo org/repo | --org org]` — View a credential set (key names only, no values)\n- `wh credential delete <name> [--repo org/repo | --org org]` — Delete a credential set and its Vault object\n- `wh credential set <setName> [<keyName>] [--repo org/repo | --org org] [--value]` — Set credential key(s). With `<keyName>`: single-key form (reads value from `--value` or stdin). Without `<keyName>`: batch form (reads JSON object from stdin, e.g. `{\"KEY\":\"val\"}`)\n- `wh credential unset <setName> <keyName> [--repo org/repo | --org org]` — Remove a key from a credential set\n- `wh credential audit <setName> [--repo org/repo | --org org]` — View audit log for a credential set\n- `wh credential revoke <setName> [--repo org/repo | --org org] [--reason]` — Revoke a credential set (blocks new binds and strips auth from existing webhook deliveries)\n\n### component — Component management\n- `wh component validate <path>` — Validate package\n- `wh component install <org/name>` — Install a registered component\n- `wh component register <name> --org <org> --manifest <path> [flags]` — Register component identity\n- `wh component unregister <org/name>` — Remove a registered component identity\n- `wh component registry list --org <org>` — List registered components\n- `wh component registry view <org/name>` — View a registered component\n- `wh component registry update <org/name> [flags]` — Update a registered component\n- `wh component list` — List installed components\n- `wh component update <org/name>` — Update installed component\n- `wh component view <org/name>` — Show component details (alias: show)\n- `wh component doctor <org/name>` — Run component health checks\n- `wh component teardown <org/name>` — Pause component subscriptions\n\n### Getting More Info\n- `wh help` — full help overview\n- `wh <domain>` — list verbs for a domain\n- `wh <domain> <verb> --help` — verb details with flags and examples\n- `wh help --format json` — full CLI spec as JSON (best for agents)\n\n## Common Workflows\n\n**Explore a repo:**\n```bash\nwh thing list --repo org/repo # see all things in HEAD\nwh thing view Shape/name --repo org/repo # inspect a specific thing\nwh thing history Shape/name --repo org/repo # inspect version history\nwh thing about Shape/name # assertions about thing/shape\n```\n\n**Create an assertion** (most common write):\n```bash\n# --about takes an untyped target wref: Shape or Shape/name.\nwh assertion create --shape MyShape --about TargetShape/target-name \\\n --name my-assertion --data '{\"field_a\":1,\"field_b\":\"value\"}' --repo org/repo\n# Output includes per-operation status; relay failures when present.\n```\n\n**Create via write entrypoint** (alternative, supports batches and streams):\n```bash\nwh commit submit --add my-item --shape MyShape --kind assertion \\\n --about TargetShape/target-name --data '{\"field_a\":1}' --repo org/repo\n```\n\n**Batch write via file** (generate template → edit → submit):\n```bash\nwh shape template Hypothesis Evidence -o ops.json # add --kind assertion --about TargetShape/name for assertions\n# edit ops.json — fill FILL_IN placeholders\nwh commit submit --file ops.json -m \"batch update\" # submit all operations (bare `wh commit` is equivalent)\n# --file format: docs.warmhub.ai/cli-reference/commit-operations\n```\n\n**Bulk write (JSONL stream, >1k ops)** — one chunked stream beats per-record commits (~60× faster):\n```bash\nwh shape template MyShape -o ops.jsonl # one op per line (.jsonl)\nID=\"bulk-$(date +%s)\" # choose your own; set it up front so reruns are safe\nwh commit submit --file ops.jsonl --stream-id \"$ID\" --chunk-size 5000 \\\n --skip-existing --progress -m \"bulk ingest\" --repo org/repo\n# --chunk-size: ops per append chunk (default 1000, max 10000); chunk≈1 is ~60× slower\n# --skip-existing: skips already-written add ops (drops per-row read-before-write)\n# Add-stream restart: rerun the WHOLE file with the SAME --stream-id.\n# Fixed-name adds are idempotent via --skip-existing. Mid-stream resume is not\n# a CLI mode. Mixed revise/retract JSONL streams are not full-rerun safe after\n# an ambiguous append; inspect repo state and reconcile explicitly.\n```\n\n**Create collections:**\n```bash\nwh commit submit --type pair --name location-distance --members Location,Location/a --repo org/repo\nwh assertion create --shape Distance --about Pair/location-distance --data '{\"value\":5}' --repo org/repo\n```\n\n**Modify data:**\n```bash\nwh thing revise Shape/name --data '{\"x\":5,\"y\":3}' -m \"update\" --repo org/repo\nwh thing retract Shape/old-item -m \"withdrawn\" --reason \"data feed contaminated\" --repo org/repo\n```\n\n**Query and filter:**\n```bash\nwh thing query --shape MyShape # by shape\nwh thing query --kind assertion --about Shape/name # by kind + target\nwh thing history Shape/name --limit 10 # version history\n```\n\n## Built-in Content shape\n\nWarmHub repos expose three well-known content wrefs:\n- `Content/Readme` — stored markdown for humans\n- `Content/Agents` — stored markdown guidance for AI agents\n- `Content/LlmsTxt` — synthesized per-request sitemap (read-only)\n\nFetch via `wh repo content get --kind readme|agents|llms-txt`,\n`client.repo.getReadme/getAgents/getLlmsTxt`, MCP `warmhub_repo_content_get`,\nor raw HTTP `GET /{org}/{repo}/readme.md|agents.md|llms.txt`.\nSee `wh repo describe` → `additionalInformation` for the discovery field.\n\n## Query Discipline\n- Plan the repo, shapes, and wrefs you need before the first query.\n- Gather the needed facts from one repo before switching to another.\n- Do the queries first, then write one complete answer.\n\n## Agent Tips\n- **Always run commands for live data** — this context describes the CLI, not repo contents\n- **Before writing, discover wrefs** — run `wh thing list` or `wh shape list`\n- **Shape field types**: `string`, `number`, `boolean`, `wref`, arrays, optionals, nested objects\n- **Write commands return per-operation results** — relay failures and affected wrefs to the user\n- **Pass data inline** with `--data '{...}'` — do NOT create temp files\n- Add `--json` to any command for machine-readable JSON output\n- **Aliases teach canonical commands** — executing aliases emit a status hint; misleading lifecycle aliases reject and point to `retract`\n- Writes go through `wh commit submit` (or bare `wh commit`) or wrappers (`create`, `revise`, `retract`, `assertion create`). `retract` irreversibly withdraws an identity and creates a history entry.\n- Use `wh doctor` to check environment health\n";
42679
42483
 
42680
42484
  // ../../packages/warmhub-cli/src/domains/prime.ts
42681
42485
  function buildMarkdown(config) {
@@ -42721,7 +42525,7 @@ var wrefSyntax = {
42721
42525
  "Player/alice",
42722
42526
  "GameState/round-1/state"
42723
42527
  ],
42724
- canonicalFormat: "wh:org/repo/Shape/name",
42528
+ canonicalFormat: "wh:org/repo/Shape or wh:org/repo/Shape/name",
42725
42529
  versionModifiers: ["@HEAD", "@vN", "@ALL"]
42726
42530
  };
42727
42531
  var handlePrime = async (ctx) => {
@@ -43830,7 +43634,7 @@ var retractFlags3 = {
43830
43634
  reason: flag.string({ description: "Reason for retraction (<=500 chars)" }),
43831
43635
  message: flag.string({ short: "m", description: "Commit message" }),
43832
43636
  committer: flag.string({
43833
- description: "Committer thing wref (e.g. Agent/bot-1)"
43637
+ description: "Committer wref (shape or shaped thing; e.g. Agent/bot-1)"
43834
43638
  })
43835
43639
  };
43836
43640
  var handleCreate6 = async (ctx, { flags, args }) => {
@@ -44006,7 +43810,7 @@ var createFlags8 = {
44006
43810
  description: "Shape to subscribe to"
44007
43811
  }),
44008
43812
  event: flag.string({
44009
- description: "Event to watch: commit (default), repo.renamed, or org.renamed"
43813
+ description: "Event to watch: commit (default), repo.renamed, org.renamed, thing.renamed, or shape.renamed"
44010
43814
  }),
44011
43815
  org: flag.string({
44012
43816
  description: "Org slug for an org-scoped subscription (org.renamed)"
@@ -44203,7 +44007,7 @@ function scopeLabel(scope) {
44203
44007
  // ../../packages/warmhub-cli/src/domains/sub/handlers-create.ts
44204
44008
  var handleCreate7 = async (ctx, { flags, args }) => {
44205
44009
  const name = args[0] ?? flags.name;
44206
- const usage = "Usage: wh sub create <name> (--repo org/repo | --org org) [--event commit|repo.renamed|org.renamed] [options]";
44010
+ const usage = "Usage: wh sub create <name> (--repo org/repo | --org org) [--event commit|repo.renamed|org.renamed|thing.renamed|shape.renamed] [options]";
44207
44011
  const example = `wh sub create signal-hook --repo myorg/myrepo --on Signal --filter '{"shape":"Signal"}' --webhook-url https://example.com/hook`;
44208
44012
  if (!name) {
44209
44013
  usageError(usage, example);
@@ -44242,7 +44046,7 @@ var handleCreate7 = async (ctx, { flags, args }) => {
44242
44046
  return;
44243
44047
  }
44244
44048
  const { org, repo } = resolveRepoContext(ctx);
44245
- if (eventType === "repo.renamed") {
44049
+ if (eventType !== "commit") {
44246
44050
  rejectCommitFlags(flags, eventType);
44247
44051
  const result2 = await ctx.client.subscription.create({
44248
44052
  orgName: org,
@@ -44255,7 +44059,7 @@ var handleCreate7 = async (ctx, { flags, args }) => {
44255
44059
  });
44256
44060
  writeOutput(ctx, result2, () => {
44257
44061
  const c = ctx.colors;
44258
- ctx.status(`${c.green}Created subscription${c.reset} ${c.cyan}${name}${c.reset} on ${c.cyan}${org}/${repo}${c.reset} (repo.renamed)`);
44062
+ ctx.status(`${c.green}Created subscription${c.reset} ${c.cyan}${name}${c.reset} on ${c.cyan}${org}/${repo}${c.reset} (${eventType})`);
44259
44063
  });
44260
44064
  return;
44261
44065
  }
@@ -46698,7 +46502,7 @@ function resolveLogLevel(flags, env) {
46698
46502
  // package.json
46699
46503
  var package_default3 = {
46700
46504
  name: "@warmhub/cli",
46701
- version: "0.68.0",
46505
+ version: "0.69.0",
46702
46506
  private: false,
46703
46507
  type: "module",
46704
46508
  description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -47353,4 +47157,4 @@ if (!updateCheckSuppressedByArgv && shouldRunUpdateCheck(updateEligibility)) {
47353
47157
  var interceptedExitCode = await maybeHandleComponentShellBoundary(dispatchArgv);
47354
47158
  process.exitCode = interceptedExitCode === undefined ? await runCli(dispatchArgv, { version: package_default3.version }) : interceptedExitCode;
47355
47159
 
47356
- //# debugId=201635543D774B8564756E2164756E21
47160
+ //# debugId=C8123553A9E5F6D464756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/cli",
3
- "version": "0.68.0",
3
+ "version": "0.69.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",