@fungi.computer/shiitake-extensions 0.0.1 → 0.1.0
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/README.md +43 -13
- package/dist/almanac/contract.d.ts +94 -0
- package/dist/almanac/contract.js +71 -5
- package/dist/goal/client.d.ts +5 -2
- package/dist/goal/client.js +66 -72
- package/dist/goal/contract.d.ts +181 -64
- package/dist/goal/contract.js +102 -12
- package/dist/goal/host.js +188 -113
- package/dist/home/contract.d.ts +18 -0
- package/dist/home/contract.js +24 -3
- package/dist/home/host.d.ts +3 -0
- package/dist/home/host.js +1 -2
- package/dist/home/routing.js +13 -24
- package/dist/internal/history.d.ts +16 -0
- package/dist/internal/history.js +8 -0
- package/dist/loop/client.d.ts +1 -1
- package/dist/loop/client.js +28 -34
- package/dist/loop/contract.d.ts +113 -84
- package/dist/loop/contract.js +77 -9
- package/dist/loop/host.d.ts +1 -0
- package/dist/loop/host.js +17 -30
- package/dist/plan/client.d.ts +1 -1
- package/dist/plan/contract.d.ts +33 -0
- package/dist/plan/contract.js +28 -3
- package/dist/plan/host.js +12 -7
- package/dist/question/client.d.ts +1 -1
- package/dist/question/contract.d.ts +158 -0
- package/dist/question/contract.js +92 -7
- package/dist/question/host.js +34 -20
- package/dist/roster/conversation-agents.d.ts +31 -0
- package/dist/roster/conversation-agents.js +114 -0
- package/dist/roster.js +1 -0
- package/dist/skills/host.d.ts +1 -0
- package/dist/skills/host.js +22 -17
- package/dist/skills/source.d.ts +34 -0
- package/dist/subagents/client.d.ts +1 -1
- package/dist/subagents/client.js +43 -12
- package/dist/subagents/contract.d.ts +46 -8
- package/dist/subagents/contract.js +38 -8
- package/dist/subagents/host.d.ts +20 -8
- package/dist/subagents/host.js +58 -12
- package/docs/api/README.md +35 -0
- package/docs/api/almanac/contract.md +90 -0
- package/docs/api/almanac/host.md +19 -0
- package/docs/api/goal/client.md +26 -0
- package/docs/api/goal/contract.md +247 -0
- package/docs/api/goal/host.md +29 -0
- package/docs/api/home/contract.md +58 -0
- package/docs/api/home/host.md +55 -0
- package/docs/api/loop/client.md +25 -0
- package/docs/api/loop/contract.md +159 -0
- package/docs/api/loop/host.md +30 -0
- package/docs/api/plan/client.md +26 -0
- package/docs/api/plan/contract.md +163 -0
- package/docs/api/plan/host.md +19 -0
- package/docs/api/question/client.md +25 -0
- package/docs/api/question/contract.md +377 -0
- package/docs/api/question/host.md +19 -0
- package/docs/api/roster/conversation-agents.md +80 -0
- package/docs/api/roster.md +40 -0
- package/docs/api/skills/host.md +39 -0
- package/docs/api/skills/source.md +104 -0
- package/docs/api/subagents/client.md +26 -0
- package/docs/api/subagents/contract.md +131 -0
- package/docs/api/subagents/host.md +115 -0
- package/package.json +14 -8
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake-extensions**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake-extensions](../README.md) / plan/client
|
|
8
|
+
|
|
9
|
+
# plan/client
|
|
10
|
+
|
|
11
|
+
## Variables
|
|
12
|
+
|
|
13
|
+
### default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
default: Readonly<{
|
|
17
|
+
protocol: "shiitake.client/v1";
|
|
18
|
+
id: string & Brand<"ExtensionId">;
|
|
19
|
+
promptPresentation?: "footer";
|
|
20
|
+
attach?: (context) => Effect<void, Error, Scope>;
|
|
21
|
+
contribute?: (slot) => object;
|
|
22
|
+
}>;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Only an open plan occupies the footer, where it is inspectable and clearable; a
|
|
26
|
+
finished or cleared plan hides while its committed history stays in state.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake-extensions**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake-extensions](../README.md) / plan/contract
|
|
8
|
+
|
|
9
|
+
# plan/contract
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### Plan
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type Plan = Schema.Schema.Type<typeof Plan>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
One Session's ordered checklist and optional explanation.
|
|
20
|
+
|
|
21
|
+
## Variables
|
|
22
|
+
|
|
23
|
+
### Plan
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
const Plan: Struct<{
|
|
27
|
+
explanation: optionalKey<String>;
|
|
28
|
+
steps: $Array<
|
|
29
|
+
Struct<{
|
|
30
|
+
step: String;
|
|
31
|
+
status: Literals<readonly ["pending", "in_progress", "completed"]>;
|
|
32
|
+
}>
|
|
33
|
+
>;
|
|
34
|
+
}>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
One Session's replaceable checklist, independent of goals and loops. No steps
|
|
38
|
+
means no plan: replacing it with an empty checklist clears it.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### PlanInput
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
const PlanInput: Struct<{
|
|
46
|
+
explanation: optionalKey<String>;
|
|
47
|
+
steps: $Array<
|
|
48
|
+
Struct<{
|
|
49
|
+
step: String;
|
|
50
|
+
status: Literals<readonly ["pending", "in_progress", "completed"]>;
|
|
51
|
+
}>
|
|
52
|
+
>;
|
|
53
|
+
}>;
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Checklist replacement that permits at most one in-progress step.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### PlanProjection
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
const PlanProjection: Struct<{
|
|
64
|
+
plan: Struct<{
|
|
65
|
+
explanation: optionalKey<String>;
|
|
66
|
+
steps: $Array<
|
|
67
|
+
Struct<{
|
|
68
|
+
step: String;
|
|
69
|
+
status: Literals<readonly ["pending", "in_progress", "completed"]>;
|
|
70
|
+
}>
|
|
71
|
+
>;
|
|
72
|
+
}>;
|
|
73
|
+
history: Struct<{
|
|
74
|
+
nextSequence: Int;
|
|
75
|
+
omitted: Int;
|
|
76
|
+
events: $Array<
|
|
77
|
+
Struct<{
|
|
78
|
+
id: String;
|
|
79
|
+
sequence: Int;
|
|
80
|
+
at: Int;
|
|
81
|
+
commandId: NullOr<String>;
|
|
82
|
+
event: Codec<
|
|
83
|
+
{
|
|
84
|
+
explanation?: string;
|
|
85
|
+
steps: readonly object[];
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
explanation?: string;
|
|
89
|
+
steps: readonly object[];
|
|
90
|
+
},
|
|
91
|
+
never,
|
|
92
|
+
never
|
|
93
|
+
>;
|
|
94
|
+
}>
|
|
95
|
+
>;
|
|
96
|
+
}>;
|
|
97
|
+
}>;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The current checklist and every committed replacement, clears included.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### PlanCommandInput
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
const PlanCommandInput: Union<
|
|
108
|
+
readonly [
|
|
109
|
+
Struct<{
|
|
110
|
+
action: Literal<"clear">;
|
|
111
|
+
}>,
|
|
112
|
+
Struct<{}>,
|
|
113
|
+
]
|
|
114
|
+
>;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Arguments of the human `/plan` command: a bare call views, `clear` empties it.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### planContract
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
const planContract: object;
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Session-owned human plan control and checklist projection.
|
|
128
|
+
|
|
129
|
+
#### Type Declaration
|
|
130
|
+
|
|
131
|
+
| Name | Type | Default value | Description |
|
|
132
|
+
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ---------------------------------------------- |
|
|
133
|
+
| <a id="property-id"></a> `id` | `string` & `Brand`\<`"ExtensionId"`\> | - | Stable extension identity. |
|
|
134
|
+
| <a id="property-commands"></a> `commands` | `object` | - | Human checklist controls. |
|
|
135
|
+
| `commands.plan` | `object` | - | View or clear the current checklist. |
|
|
136
|
+
| `commands.plan.scope` | `"session"` | `"session"` | The Session owns the checklist. |
|
|
137
|
+
| `commands.plan.input` | `Union`\<readonly \[`Struct`\<\{ `action`: `Literal`\<`"clear"`\>; \}\>, `Struct`\<\{ \}\>\]\> | `PlanCommandInput` | Decode the selected human control. |
|
|
138
|
+
| `commands.plan.output` | `declare`\<`WhistleCatalogStepV1`, `WhistleCatalogStepV1`\> | `CatalogStep` | Return the server-owned conversation step. |
|
|
139
|
+
| <a id="property-projection"></a> `projection` | `object` | - | Current checklist and its replacement history. |
|
|
140
|
+
| `projection.schema` | `Struct`\<\{ `plan`: `Struct`\<\{ `explanation`: `optionalKey`\<`String`\>; `steps`: `$Array`\<`Struct`\<\{ `step`: `String`; `status`: `Literals`\<readonly \[..., ..., ...\]\>; \}\>\>; \}\>; `history`: `Struct`\<\{ `nextSequence`: `Int`; `omitted`: `Int`; `events`: `$Array`\<`Struct`\<\{ `id`: `String`; `sequence`: `Int`; `at`: `Int`; `commandId`: `NullOr`\<`String`\>; `event`: `Codec`\<\{ `explanation?`: ...; `steps`: ...; \}, \{ `explanation?`: ...; `steps`: ...; \}, `never`, `never`\>; \}\>\>; \}\>; \}\> | `PlanProjection` | Decoder for visible plan state. |
|
|
141
|
+
|
|
142
|
+
## Functions
|
|
143
|
+
|
|
144
|
+
### planIsOpen()
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
function planIsOpen(plan): boolean;
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Open work remains: some step is not completed. Cleared and finished plans are
|
|
151
|
+
closed.
|
|
152
|
+
|
|
153
|
+
#### Parameters
|
|
154
|
+
|
|
155
|
+
| Parameter | Type | Description |
|
|
156
|
+
| ------------------- | ------------------------------------------------------------- | ---------------------------------------------------- |
|
|
157
|
+
| `plan` | \{ `explanation?`: `string`; `steps`: readonly `object`[]; \} | - |
|
|
158
|
+
| `plan.explanation?` | `string` | Optional explanation for this checklist replacement. |
|
|
159
|
+
| `plan.steps` | readonly `object`[] | Ordered checklist; an empty array clears the plan. |
|
|
160
|
+
|
|
161
|
+
#### Returns
|
|
162
|
+
|
|
163
|
+
`boolean`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake-extensions**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake-extensions](../README.md) / plan/host
|
|
8
|
+
|
|
9
|
+
# plan/host
|
|
10
|
+
|
|
11
|
+
## Variables
|
|
12
|
+
|
|
13
|
+
### planExtension
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const planExtension: RosteredExtensionV0;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Durable plan owner: replace, project and advertise through core's granted doors.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake-extensions**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake-extensions](../README.md) / question/client
|
|
8
|
+
|
|
9
|
+
# question/client
|
|
10
|
+
|
|
11
|
+
## Variables
|
|
12
|
+
|
|
13
|
+
### default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
default: Readonly<{
|
|
17
|
+
protocol: "shiitake.client/v1";
|
|
18
|
+
id: string & Brand<"ExtensionId">;
|
|
19
|
+
promptPresentation?: "footer";
|
|
20
|
+
attach?: (context) => Effect<void, Error, Scope>;
|
|
21
|
+
contribute?: (slot) => object;
|
|
22
|
+
}>;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Pending decisions use the existing footer rows and advertised answer flow.
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake-extensions**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake-extensions](../README.md) / question/contract
|
|
8
|
+
|
|
9
|
+
# question/contract
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### Question
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type Question = Schema.Schema.Type<typeof Question>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
One decoded decision question.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### OpenAsk
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
type OpenAsk = Schema.Schema.Type<typeof OpenAsk>;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
One live or parked ask visible to Session clients.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### Answers
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
type Answers = Schema.Schema.Type<typeof Answers>;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Decoded answers indexed by question identity.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### AnswerInput
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
type AnswerInput = Schema.Schema.Type<typeof AnswerInput>;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Decoded human answer submission.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### DeclineInput
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
type DeclineInput = Schema.Schema.Type<typeof DeclineInput>;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Decoded human decline submission.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### HumanResult
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
type HumanResult = Schema.Schema.Type<typeof HumanResult>;
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Decoded outcome of a human answer or decline.
|
|
70
|
+
|
|
71
|
+
## Variables
|
|
72
|
+
|
|
73
|
+
### Question
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
const Question: Struct<{
|
|
77
|
+
id: String;
|
|
78
|
+
header: String;
|
|
79
|
+
question: String;
|
|
80
|
+
options: $Array<
|
|
81
|
+
Struct<{
|
|
82
|
+
label: String;
|
|
83
|
+
description: String;
|
|
84
|
+
}>
|
|
85
|
+
>;
|
|
86
|
+
multiple: optionalKey<Boolean>;
|
|
87
|
+
}>;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
A decision question: first option is recommended, free text belongs to the host.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### Questions
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
const Questions: $Array<
|
|
98
|
+
Struct<{
|
|
99
|
+
id: String;
|
|
100
|
+
header: String;
|
|
101
|
+
question: String;
|
|
102
|
+
options: $Array<
|
|
103
|
+
Struct<{
|
|
104
|
+
label: String;
|
|
105
|
+
description: String;
|
|
106
|
+
}>
|
|
107
|
+
>;
|
|
108
|
+
multiple: optionalKey<Boolean>;
|
|
109
|
+
}>
|
|
110
|
+
>;
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Bounded question set with distinct question identities.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### OpenAsk
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
const OpenAsk: Struct<{
|
|
121
|
+
askId: String;
|
|
122
|
+
questions: $Array<
|
|
123
|
+
Struct<{
|
|
124
|
+
id: String;
|
|
125
|
+
header: String;
|
|
126
|
+
question: String;
|
|
127
|
+
options: $Array<
|
|
128
|
+
Struct<{
|
|
129
|
+
label: String;
|
|
130
|
+
description: String;
|
|
131
|
+
}>
|
|
132
|
+
>;
|
|
133
|
+
multiple: optionalKey<Boolean>;
|
|
134
|
+
}>
|
|
135
|
+
>;
|
|
136
|
+
status: Literals<readonly ["live", "parked"]>;
|
|
137
|
+
createdAt: Number;
|
|
138
|
+
expiresAt: NullOr<Number>;
|
|
139
|
+
}>;
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The complete question data shared by ordinary Session clients.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### AskProjection
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
const AskProjection: Struct<{
|
|
150
|
+
asks: $Array<Struct<{
|
|
151
|
+
askId: String;
|
|
152
|
+
questions: $Array<Struct<{
|
|
153
|
+
id: String;
|
|
154
|
+
header: String;
|
|
155
|
+
question: String;
|
|
156
|
+
options: $Array<Struct<{
|
|
157
|
+
label: ...;
|
|
158
|
+
description: ...;
|
|
159
|
+
}>>;
|
|
160
|
+
multiple: optionalKey<Boolean>;
|
|
161
|
+
}>>;
|
|
162
|
+
status: Literals<readonly ["live", "parked"]>;
|
|
163
|
+
createdAt: Number;
|
|
164
|
+
expiresAt: NullOr<Number>;
|
|
165
|
+
}>>;
|
|
166
|
+
}>;
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Bounded set of open asks projected into the Session.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### RequestId
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
const RequestId: String;
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Stable identity for a human command and its retry.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### Answers
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
const Answers: $Record<
|
|
187
|
+
String,
|
|
188
|
+
Struct<{
|
|
189
|
+
selected: $Array<String>;
|
|
190
|
+
text: optionalKey<String>;
|
|
191
|
+
}>
|
|
192
|
+
>;
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Answers keyed by question id, with selected choices and optional free text.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
### AnswerInput
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
const AnswerInput: Struct<{
|
|
203
|
+
askId: String;
|
|
204
|
+
requestId: String;
|
|
205
|
+
answers: $Record<
|
|
206
|
+
String,
|
|
207
|
+
Struct<{
|
|
208
|
+
selected: $Array<String>;
|
|
209
|
+
text: optionalKey<String>;
|
|
210
|
+
}>
|
|
211
|
+
>;
|
|
212
|
+
}>;
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Idempotent human submission of a complete answer set.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
### DeclineInput
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
const DeclineInput: Struct<{
|
|
223
|
+
askId: String;
|
|
224
|
+
requestId: String;
|
|
225
|
+
note: optionalKey<String>;
|
|
226
|
+
}>;
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Idempotent human refusal to answer an ask.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
### ClosedStatus
|
|
234
|
+
|
|
235
|
+
```ts
|
|
236
|
+
const ClosedStatus: Literals<
|
|
237
|
+
readonly [
|
|
238
|
+
"answered",
|
|
239
|
+
"declined",
|
|
240
|
+
"withdrawn",
|
|
241
|
+
"expired",
|
|
242
|
+
"cancelled",
|
|
243
|
+
"undeliverable",
|
|
244
|
+
]
|
|
245
|
+
>;
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Terminal question outcomes, shared by human replies and model withdrawal.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### HumanResult
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
const HumanResult: Union<
|
|
256
|
+
readonly [
|
|
257
|
+
Struct<{
|
|
258
|
+
result: Literal<"accepted">;
|
|
259
|
+
via: Literals<readonly ["in_turn", "follow_up"]>;
|
|
260
|
+
}>,
|
|
261
|
+
Struct<{
|
|
262
|
+
result: Literal<"closed">;
|
|
263
|
+
status: Literals<
|
|
264
|
+
readonly [
|
|
265
|
+
"answered",
|
|
266
|
+
"declined",
|
|
267
|
+
"withdrawn",
|
|
268
|
+
"expired",
|
|
269
|
+
"cancelled",
|
|
270
|
+
"undeliverable",
|
|
271
|
+
]
|
|
272
|
+
>;
|
|
273
|
+
}>,
|
|
274
|
+
Struct<{
|
|
275
|
+
result: Literal<"not_found">;
|
|
276
|
+
}>,
|
|
277
|
+
]
|
|
278
|
+
>;
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Admission, already-closed state, or absence returned to a human reply.
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
### AnswerFlowInput
|
|
286
|
+
|
|
287
|
+
```ts
|
|
288
|
+
const AnswerFlowInput: Union<
|
|
289
|
+
readonly [
|
|
290
|
+
Struct<{
|
|
291
|
+
askId: String;
|
|
292
|
+
requestId: String;
|
|
293
|
+
index: Number;
|
|
294
|
+
answers: $Record<
|
|
295
|
+
String,
|
|
296
|
+
Struct<{
|
|
297
|
+
selected: $Array<String>;
|
|
298
|
+
text: optionalKey<String>;
|
|
299
|
+
}>
|
|
300
|
+
>;
|
|
301
|
+
stage: Literal<"multiple">;
|
|
302
|
+
selection: String;
|
|
303
|
+
}>,
|
|
304
|
+
Struct<{
|
|
305
|
+
askId: String;
|
|
306
|
+
requestId: String;
|
|
307
|
+
index: Number;
|
|
308
|
+
answers: $Record<
|
|
309
|
+
String,
|
|
310
|
+
Struct<{
|
|
311
|
+
selected: $Array<String>;
|
|
312
|
+
text: optionalKey<String>;
|
|
313
|
+
}>
|
|
314
|
+
>;
|
|
315
|
+
stage: Literal<"selection">;
|
|
316
|
+
selection: String;
|
|
317
|
+
}>,
|
|
318
|
+
Struct<{
|
|
319
|
+
askId: String;
|
|
320
|
+
requestId: String;
|
|
321
|
+
index: Number;
|
|
322
|
+
answers: $Record<
|
|
323
|
+
String,
|
|
324
|
+
Struct<{
|
|
325
|
+
selected: $Array<String>;
|
|
326
|
+
text: optionalKey<String>;
|
|
327
|
+
}>
|
|
328
|
+
>;
|
|
329
|
+
stage: Literal<"text">;
|
|
330
|
+
selected: $Array<String>;
|
|
331
|
+
text: String;
|
|
332
|
+
}>,
|
|
333
|
+
Struct<{
|
|
334
|
+
askId: String;
|
|
335
|
+
}>,
|
|
336
|
+
Struct<{}>,
|
|
337
|
+
]
|
|
338
|
+
>;
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
The ordinary /answer conversation carries its draft between typed steps.
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
### questionContract
|
|
346
|
+
|
|
347
|
+
```ts
|
|
348
|
+
const questionContract: object;
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Human reads and the ordinary projection slot; model operations belong to the
|
|
352
|
+
host.
|
|
353
|
+
|
|
354
|
+
#### Type Declaration
|
|
355
|
+
|
|
356
|
+
| Name | Type | Default value | Description |
|
|
357
|
+
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------- | ------------------------------------------------------ |
|
|
358
|
+
| <a id="property-id"></a> `id` | `string` & `Brand`\<`"ExtensionId"`\> | - | Stable extension identity. |
|
|
359
|
+
| <a id="property-commands"></a> `commands` | `object` | - | Human question controls admitted by the Session owner. |
|
|
360
|
+
| `commands.answerFlow` | `object` | - | Advance the server-owned answer conversation. |
|
|
361
|
+
| `commands.answerFlow.scope` | `"session"` | `"session"` | The Session owns its asks and replies. |
|
|
362
|
+
| `commands.answerFlow.input` | `Union`\<readonly \[`Struct`\<\{ `askId`: `String`; `requestId`: `String`; `index`: `Number`; `answers`: `$Record`\<`String`, `Struct`\<\{ `selected`: `$Array`\<...\>; `text`: `optionalKey`\<...\>; \}\>\>; `stage`: `Literal`\<`"multiple"`\>; `selection`: `String`; \}\>, `Struct`\<\{ `askId`: `String`; `requestId`: `String`; `index`: `Number`; `answers`: `$Record`\<`String`, `Struct`\<\{ `selected`: `$Array`\<...\>; `text`: `optionalKey`\<...\>; \}\>\>; `stage`: `Literal`\<`"selection"`\>; `selection`: `String`; \}\>, `Struct`\<\{ `askId`: `String`; `requestId`: `String`; `index`: `Number`; `answers`: `$Record`\<`String`, `Struct`\<\{ `selected`: `$Array`\<...\>; `text`: `optionalKey`\<...\>; \}\>\>; `stage`: `Literal`\<`"text"`\>; `selected`: `$Array`\<`String`\>; `text`: `String`; \}\>, `Struct`\<\{ `askId`: `String`; \}\>, `Struct`\<\{ \}\>\]\> | `AnswerFlowInput` | Decode the current answer-draft step. |
|
|
363
|
+
| `commands.answerFlow.output` | `declare`\<`WhistleCatalogStepV1`, `WhistleCatalogStepV1`\> | `CatalogStep` | Return the next human conversation step. |
|
|
364
|
+
| `commands.answer` | `object` | - | Submit a person's completed answers. |
|
|
365
|
+
| `commands.answer.scope` | `"session"` | `"session"` | The Session owns this ask. |
|
|
366
|
+
| `commands.answer.input` | `Struct`\<\{ `askId`: `String`; `requestId`: `String`; `answers`: `$Record`\<`String`, `Struct`\<\{ `selected`: `$Array`\<`String`\>; `text`: `optionalKey`\<`String`\>; \}\>\>; \}\> | `AnswerInput` | Decode the answer submission. |
|
|
367
|
+
| `commands.answer.output` | `Union`\<readonly \[`Struct`\<\{ `result`: `Literal`\<`"accepted"`\>; `via`: `Literals`\<readonly \[`"in_turn"`, `"follow_up"`\]\>; \}\>, `Struct`\<\{ `result`: `Literal`\<`"closed"`\>; `status`: `Literals`\<readonly \[`"answered"`, `"declined"`, `"withdrawn"`, `"expired"`, `"cancelled"`, `"undeliverable"`\]\>; \}\>, `Struct`\<\{ `result`: `Literal`\<`"not_found"`\>; \}\>\]\> | `HumanResult` | Return admission or the ask's terminal state. |
|
|
368
|
+
| `commands.decline` | `object` | - | Decline an ask with an optional note. |
|
|
369
|
+
| `commands.decline.scope` | `"session"` | `"session"` | The Session owns this ask. |
|
|
370
|
+
| `commands.decline.input` | `Struct`\<\{ `askId`: `String`; `requestId`: `String`; `note`: `optionalKey`\<`String`\>; \}\> | `DeclineInput` | Decode the decline submission. |
|
|
371
|
+
| `commands.decline.output` | `Union`\<readonly \[`Struct`\<\{ `result`: `Literal`\<`"accepted"`\>; `via`: `Literals`\<readonly \[`"in_turn"`, `"follow_up"`\]\>; \}\>, `Struct`\<\{ `result`: `Literal`\<`"closed"`\>; `status`: `Literals`\<readonly \[`"answered"`, `"declined"`, `"withdrawn"`, `"expired"`, `"cancelled"`, `"undeliverable"`\]\>; \}\>, `Struct`\<\{ `result`: `Literal`\<`"not_found"`\>; \}\>\]\> | `HumanResult` | Return admission or the ask's terminal state. |
|
|
372
|
+
| `commands.list` | `object` | - | Read the Session's open asks. |
|
|
373
|
+
| `commands.list.scope` | `"session"` | `"session"` | The Session owns the ask collection. |
|
|
374
|
+
| `commands.list.input` | `Struct`\<\{ \}\> | - | No additional arguments are required. |
|
|
375
|
+
| `commands.list.output` | `Struct`\<\{ `asks`: `$Array`\<`Struct`\<\{ `askId`: `String`; `questions`: `$Array`\<`Struct`\<\{ `id`: ...; `header`: ...; `question`: ...; `options`: ...; `multiple`: ...; \}\>\>; `status`: `Literals`\<readonly \[`"live"`, `"parked"`\]\>; `createdAt`: `Number`; `expiresAt`: `NullOr`\<`Number`\>; \}\>\>; \}\> | `AskProjection` | Decode the currently visible asks. |
|
|
376
|
+
| <a id="property-projection"></a> `projection` | `object` | - | Open asks visible to Session clients. |
|
|
377
|
+
| `projection.schema` | `Struct`\<\{ `asks`: `$Array`\<`Struct`\<\{ `askId`: `String`; `questions`: `$Array`\<`Struct`\<\{ `id`: `String`; `header`: `String`; `question`: `String`; `options`: `$Array`\<...\>; `multiple`: `optionalKey`\<...\>; \}\>\>; `status`: `Literals`\<readonly \[`"live"`, `"parked"`\]\>; `createdAt`: `Number`; `expiresAt`: `NullOr`\<`Number`\>; \}\>\>; \}\> | `AskProjection` | Decoder for projected asks. |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake-extensions**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake-extensions](../README.md) / question/host
|
|
8
|
+
|
|
9
|
+
# question/host
|
|
10
|
+
|
|
11
|
+
## Variables
|
|
12
|
+
|
|
13
|
+
### questionExtension
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const questionExtension: RosteredExtensionV0;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
One durable question owner over the ordinary extension doors.
|