@fungi.computer/shiitake 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +454 -2
- package/dist/agar-extension.d.ts +9 -0
- package/dist/agar-extension.js +38 -0
- package/dist/agent-control.d.ts +77 -0
- package/dist/agent-control.js +434 -0
- package/dist/client-entry.d.ts +211 -0
- package/dist/client-entry.js +101 -0
- package/dist/client-wire.d.ts +199 -0
- package/dist/client-wire.js +271 -0
- package/dist/client.d.ts +439 -0
- package/dist/client.js +4 -0
- package/dist/cloudflare.d.ts +220 -0
- package/dist/cloudflare.js +531 -0
- package/dist/effect.d.ts +42 -0
- package/dist/effect.js +20 -0
- package/dist/errors.d.ts +50 -0
- package/dist/errors.js +81 -0
- package/dist/extension-client.d.ts +38 -0
- package/dist/extension-client.js +56 -0
- package/dist/extension-contract.d.ts +73 -0
- package/dist/extension-contract.js +11 -0
- package/dist/extensions.d.ts +589 -0
- package/dist/extensions.js +263 -0
- package/dist/fleet.d.ts +313 -0
- package/dist/fleet.js +540 -0
- package/dist/hosted.d.ts +133 -0
- package/dist/hosted.js +265 -0
- package/dist/http-routes.d.ts +772 -0
- package/dist/http-routes.js +242 -0
- package/dist/http.d.ts +1 -0
- package/dist/http.js +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +13 -0
- package/dist/internal/accepted-run-executor.d.ts +23 -0
- package/dist/internal/accepted-run-executor.js +129 -0
- package/dist/internal/admission-door.d.ts +75 -0
- package/dist/internal/admission-door.js +105 -0
- package/dist/internal/agent-close.d.ts +4 -0
- package/dist/internal/agent-close.js +42 -0
- package/dist/internal/browser-sessions.d.ts +31 -0
- package/dist/internal/browser-sessions.js +173 -0
- package/dist/internal/client-boundary.d.ts +262 -0
- package/dist/internal/client-boundary.js +202 -0
- package/dist/internal/compaction/compaction.d.ts +54 -0
- package/dist/internal/compaction/compaction.js +291 -0
- package/dist/internal/compaction/session-compaction.d.ts +69 -0
- package/dist/internal/compaction/session-compaction.js +330 -0
- package/dist/internal/compaction/settings.d.ts +11 -0
- package/dist/internal/compaction/settings.js +40 -0
- package/dist/internal/compaction/utils.d.ts +45 -0
- package/dist/internal/compaction/utils.js +319 -0
- package/dist/internal/contracts.d.ts +235 -0
- package/dist/internal/contracts.js +1 -0
- package/dist/internal/coordinator.d.ts +18 -0
- package/dist/internal/coordinator.js +362 -0
- package/dist/internal/document-codec.d.ts +11 -0
- package/dist/internal/document-codec.js +39 -0
- package/dist/internal/effect-client.d.ts +13 -0
- package/dist/internal/effect-client.js +102 -0
- package/dist/internal/effect-contracts.d.ts +236 -0
- package/dist/internal/effect-contracts.js +2 -0
- package/dist/internal/extension-command-registry.d.ts +11 -0
- package/dist/internal/extension-command-registry.js +29 -0
- package/dist/internal/extension-command-tools.d.ts +17 -0
- package/dist/internal/extension-command-tools.js +50 -0
- package/dist/internal/extension-context.d.ts +25 -0
- package/dist/internal/extension-context.js +35 -0
- package/dist/internal/extension-definitions.d.ts +5 -0
- package/dist/internal/extension-definitions.js +6 -0
- package/dist/internal/extension-hook.d.ts +25 -0
- package/dist/internal/extension-hook.js +46 -0
- package/dist/internal/extension-roster.d.ts +23 -0
- package/dist/internal/extension-roster.js +228 -0
- package/dist/internal/extension-runtime.d.ts +63 -0
- package/dist/internal/extension-runtime.js +1004 -0
- package/dist/internal/failure.d.ts +2 -0
- package/dist/internal/failure.js +9 -0
- package/dist/internal/host-meta.d.ts +41 -0
- package/dist/internal/host-meta.js +39 -0
- package/dist/internal/json-value.d.ts +4 -0
- package/dist/internal/json-value.js +3 -0
- package/dist/internal/model-acquisition.d.ts +21 -0
- package/dist/internal/model-acquisition.js +98 -0
- package/dist/internal/model-preference.d.ts +21 -0
- package/dist/internal/model-preference.js +20 -0
- package/dist/internal/observation-kernel.d.ts +28 -0
- package/dist/internal/observation-kernel.js +169 -0
- package/dist/internal/promise-facade.d.ts +18 -0
- package/dist/internal/promise-facade.js +172 -0
- package/dist/internal/run-scope.d.ts +27 -0
- package/dist/internal/run-scope.js +214 -0
- package/dist/internal/runtime-coordinator.d.ts +34 -0
- package/dist/internal/runtime-coordinator.js +233 -0
- package/dist/internal/runtime-core.d.ts +19 -0
- package/dist/internal/runtime-core.js +39 -0
- package/dist/internal/runtime-reconciliation.d.ts +18 -0
- package/dist/internal/runtime-reconciliation.js +162 -0
- package/dist/internal/session-context.d.ts +11 -0
- package/dist/internal/session-context.js +67 -0
- package/dist/internal/session-status.d.ts +10 -0
- package/dist/internal/session-status.js +52 -0
- package/dist/internal/woodstock/agent-reply.d.ts +25 -0
- package/dist/internal/woodstock/agent-reply.js +67 -0
- package/dist/internal/woodstock/client-projection.d.ts +29 -0
- package/dist/internal/woodstock/client-projection.js +512 -0
- package/dist/internal/woodstock/compaction-activity.d.ts +17 -0
- package/dist/internal/woodstock/compaction-activity.js +32 -0
- package/dist/internal/woodstock/cursor.d.ts +9 -0
- package/dist/internal/woodstock/cursor.js +44 -0
- package/dist/internal/woodstock/extension-store.d.ts +72 -0
- package/dist/internal/woodstock/extension-store.js +262 -0
- package/dist/internal/woodstock/fleet-store.d.ts +36 -0
- package/dist/internal/woodstock/fleet-store.js +100 -0
- package/dist/internal/woodstock/identities.d.ts +6 -0
- package/dist/internal/woodstock/identities.js +11 -0
- package/dist/internal/woodstock/index.d.ts +170 -0
- package/dist/internal/woodstock/index.js +546 -0
- package/dist/internal/woodstock/progress.d.ts +32 -0
- package/dist/internal/woodstock/progress.js +89 -0
- package/dist/internal/woodstock/run-recovery.d.ts +8 -0
- package/dist/internal/woodstock/run-recovery.js +95 -0
- package/dist/internal/woodstock/session-attention.d.ts +16 -0
- package/dist/internal/woodstock/session-attention.js +88 -0
- package/dist/internal/woodstock/session-documents.d.ts +18 -0
- package/dist/internal/woodstock/session-documents.js +51 -0
- package/dist/internal/woodstock/session-entry.d.ts +478 -0
- package/dist/internal/woodstock/session-entry.js +484 -0
- package/dist/internal/woodstock/session-grants.d.ts +24 -0
- package/dist/internal/woodstock/session-grants.js +84 -0
- package/dist/internal/woodstock/session-inbox.d.ts +56 -0
- package/dist/internal/woodstock/session-inbox.js +307 -0
- package/dist/internal/woodstock/session-store.d.ts +432 -0
- package/dist/internal/woodstock/session-store.js +2006 -0
- package/dist/internal/woodstock/storage-admission.d.ts +14 -0
- package/dist/internal/woodstock/storage-admission.js +44 -0
- package/dist/model-preference.d.ts +20 -0
- package/dist/model-preference.js +30 -0
- package/dist/node.d.ts +64 -0
- package/dist/node.js +256 -0
- package/dist/remote-client.d.ts +11 -0
- package/dist/remote-client.js +298 -0
- package/dist/session-attention.d.ts +35 -0
- package/dist/session-attention.js +22 -0
- package/dist/session-documents.d.ts +28 -0
- package/dist/session-documents.js +1 -0
- package/dist/testing.d.ts +54 -0
- package/dist/testing.js +215 -0
- package/docs/api/README.md +26 -0
- package/docs/api/agar-extension.md +40 -0
- package/docs/api/agent-control.md +151 -0
- package/docs/api/client-entry.md +344 -0
- package/docs/api/client.md +1112 -0
- package/docs/api/cloudflare.md +500 -0
- package/docs/api/effect.md +884 -0
- package/docs/api/extensions.md +2003 -0
- package/docs/api/fleet.md +734 -0
- package/docs/api/hosted.md +382 -0
- package/docs/api/http.md +111 -0
- package/docs/api/index.md +1116 -0
- package/docs/api/model-preference.md +151 -0
- package/docs/api/node.md +142 -0
- package/docs/api/testing.md +250 -0
- package/package.json +130 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
**@fungi.computer/shiitake**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# @fungi.computer/shiitake
|
|
8
|
+
|
|
9
|
+
## Modules
|
|
10
|
+
|
|
11
|
+
| Module | Description |
|
|
12
|
+
| --------------------------------------- | ----------- |
|
|
13
|
+
| [agar-extension](agar-extension.md) | - |
|
|
14
|
+
| [agent-control](agent-control.md) | - |
|
|
15
|
+
| [client-entry](client-entry.md) | - |
|
|
16
|
+
| [client](client.md) | - |
|
|
17
|
+
| [cloudflare](cloudflare.md) | - |
|
|
18
|
+
| [effect](effect.md) | - |
|
|
19
|
+
| [extensions](extensions.md) | - |
|
|
20
|
+
| [fleet](fleet.md) | - |
|
|
21
|
+
| [hosted](hosted.md) | - |
|
|
22
|
+
| [http](http.md) | - |
|
|
23
|
+
| [index](index.md) | - |
|
|
24
|
+
| [model-preference](model-preference.md) | - |
|
|
25
|
+
| [node](node.md) | - |
|
|
26
|
+
| [testing](testing.md) | - |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake](README.md) / agar-extension
|
|
8
|
+
|
|
9
|
+
# agar-extension
|
|
10
|
+
|
|
11
|
+
## Functions
|
|
12
|
+
|
|
13
|
+
### agentExtensionMethods()
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
function agentExtensionMethods<Context>(
|
|
17
|
+
extension,
|
|
18
|
+
): Readonly<Record<string, AppBackendMethod<Context>>>;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Serve one Shiitake extension from this App backend. Spread the result into
|
|
22
|
+
`defineAppBackend({ methods })`; the build writes the three methods into the
|
|
23
|
+
Release's API, which is how a Release declares itself an Agent extension. An
|
|
24
|
+
extension requesting a capability hosting lacks fails here, at build.
|
|
25
|
+
|
|
26
|
+
#### Type Parameters
|
|
27
|
+
|
|
28
|
+
| Type Parameter | Default type |
|
|
29
|
+
| -------------- | ------------ |
|
|
30
|
+
| `Context` | `void` |
|
|
31
|
+
|
|
32
|
+
#### Parameters
|
|
33
|
+
|
|
34
|
+
| Parameter | Type |
|
|
35
|
+
| ----------- | ---------------------------------------------------------- |
|
|
36
|
+
| `extension` | [`RosteredExtensionV0`](extensions.md#rosteredextensionv0) |
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`Readonly`\<`Record`\<`string`, `AppBackendMethod`\<`Context`\>\>\>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake](README.md) / agent-control
|
|
8
|
+
|
|
9
|
+
# agent-control
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### AgentControlAgent
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type AgentControlAgent = Readonly<{
|
|
17
|
+
agentId: string;
|
|
18
|
+
name: string;
|
|
19
|
+
}>;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
One existing Agent visible within the caller's authorized project or Team.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### AgentControlModel
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
type AgentControlModel = Readonly<{
|
|
30
|
+
address: string;
|
|
31
|
+
name: string;
|
|
32
|
+
}>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
One host-offered model usable as an Agent's create or setModel choice.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### AgentDelegationInput
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
type AgentDelegationInput = Readonly<{
|
|
43
|
+
agentId: string;
|
|
44
|
+
sessionId: string;
|
|
45
|
+
text: string;
|
|
46
|
+
}>;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
One host-authorized delegation, with the caller Session supplied by acquisition.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### AgentDelegationInvocation
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
type AgentDelegationInvocation = Readonly<{
|
|
57
|
+
toolCallId: string;
|
|
58
|
+
sendIndex: number;
|
|
59
|
+
commandId?: string;
|
|
60
|
+
meta?: CapabilitySession["meta"];
|
|
61
|
+
toolCallCode?: string;
|
|
62
|
+
}>;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Host-only identity and admitted command metadata for one delegated send.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### AgentControlDirectory
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
type AgentControlDirectory = Readonly<{
|
|
73
|
+
list: (signal) => Promise<readonly AgentControlAgent[]>;
|
|
74
|
+
send?: (input, sourceSessionId, signal, invocation?) => Promise<Accepted>;
|
|
75
|
+
create?: (input, signal, invoker?) => Promise<AgentControlAgent>;
|
|
76
|
+
setModel?: (input, signal) => Promise<void>;
|
|
77
|
+
models?: (signal) => Promise<readonly AgentControlModel[]>;
|
|
78
|
+
checkModel?: (input, signal) => Promise<void>;
|
|
79
|
+
open: (
|
|
80
|
+
agentId,
|
|
81
|
+
signal,
|
|
82
|
+
) => Promise<
|
|
83
|
+
Readonly<{
|
|
84
|
+
agent: ShiitakeAgent;
|
|
85
|
+
release: () => Promise<void>;
|
|
86
|
+
}>
|
|
87
|
+
>;
|
|
88
|
+
}>;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Host-owned discovery and per-operation access to ordinary Agents.
|
|
92
|
+
|
|
93
|
+
## Functions
|
|
94
|
+
|
|
95
|
+
### waitForAgentTerminal()
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
function waitForAgentTerminal(
|
|
99
|
+
session,
|
|
100
|
+
commandId,
|
|
101
|
+
timeoutMs,
|
|
102
|
+
signal,
|
|
103
|
+
startedAt?,
|
|
104
|
+
): Promise<
|
|
105
|
+
Readonly<{
|
|
106
|
+
commandId: string;
|
|
107
|
+
outcome: "completed" | "failed" | "cancelled" | "interrupted";
|
|
108
|
+
sequence: number;
|
|
109
|
+
diagnostic: string | null;
|
|
110
|
+
meta?: Json;
|
|
111
|
+
}>
|
|
112
|
+
>;
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Observe one durable terminal; timeout or abort closes observation, not the work.
|
|
116
|
+
|
|
117
|
+
#### Parameters
|
|
118
|
+
|
|
119
|
+
| Parameter | Type |
|
|
120
|
+
| ----------- | ---------------------------------------------- |
|
|
121
|
+
| `session` | [`ShiitakeSession`](client.md#shiitakesession) |
|
|
122
|
+
| `commandId` | `string` |
|
|
123
|
+
| `timeoutMs` | `number` |
|
|
124
|
+
| `signal` | `AbortSignal` |
|
|
125
|
+
| `startedAt` | `number` |
|
|
126
|
+
|
|
127
|
+
#### Returns
|
|
128
|
+
|
|
129
|
+
`Promise`\<`Readonly`\<\{ `commandId`: `string`; `outcome`: `"completed"` \|
|
|
130
|
+
`"failed"` \| `"cancelled"` \| `"interrupted"`; `sequence`: `number`;
|
|
131
|
+
`diagnostic`: `string` \| `null`; `meta?`: [`Json`](extensions.md#json); \}\>\>
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### createAgentControlSource()
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
function createAgentControlSource(directory): CapabilitySource;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Compose one authorized Agent-control projection for a single run lease.
|
|
142
|
+
|
|
143
|
+
#### Parameters
|
|
144
|
+
|
|
145
|
+
| Parameter | Type |
|
|
146
|
+
| ----------- | ------------------------------------------------- |
|
|
147
|
+
| `directory` | [`AgentControlDirectory`](#agentcontroldirectory) |
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
`CapabilitySource`
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/shiitake**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/shiitake](README.md) / client-entry
|
|
8
|
+
|
|
9
|
+
# client-entry
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### ClientChipV1
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type ClientChipV1 = typeof clientChipSchemaV1.Type;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
An admitted, display-only status chip.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### ClientTimelineCellV1
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
type ClientTimelineCellV1 = typeof clientTimelineCellSchemaV1.Type;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
An admitted committed event with its producer identity and anchor.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### ClientContributionV1
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
type ClientContributionV1 = typeof clientContributionSchemaV1.Type;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The closed V1 presentation grammar returned by a client entry.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### ClientExtensionContextV1
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
type ClientExtensionContextV1 = Readonly<{
|
|
47
|
+
activity: AsyncIterable<ClientActivityV0>;
|
|
48
|
+
signal: AbortSignal;
|
|
49
|
+
onError: (error) => void;
|
|
50
|
+
}>;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Borrowed latest-value activity; each iterator subscribes separately.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### ClientEntryV1
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
type ClientEntryV1 = Readonly<{
|
|
61
|
+
protocol: "shiitake.client/v1";
|
|
62
|
+
id: ExtensionId;
|
|
63
|
+
correlatedPrompts?: "note";
|
|
64
|
+
attach?: (context) => Effect.Effect<void, Error, Scope.Scope>;
|
|
65
|
+
contribute?: (slot) => ClientContributionV1;
|
|
66
|
+
}>;
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Installed client protocol; projection decoding remains inside the author
|
|
70
|
+
closure.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### ClientActivityV0
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
type ClientActivityV0 = "idle" | "working" | "blocked" | "unknown";
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Activity already observed by the client, never an execution authority.
|
|
81
|
+
|
|
82
|
+
## Variables
|
|
83
|
+
|
|
84
|
+
### clientChipSchemaV1
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
const clientChipSchemaV1: Struct<{
|
|
88
|
+
id: String;
|
|
89
|
+
order: Number;
|
|
90
|
+
row: Struct<{
|
|
91
|
+
id: String;
|
|
92
|
+
title: String;
|
|
93
|
+
detail: optional<String>;
|
|
94
|
+
tone: optional<
|
|
95
|
+
Literals<readonly ["attention", "running", "error", "settled", "muted"]>
|
|
96
|
+
>;
|
|
97
|
+
status: optional<
|
|
98
|
+
Struct<{
|
|
99
|
+
label: String;
|
|
100
|
+
tone: Literals<
|
|
101
|
+
readonly [
|
|
102
|
+
"neutral",
|
|
103
|
+
"primary",
|
|
104
|
+
"secondary",
|
|
105
|
+
"accent",
|
|
106
|
+
"success",
|
|
107
|
+
"info",
|
|
108
|
+
"warning",
|
|
109
|
+
"error",
|
|
110
|
+
]
|
|
111
|
+
>;
|
|
112
|
+
}>
|
|
113
|
+
>;
|
|
114
|
+
open: optional<
|
|
115
|
+
Struct<{
|
|
116
|
+
params: $Array<
|
|
117
|
+
Struct<{
|
|
118
|
+
key: String;
|
|
119
|
+
value: String;
|
|
120
|
+
}>
|
|
121
|
+
>;
|
|
122
|
+
}>
|
|
123
|
+
>;
|
|
124
|
+
}>;
|
|
125
|
+
compact: optional<String>;
|
|
126
|
+
}>;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
One display-only status chip; order is local to the entry.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### clientTimelineCellSchemaV1
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
const clientTimelineCellSchemaV1: Struct<{
|
|
137
|
+
id: String;
|
|
138
|
+
sequence: Int;
|
|
139
|
+
at: Int;
|
|
140
|
+
commandId: NullOr<String>;
|
|
141
|
+
rows: $Array<Struct<{
|
|
142
|
+
id: String;
|
|
143
|
+
title: String;
|
|
144
|
+
detail: optional<String>;
|
|
145
|
+
tone: optional<Literals<readonly ["attention", "running", "error", "settled", "muted"]>>;
|
|
146
|
+
status: optional<Struct<{
|
|
147
|
+
label: String;
|
|
148
|
+
tone: Literals<readonly ["neutral", "primary", "secondary", "accent", "success", "info", "warning", "error"]>;
|
|
149
|
+
}>>;
|
|
150
|
+
open: optional<Struct<{
|
|
151
|
+
params: $Array<Struct<{
|
|
152
|
+
key: ...;
|
|
153
|
+
value: ...;
|
|
154
|
+
}>>;
|
|
155
|
+
}>>;
|
|
156
|
+
actions: optional<$Array<Struct<{
|
|
157
|
+
id: String;
|
|
158
|
+
label: String;
|
|
159
|
+
input: optional<$Record<..., ...>>;
|
|
160
|
+
}>>>;
|
|
161
|
+
}>>;
|
|
162
|
+
}>;
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
One committed presentation event anchored to its real command, if any.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### clientContributionSchemaV1
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
const clientContributionSchemaV1: Struct<{
|
|
173
|
+
chips: $Array<Struct<{
|
|
174
|
+
id: String;
|
|
175
|
+
order: Number;
|
|
176
|
+
row: Struct<{
|
|
177
|
+
id: String;
|
|
178
|
+
title: String;
|
|
179
|
+
detail: optional<String>;
|
|
180
|
+
tone: optional<Literals<readonly ["attention", "running", "error", "settled", "muted"]>>;
|
|
181
|
+
status: optional<Struct<{
|
|
182
|
+
label: String;
|
|
183
|
+
tone: Literals<...>;
|
|
184
|
+
}>>;
|
|
185
|
+
open: optional<Struct<{
|
|
186
|
+
params: $Array<...>;
|
|
187
|
+
}>>;
|
|
188
|
+
}>;
|
|
189
|
+
compact: optional<String>;
|
|
190
|
+
}>>;
|
|
191
|
+
panel: $Array<Struct<{
|
|
192
|
+
id: String;
|
|
193
|
+
title: String;
|
|
194
|
+
detail: optional<String>;
|
|
195
|
+
tone: optional<Literals<readonly ["attention", "running", "error", "settled", "muted"]>>;
|
|
196
|
+
status: optional<Struct<{
|
|
197
|
+
label: String;
|
|
198
|
+
tone: Literals<readonly ["neutral", "primary", "secondary", "accent", "success", "info", "warning", "error"]>;
|
|
199
|
+
}>>;
|
|
200
|
+
open: optional<Struct<{
|
|
201
|
+
params: $Array<Struct<{
|
|
202
|
+
key: ...;
|
|
203
|
+
value: ...;
|
|
204
|
+
}>>;
|
|
205
|
+
}>>;
|
|
206
|
+
actions: optional<$Array<Struct<{
|
|
207
|
+
id: String;
|
|
208
|
+
label: String;
|
|
209
|
+
input: optional<$Record<..., ...>>;
|
|
210
|
+
}>>>;
|
|
211
|
+
inspection: optionalKey<Struct<{
|
|
212
|
+
commandId: String;
|
|
213
|
+
title: String;
|
|
214
|
+
rows: $Array<Struct<{
|
|
215
|
+
id: ...;
|
|
216
|
+
title: ...;
|
|
217
|
+
detail: ...;
|
|
218
|
+
tone: ...;
|
|
219
|
+
status: ...;
|
|
220
|
+
open: ...;
|
|
221
|
+
}>>;
|
|
222
|
+
}>>;
|
|
223
|
+
}>>;
|
|
224
|
+
timeline: Struct<{
|
|
225
|
+
cells: $Array<Struct<{
|
|
226
|
+
id: String;
|
|
227
|
+
sequence: Int;
|
|
228
|
+
at: Int;
|
|
229
|
+
commandId: NullOr<String>;
|
|
230
|
+
rows: $Array<Struct<{
|
|
231
|
+
id: String;
|
|
232
|
+
title: String;
|
|
233
|
+
detail: optional<...>;
|
|
234
|
+
tone: optional<...>;
|
|
235
|
+
status: optional<...>;
|
|
236
|
+
open: optional<...>;
|
|
237
|
+
actions: optional<...>;
|
|
238
|
+
}>>;
|
|
239
|
+
}>>;
|
|
240
|
+
omitted: Int;
|
|
241
|
+
}>;
|
|
242
|
+
waiting: NullOr<Struct<{
|
|
243
|
+
summary: String;
|
|
244
|
+
cancel: Struct<{
|
|
245
|
+
id: String;
|
|
246
|
+
label: String;
|
|
247
|
+
input: optional<$Record<String, Codec<Json, Json, never, never>>>;
|
|
248
|
+
}>;
|
|
249
|
+
}>>;
|
|
250
|
+
}>;
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Closed, bounded presentation data shared by every renderer.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
### parseClientEntryV1
|
|
258
|
+
|
|
259
|
+
```ts
|
|
260
|
+
const parseClientEntryV1: (
|
|
261
|
+
input,
|
|
262
|
+
options?,
|
|
263
|
+
) => Readonly<{
|
|
264
|
+
protocol: "shiitake.client/v1";
|
|
265
|
+
id: string & Brand<"ExtensionId">;
|
|
266
|
+
correlatedPrompts?: "note";
|
|
267
|
+
attach?: (context) => Effect<void, Error, Scope>;
|
|
268
|
+
contribute?: (slot) => object;
|
|
269
|
+
}> = decodeEntry;
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Admit exactly V1; installed executable code is not sandboxed.
|
|
273
|
+
|
|
274
|
+
#### Parameters
|
|
275
|
+
|
|
276
|
+
| Parameter | Type |
|
|
277
|
+
| ---------- | -------------- |
|
|
278
|
+
| `input` | `unknown` |
|
|
279
|
+
| `options?` | `ParseOptions` |
|
|
280
|
+
|
|
281
|
+
#### Returns
|
|
282
|
+
|
|
283
|
+
`Readonly`\<\{ `protocol`: `"shiitake.client/v1"`; `id`: `string` &
|
|
284
|
+
`Brand`\<`"ExtensionId"`\>; `correlatedPrompts?`: `"note"`; `attach?`:
|
|
285
|
+
(`context`) => `Effect`\<`void`, `Error`, `Scope`\>; `contribute?`: (`slot`) =>
|
|
286
|
+
`object`; \}\>
|
|
287
|
+
|
|
288
|
+
## Functions
|
|
289
|
+
|
|
290
|
+
### defineClientEntry()
|
|
291
|
+
|
|
292
|
+
```ts
|
|
293
|
+
function defineClientEntry<C, P, PI>(contract, client): ClientEntryV1;
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
One typed author seam, usable with ordinary async attachment code.
|
|
297
|
+
|
|
298
|
+
#### Type Parameters
|
|
299
|
+
|
|
300
|
+
| Type Parameter |
|
|
301
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
302
|
+
| `C` _extends_ `Readonly`\<`Record`\<`string`, `Readonly`\<\{ `scope`: `"session"` \| `"agent"`; `input`: `Codec`\<`unknown`\>; `output`: `Codec`\<`unknown`\>; \}\>\>\> |
|
|
303
|
+
| `P` |
|
|
304
|
+
| `PI` |
|
|
305
|
+
|
|
306
|
+
#### Parameters
|
|
307
|
+
|
|
308
|
+
| Parameter | Type |
|
|
309
|
+
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
310
|
+
| `contract` | [`ExtensionContractV0`](extensions.md#extensioncontractv0)\<`C`, `P`, `PI`\> |
|
|
311
|
+
| `client` | `Readonly`\<\{ `correlatedPrompts?`: [`ClientEntryV1`](#cliententryv1)\[`"correlatedPrompts"`\]; `attach?`: (`context`) => \| `void` \| `Promise`\<`void`\> \| `Effect.Effect`\<`void`, `Error`, `Scope.Scope`\>; `contribute?`: (`view`) => [`ClientContributionV1`](#clientcontributionv1); \}\> |
|
|
312
|
+
|
|
313
|
+
#### Returns
|
|
314
|
+
|
|
315
|
+
[`ClientEntryV1`](#cliententryv1)
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
### viewExtension()
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
function viewExtension<C, P, PI>(contract, slot): ExtensionViewV0<P>;
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Decode one observed slot using its owning contract's projection.
|
|
326
|
+
|
|
327
|
+
#### Type Parameters
|
|
328
|
+
|
|
329
|
+
| Type Parameter |
|
|
330
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
331
|
+
| `C` _extends_ `Readonly`\<`Record`\<`string`, `Readonly`\<\{ `scope`: `"session"` \| `"agent"`; `input`: `Codec`\<`unknown`\>; `output`: `Codec`\<`unknown`\>; \}\>\>\> |
|
|
332
|
+
| `P` |
|
|
333
|
+
| `PI` |
|
|
334
|
+
|
|
335
|
+
#### Parameters
|
|
336
|
+
|
|
337
|
+
| Parameter | Type |
|
|
338
|
+
| ---------- | ---------------------------------------------------------------------------- |
|
|
339
|
+
| `contract` | [`ExtensionContractV0`](extensions.md#extensioncontractv0)\<`C`, `P`, `PI`\> |
|
|
340
|
+
| `slot` | [`ExtensionSlotV0`](extensions.md#extensionslotv0) \| `undefined` |
|
|
341
|
+
|
|
342
|
+
#### Returns
|
|
343
|
+
|
|
344
|
+
[`ExtensionViewV0`](client.md#extensionviewv0)\<`P`\>
|