@tinycloud/sdk-core 2.7.0-beta.3 → 2.7.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
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService, ISecretsService, IDatabaseHandle, SqlValue, QueryResponse } from '@tinycloud/sdk-services';
3
- export { BatchOptions, BatchResponse, BuildCanonicalDecryptRequestInput, BuildDecryptFactsInput, BuildDecryptInvocationInput, BuiltDecryptInvocation, CanonicalDecryptRequest, CanonicalJson, ColumnInfo, DECRYPT_ACTION, DECRYPT_FACT_TYPE, DECRYPT_RESULT_TYPE, DEFAULT_ENCRYPTION_ALG, DEFAULT_KEY_VERSION, DataVaultConfig, DataVaultService, DatabaseHandle, DecryptCapabilityProof, DecryptEnvelopeOptions, DecryptInvocationFact, DecryptInvocationSigner, DecryptRequestBody, DecryptResponseBody, DecryptTransport, DiscoverNetworkInput, DiscoveredNetwork, DiscoverySource, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ENCRYPTION_NETWORK_URN_PREFIX, ENCRYPTION_SERVICE, ENCRYPTION_SERVICE_SHORT, ENVELOPE_VERSION, EncryptToNetworkInput, EncryptToNetworkOptions, EncryptToNetworkResult, EncryptionCrypto, EncryptionError, EncryptionErrorInput, EncryptionService, EncryptionServiceConfig, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IEncryptionService, IHooksService, IKVService, IPrefixedKVService, ISQLService, ISecretsService, IService, IServiceContext, InlineEncryptedEnvelope, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVCreateSignedReadUrlOptions, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, KVSignedReadUrlResponse, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, ParsedNetworkId, PrefixedKVService, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiverKeyPair, ReceiverKeySigner, ResolvedSecretPath, Result, RetryPolicy, SECRET_NAME_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretPayload, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SignedReceiverKeyInput, SqlStatement, SqlValue, SubscribeOptions, TableInfo, TelemetryConfig, TelemetryEventHandler, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, VerifyDecryptResponseInput, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, buildCanonicalDecryptRequest, buildDecryptAttenuation, buildDecryptFacts, buildDecryptInvocation, buildNetworkId, canonicalHashHex, canonicalSignedResponse, canonicalizeEncryptionJson, canonicalizeSecretScope, checkDecryptInvocationInput, clearTinyCloudDebugLogs, createVaultCrypto, decryptEnvelopeWithKey, defaultRetryPolicy, deriveSignedReceiverKey, disableTinyCloudDebug, discoverNetwork, enableTinyCloudDebug, encryptToNetwork, base64Decode as encryptionBase64Decode, base64Encode as encryptionBase64Encode, encryptionError, utf8Decode as encryptionUtf8Decode, utf8Encode as encryptionUtf8Encode, ensureNetworkUsableForDecrypt, err, generateRandomReceiverKey, getTinyCloudDebugLogs, hexDecode, hexEncode, installTinyCloudDebugGlobals, isNetworkId, networkDiscoveryKey, ok, openWrappedKey, parseNetworkId, resolveSecretListPrefix, resolveSecretPath, serviceError, tinyCloudDebugLogger, validateEnvelope, verifyDecryptResponse } from '@tinycloud/sdk-services';
3
+ export { BatchOptions, BatchResponse, BuildCanonicalDecryptRequestInput, BuildDecryptFactsInput, BuildDecryptInvocationInput, BuiltDecryptInvocation, CanonicalDecryptRequest, CanonicalJson, ColumnInfo, DECRYPT_ACTION, DECRYPT_FACT_TYPE, DECRYPT_RESULT_TYPE, DEFAULT_ENCRYPTION_ALG, DEFAULT_KEY_VERSION, DataVaultConfig, DataVaultService, DatabaseHandle, DecryptCapabilityProof, DecryptEnvelopeOptions, DecryptInvocationFact, DecryptInvocationSigner, DecryptRequestBody, DecryptResponseBody, DecryptTransport, DecryptTransportResponseError, DiscoverNetworkInput, DiscoveredNetwork, DiscoverySource, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ENCRYPTION_NETWORK_URN_PREFIX, ENCRYPTION_SERVICE, ENCRYPTION_SERVICE_SHORT, ENVELOPE_VERSION, EncryptToNetworkInput, EncryptToNetworkOptions, EncryptToNetworkResult, EncryptionCrypto, EncryptionError, EncryptionErrorInput, EncryptionService, EncryptionServiceConfig, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IEncryptionService, IHooksService, IKVService, IPrefixedKVService, ISQLService, ISecretsService, IService, IServiceContext, InlineEncryptedEnvelope, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVCreateSignedReadUrlOptions, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, KVSignedReadUrlResponse, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, ParsedNetworkId, PrefixedKVService, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiverKeyPair, ReceiverKeySigner, ResolvedSecretPath, Result, RetryPolicy, SECRET_NAME_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretPayload, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SignedReceiverKeyInput, SqlStatement, SqlValue, SubscribeOptions, TableInfo, TelemetryConfig, TelemetryEventHandler, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultNetworkReadResult, VaultPublicSpaceKVActions, VaultPutOptions, VerifyDecryptResponseInput, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, buildCanonicalDecryptRequest, buildDecryptAttenuation, buildDecryptFacts, buildDecryptInvocation, buildNetworkId, canonicalHashHex, canonicalSignedResponse, canonicalizeEncryptionJson, canonicalizeSecretScope, checkDecryptInvocationInput, clearTinyCloudDebugLogs, createVaultCrypto, decryptEnvelopeWithKey, defaultRetryPolicy, deriveSignedReceiverKey, disableTinyCloudDebug, discoverNetwork, enableTinyCloudDebug, encryptToNetwork, base64Decode as encryptionBase64Decode, base64Encode as encryptionBase64Encode, encryptionError, utf8Decode as encryptionUtf8Decode, utf8Encode as encryptionUtf8Encode, ensureNetworkUsableForDecrypt, err, generateRandomReceiverKey, getTinyCloudDebugLogs, hexDecode, hexEncode, installTinyCloudDebugGlobals, isNetworkId, networkDiscoveryKey, ok, openWrappedKey, parseNetworkId, resolveSecretListPrefix, resolveSecretPath, serviceError, tinyCloudDebugLogger, validateEnvelope, verifyDecryptResponse } from '@tinycloud/sdk-services';
4
4
  export { HOLDER_KEY_BINDING_PRESENTATION_SCHEMA, HolderKeyBindingPresentation, LISTEN_SQL_STATEMENT_CATALOG, ListenSqlStatementName, POLICY_ENGINE_CHALLENGE_REQUEST_SCHEMA, POLICY_ENGINE_CHALLENGE_RESPONSE_SCHEMA, POLICY_ENGINE_DENIAL_SCHEMA, POLICY_ENGINE_GRANT_PRESENTATION_DENIAL_CODES, POLICY_ENGINE_RESOLVE_REQUEST_SCHEMA, PORTABLE_DELEGATION_SCHEMA, PolicyEngineGrantPresentationDenialCode, PortableDelegation, REQUESTER_ENGINE_RETRY_ATTEMPTS, REQUESTER_ENGINE_RETRY_MAX_DELAY_MS, REQUESTER_NEAR_EXPIRY_SECONDS, RequesterEndpointResolution, RequesterHttpRequest, RequesterHttpResponse, RequesterInvocationCapability, RequesterSigningCapability, RequesterTransport, TranscriptRequester, TranscriptRequesterError, TranscriptRequesterErrorCode, TranscriptRequesterErrorState, TranscriptRequesterOptions, TranscriptRequesterReadKvResult, TranscriptRequesterReadSqlResult, createTranscriptRequester, deriveDelegationCid, parseNodeNativePortableDelegation } from './requester/index.cjs';
