@warmhub/sdk-ts 0.65.0 → 0.67.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/{chunk-C2Q4D3JM.js → chunk-2KN2JWJU.js} +487 -306
- package/dist/chunk-2KN2JWJU.js.map +1 -0
- package/dist/index.d.ts +344 -66
- package/dist/index.js +1 -1
- package/dist/react.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-C2Q4D3JM.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,15 +2,6 @@ declare const COMMIT_OPERATIONS: readonly ["add", "revise", "retract", "rename"]
|
|
|
2
2
|
type CommitOperation = (typeof COMMIT_OPERATIONS)[number];
|
|
3
3
|
declare const COMMIT_OPERATION_KINDS: readonly ["shape", "thing", "assertion", "collection"];
|
|
4
4
|
type CommitOperationKind = (typeof COMMIT_OPERATION_KINDS)[number];
|
|
5
|
-
type CollectionAbout$2 = {
|
|
6
|
-
pair: [string, string];
|
|
7
|
-
} | {
|
|
8
|
-
triple: [string, string, string];
|
|
9
|
-
} | {
|
|
10
|
-
set: string[];
|
|
11
|
-
} | {
|
|
12
|
-
list: string[];
|
|
13
|
-
};
|
|
14
5
|
|
|
15
6
|
/**
|
|
16
7
|
* Canonical request signing for component CLI dispatch.
|
|
@@ -265,6 +256,7 @@ type AccessResolveResult$1 = {
|
|
|
265
256
|
visible: boolean;
|
|
266
257
|
scopes: Array<'repo:read' | 'repo:write' | 'repo:configure' | 'repo:admin' | 'repo:action-callback'>;
|
|
267
258
|
allowedMatches?: Array<string>;
|
|
259
|
+
repoDurableId?: string;
|
|
268
260
|
}>;
|
|
269
261
|
orgs: Array<{
|
|
270
262
|
orgName: string;
|
|
@@ -275,16 +267,7 @@ type AccessResolveResult$1 = {
|
|
|
275
267
|
type AuthSyncResult = {
|
|
276
268
|
success: boolean;
|
|
277
269
|
};
|
|
278
|
-
type
|
|
279
|
-
pair: [string, string];
|
|
280
|
-
} | {
|
|
281
|
-
triple: [string, string, string];
|
|
282
|
-
} | {
|
|
283
|
-
set: Array<string>;
|
|
284
|
-
} | {
|
|
285
|
-
list: Array<string>;
|
|
286
|
-
};
|
|
287
|
-
type CollectionTag$1 = 'pair' | 'triple' | 'set' | 'list';
|
|
270
|
+
type CollectionTag$1 = 'pair' | 'set' | 'list';
|
|
288
271
|
type CommitApplyResult = {
|
|
289
272
|
committer?: string;
|
|
290
273
|
createdByEmail?: string;
|
|
@@ -311,6 +294,85 @@ type CommitApplyResult = {
|
|
|
311
294
|
};
|
|
312
295
|
}>;
|
|
313
296
|
};
|
|
297
|
+
type CollectionContainsResult$1 = {
|
|
298
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
299
|
+
wref: string;
|
|
300
|
+
version: number;
|
|
301
|
+
results: Array<{
|
|
302
|
+
member: string;
|
|
303
|
+
contains: boolean;
|
|
304
|
+
positions?: Array<number>;
|
|
305
|
+
}>;
|
|
306
|
+
};
|
|
307
|
+
type CollectionDiffResult$1 = {
|
|
308
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
309
|
+
leftWref: string;
|
|
310
|
+
rightWref: string;
|
|
311
|
+
leftVersion: number;
|
|
312
|
+
rightVersion: number;
|
|
313
|
+
mode: 'membership' | 'ordered';
|
|
314
|
+
added: Array<{
|
|
315
|
+
wref: string;
|
|
316
|
+
position?: number;
|
|
317
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
318
|
+
}>;
|
|
319
|
+
removed: Array<{
|
|
320
|
+
wref: string;
|
|
321
|
+
position?: number;
|
|
322
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
323
|
+
}>;
|
|
324
|
+
unchanged: Array<{
|
|
325
|
+
wref: string;
|
|
326
|
+
position?: number;
|
|
327
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
328
|
+
}>;
|
|
329
|
+
changed: Array<{
|
|
330
|
+
position: number;
|
|
331
|
+
left?: {
|
|
332
|
+
wref: string;
|
|
333
|
+
position?: number;
|
|
334
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
335
|
+
};
|
|
336
|
+
right?: {
|
|
337
|
+
wref: string;
|
|
338
|
+
position?: number;
|
|
339
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
340
|
+
};
|
|
341
|
+
}>;
|
|
342
|
+
};
|
|
343
|
+
type CollectionMember$1 = {
|
|
344
|
+
wref: string;
|
|
345
|
+
position?: number;
|
|
346
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
347
|
+
};
|
|
348
|
+
type CollectionMembersPage$1 = {
|
|
349
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
350
|
+
wref: string;
|
|
351
|
+
version: number;
|
|
352
|
+
items: Array<{
|
|
353
|
+
wref: string;
|
|
354
|
+
position?: number;
|
|
355
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
356
|
+
}>;
|
|
357
|
+
nextCursor?: string;
|
|
358
|
+
};
|
|
359
|
+
type CollectionMutationResult$1 = {
|
|
360
|
+
type: 'pair' | 'set' | 'list';
|
|
361
|
+
wref: string;
|
|
362
|
+
version: number;
|
|
363
|
+
memberCount: number;
|
|
364
|
+
dataHash?: string;
|
|
365
|
+
operationCount: number;
|
|
366
|
+
status: 'created' | 'updated' | 'noop';
|
|
367
|
+
};
|
|
368
|
+
type CollectionStatsResult$1 = {
|
|
369
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
370
|
+
wref: string;
|
|
371
|
+
version: number;
|
|
372
|
+
memberCount: number;
|
|
373
|
+
uniqueMemberCount: number;
|
|
374
|
+
};
|
|
375
|
+
type CollectionType$1 = 'pair' | 'set' | 'list';
|
|
314
376
|
type ComponentDetail = {
|
|
315
377
|
ref?: string;
|
|
316
378
|
componentName: string;
|
|
@@ -481,10 +543,7 @@ type StreamAppendInput$1 = {
|
|
|
481
543
|
committer?: string;
|
|
482
544
|
message?: string;
|
|
483
545
|
allocatedTokens?: never;
|
|
484
|
-
allocatedTokenRanges:
|
|
485
|
-
start: number;
|
|
486
|
-
end: number;
|
|
487
|
-
}>;
|
|
546
|
+
allocatedTokenRanges: [];
|
|
488
547
|
operations: Array<{
|
|
489
548
|
operation: 'add';
|
|
490
549
|
kind: 'shape';
|
|
@@ -501,22 +560,14 @@ type StreamAppendInput$1 = {
|
|
|
501
560
|
operation: 'add';
|
|
502
561
|
kind: 'assertion';
|
|
503
562
|
name: string;
|
|
504
|
-
about: string
|
|
505
|
-
pair: [string, string];
|
|
506
|
-
} | {
|
|
507
|
-
triple: [string, string, string];
|
|
508
|
-
} | {
|
|
509
|
-
set: Array<string>;
|
|
510
|
-
} | {
|
|
511
|
-
list: Array<string>;
|
|
512
|
-
};
|
|
563
|
+
about: string;
|
|
513
564
|
data: unknown;
|
|
514
565
|
skipExisting?: boolean;
|
|
515
566
|
} | {
|
|
516
567
|
operation: 'add';
|
|
517
568
|
kind: 'collection';
|
|
518
|
-
name
|
|
519
|
-
type: 'pair' | '
|
|
569
|
+
name: string;
|
|
570
|
+
type: 'pair' | 'set' | 'list';
|
|
520
571
|
members: Array<string>;
|
|
521
572
|
skipExisting?: boolean;
|
|
522
573
|
} | {
|
|
@@ -543,6 +594,14 @@ type StreamAppendInput$1 = {
|
|
|
543
594
|
expectedVersion?: number;
|
|
544
595
|
active?: never;
|
|
545
596
|
leaseId?: string;
|
|
597
|
+
} | {
|
|
598
|
+
operation: 'revise';
|
|
599
|
+
kind: 'collection';
|
|
600
|
+
name: string;
|
|
601
|
+
type: 'pair' | 'set' | 'list';
|
|
602
|
+
members: Array<string>;
|
|
603
|
+
expectedVersion?: number;
|
|
604
|
+
leaseId?: string;
|
|
546
605
|
} | {
|
|
547
606
|
operation: 'retract';
|
|
548
607
|
name: string;
|
|
@@ -557,10 +616,7 @@ type StreamAppendInput$1 = {
|
|
|
557
616
|
}>;
|
|
558
617
|
};
|
|
559
618
|
type StreamAppendResult$1 = {
|
|
560
|
-
allocatedTokenRanges:
|
|
561
|
-
start: number;
|
|
562
|
-
end: number;
|
|
563
|
-
}>;
|
|
619
|
+
allocatedTokenRanges: [];
|
|
564
620
|
results: Array<{
|
|
565
621
|
opIndex?: number;
|
|
566
622
|
name: string;
|
|
@@ -711,6 +767,17 @@ type ThingGetManyResult$1 = {
|
|
|
711
767
|
validatedShape?: string;
|
|
712
768
|
version: number;
|
|
713
769
|
data?: unknown;
|
|
770
|
+
collection?: {
|
|
771
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
772
|
+
memberField: 'first/second' | 'first/second/third' | 'members' | 'items';
|
|
773
|
+
memberCount: number;
|
|
774
|
+
dataMode: 'full' | 'summary';
|
|
775
|
+
fullData: boolean;
|
|
776
|
+
truncated: boolean;
|
|
777
|
+
inlineLimit?: number;
|
|
778
|
+
preview?: Array<string>;
|
|
779
|
+
previewCount?: number;
|
|
780
|
+
};
|
|
714
781
|
active: boolean;
|
|
715
782
|
synthesized?: boolean;
|
|
716
783
|
aboutWref?: string;
|
|
@@ -776,6 +843,48 @@ type RepoDescribeResult$1 = {
|
|
|
776
843
|
synthesized: boolean;
|
|
777
844
|
}>;
|
|
778
845
|
};
|
|
846
|
+
type RepoExploreInput = {
|
|
847
|
+
search?: string;
|
|
848
|
+
org?: string;
|
|
849
|
+
activity?: 'week' | 'month';
|
|
850
|
+
hasSubscriptions?: true;
|
|
851
|
+
minThings?: number;
|
|
852
|
+
sort?: 'recentlyUpdated' | 'mostSubscribed' | 'mostThings' | 'nameAsc' | 'newest';
|
|
853
|
+
limit?: number;
|
|
854
|
+
cursor?: string;
|
|
855
|
+
slugs?: Array<string>;
|
|
856
|
+
};
|
|
857
|
+
type RepoExploreItem$1 = {
|
|
858
|
+
orgName: string;
|
|
859
|
+
orgDisplayName?: string;
|
|
860
|
+
name: string;
|
|
861
|
+
displayName: string;
|
|
862
|
+
description?: string;
|
|
863
|
+
createdAt: number;
|
|
864
|
+
lastWriteAt?: number;
|
|
865
|
+
subscriptionCount: number;
|
|
866
|
+
thingCount: number;
|
|
867
|
+
};
|
|
868
|
+
type RepoExploreResult$1 = {
|
|
869
|
+
items: Array<{
|
|
870
|
+
orgName: string;
|
|
871
|
+
orgDisplayName?: string;
|
|
872
|
+
name: string;
|
|
873
|
+
displayName: string;
|
|
874
|
+
description?: string;
|
|
875
|
+
createdAt: number;
|
|
876
|
+
lastWriteAt?: number;
|
|
877
|
+
subscriptionCount: number;
|
|
878
|
+
thingCount: number;
|
|
879
|
+
}>;
|
|
880
|
+
nextCursor?: string;
|
|
881
|
+
total?: number;
|
|
882
|
+
orgs?: Array<{
|
|
883
|
+
name: string;
|
|
884
|
+
displayName?: string;
|
|
885
|
+
count: number;
|
|
886
|
+
}>;
|
|
887
|
+
};
|
|
779
888
|
type RepoForCaller = {
|
|
780
889
|
orgName: string;
|
|
781
890
|
name: string;
|
|
@@ -940,10 +1049,10 @@ interface AddOperation {
|
|
|
940
1049
|
*/
|
|
941
1050
|
name?: string;
|
|
942
1051
|
/**
|
|
943
|
-
* Assertion target wref
|
|
1052
|
+
* Assertion target wref. Presence of
|
|
944
1053
|
* `about` makes the add an assertion unless `kind` overrides it.
|
|
945
1054
|
*/
|
|
946
|
-
about?: string
|
|
1055
|
+
about?: string;
|
|
947
1056
|
/**
|
|
948
1057
|
* Shape-validated data payload for shape, thing, or assertion adds.
|
|
949
1058
|
*/
|
|
@@ -996,6 +1105,14 @@ interface ReviseOperation {
|
|
|
996
1105
|
* New shape-validated data payload.
|
|
997
1106
|
*/
|
|
998
1107
|
data?: unknown;
|
|
1108
|
+
/**
|
|
1109
|
+
* Collection type. Required when `kind` is `collection`.
|
|
1110
|
+
*/
|
|
1111
|
+
type?: CollectionTag$1;
|
|
1112
|
+
/**
|
|
1113
|
+
* Collection member wrefs. Required when `kind` is `collection`.
|
|
1114
|
+
*/
|
|
1115
|
+
members?: string[];
|
|
999
1116
|
/**
|
|
1000
1117
|
* Optional optimistic-concurrency precondition. When supplied, the revise is
|
|
1001
1118
|
* applied only if the target is still at this version number. A stale value
|
|
@@ -1240,7 +1357,7 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
1240
1357
|
* transport-ambiguous failure (timeout / 5xx / network reset / no-code
|
|
1241
1358
|
* error) on the first chunk triggers a bounded retry — but only when
|
|
1242
1359
|
* the first chunk contains exactly one operation. The SDK mints a
|
|
1243
|
-
* fresh `streamId`,
|
|
1360
|
+
* fresh `streamId`, sleeps with jittered
|
|
1244
1361
|
* exponential backoff, and re-issues the same operation. The retried
|
|
1245
1362
|
* call is observationally indistinguishable from a single clean
|
|
1246
1363
|
* apply — the SDK does not rewrite the request or the response.
|
|
@@ -1248,17 +1365,13 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
1248
1365
|
* Multi-op chunks bypass retry entirely because the backend applies
|
|
1249
1366
|
* operations one-at-a-time in their own transactions, so a mid-chunk
|
|
1250
1367
|
* transport failure on attempt 1 may have committed an arbitrary
|
|
1251
|
-
* prefix.
|
|
1252
|
-
* bypass retry
|
|
1253
|
-
* so re-issuing under a fresh `streamId` would commit a different
|
|
1254
|
-
* identity than the first attempt may have landed. Multi-chunk
|
|
1255
|
-
* mid-flight failures (`chunkResults.length > 0`) also bypass retry.
|
|
1256
|
-
* All three surface `PartialStreamSubmissionError` exactly as before;
|
|
1368
|
+
* prefix. Multi-chunk mid-flight failures (`chunkResults.length > 0`)
|
|
1369
|
+
* also bypass retry. Both surface `PartialStreamSubmissionError` exactly as before;
|
|
1257
1370
|
* the existing full-input rerun contract remains the recovery path.
|
|
1258
1371
|
*
|
|
1259
1372
|
* Definite client rejections (`UNAUTHENTICATED`, `VALIDATION_ERROR`,
|
|
1260
|
-
* `CONFLICT`, `RATE_LIMITED`, `
|
|
1261
|
-
*
|
|
1373
|
+
* `CONFLICT`, `RATE_LIMITED`, `ALREADY_RETRACTED`, …) on the first chunk
|
|
1374
|
+
* still rethrow the raw cause unchanged — they
|
|
1262
1375
|
* are not transient, and structured detail (e.g. `retryAfter` on
|
|
1263
1376
|
* `RATE_LIMITED`) survives. If the caller's original attempt landed but
|
|
1264
1377
|
* the response was lost, the retry surfaces the resulting `CONFLICT`
|
|
@@ -1296,10 +1409,8 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
1296
1409
|
* any subset of the defaults (`{ 3, 250, 8_000 }`).
|
|
1297
1410
|
*
|
|
1298
1411
|
* Retry is automatically suppressed when the caller supplies
|
|
1299
|
-
* `args.streamId
|
|
1300
|
-
*
|
|
1301
|
-
* streams instead surface `PartialStreamSubmissionError` on append
|
|
1302
|
-
* failure.
|
|
1412
|
+
* `args.streamId`, because caller-managed streams may coordinate retries
|
|
1413
|
+
* outside the SDK.
|
|
1303
1414
|
*
|
|
1304
1415
|
* The server remains stateless across `stream.append` calls — there is
|
|
1305
1416
|
* no `streamId`-keyed dedup table. See docs/dev/commit-flow.md for the
|
|
@@ -1457,7 +1568,7 @@ interface BaseAddOp {
|
|
|
1457
1568
|
/**
|
|
1458
1569
|
* Assertion target wref. Presence of `about` makes the add an assertion unless `kind` overrides it.
|
|
1459
1570
|
*/
|
|
1460
|
-
readonly about?: string
|
|
1571
|
+
readonly about?: string;
|
|
1461
1572
|
/**
|
|
1462
1573
|
* Optional shape wref used by local validation.
|
|
1463
1574
|
*/
|
|
@@ -1486,8 +1597,7 @@ interface AddOp extends BaseAddOp {
|
|
|
1486
1597
|
readonly name: string;
|
|
1487
1598
|
}
|
|
1488
1599
|
/**
|
|
1489
|
-
* Builder collection add operation.
|
|
1490
|
-
* canonical auto-named collection from the supplied members.
|
|
1600
|
+
* Builder collection add operation. ADR 0004 requires an explicit name.
|
|
1491
1601
|
* @see https://docs.warmhub.ai/sdk-reference/interfaces/collectionaddop/
|
|
1492
1602
|
*/
|
|
1493
1603
|
interface CollectionAddOp {
|
|
@@ -1501,10 +1611,10 @@ interface CollectionAddOp {
|
|
|
1501
1611
|
*/
|
|
1502
1612
|
readonly kind?: 'collection';
|
|
1503
1613
|
/**
|
|
1504
|
-
*
|
|
1505
|
-
* collection
|
|
1614
|
+
* Explicit collection name. ADR 0004 treats collections as ordinary named
|
|
1615
|
+
* things, so collection adds cannot be nameless.
|
|
1506
1616
|
*/
|
|
1507
|
-
readonly name
|
|
1617
|
+
readonly name: string;
|
|
1508
1618
|
/**
|
|
1509
1619
|
* Collection type.
|
|
1510
1620
|
*/
|
|
@@ -1548,6 +1658,14 @@ interface ReviseOp {
|
|
|
1548
1658
|
* New shape-validated data payload.
|
|
1549
1659
|
*/
|
|
1550
1660
|
readonly data?: unknown;
|
|
1661
|
+
/**
|
|
1662
|
+
* Collection type. Required when `kind` is `collection`.
|
|
1663
|
+
*/
|
|
1664
|
+
readonly type?: CollectionAddType;
|
|
1665
|
+
/**
|
|
1666
|
+
* Collection member wrefs. Required when `kind` is `collection`.
|
|
1667
|
+
*/
|
|
1668
|
+
readonly members?: string[];
|
|
1551
1669
|
/**
|
|
1552
1670
|
* Optional optimistic-concurrency precondition. When supplied, the revise is
|
|
1553
1671
|
* applied only if the target is still at this version number. A stale value
|
|
@@ -1783,8 +1901,6 @@ declare class OperationBuilder {
|
|
|
1783
1901
|
private assertCanModify;
|
|
1784
1902
|
}
|
|
1785
1903
|
|
|
1786
|
-
/** @internal */
|
|
1787
|
-
type CollectionAbout = CollectionAbout$1;
|
|
1788
1904
|
/** @internal */
|
|
1789
1905
|
type CollectionTag = CollectionTag$1;
|
|
1790
1906
|
/** @internal */
|
|
@@ -1927,7 +2043,7 @@ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' |
|
|
|
1927
2043
|
* - `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
|
|
1928
2044
|
*
|
|
1929
2045
|
* Backend domain codes (e.g. `SHAPE_MISMATCH`, `WREF_UNRESOLVABLE`,
|
|
1930
|
-
* `
|
|
2046
|
+
* `ARCHIVED`, `INTERNAL_ERROR`) pass through unchanged on
|
|
1931
2047
|
* `code` / `kind`. Surface the `message` and `hint` verbatim and use the
|
|
1932
2048
|
* message to decide whether to retry — most pass-through codes are terminal,
|
|
1933
2049
|
* but the backend reuses some codes for transient failures (notably
|
|
@@ -1935,8 +2051,8 @@ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' |
|
|
|
1935
2051
|
* `please retry` message when DNS or HEAD probes flake). See the
|
|
1936
2052
|
* [HTTP error catalog](/http-api/overview/#response-format)
|
|
1937
2053
|
* for HTTP-status mapping and the most common backend codes (the catalog is
|
|
1938
|
-
* not exhaustive — rarer codes such as `
|
|
1939
|
-
*
|
|
2054
|
+
* not exhaustive — rarer codes such as `WREF_UNRESOLVABLE` are emitted by the
|
|
2055
|
+
* backend but not yet tabulated).
|
|
1940
2056
|
* @see https://docs.warmhub.ai/sdk-reference/type-aliases/errorkind/
|
|
1941
2057
|
*/
|
|
1942
2058
|
type ErrorKind = CoreErrorKind | (string & {});
|
|
@@ -2400,6 +2516,43 @@ type RepoListForCallerOptions = {
|
|
|
2400
2516
|
limit?: number;
|
|
2401
2517
|
sort?: 'recent' | 'name';
|
|
2402
2518
|
};
|
|
2519
|
+
/**
|
|
2520
|
+
* Options for the public "Explore" directory (`client.repo.explore`).
|
|
2521
|
+
*
|
|
2522
|
+
* Structural alias of the generated `RepoExploreInput` (sourced from the
|
|
2523
|
+
* backend `repoExploreInputSchema` via the backend-types pipeline), so it
|
|
2524
|
+
* can't drift from the procedure's input contract.
|
|
2525
|
+
*
|
|
2526
|
+
* Two mutually-exclusive modes: the browse mode
|
|
2527
|
+
* (`search`/`org`/`activity`/`hasSubscriptions`/`minThings`/`sort`/`limit`/`cursor`)
|
|
2528
|
+
* and the exact-match `slugs` batch lookup. `slugs` cannot be combined with any
|
|
2529
|
+
* browse/search/sort/filter field — the backend rejects the mix.
|
|
2530
|
+
*
|
|
2531
|
+
* @internal
|
|
2532
|
+
*/
|
|
2533
|
+
type RepoExploreOptions = RepoExploreInput;
|
|
2534
|
+
/**
|
|
2535
|
+
* A repository row in the public "Explore" directory
|
|
2536
|
+
* (`client.repo.explore`).
|
|
2537
|
+
*
|
|
2538
|
+
* Structural alias of the generated `RepoExploreItem` (sourced from the backend
|
|
2539
|
+
* `repoExploreItemSchema` via the backend-types pipeline), so it can't drift.
|
|
2540
|
+
*
|
|
2541
|
+
* @internal
|
|
2542
|
+
*/
|
|
2543
|
+
type RepoExploreItem = RepoExploreItem$1;
|
|
2544
|
+
/**
|
|
2545
|
+
* Result of the public "Explore" directory (`client.repo.explore`).
|
|
2546
|
+
*
|
|
2547
|
+
* `total` and `orgs` are first-page only (present when `cursor` is absent).
|
|
2548
|
+
*
|
|
2549
|
+
* Structural alias of the generated `RepoExploreResult` (sourced from the
|
|
2550
|
+
* backend `repoExploreResultSchema` via the backend-types pipeline), so it
|
|
2551
|
+
* can't drift.
|
|
2552
|
+
*
|
|
2553
|
+
* @internal
|
|
2554
|
+
*/
|
|
2555
|
+
type RepoExploreResult = RepoExploreResult$1;
|
|
2403
2556
|
/** @internal */
|
|
2404
2557
|
type CurrentUserInfo = {
|
|
2405
2558
|
id: string;
|
|
@@ -2500,6 +2653,20 @@ type ThingMetadata = {
|
|
|
2500
2653
|
revisedOn: number;
|
|
2501
2654
|
};
|
|
2502
2655
|
/** @internal */
|
|
2656
|
+
type CollectionReadDataMode = 'auto' | 'full';
|
|
2657
|
+
/** @internal */
|
|
2658
|
+
type CollectionReadSummary = {
|
|
2659
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
2660
|
+
memberField: 'first/second' | 'first/second/third' | 'members' | 'items';
|
|
2661
|
+
memberCount: number;
|
|
2662
|
+
dataMode: 'full' | 'summary';
|
|
2663
|
+
fullData: boolean;
|
|
2664
|
+
truncated: boolean;
|
|
2665
|
+
inlineLimit?: number;
|
|
2666
|
+
preview?: string[];
|
|
2667
|
+
previewCount?: number;
|
|
2668
|
+
};
|
|
2669
|
+
/** @internal */
|
|
2503
2670
|
type ThingItem = {
|
|
2504
2671
|
wref: string;
|
|
2505
2672
|
name: string;
|
|
@@ -2565,6 +2732,7 @@ type ThingDetail = {
|
|
|
2565
2732
|
version: number;
|
|
2566
2733
|
active: boolean;
|
|
2567
2734
|
data?: unknown;
|
|
2735
|
+
collection?: CollectionReadSummary;
|
|
2568
2736
|
/** True on synthesized empty stubs from getReadme/getAgents when no row exists yet. */
|
|
2569
2737
|
synthesized?: boolean;
|
|
2570
2738
|
aboutWref?: string;
|
|
@@ -2712,6 +2880,7 @@ type ThingHistoryOptions = {
|
|
|
2712
2880
|
/** @internal */
|
|
2713
2881
|
type ThingGetOptions = {
|
|
2714
2882
|
includeRetracted?: boolean;
|
|
2883
|
+
dataMode?: CollectionReadDataMode;
|
|
2715
2884
|
};
|
|
2716
2885
|
/** @internal */
|
|
2717
2886
|
type ThingGraphOptions = {
|
|
@@ -2809,6 +2978,20 @@ type SearchResult = HeadResult;
|
|
|
2809
2978
|
/** @internal */
|
|
2810
2979
|
type RefsResult = RefsResult$1;
|
|
2811
2980
|
/** @internal */
|
|
2981
|
+
type CollectionType = CollectionType$1;
|
|
2982
|
+
/** @internal */
|
|
2983
|
+
type CollectionMember = CollectionMember$1;
|
|
2984
|
+
/** @internal */
|
|
2985
|
+
type CollectionMembersPage = CollectionMembersPage$1;
|
|
2986
|
+
/** @internal */
|
|
2987
|
+
type CollectionContainsResult = CollectionContainsResult$1;
|
|
2988
|
+
/** @internal */
|
|
2989
|
+
type CollectionDiffResult = CollectionDiffResult$1;
|
|
2990
|
+
/** @internal */
|
|
2991
|
+
type CollectionMutationResult = CollectionMutationResult$1;
|
|
2992
|
+
/** @internal */
|
|
2993
|
+
type CollectionStatsResult = CollectionStatsResult$1;
|
|
2994
|
+
/** @internal */
|
|
2812
2995
|
type ResolveWrefResult = ThingDetail;
|
|
2813
2996
|
/** @internal */
|
|
2814
2997
|
type ThingGetManyResult = ThingGetManyResult$1;
|
|
@@ -2917,6 +3100,8 @@ type SearchOptions = Omit<FilterOptions, 'where'> & {
|
|
|
2917
3100
|
about?: string;
|
|
2918
3101
|
/** Search mode: `text` (BM25), `vector` (semantic), or `hybrid` (combined). Defaults to `text`. */
|
|
2919
3102
|
mode?: 'text' | 'vector' | 'hybrid';
|
|
3103
|
+
/** Opt into deterministic literal name matching before ranked search. Intended for UI list filtering; defaults to ranked search. */
|
|
3104
|
+
nameMatch?: 'ranked' | 'deterministic';
|
|
2920
3105
|
/** Expand collection members in the result; pages may be sparse when set. */
|
|
2921
3106
|
resolveCollections?: boolean;
|
|
2922
3107
|
/** Exclude internal infrastructure shapes from results. */
|
|
@@ -2944,6 +3129,61 @@ type RefsOptions = {
|
|
|
2944
3129
|
cursor?: string;
|
|
2945
3130
|
};
|
|
2946
3131
|
/** @internal */
|
|
3132
|
+
type CollectionQuerySourceOptions = Pick<FilterOptions, 'shape' | 'kind' | 'about' | 'match' | 'componentRef' | 'excludeComponents' | 'where'>;
|
|
3133
|
+
type CollectionMemberSourceOptions = {
|
|
3134
|
+
members: string[];
|
|
3135
|
+
query?: CollectionQuerySourceOptions;
|
|
3136
|
+
sourceRepo?: never;
|
|
3137
|
+
} | {
|
|
3138
|
+
members?: never;
|
|
3139
|
+
query: CollectionQuerySourceOptions;
|
|
3140
|
+
sourceRepo: RepoLocator;
|
|
3141
|
+
} | {
|
|
3142
|
+
members?: string[];
|
|
3143
|
+
query: CollectionQuerySourceOptions;
|
|
3144
|
+
sourceRepo?: never;
|
|
3145
|
+
};
|
|
3146
|
+
/** @internal */
|
|
3147
|
+
type CollectionCreateOptions = {
|
|
3148
|
+
type: CollectionType;
|
|
3149
|
+
name: string;
|
|
3150
|
+
from?: string;
|
|
3151
|
+
add?: string[];
|
|
3152
|
+
remove?: string[];
|
|
3153
|
+
replaceMembers?: string[];
|
|
3154
|
+
skipExisting?: boolean;
|
|
3155
|
+
message?: string;
|
|
3156
|
+
committer?: string;
|
|
3157
|
+
} & CollectionMemberSourceOptions;
|
|
3158
|
+
/** @internal */
|
|
3159
|
+
type CollectionMembersOptions = {
|
|
3160
|
+
version?: number;
|
|
3161
|
+
limit?: number;
|
|
3162
|
+
cursor?: string;
|
|
3163
|
+
};
|
|
3164
|
+
/** @internal */
|
|
3165
|
+
type CollectionContainsOptions = {
|
|
3166
|
+
version?: number;
|
|
3167
|
+
position?: number;
|
|
3168
|
+
};
|
|
3169
|
+
/** @internal */
|
|
3170
|
+
type CollectionDiffOptions = {
|
|
3171
|
+
leftVersion?: number;
|
|
3172
|
+
rightVersion?: number;
|
|
3173
|
+
mode?: 'auto' | 'membership' | 'ordered';
|
|
3174
|
+
};
|
|
3175
|
+
/** @internal */
|
|
3176
|
+
type CollectionReviseOptions = {
|
|
3177
|
+
add?: string[];
|
|
3178
|
+
remove?: string[];
|
|
3179
|
+
message?: string;
|
|
3180
|
+
committer?: string;
|
|
3181
|
+
} & CollectionMemberSourceOptions;
|
|
3182
|
+
/** @internal */
|
|
3183
|
+
type CollectionStatsOptions = {
|
|
3184
|
+
version?: number;
|
|
3185
|
+
};
|
|
3186
|
+
/** @internal */
|
|
2947
3187
|
type PingResult = {
|
|
2948
3188
|
ok: boolean;
|
|
2949
3189
|
error?: string;
|
|
@@ -3614,6 +3854,30 @@ declare class WarmHubClient {
|
|
|
3614
3854
|
* the org-scoped `listPage` from token-authenticated contexts.
|
|
3615
3855
|
*/
|
|
3616
3856
|
listForCaller: (opts?: RepoListForCallerOptions) => Promise<RepoRecentInfo[]>;
|
|
3857
|
+
/**
|
|
3858
|
+
* Browse the public "Explore" directory: every `visibility='public'` live
|
|
3859
|
+
* repository across all orgs, with search, org/activity/subscription/thing
|
|
3860
|
+
* filters, and sort. No auth required — anonymous callers see the same
|
|
3861
|
+
* public-only listing.
|
|
3862
|
+
*
|
|
3863
|
+
* Two mutually-exclusive modes. Browse mode paginates a filtered, sorted
|
|
3864
|
+
* listing (`search`/`org`/`activity`/`hasSubscriptions`/`minThings`/`sort`/
|
|
3865
|
+
* `limit`/`cursor`). Slugs mode is an exact-match batch lookup: pass up to
|
|
3866
|
+
* 12 `org/repo` slugs to resolve just those live public repos in input
|
|
3867
|
+
* order, ignoring every browse field. Combining `slugs` with any browse/
|
|
3868
|
+
* search/sort/filter field is a hard input error, not a silently-filtered
|
|
3869
|
+
* list.
|
|
3870
|
+
*
|
|
3871
|
+
* `total` and `orgs` (the org-filter facet) are returned on the first page
|
|
3872
|
+
* only — i.e. when `cursor` is absent.
|
|
3873
|
+
*
|
|
3874
|
+
* Cursor contract: cursors are short-lived resume tokens for the same query
|
|
3875
|
+
* and result scope. If filters, visibility, or backing streams change, the
|
|
3876
|
+
* backend may reject a saved cursor with `VALIDATION_ERROR` / `Invalid
|
|
3877
|
+
* cursor`; restart the query without `cursor` instead of retrying the stale
|
|
3878
|
+
* token.
|
|
3879
|
+
*/
|
|
3880
|
+
explore: (opts?: RepoExploreOptions) => Promise<RepoExploreResult>;
|
|
3617
3881
|
/**
|
|
3618
3882
|
* Fetch a repository's `Content/Readme` markdown record.
|
|
3619
3883
|
*
|
|
@@ -3879,6 +4143,18 @@ declare class WarmHubClient {
|
|
|
3879
4143
|
*/
|
|
3880
4144
|
listNotifications: (orgName: string, repoName: string, opts?: ActionListNotificationsOptions) => Promise<ActionNotificationInfo[]>;
|
|
3881
4145
|
};
|
|
4146
|
+
readonly collection: {
|
|
4147
|
+
create: (orgName: string, repoName: string, opts: CollectionCreateOptions) => Promise<CollectionMutationResult>;
|
|
4148
|
+
members: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionMembersOptions) => Promise<CollectionMembersPage>;
|
|
4149
|
+
membersIter: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionMembersOptions) => AsyncIterableIterator<CollectionMember>;
|
|
4150
|
+
membersAll: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionMembersOptions & {
|
|
4151
|
+
max?: number;
|
|
4152
|
+
}) => Promise<CollectionMember[]>;
|
|
4153
|
+
contains: (orgName: string | undefined, repoName: string | undefined, wref: string, members: string[], opts?: CollectionContainsOptions) => Promise<CollectionContainsResult>;
|
|
4154
|
+
diff: (orgName: string | undefined, repoName: string | undefined, leftWref: string, rightWref: string, opts?: CollectionDiffOptions) => Promise<CollectionDiffResult>;
|
|
4155
|
+
revise: (orgName: string, repoName: string, wref: string, opts: CollectionReviseOptions) => Promise<CollectionMutationResult>;
|
|
4156
|
+
stats: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionStatsOptions) => Promise<CollectionStatsResult>;
|
|
4157
|
+
};
|
|
3882
4158
|
/**
|
|
3883
4159
|
* Read surface for things, assertions, histories, references, search, and in-place thing renames.
|
|
3884
4160
|
* @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#thing
|
|
@@ -3929,6 +4205,7 @@ declare class WarmHubClient {
|
|
|
3929
4205
|
*
|
|
3930
4206
|
* @param version Optional exact version to pin when the wref is not already version-qualified.
|
|
3931
4207
|
* @param opts.includeRetracted Include retracted records instead of treating them as missing.
|
|
4208
|
+
* @param opts.dataMode Defaults to `auto`; pass `full` to force full collection bodies.
|
|
3932
4209
|
*/
|
|
3933
4210
|
get: (orgName: string | undefined, repoName: string | undefined, wref: string, version?: number, opts?: ThingGetOptions) => Promise<ThingGet>;
|
|
3934
4211
|
/**
|
|
@@ -3979,6 +4256,7 @@ declare class WarmHubClient {
|
|
|
3979
4256
|
*/
|
|
3980
4257
|
getMany: (orgName: string | undefined, repoName: string | undefined, wrefs: string[], version?: number, opts?: {
|
|
3981
4258
|
includeRetracted?: boolean;
|
|
4259
|
+
dataMode?: CollectionReadDataMode;
|
|
3982
4260
|
chunkSize?: number;
|
|
3983
4261
|
chunkConcurrency?: number;
|
|
3984
4262
|
}) => Promise<ThingGetManyResult>;
|
|
@@ -4262,7 +4540,7 @@ declare class WarmHubClient {
|
|
|
4262
4540
|
/**
|
|
4263
4541
|
* Append one non-empty chunk of stream operations to a repository.
|
|
4264
4542
|
*
|
|
4265
|
-
* Most callers should prefer `commit.apply` or `OperationBuilder`. Use this low-level surface only when you already have stream operations
|
|
4543
|
+
* Most callers should prefer `commit.apply` or `OperationBuilder`. Use this low-level surface only when you already have backend-shaped stream operations and a caller-managed stream ID.
|
|
4266
4544
|
*/
|
|
4267
4545
|
append: (input: StreamAppendInput$1) => Promise<StreamAppendResult$1>;
|
|
4268
4546
|
};
|
|
@@ -4464,4 +4742,4 @@ declare class WarmHubClient {
|
|
|
4464
4742
|
private watchRepoQuery;
|
|
4465
4743
|
}
|
|
4466
4744
|
|
|
4467
|
-
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 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
|
|
4745
|
+
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 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 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 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 RepoExploreItem, type RepoExploreOptions, type RepoExploreResult, type RepoInfo, type RepoList, type RepoListForCallerOptions, type RepoListOptions, type RepoListPageOptions, type RepoListPageResult, type RepoLocator, type RepoRecentInfo, type RepoRef, type RepoShapeInstanceCountsView, type RepoSort, type RepoStatsBatchResult, type RepoStatsView, type RepoWithStatsInfo, type RequestEvent, type ResolveWrefResult, type RetractOp, type RetractOperation, type RetryPolicyOptions, type ReviseOp, type ReviseOperation, SDK_VERSION, type SearchOptions, type SearchResult, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeReviseOptions, type ShapeValidatorResult, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingDetail, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-
|
|
1
|
+
export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-2KN2JWJU.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WarmHubClient } from './chunk-
|
|
2
|
-
export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-
|
|
1
|
+
import { WarmHubClient } from './chunk-2KN2JWJU.js';
|
|
2
|
+
export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-2KN2JWJU.js';
|
|
3
3
|
import { createContext, useMemo, useState, useEffect, useContext } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|