@warmhub/sdk-ts 0.93.0 → 0.95.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
@@ -2469,6 +2469,207 @@ type StreamAppendResult$1 = {
2469
2469
  submissionId?: string;
2470
2470
  };
2471
2471
  };
2472
+ type StreamingSubmissionRow$1 = {
2473
+ opIndex: number;
2474
+ name: string;
2475
+ operation?: 'add' | 'revise' | 'retract' | 'reaffirm' | 'rename' | 'noop';
2476
+ version?: number;
2477
+ dataHash?: string;
2478
+ status?: 'success' | 'noop' | 'failed';
2479
+ error?: {
2480
+ code: string;
2481
+ message: string;
2482
+ details?: {
2483
+ reason: 'expected_version_mismatch';
2484
+ expectedVersion: number;
2485
+ currentVersion: number;
2486
+ } | {
2487
+ reason: 'lease_held';
2488
+ leaseExpiresAt: string;
2489
+ } | {
2490
+ reason: 'validation_failed';
2491
+ issues: Array<{
2492
+ path: string;
2493
+ message: string;
2494
+ }>;
2495
+ } | {
2496
+ reason: 'rate_limit_reset';
2497
+ retryAfterSeconds: number;
2498
+ resetAt: string;
2499
+ } | {
2500
+ reason: 'cursor_fence_unavailable';
2501
+ cause: 'not_ready' | 'below_floor' | 'above_head';
2502
+ retryFromStart: true;
2503
+ };
2504
+ };
2505
+ resolvedName?: string;
2506
+ retryable?: boolean;
2507
+ warnings?: {
2508
+ undeclaredFields?: Array<string>;
2509
+ undeclaredFieldsTruncated?: true;
2510
+ totalUndeclared?: number;
2511
+ coalescedWrefs?: Array<{
2512
+ fieldPath: string;
2513
+ wref: string;
2514
+ reason: string;
2515
+ }>;
2516
+ coalescedWrefsTruncated?: true;
2517
+ totalCoalescedWrefs?: number;
2518
+ deprecations?: Array<{
2519
+ shape: string;
2520
+ message: string;
2521
+ removalMilestone: string;
2522
+ }>;
2523
+ };
2524
+ affirmations?: {
2525
+ added: Array<string>;
2526
+ removed: Array<string>;
2527
+ ignored: Array<string>;
2528
+ };
2529
+ type: 'result';
2530
+ chunkOrdinal: number;
2531
+ submissionIndex: number;
2532
+ } | {
2533
+ opIndex: number;
2534
+ operation: 'add' | 'revise' | 'retract' | 'reaffirm' | 'rename';
2535
+ name: string;
2536
+ submittedName?: string;
2537
+ resolvedName?: string;
2538
+ warnings?: {
2539
+ undeclaredFields?: Array<string>;
2540
+ undeclaredFieldsTruncated?: true;
2541
+ totalUndeclared?: number;
2542
+ coalescedWrefs?: Array<{
2543
+ fieldPath: string;
2544
+ wref: string;
2545
+ reason: string;
2546
+ }>;
2547
+ coalescedWrefsTruncated?: true;
2548
+ totalCoalescedWrefs?: number;
2549
+ deprecations?: Array<{
2550
+ shape: string;
2551
+ message: string;
2552
+ removalMilestone: string;
2553
+ }>;
2554
+ };
2555
+ affirmations?: {
2556
+ added: Array<string>;
2557
+ removed: Array<string>;
2558
+ ignored: Array<string>;
2559
+ };
2560
+ status: 'applied' | 'noop';
2561
+ version?: number;
2562
+ dataHash?: string;
2563
+ type: 'result';
2564
+ chunkOrdinal: number;
2565
+ submissionIndex: number;
2566
+ } | {
2567
+ opIndex: number;
2568
+ operation: 'add' | 'revise' | 'retract' | 'reaffirm' | 'rename';
2569
+ name: string;
2570
+ submittedName?: string;
2571
+ resolvedName?: string;
2572
+ warnings?: {
2573
+ undeclaredFields?: Array<string>;
2574
+ undeclaredFieldsTruncated?: true;
2575
+ totalUndeclared?: number;
2576
+ coalescedWrefs?: Array<{
2577
+ fieldPath: string;
2578
+ wref: string;
2579
+ reason: string;
2580
+ }>;
2581
+ coalescedWrefsTruncated?: true;
2582
+ totalCoalescedWrefs?: number;
2583
+ deprecations?: Array<{
2584
+ shape: string;
2585
+ message: string;
2586
+ removalMilestone: string;
2587
+ }>;
2588
+ };
2589
+ affirmations?: {
2590
+ added: Array<string>;
2591
+ removed: Array<string>;
2592
+ ignored: Array<string>;
2593
+ };
2594
+ status: 'error';
2595
+ errors: Array<{
2596
+ code: string;
2597
+ message: string;
2598
+ path?: string;
2599
+ details?: {
2600
+ reason: 'expected_version_mismatch';
2601
+ expectedVersion: number;
2602
+ currentVersion: number;
2603
+ } | {
2604
+ reason: 'lease_held';
2605
+ leaseExpiresAt: string;
2606
+ } | {
2607
+ reason: 'validation_failed';
2608
+ issues: Array<{
2609
+ path: string;
2610
+ message: string;
2611
+ }>;
2612
+ } | {
2613
+ reason: 'rate_limit_reset';
2614
+ retryAfterSeconds: number;
2615
+ resetAt: string;
2616
+ } | {
2617
+ reason: 'cursor_fence_unavailable';
2618
+ cause: 'not_ready' | 'below_floor' | 'above_head';
2619
+ retryFromStart: true;
2620
+ } | {
2621
+ reason: 'dependency_failed';
2622
+ producerOpIndexes: Array<number>;
2623
+ };
2624
+ retryable?: boolean;
2625
+ }>;
2626
+ type: 'result';
2627
+ chunkOrdinal: number;
2628
+ submissionIndex: number;
2629
+ } | {
2630
+ type: 'group';
2631
+ chunkOrdinal: number;
2632
+ eventRequestId: string;
2633
+ requestDigest: string;
2634
+ outcome: 'event' | 'no_event';
2635
+ repoSeq?: number;
2636
+ operations: {
2637
+ applied: number;
2638
+ noop: number;
2639
+ failed: number;
2640
+ };
2641
+ manifestDigest: string;
2642
+ } | {
2643
+ type: 'summary';
2644
+ submissionId: string;
2645
+ streamId: string;
2646
+ groupSize: number;
2647
+ groups: number;
2648
+ operations: {
2649
+ applied: number;
2650
+ noop: number;
2651
+ failed: number;
2652
+ total: number;
2653
+ };
2654
+ repoSeq: {
2655
+ first: number | null;
2656
+ last: number | null;
2657
+ };
2658
+ verdict: string;
2659
+ durationMs: number;
2660
+ truncatedAt?: {
2661
+ lineNumber: number;
2662
+ message: string;
2663
+ };
2664
+ manifest: {
2665
+ groups: number;
2666
+ digest: string;
2667
+ };
2668
+ } | {
2669
+ type: 'error';
2670
+ code: string;
2671
+ message?: string;
2672
+ };
2472
2673
  type CommitApplyCompatibilityResult$1 = {
2473
2674
  event: {
2474
2675
  committedAt: string;
@@ -4753,6 +4954,7 @@ type ThingHeadVersionsResult$1 = {
4753
4954
  requested: number;
4754
4955
  items: Array<{
4755
4956
  wref: string;
4957
+ canonicalWref: string;
4756
4958
  durableId: string;
4757
4959
  version: number;
4758
4960
  active: boolean;
@@ -5310,7 +5512,33 @@ declare const ORG_SCOPED_EVENT_TYPES: readonly ["org.renamed", "org.member_added
5310
5512
  type OrgScopedEventType = (typeof ORG_SCOPED_EVENT_TYPES)[number];
5311
5513
 
5312
5514
  /**
5313
- * Validate a data payload against shape field definitions.
5515
+ * Warning details for input fields that no shape in the effective set declares.
5516
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/undeclaredfieldswarning/
5517
+ */
5518
+ type UndeclaredFieldsWarning = {
5519
+ undeclaredFields: string[];
5520
+ undeclaredFieldsTruncated?: true;
5521
+ totalUndeclared?: number;
5522
+ };
5523
+
5524
+ /**
5525
+ * Discriminated result returned when input is validated against shape fields.
5526
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/shapevalidatorresult/
5527
+ */
5528
+ type ShapeValidatorResult = {
5529
+ valid: true;
5530
+ warnings?: UndeclaredFieldsWarning;
5531
+ } | {
5532
+ valid: false;
5533
+ errors: string[];
5534
+ warnings?: UndeclaredFieldsWarning;
5535
+ };
5536
+ /**
5537
+ * Validate a data payload against a single shape's field definitions.
5538
+ *
5539
+ * A single shape is an effective set of one, so this is
5540
+ * {@link compileShapesValidator} with a one-element set — same checks, same
5541
+ * order, same messages.
5314
5542
  *
5315
5543
  * Shape field types:
5316
5544
  * - "number", "string", "boolean": primitive types
@@ -5346,27 +5574,6 @@ type OrgScopedEventType = (typeof ORG_SCOPED_EVENT_TYPES)[number];
5346
5574
  * @see https://docs.warmhub.ai/sdk-reference/functions/validateagainstshape/
5347
5575
  */
5348
5576
  declare function validateAgainstShape(data: Record<string, unknown>, shapeFields: Record<string, unknown>): ShapeValidatorResult;
5349
- /**
5350
- * Warning details for input fields that the shape does not declare.
5351
- * @see https://docs.warmhub.ai/sdk-reference/type-aliases/undeclaredfieldswarning/
5352
- */
5353
- type UndeclaredFieldsWarning = {
5354
- undeclaredFields: string[];
5355
- undeclaredFieldsTruncated?: true;
5356
- totalUndeclared?: number;
5357
- };
5358
- /**
5359
- * Discriminated result returned when input is validated against shape fields.
5360
- * @see https://docs.warmhub.ai/sdk-reference/type-aliases/shapevalidatorresult/
5361
- */
5362
- type ShapeValidatorResult = {
5363
- valid: true;
5364
- warnings?: UndeclaredFieldsWarning;
5365
- } | {
5366
- valid: false;
5367
- errors: string[];
5368
- warnings?: UndeclaredFieldsWarning;
5369
- };
5370
5577
 
5371
5578
  /**
5372
5579
  * Hardcoded meta-schema for validating shape definitions.
@@ -5723,12 +5930,13 @@ declare function commitValidateRequestBodyBytes(input: CommitValidateInput): num
5723
5930
  /**
5724
5931
  * Operations to submit, in order.
5725
5932
  *
5726
- * An array is normalized and preflighted as a whole before the first append.
5727
- * A sync or async iterable is consumed one chunk at a time, so a producer of
5728
- * unbounded length never has to be materialized — at the cost of per-chunk
5729
- * rather than whole-submission validation.
5933
+ * Aggregate `commit.apply` normalizes and preflights an array as a whole before
5934
+ * its first append; iterable input is validated one chunk at a time. The
5935
+ * full-duplex `commit.applyStreaming` path validates every source incrementally,
5936
+ * including arrays, because committed response groups may arrive while later
5937
+ * input is still being produced.
5730
5938
  *
5731
- * @internal
5939
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/operationsource/
5732
5940
  */
5733
5941
  type OperationSource = readonly Operation[] | Iterable<Operation> | AsyncIterable<Operation>;
5734
5942
  /**
@@ -6019,6 +6227,62 @@ declare function countStreamAppendResultStatuses(results: StreamAppendResult$1['
6019
6227
  */
6020
6228
  declare function isDefiniteStreamAppendRejection(cause: unknown): boolean;
6021
6229
 
6230
+ /**
6231
+ * Durable caller-controlled identity needed to reconstruct a submission.
6232
+ * @see https://docs.warmhub.ai/sdk-reference/interfaces/streamingsubmissionretryidentity/
6233
+ */
6234
+ interface StreamingSubmissionRetryIdentity {
6235
+ readonly orgName: string;
6236
+ readonly repoName: string;
6237
+ readonly streamId: string;
6238
+ readonly submissionId: string;
6239
+ readonly groupSize: number;
6240
+ readonly message?: string;
6241
+ readonly committer?: string;
6242
+ }
6243
+ /**
6244
+ * One operation, group receipt, summary, or terminal error from the wire.
6245
+ * @see https://docs.warmhub.ai/sdk-reference/type-aliases/streamingsubmissionrow/
6246
+ */
6247
+ type StreamingSubmissionRow = StreamingSubmissionRow$1;
6248
+ /**
6249
+ * A lazy, single-use streaming submission.
6250
+ *
6251
+ * The retry identity is available synchronously, before authentication,
6252
+ * source acquisition, or network dispatch begins.
6253
+ * @see https://docs.warmhub.ai/sdk-reference/interfaces/streamingsubmissionhandle/
6254
+ */
6255
+ interface StreamingSubmissionHandle extends AsyncIterableIterator<StreamingSubmissionRow> {
6256
+ readonly retryIdentity: StreamingSubmissionRetryIdentity;
6257
+ }
6258
+ /**
6259
+ * Options for `client.commit.applyStreaming`.
6260
+ * @see https://docs.warmhub.ai/sdk-reference/interfaces/streamingsubmissionoptions/
6261
+ */
6262
+ interface StreamingSubmissionOptions {
6263
+ committer?: string;
6264
+ groupSize?: number;
6265
+ signal?: AbortSignal;
6266
+ streamId: string;
6267
+ submissionId?: string;
6268
+ }
6269
+ /**
6270
+ * A transport or protocol failure after request dispatch.
6271
+ *
6272
+ * The server may already have committed one or more groups. Generic retry is
6273
+ * deliberately disabled: reconstruct the original operation source and retry
6274
+ * only with this exact identity.
6275
+ * @see https://docs.warmhub.ai/sdk-reference/classes/streamingsubmissionoutcomeunknownerror/
6276
+ */
6277
+ declare class StreamingSubmissionOutcomeUnknownError extends Error {
6278
+ readonly code = "STREAMING_SUBMISSION_OUTCOME_UNKNOWN";
6279
+ readonly outcome = "unknown";
6280
+ readonly retryable = false;
6281
+ readonly retryIdentity: StreamingSubmissionRetryIdentity;
6282
+ readonly cause: unknown;
6283
+ constructor(retryIdentity: StreamingSubmissionRetryIdentity, cause: unknown);
6284
+ }
6285
+
6022
6286
  /**
6023
6287
  * Server-side verifier for component CLI dispatch calls.
6024
6288
  *
@@ -7485,8 +7749,23 @@ type ThingDetail = {
7485
7749
  pinnedWref?: string;
7486
7750
  name: string;
7487
7751
  kind: string;
7752
+ /**
7753
+ * @deprecated Legacy alias of `shapeName` from the pre-Postgres API
7754
+ * layering — the two are identical for every thing. Read `shapeName`
7755
+ * instead. This field is retired together with the other single-shape read
7756
+ * fields when the multi-shape read arrays land (the multi-shape program's
7757
+ * write-format change).
7758
+ */
7488
7759
  shape?: string;
7760
+ /** Canonical unversioned shape name (e.g. `"Game"`). */
7489
7761
  shapeName?: string;
7762
+ /**
7763
+ * Version-pinned shape wref (e.g. `"Game@v3"`). Naming caveat: despite the
7764
+ * name, this is synthesized from the shape's *current* version at read
7765
+ * time — exact validation provenance is not stored today. The multi-shape
7766
+ * program's certificate records restore captured provenance, after which
7767
+ * this is served from the certificate rather than synthesized.
7768
+ */
7490
7769
  validatedShape?: string;
7491
7770
  version: number;
7492
7771
  active: boolean;
@@ -8465,7 +8744,7 @@ declare class WarmHubClient {
8465
8744
  * When omitted, the SDK mints one before the first network request.
8466
8745
  * @param opts.retry Retry policy for transient first-chunk failures, or `false` to disable automatic retry.
8467
8746
  */
8468
- apply: (orgName: string, repoName: string, message: string | undefined, operations: Operation[], opts?: {
8747
+ apply: (orgName: string, repoName: string, message: string | undefined, operations: OperationSource, opts?: {
8469
8748
  committer?: string;
8470
8749
  componentRef?: string;
8471
8750
  chunkSize?: number;
@@ -8475,6 +8754,15 @@ declare class WarmHubClient {
8475
8754
  returnRepoSeq?: boolean;
8476
8755
  retry?: RetryPolicyOptions | false;
8477
8756
  }) => Promise<OperationSubmitResult>;
8757
+ /**
8758
+ * Submit operations over one full-duplex NDJSON request and consume result
8759
+ * rows as groups commit.
8760
+ *
8761
+ * The returned handle is synchronous and lazy. Its retry identity is
8762
+ * available immediately; authentication, source acquisition, and request
8763
+ * dispatch begin only with the first `next()`.
8764
+ */
8765
+ applyStreaming: (orgName: string, repoName: string, message: string | undefined, operations: OperationSource, opts: StreamingSubmissionOptions) => StreamingSubmissionHandle;
8478
8766
  /** Recover one immutable write receipt after an ambiguous response. */
8479
8767
  getReceipt: (orgName: string, repoName: string, eventRequestId: string) => Promise<OperationEventReceipt>;
8480
8768
  };
@@ -9967,8 +10255,12 @@ declare class WarmHubClient {
9967
10255
  private applyClientHeader;
9968
10256
  private fetchWithAuth;
9969
10257
  private requestResponse;
10258
+ /** Prepare one authenticated streaming request without acquiring its body. */
10259
+ private prepareStreamingSubmissionRequest;
10260
+ /** Convert an explicit non-2xx REST response through the standard mapping. */
10261
+ private httpResponseError;
9970
10262
  private requestJson;
9971
10263
  private watchRepoQuery;
9972
10264
  }
9973
10265
 
9974
- export { type AboutOptions, type AboutResult, type AccessResolveInput, type AccessResolveResult, type AccessTokenProvider, type ActionAttemptInfo, type ActionDeliveryTarget, type ActionLeaseAcquire, type ActionLeaseOp, type ActionListNotificationsOptions, type ActionListRunsOptions, type ActionLiveFeed, type ActionLiveFeedItem, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddOp, type AddOperation, AllStreamOperationsFailedError, type Assertion, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionAddOp, type CollectionAddType, type CollectionContainsOptions, type CollectionContainsResult, type CollectionCreateOptions, type CollectionDiffOptions, type CollectionDiffResult, type CollectionMember, type CollectionMembersOptions, type CollectionMembersPage, type CollectionMembershipRole, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type CommitApplyCompatibilityResult, type CommitDiagnostic, type CommitRealOperationResult, type CommitValidateInput, type CommitValidateOptions, type CommitValidateResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentList, type ComponentListOptions, type ComponentUninstallOptions, type ComponentUninstallResult, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, type ErrorKind, type FilterOptions, type FilterResult, type FunctionLogMode, type GlobalSearchOptions, type GlobalSearchResult, type GlobalSearchResultItem, type Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRecipientSelector, type GrantRevokeResult, type HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_COMMIT_VALIDATION_ENCODED_BYTES, MAX_COMMIT_VALIDATION_OPERATIONS, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, ORG_AUTH_SCOPES, type Operation, OperationBuilder, type OperationBuilderAddInput, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationEventReceipt, type OperationEventReceiptV1, type OperationSource, type OperationSubmitResult, type OrgAccessResult, type OrgAuthScope, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, REPO_AUTH_SCOPES, type ReaffirmOperation, type RefLink, type RefsOptions, type RefsResult, type RenameOperation, type RenameOptions, type RenameResult, type RepoAccessResult, type RepoAuthScope, type RepoConfigureStatsView, type RepoDescribeResult, type RepoExploreBrowseOptions, type RepoExploreItem, type RepoExploreOptions, type RepoExploreResult, type RepoInfo, type RepoLicense, type RepoList, type RepoListForCallerOptions, type RepoListOptions, type RepoListPageOptions, type RepoListPageResult, type RepoLocator, type RepoRecentInfo, type RepoRef, type RepoShapeInstanceCountsView, type RepoSort, type RepoStatsBatchResult, type RepoStatsView, type RepoWithStatsInfo, type RepositoryCheckpointAccess, type RepositoryCheckpointStatus, type RequestEvent, type ResolveWrefResult, type RetractOp, type RetractOperation, type RetryPolicyOptions, type ReviseOp, type ReviseOperation, SDK_VERSION, type SearchOptions, type SearchResult, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeRemoveOptions, type ShapeReviseOptions, type ShapeValidatorResult, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, StreamSubmissionAggregator, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingChanges, type ThingDetail, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadChangesOptions, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type ThingQueryChangesOptions, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, type ViewEvaluateOptions, type ViewEvaluateResult, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, commitValidateRequestBodyBytes, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createCommitValidateInput, createOperationEventRequestId, createOperationEventSubmissionId, encodeCommitValidateRequestBody, isConnectionError, isDefiniteStreamAppendRejection, isKnownOrgAuthScope, isKnownRepoAuthScope, isRetryable, isWarmHubError, normalizeWref, operationEventStreamRequestId, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
10266
+ export { type AboutOptions, type AboutResult, type AccessResolveInput, type AccessResolveResult, type AccessTokenProvider, type ActionAttemptInfo, type ActionDeliveryTarget, type ActionLeaseAcquire, type ActionLeaseOp, type ActionListNotificationsOptions, type ActionListRunsOptions, type ActionLiveFeed, type ActionLiveFeedItem, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddOp, type AddOperation, AllStreamOperationsFailedError, type Assertion, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionAddOp, type CollectionAddType, type CollectionContainsOptions, type CollectionContainsResult, type CollectionCreateOptions, type CollectionDiffOptions, type CollectionDiffResult, type CollectionMember, type CollectionMembersOptions, type CollectionMembersPage, type CollectionMembershipRole, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type CommitApplyCompatibilityResult, type CommitDiagnostic, type CommitRealOperationResult, type CommitValidateInput, type CommitValidateOptions, type CommitValidateResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentList, type ComponentListOptions, type ComponentUninstallOptions, type ComponentUninstallResult, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, type ErrorKind, type FilterOptions, type FilterResult, type FunctionLogMode, type GlobalSearchOptions, type GlobalSearchResult, type GlobalSearchResultItem, type Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRecipientSelector, type GrantRevokeResult, type HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_COMMIT_VALIDATION_ENCODED_BYTES, MAX_COMMIT_VALIDATION_OPERATIONS, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, ORG_AUTH_SCOPES, type Operation, OperationBuilder, type OperationBuilderAddInput, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationEventReceipt, type OperationEventReceiptV1, type OperationSource, type OperationSubmitResult, type OrgAccessResult, type OrgAuthScope, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, REPO_AUTH_SCOPES, type ReaffirmOperation, type RefLink, type RefsOptions, type RefsResult, type RenameOperation, type RenameOptions, type RenameResult, type RepoAccessResult, type RepoAuthScope, type RepoConfigureStatsView, type RepoDescribeResult, type RepoExploreBrowseOptions, type RepoExploreItem, type RepoExploreOptions, type RepoExploreResult, type RepoInfo, type RepoLicense, type RepoList, type RepoListForCallerOptions, type RepoListOptions, type RepoListPageOptions, type RepoListPageResult, type RepoLocator, type RepoRecentInfo, type RepoRef, type RepoShapeInstanceCountsView, type RepoSort, type RepoStatsBatchResult, type RepoStatsView, type RepoWithStatsInfo, type RepositoryCheckpointAccess, type RepositoryCheckpointStatus, type RequestEvent, type ResolveWrefResult, type RetractOp, type RetractOperation, type RetryPolicyOptions, type ReviseOp, type ReviseOperation, SDK_VERSION, type SearchOptions, type SearchResult, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeRemoveOptions, type ShapeReviseOptions, type ShapeValidatorResult, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, StreamSubmissionAggregator, type StreamingSubmissionHandle, type StreamingSubmissionOptions, StreamingSubmissionOutcomeUnknownError, type StreamingSubmissionRetryIdentity, type StreamingSubmissionRow, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingChanges, type ThingDetail, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadChangesOptions, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type ThingQueryChangesOptions, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, type ViewEvaluateOptions, type ViewEvaluateResult, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, commitValidateRequestBodyBytes, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createCommitValidateInput, createOperationEventRequestId, createOperationEventSubmissionId, encodeCommitValidateRequestBody, isConnectionError, isDefiniteStreamAppendRejection, isKnownOrgAuthScope, isKnownRepoAuthScope, isRetryable, isWarmHubError, normalizeWref, operationEventStreamRequestId, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{m as AllStreamOperationsFailedError,s as CliCallVerificationError,w as DEFAULT_API_URL,j as DEFAULT_STREAM_CHUNK_SIZE,b as MAX_COMMIT_VALIDATION_ENCODED_BYTES,a as MAX_COMMIT_VALIDATION_OPERATIONS,k as MAX_STREAM_APPEND_OPERATION_COUNT,u as OperationBuilder,l as PartialStreamSubmissionError,r as SDK_VERSION,f as StreamSubmissionAggregator,G as WarmHubClient,z as WarmHubError,e as commitValidateRequestBodyBytes,E as connectionErrorMessage,o as countStreamAppendResultStatuses,c as createCommitValidateInput,h as createOperationEventRequestId,g as createOperationEventSubmissionId,d as encodeCommitValidateRequestBody,D as isConnectionError,p as isDefiniteStreamAppendRejection,C as isRetryable,B as isWarmHubError,v as normalizeWref,i as operationEventStreamRequestId,x as resolveFunctionLogMode,y as sanitizeErrorMessage,F as sdkVersionIsBelowMinimum,n as streamAppendResultStatus,q as submitOperationsViaStream,A as toWarmHubError,t as verifyCliCall}from'./chunk-CJGZJYNN.js';export{m as CLI_INSTALL_REPO_HEADER,n as CLI_SIGNATURE_HEADER,o as CLI_TIMESTAMP_HEADER,w as CONTENT_FIELD_LIMIT_ERROR,v as MAX_CONTENT_FIELD_BYTES,y as ORG_AUTH_SCOPES,r as REPO_AUTH_SCOPES,x as contentFieldLimitError,z as isKnownOrgAuthScope,s as isKnownRepoAuthScope,M as validateAgainstShape}from'./chunk-CC45V5YE.js';//# sourceMappingURL=index.js.map
1
+ export{m as AllStreamOperationsFailedError,t as CliCallVerificationError,x as DEFAULT_API_URL,j as DEFAULT_STREAM_CHUNK_SIZE,b as MAX_COMMIT_VALIDATION_ENCODED_BYTES,a as MAX_COMMIT_VALIDATION_OPERATIONS,k as MAX_STREAM_APPEND_OPERATION_COUNT,v as OperationBuilder,l as PartialStreamSubmissionError,s as SDK_VERSION,f as StreamSubmissionAggregator,r as StreamingSubmissionOutcomeUnknownError,H as WarmHubClient,A as WarmHubError,e as commitValidateRequestBodyBytes,F as connectionErrorMessage,o as countStreamAppendResultStatuses,c as createCommitValidateInput,h as createOperationEventRequestId,g as createOperationEventSubmissionId,d as encodeCommitValidateRequestBody,E as isConnectionError,p as isDefiniteStreamAppendRejection,D as isRetryable,C as isWarmHubError,w as normalizeWref,i as operationEventStreamRequestId,y as resolveFunctionLogMode,z as sanitizeErrorMessage,G as sdkVersionIsBelowMinimum,n as streamAppendResultStatus,q as submitOperationsViaStream,B as toWarmHubError,u as verifyCliCall}from'./chunk-WPHO2D6B.js';export{n as CLI_INSTALL_REPO_HEADER,o as CLI_SIGNATURE_HEADER,p as CLI_TIMESTAMP_HEADER,x as CONTENT_FIELD_LIMIT_ERROR,w as MAX_CONTENT_FIELD_BYTES,z as ORG_AUTH_SCOPES,s as REPO_AUTH_SCOPES,y as contentFieldLimitError,A as isKnownOrgAuthScope,t as isKnownRepoAuthScope,P as validateAgainstShape}from'./chunk-6VZ76RF7.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/react.js CHANGED
@@ -1,2 +1,2 @@
1
- import {G}from'./chunk-CJGZJYNN.js';export{w as DEFAULT_API_URL,r as SDK_VERSION,G as WarmHubClient,z as WarmHubError,A as toWarmHubError}from'./chunk-CJGZJYNN.js';import'./chunk-CC45V5YE.js';import {createContext,useMemo,useState,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var b=createContext(null),p=createContext({isAuthenticated:false,isLoading:true});function P({apiUrl:e,children:t,auth:i,client:o}){let r=o?.name,n=o?.version,s=useMemo(()=>new G({apiUrl:e,accessToken:async()=>await i.getAccessToken()??void 0,client:{name:r,version:n}}),[e,i.getAccessToken,r,n]);return jsx(b.Provider,{value:s,children:jsx(g,{auth:i,client:s,children:t})})}function g({auth:e,client:t,children:i}){let[o,r]=useState(null),n=e.isAuthenticated&&o===t;useEffect(()=>{if(!e.isAuthenticated){r(null);return}let u=false;return t.auth.sync().then(()=>{u||r(t);}).catch(f=>{console.error("auth.sync failed:",f),u||r(t);}),()=>{u=true;}},[e.isAuthenticated,t]);let s=useMemo(()=>({isAuthenticated:e.isAuthenticated&&n,isLoading:e.isLoading||e.isAuthenticated&&!n}),[e.isAuthenticated,e.isLoading,n]);return e.isLoading||e.isAuthenticated&&!n?null:jsx(p.Provider,{value:s,children:i})}function v(){let e=useContext(b);if(!e)throw new Error("useWarmHubClient must be used within a WarmHubProvider");return e}function S(){return useContext(p)}export{P as WarmHubProvider,S as useWarmHubAuth,v as useWarmHubClient};//# sourceMappingURL=react.js.map
1
+ import {H}from'./chunk-WPHO2D6B.js';export{x as DEFAULT_API_URL,s as SDK_VERSION,H as WarmHubClient,A as WarmHubError,B as toWarmHubError}from'./chunk-WPHO2D6B.js';import'./chunk-6VZ76RF7.js';import {createContext,useMemo,useState,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var b=createContext(null),p=createContext({isAuthenticated:false,isLoading:true});function P({apiUrl:e,children:t,auth:i,client:o}){let r=o?.name,n=o?.version,s=useMemo(()=>new H({apiUrl:e,accessToken:async()=>await i.getAccessToken()??void 0,client:{name:r,version:n}}),[e,i.getAccessToken,r,n]);return jsx(b.Provider,{value:s,children:jsx(g,{auth:i,client:s,children:t})})}function g({auth:e,client:t,children:i}){let[o,r]=useState(null),n=e.isAuthenticated&&o===t;useEffect(()=>{if(!e.isAuthenticated){r(null);return}let u=false;return t.auth.sync().then(()=>{u||r(t);}).catch(f=>{console.error("auth.sync failed:",f),u||r(t);}),()=>{u=true;}},[e.isAuthenticated,t]);let s=useMemo(()=>({isAuthenticated:e.isAuthenticated&&n,isLoading:e.isLoading||e.isAuthenticated&&!n}),[e.isAuthenticated,e.isLoading,n]);return e.isLoading||e.isAuthenticated&&!n?null:jsx(p.Provider,{value:s,children:i})}function v(){let e=useContext(b);if(!e)throw new Error("useWarmHubClient must be used within a WarmHubProvider");return e}function S(){return useContext(p)}export{P as WarmHubProvider,S as useWarmHubAuth,v as useWarmHubClient};//# sourceMappingURL=react.js.map
2
2
  //# sourceMappingURL=react.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/sdk-ts",
3
- "version": "0.93.0",
3
+ "version": "0.95.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -22,6 +22,11 @@
22
22
  "url": "https://warmhub.ai"
23
23
  },
24
24
  "homepage": "https://docs.warmhub.ai/get-started/quickstart/#connect-via-sdk",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/warmhub/warmhub-app.git",
28
+ "directory": "packages/sdk-ts"
29
+ },
25
30
  "bugs": {
26
31
  "email": "support@warmhub.ai"
27
32
  },
@@ -37,7 +42,8 @@
37
42
  ],
38
43
  "publishConfig": {
39
44
  "registry": "https://registry.npmjs.org",
40
- "access": "public"
45
+ "access": "public",
46
+ "tag": "latest"
41
47
  },
42
48
  "exports": {
43
49
  ".": {
@@ -55,7 +61,7 @@
55
61
  },
56
62
  "scripts": {
57
63
  "build": "if [ \"${WARMHUB_TEST_RUNTIME_BUILD:-}\" = \"1\" ]; then bun run build:test-runtime; else bun run build:full; fi",
58
- "build:full": "tsc --noEmit && bun run build:runtime && bun run build:types && bun run scripts/inject-doc-links.ts",
64
+ "build:full": "bun run build:runtime && bun run build:types && bun run scripts/inject-doc-links.ts",
59
65
  "build:runtime": "tsup",
60
66
  "build:types": "NODE_OPTIONS=--max-old-space-size=4096 tsup --config tsup.dts-core.config.ts && NODE_OPTIONS=--max-old-space-size=4096 tsup --config tsup.dts-checkpoint.config.ts",
61
67
  "build:test-runtime": "tsup --config tsup.test-runtime.config.ts",