@warmhub/cli 0.143.0 → 0.145.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 (3) hide show
  1. package/README.md +15 -10
  2. package/dist/wh.js +72 -66
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -22,7 +22,7 @@ wh --version
22
22
 
23
23
  ## First run
24
24
 
25
- Sample output captured on the pre-flip build; refreshed after the post-flip release.
25
+ Sample output captured on production (v0.155.0), 2026-10-02.
26
26
 
27
27
  ```bash
28
28
  $ wh auth login
@@ -30,20 +30,25 @@ Opening browser to authenticate...
30
30
  ✓ Logged in as alice@example.com
31
31
 
32
32
  $ wh thing search "Josh Gottheimer" --repo warmhub-data/us.congress --limit 3
33
- Legislator/g000583@v2 thing
33
+ g000583@v2 thing
34
+ declares: Legislator@v2
34
35
  {"gender":"M","full_name":"Josh Gottheimer","in_office":true,"last_name":"Got...
35
- CommitteeAssignment/g000583--hsba10@v1 assertion
36
- {"rank":"2","role":"member","party":"minority","bioguide_id":"G000583",...
37
- CommitteeAssignment/g000583--hsba16@v1 assertion
38
- {"rank":"5","role":"member","party":"minority","bioguide_id":"G000583",...
36
+ h001090@v2 thing
37
+ declares: Legislator@v2
38
+ {"gender":"M","full_name":"Josh Harder","in_office":true,"last_name":"Harder"...
39
+ b001317@v3 thing
40
+ declares: Legislator@v2
41
+ {"gender":"M","full_name":"Josh Brecheen","in_office":true,"last_name":"Brech...
39
42
  3 result(s)
40
43
 
41
44
  $ wh thing about 20034954/bd598743649e738e-2 \
42
45
  --repo warmhub-data/us.congress.trades --resolve-collections --limit 5
43
- Assertions about CongressTrade/20034954/bd598743649e738e-2 (1)
44
- CongressTradeSecurity/20034954/bd598743649e738e-2--0000858877@v1
45
- about: Arc/congress-trade-20034954-bd598743649e738e-2-security-listing-0000858877@v1
46
- {"cik10":"0000858877","ticker_raw":"CSCO","trade_date":"2026-06-12",...
46
+ Assertions about 20034954/bd598743649e738e-2 (1)
47
+ 20034954/bd598743649e738e-2--0000858877@v1
48
+ declares: CongressTradeSecurity@v1
49
+ about: wh:warmhub-data/us.congress.trades/congress-trade-20034954-bd598743649e738e-2-security-listing-0000858877@v1 (040SXA5RYM7Q4QXAGM8N6MXYVH5G37TJZWVKEZ7MHK5HJCB96YB6QJZVHHR0@v1)
50
+ roles: first
51
+ {"cik10":"0000858877","ticker_raw":"CSCO","trade_date":"2026-06-12","filing_d...
47
52
  ```
48
53
 
49
54
  ## Reference
package/dist/wh.js CHANGED
@@ -25989,6 +25989,7 @@ var SYSTEM_MANIFEST = {
25989
25989
  teardown: {},
25990
25990
  runtimeAccess: { reads: [], writes: [] }
25991
25991
  };
