API reference
gills
Import
Section titled “Import”import * as api from "@fungi.computer/agar/gills";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | AppBackendGill | App-owned projection; methods keep their ordinary domain-shaped output. |
| function | decodeGillRefusal() | Decode the App host’s strict isolation refusal into its permanent Gill state. |
| function | defineAppGill() | Define a compact view of one of this App’s declared read methods. |
AppBackendGilltype alias
Section titled “AppBackendGill”type AppBackendGill = Readonly<{ declaration: AppDeclaredGill; limit: number; input: (selection) => Readonly<{ [key: string]: WhistleJsonValue; limit: number; }>; parseCall: (raw) => GillCall; call: (selection, read) => Promise<GillReply>; rows: (output, context) => GillResponse;}>;App-owned projection; methods keep their ordinary domain-shaped output.
decodeGillRefusal()function
Section titled “decodeGillRefusal()”function decodeGillRefusal( raw, declaration,): | { viewId: string; title: string; state: "empty"; rows: readonly []; next?: string; } | { viewId: string; title: string; state: "error"; rows: readonly []; reason?: "exec_isolation_required" | "params_required"; error: string; recovery?: | { kind: "configure"; param: string; } | { kind: "open"; }; } | { viewId: string; title: string; state: "full"; rows: readonly object[]; next?: string; } | undefined;Decode the App host’s strict isolation refusal into its permanent Gill state.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
raw |
unknown |
declaration |
Readonly<{ id: string; title: string; }> |
Returns
Section titled “Returns”Type Literal
Section titled “Type Literal”{ viewId: string; title: string; state: "empty"; rows: readonly []; next?: string;}Type Literal
Section titled “Type Literal”{ viewId: string; title: string; state: "error"; rows: readonly []; reason?: "exec_isolation_required" | "params_required"; error: string; recovery?: | { kind: "configure"; param: string; } | { kind: "open"; };}| Name | Type | Description |
|---|---|---|
viewId |
string |
- |
title |
string |
- |
state |
"error" |
- |
rows |
readonly [] |
- |
reason? |
"exec_isolation_required" | "params_required" |
Host-owned permanent execution refusal; an ordinary error may still be refreshed. |
error |
string |
- |
recovery? |
| { kind: "configure"; param: string; } | { kind: "open"; } |
The host supplies the same-placement picker and this App’s launch. |
Type Literal
Section titled “Type Literal”{ viewId: string; title: string; state: "full"; rows: readonly object[]; next?: string;}undefined
defineAppGill()function
Section titled “defineAppGill()”function defineAppGill(options): AppBackendGill;Define a compact view of one of this App’s declared read methods.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
Readonly<{ id: string; title: string; source: string; limit: number; sizes?: readonly AppGillDesktopSize[]; params?: readonly AppGillParam[]; watch?: AppGillWatch; input: AppBackendGill["input"]; rows: AppBackendGill["rows"]; }> |