@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.
package/dist/index.d.ts CHANGED
@@ -74,6 +74,29 @@ type ActionRunStats = {
74
74
  dead_letter: number;
75
75
  };
76
76
  };
77
+ type AccessResolveInput$1 = {
78
+ repos?: Array<{
79
+ orgName: string;
80
+ repoName: string;
81
+ }>;
82
+ orgs?: Array<{
83
+ orgName: string;
84
+ }>;
85
+ };
86
+ type AccessResolveResult$1 = {
87
+ repos: Array<{
88
+ orgName: string;
89
+ repoName: string;
90
+ visible: boolean;
91
+ scopes: Array<'repo:read' | 'repo:write' | 'repo:configure' | 'repo:admin'>;
92
+ allowedMatches?: Array<string>;
93
+ }>;
94
+ orgs: Array<{
95
+ orgName: string;
96
+ visible: boolean;
97
+ scopes: Array<'org:read' | 'org:configure' | 'org:admin'>;
98
+ }>;
99
+ };
77
100
  type AuthSyncResult = {
78
101
  success: boolean;
79
102
  };
@@ -107,7 +130,7 @@ type CommitApplyResult = {
107
130
  }>;
108
131
  };
109
132
  type ComponentDetail = {
110
- componentId: string;
133
+ ref?: string;
111
134
  componentName: string;
112
135
  version?: string;
113
136
  state?: string;
@@ -150,14 +173,14 @@ type ComponentDetail = {
150
173
  data: unknown;
151
174
  dataHash: string;
152
175
  } | null;
153
- componentId?: string;
176
+ componentRef?: string;
154
177
  }>;
