inspection
Import
Section titled “Import”import * as api from "@fungi.computer/carrier/inspection";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| class | DeliveryInspectionError | Stable inspection errors never include stored cargo or raw SQL failures. |
| type alias | DeliveryInspectionPageQuery | An email receipt page uses the same producer-key pagination. |
| type alias | DeliveryInspectionQuery | Input to one producer-local inspection. Cursors are producer keys, without storage prefixes. |
| type alias | PostReceiptSummary | Metadata for one retained Post row. |
| type alias | PostInspectionPage | One read of producer-local Post dispatch evidence. |
| type alias | CarrierInspectionPage | One read of aggregate email dispatch evidence. |
| constant | DeliveryInspectionPageQuerySchema | One bounded scan; an empty filtered page can still have a continuation. |
| constant | DeliveryInspectionQuerySchema | Post can filter dead letters while scanning at most one bounded page. |
| constant | PostReceiptSummarySchema | Dispatch evidence deliberately omits the address and event. |
| constant | PostInspectionPageSchema | Bounded evidence with an explicit distinction between empty and uninitialized storage. |
| constant | CarrierReceiptSummarySchema | Aggregate email evidence without bodies, headers or recipient addresses. |
| constant | CarrierInspectionPageSchema | Carrier’s bounded metadata page; unavailable storage is never reported as empty. |
| function | createDeliveryInspection() | Read existing storage without opening a sender, initializing tables, repairing jobs or arming a wake. The trusted host must admit an operator before calling. |
DeliveryInspectionErrorclass
Section titled “DeliveryInspectionError”Stable inspection errors never include stored cargo or raw SQL failures.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DeliveryInspectionError(code): DeliveryInspectionError;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
code |
"unavailable" | "invalid_query" |
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor;Properties
Section titled “Properties”readonly code: "unavailable" | "invalid_query";DeliveryInspectionPageQuerytype alias
Section titled “DeliveryInspectionPageQuery”type DeliveryInspectionPageQuery = Schema.Codec.Encoded< typeof DeliveryInspectionPageQuerySchema>;An email receipt page uses the same producer-key pagination.
DeliveryInspectionQuerytype alias
Section titled “DeliveryInspectionQuery”type DeliveryInspectionQuery = Schema.Codec.Encoded< typeof DeliveryInspectionQuerySchema>;Input to one producer-local inspection. Cursors are producer keys, without storage prefixes.
PostReceiptSummarytype alias
Section titled “PostReceiptSummary”type PostReceiptSummary = Schema.Schema.Type<typeof PostReceiptSummarySchema>;Metadata for one retained Post row.
PostInspectionPagetype alias
Section titled “PostInspectionPage”type PostInspectionPage = Schema.Schema.Type<typeof PostInspectionPageSchema>;One read of producer-local Post dispatch evidence.
CarrierInspectionPagetype alias
Section titled “CarrierInspectionPage”type CarrierInspectionPage = Schema.Schema.Type< typeof CarrierInspectionPageSchema>;One read of aggregate email dispatch evidence.
DeliveryInspectionPageQuerySchemaconstant
Section titled “DeliveryInspectionPageQuerySchema”const DeliveryInspectionPageQuerySchema: Struct<{ limit: withDecodingDefaultType<Int, never>; after: optional<String>;}>;One bounded scan; an empty filtered page can still have a continuation.
DeliveryInspectionQuerySchemaconstant
Section titled “DeliveryInspectionQuerySchema”const DeliveryInspectionQuerySchema: Struct<{ limit: withDecodingDefaultType<Int, never>; after: optional<String>; view: Literals<readonly ["receipts", "deadLetters"]>;}>;Post can filter dead letters while scanning at most one bounded page.
PostReceiptSummarySchemaconstant
Section titled “PostReceiptSummarySchema”const PostReceiptSummarySchema: Union< readonly [ Struct<{ key: String; state: Literal<"delivered">; }>, Struct<{ key: String; state: Literal<"pending">; kind: String; attempts: Int; nextAttemptAt: Number; }>, Struct<{ key: String; state: Literal<"dead">; kind: String; attempts: Int; reason: Literals<readonly ["refused", "exhausted", "expired"]>; }>, ]>;Dispatch evidence deliberately omits the address and event.
PostInspectionPageSchemaconstant
Section titled “PostInspectionPageSchema”const PostInspectionPageSchema: Union<readonly [Struct<{ status: Literal<"uninitialized">;}>, Struct<{ status: Literal<"available">; records: $Array<Union<readonly [Struct<{ key: String; state: Literal<"delivered">; }>, Struct<{ key: String; state: Literal<"pending">; kind: String; attempts: Int; nextAttemptAt: Number; }>, Struct<{ key: String; state: Literal<"dead">; kind: String; attempts: Int; reason: Literals<readonly [..., ..., ...]>; }>]>>; nextCursor: NullOr<String>;}>]>;Bounded evidence with an explicit distinction between empty and uninitialized storage.
CarrierReceiptSummarySchemaconstant
Section titled “CarrierReceiptSummarySchema”const CarrierReceiptSummarySchema: Struct<{ id: String; status: Literals< readonly [ "queued", "dispatching", "provider_accepted", "outcome_unknown", "rejected", "refused", "expired", "superseded", ] >; attempts: Int; retryAt: NullOr<Number>; providerMessageId: optional<NonEmptyString>; providerRejection: optional< Struct<{ code: NonEmptyString; class: Literals<readonly ["permanent", "temporary"]>; }> >;}>;Aggregate email evidence without bodies, headers or recipient addresses.
CarrierInspectionPageSchemaconstant
Section titled “CarrierInspectionPageSchema”const CarrierInspectionPageSchema: Union<readonly [Struct<{ status: Literal<"uninitialized">;}>, Struct<{ status: Literal<"available">; records: $Array<Struct<{ id: String; status: Literals<readonly ["queued", "dispatching", "provider_accepted", "outcome_unknown", "rejected", "refused", "expired", "superseded"]>; attempts: Int; retryAt: NullOr<Number>; providerMessageId: optional<NonEmptyString>; providerRejection: optional<Struct<{ code: NonEmptyString; class: Literals<...>; }>>; }>>; nextCursor: NullOr<String>;}>]>;Carrier’s bounded metadata page; unavailable storage is never reported as empty.
createDeliveryInspection()function
Section titled “createDeliveryInspection()”function createDeliveryInspection(sql): object;Read existing storage without opening a sender, initializing tables, repairing jobs or arming a wake. The trusted host must admit an operator before calling.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sql |
Readonly<{ exec: (statement, …bindings) => WatchdogSqliteCursor; }> |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
email() |
(input) => | { status: "uninitialized"; } | { status: "available"; records: readonly object[]; nextCursor: string | null; } |
Read aggregate dispatch evidence without email cargo or recipient addresses. |
post() |
(input) => | { status: "uninitialized"; } | { status: "available"; records: readonly ( | { key: string; state: "delivered"; } | { key: string; state: "pending"; kind: string; attempts: number; nextAttemptAt: number; } | { key: string; state: "dead"; kind: string; attempts: number; reason: "expired" | "refused" | "exhausted"; })[]; nextCursor: string | null; } |
Read Post metadata; filtered pages retain their continuation through other states. |