@warmhub/sdk-ts 0.107.0 → 0.108.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
@@ -1,3 +1,5 @@
1
+ import { z } from 'zod';
2
+
1
3
  type ActionAttempt = {
2
4
  attempt: number;
3
5
  status: string;
@@ -5027,32 +5029,6 @@ type RepositoryCheckpointStatus$1 = {
5027
5029
  sha256: string;
5028
5030
  contentType: 'application/zip';
5029
5031
  };
5030
- } | {
5031
- checkpointId: string;
5032
- repoSeq: number;
5033
- contractVersion: 2;
5034
- attemptsStarted: number;
5035
- runAgeMs: number;
5036
- createdAt: number;
5037
- updatedAt: number;
5038
- runStartedAt: number;
5039
- state: 'failed';
5040
- completedAt: number;
5041
- failureCode: 'deadline_exceeded' | 'attempts_exhausted';
5042
- nextAction: 'retry';
5043
- } | {
5044
- checkpointId: string;
5045
- repoSeq: number;
5046
- contractVersion: 2;
5047
- attemptsStarted: number;
5048
- runAgeMs: number;
5049
- createdAt: number;
5050
- updatedAt: number;
5051
- runStartedAt: number;
5052
- state: 'failed';
5053
- completedAt: number;
5054
- failureCode: 'invalid_source';
5055
- nextAction: 'generate';
5056
5032
  } | {
5057
5033
  checkpointId: string;
5058
5034
  repoSeq: number;
@@ -5077,7 +5053,7 @@ type RepositoryCheckpointStatus$1 = {
5077
5053
  runStartedAt: number;
5078
5054
  state: 'failed';
5079
5055
  completedAt: number;
5080
- failureCode: 'repository_deleted';
5056
+ failureCode: 'deadline_exceeded' | 'attempts_exhausted' | 'invalid_source' | 'repository_deleted';
5081
5057
  nextAction: 'none';
5082
5058
  };
5083
5059
  type RepoConfigureStats = {
@@ -5529,6 +5505,105 @@ type OrgScopedEventType = (typeof ORG_SCOPED_EVENT_TYPES)[number];
5529
5505
  */
5530
5506
  declare function operationEventStreamRequestId(submissionId: string, chunkOrdinal: number): string;
5531
5507
 
5508
+ type JsonValue = null | boolean | number | string | JsonValue[] | {
5509
+ [key: string]: JsonValue;
5510
+ };
5511
+
5512
+ declare const REPOSITORY_EXPORT_MODES: readonly ["heads", "ops"];
5513
+ declare const repositoryExportRowSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
5514
+ kind: z.ZodLiteral<"shape">;
5515
+ shapes: z.ZodArray<z.ZodObject<{
5516
+ name: z.ZodString;
5517
+ v: z.ZodNumber;
5518
+ durableId: z.ZodString;
5519
+ provenance: z.ZodEnum<{
5520
+ captured: "captured";
5521
+ "migration-stamped": "migration-stamped";
5522
+ reconstructed: "reconstructed";
5523
+ }>;
5524
+ declared: z.ZodBoolean;
5525
+ }, z.core.$strict>>;
5526
+ active: z.ZodLiteral<true>;
5527
+ data: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
5528
+ wref: z.ZodString;
5529
+ durableId: z.ZodString;
5530
+ version: z.ZodNumber;
5531
+ }, z.core.$strict>, z.ZodObject<{
5532
+ kind: z.ZodEnum<{
5533
+ thing: "thing";
5534
+ collection: "collection";
5535
+ }>;
5536
+ shapes: z.ZodArray<z.ZodObject<{
5537
+ name: z.ZodString;
5538
+ v: z.ZodNumber;
5539
+ durableId: z.ZodString;
5540
+ provenance: z.ZodEnum<{
5541
+ captured: "captured";
5542
+ "migration-stamped": "migration-stamped";
5543
+ reconstructed: "reconstructed";
5544
+ }>;
5545
+ declared: z.ZodBoolean;
5546
+ }, z.core.$strict>>;
5547
+ active: z.ZodLiteral<true>;
5548
+ data: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
5549
+ wref: z.ZodString;
5550
+ durableId: z.ZodString;
5551
+ version: z.ZodNumber;
5552
+ }, z.core.$strict>, z.ZodObject<{
5553
+ kind: z.ZodLiteral<"assertion">;
5554
+ shapes: z.ZodArray<z.ZodObject<{
5555
+ name: z.ZodString;
5556
+ v: z.ZodNumber;
5557
+ durableId: z.ZodString;
5558
+ provenance: z.ZodEnum<{
5559
+ captured: "captured";
5560
+ "migration-stamped": "migration-stamped";
5561
+ reconstructed: "reconstructed";
5562
+ }>;
5563
+ declared: z.ZodBoolean;
5564
+ }, z.core.$strict>>;
5565
+ about: z.ZodObject<{
5566
+ wref: z.ZodString;
5567
+ v: z.ZodOptional<z.ZodNumber>;
5568
+ durableId: z.ZodString;
5569
+ }, z.core.$strict>;
5570
+ affirmed: z.ZodArray<z.ZodObject<{
5571
+ wref: z.ZodString;
5572
+ v: z.ZodOptional<z.ZodNumber>;
5573
+ durableId: z.ZodString;
5574
+ }, z.core.$strict>>;
5575
+ active: z.ZodLiteral<true>;
5576
+ data: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
5577
+ wref: z.ZodString;
5578
+ durableId: z.ZodString;
5579
+ version: z.ZodNumber;
5580
+ }, z.core.$strict>], "kind">, z.ZodObject<{
5581
+ kind: z.ZodEnum<{
5582
+ shape: "shape";
5583
+ thing: "thing";
5584
+ assertion: "assertion";
5585
+ collection: "collection";
5586
+ }>;
5587
+ active: z.ZodLiteral<false>;
5588
+ wref: z.ZodString;
5589
+ durableId: z.ZodString;
5590
+ version: z.ZodNumber;
5591
+ }, z.core.$strict>]>;
5592
+ declare const repositoryExportHeaderSchema: z.ZodObject<{
5593
+ kind: z.ZodLiteral<"header">;
5594
+ formatVersion: z.ZodLiteral<3>;
5595
+ repo: z.ZodString;
5596
+ mode: z.ZodEnum<{
5597
+ ops: "ops";
5598
+ heads: "heads";
5599
+ }>;
5600
+ sinceRepoSeq: z.ZodNumber;
5601
+ atRepoSeq: z.ZodNumber;
5602
+ }, z.core.$strict>;
5603
+ type RepositoryExportMode = (typeof REPOSITORY_EXPORT_MODES)[number];
5604
+ type RepositoryExportRow = z.infer<typeof repositoryExportRowSchema>;
5605
+ type RepositoryExportHeader = z.infer<typeof repositoryExportHeaderSchema>;
5606
+
5532
5607
  /**
5533
5608
  * Warning details for input fields that no shape in the effective set declares.
5534
5609
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/undeclaredfieldswarning/
@@ -5999,6 +6074,254 @@ type WarmHubDecorations = Record<string, string>;
5999
6074
  */
