gills
Import
Section titled “Import”import * as api from "@fungi.computer/gills";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | AppGillDesktopSize | Sizes the App explicitly offers for a desktop Gill. |
| type alias | AppGillParam | One App-owned placement selector. |
| type alias | AppGillWatch | An existing change feed used to refresh a Gill. |
| type alias | AppDeclaredGill | A digest-covered projection of one declared read method. |
| type alias | GillRequest | Selectors supplied by a Gill caller. |
| type alias | GillCall | Input to the generated backend Gill entry. |
| type alias | GillResponse | A decoded page of plain-text Gill rows or a bounded error. |
| type alias | GillOptionsResponse | Choices remain within the selected App; the host supplies Computer choices. |
| type alias | GillReply | A rows read or a placement-options read. |
| type alias | RowV1 | One shared, bounded data row; the host owns navigation and execution. |
| constant | appGillParamKeySchema | Bounded, App-owned parameter key. |
| constant | appGillParamSchema | Placement parameter metadata, included in the Release digest. |
| constant | appGillParamsSchema | The bounded, uniquely keyed placement parameters shared with desktop catalogs. |
| constant | appGillWatchSchema | A storage marker or host binding’s existing change feed. |
| constant | appDeclaredGillSchema | Digest-covered identity, source, context and desktop sizes of a Gill. |
| constant | gillParamsSchema | Placement values are bounded; the admitting host checks declared keys. |
| constant | gillRequestSchema | The caller supplies placement context and a source-owned continuation. |
| constant | gillCallSchema | Runtime call selected by the host after admitting a declared source. |
| constant | gillResponseSchema | Shared response codec. Rows are plain text and cannot carry executable UI. |
| constant | decodeGillResponse | Decode backend output once at the App host boundary. |
| constant | gillOptionsResponseSchema | A bounded choice page returned by an App-owned options read method. |
| constant | gillReplySchema | Shared wire for a rows read or a placement-options read. |
| constant | decodeGillReply | Decode the selected host’s bounded reply before rendering or navigation. |
| constant | decodeGillOptionsResponse | Decode an options method’s result without trusting extra fields. |
| constant | rowLabelSchemaV1 | Nonempty display text, bounded to 4,096 characters. |
| constant | rowIdentitySchemaV1 | Producer-owned row identity, bounded to 513 characters. |
| constant | rowOpenSchemaV1 | A navigation parameter interpreted only by the receiving App. |
| constant | rowSchemaV1 | A bounded text row; each receiving host authorizes its open target. |
| constant | rowPageSchemaV1 | A page containing at most 200 shared rows. |
| function | decodeDeclaredGillResponse() | App output must match its digest-covered view identity. |
| function | createGillClient() | Authenticated host Fetch stays outside App code and is pinned to one selection. |
AppGillDesktopSizetype alias
Section titled “AppGillDesktopSize”type AppGillDesktopSize = "S" | "M" | "L";Sizes the App explicitly offers for a desktop Gill.
AppGillParamtype alias
Section titled “AppGillParam”type AppGillParam = Readonly<{ key: string; label: string; kind: "computer" | "repository" | "branch"; required: boolean; options?: string;}>;One App-owned placement selector.
AppGillWatchtype alias
Section titled “AppGillWatch”type AppGillWatch = Readonly< | { storage: string; } | { binding: string; }>;An existing change feed used to refresh a Gill.
AppDeclaredGilltype alias
Section titled “AppDeclaredGill”type AppDeclaredGill = Readonly<{ id: string; source: string; title: string; params?: readonly AppGillParam[]; watch?: AppGillWatch; desktop?: Readonly<{ sizes: readonly AppGillDesktopSize[]; }>;}>;A digest-covered projection of one declared read method.
GillRequesttype alias
Section titled “GillRequest”type GillRequest = Schema.Schema.Type<typeof gillRequestSchema>;Selectors supplied by a Gill caller.
GillCalltype alias
Section titled “GillCall”type GillCall = Schema.Schema.Type<typeof gillCallSchema>;Input to the generated backend Gill entry.
GillResponsetype alias
Section titled “GillResponse”type GillResponse = Schema.Schema.Type<typeof gillResponseSchema>;A decoded page of plain-text Gill rows or a bounded error.
GillOptionsResponsetype alias
Section titled “GillOptionsResponse”type GillOptionsResponse = Schema.Schema.Type<typeof gillOptionsResponseSchema>;Choices remain within the selected App; the host supplies Computer choices.
GillReplytype alias
Section titled “GillReply”type GillReply = Schema.Schema.Type<typeof gillReplySchema>;A rows read or a placement-options read.
RowV1type alias
Section titled “RowV1”type RowV1 = Schema.Schema.Type<typeof rowSchemaV1>;One shared, bounded data row; the host owns navigation and execution.
appGillParamKeySchemaconstant
Section titled “appGillParamKeySchema”const appGillParamKeySchema: String;Bounded, App-owned parameter key.
appGillParamSchemaconstant
Section titled “appGillParamSchema”const appGillParamSchema: Struct<{ key: String; label: String; kind: Literals<readonly ["computer", "repository", "branch"]>; required: Boolean; options: optional<String>;}>;Placement parameter metadata, included in the Release digest.
appGillParamsSchemaconstant
Section titled “appGillParamsSchema”const appGillParamsSchema: $Array< Struct<{ key: String; label: String; kind: Literals<readonly ["computer", "repository", "branch"]>; required: Boolean; options: optional<String>; }>>;The bounded, uniquely keyed placement parameters shared with desktop catalogs.
appGillWatchSchemaconstant
Section titled “appGillWatchSchema”const appGillWatchSchema: Union< readonly [ Struct<{ storage: String; }>, Struct<{ binding: String; }>, ]>;A storage marker or host binding’s existing change feed.
appDeclaredGillSchemaconstant
Section titled “appDeclaredGillSchema”const appDeclaredGillSchema: Schema.Codec<AppDeclaredGill>;Digest-covered identity, source, context and desktop sizes of a Gill.
gillParamsSchemaconstant
Section titled “gillParamsSchema”const gillParamsSchema: $Record<String, String>;Placement values are bounded; the admitting host checks declared keys.
gillRequestSchemaconstant
Section titled “gillRequestSchema”const gillRequestSchema: Struct<{ viewId: String; params: optional<$Record<String, String>>; after: optional<String>; options: optional<String>;}>;The caller supplies placement context and a source-owned continuation.
gillCallSchemaconstant
Section titled “gillCallSchema”const gillCallSchema: Struct<{ id: String; params: optional<$Record<String, String>>; after: optional<String>; options: optional<String>;}>;Runtime call selected by the host after admitting a declared source.
gillResponseSchemaconstant
Section titled “gillResponseSchema”const gillResponseSchema: Union<readonly [Struct<{ viewId: String; title: String; state: Literal<"empty">; rows: Tuple<readonly []>; next: optional<String>;}>, Struct<{ viewId: String; title: String; state: Literal<"error">; rows: Tuple<readonly []>; reason: optional<Literals<readonly ["exec_isolation_required", "params_required"]>>; error: String; recovery: optional<Union<readonly [Struct<{ kind: Literal<"configure">; param: String; }>, Struct<{ kind: Literal<"open">; }>]>>;}>, Struct<{ viewId: String; title: String; state: Literal<"full">; rows: $Array<Struct<{ id: String; title: String; detail: optional<String>; tone: optional<Literals<readonly ["attention", "running", "error", "settled", "muted"]>>; status: optional<Struct<{ label: String; tone: Literals<...>; }>>; open: optional<Struct<{ params: $Array<...>; }>>; }>>; next: optional<String>;}>]>;Shared response codec. Rows are plain text and cannot carry executable UI.
decodeGillResponseconstant
Section titled “decodeGillResponse”const decodeGillResponse: ( input, options?,) => | { 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; };Decode backend output once at the App host boundary.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
unknown |
options? |
ParseOptions |
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 | Default value | Description |
|---|---|---|---|
viewId |
string |
identity |
- |
title |
string |
label |
- |
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;}gillOptionsResponseSchemaconstant
Section titled “gillOptionsResponseSchema”const gillOptionsResponseSchema: Struct<{ options: $Array< Struct<{ value: String; label: String; detail: optional<String>; }> >; next: optional<String>;}>;A bounded choice page returned by an App-owned options read method.
gillReplySchemaconstant
Section titled “gillReplySchema”const gillReplySchema: Union<readonly [Union<readonly [Struct<{ viewId: String; title: String; state: Literal<"empty">; rows: Tuple<readonly []>; next: optional<String>;}>, Struct<{ viewId: String; title: String; state: Literal<"error">; rows: Tuple<readonly []>; reason: optional<Literals<readonly ["exec_isolation_required", "params_required"]>>; error: String; recovery: optional<Union<readonly [Struct<{ kind: ...; param: ...; }>, Struct<{ kind: ...; }>]>>;}>, Struct<{ viewId: String; title: String; state: Literal<"full">; rows: $Array<Struct<{ id: String; title: String; detail: optional<String>; tone: optional<Literals<...>>; status: optional<Struct<...>>; open: optional<Struct<...>>; }>>; next: optional<String>;}>]>, Struct<{ options: $Array<Struct<{ value: String; label: String; detail: optional<String>; }>>; next: optional<String>;}>]>;Shared wire for a rows read or a placement-options read.
decodeGillReplyconstant
Section titled “decodeGillReply”const decodeGillReply: ( input, options?,) => | { 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; } | { options: readonly object[]; next?: string; };Decode the selected host’s bounded reply before rendering or navigation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
unknown |
options? |
ParseOptions |
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 | Default value | Description |
|---|---|---|---|
viewId |
string |
identity |
- |
title |
string |
label |
- |
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;}Type Literal
Section titled “Type Literal”{ options: readonly object[]; next?: string;}decodeGillOptionsResponseconstant
Section titled “decodeGillOptionsResponse”const decodeGillOptionsResponse: (input, options?) => object;Decode an options method’s result without trusting extra fields.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
unknown |
options? |
ParseOptions |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
options |
readonly object[] |
next? |
string |
rowLabelSchemaV1constant
Section titled “rowLabelSchemaV1”const rowLabelSchemaV1: String;Nonempty display text, bounded to 4,096 characters.
rowIdentitySchemaV1constant
Section titled “rowIdentitySchemaV1”const rowIdentitySchemaV1: String;Producer-owned row identity, bounded to 513 characters.
rowOpenSchemaV1constant
Section titled “rowOpenSchemaV1”const rowOpenSchemaV1: Struct<{ params: $Array< Struct<{ key: String; value: String; }> >;}>;A navigation parameter interpreted only by the receiving App.
rowSchemaV1constant
Section titled “rowSchemaV1”const rowSchemaV1: Struct<{ id: String; title: String; detail: optional<String>; tone: optional< Literals<readonly ["attention", "running", "error", "settled", "muted"]> >; status: optional< Struct<{ label: String; tone: Literals< readonly [ "neutral", "primary", "secondary", "accent", "success", "info", "warning", "error", ] >; }> >; open: optional< Struct<{ params: $Array< Struct<{ key: String; value: String; }> >; }> >;}>;A bounded text row; each receiving host authorizes its open target.
rowPageSchemaV1constant
Section titled “rowPageSchemaV1”const rowPageSchemaV1: $Array< Struct<{ id: String; title: String; detail: optional<String>; tone: optional< Literals<readonly ["attention", "running", "error", "settled", "muted"]> >; status: optional< Struct<{ label: String; tone: Literals< readonly [ "neutral", "primary", "secondary", "accent", "success", "info", "warning", "error", ] >; }> >; open: optional< Struct<{ params: $Array< Struct<{ key: String; value: String; }> >; }> >; }>>;A page containing at most 200 shared rows.
decodeDeclaredGillResponse()function
Section titled “decodeDeclaredGillResponse()”function decodeDeclaredGillResponse( response, 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; };App output must match its digest-covered view identity.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
response |
| { 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; } |
declaration |
Pick<AppDeclaredGill, "id" | "params"> |
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 | Default value | Description |
|---|---|---|---|
viewId |
string |
identity |
- |
title |
string |
label |
- |
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;}createGillClient()function
Section titled “createGillClient()”function createGillClient(options): object;Authenticated host Fetch stays outside App code and is pinned to one selection.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
Readonly<{ decodeRefusal?: (raw, declaration) => GillResponse | undefined; endpoint: string; fetch: typeof globalThis.fetch; declaration: Pick<AppDeclaredGill, "id" | "title" | "params">; }> |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
request() |
(selectors, signal?) => Promise< | { 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; } | { options: readonly object[]; next?: string; }> |
Fetch one decoded page using this client’s pinned declaration. |