@warmhub/sdk-ts 0.158.0 → 0.159.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
@@ -129,7 +129,7 @@ type AccessResolveResult$1 = {
129
129
  type AuthSyncResult = {
130
130
  success: boolean;
131
131
  };
132
- type CollectionTag$1 = 'arc' | 'bond' | 'pair' | 'set' | 'list';
132
+ type CollectionTag$1 = 'set' | 'list';
133
133
  type CommitRealOperationResult$1 = {
134
134
  opIndex: number;
135
135
  operation: 'add' | 'revise' | 'retract' | 'reaffirm' | 'rename' | 'redact' | 'remove' | 'restore' | 'rewrite';
@@ -245,8 +245,6 @@ type CommitRealOperationResult$1 = {
245
245
  reason: 'target_redacted';
246
246
  targetDurableId: string;
247
247
  fieldPath?: string;
248
- } | {
249
- reason: 'legacy-wrefs-window-ended';
250
248
  } | {
251
249
  reason: 'invalid_token';
252
250
  };
@@ -295,8 +293,6 @@ type CommitDiagnostic$1 = {
295
293
  reason: 'target_redacted';
296
294
  targetDurableId: string;
297
295
  fieldPath?: string;
298
- } | {
299
- reason: 'legacy-wrefs-window-ended';
300
296
  } | {
301
297
  reason: 'invalid_token';
302
298
  };
@@ -570,8 +566,6 @@ type CommitValidateResult$1 = {
570
566
  reason: 'target_redacted';
571
567
  targetDurableId: string;
572
568
  fieldPath?: string;
573
- } | {
574
- reason: 'legacy-wrefs-window-ended';
575
569
  } | {
576
570
  reason: 'invalid_token';
577
571
  };
@@ -689,8 +683,6 @@ type CommitValidateResult$1 = {
689
683
  reason: 'target_redacted';
690
684
  targetDurableId: string;
691
685
  fieldPath?: string;
692
- } | {
693
- reason: 'legacy-wrefs-window-ended';
694
686
  } | {
695
687
  reason: 'invalid_token';
696
688
  };
@@ -812,8 +804,6 @@ type CommitValidateResult$1 = {
812
804
  reason: 'target_redacted';
813
805
  targetDurableId: string;
814
806
  fieldPath?: string;
815
- } | {
816
- reason: 'legacy-wrefs-window-ended';
817
807
  } | {
818
808
  reason: 'invalid_token';
819
809
  };
@@ -983,8 +973,6 @@ type OperationEventReceipt$1 = {
983
973
  reason: 'target_redacted';
984
974
  targetDurableId: string;
985
975
  fieldPath?: string;
986
- } | {
987
- reason: 'legacy-wrefs-window-ended';
988
976
  } | {
989
977
  reason: 'invalid_token';
990
978
  };
@@ -1147,8 +1135,6 @@ type OperationEventReceiptV2 = {
1147
1135
  reason: 'target_redacted';
1148
1136
  targetDurableId: string;
1149
1137
  fieldPath?: string;
1150
- } | {
1151
- reason: 'legacy-wrefs-window-ended';
1152
1138
  } | {
1153
1139
  reason: 'invalid_token';
1154
1140
  };
@@ -1230,7 +1216,7 @@ type CollectionStatsResult$1 = {
1230
1216
  memberCount: number;
1231
1217
  uniqueMemberCount: number;
1232
1218
  };
1233
- type CollectionType$1 = 'arc' | 'bond' | 'set' | 'list' | 'pair';
1219
+ type CollectionType$1 = 'set' | 'list';
1234
1220
  type ComponentDetail = {
1235
1221
  ref?: string;
1236
1222
  componentName: string;
@@ -1440,8 +1426,6 @@ type ComponentInstallResult$1 = {
1440
1426
  reason: 'target_redacted';
1441
1427
  targetDurableId: string;
1442
1428
  fieldPath?: string;
1443
- } | {
1444
- reason: 'legacy-wrefs-window-ended';
1445
1429
  } | {
1446
1430
  reason: 'invalid_token';
1447
1431
  };
@@ -1625,8 +1609,6 @@ type ComponentUninstallResult$1 = {
1625
1609
  reason: 'target_redacted';
1626
1610
  targetDurableId: string;
1627
1611
  fieldPath?: string;
1628
- } | {
1629
- reason: 'legacy-wrefs-window-ended';
1630
1612
  } | {
1631
1613
  reason: 'invalid_token';
1632
1614
  };
@@ -2041,8 +2023,6 @@ type StreamAppendResult$1 = {
2041
2023
  reason: 'target_redacted';
2042
2024
  targetDurableId: string;
2043
2025
  fieldPath?: string;
2044
- } | {
2045
- reason: 'legacy-wrefs-window-ended';
2046
2026
  } | {
2047
2027
  reason: 'invalid_token';
2048
2028
  };
@@ -2181,8 +2161,6 @@ type StreamAppendResult$1 = {
2181
2161
  reason: 'target_redacted';
2182
2162
  targetDurableId: string;
2183
2163
  fieldPath?: string;
2184
- } | {
2185
- reason: 'legacy-wrefs-window-ended';
2186
2164
  } | {
2187
2165
  reason: 'invalid_token';
2188
2166
  };
@@ -2195,6 +2173,14 @@ type StreamAppendResult$1 = {
2195
2173
  submissionId?: string;
2196
2174
  pruned?: true;
2197
2175
  };
2176
+ uploads?: Array<{
2177
+ opIndex: number;
2178
+ name: string;
2179
+ fileId: string;
2180
+ url: string;
2181
+ maxBytes: number;
2182
+ expiresAt: string;
2183
+ }>;
2198
2184
  results?: Array<{
2199
2185
  opIndex: number;
2200
2186
  operation: 'add' | 'revise' | 'retract' | 'reaffirm' | 'rename' | 'redact' | 'remove' | 'restore' | 'rewrite';
@@ -2310,8 +2296,6 @@ type StreamAppendResult$1 = {
2310
2296
  reason: 'target_redacted';
2311
2297
  targetDurableId: string;
2312
2298
  fieldPath?: string;
2313
- } | {
2314
- reason: 'legacy-wrefs-window-ended';
2315
2299
  } | {
2316
2300
  reason: 'invalid_token';
2317
2301
  };
@@ -2437,8 +2421,6 @@ type StreamingSubmissionRow$1 = {
2437
2421
  reason: 'target_redacted';
2438
2422
  targetDurableId: string;
2439
2423
  fieldPath?: string;
2440
- } | {
2441
- reason: 'legacy-wrefs-window-ended';
2442
2424
  } | {
2443
2425
  reason: 'invalid_token';
2444
2426
  };
@@ -2623,8 +2605,6 @@ type CommitApplyCompatibilityResult$1 = {
2623
2605
  reason: 'target_redacted';
2624
2606
  targetDurableId: string;
2625
2607
  fieldPath?: string;
2626
- } | {
2627
- reason: 'legacy-wrefs-window-ended';
2628
2608
  } | {
2629
2609
  reason: 'invalid_token';
2630
2610
  };
@@ -2763,8 +2743,6 @@ type CommitApplyCompatibilityResult$1 = {
2763
2743
  reason: 'target_redacted';
2764
2744
  targetDurableId: string;
2765
2745
  fieldPath?: string;
2766
- } | {
2767
- reason: 'legacy-wrefs-window-ended';
2768
2746
  } | {
2769
2747
  reason: 'invalid_token';
2770
2748
  };
@@ -2779,7 +2757,7 @@ type CommitApplyCompatibilityResult$1 = {
2779
2757
  };
2780
2758
  };
2781
2759
  type CollectionMutationCompatibilityResult = {
2782
- type?: 'arc' | 'bond' | 'set' | 'list' | 'pair';
2760
+ type?: 'set' | 'list';
2783
2761
  wref?: string;
2784
2762
  version?: number;
2785
2763
  memberCount?: number;
@@ -2935,8 +2913,6 @@ type CollectionMutationCompatibilityResult = {
2935
2913
  reason: 'target_redacted';
2936
2914
  targetDurableId: string;
2937
2915
  fieldPath?: string;
2938
- } | {
2939
- reason: 'legacy-wrefs-window-ended';
2940
2916
  } | {
2941
2917
  reason: 'invalid_token';
2942
2918
  };
@@ -3075,8 +3051,6 @@ type CollectionMutationCompatibilityResult = {
3075
3051
  reason: 'target_redacted';
3076
3052
  targetDurableId: string;
3077
3053
  fieldPath?: string;
3078
- } | {
3079
- reason: 'legacy-wrefs-window-ended';
3080
3054
  } | {
3081
3055
  reason: 'invalid_token';
3082
3056
  };
@@ -3218,8 +3192,6 @@ type RemoveCompatibilityResult = {
3218
3192
  reason: 'target_redacted';
3219
3193
  targetDurableId: string;
3220
3194
  fieldPath?: string;
3221
- } | {
3222
- reason: 'legacy-wrefs-window-ended';
3223
3195
  } | {
3224
3196
  reason: 'invalid_token';
3225
3197
  };
@@ -3358,8 +3330,6 @@ type RemoveCompatibilityResult = {
3358
3330
  reason: 'target_redacted';
3359
3331
  targetDurableId: string;
3360
3332
  fieldPath?: string;
3361
- } | {
3362
- reason: 'legacy-wrefs-window-ended';
3363
3333
  } | {
3364
3334
  reason: 'invalid_token';
3365
3335
  };
@@ -3501,8 +3471,6 @@ type RenameCompatibilityResult = {
3501
3471
  reason: 'target_redacted';
3502
3472
  targetDurableId: string;
3503
3473
  fieldPath?: string;
3504
- } | {
3505
- reason: 'legacy-wrefs-window-ended';
3506
3474
  } | {
3507
3475
  reason: 'invalid_token';
3508
3476
  };
@@ -3641,8 +3609,6 @@ type RenameCompatibilityResult = {
3641
3609
  reason: 'target_redacted';
3642
3610
  targetDurableId: string;
3643
3611
  fieldPath?: string;
3644
- } | {
3645
- reason: 'legacy-wrefs-window-ended';
3646
3612
  } | {
3647
3613
  reason: 'invalid_token';
3648
3614
  };
@@ -3786,8 +3752,6 @@ type RewriteCompatibilityResult = {
3786
3752
  reason: 'target_redacted';
3787
3753
  targetDurableId: string;
3788
3754
  fieldPath?: string;
3789
- } | {
3790
- reason: 'legacy-wrefs-window-ended';
3791
3755
  } | {
3792
3756
  reason: 'invalid_token';
3793
3757
  };
@@ -3926,8 +3890,6 @@ type RewriteCompatibilityResult = {
3926
3890
  reason: 'target_redacted';
3927
3891
  targetDurableId: string;
3928
3892
  fieldPath?: string;
3929
- } | {
3930
- reason: 'legacy-wrefs-window-ended';
3931
3893
  } | {
3932
3894
  reason: 'invalid_token';
3933
3895
  };
@@ -4072,8 +4034,6 @@ type ShapeChangeCompatibilityResult = {
4072
4034
  reason: 'target_redacted';
4073
4035
  targetDurableId: string;
4074
4036
  fieldPath?: string;
4075
- } | {
4076
- reason: 'legacy-wrefs-window-ended';
4077
4037
  } | {
4078
4038
  reason: 'invalid_token';
4079
4039
  };
@@ -4212,8 +4172,6 @@ type ShapeChangeCompatibilityResult = {
4212
4172
  reason: 'target_redacted';
4213
4173
  targetDurableId: string;
4214
4174
  fieldPath?: string;
4215
- } | {
4216
- reason: 'legacy-wrefs-window-ended';
4217
4175
  } | {
4218
4176
  reason: 'invalid_token';
4219
4177
  };
@@ -4359,8 +4317,6 @@ type ShapeRemoveCompatibilityResult = {
4359
4317
  reason: 'target_redacted';
4360
4318
  targetDurableId: string;
4361
4319
  fieldPath?: string;
4362
- } | {
4363
- reason: 'legacy-wrefs-window-ended';
4364
4320
  } | {
4365
4321
  reason: 'invalid_token';
4366
4322
  };
@@ -4499,8 +4455,6 @@ type ShapeRemoveCompatibilityResult = {
4499
4455
  reason: 'target_redacted';
4500
4456
  targetDurableId: string;
4501
4457
  fieldPath?: string;
4502
- } | {
4503
- reason: 'legacy-wrefs-window-ended';
4504
4458
  } | {
4505
4459
  reason: 'invalid_token';
4506
4460
  };
@@ -5009,8 +4963,8 @@ type TokenCreateInput = {
5009
4963
  shapeless?: boolean;
5010
4964
  };
5011
4965
  }>;
5012
- allowedMatches?: unknown;
5013
- allowedShapes?: unknown;
4966
+ allowedMatches?: never;
4967
+ allowedShapes?: never;
5014
4968
  }>;
5015
4969
  structured?: boolean;
5016
4970
  description?: string;
@@ -5624,14 +5578,7 @@ declare function contentFieldLimitError(path: string, value: string): string | n
5624
5578
  * after a `lease_held` to back off until the lease expires (#3625).
5625
5579
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/warmhuberrordetails/
5626
5580
  */
5627
- type WarmHubErrorDetails = NonNullable<CommitDiagnostic$1['details']>
5628
- /**
5629
- * A `CLIENT_INCOMPATIBLE` refusal's cause, a stable reason to branch on:
5630
- * `legacy-wrefs-sdk` is the SDK refusing every call under `legacy-wrefs`.
5631
- */
5632
- | {
5633
- reason: 'legacy-wrefs-sdk';
5634
- } | OldNameDetails;
5581
+ type WarmHubErrorDetails = NonNullable<CommitDiagnostic$1['details']> | OldNameDetails;
5635
5582
  /**
5636
5583
  * Why a Thing read refused with `NOT_FOUND` although it can be answered: the
5637
5584
  * name asked for is an old `Shape/name` spelling, and `currentName` is the
@@ -5839,21 +5786,6 @@ declare const DEPENDENCY_FAILED = "DEPENDENCY_FAILED";
5839
5786
  */
5840
5787
  declare function isShapeReference(value: unknown): value is string;
5841
5788
 
5842
- /**
5843
- * The SDK's refusal under `legacy-wrefs` (adjudicator's final wording).
5844
- * @see https://docs.warmhub.ai/sdk-reference/variables/legacy_wrefs_refusal/
5845
- */
5846
- declare const LEGACY_WREFS_REFUSAL = "`legacy-wrefs` is set; the SDKs are v2-only. Unset it, or use the `wh` CLI for v1.";
5847
- /**
5848
- * @internal How a send path treats operations.
5849
- *
5850
- * - `v2`: every operation is checked, and keepShapes revises resolved.
5851
- * - `passThrough`: the CLI's raw input under `legacy-wrefs`, sent as given.
5852
- * A builder or a keepShapes revise is still refused: both are v2 payloads,
5853
- * and keepShapes needs a v2 read.
5854
- */
5855
- type OperationChecks = 'v2' | 'passThrough';
5856
-
5857
5789
  /**
5858
5790
  * Batch Thing read a keepShapes revise's Shapes and version come from, as
5859
5791
  * {@link createKeepShapesResolver} takes it.
@@ -5939,12 +5871,9 @@ type CommitValidateOperations = readonly CommitValidateOperation[] | QueuedOpera
5939
5871
  * @internal The commit.validate request input: the CLI byte preflight builds
5940
5872
  * it from raw operations; {@link sendCommitValidate} takes its header from it
5941
5873
  * and supplies operations already resolved (keepShapes revises), then checks
5942
- * that body against the same limit. `checks` is
5943
- * `passThrough` only for the CLI's byte preflight of raw input under
5944
- * legacy-wrefs: this builds an input and sends nothing, and only a
5945
- * pass-through client can send one.
5874
+ * that body against the same limit.
5946
5875
  */
5947
- declare function createCommitValidateInput(orgName: string, repoName: string, operations: readonly CommitValidateOperation[], opts?: CommitValidateOptions, checks?: OperationChecks): CommitValidateInput;
5876
+ declare function createCommitValidateInput(orgName: string, repoName: string, operations: readonly CommitValidateOperation[], opts?: CommitValidateOptions): CommitValidateInput;
5948
5877
  /**
5949
5878
  * Serialize the exact body sent by the dedicated unbatched tRPC HTTP link.
5950
5879
  *
@@ -6044,13 +5973,6 @@ declare const DEFAULT_STREAM_CHUNK_SIZE = 1000;
6044
5973
  */
6045
5974
  declare const MAX_STREAM_APPEND_OPERATION_COUNT = 10000;
6046
5975
  interface OperationStreamClient {
6047
- /**
6048
- * The normalized client flags this client stamps on its requests. A
6049
- * `WarmHubClient` reports them. Under `legacy-wrefs` nothing is sent. A
6050
- * stream client that reports no flags is treated as having none: if it
6051
- * stamps `legacy-wrefs` on its requests itself, report it here.
6052
- */
6053
- readonly clientFlags?: readonly string[];
6054
5976
  stream: {
6055
5977
  append(input: StreamAppendInput$1): Promise<StreamAppendResult$1>;
6056
5978
  };
@@ -6079,6 +6001,12 @@ type SubmittedStreamResult = {
6079
6001
  operations: CommitRealOperationResult$1[];
6080
6002
  /** One exact immutable receipt per stream chunk, in submission order. */
6081
6003
  receipts: OperationEventReceipt$1[];
6004
+ /**
6005
+ * Upload tickets for the files this submission's operations started, with
6006
+ * `opIndex` across the whole submission; absent when there are none. A
6007
+ * receipt lookup carries none; resubmitting the same submission re-mints them.
6008
+ */
6009
+ uploads?: NonNullable<StreamAppendResult$1['uploads']>;
6082
6010
  };
6083
6011
  /**
6084
6012
  * Stream identity metadata for caller-managed streamed commit submissions.
@@ -6136,6 +6064,12 @@ declare class PartialStreamSubmissionError extends Error {
6136
6064
  * @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#completedoperations
6137
6065
  */
6138
6066
  readonly completedOperations: SubmittedStreamResult['operations'];
6067
+ /**
6068
+ * Upload tickets from acknowledged chunks, with submission-wide `opIndex`.
6069
+ * Receipts omit tickets, so this is the only place they survive a failure.
6070
+ * @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#uploads
6071
+ */
6072
+ readonly uploads: NonNullable<SubmittedStreamResult['uploads']>;
6139
6073
  readonly submissionId: string;
6140
6074
  readonly eventRequestId: string;
6141
6075
  readonly chunkOrdinal: number;
@@ -6169,6 +6103,7 @@ declare class PartialStreamSubmissionError extends Error {
6169
6103
  cause: unknown;
6170
6104
  completedReceipts: readonly OperationEventReceipt$1[];
6171
6105
  completedOperations?: SubmittedStreamResult['operations'];
6106
+ uploads?: NonNullable<SubmittedStreamResult['uploads']>;
6172
6107
  acknowledgedOperationCount?: number;
6173
6108
  lastAcknowledgedRepoSeq?: number;
6174
6109
  attemptedAppendOutcome: 'not_applied' | 'unknown';
@@ -6201,6 +6136,7 @@ declare class AllStreamOperationsFailedError extends Error {
6201
6136
  constructor(result: SubmittedStreamResult);
6202
6137
  }
6203
6138
 
6139
+ type StreamAppendUpload = NonNullable<SubmittedStreamResult['uploads']>[number];
6204
6140
  /**
6205
6141
  * Running reducer over stream-append chunk outputs.
6206
6142
  *
@@ -6214,6 +6150,7 @@ declare class AllStreamOperationsFailedError extends Error {
6214
6150
  declare class StreamSubmissionAggregator {
6215
6151
  readonly receipts: OperationEventReceipt$1[];
6216
6152
  private readonly operations;
6153
+ private readonly uploads;
6217
6154
  private readonly statusCounts;
6218
6155
  /** True once at least one row landed and every row failed. */
6219
6156
  get allFailed(): boolean;
@@ -6221,10 +6158,13 @@ declare class StreamSubmissionAggregator {
6221
6158
  addChunk(input: {
6222
6159
  receipt: OperationEventReceipt$1;
6223
6160
  chunkStart: number;
6161
+ uploads?: readonly StreamAppendUpload[];
6224
6162
  }): void;
6225
6163
  addReceipt(receipt: OperationEventReceipt$1): void;
6226
6164
  /** Rows confirmed applied or noop, for partial-submission recovery. */
6227
6165
  completedOperations(): SubmittedStreamResult['operations'];
6166
+ /** Upload tickets from acknowledged chunks; receipts never carry them. */
6167
+ completedUploads(): StreamAppendUpload[];
6228
6168
  /** Project the accumulated state into the legacy aggregate write result. */
6229
6169
  toResult(meta: {
6230
6170
  committer?: string;
@@ -7272,10 +7212,10 @@ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' |
7272
7212
  * @remarks
7273
7213
  * Stable kinds (members of `CoreErrorKind`):
7274
7214
  *
7275
- * - `BACKEND` — cause: server-side failure that did not carry a more specific domain code (tRPC error data has no `data.warmhub.code`, REST status mapped to the catch-all default — primarily 5xx that lack a body `error.code` — or an SDK transport throw such as a non-OK SSE response); retryable: true; action: retry with backoff and surface the message if it persists; if the underlying error is a deterministic local-adapter failure (e.g. a misconfigured custom `fetch`), fix the adapter rather than retrying; origin: SDK tRPC fallback, `httpStatusToWarmHubCode` default for unmapped HTTP statuses, SSE transport, unknown thrown values inside tRPC paths (custom-`fetch` adapter throws are normalized to `BACKEND` only on tRPC surfaces — on REST and `ping` surfaces the raw error escapes uncaught). REST responses with a parseable body surface as their pass-through `error.code` (typically `INTERNAL_ERROR`), and REST 4xx responses without a body code fall through to the HTTP-status mapping (`NOT_FOUND`, `UNAUTHENTICATED`, `FORBIDDEN`, `CONFLICT`, `VALIDATION_ERROR`, `RATE_LIMITED`), not `BACKEND`.
7215
+ * - `BACKEND` — cause: server-side failure that did not carry a more specific domain code (tRPC error data has no `data.warmhub.code`, REST status mapped to the catch-all default — primarily 5xx that lack a body `error.code` — or an SDK transport throw such as a missing SSE body); retryable: true; action: retry with backoff and surface the message if it persists; if the underlying error is a deterministic local-adapter failure (e.g. a misconfigured custom `fetch`), fix the adapter rather than retrying; origin: SDK tRPC fallback, `httpStatusToWarmHubCode` default for unmapped HTTP statuses (an SSE 5xx included), unknown thrown values inside tRPC paths (custom-`fetch` adapter throws are normalized to `BACKEND` only on tRPC surfaces — on REST and `ping` surfaces the raw error escapes uncaught). REST responses with a parseable body surface as their pass-through `error.code` (typically `INTERNAL_ERROR`), and REST 4xx responses without a body code fall through to the HTTP-status mapping (`NOT_FOUND`, `UNAUTHENTICATED`, `FORBIDDEN`, `CONFLICT`, `VALIDATION_ERROR`, `RATE_LIMITED`), not `BACKEND`.
7276
7216
  * - `NOT_FOUND` — cause: a referenced entity (repo, org, thing, shape, subscription, credential set, etc.) is missing or the caller cannot see it, or the client hit a removed/renamed tRPC procedure path or unsupported method because its route contract is out of sync with the backend; retryable: false; action: verify the identifier the call site used (wref, slug, name) and escalate to a caller with read access if the entity should exist; when the message or hint names a procedure/method mismatch, upgrade the WarmHub client to match the backend; origin: SDK reads across all surfaces, commit pipeline, REST query endpoints, tRPC transport 404/405 route-missing/version-skew failures
7277
7217
  * - `FORBIDDEN` — cause: caller is authenticated but lacks the required permission; retryable: false; action: request the missing permission or use a token with broader scope; origin: SDK + REST authorization middleware
7278
- * - `UNAUTHENTICATED` — cause: missing, expired, or invalid bearer token on a tRPC or REST call; retryable: false; action: mint a fresh PAT and update whichever client option the application wires it into (`auth.getToken` callback or `accessToken` — the SDK does not read `WH_TOKEN` or any env var directly); `wh auth login` only refreshes the CLI's on-disk credentials and does not propagate to a constructed SDK client; for export tickets, remint via the appropriate backend endpoint; origin: SDK + REST auth middleware. Live-ticket SSE auth failures surface as `BACKEND`, not `UNAUTHENTICATED`, because `openSse` maps every non-OK SSE response to `BACKEND`.
7218
+ * - `UNAUTHENTICATED` — cause: missing, expired, or invalid bearer token on a tRPC or REST call; retryable: false; action: mint a fresh PAT and update whichever client option the application wires it into (`auth.getToken` callback or `accessToken` — the SDK does not read `WH_TOKEN` or any env var directly); `wh auth login` only refreshes the CLI's on-disk credentials and does not propagate to a constructed SDK client; for export tickets, remint via the appropriate backend endpoint; origin: SDK + REST auth middleware. A live helper's `/sse` refusal keeps its code (an invalid ticket is `UNAUTHENTICATED`) and ends its reconnect loop.
7279
7219
  * - `VALIDATION_ERROR` — cause: input failed schema, shape, content-length, or read-pagination cursor validation; retryable: false; action: fix the offending field per the error message, or restart the read without a stale/non-advancing cursor; origin: commit pipeline, SDK writes, SDK read pagination helpers, client-side content limits
7280
7220
  * - `CONFLICT` — cause: write collides with current state (concurrent edit, name already in use); retryable: false; action: refetch the current state and reconcile before retrying the write; origin: commit pipeline, repo/org creation. Archived org / repo writes surface as the pass-through code `ARCHIVED`, not `CONFLICT`.
7281
7221
  * - `RATE_LIMITED` — cause: caller exceeded the per-token or per-org request budget; retryable: true; action: wait {@link WarmHubError.retryAfter} seconds before retrying; origin: REST + tRPC throttling
@@ -8329,11 +8269,19 @@ type LiveWatchResult = {
8329
8269
  updates: number;
8330
8270
  };
8331
8271
  /**
8332
- * Handle returned by live subscription helpers.
8272
+ * Handle returned by live subscription helpers. The stream reconnects on its
8273
+ * own (the server ends each stream when its ticket expires, so access is
8274
+ * re-decided on every reconnect).
8333
8275
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/livehandle/
8334
8276
  */
8335
8277
  type LiveHandle = {
8336
8278
  close: () => void;
8279
+ /**
8280
+ * Resolves once the handle is closed or its signal aborts; rejects when the
8281
+ * loop stops on an error it does not retry: a refused reconnect
8282
+ * (`NOT_FOUND`, `UNAUTHENTICATED`, `FORBIDDEN`, ...) or a throw from your
8283
+ * callback.
8284
+ */
8337
8285
  closed: Promise<LiveWatchResult>;
8338
8286
  };
8339
8287
  /** @internal */
@@ -8510,12 +8458,8 @@ type SearchResult = Omit<HeadResult, 'repoSeq'>;
8510
8458
  type RefsResult = RefsResult$1;
8511
8459
  /** @internal */
8512
8460
  type CollectionType = CollectionType$1;
8513
- /**
8514
- * @internal What `collection.create` accepts. The legacy arc/bond/pair sugar is
8515
- * accepted during the compatibility window (issue #10668) and lowered by the
8516
- * backend to ordinary Things with a deprecation warning.
8517
- */
8518
- type CollectionWriteType = CollectionType;
8461
+ /** @internal What `collection.create` writes. */
8462
+ type CollectionWriteType = Extract<CollectionType, 'set' | 'list'>;
8519
8463
  /** @internal */
8520
8464
  type CollectionMutationResult = CollectionMutationCompatibilityResult;
8521
8465
  /** @internal */
@@ -8963,21 +8907,13 @@ declare class WarmHubClient {
8963
8907
  private noteCompatibilityHeaders;
8964
8908
  private noteCompatibilityOverride;
8965
8909
  private assertWriteCompatible;
8966
- /**
8967
- * Why a request may not leave under `legacy-wrefs`, or `undefined` when it
8968
- * may. The SDK sends nothing under the flag. The CLI's pass-through lets
8969
- * reads and the raw commit routes through; the typed seams upstream have
8970
- * already refused builder output and keepShapes.
8971
- */
8972
- private legacyWrefsRefusal;
8973
8910
  /**
8974
8911
  * The low-level `stream.append` takes operations as given, but a pinned
8975
- * Shape is refused locally as everywhere else. The
8976
- * CLI's enrolled pass-through under `legacy-wrefs` sends raw v1 unchanged.
8912
+ * Shape is refused locally as everywhere else.
8977
8913
  */
8978
8914
  private pinnedShapeRefusal;
8979
8915
  /** Local refusals, ahead of every other link and the compatibility probe. */
8980
- private createLegacyWrefsLink;
8916
+ private createLocalRefusalLink;
8981
8917
  private createCompatibilityLink;
8982
8918
  /**
8983
8919
  * Authentication helpers for browser sign-in flows, session checks, and token diagnostics.
@@ -10815,8 +10751,7 @@ declare class WarmHubClient {
10815
10751
  constructor(options?: WarmHubClientOptions);
10816
10752
  /**
10817
10753
  * The normalized `clientFlags` this client stamps on every request: frozen,
10818
- * so it can be read but not changed. Under `legacy-wrefs` the client sends
10819
- * nothing (see {@link LEGACY_WREFS_REFUSAL}).
10754
+ * so it can be read but not changed.
10820
10755
  * @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#clientflags
10821
10756
  */
10822
10757
  get clientFlags(): readonly string[];
@@ -10941,6 +10876,14 @@ declare class WarmHubClient {
10941
10876
  */
10942
10877
  listNotifications: (orgName: string, repoName: string, opts?: ActionListNotificationsOptions) => Promise<ActionNotificationInfo[]>;
10943
10878
  };
10879
+ /**
10880
+ * Keeps a repository stream open until `signal` aborts. Every connection
10881
+ * asks for a fresh ticket, so when the server ends a stream at ticket
10882
+ * expiry, the reconnect is decided against current authority. A retryable
10883
+ * failure reconnects after a pause; any other failure, or one thrown by the
10884
+ * consumer, ends the loop with that error.
10885
+ */
10886
+ private runLiveLoop;
10944
10887
  private openSse;
10945
10888
  /**
10946
10889
  * Stamp the `X-WarmHub-Client` self-identification and `X-WarmHub-Client-Flags`
@@ -10960,4 +10903,4 @@ declare class WarmHubClient {
10960
10903
  private watchRepoQuery;
10961
10904
  }
10962
10905
 
10963
- export { type AboutOptions, type AboutResult, type AccessResolveInput, type AccessResolveResult, type AccessTokenProvider, type ActionAttemptInfo, type ActionDeliveryTarget, type ActionLeaseAcquire, type ActionLeaseOp, type ActionListNotificationsOptions, type ActionListRunsOptions, type ActionLiveFeed, type ActionLiveFeedItem, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddInput, type AddOperation, AllStreamOperationsFailedError, type Assertion, CHECKPOINT_CONTENT_TYPES, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, COMPONENT_INSTALL_RESULT_STATES, COMPONENT_SUMMARY_STATES, CONTENT_FIELD_LIMIT_ERROR, CREDENTIAL_SCOPES, type CheckpointContentType, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionContainsOptions, type CollectionContainsResult, type CollectionCreateOptions, type CollectionDiffOptions, type CollectionDiffResult, type CollectionMember, type CollectionMembersOptions, type CollectionMembersPage, type CollectionMembershipRole, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type CollectionWriteType, type CommitApplyCompatibilityResult, type CommitDiagnostic, type CommitRealOperationResult, type CommitValidateInput, type CommitValidateOperation, type CommitValidateOperations, type CommitValidateOptions, type CommitValidateResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentInstallResultState, type ComponentList, type ComponentListOptions, type ComponentSummaryState, type ComponentUninstallOptions, type ComponentUninstallResult, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialScope, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, DEPENDENCY_FAILED, type DeclaredFieldEntry, type ErrorKind, type FieldIndexCarryingMarker, type FieldIndexCarryingShape, type FieldIndexConsistency, type FieldIndexPinResult, type FilterOptions, type FilterResult, type FunctionLogMode, GLOBAL_SEARCH_RESULT_ITEM_KINDS, type GlobalSearchOptions, type GlobalSearchResult, type GlobalSearchResultItem, type GlobalSearchResultItemKind, type Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRecipientSelector, type GrantRevokeResult, HOMEPAGE_FEATURED_ITEM_KINDS, type HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedItemKind, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type KeepShapesRevise, LEGACY_WREFS_REFUSAL, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_COMMIT_VALIDATION_ENCODED_BYTES, MAX_COMMIT_VALIDATION_OPERATIONS, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, MAX_WREFS_PER_THING_VERSION, type MemberScopeEntry, ORG_AUTH_SCOPES, ORG_MEMBER_STATUSES, ORG_ROLES, type OldNameDetails, type Operation, OperationBuilder, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationEventReceipt, type OperationEventReceiptMetadata, type OperationSource, type OperationSubmitResult, type OrgAccessResult, type OrgAuthScope, type OrgDetail, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgMemberStatus, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, REPO_AUTH_SCOPES, type ReaffirmInput, type ReaffirmOperation, type RedactOptions, type RedactResult, type RefLink, type RefsOptions, type RefsResult, type RemoveOperation, type RemoveOptions, type RemoveResult, type RenameOperation, type RenameOptions, type RenameResult, type RepoAccessResult, type RepoAuthScope, type RepoConfigureStatsView, type RepoDescribeResult, type RepoExploreBrowseOptions, type RepoExploreItem, type RepoExploreOptions, type RepoExploreResult, type RepoInfo, type RepoLicense, 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 RepositoryCheckpointAccess, type RepositoryCheckpointStatus, type RepositoryExportDeltaFormats, RepositoryExportError, type RepositoryExportErrorReason, type RepositoryExportExpectation, type RepositoryExportOptions, type RepositoryExportPreparation, type RepositoryExportPrepareOptions, type RepositoryExportRestoreOptions, type RepositoryExportRowMap, type RepositoryExportRows, type RepositoryExportSegmentOptions, RepositoryExportSession, type RequestEvent, type ResolveWrefResult, type RestoreInput, type RestoreOperation, type RetractInput, type RetractOperation, type RetryPolicyOptions, type ReviseInput, type ReviseOperation, type RewriteOperation, type RewriteOptions, type RewriteResult, SDK_VERSION, SUBSCRIBABLE_EVENT_TYPES, type ScopeAllowedShapes, type SearchOptions, type SearchResult, type ServiceAccountInfo, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeRemoveOptions, type ShapeReviseOptions, type ShapeValidatorResult, type ShapesChoice, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, StreamSubmissionAggregator, type StreamingSubmissionHandle, type StreamingSubmissionOptions, StreamingSubmissionOutcomeUnknownError, type StreamingSubmissionRetryIdentity, type StreamingSubmissionRow, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingChanges, type ThingDetail, type ThingDetailFields, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadChangesOptions, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type ThingNamesResult, type ThingQueryChangesOptions, type ThingShapesReader, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, type ViewEvaluateOptions, type ViewEvaluateResult, WarmHubClient, type WarmHubClientOptions, type WarmHubDecorations, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, type WriteOperation, WriteOperationError, applyRepositoryExportDelta, collectDurableTokens, commitValidateRequestBodyBytes, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createCommitValidateInput, createKeepShapesResolver, createOperationEventRequestId, createOperationEventSubmissionId, createRepositoryExportSession, encodeCommitValidateRequestBody, getResponseDecorations, isAllStreamOperationsFailedError, isConnectionError, isDefiniteStreamAppendRejection, isKnownCheckpointContentType, isKnownComponentInstallResultState, isKnownComponentSummaryState, isKnownCredentialScope, isKnownGlobalSearchResultItemKind, isKnownHomepageFeaturedItemKind, isKnownOrgAuthScope, isKnownOrgMemberStatus, isKnownOrgRole, isKnownRepoAuthScope, isKnownSubscribableEventType, isRetryable, isShapeReference, isWarmHubError, normalizeWref, operationEventStreamRequestId, readRepositoryExportStream, resolveFunctionLogMode, restoreRepositoryExportSession, sanitizeErrorMessage, sdkVersionIsBelowMinimum, shapeName, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
10906
+ export { type AboutOptions, type AboutResult, type AccessResolveInput, type AccessResolveResult, type AccessTokenProvider, type ActionAttemptInfo, type ActionDeliveryTarget, type ActionLeaseAcquire, type ActionLeaseOp, type ActionListNotificationsOptions, type ActionListRunsOptions, type ActionLiveFeed, type ActionLiveFeedItem, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddInput, type AddOperation, AllStreamOperationsFailedError, type Assertion, CHECKPOINT_CONTENT_TYPES, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, COMPONENT_INSTALL_RESULT_STATES, COMPONENT_SUMMARY_STATES, CONTENT_FIELD_LIMIT_ERROR, CREDENTIAL_SCOPES, type CheckpointContentType, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionContainsOptions, type CollectionContainsResult, type CollectionCreateOptions, type CollectionDiffOptions, type CollectionDiffResult, type CollectionMember, type CollectionMembersOptions, type CollectionMembersPage, type CollectionMembershipRole, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type CollectionWriteType, type CommitApplyCompatibilityResult, type CommitDiagnostic, type CommitRealOperationResult, type CommitValidateInput, type CommitValidateOperation, type CommitValidateOperations, type CommitValidateOptions, type CommitValidateResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentInstallResultState, type ComponentList, type ComponentListOptions, type ComponentSummaryState, type ComponentUninstallOptions, type ComponentUninstallResult, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialScope, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, DEPENDENCY_FAILED, type DeclaredFieldEntry, type ErrorKind, type FieldIndexCarryingMarker, type FieldIndexCarryingShape, type FieldIndexConsistency, type FieldIndexPinResult, type FilterOptions, type FilterResult, type FunctionLogMode, GLOBAL_SEARCH_RESULT_ITEM_KINDS, type GlobalSearchOptions, type GlobalSearchResult, type GlobalSearchResultItem, type GlobalSearchResultItemKind, type Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRecipientSelector, type GrantRevokeResult, HOMEPAGE_FEATURED_ITEM_KINDS, type HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedItemKind, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type KeepShapesRevise, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_COMMIT_VALIDATION_ENCODED_BYTES, MAX_COMMIT_VALIDATION_OPERATIONS, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, MAX_WREFS_PER_THING_VERSION, type MemberScopeEntry, ORG_AUTH_SCOPES, ORG_MEMBER_STATUSES, ORG_ROLES, type OldNameDetails, type Operation, OperationBuilder, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationEventReceipt, type OperationEventReceiptMetadata, type OperationSource, type OperationSubmitResult, type OrgAccessResult, type OrgAuthScope, type OrgDetail, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgMemberStatus, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, REPO_AUTH_SCOPES, type ReaffirmInput, type ReaffirmOperation, type RedactOptions, type RedactResult, type RefLink, type RefsOptions, type RefsResult, type RemoveOperation, type RemoveOptions, type RemoveResult, type RenameOperation, type RenameOptions, type RenameResult, type RepoAccessResult, type RepoAuthScope, type RepoConfigureStatsView, type RepoDescribeResult, type RepoExploreBrowseOptions, type RepoExploreItem, type RepoExploreOptions, type RepoExploreResult, type RepoInfo, type RepoLicense, 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 RepositoryCheckpointAccess, type RepositoryCheckpointStatus, type RepositoryExportDeltaFormats, RepositoryExportError, type RepositoryExportErrorReason, type RepositoryExportExpectation, type RepositoryExportOptions, type RepositoryExportPreparation, type RepositoryExportPrepareOptions, type RepositoryExportRestoreOptions, type RepositoryExportRowMap, type RepositoryExportRows, type RepositoryExportSegmentOptions, RepositoryExportSession, type RequestEvent, type ResolveWrefResult, type RestoreInput, type RestoreOperation, type RetractInput, type RetractOperation, type RetryPolicyOptions, type ReviseInput, type ReviseOperation, type RewriteOperation, type RewriteOptions, type RewriteResult, SDK_VERSION, SUBSCRIBABLE_EVENT_TYPES, type ScopeAllowedShapes, type SearchOptions, type SearchResult, type ServiceAccountInfo, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeRemoveOptions, type ShapeReviseOptions, type ShapeValidatorResult, type ShapesChoice, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, StreamSubmissionAggregator, type StreamingSubmissionHandle, type StreamingSubmissionOptions, StreamingSubmissionOutcomeUnknownError, type StreamingSubmissionRetryIdentity, type StreamingSubmissionRow, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingChanges, type ThingDetail, type ThingDetailFields, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadChangesOptions, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type ThingNamesResult, type ThingQueryChangesOptions, type ThingShapesReader, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, type ViewEvaluateOptions, type ViewEvaluateResult, WarmHubClient, type WarmHubClientOptions, type WarmHubDecorations, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, type WriteOperation, WriteOperationError, applyRepositoryExportDelta, collectDurableTokens, commitValidateRequestBodyBytes, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createCommitValidateInput, createKeepShapesResolver, createOperationEventRequestId, createOperationEventSubmissionId, createRepositoryExportSession, encodeCommitValidateRequestBody, getResponseDecorations, isAllStreamOperationsFailedError, isConnectionError, isDefiniteStreamAppendRejection, isKnownCheckpointContentType, isKnownComponentInstallResultState, isKnownComponentSummaryState, isKnownCredentialScope, isKnownGlobalSearchResultItemKind, isKnownHomepageFeaturedItemKind, isKnownOrgAuthScope, isKnownOrgMemberStatus, isKnownOrgRole, isKnownRepoAuthScope, isKnownSubscribableEventType, isRetryable, isShapeReference, isWarmHubError, normalizeWref, operationEventStreamRequestId, readRepositoryExportStream, resolveFunctionLogMode, restoreRepositoryExportSession, sanitizeErrorMessage, sdkVersionIsBelowMinimum, shapeName, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{m as AllStreamOperationsFailedError,I as CliCallVerificationError,L as DEFAULT_API_URL,j as DEFAULT_STREAM_CHUNK_SIZE,d as DEPENDENCY_FAILED,f as LEGACY_WREFS_REFUSAL,t as MAX_COMMIT_VALIDATION_ENCODED_BYTES,s as MAX_COMMIT_VALIDATION_OPERATIONS,k as MAX_STREAM_APPEND_OPERATION_COUNT,z as OperationBuilder,l as PartialStreamSubmissionError,A as RepositoryExportError,B as RepositoryExportSession,H as SDK_VERSION,i as StreamSubmissionAggregator,G as StreamingSubmissionOutcomeUnknownError,V as WarmHubClient,a as WarmHubError,c as WriteOperationError,D as applyRepositoryExportDelta,x as collectDurableTokens,w as commitValidateRequestBodyBytes,T as connectionErrorMessage,o as countStreamAppendResultStatuses,u as createCommitValidateInput,r as createKeepShapesResolver,h as createOperationEventRequestId,g as createOperationEventSubmissionId,C as createRepositoryExportSession,v as encodeCommitValidateRequestBody,y as getResponseDecorations,P as isAllStreamOperationsFailedError,S as isConnectionError,p as isDefiniteStreamAppendRejection,R as isRetryable,e as isShapeReference,Q as isWarmHubError,K as normalizeWref,E as readRepositoryExportStream,M as resolveFunctionLogMode,F as restoreRepositoryExportSession,N as sanitizeErrorMessage,U as sdkVersionIsBelowMinimum,b as shapeName,n as streamAppendResultStatus,q as submitOperationsViaStream,O as toWarmHubError,J as verifyCliCall}from'./chunk-KGQM5ZOO.js';export{ja as CHECKPOINT_CONTENT_TYPES,E as CLI_INSTALL_REPO_HEADER,F as CLI_SIGNATURE_HEADER,G as CLI_TIMESTAMP_HEADER,L as COMPONENT_INSTALL_RESULT_STATES,R as COMPONENT_SUMMARY_STATES,l as CONTENT_FIELD_LIMIT_ERROR,T as CREDENTIAL_SCOPES,V as GLOBAL_SEARCH_RESULT_ITEM_KINDS,X as HOMEPAGE_FEATURED_ITEM_KINDS,k as MAX_CONTENT_FIELD_BYTES,B as MAX_WREFS_PER_THING_VERSION,Z as ORG_AUTH_SCOPES,ba as ORG_MEMBER_STATUSES,da as ORG_ROLES,N as REPO_AUTH_SCOPES,J as SUBSCRIBABLE_EVENT_TYPES,m as contentFieldLimitError,ka as isKnownCheckpointContentType,M as isKnownComponentInstallResultState,S as isKnownComponentSummaryState,U as isKnownCredentialScope,W as isKnownGlobalSearchResultItemKind,Y as isKnownHomepageFeaturedItemKind,_ as isKnownOrgAuthScope,ca as isKnownOrgMemberStatus,ea as isKnownOrgRole,O as isKnownRepoAuthScope,K as isKnownSubscribableEventType,$ as operationEventStreamRequestId,Ba as validateAgainstShape}from'./chunk-ZPREHZXB.js';//# sourceMappingURL=index.js.map
1
+ export{s as AllStreamOperationsFailedError,H as CliCallVerificationError,K as DEFAULT_API_URL,p as DEFAULT_STREAM_CHUNK_SIZE,d as DEPENDENCY_FAILED,g as MAX_COMMIT_VALIDATION_ENCODED_BYTES,f as MAX_COMMIT_VALIDATION_OPERATIONS,q as MAX_STREAM_APPEND_OPERATION_COUNT,y as OperationBuilder,r as PartialStreamSubmissionError,z as RepositoryExportError,A as RepositoryExportSession,G as SDK_VERSION,m as StreamSubmissionAggregator,F as StreamingSubmissionOutcomeUnknownError,U as WarmHubClient,a as WarmHubError,c as WriteOperationError,C as applyRepositoryExportDelta,k as collectDurableTokens,j as commitValidateRequestBodyBytes,S as connectionErrorMessage,u as countStreamAppendResultStatuses,h as createCommitValidateInput,x as createKeepShapesResolver,o as createOperationEventRequestId,n as createOperationEventSubmissionId,B as createRepositoryExportSession,i as encodeCommitValidateRequestBody,l as getResponseDecorations,O as isAllStreamOperationsFailedError,R as isConnectionError,v as isDefiniteStreamAppendRejection,Q as isRetryable,e as isShapeReference,P as isWarmHubError,J as normalizeWref,D as readRepositoryExportStream,L as resolveFunctionLogMode,E as restoreRepositoryExportSession,M as sanitizeErrorMessage,T as sdkVersionIsBelowMinimum,b as shapeName,t as streamAppendResultStatus,w as submitOperationsViaStream,N as toWarmHubError,I as verifyCliCall}from'./chunk-XIFRGUSM.js';export{ia as CHECKPOINT_CONTENT_TYPES,C as CLI_INSTALL_REPO_HEADER,D as CLI_SIGNATURE_HEADER,E as CLI_TIMESTAMP_HEADER,J as COMPONENT_INSTALL_RESULT_STATES,P as COMPONENT_SUMMARY_STATES,l as CONTENT_FIELD_LIMIT_ERROR,R as CREDENTIAL_SCOPES,T as GLOBAL_SEARCH_RESULT_ITEM_KINDS,V as HOMEPAGE_FEATURED_ITEM_KINDS,k as MAX_CONTENT_FIELD_BYTES,z as MAX_WREFS_PER_THING_VERSION,X as ORG_AUTH_SCOPES,$ as ORG_MEMBER_STATUSES,ba as ORG_ROLES,L as REPO_AUTH_SCOPES,H as SUBSCRIBABLE_EVENT_TYPES,m as contentFieldLimitError,ja as isKnownCheckpointContentType,K as isKnownComponentInstallResultState,Q as isKnownComponentSummaryState,S as isKnownCredentialScope,U as isKnownGlobalSearchResultItemKind,W as isKnownHomepageFeaturedItemKind,Y as isKnownOrgAuthScope,aa as isKnownOrgMemberStatus,ca as isKnownOrgRole,M as isKnownRepoAuthScope,I as isKnownSubscribableEventType,Z as operationEventStreamRequestId,Aa as validateAgainstShape}from'./chunk-BBWY7BGT.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/react.js CHANGED
@@ -1,2 +1,2 @@
1
- import {V}from'./chunk-KGQM5ZOO.js';export{L as DEFAULT_API_URL,H as SDK_VERSION,V as WarmHubClient,a as WarmHubError,O as toWarmHubError}from'./chunk-KGQM5ZOO.js';import'./chunk-ZPREHZXB.js';import {createContext,useMemo,useState,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null),f=createContext({isAuthenticated:false,isLoading:true});function P({apiUrl:e,children:t,auth:o,client:s,decorateResponses:r}){let n=s?.name,u=s?.version,i=o.getAccessToken,a=useMemo(()=>new V({apiUrl:e,accessToken:async()=>await i()??void 0,client:{name:n,version:u},decorateResponses:r}),[e,n,u,r,i]);return jsx(p.Provider,{value:a,children:jsx(g,{auth:o,client:a,children:t})})}function g({auth:e,client:t,children:o}){let[s,r]=useState(null),n=e.isAuthenticated&&s===t;useEffect(()=>{if(!e.isAuthenticated){r(null);return}let i=false;return t.auth.sync().then(()=>{i||r(t);}).catch(a=>{console.error("auth.sync failed:",a),i||r(t);}),()=>{i=true;}},[e.isAuthenticated,t]);let u=useMemo(()=>({isAuthenticated:e.isAuthenticated&&n,isLoading:e.isLoading||e.isAuthenticated&&!n}),[e.isAuthenticated,e.isLoading,n]);return e.isLoading||e.isAuthenticated&&!n?null:jsx(f.Provider,{value:u,children:o})}function v(){let e=useContext(p);if(!e)throw new Error("useWarmHubClient must be used within a WarmHubProvider");return e}function S(){return useContext(f)}export{P as WarmHubProvider,S as useWarmHubAuth,v as useWarmHubClient};//# sourceMappingURL=react.js.map
1
+ import {U}from'./chunk-XIFRGUSM.js';export{K as DEFAULT_API_URL,G as SDK_VERSION,U as WarmHubClient,a as WarmHubError,N as toWarmHubError}from'./chunk-XIFRGUSM.js';import'./chunk-BBWY7BGT.js';import {createContext,useMemo,useState,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null),f=createContext({isAuthenticated:false,isLoading:true});function P({apiUrl:e,children:t,auth:o,client:s,decorateResponses:r}){let n=s?.name,u=s?.version,i=o.getAccessToken,a=useMemo(()=>new U({apiUrl:e,accessToken:async()=>await i()??void 0,client:{name:n,version:u},decorateResponses:r}),[e,n,u,r,i]);return jsx(p.Provider,{value:a,children:jsx(g,{auth:o,client:a,children:t})})}function g({auth:e,client:t,children:o}){let[s,r]=useState(null),n=e.isAuthenticated&&s===t;useEffect(()=>{if(!e.isAuthenticated){r(null);return}let i=false;return t.auth.sync().then(()=>{i||r(t);}).catch(a=>{console.error("auth.sync failed:",a),i||r(t);}),()=>{i=true;}},[e.isAuthenticated,t]);let u=useMemo(()=>({isAuthenticated:e.isAuthenticated&&n,isLoading:e.isLoading||e.isAuthenticated&&!n}),[e.isAuthenticated,e.isLoading,n]);return e.isLoading||e.isAuthenticated&&!n?null:jsx(f.Provider,{value:u,children:o})}function v(){let e=useContext(p);if(!e)throw new Error("useWarmHubClient must be used within a WarmHubProvider");return e}function S(){return useContext(f)}export{P as WarmHubProvider,S as useWarmHubAuth,v as useWarmHubClient};//# sourceMappingURL=react.js.map
2
2
  //# sourceMappingURL=react.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/sdk-ts",
3
- "version": "0.158.0",
3
+ "version": "0.159.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.",