@tinycloud/sdk-core 3.8.0-beta.2 → 3.8.0-beta.4
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/delegations/index.cjs +3 -0
- package/dist/delegations/index.cjs.map +1 -1
- package/dist/delegations/index.d.cts +2 -2
- package/dist/delegations/index.d.ts +2 -2
- package/dist/delegations/index.js +4 -1
- package/dist/delegations/index.js.map +1 -1
- package/dist/index.cjs +56 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +62 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/{recipient-types.schema-BApcOn1t.d.cts → recipient-types.schema-DqmBZT3l.d.cts} +2 -2
- package/dist/{recipient-types.schema-BApcOn1t.d.ts → recipient-types.schema-DqmBZT3l.d.ts} +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -5,8 +5,8 @@ export { canonicalEmailDomain, canonicalMailbox, isCanonicalEmailDomain, mailbox
|
|
|
5
5
|
import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService, ISecretsService, ServiceSession, IDatabaseHandle, SqlValue, QueryResponse } from '@tinycloud/sdk-services';
|
|
6
6
|
export { AuthorityRefusal, AuthorizationVerdict, 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, IStorageService, InlineEncryptedEnvelope, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVBatchReadResponse, KVChange, KVChangesAuthority, KVChangesOptions, KVChangesResponse, KVCreateSignedReadUrlOptions, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListPage, KVListResponse, KVPutOptions, KVReadThrough, KVReplicaHandle, KVReplicaSpec, KVReplicaStorage, KVReplicationController, KVReplicationDeps, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, KVSignedReadUrlResponse, LocalGetResult, LocalListResult, LocalReadMeta, LocalReplicaStatus, LocalSyncResult, MAX_SECRET_SCOPE_LENGTH, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, ParsedNetworkId, ParsedSecretCatalogKey, PendingWriteRecord, PendingWriteState, PendingWriteStore, PinnedKey, PrefixedKVService, PurgeTarget, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiverKeyPair, ReceiverKeySigner, ReplicaAuthorityState, ReplicaCoverage, ReplicaDevice, ReplicaGatedHandle, ReplicaGrantInfo, ReplicaInspectedStatus, ReplicaLocalEraseOutcome, ReplicaPurgeError, ReplicaPurgeFailedEvent, ReplicaPurgeLocalCopyResult, ReplicaPurgeTrigger, ReplicaState, ReplicaStatusEntry, ReplicationAuthority, ReplicationControl, ReplicationEvent, ReplicationIdentity, ReplicationOptions, ReplicationPurgeReport, ReplicationReason, ReplicationScheduler, ResolvedReplicationOptions, ResolvedSecretPath, Result, RetryPolicy, SECRET_NAME_RE, SECRET_SCOPE_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, STORAGE_FULL_MESSAGE, STORAGE_MANAGE_URL, STORAGE_NEARLY_FULL_RATIO, STORAGE_WRITE_TOO_LARGE_MESSAGE, SchemaInfo, SecretCatalogEntry, SecretPayload, SecretPutOptions, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SignedReceiverKeyInput, SqlStatement, SqlValue, StorageAccountUsage, StorageFullEvent, StorageFullHandler, StorageFullMonitor, StorageRejectionDetails, StorageStatus, StorageStatusOptions, StorageUsage, StorageUsageState, SubscribeOptions, TC832_RESERVED_SCOPES, TableInfo, TelemetryConfig, TelemetryEventHandler, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultNetworkReadResult, VaultPublicSpaceKVActions, VaultPutOptions, VerifyDecryptResponseInput, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, appSecretScope, authorizationVerdictOf, 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, isStorageFullError, networkDiscoveryKey, ok, openWrappedKey, parseCapabilityResource, parseNetworkId, parseSecretCatalogKey, parseStorageRejection, parseStorageStatus, resolveSecretListPrefix, resolveSecretPath, serviceError, storageUsageState, tinyCloudDebugLogger, validateEnvelope, validatedCapabilityOf, verifyDecryptResponse } from '@tinycloud/sdk-services';
|
|
7
7
|
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';
|
|
8
|
-
import { o as Delegation, e as CreateDelegationParams, G as GenerateShareParams, aG as ShareLink, bg as SpaceInfo, I as ICapabilityKeyRegistry, H as ISharingService, w as DelegationManager, a as AccountDelegationQueryOptions, A as AccountDelegationPage, z as DelegationRevocationReceipt } from './recipient-types.schema-
|
|
9
|
-
export { b as AccountDelegationRecord, c as AccountDelegationResource, C as CREDENTIAL_INVITATION_REQUEST_DOMAIN, d as CapabilityEntry, bT as CapabilityKeyRegistry, bU as CapabilityKeyRegistryErrorCode, bV as CapabilityKeyRegistryErrorCodes, f as CreateDelegationWasmParams, g as CreateDelegationWasmResult, h as CreateOwnerDelegationParams, i as CredentialInvitationRequest, j as DELIVERY_ADMISSION_DOMAIN, k as DelegateReceivedShareParams, l as DelegatedResource, m as DelegatedShareAccess, n as DelegatedShareKey, p as DelegationApiResponse, q as DelegationChain, r as DelegationChainV2, s as DelegationDirection, D as DelegationError, t as DelegationErrorCode, u as DelegationErrorCodes, v as DelegationFilters, x as DelegationManagerConfig, y as DelegationRecord, R as DelegationResult, B as DelegationStatus, E as DeliveryAdmission, F as EncodedShareData, J as IngestOptions, K as JWK, L as KeyInfo, M as KeyProvider, N as KeyType, O as MAX_CONTENT_BYTES, P as MAX_SEALED_SHARE_CONTENT_BYTES, Q as MAX_SHARE_ARTIFACT_BYTES, S as MAX_SHARE_CONTENT_BYTES, T as MemorySenderShareKeyStorage, U as MemorySenderShareRecordStorage, V as MemoryShareCache, W as OwnerDelegationPermission, X as OwnerDelegationReceipt, Y as OwnerShareAction, Z as OwnerShareDecryption, _ as OwnerShareMatcher, $ as OwnerSharePolicyRegistration, a0 as OwnerSharePolicyRegistrationReceipt, a1 as OwnerSharePolicyV2, a2 as PortableDelegationImportReceipt, a3 as ReceiveOptions, a4 as RegisterOwnerSharePolicyParams, a5 as SenderShareKeyStorage, a6 as SenderShareRecord, a7 as SenderShareRecordStorage, a8 as SenderShareRevocationScope, a9 as SenderShareStore, aa as ShareAccess, ab as ShareAccessError, ac as ShareAccessV2, ad as ShareAction, af as ShareAddressedDelegationEnvelopeV2, ag as ShareAddressedDelegationEnvelopeV2Schema, ah as ShareAddressedDelegationRequestV2, ai as ShareAddressedDelegationRequestV2Schema, aj as ShareAddressedDelegationResponseV2, ak as ShareAddressedDelegationResponseV2Schema, al as ShareAddressedRecipientMatcher, am as ShareArtifactInput, an as ShareArtifactResult, ao as ShareArtifactV2, ap as ShareCache, aq as ShareCacheEntry, ar as ShareCacheKey, as as ShareCacheMetadata, at as ShareCapabilityLike, au as ShareConflict, av as ShareContentMetadata, aw as ShareContentSource, ax as ShareDelegationPreflight, ay as ShareDeliveryAuthorizationV3Receipt, az as ShareDeliveryAuthorizationV3Request, aA as ShareDeliveryRefusedError, aB as ShareDetachedProof, aC as ShareEnvelopeError, aD as ShareEnvelopeV2, aE as ShareExpiryBounds, aF as ShareKvContentSource, aH as ShareLinkData, aI as ShareLinkLocation, aJ as ShareListEntry, aK as ShareListResult, aL as ShareNativeAction, aM as ShareNativeInvokeEnvelopeV1, aN as ShareNativeInvokeErrorResult, aO as ShareNativeInvokeInput, aP as ShareNativeInvokeResult, aQ as ShareNativeInvokeSuccessResult, aR as ShareNativeResponse, aS as ShareNativeResponseSchema, aT as SharePolicy, aU as SharePolicyBinding, aV as SharePolicySession, aW as SharePolicySessionV1, aX as SharePolicySessionWireV1, aY as SharePortableDelegation, aZ as ShareReadInvocationV1, a_ as ShareReadResult, a$ as ShareRecipientClient, b0 as ShareRecipientClientOptions, b2 as ShareRecipientPolicy, b4 as ShareRecipientResult, b5 as ShareRecipientTarget, b7 as ShareResource, b9 as ShareSaveOptions, ba as ShareSchema, bb as ShareSqlContentSource, bc as ShareWireAction, bd as SharingService, be as SharingServiceConfig, bf as SignedDelegation, bh as SpaceOwnership, bW as StoredDelegationChain, bi as VerifyShareEnvelopeOptions, bj as canonicalOwnerSharePolicy, bk as computeOwnerShareRegistrationCid, bl as computeShareCid, bX as createCapabilityKeyRegistry, bm as createDelegatedShareKey, bn as createPolicyEnforcementDelegation, bo as createShareArtifact, bp as createShareArtifactAsync, bq as createSharePolicy, br as createSharingService, bs as decryptShareBytesAsync, bt as delegatePortablePolicySession, bu as encodeInlineShareUrl, bv as encodeShareArtifact, bw as encodeShareUrl, bx as encryptShareBytes, by as encryptShareBytesAsync, bz as importPortableDelegation, bA as intersectShareCapabilities, bB as isV2ShareLink, bC as normalizeShareActions, bD as normalizeShareRecipientTarget, bE as normalizeShareResource, bF as parsePortableDelegation, bG as parseShareArtifact, bH as parseShareUrl, bI as restoreDelegatedShareKey, bJ as serializePortableDelegation, bK as shareCapabilityAllows, bL as shortDeliveryLinkBodyCid, bM as signShareEnvelope, bN as validateOwnerSharePolicyRegistration, bO as validateOwnerSharePolicyRegistrationBytes, bP as verifyShareCid, bQ as verifyShareDeliveryAuthorizationV3Bytes, bR as verifyShareEnvelope, bS as withoutShareLink } from './recipient-types.schema-
|
|
8
|
+
import { o as Delegation, e as CreateDelegationParams, G as GenerateShareParams, aG as ShareLink, bg as SpaceInfo, I as ICapabilityKeyRegistry, H as ISharingService, w as DelegationManager, a as AccountDelegationQueryOptions, A as AccountDelegationPage, z as DelegationRevocationReceipt } from './recipient-types.schema-DqmBZT3l.cjs';
|
|
9
|
+
export { b as AccountDelegationRecord, c as AccountDelegationResource, C as CREDENTIAL_INVITATION_REQUEST_DOMAIN, d as CapabilityEntry, bT as CapabilityKeyRegistry, bU as CapabilityKeyRegistryErrorCode, bV as CapabilityKeyRegistryErrorCodes, f as CreateDelegationWasmParams, g as CreateDelegationWasmResult, h as CreateOwnerDelegationParams, i as CredentialInvitationRequest, j as DELIVERY_ADMISSION_DOMAIN, k as DelegateReceivedShareParams, l as DelegatedResource, m as DelegatedShareAccess, n as DelegatedShareKey, p as DelegationApiResponse, q as DelegationChain, r as DelegationChainV2, s as DelegationDirection, D as DelegationError, t as DelegationErrorCode, u as DelegationErrorCodes, v as DelegationFilters, x as DelegationManagerConfig, y as DelegationRecord, R as DelegationResult, B as DelegationStatus, E as DeliveryAdmission, F as EncodedShareData, J as IngestOptions, K as JWK, L as KeyInfo, M as KeyProvider, N as KeyType, O as MAX_CONTENT_BYTES, P as MAX_SEALED_SHARE_CONTENT_BYTES, Q as MAX_SHARE_ARTIFACT_BYTES, S as MAX_SHARE_CONTENT_BYTES, T as MemorySenderShareKeyStorage, U as MemorySenderShareRecordStorage, V as MemoryShareCache, W as OwnerDelegationPermission, X as OwnerDelegationReceipt, Y as OwnerShareAction, Z as OwnerShareDecryption, _ as OwnerShareMatcher, $ as OwnerSharePolicyRegistration, a0 as OwnerSharePolicyRegistrationReceipt, a1 as OwnerSharePolicyV2, a2 as PortableDelegationImportReceipt, a3 as ReceiveOptions, a4 as RegisterOwnerSharePolicyParams, a5 as SenderShareKeyStorage, a6 as SenderShareRecord, a7 as SenderShareRecordStorage, a8 as SenderShareRevocationScope, a9 as SenderShareStore, aa as ShareAccess, ab as ShareAccessError, ac as ShareAccessV2, ad as ShareAction, af as ShareAddressedDelegationEnvelopeV2, ag as ShareAddressedDelegationEnvelopeV2Schema, ah as ShareAddressedDelegationRequestV2, ai as ShareAddressedDelegationRequestV2Schema, aj as ShareAddressedDelegationResponseV2, ak as ShareAddressedDelegationResponseV2Schema, al as ShareAddressedRecipientMatcher, am as ShareArtifactInput, an as ShareArtifactResult, ao as ShareArtifactV2, ap as ShareCache, aq as ShareCacheEntry, ar as ShareCacheKey, as as ShareCacheMetadata, at as ShareCapabilityLike, au as ShareConflict, av as ShareContentMetadata, aw as ShareContentSource, ax as ShareDelegationPreflight, ay as ShareDeliveryAuthorizationV3Receipt, az as ShareDeliveryAuthorizationV3Request, aA as ShareDeliveryRefusedError, aB as ShareDetachedProof, aC as ShareEnvelopeError, aD as ShareEnvelopeV2, aE as ShareExpiryBounds, aF as ShareKvContentSource, aH as ShareLinkData, aI as ShareLinkLocation, aJ as ShareListEntry, aK as ShareListResult, aL as ShareNativeAction, aM as ShareNativeInvokeEnvelopeV1, aN as ShareNativeInvokeErrorResult, aO as ShareNativeInvokeInput, aP as ShareNativeInvokeResult, aQ as ShareNativeInvokeSuccessResult, aR as ShareNativeResponse, aS as ShareNativeResponseSchema, aT as SharePolicy, aU as SharePolicyBinding, aV as SharePolicySession, aW as SharePolicySessionV1, aX as SharePolicySessionWireV1, aY as SharePortableDelegation, aZ as ShareReadInvocationV1, a_ as ShareReadResult, a$ as ShareRecipientClient, b0 as ShareRecipientClientOptions, b2 as ShareRecipientPolicy, b4 as ShareRecipientResult, b5 as ShareRecipientTarget, b7 as ShareResource, b9 as ShareSaveOptions, ba as ShareSchema, bb as ShareSqlContentSource, bc as ShareWireAction, bd as SharingService, be as SharingServiceConfig, bf as SignedDelegation, bh as SpaceOwnership, bW as StoredDelegationChain, bi as VerifyShareEnvelopeOptions, bj as canonicalOwnerSharePolicy, bk as computeOwnerShareRegistrationCid, bl as computeShareCid, bX as createCapabilityKeyRegistry, bm as createDelegatedShareKey, bn as createPolicyEnforcementDelegation, bo as createShareArtifact, bp as createShareArtifactAsync, bq as createSharePolicy, br as createSharingService, bs as decryptShareBytesAsync, bt as delegatePortablePolicySession, bu as encodeInlineShareUrl, bv as encodeShareArtifact, bw as encodeShareUrl, bx as encryptShareBytes, by as encryptShareBytesAsync, bz as importPortableDelegation, bA as intersectShareCapabilities, bB as isV2ShareLink, bC as normalizeShareActions, bD as normalizeShareRecipientTarget, bE as normalizeShareResource, bF as parsePortableDelegation, bG as parseShareArtifact, bH as parseShareUrl, bI as restoreDelegatedShareKey, bJ as serializePortableDelegation, bK as shareCapabilityAllows, bL as shortDeliveryLinkBodyCid, bM as signShareEnvelope, bN as validateOwnerSharePolicyRegistration, bO as validateOwnerSharePolicyRegistrationBytes, bP as verifyShareCid, bQ as verifyShareDeliveryAuthorizationV3Bytes, bR as verifyShareEnvelope, bS as withoutShareLink } from './recipient-types.schema-DqmBZT3l.cjs';
|
|
10
10
|
export { ACCOUNT_INDEX_SCHEMA, ACCOUNT_MANIFEST_PERMISSIONS, AGENTS_SPACE, BOOTSTRAP_ALLOWLIST, BOOTSTRAP_DEFAULT_ONLY_SESSION_REQUEST, 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_AGENTS_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';
|
|
11
11
|
export { a as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-BjzXwtNw.cjs';
|
|
12
12
|
export { SiweMessage } from 'siwe';
|
|
@@ -333,6 +333,14 @@ type ManifestSecretActions = true | string | string[] | {
|
|
|
333
333
|
expiry?: string;
|
|
334
334
|
description?: string;
|
|
335
335
|
};
|
|
336
|
+
type ManifestKeyAbility = "key.create" | "decrypt" | "key.block" | "key.unblock";
|
|
337
|
+
type ManifestKeyDeclaration = {
|
|
338
|
+
path: string;
|
|
339
|
+
abilities: ManifestKeyAbility[];
|
|
340
|
+
} | {
|
|
341
|
+
prefix: string;
|
|
342
|
+
abilities: ManifestKeyAbility[];
|
|
343
|
+
};
|
|
336
344
|
/**
|
|
337
345
|
* The valid values for `Manifest.defaults`.
|
|
338
346
|
*
|
|
@@ -362,6 +370,8 @@ interface Manifest {
|
|
|
362
370
|
manifest_version?: 1;
|
|
363
371
|
/** Application identifier / namespace prefix. Required. */
|
|
364
372
|
app_id: string;
|
|
373
|
+
/** App key namespace when it differs from app_id. */
|
|
374
|
+
keys_app_id?: string;
|
|
365
375
|
/** Display name. Required. */
|
|
366
376
|
name: string;
|
|
367
377
|
/** Description of what the app or delegate does. Optional. */
|
|
@@ -401,6 +411,8 @@ interface Manifest {
|
|
|
401
411
|
* the `secrets` space.
|
|
402
412
|
*/
|
|
403
413
|
secrets?: Record<string, ManifestSecretActions>;
|
|
414
|
+
/** Named keys on the app's default encryption network. */
|
|
415
|
+
keys?: ManifestKeyDeclaration[];
|
|
404
416
|
}
|
|
405
417
|
/**
|
|
406
418
|
* A resolved permission entry with fully-expanded paths and action URNs.
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { canonicalEmailDomain, canonicalMailbox, isCanonicalEmailDomain, mailbox
|
|
|
5
5
|
import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService, ISecretsService, ServiceSession, IDatabaseHandle, SqlValue, QueryResponse } from '@tinycloud/sdk-services';
|
|
6
6
|
export { AuthorityRefusal, AuthorizationVerdict, 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, IStorageService, InlineEncryptedEnvelope, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVBatchReadResponse, KVChange, KVChangesAuthority, KVChangesOptions, KVChangesResponse, KVCreateSignedReadUrlOptions, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListPage, KVListResponse, KVPutOptions, KVReadThrough, KVReplicaHandle, KVReplicaSpec, KVReplicaStorage, KVReplicationController, KVReplicationDeps, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, KVSignedReadUrlResponse, LocalGetResult, LocalListResult, LocalReadMeta, LocalReplicaStatus, LocalSyncResult, MAX_SECRET_SCOPE_LENGTH, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, ParsedNetworkId, ParsedSecretCatalogKey, PendingWriteRecord, PendingWriteState, PendingWriteStore, PinnedKey, PrefixedKVService, PurgeTarget, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiverKeyPair, ReceiverKeySigner, ReplicaAuthorityState, ReplicaCoverage, ReplicaDevice, ReplicaGatedHandle, ReplicaGrantInfo, ReplicaInspectedStatus, ReplicaLocalEraseOutcome, ReplicaPurgeError, ReplicaPurgeFailedEvent, ReplicaPurgeLocalCopyResult, ReplicaPurgeTrigger, ReplicaState, ReplicaStatusEntry, ReplicationAuthority, ReplicationControl, ReplicationEvent, ReplicationIdentity, ReplicationOptions, ReplicationPurgeReport, ReplicationReason, ReplicationScheduler, ResolvedReplicationOptions, ResolvedSecretPath, Result, RetryPolicy, SECRET_NAME_RE, SECRET_SCOPE_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, STORAGE_FULL_MESSAGE, STORAGE_MANAGE_URL, STORAGE_NEARLY_FULL_RATIO, STORAGE_WRITE_TOO_LARGE_MESSAGE, SchemaInfo, SecretCatalogEntry, SecretPayload, SecretPutOptions, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SignedReceiverKeyInput, SqlStatement, SqlValue, StorageAccountUsage, StorageFullEvent, StorageFullHandler, StorageFullMonitor, StorageRejectionDetails, StorageStatus, StorageStatusOptions, StorageUsage, StorageUsageState, SubscribeOptions, TC832_RESERVED_SCOPES, TableInfo, TelemetryConfig, TelemetryEventHandler, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultNetworkReadResult, VaultPublicSpaceKVActions, VaultPutOptions, VerifyDecryptResponseInput, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, appSecretScope, authorizationVerdictOf, 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, isStorageFullError, networkDiscoveryKey, ok, openWrappedKey, parseCapabilityResource, parseNetworkId, parseSecretCatalogKey, parseStorageRejection, parseStorageStatus, resolveSecretListPrefix, resolveSecretPath, serviceError, storageUsageState, tinyCloudDebugLogger, validateEnvelope, validatedCapabilityOf, verifyDecryptResponse } from '@tinycloud/sdk-services';
|
|
7
7
|
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.js';
|
|
8
|
-
import { o as Delegation, e as CreateDelegationParams, G as GenerateShareParams, aG as ShareLink, bg as SpaceInfo, I as ICapabilityKeyRegistry, H as ISharingService, w as DelegationManager, a as AccountDelegationQueryOptions, A as AccountDelegationPage, z as DelegationRevocationReceipt } from './recipient-types.schema-
|
|
9
|
-
export { b as AccountDelegationRecord, c as AccountDelegationResource, C as CREDENTIAL_INVITATION_REQUEST_DOMAIN, d as CapabilityEntry, bT as CapabilityKeyRegistry, bU as CapabilityKeyRegistryErrorCode, bV as CapabilityKeyRegistryErrorCodes, f as CreateDelegationWasmParams, g as CreateDelegationWasmResult, h as CreateOwnerDelegationParams, i as CredentialInvitationRequest, j as DELIVERY_ADMISSION_DOMAIN, k as DelegateReceivedShareParams, l as DelegatedResource, m as DelegatedShareAccess, n as DelegatedShareKey, p as DelegationApiResponse, q as DelegationChain, r as DelegationChainV2, s as DelegationDirection, D as DelegationError, t as DelegationErrorCode, u as DelegationErrorCodes, v as DelegationFilters, x as DelegationManagerConfig, y as DelegationRecord, R as DelegationResult, B as DelegationStatus, E as DeliveryAdmission, F as EncodedShareData, J as IngestOptions, K as JWK, L as KeyInfo, M as KeyProvider, N as KeyType, O as MAX_CONTENT_BYTES, P as MAX_SEALED_SHARE_CONTENT_BYTES, Q as MAX_SHARE_ARTIFACT_BYTES, S as MAX_SHARE_CONTENT_BYTES, T as MemorySenderShareKeyStorage, U as MemorySenderShareRecordStorage, V as MemoryShareCache, W as OwnerDelegationPermission, X as OwnerDelegationReceipt, Y as OwnerShareAction, Z as OwnerShareDecryption, _ as OwnerShareMatcher, $ as OwnerSharePolicyRegistration, a0 as OwnerSharePolicyRegistrationReceipt, a1 as OwnerSharePolicyV2, a2 as PortableDelegationImportReceipt, a3 as ReceiveOptions, a4 as RegisterOwnerSharePolicyParams, a5 as SenderShareKeyStorage, a6 as SenderShareRecord, a7 as SenderShareRecordStorage, a8 as SenderShareRevocationScope, a9 as SenderShareStore, aa as ShareAccess, ab as ShareAccessError, ac as ShareAccessV2, ad as ShareAction, af as ShareAddressedDelegationEnvelopeV2, ag as ShareAddressedDelegationEnvelopeV2Schema, ah as ShareAddressedDelegationRequestV2, ai as ShareAddressedDelegationRequestV2Schema, aj as ShareAddressedDelegationResponseV2, ak as ShareAddressedDelegationResponseV2Schema, al as ShareAddressedRecipientMatcher, am as ShareArtifactInput, an as ShareArtifactResult, ao as ShareArtifactV2, ap as ShareCache, aq as ShareCacheEntry, ar as ShareCacheKey, as as ShareCacheMetadata, at as ShareCapabilityLike, au as ShareConflict, av as ShareContentMetadata, aw as ShareContentSource, ax as ShareDelegationPreflight, ay as ShareDeliveryAuthorizationV3Receipt, az as ShareDeliveryAuthorizationV3Request, aA as ShareDeliveryRefusedError, aB as ShareDetachedProof, aC as ShareEnvelopeError, aD as ShareEnvelopeV2, aE as ShareExpiryBounds, aF as ShareKvContentSource, aH as ShareLinkData, aI as ShareLinkLocation, aJ as ShareListEntry, aK as ShareListResult, aL as ShareNativeAction, aM as ShareNativeInvokeEnvelopeV1, aN as ShareNativeInvokeErrorResult, aO as ShareNativeInvokeInput, aP as ShareNativeInvokeResult, aQ as ShareNativeInvokeSuccessResult, aR as ShareNativeResponse, aS as ShareNativeResponseSchema, aT as SharePolicy, aU as SharePolicyBinding, aV as SharePolicySession, aW as SharePolicySessionV1, aX as SharePolicySessionWireV1, aY as SharePortableDelegation, aZ as ShareReadInvocationV1, a_ as ShareReadResult, a$ as ShareRecipientClient, b0 as ShareRecipientClientOptions, b2 as ShareRecipientPolicy, b4 as ShareRecipientResult, b5 as ShareRecipientTarget, b7 as ShareResource, b9 as ShareSaveOptions, ba as ShareSchema, bb as ShareSqlContentSource, bc as ShareWireAction, bd as SharingService, be as SharingServiceConfig, bf as SignedDelegation, bh as SpaceOwnership, bW as StoredDelegationChain, bi as VerifyShareEnvelopeOptions, bj as canonicalOwnerSharePolicy, bk as computeOwnerShareRegistrationCid, bl as computeShareCid, bX as createCapabilityKeyRegistry, bm as createDelegatedShareKey, bn as createPolicyEnforcementDelegation, bo as createShareArtifact, bp as createShareArtifactAsync, bq as createSharePolicy, br as createSharingService, bs as decryptShareBytesAsync, bt as delegatePortablePolicySession, bu as encodeInlineShareUrl, bv as encodeShareArtifact, bw as encodeShareUrl, bx as encryptShareBytes, by as encryptShareBytesAsync, bz as importPortableDelegation, bA as intersectShareCapabilities, bB as isV2ShareLink, bC as normalizeShareActions, bD as normalizeShareRecipientTarget, bE as normalizeShareResource, bF as parsePortableDelegation, bG as parseShareArtifact, bH as parseShareUrl, bI as restoreDelegatedShareKey, bJ as serializePortableDelegation, bK as shareCapabilityAllows, bL as shortDeliveryLinkBodyCid, bM as signShareEnvelope, bN as validateOwnerSharePolicyRegistration, bO as validateOwnerSharePolicyRegistrationBytes, bP as verifyShareCid, bQ as verifyShareDeliveryAuthorizationV3Bytes, bR as verifyShareEnvelope, bS as withoutShareLink } from './recipient-types.schema-
|
|
8
|
+
import { o as Delegation, e as CreateDelegationParams, G as GenerateShareParams, aG as ShareLink, bg as SpaceInfo, I as ICapabilityKeyRegistry, H as ISharingService, w as DelegationManager, a as AccountDelegationQueryOptions, A as AccountDelegationPage, z as DelegationRevocationReceipt } from './recipient-types.schema-DqmBZT3l.js';
|
|
9
|
+
export { b as AccountDelegationRecord, c as AccountDelegationResource, C as CREDENTIAL_INVITATION_REQUEST_DOMAIN, d as CapabilityEntry, bT as CapabilityKeyRegistry, bU as CapabilityKeyRegistryErrorCode, bV as CapabilityKeyRegistryErrorCodes, f as CreateDelegationWasmParams, g as CreateDelegationWasmResult, h as CreateOwnerDelegationParams, i as CredentialInvitationRequest, j as DELIVERY_ADMISSION_DOMAIN, k as DelegateReceivedShareParams, l as DelegatedResource, m as DelegatedShareAccess, n as DelegatedShareKey, p as DelegationApiResponse, q as DelegationChain, r as DelegationChainV2, s as DelegationDirection, D as DelegationError, t as DelegationErrorCode, u as DelegationErrorCodes, v as DelegationFilters, x as DelegationManagerConfig, y as DelegationRecord, R as DelegationResult, B as DelegationStatus, E as DeliveryAdmission, F as EncodedShareData, J as IngestOptions, K as JWK, L as KeyInfo, M as KeyProvider, N as KeyType, O as MAX_CONTENT_BYTES, P as MAX_SEALED_SHARE_CONTENT_BYTES, Q as MAX_SHARE_ARTIFACT_BYTES, S as MAX_SHARE_CONTENT_BYTES, T as MemorySenderShareKeyStorage, U as MemorySenderShareRecordStorage, V as MemoryShareCache, W as OwnerDelegationPermission, X as OwnerDelegationReceipt, Y as OwnerShareAction, Z as OwnerShareDecryption, _ as OwnerShareMatcher, $ as OwnerSharePolicyRegistration, a0 as OwnerSharePolicyRegistrationReceipt, a1 as OwnerSharePolicyV2, a2 as PortableDelegationImportReceipt, a3 as ReceiveOptions, a4 as RegisterOwnerSharePolicyParams, a5 as SenderShareKeyStorage, a6 as SenderShareRecord, a7 as SenderShareRecordStorage, a8 as SenderShareRevocationScope, a9 as SenderShareStore, aa as ShareAccess, ab as ShareAccessError, ac as ShareAccessV2, ad as ShareAction, af as ShareAddressedDelegationEnvelopeV2, ag as ShareAddressedDelegationEnvelopeV2Schema, ah as ShareAddressedDelegationRequestV2, ai as ShareAddressedDelegationRequestV2Schema, aj as ShareAddressedDelegationResponseV2, ak as ShareAddressedDelegationResponseV2Schema, al as ShareAddressedRecipientMatcher, am as ShareArtifactInput, an as ShareArtifactResult, ao as ShareArtifactV2, ap as ShareCache, aq as ShareCacheEntry, ar as ShareCacheKey, as as ShareCacheMetadata, at as ShareCapabilityLike, au as ShareConflict, av as ShareContentMetadata, aw as ShareContentSource, ax as ShareDelegationPreflight, ay as ShareDeliveryAuthorizationV3Receipt, az as ShareDeliveryAuthorizationV3Request, aA as ShareDeliveryRefusedError, aB as ShareDetachedProof, aC as ShareEnvelopeError, aD as ShareEnvelopeV2, aE as ShareExpiryBounds, aF as ShareKvContentSource, aH as ShareLinkData, aI as ShareLinkLocation, aJ as ShareListEntry, aK as ShareListResult, aL as ShareNativeAction, aM as ShareNativeInvokeEnvelopeV1, aN as ShareNativeInvokeErrorResult, aO as ShareNativeInvokeInput, aP as ShareNativeInvokeResult, aQ as ShareNativeInvokeSuccessResult, aR as ShareNativeResponse, aS as ShareNativeResponseSchema, aT as SharePolicy, aU as SharePolicyBinding, aV as SharePolicySession, aW as SharePolicySessionV1, aX as SharePolicySessionWireV1, aY as SharePortableDelegation, aZ as ShareReadInvocationV1, a_ as ShareReadResult, a$ as ShareRecipientClient, b0 as ShareRecipientClientOptions, b2 as ShareRecipientPolicy, b4 as ShareRecipientResult, b5 as ShareRecipientTarget, b7 as ShareResource, b9 as ShareSaveOptions, ba as ShareSchema, bb as ShareSqlContentSource, bc as ShareWireAction, bd as SharingService, be as SharingServiceConfig, bf as SignedDelegation, bh as SpaceOwnership, bW as StoredDelegationChain, bi as VerifyShareEnvelopeOptions, bj as canonicalOwnerSharePolicy, bk as computeOwnerShareRegistrationCid, bl as computeShareCid, bX as createCapabilityKeyRegistry, bm as createDelegatedShareKey, bn as createPolicyEnforcementDelegation, bo as createShareArtifact, bp as createShareArtifactAsync, bq as createSharePolicy, br as createSharingService, bs as decryptShareBytesAsync, bt as delegatePortablePolicySession, bu as encodeInlineShareUrl, bv as encodeShareArtifact, bw as encodeShareUrl, bx as encryptShareBytes, by as encryptShareBytesAsync, bz as importPortableDelegation, bA as intersectShareCapabilities, bB as isV2ShareLink, bC as normalizeShareActions, bD as normalizeShareRecipientTarget, bE as normalizeShareResource, bF as parsePortableDelegation, bG as parseShareArtifact, bH as parseShareUrl, bI as restoreDelegatedShareKey, bJ as serializePortableDelegation, bK as shareCapabilityAllows, bL as shortDeliveryLinkBodyCid, bM as signShareEnvelope, bN as validateOwnerSharePolicyRegistration, bO as validateOwnerSharePolicyRegistrationBytes, bP as verifyShareCid, bQ as verifyShareDeliveryAuthorizationV3Bytes, bR as verifyShareEnvelope, bS as withoutShareLink } from './recipient-types.schema-DqmBZT3l.js';
|
|
10
10
|
export { ACCOUNT_INDEX_SCHEMA, ACCOUNT_MANIFEST_PERMISSIONS, AGENTS_SPACE, BOOTSTRAP_ALLOWLIST, BOOTSTRAP_DEFAULT_ONLY_SESSION_REQUEST, 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_AGENTS_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';
|
|
11
11
|
export { a as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-BjzXwtNw.js';
|
|
12
12
|
export { SiweMessage } from 'siwe';
|
|
@@ -333,6 +333,14 @@ type ManifestSecretActions = true | string | string[] | {
|
|
|
333
333
|
expiry?: string;
|
|
334
334
|
description?: string;
|
|
335
335
|
};
|
|
336
|
+
type ManifestKeyAbility = "key.create" | "decrypt" | "key.block" | "key.unblock";
|
|
337
|
+
type ManifestKeyDeclaration = {
|
|
338
|
+
path: string;
|
|
339
|
+
abilities: ManifestKeyAbility[];
|
|
340
|
+
} | {
|
|
341
|
+
prefix: string;
|
|
342
|
+
abilities: ManifestKeyAbility[];
|
|
343
|
+
};
|
|
336
344
|
/**
|
|
337
345
|
* The valid values for `Manifest.defaults`.
|
|
338
346
|
*
|
|
@@ -362,6 +370,8 @@ interface Manifest {
|
|
|
362
370
|
manifest_version?: 1;
|
|
363
371
|
/** Application identifier / namespace prefix. Required. */
|
|
364
372
|
app_id: string;
|
|
373
|
+
/** App key namespace when it differs from app_id. */
|
|
374
|
+
keys_app_id?: string;
|
|
365
375
|
/** Display name. Required. */
|
|
366
376
|
name: string;
|
|
367
377
|
/** Description of what the app or delegate does. Optional. */
|
|
@@ -401,6 +411,8 @@ interface Manifest {
|
|
|
401
411
|
* the `secrets` space.
|
|
402
412
|
*/
|
|
403
413
|
secrets?: Record<string, ManifestSecretActions>;
|
|
414
|
+
/** Named keys on the app's default encryption network. */
|
|
415
|
+
keys?: ManifestKeyDeclaration[];
|
|
404
416
|
}
|
|
405
417
|
/**
|
|
406
418
|
* A resolved permission entry with fully-expanded paths and action URNs.
|
package/dist/index.js
CHANGED
|
@@ -7202,7 +7202,7 @@ function validateEncodedShareData(data) {
|
|
|
7202
7202
|
// src/manifest.ts
|
|
7203
7203
|
import ms from "ms";
|
|
7204
7204
|
import { ACCOUNT_MANIFEST_PERMISSIONS } from "@tinycloud/bootstrap";
|
|
7205
|
-
import { resolveSecretPath, SECRET_NAME_RE } from "@tinycloud/sdk-services";
|
|
7205
|
+
import { resolveSecretPath, SECRET_NAME_RE, parseNetworkId } from "@tinycloud/sdk-services";
|
|
7206
7206
|
var DEFAULT_KNOWLEDGE_ROOT = "knowledge/index.md";
|
|
7207
7207
|
var ManifestValidationError = class extends Error {
|
|
7208
7208
|
constructor(message) {
|
|
@@ -7325,6 +7325,14 @@ function expandEncryptionPermissionEntry(entry) {
|
|
|
7325
7325
|
`tinycloud.encryption entries require path to be a networkId URN (got ${JSON.stringify(entry.path)})`
|
|
7326
7326
|
);
|
|
7327
7327
|
}
|
|
7328
|
+
if (entry.path.includes("/")) {
|
|
7329
|
+
throw new ManifestValidationError("named keys go in manifest.keys");
|
|
7330
|
+
}
|
|
7331
|
+
try {
|
|
7332
|
+
parseNetworkId(entry.path);
|
|
7333
|
+
} catch {
|
|
7334
|
+
throw new ManifestValidationError("tinycloud.encryption entries require a valid networkId URN");
|
|
7335
|
+
}
|
|
7328
7336
|
const normalizedActions = [];
|
|
7329
7337
|
for (const action of entry.actions) {
|
|
7330
7338
|
if (action === "decrypt" || action === "tinycloud.encryption/decrypt") {
|
|
@@ -7449,8 +7457,56 @@ function validateManifest(input) {
|
|
|
7449
7457
|
if (m.secrets !== void 0) {
|
|
7450
7458
|
validateManifestSecrets(m.secrets);
|
|
7451
7459
|
}
|
|
7460
|
+
if (Object.prototype.hasOwnProperty.call(m, "keys_app_id") && (typeof m.keys_app_id !== "string" || !KEY_APP_ID.test(m.keys_app_id))) {
|
|
7461
|
+
throw new ManifestValidationError("manifest.keys_app_id is invalid");
|
|
7462
|
+
}
|
|
7463
|
+
validateManifestKeys(m.keys_app_id ?? m.app_id, m.keys);
|
|
7452
7464
|
return m;
|
|
7453
7465
|
}
|
|
7466
|
+
var KEY_SEGMENT = "[a-z0-9][a-z0-9._-]{0,63}";
|
|
7467
|
+
var KEY_APP_ID = new RegExp(`^${KEY_SEGMENT}$`);
|
|
7468
|
+
var KEY_PATH = new RegExp(`^${KEY_SEGMENT}(?:/${KEY_SEGMENT}){2,7}$`);
|
|
7469
|
+
var KEY_ABILITIES = ["key.create", "decrypt", "key.block", "key.unblock"];
|
|
7470
|
+
function validateManifestKeys(appId, keys) {
|
|
7471
|
+
if (keys === void 0) return;
|
|
7472
|
+
if (!Array.isArray(keys) || keys.length > 32) {
|
|
7473
|
+
throw new ManifestValidationError("manifest.keys must contain at most 32 entries");
|
|
7474
|
+
}
|
|
7475
|
+
if (keys.length === 0) return;
|
|
7476
|
+
if (!KEY_APP_ID.test(appId)) {
|
|
7477
|
+
throw new ManifestValidationError("manifest.keys requires a valid app_id");
|
|
7478
|
+
}
|
|
7479
|
+
const paths = /* @__PURE__ */ new Set();
|
|
7480
|
+
let prefixSeen = false;
|
|
7481
|
+
for (const [index, value] of keys.entries()) {
|
|
7482
|
+
const label = `manifest.keys[${index}]`;
|
|
7483
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
7484
|
+
throw new ManifestValidationError(`${label} must be an object`);
|
|
7485
|
+
}
|
|
7486
|
+
const entry = value;
|
|
7487
|
+
const fields = Object.keys(entry);
|
|
7488
|
+
const hasPath = Object.prototype.hasOwnProperty.call(entry, "path");
|
|
7489
|
+
const hasPrefix = Object.prototype.hasOwnProperty.call(entry, "prefix");
|
|
7490
|
+
if (hasPath === hasPrefix || fields.some((field) => !["path", "prefix", "abilities"].includes(field))) {
|
|
7491
|
+
throw new ManifestValidationError(`${label} must have one path or prefix and abilities`);
|
|
7492
|
+
}
|
|
7493
|
+
if (!Array.isArray(entry.abilities) || entry.abilities.length === 0 || new Set(entry.abilities).size !== entry.abilities.length || entry.abilities.some((ability) => typeof ability !== "string" || !KEY_ABILITIES.includes(ability))) {
|
|
7494
|
+
throw new ManifestValidationError(`${label}.abilities is invalid`);
|
|
7495
|
+
}
|
|
7496
|
+
if (hasPath) {
|
|
7497
|
+
const path = entry.path;
|
|
7498
|
+
if (typeof path !== "string" || path.length > 255 || !KEY_PATH.test(path) || !path.startsWith(`apps/${appId}/`) || paths.has(path)) {
|
|
7499
|
+
throw new ManifestValidationError(`${label}.path is invalid`);
|
|
7500
|
+
}
|
|
7501
|
+
paths.add(path);
|
|
7502
|
+
} else {
|
|
7503
|
+
if (entry.prefix !== `apps/${appId}/` || prefixSeen) {
|
|
7504
|
+
throw new ManifestValidationError(`${label}.prefix is invalid`);
|
|
7505
|
+
}
|
|
7506
|
+
prefixSeen = true;
|
|
7507
|
+
}
|
|
7508
|
+
}
|
|
7509
|
+
}
|
|
7454
7510
|
function resolveManifestKnowledgeRoot(knowledge) {
|
|
7455
7511
|
if (knowledge === void 0) {
|
|
7456
7512
|
return void 0;
|
|
@@ -12242,15 +12298,15 @@ function markDelegationTerminal(token, key) {
|
|
|
12242
12298
|
// src/networkId.ts
|
|
12243
12299
|
import {
|
|
12244
12300
|
buildNetworkId,
|
|
12245
|
-
parseNetworkId
|
|
12301
|
+
parseNetworkId as parseNetworkId2
|
|
12246
12302
|
} from "@tinycloud/sdk-services";
|
|
12247
12303
|
function canonicalizeNetworkId(networkId) {
|
|
12248
|
-
const parsed =
|
|
12304
|
+
const parsed = parseNetworkId2(networkId);
|
|
12249
12305
|
return buildNetworkId(canonicalizeDid(parsed.ownerDid), parsed.name);
|
|
12250
12306
|
}
|
|
12251
12307
|
function parseCanonicalNetworkId(networkId) {
|
|
12252
12308
|
const canonical = canonicalizeNetworkId(networkId);
|
|
12253
|
-
return
|
|
12309
|
+
return parseNetworkId2(canonical);
|
|
12254
12310
|
}
|
|
12255
12311
|
|
|
12256
12312
|
// src/storage.schema.ts
|
|
@@ -15063,7 +15119,7 @@ import {
|
|
|
15063
15119
|
resolveSecretPath as resolveSecretPath2,
|
|
15064
15120
|
EncryptionService,
|
|
15065
15121
|
DecryptTransportResponseError,
|
|
15066
|
-
parseNetworkId as
|
|
15122
|
+
parseNetworkId as parseNetworkId3,
|
|
15067
15123
|
buildNetworkId as buildNetworkId2,
|
|
15068
15124
|
isNetworkId,
|
|
15069
15125
|
networkDiscoveryKey,
|
|
@@ -19888,7 +19944,7 @@ export {
|
|
|
19888
19944
|
parseCapabilityResource,
|
|
19889
19945
|
parseCompactUcanAuthorization,
|
|
19890
19946
|
parseExpiry,
|
|
19891
|
-
|
|
19947
|
+
parseNetworkId3 as parseNetworkId,
|
|
19892
19948
|
parseNodeNativePortableDelegation,
|
|
19893
19949
|
parsePkhDid,
|
|
19894
19950
|
parsePolicySessionUcan,
|