@tinycloud/sdk-services 3.1.0-beta.9 → 3.1.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.cts CHANGED
@@ -1521,9 +1521,51 @@ interface SubscribeOptions {
1521
1521
  }
1522
1522
  interface HooksServiceConfig extends Record<string, unknown> {
1523
1523
  host?: string;
1524
+ /** Shared-stream retry tuning; see {@link HookStreamRetryConfig}. */
1525
+ streamRetry?: HookStreamRetryConfig;
1526
+ }
1527
+ /**
1528
+ * Retry policy for the shared `/hooks/events` stream. When the stream fails
1529
+ * (network error, 5xx, or an expired/rotated ticket rejected with 401/403)
1530
+ * it is re-opened with exponential backoff: `HOOK_STREAM_RETRY_BASE_DELAY_MS`
1531
+ * (~250 ms) doubling to `HOOK_STREAM_RETRY_MAX_DELAY_MS` (~30 s) with jitter.
1532
+ * The retry streak resets after an event is received or a stream remains open
1533
+ * for at least 5 seconds. Retries stop when no subscribers remain, when the
1534
+ * service is aborted, or when minting the hook ticket is refused (the iterator
1535
+ * throws that typed error instead).
1536
+ */
1537
+ interface HookStreamRetryConfig {
1538
+ /**
1539
+ * Delay before retry attempt `attempt` (1-based). Defaults to the jittered
1540
+ * exponential backoff described above. Must return milliseconds.
1541
+ */
1542
+ delay?: (attempt: number) => number;
1543
+ /**
1544
+ * How a retry delay is awaited — the injectable clock. `delayMs` is the
1545
+ * resolved delay for `attempt`; `signal` aborts the wait early when the
1546
+ * subscription set changes or the service stops. Rejecting or throwing is
1547
+ * treated like a completed wait. After a custom wait returns — whether it
1548
+ * fulfilled, rejected or threw — the service still yields one event-loop
1549
+ * turn so a persistently failing stream can never starve the process.
1550
+ * Defaults to an abortable, unref'd `setTimeout`.
1551
+ */
1552
+ wait?: (delayMs: number, attempt: number, signal: AbortSignal) => Promise<void>;
1524
1553
  }
1525
1554
 
