client-entry
Import
Section titled “Import”import * as api from "@fungi.computer/shiitake/client-entry";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | ClientChipV1 | An admitted, display-only status chip. |
| type alias | ClientTimelineCellV1 | An admitted committed event with its producer identity and anchor. |
| type alias | ClientContributionV1 | The closed V1 presentation grammar returned by a client entry. |
| type alias | ClientExtensionContextV1 | Borrowed latest-value activity; each iterator subscribes separately. |
| type alias | ClientEntryV1 | Installed client protocol; projection decoding remains inside the author closure. |
| type alias | ClientActivityV0 | Activity already observed by the client, never an execution authority. |
| constant | clientChipSchemaV1 | One display-only status chip; order is local to the entry. |
| constant | clientTimelineCellSchemaV1 | One committed presentation event anchored to its real command, if any. |
| constant | clientContributionSchemaV1 | Closed, bounded presentation data shared by every renderer. |
| constant | parseClientEntryV1 | Admit exactly V1; installed executable code is not sandboxed. |
| function | defineClientEntry() | One typed author seam, usable with ordinary async attachment code. |
| function | viewExtension() | Decode one observed slot using its owning contract’s projection. |
ClientChipV1type alias
Section titled “ClientChipV1”type ClientChipV1 = typeof clientChipSchemaV1.Type;An admitted, display-only status chip.
ClientTimelineCellV1type alias
Section titled “ClientTimelineCellV1”type ClientTimelineCellV1 = typeof clientTimelineCellSchemaV1.Type;An admitted committed event with its producer identity and anchor.
ClientContributionV1type alias
Section titled “ClientContributionV1”type ClientContributionV1 = typeof clientContributionSchemaV1.Type;The closed V1 presentation grammar returned by a client entry.
ClientExtensionContextV1type alias
Section titled “ClientExtensionContextV1”type ClientExtensionContextV1 = Readonly<{ activity: AsyncIterable<ClientActivityV0>; signal: AbortSignal; onError: (error) => void;}>;Borrowed latest-value activity; each iterator subscribes separately.
ClientEntryV1type alias
Section titled “ClientEntryV1”type ClientEntryV1 = Readonly<{ protocol: "shiitake.client/v1"; id: ExtensionId; correlatedPrompts?: "note"; attach?: (context) => Effect.Effect<void, Error, Scope.Scope>; contribute?: (slot) => ClientContributionV1;}>;Installed client protocol; projection decoding remains inside the author closure.
ClientActivityV0type alias
Section titled “ClientActivityV0”type ClientActivityV0 = "idle" | "working" | "blocked" | "unknown";Activity already observed by the client, never an execution authority.
clientChipSchemaV1constant
Section titled “clientChipSchemaV1”const clientChipSchemaV1: Struct<{ id: String; order: Number; row: Struct<{ id: String; title: String; detail: optional<String>; tone: optional< Literals<readonly ["attention", "running", "error", "settled", "muted"]> >; open: optional< Struct<{ kind: Literal<"session">; agentId: String; sessionId: String; }> >; actions: optional< $Array< Struct<{ id: String; label: String; input: optional<Codec<Json, Json, never, never>>; }> > >; }>; compact: optional<String>;}>;One display-only status chip; order is local to the entry.
clientTimelineCellSchemaV1constant
Section titled “clientTimelineCellSchemaV1”const clientTimelineCellSchemaV1: Struct<{ id: String; sequence: Int; at: Int; commandId: NullOr<String>; rows: $Array<Struct<{ id: String; title: String; detail: optional<String>; tone: optional<Literals<readonly ["attention", "running", "error", "settled", "muted"]>>; open: optional<Struct<{ kind: Literal<"session">; agentId: String; sessionId: String; }>>; actions: optional<$Array<Struct<{ id: String; label: String; input: optional<Codec<..., ..., ..., ...>>; }>>>; }>>;}>;One committed presentation event anchored to its real command, if any.
clientContributionSchemaV1constant
Section titled “clientContributionSchemaV1”const clientContributionSchemaV1: Struct<{ chips: $Array<Struct<{ id: String; order: Number; row: Struct<{ id: String; title: String; detail: optional<String>; tone: optional<Literals<readonly ["attention", "running", "error", "settled", "muted"]>>; open: optional<Struct<{ kind: Literal<...>; agentId: String; sessionId: String; }>>; actions: optional<$Array<Struct<{ id: ...; label: ...; input: ...; }>>>; }>; compact: optional<String>; }>>; panel: $Array<Struct<{ id: String; title: String; detail: optional<String>; tone: optional<Literals<readonly ["attention", "running", "error", "settled", "muted"]>>; open: optional<Struct<{ kind: Literal<"session">; agentId: String; sessionId: String; }>>; actions: optional<$Array<Struct<{ id: String; label: String; input: optional<Codec<..., ..., ..., ...>>; }>>>; }>>; timeline: Struct<{ cells: $Array<Struct<{ id: String; sequence: Int; at: Int; commandId: NullOr<String>; rows: $Array<Struct<{ id: String; title: String; detail: optional<...>; tone: optional<...>; open: optional<...>; actions: optional<...>; }>>; }>>; omitted: Int; }>; waiting: NullOr<Struct<{ summary: String; cancel: Struct<{ id: String; label: String; input: optional<Codec<Json, Json, never, never>>; }>; }>>;}>;Closed, bounded presentation data shared by every renderer.
parseClientEntryV1constant
Section titled “parseClientEntryV1”const parseClientEntryV1: ( input, options?,) => Readonly<{ protocol: "shiitake.client/v1"; id: string & Brand<"ExtensionId">; correlatedPrompts?: "note"; attach?: (context) => Effect<void, Error, Scope>; contribute?: (slot) => object;}> = decodeEntry;Admit exactly V1; installed executable code is not sandboxed.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
unknown |
options? |
ParseOptions |
Returns
Section titled “Returns”Readonly<{ protocol: "shiitake.client/v1"; id: string &
Brand<"ExtensionId">; correlatedPrompts?: "note"; attach?:
(context) => Effect<void, Error, Scope>; contribute?: (slot) =>
object; }>
defineClientEntry()function
Section titled “defineClientEntry()”function defineClientEntry<C, P, PI>(contract, client): ClientEntryV1;One typed author seam, usable with ordinary async attachment code.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
C extends Readonly<Record<string, Readonly<{ scope: "session" | "agent"; input: Codec<unknown>; output: Codec<unknown>; }>>> |
P |
PI |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
contract |
ExtensionContractV0<C, P, PI> |
client |
Readonly<{ correlatedPrompts?: ClientEntryV1["correlatedPrompts"]; attach?: (context) => | void | Promise<void> | Effect.Effect<void, Error, Scope.Scope>; contribute?: (view) => ClientContributionV1; }> |
Returns
Section titled “Returns”viewExtension()function
Section titled “viewExtension()”function viewExtension<C, P, PI>(contract, slot): ExtensionViewV0<P>;Decode one observed slot using its owning contract’s projection.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
C extends Readonly<Record<string, Readonly<{ scope: "session" | "agent"; input: Codec<unknown>; output: Codec<unknown>; }>>> |
P |
PI |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
contract |
ExtensionContractV0<C, P, PI> |
slot |
ExtensionSlotV0 | undefined |