5
5
  export { ACCOUNT_INDEX_SCHEMA, BOOTSTRAP_ALLOWLIST, BOOTSTRAP_DEFAULT_SPACE, BOOTSTRAP_ENCRYPTION_NETWORK_NAME, BOOTSTRAP_ENCRYPTION_NETWORK_RESOURCE_TEMPLATE, BOOTSTRAP_MANIFEST, BOOTSTRAP_PERSISTED_APPLICATION_MANIFESTS, BOOTSTRAP_PUBLIC_SPACE, BOOTSTRAP_SESSION_REQUESTS, BOOTSTRAP_SPACE_MANIFESTS, BOOTSTRAP_SPACE_NAMES, BootstrapAllowlistEntry, BootstrapAllowlistKind, BootstrapEncryptionNetworkStep, BootstrapManifest, BootstrapRawAbilityAllowlistEntry, BootstrapSchemaStep, BootstrapSeedApplicationsStep, BootstrapSeedSpacesStep, BootstrapSpaceDescriptor, BootstrapSpaceName, BootstrapSpaceStep, BootstrapStep, BootstrapStepKind, CAPABILITIES, CAPABILITY_REGISTRY, CapabilityRegistryEntry, CapabilityStatus, DUCKDB, ENCRYPTION, HOOKS, KV, SECRET_RECORDS_SCHEMA, SPACE, SQL, TINYCLOUD_ACCOUNT_SPACE_MANIFEST, TINYCLOUD_APPLICATIONS_SPACE_MANIFEST, TINYCLOUD_DEFAULT_SPACE_MANIFEST, TINYCLOUD_PUBLIC_SPACE_MANIFEST, TINYCLOUD_SECRETS_BOOTSTRAP_MANIFEST, bootstrapEncryptionNetworkId, bootstrapSpaceId, bootstrapSteps, composeBootstrapSpaceManifest } from '@tinycloud/bootstrap';