25992
+ var SYSTEM_SHAPE_NAMES = new Set(SYSTEM_MANIFEST.shapes.map((shape) => shape.name));
25992
25993
  var SYSTEM_COMPONENT = {
25993
25994
  componentId: SYSTEM_COMPONENT_ID,
25994
25995
  name: SYSTEM_MANIFEST.component.name,
@@ -26004,8 +26005,9 @@ var SYSTEM_COMPONENTS = [
26004
26005
  var SYSTEM_PROTECTED_SHAPES = SYSTEM_COMPONENT.shapes.filter((shape) => shape.installInfra !== true);
26005
26006
  var SYSTEM_PROTECTED_FAMILY_SHAPES = SYSTEM_PROTECTED_SHAPES.filter((shape) => shape.onDemand !== true);
26006
26007
  var SYSTEM_INFRA_SHAPE_NAMES = new Set(SYSTEM_COMPONENTS.flatMap((entry) => entry.shapes.filter((shape) => shape.installInfra === true).map((shape) => shape.name)));
26007
- function findSystemComponent(componentId) {
26008
- return SYSTEM_COMPONENTS.find((entry) => entry.componentId === componentId);
26008
+ var SYSTEM_SHAPE_NAMES2 = new Set(SYSTEM_MANIFEST.shapes.map((shape) => shape.name));
26009
+ function isSystemShapeName(name) {
26010
+ return SYSTEM_SHAPE_NAMES2.has(name);
26009
26011
  }
26010
26012
 
26011
26013
  // ../../packages/rules/src/component-manifest-validate-json.ts
@@ -26839,7 +26841,10 @@ function builtinShapeGuard(op, operationIndex) {
26839
26841
  const errors = [];
26840
26842
  const name = addressesShape(op) && op.name ? bareShapeName(op.name) : undefined;
26841
26843
  const isShapeRename = op.operation === "rename" && addressesShape(op);
26842
- const newName = isShapeRename && op.newName ? bareShapeName(op.newName) : undefined;
26844
+ const isShapeRestore = op.operation === "restore" && op.newName !== undefined && isShapeThingName(op.newName);
26845
+ const movesShape = isShapeRename || isShapeRestore;
26846
+ const newName = movesShape && op.newName ? bareShapeName(op.newName) : undefined;
26847
+ const action = op.operation === "add" ? "created" : op.operation === "rename" ? "renamed" : op.operation === "restore" ? "restored" : "revised";
26843
26848
  const reservedSourcePassThrough = isShapeRename && name !== undefined && isRenameableSquattedShape(name) && newName !== undefined && !isReservedCollectionShape(newName) && !isBuiltinShape(newName);
26844
26849
  if (name && isRetiredCollectionShape(name) && !reservedSourcePassThrough) {
26845
26850
  errors.push({
@@ -26856,8 +26861,7 @@ function builtinShapeGuard(op, operationIndex) {
26856
26861
  });
26857
26862
  } else {
26858
26863
  const builtinShapeName = name && (isBuiltinShape(name) || isCollectionV2Shape(name)) && !reservedSourcePassThrough ? name : newName && (isBuiltinShape(newName) || isCollectionV2Shape(newName)) ? newName : undefined;
26859
- if (builtinShapeName && (isShapeRename || op.operation === "add" || op.operation === "revise")) {
26860
- const action = op.operation === "add" ? "created" : op.operation === "rename" ? "renamed" : "revised";
26864
+ if (builtinShapeName && (movesShape || op.operation === "add" || op.operation === "revise")) {
26861
26865
  errors.push({
26862
26866
  code: "RESERVED_NAME",
26863
26867
  operationIndex,
@@ -26865,6 +26869,14 @@ function builtinShapeGuard(op, operationIndex) {
26865
26869
  });
26866
26870
  }
26867
26871
  }
26872
+ const systemShapeName = op.operation === "add" ? name : movesShape ? newName : undefined;
26873
+ if (systemShapeName && isSystemShapeName(systemShapeName) && !isBuiltinShape(systemShapeName) && !isCollectionV2Shape(systemShapeName)) {
26874
+ errors.push({
26875
+ code: "RESERVED_NAME",
26876
+ operationIndex,
26877
+ message: `Shape "${systemShapeName}" is a system shape and cannot be ${action} manually`
26878
+ });
26879
+ }
26868
26880
  const retiredV2 = v2Write(op)?.shapes.find(isRetiredCollectionShape);
26869
26881
  if (op.operation === "add" && retiredV2 !== undefined) {
26870
26882
  errors.push({
@@ -42697,8 +42709,9 @@ function compileShapesValidator(shapes) {
42697
42709
  }
42698
42710
  }
42699
42711
  const unionFieldSpecs = shapes.map((shape) => shape.fields);
42700
- return (data) => {
42701
- if (typeof data !== "object" || data === null || Array.isArray(data)) {
42712
+ return (input) => {
42713
+ const data = input === null ? {} : input;
42714
+ if (typeof data !== "object" || Array.isArray(data)) {
42702
42715
  return { valid: false, errors: ["Data must be a plain object"] };
42703
42716
  }
42704
42717
  const record2 = data;
@@ -44539,6 +44552,9 @@ function createSubmissionShapesResolver(read) {
44539
44552
  });
44540
44553
  };
44541
44554
  }
44555
+ function resolverFor(checks3, read) {
44556
+ return checks3 === "passThrough" ? async (operations) => operations : createSubmissionShapesResolver(read);
44557
+ }
44542
44558
  function namesWritten(op) {
44543
44559
  if (op.operation === "rename")
44544
44560
  return [op.name, op.newName];
@@ -44920,7 +44936,7 @@ async function submitOperationsViaStream(client, args) {
44920
44936
  let acknowledgedOperationCount = 0;
44921
44937
  let lastAcknowledgedRepoSeq;
44922
44938
  let chunkOrdinal = 0;
44923
- const resolve = createSubmissionShapesResolver(async (wrefs) => {
44939
+ const resolve = resolverFor(checks3, async (wrefs) => {
44924
44940
  if (!client.thing) {
44925
44941
  throw new StreamValidationError("A keepShapes revise needs the client to read its Thing: this stream client has no thing.getMany");
44926
44942
  }
@@ -45021,7 +45037,7 @@ async function* normalizedChunks(source, chunkSize, skipExisting, resolve, check
45021
45037
  const checked = whole.map((operation, index) => normalizeStreamOperation(operation, index, skipExisting, checks3));
45022
45038
  if (!passThrough)
45023
45039
  checkOperationSequence(checked);
45024
- const operations = passThrough ? checked : await resolve(checked);
45040
+ const operations = await resolve(checked);
45025
45041
  for (let start = 0;start < operations.length; start += chunkSize) {
45026
45042
  yield { operations: operations.slice(start, start + chunkSize), start };
45027
45043
  }
@@ -45211,10 +45227,10 @@ async function resolveValidateOperations(resolve, operations) {
45211
45227
  async function sendCommitValidate(procedure, read, orgName, repoName, operations, opts, sender) {
45212
45228
  const checks3 = operationChecksFor(sender, operations);
45213
45229
  const checked = normalizeCommitValidationOperations(operations, opts?.skipExisting, checks3);
45214
- const resolve = createSubmissionShapesResolver(read);
45230
+ const resolve = resolverFor(checks3, read);
45215
45231
  const input = {
45216
45232
  ...createCommitValidateInput(orgName, repoName, [], opts, checks3),
45217
- operations: checks3 === "passThrough" ? checked : await resolveValidateOperations(resolve, checked)
45233
+ operations: await resolveValidateOperations(resolve, checked)
45218
45234
  };
45219
45235
  const encodedBytes = commitValidateRequestBodyBytes(input);
45220
45236
  if (encodedBytes > MAX_COMMIT_VALIDATION_ENCODED_BYTES) {
@@ -46652,7 +46668,7 @@ function submissionPath(identity2) {
46652
46668
  }
46653
46669
  function createRequestBody(source, groupSize, readThings, checks3) {
46654
46670
  const iterator = createNormalizedOperationIterator(source, false, checks3);
46655
- const resolve = checks3 === "passThrough" ? async (operations) => operations : createSubmissionShapesResolver(readThings);
46671
+ const resolve = resolverFor(checks3, readThings);
46656
46672
  let position = 0;
46657
46673
  let closed = false;
46658
46674
  const observeSourceReturn = async (returned) => {
@@ -46815,7 +46831,7 @@ function createStreamingSubmissionHandle(input, deps) {
46815
46831
  // ../../packages/sdk-ts/package.json
46816
46832
  var package_default = {
46817
46833
  name: "@warmhub/sdk-ts",
46818
- version: "0.141.0",
46834
+ version: "0.143.0",
46819
46835
  private: false,
46820
46836
  type: "module",
46821
46837
  description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -53792,6 +53808,9 @@ var flag = {
53792
53808
  ...def
53793
53809
  })
53794
53810
  };
53811
+ var committerFlag = flag.string({
53812
+ description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
53813
+ });
53795
53814
  function defineDomain(def) {
53796
53815
  return def;
53797
53816
  }
@@ -54111,11 +54130,16 @@ function decorateJsonlRows(items, decorations) {
54111
54130
  });
54112
54131
  }
54113
54132
  function emitPartialPageHint(ctx, count, _nextCursor, _limit) {
54114
- if (ctx.format === "json" || ctx.format === "jsonl")
54133
+ if (ctx.format === "json")
54115
54134
  return;
54116
54135
  const c = ctx.colors;
54117
54136
  ctx.status(`${c.yellow}${count} shown; more available${c.reset}. Use ${c.cyan}--all${c.reset} to fetch every page.`);
54118
54137
  }
54138
+ function emitNoMatchHint(ctx, match, count) {
54139
+ if (!match || count > 0 || ctx.format === "json")
54140
+ return;
54141
+ ctx.status(`${ctx.colors.yellow}No results match "${match}"${ctx.colors.reset}. --match globs the Thing name, not its Shape; use ${ctx.colors.cyan}--shape <Shape>${ctx.colors.reset} to filter by Shape.`);
54142
+ }
54119
54143
 
54120
54144
  // ../../packages/warmhub-cli/src/domains/commit-output-contract-id.ts
54121
54145
  var COMMIT_SUBMIT_OUTPUT_SCHEMA_ID = "wh.commit.submit.result/v0.11";
@@ -54590,9 +54614,7 @@ var createFlags = {
54590
54614
  description: "Pinned target version the claim is affirmed for (repeatable): name@vN"
54591
54615
  }),
54592
54616
  message: flag.string({ short: "m", description: "Commit message" }),
54593
- committer: flag.string({
54594
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
54595
- })
54617
+ committer: committerFlag
54596
54618
  };
54597
54619
  var reviseFlags = {
54598
54620
  shape: shapeChoiceFlags.shape,
@@ -54603,9 +54625,7 @@ var reviseFlags = {
54603
54625
  description: "Complete affirmation set for the changed claim (repeatable); omitted clears it"
54604
54626
  }),
54605
54627
  message: flag.string({ short: "m", description: "Commit message" }),
54606
- committer: flag.string({
54607
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
54608
- })
54628
+ committer: committerFlag
54609
54629
  };
54610
54630
  var reaffirmFlags = {
54611
54631
  add: flag.string({
@@ -54620,9 +54640,7 @@ var reaffirmFlags = {
54620
54640
  description: "only reaffirm if the assertion is still at this version (optimistic concurrency)"
54621
54641
  }),
54622
54642
  message: flag.string({ short: "m", description: "Commit message" }),
54623
- committer: flag.string({
54624
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
54625
- })
54643
+ committer: committerFlag
54626
54644
  };
54627
54645
  var retractFlags = {
54628
54646
  reason: flag.string({ description: "Reason for retraction (<=500 chars)" }),
@@ -54630,9 +54648,7 @@ var retractFlags = {
54630
54648
  description: "only retract if the target is still at this version (optimistic concurrency)"
54631
54649
  }),
54632
54650
  message: flag.string({ short: "m", description: "Commit message" }),
54633
- committer: flag.string({
54634
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
54635
- })
54651
+ committer: committerFlag
54636
54652
  };
54637
54653
  var handleRevise = async (ctx, { flags, args }) => {
54638
54654
  const name = args[0];
@@ -55041,9 +55057,7 @@ var createFlags2 = {
55041
55057
  description: "read thing data from a JSON object file (portable alternative to inline --data)"
55042
55058
  }),
55043
55059
  message: flag.string({ short: "m", description: "Commit message" }),
55044
- committer: flag.string({
55045
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
55046
- })
55060
+ committer: committerFlag
55047
55061
  };
55048
55062
  var handleCreate2 = async (ctx, { flags, args }) => {
55049
55063
  const name = args[0];
@@ -55823,6 +55837,7 @@ var handleHead = async (ctx, { flags, args }) => {
55823
55837
  if (!all && result.nextCursor) {
55824
55838
  emitPartialPageHint(ctx, (result.items ?? []).length, result.nextCursor, boundedLimit);
55825
55839
  }
55840
+ emitNoMatchHint(ctx, match, (result.items ?? []).length);
55826
55841
  writePageOutput(ctx, result.items ?? [], {
55827
55842
  limit: all ? pageLimit : boundedLimit,
55828
55843
  nextCursor: result.nextCursor ?? null,
@@ -56061,6 +56076,7 @@ var handleQuery = async (ctx, { flags }) => {
56061
56076
  if (!all && result.nextCursor) {
56062
56077
  emitPartialPageHint(ctx, (result.items ?? []).length, result.nextCursor, boundedLimit);
56063
56078
  }
56079
+ emitNoMatchHint(ctx, match, (result.items ?? []).length);
56064
56080
  writePageOutput(ctx, result.items ?? [], {
56065
56081
  limit: all ? pageLimit : boundedLimit,
56066
56082
  nextCursor: result.nextCursor ?? null,
@@ -56342,9 +56358,7 @@ var restoreFlags = {
56342
56358
  description: "only restore if the target is still at this version (optimistic concurrency)"
56343
56359
  }),
56344
56360
  message: flag.string({ short: "m", description: "Commit message" }),
56345
- committer: flag.string({
56346
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
56347
- }),
56361
+ committer: committerFlag,
56348
56362
  "lease-id": flag.string({
56349
56363
  description: "Read-lease token from `wh thing lease` (auto-released on success)"
56350
56364
  })
@@ -56383,9 +56397,7 @@ var retractFlags2 = {
56383
56397
  description: "only retract if the target is still at this version (optimistic concurrency)"
56384
56398
  }),
56385
56399
  message: flag.string({ short: "m", description: "Commit message" }),
56386
- committer: flag.string({
56387
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
56388
- }),
56400
+ committer: committerFlag,
56389
56401
  "lease-id": flag.string({
56390
56402
  description: "Read-lease token from `wh thing lease` (auto-released on success)"
56391
56403
  })
@@ -56424,9 +56436,7 @@ var reviseFlags2 = {
56424
56436
  ...keepShapesFlag,
56425
56437
  data: flag.string({ description: "Data payload (JSON)" }),
56426
56438
  message: flag.string({ short: "m", description: "Commit message" }),
56427
- committer: flag.string({
56428
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
56429
- }),
56439
+ committer: committerFlag,
56430
56440
  "expected-version": flag.number({
56431
56441
  description: "Only apply if the target is still at this version (optimistic concurrency)"
56432
56442
  }),
@@ -57453,6 +57463,7 @@ var handleList = async (ctx, { flags, args }) => {
57453
57463
  if (!all && result2.nextCursor) {
57454
57464
  emitPartialPageHint(ctx, (result2.items ?? []).length, result2.nextCursor, boundedLimit);
57455
57465
  }
57466
+ emitNoMatchHint(ctx, match, (result2.items ?? []).length);
57456
57467
  writePageOutput(ctx, result2.items ?? [], {
57457
57468
  limit: all ? pageLimit : boundedLimit,
57458
57469
  nextCursor: result2.nextCursor ?? null,
@@ -57700,6 +57711,9 @@ Run \`wh auth login --profile ${explicitProfile}\` to create it.`);
57700
57711
  }
57701
57712
 
57702
57713
  // ../../packages/warmhub-cli/src/scope-parse.ts
57714
+ function fail(message, hint) {
57715
+ throw new CliError(2 /* UserInput */, "USER_INPUT", message, undefined, hint);
57716
+ }
57703
57717
  var ENTRY_KEYS = new Set(["resource", "permissions", "grants"]);
57704
57718
  var PAIR_KEYS = new Set(["allowedMatches", "allowedShapes"]);
57705
57719
  var SHAPE_LIST_KEYS = ["shapes", "shapesAll", "shapesNot"];
@@ -57718,54 +57732,54 @@ function parseScopeEntriesJson(json2, opts) {
57718
57732
  try {
57719
57733
  parsed = JSON.parse(json2);
57720
57734
  } catch {
57721
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} must be valid JSON`, undefined, inputHint);
57735
+ fail(`${flagLabel} must be valid JSON`, inputHint);
57722
57736
  }
57723
57737
  if (!Array.isArray(parsed) || parsed.length === 0) {
57724
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} must be a non-empty JSON array`, undefined, inputHint);
57738
+ fail(`${flagLabel} must be a non-empty JSON array`, inputHint);
57725
57739
  }
57726
57740
  return parsed.map((entry, i) => {
57727
57741
  if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
57728
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} entry ${i + 1}: must be an object`, undefined, inputHint);
57742
+ fail(`${flagLabel} entry ${i + 1}: must be an object`, inputHint);
57729
57743
  }
57730
57744
  const obj = entry;
57731
57745
  if ("allowedMatches" in obj || "allowedShapes" in obj) {
57732
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} entry ${i + 1}: allowedMatches and allowedShapes are no longer scope-entry fields; use grants: [{"allowedMatches": [...], "allowedShapes": {...}}]`, undefined, grantsHint(flagLabel));
57746
+ fail(`${flagLabel} entry ${i + 1}: allowedMatches and allowedShapes are no longer scope-entry fields; use grants: [{"allowedMatches": [...], "allowedShapes": {...}}]`, grantsHint(flagLabel));
57733
57747
  }
57734
57748
  const unknownKey = Object.keys(obj).find((key) => !ENTRY_KEYS.has(key));
57735
57749
  if (unknownKey !== undefined) {
57736
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} entry ${i + 1}: unknown key "${unknownKey}"`, undefined, `Entry keys are resource, permissions, grants. Example: ${exampleCommand(flagLabel)}`);
57750
+ fail(`${flagLabel} entry ${i + 1}: unknown key "${unknownKey}"`, `Entry keys are resource, permissions, grants. Example: ${exampleCommand(flagLabel)}`);
57737
57751
  }
57738
57752
  if (!Array.isArray(obj.permissions) || obj.permissions.length === 0 || obj.permissions.some((p) => typeof p !== "string" || p.trim().length === 0)) {
57739
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} entry ${i + 1}: "permissions" must be a non-empty array of non-empty strings`, undefined, inputHint);
57753
+ fail(`${flagLabel} entry ${i + 1}: "permissions" must be a non-empty array of non-empty strings`, inputHint);
57740
57754
  }
57741
57755
  if (obj.resource !== undefined && typeof obj.resource !== "string") {
57742
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} entry ${i + 1}: "resource" must be a string`, undefined, inputHint);
57756
+ fail(`${flagLabel} entry ${i + 1}: "resource" must be a string`, inputHint);
57743
57757
  }
57744
57758
  let grants;
57745
57759
  if (obj.grants !== undefined) {
57746
57760
  if (!Array.isArray(obj.grants) || obj.grants.length === 0) {
57747
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} entry ${i + 1}: "grants" must be a non-empty array of pairs`, undefined, grantsHint(flagLabel));
57761
+ fail(`${flagLabel} entry ${i + 1}: "grants" must be a non-empty array of pairs`, grantsHint(flagLabel));
57748
57762
  }
57749
57763
  grants = obj.grants.map((pair, pairIndex) => {
57750
57764
  const label = `${flagLabel} entry ${i + 1} grants pair ${pairIndex + 1}`;
57751
57765
  if (typeof pair !== "object" || pair === null || Array.isArray(pair)) {
57752
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${label}: must be an object`, undefined, grantsHint(flagLabel));
57766
+ fail(`${label}: must be an object`, grantsHint(flagLabel));
57753
57767
  }
57754
57768
  const fields = pair;
57755
57769
  const unknown2 = Object.keys(fields).find((key) => !PAIR_KEYS.has(key));
57756
57770
  if (unknown2 !== undefined) {
57757
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${label}: unknown key "${unknown2}"`, undefined, grantsHint(flagLabel));
57771
+ fail(`${label}: unknown key "${unknown2}"`, grantsHint(flagLabel));
57758
57772
  }
57759
57773
  let allowedMatches;
57760
57774
  if (fields.allowedMatches !== undefined) {
57761
57775
  if (!Array.isArray(fields.allowedMatches) || fields.allowedMatches.length === 0 || fields.allowedMatches.some((m) => typeof m !== "string" || m.trim().length === 0)) {
57762
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${label}: "allowedMatches" must be a non-empty array of non-empty strings`, undefined, grantsHint(flagLabel));
57776
+ fail(`${label}: "allowedMatches" must be a non-empty array of non-empty strings`, grantsHint(flagLabel));
57763
57777
  }
57764
57778
  allowedMatches = fields.allowedMatches.map((m) => m.trim());
57765
57779
  }
57766
57780
  const allowedShapes = fields.allowedShapes === undefined ? undefined : parseAllowedShapes(fields.allowedShapes, flagLabel, label);
57767
57781
  if (allowedMatches === undefined && (allowedShapes === undefined || Object.values(allowedShapes).every((v) => v === undefined))) {
57768
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${label}: pair must restrict allowedMatches or allowedShapes`, undefined, grantsHint(flagLabel));
57782
+ fail(`${label}: pair must restrict allowedMatches or allowedShapes`, grantsHint(flagLabel));
57769
57783
  }
57770
57784
  return {
57771
57785
  ...allowedMatches && { allowedMatches },
@@ -57774,7 +57788,7 @@ function parseScopeEntriesJson(json2, opts) {
57774
57788
  });
57775
57789
  }
57776
57790
  if (grants !== undefined && (typeof obj.resource !== "string" || !obj.resource.includes("/"))) {
57777
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${flagLabel} entry ${i + 1}: grants would restrict nothing on ${typeof obj.resource === "string" ? `the org entry "${obj.resource}"` : "an entry without a resource"}; name and Shape restrictions apply only to a repository entry`, undefined, `Name the repository. Example: ${exampleCommand(flagLabel)}`);
57791
+ fail(`${flagLabel} entry ${i + 1}: grants would restrict nothing on ${typeof obj.resource === "string" ? `the org entry "${obj.resource}"` : "an entry without a resource"}; name and Shape restrictions apply only to a repository entry`, `Name the repository. Example: ${exampleCommand(flagLabel)}`);
57778
57792
  }
57779
57793
  const result = {
57780
57794
  permissions: obj.permissions.map((p) => p.trim())
@@ -57788,7 +57802,7 @@ function parseScopeEntriesJson(json2, opts) {
57788
57802
  }
57789
57803
  function parseAllowedShapes(value, flagLabel, label) {
57790
57804
  const refuse = (message) => {
57791
- throw new CliError(2 /* UserInput */, "USER_INPUT", `${label}: "allowedShapes" ${message}`, undefined, `Keys are shapes, shapesAll, shapesNot (1-${MAX_ALLOWED_SHAPES_PER_LIST} Shape names each) and shapeless (boolean). Example: ${exampleCommand(flagLabel)}`);
57805
+ fail(`${label}: "allowedShapes" ${message}`, `Keys are shapes, shapesAll, shapesNot (1-${MAX_ALLOWED_SHAPES_PER_LIST} Shape names each) and shapeless (boolean). Example: ${exampleCommand(flagLabel)}`);
57792
57806
  };
57793
57807
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
57794
57808
  refuse("must be an object");
@@ -58916,9 +58930,7 @@ var CANONICAL_COLLECTION_TYPE_USAGE = "<arc|bond|pair|set|list>";
58916
58930
  var commonWriteFlags = {
58917
58931
  "event-request-id": operationEventRequestIdFlag,
58918
58932
  message: flag.string({ short: "m", description: "Commit message" }),
58919
- committer: flag.string({
58920
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
58921
- })
58933
+ committer: committerFlag
58922
58934
  };
58923
58935
  var collectionInputFlags = {
58924
58936
  members: flag.string({
@@ -59612,9 +59624,7 @@ var createFlags3 = {
59612
59624
  }),
59613
59625
  "submission-id": operationEventSubmissionIdFlag,
59614
59626
  message: flag.string({ short: "m", description: "Commit message" }),
59615
- committer: flag.string({
59616
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
59617
- }),
59627
+ committer: committerFlag,
59618
59628
  "component-ref": flag.string({
59619
59629
  description: "attribute writes to an actively installed component (Org/Name); the server checks caller authorization."
59620
59630
  }),
@@ -68584,9 +68594,7 @@ var retractFlags3 = {
68584
68594
  description: "only retract if the target is still at this version (optimistic concurrency)"
68585
68595
  }),
68586
68596
  message: flag.string({ short: "m", description: "Commit message" }),
68587
- committer: flag.string({
68588
- description: "Committer wref: a Thing name (bot-1) or a Shape (hub/shapes/Agent)"
68589
- })
68597
+ committer: committerFlag
68590
68598
  };
68591
68599
  var handleCreate7 = async (ctx, { flags, args }) => {
68592
68600
  const shapeName = args[0];
@@ -70833,8 +70841,6 @@ async function dispatch(ctx) {
70833
70841
  }
70834
70842
  await dispatchDomain(ctx, invocation);
70835
70843
  }
70836
- // ../../packages/warmhub-cli/src/manifest/shared-infra.ts
70837
- var SHARED_INFRA_SHAPES = findSystemComponent(SYSTEM_COMPONENT_ID)?.shapes.filter((shape) => shape.installInfra === true) ?? [];
70838
70844
  // ../../packages/warmhub-cli/src/parser/binder.ts
70839
70845
  function effectiveSpecs(specs, options) {
70840
70846
  return specs.map((spec) => {
@@ -72240,7 +72246,7 @@ function resolveLogLevel(flagLevel, env) {
72240
72246
  // package.json
72241
72247
  var package_default3 = {
72242
72248
  name: "@warmhub/cli",
72243
- version: "0.143.0",
72249
+ version: "0.145.0",
72244
72250
  private: false,
72245
72251
  type: "module",
72246
72252
  description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -72865,5 +72871,5 @@ process.exitCode = interceptedExitCode === undefined ? await runPreparedCli(laun
72865
72871
  version: package_default3.version
72866
72872
  }) : interceptedExitCode;
72867
72873
 
72868
- //# debugId=AB8AF986DB24000D64756E2164756E21
72869
- //# warmhub-cli-build-info {"cliVersion":"0.143.0","sdkVersion":"0.141.0"}
72874
+ //# debugId=F265A15255A53BDA64756E2164756E21
72875
+ //# warmhub-cli-build-info {"cliVersion":"0.145.0","sdkVersion":"0.143.0"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/cli",
3
- "version": "0.143.0",
3
+ "version": "0.145.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.",