@warmhub/sdk-ts 0.82.2 → 0.83.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.
@@ -184,26 +184,6 @@ function constantTimeEqualHex(a, b) {
184
184
  return diff === 0;
185
185
  }
186
186
 
187
- // ../rules/src/repo-auth-scopes.ts
188
- var REPO_AUTH_SCOPES = [
189
- "repo:read",
190
- "repo:write",
191
- "repo:configure",
192
- "repo:admin",
193
- // GH-4679: the repo-scoped twin of `org:action-callback`. A narrow capability
194
- // for acknowledging a repo-scoped action run's delivery (the async webhook
195
- // callback). Deliberately NOT implied by `repo:write` — a webhook handler
196
- // (e.g. a component) can be granted exactly this without standing authority to
197
- // write things/shapes. The callback gate currently ALSO accepts `repo:write`
198
- // so existing consumers (the Veritas worker) keep acking; that broad
199
- // acceptance is dropped once consumers move to this scope. Held by
200
- // owner/admin roles; grantable to a token (or component manifest) on its own.
201
- "repo:action-callback"
202
- ];
203
-
204
- // ../rules/src/component-manifest-contract-internals.ts
205
- new Set(REPO_AUTH_SCOPES);
206
-
207
187
  // ../rules/src/field-name-safety.ts
208
188
  var ESCAPE_DISPLAY_MAX_CHARS = 120;