6000
6075
  declare function getResponseDecorations(result: unknown): WarmHubDecorations | undefined;
6001
6076
 
6077
+ /**
6078
+ * A materialized export, keyed by the identity that survives renames.
6079
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/repositoryexportrowmap/
6080
+ */
6081
+ type RepositoryExportRowMap = ReadonlyMap<string, RepositoryExportRow>;
6082
+ /**
6083
+ * Any row collection {@link applyRepositoryExportDelta} accepts: a materialized
6084
+ * map from a previous fold, or a plain iterable of rows straight off a stream.
6085
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/repositoryexportrows/
6086
+ */
6087
+ type RepositoryExportRows = Iterable<RepositoryExportRow> | RepositoryExportRowMap;
6088
+ /**
6089
+ * Fold a delta export onto a base, by `durableId`: active rows upsert, and
6090
+ * tombstones remove. Pure — neither argument is mutated — and order-dependent
6091
+ * within each argument, so the last row for an identity wins.
6092
+ * @see https://docs.warmhub.ai/sdk-reference/functions/applyrepositoryexportdelta/
6093
+ */
6094
+ declare function applyRepositoryExportDelta(base: RepositoryExportRows, delta: RepositoryExportRows): Map<string, RepositoryExportRow>;
6095
+
6096
+ /**
6097
+ * Stable failure categories produced while reading a repository export stream.
6098
+ *
6099
+ * Every reason except `since_below_epoch_floor` is a local verification
6100
+ * verdict: the bytes the server sent do not prove what the trailer claims.
6101
+ * `since_below_epoch_floor` is the server's own refusal and is surfaced
6102
+ * distinctly so callers can fall back to a full export.
6103
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/repositoryexporterrorreason/
6104
+ */
6105
+ type RepositoryExportErrorReason = 'count_mismatch' | 'digest_mismatch' | 'fence_mismatch' | 'header_invalid' | 'row_invalid' | 'row_out_of_order' | 'since_below_epoch_floor' | 'trailer_invalid' | 'truncated';
6106
+ /**
6107
+ * A repository export protocol or verification failure.
6108
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexporterror/
6109
+ */
6110
+ declare class RepositoryExportError extends Error {
6111
+ readonly reason: RepositoryExportErrorReason;
6112
+ readonly name = "RepositoryExportError";
6113
+ constructor(reason: RepositoryExportErrorReason, message?: string);
6114
+ }
6115
+ /**
6116
+ * The verification state of one logical export stream.
6117
+ *
6118
+ * A resumed request carries no header, and its trailer covers only the rows of
6119
+ * that segment — the server cannot know what a client already read. So the
6120
+ * session keeps two hashers: a per-segment one, which each segment's trailer is
6121
+ * checked against, and a whole-stream one, which accumulates across every
6122
+ * segment and is what the caller should record as the export's content digest.
6123
+ * For a stream that never broke the two agree, and the trailer proves both.
6124
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexportsession/
6125
+ */
6126
+ declare class RepositoryExportSession {
6127
+ #private;
6128
+ /**
6129
+ * The header of the opening segment; resumed segments repeat none.
6130
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexportsession/#header
6131
+ */
6132
+ get header(): RepositoryExportHeader | undefined;
6133
+ /**
6134
+ * Cursor for `afterDurableId` when resuming a broken stream.
6135
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexportsession/#lastdurableid
6136
+ */
6137
+ get lastDurableId(): string | undefined;
6138
+ /**
6139
+ * Rows verified so far across every segment.
6140
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexportsession/#rowcount
6141
+ */
6142
+ get rowCount(): number;
6143
+ /**
6144
+ * Rows verified in the segment currently being read.
6145
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexportsession/#segmentrowcount
6146
+ */
6147
+ get segmentRowCount(): number;
6148
+ /**
6149
+ * The whole logical stream's content digest, available once the stream has
6150
+ * been finalized — by its closing trailer, or by `finalizeContentSha256`.
6151
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexportsession/#contentsha256
6152
+ */
6153
+ get contentSha256(): string | undefined;
6154
+ /**
6155
+ * End the session early and read the digest of what was verified. Useful when
6156
+ * a stream will not be resumed; the session cannot be read from again.
6157
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexportsession/#finalizecontentsha256
6158
+ */
6159
+ finalizeContentSha256(): string;
6160
+ /** @internal Start a fresh per-segment hasher for one HTTP response. */
6161
+ beginSegment(): void;
6162
+ /**
6163
+ * @internal A segment failed its trailer — the bytes did not match what the
6164
+ * server said it wrote. The stream digest has already absorbed those rows, so
6165
+ * this session can never produce a trustworthy total again.
6166
+ */
6167
+ markUnverifiable(): void;
6168
+ /** @internal The digest of the segment just read; spends the segment hasher. */
6169
+ finalizeSegment(): string;
6170
+ /** @internal Async-flow token, re-redeemed when a prepared download breaks. */
6171
+ get token(): string | undefined;
6172
+ /** @internal */
6173
+ set token(value: string | undefined);
6174
+ /**
6175
+ * Whether this session's trailer has been verified.
6176
+ * @see https://docs.warmhub.ai/sdk-reference/classes/repositoryexportsession/#complete
6177
+ */
6178
+ get complete(): boolean;
6179
+ /** @internal Record the closing trailer and seal the whole-stream digest. */
6180
+ markComplete(): void;
6181
+ /** @internal Refuse a segment on a session whose digest is already sealed. */
6182
+ assertResumable(): void;
6183
+ /** @internal Only the opening segment carries a header; it must not change. */
6184
+ adoptHeader(header: RepositoryExportHeader): void;
6185
+ /** @internal */
6186
+ recordRow(durableId: string, lineBytes: Uint8Array): void;
6187
+ }
6188
+ /**
6189
+ * Create the session that carries verification state across an export's
6190
+ * segments: the header, the resume cursor, and the whole-stream digest.
6191
+ * @see https://docs.warmhub.ai/sdk-reference/functions/createrepositoryexportsession/
6192
+ */
6193
+ declare function createRepositoryExportSession(): RepositoryExportSession;
6194
+
6195
+ /**
6196
+ * Options for `client.repo.export`: what to export (mode, delta base, fence)
6197
+ * and how (sync stream or async token flow, resume cursor, abort signal).
6198
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/repositoryexportoptions/
6199
+ */
6200
+ type RepositoryExportOptions = {
6201
+ /** `heads` (default) exports current heads; `ops` exports the operation log. */
6202
+ readonly mode?: RepositoryExportMode;
6203
+ /** Delta base. Defaults to 0, a full export. */
6204
+ readonly sinceRepoSeq?: number;
6205
+ /** Pin the fence. Omit to let the server pin current and echo it back. */
6206
+ readonly atRepoSeq?: number;
6207
+ /**
6208
+ * Resume cursor. Defaults to the session's last verified row, and needs a
6209
+ * `session` carrying the opening header: a resumed request gets no header
6210
+ * back, so without one there is nothing to check the repository and fence
6211
+ * against.
6212
+ */
6213
+ readonly afterDurableId?: string;
6214
+ /**
6215
+ * `async` asks the server to prepare the export first, then redeems the
6216
+ * returned token once it is ready. Defaults to a direct stream.
6217
+ */
6218
+ readonly prefer?: 'sync' | 'async';
6219
+ /**
6220
+ * Redeem a token from a previous `exportPrepare`, polling until the prepared
6221
+ * export is ready. Use it to download an export a different process, or a
6222
+ * different machine, asked for.
6223
+ *
6224
+ * Redemption returns a short-lived URL for the whole stored export object, so
6225
+ * a token download always reads from the beginning: it cannot be continued
6226
+ * with `afterDurableId`. A broken download restarts on a fresh session, and
6227
+ * re-redeeming the token is a free lookup.
6228
+ */
6229
+ readonly token?: string;
6230
+ /**
6231
+ * Verification state. Pass a session back in to resume a broken stream: the
6232
+ * rolling digest continues and the request is pinned to what it reached.
6233
+ */
6234
+ readonly session?: RepositoryExportSession;
6235
+ /**
6236
+ * How long to wait between redemption polls while an async export is still
6237
+ * building. Defaults to one second, and is clamped up to a 50ms floor: the
6238
+ * poll re-runs the full authorization gate, so a zero would spin it.
6239
+ */
6240
+ readonly pollIntervalMs?: number;
6241
+ readonly signal?: AbortSignal;
6242
+ };
6243
+ /**
6244
+ * What to prepare: the same window a direct stream takes, minus everything
6245
+ * about reading one back.
6246
+ *
6247
+ * @internal
6248
+ */
6249
+ type RepositoryExportPrepareOptions = Pick<RepositoryExportOptions, 'mode' | 'sinceRepoSeq' | 'atRepoSeq' | 'signal'>;
6250
+ /**
6251
+ * A prepared export: the token that redeems it and the fence the server pinned.
6252
+ *
6253
+ * @internal
6254
+ */
6255
+ type RepositoryExportPreparation = {
6256
+ /** Redeem it with `export`'s `token` option, from anywhere. */
6257
+ readonly exportToken: string;
6258
+ /** The repository sequence the export is pinned to. */
6259
+ readonly atRepoSeq: number;
6260
+ };
6261
+
6262
+ /**
6263
+ * What the caller asked for, which the header must agree with.
6264
+ *
6265
+ * @internal
6266
+ */
6267
+ type RepositoryExportExpectation = {
6268
+ readonly repo: string;
6269
+ readonly mode: RepositoryExportMode;
6270
+ /**
6271
+ * Window bounds the caller stated explicitly. A token redemption sends only
6272
+ * the token, so the header is the first place a stored job's window can be
6273
+ * compared against what the caller asked for — undefined bounds are the
6274
+ * caller delegating the choice, and only stated ones are enforced.
6275
+ */
6276
+ readonly sinceRepoSeq?: number;
6277
+ readonly atRepoSeq?: number;
6278
+ };
6279
+ /**
6280
+ * How to read one HTTP segment of an export.
6281
+ *
6282
+ * @internal
6283
+ */
6284
+ type RepositoryExportSegmentOptions = {
6285
+ /** True when the request carried `afterDurableId`, so no header is sent. */
6286
+ readonly resumed?: boolean;
6287
+ };
6288
+ /**
6289
+ * How to replay a saved export back into a session.
6290
+ *
6291
+ * @internal
6292
+ */
6293
+ type RepositoryExportRestoreOptions = {
6294
+ /**
6295
+ * Accept bytes that stop before the trailer — an interrupted download, which
6296
+ * is exactly what a resume continues from. The restored session is then not
6297
+ * `complete`, and carries the cursor the saved bytes reached. Without it a
6298
+ * missing trailer is `truncated`, as it is on the wire.
6299
+ */
6300
+ readonly partial?: boolean;
6301
+ };
6302
+ /**
6303
+ * Read one HTTP response body as export records, verifying it against the
6304
+ * session as it goes: header continuity, per-line canonical decode, the rolling
6305
+ * digest, and finally the trailer.
6306
+ * @see https://docs.warmhub.ai/sdk-reference/functions/readrepositoryexportstream/
6307
+ */
6308
+ declare function readRepositoryExportStream(source: AsyncIterable<Uint8Array> | ReadableStream<Uint8Array>, session: RepositoryExportSession, expected: RepositoryExportExpectation, options?: RepositoryExportSegmentOptions): AsyncGenerator<RepositoryExportRow>;
6309
+ /**
6310
+ * Replay a saved export's own bytes back into a fresh verification session.
6311
+ *
6312
+ * This is the offline twin of `readRepositoryExportStream`: the same header,
6313
+ * canonical-row, ordering, and trailer checks, run over a file rather than a
6314
+ * response body, and against no expected repository — a saved export is checked
6315
+ * for what it says it is, not for what a caller hoped it would be. It returns
6316
+ * the session rather than the rows, because the two things a caller needs from
6317
+ * a saved file are proof (`complete`, `contentSha256`, `rowCount`) and the
6318
+ * cursor a resume continues from (`header`, `lastDurableId`).
6319
+ *
6320
+ * Pass `partial` to accept bytes that stop before the trailer.
6321
+ * @see https://docs.warmhub.ai/sdk-reference/functions/restorerepositoryexportsession/
6322
+ */
6323
+ declare function restoreRepositoryExportSession(source: AsyncIterable<Uint8Array> | ReadableStream<Uint8Array>, options?: RepositoryExportRestoreOptions): Promise<RepositoryExportSession>;
6324
+
6002
6325
  /**
6003
6326
  * Operations to submit, in order.
6004
6327
  *
@@ -8582,6 +8905,12 @@ declare class WarmHubClient {
8582
8905
  private readonly trpc;
8583
8906
  private compatibilityCheck?;
8584
8907
  private overrideNoticePrinted;
8908
+ /**
8909
+ * Repository export v3 streaming, exposed as `repo.export`. The transport
8910
+ * closures are lazy, so this initializer runs before `apiUrl` is assigned
8911
+ * without reading it.
8912
+ */
8913
+ private readonly repositoryExport;
8585
8914
  private noteCompatibilityOverride;
