Interfaces

SqliteArtifacts

Interface: SqliteArtifacts

Defined in: src/artifacts/sqliteArtifacts.ts:100

The store, plus the three things a real file store owes beyond the port.

Extends

Properties

journalMode

readonly journalMode: string

Defined in: src/artifacts/sqliteArtifacts.ts:102

The journal mode the file ACTUALLY has, read back from SQLite.

Methods

close()

close(): void

Defined in: src/artifacts/sqliteArtifacts.ts:104

Close the file. Idempotent; using the store afterwards refuses by name.

Returns

void


delete()

delete(scope, ref): Promise<void>

Defined in: src/artifacts/types.ts:243

Remove one artifact. No-op when it does not exist — deleting an absence is not an error, it is agreement.

Parameters

scope

MemoryIdentity

ref

string

Returns

Promise<void>

Inherited from

ArtifactStore.delete


get()

get(scope, ref): Promise<ArtifactRecord | null>

Defined in: src/artifacts/types.ts:239

The ticket and the payload. null for missing-or-expired. When the meta carries a digest, the payload is re-verified here — a mismatch throws ArtifactIntegrityError, never returns corrupt bytes as if whole.

Parameters

scope

MemoryIdentity

ref

string

Returns

Promise<ArtifactRecord | null>

Inherited from

ArtifactStore.get


getStream()?

optional getStream(scope, ref): Promise<ArtifactStreamRecord | null>

Defined in: src/artifacts/types.ts:274

OPTIONAL — read a payload as a stream of its canonical bytes. null for missing-or-expired, exactly like get. Absent on stores that would have to read the payload whole to answer; detect with canGetArtifactStream(store).

A digest on the meta is NOT re-verified here — verification needs the whole payload, which is the thing this member exists to avoid. get remains the verifying read, and the difference is stated rather than silently traded.

Parameters

scope

MemoryIdentity

ref

string

Returns

Promise<ArtifactStreamRecord | null>

Inherited from

ArtifactStore.getStream


head(scope, ref): Promise<ArtifactMeta | null>

Defined in: src/artifacts/types.ts:232

The ticket without the payload — the render-by-ref decision. null for missing-or-expired (the deliberate ambiguity; both mean "no data").

Parameters

scope

MemoryIdentity

ref

string

Returns

Promise<ArtifactMeta | null>

Inherited from

ArtifactStore.head


list()

list(scope, options?): Promise<ArtifactListResult>

Defined in: src/artifacts/types.ts:246

Page through this scope's tickets, newest first.

Parameters

scope

MemoryIdentity

options?

ArtifactListOptions

Returns

Promise<ArtifactListResult>

Inherited from

ArtifactStore.list


put()

put(scope, input): Promise<ArtifactPutResult>

Defined in: src/artifacts/types.ts:226

Store a payload; mint and return the ticket. Validates the input (a malformed put is refused by name), validates parentRefs resolve in the SAME scope, measures, optionally digests, stamps expiresAt from the store's retention — and reports what retention swept to make room.

Parameters

scope

MemoryIdentity

input

PutArtifactInput

Returns

Promise<ArtifactPutResult>

Inherited from

ArtifactStore.put


putStream()?

optional putStream(scope, input, body): Promise<ArtifactPutResult>

Defined in: src/artifacts/types.ts:257

OPTIONAL — store a payload the caller streams, without either side holding it whole. Absent on stores that cannot honor that promise; detect with canPutArtifactStream(store) before calling.

The stream is consumed exactly once. Everything else is put's law: parentRefs are proven first, retention plans against the DECLARED bytes, and the sweep rides the result.

Parameters

scope

MemoryIdentity

input

ArtifactStreamPutInput

body

ReadableStream<Uint8Array>

Returns

Promise<ArtifactPutResult>

Inherited from

ArtifactStore.putStream

On this page