6
- export { E as ED25519_JCS_SIGNATURE_SUITE, b as EIP191_JCS_SIGNATURE_SUITE, J as JsonObject, c as POLICY_ENGINE_RECORD_SCHEMA, d as POLICY_SCHEMA, e as POLICY_STATUS_SCHEMA, a as Policy, P as PolicyEngineRecord, f as PolicyStatus, g as SignatureMaterialError, h as SignatureSuite, i as SignatureVerificationError, j as SignedObjectCanonicalizationError, k as SignedObjectDigestError, l as SignedObjectErrorCode, m as SignedObjectIdError, n as SignedObjectKind, o as SignedObjectMaterial, p as SignedObjectProfileError, q as SignedObjectSchemaError, r as SignedObjectSignature, S as SignedObjectSigner, s as SignedObjectVerificationResult, t as SignedPolicyObject, u as SigningKeyBindingError, v as UnsignedPolicy, U as UnsignedPolicyEngineRecord, w as UnsignedPolicyObject, x as UnsignedPolicyStatus, y as UnsupportedSignatureSuiteError, z as canonicalizeSignedObjectUnsigned, A as createAndSignPolicy, B as createAndSignPolicyEngineRecord, C as createAndSignPolicyStatus, D as createAndSignSignedObject, F as deriveSignedObjectMaterial, G as signedObjectIdFor, H as toSignedObjectError, I as validatePolicyEngineRecordSigned, K as validatePolicyEngineRecordSignedShape, L as validatePolicyEngineRecordUnsigned, M as validatePolicySigned, N as validatePolicySignedShape, O as validatePolicyStatusSigned, Q as validatePolicyStatusSignedShape, R as validatePolicyStatusUnsigned, T as validatePolicyUnsigned, V as verifyPolicy, W as verifyPolicyEngineRecord, X as verifyPolicyStatus, Y as verifySignedObject } from './signed-object-CpXNKC4d.cjs';
7
- export { b as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-DpdAwc1W.cjs';
6
+ export { E as ED25519_JCS_SIGNATURE_SUITE, b as EIP191_JCS_SIGNATURE_SUITE, J as JsonObject, c as POLICY_ENGINE_RECORD_SCHEMA, d as POLICY_SCHEMA, e as POLICY_STATUS_SCHEMA, a as Policy, P as PolicyEngineRecord, f as PolicyStatus, g as SignatureMaterialError, h as SignatureSuite, i as SignatureVerificationError, j as SignedObjectCanonicalizationError, k as SignedObjectDigestError, l as SignedObjectErrorCode, m as SignedObjectIdError, n as SignedObjectKind, o as SignedObjectMaterial, p as SignedObjectProfileError, q as SignedObjectSchemaError, r as SignedObjectSignature, S as SignedObjectSigner, s as SignedObjectVerificationResult, t as SignedPolicyObject, u as SigningKeyBindingError, v as UnsignedPolicy, U as UnsignedPolicyEngineRecord, w as UnsignedPolicyObject, x as UnsignedPolicyStatus, y as UnsupportedSignatureSuiteError, z as canonicalizeSignedObjectUnsigned, A as createAndSignPolicy, B as createAndSignPolicyEngineRecord, C as createAndSignPolicyStatus, D as createAndSignSignedObject, F as deriveSignedObjectMaterial, G as signedObjectIdFor, H as toSignedObjectError, I as validatePolicyEngineRecordSigned, K as validatePolicyEngineRecordSignedShape, L as validatePolicyEngineRecordUnsigned, M as validatePolicySigned, N as validatePolicySignedShape, O as validatePolicyStatusSigned, Q as validatePolicyStatusSignedShape, R as validatePolicyStatusUnsigned, T as validatePolicyUnsigned, V as verifyPolicy, W as verifyPolicyEngineRecord, X as verifyPolicyStatus, Y as verifySignedObject } from './signed-object-IMAm5a32.cjs';
7
+ export { a as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-BjzXwtNw.cjs';
8
8
  export { SiweMessage } from 'siwe';
9
9
 
10
10
  /**
@@ -227,6 +227,8 @@ interface PermissionEntry {
227
227
  * Already-expanded URNs are passed through unchanged.
228
228
  */
229
229
  actions: string[];
230
+ /** Exact ReCap caveat branches when this authority came from a signed ReCap. */
231
+ caveats?: Record<string, unknown>[];
230
232
  /** When true, the manifest prefix is NOT prepended to `path`. Default false. */
231
233
  skipPrefix?: boolean;
232
234
  /** Per-entry expiry override, ms-format. */
@@ -646,6 +648,17 @@ declare class SessionExpiredError extends Error {
646
648
  readonly expiredAt: Date;
647
649
  constructor(expiredAt: Date);
648
650
  }
651
+ /**
652
+ * Thrown when the installed WASM delegation boundary cannot encode every
653
+ * constrained ReCap branch in a requested child delegation.
654
+ */
655
+ declare class CaveatedDelegationUnsupportedError extends Error {
656
+ /** Stable machine-readable error code for fail-closed caveated delegation. */
657
+ code: "CAVEATED_DELEGATION_UNSUPPORTED";
658
+ /** Requested entries whose constrained ReCap branches cannot be preserved. */
659
+ entries: PermissionEntry[];
660
+ constructor(entries: PermissionEntry[]);
661
+ }
649
662
  interface SubsetCheckResult {
650
663
  /** True when every requested entry is covered by a granted entry. */
651
664
  subset: boolean;
@@ -673,6 +686,23 @@ interface SubsetCheckResult {
673
686
  * or `expandActionShortNames` to normalize inputs first.
674
687
  */
675
688
  declare function isCapabilitySubset(requested: readonly PermissionEntry[], granted: readonly PermissionEntry[]): SubsetCheckResult;
689
+ /**
690
+ * Compare ReCap caveat branch sets without losing signed branch structure.
691
+ *
692
+ * ReCap represents an unconstrained ability as `[{}]`, while SDK callers can
693
+ * represent that same authority as `undefined` or `[]`. Those three forms are
694
+ * equivalent. Every other branch, including an unconstrained branch mixed
695
+ * with a constrained one, remains part of the canonical comparison.
696
+ */
697
+ declare function recapCaveatsEqual(left: readonly Record<string, unknown>[] | undefined, right: readonly Record<string, unknown>[] | undefined): boolean;
698
+ /**
699
+ * Canonicalize a ReCap caveat branch set for exact equality checks.
700
+ *
701
+ * Object keys and branch order do not affect equality. A lone unconstrained
702
+ * branch is normalized to the SDK's empty-caveat representation, but an
703
+ * unconstrained branch in a mixed set is deliberately retained.
704
+ */
705
+ declare function canonicalizeRecapCaveats(caveats: readonly Record<string, unknown>[] | undefined): string;
676
706
  /** Return whether a granted action pattern covers one requested action. */
677
707
  declare function actionContains(grantedAction: string, requestedAction: string): boolean;
678
708
  /**
@@ -688,6 +718,8 @@ interface WasmRecapEntry {
688
718
  space: string;
689
719
  path: string;
690
720
  actions: string[];
721
+ /** Exact ReCap caveats shared by every action in this entry. */
722
+ caveats?: Record<string, unknown>[];
691
723
  }
692
724
  /**
693
725
  * Signature of the WASM `parseRecapFromSiwe` export. Accepts the signed
@@ -724,6 +756,42 @@ declare function parseRecapCapabilities(parseWasm: ParseRecapFromSiwe, siwe: str
724
756
  * @packageDocumentation
725
757
  */
726
758
 
759
+ /**
760
+ * The persisted authority material that must be verified as one unit before a
761
+ * restored session can use its ReCap or lifetime locally.
762
+ */
763
+ interface PersistedSessionProof {
764
+ delegationHeader: {
765
+ Authorization: string;
766
+ };
767
+ delegationCid: string;
768
+ spaceId: string;
769
+ /** @deprecated Ignored by validation; capabilities come from the signed ReCap. */
770
+ spaces?: Record<string, string>;
771
+ jwk: object;
772
+ /** @deprecated Ignored by validation; the verification method is derived from `jwk`. */
773
+ verificationMethod?: string;
774
+ address: string;
775
+ chainId: number;
776
+ siwe: string;
777
+ signature: string;
778
+ }
779
+ /** Canonical facts produced by the WASM-side persisted-session verifier. */
780
+ interface ValidatedPersistedSessionProof {
781
+ /** The SIWE expiration exactly as signed, when the SIWE contains one. */
782
+ expiresAt?: string;
783
+ /** @deprecated Legacy caveat-free witness; restore does not trust it. */
784
+ recap?: WasmRecapEntry[];
785
+ /**
786
+ * Exact, caveat-preserving ReCap reconstruction from a verifier that
787
+ * implements persisted-session validation v2. This remains optional so a
788
+ * pre-existing custom binding stays source-compatible, but restore rejects
789
+ * authenticated authority unless this witness is available.
790
+ */
791
+ verifiedRecap?: Array<WasmRecapEntry & {
792
+ caveats: Record<string, unknown>[];
793
+ }>;
794
+ }
727
795
  /**
728
796
  * Platform-agnostic WASM bindings interface.
729
797
  *
@@ -757,6 +825,13 @@ interface IWasmBindings {
757
825
  * Returns an empty array when the SIWE has no recap resource.
758
826
  */
759
827
  parseRecapFromSiwe: (siweString: string) => WasmRecapEntry[];
828
+ /**
829
+ * Optional verifier-v2 parser that preserves ReCap caveats. Kept optional
830
+ * so existing custom bindings remain source-compatible.
831
+ */
832
+ parseVerifiedRecapFromSiwe?: (siweString: string) => Array<WasmRecapEntry & {
833
+ caveats: Record<string, unknown>[];
834
+ }>;
760
835
  /** Generate a host SIWE message for space activation */
761
836
  generateHostSIWEMessage: (params: any) => string;
762
837
  /** Convert a signed SIWE message to delegation headers */
@@ -775,6 +850,13 @@ interface IWasmBindings {
775
850
  vault_sha256: (data: Uint8Array) => Uint8Array;
776
851
  /** Factory for session managers */
777
852
  createSessionManager: () => ISessionManager;
853
+ /**
854
+ * Verify a persisted EIP-191 SIWE proof and bind it to its reconstructed
855
+ * Cacao header/CID, session DID, address, chain and ReCap spaces. Optional
856
+ * so pre-existing custom bindings remain type-compatible; restore rejects
857
+ * authenticated persisted data when the primitive is unavailable.
858
+ */
859
+ validatePersistedSession?: (proof: PersistedSessionProof) => ValidatedPersistedSessionProof;
778
860
  /** Ensure WASM module is initialized (optional — some bindings auto-init) */
779
861
  ensureInitialized?: () => Promise<void>;
780
862
  }
@@ -786,6 +868,13 @@ interface IWasmBindings {
786
868
  interface ISessionManager {
787
869
  /** Create a new session key with the given ID, returns the DID */
788
870
  createSessionKey(id: string): string;
871
+ /**
872
+ * Optional for custom bindings built before persisted-key restore.
873
+ * `restoreSession` detects support at runtime.
874
+ */
875
+ replaceSessionKey?(jwk: object, keyId: string): string;
876
+ /** List every live key so a primary-key replacement cannot discard shares. */
877
+ listSessionKeys?(): string[];
789
878
  /** Rename a session key ID */
790
879
  renameSessionKeyId(oldId: string, newId: string): void;
791
880
  /** Get the DID for a session key */
@@ -1422,6 +1511,8 @@ declare const DelegationSchema: z.ZodObject<{
1422
1511
  path: z.ZodString;
1423
1512
  /** Actions this delegation authorizes */
1424
1513
  actions: z.ZodArray<z.ZodString, "many">;
1514
+ /** Exact ReCap caveats that constrain every action in this scope. */
1515
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
1425
1516
  /** When this delegation expires (accepts Date or ISO string from JSON) */
1426
1517
  expiry: z.ZodDate;
1427
1518
  /** Whether this delegation has been revoked */
@@ -1444,6 +1535,7 @@ declare const DelegationSchema: z.ZodObject<{
1444
1535
  cid: string;
1445
1536
  delegateDID: string;
1446
1537
  isRevoked: boolean;
1538
+ caveats?: Record<string, unknown>[] | undefined;
1447
1539
  createdAt?: Date | undefined;
1448
1540
  delegatorDID?: string | undefined;
1449
1541
  parentCid?: string | undefined;
@@ -1457,6 +1549,7 @@ declare const DelegationSchema: z.ZodObject<{
1457
1549
  cid: string;
1458
1550
  delegateDID: string;
1459
1551
  isRevoked: boolean;
1552
+ caveats?: Record<string, unknown>[] | undefined;
1460
1553
  createdAt?: Date | undefined;
1461
1554
  delegatorDID?: string | undefined;
1462
1555
  parentCid?: string | undefined;
@@ -1839,6 +1932,8 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1839
1932
  path: z.ZodString;
1840
1933
  /** Actions this delegation authorizes */
1841
1934
  actions: z.ZodArray<z.ZodString, "many">;
1935
+ /** Exact ReCap caveats that constrain every action in this scope. */
1936
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
1842
1937
  /** When this delegation expires (accepts Date or ISO string from JSON) */
1843
1938
  expiry: z.ZodDate;
1844
1939
  /** Whether this delegation has been revoked */
@@ -1861,6 +1956,7 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1861
1956
  cid: string;
1862
1957
  delegateDID: string;
1863
1958
  isRevoked: boolean;
1959
+ caveats?: Record<string, unknown>[] | undefined;
1864
1960
  createdAt?: Date | undefined;
1865
1961
  delegatorDID?: string | undefined;
1866
1962
  parentCid?: string | undefined;
@@ -1874,6 +1970,7 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1874
1970
  cid: string;
1875
1971
  delegateDID: string;
1876
1972
  isRevoked: boolean;
1973
+ caveats?: Record<string, unknown>[] | undefined;
1877
1974
  createdAt?: Date | undefined;
1878
1975
  delegatorDID?: string | undefined;
1879
1976
  parentCid?: string | undefined;
@@ -1910,6 +2007,7 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1910
2007
  cid: string;
1911
2008
  delegateDID: string;
1912
2009
  isRevoked: boolean;
2010
+ caveats?: Record<string, unknown>[] | undefined;
1913
2011
  createdAt?: Date | undefined;
1914
2012
  delegatorDID?: string | undefined;
1915
2013
  parentCid?: string | undefined;
@@ -1947,6 +2045,7 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1947
2045
  cid: string;
1948
2046
  delegateDID: string;
1949
2047
  isRevoked: boolean;
2048
+ caveats?: Record<string, unknown>[] | undefined;
1950
2049
  createdAt?: Date | undefined;
1951
2050
  delegatorDID?: string | undefined;
1952
2051
  parentCid?: string | undefined;
@@ -2060,6 +2159,8 @@ declare const DelegationChainSchema: z.ZodArray<z.ZodObject<{
2060
2159
  path: z.ZodString;
2061
2160
  /** Actions this delegation authorizes */
2062
2161
  actions: z.ZodArray<z.ZodString, "many">;
2162
+ /** Exact ReCap caveats that constrain every action in this scope. */
2163
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2063
2164
  /** When this delegation expires (accepts Date or ISO string from JSON) */
2064
2165
  expiry: z.ZodDate;
2065
2166
  /** Whether this delegation has been revoked */
@@ -2082,6 +2183,7 @@ declare const DelegationChainSchema: z.ZodArray<z.ZodObject<{
2082
2183
  cid: string;
2083
2184
  delegateDID: string;
2084
2185
  isRevoked: boolean;
2186
+ caveats?: Record<string, unknown>[] | undefined;
2085
2187
  createdAt?: Date | undefined;
2086
2188
  delegatorDID?: string | undefined;
2087
2189
  parentCid?: string | undefined;
@@ -2095,6 +2197,7 @@ declare const DelegationChainSchema: z.ZodArray<z.ZodObject<{
2095
2197
  cid: string;
2096
2198
  delegateDID: string;
2097
2199
  isRevoked: boolean;
2200
+ caveats?: Record<string, unknown>[] | undefined;
2098
2201
  createdAt?: Date | undefined;
2099
2202
  delegatorDID?: string | undefined;
2100
2203
  parentCid?: string | undefined;
@@ -2118,6 +2221,8 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2118
2221
  path: z.ZodString;
2119
2222
  /** Actions this delegation authorizes */
2120
2223
  actions: z.ZodArray<z.ZodString, "many">;
2224
+ /** Exact ReCap caveats that constrain every action in this scope. */
2225
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2121
2226
  /** When this delegation expires (accepts Date or ISO string from JSON) */
2122
2227
  expiry: z.ZodDate;
2123
2228
  /** Whether this delegation has been revoked */
@@ -2140,6 +2245,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2140
2245
  cid: string;
2141
2246
  delegateDID: string;
2142
2247
  isRevoked: boolean;
2248
+ caveats?: Record<string, unknown>[] | undefined;
2143
2249
  createdAt?: Date | undefined;
2144
2250
  delegatorDID?: string | undefined;
2145
2251
  parentCid?: string | undefined;
@@ -2153,6 +2259,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2153
2259
  cid: string;
2154
2260
  delegateDID: string;
2155
2261
  isRevoked: boolean;
2262
+ caveats?: Record<string, unknown>[] | undefined;
2156
2263
  createdAt?: Date | undefined;
2157
2264
  delegatorDID?: string | undefined;
2158
2265
  parentCid?: string | undefined;
@@ -2171,6 +2278,8 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2171
2278
  path: z.ZodString;
2172
2279
  /** Actions this delegation authorizes */
2173
2280
  actions: z.ZodArray<z.ZodString, "many">;
2281
+ /** Exact ReCap caveats that constrain every action in this scope. */
2282
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2174
2283
  /** When this delegation expires (accepts Date or ISO string from JSON) */
2175
2284
  expiry: z.ZodDate;
2176
2285
  /** Whether this delegation has been revoked */
@@ -2193,6 +2302,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2193
2302
  cid: string;
2194
2303
  delegateDID: string;
2195
2304
  isRevoked: boolean;
2305
+ caveats?: Record<string, unknown>[] | undefined;
2196
2306
  createdAt?: Date | undefined;
2197
2307
  delegatorDID?: string | undefined;
2198
2308
  parentCid?: string | undefined;
@@ -2206,6 +2316,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2206
2316
  cid: string;
2207
2317
  delegateDID: string;
2208
2318
  isRevoked: boolean;
2319
+ caveats?: Record<string, unknown>[] | undefined;
2209
2320
  createdAt?: Date | undefined;
2210
2321
  delegatorDID?: string | undefined;
2211
2322
  parentCid?: string | undefined;
@@ -2224,6 +2335,8 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2224
2335
  path: z.ZodString;
2225
2336
  /** Actions this delegation authorizes */
2226
2337
  actions: z.ZodArray<z.ZodString, "many">;
2338
+ /** Exact ReCap caveats that constrain every action in this scope. */
2339
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2227
2340
  /** When this delegation expires (accepts Date or ISO string from JSON) */
2228
2341
  expiry: z.ZodDate;
2229
2342
  /** Whether this delegation has been revoked */
@@ -2246,6 +2359,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2246
2359
  cid: string;
2247
2360
  delegateDID: string;
2248
2361
  isRevoked: boolean;
2362
+ caveats?: Record<string, unknown>[] | undefined;
2249
2363
  createdAt?: Date | undefined;
2250
2364
  delegatorDID?: string | undefined;
2251
2365
  parentCid?: string | undefined;
@@ -2259,6 +2373,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2259
2373
  cid: string;
2260
2374
  delegateDID: string;
2261
2375
  isRevoked: boolean;
2376
+ caveats?: Record<string, unknown>[] | undefined;
2262
2377
  createdAt?: Date | undefined;
2263
2378
  delegatorDID?: string | undefined;
2264
2379
  parentCid?: string | undefined;
@@ -2274,6 +2389,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2274
2389
  cid: string;
2275
2390
  delegateDID: string;
2276
2391
  isRevoked: boolean;
2392
+ caveats?: Record<string, unknown>[] | undefined;
2277
2393
  createdAt?: Date | undefined;
2278
2394
  delegatorDID?: string | undefined;
2279
2395
  parentCid?: string | undefined;
@@ -2288,6 +2404,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2288
2404
  cid: string;
2289
2405
  delegateDID: string;
2290
2406
  isRevoked: boolean;
2407
+ caveats?: Record<string, unknown>[] | undefined;
2291
2408
  createdAt?: Date | undefined;
2292
2409
  delegatorDID?: string | undefined;
2293
2410
  parentCid?: string | undefined;
@@ -2302,6 +2419,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2302
2419
  cid: string;
2303
2420
  delegateDID: string;
2304
2421
  isRevoked: boolean;
2422
+ caveats?: Record<string, unknown>[] | undefined;
2305
2423
  createdAt?: Date | undefined;
2306
2424
  delegatorDID?: string | undefined;
2307
2425
  parentCid?: string | undefined;
@@ -2317,6 +2435,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2317
2435
  cid: string;
2318
2436
  delegateDID: string;
2319
2437
  isRevoked: boolean;
2438
+ caveats?: Record<string, unknown>[] | undefined;
2320
2439
  createdAt?: Date | undefined;
2321
2440
  delegatorDID?: string | undefined;
2322
2441
  parentCid?: string | undefined;
@@ -2331,6 +2450,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2331
2450
  cid: string;
2332
2451
  delegateDID: string;
2333
2452
  isRevoked: boolean;
2453
+ caveats?: Record<string, unknown>[] | undefined;
2334
2454
  createdAt?: Date | undefined;
2335
2455
  delegatorDID?: string | undefined;
2336
2456
  parentCid?: string | undefined;
@@ -2345,6 +2465,7 @@ declare const DelegationChainV2Schema: z.ZodObject<{
2345
2465
  cid: string;
2346
2466
  delegateDID: string;
2347
2467
  isRevoked: boolean;
2468
+ caveats?: Record<string, unknown>[] | undefined;
2348
2469
  createdAt?: Date | undefined;
2349
2470
  delegatorDID?: string | undefined;
2350
2471
  parentCid?: string | undefined;
@@ -2464,6 +2585,8 @@ declare const ShareLinkSchema: z.ZodObject<{
2464
2585
  path: z.ZodString;
2465
2586
  /** Actions this delegation authorizes */
2466
2587
  actions: z.ZodArray<z.ZodString, "many">;
2588
+ /** Exact ReCap caveats that constrain every action in this scope. */
2589
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2467
2590
  /** When this delegation expires (accepts Date or ISO string from JSON) */
2468
2591
  expiry: z.ZodDate;
2469
2592
  /** Whether this delegation has been revoked */
@@ -2486,6 +2609,7 @@ declare const ShareLinkSchema: z.ZodObject<{
2486
2609
  cid: string;
2487
2610
  delegateDID: string;
2488
2611
  isRevoked: boolean;
2612
+ caveats?: Record<string, unknown>[] | undefined;
2489
2613
  createdAt?: Date | undefined;
2490
2614
  delegatorDID?: string | undefined;
2491
2615
  parentCid?: string | undefined;
@@ -2499,6 +2623,7 @@ declare const ShareLinkSchema: z.ZodObject<{
2499
2623
  cid: string;
2500
2624
  delegateDID: string;
2501
2625
  isRevoked: boolean;
2626
+ caveats?: Record<string, unknown>[] | undefined;
2502
2627
  createdAt?: Date | undefined;
2503
2628
  delegatorDID?: string | undefined;
2504
2629
  parentCid?: string | undefined;
@@ -2520,6 +2645,7 @@ declare const ShareLinkSchema: z.ZodObject<{
2520
2645
  cid: string;
2521
2646
  delegateDID: string;
2522
2647
  isRevoked: boolean;
2648
+ caveats?: Record<string, unknown>[] | undefined;
2523
2649
  createdAt?: Date | undefined;
2524
2650
  delegatorDID?: string | undefined;
2525
2651
  parentCid?: string | undefined;
@@ -2540,6 +2666,7 @@ declare const ShareLinkSchema: z.ZodObject<{
2540
2666
  cid: string;
2541
2667
  delegateDID: string;
2542
2668
  isRevoked: boolean;
2669
+ caveats?: Record<string, unknown>[] | undefined;
2543
2670
  createdAt?: Date | undefined;
2544
2671
  delegatorDID?: string | undefined;
2545
2672
  parentCid?: string | undefined;
@@ -2718,16 +2845,20 @@ declare const DelegatedResourceSchema: z.ZodObject<{
2718
2845
  path: z.ZodString;
2719
2846
  /** Full-URN ability strings, e.g. ["tinycloud.kv/get", "tinycloud.kv/put"]. */
2720
2847
  actions: z.ZodArray<z.ZodString, "many">;
2848
+ /** Exact ReCap caveats that constrain every action in this scope. */
2849
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2721
2850
  }, "strip", z.ZodTypeAny, {
2722
2851
  path: string;
2723
2852
  actions: string[];
2724
2853
  space: string;
2725
2854
  service: string;
2855
+ caveats?: Record<string, unknown>[] | undefined;
2726
2856
  }, {
2727
2857
  path: string;
2728
2858
  actions: string[];
2729
2859
  space: string;
2730
2860
  service: string;
2861
+ caveats?: Record<string, unknown>[] | undefined;
2731
2862
  }>;
2732
2863
  type DelegatedResource = z.infer<typeof DelegatedResourceSchema>;
2733
2864
  /**
@@ -2816,16 +2947,20 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2816
2947
  path: z.ZodString;
2817
2948
  /** Full-URN ability strings, e.g. ["tinycloud.kv/get", "tinycloud.kv/put"]. */
2818
2949
  actions: z.ZodArray<z.ZodString, "many">;
2950
+ /** Exact ReCap caveats that constrain every action in this scope. */
2951
+ caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2819
2952
  }, "strip", z.ZodTypeAny, {
2820
2953
  path: string;
2821
2954
  actions: string[];
2822
2955
  space: string;
2823
2956
  service: string;
2957
+ caveats?: Record<string, unknown>[] | undefined;
2824
2958
  }, {
2825
2959
  path: string;
2826
2960
  actions: string[];
2827
2961
  space: string;
2828
2962
  service: string;
2963
+ caveats?: Record<string, unknown>[] | undefined;
2829
2964
  }>, "many">;
2830
2965
  }, "strip", z.ZodTypeAny, {
2831
2966
  resources: {
@@ -2833,6 +2968,7 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2833
2968
  actions: string[];
2834
2969
  space: string;
2835
2970
  service: string;
2971
+ caveats?: Record<string, unknown>[] | undefined;
2836
2972
  }[];
2837
2973
  delegation: string;
2838
2974
  expiry: Date;
@@ -2844,6 +2980,7 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2844
2980
  actions: string[];
2845
2981
  space: string;
2846
2982
  service: string;
2983
+ caveats?: Record<string, unknown>[] | undefined;
2847
2984
  }[];
2848
2985
  delegation: string;
2849
2986
  expiry: Date;
@@ -3123,6 +3260,7 @@ declare class CapabilityKeyRegistry implements ICapabilityKeyRegistry {
3123
3260
  * @returns Combined key string
3124
3261
  */
3125
3262
  private makeCapabilityKey;
3263
+ private sameDelegationScope;
3126
3264
  /**
3127
3265
  * Find capability entries that match a resource and action.
3128
3266
  *
@@ -3713,6 +3851,8 @@ declare class TinyCloud {
3713
3851
  * @throws Error if services are not initialized
3714
3852
  */
3715
3853
  get serviceContext(): IServiceContext;
3854
+ /** @internal Retire this service graph after its owner replaces a session. */
3855
+ retireServices(): void;
3716
3856
  /**
3717
3857
  * Get a registered service by name.
3718
3858
  *
@@ -4241,6 +4381,8 @@ interface SharingServiceConfig {
4241
4381
  /** Requested expiry time */
4242
4382
  requestedExpiry: Date;
4243
4383
  }) => Promise<Delegation | undefined>;
4384
+ /** Reject operations after the host session/service graph has been retired. */
4385
+ assertActive?: () => void;
4244
4386
  }
4245
4387
  /**
4246
4388
  * Interface for the SharingService.
@@ -4328,6 +4470,7 @@ declare class SharingService implements ISharingService {
4328
4470
  private pathPrefix;
4329
4471
  private sessionExpiry?;
4330
4472
  private onRootDelegationNeeded?;
4473
+ private assertActiveFn?;
4331
4474
  /**
4332
4475
  * Creates a new SharingService instance.
4333
4476
  */
@@ -4344,7 +4487,7 @@ declare class SharingService implements ISharingService {
4344
4487
  * Updates the service configuration.
4345
4488
  * Used to add full capabilities (session, delegationManager, createDelegation, createDelegationWasm) after signIn.
4346
4489
  */
4347
- updateConfig(config: Partial<Pick<SharingServiceConfig, "session" | "delegationManager" | "createDelegation" | "createDelegationWasm" | "sessionExpiry" | "onRootDelegationNeeded">>): void;
4490
+ updateConfig(config: Partial<Pick<SharingServiceConfig, "session" | "delegationManager" | "createDelegation" | "createDelegationWasm" | "sessionExpiry" | "onRootDelegationNeeded" | "assertActive">>): void;
4348
4491
  /**
4349
4492
  * Generate a sharing link with an embedded private key.
4350
4493
  *
@@ -4366,6 +4509,7 @@ declare class SharingService implements ISharingService {
4366
4509
  * @internal
4367
4510
  */
4368
4511
  private findSuitableKeyForDelegation;
4512
+ private retiredGraphError;
4369
4513
  /**
4370
4514
  * Check if a delegation path matches/covers the requested path.
4371
4515
  * A delegation path covers the request if:
@@ -4375,11 +4519,6 @@ declare class SharingService implements ISharingService {
4375
4519
  * @internal
4376
4520
  */
4377
4521
  private pathMatches;
4378
- /**
4379
- * Handle fallback to session extension when root delegation is not available.
4380
- * @internal
4381
- */
4382
- private handleSessionExtensionFallback;
4383
4522
  /**
4384
4523
  * Create a delegation from the current session to a share key.
4385
4524
  * This is the fallback path when root delegation is not available.
@@ -4408,6 +4547,11 @@ declare class SharingService implements ISharingService {
4408
4547
  * be logged or stored insecurely.
4409
4548
  */
4410
4549
  delegateReceivedShare(link: string, params: DelegateReceivedShareParams): Promise<Result<DelegatedShareAccess, DelegationError>>;
4550
+ /**
4551
+ * The child-delegation WASM boundary accepts action-only abilities. Reject
4552
+ * every constrained parent branch before that boundary can broaden it.
4553
+ */
4554
+ private assertDelegationCaveatsPreservable;
4411
4555
  /**
4412
4556
  * Encode sharing data into a link string.
4413
4557
  *
@@ -5300,4 +5444,4 @@ declare const EXPIRY: {
5300
5444
  declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
5301
5445
  type ExpiryTier = keyof typeof EXPIRY;
5302
5446
 
5303
- export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountDelegation, type AccountDelegationListOptions, type AccountDelegationPage, type AccountDelegationQueryOptions, type AccountDelegationRecord, type AccountDelegationResource, type AccountDelegationRevokeOptions, type AccountIndexEnsureResult, type AccountIndexRebuildResult, type AccountIndexStatus, type AccountIndexedReadOptions, AccountService, type AccountServiceConfig, type AccountSpace, type AccountSpaceListOptions, type AccountStatus, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CapabilityEntry, CapabilityKeyRegistry, type CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, type CreateDelegationParams, type CreateDelegationWasmParams, type CreateDelegationWasmResult, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_KNOWLEDGE_ROOT, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegateReceivedShareParams, type DelegatedResource, type DelegatedShareAccess, type Delegation, type DelegationApiResponse, type DelegationChain, type DelegationChainV2, type DelegationDirection, type DelegationError, type DelegationErrorCode, DelegationErrorCodes, type DelegationFilters, DelegationManager, type DelegationManagerConfig, type DelegationRecord, type Result as DelegationResult, type DelegationRevocationReceipt, type DelegationStatus, type DidCacheKeyOptions, type DidEqualsOptions, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, type GenerateShareParams, type ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, type ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type IngestOptions, type JWK, type KeyInfo, type KeyProvider, type KeyType, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type OpenKeyCallbackStrategy, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SECRETS_SPACE, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, type ShareAccess, type ShareLink, type ShareLinkData, type ShareSchema, SharingService, type SharingServiceConfig, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, type SpaceInfo, type SpaceOwnership, SpaceService, type SpaceServiceConfig, type StoredDelegationChain, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidationError, VersionCheckError, type WasmRecapEntry, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createOpenKeyCallbackSigningStrategy, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };
5447
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountDelegation, type AccountDelegationListOptions, type AccountDelegationPage, type AccountDelegationQueryOptions, type AccountDelegationRecord, type AccountDelegationResource, type AccountDelegationRevokeOptions, type AccountIndexEnsureResult, type AccountIndexRebuildResult, type AccountIndexStatus, type AccountIndexedReadOptions, AccountService, type AccountServiceConfig, type AccountSpace, type AccountSpaceListOptions, type AccountStatus, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CapabilityEntry, CapabilityKeyRegistry, type CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, CaveatedDelegationUnsupportedError, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, type CreateDelegationParams, type CreateDelegationWasmParams, type CreateDelegationWasmResult, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_KNOWLEDGE_ROOT, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegateReceivedShareParams, type DelegatedResource, type DelegatedShareAccess, type Delegation, type DelegationApiResponse, type DelegationChain, type DelegationChainV2, type DelegationDirection, type DelegationError, type DelegationErrorCode, DelegationErrorCodes, type DelegationFilters, DelegationManager, type DelegationManagerConfig, type DelegationRecord, type Result as DelegationResult, type DelegationRevocationReceipt, type DelegationStatus, type DidCacheKeyOptions, type DidEqualsOptions, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, type GenerateShareParams, type ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, type ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type IngestOptions, type JWK, type KeyInfo, type KeyProvider, type KeyType, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type OpenKeyCallbackStrategy, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SECRETS_SPACE, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, type ShareAccess, type ShareLink, type ShareLinkData, type ShareSchema, SharingService, type SharingServiceConfig, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, type SpaceInfo, type SpaceOwnership, SpaceService, type SpaceServiceConfig, type StoredDelegationChain, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, VersionCheckError, type WasmRecapEntry, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createOpenKeyCallbackSigningStrategy, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, recapCaveatsEqual, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };