@warmhub/sdk-ts 0.53.0 → 0.54.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.
@@ -3652,7 +3652,7 @@ function validateWarmHubClientOptions(options) {
3652
3652
  throw new TypeError(`Unknown WarmHubClient option "${key}"${hint}`);
3653
3653
  }
3654
3654
  }
3655
- var SDK_VERSION = "0.53.0" ;
3655
+ var SDK_VERSION = "0.54.0" ;
3656
3656
  var DEFAULT_API_URL = "https://api.warmhub.ai";
3657
3657
  var UNBATCHED_TRPC_PATHS = /* @__PURE__ */ new Set([
3658
3658
  "repo.shapeInstanceCounts",
@@ -4111,6 +4111,12 @@ var WarmHubClient = class _WarmHubClient {
4111
4111
  * List components installed in a repository.
4112
4112
  *
4113
4113
  * Pass pagination options when a repository may have many installed components.
4114
+ *
4115
+ * Cursor contract: cursors are short-lived resume tokens for the same query
4116
+ * and result scope. If filters, visibility, or backing streams change, the
4117
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
4118
+ * cursor`; restart the query without `cursor` instead of retrying the stale
4119
+ * token.
4114
4120
  */
4115
4121
  list: async (orgName, repoName, opts) => {
4116
4122
  try {
@@ -4124,6 +4130,22 @@ var WarmHubClient = class _WarmHubClient {
4124
4130
  throw toWarmHubError(error);
4125
4131
  }
4126
4132
  },
4133
+ /**
4134
+ * Search public registered components across all orgs (GH-4383).
4135
+ * Public-only at launch. Distinct from listing components installed in a
4136
+ * repo (`component.list`).
4137
+ */
4138
+ search: async (query, opts) => {
4139
+ try {
4140
+ return await this.trpc.component.search.query({
4141
+ query,
4142
+ limit: opts?.limit,
4143
+ cursor: opts?.cursor
4144
+ });
4145
+ } catch (error) {
4146
+ throw toWarmHubError(error);
4147
+ }
4148
+ },
4127
4149
  /**
4128
4150
  * Fetch one installed component by its `Org/Name` ref.
4129
4151
  */
@@ -4622,6 +4644,12 @@ var WarmHubClient = class _WarmHubClient {
4622
4644
  * List repositories in an organization.
4623
4645
  *
4624
4646
  * Archived repositories are hidden by default. Search and sort options are applied before pagination.
4647
+ *
4648
+ * Cursor contract: cursors are short-lived resume tokens for the same query
4649
+ * and result scope. If filters, visibility, or backing streams change, the
4650
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
4651
+ * cursor`; restart the query without `cursor` instead of retrying the stale
4652
+ * token.
4625
4653
  */
4626
4654
  list: async (orgName, opts) => {
4627
4655
  try {
@@ -4637,6 +4665,21 @@ var WarmHubClient = class _WarmHubClient {
4637
4665
  throw toWarmHubError(error);
4638
4666
  }
4639
4667
  },
4668
+ /**
4669
+ * Search public repos across all orgs (GH-4383). Public-only at launch;
4670
+ * BM25 over name/description/shape vocabulary/README.
4671
+ */
4672
+ search: async (query, opts) => {
4673
+ try {
4674
+ return await this.trpc.repo.search.query({
4675
+ query,
4676
+ limit: opts?.limit,
4677
+ cursor: opts?.cursor
4678
+ });
4679
+ } catch (error) {
4680
+ throw toWarmHubError(error);
4681
+ }
4682
+ },
4640
4683
  /**
4641
4684
  * Create a repository inside an organization.
4642
4685
  *
@@ -4795,6 +4838,12 @@ var WarmHubClient = class _WarmHubClient {
4795
4838
  * Each item includes exact active counts, an activity-oriented `lastWriteAt`, and a `hasErrors` flag for terminal action failures.
4796
4839
  *
4797
4840
  * Search and sort are applied before pagination, so cursors remain stable across the filtered and ordered list.
4841
+ *
4842
+ * Cursor contract: cursors are short-lived resume tokens for the same query
4843
+ * and result scope. If filters, visibility, or backing streams change, the
4844
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
4845
+ * cursor`; restart the query without `cursor` instead of retrying the stale
4846
+ * token.
4798
4847
  */
4799
4848
  listPage: async (orgName, opts) => {
4800
4849
  try {
@@ -5077,6 +5126,12 @@ var WarmHubClient = class _WarmHubClient {
5077
5126
  * Return add, revise, retract, and rename history for a shape.
5078
5127
  *
5079
5128
  * Use pagination options for long-lived shapes with many revisions.
5129
+ *
5130
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5131
+ * and result scope. If filters, visibility, or backing streams change, the
5132
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5133
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5134
+ * token.
5080
5135
  */
5081
5136
  history: async (orgName, repoName, name, opts = {}) => {
5082
5137
  try {
@@ -5343,6 +5398,12 @@ var WarmHubClient = class _WarmHubClient {
5343
5398
  * Query the live delivery feed for a subscription.
5344
5399
  *
5345
5400
  * Use this for polling or live-log views that need recent delivery status entries.
5401
+ *
5402
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5403
+ * and result scope. If filters, visibility, or backing streams change, the
5404
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5405
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5406
+ * token.
5346
5407
  */
5347
5408
  liveFeed: async (orgName, repoName, subscriptionName, opts) => {
5348
5409
  try {
@@ -5436,6 +5497,12 @@ var WarmHubClient = class _WarmHubClient {
5436
5497
  * Filter by shape, kind, assertion target, or glob `match` pattern, and choose the data mode appropriate for the payload size. Component filters can narrow results to component-owned records or hide component infrastructure records.
5437
5498
  *
5438
5499
  * Tokenless reads of public repositories have stricter page-size and page-count limits than authenticated reads.
5500
+ *
5501
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5502
+ * and result scope. If filters, visibility, or backing streams change, the
5503
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5504
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5505
+ * token.
5439
5506
  */
5440
5507
  head: async (orgName, repoName, opts) => {
5441
5508
  try {
@@ -5463,6 +5530,12 @@ var WarmHubClient = class _WarmHubClient {
5463
5530
  * Iterate every current HEAD row matching the supplied filters.
5464
5531
  *
5465
5532
  * Prefer this over hand-written cursor loops when scanning all matching records. Pass `opts.cursor` to resume from a saved cursor; the iterator advances the cursor automatically after the first request. Pass `limit` to control page size.
5533
+ *
5534
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5535
+ * and result scope. If filters, visibility, or backing streams change, the
5536
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5537
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5538
+ * token.
5466
5539
  */
5467
5540
  headIter: (orgName, repoName, opts) => {
5468
5541
  return paginate(
@@ -5475,6 +5548,12 @@ var WarmHubClient = class _WarmHubClient {
5475
5548
  * Materialize every current HEAD row matching the supplied filters.
5476
5549
  *
5477
5550
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` items have actually been observed across pages.
5551
+ *
5552
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5553
+ * and result scope. If filters, visibility, or backing streams change, the
5554
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5555
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5556
+ * token.
5478
5557
  */
5479
5558
  headAll: async (orgName, repoName, opts) => {
5480
5559
  const { max, ...pageOpts } = opts ?? {};
@@ -5690,6 +5769,12 @@ var WarmHubClient = class _WarmHubClient {
5690
5769
  * Return version history and timeline metadata for repository records.
5691
5770
  *
5692
5771
  * Provide at least one selector: a concrete wref, a shape filter, or an assertion target. Shape- and target-filtered histories support pagination and optional collection resolution.
5772
+ *
5773
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5774
+ * and result scope. If filters, visibility, or backing streams change, the
5775
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5776
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5777
+ * token.
5693
5778
  */
5694
5779
  history: async (orgName, repoName, opts) => {
5695
5780
  try {
@@ -5746,6 +5831,12 @@ var WarmHubClient = class _WarmHubClient {
5746
5831
  *
5747
5832
  * Filter by assertion shape or glob `match` pattern, optionally resolve collection targets, and page through large assertion sets with `limit` and `cursor`.
5748
5833
  *
5834
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5835
+ * and result scope. If filters, visibility, or backing streams change, the
5836
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5837
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5838
+ * token.
5839
+ *
5749
5840
  * Returns `{ target?, assertions, nextCursor? }`.
5750
5841
  * The array is named `assertions`, **not** `items`. This breaks the repo-wide
5751
5842
  * `items` convention used by `HeadResult`, `FilterResult`, `SearchResult`,
@@ -5781,6 +5872,12 @@ var WarmHubClient = class _WarmHubClient {
5781
5872
  * Iterate every assertion about a thing or collection target.
5782
5873
  *
5783
5874
  * Prefer this over hand-written cursor loops when scanning all matching assertions. The iterator reads the `assertions` envelope field and advances the cursor automatically; pass `opts.cursor` to resume from a saved cursor and `limit` to control page size.
5875
+ *
5876
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5877
+ * and result scope. If filters, visibility, or backing streams change, the
5878
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5879
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5880
+ * token.
5784
5881
  */
5785
5882
  aboutIter: (orgName, repoName, wref, opts) => {
5786
5883
  return paginate(
@@ -5793,6 +5890,12 @@ var WarmHubClient = class _WarmHubClient {
5793
5890
  * Materialize every assertion about a thing or collection target.
5794
5891
  *
5795
5892
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` assertions have actually been observed across pages.
5893
+ *
5894
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5895
+ * and result scope. If filters, visibility, or backing streams change, the
5896
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5897
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5898
+ * token.
5796
5899
  */
5797
5900
  aboutAll: async (orgName, repoName, wref, opts) => {
5798
5901
  const { max, ...pageOpts } = opts ?? {};
@@ -5807,6 +5910,12 @@ var WarmHubClient = class _WarmHubClient {
5807
5910
  * Query repository records by shape, kind, assertion target, text filters, or glob `match` pattern.
5808
5911
  *
5809
5912
  * Use this for structured reads where the caller controls filters. For ranked text or vector search, use `thing.search`. For count-only reads, use `thing.count`.
5913
+ *
5914
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5915
+ * and result scope. If filters, visibility, or backing streams change, the
5916
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5917
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5918
+ * token.
5810
5919
  */
5811
5920
  query: async (orgName, repoName, opts) => {
5812
5921
  try {
@@ -5835,6 +5944,12 @@ var WarmHubClient = class _WarmHubClient {
5835
5944
  * Iterate every repository record matching the supplied filters.
5836
5945
  *
5837
5946
  * Prefer this over hand-written cursor loops when scanning all matching records. Pass `opts.cursor` to resume from a saved cursor; the iterator advances the cursor automatically after the first request. Pass `limit` to control page size.
5947
+ *
5948
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5949
+ * and result scope. If filters, visibility, or backing streams change, the
5950
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5951
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5952
+ * token.
5838
5953
  */
5839
5954
  queryIter: (orgName, repoName, opts) => {
5840
5955
  return paginate(
@@ -5847,6 +5962,12 @@ var WarmHubClient = class _WarmHubClient {
5847
5962
  * Materialize every repository record matching the supplied filters.
5848
5963
  *
5849
5964
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` items have actually been observed across pages.
5965
+ *
5966
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5967
+ * and result scope. If filters, visibility, or backing streams change, the
5968
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5969
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5970
+ * token.
5850
5971
  */
5851
5972
  queryAll: async (orgName, repoName, opts) => {
5852
5973
  const { max, ...pageOpts } = opts ?? {};
@@ -5861,6 +5982,12 @@ var WarmHubClient = class _WarmHubClient {
5861
5982
  * Search repository records with text, vector, or hybrid mode.
5862
5983
  *
5863
5984
  * When searching with an assertion target or collection resolution, pages may be sparse; keep paginating until `nextCursor` is absent.
5985
+ *
5986
+ * Cursor contract: cursors are short-lived resume tokens for the same query
5987
+ * and result scope. If filters, visibility, or backing streams change, the
5988
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
5989
+ * cursor`; restart the query without `cursor` instead of retrying the stale
5990
+ * token.
5864
5991
  */
5865
5992
  search: async (orgName, repoName, query, opts) => {
5866
5993
  try {
@@ -5914,6 +6041,12 @@ var WarmHubClient = class _WarmHubClient {
5914
6041
  * Query wref-typed field references for a record.
5915
6042
  *
5916
6043
  * Inbound mode finds records whose wref fields point at the supplied wref. Outbound mode finds records that the supplied record points to. Inbound queries can be narrowed to a field path.
6044
+ *
6045
+ * Cursor contract: cursors are short-lived resume tokens for the same query
6046
+ * and result scope. If filters, visibility, or backing streams change, the
6047
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
6048
+ * cursor`; restart the query without `cursor` instead of retrying the stale
6049
+ * token.
5917
6050
  */
5918
6051
  refs: async (orgName, repoName, wref, opts) => {
5919
6052
  try {
@@ -5934,6 +6067,12 @@ var WarmHubClient = class _WarmHubClient {
5934
6067
  * Iterate every wref-typed field reference for a record.
5935
6068
  *
5936
6069
  * Prefer this over hand-written cursor loops when scanning all matching references. Pass `opts.cursor` to resume from a saved cursor; the iterator advances the cursor automatically after the first request. Pass `limit` to control page size.
6070
+ *
6071
+ * Cursor contract: cursors are short-lived resume tokens for the same query
6072
+ * and result scope. If filters, visibility, or backing streams change, the
6073
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
6074
+ * cursor`; restart the query without `cursor` instead of retrying the stale
6075
+ * token.
5937
6076
  */
5938
6077
  refsIter: (orgName, repoName, wref, opts) => {
5939
6078
  return paginate(
@@ -5946,6 +6085,12 @@ var WarmHubClient = class _WarmHubClient {
5946
6085
  * Materialize every wref-typed field reference for a record.
5947
6086
  *
5948
6087
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` refs have actually been observed across pages.
6088
+ *
6089
+ * Cursor contract: cursors are short-lived resume tokens for the same query
6090
+ * and result scope. If filters, visibility, or backing streams change, the
6091
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
6092
+ * cursor`; restart the query without `cursor` instead of retrying the stale
6093
+ * token.
5949
6094
  */
5950
6095
  refsAll: async (orgName, repoName, wref, opts) => {
5951
6096
  const { max, ...pageOpts } = opts ?? {};
@@ -5965,6 +6110,12 @@ var WarmHubClient = class _WarmHubClient {
5965
6110
  * Stream refreshed `thing.head` results whenever the repository changes.
5966
6111
  *
5967
6112
  * The SDK re-runs the underlying `thing.head` query after each invalidation and passes the latest snapshot to `onUpdate`.
6113
+ *
6114
+ * Cursor contract: cursors are short-lived resume tokens for the same query
6115
+ * and result scope. If filters, visibility, or backing streams change, the
6116
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
6117
+ * cursor`; restart the query without `cursor` instead of retrying the stale
6118
+ * token.
5968
6119
  */
5969
6120
  thingHead: async (orgName, repoName, opts, onUpdate) => {
5970
6121
  return this.watchRepoQuery(
@@ -5986,6 +6137,12 @@ var WarmHubClient = class _WarmHubClient {
5986
6137
  },
5987
6138
  /**
5988
6139
  * Stream refreshed history results for a single wref whenever the repository changes.
6140
+ *
6141
+ * Cursor contract: cursors are short-lived resume tokens for the same query
6142
+ * and result scope. If filters, visibility, or backing streams change, the
6143
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
6144
+ * cursor`; restart the query without `cursor` instead of retrying the stale
6145
+ * token.
5989
6146
  */
5990
6147
  thingHistory: async (orgName, repoName, opts, onUpdate) => {
5991
6148
  return this.watchRepoQuery(
@@ -6003,6 +6160,12 @@ var WarmHubClient = class _WarmHubClient {
6003
6160
  },
6004
6161
  /**
6005
6162
  * Stream refreshed action live-feed entries for a subscription.
6163
+ *
6164
+ * Cursor contract: cursors are short-lived resume tokens for the same query
6165
+ * and result scope. If filters, visibility, or backing streams change, the
6166
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
6167
+ * cursor`; restart the query without `cursor` instead of retrying the stale
6168
+ * token.
6006
6169
  */
6007
6170
  subscriptionLog: async (orgName, repoName, subscriptionName, opts, onUpdate) => {
6008
6171
  return this.watchRepoQuery(
@@ -6592,5 +6755,5 @@ function isAbortError(error) {
6592
6755
  }
6593
6756
 
6594
6757
  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 };
6595
- //# sourceMappingURL=chunk-L5PODJ66.js.map
6596
- //# sourceMappingURL=chunk-L5PODJ66.js.map
6758
+ //# sourceMappingURL=chunk-I7PLCYOF.js.map
6759
+ //# sourceMappingURL=chunk-I7PLCYOF.js.map