155
178
  ownedThings: Array<{
156
179
  wref: string;
157
180
  name: string;
158
181
  kind: 'shape' | 'thing' | 'assertion' | 'collection';
159
182
  shapeName?: string;
160
- componentId?: string;
183
+ componentRef?: string;
161
184
  version: number;
162
185
  createdAt: number;
163
186
  data?: unknown;
@@ -172,7 +195,7 @@ type ComponentDetail = {
172
195
  };
173
196
  type ComponentListResult = {
174
197
  items: Array<{
175
- componentId: string;
198
+ ref?: string;
176
199
  componentName: string;
177
200
  version?: string;
178
201
  state?: string;
@@ -188,7 +211,7 @@ type ComponentListResult = {
188
211
  nextCursor?: string;
189
212
  };
190
213
  type ComponentSummary = {
191
- componentId: string;
214
+ ref?: string;
192
215
  componentName: string;
193
216
  version?: string;
194
217
  state?: string;
@@ -222,7 +245,7 @@ type StreamAppendInput$1 = {
222
245
  orgName: string;
223
246
  repoName: string;
224
247
  streamId: string;
225
- componentId?: string;
248
+ componentRef?: string;
226
249
  workspaceName?: never;
227
250
  committer?: string;
228
251
  message?: string;
@@ -407,7 +430,7 @@ type ShapeGetResult = {
407
430
  data: unknown;
408
431
  dataHash: string;
409
432
  } | null;
410
- componentId?: string;
433
+ componentRef?: string;
411
434
  };
412
435
  type ShapeListResult = {
413
436
  items: Array<{
@@ -420,7 +443,7 @@ type ShapeListResult = {
420
443
  data: unknown;
421
444
  dataHash: string;
422
445
  } | null;
423
- componentId?: string;
446
+ componentRef?: string;
424
447
  }>;
425
448
  };
426
449
  type ThingGetManyResult$1 = {
@@ -1006,7 +1029,7 @@ declare function submitOperationsViaStream(client: OperationStreamClient, args:
1006
1029
  committer?: string;
1007
1030
  message?: string;
1008
1031
  operations: Operation[];
1009
- componentId?: string;
1032
+ componentRef?: string;
1010
1033
  chunkSize?: number;
1011
1034
  skipExisting?: boolean;
1012
1035
  streamId?: string;
@@ -1748,7 +1771,7 @@ type SubscriptionInfo = {
1748
1771
  };
1749
1772
  allowTraceReentry?: boolean;
1750
1773
  notifyOnSuccess?: boolean;
1751
- componentId?: string;
1774
+ componentRef?: string;
1752
1775
  credentialSetNames: Array<string>;
1753
1776
  createdAt: number;
1754
1777
  };
@@ -1767,7 +1790,7 @@ type SubscriptionCompatCreateBase = {
1767
1790
  fallbackWebhookUrl?: string;
1768
1791
  allowTraceReentry?: boolean;
1769
1792
  notifyOnSuccess?: boolean;
1770
- componentId?: string;
1793
+ componentRef?: string;
1771
1794
  workspacePolicy?: never;
1772
1795
  /** @internal */
1773
1796
  actionContainer?: string;
@@ -1887,7 +1910,6 @@ type ComponentListOptions = {
1887
1910
  cursor?: string;
1888
1911
  };
1889
1912
  type ComponentRegistryInfo = {
1890
- id: string;
1891
1913
  ownerOrgName: string;
1892
1914
  componentName: string;
1893
1915
  ref: string;
@@ -1962,7 +1984,7 @@ type ComponentRegistryCliCallResult = ComponentRegistrySetupCallResult;
1962
1984
  /** @internal */
1963
1985
  type ShapeListOptions = {
1964
1986
  match?: string;
1965
- componentId?: string;
1987
+ componentRef?: string;
1966
1988
  excludeComponents?: boolean;
1967
1989
  includeRetracted?: boolean;
1968
1990
  };
@@ -2027,6 +2049,28 @@ type RepoInfo = {
2027
2049
  };
2028
2050
  /** @internal */
2029
2051
  type RepoList = RepoListResult;
2052
+ /**
2053
+ * A cross-org search hit (repo or component). GH-4383.
2054
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/globalsearchresultitem/
2055
+ */
2056
+ type GlobalSearchResultItem = {
2057
+ kind: 'repo' | 'component';
2058
+ orgName: string;
2059
+ name: string;
2060
+ description: string | null;
2061
+ };
2062
+ /** @internal */
2063
+ type GlobalSearchResult = {
2064
+ items: GlobalSearchResultItem[];
2065
+ nextCursor?: string;
2066
+ };
2067
+ /**
2068
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/globalsearchoptions/
2069
+ */
2070
+ type GlobalSearchOptions = {
2071
+ limit?: number;
2072
+ cursor?: string;
2073
+ };
2030
2074
  /** @internal */
2031
2075
  type OrgListOptions = {
2032
2076
  includeArchived?: boolean;
@@ -2321,7 +2365,7 @@ type ThingHeadRequest = {
2321
2365
  includeRetracted?: boolean;
2322
2366
  limit?: number;
2323
2367
  cursor?: string;
2324
- componentId?: string;
2368
+ componentRef?: string;
2325
2369
  excludeComponents?: boolean;
2326
2370
  excludeInfraShapes?: boolean;
2327
2371
  where?: WherePredicate[];
@@ -2575,8 +2619,8 @@ type FilterOptions = {
2575
2619
  limit?: number;
2576
2620
  /** Pagination cursor returned by the prior call. */
2577
2621
  cursor?: string;
2578
- /** Filter to records attributed to this component identifier. */
2579
- componentId?: string;
2622
+ /** Filter to records attributed to this installed component's `Org/Name` ref. */
2623
+ componentRef?: string;
2580
2624
  /** Exclude records attributed to any component. */
2581
2625
  excludeComponents?: boolean;
2582
2626
  /** Exclude internal infrastructure shapes from the result set. */
@@ -2797,6 +2841,29 @@ declare function sdkVersionIsBelowMinimum(version: string, minimum: string): boo
2797
2841
  *
2798
2842
  * @see https://docs.warmhub.ai/sdk/client/
2799
2843
  */
2844
+ /**
2845
+ * Input for {@link WarmHubClient.access.resolve} — repos/orgs addressed by name.
2846
+ * @internal
2847
+ */
2848
+ type AccessResolveInput = AccessResolveInput$1;
2849
+ /**
2850
+ * Batch effective-access result; correlate by the echoed `orgName`/`repoName`.
2851
+ * @internal
2852
+ */
2853
+ type AccessResolveResult = AccessResolveResult$1;
2854
+ /**
2855
+ * Effective repo access for the caller (one entry of {@link AccessResolveResult}).
2856
+ * @internal
2857
+ */
2858
+ type RepoAccessResult = AccessResolveResult$1['repos'][number];
2859
+ /**
2860
+ * Effective org-level access for the caller (one entry of {@link AccessResolveResult}).
2861
+ * @internal
2862
+ */
2863
+ type OrgAccessResult = AccessResolveResult$1['orgs'][number];
2864
+ /**
2865
+ * @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/
2866
+ */
2800
2867
  declare class WarmHubClient {
2801
2868
  /**
2802
2869
  * The resolved API base URL the client issues requests against. Defaults to
@@ -2839,22 +2906,21 @@ declare class WarmHubClient {
2839
2906
  whoami: () => Promise<WhoamiInfo>;
2840
2907
  };
2841
2908
  /**
2842
- * Lightweight permission checks for UI gating and service-side authorization probes.
2843
- * @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#access
2909
+ * Effective-access resolution for UI gating and service-side authorization.
2910
+ * First-party surface (web UI + whedge edge); the underlying `access.resolve`
2911
+ * procedure is `@internal`.
2912
+ * @internal
2844
2913
  */
2845
2914
  readonly access: {
2846
2915
  /**
2847
- * Check whether the caller has a repo-scoped permission.
2848
- *
2849
- * @param permission Permission string such as `repo:read`, `repo:write`, `repo:configure`, or `repo:admin`.
2850
- */
2851
- checkRepoPermission: (orgName: string, repoName: string, permission: string) => Promise<boolean>;
2852
- /**
2853
- * Check whether the caller has an org-scoped permission.
2854
- *
2855
- * @param permission Permission string such as `org:read`, `org:configure`, or `org:admin`.
2916
+ * Resolve the caller's effective access for a batch of repos and/or orgs
2917
+ * (addressed by name). Returns the coarse scope SET per target so one call
2918
+ * answers any permission via `scopes.includes(...)` e.g.
2919
+ * `scopes.includes('repo:configure')`. Non-throwing: `visible: false` means
2920
+ * not-found/not-visible; `scopes: []` means authenticated-but-no-access.
2921
+ * Correlate results by the echoed `orgName`/`repoName`, not by position.
2856
2922
  */
2857
- checkOrgPermission: (orgName: string, permission: string) => Promise<boolean>;
2923
+ resolve: (input: AccessResolveInput) => Promise<AccessResolveResult>;
2858
2924
  };
2859
2925
  /**
2860
2926
  * Connectivity and compatibility helpers for checking the configured WarmHub backend.
@@ -2897,12 +2963,24 @@ declare class WarmHubClient {
2897
2963
  * List components installed in a repository.
2898
2964
  *
2899
2965
  * Pass pagination options when a repository may have many installed components.
2966
+ *
2967
+ * Cursor contract: cursors are short-lived resume tokens for the same query
2968
+ * and result scope. If filters, visibility, or backing streams change, the
2969
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
2970
+ * cursor`; restart the query without `cursor` instead of retrying the stale
2971
+ * token.
2900
2972
  */
2901
2973
  list: (orgName: string, repoName: string, opts?: ComponentListOptions) => Promise<ComponentList>;
2902
2974
  /**
2903
- * Fetch one installed component by component ID.
2975
+ * Search public registered components across all orgs (GH-4383).
2976
+ * Public-only at launch. Distinct from listing components installed in a
2977
+ * repo (`component.list`).
2978
+ */
2979
+ search: (query: string, opts?: GlobalSearchOptions) => Promise<GlobalSearchResult>;
2980
+ /**
2981
+ * Fetch one installed component by its `Org/Name` ref.
2904
2982
  */
2905
- get: (orgName: string, repoName: string, componentId: string) => Promise<ComponentView>;
2983
+ get: (orgName: string, repoName: string, componentRef: string) => Promise<ComponentView>;
2906
2984
  /**
2907
2985
  * Registered-component identity and install-pipeline operations.
2908
2986
  *
@@ -2959,7 +3037,7 @@ declare class WarmHubClient {
2959
3037
  * @param message Optional commit message stored with the submitted operations.
2960
3038
  * @param operations Add, revise, or retract operations to submit in order.
2961
3039
  * @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.
2962
- * @param opts.componentId Attribute writes to an installed component when the caller is allowed to claim it.
3040
+ * @param opts.componentRef Attribute writes to an installed component, identified by its `Org/Name` ref, when the caller is allowed to claim it.
2963
3041
  * @param opts.chunkSize Maximum operations per stream append. Values are clamped by the SDK.
2964
3042
  * @param opts.skipExisting Return `noop` for add operations whose target already exists.
2965
3043
  * @param opts.streamId Advanced continuation hook for caller-managed streams.
@@ -2967,7 +3045,7 @@ declare class WarmHubClient {
2967
3045
  */
2968
3046
  apply: (orgName: string, repoName: string, message: string | undefined, operations: Operation[], opts?: {
2969
3047
  committer?: string;
2970
- componentId?: string;
3048
+ componentRef?: string;
2971
3049
  chunkSize?: number;
2972
3050
  skipExisting?: boolean;
2973
3051
  streamId?: string;
@@ -3122,8 +3200,19 @@ declare class WarmHubClient {
3122
3200
  * List repositories in an organization.
3123
3201
  *
3124
3202
  * Archived repositories are hidden by default. Search and sort options are applied before pagination.
3203
+ *
3204
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3205
+ * and result scope. If filters, visibility, or backing streams change, the
3206
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3207
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3208
+ * token.
3125
3209
  */
3126
3210
  list: (orgName: string, opts?: RepoListOptions) => Promise<RepoList>;
3211
+ /**
3212
+ * Search public repos across all orgs (GH-4383). Public-only at launch;
3213
+ * BM25 over name/description/shape vocabulary/README.
3214
+ */
3215
+ search: (query: string, opts?: GlobalSearchOptions) => Promise<GlobalSearchResult>;
3127
3216
  /**
3128
3217
  * Create a repository inside an organization.
3129
3218
  *
@@ -3194,6 +3283,12 @@ declare class WarmHubClient {
3194
3283
  * Each item includes exact active counts, an activity-oriented `lastWriteAt`, and a `hasErrors` flag for terminal action failures.
3195
3284
  *
3196
3285
  * Search and sort are applied before pagination, so cursors remain stable across the filtered and ordered list.
3286
+ *
3287
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3288
+ * and result scope. If filters, visibility, or backing streams change, the
3289
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3290
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3291
+ * token.
3197
3292
  */
3198
3293
  listPage: (orgName: string, opts?: RepoListPageOptions) => Promise<RepoListPageResult>;
3199
3294
  /**
@@ -3310,6 +3405,12 @@ declare class WarmHubClient {
3310
3405
  * Return add, revise, retract, and rename history for a shape.
3311
3406
  *
3312
3407
  * Use pagination options for long-lived shapes with many revisions.
3408
+ *
3409
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3410
+ * and result scope. If filters, visibility, or backing streams change, the
3411
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3412
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3413
+ * token.
3313
3414
  */
3314
3415
  history: (orgName: string, repoName: string, name: string, opts?: ShapeHistoryOptions) => Promise<ShapeHistory>;
3315
3416
  };
@@ -3416,6 +3517,12 @@ declare class WarmHubClient {
3416
3517
  * Query the live delivery feed for a subscription.
3417
3518
  *
3418
3519
  * Use this for polling or live-log views that need recent delivery status entries.
3520
+ *
3521
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3522
+ * and result scope. If filters, visibility, or backing streams change, the
3523
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3524
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3525
+ * token.
3419
3526
  */
3420
3527
  liveFeed: (orgName: string, repoName: string, subscriptionName: string, opts?: ActionLiveFeedOptions) => Promise<ActionLiveFeed>;
3421
3528
  /**
@@ -3453,18 +3560,36 @@ declare class WarmHubClient {
3453
3560
  * 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.
3454
3561
  *
3455
3562
  * Tokenless reads of public repositories have stricter page-size and page-count limits than authenticated reads.
3563
+ *
3564
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3565
+ * and result scope. If filters, visibility, or backing streams change, the
3566
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3567
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3568
+ * token.
3456
3569
  */
3457
3570
  head: (orgName: string, repoName: string, opts?: ThingHeadOptions) => Promise<ThingHead>;
3458
3571
  /**
3459
3572
  * Iterate every current HEAD row matching the supplied filters.
3460
3573
  *
3461
3574
  * 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.
3575
+ *
3576
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3577
+ * and result scope. If filters, visibility, or backing streams change, the
3578
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3579
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3580
+ * token.
3462
3581
  */
3463
3582
  headIter: (orgName: string, repoName: string, opts?: ThingHeadOptions) => AsyncIterableIterator<ThingItem>;
3464
3583
  /**
3465
3584
  * Materialize every current HEAD row matching the supplied filters.
3466
3585
  *
3467
3586
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` items have actually been observed across pages.
3587
+ *
3588
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3589
+ * and result scope. If filters, visibility, or backing streams change, the
3590
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3591
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3592
+ * token.
3468
3593
  */
3469
3594
  headAll: (orgName: string, repoName: string, opts?: ThingHeadOptions & {
3470
3595
  max?: number;
@@ -3550,6 +3675,12 @@ declare class WarmHubClient {
3550
3675
  * Return version history and timeline metadata for repository records.
3551
3676
  *
3552
3677
  * 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.
3678
+ *
3679
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3680
+ * and result scope. If filters, visibility, or backing streams change, the
3681
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3682
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3683
+ * token.
3553
3684
  */
3554
3685
  history: (orgName: string | undefined, repoName: string | undefined, opts: ThingHistoryOptions) => Promise<ThingHistory>;
3555
3686
  /**
@@ -3567,6 +3698,12 @@ declare class WarmHubClient {
3567
3698
  *
3568
3699
  * Filter by assertion shape or glob `match` pattern, optionally resolve collection targets, and page through large assertion sets with `limit` and `cursor`.
3569
3700
  *
3701
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3702
+ * and result scope. If filters, visibility, or backing streams change, the
3703
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3704
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3705
+ * token.
3706
+ *
3570
3707
  * Returns `{ target?, assertions, nextCursor? }`.
3571
3708
  * The array is named `assertions`, **not** `items`. This breaks the repo-wide
3572
3709
  * `items` convention used by `HeadResult`, `FilterResult`, `SearchResult`,
@@ -3584,12 +3721,24 @@ declare class WarmHubClient {
3584
3721
  * Iterate every assertion about a thing or collection target.
3585
3722
  *
3586
3723
  * 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.
3724
+ *
3725
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3726
+ * and result scope. If filters, visibility, or backing streams change, the
3727
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3728
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3729
+ * token.
3587
3730
  */
3588
3731
  aboutIter: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: AboutOptions) => AsyncIterableIterator<Assertion>;
3589
3732
  /**
3590
3733
  * Materialize every assertion about a thing or collection target.
3591
3734
  *
3592
3735
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` assertions have actually been observed across pages.
3736
+ *
3737
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3738
+ * and result scope. If filters, visibility, or backing streams change, the
3739
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3740
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3741
+ * token.
3593
3742
  */
3594
3743
  aboutAll: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: AboutOptions & {
3595
3744
  max?: number;
@@ -3598,18 +3747,36 @@ declare class WarmHubClient {
3598
3747
  * Query repository records by shape, kind, assertion target, text filters, or glob `match` pattern.
3599
3748
  *
3600
3749
  * 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`.
3750
+ *
3751
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3752
+ * and result scope. If filters, visibility, or backing streams change, the
3753
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3754
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3755
+ * token.
3601
3756
  */
3602
3757
  query: (orgName: string, repoName: string, opts?: FilterOptions) => Promise<FilterResult>;
3603
3758
  /**
3604
3759
  * Iterate every repository record matching the supplied filters.
3605
3760
  *
3606
3761
  * 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.
3762
+ *
3763
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3764
+ * and result scope. If filters, visibility, or backing streams change, the
3765
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3766
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3767
+ * token.
3607
3768
  */
3608
3769
  queryIter: (orgName: string, repoName: string, opts?: FilterOptions) => AsyncIterableIterator<ThingItem>;
3609
3770
  /**
3610
3771
  * Materialize every repository record matching the supplied filters.
3611
3772
  *
3612
3773
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` items have actually been observed across pages.
3774
+ *
3775
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3776
+ * and result scope. If filters, visibility, or backing streams change, the
3777
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3778
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3779
+ * token.
3613
3780
  */
3614
3781
  queryAll: (orgName: string, repoName: string, opts?: FilterOptions & {
3615
3782
  max?: number;
@@ -3618,6 +3785,12 @@ declare class WarmHubClient {
3618
3785
  * Search repository records with text, vector, or hybrid mode.
3619
3786
  *
3620
3787
  * When searching with an assertion target or collection resolution, pages may be sparse; keep paginating until `nextCursor` is absent.
3788
+ *
3789
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3790
+ * and result scope. If filters, visibility, or backing streams change, the
3791
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3792
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3793
+ * token.
3621
3794
  */
3622
3795
  search: (orgName: string, repoName: string, query: string, opts?: SearchOptions) => Promise<SearchResult>;
3623
3796
  /**
@@ -3628,18 +3801,36 @@ declare class WarmHubClient {
3628
3801
  * Query wref-typed field references for a record.
3629
3802
  *
3630
3803
  * 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.
3804
+ *
3805
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3806
+ * and result scope. If filters, visibility, or backing streams change, the
3807
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3808
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3809
+ * token.
3631
3810
  */
3632
3811
  refs: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: RefsOptions) => Promise<RefsResult>;
3633
3812
  /**
3634
3813
  * Iterate every wref-typed field reference for a record.
3635
3814
  *
3636
3815
  * 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.
3816
+ *
3817
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3818
+ * and result scope. If filters, visibility, or backing streams change, the
3819
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3820
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3821
+ * token.
3637
3822
  */
3638
3823
  refsIter: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: RefsOptions) => AsyncIterableIterator<RefLink>;
3639
3824
  /**
3640
3825
  * Materialize every wref-typed field reference for a record.
3641
3826
  *
3642
3827
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` refs have actually been observed across pages.
3828
+ *
3829
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3830
+ * and result scope. If filters, visibility, or backing streams change, the
3831
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3832
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3833
+ * token.
3643
3834
  */
3644
3835
  refsAll: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: RefsOptions & {
3645
3836
  max?: number;
@@ -3654,14 +3845,32 @@ declare class WarmHubClient {
3654
3845
  * Stream refreshed `thing.head` results whenever the repository changes.
3655
3846
  *
3656
3847
  * The SDK re-runs the underlying `thing.head` query after each invalidation and passes the latest snapshot to `onUpdate`.
3848
+ *
3849
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3850
+ * and result scope. If filters, visibility, or backing streams change, the
3851
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3852
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3853
+ * token.
3657
3854
  */
3658
3855
  thingHead: (orgName: string, repoName: string, opts: LiveThingHeadOptions | undefined, onUpdate: (result: ThingHead) => void | Promise<void>) => Promise<LiveHandle>;
3659
3856
  /**
3660
3857
  * Stream refreshed history results for a single wref whenever the repository changes.
3858
+ *
3859
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3860
+ * and result scope. If filters, visibility, or backing streams change, the
3861
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3862
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3863
+ * token.
3661
3864
  */
3662
3865
  thingHistory: (orgName: string, repoName: string, opts: LiveThingHistoryOptions, onUpdate: (result: ThingHistory) => void | Promise<void>) => Promise<LiveHandle>;
3663
3866
  /**
3664
3867
  * Stream refreshed action live-feed entries for a subscription.
3868
+ *
3869
+ * Cursor contract: cursors are short-lived resume tokens for the same query
3870
+ * and result scope. If filters, visibility, or backing streams change, the
3871
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
3872
+ * cursor`; restart the query without `cursor` instead of retrying the stale
3873
+ * token.
3665
3874
  */
3666
3875
  subscriptionLog: (orgName: string, repoName: string, subscriptionName: string, opts: LiveSubscriptionLogOptions | undefined, onUpdate: (result: ActionLiveFeed) => void | Promise<void>) => Promise<LiveHandle>;
3667
3876
  /**
@@ -3881,6 +4090,12 @@ declare class WarmHubClient {
3881
4090
  * Query the live delivery feed for a subscription.
3882
4091
  *
3883
4092
  * Use this for polling or live-log views that need recent delivery status entries.
4093
+ *
4094
+ * Cursor contract: cursors are short-lived resume tokens for the same query
4095
+ * and result scope. If filters, visibility, or backing streams change, the
4096
+ * backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
4097
+ * cursor`; restart the query without `cursor` instead of retrying the stale
4098
+ * token.
3884
4099
  */
3885
4100
  liveFeed: (orgName: string, repoName: string, subscriptionName: string, opts?: ActionLiveFeedOptions) => Promise<ActionLiveFeed>;
3886
4101
  /**
@@ -3914,4 +4129,4 @@ declare class WarmHubClient {
3914
4129
  private watchRepoQuery;
3915
4130
  }
3916
4131
 
3917
- export { type AboutOptions, type AboutResult, type AccessTokenProvider, type ActionAttemptInfo, type ActionLeaseAcquire, type ActionLeaseOp, type ActionListNotificationsOptions, type ActionListRunsOptions, type ActionLiveFeed, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddOp, type AddOperation, AllStreamOperationsFailedError, type Assertion, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionAbout, type CollectionTag, type ComponentInfo, type ComponentList, type ComponentListOptions, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, type ErrorKind, type FilterOptions, type FilterResult, type FunctionLogMode, type HeadResult, type HistoryResult, type IndexedFieldEntry, type IndexedFieldsReport, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, type Operation, OperationBuilder, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationSubmitResult, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, type RefLink, type RefsOptions, type RefsResult, type RenameResult, type RepoConfigureStatsView, type RepoDescribeResult, type RepoInfo, type RepoList, type RepoListForCallerOptions, type RepoListOptions, type RepoListPageOptions, type RepoListPageResult, type RepoLocator, type RepoRecentInfo, type RepoRef, type RepoShapeInstanceCountsView, type RepoSort, type RepoStatsBatchResult, type RepoStatsView, type RepoWithStatsInfo, type RequestEvent, type ResolveWrefResult, type RetractOp, type RetractOperation, type RetryPolicyOptions, type ReviseOp, type ReviseOperation, SDK_VERSION, type SearchOptions, type SearchResult, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeReviseOptions, type ShapeValidatorResult, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingDetail, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
4132
+ export { type AboutOptions, type AboutResult, type AccessResolveInput, type AccessResolveResult, type AccessTokenProvider, type ActionAttemptInfo, type ActionLeaseAcquire, type ActionLeaseOp, type ActionListNotificationsOptions, type ActionListRunsOptions, type ActionLiveFeed, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddOp, type AddOperation, AllStreamOperationsFailedError, type Assertion, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionAbout, type CollectionTag, type ComponentInfo, type ComponentList, type ComponentListOptions, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, type ErrorKind, type FilterOptions, type FilterResult, type FunctionLogMode, type GlobalSearchOptions, type GlobalSearchResult, type GlobalSearchResultItem, type HeadResult, type HistoryResult, type IndexedFieldEntry, type IndexedFieldsReport, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, type Operation, OperationBuilder, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationSubmitResult, type OrgAccessResult, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, type RefLink, type RefsOptions, type RefsResult, type RenameResult, type RepoAccessResult, type RepoConfigureStatsView, type RepoDescribeResult, type RepoInfo, type RepoList, type RepoListForCallerOptions, type RepoListOptions, type RepoListPageOptions, type RepoListPageResult, type RepoLocator, type RepoRecentInfo, type RepoRef, type RepoShapeInstanceCountsView, type RepoSort, type RepoStatsBatchResult, type RepoStatsView, type RepoWithStatsInfo, type RequestEvent, type ResolveWrefResult, type RetractOp, type RetractOperation, type RetryPolicyOptions, type ReviseOp, type ReviseOperation, SDK_VERSION, type SearchOptions, type SearchResult, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeReviseOptions, type ShapeValidatorResult, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingDetail, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- 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_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-OPTB23HY.js';
1
+ 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_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-I7PLCYOF.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
- import { WarmHubClient } from './chunk-OPTB23HY.js';
2
- export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-OPTB23HY.js';
1
+ import { WarmHubClient } from './chunk-I7PLCYOF.js';
2
+ export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-I7PLCYOF.js';
3
3
  import { createContext, useMemo, useState, useEffect, useContext } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/sdk-ts",
3
- "version": "0.52.1",
3
+ "version": "0.54.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",