@tinycloud/share-sdk 1.4.2-beta.0 → 1.4.2-beta.1

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.
@@ -1,5 +1,6 @@
1
1
  import { a as SenderShareRecordStorage, S as SenderShareRecord } from './history-Bg25JIsi.cjs';
2
2
  export { f as SenderShareRecordProofs } from './history-Bg25JIsi.cjs';
3
+ import { LinkHeaderV1, LinkSignatureV1 } from '@tinycloud/share-envelope/links';
3
4
  import { P as PublishedShareDeliveryMaterial, S as SignedDelegation, l as OwnerSharePolicyRegistration } from './owner-policy-aPmXIR3e.cjs';
4
5
  import { ShareEnvelopeV3 } from '@tinycloud/share-envelope';
5
6
 
@@ -469,21 +470,28 @@ declare class AgentShareRecordStore implements SenderShareRecordStorage {
469
470
  * sealed and rebuilt when needed by {@link openDeliveryEnvelope}, for the
470
471
  * verifier and a delivery retry. `sealedEnvelope` stays (the node reopens that
471
472
  * exact value and its nonce is random) and so does the session CACAO (it
472
- * proves the chain). A short `v=4` link the sender printed is kept (it is not
473
- * derivable: it carries an id only the links service knows) and must be the
474
- * link of this material; a full link is not kept (see {@link compactShareRecord}).
473
+ * proves the chain). Short links stay verbatim; full links keep their original
474
+ * renderer origin, signed header and signature beside the single sealed body.
475
+ * Details: TC-1739
475
476
  *
476
477
  * Security-sensitive: the sealed bytes are checked against `shareCid` before
477
478
  * they are opened, and the plaintext must be the canonical JSON of the
478
479
  * envelope, so a record cannot carry one envelope for display and another for
479
480
  * the node.
480
481
  */
481
- type StoredDeliveryMaterial = Omit<PublishedShareDeliveryMaterial, "envelope">;
482
+ interface StoredFullShareLink {
483
+ readonly origin: string;
484
+ readonly header: LinkHeaderV1;
485
+ readonly signature: LinkSignatureV1;
486
+ }
487
+ type StoredDeliveryMaterial = Omit<PublishedShareDeliveryMaterial, "envelope"> & {
488
+ readonly fullLink?: StoredFullShareLink;
489
+ };
482
490
  /** A share record as stored at an agent (or migrated) key: {@link SenderShareRecord} without derivable blobs. */
483
491
  type StoredShareRecord = Omit<SenderShareRecord, "deliveryMaterial"> & {
484
492
  readonly deliveryMaterial?: StoredDeliveryMaterial;
485
493
  };
486
- /** Keys of a stored `deliveryMaterial`, exactly. */
494
+ /** Required string fields; `fullLink` is optional original signed metadata. Details: TC-1739 */
487
495
  declare const STORED_DELIVERY_MATERIAL_KEYS: readonly string[];
