@warmhub/cli 0.130.0 → 0.131.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 +104 -60
  2. package/package.json +1 -1
package/dist/wh.js CHANGED
@@ -18024,6 +18024,14 @@ var COMMIT_OPERATION_KINDS = [
18024
18024
  "assertion",
18025
18025
  "collection"
18026
18026
  ];
18027
+ var READ_KINDS = ["thing", "shape"];
18028
+ var LEGACY_COLLECTION_READ_KIND = "collection";
18029
+ var LEGACY_ASSERTION_READ_KIND = "assertion";
18030
+ var READ_KIND_FILTERS = [
18031
+ ...READ_KINDS,
18032
+ LEGACY_COLLECTION_READ_KIND,
18033
+ LEGACY_ASSERTION_READ_KIND
18034
+ ];
18027
18035
  function splitLocalPath(name) {
18028
18036
  const idx = name.indexOf("/");
18029
18037
  if (idx === -1)
@@ -24627,6 +24635,11 @@ var VALID_PRIMITIVE_TYPES = new Set([
24627
24635
  function isPlainObject(value) {
24628
24636
  return typeof value === "object" && value !== null && !Array.isArray(value);
24629
24637
  }
24638
+ function dataAboutWref(data) {
24639
+ if (!isPlainObject(data))
24640
+ return;
24641
+ return typeof data.about === "string" ? data.about : undefined;
24642
+ }
24630
24643
  var STRING_CONSTRAINT_KEYS = new Set([
24631
24644
  "minLength",
24632
24645
  "maxLength",
@@ -40647,7 +40660,7 @@ function compareUnsignedUtf8(left, right) {
40647
40660
  var CHECKPOINT_CHUNK_BYTE_LIMIT = 67108864;
40648
40661
  var CHECKPOINT_PART_DIGITS = 10;
40649
40662
  var CHECKPOINT_FORMAT = "warmhub-repository-checkpoint";
40650
- var CHECKPOINT_FORMAT_VERSION = 3;
40663
+ var CHECKPOINT_FORMAT_VERSION = 4;
40651
40664
  var CHECKPOINT_MANIFEST_NAME = "repository-checkpoint.json";
40652
40665
  var checkpointSha256Schema = exports_external.string().regex(/^[0-9a-f]{64}$/);
40653
40666
  var nonnegativeSafeIntegerSchema = exports_external.number().int().nonnegative();
@@ -40691,14 +40704,13 @@ var checkpointRowSchema = exports_external.discriminatedUnion("kind", [
40691
40704
  checkpointRowBaseSchema.extend({
40692
40705
  kind: exports_external.literal("thing"),
40693
40706
  shapeName: exports_external.string().min(1),
40694
- collections: checkpointCollectionsSchema.optional()
40695
- }).strict(),
40696
- checkpointRowBaseSchema.extend({
40697
- kind: exports_external.literal("assertion"),
40698
- shapeName: exports_external.string().min(1),
40699
- aboutWref: pinnedWrefSchema,
40700
- affirmedWrefs: affirmedWrefsSchema
40701
- }).strict()
40707
+ collections: checkpointCollectionsSchema.optional(),
40708
+ aboutWref: pinnedWrefSchema.optional(),
40709
+ affirmedWrefs: affirmedWrefsSchema.optional()
40710
+ }).strict().refine((row) => row.aboutWref === undefined === (row.affirmedWrefs === undefined), {
40711
+ message: "A checkpoint row carries aboutWref and affirmedWrefs together or not at all",
40712
+ path: ["affirmedWrefs"]
40713
+ })
40702
40714
  ]);
40703
40715
  var checkpointManifestChunkSchema = exports_external.object({
40704
40716
  part: nonnegativeSafeIntegerSchema,
@@ -40875,8 +40887,9 @@ function validateCheckpointStreamRow(state, input) {
40875
40887
  const row = input;
40876
40888
  assertCheckpointText(row.wref);
40877
40889
  assertCheckpointText(row.durableId);
40878
- if (row.kind === "assertion")
40890
+ if (row.kind !== "shape" && row.aboutWref !== undefined) {
40879
40891
  assertCheckpointText(row.aboutWref);
40892
+ }
40880
40893
  const rowShapeName = row.kind === "shape" ? row.wref : row.shapeName;
40881
40894
  if (rowShapeName !== state.shapeName) {
40882
40895
  throw new Error("Checkpoint row is grouped under the wrong Shape stream");
@@ -40910,16 +40923,12 @@ function addOneSafe(value) {
40910
40923
  return next;
40911
40924
  }
40912
40925
  // ../../packages/rules/src/repository-export/types.ts
40913
- var REPOSITORY_EXPORT_FORMAT_VERSION = 4;
40926
+ var REPOSITORY_EXPORT_FORMAT_VERSION = 5;
40914
40927
  var REPOSITORY_EXPORT_MEDIA_TYPE = "application/x-ndjson";
40915
40928
  var repositoryExportSha256Schema = exports_external.string().regex(/^[0-9a-f]{64}$/);
40916
40929
  var nonnegativeSafeIntegerSchema2 = exports_external.number().int().nonnegative();
40917
40930
  var positiveSafeIntegerSchema2 = exports_external.number().int().positive();
40918
- var REPOSITORY_EXPORT_ROW_KINDS = [
40919
- "shape",
40920
- "thing",
40921
- "assertion"
40922
- ];
40931
+ var REPOSITORY_EXPORT_ROW_KINDS = ["shape", "thing"];
40923
40932
  var REPOSITORY_EXPORT_MODES = ["heads", "ops"];
40924
40933
  var repositoryExportShapeCertificateSchema = exports_external.string().regex(/^[^\r\n]+@v[1-9]\d*(?![\s\S])/, "Shape certificate must be a pinned wref");
40925
40934
  var repositoryExportReferenceSchema = exports_external.object({
@@ -40975,15 +40984,13 @@ var activeRowSchema = exports_external.discriminatedUnion("kind", [
40975
40984
  ...activeRowFields,
40976
40985
  kind: exports_external.literal("thing"),
40977
40986
  shapes: shapesSchema,
40978
- collections: repositoryExportCollectionsSchema.optional()
40979
- }).strict(),
40980
- exports_external.object({
40981
- ...activeRowFields,
40982
- kind: exports_external.literal("assertion"),
40983
- shapes: shapesSchema,
40984
- about: repositoryExportReferenceSchema,
40985
- affirmed: affirmedSchema
40986
- }).strict()
40987
+ collections: repositoryExportCollectionsSchema.optional(),
40988
+ about: repositoryExportReferenceSchema.optional(),
40989
+ affirmed: affirmedSchema.optional()
40990
+ }).strict().refine((row) => row.about === undefined === (row.affirmed === undefined), {
40991
+ message: "An export row carries `about` and `affirmed` together or not at all",
40992
+ path: ["affirmed"]
40993
+ })
40987
40994
  ]);
40988
40995
  var tombstoneRowSchema = exports_external.object({
40989
40996
  ...rowEnvelopeFields,
@@ -41686,6 +41693,9 @@ var COMPONENT_INSTALL_FIELDS = {
41686
41693
  "updatedAt?": "string"
41687
41694
  };
41688
41695
  var COMPONENT_CONFIG_FIELDS = {};
41696
+ var ASSERTION_FIELDS = {
41697
+ about: "wref"
41698
+ };
41689
41699
  var SYSTEM_MANIFEST = {
41690
41700
  component: {
41691
41701
  id: SYSTEM_COMPONENT_ID,
@@ -41699,7 +41709,8 @@ var SYSTEM_MANIFEST = {
41699
41709
  { name: "Arc", ...COLLECTION_V2_SHAPE_DEFS.Arc },
41700
41710
  { name: "Bond", ...COLLECTION_V2_SHAPE_DEFS.Bond },
41701
41711
  { name: "Set", ...COLLECTION_V2_SHAPE_DEFS.Set },
41702
- { name: "List", ...COLLECTION_V2_SHAPE_DEFS.List }
41712
+ { name: "List", ...COLLECTION_V2_SHAPE_DEFS.List },
41713
+ { name: "Assertion", fields: ASSERTION_FIELDS }
41703
41714
  ],
41704
41715
  credentials: [],
41705
41716
  subscriptions: [],
@@ -41713,7 +41724,8 @@ var SYSTEM_MANIFEST = {
41713
41724
  "Arc",
41714
41725
  "Bond",
41715
41726
  "Set",
41716
- "List"
41727
+ "List",
41728
+ "Assertion"
41717
41729
  ]
41718
41730
  }
41719
41731
  },
@@ -41740,7 +41752,12 @@ var SYSTEM_COMPONENT = {
41740
41752
  { name: "Arc", ...COLLECTION_V2_SHAPE_DEFS.Arc },
41741
41753
  { name: "Bond", ...COLLECTION_V2_SHAPE_DEFS.Bond },
41742
41754
  { name: "Set", ...COLLECTION_V2_SHAPE_DEFS.Set },
41743
- { name: "List", ...COLLECTION_V2_SHAPE_DEFS.List }
41755
+ { name: "List", ...COLLECTION_V2_SHAPE_DEFS.List },
41756
+ {
41757
+ name: "Assertion",
41758
+ fields: ASSERTION_FIELDS,
41759
+ priorVersions: [{ fields: {} }]
41760
+ }
41744
41761
  ]
41745
41762
  };
41746
41763
 
@@ -41748,6 +41765,7 @@ var SYSTEM_COMPONENT = {
41748
41765
  var SYSTEM_COMPONENTS = [
41749
41766
  SYSTEM_COMPONENT
41750
41767
  ];
41768
+ var SYSTEM_PROTECTED_SHAPES = SYSTEM_COMPONENT.shapes.filter((shape) => shape.installInfra !== true);
41751
41769
  var SYSTEM_INFRA_SHAPE_NAMES = new Set(SYSTEM_COMPONENTS.flatMap((entry) => entry.shapes.filter((shape) => shape.installInfra === true).map((shape) => shape.name)));
41752
41770
  function findSystemComponent(componentId) {
41753
41771
  return SYSTEM_COMPONENTS.find((entry) => entry.componentId === componentId);
@@ -43323,6 +43341,7 @@ function normalizeOptionalName(value) {
43323
43341
  }
43324
43342
 
43325
43343
  // ../../packages/sdk-ts/src/operation-normalize.ts
43344
+ var THING_ENVELOPE_ABOUT_MESSAGE = "thing add operation does not accept top-level 'about' — put the target in data.about, or use kind: 'assertion' for the deprecated envelope form";
43326
43345
  function toBackendStreamOperation(operation) {
43327
43346
  if (operation.expectedVersion !== undefined && operation.operation !== "revise" && operation.operation !== "retract" && operation.operation !== "reaffirm") {
43328
43347
  throw new Error("expectedVersion is only valid on revise, retract, or reaffirm operations — set an explicit operation discriminator");
@@ -43395,6 +43414,9 @@ function toBackendStreamOperation(operation) {
43395
43414
  };
43396
43415
  }
43397
43416
  const kind = inferOperationKind(operation);
43417
+ if (kind === "thing" && "about" in operation && operation.about !== undefined) {
43418
+ throw new Error(THING_ENVELOPE_ABOUT_MESSAGE);
43419
+ }
43398
43420
  const skipExisting = "skipExisting" in operation ? operation.skipExisting : undefined;
43399
43421
  if (kind !== "collection" && (("type" in operation) && operation.type !== undefined || ("members" in operation) && operation.members !== undefined)) {
43400
43422
  throw new Error(`add operation '${operation.name ?? ""}' has collection fields but resolved kind '${kind}' — collection adds require both 'type' and 'members', or set kind: 'collection'`);
@@ -43409,10 +43431,11 @@ function toBackendStreamOperation(operation) {
43409
43431
  throw new Error("add operation requires a name");
43410
43432
  }
43411
43433
  if (kind === "assertion") {
43412
- if (!("about" in operation) || operation.about === undefined) {
43413
- throw new Error("assertion add operation requires 'about'");
43434
+ const about = "about" in operation && operation.about !== undefined ? operation.about : dataAboutWref(operation.data);
43435
+ if (about === undefined) {
43436
+ throw new Error("assertion add operation requires 'about', on the envelope or as data.about");
43414
43437
  }
43415
- if (typeof operation.about !== "string") {
43438
+ if (typeof about !== "string") {
43416
43439
  throw new Error(COLLECTION_ABOUT_REMOVED_MESSAGE);
43417
43440
  }
43418
43441
  if (operation.data === undefined) {
@@ -43422,7 +43445,7 @@ function toBackendStreamOperation(operation) {
43422
43445
  operation: "add",
43423
43446
  kind: "assertion",
43424
43447
  name: operation.name,
43425
- about: operation.about,
43448
+ about,
43426
43449
  data: operation.data,
43427
43450
  ...operation.affirmedTargets ? { affirmedTargets: operation.affirmedTargets } : {},
43428
43451
  ...skipExisting === true ? { skipExisting } : {}
@@ -45406,7 +45429,7 @@ function createStreamingSubmissionHandle(input, deps) {
45406
45429
  // ../../packages/sdk-ts/package.json
45407
45430
  var package_default = {
45408
45431
  name: "@warmhub/sdk-ts",
45409
- version: "0.128.0",
45432
+ version: "0.129.0",
45410
45433
  private: false,
45411
45434
  type: "module",
45412
45435
  description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -45530,7 +45553,7 @@ function sdkVersionIsDevelopment(version2) {
45530
45553
  var SDK_VERSION = typeof __SDK_VERSION__ !== "undefined" ? __SDK_VERSION__ : package_default.version;
45531
45554
 
45532
45555
  // ../../packages/sdk-ts/src/write-compatibility.ts
45533
- var MINIMUM_WRITE_CONTRACT_VERSION = 1;
45556
+ var MINIMUM_WRITE_CONTRACT_VERSION = 2;
45534
45557
  function clientUpgradeHint(name) {
45535
45558
  if (name === WARMHUB_CLI_CLIENT_NAME)
45536
45559
  return "Run: wh update --yes";
@@ -45578,6 +45601,7 @@ function clientCompatibilityFailure(capabilities, identity2) {
45578
45601
  hint: "Upgrade the WarmHub backend before retrying this write."
45579
45602
  };
45580
45603
  }
45604
+ return;
45581
45605
  }
45582
45606
  function isProductionApiUrl(apiUrl, productionApiUrl) {
45583
45607
  try {
@@ -45987,7 +46011,7 @@ class WarmHubClient {
45987
46011
  if (sdkVersionIsDevelopment(this.clientIdentity.version) && isProductionApiUrl(this.apiUrl, DEFAULT_API_URL)) {
45988
46012
  return Promise.reject(clientIncompatible(`Development client ${this.clientIdentity.name}/${this.clientIdentity.version} cannot write to production.`, "Install a released WarmHub client artifact before writing to api.warmhub.ai."));
45989
46013
  }
45990
- if (sdkVersionIsDevelopment(this.clientIdentity.version) && !isProductionApiUrl(this.apiUrl, DEFAULT_API_URL)) {
46014
+ if (sdkVersionIsDevelopment(this.clientIdentity.version) && this.clientIdentity.name !== WARMHUB_CLI_CLIENT_NAME) {
45991
46015
  return Promise.resolve();
45992
46016
  }
45993
46017
  return this.diagnostics.assertCompatible();
@@ -46897,12 +46921,15 @@ class WarmHubClient {
46897
46921
  throw toWarmHubError(error51);
46898
46922
  }
46899
46923
  },
46900
- revise: async (orgName, repoName, shapeName, newFields, opts) => {
46901
- const preflight = shapeDefinitionPreflightError(shapeName, {
46924
+ revise: async (...args) => {
46925
+ const [orgName, repoName, shapeName] = args;
46926
+ const newFields = args.length === 5 ? args[3] : undefined;
46927
+ const opts = args.length === 5 ? args[4] : args[3];
46928
+ const preflight = newFields ? shapeDefinitionPreflightError(shapeName, {
46902
46929
  fields: newFields,
46903
46930
  ...opts.description !== undefined ? { description: opts.description } : {},
46904
46931
  ...opts.composes !== undefined ? { composes: opts.composes } : {}
46905
- }, "revise");
46932
+ }, "revise") : undefined;
46906
46933
  if (preflight)
46907
46934
  throw new WarmHubError("VALIDATION_ERROR", preflight);
46908
46935
  try {
@@ -53174,7 +53201,7 @@ function renderHead(out, c, chars, result, org, repo, shape, kind) {
53174
53201
  if (item.validatedShapes?.length) {
53175
53202
  out(` ${c.dim}validates:${c.reset} ${refList(c, item.validatedShapes, decorations)}`);
53176
53203
  }
53177
- if (item.kind === "assertion" && item.aboutWref) {
53204
+ if (item.aboutWref) {
53178
53205
  out(` ${c.dim}about:${c.reset} ${refDisplay(c, item.aboutWref, decorations)}`);
53179
53206
  }
53180
53207
  if (item.affirmedWrefs?.length) {
@@ -57375,6 +57402,17 @@ function identifyCommitSubmitStreamRow(row) {
57375
57402
  // ../../packages/warmhub-cli/src/domains/commit-submit-template.ts
57376
57403
  import { writeFile } from "node:fs/promises";
57377
57404
  var WRITE_TEMPLATE_KINDS = ["thing", "assertion"];
57405
+ function composesLocalAssertion(shapeData, org, repo) {
57406
+ const composes = shapeData?.composes;
57407
+ if (!Array.isArray(composes))
57408
+ return false;
57409
+ return composes.some((entry) => {
57410
+ if (typeof entry !== "string")
57411
+ return false;
57412
+ const unversioned = entry.replace(/@(HEAD|v\d+)$/i, "");
57413
+ return unversioned === "Assertion" || unversioned === `wh:${org}/${repo}/Assertion`;
57414
+ });
57415
+ }
57378
57416
  async function readTemplateShape(ctx, org, repo, shapeName) {
57379
57417
  try {
57380
57418
  const shape = await ctx.client.shape.get(org, repo, shapeName);
@@ -57524,22 +57562,25 @@ var handleTemplate = async (ctx, { flags, args }) => {
57524
57562
  if (templateKind === "assertion") {
57525
57563
  aboutPlaceholder = flags.about ? parseCollectionAboutFlag(flags.about) : "Shape/FILL_IN";
57526
57564
  }
57565
+ const composesAssertion = composesLocalAssertion(shapeData, org, repo);
57566
+ const emittedKind = templateKind === "assertion" && composesAssertion ? "thing" : templateKind;
57527
57567
  const data = buildTemplateData(fields);
57568
+ const emittedData = aboutPlaceholder && emittedKind === "thing" ? { ...data, about: aboutPlaceholder } : data;
57528
57569
  const affirmedTargetsPlaceholder = templateKind === "assertion" ? { affirmedTargets: [] } : {};
57529
57570
  for (let i = 0;i < count; i++) {
57530
57571
  const op = operationType === "add" ? {
57531
57572
  operation: "add",
57532
- kind: templateKind,
57573
+ kind: emittedKind,
57533
57574
  name: `${shapeName}/${nameSuffix(i)}`,
57534
- ...aboutPlaceholder ? { about: aboutPlaceholder } : {},
57535
- data,
57536
- ...affirmedTargetsPlaceholder
57575
+ ...aboutPlaceholder && emittedKind === "assertion" ? { about: aboutPlaceholder } : {},
57576
+ data: emittedData,
57577
+ ...emittedKind === "assertion" ? affirmedTargetsPlaceholder : {}
57537
57578
  } : {
57538
57579
  operation: "revise",
57539
- kind: templateKind,
57580
+ kind: emittedKind,
57540
57581
  name: `${shapeName}/FILL_IN`,
57541
- data,
57542
- ...affirmedTargetsPlaceholder
57582
+ data: emittedData,
57583
+ ...emittedKind === "assertion" ? affirmedTargetsPlaceholder : {}
57543
57584
  };
57544
57585
  operations.push(op);
57545
57586
  }
@@ -62996,7 +63037,7 @@ var ORG_DOMAIN = defineDomain({
62996
63037
  });
62997
63038
 
62998
63039
  // ../../packages/warmhub-cli/src/domains/prime-content.md
62999
- 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- 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 --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 — 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/name> (--data|--file) [--shape]` — 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] [--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 <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] [--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 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` — 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 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)\" # 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\":\"Location/a\",\"to\":\"Location/b\"}'\nwh assertion create --shape Supports --name route-support --about Arc/route --data '{\"confidence\":0.8}' --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";
63040
+ 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- 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 --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 — 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/name> (--data|--file) [--shape]` — 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] [--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 <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] [--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 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` — 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 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# Assertion = Shape with composes:[\"Assertion\"]; write a thing with data.about.\n# --about is window sugar; a wref 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.\n```\n\n**Write entrypoint** (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 # --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\":\"Location/a\",\"to\":\"Location/b\"}'\nwh assertion create --shape Supports --name route-support --about Arc/route --data '{\"confidence\":0.8}' --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";
63000
63041
 
63001
63042
  // ../../packages/warmhub-cli/src/domains/prime.ts
63002
63043
  function buildMarkdown(config2) {
@@ -66149,16 +66190,19 @@ var handleRevise3 = async (ctx, { flags, args }) => {
66149
66190
  if (!shapeName) {
66150
66191
  usageError("Usage: wh shape revise <name> (--fields '<json>' | --file <path>)", `wh shape revise Location --fields '{"x":"number","y":"number","z":"number"}'`, "wh shape revise Location --file fields.json", `wh shape revise Review --fields '{"score":"number","reason?":"string","tags":["string"]}'`);
66151
66192
  }
66152
- const newFields = await readJsonObjectInput({
66193
+ if (flags.compose !== undefined && flags["clear-composition"]) {
66194
+ usageError("--compose and --clear-composition cannot be used together", "wh shape revise Location --fields '{}' --clear-composition");
66195
+ }
66196
+ const hasFieldInput = flags.fields !== undefined || flags.file !== undefined;
66197
+ if (!hasFieldInput && flags.description === undefined && flags.compose === undefined && !flags["clear-composition"]) {
66198
+ usageError("Usage: wh shape revise <name> (--fields '<json>' | --file <path> | --description <text> | --compose <shape> | --clear-composition)", 'wh shape revise Location --description "Updated description"');
66199
+ }
66200
+ const suppliedFields = hasFieldInput ? await readJsonObjectInput({
66153
66201
  inline: flags.fields,
66154
66202
  file: flags.file,
66155
66203
  inlineFlag: "--fields",
66156
- missingMessage: "Usage: wh shape revise <name> (--fields '<json>' | --file <path>)",
66157
66204
  example: "wh shape revise Location --file fields.json"
66158
- });
66159
- if (flags.compose !== undefined && flags["clear-composition"]) {
66160
- usageError("--compose and --clear-composition cannot be used together", "wh shape revise Location --fields '{}' --clear-composition");
66161
- }
66205
+ }) : undefined;
66162
66206
  const { org, repo: repo2 } = parseOrgRepo(getRepoRef(ctx), ctx.config);
66163
66207
  const c = ctx.colors;
66164
66208
  const previousShape = flags["show-diff"] ? await ctx.client.shape.get(org, repo2, shapeName) : undefined;
@@ -66175,18 +66219,18 @@ var handleRevise3 = async (ctx, { flags, args }) => {
66175
66219
  await assertCompositeShapesEnabled(ctx, "--compose");
66176
66220
  opts.composes = flags.compose;
66177
66221
  }
66178
- const response = await ctx.client.shape.revise(org, repo2, shapeName, newFields, opts);
66222
+ const response = await ctx.client.shape.revise(org, repo2, shapeName, suppliedFields, opts);
66179
66223
  const result = shapeChangeFromReceipt(response.receipt);
66180
66224
  let diff;
66181
- if (previousFields) {
66225
+ if (flags["show-diff"] && previousFields) {
66182
66226
  let committedBaseFields = previousFields;
66183
66227
  if (result.operation === "noop") {
66184
- committedBaseFields = newFields;
66228
+ committedBaseFields = suppliedFields ?? previousFields;
66185
66229
  } else if (previousVersion !== result.version - 1) {
66186
66230
  const committedBase = await ctx.client.thing.get(org, repo2, shapeName, result.version - 1);
66187
66231
  committedBaseFields = fieldsFromShapeData(committedBase.data);
66188
66232
  }
66189
- diff = diffShapeFields(committedBaseFields, newFields);
66233
+ diff = diffShapeFields(committedBaseFields, suppliedFields ?? previousFields);
66190
66234
  }
66191
66235
  writeOutput(ctx, diff ? { ...response, diff } : response, () => {
66192
66236
  if (result.operation === "noop") {
@@ -69804,7 +69848,7 @@ function resolveLogLevel(flagLevel, env) {
69804
69848
  // package.json
69805
69849
  var package_default3 = {
69806
69850
  name: "@warmhub/cli",
69807
- version: "0.130.0",
69851
+ version: "0.131.0",
69808
69852
  private: false,
69809
69853
  type: "module",
69810
69854
  description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -70429,5 +70473,5 @@ process.exitCode = interceptedExitCode === undefined ? await runPreparedCli(laun
70429
70473
  version: package_default3.version
70430
70474
  }) : interceptedExitCode;
70431
70475
 
70432
- //# debugId=D8BF4B8F5DC5CB1364756E2164756E21
70433
- //# warmhub-cli-build-info {"cliVersion":"0.130.0","sdkVersion":"0.128.0"}
70476
+ //# debugId=D045842965BC157364756E2164756E21
70477
+ //# warmhub-cli-build-info {"cliVersion":"0.131.0","sdkVersion":"0.129.0"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/cli",
3
- "version": "0.130.0",
3
+ "version": "0.131.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.",