Skip to content
2 min read · 385 words

Interface: RawRetrievable

Defined in: src/lib/classes/retrievable.ts:42

Plain input object supplied to Retrievable at construction time.

Remarks

Validated against rawRetrievableSchema before the Retrievable instance is created. Temporal fields accept any value that Luxon can parse — ISO strings, Unix timestamps, Date objects, or existing DateTime instances.

Properties

| Property | Type | Description | Defined in | | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | ---------- | ----- | ---- | --------------------------------------------------------------------------------------------------------------------------- | | artifactConstructor? | ArtifactConstructorResolver | Resolver for the spooled-artifact constructor used when plain content is auto-spooled; defaults to undefined (the base artifact). | src/lib/classes/retrievable.ts:75 | | content | | string | Tokenizable | SpooledArtifact | The retrieved content. A plain string or @nhtio/adk!Tokenizable for small inline text, or a @nhtio/adk!SpooledArtifact when the extracted text is large and lives in a consumer @nhtio/adk/common!ByteStore (persist it via @nhtio/adk!DispatchContext.storeRetrievableBytes, wrap the returned reader in a SpooledArtifact, and pass it here). Reader-backed content keeps the body out of the permanent heap, but token estimation and render still materialise it transiently (see Retrievable.estimateTokens). | src/lib/classes/retrievable.ts:56 | | createdAt | string | number | Date | DateTime<boolean> | When the source record was created (publication date, upload date, etc.). | src/lib/classes/retrievable.ts:69 | | id | string | Stable unique identifier for this retrieved record. Used as the closing-tag nonce in the rendered envelope, so it must be unguessable from the payload. | src/lib/classes/retrievable.ts:47 | | inline? | boolean | Whether to render this record inline rather than as a retrievable handle; defaults to false. | src/lib/classes/retrievable.ts:73 | | kind? | string | Optional semantic label: 'policy' | 'reference' | 'web-page' | 'pdf' | etc. | src/lib/classes/retrievable.ts:65 | | score? | number | Optional relevance / similarity score in [0, 1] from the retrieval middleware. | src/lib/classes/retrievable.ts:67 | | source? | string | Optional provenance string: URL, document path, knowledge-base id, etc. | src/lib/classes/retrievable.ts:63 | | trustTier | RetrievableTrustTier | Trust tier declared by the retrieval middleware at construction time. Required — there is NO default. The decision must be conscious. See RetrievableTrustTier. | src/lib/classes/retrievable.ts:61 | | updatedAt | string | number | Date | DateTime<boolean> | When the source record was last modified. | src/lib/classes/retrievable.ts:71 |