@warmhub/sdk-ts 0.52.1 → 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.
|
@@ -2746,7 +2746,7 @@ async function submitOperationsViaStream(client, args) {
|
|
|
2746
2746
|
orgName: args.orgName,
|
|
2747
2747
|
repoName: args.repoName,
|
|
2748
2748
|
streamId,
|
|
2749
|
-
|
|
2749
|
+
componentRef: args.componentRef,
|
|
2750
2750
|
committer: args.committer,
|
|
2751
2751
|
message: args.message,
|
|
2752
2752
|
operations: chunk
|
|
@@ -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.
|
|
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",
|
|
@@ -4011,36 +4011,23 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4011
4011
|
}
|
|
4012
4012
|
};
|
|
4013
4013
|
/**
|
|
4014
|
-
*
|
|
4014
|
+
* Effective-access resolution for UI gating and service-side authorization.
|
|
4015
|
+
* First-party surface (web UI + whedge edge); the underlying `access.resolve`
|
|
4016
|
+
* procedure is `@internal`.
|
|
4017
|
+
* @internal
|
|
4015
4018
|
*/
|
|
4016
4019
|
access = {
|
|
4017
4020
|
/**
|
|
4018
|
-
*
|
|
4019
|
-
*
|
|
4020
|
-
*
|
|
4021
|
+
* Resolve the caller's effective access for a batch of repos and/or orgs
|
|
4022
|
+
* (addressed by name). Returns the coarse scope SET per target so one call
|
|
4023
|
+
* answers any permission via `scopes.includes(...)` — e.g.
|
|
4024
|
+
* `scopes.includes('repo:configure')`. Non-throwing: `visible: false` means
|
|
4025
|
+
* not-found/not-visible; `scopes: []` means authenticated-but-no-access.
|
|
4026
|
+
* Correlate results by the echoed `orgName`/`repoName`, not by position.
|
|
4021
4027
|
*/
|
|
4022
|
-
|
|
4028
|
+
resolve: async (input) => {
|
|
4023
4029
|
try {
|
|
4024
|
-
return await this.trpc.access.
|
|
4025
|
-
orgName,
|
|
4026
|
-
repoName,
|
|
4027
|
-
permission
|
|
4028
|
-
});
|
|
4029
|
-
} catch (error) {
|
|
4030
|
-
throw toWarmHubError(error);
|
|
4031
|
-
}
|
|
4032
|
-
},
|
|
4033
|
-
/**
|
|
4034
|
-
* Check whether the caller has an org-scoped permission.
|
|
4035
|
-
*
|
|
4036
|
-
* @param permission Permission string such as `org:read`, `org:configure`, or `org:admin`.
|
|
4037
|
-
*/
|
|
4038
|
-
checkOrgPermission: async (orgName, permission) => {
|
|
4039
|
-
try {
|
|
4040
|
-
return await this.trpc.access.checkOrgPermission.query({
|
|
4041
|
-
orgName,
|
|
4042
|
-
permission
|
|
4043
|
-
});
|
|
4030
|
+
return await this.trpc.access.resolve.query(input);
|
|
4044
4031
|
} catch (error) {
|
|
4045
4032
|
throw toWarmHubError(error);
|
|
4046
4033
|
}
|
|
@@ -4124,6 +4111,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4124
4111
|
* List components installed in a repository.
|
|
4125
4112
|
*
|
|
4126
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.
|
|
4127
4120
|
*/
|
|
4128
4121
|
list: async (orgName, repoName, opts) => {
|
|
4129
4122
|
try {
|
|
@@ -4138,14 +4131,30 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4138
4131
|
}
|
|
4139
4132
|
},
|
|
4140
4133
|
/**
|
|
4141
|
-
*
|
|
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`).
|
|
4142
4137
|
*/
|
|
4143
|
-
|
|
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
|
+
},
|
|
4149
|
+
/**
|
|
4150
|
+
* Fetch one installed component by its `Org/Name` ref.
|
|
4151
|
+
*/
|
|
4152
|
+
get: async (orgName, repoName, componentRef) => {
|
|
4144
4153
|
try {
|
|
4145
4154
|
return await this.trpc.component.get.query({
|
|
4146
4155
|
orgName,
|
|
4147
4156
|
repoName,
|
|
4148
|
-
|
|
4157
|
+
componentRef
|
|
4149
4158
|
});
|
|
4150
4159
|
} catch (error) {
|
|
4151
4160
|
throw toWarmHubError(error);
|
|
@@ -4282,7 +4291,7 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4282
4291
|
* @param message Optional commit message stored with the submitted operations.
|
|
4283
4292
|
* @param operations Add, revise, or retract operations to submit in order.
|
|
4284
4293
|
* @param opts.committer Optional wref identifying the actor on whose behalf the write is made. Must be a full wref string like `"Agent/bot-1"` (a thing that already exists), or a cross-repo wref like `"wh:other-org/other-repo/Agent/bot-1"`. Bare names such as `"eval-runner"` are rejected by the backend with a "Thing wref required" error — there is no implicit shape.
|
|
4285
|
-
* @param opts.
|
|
4294
|
+
* @param opts.componentRef Attribute writes to an installed component, identified by its `Org/Name` ref, when the caller is allowed to claim it.
|
|
4286
4295
|
* @param opts.chunkSize Maximum operations per stream append. Values are clamped by the SDK.
|
|
4287
4296
|
* @param opts.skipExisting Return `noop` for add operations whose target already exists.
|
|
4288
4297
|
* @param opts.streamId Advanced continuation hook for caller-managed streams.
|
|
@@ -4295,7 +4304,7 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4295
4304
|
repoName,
|
|
4296
4305
|
committer: opts?.committer,
|
|
4297
4306
|
message,
|
|
4298
|
-
|
|
4307
|
+
componentRef: opts?.componentRef,
|
|
4299
4308
|
chunkSize: opts?.chunkSize,
|
|
4300
4309
|
skipExisting: opts?.skipExisting,
|
|
4301
4310
|
streamId: opts?.streamId,
|
|
@@ -4635,6 +4644,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4635
4644
|
* List repositories in an organization.
|
|
4636
4645
|
*
|
|
4637
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.
|
|
4638
4653
|
*/
|
|
4639
4654
|
list: async (orgName, opts) => {
|
|
4640
4655
|
try {
|
|
@@ -4650,6 +4665,21 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4650
4665
|
throw toWarmHubError(error);
|
|
4651
4666
|
}
|
|
4652
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
|
+
},
|
|
4653
4683
|
/**
|
|
4654
4684
|
* Create a repository inside an organization.
|
|
4655
4685
|
*
|
|
@@ -4808,6 +4838,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4808
4838
|
* Each item includes exact active counts, an activity-oriented `lastWriteAt`, and a `hasErrors` flag for terminal action failures.
|
|
4809
4839
|
*
|
|
4810
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.
|
|
4811
4847
|
*/
|
|
4812
4848
|
listPage: async (orgName, opts) => {
|
|
4813
4849
|
try {
|
|
@@ -4956,7 +4992,7 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
4956
4992
|
orgName,
|
|
4957
4993
|
repoName,
|
|
4958
4994
|
match: opts?.match,
|
|
4959
|
-
|
|
4995
|
+
componentRef: opts?.componentRef,
|
|
4960
4996
|
excludeComponents: opts?.excludeComponents,
|
|
4961
4997
|
includeRetracted: opts?.includeRetracted
|
|
4962
4998
|
});
|
|
@@ -5090,6 +5126,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5090
5126
|
* Return add, revise, retract, and rename history for a shape.
|
|
5091
5127
|
*
|
|
5092
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.
|
|
5093
5135
|
*/
|
|
5094
5136
|
history: async (orgName, repoName, name, opts = {}) => {
|
|
5095
5137
|
try {
|
|
@@ -5356,6 +5398,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5356
5398
|
* Query the live delivery feed for a subscription.
|
|
5357
5399
|
*
|
|
5358
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.
|
|
5359
5407
|
*/
|
|
5360
5408
|
liveFeed: async (orgName, repoName, subscriptionName, opts) => {
|
|
5361
5409
|
try {
|
|
@@ -5449,6 +5497,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5449
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.
|
|
5450
5498
|
*
|
|
5451
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.
|
|
5452
5506
|
*/
|
|
5453
5507
|
head: async (orgName, repoName, opts) => {
|
|
5454
5508
|
try {
|
|
@@ -5463,7 +5517,7 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5463
5517
|
includeRetracted: opts?.includeRetracted,
|
|
5464
5518
|
limit: opts?.limit,
|
|
5465
5519
|
cursor: opts?.cursor,
|
|
5466
|
-
|
|
5520
|
+
componentRef: opts?.componentRef,
|
|
5467
5521
|
excludeComponents: opts?.excludeComponents,
|
|
5468
5522
|
excludeInfraShapes: opts?.excludeInfraShapes,
|
|
5469
5523
|
where: opts?.where
|
|
@@ -5476,6 +5530,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5476
5530
|
* Iterate every current HEAD row matching the supplied filters.
|
|
5477
5531
|
*
|
|
5478
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.
|
|
5479
5539
|
*/
|
|
5480
5540
|
headIter: (orgName, repoName, opts) => {
|
|
5481
5541
|
return paginate(
|
|
@@ -5488,6 +5548,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5488
5548
|
* Materialize every current HEAD row matching the supplied filters.
|
|
5489
5549
|
*
|
|
5490
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.
|
|
5491
5557
|
*/
|
|
5492
5558
|
headAll: async (orgName, repoName, opts) => {
|
|
5493
5559
|
const { max, ...pageOpts } = opts ?? {};
|
|
@@ -5703,6 +5769,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5703
5769
|
* Return version history and timeline metadata for repository records.
|
|
5704
5770
|
*
|
|
5705
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.
|
|
5706
5778
|
*/
|
|
5707
5779
|
history: async (orgName, repoName, opts) => {
|
|
5708
5780
|
try {
|
|
@@ -5759,6 +5831,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5759
5831
|
*
|
|
5760
5832
|
* Filter by assertion shape or glob `match` pattern, optionally resolve collection targets, and page through large assertion sets with `limit` and `cursor`.
|
|
5761
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
|
+
*
|
|
5762
5840
|
* Returns `{ target?, assertions, nextCursor? }`.
|
|
5763
5841
|
* The array is named `assertions`, **not** `items`. This breaks the repo-wide
|
|
5764
5842
|
* `items` convention used by `HeadResult`, `FilterResult`, `SearchResult`,
|
|
@@ -5794,6 +5872,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5794
5872
|
* Iterate every assertion about a thing or collection target.
|
|
5795
5873
|
*
|
|
5796
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.
|
|
5797
5881
|
*/
|
|
5798
5882
|
aboutIter: (orgName, repoName, wref, opts) => {
|
|
5799
5883
|
return paginate(
|
|
@@ -5806,6 +5890,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5806
5890
|
* Materialize every assertion about a thing or collection target.
|
|
5807
5891
|
*
|
|
5808
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.
|
|
5809
5899
|
*/
|
|
5810
5900
|
aboutAll: async (orgName, repoName, wref, opts) => {
|
|
5811
5901
|
const { max, ...pageOpts } = opts ?? {};
|
|
@@ -5820,6 +5910,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5820
5910
|
* Query repository records by shape, kind, assertion target, text filters, or glob `match` pattern.
|
|
5821
5911
|
*
|
|
5822
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.
|
|
5823
5919
|
*/
|
|
5824
5920
|
query: async (orgName, repoName, opts) => {
|
|
5825
5921
|
try {
|
|
@@ -5835,7 +5931,7 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5835
5931
|
resolveCollections: opts?.resolveCollections,
|
|
5836
5932
|
limit: opts?.limit,
|
|
5837
5933
|
cursor: opts?.cursor,
|
|
5838
|
-
|
|
5934
|
+
componentRef: opts?.componentRef,
|
|
5839
5935
|
excludeComponents: opts?.excludeComponents,
|
|
5840
5936
|
excludeInfraShapes: opts?.excludeInfraShapes,
|
|
5841
5937
|
where: opts?.where
|
|
@@ -5848,6 +5944,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5848
5944
|
* Iterate every repository record matching the supplied filters.
|
|
5849
5945
|
*
|
|
5850
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.
|
|
5851
5953
|
*/
|
|
5852
5954
|
queryIter: (orgName, repoName, opts) => {
|
|
5853
5955
|
return paginate(
|
|
@@ -5860,6 +5962,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5860
5962
|
* Materialize every repository record matching the supplied filters.
|
|
5861
5963
|
*
|
|
5862
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.
|
|
5863
5971
|
*/
|
|
5864
5972
|
queryAll: async (orgName, repoName, opts) => {
|
|
5865
5973
|
const { max, ...pageOpts } = opts ?? {};
|
|
@@ -5874,6 +5982,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5874
5982
|
* Search repository records with text, vector, or hybrid mode.
|
|
5875
5983
|
*
|
|
5876
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.
|
|
5877
5991
|
*/
|
|
5878
5992
|
search: async (orgName, repoName, query, opts) => {
|
|
5879
5993
|
try {
|
|
@@ -5890,7 +6004,7 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5890
6004
|
resolveCollections: opts?.resolveCollections,
|
|
5891
6005
|
limit: opts?.limit,
|
|
5892
6006
|
cursor: opts?.cursor,
|
|
5893
|
-
|
|
6007
|
+
componentRef: opts?.componentRef,
|
|
5894
6008
|
excludeComponents: opts?.excludeComponents,
|
|
5895
6009
|
excludeInfraShapes: opts?.excludeInfraShapes,
|
|
5896
6010
|
mode: opts?.mode
|
|
@@ -5914,7 +6028,7 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5914
6028
|
match: opts?.match,
|
|
5915
6029
|
includeRetracted: opts?.includeRetracted,
|
|
5916
6030
|
resolveCollections: opts?.resolveCollections,
|
|
5917
|
-
|
|
6031
|
+
componentRef: opts?.componentRef,
|
|
5918
6032
|
excludeComponents: opts?.excludeComponents,
|
|
5919
6033
|
excludeInfraShapes: opts?.excludeInfraShapes,
|
|
5920
6034
|
where: opts?.where
|
|
@@ -5927,6 +6041,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5927
6041
|
* Query wref-typed field references for a record.
|
|
5928
6042
|
*
|
|
5929
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.
|
|
5930
6050
|
*/
|
|
5931
6051
|
refs: async (orgName, repoName, wref, opts) => {
|
|
5932
6052
|
try {
|
|
@@ -5947,6 +6067,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5947
6067
|
* Iterate every wref-typed field reference for a record.
|
|
5948
6068
|
*
|
|
5949
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.
|
|
5950
6076
|
*/
|
|
5951
6077
|
refsIter: (orgName, repoName, wref, opts) => {
|
|
5952
6078
|
return paginate(
|
|
@@ -5959,6 +6085,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5959
6085
|
* Materialize every wref-typed field reference for a record.
|
|
5960
6086
|
*
|
|
5961
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.
|
|
5962
6094
|
*/
|
|
5963
6095
|
refsAll: async (orgName, repoName, wref, opts) => {
|
|
5964
6096
|
const { max, ...pageOpts } = opts ?? {};
|
|
@@ -5978,6 +6110,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5978
6110
|
* Stream refreshed `thing.head` results whenever the repository changes.
|
|
5979
6111
|
*
|
|
5980
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.
|
|
5981
6119
|
*/
|
|
5982
6120
|
thingHead: async (orgName, repoName, opts, onUpdate) => {
|
|
5983
6121
|
return this.watchRepoQuery(
|
|
@@ -5999,6 +6137,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
5999
6137
|
},
|
|
6000
6138
|
/**
|
|
6001
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.
|
|
6002
6146
|
*/
|
|
6003
6147
|
thingHistory: async (orgName, repoName, opts, onUpdate) => {
|
|
6004
6148
|
return this.watchRepoQuery(
|
|
@@ -6016,6 +6160,12 @@ var WarmHubClient = class _WarmHubClient {
|
|
|
6016
6160
|
},
|
|
6017
6161
|
/**
|
|
6018
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.
|
|
6019
6169
|
*/
|
|
6020
6170
|
subscriptionLog: async (orgName, repoName, subscriptionName, opts, onUpdate) => {
|
|
6021
6171
|
return this.watchRepoQuery(
|
|
@@ -6605,5 +6755,5 @@ function isAbortError(error) {
|
|
|
6605
6755
|
}
|
|
6606
6756
|
|
|
6607
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 };
|
|
6608
|
-
//# sourceMappingURL=chunk-
|
|
6609
|
-
//# sourceMappingURL=chunk-
|
|
6758
|
+
//# sourceMappingURL=chunk-I7PLCYOF.js.map
|
|
6759
|
+
//# sourceMappingURL=chunk-I7PLCYOF.js.map
|