@tinycloud/sdk-core 2.2.0-beta.4 → 2.2.0-beta.7

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,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { InvokeFunction, InvokeAnyFunction, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService } from '@tinycloud/sdk-services';
3
- export { BatchOptions, BatchResponse, ColumnInfo, DataVaultConfig, DataVaultService, DatabaseHandle, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IHooksService, IKVService, IPrefixedKVService, ISQLService, IService, IServiceContext, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, PrefixedKVService, QueryOptions, QueryResponse, Result, RetryPolicy, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SqlStatement, SqlValue, SubscribeOptions, TableInfo, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, ViewInfo, WasmVaultFunctions, createVaultCrypto, defaultRetryPolicy, err, ok, serviceError } from '@tinycloud/sdk-services';
3
+ export { BatchOptions, BatchResponse, ColumnInfo, DataVaultConfig, DataVaultService, DatabaseHandle, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IHooksService, IKVService, IPrefixedKVService, ISQLService, ISecretsService, IService, IServiceContext, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, PrefixedKVService, QueryOptions, QueryResponse, Result, RetryPolicy, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretPayload, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SqlStatement, SqlValue, SubscribeOptions, TableInfo, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, ViewInfo, WasmVaultFunctions, createVaultCrypto, defaultRetryPolicy, err, ok, serviceError } from '@tinycloud/sdk-services';
4
4
  export { SiweMessage } from 'siwe';
5
5
 
6
6
  /**
@@ -229,12 +229,17 @@ interface PermissionEntry {
229
229
  /** User/agent-facing context for why this permission is requested. */
230
230
  description?: string;
231
231
  }
232
+ type ManifestSecretActions = true | string | string[] | {
233
+ actions?: string | string[];
234
+ expiry?: string;
235
+ description?: string;
236
+ };
232
237
  /**
233
238
  * The valid values for `Manifest.defaults`.
234
239
  *
235
240
  * - `false` → no auto-included permissions
236
241
  * - `true` → standard tier (KV + SQL read/write + capabilities:read)
237
- * - `"admin"` → standard + SQL ddl + capabilities:admin
242
+ * - `"admin"` → standard + SQL ddl
238
243
  * - `"all"` → everything the SDK supports (including DuckDB)
239
244
  *
240
245
  * Unknown string values silently fall back to `true`. Values are normalized
@@ -281,6 +286,11 @@ interface Manifest {
281
286
  * DuckDB (opt-in), or `skipPrefix: true` entries.
282
287
  */
283
288
  permissions?: PermissionEntry[];
289
+ /**
290
+ * Secret name shorthand. Entries resolve to encrypted vault KV resources in
291
+ * the `secrets` space.
292
+ */
293
+ secrets?: Record<string, ManifestSecretActions>;
284
294
  }