488
496
  declare class DeliveryMaterialError extends Error {
489
497
  constructor(message: string);
@@ -497,22 +505,14 @@ declare function openDeliveryEnvelope(material: StoredDeliveryMaterial): Promise
497
505
  * Returns the link's form.
498
506
  */
499
507
  declare function assertLinkBoundToMaterial(link: string, material: StoredDeliveryMaterial): "short" | "full";
500
- /**
501
- * The stored form of `record`. For a Policy/v3 record (one with
502
- * `deliveryMaterial`), omits `deliveryMaterial.envelope` after checking it is
503
- * exactly what the sealed material opens to, and checks that a `link` is the
504
- * link of that material. A short link is kept. A full link is not: it embeds
505
- * the sealed envelope a second time, which the record size cap does not leave
506
- * room for, so the sender's own history holds it. Throws
507
- * {@link DeliveryMaterialError} otherwise.
508
- */
508
+ /** Stores the sealed body once and retains the original signed full-link wrapper. Details: TC-1739 */
509
509
  declare function compactShareRecord(record: SenderShareRecord | StoredShareRecord): Promise<StoredShareRecord>;
510
- /**
511
- * The full record again (for a delivery retry or a caller that wants the
512
- * {@link SenderShareRecord} shape): the envelope reopened from the sealed
513
- * material. The stored `link` is returned as it was stored.
514
- */
515
- declare function expandShareRecord(record: StoredShareRecord): Promise<SenderShareRecord>;
510
+ /** Verifies and restores original full-link metadata before owner admission. Details: TC-1739 */
511
+ declare function restoreShareRecordLink(record: StoredShareRecord, shareOrigins: readonly string[]): Promise<string | undefined>;
512
+ /** Expands stored material; owner admission additionally supplies trusted origins and verifies the chain. Details: TC-1739 */
513
+ declare function expandShareRecord(record: StoredShareRecord, options?: {
514
+ readonly shareOrigins?: readonly string[];
515
+ }): Promise<SenderShareRecord>;
516
516
 
517
517
  /**
518
518
  * Index document schema v1, rows, `project()`, and the versioned agent-record
@@ -643,6 +643,19 @@ declare function project(record: StoredShareRecord, input: {
643
643
  readonly expired: boolean;
644
644
  };
645
645
  }): ShareIndexRow;
646
+ interface AgentRecordSchemaContext {
647
+ readonly recordV: number;
648
+ readonly shareId: string;
649
+ readonly accountOwnerDid: string;
650
+ /** `hdr.agentDid` for agent records; "" for migrated records, which have no agent binding. */
651
+ readonly agentDid: string;
652
+ /**
653
+ * `agent`: a record in `records/agents/<id>/`, which may never claim a
654
+ * provenance. `migrated`: an owner-layout record that must claim
655
+ * `provenance: "migrated"` (one-time owner import).
656
+ */
657
+ readonly source: "agent" | "migrated";
658
+ }
646
659
  /**
647
660
  * Whether `spaceId` (`tinycloud:pkh:eip155:<chain>:<address>:<name>`) is a
648
661
  * space of the account `ownerDid` (`did:pkh:eip155:<chain>:<address>`),
@@ -650,11 +663,23 @@ declare function project(record: StoredShareRecord, input: {
650
663
  * records live in `applications`. Address spelling is ignored.
651
664
  */
652
665
  declare function isSpaceOwnedBy(spaceId: string, ownerDid: string): boolean;
666
+ /**
667
+ * `registeredAt` against signed times from the verified chain, never against
668
+ * when the owner happens to look: inside `[earliest, latest]` (already
669
+ * widened by {@link REGISTERED_AT_SKEW_MS} where the bound is an issuance
670
+ * time) and not in the future.
671
+ */
672
+ declare function registeredAtFits(registeredAt: string, window: {
673
+ readonly earliest?: number;
674
+ readonly latest?: number;
675
+ }, now: Date): boolean;
653
676
  /** A record refused by the schema. `provenance`: an agent-subtree record claiming `migrated`. */
654
677
  declare class ShareRecordSchemaError extends Error {
655
678
  readonly reason: "schema" | "provenance";
656
679
  constructor(reason: "schema" | "provenance");
657
680
  }
681
+ /** Throws {@link ShareRecordSchemaError} when the decrypted value fails the schema. */
682
+ declare function checkAgentRecordSchema(value: unknown, context: AgentRecordSchemaContext): StoredShareRecord;
658
683
 
659
684
  declare function claimRank(row: Pick<ShareIndexRow, "src" | "ps" | "pv">): number;