8586
8915
  private assertWriteCompatible;
8587
8916
  private createCompatibilityLink;
@@ -8993,19 +9322,16 @@ declare class WarmHubClient {
8993
9322
  */
8994
9323
  readonly repo: {
8995
9324
  /**
8996
- * Repository checkpoint lifecycle and artifact-access operations.
9325
+ * Repository checkpoint status and artifact-access operations.
8997
9326
  *
8998
- * Reads require unrestricted `repo:read` plus `repo:checkpoint-read`;
8999
- * generation and retry additionally require `repo:checkpoint-generate`;
9000
- * `repo:admin` remains compatible for them.
9327
+ * Reads require unrestricted `repo:read` plus `repo:checkpoint-read`.
9328
+ * Checkpoint generation retired with export v3; use `repo.export` to
9329
+ * produce a fresh snapshot.
9001
9330
  *
9002
9331
  * `getAccess` returns a signed artifact descriptor only. It does not fetch
9003
9332
  * the signed URL or attach the WarmHub bearer token to that URL.
9004
9333
  */
9005
9334
  checkpoint: {
9006
- generate: (orgName: string, repoName: string, options?: {
9007
- atLeastRepoSeq?: number;
9008
- }) => Promise<RepositoryCheckpointStatus>;
9009
9335
  status: (orgName: string, repoName: string, selector: {
9010
9336
  checkpointId: string;
9011
9337
  repoSeq?: never;
@@ -9028,8 +9354,26 @@ declare class WarmHubClient {
9028
9354
  chunkPath: string;
9029
9355
  };
9030
9356
  }) => Promise<RepositoryCheckpointAccess>;
9031
- retry: (orgName: string, repoName: string, checkpointId: string) => Promise<RepositoryCheckpointStatus>;
9032
9357
  };
9358
+ /**
9359
+ * Stream a verified repository export (wire format v3).
9360
+ *
9361
+ * Yields rows only after the header matches the repository and mode asked
9362
+ * for, each line decodes canonically, and — at the end — the trailer's
9363
+ * record count and content digest match what was actually read. A stream
9364
+ * that breaks resumes by passing the same `session` back in.
9365
+ */
9366
+ export: (orgName: string, repoName: string, options?: RepositoryExportOptions) => AsyncGenerator<RepositoryExportRow>;
9367
+ /**
9368
+ * Ask the server to prepare an export and return the token that redeems it,
9369
+ * without waiting for the fold or reading a byte.
9370
+ *
9371
+ * The fold runs off the request path, so a large export can be started by
9372
+ * one process and downloaded later — or elsewhere — by passing the returned
9373
+ * token to `export`. The token is redeemable only at this repository's URL,
9374
+ * by a principal who holds checkpoint read there.
9375
+ */
9376
+ exportPrepare: (orgName: string, repoName: string, options?: RepositoryExportPrepareOptions) => Promise<RepositoryExportPreparation>;
9033
9377
  /**
9034
9378
  * Get a repository by organization and repository name.
9035
9379
  */
@@ -10373,4 +10717,4 @@ declare class WarmHubClient {
10373
10717
  private watchRepoQuery;
10374
10718
  }
10375
10719
 
10376
- 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 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 CollectionAddOp, type CollectionAddType, 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 CommitApplyCompatibilityResult, type CommitDiagnostic, type CommitRealOperationResult, type CommitValidateInput, type CommitValidateOptions, type CommitValidateResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentList, type ComponentListOptions, 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 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 Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRecipientSelector, type GrantRevokeResult, type HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, 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, ORG_AUTH_SCOPES, type Operation, OperationBuilder, type OperationBuilderAddInput, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationEventReceipt, type OperationEventReceiptV1, type OperationSource, type OperationSubmitResult, type OrgAccessResult, type OrgAuthScope, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, REPO_AUTH_SCOPES, type ReaffirmOperation, type RefLink, type RefsOptions, type RefsResult, 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 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 ShapeRemoveOptions, type ShapeReviseOptions, type ShapeValidatorResult, 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 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 ThingQueryChangesOptions, 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, collectDurableTokens, commitValidateRequestBodyBytes, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createCommitValidateInput, createOperationEventRequestId, createOperationEventSubmissionId, encodeCommitValidateRequestBody, getResponseDecorations, isConnectionError, isDefiniteStreamAppendRejection, isKnownOrgAuthScope, isKnownRepoAuthScope, isRetryable, isWarmHubError, normalizeWref, operationEventStreamRequestId, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
10720
+ 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 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 CollectionAddOp, type CollectionAddType, 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 CommitApplyCompatibilityResult, type CommitDiagnostic, type CommitRealOperationResult, type CommitValidateInput, type CommitValidateOptions, type CommitValidateResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentList, type ComponentListOptions, 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 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 Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRecipientSelector, type GrantRevokeResult, type HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, 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, ORG_AUTH_SCOPES, type Operation, OperationBuilder, type OperationBuilderAddInput, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationEventReceipt, type OperationEventReceiptV1, type OperationSource, type OperationSubmitResult, type OrgAccessResult, type OrgAuthScope, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, REPO_AUTH_SCOPES, type ReaffirmOperation, type RefLink, type RefsOptions, type RefsResult, 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, 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 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 ShapeRemoveOptions, type ShapeReviseOptions, type ShapeValidatorResult, 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 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 ThingQueryChangesOptions, 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, applyRepositoryExportDelta, collectDurableTokens, commitValidateRequestBodyBytes, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createCommitValidateInput, createOperationEventRequestId, createOperationEventSubmissionId, createRepositoryExportSession, encodeCommitValidateRequestBody, getResponseDecorations, isConnectionError, isDefiniteStreamAppendRejection, isKnownOrgAuthScope, isKnownRepoAuthScope, isRetryable, isWarmHubError, normalizeWref, operationEventStreamRequestId, readRepositoryExportStream, resolveFunctionLogMode, restoreRepositoryExportSession, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{n as AllStreamOperationsFailedError,u as CliCallVerificationError,y as DEFAULT_API_URL,k as DEFAULT_STREAM_CHUNK_SIZE,b as MAX_COMMIT_VALIDATION_ENCODED_BYTES,a as MAX_COMMIT_VALIDATION_OPERATIONS,l as MAX_STREAM_APPEND_OPERATION_COUNT,w as OperationBuilder,m as PartialStreamSubmissionError,t as SDK_VERSION,h as StreamSubmissionAggregator,s as StreamingSubmissionOutcomeUnknownError,I as WarmHubClient,B as WarmHubError,f as collectDurableTokens,e as commitValidateRequestBodyBytes,G as connectionErrorMessage,p as countStreamAppendResultStatuses,c as createCommitValidateInput,j as createOperationEventRequestId,i as createOperationEventSubmissionId,d as encodeCommitValidateRequestBody,g as getResponseDecorations,F as isConnectionError,q as isDefiniteStreamAppendRejection,E as isRetryable,D as isWarmHubError,x as normalizeWref,z as resolveFunctionLogMode,A as sanitizeErrorMessage,H as sdkVersionIsBelowMinimum,o as streamAppendResultStatus,r as submitOperationsViaStream,C as toWarmHubError,v as verifyCliCall}from'./chunk-YMVHXOMD.js';export{n as CLI_INSTALL_REPO_HEADER,o as CLI_SIGNATURE_HEADER,p as CLI_TIMESTAMP_HEADER,y as CONTENT_FIELD_LIMIT_ERROR,x as MAX_CONTENT_FIELD_BYTES,A as ORG_AUTH_SCOPES,s as REPO_AUTH_SCOPES,z as contentFieldLimitError,B as isKnownOrgAuthScope,t as isKnownRepoAuthScope,C as operationEventStreamRequestId,R as validateAgainstShape}from'./chunk-DWOK3J6H.js';//# sourceMappingURL=index.js.map
1
+ export{t as AllStreamOperationsFailedError,A as CliCallVerificationError,E as DEFAULT_API_URL,q as DEFAULT_STREAM_CHUNK_SIZE,b as MAX_COMMIT_VALIDATION_ENCODED_BYTES,a as MAX_COMMIT_VALIDATION_OPERATIONS,r as MAX_STREAM_APPEND_OPERATION_COUNT,C as OperationBuilder,s as PartialStreamSubmissionError,i as RepositoryExportError,j as RepositoryExportSession,z as SDK_VERSION,n as StreamSubmissionAggregator,y as StreamingSubmissionOutcomeUnknownError,O as WarmHubClient,H as WarmHubError,h as applyRepositoryExportDelta,f as collectDurableTokens,e as commitValidateRequestBodyBytes,M as connectionErrorMessage,v as countStreamAppendResultStatuses,c as createCommitValidateInput,p as createOperationEventRequestId,o as createOperationEventSubmissionId,k as createRepositoryExportSession,d as encodeCommitValidateRequestBody,g as getResponseDecorations,L as isConnectionError,w as isDefiniteStreamAppendRejection,K as isRetryable,J as isWarmHubError,D as normalizeWref,l as readRepositoryExportStream,F as resolveFunctionLogMode,m as restoreRepositoryExportSession,G as sanitizeErrorMessage,N as sdkVersionIsBelowMinimum,u as streamAppendResultStatus,x as submitOperationsViaStream,I as toWarmHubError,B as verifyCliCall}from'./chunk-WEJSFESQ.js';export{n as CLI_INSTALL_REPO_HEADER,o as CLI_SIGNATURE_HEADER,p as CLI_TIMESTAMP_HEADER,y as CONTENT_FIELD_LIMIT_ERROR,x as MAX_CONTENT_FIELD_BYTES,A as ORG_AUTH_SCOPES,s as REPO_AUTH_SCOPES,z as contentFieldLimitError,B as isKnownOrgAuthScope,t as isKnownRepoAuthScope,C as operationEventStreamRequestId,Z as validateAgainstShape}from'./chunk-X5CR7GVH.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/react.d.ts CHANGED
@@ -2,6 +2,7 @@ import { WarmHubClient } from './index.js';
2
2
  export { AboutOptions, AboutResult, CountOptions, CountResult, CurrentUserInfo, DEFAULT_API_URL, ErrorKind, FilterOptions, FilterResult, HeadResult, HistoryResult, Operation, OperationSubmitResult, PingResult, RefsOptions, RefsResult, RepoListPageOptions, RepoListPageResult, RepoWithStatsInfo, ResolveWrefResult, SDK_VERSION, SearchOptions, SearchResult, ThingDetail, WarmHubClientOptions, WarmHubError, toWarmHubError } from './index.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode } from 'react';
5
+ import 'zod';
5
6
 
6
7
  /** @internal */
7
8
  interface WarmHubProviderProps {
package/dist/react.js CHANGED
@@ -1,2 +1,2 @@
1
- import {I}from'./chunk-YMVHXOMD.js';export{y as DEFAULT_API_URL,t as SDK_VERSION,I as WarmHubClient,B as WarmHubError,C as toWarmHubError}from'./chunk-YMVHXOMD.js';import'./chunk-DWOK3J6H.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=useMemo(()=>new I({apiUrl:e,accessToken:async()=>await o.getAccessToken()??void 0,client:{name:n,version:u},decorateResponses:r}),[e,o.getAccessToken,n,u,r]);return jsx(p.Provider,{value:i,children:jsx(g,{auth:o,client:i,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(c=>{console.error("auth.sync failed:",c),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 {O}from'./chunk-WEJSFESQ.js';export{E as DEFAULT_API_URL,z as SDK_VERSION,O as WarmHubClient,H as WarmHubError,I as toWarmHubError}from'./chunk-WEJSFESQ.js';import'./chunk-X5CR7GVH.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=useMemo(()=>new O({apiUrl:e,accessToken:async()=>await o.getAccessToken()??void 0,client:{name:n,version:u},decorateResponses:r}),[e,o.getAccessToken,n,u,r]);return jsx(p.Provider,{value:i,children:jsx(g,{auth:o,client:i,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(c=>{console.error("auth.sync failed:",c),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.107.0",
3
+ "version": "0.108.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.",
@@ -38,6 +38,7 @@
38
38
  "sideEffects": false,
39
39
  "files": [
40
40
  "dist",
41
+ "CHANGELOG.md",
41
42
  "README.md"
42
43
  ],
43
44
  "publishConfig": {
@@ -102,6 +103,7 @@
102
103
  },
103
104
  "devDependencies": {
104
105
  "@vitest/coverage-v8": "catalog:",
106
+ "pako": "2.1.0",
105
107
  "@types/react": "catalog:",
106
108
  "react": "19.2.6",
107
109
  "tsup": "8.5.1",