@warmhub/cli 0.145.0 → 0.147.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 +150 -36
  2. package/package.json +1 -1
package/dist/wh.js CHANGED
@@ -18538,6 +18538,9 @@ function decodeDurableId(token) {
18538
18538
  thingId: bytesToUuid(payload, UUID_BYTES)
18539
18539
  };
18540
18540
  }
18541
+ function isDurableId(token) {
18542
+ return decodeDurableId(token) !== null;
18543
+ }
18541
18544
  var VERSION_SELECTOR_RE = /^(?:v0*[1-9]\d*|[Hh][Ee][Aa][Dd]|[Aa][Ll][Ll])$/;
18542
18545
  function parseDurableReferenceToken(raw) {
18543
18546
  const at = raw.lastIndexOf("@");
@@ -18577,7 +18580,7 @@ function isReservedShapeName(name) {
18577
18580
  return name === RESERVED_THING_ROOT;
18578
18581
  }
18579
18582
  function reservedThingRootMessage(name) {
18580
- return `Name "${name}" is under the reserved root "${RESERVED_THING_ROOT_PREFIX}"; only Shapes live there, as ${RESERVED_THING_ROOT_PREFIX}shapes/<Name>`;
18583
+ return `Name "${name}" is under the reserved root "${RESERVED_THING_ROOT_PREFIX}"; only platform-owned names may live there, including ${RESERVED_THING_ROOT_PREFIX}shapes/<Name> and ${RESERVED_THING_ROOT_PREFIX}redacted/<durable-id>`;
18581
18584
  }
18582
18585
 
18583
18586
  // ../../packages/rules/src/wref.ts
@@ -18754,11 +18757,13 @@ var COMMIT_OPERATIONS = [
18754
18757
  "retract",
18755
18758
  "reaffirm",
18756
18759
  "rename",
18760
+ "redact",
18757
18761
  "remove",
18758
18762
  "restore",
18759
18763
  "rewrite"
18760
18764
  ];
18761
18765
  var PRIVILEGED_COMMIT_OPERATIONS = {
18766
+ redact: "things:redact",
18762
18767
  remove: "things:delete",
18763
18768
  rewrite: "things:rewrite"
18764
18769
  };
@@ -18837,7 +18842,16 @@ var COMPONENT_TEMPLATE_VALUES = {
18837
18842
  "org-name": (ctx) => ctx.orgName,
18838
18843
  "repo-name": (ctx) => ctx.repoName
18839
18844
  };
18840
- var TEMPLATE_TOKEN_RE = /<([a-z-]+)>/g;
18845
+ function parseComponentTemplateToken(raw) {
18846
+ switch (raw) {
18847
+ case "org-name":
18848
+ case "repo-name":
18849
+ return raw;
18850
+ default:
18851
+ return;
18852
+ }
18853
+ }
18854
+ var TEMPLATE_TOKEN_RE = /<([^>]+)>/g;
18841
18855
  function listComponentTemplateTokens(value) {
18842
18856
  const tokens = new Set;
18843
18857
  for (const match of value.matchAll(TEMPLATE_TOKEN_RE)) {
@@ -18848,15 +18862,15 @@ function listComponentTemplateTokens(value) {
18848
18862
  return [...tokens];
18849
18863
  }
18850
18864
  function unsupportedComponentTemplateTokens(value) {
18851
- return listComponentTemplateTokens(value).filter((token) => !(token in COMPONENT_TEMPLATE_VALUES));
18865
+ return listComponentTemplateTokens(value).filter((token) => parseComponentTemplateToken(token) === undefined);
18852
18866
  }
18853
18867
  function resolveComponentTemplate(value, ctx) {
18854
18868
  return value.replace(TEMPLATE_TOKEN_RE, (_match, token) => {
18855
- const resolver = COMPONENT_TEMPLATE_VALUES[token];
18856
- if (!resolver) {
18869
+ const parsed = parseComponentTemplateToken(token);
18870
+ if (!parsed) {
18857
18871
  throw new Error(`Unsupported component template token <${token}>`);
18858
18872
  }
18859
- return resolver(ctx);
18873
+ return COMPONENT_TEMPLATE_VALUES[parsed](ctx);
18860
18874
  });
18861
18875
  }
18862
18876
 
@@ -25940,6 +25954,8 @@ var CORRECTED_THING_SHAPE_NAME = "CorrectedThing";
25940
25954
  var CORRECTED_THING_FIELDS = {
25941
25955
  correctionLog: { type: "array", items: { reason: "string" }, minItems: 1 }
25942
25956
  };
25957
+ var REDACTED_THING_SHAPE_NAME = "RedactedThing";
25958
+ var REDACTED_THING_FIELDS = {};
25943
25959
  var SYSTEM_SHAPES = [
25944
25960
  {
25945
25961
  name: "ComponentInstall",
@@ -25965,6 +25981,12 @@ var SYSTEM_SHAPES = [
25965
25981
  name: CORRECTED_THING_SHAPE_NAME,
25966
25982
  fields: CORRECTED_THING_FIELDS,
25967
25983
  onDemand: true
25984
+ },
25985
+ {
25986
+ name: REDACTED_THING_SHAPE_NAME,
25987
+ fields: REDACTED_THING_FIELDS,
25988
+ onDemand: true,
25989
+ systemOnlyCertification: true
25968
25990
  }
25969
25991
  ];
25970
25992
  var SYSTEM_MANIFEST = {
@@ -26006,6 +26028,7 @@ var SYSTEM_PROTECTED_SHAPES = SYSTEM_COMPONENT.shapes.filter((shape) => shape.in
26006
26028
  var SYSTEM_PROTECTED_FAMILY_SHAPES = SYSTEM_PROTECTED_SHAPES.filter((shape) => shape.onDemand !== true);
26007
26029
  var SYSTEM_INFRA_SHAPE_NAMES = new Set(SYSTEM_COMPONENTS.flatMap((entry) => entry.shapes.filter((shape) => shape.installInfra === true).map((shape) => shape.name)));
26008
26030
  var SYSTEM_SHAPE_NAMES2 = new Set(SYSTEM_MANIFEST.shapes.map((shape) => shape.name));
26031
+ var SYSTEM_ONLY_CERTIFICATE_SHAPE_NAMES = new Set(SYSTEM_COMPONENT.shapes.filter((shape) => shape.systemOnlyCertification === true).map((shape) => shape.name));
26009
26032
  function isSystemShapeName(name) {
26010
26033
  return SYSTEM_SHAPE_NAMES2.has(name);
26011
26034
  }
@@ -44826,6 +44849,7 @@ var DEFINITE_CLIENT_REJECT_CODES = new Set([
44826
44849
  "CONFLICT",
44827
44850
  "NAME_TAKEN",
44828
44851
  "TARGET_REMOVED",
44852
+ "TARGET_REDACTED",
44829
44853
  "ALREADY_RETRACTED",
44830
44854
  "ARCHIVED",
44831
44855
  "RATE_LIMITED",
@@ -46325,6 +46349,11 @@ var currentErrorDetailsSchema = exports_external.discriminatedUnion("reason", [
46325
46349
  reason: exports_external.literal("target_removed"),
46326
46350
  targetDurableId: exports_external.string().min(1),
46327
46351
  fieldPath: exports_external.string().optional()
46352
+ }).loose(),
46353
+ exports_external.object({
46354
+ reason: exports_external.literal("target_redacted"),
46355
+ targetDurableId: exports_external.string().min(1),
46356
+ fieldPath: exports_external.string().optional()
46328
46357
  }).loose()
46329
46358
  ]);
46330
46359
  var currentBaseShape = {
@@ -46831,7 +46860,7 @@ function createStreamingSubmissionHandle(input, deps) {
46831
46860
  // ../../packages/sdk-ts/package.json
46832
46861
  var package_default = {
46833
46862
  name: "@warmhub/sdk-ts",
46834
- version: "0.143.0",
46863
+ version: "0.145.0",
46835
46864
  private: false,
46836
46865
  type: "module",
46837
46866
  description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -49049,6 +49078,19 @@ class WarmHubClient {
49049
49078
  throw toWarmHubError(error51);
49050
49079
  }
49051
49080
  },
49081
+ redact: async (orgName, repoName, durableId, opts) => {
49082
+ try {
49083
+ return await this.trpc.thing.redact.mutate({
49084
+ orgName,
49085
+ repoName,
49086
+ durableId,
49087
+ expectedVersion: opts.expectedVersion,
49088
+ eventRequestId: opts.eventRequestId
49089
+ });
49090
+ } catch (error51) {
49091
+ throw toWarmHubError(error51);
49092
+ }
49093
+ },
49052
49094
  rewrite: async (orgName, repoName, wref, opts) => {
49053
49095
  try {
49054
49096
  return await this.trpc.thing.rewrite.mutate({
@@ -51867,11 +51909,13 @@ function loadProfileStore(path) {
51867
51909
  } catch (cause) {
51868
51910
  throw corruptedAuthError(p, cause);
51869
51911
  }
51870
- if (parsed === null || typeof parsed !== "object" || parsed.version !== 1 || parsed.profiles === null || typeof parsed.profiles !== "object" || Array.isArray(parsed.profiles)) {
51912
+ if (!isProfileStore(parsed))
51871
51913
  throw corruptedAuthError(p);
51872
- }
51873
51914
  return parsed;
51874
51915
  }
51916
+ function isProfileStore(value) {
51917
+ return isPlainObject(value) && value.version === 1 && isPlainObject(value.profiles) && Object.values(value.profiles).every((profile) => isPlainObject(profile) && isPlainObject(profile.tokens));
51918
+ }
51875
51919
  function corruptedAuthError(path, cause) {
51876
51920
  getLog().error("auth.profile.corrupt", { path });
51877
51921
  return new CliError(3 /* Config */, "CONFIG", `Auth file at ${path} is unreadable or in an unknown format.`, cause, `Remove the file (\`rm ${path}\`) and run \`wh auth login\` to re-authenticate.`);
@@ -54142,7 +54186,7 @@ function emitNoMatchHint(ctx, match, count) {
54142
54186
  }
54143
54187
 
54144
54188
  // ../../packages/warmhub-cli/src/domains/commit-output-contract-id.ts
54145
- var COMMIT_SUBMIT_OUTPUT_SCHEMA_ID = "wh.commit.submit.result/v0.11";
54189
+ var COMMIT_SUBMIT_OUTPUT_SCHEMA_ID = "wh.commit.submit.result/v0.12";
54146
54190
  function identifyCommitSubmitOutput(value) {
54147
54191
  if ("schema" in value) {
54148
54192
  if (value.schema === COMMIT_SUBMIT_OUTPUT_SCHEMA_ID) {
@@ -55695,7 +55739,7 @@ var headFlags = {
55695
55739
  }),
55696
55740
  where: flag.string({
55697
55741
  multiple: true,
55698
- description: `Field-value WHERE predicate (repeatable). Syntax: field=val, field>=val, field~prefix*, field in:[a,b] (max ${MAX_WHERE_IN_VALUES} values), field? (exists). Predicates are served by the typed field index; unservable fields return a machine-readable field-index error instead of scanning JSONB bodies.`
55742
+ description: `Field-value WHERE predicate (repeatable). Syntax: field=val, field>=val, field~prefix*, field in:[a,b] (max ${MAX_WHERE_IN_VALUES} values), field? (exists). Text comparisons ignore case. Predicates are served by the typed field index; unservable fields return a machine-readable field-index error instead of scanning JSONB bodies.`
55699
55743
  })
55700
55744
  };
55701
55745
  var handleHead = async (ctx, { flags, args }) => {
@@ -55914,7 +55958,7 @@ var queryFlags = {
55914
55958
  }),
55915
55959
  where: flag.string({
55916
55960
  multiple: true,
55917
- description: `Field-value WHERE predicate (repeatable). Syntax: field=val, field>=val, field~prefix*, field in:[a,b] (max ${MAX_WHERE_IN_VALUES} values), field? (exists). Predicates are served by the typed field index; unservable fields return a machine-readable field-index error instead of scanning JSONB bodies.`
55961
+ description: `Field-value WHERE predicate (repeatable). Syntax: field=val, field>=val, field~prefix*, field in:[a,b] (max ${MAX_WHERE_IN_VALUES} values), field? (exists). Text comparisons ignore case. Predicates are served by the typed field index; unservable fields return a machine-readable field-index error instead of scanning JSONB bodies.`
55918
55962
  })
55919
55963
  };
55920
55964
  var handleQuery = async (ctx, { flags }) => {
@@ -56136,6 +56180,59 @@ function renderQueryResults(out, c, result) {
56136
56180
  out(`${c.dim}${items.length} result(s)${c.reset}`);
56137
56181
  }
56138
56182
 
56183
+ // ../../packages/warmhub-cli/src/domains/thing/redact.ts
56184
+ var USAGE = "Usage: wh thing redact <durableId> [--expected-version <n>] [--yes]";
56185
+ var EXAMPLE = "wh thing redact 040T1QCTF2Y79... --expected-version 3 --yes";
56186
+ var redactFlags = {
56187
+ "expected-version": flag.number({
56188
+ description: "only redact if the Thing is still at this version (default: the version read before redacting)"
56189
+ }),
56190
+ yes: flag.boolean({ short: "y", description: "Skip confirmation prompt" }),
56191
+ "event-request-id": operationEventRequestIdFlag
56192
+ };
56193
+ var handleThingRedact = async (ctx, { flags, args }) => {
56194
+ const durableId = args[0];
56195
+ if (!durableId)
56196
+ usageError(USAGE, EXAMPLE);
56197
+ const repoRef = getRepoRef(ctx);
56198
+ if (!isDurableId(durableId)) {
56199
+ usageError(`${USAGE}
56200
+ Redaction requires the Thing's bare durable ID, never a wref.`, `wh thing resolve ${durableId}${repoRef ? ` --repo ${repoRef}` : ""}`);
56201
+ }
56202
+ const { org, repo } = parseOrgRepo(repoRef, ctx.config);
56203
+ const c = ctx.colors;
56204
+ let expectedVersion = parsePositiveIntFlag(flags["expected-version"], "--expected-version", EXAMPLE);
56205
+ let label = durableId;
56206
+ if (expectedVersion === undefined || !flags.yes) {
56207
+ const thing = await ctx.client.thing.get(org, repo, durableId, undefined, {
56208
+ includeRetracted: true
56209
+ });
56210
+ expectedVersion ??= thing.version;
56211
+ label = `${thing.wref} (${durableId})`;
56212
+ }
56213
+ if (!flags.yes) {
56214
+ const confirmed = await ctx.confirm?.(`Irreversibly redact ${label} at v${expectedVersion}? This erases its canonical content and former name, but not backups, completed exports, logs, or downstream copies.`);
56215
+ if (!confirmed) {
56216
+ ctx.status("Cancelled");
56217
+ return;
56218
+ }
56219
+ }
56220
+ const eventRequestId = flags["event-request-id"] ?? createOperationEventRequestId();
56221
+ ctx.status(`Operation event request: ${eventRequestId}`);
56222
+ const receipt = await ctx.client.thing.redact(org, repo, durableId, {
56223
+ eventRequestId,
56224
+ expectedVersion
56225
+ });
56226
+ writeOutput(ctx, receipt, () => {
56227
+ if (receipt.pruned) {
56228
+ ctx.out(`${c.dim}Replayed${c.reset} ${displayName(c, durableId)} (the receipt was pruned; the Thing was removed since)`);
56229
+ return;
56230
+ }
56231
+ const operation = receipt.operations.find((candidate) => candidate.operation === "redact");
56232
+ ctx.out(operation?.status === "noop" ? `${c.dim}Already redacted${c.reset} ${displayName(c, durableId)}` : `${c.green}Redacted${c.reset} ${displayName(c, durableId)}`);
56233
+ });
56234
+ };
56235
+
56139
56236
  // ../../packages/warmhub-cli/src/domains/thing/refs.ts
56140
56237
  var refsFlags = {
56141
56238
  inbound: flag.boolean({
@@ -56254,8 +56351,8 @@ var handleReleaseLease = async (ctx, { flags, args }) => {
56254
56351
  };
56255
56352
 
56256
56353
  // ../../packages/warmhub-cli/src/domains/thing/remove.ts
56257
- var USAGE = "Usage: wh thing remove <wref|durableId> [--expected-version <n>] [--yes]";
56258
- var EXAMPLE = "wh thing remove cave --yes";
56354
+ var USAGE2 = "Usage: wh thing remove <wref|durableId> [--expected-version <n>] [--yes]";
56355
+ var EXAMPLE2 = "wh thing remove cave --yes";
56259
56356
  var removeFlags = {
56260
56357
  "expected-version": flag.number({
56261
56358
  description: "only remove if the Thing is still at this version (default: the version read before removing)"
@@ -56266,7 +56363,7 @@ var removeFlags = {
56266
56363
  var handleThingRemove = async (ctx, { flags, args }) => {
56267
56364
  const target = args[0];
56268
56365
  if (!target)
56269
- usageError(USAGE, EXAMPLE);
56366
+ usageError(USAGE2, EXAMPLE2);
56270
56367
  const { org, repo } = parseOrgRepo(getRepoRef(ctx), ctx.config);
56271
56368
  const c = ctx.colors;
56272
56369
  let expectedVersion = parsePositiveIntFlag(flags["expected-version"], "--expected-version", "wh thing remove cave --expected-version 3");
@@ -56476,8 +56573,8 @@ var handleRevise2 = async (ctx, { flags, args }) => {
56476
56573
  };
56477
56574
 
56478
56575
  // ../../packages/warmhub-cli/src/domains/thing/rewrite.ts
56479
- var USAGE2 = "Usage: wh thing rewrite <name@vN|durableId@vN> --shape <Shape>... (--data <json-object> | --file <path>) [--yes]";
56480
- var EXAMPLE2 = "wh thing rewrite cave@v2 --shape Location --shape CorrectedThing --file corrected.json --yes";
56576
+ var USAGE3 = "Usage: wh thing rewrite <name@vN|durableId@vN> --shape <Shape>... (--data <json-object> | --file <path>) [--yes]";
56577
+ var EXAMPLE3 = "wh thing rewrite cave@v2 --shape Location --shape CorrectedThing --file corrected.json --yes";
56481
56578
  var rewriteFlags = {
56482
56579
  shape: flag.string({
56483
56580
  multiple: true,
@@ -56497,24 +56594,24 @@ function parseTarget(target) {
56497
56594
  try {
56498
56595
  parsed = parseWref(target);
56499
56596
  } catch (error51) {
56500
- usageError(`${USAGE2}
56501
- ${error51 instanceof Error ? error51.message : String(error51)}`, EXAMPLE2);
56597
+ usageError(`${USAGE3}
56598
+ ${error51 instanceof Error ? error51.message : String(error51)}`, EXAMPLE3);
56502
56599
  }
56503
56600
  if (parsed.version.type !== "pinned") {
56504
- usageError(`${USAGE2}
56505
- Name the exact version to correct, e.g. cave@v2.`, EXAMPLE2);
56601
+ usageError(`${USAGE3}
56602
+ Name the exact version to correct, e.g. cave@v2.`, EXAMPLE3);
56506
56603
  }
56507
56604
  return { wref: stripWrefVersion(target), version: parsed.version.n };
56508
56605
  }
56509
56606
  var handleThingRewrite = async (ctx, { flags, args }) => {
56510
56607
  const target = args[0];
56511
56608
  if (!target)
56512
- usageError(USAGE2, EXAMPLE2);
56609
+ usageError(USAGE3, EXAMPLE3);
56513
56610
  const { wref, version: version2 } = parseTarget(target);
56514
56611
  const shapes = flags.shape ?? [];
56515
56612
  if (shapes.length === 0) {
56516
- usageError(`${USAGE2}
56517
- State the Shapes the version declares, plus CorrectedThing.`, EXAMPLE2);
56613
+ usageError(`${USAGE3}
56614
+ State the Shapes the version declares, plus CorrectedThing.`, EXAMPLE3);
56518
56615
  }
56519
56616
  const { org, repo } = parseOrgRepo(getRepoRef(ctx), ctx.config);
56520
56617
  const c = ctx.colors;
@@ -56523,7 +56620,7 @@ State the Shapes the version declares, plus CorrectedThing.`, EXAMPLE2);
56523
56620
  file: flags.file,
56524
56621
  inlineFlag: "--data",
56525
56622
  missingMessage: "--data is required for rewrite unless --file is provided: the complete replacement body",
56526
- example: EXAMPLE2
56623
+ example: EXAMPLE3
56527
56624
  });
56528
56625
  if (ctx.dryRun) {
56529
56626
  const validation = await ctx.client.commit.validate(org, repo, [
@@ -57126,6 +57223,20 @@ var THING_DOMAIN = defineDomain({
57126
57223
  ],
57127
57224
  handler: handleThingRemove
57128
57225
  },
57226
+ redact: {
57227
+ prime: false,
57228
+ summary: "Irreversibly erase canonical content while preserving identity (needs things:redact)",
57229
+ args: "<durableId>",
57230
+ flags: redactFlags,
57231
+ examples: [
57232
+ "wh thing redact 040T1QCTF2Y79... --yes",
57233
+ "wh thing redact 040T1QCTF2Y79... --expected-version 3 --yes"
57234
+ ],
57235
+ notes: [
57236
+ "Core redaction does not erase backups, completed exports, logs, or copies already delivered downstream."
57237
+ ],
57238
+ handler: handleThingRedact
57239
+ },
57129
57240
  rewrite: {
57130
57241
  prime: false,
57131
57242
  summary: "Replace the body of one exact version in place (needs things:rewrite)",
@@ -57369,7 +57480,7 @@ var listFlags = {
57369
57480
  all: flag.boolean({ description: "Fetch all pages" }),
57370
57481
  count: flag.boolean({ description: "Return count of matching assertions" }),
57371
57482
  field: flag.string({
57372
- description: "exact data-field filter (data.path=value); served by the typed field index"
57483
+ description: "data-field equality filter (data.path=value); served by the typed field index; text ignores case"
57373
57484
  }),
57374
57485
  match: flag.string({ description: "Filter by wref glob pattern" }),
57375
57486
  "resolve-collections": flag.boolean({
@@ -59687,7 +59798,7 @@ var createFlags3 = {
59687
59798
  };
59688
59799
 
59689
59800
  // ../../packages/warmhub-cli/src/domains/commit-stream-output-contract-id.ts
59690
- var COMMIT_SUBMIT_STREAM_ROW_SCHEMA_ID = "wh.commit.submit.stream.row/v0.10";
59801
+ var COMMIT_SUBMIT_STREAM_ROW_SCHEMA_ID = "wh.commit.submit.stream.row/v0.11";
59691
59802
  function identify(row) {
59692
59803
  if ("schema" in row) {
59693
59804
  throw new Error("Streaming submission row already defines a schema field");
@@ -59954,6 +60065,7 @@ function retractHint(name) {
59954
60065
  return `use {"operation":"retract","name":"${name ?? "<wref>"}"} or \`wh commit submit --retract${name ? ` ${name}` : ""}\``;
59955
60066
  }
59956
60067
  var PRIVILEGED_OPERATION_HINTS = {
60068
+ redact: ({ name }) => `To irreversibly erase canonical Thing content while preserving its identity, use \`wh thing redact ${name && isDurableId(name) ? name : "<durable-id>"} --expected-version <n> --yes\`.`,
59957
60069
  remove: ({ name }) => `To delete the Thing permanently, use \`wh thing remove ${name ?? "<wref>"}\`. To withdraw it, ${retractHint(name)}.`,
59958
60070
  rewrite: ({ name, version: version2 }) => `To correct a version in place, use \`wh thing rewrite ${name ?? "<wref>"}@v${typeof version2 === "number" ? version2 : "<n>"} --shape <Shape>... --file <body.json>\`.`
59959
60071
  };
@@ -61665,7 +61777,7 @@ function bindComponentMethodArgs(invocation, method) {
61665
61777
  }
61666
61778
 
61667
61779
  // ../../packages/warmhub-cli/src/component-exec.ts
61668
- var USAGE3 = "wh component exec <component> <method> [args] --repo org/repo";
61780
+ var USAGE4 = "wh component exec <component> <method> [args] --repo org/repo";
61669
61781
  function methodHelpHint(componentName, methodName, installRepo) {
61670
61782
  return `wh component exec ${componentName} ${methodName} --help --repo ${installRepo}`;
61671
61783
  }
@@ -61719,7 +61831,7 @@ var handleComponentExec = async (ctx, _domain) => {
61719
61831
  const helpRequested = invocation.help;
61720
61832
  const dryRun = invocation.flags["dry-run"] === true;
61721
61833
  if (!invocation.component)
61722
- usageError("Component name is required", USAGE3);
61834
+ usageError("Component name is required", USAGE4);
61723
61835
  const componentName = invocation.component;
61724
61836
  const methodName = invocation.method;
61725
61837
  const { org, repo } = parseOrgRepo(getRepoRef(ctx), ctx.config);
@@ -63252,7 +63364,7 @@ var handleCreate3 = async (ctx, { flags, args }) => {
63252
63364
  });
63253
63365
  writeOutput(ctx, result, () => {
63254
63366
  const c = ctx.colors;
63255
- ctx.status(`${c.green}Created credential set${c.reset} ${c.cyan}${name}${c.reset} (${scope}) in ${c.cyan}${formatCredentialContextTarget(context)}${c.reset}`);
63367
+ ctx.status(`${c.green}Created credential set${c.reset} ${c.cyan}${name}${c.reset} (${result.scope}) in ${c.cyan}${formatCredentialContextTarget(context)}${c.reset}`);
63256
63368
  });
63257
63369
  };
63258
63370
  var handleList3 = async (ctx, { flags }) => {
@@ -65120,8 +65232,10 @@ var handleAddMember = async (ctx, { flags, args }) => {
65120
65232
  writeOutput(ctx, result, () => {
65121
65233
  if (result.status === "pending") {
65122
65234
  ctx.status(`${c.green}Invited${c.reset} ${c.bold}${email3}${c.reset} to ${c.bold}${orgName}${c.reset} as ${c.cyan}${result.role}${c.reset} ${c.dim}— invite email pending${c.reset}`);
65123
- } else {
65235
+ } else if (result.status === "active") {
65124
65236
  ctx.status(`${c.green}Added${c.reset} ${c.bold}${email3}${c.reset} to ${c.bold}${orgName}${c.reset} as ${c.cyan}${result.role}${c.reset}`);
65237
+ } else {
65238
+ ctx.status(`${c.bold}${email3}${c.reset} in ${c.bold}${orgName}${c.reset}: membership status ${result.status}`);
65125
65239
  }
65126
65240
  });
65127
65241
  };
@@ -65177,7 +65291,7 @@ var handleListMembers = async (ctx, { args, flags }) => {
65177
65291
  for (const m of members) {
65178
65292
  const name = [m.firstName, m.lastName].filter(Boolean).join(" ");
65179
65293
  const display = name ? ` ${c.dim}(${name})${c.reset}` : "";
65180
- const status = m.status === "pending" ? ` ${c.yellow}pending${c.reset}` : ` ${c.dim}active${c.reset}`;
65294
+ const status = m.status === "pending" ? ` ${c.yellow}pending${c.reset}` : ` ${c.dim}${m.status}${c.reset}`;
65181
65295
  ctx.out(` ${c.cyan}${m.email}${c.reset}${display} ${c.dim}${m.role}${c.reset}${status}`);
65182
65296
  }
65183
65297
  });
@@ -65463,7 +65577,7 @@ var ORG_DOMAIN = defineDomain({
65463
65577
  });
65464
65578
 
65465
65579
  // ../../packages/warmhub-cli/src/domains/prime-content.md
65466
- 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. **Write**: One or more add/revise/retract operations with per-operation results.\n- **wref**: A thing's full name: `alice`, or `hub/shapes/Player` for a Shape. Cross-repo: `wh:org/repo/alice`.\n\n## Versioned Wrefs\n- `hub/shapes/X` addresses the Shape X. `@vN` pins a version. `--shape` takes bare names.\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- Wref `binding`: `identity` follows the Thing, `versioned` pins.\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 --dry-run --repo org/repo # preview; remove --dry-run to submit\n# or single assertion (no file needed):\nwh assertion create my-assertion --shape ShapeName --about target --data '{\"field\":1}' --repo org/repo # ShapeName composes Assertion\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 alice --repo org/repo # inspect a thing\nwh thing query --shape MyShape --repo org/repo # find things by shape\nwh thing about hub/shapes/X --repo org/repo # assertions about a shape\nwh assertion list --repo org/repo # all assertions at HEAD\nwh thing history alice --repo org/repo # version history\n\n# Batch read — wh thing view is variadic (max 500 wrefs/call):\nwh thing view alice 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`WH_CLIENT_FLAGS=legacy-wrefs`: raw v1 `commit submit` only; a bare name is a Shape.\n\n## Command Reference\n\n**Global flags**: `--repo`, `--format`, `--json`, `--live`\n### thing — Things\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 <S>...|--shapeless) (--data|--file)` — Create\n- `wh thing revise <name> (--shape <S>...|--shapeless|--keep-shapes) [--data] [--expected-version]` — Revise (CONFLICT if HEAD≠n)\n- `wh thing retract <name> -m <message> [--reason] [--expected-version]` — 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 <name> <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] [--role from|to|ends] [--limit] [--include-retracted]` — Show assertions about the target identity; `--resolve-collections` expands bare/@HEAD/@ALL members, `--role` filters direction; not pinned @vN\n\n- `wh view evaluate VIEW [--limit N] [--cursor TOK] [--all]`\n### commit — Write operations\n- `wh commit submit [--ops|--file|--add|--revise|--retract] [--dry-run] [--skip-existing]` — Submit operations, or evaluate the complete bounded input without durable changes under `--dry-run`. JSONL preview emits one operation row per input plus one summary.\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 --shape <s> --name <n> --about <wref> [--data] [-m] [--committer]` — Create assertion\n- `wh assertion revise <wref> --data <json> [--message] [--committer]` — Revise assertion\n- `wh assertion retract <wref> -m <message> [--reason] [--committer] [--expected-version]` — 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|--file)`\n- `wh shape create <name> (--fields|--file)`\n- `wh shape retract <name> -m <message> [--reason] [--expected-version]` — 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>` — Retire; name reserved\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 stops bound webhook deliveries)\n\n### component — Component management\n- `wh component validate <path>` — Validate package\n- `wh component install <org/name>` — Install; resource-phase CONFLICT → 2, degraded replay → 1\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; resource-phase CONFLICT → 2, degraded replay → 1\n- `wh component view <org/name>` — Show component details (alias: show)\n- `wh component doctor <org/name>` — Health; degraded/error/uninstalled → exit 1\n- `wh component teardown <org/name>` — Pause component subscriptions\n\n### Getting More Info\n- `wh help` — help overview\n- `wh <domain>` — domain verbs\n- `wh <domain> <verb> --help` — verb flags and examples\n- `wh help --format json` — `CliSpecV2` (`schemaVersion: 2`): global/contextual/root tables and command overrides\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 alice --repo org/repo # inspect a specific thing\nwh thing history alice --repo org/repo # inspect version history\nwh thing about alice # assertions about a thing\n```\n\n**Create an assertion** (most common write):\n```bash\n# Assertion = Shape with composes:[\"Assertion\"]; write a thing with data.about.\n# --about is written as data.about.\nwh assertion create my-assertion --shape MyShape --about target-name \\\n --data '{\"field_a\":1,\"field_b\":\"value\"}' --repo org/repo\n# Output includes per-operation status; relay failures.\n```\n\n**Write entrypoint** (batches and streams):\n```bash\nwh commit submit --add my-item --shape MyShape \\\n --about 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 # --kind assertion --about X for assertions\n# edit ops.json — fill FILL_IN placeholders\nwh commit submit --file ops.json -m \"batch update\" # submit all ops (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)\" # caller id for chunk correlation\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# --stream-id identifies the submission but provides no receipt or resume.\n# After an outcome-unknown append, stop writes and reconcile attempted + unsent\n# work from a later verified checkpoint; never blindly replay revise/retract.\n```\n\n**Create collections:**\n```bash\nwh commit submit --add route --shape Arc --data '{\"from\":\"a\",\"to\":\"b\"}'\nwh assertion create route-support --shape Supports --about route --data '{\"confidence\":0.8}' --repo org/repo\n```\n\n**Modify data:**\n```bash\nwh thing revise my-item --keep-shapes --data '{\"x\":5,\"y\":3}' -m \"update\" --repo org/repo\nwh thing retract 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 alice # by kind + target\nwh thing history alice --limit 10 # version history\n```\n\n## Built-in Content shape\n\nWarmHub repos expose three well-known content Things (Shape `Content`):\n- `Readme` — stored markdown for humans\n- `Agents` — stored markdown guidance for AI agents\n- `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` withdraws an identity and creates a history entry; `wh thing restore <durableId>` makes it active again.\n- Use `wh doctor` to check environment health\n";
65580
+ 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. **Write**: One or more add/revise/retract operations with per-operation results.\n- **wref**: A thing's full name: `alice`, or `hub/shapes/Player` for a Shape. Cross-repo: `wh:org/repo/alice`.\n\n## Versioned Wrefs\n- `hub/shapes/X` addresses the Shape X. `@vN` pins a version. `--shape` takes bare names.\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- Wref `binding`: `identity` follows the Thing, `versioned` pins.\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 --dry-run --repo org/repo # preview; remove --dry-run to submit\n# or single assertion (no file needed):\nwh assertion create my-assertion --shape ShapeName --about target --data '{\"field\":1}' --repo org/repo # ShapeName composes Assertion\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 alice --repo org/repo # inspect a thing\nwh thing query --shape MyShape --repo org/repo # find things by shape\nwh thing about hub/shapes/X --repo org/repo # assertions about a shape\nwh assertion list --repo org/repo # all assertions at HEAD\nwh thing history alice --repo org/repo # version history\n\n# Batch read — wh thing view is variadic (max 500 wrefs/call):\nwh thing view alice 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`WH_CLIENT_FLAGS=legacy-wrefs`: raw v1 `commit submit` only; a bare name is a Shape.\n\n## Command Reference\n\n**Global flags**: `--repo`, `--format`, `--json`, `--live`\n### thing — Things\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 <S>...|--shapeless) (--data|--file)` — Create\n- `wh thing revise <name> (--shape <S>...|--shapeless|--keep-shapes) [--data] [--expected-version]` — Revise (CONFLICT if HEAD≠n)\n- `wh thing retract <name> -m <message> [--reason] [--expected-version]` — 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 <name> <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] [--role from|to|ends] [--limit] [--include-retracted]` — Show assertions about the target identity; `--resolve-collections` expands bare/@HEAD/@ALL members, `--role` filters direction; not pinned @vN\n\n- `wh view evaluate VIEW [--limit N] [--cursor TOK] [--all]`\n### commit — Write operations\n- `wh commit submit [--ops|--file|--add|--revise|--retract] [--dry-run] [--skip-existing]` — Submit operations, or evaluate the complete bounded input without durable changes under `--dry-run`. JSONL preview emits one operation row per input plus one summary.\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 --shape <s> --name <n> --about <wref> [--data] [-m] [--committer]` — Create assertion\n- `wh assertion revise <wref> --data <json> [--message] [--committer]` — Revise assertion\n- `wh assertion retract <wref> -m <message> [--reason] [--committer] [--expected-version]` — 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|--file)`\n- `wh shape create <name> (--fields|--file)`\n- `wh shape retract <name> -m <message> [--reason] [--expected-version]` — 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>` — Retire; name reserved\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 stops bound webhook deliveries)\n\n### component — Component management\n- `wh component validate <path>` — Validate package\n- `wh component install <org/name>` — Install; resource-phase CONFLICT → 2, degraded replay → 1\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; resource-phase CONFLICT → 2, degraded replay → 1\n- `wh component view <org/name>` — Show component details (alias: show)\n- `wh component doctor <org/name>` — Health; degraded/error/uninstalled → exit 1\n- `wh component teardown <org/name>` — Pause component subscriptions\n\n### Getting More Info\n- `wh help` — help overview\n- `wh <domain>` — domain verbs\n- `wh <domain> <verb> --help` — verb flags and examples\n- `wh help --format json` — `CliSpecV2` (`schemaVersion: 2`): global/contextual/root tables and command overrides\n\n## Common Workflows\n\n**Agent identities:** `wh auth status` shows your user identity; `wh token create --committer-identity wh:org/repo/agent` binds a persona to a PAT. Install `warmhub/identity` in your chosen repo and manage personas with `wh thing`. [Create an agent identity](https://docs.warmhub.ai/auth/agent-identities/) covers setup, private-repo scopes, attribution, and retirement.\n\n**Explore a repo:**\n```bash\nwh thing list --repo org/repo # see all things in HEAD\nwh thing view alice --repo org/repo # inspect a specific thing\nwh thing history alice --repo org/repo # inspect version history\nwh thing about alice # assertions about a thing\n```\n\n**Create an assertion** (most common write):\n```bash\n# Assertion = Shape with composes:[\"Assertion\"]; write a thing with data.about.\n# --about is written as data.about.\nwh assertion create my-assertion --shape MyShape --about target-name \\\n --data '{\"field_a\":1,\"field_b\":\"value\"}' --repo org/repo\n# Output includes per-operation status; relay failures.\n```\n\n**Write entrypoint** (batches and streams):\n```bash\nwh commit submit --add my-item --shape MyShape \\\n --about 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 # --kind assertion --about X for assertions\n# edit ops.json — fill FILL_IN placeholders\nwh commit submit --file ops.json -m \"batch update\" # submit all ops (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)\" # caller id for chunk correlation\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# --stream-id identifies the submission but provides no receipt or resume.\n# After an outcome-unknown append, stop writes and reconcile attempted + unsent\n# work from a later verified checkpoint; never blindly replay revise/retract.\n```\n\n**Create collections:**\n```bash\nwh commit submit --add route --shape Arc --data '{\"from\":\"a\",\"to\":\"b\"}'\nwh assertion create route-support --shape Supports --about route --data '{\"confidence\":0.8}' --repo org/repo\n```\n\n**Modify data:**\n```bash\nwh thing revise my-item --keep-shapes --data '{\"x\":5,\"y\":3}' -m \"update\" --repo org/repo\nwh thing retract 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 alice # by kind + target\nwh thing history alice --limit 10 # version history\n```\n\n## Built-in Content shape\n\nWarmHub repos expose three well-known content Things (Shape `Content`):\n- `Readme` — stored markdown for humans\n- `Agents` — stored markdown guidance for AI agents\n- `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` withdraws an identity and creates a history entry; `wh thing restore <durableId>` makes it active again.\n- Use `wh doctor` to check environment health\n";
65467
65581
 
65468
65582
  // ../../packages/warmhub-cli/src/domains/prime.ts
65469
65583
  function buildMarkdown(config2) {
@@ -72246,7 +72360,7 @@ function resolveLogLevel(flagLevel, env) {
72246
72360
  // package.json
72247
72361
  var package_default3 = {
72248
72362
  name: "@warmhub/cli",
72249
- version: "0.145.0",
72363
+ version: "0.147.0",
72250
72364
  private: false,
72251
72365
  type: "module",
72252
72366
  description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -72871,5 +72985,5 @@ process.exitCode = interceptedExitCode === undefined ? await runPreparedCli(laun
72871
72985
  version: package_default3.version
72872
72986
  }) : interceptedExitCode;
72873
72987
 
72874
- //# debugId=F265A15255A53BDA64756E2164756E21
72875
- //# warmhub-cli-build-info {"cliVersion":"0.145.0","sdkVersion":"0.143.0"}
72988
+ //# debugId=2ABA0653C6EADCF764756E2164756E21
72989
+ //# warmhub-cli-build-info {"cliVersion":"0.147.0","sdkVersion":"0.145.0"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/cli",
3
- "version": "0.145.0",
3
+ "version": "0.147.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.",