660
685
  type ClaimDecision = {
@@ -1058,4 +1083,4 @@ declare function checkRegistrationReceipt(value: unknown, expected: {
1058
1083
 
1059
1084
  declare function verifyEnvelopeV3At(envelope: ShareEnvelopeV3, expectedSignerDid: string, now: number): Promise<boolean>;
1060
1085
 
1061
- export { AGENT_ID_LENGTH, AGENT_RECORD_VERSION, type AgentKeyMaterial, AgentRecordError, type AgentRecordFailure, type AgentRecordHeader, type AgentRejectReason, AgentShareRecordStore, type AgentShareRecordStoreOptions, type Attenuation, type CasPolicy, type ChainContext, type ChainVerdict, type CheckedRegistration, type ClaimDecision, type ClassifiedRecordKey, DEFAULT_CAS_POLICY, DEFAULT_SHARE_INDEX_LIMITS, DeliveryMaterialError, INDEX_MAIN_KEY, INDEX_SCHEMA_VERSION, INVALID_ETAG_MESSAGE, MAX_AGENT_RECORD_BYTES, MemoryShareIndexOutbox, type OwnerNetworkUnwrap, type OwnerNetworkWrap, OwnerUnwrapUnavailableError, type ParsedSiweCacao, type RegistrationKey, SHARE_RECORDS_VAULT_PREFIX, STORED_DELIVERY_MATERIAL_KEYS, SUPPORTED_AGENT_RECORD_V, SenderShareIndex, type SenderShareIndexOptions, SenderShareRecord, type ShareDocumentRead, type ShareIndexAgentEntry, type ShareIndexArchiveDocument, type ShareIndexBackend, ShareIndexCasError, type ShareIndexCasErrorCode, type ShareIndexDocument, type ShareIndexFlushResult, type ShareIndexLimits, type ShareIndexLoad, type ShareIndexOp, type ShareIndexOutbox, type ShareIndexReconcileReport, type ShareIndexRow, type ShareIndexWriteOutcome, type ShareIndexWriteStatus, type ShareLinkCheck, type ShareLinkShape, type ShareListResult, type ShareProofState, type ShareRawRead, ShareRecordSchemaError, type ShareRegistrationKey, type ShareStatusPort, type ShareWriteCondition, type ShareWriteResult, type SignedUcanDelegation, type SiweCacaoParser, type StoredAgentRecord, type StoredDeliveryMaterial, type StoredShareRecord, type TinyCloudShareIndexBackendOptions, type TinyCloudShareIndexClient, type VaultNetworkRead, WebShareRecordStore, agentIdFromDid, agentRecordBinding, agentRecordKey, agentRecordPrefix, assertLinkBoundToMaterial, attenuationCovers, checkRegistrationReceipt, claimRank, classifyRecordKey, compactShareRecord, createTinyCloudShareIndexBackend, decideClaim, deriveAgentKeyMaterial, displayName, expandShareRecord, headerBytes, isAgentId, isShareId, isSpaceOwnedBy, openAgentRecordAsAgent, openAgentRecordAsOwner, openDeliveryEnvelope, parseIndexDocument, parseSignedUcan, parseStoredAgentRecord, project, sealAgentRecord, validateShareLink, verifyAgentRecordChain, verifyEnvelopeV3At, verifyOwnerSessionDelegation, verifyPolicyEnforcementDelegation };
1086
+ export { AGENT_ID_LENGTH, AGENT_RECORD_VERSION, type AgentKeyMaterial, AgentRecordError, type AgentRecordFailure, type AgentRecordHeader, type AgentRecordSchemaContext, type AgentRejectReason, AgentShareRecordStore, type AgentShareRecordStoreOptions, type Attenuation, type CasPolicy, type ChainContext, type ChainVerdict, type CheckedRegistration, type ClaimDecision, type ClassifiedRecordKey, DEFAULT_CAS_POLICY, DEFAULT_SHARE_INDEX_LIMITS, DeliveryMaterialError, INDEX_MAIN_KEY, INDEX_SCHEMA_VERSION, INVALID_ETAG_MESSAGE, MAX_AGENT_RECORD_BYTES, MemoryShareIndexOutbox, type OwnerNetworkUnwrap, type OwnerNetworkWrap, OwnerUnwrapUnavailableError, type ParsedSiweCacao, type RegistrationKey, SHARE_RECORDS_VAULT_PREFIX, STORED_DELIVERY_MATERIAL_KEYS, SUPPORTED_AGENT_RECORD_V, SenderShareIndex, type SenderShareIndexOptions, SenderShareRecord, type ShareDocumentRead, type ShareIndexAgentEntry, type ShareIndexArchiveDocument, type ShareIndexBackend, ShareIndexCasError, type ShareIndexCasErrorCode, type ShareIndexDocument, type ShareIndexFlushResult, type ShareIndexLimits, type ShareIndexLoad, type ShareIndexOp, type ShareIndexOutbox, type ShareIndexReconcileReport, type ShareIndexRow, type ShareIndexWriteOutcome, type ShareIndexWriteStatus, type ShareLinkCheck, type ShareLinkShape, type ShareListResult, type ShareProofState, type ShareRawRead, ShareRecordSchemaError, type ShareRegistrationKey, type ShareStatusPort, type ShareWriteCondition, type ShareWriteResult, type SignedUcanDelegation, type SiweCacaoParser, type StoredAgentRecord, type StoredDeliveryMaterial, type StoredFullShareLink, type StoredShareRecord, type TinyCloudShareIndexBackendOptions, type TinyCloudShareIndexClient, type VaultNetworkRead, WebShareRecordStore, agentIdFromDid, agentRecordBinding, agentRecordKey, agentRecordPrefix, assertLinkBoundToMaterial, attenuationCovers, checkAgentRecordSchema, checkRegistrationReceipt, claimRank, classifyRecordKey, compactShareRecord, createTinyCloudShareIndexBackend, decideClaim, deriveAgentKeyMaterial, displayName, expandShareRecord, headerBytes, isAgentId, isShareId, isSpaceOwnedBy, openAgentRecordAsAgent, openAgentRecordAsOwner, openDeliveryEnvelope, parseIndexDocument, parseSignedUcan, parseStoredAgentRecord, project, registeredAtFits, restoreShareRecordLink, sealAgentRecord, validateShareLink, verifyAgentRecordChain, verifyEnvelopeV3At, verifyOwnerSessionDelegation, verifyPolicyEnforcementDelegation };
@@ -1,5 +1,6 @@
1
1
  import { a as SenderShareRecordStorage, S as SenderShareRecord } from './history-kwJxrZgq.js';
2
2
  export { f as SenderShareRecordProofs } from './history-kwJxrZgq.js';
3
+ import { LinkHeaderV1, LinkSignatureV1 } from '@tinycloud/share-envelope/links';
3
4
  import { P as PublishedShareDeliveryMaterial, S as SignedDelegation, l as OwnerSharePolicyRegistration } from './owner-policy-aPmXIR3e.js';
4
5
  import { ShareEnvelopeV3 } from '@tinycloud/share-envelope';
5
6
 
@@ -469,21 +470,28 @@ declare class AgentShareRecordStore implements SenderShareRecordStorage {
469
470
  * sealed and rebuilt when needed by {@link openDeliveryEnvelope}, for the
470
471
  * verifier and a delivery retry. `sealedEnvelope` stays (the node reopens that
471
472
  * exact value and its nonce is random) and so does the session CACAO (it
472
- * proves the chain). A short `v=4` link the sender printed is kept (it is not
473
- * derivable: it carries an id only the links service knows) and must be the
474
- * link of this material; a full link is not kept (see {@link compactShareRecord}).
473
+ * proves the chain). Short links stay verbatim; full links keep their original
474
+ * renderer origin, signed header and signature beside the single sealed body.
475
+ * Details: TC-1739
475
476
  *
476
477
  * Security-sensitive: the sealed bytes are checked against `shareCid` before
477
478
  * they are opened, and the plaintext must be the canonical JSON of the
478
479
  * envelope, so a record cannot carry one envelope for display and another for
479
480
  * the node.
480
481
  */
481
- type StoredDeliveryMaterial = Omit<PublishedShareDeliveryMaterial, "envelope">;
482
+ interface StoredFullShareLink {
483
+ readonly origin: string;
484
+ readonly header: LinkHeaderV1;
485
+ readonly signature: LinkSignatureV1;
486
+ }
487
+ type StoredDeliveryMaterial = Omit<PublishedShareDeliveryMaterial, "envelope"> & {
488
+ readonly fullLink?: StoredFullShareLink;
489
+ };
482
490
  /** A share record as stored at an agent (or migrated) key: {@link SenderShareRecord} without derivable blobs. */
483
491
  type StoredShareRecord = Omit<SenderShareRecord, "deliveryMaterial"> & {
484
492
  readonly deliveryMaterial?: StoredDeliveryMaterial;
485
493
  };
486
- /** Keys of a stored `deliveryMaterial`, exactly. */
494
+ /** Required string fields; `fullLink` is optional original signed metadata. Details: TC-1739 */
487
495
  declare const STORED_DELIVERY_MATERIAL_KEYS: readonly string[];
488
496
  declare class DeliveryMaterialError extends Error {
489
497
  constructor(message: string);
@@ -497,22 +505,14 @@ declare function openDeliveryEnvelope(material: StoredDeliveryMaterial): Promise
497
505
  * Returns the link's form.
498
506
  */
499
507
  declare function assertLinkBoundToMaterial(link: string, material: StoredDeliveryMaterial): "short" | "full";
500
- /**
501
- * The stored form of `record`. For a Policy/v3 record (one with
502
- * `deliveryMaterial`), omits `deliveryMaterial.envelope` after checking it is
503
- * exactly what the sealed material opens to, and checks that a `link` is the
504
- * link of that material. A short link is kept. A full link is not: it embeds
505
- * the sealed envelope a second time, which the record size cap does not leave
506
- * room for, so the sender's own history holds it. Throws
507
- * {@link DeliveryMaterialError} otherwise.
508
- */
508
+ /** Stores the sealed body once and retains the original signed full-link wrapper. Details: TC-1739 */
509
509
  declare function compactShareRecord(record: SenderShareRecord | StoredShareRecord): Promise<StoredShareRecord>;
510
- /**
511
- * The full record again (for a delivery retry or a caller that wants the
512
- * {@link SenderShareRecord} shape): the envelope reopened from the sealed
513
- * material. The stored `link` is returned as it was stored.
514
- */
515
- declare function expandShareRecord(record: StoredShareRecord): Promise<SenderShareRecord>;
510
+ /** Verifies and restores original full-link metadata before owner admission. Details: TC-1739 */
511
+ declare function restoreShareRecordLink(record: StoredShareRecord, shareOrigins: readonly string[]): Promise<string | undefined>;
512
+ /** Expands stored material; owner admission additionally supplies trusted origins and verifies the chain. Details: TC-1739 */
513
+ declare function expandShareRecord(record: StoredShareRecord, options?: {
514
+ readonly shareOrigins?: readonly string[];
515
+ }): Promise<SenderShareRecord>;
516
516
 
517
517
  /**
518
518
  * Index document schema v1, rows, `project()`, and the versioned agent-record
@@ -643,6 +643,19 @@ declare function project(record: StoredShareRecord, input: {
643
643
  readonly expired: boolean;
644
644
  };
645
645
  }): ShareIndexRow;
646
+ interface AgentRecordSchemaContext {
647
+ readonly recordV: number;
648
+ readonly shareId: string;
649
+ readonly accountOwnerDid: string;
650
+ /** `hdr.agentDid` for agent records; "" for migrated records, which have no agent binding. */
651
+ readonly agentDid: string;
652
+ /**
653
+ * `agent`: a record in `records/agents/<id>/`, which may never claim a
654
+ * provenance. `migrated`: an owner-layout record that must claim
655
+ * `provenance: "migrated"` (one-time owner import).
656
+ */
657
+ readonly source: "agent" | "migrated";
658
+ }
646
659
  /**
647
660
  * Whether `spaceId` (`tinycloud:pkh:eip155:<chain>:<address>:<name>`) is a
648
661
  * space of the account `ownerDid` (`did:pkh:eip155:<chain>:<address>`),
@@ -650,11 +663,23 @@ declare function project(record: StoredShareRecord, input: {
650
663
  * records live in `applications`. Address spelling is ignored.
651
664
  */
652
665
  declare function isSpaceOwnedBy(spaceId: string, ownerDid: string): boolean;
666
+ /**
667
+ * `registeredAt` against signed times from the verified chain, never against
668
+ * when the owner happens to look: inside `[earliest, latest]` (already
669
+ * widened by {@link REGISTERED_AT_SKEW_MS} where the bound is an issuance
670
+ * time) and not in the future.
671
+ */
672
+ declare function registeredAtFits(registeredAt: string, window: {
673
+ readonly earliest?: number;
674
+ readonly latest?: number;
675
+ }, now: Date): boolean;
653
676
  /** A record refused by the schema. `provenance`: an agent-subtree record claiming `migrated`. */
654
677
  declare class ShareRecordSchemaError extends Error {
655
678
  readonly reason: "schema" | "provenance";
656
679
  constructor(reason: "schema" | "provenance");
657
680
  }
681
+ /** Throws {@link ShareRecordSchemaError} when the decrypted value fails the schema. */
682
+ declare function checkAgentRecordSchema(value: unknown, context: AgentRecordSchemaContext): StoredShareRecord;
658
683
 
659
684
  declare function claimRank(row: Pick<ShareIndexRow, "src" | "ps" | "pv">): number;
660
685
  type ClaimDecision = {
@@ -1058,4 +1083,4 @@ declare function checkRegistrationReceipt(value: unknown, expected: {
1058
1083
 
1059
1084
  declare function verifyEnvelopeV3At(envelope: ShareEnvelopeV3, expectedSignerDid: string, now: number): Promise<boolean>;
1060
1085
 
1061
- export { AGENT_ID_LENGTH, AGENT_RECORD_VERSION, type AgentKeyMaterial, AgentRecordError, type AgentRecordFailure, type AgentRecordHeader, type AgentRejectReason, AgentShareRecordStore, type AgentShareRecordStoreOptions, type Attenuation, type CasPolicy, type ChainContext, type ChainVerdict, type CheckedRegistration, type ClaimDecision, type ClassifiedRecordKey, DEFAULT_CAS_POLICY, DEFAULT_SHARE_INDEX_LIMITS, DeliveryMaterialError, INDEX_MAIN_KEY, INDEX_SCHEMA_VERSION, INVALID_ETAG_MESSAGE, MAX_AGENT_RECORD_BYTES, MemoryShareIndexOutbox, type OwnerNetworkUnwrap, type OwnerNetworkWrap, OwnerUnwrapUnavailableError, type ParsedSiweCacao, type RegistrationKey, SHARE_RECORDS_VAULT_PREFIX, STORED_DELIVERY_MATERIAL_KEYS, SUPPORTED_AGENT_RECORD_V, SenderShareIndex, type SenderShareIndexOptions, SenderShareRecord, type ShareDocumentRead, type ShareIndexAgentEntry, type ShareIndexArchiveDocument, type ShareIndexBackend, ShareIndexCasError, type ShareIndexCasErrorCode, type ShareIndexDocument, type ShareIndexFlushResult, type ShareIndexLimits, type ShareIndexLoad, type ShareIndexOp, type ShareIndexOutbox, type ShareIndexReconcileReport, type ShareIndexRow, type ShareIndexWriteOutcome, type ShareIndexWriteStatus, type ShareLinkCheck, type ShareLinkShape, type ShareListResult, type ShareProofState, type ShareRawRead, ShareRecordSchemaError, type ShareRegistrationKey, type ShareStatusPort, type ShareWriteCondition, type ShareWriteResult, type SignedUcanDelegation, type SiweCacaoParser, type StoredAgentRecord, type StoredDeliveryMaterial, type StoredShareRecord, type TinyCloudShareIndexBackendOptions, type TinyCloudShareIndexClient, type VaultNetworkRead, WebShareRecordStore, agentIdFromDid, agentRecordBinding, agentRecordKey, agentRecordPrefix, assertLinkBoundToMaterial, attenuationCovers, checkRegistrationReceipt, claimRank, classifyRecordKey, compactShareRecord, createTinyCloudShareIndexBackend, decideClaim, deriveAgentKeyMaterial, displayName, expandShareRecord, headerBytes, isAgentId, isShareId, isSpaceOwnedBy, openAgentRecordAsAgent, openAgentRecordAsOwner, openDeliveryEnvelope, parseIndexDocument, parseSignedUcan, parseStoredAgentRecord, project, sealAgentRecord, validateShareLink, verifyAgentRecordChain, verifyEnvelopeV3At, verifyOwnerSessionDelegation, verifyPolicyEnforcementDelegation };
1086
+ export { AGENT_ID_LENGTH, AGENT_RECORD_VERSION, type AgentKeyMaterial, AgentRecordError, type AgentRecordFailure, type AgentRecordHeader, type AgentRecordSchemaContext, type AgentRejectReason, AgentShareRecordStore, type AgentShareRecordStoreOptions, type Attenuation, type CasPolicy, type ChainContext, type ChainVerdict, type CheckedRegistration, type ClaimDecision, type ClassifiedRecordKey, DEFAULT_CAS_POLICY, DEFAULT_SHARE_INDEX_LIMITS, DeliveryMaterialError, INDEX_MAIN_KEY, INDEX_SCHEMA_VERSION, INVALID_ETAG_MESSAGE, MAX_AGENT_RECORD_BYTES, MemoryShareIndexOutbox, type OwnerNetworkUnwrap, type OwnerNetworkWrap, OwnerUnwrapUnavailableError, type ParsedSiweCacao, type RegistrationKey, SHARE_RECORDS_VAULT_PREFIX, STORED_DELIVERY_MATERIAL_KEYS, SUPPORTED_AGENT_RECORD_V, SenderShareIndex, type SenderShareIndexOptions, SenderShareRecord, type ShareDocumentRead, type ShareIndexAgentEntry, type ShareIndexArchiveDocument, type ShareIndexBackend, ShareIndexCasError, type ShareIndexCasErrorCode, type ShareIndexDocument, type ShareIndexFlushResult, type ShareIndexLimits, type ShareIndexLoad, type ShareIndexOp, type ShareIndexOutbox, type ShareIndexReconcileReport, type ShareIndexRow, type ShareIndexWriteOutcome, type ShareIndexWriteStatus, type ShareLinkCheck, type ShareLinkShape, type ShareListResult, type ShareProofState, type ShareRawRead, ShareRecordSchemaError, type ShareRegistrationKey, type ShareStatusPort, type ShareWriteCondition, type ShareWriteResult, type SignedUcanDelegation, type SiweCacaoParser, type StoredAgentRecord, type StoredDeliveryMaterial, type StoredFullShareLink, type StoredShareRecord, type TinyCloudShareIndexBackendOptions, type TinyCloudShareIndexClient, type VaultNetworkRead, WebShareRecordStore, agentIdFromDid, agentRecordBinding, agentRecordKey, agentRecordPrefix, assertLinkBoundToMaterial, attenuationCovers, checkAgentRecordSchema, checkRegistrationReceipt, claimRank, classifyRecordKey, compactShareRecord, createTinyCloudShareIndexBackend, decideClaim, deriveAgentKeyMaterial, displayName, expandShareRecord, headerBytes, isAgentId, isShareId, isSpaceOwnedBy, openAgentRecordAsAgent, openAgentRecordAsOwner, openDeliveryEnvelope, parseIndexDocument, parseSignedUcan, parseStoredAgentRecord, project, registeredAtFits, restoreShareRecordLink, sealAgentRecord, validateShareLink, verifyAgentRecordChain, verifyEnvelopeV3At, verifyOwnerSessionDelegation, verifyPolicyEnforcementDelegation };