Skip to content
API reference

gills

Import
import * as api from "@fungi.computer/agar/gills";
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”
Signature
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()”
Signature
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.

Parameter Type
raw unknown
declaration Readonly<{ id: string; title: string; }>
Signature
{
viewId: string;
title: string;
state: "empty";
rows: readonly [];
next?: string;
}

Signature
{
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.

Signature
{
viewId: string;
title: string;
state: "full";
rows: readonly object[];
next?: string;
}

undefined


defineAppGill()function

Section titled “defineAppGill()”
Signature
function defineAppGill(options): AppBackendGill;

Define a compact view of one of this App’s declared read methods.

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"]; }>

AppBackendGill