285
295
  /**
286
296
  * A resolved permission entry with fully-expanded paths and action URNs.
@@ -2033,15 +2043,15 @@ declare const SpaceInfoSchema: z.ZodObject<{
2033
2043
  type: "owned" | "delegated";
2034
2044
  id: string;
2035
2045
  owner: string;
2036
- expiresAt?: Date | undefined;
2037
2046
  name?: string | undefined;
2047
+ expiresAt?: Date | undefined;
2038
2048
  permissions?: string[] | undefined;
2039
2049
  }, {
2040
2050
  type: "owned" | "delegated";
2041
2051
  id: string;
2042
2052
  owner: string;
2043
- expiresAt?: Date | undefined;
2044
2053
  name?: string | undefined;
2054
+ expiresAt?: Date | undefined;
2045
2055
  permissions?: string[] | undefined;
2046
2056
  }>;
2047
2057
  type SpaceInfo = z.infer<typeof SpaceInfoSchema>;
@@ -2318,14 +2328,14 @@ declare const DelegatedResourceSchema: z.ZodObject<{
2318
2328
  actions: z.ZodArray<z.ZodString, "many">;
2319
2329
  }, "strip", z.ZodTypeAny, {
2320
2330
  path: string;
2321
- service: string;
2322
- space: string;
2323
2331
  actions: string[];
2332
+ space: string;
2333
+ service: string;
2324
2334
  }, {
2325
2335
  path: string;
2326
- service: string;
2327
- space: string;
2328
2336
  actions: string[];
2337
+ space: string;
2338
+ service: string;
2329
2339
  }>;
2330
2340
  type DelegatedResource = z.infer<typeof DelegatedResourceSchema>;
2331
2341
  /**
@@ -2416,21 +2426,21 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2416
2426
  actions: z.ZodArray<z.ZodString, "many">;
2417
2427
  }, "strip", z.ZodTypeAny, {
2418
2428
  path: string;
2419
- service: string;
2420
- space: string;
2421
2429
  actions: string[];
2430
+ space: string;
2431
+ service: string;
2422
2432
  }, {
2423
2433
  path: string;
2424
- service: string;
2425
- space: string;
2426
2434
  actions: string[];
2435
+ space: string;
2436
+ service: string;
2427
2437
  }>, "many">;
2428
2438
  }, "strip", z.ZodTypeAny, {
2429
2439
  resources: {
2430
2440
  path: string;
2431
- service: string;
2432
- space: string;
2433
2441
  actions: string[];
2442
+ space: string;
2443
+ service: string;
2434
2444
  }[];
2435
2445
  expiry: Date;
2436
2446
  delegation: string;
@@ -2439,9 +2449,9 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2439
2449
  }, {
2440
2450
  resources: {
2441
2451
  path: string;
2442
- service: string;
2443
- space: string;
2444
2452
  actions: string[];
2453
+ space: string;
2454
+ service: string;
2445
2455
  }[];
2446
2456
  expiry: Date;
2447
2457
  delegation: string;
@@ -4013,6 +4023,10 @@ interface ISpace {
4013
4023
  * KV operations scoped to this space.
4014
4024
  */
4015
4025
  readonly kv: IKVService;
4026
+ /**
4027
+ * Data Vault operations scoped to this space.
4028
+ */
4029
+ readonly vault: IDataVaultService;
4016
4030
  /**
4017
4031
  * Delegation operations scoped to this space.
4018
4032
  */
