@warmhub/cli 0.92.0 → 0.93.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 +42 -26
  2. package/package.json +1 -1
package/dist/wh.js CHANGED
@@ -43489,7 +43489,7 @@ function normalizeChunkSize(chunkSize) {
43489
43489
  // ../../packages/sdk-ts/package.json
43490
43490
  var package_default = {
43491
43491
  name: "@warmhub/sdk-ts",
43492
- version: "0.90.0",
43492
+ version: "0.91.0",
43493
43493
  private: false,
43494
43494
  type: "module",
43495
43495
  description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -45676,6 +45676,7 @@ class WarmHubClient {
45676
45676
  query,
45677
45677
  shape: opts?.shape,
45678
45678
  about: opts?.about,
45679
+ affirmedAbout: opts?.affirmedAbout,
45679
45680
  kind: narrowKind(opts?.kind),
45680
45681
  match: opts?.match,
45681
45682
  includeRetracted: opts?.includeRetracted,
@@ -50241,6 +50242,18 @@ function emitPartialPageHint(ctx, count, _nextCursor, _limit) {
50241
50242
  ctx.status(`${c.yellow}${count} shown; more available${c.reset}. Use ${c.cyan}--all${c.reset} to fetch every page.`);
50242
50243
  }
50243
50244
 
50245
+ // ../../packages/warmhub-cli/src/domains/commit-output-contract-id.ts
50246
+ var COMMIT_SUBMIT_OUTPUT_SCHEMA_ID = "wh.commit.submit.result/v0.1";
50247
+ function identifyCommitSubmitOutput(value) {
50248
+ if ("schema" in value) {
50249
+ if (value.schema === COMMIT_SUBMIT_OUTPUT_SCHEMA_ID) {
50250
+ return value;
50251
+ }
50252
+ throw new Error("Commit submit output already defines a schema field");
50253
+ }
50254
+ return { schema: COMMIT_SUBMIT_OUTPUT_SCHEMA_ID, ...value };
50255
+ }
50256
+
50244
50257
  // ../../packages/warmhub-cli/src/domains/assertion/shared.ts
50245
50258
  var COLLECTION_TAGS = ["arc", "bond", "pair", "set", "list"];
50246
50259
  function parseAbout(raw) {
@@ -50414,7 +50427,7 @@ var handleRevise = async (ctx, { flags, args }) => {
50414
50427
  if (data === undefined) {
50415
50428
  usageError("--data is required for revise", `wh assertion revise Belief/cave-safe --data '{"confidence":0.9}'`);
50416
50429
  }
50417
- const commitResult = await ctx.client.commit.apply(org, repo, flags.message ?? `revise ${name}`, [
50430
+ const commitResult = identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo, flags.message ?? `revise ${name}`, [
50418
50431
  {
50419
50432
  operation: "revise",
50420
50433
  kind: "assertion",
@@ -50422,7 +50435,7 @@ var handleRevise = async (ctx, { flags, args }) => {
50422
50435
  data,
50423
50436
  ...flags.affirm && flags.affirm.length > 0 ? { affirmedTargets: flags.affirm } : {}
50424
50437
  }
50425
- ], { committer: flags.committer });
50438
+ ], { committer: flags.committer }));
50426
50439
  const result = requireSingleOpSuccess(commitResult);
50427
50440
  writeOutput(ctx, commitResult, () => renderSingleOpSuccess(ctx.out, c, ctx.chars, result, {
50428
50441
  marker: "~",
@@ -50437,7 +50450,7 @@ var handleRetract = async (ctx, { flags, args }) => {
50437
50450
  }
50438
50451
  const { org, repo } = parseOrgRepo(getRepoRef(ctx), ctx.config);
50439
50452
  const expectedVersion = parsePositiveIntFlag(flags["expected-version"], "--expected-version", "wh assertion retract Belief/cave-safe --expected-version 3");
50440
- const commitResult = await ctx.client.commit.apply(org, repo, flags.message ?? `retract ${name}`, [
50453
+ const commitResult = identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo, flags.message ?? `retract ${name}`, [
50441
50454
  {
50442
50455
  operation: "retract",
50443
50456
  kind: "assertion",
@@ -50447,7 +50460,7 @@ var handleRetract = async (ctx, { flags, args }) => {
50447
50460
  }
50448
50461
  ], {
50449
50462
  committer: flags.committer
50450
- });
50463
+ }));
50451
50464
  const result = requireSingleOpSuccess(commitResult);
50452
50465
  writeOutput(ctx, commitResult, () => {
50453
50466
  renderCommitterEcho(ctx.out, ctx.colors, flags.committer);
@@ -50466,7 +50479,7 @@ var handleReaffirm = async (ctx, { flags, args }) => {
50466
50479
  usageError("Reaffirm requires at least one --add or --remove target", "wh assertion reaffirm Belief/cave-safe --add Location/cave@v3 --expected-version 2");
50467
50480
  }
50468
50481
  const { org, repo } = parseOrgRepo(getRepoRef(ctx), ctx.config);
50469
- const commitResult = await ctx.client.commit.apply(org, repo, flags.message ?? `reaffirm ${name}`, [
50482
+ const commitResult = identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo, flags.message ?? `reaffirm ${name}`, [
50470
50483
  {
50471
50484
  operation: "reaffirm",
50472
50485
  kind: "assertion",
@@ -50475,7 +50488,7 @@ var handleReaffirm = async (ctx, { flags, args }) => {
50475
50488
  ...add.length > 0 ? { add } : {},
50476
50489
  ...remove.length > 0 ? { remove } : {}
50477
50490
  }
50478
- ], { committer: flags.committer });
50491
+ ], { committer: flags.committer }));
50479
50492
  const result = requireSingleOpSuccess(commitResult);
50480
50493
  writeOutput(ctx, commitResult, () => {
50481
50494
  const c = ctx.colors;
@@ -50520,7 +50533,7 @@ var handleCreate = async (ctx, { flags, args }) => {
50520
50533
  ...affirmedTargets.length > 0 ? { affirmedTargets } : {}
50521
50534
  }
50522
50535
  ];
50523
- const commitResult = await ctx.client.commit.apply(org, repo, message ?? `assert ${shape}`, operations, { committer });
50536
+ const commitResult = identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo, message ?? `assert ${shape}`, operations, { committer }));
50524
50537
  const result = requireSingleOpSuccess(commitResult);
50525
50538
  writeOutput(ctx, commitResult, () => renderSingleOpSuccess(ctx.out, c, ctx.chars, result, {
50526
50539
  marker: "+",
@@ -50823,14 +50836,14 @@ var handleCreate2 = async (ctx, { flags, args }) => {
50823
50836
  });
50824
50837
  const name = shape ? `${shape}/${rawName}` : rawName;
50825
50838
  const c = ctx.colors;
50826
- const commitResult = await ctx.client.commit.apply(org, repo, message ?? `create ${name}`, [
50839
+ const commitResult = identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo, message ?? `create ${name}`, [
50827
50840
  {
50828
50841
  operation: "add",
50829
50842
  kind: "thing",
50830
50843
  name,
50831
50844
  data
50832
50845
  }
50833
- ], { committer });
50846
+ ], { committer }));
50834
50847
  const result = requireSingleOpSuccess(commitResult);
50835
50848
  writeOutput(ctx, commitResult, () => renderSingleOpSuccess(ctx.out, c, ctx.chars, result, {
50836
50849
  marker: "+",
@@ -51805,9 +51818,6 @@ var handleQuery = async (ctx, { flags }) => {
51805
51818
  if (ctx.liveMode && sinceRepoSeq !== undefined) {
51806
51819
  usageError("--since-repo-seq cannot be used with --live.", "wh thing query --since-repo-seq 42 --all --format json");
51807
51820
  }
51808
- if (affirmedAbout && match) {
51809
- usageError("--affirmed-about is PG-served per exact pinned version; it cannot be combined with --match.", "wh thing query --affirmed-about Location/cave@v3");
51810
- }
51811
51821
  if (count) {
51812
51822
  if (cursor || all || limit || ctx.liveMode || role) {
51813
51823
  usageError("Usage: wh thing query --count [--shape SHAPE] [--about WREF] [--kind KIND] [--match PATTERN] [--since-repo-seq N]", "wh thing query --kind assertion --about Player/alice --count --since-repo-seq 42");
@@ -52148,7 +52158,7 @@ var handleThingRetract = async (ctx, { flags, args }) => {
52148
52158
  const expectedVersion = parsePositiveIntFlag(flags["expected-version"], "--expected-version", "wh thing retract Player/alice --expected-version 3");
52149
52159
  const leaseId = requireLeaseIdFlag(flags["lease-id"], "wh thing retract Player/alice --lease-id <id>");
52150
52160
  const c = ctx.colors;
52151
- const commitResult = await ctx.client.commit.apply(org, repo, message ?? `retract ${name}`, [
52161
+ const commitResult = identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo, message ?? `retract ${name}`, [
52152
52162
  {
52153
52163
  operation: "retract",
52154
52164
  name,
@@ -52157,7 +52167,7 @@ var handleThingRetract = async (ctx, { flags, args }) => {
52157
52167
  ...expectedVersion !== undefined ? { expectedVersion } : {},
52158
52168
  ...leaseId ? { leaseId } : {}
52159
52169
  }
52160
- ], { committer });
52170
+ ], { committer }));
52161
52171
  const result = requireSingleOpSuccess(commitResult);
52162
52172
  writeOutput(ctx, commitResult, () => {
52163
52173
  renderCommitterEcho(ctx.out, c, committer);
@@ -52194,7 +52204,7 @@ var handleRevise2 = async (ctx, { flags, args }) => {
52194
52204
  if (data === undefined) {
52195
52205
  usageError("--data is required for revise", `wh thing revise Location/player --data '{"x":1}'`);
52196
52206
  }
52197
- const commitResult = await ctx.client.commit.apply(org, repo, message ?? `revise ${name}`, [
52207
+ const commitResult = identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo, message ?? `revise ${name}`, [
52198
52208
  {
52199
52209
  operation: "revise",
52200
52210
  kind: "thing",
@@ -52203,7 +52213,7 @@ var handleRevise2 = async (ctx, { flags, args }) => {
52203
52213
  ...expectedVersion !== undefined ? { expectedVersion } : {},
52204
52214
  ...leaseId ? { leaseId } : {}
52205
52215
  }
52206
- ], { committer });
52216
+ ], { committer }));
52207
52217
  const result = requireSingleOpSuccess(commitResult);
52208
52218
  writeOutput(ctx, commitResult, () => renderSingleOpSuccess(ctx.out, c, ctx.chars, result, {
52209
52219
  marker: "~",
@@ -52217,6 +52227,9 @@ var searchFlags = {
52217
52227
  shape: flag.string({ description: "Filter by shape" }),
52218
52228
  kind: flag.string({ description: "Filter by kind" }),
52219
52229
  about: flag.string({ description: "Filter by about wref" }),
52230
+ "affirmed-about": flag.string({
52231
+ description: "Only assertions whose current version affirms exactly this pinned target (Shape/name@vN)"
52232
+ }),
52220
52233
  mode: flag.string({
52221
52234
  description: "Search mode: text (default), vector, or hybrid"
52222
52235
  }),
@@ -52281,6 +52294,7 @@ var handleSearch = async (ctx, { flags, args }) => {
52281
52294
  shape: flags.shape,
52282
52295
  kind,
52283
52296
  about: flags.about,
52297
+ affirmedAbout: flags["affirmed-about"],
52284
52298
  includeRetracted: flags["include-retracted"],
52285
52299
  resolveCollections,
52286
52300
  limit: pageLimit,
@@ -52292,6 +52306,7 @@ var handleSearch = async (ctx, { flags, args }) => {
52292
52306
  shape: flags.shape,
52293
52307
  kind,
52294
52308
  about: flags.about,
52309
+ affirmedAbout: flags["affirmed-about"],
52295
52310
  includeRetracted: flags["include-retracted"],
52296
52311
  resolveCollections,
52297
52312
  limit: boundedTextLimit,
@@ -52321,6 +52336,7 @@ async function fetchAllSearchPages(ctx, org, repo, queryText, opts) {
52321
52336
  shape: opts.shape,
52322
52337
  kind: opts.kind,
52323
52338
  about: opts.about,
52339
+ affirmedAbout: opts.affirmedAbout,
52324
52340
  includeRetracted: opts.includeRetracted,
52325
52341
  resolveCollections: opts.resolveCollections,
52326
52342
  limit: opts.limit,
@@ -54874,7 +54890,7 @@ function renderOperationEventReceipt(ctx, receipt) {
54874
54890
  writeOutput(ctx, receipt, () => renderPrettyReceipt(ctx, receipt));
54875
54891
  }
54876
54892
  function renderSubmittedStreamResult(ctx, result, options) {
54877
- writeOutput(ctx, result, () => renderPrettyReceipts(ctx, result.receipts, options));
54893
+ writeOutput(ctx, identifyCommitSubmitOutput(result), () => renderPrettyReceipts(ctx, result.receipts, options));
54878
54894
  }
54879
54895
  function renderPartialStreamSubmission(ctx, error51, options) {
54880
54896
  const noop3 = error51.completedOperations.filter((operation) => operation.status === "noop").length;
@@ -54894,7 +54910,7 @@ function renderPartialStreamSubmission(ctx, error51, options) {
54894
54910
  eventRequestId: error51.eventRequestId,
54895
54911
  chunkOrdinal: error51.chunkOrdinal
54896
54912
  };
54897
- writeOutput(ctx, payload, () => renderPrettyReceipts(ctx, error51.completedReceipts, options));
54913
+ writeOutput(ctx, identifyCommitSubmitOutput(payload), () => renderPrettyReceipts(ctx, error51.completedReceipts, options));
54898
54914
  }
54899
54915
  function renderPrettyReceipts(ctx, receipts, options) {
54900
54916
  for (const [index, receipt] of receipts.entries()) {
@@ -56116,12 +56132,12 @@ var handleSubmit = async (ctx, { flags, args }) => {
56116
56132
  streamId,
56117
56133
  submissionId,
56118
56134
  allowNulBytes
56119
- }) : await ctx.client.commit.apply(org, repo, message, operations, {
56135
+ }) : identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo, message, operations, {
56120
56136
  committer,
56121
56137
  skipExisting,
56122
56138
  submissionId,
56123
56139
  ...returnRepoSeq === true ? { returnRepoSeq: true } : {}
56124
- });
56140
+ }));
56125
56141
  } catch (error51) {
56126
56142
  if (error51 instanceof AllStreamOperationsFailedError) {
56127
56143
  renderSubmittedStreamResult(ctx, error51.result);
@@ -62845,7 +62861,7 @@ var handleRetract2 = async (ctx, { flags, args }) => {
62845
62861
  const { org, repo: repo2 } = parseOrgRepo(getRepoRef(ctx), ctx.config);
62846
62862
  const expectedVersion = parsePositiveIntFlag(flags["expected-version"], "--expected-version", "wh shape retract Location --expected-version 3");
62847
62863
  const c = ctx.colors;
62848
- const commitResult = await ctx.client.commit.apply(org, repo2, flags.message ?? `retract shape ${shapeName}`, [
62864
+ const commitResult = identifyCommitSubmitOutput(await ctx.client.commit.apply(org, repo2, flags.message ?? `retract shape ${shapeName}`, [
62849
62865
  {
62850
62866
  operation: "retract",
62851
62867
  kind: "shape",
@@ -62853,7 +62869,7 @@ var handleRetract2 = async (ctx, { flags, args }) => {
62853
62869
  ...flags.reason ? { reason: flags.reason } : {},
62854
62870
  ...expectedVersion !== undefined ? { expectedVersion } : {}
62855
62871
  }
62856
- ], { committer: flags.committer });
62872
+ ], { committer: flags.committer }));
62857
62873
  requireSingleOpSuccess(commitResult);
62858
62874
  writeOutput(ctx, commitResult, () => {
62859
62875
  renderCommitterEcho(ctx.out, c, flags.committer);
@@ -66426,7 +66442,7 @@ function resolveLogLevel(flagLevel, env) {
66426
66442
  // package.json
66427
66443
  var package_default3 = {
66428
66444
  name: "@warmhub/cli",
66429
- version: "0.92.0",
66445
+ version: "0.93.0",
66430
66446
  private: false,
66431
66447
  type: "module",
66432
66448
  description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -67045,5 +67061,5 @@ process.exitCode = interceptedExitCode === undefined ? await runPreparedCli(laun
67045
67061
  version: package_default3.version
67046
67062
  }) : interceptedExitCode;
67047
67063
 
67048
- //# debugId=7FA9403B2F49037864756E2164756E21
67049
- //# warmhub-cli-build-info {"cliVersion":"0.92.0","sdkVersion":"0.90.0"}
67064
+ //# debugId=A6E050347C8F0F7D64756E2164756E21
67065
+ //# warmhub-cli-build-info {"cliVersion":"0.93.0","sdkVersion":"0.91.0"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/cli",
3
- "version": "0.92.0",
3
+ "version": "0.93.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.",