HonoOptions
@rotorsoft/act-root / act-http/src/hono / HonoOptions
Type Alias: HonoOptions
HonoOptions =
object
Defined in: libs/act-http/src/hono/index.ts:102
Per-call options for hono. The host supplies the four seams the package can't make decisions on:
actorโ auth resolver. Receives the Hono context, returns theActorthat flows ontoc.get("actor")for every generated route (via an internal authenticated).streamโ stream-id resolver. Receives the action name, the validated body, and the Hono context; returns the target stream. Singleton aggregates return a constant; per-tenant aggregates pull from headers, path, or body.expectedVersion(optional) โ optimistic-concurrency resolver. Hosts typically read it from anIf-Matchheader on the request, or from the client's last-known snapshot. Returningundefinedskips the check for that call โ handy when only some actions are concurrency-sensitive.idempotency(optional) โ when set, the route honorsIdempotency-Keyvia withIdempotency. The host supplies theIdempotencyStore;keyFromdefaults to reading theIdempotency-Keyheader. On a duplicate claim, the route responds409 Conflictโ the contract intentionally doesn't cache the original handler's result, matching the receiver-side "ack the duplicate" semantics.basePath(optional, default"/api") โ Hono basePath the routes mount under.
Propertiesโ
actorโ
readonlyactor:ActorExtractor
Defined in: libs/act-http/src/hono/index.ts:103
basePath?โ
readonlyoptionalbasePath?:string
Defined in: libs/act-http/src/hono/index.ts:135
expectedVersion?โ
readonlyoptionalexpectedVersion?: (action_name,input,c) =>number|undefined|Promise<number|undefined>
Defined in: libs/act-http/src/hono/index.ts:109
Parametersโ
action_nameโ
string
inputโ
unknown
cโ
Context
Returnsโ
number | undefined | Promise<number | undefined>
idempotency?โ
readonlyoptionalidempotency?:object
Defined in: libs/act-http/src/hono/index.ts:114
keyFrom?โ
readonlyoptionalkeyFrom?: (c) =>string|undefined
Parametersโ
cโ
Context
Returnsโ
string | undefined
storeโ
readonlystore:IdempotencyStore
sse?โ
readonlyoptionalsse?:SseOptions
Defined in: libs/act-http/src/hono/index.ts:134
Optional SSE wiring. When set, the generator emits one
GET <basePath>/sse/<stateName>?stream=<streamId> per unique
state name in the registry. The endpoint runs the host
actor extractor, looks up the streamId from
?stream=..., opens a text/event-stream, yields the cached
state (if any), and forwards every patch published to the
shared SseOptions.channel. A heartbeat keeps proxies
from idling the connection out; the per-process connection cap
returns 503 Service Unavailable (with Retry-After: 1) when
full so operators never see silent stalls.
Off by default โ most APIs don't expose live state to every client, and opening one is widening both the auth and cost surface.
streamโ
readonlystream: (action_name,input,c) =>string|Promise<string>
Defined in: libs/act-http/src/hono/index.ts:104
Parametersโ
action_nameโ
string
inputโ
unknown
cโ
Context
Returnsโ
string | Promise<string>