209
189
  var DANGEROUS_FORMAT_CODEPOINTS = /* @__PURE__ */ new Set([
@@ -6755,13 +6735,6 @@ function isFieldOptional(fieldKey, typeSpec) {
6755
6735
  return optionalByKey || normalizeOptionalTypeSpec(typeSpec).optionalByType;
6756
6736
  }
6757
6737
 
6758
- // ../rules/src/name-charset.ts
6759
- var RESERVED_NAME_SEGMENT_CHARS = ["?", "#", "@", ":", "$"];
6760
- function escapeForCharClass(char) {
6761
- return char.replace(/[\\\]^-]/g, "\\$&");
6762
- }
6763
- RESERVED_NAME_SEGMENT_CHARS.map(escapeForCharClass).join("");
6764
-
6765
6738
  // ../rules/src/tokens.ts
6766
6739
  var COMMIT_TOKEN_SYNTAX_REMOVED_MESSAGE = "$N/#N commit-token syntax is no longer supported. Use explicit names and explicit wrefs. For assertions about newly created things, create the thing with a deterministic name and set about to that wref in the same commit.";
6767
6740
  var ANY_TOKEN_RE = /[$#]\d+/;
@@ -7053,39 +7026,6 @@ function preflightCommitDiagnostics2(operations, options) {
7053
7026
  return preflightCommitDiagnostics(operations, options);
7054
7027
  }
7055
7028
 
7056
- // ../rules/src/reserved-orgs.ts
7057
- var RESERVED_RAW_CONTENT_TOP_LEVEL_NAMES = [
7058
- "_app",
7059
- "_static",
7060
- "api",
7061
- "health",
7062
- "healthz",
7063
- "mcp",
7064
- "readyz",
7065
- "robots.txt",
7066
- "sse",
7067
- "trpc",
7068
- "version"
7069
- ];
7070
- var RESERVED_ORG_NAMES = [
7071
- ...RESERVED_RAW_CONTENT_TOP_LEVEL_NAMES,
7072
- "admin",
7073
- "billing",
7074
- "blog",
7075
- "docs",
7076
- "help",
7077
- "login",
7078
- "public",
7079
- "settings",
7080
- "signup",
7081
- "status",
7082
- "support",
7083
- "system",
7084
- "warmhub",
7085
- "www"
7086
- ];
7087
- new Set(RESERVED_ORG_NAMES);
7088
-
7089
7029
  // ../rules/src/shape-field-key.ts
7090
7030
  function foldFieldName(name) {
7091
7031
  const stripped = name.endsWith("?") ? name.slice(0, -1) : name;
@@ -7843,67 +7783,6 @@ function validateShapeDefinition(data, options = {}) {
7843
7783
  return { valid: true };
7844
7784
  }
7845
7785
 
7846
- // ../rules/src/system-components/system.ts
7847
- var SYSTEM_COMPONENT_ID = "com.warmhub.system";
7848
- var COMPONENT_INSTALL_FIELDS = {
7849
- componentId: "string",
7850
- name: "string",
7851
- version: "string",
7852
- source: "string",
7853
- "sourceKind?": "string",
7854
- "sourceRef?": "string",
7855
- "resolvedSha?": "string",
7856
- "registeredComponentRef?": "string",
7857
- manifestHash: "string",
7858
- state: "string",
7859
- manifest: "string",
7860
- installedAt: "string",
7861
- installedByUserId: "string?",
7862
- "installId?": "string",
7863
- "updatedAt?": "string"
7864
- };
7865
- var COMPONENT_CONFIG_FIELDS = {};
7866
- var SYSTEM_MANIFEST = {
7867
- component: {
7868
- id: SYSTEM_COMPONENT_ID,
7869
- name: "system",
7870
- version: "1.0.0"
7871
- },
7872
- shapes: [
7873
- { name: "ComponentInstall", fields: COMPONENT_INSTALL_FIELDS },
7874
- { name: "ComponentConfig", fields: COMPONENT_CONFIG_FIELDS }
7875
- ],
7876
- credentials: [],
7877
- subscriptions: [],
7878
- seeds: [],
7879
- health: {
7880
- requires: { shapes: ["ComponentInstall", "ComponentConfig"] }
7881
- },
7882
- teardown: {},
7883
- runtimeAccess: { reads: [], writes: [] }
7884
- };
7885
- var SYSTEM_COMPONENT = {
7886
- componentId: SYSTEM_COMPONENT_ID,
7887
- name: SYSTEM_MANIFEST.component.name,
7888
- version: SYSTEM_MANIFEST.component.version,
7889
- manifest: SYSTEM_MANIFEST,
7890
- installInfra: true,
7891
- shapes: [
7892
- { name: "ComponentInstall", fields: COMPONENT_INSTALL_FIELDS },
7893
- { name: "ComponentConfig", fields: COMPONENT_CONFIG_FIELDS }
7894
- ]
7895
- };
7896
-
7897
- // ../rules/src/system-components/index.ts
7898
- var SYSTEM_COMPONENTS = [
7899
- SYSTEM_COMPONENT
7900
- ];
7901
- new Set(
7902
- SYSTEM_COMPONENTS.filter((entry) => entry.installInfra === true).flatMap(
7903
- (entry) => entry.shapes.map((s) => s.name)
7904
- )
7905
- );
7906
-
7907
7786
  // src/shape-preflight.ts
7908
7787
  function shapeDefinitionPreflightError(name, data, verb) {
7909
7788
  const result = validateShapeDefinition(
@@ -8570,7 +8449,7 @@ var SDK_DEVELOPMENT_VERSION = "0.0.0-development";
8570
8449
  function sdkVersionIsDevelopment(version) {
8571
8450
  return version === SDK_DEVELOPMENT_VERSION;
8572
8451
  }
8573
- var SDK_VERSION = "0.82.2" ;
8452
+ var SDK_VERSION = "0.83.0" ;
8574
8453
 
8575
8454
  // src/component-cli.ts
8576
8455
  var SUPPORTED_METHODS = /* @__PURE__ */ new Set([
@@ -9400,20 +9279,31 @@ function assertPaginatedCursorAdvanced(cursor, nextCursor, seenCursors) {
9400
9279
  );
9401
9280
  }
9402
9281
  }
9403
- async function* paginate(fetchPage, extractItems, initialCursor) {
9282
+ function assertIncrementalLowerBound(sinceRepoSeq) {
9283
+ if (sinceRepoSeq === void 0) {
9284
+ throw new WarmHubError(
9285
+ "VALIDATION_ERROR",
9286
+ "sinceRepoSeq is required for an incremental read"
9287
+ );
9288
+ }
9289
+ }
9290
+ async function* paginatePages(fetchPage, initialCursor) {
9404
9291
  let cursor = initialCursor;
9405
9292
  const seenCursors = /* @__PURE__ */ new Set();
9406
9293
  for (; ; ) {
9407
9294
  if (cursor) seenCursors.add(cursor);
9408
9295
  const page = await fetchPage(cursor);
9409
- for (const item of extractItems(page)) {
9410
- yield item;
9411
- }
9296
+ yield page;
9412
9297
  if (!page.nextCursor) return;
9413
9298
  assertPaginatedCursorAdvanced(cursor, page.nextCursor, seenCursors);
9414
9299
  cursor = page.nextCursor;
9415
9300
  }
9416
9301
  }
9302
+ async function* paginate(fetchPage, extractItems, initialCursor) {
9303
+ for await (const page of paginatePages(fetchPage, initialCursor)) {
9304
+ yield* extractItems(page);
9305
+ }
9306
+ }
9417
9307
  async function collectPaginatedPages(fetchPage, extractItems, max, initialCursor) {
9418
9308
  if (max !== void 0 && (!Number.isFinite(max) || Math.trunc(max) !== max || max < 0)) {
9419
9309
  throw new WarmHubError(
@@ -9422,11 +9312,7 @@ async function collectPaginatedPages(fetchPage, extractItems, max, initialCursor
9422
9312
  );
9423
9313
  }
9424
9314
  const items = [];
9425
- let cursor = initialCursor;
9426
- const seenCursors = /* @__PURE__ */ new Set();
9427
- for (; ; ) {
9428
- if (cursor) seenCursors.add(cursor);
9429
- const page = await fetchPage(cursor);
9315
+ for await (const page of paginatePages(fetchPage, initialCursor)) {
9430
9316
  const pageItems = extractItems(page);
9431
9317
  if (max !== void 0 && items.length + pageItems.length > max) {
9432
9318
  throw new WarmHubError(
@@ -9435,7 +9321,34 @@ async function collectPaginatedPages(fetchPage, extractItems, max, initialCursor
9435
9321
  );
9436
9322
  }
9437
9323
  items.push(...pageItems);
9438
- if (!page.nextCursor) return items;
9324
+ }
9325
+ return items;
9326
+ }
9327
+ function assertRepoExploreBrowseMode(opts) {
9328
+ if (opts?.slugs !== void 0) {
9329
+ throw new WarmHubError(
9330
+ "VALIDATION_ERROR",
9331
+ "repo.explore pagination helpers do not support slugs mode"
9332
+ );
9333
+ }
9334
+ }
9335
+ async function collectIncrementalPages(fetchPage) {
9336
+ const items = [];
9337
+ let cursor;
9338
+ const seenCursors = /* @__PURE__ */ new Set();
9339
+ for (; ; ) {
9340
+ if (cursor) seenCursors.add(cursor);
9341
+ const page = await fetchPage(cursor);
9342
+ items.push(...page.items);
9343
+ if (!page.nextCursor) {
9344
+ if (page.repoSeq === void 0) {
9345
+ throw new WarmHubError(
9346
+ "VALIDATION_ERROR",
9347
+ "Incremental read completed without repoSeq"
9348
+ );
9349
+ }
9350
+ return { items, repoSeq: page.repoSeq };
9351
+ }
9439
9352
  assertPaginatedCursorAdvanced(cursor, page.nextCursor, seenCursors);
9440
9353
  cursor = page.nextCursor;
9441
9354
  }
@@ -9979,11 +9892,40 @@ var WarmHubClient = class _WarmHubClient {
9979
9892
  throw toWarmHubError(error);
9980
9893
  }
9981
9894
  },
9895
+ /**
9896
+ * Iterate installed components. Cursors resume the same query and result
9897
+ * scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
9898
+ * `cursor`.
9899
+ */
9900
+ listIter: (orgName, repoName, opts) => {
9901
+ return paginate(
9902
+ (cursor) => this.component.list(orgName, repoName, { ...opts, cursor }),
9903
+ (page) => page.items,
9904
+ opts?.cursor
9905
+ );
9906
+ },
9907
+ /**
9908
+ * Materialize installed components. Cursors resume the same query and
9909
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
9910
+ * without `cursor`.
9911
+ */
9912
+ listAll: async (orgName, repoName, opts) => {
9913
+ const { max, ...pageOpts } = opts ?? {};
9914
+ return await collectPaginatedPages(
9915
+ (cursor) => this.component.list(orgName, repoName, { ...pageOpts, cursor }),
9916
+ (page) => page.items,
9917
+ max,
9918
+ pageOpts.cursor
9919
+ );
9920
+ },
9982
9921
  /**
9983
9922
  * Search registered components visible to the caller across all orgs
9984
9923
  * (GH-4383): public components plus private components the caller can
9985
9924
  * read. Distinct from listing components installed in a repo
9986
9925
  * (`component.list`).
9926
+ *
9927
+ * Cursor contract: cursors resume the same query and result scope; on
9928
+ * `VALIDATION_ERROR` / `Invalid cursor`, restart the query without `cursor`.
9987
9929
  */
9988
9930
  search: async (query, opts) => {
9989
9931
  try {
@@ -9996,6 +9938,32 @@ var WarmHubClient = class _WarmHubClient {
9996
9938
  throw toWarmHubError(error);
9997
9939
  }
9998
9940
  },
9941
+ /**
9942
+ * Iterate global component search hits. Cursors resume the same query and
9943
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
9944
+ * without `cursor`.
9945
+ */
9946
+ searchIter: (query, opts) => {
9947
+ return paginate(
9948
+ (cursor) => this.component.search(query, { ...opts, cursor }),
9949
+ (page) => page.items,
9950
+ opts?.cursor
9951
+ );
9952
+ },
9953
+ /**
9954
+ * Materialize global component search hits. Cursors resume the same query
9955
+ * and result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the
9956
+ * query without `cursor`.
9957
+ */
9958
+ searchAll: async (query, opts) => {
9959
+ const { max, ...pageOpts } = opts ?? {};
9960
+ return await collectPaginatedPages(
9961
+ (cursor) => this.component.search(query, { ...pageOpts, cursor }),
9962
+ (page) => page.items,
9963
+ max,
9964
+ pageOpts.cursor
9965
+ );
9966
+ },
9999
9967
  /**
10000
9968
  * Fetch one installed component by its `Org/Name` ref.
10001
9969
  */
@@ -10604,10 +10572,39 @@ var WarmHubClient = class _WarmHubClient {
10604
10572
  throw toWarmHubError(error);
10605
10573
  }
10606
10574
  },
10575
+ /**
10576
+ * Iterate organization repositories. Cursors resume the same query and
10577
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
10578
+ * without `cursor`.
10579
+ */
10580
+ listIter: (orgName, opts) => {
10581
+ return paginate(
10582
+ (cursor) => this.repo.list(orgName, { ...opts, cursor }),
10583
+ (page) => page.items,
10584
+ opts?.cursor
10585
+ );
10586
+ },
10587
+ /**
10588
+ * Materialize organization repositories. Cursors resume the same query and
10589
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
10590
+ * without `cursor`.
10591
+ */
10592
+ listAll: async (orgName, opts) => {
10593
+ const { max, ...pageOpts } = opts ?? {};
10594
+ return await collectPaginatedPages(
10595
+ (cursor) => this.repo.list(orgName, { ...pageOpts, cursor }),
10596
+ (page) => page.items,
10597
+ max,
10598
+ pageOpts.cursor
10599
+ );
10600
+ },
10607
10601
  /**
10608
10602
  * Search repos visible to the caller across all orgs (GH-4383): public
10609
10603
  * repos plus private repos the caller can read. BM25 over
10610
10604
  * name/description/shape vocabulary/README.
10605
+ *
10606
+ * Cursor contract: cursors resume the same query and result scope; on
10607
+ * `VALIDATION_ERROR` / `Invalid cursor`, restart the query without `cursor`.
10611
10608
  */
10612
10609
  search: async (query, opts) => {
10613
10610
  try {
@@ -10620,6 +10617,32 @@ var WarmHubClient = class _WarmHubClient {
10620
10617
  throw toWarmHubError(error);
10621
10618
  }
10622
10619
  },
10620
+ /**
10621
+ * Iterate global repository search hits. Cursors resume the same query and
10622
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
10623
+ * without `cursor`.
10624
+ */
10625
+ searchIter: (query, opts) => {
10626
+ return paginate(
10627
+ (cursor) => this.repo.search(query, { ...opts, cursor }),
10628
+ (page) => page.items,
10629
+ opts?.cursor
10630
+ );
10631
+ },
10632
+ /**
10633
+ * Materialize global repository search hits. Cursors resume the same query
10634
+ * and result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the
10635
+ * query without `cursor`.
10636
+ */
10637
+ searchAll: async (query, opts) => {
10638
+ const { max, ...pageOpts } = opts ?? {};
10639
+ return await collectPaginatedPages(
10640
+ (cursor) => this.repo.search(query, { ...pageOpts, cursor }),
10641
+ (page) => page.items,
10642
+ max,
10643
+ pageOpts.cursor
10644
+ );
10645
+ },
10623
10646
  /**
10624
10647
  * Create a repository inside an organization.
10625
10648
  *
@@ -10784,6 +10807,32 @@ var WarmHubClient = class _WarmHubClient {
10784
10807
  throw toWarmHubError(error);
10785
10808
  }
10786
10809
  },
10810
+ /**
10811
+ * Iterate repository rows with stats. Cursors resume the same query and
10812
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
10813
+ * without `cursor`.
10814
+ */
10815
+ listPageIter: (orgName, opts) => {
10816
+ return paginate(
10817
+ (cursor) => this.repo.listPage(orgName, { ...opts, cursor }),
10818
+ (page) => page.items,
10819
+ opts?.cursor
10820
+ );
10821
+ },
10822
+ /**
10823
+ * Materialize repository rows with stats. Cursors resume the same query and
10824
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
10825
+ * without `cursor`.
10826
+ */
10827
+ listPageAll: async (orgName, opts) => {
10828
+ const { max, ...pageOpts } = opts ?? {};
10829
+ return await collectPaginatedPages(
10830
+ (cursor) => this.repo.listPage(orgName, { ...pageOpts, cursor }),
10831
+ (page) => page.items,
10832
+ max,
10833
+ pageOpts.cursor
10834
+ );
10835
+ },
10787
10836
  /**
10788
10837
  * List the caller's repositories across every org they belong to, ordered
10789
10838
  * for recency by default (most recently written first), capped at `limit`.
@@ -10845,6 +10894,36 @@ var WarmHubClient = class _WarmHubClient {
10845
10894
  throw toWarmHubError(error);
10846
10895
  }
10847
10896
  },
10897
+ /**
10898
+ * Iterate public Explore browse results. Cursors resume the same query and
10899
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
10900
+ * without `cursor`. Exact `slugs` lookup is not pageable.
10901
+ */
10902
+ exploreIter: (opts) => {
10903
+ assertRepoExploreBrowseMode(opts);
10904
+ return paginate(
10905
+ (cursor) => this.repo.explore({ ...opts, cursor }),
10906
+ (page) => page.items,
10907
+ opts?.cursor
10908
+ );
10909
+ },
10910
+ /**
10911
+ * Materialize public Explore browse results. Cursors resume the same query
10912
+ * and result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the
10913
+ * query without `cursor`. Exact `slugs` lookup is not pageable. `max`
10914
+ * remains optional as part of the uniform `*All` contract; callers should
10915
+ * provide a finite cap for this offset-paginated endpoint.
10916
+ */
10917
+ exploreAll: async (opts) => {
10918
+ assertRepoExploreBrowseMode(opts);
10919
+ const { max, ...pageOpts } = opts ?? {};
10920
+ return await collectPaginatedPages(
10921
+ (cursor) => this.repo.explore({ ...pageOpts, cursor }),
10922
+ (page) => page.items,
10923
+ max,
10924
+ pageOpts.cursor
10925
+ );
10926
+ },
10848
10927
  /**
10849
10928
  * Fetch a repository's `Content/Readme` markdown record.
10850
10929
  *
@@ -11142,6 +11221,32 @@ var WarmHubClient = class _WarmHubClient {
11142
11221
  } catch (error) {
11143
11222
  throw toWarmHubError(error);
11144
11223
  }
11224
+ },
11225
+ /**
11226
+ * Iterate shape versions. Cursors resume the same query and result scope;
11227
+ * on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
11228
+ * `cursor`.
11229
+ */
11230
+ historyIter: (orgName, repoName, name, opts = {}) => {
11231
+ return paginate(
11232
+ (cursor) => this.shape.history(orgName, repoName, name, { ...opts, cursor }),
11233
+ (page) => page.versions,
11234
+ opts.cursor
11235
+ );
11236
+ },
11237
+ /**
11238
+ * Materialize shape versions. Cursors resume the same query and result
11239
+ * scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
11240
+ * `cursor`.
11241
+ */
11242
+ historyAll: async (orgName, repoName, name, opts) => {
11243
+ const { max, ...pageOpts } = opts ?? {};
11244
+ return await collectPaginatedPages(
11245
+ (cursor) => this.shape.history(orgName, repoName, name, { ...pageOpts, cursor }),
11246
+ (page) => page.versions,
11247
+ max,
11248
+ pageOpts.cursor
11249
+ );
11145
11250
  }
11146
11251
  };
11147
11252
  /**
@@ -11423,6 +11528,38 @@ var WarmHubClient = class _WarmHubClient {
11423
11528
  throw toWarmHubError(error);
11424
11529
  }
11425
11530
  },
11531
+ /**
11532
+ * Iterate delivery-feed entries. Cursors resume the same query and result
11533
+ * scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
11534
+ * `cursor`.
11535
+ */
11536
+ liveFeedIter: (orgName, repoName, subscriptionName, opts) => {
11537
+ return paginate(
11538
+ (cursor) => this.action.liveFeed(orgName, repoName, subscriptionName, {
11539
+ ...opts,
11540
+ cursor
11541
+ }),
11542
+ (page) => page.items,
11543
+ opts?.cursor
11544
+ );
11545
+ },
11546
+ /**
11547
+ * Materialize delivery-feed entries. Cursors resume the same query and
11548
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
11549
+ * without `cursor`.
11550
+ */
11551
+ liveFeedAll: async (orgName, repoName, subscriptionName, opts) => {
11552
+ const { max, ...pageOpts } = opts ?? {};
11553
+ return await collectPaginatedPages(
11554
+ (cursor) => this.action.liveFeed(orgName, repoName, subscriptionName, {
11555
+ ...pageOpts,
11556
+ cursor
11557
+ }),
11558
+ (page) => page.items,
11559
+ max,
11560
+ pageOpts.cursor
11561
+ );
11562
+ },
11426
11563
  /**
11427
11564
  * List subscription action runs as a `Page<ActionRunInfo>` (`items` +
11428
11565
  * optional `nextCursor`), newest-first, capped at 200 runs per page.
@@ -11430,8 +11567,9 @@ var WarmHubClient = class _WarmHubClient {
11430
11567
  * `status` and `outcome` are mutually exclusive.
11431
11568
  * `since` and `cursor` are mutually exclusive; pass `cursor` alone on later
11432
11569
  * pages — the `since` window rides in the cursor.
11433
- * Cursors are opaque, short-lived resume tokens; on `VALIDATION_ERROR`
11434
- * restart the query without `cursor`.
11570
+ * Cursors are opaque, short-lived resume tokens for the same query and
11571
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
11572
+ * without `cursor`.
11435
11573
  * See docs/dev/warmhub-actions-api.md for the full contract.
11436
11574
  */
11437
11575
  listRuns: async (orgName, repoName, opts) => {
@@ -11450,6 +11588,40 @@ var WarmHubClient = class _WarmHubClient {
11450
11588
  throw toWarmHubError(error);
11451
11589
  }
11452
11590
  },
11591
+ /**
11592
+ * Iterate action runs. Cursors resume the same query and result scope; on
11593
+ * `VALIDATION_ERROR` / `Invalid cursor`, restart the query without `cursor`.
11594
+ * `since` is sent only on the initial request.
11595
+ */
11596
+ listRunsIter: (orgName, repoName, opts) => {
11597
+ return paginate(
11598
+ (cursor) => this.action.listRuns(orgName, repoName, {
11599
+ ...opts,
11600
+ since: cursor === void 0 ? opts?.since : void 0,
11601
+ cursor
11602
+ }),
11603
+ (page) => page.items,
11604
+ opts?.cursor
11605
+ );
11606
+ },
11607
+ /**
11608
+ * Materialize action runs. Cursors resume the same query and result scope;
11609
+ * on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
11610
+ * `cursor`. `since` is sent only on the initial request.
11611
+ */
11612
+ listRunsAll: async (orgName, repoName, opts) => {
11613
+ const { max, ...pageOpts } = opts ?? {};
11614
+ return await collectPaginatedPages(
11615
+ (cursor) => this.action.listRuns(orgName, repoName, {
11616
+ ...pageOpts,
11617
+ since: cursor === void 0 ? pageOpts.since : void 0,
11618
+ cursor
11619
+ }),
11620
+ (page) => page.items,
11621
+ max,
11622
+ pageOpts.cursor
11623
+ );
11624
+ },
11453
11625
  /**
11454
11626
  * Return the newest visible action run for each subscription in a repo.
11455
11627
  *
@@ -11541,6 +11713,11 @@ var WarmHubClient = class _WarmHubClient {
11541
11713
  throw toWarmHubError(error);
11542
11714
  }
11543
11715
  },
11716
+ /**
11717
+ * Read one collection-membership page. Cursors resume the same query and
11718
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
11719
+ * without `cursor`.
11720
+ */
11544
11721
  members: async (orgName, repoName, wref, opts) => {
11545
11722
  try {
11546
11723
  return await this.trpc.collection.members.query({
@@ -11555,6 +11732,11 @@ var WarmHubClient = class _WarmHubClient {
11555
11732
  throw toWarmHubError(error);
11556
11733
  }
11557
11734
  },
11735
+ /**
11736
+ * Iterate collection members. Cursors resume the same query and result
11737
+ * scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
11738
+ * `cursor`.
11739
+ */
11558
11740
  membersIter: (orgName, repoName, wref, opts) => {
11559
11741
  let snapshotVersion = opts?.version;
11560
11742
  return paginate(
@@ -11571,6 +11753,11 @@ var WarmHubClient = class _WarmHubClient {
11571
11753
  opts?.cursor
11572
11754
  );
11573
11755
  },
11756
+ /**
11757
+ * Materialize collection members. Cursors resume the same query and result
11758
+ * scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
11759
+ * `cursor`.
11760
+ */
11574
11761
  membersAll: async (orgName, repoName, wref, opts) => {
11575
11762
  const { max, ...pageOpts } = opts ?? {};
11576
11763
  let snapshotVersion = pageOpts.version;
@@ -11708,7 +11895,8 @@ var WarmHubClient = class _WarmHubClient {
11708
11895
  componentRef: opts?.componentRef,
11709
11896
  excludeComponents: opts?.excludeComponents,
11710
11897
  excludeInfraShapes: opts?.excludeInfraShapes,
11711
- where: opts?.where
11898
+ where: opts?.where,
11899
+ sinceRepoSeq: opts?.sinceRepoSeq
11712
11900
  });
11713
11901
  } catch (error) {
11714
11902
  throw toWarmHubError(error);
@@ -11752,6 +11940,26 @@ var WarmHubClient = class _WarmHubClient {
11752
11940
  pageOpts.cursor
11753
11941
  );
11754
11942
  },
11943
+ /**
11944
+ * Materialize identity-owned changes after a repository sequence and return
11945
+ * the exact checkpoint reached by the completed scan.
11946
+ *
11947
+ * Key a local cache by `item.metadata.durableId`: an identity rename
11948
+ * carries its checkpoint wref, and a retraction carries `active: false`.
11949
+ * This helper forces retracted rows on and returns only after draining the
11950
+ * terminal page. It does not fan out changes caused by another identity
11951
+ * and therefore is not, by itself, a complete local-result-mirror protocol.
11952
+ */
11953
+ headChanges: async (orgName, repoName, opts) => {
11954
+ assertIncrementalLowerBound(opts?.sinceRepoSeq);
11955
+ return await collectIncrementalPages(
11956
+ (cursor) => this.thing.head(orgName, repoName, {
11957
+ ...opts,
11958
+ includeRetracted: true,
11959
+ cursor
11960
+ })
11961
+ );
11962
+ },
11755
11963
  /**
11756
11964
  * Get one thing, assertion, shape, or collection by wref.
11757
11965
  *
@@ -11985,6 +12193,32 @@ var WarmHubClient = class _WarmHubClient {
11985
12193
  throw toWarmHubError(error);
11986
12194
  }
11987
12195
  },
12196
+ /**
12197
+ * Iterate thing history versions. Cursors resume the same query and result
12198
+ * scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
12199
+ * `cursor`.
12200
+ */
12201
+ historyIter: (orgName, repoName, opts) => {
12202
+ return paginate(
12203
+ (cursor) => this.thing.history(orgName, repoName, { ...opts, cursor }),
12204
+ (page) => page.versions,
12205
+ opts.cursor
12206
+ );
12207
+ },
12208
+ /**
12209
+ * Materialize thing history versions. Cursors resume the same query and
12210
+ * result scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query
12211
+ * without `cursor`.
12212
+ */
12213
+ historyAll: async (orgName, repoName, opts) => {
12214
+ const { max, ...pageOpts } = opts;
12215
+ return await collectPaginatedPages(
12216
+ (cursor) => this.thing.history(orgName, repoName, { ...pageOpts, cursor }),
12217
+ (page) => page.versions,
12218
+ max,
12219
+ pageOpts.cursor
12220
+ );
12221
+ },
11988
12222
  /**
11989
12223
  * Rename a thing within its shape namespace.
11990
12224
  *
@@ -12127,7 +12361,8 @@ var WarmHubClient = class _WarmHubClient {
12127
12361
  componentRef: opts?.componentRef,
12128
12362
  excludeComponents: opts?.excludeComponents,
12129
12363
  excludeInfraShapes: opts?.excludeInfraShapes,
12130
- where: opts?.where
12364
+ where: opts?.where,
12365
+ sinceRepoSeq: opts?.sinceRepoSeq
12131
12366
  });
12132
12367
  } catch (error) {
12133
12368
  throw toWarmHubError(error);
@@ -12171,6 +12406,26 @@ var WarmHubClient = class _WarmHubClient {
12171
12406
  pageOpts.cursor
12172
12407
  );
12173
12408
  },
12409
+ /**
12410
+ * Materialize filtered identity-owned changes after a repository sequence
12411
+ * and return the exact checkpoint reached by the completed scan.
12412
+ *
12413
+ * Key a local cache by `item.metadata.durableId`: an identity rename
12414
+ * carries its checkpoint wref, and a retraction carries `active: false`.
12415
+ * This helper forces retracted rows on and returns only after draining the
12416
+ * terminal page. It does not fan out changes caused by another identity
12417
+ * and therefore is not, by itself, a complete local-result-mirror protocol.
12418
+ */
12419
+ queryChanges: async (orgName, repoName, opts) => {
12420
+ assertIncrementalLowerBound(opts?.sinceRepoSeq);
12421
+ return await collectIncrementalPages(
12422
+ (cursor) => this.thing.query(orgName, repoName, {
12423
+ ...opts,
12424
+ includeRetracted: true,
12425
+ cursor
12426
+ })
12427
+ );
12428
+ },
12174
12429
  /**
12175
12430
  * Search repository records with text, vector, or hybrid mode.
12176
12431
  *
@@ -12207,6 +12462,35 @@ var WarmHubClient = class _WarmHubClient {
12207
12462
  throw toWarmHubError(error);
12208
12463
  }
12209
12464
  },
12465
+ /**
12466
+ * Iterate ranked search hits. Cursors resume the same query and result
12467
+ * scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
12468
+ * `cursor`.
12469
+ */
12470
+ searchIter: (orgName, repoName, query, opts) => {
12471
+ return paginate(
12472
+ (cursor) => this.thing.search(orgName, repoName, query, { ...opts, cursor }),
12473
+ (page) => page.items,
12474
+ opts?.cursor
12475
+ );
12476
+ },
12477
+ /**
12478
+ * Materialize ranked search hits. Cursors resume the same query and result
12479
+ * scope; on `VALIDATION_ERROR` / `Invalid cursor`, restart the query without
12480
+ * `cursor`.
12481
+ */
12482
+ searchAll: async (orgName, repoName, query, opts) => {
12483
+ const { max, ...pageOpts } = opts ?? {};
12484
+ return await collectPaginatedPages(
12485
+ (cursor) => this.thing.search(orgName, repoName, query, {
12486
+ ...pageOpts,
12487
+ cursor
12488
+ }),
12489
+ (page) => page.items,
12490
+ max,
12491
+ pageOpts.cursor
12492
+ );
12493
+ },
12210
12494
  /**
12211
12495
  * Count matching repository records without returning record data.
12212
12496
  */
@@ -12225,7 +12509,8 @@ var WarmHubClient = class _WarmHubClient {
12225
12509
  componentRef: opts?.componentRef,
12226
12510
  excludeComponents: opts?.excludeComponents,
12227
12511
  excludeInfraShapes: opts?.excludeInfraShapes,
12228
- where: opts?.where
12512
+ where: opts?.where,
12513
+ sinceRepoSeq: opts?.sinceRepoSeq
12229
12514
  });
12230
12515
  } catch (error) {
12231
12516
  throw toWarmHubError(error);
@@ -12987,5 +13272,5 @@ re2js/build/index.js:
12987
13272
  */
12988
13273
 
12989
13274
  export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT2 as MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
12990
- //# sourceMappingURL=chunk-5XROK65X.js.map
12991
- //# sourceMappingURL=chunk-5XROK65X.js.map
13275
+ //# sourceMappingURL=chunk-6AHGGJL6.js.map
13276
+ //# sourceMappingURL=chunk-6AHGGJL6.js.map