@@ -4042,6 +4056,10 @@ interface SpaceConfig {
4042
4056
  * Factory function to create a space-scoped KV service.
4043
4057
  */
4044
4058
  createKV: (spaceId: string) => IKVService;
4059
+ /**
4060
+ * Factory function to create a space-scoped Data Vault service.
4061
+ */
4062
+ createVault: (spaceId: string) => IDataVaultService;
4045
4063
  /**
4046
4064
  * Factory function to create space-scoped delegations.
4047
4065
  */
@@ -4081,6 +4099,7 @@ declare class Space implements ISpace {
4081
4099
  private readonly _id;
4082
4100
  private readonly _name;
4083
4101
  private readonly _kv;
4102
+ private readonly _vault;
4084
4103
  private readonly _delegations;
4085
4104
  private readonly _sharing;
4086
4105
  private readonly _getInfo;
@@ -4102,6 +4121,10 @@ declare class Space implements ISpace {
4102
4121
  * KV operations scoped to this space.
4103
4122
  */
4104
4123
  get kv(): IKVService;
4124
+ /**
4125
+ * Data Vault operations scoped to this space.
4126
+ */
4127
+ get vault(): IDataVaultService;
4105
4128
  /**
4106
4129
  * Delegation operations scoped to this space.
4107
4130
  */
@@ -4177,6 +4200,8 @@ interface SpaceServiceConfig {
4177
4200
  capabilityRegistry?: ICapabilityKeyRegistry;
4178
4201
  /** Factory function to create a space-scoped KV service */
4179
4202
  createKVService?: (spaceId: string) => IKVService;
4203
+ /** Factory function to create a space-scoped Data Vault service */
4204
+ createVaultService?: (spaceId: string) => IDataVaultService;
4180
4205
  /** User's PKH DID (derived from address or provided explicitly) */
4181
4206
  userDid?: string;
4182
4207
  /** Optional SharingService for v2 sharing links (client-side) */
@@ -4303,6 +4328,7 @@ declare class SpaceService implements ISpaceService {
4303
4328
  private fetchFn;
4304
4329
  private capabilityRegistry?;
4305
4330
  private createKVServiceFn?;
4331
+ private createVaultServiceFn?;
4306
4332
  private _userDid?;
4307
4333
  private sharingService?;
4308
4334
  private createDelegationFn?;
@@ -4385,6 +4411,10 @@ declare class SpaceService implements ISpaceService {
4385
4411
  * Create a space-scoped KV service.
4386
4412
  */
4387
4413
  private createSpaceScopedKV;
4414
+ /**
4415
+ * Create a space-scoped Data Vault service.
4416
+ */
4417
+ private createSpaceScopedVault;
4388
4418
  /**
4389
4419
  * Create space-scoped delegation operations.
4390
4420
  */
@@ -4536,4 +4566,4 @@ declare function resolveTinyCloudHosts(subject: string, options?: ResolveTinyClo
4536
4566
  declare function multiaddrToHttpUrl(input: string): string;
4537
4567
  declare function httpUrlToMultiaddr(input: string): string;
4538
4568
 
4539
- export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, 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_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegatedResource, 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 EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, 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, 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 ManifestRegistryRecord, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, 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, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, applyPrefix, buildSpaceUri, canonicalLocationPayload, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, expandActionShortNames, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, loadManifest, locationPayloadForRecord, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseExpiry, parseRecapCapabilities, parseSpaceUri, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyLocationRecord };
4569
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, 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_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegatedResource, 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 EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, 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, 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 ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, 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, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, applyPrefix, buildSpaceUri, canonicalLocationPayload, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, expandActionShortNames, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, loadManifest, locationPayloadForRecord, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseExpiry, parseRecapCapabilities, parseSpaceUri, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyLocationRecord };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { InvokeFunction, InvokeAnyFunction, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService } from '@tinycloud/sdk-services';
3
- export { BatchOptions, BatchResponse, ColumnInfo, DataVaultConfig, DataVaultService, DatabaseHandle, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IHooksService, IKVService, IPrefixedKVService, ISQLService, IService, IServiceContext, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, PrefixedKVService, QueryOptions, QueryResponse, Result, RetryPolicy, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SqlStatement, SqlValue, SubscribeOptions, TableInfo, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, ViewInfo, WasmVaultFunctions, createVaultCrypto, defaultRetryPolicy, err, ok, serviceError } from '@tinycloud/sdk-services';
3
+ export { BatchOptions, BatchResponse, ColumnInfo, DataVaultConfig, DataVaultService, DatabaseHandle, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IHooksService, IKVService, IPrefixedKVService, ISQLService, ISecretsService, IService, IServiceContext, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, PrefixedKVService, QueryOptions, QueryResponse, Result, RetryPolicy, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretPayload, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SqlStatement, SqlValue, SubscribeOptions, TableInfo, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, ViewInfo, WasmVaultFunctions, createVaultCrypto, defaultRetryPolicy, err, ok, serviceError } from '@tinycloud/sdk-services';
4
4
  export { SiweMessage } from 'siwe';
5
5
 
6
6
  /**
@@ -229,12 +229,17 @@ interface PermissionEntry {
229
229
  /** User/agent-facing context for why this permission is requested. */
230
230
  description?: string;
231
231
  }
232
+ type ManifestSecretActions = true | string | string[] | {
233
+ actions?: string | string[];
234
+ expiry?: string;
235
+ description?: string;
236
+ };
232
237
  /**
233
238
  * The valid values for `Manifest.defaults`.
234
239
  *
235
240
  * - `false` → no auto-included permissions
236
241
  * - `true` → standard tier (KV + SQL read/write + capabilities:read)
237
- * - `"admin"` → standard + SQL ddl + capabilities:admin
242
+ * - `"admin"` → standard + SQL ddl
238
243
  * - `"all"` → everything the SDK supports (including DuckDB)
239
244
  *
240
245
  * Unknown string values silently fall back to `true`. Values are normalized
@@ -281,6 +286,11 @@ interface Manifest {
281
286
  * DuckDB (opt-in), or `skipPrefix: true` entries.
282
287
  */
283
288
  permissions?: PermissionEntry[];
289
+ /**
290
+ * Secret name shorthand. Entries resolve to encrypted vault KV resources in
291
+ * the `secrets` space.
292
+ */
293
+ secrets?: Record<string, ManifestSecretActions>;
284
294
  }
285
295
  /**
286
296
  * A resolved permission entry with fully-expanded paths and action URNs.
@@ -2033,15 +2043,15 @@ declare const SpaceInfoSchema: z.ZodObject<{
2033
2043
  type: "owned" | "delegated";
2034
2044
  id: string;
2035
2045
  owner: string;
2036
- expiresAt?: Date | undefined;
2037
2046
  name?: string | undefined;
2047
+ expiresAt?: Date | undefined;
2038
2048
  permissions?: string[] | undefined;
2039
2049
  }, {
2040
2050
  type: "owned" | "delegated";
2041
2051
  id: string;
2042
2052
  owner: string;
2043
- expiresAt?: Date | undefined;
2044
2053
  name?: string | undefined;
2054
+ expiresAt?: Date | undefined;
2045
2055
  permissions?: string[] | undefined;
2046
2056
  }>;
2047
2057
  type SpaceInfo = z.infer<typeof SpaceInfoSchema>;
@@ -2318,14 +2328,14 @@ declare const DelegatedResourceSchema: z.ZodObject<{
2318
2328
  actions: z.ZodArray<z.ZodString, "many">;
2319
2329
  }, "strip", z.ZodTypeAny, {
2320
2330
  path: string;
2321
- service: string;
2322
- space: string;
2323
2331
  actions: string[];
2332
+ space: string;
2333
+ service: string;
2324
2334
  }, {
2325
2335
  path: string;
2326
- service: string;
2327
- space: string;
2328
2336
  actions: string[];
2337
+ space: string;
2338
+ service: string;
2329
2339
  }>;
2330
2340
  type DelegatedResource = z.infer<typeof DelegatedResourceSchema>;
2331
2341
  /**
@@ -2416,21 +2426,21 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2416
2426
  actions: z.ZodArray<z.ZodString, "many">;
2417
2427
  }, "strip", z.ZodTypeAny, {
2418
2428
  path: string;
2419
- service: string;
2420
- space: string;
2421
2429
  actions: string[];
2430
+ space: string;
2431
+ service: string;
2422
2432
  }, {
2423
2433
  path: string;
2424
- service: string;
2425
- space: string;
2426
2434
  actions: string[];
2435
+ space: string;
2436
+ service: string;
2427
2437
  }>, "many">;
2428
2438
  }, "strip", z.ZodTypeAny, {
2429
2439
  resources: {
2430
2440
  path: string;
2431
- service: string;
2432
- space: string;
2433
2441
  actions: string[];
2442
+ space: string;
2443
+ service: string;
2434
2444
  }[];
2435
2445
  expiry: Date;
2436
2446
  delegation: string;
@@ -2439,9 +2449,9 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2439
2449
  }, {
2440
2450
  resources: {
2441
2451
  path: string;
2442
- service: string;
2443
- space: string;
2444
2452
  actions: string[];
2453
+ space: string;
2454
+ service: string;
2445
2455
  }[];
2446
2456
  expiry: Date;
2447
2457
  delegation: string;
@@ -4013,6 +4023,10 @@ interface ISpace {
4013
4023
  * KV operations scoped to this space.
4014
4024
  */
4015
4025
  readonly kv: IKVService;
4026
+ /**
4027
+ * Data Vault operations scoped to this space.
4028
+ */
4029
+ readonly vault: IDataVaultService;
4016
4030
  /**
4017
4031
  * Delegation operations scoped to this space.
4018
4032
  */
@@ -4042,6 +4056,10 @@ interface SpaceConfig {
4042
4056
  * Factory function to create a space-scoped KV service.
4043
4057
  */
4044
4058
  createKV: (spaceId: string) => IKVService;
4059
+ /**
4060
+ * Factory function to create a space-scoped Data Vault service.
4061
+ */
4062
+ createVault: (spaceId: string) => IDataVaultService;
4045
4063
  /**
4046
4064
  * Factory function to create space-scoped delegations.
4047
4065
  */
@@ -4081,6 +4099,7 @@ declare class Space implements ISpace {
4081
4099
  private readonly _id;
4082
4100
  private readonly _name;
4083
4101
  private readonly _kv;
4102
+ private readonly _vault;
4084
4103
  private readonly _delegations;
4085
4104
  private readonly _sharing;
4086
4105
  private readonly _getInfo;
@@ -4102,6 +4121,10 @@ declare class Space implements ISpace {
4102
4121
  * KV operations scoped to this space.
4103
4122
  */
4104
4123
  get kv(): IKVService;
4124
+ /**
4125
+ * Data Vault operations scoped to this space.
4126
+ */
4127
+ get vault(): IDataVaultService;
4105
4128
  /**
4106
4129
  * Delegation operations scoped to this space.
4107
4130
  */
@@ -4177,6 +4200,8 @@ interface SpaceServiceConfig {
4177
4200
  capabilityRegistry?: ICapabilityKeyRegistry;
4178
4201
  /** Factory function to create a space-scoped KV service */
4179
4202
  createKVService?: (spaceId: string) => IKVService;
4203
+ /** Factory function to create a space-scoped Data Vault service */
4204
+ createVaultService?: (spaceId: string) => IDataVaultService;
4180
4205
  /** User's PKH DID (derived from address or provided explicitly) */
4181
4206
  userDid?: string;
4182
4207
  /** Optional SharingService for v2 sharing links (client-side) */
@@ -4303,6 +4328,7 @@ declare class SpaceService implements ISpaceService {
4303
4328
  private fetchFn;
4304
4329
  private capabilityRegistry?;
4305
4330
  private createKVServiceFn?;
4331
+ private createVaultServiceFn?;
4306
4332
  private _userDid?;
4307
4333
  private sharingService?;
4308
4334
  private createDelegationFn?;
@@ -4385,6 +4411,10 @@ declare class SpaceService implements ISpaceService {
4385
4411
  * Create a space-scoped KV service.
4386
4412
  */
4387
4413
  private createSpaceScopedKV;
4414
+ /**
4415
+ * Create a space-scoped Data Vault service.
4416
+ */
4417
+ private createSpaceScopedVault;
4388
4418
  /**
4389
4419
  * Create space-scoped delegation operations.
4390
4420
  */
@@ -4536,4 +4566,4 @@ declare function resolveTinyCloudHosts(subject: string, options?: ResolveTinyClo
4536
4566
  declare function multiaddrToHttpUrl(input: string): string;
4537
4567
  declare function httpUrlToMultiaddr(input: string): string;
4538
4568
 
4539
- export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, 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_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegatedResource, 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 EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, 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, 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 ManifestRegistryRecord, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, 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, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, applyPrefix, buildSpaceUri, canonicalLocationPayload, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, expandActionShortNames, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, loadManifest, locationPayloadForRecord, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseExpiry, parseRecapCapabilities, parseSpaceUri, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyLocationRecord };
4569
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, 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_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegatedResource, 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 EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, 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, 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 ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, 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, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, applyPrefix, buildSpaceUri, canonicalLocationPayload, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, expandActionShortNames, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, loadManifest, locationPayloadForRecord, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseExpiry, parseRecapCapabilities, parseSpaceUri, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyLocationRecord };