@warmhub/sdk-ts 0.83.0 → 0.85.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,179 +1,3 @@
1
- declare const COMMIT_OPERATIONS: readonly ["add", "revise", "retract", "rename"];
2
- type CommitOperation = (typeof COMMIT_OPERATIONS)[number];
3
- declare const COMMIT_OPERATION_KINDS: readonly ["shape", "thing", "assertion", "collection"];
4
- type CommitOperationKind = (typeof COMMIT_OPERATION_KINDS)[number];
5
-
6
- /**
7
- * Canonical request signing for component CLI dispatch.
8
- *
9
- * Component workers expose CLI methods over HTTP. The platform dispatcher
10
- * signs each call with HMAC-SHA256 over a canonical request representation
11
- * so the worker can authenticate the caller without sharing more than a
12
- * single secret. The same canonical input works for GET and POST methods:
13
- * the difference is whether the method args ride in the query string or
14
- * the body.
15
- *
16
- * Canonical signing input:
17
- * <METHOD>\n<PATH>\n<CANONICAL_QUERY>\n<INSTALL_REPO>\n<SHA256_HEX(BODY)>\n<TIMESTAMP>
18
- *
19
- * Where:
20
- * - METHOD is the uppercased HTTP method ('GET' | 'POST').
21
- * - PATH is the URL path component (no scheme, host, or query).
22
- * - CANONICAL_QUERY is `canonicalCliQueryString(query)` — sorted, RFC 3986
23
- * percent-encoded, omitting undefined / null entries.
24
- * - INSTALL_REPO is the `<org>/<repo>` slug of the install, transmitted on
25
- * the wire as the `X-WarmHub-Install-Repo` header.
26
- * - BODY is the raw request body string ('' for GET).
27
- * - TIMESTAMP is unix-seconds since epoch (string-formatted).
28
- *
29
- * Verifiers should enforce a tolerance window on the timestamp to bound
30
- * replay attacks (default 300 s); they should also compare signatures in
31
- * constant time.
32
- *
33
- * This module is intentionally low-level: component authors import the
34
- * higher-level `verifyCliCall(request, secret)` wrapper from
35
- * `@warmhub/sdk-ts`, which extracts the canonical inputs from a Fetch
36
- * `Request` and calls `verifyCliRequest` for them.
37
- */
38
- /**
39
- * Wire header names for component CLI dispatch — the single source of truth
40
- * shared by the backend dispatcher (which sets them) and `verifyCliCall` (which
41
- * reads them). The install repo always rides in {@link CLI_INSTALL_REPO_HEADER};
42
- * the signing scheme adds {@link CLI_SIGNATURE_HEADER} + {@link CLI_TIMESTAMP_HEADER}.
43
- * @see https://docs.warmhub.ai/sdk-reference/variables/cli_install_repo_header/
44
- */
45
- declare const CLI_INSTALL_REPO_HEADER = "X-WarmHub-Install-Repo";
46
- /**
47
- * HMAC signature header used by component CLI dispatch.
48
- * @see https://docs.warmhub.ai/sdk-reference/variables/cli_signature_header/
49
- */
50
- declare const CLI_SIGNATURE_HEADER = "X-WarmHub-Signature";
51
- /**
52
- * Unix-seconds timestamp header used by component CLI dispatch.
53
- * @see https://docs.warmhub.ai/sdk-reference/variables/cli_timestamp_header/
54
- */
55
- declare const CLI_TIMESTAMP_HEADER = "X-WarmHub-Timestamp";
56
- /**
57
- * HTTP verbs a component CLI method can declare. No-body verbs (GET, DELETE)
58
- * carry args in the query string; body verbs (POST, PUT, PATCH) carry args in
59
- * the JSON body.
60
- */
61
- type CliHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
62
-
63
- /** Every event type a webhook subscription can watch. */
64
- declare const SUBSCRIBABLE_EVENT_TYPES: readonly ["commit", "repo.renamed", "org.renamed", "org.member_added", "org.repo_created", "org.repo_published", "thing.renamed", "shape.renamed"];
65
- type SubscribableEventType = (typeof SUBSCRIBABLE_EVENT_TYPES)[number];
66
- /** Org-scoped events — created with an `orgName` and no `repoName`. */
67
- declare const ORG_SCOPED_EVENT_TYPES: readonly ["org.renamed", "org.member_added", "org.repo_created", "org.repo_published"];
68
- type OrgScopedEventType = (typeof ORG_SCOPED_EVENT_TYPES)[number];
69
-
70
- /**
71
- * Validate a data payload against shape field definitions.
72
- *
73
- * Shape field types:
74
- * - "number", "string", "boolean": primitive types
75
- * - "wref": string (reference to a shape or shaped thing)
76
- * - Typed field objects: { type: primitive, description?: string }
77
- * - Nested objects: { fieldName: type, ... }
78
- * - Arrays: [elementType]
79
- * - Optional fields: field name ending with "?" (e.g. "terminal_reason?": "string")
80
- * OR type string ending with "?" (e.g. "terminal_reason": "string?")
81
- * OR typed object type ending with "?" (e.g. { type: "string?" })
82
- *
83
- * For v1 this is permissive: validates top-level field existence and basic types.
84
- * Returns a {@link ShapeValidatorResult} discriminated union — read `result.valid`
85
- * to branch, then `result.errors` (only present when invalid) for the list of
86
- * messages. `result.warnings` may be present in either branch and carries
87
- * undeclared top-level field names.
88
- *
89
- * @example
90
- * ```ts
91
- * import { validateAgainstShape } from "@warmhub/sdk-ts";
92
- *
93
- * const shapeFields = { x: "number", y: "number", label: "string?" };
94
- *
95
- * const ok = validateAgainstShape({ x: 1, y: 2 }, shapeFields);
96
- * // ok.valid === true
97
- *
98
- * const bad = validateAgainstShape({ x: "not-a-number" }, shapeFields);
99
- * if (!bad.valid) {
100
- * for (const message of bad.errors) console.error(message);
101
- * // ['Field "x" must be a number', 'Missing required field: "y"']
102
- * }
103
- * ```
104
- * @see https://docs.warmhub.ai/sdk-reference/functions/validateagainstshape/
105
- */
106
- declare function validateAgainstShape(data: Record<string, unknown>, shapeFields: Record<string, unknown>): ShapeValidatorResult;
107
- /**
108
- * Warning details for input fields that the shape does not declare.
109
- * @see https://docs.warmhub.ai/sdk-reference/type-aliases/undeclaredfieldswarning/
110
- */
111
- type UndeclaredFieldsWarning = {
112
- undeclaredFields: string[];
113
- undeclaredFieldsTruncated?: true;
114
- totalUndeclared?: number;
115
- };
116
- /**
117
- * Discriminated result returned when input is validated against shape fields.
118
- * @see https://docs.warmhub.ai/sdk-reference/type-aliases/shapevalidatorresult/
119
- */
120
- type ShapeValidatorResult = {
121
- valid: true;
122
- warnings?: UndeclaredFieldsWarning;
123
- } | {
124
- valid: false;
125
- errors: string[];
126
- warnings?: UndeclaredFieldsWarning;
127
- };
128
-
129
- /**
130
- * Hardcoded meta-schema for validating shape definitions.
131
- * Shapes are NOT validated against a DB-stored shape — they validate against this constant.
132
- * This avoids the bootstrap chicken-and-egg problem.
133
- *
134
- * A valid shape definition is:
135
- * { fields: Record<string, TypeSpec>, description?: string }
136
- * where TypeSpec is one of:
137
- * - primitive string: "number", "string", "boolean", "wref", "array"
138
- * - optional primitive: "number?", "string?", "boolean?", "wref?", "array?"
139
- * - typed field object: { type: primitive, description?: string }
140
- * - array: [TypeSpec] (shorthand) or { type: "array", items: TypeSpec }
141
- * - nested object: { fieldName: TypeSpec, ... } (key may end with "?" for optional)
142
- *
143
- * The primitive vocabulary above is closed: any other type name (e.g. "text",
144
- * "integer", "json", "date") is rejected. See VALID_PRIMITIVE_TYPES in
145
- * ./shape-types.ts for the authoritative set.
146
- * String `pattern` constraints use RE2 syntax and are evaluated with re2js so
147
- * user-authored patterns run in linear time across backend, SDK, web, CLI, and
148
- * worker-adjacent consumers. JavaScript-only constructs such as backreferences
149
- * and lookarounds are rejected at shape-definition time.
150
- */
151
-
152
- /**
153
- * Maximum size, in bytes (UTF-8 encoded), allowed for a single content field value.
154
- * WarmHub is not a document store: values larger than this are rejected at validation.
155
- * Store large documents in S3, Box, Drive, or another document system and reference
156
- * them from WarmHub instead.
157
- * @see https://docs.warmhub.ai/sdk-reference/variables/max_content_field_bytes/
158
- */
159
- declare const MAX_CONTENT_FIELD_BYTES: number;
160
- /**
161
- * Human-readable explanation of the {@link MAX_CONTENT_FIELD_BYTES} limit, suitable for
162
- * appending to a field-specific validation error. States the byte cap and points callers
163
- * to an external document store for large payloads.
164
- * @see https://docs.warmhub.ai/sdk-reference/variables/content_field_limit_error/
165
- */
166
- declare const CONTENT_FIELD_LIMIT_ERROR: string;
167
- /**
168
- * Returns a validation error message if the given string exceeds
169
- * {@link MAX_CONTENT_FIELD_BYTES} when UTF-8 encoded, or `null` if it is within the limit.
170
- *
171
- * @param path - The field path, used to identify the offending field in the message.
172
- * @param value - The candidate field value to measure.
173
- * @see https://docs.warmhub.ai/sdk-reference/functions/contentfieldlimiterror/
174
- */
175
- declare function contentFieldLimitError(path: string, value: string): string | null;
176
-
177
1
  type ActionAttempt = {
178
2
  attempt: number;
179
3
  status: string;
@@ -266,7 +90,7 @@ type AccessResolveResult$1 = {
266
90
  orgName: string;
267
91
  repoName: string;
268
92
  visible: boolean;
269
- scopes: Array<'repo:read' | 'repo:write' | 'repo:configure' | 'repo:admin' | 'repo:action-callback'>;
93
+ scopes: Array<'repo:read' | 'repo:checkpoint-read' | 'repo:write' | 'repo:configure' | 'repo:admin' | 'repo:action-callback'>;
270
94
  allowedMatches?: Array<string>;
271
95
  repoDurableId?: string;
272
96
  }>;
@@ -280,12 +104,18 @@ type AuthSyncResult = {
280
104
  success: boolean;
281
105
  };
282
106
  type CollectionTag$1 = 'arc' | 'bond' | 'pair' | 'set' | 'list';
283
- type CommitApplyResult = {
284
- committer?: string;
285
- createdByEmail?: string;
286
- message?: string;
287
- operationCount: number;
288
- repoSeq?: number;
107
+ type OperationEventReceiptV1$1 = {
108
+ event: {
109
+ committedAt: string;
110
+ eventDigest: string;
111
+ operationCount: number;
112
+ repo: {
113
+ orgName: string;
114
+ repoName: string;
115
+ };
116
+ repoSeq: string;
117
+ } | null;
118
+ eventRequestId: string;
289
119
  operations: Array<{
290
120
  opIndex?: number;
291
121
  name: string;
@@ -310,7 +140,63 @@ type CommitApplyResult = {
310
140
  removalMilestone: string;
311
141
  }>;
312
142
  };
143
+ } | {
144
+ opIndex?: number;
145
+ name: string;
146
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
147
+ version?: number;
148
+ dataHash?: string;
149
+ status?: 'success' | 'noop' | 'failed';
150
+ error?: {
151
+ code: string;
152
+ message: string;
153
+ details?: {
154
+ reason: 'expected_version_mismatch';
155
+ expectedVersion: number;
156
+ currentVersion: number;
157
+ } | {
158
+ reason: 'lease_held';
159
+ leaseExpiresAt: string;
160
+ } | {
161
+ reason: 'validation_failed';
162
+ issues: Array<{
163
+ path: string;
164
+ message: string;
165
+ }>;
166
+ } | {
167
+ reason: 'rate_limit_reset';
168
+ retryAfterSeconds: number;
169
+ resetAt: string;
170
+ } | {
171
+ reason: 'cursor_fence_unavailable';
172
+ cause: 'not_ready' | 'below_floor' | 'above_head';
173
+ retryFromStart: true;
174
+ };
175
+ };
176
+ resolvedName?: string;
177
+ retryable?: boolean;
178
+ warnings?: {
179
+ undeclaredFields?: Array<string>;
180
+ undeclaredFieldsTruncated?: true;
181
+ totalUndeclared?: number;
182
+ coalescedWrefs?: Array<{
183
+ fieldPath: string;
184
+ wref: string;
185
+ reason: string;
186
+ }>;
187
+ coalescedWrefsTruncated?: true;
188
+ totalCoalescedWrefs?: number;
189
+ deprecations?: Array<{
190
+ shape: string;
191
+ message: string;
192
+ removalMilestone: string;
193
+ }>;
194
+ };
313
195
  }>;
196
+ outcome: 'event' | 'no_event';
197
+ requestDigest: string;
198
+ schemaVersion: 'operation-event-receipt/v1';
199
+ submissionId?: string;
314
200
  };
315
201
  type CollectionContainsResult$1 = {
316
202
  type: 'arc' | 'bond' | 'pair' | 'set' | 'list' | 'triple';
@@ -374,34 +260,8 @@ type CollectionMembersPage$1 = {
374
260
  }>;
375
261
  nextCursor?: string;
376
262
  };
377
- type CollectionMutationResult$1 = {
378
- type: 'arc' | 'bond' | 'set' | 'list' | 'pair';
379
- wref: string;
380
- version: number;
381
- memberCount: number;
382
- dataHash?: string;
383
- operationCount: number;
384
- status: 'created' | 'updated' | 'noop';
385
- warnings?: {
386
- undeclaredFields?: Array<string>;
387
- undeclaredFieldsTruncated?: true;
388
- totalUndeclared?: number;
389
- coalescedWrefs?: Array<{
390
- fieldPath: string;
391
- wref: string;
392
- reason: string;
393
- }>;
394
- coalescedWrefsTruncated?: true;
395
- totalCoalescedWrefs?: number;
396
- deprecations?: Array<{
397
- shape: string;
398
- message: string;
399
- removalMilestone: string;
400
- }>;
401
- };
402
- };
403
- type CollectionStatsResult$1 = {
404
- type: 'arc' | 'bond' | 'pair' | 'set' | 'list' | 'triple';
263
+ type CollectionStatsResult$1 = {
264
+ type: 'arc' | 'bond' | 'pair' | 'set' | 'list' | 'triple';
405
265
  wref: string;
406
266
  version: number;
407
267
  memberCount: number;
@@ -471,6 +331,101 @@ type ComponentInstallResult$1 = {
471
331
  setupCreates: Array<string>;
472
332
  errors: Array<string>;
473
333
  hasSetup: boolean;
334
+ submissionId: string;
335
+ eventReceipts: Array<{
336
+ event: {
337
+ committedAt: string;
338
+ eventDigest: string;
339
+ operationCount: number;
340
+ repo: {
341
+ orgName: string;
342
+ repoName: string;
343
+ };
344
+ repoSeq: string;
345
+ } | null;
346
+ eventRequestId: string;
347
+ operations: Array<{
348
+ opIndex?: number;
349
+ name: string;
350
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
351
+ version: number;
352
+ dataHash: string;
353
+ status?: 'applied' | 'noop';
354
+ warnings?: {
355
+ undeclaredFields?: Array<string>;
356
+ undeclaredFieldsTruncated?: true;
357
+ totalUndeclared?: number;
358
+ coalescedWrefs?: Array<{
359
+ fieldPath: string;
360
+ wref: string;
361
+ reason: string;
362
+ }>;
363
+ coalescedWrefsTruncated?: true;
364
+ totalCoalescedWrefs?: number;
365
+ deprecations?: Array<{
366
+ shape: string;
367
+ message: string;
368
+ removalMilestone: string;
369
+ }>;
370
+ };
371
+ } | {
372
+ opIndex?: number;
373
+ name: string;
374
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
375
+ version?: number;
376
+ dataHash?: string;
377
+ status?: 'success' | 'noop' | 'failed';
378
+ error?: {
379
+ code: string;
380
+ message: string;
381
+ details?: {
382
+ reason: 'expected_version_mismatch';
383
+ expectedVersion: number;
384
+ currentVersion: number;
385
+ } | {
386
+ reason: 'lease_held';
387
+ leaseExpiresAt: string;
388
+ } | {
389
+ reason: 'validation_failed';
390
+ issues: Array<{
391
+ path: string;
392
+ message: string;
393
+ }>;
394
+ } | {
395
+ reason: 'rate_limit_reset';
396
+ retryAfterSeconds: number;
397
+ resetAt: string;
398
+ } | {
399
+ reason: 'cursor_fence_unavailable';
400
+ cause: 'not_ready' | 'below_floor' | 'above_head';
401
+ retryFromStart: true;
402
+ };
403
+ };
404
+ resolvedName?: string;
405
+ retryable?: boolean;
406
+ warnings?: {
407
+ undeclaredFields?: Array<string>;
408
+ undeclaredFieldsTruncated?: true;
409
+ totalUndeclared?: number;
410
+ coalescedWrefs?: Array<{
411
+ fieldPath: string;
412
+ wref: string;
413
+ reason: string;
414
+ }>;
415
+ coalescedWrefsTruncated?: true;
416
+ totalCoalescedWrefs?: number;
417
+ deprecations?: Array<{
418
+ shape: string;
419
+ message: string;
420
+ removalMilestone: string;
421
+ }>;
422
+ };
423
+ }>;
424
+ outcome: 'event' | 'no_event';
425
+ requestDigest: string;
426
+ schemaVersion: 'operation-event-receipt/v1';
427
+ submissionId?: string;
428
+ }>;
474
429
  };
475
430
  type ComponentListResult = {
476
431
  items: Array<{
@@ -514,6 +469,101 @@ type ComponentUninstallResult$1 = {
514
469
  tokensRevoked: number;
515
470
  uninstallDispatched: boolean;
516
471
  warnings: Array<string>;
472
+ submissionId: string;
473
+ eventReceipts: Array<{
474
+ event: {
475
+ committedAt: string;
476
+ eventDigest: string;
477
+ operationCount: number;
478
+ repo: {
479
+ orgName: string;
480
+ repoName: string;
481
+ };
482
+ repoSeq: string;
483
+ } | null;
484
+ eventRequestId: string;
485
+ operations: Array<{
486
+ opIndex?: number;
487
+ name: string;
488
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
489
+ version: number;
490
+ dataHash: string;
491
+ status?: 'applied' | 'noop';
492
+ warnings?: {
493
+ undeclaredFields?: Array<string>;
494
+ undeclaredFieldsTruncated?: true;
495
+ totalUndeclared?: number;
496
+ coalescedWrefs?: Array<{
497
+ fieldPath: string;
498
+ wref: string;
499
+ reason: string;
500
+ }>;
501
+ coalescedWrefsTruncated?: true;
502
+ totalCoalescedWrefs?: number;
503
+ deprecations?: Array<{
504
+ shape: string;
505
+ message: string;
506
+ removalMilestone: string;
507
+ }>;
508
+ };
509
+ } | {
510
+ opIndex?: number;
511
+ name: string;
512
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
513
+ version?: number;
514
+ dataHash?: string;
515
+ status?: 'success' | 'noop' | 'failed';
516
+ error?: {
517
+ code: string;
518
+ message: string;
519
+ details?: {
520
+ reason: 'expected_version_mismatch';
521
+ expectedVersion: number;
522
+ currentVersion: number;
523
+ } | {
524
+ reason: 'lease_held';
525
+ leaseExpiresAt: string;
526
+ } | {
527
+ reason: 'validation_failed';
528
+ issues: Array<{
529
+ path: string;
530
+ message: string;
531
+ }>;
532
+ } | {
533
+ reason: 'rate_limit_reset';
534
+ retryAfterSeconds: number;
535
+ resetAt: string;
536
+ } | {
537
+ reason: 'cursor_fence_unavailable';
538
+ cause: 'not_ready' | 'below_floor' | 'above_head';
539
+ retryFromStart: true;
540
+ };
541
+ };
542
+ resolvedName?: string;
543
+ retryable?: boolean;
544
+ warnings?: {
545
+ undeclaredFields?: Array<string>;
546
+ undeclaredFieldsTruncated?: true;
547
+ totalUndeclared?: number;
548
+ coalescedWrefs?: Array<{
549
+ fieldPath: string;
550
+ wref: string;
551
+ reason: string;
552
+ }>;
553
+ coalescedWrefsTruncated?: true;
554
+ totalCoalescedWrefs?: number;
555
+ deprecations?: Array<{
556
+ shape: string;
557
+ message: string;
558
+ removalMilestone: string;
559
+ }>;
560
+ };
561
+ }>;
562
+ outcome: 'event' | 'no_event';
563
+ requestDigest: string;
564
+ schemaVersion: 'operation-event-receipt/v1';
565
+ submissionId?: string;
566
+ }>;
517
567
  };
518
568
  type CredentialDeleteResult$1 = {
519
569
  ok: true;
@@ -530,6 +580,8 @@ type CredentialRevokeResult$1 = {
530
580
  type Capabilities = {
531
581
  apiVersion: string;
532
582
  minSupportedSdk: string;
583
+ minSupportedClients: Record<string, string>;
584
+ writeContractVersion: number;
533
585
  features: Record<string, boolean>;
534
586
  };
535
587
  type HomepageFeaturedListsResult$1 = {
@@ -568,93 +620,1144 @@ type HomepageFeaturedListsResult$1 = {
568
620
  assertion: number;
569
621
  };
570
622
  }>;
571
- }>;
623
+ }>;
624
+ };
625
+ type StreamAppendInput$1 = {
626
+ orgName: string;
627
+ repoName: string;
628
+ streamId: string;
629
+ componentRef?: string;
630
+ workspaceName?: never;
631
+ committer?: string;
632
+ message?: string;
633
+ returnRepoSeq?: boolean;
634
+ allocatedTokens?: never;
635
+ allocatedTokenRanges: Array<{
636
+ start: number;
637
+ end: number;
638
+ }>;
639
+ operations: Array<{
640
+ operation: 'add';
641
+ kind: 'shape';
642
+ name: string;
643
+ data: unknown;
644
+ skipExisting?: boolean;
645
+ } | {
646
+ operation: 'add';
647
+ kind: 'thing';
648
+ name: string;
649
+ data: unknown;
650
+ skipExisting?: boolean;
651
+ } | {
652
+ operation: 'add';
653
+ kind: 'assertion';
654
+ name: string;
655
+ about: string;
656
+ data: unknown;
657
+ skipExisting?: boolean;
658
+ } | {
659
+ operation: 'add';
660
+ kind: 'collection';
661
+ name: string;
662
+ type: 'arc' | 'bond' | 'pair' | 'set' | 'list';
663
+ members: Array<string>;
664
+ skipExisting?: boolean;
665
+ } | {
666
+ operation: 'revise';
667
+ kind: 'shape';
668
+ name: string;
669
+ data: unknown;
670
+ expectedVersion?: number;
671
+ active?: never;
672
+ leaseId?: string;
673
+ } | {
674
+ operation: 'revise';
675
+ kind: 'thing';
676
+ name: string;
677
+ data: unknown;
678
+ expectedVersion?: number;
679
+ active?: never;
680
+ leaseId?: string;
681
+ } | {
682
+ operation: 'revise';
683
+ kind: 'assertion';
684
+ name: string;
685
+ data: unknown;
686
+ expectedVersion?: number;
687
+ active?: never;
688
+ leaseId?: string;
689
+ } | {
690
+ operation: 'revise';
691
+ kind: 'collection';
692
+ name: string;
693
+ type: 'arc' | 'bond' | 'pair' | 'set' | 'list';
694
+ members: Array<string>;
695
+ expectedVersion?: number;
696
+ leaseId?: string;
697
+ } | {
698
+ operation: 'retract';
699
+ name: string;
700
+ kind?: 'shape' | 'thing' | 'assertion' | 'collection';
701
+ reason?: string;
702
+ expectedVersion?: number;
703
+ leaseId?: string;
704
+ } | {
705
+ operation: 'rename';
706
+ name: string;
707
+ newName: string;
708
+ kind?: 'shape' | 'thing' | 'assertion' | 'collection';
709
+ }>;
710
+ chunkOrdinal: number;
711
+ submissionId: string;
712
+ };
713
+ type StreamAppendResult$1 = {
714
+ allocatedTokenRanges: Array<{
715
+ start: number;
716
+ end: number;
717
+ }>;
718
+ results: Array<{
719
+ opIndex?: number;
720
+ name: string;
721
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
722
+ version?: number;
723
+ dataHash?: string;
724
+ status?: 'success' | 'noop' | 'failed';
725
+ error?: {
726
+ code: string;
727
+ message: string;
728
+ details?: {
729
+ reason: 'expected_version_mismatch';
730
+ expectedVersion: number;
731
+ currentVersion: number;
732
+ } | {
733
+ reason: 'lease_held';
734
+ leaseExpiresAt: string;
735
+ } | {
736
+ reason: 'validation_failed';
737
+ issues: Array<{
738
+ path: string;
739
+ message: string;
740
+ }>;
741
+ } | {
742
+ reason: 'rate_limit_reset';
743
+ retryAfterSeconds: number;
744
+ resetAt: string;
745
+ } | {
746
+ reason: 'cursor_fence_unavailable';
747
+ cause: 'not_ready' | 'below_floor' | 'above_head';
748
+ retryFromStart: true;
749
+ };
750
+ };
751
+ resolvedName?: string;
752
+ retryable?: boolean;
753
+ warnings?: {
754
+ undeclaredFields?: Array<string>;
755
+ undeclaredFieldsTruncated?: true;
756
+ totalUndeclared?: number;
757
+ coalescedWrefs?: Array<{
758
+ fieldPath: string;
759
+ wref: string;
760
+ reason: string;
761
+ }>;
762
+ coalescedWrefsTruncated?: true;
763
+ totalCoalescedWrefs?: number;
764
+ deprecations?: Array<{
765
+ shape: string;
766
+ message: string;
767
+ removalMilestone: string;
768
+ }>;
769
+ };
770
+ }>;
771
+ repoSeq?: number;
772
+ createdByEmail?: string;
773
+ appendTotalMs?: number;
774
+ appendResolveRepoMs?: number;
775
+ appendTokenResolveMs?: number;
776
+ appendApplyMs?: number;
777
+ applySubphases?: {
778
+ addThingMs?: number;
779
+ addAssertionMs?: number;
780
+ addAssertionResolveAboutMs?: number;
781
+ reviseThingMs?: number;
782
+ reviseAssertionMs?: number;
783
+ reviseCollectionMs?: number;
784
+ preparePinnedLoadShapeFieldsMs?: number;
785
+ preparePinnedPinWrefsMs?: number;
786
+ preparePinnedResolveTokensMs?: number;
787
+ preparePinnedValidateMs?: number;
788
+ operationLoopMs?: number;
789
+ persistMs?: number;
790
+ persistThingsMs?: number;
791
+ persistVersionsMs?: number;
792
+ persistAssertionsMs?: number;
793
+ persistUpdatesMs?: number;
794
+ persistOutboxMs?: number;
795
+ refInsertMs?: number;
796
+ refSourceCount?: number;
797
+ };
798
+ event: {
799
+ committedAt: string;
800
+ eventDigest: string;
801
+ operationCount: number;
802
+ repo: {
803
+ orgName: string;
804
+ repoName: string;
805
+ };
806
+ repoSeq: string;
807
+ } | null;
808
+ eventRequestId: string;
809
+ operations: Array<{
810
+ opIndex?: number;
811
+ name: string;
812
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
813
+ version: number;
814
+ dataHash: string;
815
+ status?: 'applied' | 'noop';
816
+ warnings?: {
817
+ undeclaredFields?: Array<string>;
818
+ undeclaredFieldsTruncated?: true;
819
+ totalUndeclared?: number;
820
+ coalescedWrefs?: Array<{
821
+ fieldPath: string;
822
+ wref: string;
823
+ reason: string;
824
+ }>;
825
+ coalescedWrefsTruncated?: true;
826
+ totalCoalescedWrefs?: number;
827
+ deprecations?: Array<{
828
+ shape: string;
829
+ message: string;
830
+ removalMilestone: string;
831
+ }>;
832
+ };
833
+ } | {
834
+ opIndex?: number;
835
+ name: string;
836
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
837
+ version?: number;
838
+ dataHash?: string;
839
+ status?: 'success' | 'noop' | 'failed';
840
+ error?: {
841
+ code: string;
842
+ message: string;
843
+ details?: {
844
+ reason: 'expected_version_mismatch';
845
+ expectedVersion: number;
846
+ currentVersion: number;
847
+ } | {
848
+ reason: 'lease_held';
849
+ leaseExpiresAt: string;
850
+ } | {
851
+ reason: 'validation_failed';
852
+ issues: Array<{
853
+ path: string;
854
+ message: string;
855
+ }>;
856
+ } | {
857
+ reason: 'rate_limit_reset';
858
+ retryAfterSeconds: number;
859
+ resetAt: string;
860
+ } | {
861
+ reason: 'cursor_fence_unavailable';
862
+ cause: 'not_ready' | 'below_floor' | 'above_head';
863
+ retryFromStart: true;
864
+ };
865
+ };
866
+ resolvedName?: string;
867
+ retryable?: boolean;
868
+ warnings?: {
869
+ undeclaredFields?: Array<string>;
870
+ undeclaredFieldsTruncated?: true;
871
+ totalUndeclared?: number;
872
+ coalescedWrefs?: Array<{
873
+ fieldPath: string;
874
+ wref: string;
875
+ reason: string;
876
+ }>;
877
+ coalescedWrefsTruncated?: true;
878
+ totalCoalescedWrefs?: number;
879
+ deprecations?: Array<{
880
+ shape: string;
881
+ message: string;
882
+ removalMilestone: string;
883
+ }>;
884
+ };
885
+ }>;
886
+ outcome: 'event' | 'no_event';
887
+ requestDigest: string;
888
+ schemaVersion: 'operation-event-receipt/v1';
889
+ submissionId?: string;
890
+ receipt: {
891
+ event: {
892
+ committedAt: string;
893
+ eventDigest: string;
894
+ operationCount: number;
895
+ repo: {
896
+ orgName: string;
897
+ repoName: string;
898
+ };
899
+ repoSeq: string;
900
+ } | null;
901
+ eventRequestId: string;
902
+ operations: Array<{
903
+ opIndex?: number;
904
+ name: string;
905
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
906
+ version: number;
907
+ dataHash: string;
908
+ status?: 'applied' | 'noop';
909
+ warnings?: {
910
+ undeclaredFields?: Array<string>;
911
+ undeclaredFieldsTruncated?: true;
912
+ totalUndeclared?: number;
913
+ coalescedWrefs?: Array<{
914
+ fieldPath: string;
915
+ wref: string;
916
+ reason: string;
917
+ }>;
918
+ coalescedWrefsTruncated?: true;
919
+ totalCoalescedWrefs?: number;
920
+ deprecations?: Array<{
921
+ shape: string;
922
+ message: string;
923
+ removalMilestone: string;
924
+ }>;
925
+ };
926
+ } | {
927
+ opIndex?: number;
928
+ name: string;
929
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
930
+ version?: number;
931
+ dataHash?: string;
932
+ status?: 'success' | 'noop' | 'failed';
933
+ error?: {
934
+ code: string;
935
+ message: string;
936
+ details?: {
937
+ reason: 'expected_version_mismatch';
938
+ expectedVersion: number;
939
+ currentVersion: number;
940
+ } | {
941
+ reason: 'lease_held';
942
+ leaseExpiresAt: string;
943
+ } | {
944
+ reason: 'validation_failed';
945
+ issues: Array<{
946
+ path: string;
947
+ message: string;
948
+ }>;
949
+ } | {
950
+ reason: 'rate_limit_reset';
951
+ retryAfterSeconds: number;
952
+ resetAt: string;
953
+ } | {
954
+ reason: 'cursor_fence_unavailable';
955
+ cause: 'not_ready' | 'below_floor' | 'above_head';
956
+ retryFromStart: true;
957
+ };
958
+ };
959
+ resolvedName?: string;
960
+ retryable?: boolean;
961
+ warnings?: {
962
+ undeclaredFields?: Array<string>;
963
+ undeclaredFieldsTruncated?: true;
964
+ totalUndeclared?: number;
965
+ coalescedWrefs?: Array<{
966
+ fieldPath: string;
967
+ wref: string;
968
+ reason: string;
969
+ }>;
970
+ coalescedWrefsTruncated?: true;
971
+ totalCoalescedWrefs?: number;
972
+ deprecations?: Array<{
973
+ shape: string;
974
+ message: string;
975
+ removalMilestone: string;
976
+ }>;
977
+ };
978
+ }>;
979
+ outcome: 'event' | 'no_event';
980
+ requestDigest: string;
981
+ schemaVersion: 'operation-event-receipt/v1';
982
+ submissionId?: string;
983
+ };
984
+ };
985
+ type CommitApplyCompatibilityResult$1 = {
986
+ committer?: string;
987
+ createdByEmail?: string;
988
+ message?: string;
989
+ operationCount: number;
990
+ repoSeq?: number;
991
+ operations: Array<{
992
+ opIndex?: number;
993
+ name: string;
994
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
995
+ version: number;
996
+ dataHash: string;
997
+ status?: 'applied' | 'noop';
998
+ warnings?: {
999
+ undeclaredFields?: Array<string>;
1000
+ undeclaredFieldsTruncated?: true;
1001
+ totalUndeclared?: number;
1002
+ coalescedWrefs?: Array<{
1003
+ fieldPath: string;
1004
+ wref: string;
1005
+ reason: string;
1006
+ }>;
1007
+ coalescedWrefsTruncated?: true;
1008
+ totalCoalescedWrefs?: number;
1009
+ deprecations?: Array<{
1010
+ shape: string;
1011
+ message: string;
1012
+ removalMilestone: string;
1013
+ }>;
1014
+ };
1015
+ }>;
1016
+ event: {
1017
+ committedAt: string;
1018
+ eventDigest: string;
1019
+ operationCount: number;
1020
+ repo: {
1021
+ orgName: string;
1022
+ repoName: string;
1023
+ };
1024
+ repoSeq: string;
1025
+ } | null;
1026
+ eventRequestId: string;
1027
+ outcome: 'event' | 'no_event';
1028
+ requestDigest: string;
1029
+ schemaVersion: 'operation-event-receipt/v1';
1030
+ submissionId?: string;
1031
+ receipt: {
1032
+ event: {
1033
+ committedAt: string;
1034
+ eventDigest: string;
1035
+ operationCount: number;
1036
+ repo: {
1037
+ orgName: string;
1038
+ repoName: string;
1039
+ };
1040
+ repoSeq: string;
1041
+ } | null;
1042
+ eventRequestId: string;
1043
+ operations: Array<{
1044
+ opIndex?: number;
1045
+ name: string;
1046
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1047
+ version: number;
1048
+ dataHash: string;
1049
+ status?: 'applied' | 'noop';
1050
+ warnings?: {
1051
+ undeclaredFields?: Array<string>;
1052
+ undeclaredFieldsTruncated?: true;
1053
+ totalUndeclared?: number;
1054
+ coalescedWrefs?: Array<{
1055
+ fieldPath: string;
1056
+ wref: string;
1057
+ reason: string;
1058
+ }>;
1059
+ coalescedWrefsTruncated?: true;
1060
+ totalCoalescedWrefs?: number;
1061
+ deprecations?: Array<{
1062
+ shape: string;
1063
+ message: string;
1064
+ removalMilestone: string;
1065
+ }>;
1066
+ };
1067
+ } | {
1068
+ opIndex?: number;
1069
+ name: string;
1070
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1071
+ version?: number;
1072
+ dataHash?: string;
1073
+ status?: 'success' | 'noop' | 'failed';
1074
+ error?: {
1075
+ code: string;
1076
+ message: string;
1077
+ details?: {
1078
+ reason: 'expected_version_mismatch';
1079
+ expectedVersion: number;
1080
+ currentVersion: number;
1081
+ } | {
1082
+ reason: 'lease_held';
1083
+ leaseExpiresAt: string;
1084
+ } | {
1085
+ reason: 'validation_failed';
1086
+ issues: Array<{
1087
+ path: string;
1088
+ message: string;
1089
+ }>;
1090
+ } | {
1091
+ reason: 'rate_limit_reset';
1092
+ retryAfterSeconds: number;
1093
+ resetAt: string;
1094
+ } | {
1095
+ reason: 'cursor_fence_unavailable';
1096
+ cause: 'not_ready' | 'below_floor' | 'above_head';
1097
+ retryFromStart: true;
1098
+ };
1099
+ };
1100
+ resolvedName?: string;
1101
+ retryable?: boolean;
1102
+ warnings?: {
1103
+ undeclaredFields?: Array<string>;
1104
+ undeclaredFieldsTruncated?: true;
1105
+ totalUndeclared?: number;
1106
+ coalescedWrefs?: Array<{
1107
+ fieldPath: string;
1108
+ wref: string;
1109
+ reason: string;
1110
+ }>;
1111
+ coalescedWrefsTruncated?: true;
1112
+ totalCoalescedWrefs?: number;
1113
+ deprecations?: Array<{
1114
+ shape: string;
1115
+ message: string;
1116
+ removalMilestone: string;
1117
+ }>;
1118
+ };
1119
+ }>;
1120
+ outcome: 'event' | 'no_event';
1121
+ requestDigest: string;
1122
+ schemaVersion: 'operation-event-receipt/v1';
1123
+ submissionId?: string;
1124
+ };
1125
+ };
1126
+ type CollectionMutationCompatibilityResult = {
1127
+ type: 'arc' | 'bond' | 'set' | 'list' | 'pair';
1128
+ wref: string;
1129
+ version: number;
1130
+ memberCount: number;
1131
+ dataHash?: string;
1132
+ operationCount: number;
1133
+ status: 'created' | 'updated' | 'noop';
1134
+ warnings?: {
1135
+ undeclaredFields?: Array<string>;
1136
+ undeclaredFieldsTruncated?: true;
1137
+ totalUndeclared?: number;
1138
+ coalescedWrefs?: Array<{
1139
+ fieldPath: string;
1140
+ wref: string;
1141
+ reason: string;
1142
+ }>;
1143
+ coalescedWrefsTruncated?: true;
1144
+ totalCoalescedWrefs?: number;
1145
+ deprecations?: Array<{
1146
+ shape: string;
1147
+ message: string;
1148
+ removalMilestone: string;
1149
+ }>;
1150
+ };
1151
+ event: {
1152
+ committedAt: string;
1153
+ eventDigest: string;
1154
+ operationCount: number;
1155
+ repo: {
1156
+ orgName: string;
1157
+ repoName: string;
1158
+ };
1159
+ repoSeq: string;
1160
+ } | null;
1161
+ eventRequestId: string;
1162
+ operations: Array<{
1163
+ opIndex?: number;
1164
+ name: string;
1165
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1166
+ version: number;
1167
+ dataHash: string;
1168
+ status?: 'applied' | 'noop';
1169
+ warnings?: {
1170
+ undeclaredFields?: Array<string>;
1171
+ undeclaredFieldsTruncated?: true;
1172
+ totalUndeclared?: number;
1173
+ coalescedWrefs?: Array<{
1174
+ fieldPath: string;
1175
+ wref: string;
1176
+ reason: string;
1177
+ }>;
1178
+ coalescedWrefsTruncated?: true;
1179
+ totalCoalescedWrefs?: number;
1180
+ deprecations?: Array<{
1181
+ shape: string;
1182
+ message: string;
1183
+ removalMilestone: string;
1184
+ }>;
1185
+ };
1186
+ } | {
1187
+ opIndex?: number;
1188
+ name: string;
1189
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1190
+ version?: number;
1191
+ dataHash?: string;
1192
+ status?: 'success' | 'noop' | 'failed';
1193
+ error?: {
1194
+ code: string;
1195
+ message: string;
1196
+ details?: {
1197
+ reason: 'expected_version_mismatch';
1198
+ expectedVersion: number;
1199
+ currentVersion: number;
1200
+ } | {
1201
+ reason: 'lease_held';
1202
+ leaseExpiresAt: string;
1203
+ } | {
1204
+ reason: 'validation_failed';
1205
+ issues: Array<{
1206
+ path: string;
1207
+ message: string;
1208
+ }>;
1209
+ } | {
1210
+ reason: 'rate_limit_reset';
1211
+ retryAfterSeconds: number;
1212
+ resetAt: string;
1213
+ } | {
1214
+ reason: 'cursor_fence_unavailable';
1215
+ cause: 'not_ready' | 'below_floor' | 'above_head';
1216
+ retryFromStart: true;
1217
+ };
1218
+ };
1219
+ resolvedName?: string;
1220
+ retryable?: boolean;
1221
+ warnings?: {
1222
+ undeclaredFields?: Array<string>;
1223
+ undeclaredFieldsTruncated?: true;
1224
+ totalUndeclared?: number;
1225
+ coalescedWrefs?: Array<{
1226
+ fieldPath: string;
1227
+ wref: string;
1228
+ reason: string;
1229
+ }>;
1230
+ coalescedWrefsTruncated?: true;
1231
+ totalCoalescedWrefs?: number;
1232
+ deprecations?: Array<{
1233
+ shape: string;
1234
+ message: string;
1235
+ removalMilestone: string;
1236
+ }>;
1237
+ };
1238
+ }>;
1239
+ outcome: 'event' | 'no_event';
1240
+ requestDigest: string;
1241
+ schemaVersion: 'operation-event-receipt/v1';
1242
+ submissionId?: string;
1243
+ receipt: {
1244
+ event: {
1245
+ committedAt: string;
1246
+ eventDigest: string;
1247
+ operationCount: number;
1248
+ repo: {
1249
+ orgName: string;
1250
+ repoName: string;
1251
+ };
1252
+ repoSeq: string;
1253
+ } | null;
1254
+ eventRequestId: string;
1255
+ operations: Array<{
1256
+ opIndex?: number;
1257
+ name: string;
1258
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1259
+ version: number;
1260
+ dataHash: string;
1261
+ status?: 'applied' | 'noop';
1262
+ warnings?: {
1263
+ undeclaredFields?: Array<string>;
1264
+ undeclaredFieldsTruncated?: true;
1265
+ totalUndeclared?: number;
1266
+ coalescedWrefs?: Array<{
1267
+ fieldPath: string;
1268
+ wref: string;
1269
+ reason: string;
1270
+ }>;
1271
+ coalescedWrefsTruncated?: true;
1272
+ totalCoalescedWrefs?: number;
1273
+ deprecations?: Array<{
1274
+ shape: string;
1275
+ message: string;
1276
+ removalMilestone: string;
1277
+ }>;
1278
+ };
1279
+ } | {
1280
+ opIndex?: number;
1281
+ name: string;
1282
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1283
+ version?: number;
1284
+ dataHash?: string;
1285
+ status?: 'success' | 'noop' | 'failed';
1286
+ error?: {
1287
+ code: string;
1288
+ message: string;
1289
+ details?: {
1290
+ reason: 'expected_version_mismatch';
1291
+ expectedVersion: number;
1292
+ currentVersion: number;
1293
+ } | {
1294
+ reason: 'lease_held';
1295
+ leaseExpiresAt: string;
1296
+ } | {
1297
+ reason: 'validation_failed';
1298
+ issues: Array<{
1299
+ path: string;
1300
+ message: string;
1301
+ }>;
1302
+ } | {
1303
+ reason: 'rate_limit_reset';
1304
+ retryAfterSeconds: number;
1305
+ resetAt: string;
1306
+ } | {
1307
+ reason: 'cursor_fence_unavailable';
1308
+ cause: 'not_ready' | 'below_floor' | 'above_head';
1309
+ retryFromStart: true;
1310
+ };
1311
+ };
1312
+ resolvedName?: string;
1313
+ retryable?: boolean;
1314
+ warnings?: {
1315
+ undeclaredFields?: Array<string>;
1316
+ undeclaredFieldsTruncated?: true;
1317
+ totalUndeclared?: number;
1318
+ coalescedWrefs?: Array<{
1319
+ fieldPath: string;
1320
+ wref: string;
1321
+ reason: string;
1322
+ }>;
1323
+ coalescedWrefsTruncated?: true;
1324
+ totalCoalescedWrefs?: number;
1325
+ deprecations?: Array<{
1326
+ shape: string;
1327
+ message: string;
1328
+ removalMilestone: string;
1329
+ }>;
1330
+ };
1331
+ }>;
1332
+ outcome: 'event' | 'no_event';
1333
+ requestDigest: string;
1334
+ schemaVersion: 'operation-event-receipt/v1';
1335
+ submissionId?: string;
1336
+ };
1337
+ };
1338
+ type RenameCompatibilityResult = {
1339
+ renamed: true;
1340
+ event: {
1341
+ committedAt: string;
1342
+ eventDigest: string;
1343
+ operationCount: number;
1344
+ repo: {
1345
+ orgName: string;
1346
+ repoName: string;
1347
+ };
1348
+ repoSeq: string;
1349
+ } | null;
1350
+ eventRequestId: string;
1351
+ operations: Array<{
1352
+ opIndex?: number;
1353
+ name: string;
1354
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1355
+ version: number;
1356
+ dataHash: string;
1357
+ status?: 'applied' | 'noop';
1358
+ warnings?: {
1359
+ undeclaredFields?: Array<string>;
1360
+ undeclaredFieldsTruncated?: true;
1361
+ totalUndeclared?: number;
1362
+ coalescedWrefs?: Array<{
1363
+ fieldPath: string;
1364
+ wref: string;
1365
+ reason: string;
1366
+ }>;
1367
+ coalescedWrefsTruncated?: true;
1368
+ totalCoalescedWrefs?: number;
1369
+ deprecations?: Array<{
1370
+ shape: string;
1371
+ message: string;
1372
+ removalMilestone: string;
1373
+ }>;
1374
+ };
1375
+ } | {
1376
+ opIndex?: number;
1377
+ name: string;
1378
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1379
+ version?: number;
1380
+ dataHash?: string;
1381
+ status?: 'success' | 'noop' | 'failed';
1382
+ error?: {
1383
+ code: string;
1384
+ message: string;
1385
+ details?: {
1386
+ reason: 'expected_version_mismatch';
1387
+ expectedVersion: number;
1388
+ currentVersion: number;
1389
+ } | {
1390
+ reason: 'lease_held';
1391
+ leaseExpiresAt: string;
1392
+ } | {
1393
+ reason: 'validation_failed';
1394
+ issues: Array<{
1395
+ path: string;
1396
+ message: string;
1397
+ }>;
1398
+ } | {
1399
+ reason: 'rate_limit_reset';
1400
+ retryAfterSeconds: number;
1401
+ resetAt: string;
1402
+ } | {
1403
+ reason: 'cursor_fence_unavailable';
1404
+ cause: 'not_ready' | 'below_floor' | 'above_head';
1405
+ retryFromStart: true;
1406
+ };
1407
+ };
1408
+ resolvedName?: string;
1409
+ retryable?: boolean;
1410
+ warnings?: {
1411
+ undeclaredFields?: Array<string>;
1412
+ undeclaredFieldsTruncated?: true;
1413
+ totalUndeclared?: number;
1414
+ coalescedWrefs?: Array<{
1415
+ fieldPath: string;
1416
+ wref: string;
1417
+ reason: string;
1418
+ }>;
1419
+ coalescedWrefsTruncated?: true;
1420
+ totalCoalescedWrefs?: number;
1421
+ deprecations?: Array<{
1422
+ shape: string;
1423
+ message: string;
1424
+ removalMilestone: string;
1425
+ }>;
1426
+ };
1427
+ }>;
1428
+ outcome: 'event' | 'no_event';
1429
+ requestDigest: string;
1430
+ schemaVersion: 'operation-event-receipt/v1';
1431
+ submissionId?: string;
1432
+ receipt: {
1433
+ event: {
1434
+ committedAt: string;
1435
+ eventDigest: string;
1436
+ operationCount: number;
1437
+ repo: {
1438
+ orgName: string;
1439
+ repoName: string;
1440
+ };
1441
+ repoSeq: string;
1442
+ } | null;
1443
+ eventRequestId: string;
1444
+ operations: Array<{
1445
+ opIndex?: number;
1446
+ name: string;
1447
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1448
+ version: number;
1449
+ dataHash: string;
1450
+ status?: 'applied' | 'noop';
1451
+ warnings?: {
1452
+ undeclaredFields?: Array<string>;
1453
+ undeclaredFieldsTruncated?: true;
1454
+ totalUndeclared?: number;
1455
+ coalescedWrefs?: Array<{
1456
+ fieldPath: string;
1457
+ wref: string;
1458
+ reason: string;
1459
+ }>;
1460
+ coalescedWrefsTruncated?: true;
1461
+ totalCoalescedWrefs?: number;
1462
+ deprecations?: Array<{
1463
+ shape: string;
1464
+ message: string;
1465
+ removalMilestone: string;
1466
+ }>;
1467
+ };
1468
+ } | {
1469
+ opIndex?: number;
1470
+ name: string;
1471
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1472
+ version?: number;
1473
+ dataHash?: string;
1474
+ status?: 'success' | 'noop' | 'failed';
1475
+ error?: {
1476
+ code: string;
1477
+ message: string;
1478
+ details?: {
1479
+ reason: 'expected_version_mismatch';
1480
+ expectedVersion: number;
1481
+ currentVersion: number;
1482
+ } | {
1483
+ reason: 'lease_held';
1484
+ leaseExpiresAt: string;
1485
+ } | {
1486
+ reason: 'validation_failed';
1487
+ issues: Array<{
1488
+ path: string;
1489
+ message: string;
1490
+ }>;
1491
+ } | {
1492
+ reason: 'rate_limit_reset';
1493
+ retryAfterSeconds: number;
1494
+ resetAt: string;
1495
+ } | {
1496
+ reason: 'cursor_fence_unavailable';
1497
+ cause: 'not_ready' | 'below_floor' | 'above_head';
1498
+ retryFromStart: true;
1499
+ };
1500
+ };
1501
+ resolvedName?: string;
1502
+ retryable?: boolean;
1503
+ warnings?: {
1504
+ undeclaredFields?: Array<string>;
1505
+ undeclaredFieldsTruncated?: true;
1506
+ totalUndeclared?: number;
1507
+ coalescedWrefs?: Array<{
1508
+ fieldPath: string;
1509
+ wref: string;
1510
+ reason: string;
1511
+ }>;
1512
+ coalescedWrefsTruncated?: true;
1513
+ totalCoalescedWrefs?: number;
1514
+ deprecations?: Array<{
1515
+ shape: string;
1516
+ message: string;
1517
+ removalMilestone: string;
1518
+ }>;
1519
+ };
1520
+ }>;
1521
+ outcome: 'event' | 'no_event';
1522
+ requestDigest: string;
1523
+ schemaVersion: 'operation-event-receipt/v1';
1524
+ submissionId?: string;
1525
+ };
1526
+ };
1527
+ type ShapeChangeCompatibilityResult = {
1528
+ name: string;
1529
+ operation: 'add' | 'revise' | 'retract' | 'noop';
1530
+ version: number;
1531
+ dataHash: string;
1532
+ event: {
1533
+ committedAt: string;
1534
+ eventDigest: string;
1535
+ operationCount: number;
1536
+ repo: {
1537
+ orgName: string;
1538
+ repoName: string;
1539
+ };
1540
+ repoSeq: string;
1541
+ } | null;
1542
+ eventRequestId: string;
1543
+ operations: Array<{
1544
+ opIndex?: number;
1545
+ name: string;
1546
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1547
+ version: number;
1548
+ dataHash: string;
1549
+ status?: 'applied' | 'noop';
1550
+ warnings?: {
1551
+ undeclaredFields?: Array<string>;
1552
+ undeclaredFieldsTruncated?: true;
1553
+ totalUndeclared?: number;
1554
+ coalescedWrefs?: Array<{
1555
+ fieldPath: string;
1556
+ wref: string;
1557
+ reason: string;
1558
+ }>;
1559
+ coalescedWrefsTruncated?: true;
1560
+ totalCoalescedWrefs?: number;
1561
+ deprecations?: Array<{
1562
+ shape: string;
1563
+ message: string;
1564
+ removalMilestone: string;
1565
+ }>;
1566
+ };
1567
+ } | {
1568
+ opIndex?: number;
1569
+ name: string;
1570
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1571
+ version?: number;
1572
+ dataHash?: string;
1573
+ status?: 'success' | 'noop' | 'failed';
1574
+ error?: {
1575
+ code: string;
1576
+ message: string;
1577
+ details?: {
1578
+ reason: 'expected_version_mismatch';
1579
+ expectedVersion: number;
1580
+ currentVersion: number;
1581
+ } | {
1582
+ reason: 'lease_held';
1583
+ leaseExpiresAt: string;
1584
+ } | {
1585
+ reason: 'validation_failed';
1586
+ issues: Array<{
1587
+ path: string;
1588
+ message: string;
1589
+ }>;
1590
+ } | {
1591
+ reason: 'rate_limit_reset';
1592
+ retryAfterSeconds: number;
1593
+ resetAt: string;
1594
+ } | {
1595
+ reason: 'cursor_fence_unavailable';
1596
+ cause: 'not_ready' | 'below_floor' | 'above_head';
1597
+ retryFromStart: true;
1598
+ };
1599
+ };
1600
+ resolvedName?: string;
1601
+ retryable?: boolean;
1602
+ warnings?: {
1603
+ undeclaredFields?: Array<string>;
1604
+ undeclaredFieldsTruncated?: true;
1605
+ totalUndeclared?: number;
1606
+ coalescedWrefs?: Array<{
1607
+ fieldPath: string;
1608
+ wref: string;
1609
+ reason: string;
1610
+ }>;
1611
+ coalescedWrefsTruncated?: true;
1612
+ totalCoalescedWrefs?: number;
1613
+ deprecations?: Array<{
1614
+ shape: string;
1615
+ message: string;
1616
+ removalMilestone: string;
1617
+ }>;
1618
+ };
1619
+ }>;
1620
+ outcome: 'event' | 'no_event';
1621
+ requestDigest: string;
1622
+ schemaVersion: 'operation-event-receipt/v1';
1623
+ submissionId?: string;
1624
+ receipt: {
1625
+ event: {
1626
+ committedAt: string;
1627
+ eventDigest: string;
1628
+ operationCount: number;
1629
+ repo: {
1630
+ orgName: string;
1631
+ repoName: string;
1632
+ };
1633
+ repoSeq: string;
1634
+ } | null;
1635
+ eventRequestId: string;
1636
+ operations: Array<{
1637
+ opIndex?: number;
1638
+ name: string;
1639
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1640
+ version: number;
1641
+ dataHash: string;
1642
+ status?: 'applied' | 'noop';
1643
+ warnings?: {
1644
+ undeclaredFields?: Array<string>;
1645
+ undeclaredFieldsTruncated?: true;
1646
+ totalUndeclared?: number;
1647
+ coalescedWrefs?: Array<{
1648
+ fieldPath: string;
1649
+ wref: string;
1650
+ reason: string;
1651
+ }>;
1652
+ coalescedWrefsTruncated?: true;
1653
+ totalCoalescedWrefs?: number;
1654
+ deprecations?: Array<{
1655
+ shape: string;
1656
+ message: string;
1657
+ removalMilestone: string;
1658
+ }>;
1659
+ };
1660
+ } | {
1661
+ opIndex?: number;
1662
+ name: string;
1663
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1664
+ version?: number;
1665
+ dataHash?: string;
1666
+ status?: 'success' | 'noop' | 'failed';
1667
+ error?: {
1668
+ code: string;
1669
+ message: string;
1670
+ details?: {
1671
+ reason: 'expected_version_mismatch';
1672
+ expectedVersion: number;
1673
+ currentVersion: number;
1674
+ } | {
1675
+ reason: 'lease_held';
1676
+ leaseExpiresAt: string;
1677
+ } | {
1678
+ reason: 'validation_failed';
1679
+ issues: Array<{
1680
+ path: string;
1681
+ message: string;
1682
+ }>;
1683
+ } | {
1684
+ reason: 'rate_limit_reset';
1685
+ retryAfterSeconds: number;
1686
+ resetAt: string;
1687
+ } | {
1688
+ reason: 'cursor_fence_unavailable';
1689
+ cause: 'not_ready' | 'below_floor' | 'above_head';
1690
+ retryFromStart: true;
1691
+ };
1692
+ };
1693
+ resolvedName?: string;
1694
+ retryable?: boolean;
1695
+ warnings?: {
1696
+ undeclaredFields?: Array<string>;
1697
+ undeclaredFieldsTruncated?: true;
1698
+ totalUndeclared?: number;
1699
+ coalescedWrefs?: Array<{
1700
+ fieldPath: string;
1701
+ wref: string;
1702
+ reason: string;
1703
+ }>;
1704
+ coalescedWrefsTruncated?: true;
1705
+ totalCoalescedWrefs?: number;
1706
+ deprecations?: Array<{
1707
+ shape: string;
1708
+ message: string;
1709
+ removalMilestone: string;
1710
+ }>;
1711
+ };
1712
+ }>;
1713
+ outcome: 'event' | 'no_event';
1714
+ requestDigest: string;
1715
+ schemaVersion: 'operation-event-receipt/v1';
1716
+ submissionId?: string;
1717
+ };
572
1718
  };
573
- type StreamAppendInput$1 = {
574
- orgName: string;
575
- repoName: string;
576
- streamId: string;
577
- componentRef?: string;
578
- workspaceName?: never;
579
- committer?: string;
580
- message?: string;
581
- returnRepoSeq?: boolean;
582
- allocatedTokens?: never;
583
- allocatedTokenRanges: [];
1719
+ type ShapeRemoveCompatibilityResult = {
1720
+ name: string;
1721
+ operation: 'add' | 'revise' | 'retract' | 'noop';
1722
+ version: number;
1723
+ dataHash: string;
1724
+ removed: true;
1725
+ event: {
1726
+ committedAt: string;
1727
+ eventDigest: string;
1728
+ operationCount: number;
1729
+ repo: {
1730
+ orgName: string;
1731
+ repoName: string;
1732
+ };
1733
+ repoSeq: string;
1734
+ } | null;
1735
+ eventRequestId: string;
584
1736
  operations: Array<{
585
- operation: 'add';
586
- kind: 'shape';
587
- name: string;
588
- data: unknown;
589
- skipExisting?: boolean;
590
- } | {
591
- operation: 'add';
592
- kind: 'thing';
593
- name: string;
594
- data: unknown;
595
- skipExisting?: boolean;
596
- } | {
597
- operation: 'add';
598
- kind: 'assertion';
599
- name: string;
600
- about: string;
601
- data: unknown;
602
- skipExisting?: boolean;
603
- } | {
604
- operation: 'add';
605
- kind: 'collection';
606
- name: string;
607
- type: 'arc' | 'bond' | 'pair' | 'set' | 'list';
608
- members: Array<string>;
609
- skipExisting?: boolean;
610
- } | {
611
- operation: 'revise';
612
- kind: 'shape';
613
- name: string;
614
- data: unknown;
615
- expectedVersion?: number;
616
- active?: never;
617
- leaseId?: string;
618
- } | {
619
- operation: 'revise';
620
- kind: 'thing';
621
- name: string;
622
- data: unknown;
623
- expectedVersion?: number;
624
- active?: never;
625
- leaseId?: string;
626
- } | {
627
- operation: 'revise';
628
- kind: 'assertion';
629
- name: string;
630
- data: unknown;
631
- expectedVersion?: number;
632
- active?: never;
633
- leaseId?: string;
634
- } | {
635
- operation: 'revise';
636
- kind: 'collection';
637
- name: string;
638
- type: 'arc' | 'bond' | 'pair' | 'set' | 'list';
639
- members: Array<string>;
640
- expectedVersion?: number;
641
- leaseId?: string;
642
- } | {
643
- operation: 'retract';
1737
+ opIndex?: number;
644
1738
  name: string;
645
- kind?: 'shape' | 'thing' | 'assertion' | 'collection';
646
- reason?: string;
647
- leaseId?: string;
1739
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1740
+ version: number;
1741
+ dataHash: string;
1742
+ status?: 'applied' | 'noop';
1743
+ warnings?: {
1744
+ undeclaredFields?: Array<string>;
1745
+ undeclaredFieldsTruncated?: true;
1746
+ totalUndeclared?: number;
1747
+ coalescedWrefs?: Array<{
1748
+ fieldPath: string;
1749
+ wref: string;
1750
+ reason: string;
1751
+ }>;
1752
+ coalescedWrefsTruncated?: true;
1753
+ totalCoalescedWrefs?: number;
1754
+ deprecations?: Array<{
1755
+ shape: string;
1756
+ message: string;
1757
+ removalMilestone: string;
1758
+ }>;
1759
+ };
648
1760
  } | {
649
- operation: 'rename';
650
- name: string;
651
- newName: string;
652
- kind?: 'shape' | 'thing' | 'assertion' | 'collection';
653
- }>;
654
- };
655
- type StreamAppendResult$1 = {
656
- allocatedTokenRanges: [];
657
- results: Array<{
658
1761
  opIndex?: number;
659
1762
  name: string;
660
1763
  operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
@@ -707,32 +1810,103 @@ type StreamAppendResult$1 = {
707
1810
  }>;
708
1811
  };
709
1812
  }>;
710
- repoSeq?: number;
711
- createdByEmail?: string;
712
- appendTotalMs?: number;
713
- appendResolveRepoMs?: number;
714
- appendTokenResolveMs?: number;
715
- appendApplyMs?: number;
716
- applySubphases?: {
717
- addThingMs?: number;
718
- addAssertionMs?: number;
719
- addAssertionResolveAboutMs?: number;
720
- reviseThingMs?: number;
721
- reviseAssertionMs?: number;
722
- reviseCollectionMs?: number;
723
- preparePinnedLoadShapeFieldsMs?: number;
724
- preparePinnedPinWrefsMs?: number;
725
- preparePinnedResolveTokensMs?: number;
726
- preparePinnedValidateMs?: number;
727
- operationLoopMs?: number;
728
- persistMs?: number;
729
- persistThingsMs?: number;
730
- persistVersionsMs?: number;
731
- persistAssertionsMs?: number;
732
- persistUpdatesMs?: number;
733
- persistOutboxMs?: number;
734
- refInsertMs?: number;
735
- refSourceCount?: number;
1813
+ outcome: 'event' | 'no_event';
1814
+ requestDigest: string;
1815
+ schemaVersion: 'operation-event-receipt/v1';
1816
+ submissionId?: string;
1817
+ receipt: {
1818
+ event: {
1819
+ committedAt: string;
1820
+ eventDigest: string;
1821
+ operationCount: number;
1822
+ repo: {
1823
+ orgName: string;
1824
+ repoName: string;
1825
+ };
1826
+ repoSeq: string;
1827
+ } | null;
1828
+ eventRequestId: string;
1829
+ operations: Array<{
1830
+ opIndex?: number;
1831
+ name: string;
1832
+ operation: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1833
+ version: number;
1834
+ dataHash: string;
1835
+ status?: 'applied' | 'noop';
1836
+ warnings?: {
1837
+ undeclaredFields?: Array<string>;
1838
+ undeclaredFieldsTruncated?: true;
1839
+ totalUndeclared?: number;
1840
+ coalescedWrefs?: Array<{
1841
+ fieldPath: string;
1842
+ wref: string;
1843
+ reason: string;
1844
+ }>;
1845
+ coalescedWrefsTruncated?: true;
1846
+ totalCoalescedWrefs?: number;
1847
+ deprecations?: Array<{
1848
+ shape: string;
1849
+ message: string;
1850
+ removalMilestone: string;
1851
+ }>;
1852
+ };
1853
+ } | {
1854
+ opIndex?: number;
1855
+ name: string;
1856
+ operation?: 'add' | 'revise' | 'retract' | 'rename' | 'noop';
1857
+ version?: number;
1858
+ dataHash?: string;
1859
+ status?: 'success' | 'noop' | 'failed';
1860
+ error?: {
1861
+ code: string;
1862
+ message: string;
1863
+ details?: {
1864
+ reason: 'expected_version_mismatch';
1865
+ expectedVersion: number;
1866
+ currentVersion: number;
1867
+ } | {
1868
+ reason: 'lease_held';
1869
+ leaseExpiresAt: string;
1870
+ } | {
1871
+ reason: 'validation_failed';
1872
+ issues: Array<{
1873
+ path: string;
1874
+ message: string;
1875
+ }>;
1876
+ } | {
1877
+ reason: 'rate_limit_reset';
1878
+ retryAfterSeconds: number;
1879
+ resetAt: string;
1880
+ } | {
1881
+ reason: 'cursor_fence_unavailable';
1882
+ cause: 'not_ready' | 'below_floor' | 'above_head';
1883
+ retryFromStart: true;
1884
+ };
1885
+ };
1886
+ resolvedName?: string;
1887
+ retryable?: boolean;
1888
+ warnings?: {
1889
+ undeclaredFields?: Array<string>;
1890
+ undeclaredFieldsTruncated?: true;
1891
+ totalUndeclared?: number;
1892
+ coalescedWrefs?: Array<{
1893
+ fieldPath: string;
1894
+ wref: string;
1895
+ reason: string;
1896
+ }>;
1897
+ coalescedWrefsTruncated?: true;
1898
+ totalCoalescedWrefs?: number;
1899
+ deprecations?: Array<{
1900
+ shape: string;
1901
+ message: string;
1902
+ removalMilestone: string;
1903
+ }>;
1904
+ };
1905
+ }>;
1906
+ outcome: 'event' | 'no_event';
1907
+ requestDigest: string;
1908
+ schemaVersion: 'operation-event-receipt/v1';
1909
+ submissionId?: string;
736
1910
  };
737
1911
  };
738
1912
  type Org = {
@@ -878,8 +2052,111 @@ type ThingHeadVersionsResult$1 = {
878
2052
  }>;
879
2053
  missing: Array<string>;
880
2054
  };
881
- type RenameResult$1 = {
882
- renamed: true;
2055
+ type RepositoryCheckpointAccess$1 = {
2056
+ checkpointId: string;
2057
+ repoSeq: number;
2058
+ expiresAt: number;
2059
+ url: string;
2060
+ byteLength: number;
2061
+ sha256: string;
2062
+ contentType: 'application/zip' | 'application/json' | 'application/x-ndjson';
2063
+ };
2064
+ type RepositoryCheckpointStatus$1 = {
2065
+ checkpointId: string;
2066
+ repoSeq: number;
2067
+ contractVersion: 1;
2068
+ attemptsStarted: number;
2069
+ runAgeMs: number;
2070
+ createdAt: number;
2071
+ updatedAt: number;
2072
+ runStartedAt: number;
2073
+ state: 'queued';
2074
+ nextAction: 'poll';
2075
+ } | {
2076
+ checkpointId: string;
2077
+ repoSeq: number;
2078
+ contractVersion: 1;
2079
+ attemptsStarted: number;
2080
+ runAgeMs: number;
2081
+ createdAt: number;
2082
+ updatedAt: number;
2083
+ runStartedAt: number;
2084
+ state: 'running';
2085
+ nextAction: 'poll';
2086
+ } | {
2087
+ checkpointId: string;
2088
+ repoSeq: number;
2089
+ contractVersion: 1;
2090
+ attemptsStarted: number;
2091
+ runAgeMs: number;
2092
+ createdAt: number;
2093
+ updatedAt: number;
2094
+ runStartedAt: number;
2095
+ state: 'complete';
2096
+ nextAction: 'download';
2097
+ completedAt: number;
2098
+ recordCount: number;
2099
+ manifest: {
2100
+ byteLength: number;
2101
+ sha256: string;
2102
+ };
2103
+ archive: {
2104
+ byteLength: number;
2105
+ sha256: string;
2106
+ contentType: 'application/zip';
2107
+ };
2108
+ } | {
2109
+ checkpointId: string;
2110
+ repoSeq: number;
2111
+ contractVersion: 1;
2112
+ attemptsStarted: number;
2113
+ runAgeMs: number;
2114
+ createdAt: number;
2115
+ updatedAt: number;
2116
+ runStartedAt: number;
2117
+ state: 'failed';
2118
+ completedAt: number;
2119
+ failureCode: 'deadline_exceeded';
2120
+ nextAction: 'retry';
2121
+ } | {
2122
+ checkpointId: string;
2123
+ repoSeq: number;
2124
+ contractVersion: 1;
2125
+ attemptsStarted: number;
2126
+ runAgeMs: number;
2127
+ createdAt: number;
2128
+ updatedAt: number;
2129
+ runStartedAt: number;
2130
+ state: 'failed';
2131
+ completedAt: number;
2132
+ failureCode: 'invalid_source';
2133
+ nextAction: 'generate';
2134
+ } | {
2135
+ checkpointId: string;
2136
+ repoSeq: number;
2137
+ contractVersion: 1;
2138
+ attemptsStarted: number;
2139
+ runAgeMs: number;
2140
+ createdAt: number;
2141
+ updatedAt: number;
2142
+ runStartedAt: number;
2143
+ state: 'failed';
2144
+ completedAt: number;
2145
+ failureCode: 'canonicalization_failed' | 'integrity_failed' | 'unsupported_contract';
2146
+ nextAction: 'contact_support';
2147
+ } | {
2148
+ checkpointId: string;
2149
+ repoSeq: number;
2150
+ contractVersion: 1;
2151
+ attemptsStarted: number;
2152
+ runAgeMs: number;
2153
+ createdAt: number;
2154
+ updatedAt: number;
2155
+ runStartedAt: number;
2156
+ state: 'failed';
2157
+ completedAt: number;
2158
+ failureCode: 'repository_deleted';
2159
+ nextAction: 'none';
883
2160
  };
884
2161
  type RepoConfigureStats = {
885
2162
  subscriptionCount: number;
@@ -1059,19 +2336,6 @@ type SynthesizedRepoContent$1 = {
1059
2336
  };
1060
2337
  };
1061
2338
  };
1062
- type ShapeChangeResult = {
1063
- name: string;
1064
- operation: 'add' | 'revise' | 'retract' | 'noop';
1065
- version: number;
1066
- dataHash: string;
1067
- };
1068
- type ShapeRemoveResult = {
1069
- name: string;
1070
- operation: 'add' | 'revise' | 'retract' | 'noop';
1071
- version: number;
1072
- dataHash: string;
1073
- removed: true;
1074
- };
1075
2339
  type SubscriptionBindCredentialsResult$1 = {
1076
2340
  bound: true;
1077
2341
  subscriptionName: string;
@@ -1112,12 +2376,219 @@ type TokenCreateResult = {
1112
2376
  type TokenRevokeResult = {
1113
2377
  ok: boolean;
1114
2378
  };
1115
- type WireScopeEntry$1 = {
1116
- resource?: string;
1117
- permissions: Array<string>;
1118
- allowedMatches?: Array<string>;
2379
+ type WireScopeEntry$1 = {
2380
+ resource?: string;
2381
+ permissions: Array<string>;
2382
+ allowedMatches?: Array<string>;
2383
+ };
2384
+
2385
+ type DateMappedRepositoryCheckpointStatus<T> = T extends {
2386
+ createdAt: number;
2387
+ updatedAt: number;
2388
+ runStartedAt: number;
2389
+ } ? Omit<T, 'createdAt' | 'updatedAt' | 'runStartedAt' | 'completedAt'> & {
2390
+ createdAt: Date;
2391
+ updatedAt: Date;
2392
+ runStartedAt: Date;
2393
+ } & (T extends {
2394
+ completedAt: number;
2395
+ } ? {
2396
+ completedAt: Date;
2397
+ } : object) : never;
2398
+ /**
2399
+ * The current lifecycle state of a repository checkpoint.
2400
+ *
2401
+ * Checkpoint timestamps are converted from Unix milliseconds to `Date`; the
2402
+ * server-computed `runAgeMs` remains numeric.
2403
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/repositorycheckpointstatus/
2404
+ */
2405
+ type RepositoryCheckpointStatus = DateMappedRepositoryCheckpointStatus<RepositoryCheckpointStatus$1>;
2406
+ /**
2407
+ * A short-lived descriptor for downloading one completed checkpoint artifact.
2408
+ * The SDK returns this descriptor only; it never fetches `url` on the caller's
2409
+ * behalf.
2410
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/repositorycheckpointaccess/
2411
+ */
2412
+ type RepositoryCheckpointAccess = Omit<RepositoryCheckpointAccess$1, 'expiresAt'> & {
2413
+ expiresAt: Date;
2414
+ };
2415
+
2416
+ declare const COMMIT_OPERATIONS: readonly ["add", "revise", "retract", "rename"];
2417
+ type CommitOperation = (typeof COMMIT_OPERATIONS)[number];
2418
+ declare const COMMIT_OPERATION_KINDS: readonly ["shape", "thing", "assertion", "collection"];
2419
+ type CommitOperationKind = (typeof COMMIT_OPERATION_KINDS)[number];
2420
+
2421
+ /**
2422
+ * Canonical request signing for component CLI dispatch.
2423
+ *
2424
+ * Component workers expose CLI methods over HTTP. The platform dispatcher
2425
+ * signs each call with HMAC-SHA256 over a canonical request representation
2426
+ * so the worker can authenticate the caller without sharing more than a
2427
+ * single secret. The same canonical input works for GET and POST methods:
2428
+ * the difference is whether the method args ride in the query string or
2429
+ * the body.
2430
+ *
2431
+ * Canonical signing input:
2432
+ * <METHOD>\n<PATH>\n<CANONICAL_QUERY>\n<INSTALL_REPO>\n<SHA256_HEX(BODY)>\n<TIMESTAMP>
2433
+ *
2434
+ * Where:
2435
+ * - METHOD is the uppercased HTTP method ('GET' | 'POST').
2436
+ * - PATH is the URL path component (no scheme, host, or query).
2437
+ * - CANONICAL_QUERY is `canonicalCliQueryString(query)` — sorted, RFC 3986
2438
+ * percent-encoded, omitting undefined / null entries.
2439
+ * - INSTALL_REPO is the `<org>/<repo>` slug of the install, transmitted on
2440
+ * the wire as the `X-WarmHub-Install-Repo` header.
2441
+ * - BODY is the raw request body string ('' for GET).
2442
+ * - TIMESTAMP is unix-seconds since epoch (string-formatted).
2443
+ *
2444
+ * Verifiers should enforce a tolerance window on the timestamp to bound
2445
+ * replay attacks (default 300 s); they should also compare signatures in
2446
+ * constant time.
2447
+ *
2448
+ * This module is intentionally low-level: component authors import the
2449
+ * higher-level `verifyCliCall(request, secret)` wrapper from
2450
+ * `@warmhub/sdk-ts`, which extracts the canonical inputs from a Fetch
2451
+ * `Request` and calls `verifyCliRequest` for them.
2452
+ */
2453
+ /**
2454
+ * Wire header names for component CLI dispatch — the single source of truth
2455
+ * shared by the backend dispatcher (which sets them) and `verifyCliCall` (which
2456
+ * reads them). The install repo always rides in {@link CLI_INSTALL_REPO_HEADER};
2457
+ * the signing scheme adds {@link CLI_SIGNATURE_HEADER} + {@link CLI_TIMESTAMP_HEADER}.
2458
+ * @see https://docs.warmhub.ai/sdk-reference/variables/cli_install_repo_header/
2459
+ */
2460
+ declare const CLI_INSTALL_REPO_HEADER = "X-WarmHub-Install-Repo";
2461
+ /**
2462
+ * HMAC signature header used by component CLI dispatch.
2463
+ * @see https://docs.warmhub.ai/sdk-reference/variables/cli_signature_header/
2464
+ */
2465
+ declare const CLI_SIGNATURE_HEADER = "X-WarmHub-Signature";
2466
+ /**
2467
+ * Unix-seconds timestamp header used by component CLI dispatch.
2468
+ * @see https://docs.warmhub.ai/sdk-reference/variables/cli_timestamp_header/
2469
+ */
2470
+ declare const CLI_TIMESTAMP_HEADER = "X-WarmHub-Timestamp";
2471
+ /**
2472
+ * HTTP verbs a component CLI method can declare. No-body verbs (GET, DELETE)
2473
+ * carry args in the query string; body verbs (POST, PUT, PATCH) carry args in
2474
+ * the JSON body.
2475
+ */
2476
+ type CliHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
2477
+
2478
+ /** Every event type a webhook subscription can watch. */
2479
+ declare const SUBSCRIBABLE_EVENT_TYPES: readonly ["commit", "repo.renamed", "org.renamed", "org.member_added", "org.repo_created", "org.repo_published", "thing.renamed", "shape.renamed"];
2480
+ type SubscribableEventType = (typeof SUBSCRIBABLE_EVENT_TYPES)[number];
2481
+ /** Org-scoped events — created with an `orgName` and no `repoName`. */
2482
+ declare const ORG_SCOPED_EVENT_TYPES: readonly ["org.renamed", "org.member_added", "org.repo_created", "org.repo_published"];
2483
+ type OrgScopedEventType = (typeof ORG_SCOPED_EVENT_TYPES)[number];
2484
+
2485
+ /**
2486
+ * Validate a data payload against shape field definitions.
2487
+ *
2488
+ * Shape field types:
2489
+ * - "number", "string", "boolean": primitive types
2490
+ * - "wref": string (reference to a shape or shaped thing)
2491
+ * - Typed field objects: { type: primitive, description?: string }
2492
+ * - Nested objects: { fieldName: type, ... }
2493
+ * - Arrays: [elementType]
2494
+ * - Optional fields: field name ending with "?" (e.g. "terminal_reason?": "string")
2495
+ * OR type string ending with "?" (e.g. "terminal_reason": "string?")
2496
+ * OR typed object type ending with "?" (e.g. { type: "string?" })
2497
+ *
2498
+ * For v1 this is permissive: validates top-level field existence and basic types.
2499
+ * Returns a {@link ShapeValidatorResult} discriminated union — read `result.valid`
2500
+ * to branch, then `result.errors` (only present when invalid) for the list of
2501
+ * messages. `result.warnings` may be present in either branch and carries
2502
+ * undeclared top-level field names.
2503
+ *
2504
+ * @example
2505
+ * ```ts
2506
+ * import { validateAgainstShape } from "@warmhub/sdk-ts";
2507
+ *
2508
+ * const shapeFields = { x: "number", y: "number", label: "string?" };
2509
+ *
2510
+ * const ok = validateAgainstShape({ x: 1, y: 2 }, shapeFields);
2511
+ * // ok.valid === true
2512
+ *
2513
+ * const bad = validateAgainstShape({ x: "not-a-number" }, shapeFields);
2514
+ * if (!bad.valid) {
2515
+ * for (const message of bad.errors) console.error(message);
2516
+ * // ['Field "x" must be a number', 'Missing required field: "y"']
2517
+ * }
2518
+ * ```
2519
+ * @see https://docs.warmhub.ai/sdk-reference/functions/validateagainstshape/
2520
+ */
2521
+ declare function validateAgainstShape(data: Record<string, unknown>, shapeFields: Record<string, unknown>): ShapeValidatorResult;
2522
+ /**
2523
+ * Warning details for input fields that the shape does not declare.
2524
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/undeclaredfieldswarning/
2525
+ */
2526
+ type UndeclaredFieldsWarning = {
2527
+ undeclaredFields: string[];
2528
+ undeclaredFieldsTruncated?: true;
2529
+ totalUndeclared?: number;
2530
+ };
2531
+ /**
2532
+ * Discriminated result returned when input is validated against shape fields.
2533
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/shapevalidatorresult/
2534
+ */
2535
+ type ShapeValidatorResult = {
2536
+ valid: true;
2537
+ warnings?: UndeclaredFieldsWarning;
2538
+ } | {
2539
+ valid: false;
2540
+ errors: string[];
2541
+ warnings?: UndeclaredFieldsWarning;
1119
2542
  };
1120
2543
 
2544
+ /**
2545
+ * Hardcoded meta-schema for validating shape definitions.
2546
+ * Shapes are NOT validated against a DB-stored shape — they validate against this constant.
2547
+ * This avoids the bootstrap chicken-and-egg problem.
2548
+ *
2549
+ * A valid shape definition is:
2550
+ * { fields: Record<string, TypeSpec>, description?: string }
2551
+ * where TypeSpec is one of:
2552
+ * - primitive string: "number", "string", "boolean", "wref", "array"
2553
+ * - optional primitive: "number?", "string?", "boolean?", "wref?", "array?"
2554
+ * - typed field object: { type: primitive, description?: string }
2555
+ * - array: [TypeSpec] (shorthand) or { type: "array", items: TypeSpec }
2556
+ * - nested object: { fieldName: TypeSpec, ... } (key may end with "?" for optional)
2557
+ *
2558
+ * The primitive vocabulary above is closed: any other type name (e.g. "text",
2559
+ * "integer", "json", "date") is rejected. See VALID_PRIMITIVE_TYPES in
2560
+ * ./shape-types.ts for the authoritative set.
2561
+ * String `pattern` constraints use RE2 syntax and are evaluated with re2js so
2562
+ * user-authored patterns run in linear time across backend, SDK, web, CLI, and
2563
+ * worker-adjacent consumers. JavaScript-only constructs such as backreferences
2564
+ * and lookarounds are rejected at shape-definition time.
2565
+ */
2566
+
2567
+ /**
2568
+ * Maximum size, in bytes (UTF-8 encoded), allowed for a single content field value.
2569
+ * WarmHub is not a document store: values larger than this are rejected at validation.
2570
+ * Store large documents in S3, Box, Drive, or another document system and reference
2571
+ * them from WarmHub instead.
2572
+ * @see https://docs.warmhub.ai/sdk-reference/variables/max_content_field_bytes/
2573
+ */
2574
+ declare const MAX_CONTENT_FIELD_BYTES: number;
2575
+ /**
2576
+ * Human-readable explanation of the {@link MAX_CONTENT_FIELD_BYTES} limit, suitable for
2577
+ * appending to a field-specific validation error. States the byte cap and points callers
2578
+ * to an external document store for large payloads.
2579
+ * @see https://docs.warmhub.ai/sdk-reference/variables/content_field_limit_error/
2580
+ */
2581
+ declare const CONTENT_FIELD_LIMIT_ERROR: string;
2582
+ /**
2583
+ * Returns a validation error message if the given string exceeds
2584
+ * {@link MAX_CONTENT_FIELD_BYTES} when UTF-8 encoded, or `null` if it is within the limit.
2585
+ *
2586
+ * @param path - The field path, used to identify the offending field in the message.
2587
+ * @param value - The candidate field value to measure.
2588
+ * @see https://docs.warmhub.ai/sdk-reference/functions/contentfieldlimiterror/
2589
+ */
2590
+ declare function contentFieldLimitError(path: string, value: string): string | null;
2591
+
1121
2592
  /**
1122
2593
  * Add operation accepted by `client.commit.apply`. Use this shape to create new
1123
2594
  * shapes, things, assertions, or collections in a single commit.
@@ -1250,6 +2721,11 @@ interface RetractOperation {
1250
2721
  * Optional human-readable retraction reason.
1251
2722
  */
1252
2723
  reason?: string;
2724
+ /**
2725
+ * Optional optimistic-concurrency precondition. When supplied, the retract
2726
+ * is applied only if the target is still at this version number.
2727
+ */
2728
+ expectedVersion?: number;
1253
2729
  /**
1254
2730
  * Optional read-lease token (#3625) returned by `thing.getWithLease`. A
1255
2731
  * matching token auto-releases the lease on commit; a mismatch (or absence
@@ -1335,16 +2811,12 @@ interface OperationStreamClient {
1335
2811
  append(input: StreamAppendInput$1): Promise<StreamAppendResult$1>;
1336
2812
  };
1337
2813
  }
2814
+ /** Legacy aggregate write result with exact chunk receipts added alongside it. */
1338
2815
  type SubmittedStreamResult = {
1339
2816
  committer?: string;
1340
2817
  createdByEmail?: string;
1341
2818
  message: string | undefined;
1342
2819
  operationCount: number;
1343
- /**
1344
- * Sequence acknowledged for the last chunk that persisted a visibility
1345
- * event when `returnRepoSeq` was requested. No-op or all-failed chunks do
1346
- * not erase an earlier chunk's acknowledgement.
1347
- */
1348
2820
  repoSeq?: number;
1349
2821
  partial?: boolean;
1350
2822
  statusCounts?: {
@@ -1367,13 +2839,10 @@ type SubmittedStreamResult = {
1367
2839
  submittedName?: string;
1368
2840
  resolvedName?: string;
1369
2841
  retryable?: boolean;
1370
- /**
1371
- * Non-blocking warnings collected during shape validation — see GH-1418.
1372
- * Aliased to the generated wire shape so this type cannot drift from
1373
- * the backend's `streamMutationResultEntrySchema.warnings`.
1374
- */
1375
2842
  warnings?: NonNullable<StreamAppendResult$1['results'][number]['warnings']>;
1376
2843
  }>;
2844
+ /** One exact immutable receipt per stream chunk, in submission order. */
2845
+ receipts: OperationEventReceiptV1$1[];
1377
2846
  };
1378
2847
  /**
1379
2848
  * Stream identity metadata for caller-managed streamed commit submissions.
@@ -1381,11 +2850,12 @@ type SubmittedStreamResult = {
1381
2850
  */
1382
2851
  type StreamContinuationState = {
1383
2852
  streamId: string;
1384
- allocatedTokenRanges: StreamAppendResult$1['allocatedTokenRanges'];
2853
+ submissionId: string;
2854
+ nextChunkOrdinal: number;
1385
2855
  };
1386
2856
  /**
1387
- * Caller-facing knobs for the SDK's auto-idempotency retry on transient
1388
- * first-chunk failures.
2857
+ * Caller-facing knobs for retrying a transport-ambiguous event request under
2858
+ * its identical durable identity.
1389
2859
  *
1390
2860
  * Defaults are tuned for interactive and agent latency budgets: 3 attempts
1391
2861
  * with exponential backoff capped at 8s, so a one-off flake recovers without
@@ -1406,11 +2876,12 @@ type StreamFailureCause = {
1406
2876
  * Error raised when a streamed commit submission fails after an ambiguous or
1407
2877
  * partial append.
1408
2878
  *
1409
- * The `completedOperations` field contains returned rows the SDK knows
1410
- * completed. `acknowledgedOperationCount` also records progress when an append
1411
- * response contains sparse or empty result rows. Before retrying manually,
1412
- * inspect repository state because the failed append may have committed
1413
- * additional operations that were not reflected locally.
2879
+ * `completedReceipts` contains only earlier, acknowledged event receipts. The
2880
+ * other identity fields name the one pending chunk that must be looked up
2881
+ * before any manual retry. `acknowledgedOperationCount` preserves progress
2882
+ * even if a receipt omits operation rows. `attemptedAppendOutcome` and
2883
+ * `lastAcknowledgedRepoSeq` retain recovery information from the earlier
2884
+ * stream contract; the durable receipt remains the authoritative record.
1414
2885
  *
1415
2886
  * @see https://docs.warmhub.ai/sdk/transient-retry/#partial-submissions
1416
2887
  */
@@ -1420,29 +2891,55 @@ declare class PartialStreamSubmissionError extends Error {
1420
2891
  */
1421
2892
  readonly code = "PARTIAL_STREAM_SUBMISSION";
1422
2893
  /**
1423
- * Operations the SDK confirmed completed before the ambiguous or failing
1424
- * append. The remaining operations may or may not have landed; inspect
1425
- * repository state before retrying manually.
2894
+ * Earlier exact receipts, in submission order.
2895
+ * @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#completedreceipts
2896
+ */
2897
+ readonly completedReceipts: readonly OperationEventReceiptV1$1[];
2898
+ /**
2899
+ * Legacy projection of operations confirmed before the failed append.
1426
2900
  * @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#completedoperations
1427
2901
  */
1428
2902
  readonly completedOperations: SubmittedStreamResult['operations'];
2903
+ readonly submissionId: string;
2904
+ readonly eventRequestId: string;
2905
+ readonly chunkOrdinal: number;
2906
+ readonly pendingOutcome: 'absent' | 'unknown';
1429
2907
  /**
1430
- * Number of operations covered by append responses the SDK received before
1431
- * the failure. This can exceed `completedOperations.length` when the backend
1432
- * returns sparse or empty result rows.
2908
+ * Number of operations covered by acknowledged append responses.
1433
2909
  * @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#acknowledgedoperationcount
1434
2910
  */
1435
2911
  readonly acknowledgedOperationCount: number;
2912
+ /**
2913
+ * Last repository sequence returned by an acknowledged chunk that persisted
2914
+ * an event. This is a lower bound for known completed work, never evidence
2915
+ * that the attempted append did not land.
2916
+ */
2917
+ readonly lastAcknowledgedRepoSeq?: number;
2918
+ /**
2919
+ * Authoritative outcome of the attempted append. `not_applied` is used only
2920
+ * when the SDK received explicit server rejection evidence; `unknown` means
2921
+ * callers must stop writes and reconcile from a later verified checkpoint.
2922
+ * @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#attemptedappendoutcome
2923
+ */
2924
+ readonly attemptedAppendOutcome: 'not_applied' | 'unknown';
1436
2925
  /**
1437
2926
  * Underlying error that triggered the partial submission, preserved for
1438
- * diagnostics. Inspect via `isWarmHubError(err.cause)` / `err.cause.kind`.
2927
+ * diagnostics. Do not infer append outcome from this field; branch on
2928
+ * `attemptedAppendOutcome` instead.
1439
2929
  * @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#cause
1440
2930
  */
1441
2931
  readonly cause: unknown;
1442
2932
  constructor(input: {
1443
2933
  cause: unknown;
1444
- completedOperations: SubmittedStreamResult['operations'];
2934
+ completedReceipts: readonly OperationEventReceiptV1$1[];
2935
+ completedOperations?: SubmittedStreamResult['operations'];
1445
2936
  acknowledgedOperationCount?: number;
2937
+ lastAcknowledgedRepoSeq?: number;
2938
+ attemptedAppendOutcome: 'not_applied' | 'unknown';
2939
+ submissionId: string;
2940
+ eventRequestId: string;
2941
+ chunkOrdinal: number;
2942
+ pendingOutcome: 'absent' | 'unknown';
1446
2943
  });
1447
2944
  }
1448
2945
  /**
@@ -1452,6 +2949,11 @@ declare class PartialStreamSubmissionError extends Error {
1452
2949
  */
1453
2950
  declare class AllStreamOperationsFailedError extends Error {
1454
2951
  readonly code = "STREAM_ALL_OPERATIONS_FAILED";
2952
+ /**
2953
+ * Every exact immutable receipt returned for the rejected submission.
2954
+ * @see https://docs.warmhub.ai/sdk-reference/classes/allstreamoperationsfailederror/#receipts
2955
+ */
2956
+ readonly receipts: readonly OperationEventReceiptV1$1[];
1455
2957
  readonly result: SubmittedStreamResult;
1456
2958
  readonly operations: SubmittedStreamResult['operations'];
1457
2959
  readonly statusCounts: NonNullable<SubmittedStreamResult['statusCounts']>;
@@ -1463,73 +2965,34 @@ declare class AllStreamOperationsFailedError extends Error {
1463
2965
  * Submit `operations` to the WarmHub stream-append surface, chunked to
1464
2966
  * stay under MAX_STREAM_APPEND_OPERATION_COUNT.
1465
2967
  *
1466
- * **Retry policy (default-on, first-chunk + single-op only).** A
1467
- * transport-ambiguous failure (timeout / 5xx / network reset / no-code
1468
- * error) on the first chunk triggers a bounded retry — but only when
1469
- * the first chunk contains exactly one operation. The SDK mints a
1470
- * fresh `streamId`, sleeps with jittered
1471
- * exponential backoff, and re-issues the same operation. The retried
1472
- * call is observationally indistinguishable from a single clean
1473
- * apply — the SDK does not rewrite the request or the response.
1474
- *
1475
- * Multi-op chunks bypass retry entirely because the backend applies
1476
- * operations one-at-a-time in their own transactions, so a mid-chunk
1477
- * transport failure on attempt 1 may have committed an arbitrary
1478
- * prefix. Multi-chunk mid-flight failures (`acknowledgedOperationCount > 0`)
1479
- * also bypass retry. Both surface `PartialStreamSubmissionError`; callers must
1480
- * inspect repository state and resume only operations known not to have landed.
2968
+ * Each chunk is one atomic operation event. The SDK mints one submission UUID,
2969
+ * derives each chunk's request UUID from its zero-based ordinal, and preserves
2970
+ * both identities across transport-ambiguous retries. A successful submission
2971
+ * returns the legacy aggregate write result plus ordered exact receipts, one
2972
+ * per chunk.
1481
2973
  *
1482
2974
  * Definite client rejections (`UNAUTHENTICATED`, `VALIDATION_ERROR`,
1483
2975
  * `CONFLICT`, `RATE_LIMITED`, `ALREADY_RETRACTED`, …) on the first chunk
1484
2976
  * still rethrow the raw cause unchanged — they
1485
2977
  * are not transient, and structured detail (e.g. `retryAfter` on
1486
2978
  * `RATE_LIMITED`) survives. If the caller's original attempt landed but
1487
- * the response was lost, the retry surfaces the resulting `CONFLICT`
1488
- * (for `add`) or `ALREADY_RETRACTED` (for `retract`) directly so the
1489
- * caller sees the truth.
1490
- *
1491
- * `COMMIT_OUTCOME_UNKNOWN` is terminal but ambiguous: the SDK never
1492
- * replays it and surfaces `PartialStreamSubmissionError` with the original
1493
- * cause so callers must inspect repository state before continuing.
2979
+ * the response was lost, the same-identity retry returns the original durable
2980
+ * receipt instead of reapplying the operation or translating the replay into
2981
+ * a new conflict.
1494
2982
  *
1495
- * **Ambiguity preservation across attempts.** Once any attempt has
1496
- * been transport-ambiguous (timeout / 5xx / reset), a subsequent
1497
- * definite-reject (e.g. `RATE_LIMITED` on a quota check) does *not*
1498
- * prove the prior attempt didn't land. In that case the SDK wraps the
1499
- * cause as `PartialStreamSubmissionError` instead of rethrowing raw,
1500
- * so the "inspect repo state before continuing" warning survives.
2983
+ * If ambiguity remains after the retry budget, `PartialStreamSubmissionError`
2984
+ * carries the exact pending request identity and every earlier receipt. The
2985
+ * caller can use `client.commit.getReceipt` and retry the identical chunk only
2986
+ * after an opaque not-found response.
1501
2987
  *
1502
2988
  * **Operation normalization.** `args.operations` accepts the public
1503
2989
  * `Operation[]` write contract. The SDK normalizes operations to the
1504
2990
  * backend stream shape before chunking, token checks, and appends.
1505
2991
  *
1506
- * **Idempotency is the caller's responsibility.** To make `add` ops
1507
- * idempotent under retry (the GH #2243 agent-health-write use case),
1508
- * pass `skipExisting: true` per-op, via `args.skipExisting`, or via
1509
- * `commit.apply`'s `opts`:
1510
- *
1511
- * ```ts
1512
- * client.commit.apply(org, repo, msg, ops, { skipExisting: true })
1513
- * ```
1514
- *
1515
- * `args.skipExisting: true` applies `skipExisting: true` to every
1516
- * normalized `add` op. The server then returns `noop` for `add` ops
1517
- * whose target already exists. `revise` is naturally idempotent on
1518
- * equal `dataHash` + `aboutThingId`; built-in collection adds dedupe
1519
- * on `dataHash`.
1520
- *
1521
2992
  * Pass `args.retry: false` to disable retry entirely; pass
1522
2993
  * `args.retry: { maxAttempts, baseDelayMs, maxDelayMs }` to override
1523
2994
  * any subset of the defaults (`{ 3, 250, 8_000 }`).
1524
2995
  *
1525
- * Retry is automatically suppressed when the caller supplies
1526
- * `args.streamId`, because caller-managed streams may coordinate retries
1527
- * outside the SDK.
1528
- *
1529
- * The server remains stateless across `stream.append` calls — there is
1530
- * no `streamId`-keyed dedup table. See docs/dev/commit-flow.md for the
1531
- * full idempotency contract.
1532
- *
1533
2996
  * @see https://docs.warmhub.ai/sdk/transient-retry/
1534
2997
  * @internal
1535
2998
  */
@@ -1543,25 +3006,74 @@ declare function submitOperationsViaStream(client: OperationStreamClient, args:
1543
3006
  chunkSize?: number;
1544
3007
  skipExisting?: boolean;
1545
3008
  streamId?: string;
3009
+ submissionId?: string;
1546
3010
  /** Return the writer's own repository-sequence acknowledgement. */
1547
3011
  returnRepoSeq?: boolean;
1548
3012
  /**
1549
- * Bounded auto-idempotency retry for transient first-chunk failures.
3013
+ * Bounded retry for transport-ambiguous operation-event responses.
1550
3014
  * Default-on (3 attempts, 250ms base, 8s cap, jittered exponential).
1551
- * Pass `false` to disable. Multi-chunk mid-flight failures still
1552
- * surface PartialStreamSubmissionError unchanged.
3015
+ * Pass `false` to disable.
1553
3016
  */
1554
3017
  retry?: RetryPolicyOptions | false;
1555
3018
  }): Promise<SubmittedStreamResult>;
3019
+ /**
3020
+ * Rebase one chunk's result rows onto submission-global operation indexes.
3021
+ * Single owner of the `chunkStart + (opIndex ?? position)` convention — chunk
3022
+ * accumulators (SDK and CLI) must use this rather than re-deriving it.
3023
+ *
3024
+ * @internal
3025
+ */
3026
+ declare function offsetChunkResultIndexes(results: StreamAppendResult$1['results'], chunkStart: number): StreamAppendResult$1['results'];
3027
+ /**
3028
+ * Derive the legacy aggregate write result from accumulated stream-append
3029
+ * outputs. This is the single owner of the receipt-era → legacy status
3030
+ * mapping; CLI and other callers that accumulate chunks themselves must use
3031
+ * this rather than re-implementing the projection.
3032
+ *
3033
+ * `operations` only needs the submitted names (used to echo `submittedName`
3034
+ * on failed rows); pass lightweight `{name}` records when the full submitted
3035
+ * operations are not retained.
3036
+ *
3037
+ * @internal
3038
+ */
3039
+ declare function aggregateSubmittedStreamResult(input: {
3040
+ committer?: string;
3041
+ createdByEmail?: string;
3042
+ message?: string;
3043
+ operations: ReadonlyArray<{
3044
+ name?: string;
3045
+ }>;
3046
+ repoSeq?: number;
3047
+ receipts: OperationEventReceiptV1$1[];
3048
+ results: StreamAppendResult$1['results'];
3049
+ }): SubmittedStreamResult;
3050
+ /**
3051
+ * Operations from an aggregate that were confirmed applied or noop.
3052
+ *
3053
+ * @internal
3054
+ */
3055
+ declare function completedOperationsFrom(result: SubmittedStreamResult): SubmittedStreamResult['operations'];
1556
3056
 
1557
3057
  /**
1558
3058
  * Exposed for unit tests and internal callers to avoid re-deriving status values.
1559
3059
  *
1560
3060
  * @internal
1561
3061
  */
1562
- declare function streamAppendResultStatus(result: StreamAppendResult$1['results'][number]): NonNullable<SubmittedStreamResult['operations'][number]['status']>;
3062
+ declare function streamAppendResultStatus(result: StreamAppendResult$1['results'][number]): 'applied' | 'noop' | 'error';
1563
3063
  /** @internal */
1564
- declare function countStreamAppendResultStatuses(results: StreamAppendResult$1['results']): NonNullable<SubmittedStreamResult['statusCounts']>;
3064
+ declare function countStreamAppendResultStatuses(results: StreamAppendResult$1['results']): {
3065
+ applied: number;
3066
+ noop: number;
3067
+ error: number;
3068
+ };
3069
+ /**
3070
+ * True when stream append produced a definite pre-apply rejection rather than
3071
+ * a transport-ambiguous outcome. A 4xx response (except timeout-shaped 408) is
3072
+ * definite even when callers may choose to retry it later, as with 429.
3073
+ *
3074
+ * @internal
3075
+ */
3076
+ declare function isDefiniteStreamAppendRejection(cause: unknown): boolean;
1565
3077
 
1566
3078
  /**
1567
3079
  * Server-side verifier for component CLI dispatch calls.
@@ -1821,6 +3333,11 @@ interface RetractOp {
1821
3333
  * Optional human-readable retraction reason.
1822
3334
  */
1823
3335
  readonly reason?: string;
3336
+ /**
3337
+ * Optional optimistic-concurrency precondition. When supplied, the retract
3338
+ * is applied only if the target is still at this version number.
3339
+ */
3340
+ readonly expectedVersion?: number;
1824
3341
  /**
1825
3342
  * Optional read-lease token (#3625) returned by `thing.getWithLease`. When
1826
3343
  * it matches the target's active lease the lease auto-releases on commit;
@@ -1943,15 +3460,11 @@ declare class OperationBuilder {
1943
3460
  /**
1944
3461
  * Add a retract operation.
1945
3462
  *
1946
- * Pass a wref string shorthand or an object with a target name, optional kind safety hint, and optional reason.
3463
+ * Pass a wref string shorthand or an object with retract options such as a
3464
+ * kind safety hint, reason, expected version, or lease ID.
1947
3465
  * @see https://docs.warmhub.ai/sdk-reference/classes/operationbuilder/#retract
1948
3466
  */
1949
- retract(target: string | {
1950
- name: string;
1951
- kind?: CommitOperationKind;
1952
- reason?: string;
1953
- leaseId?: string;
1954
- }): this;
3467
+ retract(target: string | Omit<RetractOp, 'operation'>): this;
1955
3468
  /**
1956
3469
  * Return the queued operations.
1957
3470
  *
@@ -1998,13 +3511,17 @@ declare class OperationBuilder {
1998
3511
  /**
1999
3512
  * Validate, submit, and seal the builder.
2000
3513
  *
2001
- * A successful call submits operations through the same stream path as `client.commit.apply` and makes the builder single-use. A `PartialStreamSubmissionError` also seals the builder to prevent blind replay. Validation failures throw before any server request is made. Deterministic all-failed batches surface as `AllStreamOperationsFailedError` with per-op failure data.
3514
+ * A successful call returns the same ordered exact receipts as
3515
+ * `client.commit.apply` and makes the builder single-use. A
3516
+ * `PartialStreamSubmissionError` also seals the builder to prevent a retry
3517
+ * under a different request identity.
2002
3518
  *
2003
3519
  * @param params.client WarmHub client or compatible stream client used for submission.
2004
3520
  * @param params.message Optional commit message.
2005
3521
  * @param params.committer Optional wref identifying the actor on whose behalf the write is made.
2006
3522
  * @param params.chunkSize Maximum operations per stream append.
2007
3523
  * @param params.streamId Caller-managed stream identity for observability and diagnostic correlation.
3524
+ * @param params.submissionId Caller-managed UUID shared by every chunk.
2008
3525
  * @param params.returnRepoSeq Return the writer's own repository-sequence acknowledgement.
2009
3526
  * @param params.retry Retry policy for transient first-chunk failures, or `false` to disable automatic retry.
2010
3527
  * @see https://docs.warmhub.ai/sdk-reference/classes/operationbuilder/#commit
@@ -2017,6 +3534,7 @@ declare class OperationBuilder {
2017
3534
  message?: string;
2018
3535
  chunkSize?: number;
2019
3536
  streamId?: string;
3537
+ submissionId?: string;
2020
3538
  returnRepoSeq?: boolean;
2021
3539
  retry?: RetryPolicyOptions | false;
2022
3540
  }): Promise<OperationSubmitResult$1>;
@@ -2024,6 +3542,22 @@ declare class OperationBuilder {
2024
3542
  private assertCanModify;
2025
3543
  }
2026
3544
 
3545
+ /**
3546
+ * Mint the identity shared by every event in one logical submission.
3547
+ * @see https://docs.warmhub.ai/sdk-reference/functions/createoperationeventsubmissionid/
3548
+ */
3549
+ declare function createOperationEventSubmissionId(): string;
3550
+ /**
3551
+ * Mint the request identity used by direct operation-event submissions.
3552
+ * @see https://docs.warmhub.ai/sdk-reference/variables/createoperationeventrequestid/
3553
+ */
3554
+ declare const createOperationEventRequestId: typeof createOperationEventSubmissionId;
3555
+ /**
3556
+ * Derive the ratified UUIDv5 request identity for one stream chunk.
3557
+ * @see https://docs.warmhub.ai/sdk-reference/functions/operationeventstreamrequestid/
3558
+ */
3559
+ declare function operationEventStreamRequestId(submissionId: string, chunkOrdinal: number): string;
3560
+
2027
3561
  /**
2028
3562
  * Version string for the installed SDK package.
2029
3563
  * @see https://docs.warmhub.ai/sdk-reference/variables/sdk_version/
@@ -2044,6 +3578,12 @@ type StreamAppendInput = StreamAppendInput$1;
2044
3578
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/streamappendresult/
2045
3579
  */
2046
3580
  type StreamAppendResult = StreamAppendResult$1;
3581
+ /**
3582
+ * The exact immutable receipt returned by every public write and lookup.
3583
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/operationeventreceiptv1/
3584
+ */
3585
+ type OperationEventReceiptV1 = OperationEventReceiptV1$1;
3586
+
2047
3587
  /**
2048
3588
  * Remove an `@vN`, `@HEAD`, or `@ALL` version suffix from a wref.
2049
3589
  *
@@ -2079,11 +3619,12 @@ interface WarmHubClientOptions {
2079
3619
  functionLogs?: FunctionLogMode;
2080
3620
  /**
2081
3621
  * Self-identification sent on the `X-WarmHub-Client` header (`name/version`)
2082
- * for backend observability + read-analytics surface attribution. Defaults to
2083
- * `@warmhub/sdk-ts/<SDK_VERSION>`. A wrapper such as the WarmHub CLI overrides
2084
- * `name` (and usually `version`) to identify itself instead. An untrusted
2085
- * hint — never an authz signal. A per-request `X-WarmHub-Client` header on a
2086
- * raw request still wins over this default.
3622
+ * for backend observability, compatibility admission, and read-analytics
3623
+ * surface attribution. Defaults to `@warmhub/sdk-ts/<SDK_VERSION>`. A wrapper
3624
+ * such as the WarmHub CLI overrides both values to identify its actual
3625
+ * released artifact. An untrusted safety hint — never an authz signal. A
3626
+ * per-request `X-WarmHub-Client` header on a raw request still wins over this
3627
+ * default.
2087
3628
  */
2088
3629
  client?: {
2089
3630
  name?: string;
@@ -2147,7 +3688,7 @@ type SubscriptionUnbindArgs = [orgName: string, repoName: string, subscriptionNa
2147
3688
  }
2148
3689
  ];
2149
3690
  /** @internal */
2150
- type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' | 'VALIDATION_ERROR' | 'CONFLICT' | 'RATE_LIMITED' | 'CANCELLED' | 'NETWORK';
3691
+ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' | 'VALIDATION_ERROR' | 'CONFLICT' | 'RATE_LIMITED' | 'CANCELLED' | 'CLIENT_INCOMPATIBLE' | 'NETWORK';
2151
3692
  /**
2152
3693
  * Stable SDK error kinds plus backend domain codes that pass through as strings.
2153
3694
  *
@@ -2165,6 +3706,7 @@ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' |
2165
3706
  * - `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`.
2166
3707
  * - `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
2167
3708
  * - `CANCELLED` — cause: caller aborted the request via `AbortSignal`; retryable: true; action: retry only if the caller still wants the result; origin: SDK `AbortError` mapping
3709
+ * - `CLIENT_INCOMPATIBLE` — cause: the client family/version or write contract is incompatible with the backend; retryable: false; action: follow the error hint to upgrade the client or backend; origin: SDK write preflight and backend mutation admission
2168
3710
  * - `NETWORK` — cause: connection failed before the server produced a response (DNS, refused, timeout, fetch error); retryable: true; action: check connectivity to the configured `apiUrl` and retry with backoff; origin: SDK `fetchWithAuth` connection-error mapping
2169
3711
  *
2170
3712
  * Backend domain codes (e.g. `SHAPE_MISMATCH`, `WREF_UNRESOLVABLE`,
@@ -2182,12 +3724,12 @@ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' |
2182
3724
  */
2183
3725
  type ErrorKind = CoreErrorKind | (string & {});
2184
3726
  /**
2185
- * Result returned by successful commit submissions.
3727
+ * Legacy commit result fields plus ordered exact receipts for every submitted chunk.
2186
3728
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/operationsubmitresult/
2187
3729
  */
2188
3730
  type OperationSubmitResult = SubmittedStreamResult;
2189
3731
  /** @internal */
2190
- type ShapeChange = ShapeChangeResult;
3732
+ type ShapeChange = ShapeChangeCompatibilityResult;
2191
3733
  /** @internal */
2192
3734
  type Shape = ShapeGetResult;
2193
3735
  /** @internal */
@@ -2196,13 +3738,11 @@ type ShapeList = ShapeListResult;
2196
3738
  * Result of `client.shape.remove` — confirms the retraction with the new version metadata.
2197
3739
  * @internal
2198
3740
  */
2199
- type ShapeRemove = {
2200
- name: string;
2201
- operation: ShapeRemoveResult['operation'];
2202
- version: number;
2203
- dataHash: string;
2204
- removed: true;
2205
- };
3741
+ type ShapeRemove = ShapeRemoveCompatibilityResult;
3742
+ /** @internal */
3743
+ type RenameResult = RenameCompatibilityResult;
3744
+ /** @internal */
3745
+ type CommitApplyCompatibilityResult = CommitApplyCompatibilityResult$1;
2206
3746
  /**
2207
3747
  * Shape of a subscription record returned from `client.subscription.list`,
2208
3748
  * `client.subscription.get`, `client.subscription.create`, and
@@ -2240,6 +3780,32 @@ type SubscriptionInfo = {
2240
3780
  notifyOnSuccess?: boolean;
2241
3781
  componentRef?: string;
2242
3782
  credentialSetNames: Array<string>;
3783
+ /**
3784
+ * Immutable operation-event routing revision. Absent for metadata and legacy
3785
+ * cron subscriptions. It describes stored router state; legacy delivery
3786
+ * remains in effect until the exact router is activated.
3787
+ */
3788
+ operationSubscription?: {
3789
+ /** Omitted when current source-repository authority no longer permits its label. */
3790
+ effectiveSourceRepo?: string;
3791
+ revision: number;
3792
+ lifecycle: 'active' | 'paused' | 'retired';
3793
+ routingStatus: 'dormant' | 'active';
3794
+ routingGeneration: number;
3795
+ routingShard: number | null;
3796
+ matcherVersion: string;
3797
+ matcherDigest: string;
3798
+ targetGeneration: number;
3799
+ credentialGeneration: number;
3800
+ deliveryPolicy: {
3801
+ allowTraceReentry: boolean | null;
3802
+ notifyOnSuccess: boolean;
3803
+ };
3804
+ retirement?: {
3805
+ retiredAt: number;
3806
+ reason: string;
3807
+ };
3808
+ };
2243
3809
  createdAt: number;
2244
3810
  };
2245
3811
  /**
@@ -2361,16 +3927,6 @@ type ActionDeliveryTarget = string | {
2361
3927
  deliveryId: string;
2362
3928
  runId?: never;
2363
3929
  };
2364
- /**
2365
- * Result returned by in-place rename mutations: `client.shape.rename` and
2366
- * `client.thing.rename`. A rename patches the identity field directly and
2367
- * preserves the existing version history; no new version is created. The
2368
- * `renamed: true` discriminator distinguishes the success shape from a
2369
- * rejected request (which throws `WarmHubError`).
2370
- *
2371
- * @see https://docs.warmhub.ai/data-modeling/naming-as-navigation/
2372
- */
2373
- type RenameResult = RenameResult$1;
2374
3930
  /** @internal Curated lists returned by `client.homepage.featuredLists()`. */
2375
3931
  type HomepageFeaturedListsResult = HomepageFeaturedListsResult$1;
2376
3932
  /**
@@ -2417,6 +3973,22 @@ type ComponentHistoryOptions = {
2417
3973
  type ComponentInstallResult = ComponentInstallResult$1;
2418
3974
  /** @internal */
2419
3975
  type ComponentUninstallResult = ComponentUninstallResult$1;
3976
+ /**
3977
+ * Caller-owned root identity for component installation repository-write
3978
+ * receipts. Reuse it only when recovering the same install submission.
3979
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/componentinstalloptions/
3980
+ */
3981
+ type ComponentInstallOptions = {
3982
+ submissionId: string;
3983
+ };
3984
+ /**
3985
+ * Caller-owned root identity for component teardown repository-write receipts.
3986
+ * Reuse it only when recovering the same teardown submission.
3987
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/componentuninstalloptions/
3988
+ */
3989
+ type ComponentUninstallOptions = {
3990
+ submissionId: string;
3991
+ };
2420
3992
  /** @internal */
2421
3993
  type ComponentListOptions = {
2422
3994
  limit?: number;
@@ -2506,13 +4078,26 @@ type ShapeGetOptions = {
2506
4078
  };
2507
4079
  /** @internal */
2508
4080
  type ShapeCreateOptions = {
4081
+ eventRequestId: string;
2509
4082
  description?: string;
2510
4083
  };
2511
4084
  /** @internal */
2512
4085
  type ShapeReviseOptions = {
4086
+ eventRequestId: string;
2513
4087
  description?: string;
2514
4088
  };
2515
4089
  /** @internal */
4090
+ type ShapeRemoveOptions = {
4091
+ eventRequestId: string;
4092
+ };
4093
+ /**
4094
+ * Caller-owned UUID retained across an ambiguous rename retry.
4095
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/renameoptions/
4096
+ */
4097
+ type RenameOptions = {
4098
+ eventRequestId: string;
4099
+ };
4100
+ /** @internal */
2516
4101
  interface ShapeHistoryOptions {
2517
4102
  includeRetracted?: boolean;
2518
4103
  limit?: number;
@@ -2998,6 +4583,7 @@ type LiveRepoEvent = {
2998
4583
  };
2999
4584
  /** @internal */
3000
4585
  type ActionListRunsOptions = {
4586
+ runId?: string;
3001
4587
  subscriptionName?: string;
3002
4588
  status?: 'pending' | 'running' | 'processing' | 'retry_wait' | 'succeeded' | 'suppressed' | 'failed_terminal' | 'dead_letter';
3003
4589
  outcome?: 'succeeded' | 'failed';
@@ -3137,6 +4723,8 @@ type RefsResult = RefsResult$1;
3137
4723
  /** @internal */
3138
4724
  type CollectionType = CollectionType$1;
3139
4725
  /** @internal */
4726
+ type CollectionMutationResult = CollectionMutationCompatibilityResult;
4727
+ /** @internal */
3140
4728
  type CollectionMember = CollectionMember$1;
3141
4729
  /** @internal */
3142
4730
  type CollectionMembersPage = CollectionMembersPage$1;
@@ -3145,7 +4733,6 @@ type CollectionContainsResult = CollectionContainsResult$1;
3145
4733
  /** @internal */
3146
4734
  type CollectionDiffResult = CollectionDiffResult$1;
3147
4735
  /** @internal */
3148
- type CollectionMutationResult = CollectionMutationResult$1;
3149
4736
  /** @internal */
3150
4737
  type CollectionStatsResult = CollectionStatsResult$1;
3151
4738
  /** @internal */
@@ -3314,6 +4901,8 @@ type CollectionMemberSourceOptions = {
3314
4901
  };
3315
4902
  /** @internal */
3316
4903
  type CollectionCreateOptions = {
4904
+ /** Caller-owned UUID retained across ambiguous retries. */
4905
+ eventRequestId: string;
3317
4906
  type: CollectionType;
3318
4907
  name: string;
3319
4908
  from?: string;
@@ -3343,6 +4932,8 @@ type CollectionDiffOptions = {
3343
4932
  };
3344
4933
  /** @internal */
3345
4934
  type CollectionReviseOptions = {
4935
+ /** Caller-owned UUID retained across ambiguous retries. */
4936
+ eventRequestId: string;
3346
4937
  add?: string[];
3347
4938
  remove?: string[];
3348
4939
  message?: string;
@@ -3370,7 +4961,9 @@ declare function resolveFunctionLogMode(mode?: FunctionLogMode): FunctionLogMode
3370
4961
  * after a `lease_held` to back off until the lease expires (#3625).
3371
4962
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/warmhuberrordetails/
3372
4963
  */
3373
- type WarmHubErrorDetails = NonNullable<NonNullable<StreamAppendResult$1['results'][number]['error']>['details']>;
4964
+ type WarmHubErrorDetails = NonNullable<NonNullable<Extract<OperationEventReceiptV1$1['operations'][number], {
4965
+ error?: unknown;
4966
+ }>['error']>['details']>;
3374
4967
  /** @internal */
3375
4968
  declare function sanitizeErrorMessage(message: string): string;
3376
4969
  /**
@@ -3499,10 +5092,9 @@ declare function isConnectionError(error: unknown): boolean;
3499
5092
  declare function connectionErrorMessage(url: string): string;
3500
5093
  /**
3501
5094
  * Returns true when `version` is strictly older than `minimum`. Both
3502
- * arguments must parse as semver-shaped strings (major.minor.patch with
3503
- * optional prerelease and build metadata); non-parseable inputs return
3504
- * false (fail-open) so a malformed `minSupportedSdk` from a future
3505
- * backend cannot brick existing clients.
5095
+ * arguments must be valid SemVer; non-parseable inputs return false for this
5096
+ * legacy read-side helper. Write admission validates both values separately
5097
+ * and fails closed.
3506
5098
  *
3507
5099
  * @internal
3508
5100
  */
@@ -3557,6 +5149,8 @@ declare class WarmHubClient {
3557
5149
  protected readonly getToken?: () => Promise<string | undefined>;
3558
5150
  private readonly trpc;
3559
5151
  private compatibilityCheck?;
5152
+ private assertWriteCompatible;
5153
+ private createCompatibilityLink;
3560
5154
  /**
3561
5155
  * Authentication helpers for browser sign-in flows, session checks, and token diagnostics.
3562
5156
  * @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#auth
@@ -3624,17 +5218,16 @@ declare class WarmHubClient {
3624
5218
  */
3625
5219
  ping: () => Promise<PingResult>;
3626
5220
  /**
3627
- * Return backend API version, minimum supported SDK version, and feature flags.
5221
+ * Return backend API version, per-client floors, write-contract version, and feature flags.
3628
5222
  */
3629
5223
  capabilities: () => Promise<Capabilities>;
3630
5224
  /**
3631
- * Verify the installed SDK is at or above the backend's advertised
3632
- * minimum supported version, throwing a `WarmHubError` with a clear
3633
- * "upgrade to >=X" message when it is not.
5225
+ * Verify this client family/version and the backend can safely write,
5226
+ * throwing an actionable `WarmHubError` when either side is incompatible.
3634
5227
  *
3635
5228
  * Call this once at startup (e.g. immediately after constructing the
3636
- * client) to fail fast on SDK version skew, rather than discovering a
3637
- * removed route deep in the commit pipeline as an opaque error.
5229
+ * client) to fail fast on either direction of version skew. Mutations call
5230
+ * the same cached check automatically before dispatch.
3638
5231
  * The result is cached on the client instance — repeated calls reuse
3639
5232
  * the first network round-trip and re-throw the same error if too old.
3640
5233
  *
@@ -3722,8 +5315,12 @@ declare class WarmHubClient {
3722
5315
  *
3723
5316
  * Reinstall is idempotent: the install identity (`installId`) is reused so
3724
5317
  * runtime tokens keyed on it survive teardown/reinstall.
5318
+ *
5319
+ * `options.submissionId` groups deterministic receipts for the repository
5320
+ * mutation phases only. Credential/subscription reconciliation and setup
5321
+ * callbacks retain their existing lifecycle semantics.
3725
5322
  */
3726
- install: (orgName: string, repoName: string, componentRef: string) => Promise<ComponentInstallResult>;
5323
+ install: (orgName: string, repoName: string, componentRef: string, options: ComponentInstallOptions) => Promise<ComponentInstallResult>;
3727
5324
  /**
3728
5325
  * Uninstall a registered component from a repository (GH-4677).
3729
5326
  *
@@ -3738,8 +5335,11 @@ declare class WarmHubClient {
3738
5335
  *
3739
5336
  * Non-destructive: manifest shapes and seeded data are left intact (only
3740
5337
  * repo deletion removes those) and reinstall revives the install.
5338
+ * `options.submissionId` groups deterministic receipts for repository
5339
+ * mutation phases; it does not make callbacks or token lifecycle work one
5340
+ * atomic submission.
3741
5341
  */
3742
- uninstall: (orgName: string, repoName: string, componentRef: string) => Promise<ComponentUninstallResult>;
5342
+ uninstall: (orgName: string, repoName: string, componentRef: string, options: ComponentUninstallOptions) => Promise<ComponentUninstallResult>;
3743
5343
  /**
3744
5344
  * Registered-component identity and install-pipeline operations.
3745
5345
  *
@@ -3789,21 +5389,21 @@ declare class WarmHubClient {
3789
5389
  *
3790
5390
  * This is the primary write path for SDK callers. It streams operations to the backend, preserves server-side per-operation results, supports chunking for large submissions, and can attribute writes to a committer wref or installed component.
3791
5391
  *
3792
- * Simple first-chunk transport failures are retried by default. Ambiguous failures surface as `PartialStreamSubmissionError`, including the case where an ambiguous attempt is followed by an all-failed retry; inspect `error.cause` for the underlying `AllStreamOperationsFailedError` or backend error. Deterministic all-failed submissions without prior ambiguity throw `AllStreamOperationsFailedError` directly so callers can inspect per-operation failure rows. Validation, auth, conflict, rate-limit, and other definite backend failures surface as `WarmHubError`. See [Transient Retry](/sdk/transient-retry/) for the full retry and partial-submission rules.
5392
+ * Transport-ambiguous failures retry with the identical submission ID and
5393
+ * chunk ordinal. If ambiguity remains, `PartialStreamSubmissionError`
5394
+ * carries the pending `eventRequestId` and every earlier exact receipt.
3793
5395
  *
3794
5396
  * Writing to an archived organization or repository fails with an `ARCHIVED` error before any operations are applied.
3795
5397
  *
3796
5398
  * @param message Optional commit message stored with the submitted operations.
3797
5399
  * @param operations Add, revise, or retract operations to submit in order.
3798
- * @param opts.committer Optional untyped wref identifying the actor on whose behalf the write is made. It may target an existing shape (`"Agent"`) or shaped thing (`"Agent/bot-1"`), locally or canonically (`"wh:other-org/other-repo/Agent"` or `"wh:other-org/other-repo/Agent/bot-1"`). A one-segment value is a shape wref, not a free-form label, and succeeds only when that shape exists. On success, `OperationSubmitResult.committer` echoes the supplied wref string; version reads expose the resolved target as `committerWref`.
5400
+ * @param opts.committer Optional untyped wref identifying the actor on whose behalf the write is made. It may target an existing shape (`"Agent"`) or shaped thing (`"Agent/bot-1"`), locally or canonically (`"wh:other-org/other-repo/Agent"` or `"wh:other-org/other-repo/Agent/bot-1"`). A one-segment value is a shape wref, not a free-form label, and succeeds only when that shape exists. Exact operation-event receipts do not echo this input; version reads expose the resolved target as `committerWref`.
3799
5401
  * @param opts.componentRef Attribute writes to an installed component, identified by its `Org/Name` ref, when the caller is allowed to claim it.
3800
5402
  * @param opts.chunkSize Maximum operations per stream append. Values are clamped by the SDK.
3801
5403
  * @param opts.skipExisting Return `noop` for add operations whose target already exists.
3802
5404
  * @param opts.streamId Caller-managed stream identity for observability and diagnostic correlation.
3803
- * @param opts.returnRepoSeq Return the sequence allocated to the writer's
3804
- * own commit acknowledgement. This does not disclose a reader-facing
3805
- * repository head. Multi-chunk submissions return the last sequence
3806
- * actually allocated; a later no-op or failed chunk does not erase it.
5405
+ * @param opts.submissionId Caller-selected UUID correlating all chunks.
5406
+ * When omitted, the SDK mints one before the first network request.
3807
5407
  * @param opts.retry Retry policy for transient first-chunk failures, or `false` to disable automatic retry.
3808
5408
  */
3809
5409
  apply: (orgName: string, repoName: string, message: string | undefined, operations: Operation[], opts?: {
@@ -3812,9 +5412,12 @@ declare class WarmHubClient {
3812
5412
  chunkSize?: number;
3813
5413
  skipExisting?: boolean;
3814
5414
  streamId?: string;
5415
+ submissionId?: string;
3815
5416
  returnRepoSeq?: boolean;
3816
5417
  retry?: RetryPolicyOptions | false;
3817
5418
  }) => Promise<OperationSubmitResult>;
5419
+ /** Recover one immutable write receipt after an ambiguous response. */
5420
+ getReceipt: (orgName: string, repoName: string, eventRequestId: string) => Promise<OperationEventReceiptV1>;
3818
5421
  };
3819
5422
  /**
3820
5423
  * Organization management surface for namespaces, membership, roles, and scoped member permissions.
@@ -3938,6 +5541,43 @@ declare class WarmHubClient {
3938
5541
  * @see https://docs.warmhub.ai/sdk/repo-stats/
3939
5542
  */
3940
5543
  readonly repo: {
5544
+ /**
5545
+ * Repository checkpoint lifecycle and artifact-access operations.
5546
+ *
5547
+ * Reads require unrestricted `repo:read` plus `repo:checkpoint-read`;
5548
+ * generation and retry additionally require `repo:admin`.
5549
+ *
5550
+ * `getAccess` returns a signed artifact descriptor only. It does not fetch
5551
+ * the signed URL or attach the WarmHub bearer token to that URL.
5552
+ */
5553
+ checkpoint: {
5554
+ generate: (orgName: string, repoName: string, options?: {
5555
+ atLeastRepoSeq?: number;
5556
+ }) => Promise<RepositoryCheckpointStatus>;
5557
+ status: (orgName: string, repoName: string, selector: {
5558
+ checkpointId: string;
5559
+ repoSeq?: never;
5560
+ } | {
5561
+ repoSeq: number;
5562
+ checkpointId?: never;
5563
+ }) => Promise<RepositoryCheckpointStatus>;
5564
+ latest: (orgName: string, repoName: string) => Promise<(RepositoryCheckpointStatus & {
5565
+ state: "complete";
5566
+ }) | null>;
5567
+ getAccess: (orgName: string, repoName: string, input: {
5568
+ checkpoint: "latest" | ({
5569
+ checkpointId: string;
5570
+ repoSeq?: never;
5571
+ } | {
5572
+ repoSeq: number;
5573
+ checkpointId?: never;
5574
+ });
5575
+ artifact: "archive" | "manifest" | {
5576
+ chunkPath: string;
5577
+ };
5578
+ }) => Promise<RepositoryCheckpointAccess>;
5579
+ retry: (orgName: string, repoName: string, checkpointId: string) => Promise<RepositoryCheckpointStatus>;
5580
+ };
3941
5581
  /**
3942
5582
  * Get a repository by organization and repository name.
3943
5583
  */
@@ -4183,13 +5823,20 @@ declare class WarmHubClient {
4183
5823
  /**
4184
5824
  * Commit a new `Content/Readme` value.
4185
5825
  *
4186
- * The backend adds or revises the content record through the normal commit pipeline.
5826
+ * The backend adds or revises the content record through the normal commit
5827
+ * pipeline. Create `opts.eventRequestId` before submission and reuse it to
5828
+ * look up or retry an ambiguous outcome.
4187
5829
  */
4188
- setReadme: (orgName: string, repoName: string, content: string) => Promise<CommitApplyResult>;
5830
+ setReadme: (orgName: string, repoName: string, content: string, opts: {
5831
+ eventRequestId: string;
5832
+ }) => Promise<CommitApplyCompatibilityResult>;
4189
5833
  /**
4190
5834
  * Commit a new `Content/Agents` value through the normal commit pipeline.
5835
+ * The caller owns `opts.eventRequestId` across ambiguous retries.
4191
5836
  */
4192
- setAgents: (orgName: string, repoName: string, content: string) => Promise<CommitApplyResult>;
5837
+ setAgents: (orgName: string, repoName: string, content: string, opts: {
5838
+ eventRequestId: string;
5839
+ }) => Promise<CommitApplyCompatibilityResult>;
4193
5840
  /**
4194
5841
  * Fetch the synthesized `Content/LlmsTxt` sitemap for a repository.
4195
5842
  *
@@ -4223,11 +5870,9 @@ declare class WarmHubClient {
4223
5870
  *
4224
5871
  * Returns the full shape thing record, with `name`,
4225
5872
  * `kind: "shape"`, `active`, and a nested `version: { version, operation,
4226
- * data, dataHash } | null`. This is **not** the same shape as the
4227
- * shape returned by `create` and `revise`: the change result
4228
- * is flat (`name`, `operation`, `version: number`, `dataHash`) and does
4229
- * not carry `data`. To read shape fields, call `get` and read
4230
- * `result.version?.data` — the change result alone is not enough.
5873
+ * data, dataHash } | null`. Shape mutations return immutable operation-event
5874
+ * receipts, not this read projection. To read shape fields, call `get` and
5875
+ * read `result.version?.data`.
4231
5876
  *
4232
5877
  * @param opts.includeRetracted Include a retracted shape instead of treating it as missing.
4233
5878
  */
@@ -4237,35 +5882,41 @@ declare class WarmHubClient {
4237
5882
  *
4238
5883
  * Shape data should describe the fields used to validate things and assertions with that shape.
4239
5884
  *
4240
- * Returns `{ name, operation, version, dataHash }`.
4241
- * The result confirms the write and exposes the new version number, but it
4242
- * does **not** include the shape data — call `client.shape.get` for the
4243
- * full shape record (with `kind`, `active`, and nested
4244
- * `version.data`).
5885
+ * Returns the existing shape-change fields plus a nested immutable receipt.
5886
+ * Supply `opts.eventRequestId` when the caller needs stable receipt lookup
5887
+ * or safe retry after an ambiguous response; legacy callers may omit it.
4245
5888
  *
5889
+ * @param opts.eventRequestId Caller-owned UUID retained across ambiguous retries.
4246
5890
  * @param opts.description Optional human-readable shape description.
4247
5891
  */
4248
- create: (orgName: string, repoName: string, shapeName: string, fields: Record<string, unknown>, opts?: ShapeCreateOptions) => Promise<ShapeChange>;
5892
+ create: (orgName: string, repoName: string, shapeName: string, fields: Record<string, unknown>, opts: ShapeCreateOptions) => Promise<ShapeChange>;
4249
5893
  /**
4250
5894
  * Revise a shape definition, creating a new shape version.
4251
5895
  *
4252
- * Returns `{ name, operation, version, dataHash }`,
4253
- * the same flat shape as `create`. To read the revised fields back, call
4254
- * `client.shape.get` for the full shape record.
5896
+ * Returns the existing shape-change fields plus a nested immutable receipt.
5897
+ * A supplied `opts.eventRequestId` remains stable across ambiguous retries.
4255
5898
  *
5899
+ * @param opts.eventRequestId Caller-owned UUID retained across ambiguous retries.
4256
5900
  * @param opts.description Optional human-readable description for the revised shape.
4257
5901
  */
4258
- revise: (orgName: string, repoName: string, shapeName: string, newFields: Record<string, unknown>, opts?: ShapeReviseOptions) => Promise<ShapeChange>;
5902
+ revise: (orgName: string, repoName: string, shapeName: string, newFields: Record<string, unknown>, opts: ShapeReviseOptions) => Promise<ShapeChange>;
4259
5903
  /**
4260
5904
  * Retract a shape definition.
5905
+ *
5906
+ * Returns the existing removal fields plus a nested immutable receipt.
5907
+ * A supplied `opts.eventRequestId` remains stable across ambiguous retries.
5908
+ *
5909
+ * @param opts.eventRequestId Caller-owned UUID retained across ambiguous retries.
4261
5910
  */
4262
- remove: (orgName: string, repoName: string, shapeName: string) => Promise<ShapeRemove>;
5911
+ remove: (orgName: string, repoName: string, shapeName: string, opts: ShapeRemoveOptions) => Promise<ShapeRemove>;
4263
5912
  /**
4264
5913
  * Rename a shape within a repository.
4265
5914
  *
4266
- * The rename is applied in place: the existing shape history is preserved and no new version is created.
5915
+ * The rename is applied in place: the existing shape history is preserved
5916
+ * and no new version is created. Retain `opts.eventRequestId` for an exact
5917
+ * receipt replay after an ambiguous response.
4267
5918
  */
4268
- rename: (orgName: string, repoName: string, oldName: string, newName: string) => Promise<RenameResult>;
5919
+ rename: (orgName: string, repoName: string, oldName: string, newName: string, opts: RenameOptions) => Promise<RenameResult>;
4269
5920
  /**
4270
5921
  * Return add, revise, retract, and rename history for a shape.
4271
5922
  *
@@ -4363,9 +6014,12 @@ declare class WarmHubClient {
4363
6014
  active: boolean;
4364
6015
  }>;
4365
6016
  /**
4366
- * Delete a subscription.
6017
+ * Remove a subscription.
4367
6018
  *
4368
- * Omit `repoName` (object form) to delete an org-scoped subscription.
6019
+ * Operation subscriptions are immediately retired: delivery stops, the
6020
+ * identity remains auditable, and the name stays reserved. Metadata and
6021
+ * legacy cron subscriptions are deleted. Omit `repoName` (object form) for
6022
+ * an org-scoped subscription.
4369
6023
  */
4370
6024
  remove: (...args: SubscriptionRefArgs) => Promise<{
4371
6025
  ok: true;
@@ -4687,9 +6341,11 @@ declare class WarmHubClient {
4687
6341
  /**
4688
6342
  * Rename a thing within its shape namespace.
4689
6343
  *
4690
- * The rename is applied in place: the thing's existing history is preserved and no new version is created.
6344
+ * The rename is applied in place: the thing's existing history is preserved
6345
+ * and no new version is created. Retain `opts.eventRequestId` for an exact
6346
+ * receipt replay after an ambiguous response.
4691
6347
  */
4692
- rename: (orgName: string, repoName: string, shapeName: string, oldName: string, newName: string) => Promise<RenameResult>;
6348
+ rename: (orgName: string, repoName: string, shapeName: string, oldName: string, newName: string, opts: RenameOptions) => Promise<RenameResult>;
4693
6349
  /**
4694
6350
  * Resolve a wref to its current projected record.
4695
6351
  */
@@ -5205,4 +6861,4 @@ declare class WarmHubClient {
5205
6861
  private watchRepoQuery;
5206
6862
  }
5207
6863
 
5208
- 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 ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallResult, type ComponentList, type ComponentListOptions, 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 HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, type Operation, OperationBuilder, type OperationBuilderAddInput, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationSubmitResult, type OrgAccessResult, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, type RefLink, type RefsOptions, type RefsResult, type RenameOperation, type RenameResult, type RepoAccessResult, 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 RequestEvent, type ResolveWrefResult, type RetractOp, type RetractOperation, type RetryPolicyOptions, type ReviseOp, type ReviseOperation, SDK_VERSION, type SearchOptions, type SearchResult, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeReviseOptions, type ShapeValidatorResult, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type 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, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
6864
+ 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 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 HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, type Operation, OperationBuilder, type OperationBuilderAddInput, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationEventReceiptV1, type OperationSubmitResult, type OrgAccessResult, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, type RefLink, type RefsOptions, type RefsResult, type RenameOperation, type RenameOptions, type RenameResult, type RepoAccessResult, 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, 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, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, aggregateSubmittedStreamResult, completedOperationsFrom, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createOperationEventRequestId, createOperationEventSubmissionId, isConnectionError, isDefiniteStreamAppendRejection, isRetryable, isWarmHubError, normalizeWref, offsetChunkResultIndexes, operationEventStreamRequestId, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };