@fungi.computer/gills 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gill.d.ts +4 -4
- package/dist/gill.js +5 -1
- package/docs/api/index.md +79 -18
- package/package.json +1 -1
package/dist/gill.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare const gillResponseSchema: Schema.Union<readonly [Schema.Struct<{
|
|
|
33
33
|
readonly state: Schema.Literal<"error">;
|
|
34
34
|
readonly rows: Schema.Tuple<readonly []>;
|
|
35
35
|
/** Host-owned permanent execution refusal; an ordinary error may still be refreshed. */
|
|
36
|
-
readonly reason: Schema.optional<Schema.Literals<readonly ["exec_isolation_required", "params_required"]>>;
|
|
36
|
+
readonly reason: Schema.optional<Schema.Literals<readonly ["exec_isolation_required", "params_required", "disabled"]>>;
|
|
37
37
|
readonly error: Schema.String;
|
|
38
38
|
/** The host supplies the same-placement picker and this App's launch. */
|
|
39
39
|
readonly recovery: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -79,7 +79,7 @@ export declare const decodeGillResponse: (input: unknown, options?: import("effe
|
|
|
79
79
|
readonly title: string;
|
|
80
80
|
readonly viewId: string;
|
|
81
81
|
readonly rows: readonly [];
|
|
82
|
-
readonly reason?: "exec_isolation_required" | "params_required" | undefined;
|
|
82
|
+
readonly reason?: "disabled" | "exec_isolation_required" | "params_required" | undefined;
|
|
83
83
|
readonly recovery?: {
|
|
84
84
|
readonly kind: "configure";
|
|
85
85
|
readonly param: string;
|
|
@@ -132,7 +132,7 @@ export declare const gillReplySchema: Schema.Union<readonly [Schema.Union<readon
|
|
|
132
132
|
readonly state: Schema.Literal<"error">;
|
|
133
133
|
readonly rows: Schema.Tuple<readonly []>;
|
|
134
134
|
/** Host-owned permanent execution refusal; an ordinary error may still be refreshed. */
|
|
135
|
-
readonly reason: Schema.optional<Schema.Literals<readonly ["exec_isolation_required", "params_required"]>>;
|
|
135
|
+
readonly reason: Schema.optional<Schema.Literals<readonly ["exec_isolation_required", "params_required", "disabled"]>>;
|
|
136
136
|
readonly error: Schema.String;
|
|
137
137
|
/** The host supplies the same-placement picker and this App's launch. */
|
|
138
138
|
readonly recovery: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -185,7 +185,7 @@ export declare const decodeGillReply: (input: unknown, options?: import("effect/
|
|
|
185
185
|
readonly title: string;
|
|
186
186
|
readonly viewId: string;
|
|
187
187
|
readonly rows: readonly [];
|
|
188
|
-
readonly reason?: "exec_isolation_required" | "params_required" | undefined;
|
|
188
|
+
readonly reason?: "disabled" | "exec_isolation_required" | "params_required" | undefined;
|
|
189
189
|
readonly recovery?: {
|
|
190
190
|
readonly kind: "configure";
|
|
191
191
|
readonly param: string;
|
package/dist/gill.js
CHANGED
|
@@ -34,7 +34,11 @@ export const gillResponseSchema = Schema.Union([
|
|
|
34
34
|
state: Schema.Literal("error"),
|
|
35
35
|
rows: Schema.Tuple([]),
|
|
36
36
|
/** Host-owned permanent execution refusal; an ordinary error may still be refreshed. */
|
|
37
|
-
reason: Schema.optional(Schema.Literals([
|
|
37
|
+
reason: Schema.optional(Schema.Literals([
|
|
38
|
+
"exec_isolation_required",
|
|
39
|
+
"params_required",
|
|
40
|
+
"disabled",
|
|
41
|
+
])),
|
|
38
42
|
error: Schema.String.pipe(Schema.check(Schema.isMinLength(1)), Schema.check(Schema.isMaxLength(512))),
|
|
39
43
|
/** The host supplies the same-placement picker and this App's launch. */
|
|
40
44
|
recovery: Schema.optional(Schema.Union([
|
package/docs/api/index.md
CHANGED
|
@@ -130,6 +130,16 @@ type RowV1 = Schema.Schema.Type<typeof rowSchemaV1>;
|
|
|
130
130
|
|
|
131
131
|
One shared, bounded data row; the host owns navigation and execution.
|
|
132
132
|
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### ResultRow
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
type ResultRow = Schema.Schema.Type<typeof resultRowSchemaV1>;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
One shared result row; navigation and previews stay host-authorized.
|
|
142
|
+
|
|
133
143
|
## Variables
|
|
134
144
|
|
|
135
145
|
### appGillParamKeySchema
|
|
@@ -259,7 +269,7 @@ const gillResponseSchema: Union<readonly [Struct<{
|
|
|
259
269
|
title: String;
|
|
260
270
|
state: Literal<"error">;
|
|
261
271
|
rows: Tuple<readonly []>;
|
|
262
|
-
reason: optional<Literals<readonly ["exec_isolation_required", "params_required"]>>;
|
|
272
|
+
reason: optional<Literals<readonly ["exec_isolation_required", "params_required", "disabled"]>>;
|
|
263
273
|
error: String;
|
|
264
274
|
recovery: optional<Union<readonly [Struct<{
|
|
265
275
|
kind: Literal<"configure">;
|
|
@@ -311,7 +321,7 @@ const decodeGillResponse: (
|
|
|
311
321
|
title: string;
|
|
312
322
|
state: "error";
|
|
313
323
|
rows: readonly [];
|
|
314
|
-
reason?: "exec_isolation_required" | "params_required";
|
|
324
|
+
reason?: "disabled" | "exec_isolation_required" | "params_required";
|
|
315
325
|
error: string;
|
|
316
326
|
recovery?:
|
|
317
327
|
| {
|
|
@@ -364,7 +374,7 @@ Decode backend output once at the App host boundary.
|
|
|
364
374
|
title: string;
|
|
365
375
|
state: "error";
|
|
366
376
|
rows: readonly [];
|
|
367
|
-
reason?: "exec_isolation_required" | "params_required";
|
|
377
|
+
reason?: "disabled" | "exec_isolation_required" | "params_required";
|
|
368
378
|
error: string;
|
|
369
379
|
recovery?: | {
|
|
370
380
|
kind: "configure";
|
|
@@ -382,7 +392,7 @@ Decode backend output once at the App host boundary.
|
|
|
382
392
|
| `title` | `string` | `label` | - |
|
|
383
393
|
| `state` | `"error"` | - | - |
|
|
384
394
|
| `rows` | readonly \[\] | - | - |
|
|
385
|
-
| `reason?` | `"exec_isolation_required"` \| `"params_required"`
|
|
395
|
+
| `reason?` | `"disabled"` \| `"exec_isolation_required"` \| `"params_required"` | - | Host-owned permanent execution refusal; an ordinary error may still be refreshed. |
|
|
386
396
|
| `error` | `string` | - | - |
|
|
387
397
|
| `recovery?` | \| \{ `kind`: `"configure"`; `param`: `string`; \} \| \{ `kind`: `"open"`; \} | - | The host supplies the same-placement picker and this App's launch. |
|
|
388
398
|
|
|
@@ -435,7 +445,7 @@ const gillReplySchema: Union<readonly [Union<readonly [Struct<{
|
|
|
435
445
|
title: String;
|
|
436
446
|
state: Literal<"error">;
|
|
437
447
|
rows: Tuple<readonly []>;
|
|
438
|
-
reason: optional<Literals<readonly ["exec_isolation_required", "params_required"]>>;
|
|
448
|
+
reason: optional<Literals<readonly ["exec_isolation_required", "params_required", "disabled"]>>;
|
|
439
449
|
error: String;
|
|
440
450
|
recovery: optional<Union<readonly [Struct<{
|
|
441
451
|
kind: ...;
|
|
@@ -489,7 +499,7 @@ const decodeGillReply: (
|
|
|
489
499
|
title: string;
|
|
490
500
|
state: "error";
|
|
491
501
|
rows: readonly [];
|
|
492
|
-
reason?: "exec_isolation_required" | "params_required";
|
|
502
|
+
reason?: "disabled" | "exec_isolation_required" | "params_required";
|
|
493
503
|
error: string;
|
|
494
504
|
recovery?:
|
|
495
505
|
| {
|
|
@@ -546,7 +556,7 @@ Decode the selected host's bounded reply before rendering or navigation.
|
|
|
546
556
|
title: string;
|
|
547
557
|
state: "error";
|
|
548
558
|
rows: readonly [];
|
|
549
|
-
reason?: "exec_isolation_required" | "params_required";
|
|
559
|
+
reason?: "disabled" | "exec_isolation_required" | "params_required";
|
|
550
560
|
error: string;
|
|
551
561
|
recovery?: | {
|
|
552
562
|
kind: "configure";
|
|
@@ -564,7 +574,7 @@ Decode the selected host's bounded reply before rendering or navigation.
|
|
|
564
574
|
| `title` | `string` | `label` | - |
|
|
565
575
|
| `state` | `"error"` | - | - |
|
|
566
576
|
| `rows` | readonly \[\] | - | - |
|
|
567
|
-
| `reason?` | `"exec_isolation_required"` \| `"params_required"`
|
|
577
|
+
| `reason?` | `"disabled"` \| `"exec_isolation_required"` \| `"params_required"` | - | Host-owned permanent execution refusal; an ordinary error may still be refreshed. |
|
|
568
578
|
| `error` | `string` | - | - |
|
|
569
579
|
| `recovery?` | \| \{ `kind`: `"configure"`; `param`: `string`; \} \| \{ `kind`: `"open"`; \} | - | The host supplies the same-placement picker and this App's launch. |
|
|
570
580
|
|
|
@@ -746,6 +756,57 @@ const rowPageSchemaV1: $Array<
|
|
|
746
756
|
|
|
747
757
|
A page containing at most 200 shared rows.
|
|
748
758
|
|
|
759
|
+
---
|
|
760
|
+
|
|
761
|
+
### resultRowSchemaV1
|
|
762
|
+
|
|
763
|
+
```ts
|
|
764
|
+
const resultRowSchemaV1: Struct<{
|
|
765
|
+
id: String;
|
|
766
|
+
title: String;
|
|
767
|
+
detail: optional<String>;
|
|
768
|
+
tone: optional<
|
|
769
|
+
Literals<readonly ["attention", "running", "error", "settled", "muted"]>
|
|
770
|
+
>;
|
|
771
|
+
status: optional<
|
|
772
|
+
Struct<{
|
|
773
|
+
label: String;
|
|
774
|
+
tone: Literals<
|
|
775
|
+
readonly [
|
|
776
|
+
"neutral",
|
|
777
|
+
"primary",
|
|
778
|
+
"secondary",
|
|
779
|
+
"accent",
|
|
780
|
+
"success",
|
|
781
|
+
"info",
|
|
782
|
+
"warning",
|
|
783
|
+
"error",
|
|
784
|
+
]
|
|
785
|
+
>;
|
|
786
|
+
}>
|
|
787
|
+
>;
|
|
788
|
+
open: optional<
|
|
789
|
+
Struct<{
|
|
790
|
+
params: $Array<
|
|
791
|
+
Struct<{
|
|
792
|
+
key: String;
|
|
793
|
+
value: String;
|
|
794
|
+
}>
|
|
795
|
+
>;
|
|
796
|
+
}>
|
|
797
|
+
>;
|
|
798
|
+
media: optional<
|
|
799
|
+
Struct<{
|
|
800
|
+
path: String;
|
|
801
|
+
format: Literals<readonly ["fungi:image", "fungi:video"]>;
|
|
802
|
+
}>
|
|
803
|
+
>;
|
|
804
|
+
}>;
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
A finished App call as a person reads it: a shared row plus an optional
|
|
808
|
+
thumbnail.
|
|
809
|
+
|
|
749
810
|
## Functions
|
|
750
811
|
|
|
751
812
|
### decodeDeclaredGillResponse()
|
|
@@ -767,7 +828,7 @@ function decodeDeclaredGillResponse(
|
|
|
767
828
|
title: string;
|
|
768
829
|
state: "error";
|
|
769
830
|
rows: readonly [];
|
|
770
|
-
reason?: "exec_isolation_required" | "params_required";
|
|
831
|
+
reason?: "disabled" | "exec_isolation_required" | "params_required";
|
|
771
832
|
error: string;
|
|
772
833
|
recovery?:
|
|
773
834
|
| {
|
|
@@ -791,10 +852,10 @@ App output must match its digest-covered view identity.
|
|
|
791
852
|
|
|
792
853
|
#### Parameters
|
|
793
854
|
|
|
794
|
-
| Parameter | Type
|
|
795
|
-
| ------------- |
|
|
796
|
-
| `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`; \} |
|
|
797
|
-
| `declaration` | `Pick`\<[`AppDeclaredGill`](#appdeclaredgill), `"id"` \| `"params"`\>
|
|
855
|
+
| Parameter | Type |
|
|
856
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
857
|
+
| `response` | \| \{ `viewId`: `string`; `title`: `string`; `state`: `"empty"`; `rows`: readonly \[\]; `next?`: `string`; \} \| \{ `viewId`: `string`; `title`: `string`; `state`: `"error"`; `rows`: readonly \[\]; `reason?`: `"disabled"` \| `"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`; \} |
|
|
858
|
+
| `declaration` | `Pick`\<[`AppDeclaredGill`](#appdeclaredgill), `"id"` \| `"params"`\> |
|
|
798
859
|
|
|
799
860
|
#### Returns
|
|
800
861
|
|
|
@@ -820,7 +881,7 @@ App output must match its digest-covered view identity.
|
|
|
820
881
|
title: string;
|
|
821
882
|
state: "error";
|
|
822
883
|
rows: readonly [];
|
|
823
|
-
reason?: "exec_isolation_required" | "params_required";
|
|
884
|
+
reason?: "disabled" | "exec_isolation_required" | "params_required";
|
|
824
885
|
error: string;
|
|
825
886
|
recovery?: | {
|
|
826
887
|
kind: "configure";
|
|
@@ -838,7 +899,7 @@ App output must match its digest-covered view identity.
|
|
|
838
899
|
| `title` | `string` | `label` | - |
|
|
839
900
|
| `state` | `"error"` | - | - |
|
|
840
901
|
| `rows` | readonly \[\] | - | - |
|
|
841
|
-
| `reason?` | `"exec_isolation_required"` \| `"params_required"`
|
|
902
|
+
| `reason?` | `"disabled"` \| `"exec_isolation_required"` \| `"params_required"` | - | Host-owned permanent execution refusal; an ordinary error may still be refreshed. |
|
|
842
903
|
| `error` | `string` | - | - |
|
|
843
904
|
| `recovery?` | \| \{ `kind`: `"configure"`; `param`: `string`; \} \| \{ `kind`: `"open"`; \} | - | The host supplies the same-placement picker and this App's launch. |
|
|
844
905
|
|
|
@@ -874,6 +935,6 @@ Authenticated host Fetch stays outside App code and is pinned to one selection.
|
|
|
874
935
|
|
|
875
936
|
#### Returns
|
|
876
937
|
|
|
877
|
-
| Name | Type
|
|
878
|
-
| ----------- |
|
|
879
|
-
| `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. |
|
|
938
|
+
| Name | Type | Description |
|
|
939
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
940
|
+
| `request()` | (`selectors`, `signal?`) => `Promise`\< \| \{ `viewId`: `string`; `title`: `string`; `state`: `"empty"`; `rows`: readonly \[\]; `next?`: `string`; \} \| \{ `viewId`: `string`; `title`: `string`; `state`: `"error"`; `rows`: readonly \[\]; `reason?`: `"disabled"` \| `"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. |
|