1526
1555
  interface IHooksService {
1556
+ /**
1557
+ * Stream hook events until `options.signal` aborts, the SDK signs out or
1558
+ * the session ends, or the consumer stops iterating. Transient stream
1559
+ * failures — network errors, 5xx, and an expired or rotated ticket rejected
1560
+ * by `/hooks/events` (401/403) — are retried internally with backoff and
1561
+ * never reach the iterator.
1562
+ *
1563
+ * The iterator throws when minting the hook ticket is refused. The thrown
1564
+ * plain `ServiceError` carries `meta.status` with the refusing HTTP status,
1565
+ * so `for await` consumers can branch on it. Stream diagnostics contain only
1566
+ * SDK allow-listed identifiers; foreign error messages and causes are not
1567
+ * copied.
1568
+ */
1527
1569
  subscribe(subscriptions: HookSubscription[], options?: SubscribeOptions): AsyncIterable<HookEvent>;
1528
1570
  register(webhook: HookWebhookRegistration): Promise<Result<HookWebhookRecord>>;
1529
1571
  list(options?: HookWebhookListOptions): Promise<Result<HookWebhookRecord[]>>;
@@ -1534,10 +1576,13 @@ declare class HooksService extends BaseService implements IHooksService {
1534
1576
  static readonly serviceName = "hooks";
1535
1577
  protected _config: HooksServiceConfig;
1536
1578
  private readonly _subscribers;
1537
- private _sharedStreamTask?;
1538
- private _sharedStreamAbort?;
1539
- private _refreshChain;
1540
- private _activeSignature;
1579
+ /** True while the one supervisor loop runs. Set only by wake(), cleared only at loop exit. */
1580
+ private _supervising;
1581
+ /** The supervisor's current step, interruptible by wake(). */
1582
+ private _phase?;
1583
+ /** Bumped on every session change; part of the plan key. */
1584
+ private _sessionGeneration;
1585
+ private _lastContextSignal?;
1541
1586
  constructor(config?: HooksServiceConfig);
1542
1587
  get config(): HooksServiceConfig;
1543
1588
  private get host();
@@ -1545,14 +1590,60 @@ declare class HooksService extends BaseService implements IHooksService {
1545
1590
  register(webhook: HookWebhookRegistration): Promise<Result<HookWebhookRecord>>;
1546
1591
  list(options?: HookWebhookListOptions): Promise<Result<HookWebhookRecord[]>>;
1547
1592
  unregister(id: string, options?: HookWebhookUnregisterOptions): Promise<Result<void>>;
1548
- private scheduleSharedStreamRefresh;
1549
- private refreshSharedStream;
1550
- private collectSharedStreamState;
1551
- private runSharedStream;
1552
- private abortSharedStream;
1593
+ /**
1594
+ * Called after anything that may change what the supervisor should do:
1595
+ * subscribe, unsubscribe, session change, sign-out. Interrupts the running
1596
+ * step if the plan moved away from it, and starts the supervisor if none
1597
+ * runs. Touches only SDK-owned state, so it never throws into callers such
1598
+ * as `ServiceContext.setSession`.
1599
+ */
1600
+ private wake;
1601
+ /**
1602
+ * The only owner of the shared stream. Each iteration is one attempt
1603
+ * (mint → open → drain), then a classification and, unless the attempt was
1604
+ * superseded or released its subscribers, a backoff. Every await is a
1605
+ * `phase` that wake() can interrupt; an interrupted phase yields
1606
+ * `undefined`, so a superseded mint can never act. Outside `attempt` and
1607
+ * `pause`, which each own one catch, the loop touches only SDK state.
1608
+ */
1609
+ private supervise;
1610
+ /**
1611
+ * Run one step under an interrupt that wake() fires when the plan key moves
1612
+ * on. An interrupted step's result is discarded. The interrupt is also
1613
+ * fired when the step returns, which releases whatever it left open: the
1614
+ * request signal and its listeners, an unread response body, a timer.
1615
+ */
1616
+ private phase;
1617
+ /**
1618
+ * One mint → open → drain. The single catch site for everything the
1619
+ * attempt touches that the SDK does not own: context accessors, invoke,
1620
+ * fetch, response bodies, the SSE parser. Never rejects.
1621
+ */
1622
+ private attempt;
1623
+ /**
1624
+ * Back off before the next attempt. `config.streamRetry` overrides the
1625
+ * delay and the clock; whatever they do, the pause ends by the delay or the
1626
+ * interrupt, then yields one timer turn so an instant clock cannot starve
1627
+ * due timers or the process.
1628
+ */
1629
+ private pause;
1630
+ /** The stream the current subscribers need, or undefined when none remain. */
1631
+ private plan;
1632
+ private dispatch;
1633
+ /**
1634
+ * Detach every subscriber. With `error`, their iterators throw it after
1635
+ * draining buffered events; without, they complete.
1636
+ */
1637
+ private release;
1638
+ private report;
1639
+ /**
1640
+ * Unreachable by construction. If the loop ever rejects anyway, fail its
1641
+ * subscribers visibly instead of stranding them or crashing the process.
1642
+ */
1643
+ private collapse;
1644
+ onSessionChange(session: ServiceSession | null): void;
1645
+ onSignOut(): void;
1553
1646
  private createHookHeaders;
1554
- private mintHookTicket;
1555
- private openHookStream;
1556
1647
  private createInvokeHeaders;
1557
1648
  }
1558
1649
 
@@ -2287,4 +2378,4 @@ declare class SecretsService implements ISecretsService {
2287
2378
  listAll(): Promise<Result<SecretCatalogEntry[], SecretsError>>;
2288
2379
  }
2289
2380
 
2290
- export { type AuthorizationVerdict, BaseService, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, STORAGE_FULL_MESSAGE, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretScopeOptions, type SecretsError, SecretsService, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, StorageQuotaInfo, type SubscribeOptions, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, notFoundError, parseAuthError, parseCapabilityResource, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, validatedCapabilityOf, wrapError };
2381
+ export { type AuthorizationVerdict, BaseService, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookStreamRetryConfig, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, STORAGE_FULL_MESSAGE, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretScopeOptions, type SecretsError, SecretsService, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, StorageQuotaInfo, type SubscribeOptions, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, notFoundError, parseAuthError, parseCapabilityResource, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, validatedCapabilityOf, wrapError };
package/dist/index.d.ts CHANGED
@@ -1521,9 +1521,51 @@ interface SubscribeOptions {
1521
1521
  }
1522
1522
  interface HooksServiceConfig extends Record<string, unknown> {
1523
1523
  host?: string;
1524
+ /** Shared-stream retry tuning; see {@link HookStreamRetryConfig}. */
1525
+ streamRetry?: HookStreamRetryConfig;
1526
+ }
1527
+ /**
1528
+ * Retry policy for the shared `/hooks/events` stream. When the stream fails
1529
+ * (network error, 5xx, or an expired/rotated ticket rejected with 401/403)
1530
+ * it is re-opened with exponential backoff: `HOOK_STREAM_RETRY_BASE_DELAY_MS`
1531
+ * (~250 ms) doubling to `HOOK_STREAM_RETRY_MAX_DELAY_MS` (~30 s) with jitter.
1532
+ * The retry streak resets after an event is received or a stream remains open
1533
+ * for at least 5 seconds. Retries stop when no subscribers remain, when the
1534
+ * service is aborted, or when minting the hook ticket is refused (the iterator
1535
+ * throws that typed error instead).
1536
+ */
1537
+ interface HookStreamRetryConfig {
1538
+ /**
1539
+ * Delay before retry attempt `attempt` (1-based). Defaults to the jittered
1540
+ * exponential backoff described above. Must return milliseconds.
1541
+ */
1542
+ delay?: (attempt: number) => number;
1543
+ /**
1544
+ * How a retry delay is awaited — the injectable clock. `delayMs` is the
1545
+ * resolved delay for `attempt`; `signal` aborts the wait early when the
1546
+ * subscription set changes or the service stops. Rejecting or throwing is
1547
+ * treated like a completed wait. After a custom wait returns — whether it
1548
+ * fulfilled, rejected or threw — the service still yields one event-loop
1549
+ * turn so a persistently failing stream can never starve the process.
1550
+ * Defaults to an abortable, unref'd `setTimeout`.
1551
+ */
1552
+ wait?: (delayMs: number, attempt: number, signal: AbortSignal) => Promise<void>;
1524
1553
  }
1525
1554
 
1526
1555
  interface IHooksService {
1556
+ /**
1557
+ * Stream hook events until `options.signal` aborts, the SDK signs out or
1558
+ * the session ends, or the consumer stops iterating. Transient stream
1559
+ * failures — network errors, 5xx, and an expired or rotated ticket rejected
1560
+ * by `/hooks/events` (401/403) — are retried internally with backoff and
1561
+ * never reach the iterator.
1562
+ *
1563
+ * The iterator throws when minting the hook ticket is refused. The thrown
1564
+ * plain `ServiceError` carries `meta.status` with the refusing HTTP status,
1565
+ * so `for await` consumers can branch on it. Stream diagnostics contain only
1566
+ * SDK allow-listed identifiers; foreign error messages and causes are not
1567
+ * copied.
1568
+ */
1527
1569
  subscribe(subscriptions: HookSubscription[], options?: SubscribeOptions): AsyncIterable<HookEvent>;
1528
1570
  register(webhook: HookWebhookRegistration): Promise<Result<HookWebhookRecord>>;
1529
1571
  list(options?: HookWebhookListOptions): Promise<Result<HookWebhookRecord[]>>;
@@ -1534,10 +1576,13 @@ declare class HooksService extends BaseService implements IHooksService {
1534
1576
  static readonly serviceName = "hooks";
1535
1577
  protected _config: HooksServiceConfig;
1536
1578
  private readonly _subscribers;
1537
- private _sharedStreamTask?;
1538
- private _sharedStreamAbort?;
1539
- private _refreshChain;
1540
- private _activeSignature;
1579
+ /** True while the one supervisor loop runs. Set only by wake(), cleared only at loop exit. */
1580
+ private _supervising;
1581
+ /** The supervisor's current step, interruptible by wake(). */
1582
+ private _phase?;
1583
+ /** Bumped on every session change; part of the plan key. */
1584
+ private _sessionGeneration;
1585
+ private _lastContextSignal?;
1541
1586
  constructor(config?: HooksServiceConfig);
1542
1587
  get config(): HooksServiceConfig;
1543
1588
  private get host();
@@ -1545,14 +1590,60 @@ declare class HooksService extends BaseService implements IHooksService {
1545
1590
  register(webhook: HookWebhookRegistration): Promise<Result<HookWebhookRecord>>;
1546
1591
  list(options?: HookWebhookListOptions): Promise<Result<HookWebhookRecord[]>>;
1547
1592
  unregister(id: string, options?: HookWebhookUnregisterOptions): Promise<Result<void>>;
1548
- private scheduleSharedStreamRefresh;
1549
- private refreshSharedStream;
1550
- private collectSharedStreamState;
1551
- private runSharedStream;
1552
- private abortSharedStream;
1593
+ /**
1594
+ * Called after anything that may change what the supervisor should do:
1595
+ * subscribe, unsubscribe, session change, sign-out. Interrupts the running
1596
+ * step if the plan moved away from it, and starts the supervisor if none
1597
+ * runs. Touches only SDK-owned state, so it never throws into callers such
1598
+ * as `ServiceContext.setSession`.
1599
+ */
1600
+ private wake;
1601
+ /**
1602
+ * The only owner of the shared stream. Each iteration is one attempt
1603
+ * (mint → open → drain), then a classification and, unless the attempt was
1604
+ * superseded or released its subscribers, a backoff. Every await is a
1605
+ * `phase` that wake() can interrupt; an interrupted phase yields
1606
+ * `undefined`, so a superseded mint can never act. Outside `attempt` and
1607
+ * `pause`, which each own one catch, the loop touches only SDK state.
1608
+ */
1609
+ private supervise;
1610
+ /**
1611
+ * Run one step under an interrupt that wake() fires when the plan key moves
1612
+ * on. An interrupted step's result is discarded. The interrupt is also
1613
+ * fired when the step returns, which releases whatever it left open: the
1614
+ * request signal and its listeners, an unread response body, a timer.
1615
+ */
1616
+ private phase;
1617
+ /**
1618
+ * One mint → open → drain. The single catch site for everything the
1619
+ * attempt touches that the SDK does not own: context accessors, invoke,
1620
+ * fetch, response bodies, the SSE parser. Never rejects.
1621
+ */
1622
+ private attempt;
1623
+ /**
1624
+ * Back off before the next attempt. `config.streamRetry` overrides the
1625
+ * delay and the clock; whatever they do, the pause ends by the delay or the
1626
+ * interrupt, then yields one timer turn so an instant clock cannot starve
1627
+ * due timers or the process.
1628
+ */
1629
+ private pause;
1630
+ /** The stream the current subscribers need, or undefined when none remain. */
1631
+ private plan;
1632
+ private dispatch;
1633
+ /**
1634
+ * Detach every subscriber. With `error`, their iterators throw it after
1635
+ * draining buffered events; without, they complete.
1636
+ */
1637
+ private release;
1638
+ private report;
1639
+ /**
1640
+ * Unreachable by construction. If the loop ever rejects anyway, fail its
1641
+ * subscribers visibly instead of stranding them or crashing the process.
1642
+ */
1643
+ private collapse;
1644
+ onSessionChange(session: ServiceSession | null): void;
1645
+ onSignOut(): void;
1553
1646
  private createHookHeaders;
1554
- private mintHookTicket;
1555
- private openHookStream;
1556
1647
  private createInvokeHeaders;
1557
1648
  }
1558
1649
 
@@ -2287,4 +2378,4 @@ declare class SecretsService implements ISecretsService {
2287
2378
  listAll(): Promise<Result<SecretCatalogEntry[], SecretsError>>;
2288
2379
  }
2289
2380
 
2290
- export { type AuthorizationVerdict, BaseService, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, STORAGE_FULL_MESSAGE, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretScopeOptions, type SecretsError, SecretsService, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, StorageQuotaInfo, type SubscribeOptions, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, notFoundError, parseAuthError, parseCapabilityResource, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, validatedCapabilityOf, wrapError };
2381
+ export { type AuthorizationVerdict, BaseService, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookStreamRetryConfig, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, STORAGE_FULL_MESSAGE, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretScopeOptions, type SecretsError, SecretsService, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, StorageQuotaInfo, type SubscribeOptions, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, notFoundError, parseAuthError, parseCapabilityResource, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, validatedCapabilityOf, wrapError };