@fungi.computer/shiitake 0.3.0 → 0.4.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 +18 -8
- package/dist/agent-control.d.ts +19 -15
- package/dist/agent-control.js +66 -126
- package/dist/client-wire.d.ts +12 -3
- package/dist/client-wire.js +33 -8
- package/dist/client.d.ts +34 -3
- package/dist/client.js +1 -1
- package/dist/cloudflare.d.ts +3 -1
- package/dist/cloudflare.js +2 -2
- package/dist/delegation.d.ts +145 -13
- package/dist/delegation.js +109 -37
- package/dist/effect.d.ts +1 -1
- package/dist/fleet.d.ts +30 -8
- package/dist/fleet.js +142 -38
- package/dist/http-routes.d.ts +91 -19
- package/dist/http-routes.js +15 -1
- package/dist/index.d.ts +2 -2
- package/dist/internal/admission-door.d.ts +2 -0
- package/dist/internal/admission-door.js +2 -0
- package/dist/internal/client-boundary.d.ts +10 -0
- package/dist/internal/client-boundary.js +10 -0
- package/dist/internal/compaction/compaction.d.ts +5 -5
- package/dist/internal/compaction/compaction.js +4 -5
- package/dist/internal/compaction/settings.d.ts +1 -1
- package/dist/internal/compaction/utils.d.ts +1 -1
- package/dist/internal/contracts.d.ts +2 -0
- package/dist/internal/coordinator.d.ts +3 -1
- package/dist/internal/coordinator.js +98 -13
- package/dist/internal/effect-client.d.ts +3 -1
- package/dist/internal/effect-client.js +3 -2
- package/dist/internal/effect-contracts.d.ts +6 -2
- package/dist/internal/model-acquisition.js +2 -0
- package/dist/internal/model-preference.d.ts +2 -2
- package/dist/internal/observation-kernel.d.ts +8 -4
- package/dist/internal/observation-kernel.js +44 -9
- package/dist/internal/promise-facade.d.ts +1 -1
- package/dist/internal/promise-facade.js +1 -1
- package/dist/internal/run-scope.js +37 -8
- package/dist/internal/runtime-coordinator.d.ts +5 -0
- package/dist/internal/runtime-coordinator.js +8 -4
- package/dist/internal/runtime-core.d.ts +2 -1
- package/dist/internal/runtime-core.js +6 -1
- package/dist/internal/session-context.d.ts +1 -1
- package/dist/internal/session-context.js +84 -13
- package/dist/internal/woodstock/agent-reply.d.ts +7 -2
- package/dist/internal/woodstock/agent-reply.js +22 -13
- package/dist/internal/woodstock/fleet-store.d.ts +3 -2
- package/dist/internal/woodstock/fleet-store.js +43 -6
- package/dist/internal/woodstock/index.d.ts +2 -0
- package/dist/internal/woodstock/index.js +11 -5
- package/dist/internal/woodstock/run-recovery.js +4 -1
- package/dist/internal/woodstock/session-entry.d.ts +14 -4
- package/dist/internal/woodstock/session-entry.js +1 -0
- package/dist/internal/woodstock/session-store.d.ts +4 -0
- package/dist/internal/woodstock/session-store.js +26 -19
- package/dist/remote-client.js +5 -1
- package/dist/testing.d.ts +6 -3
- package/dist/testing.js +4 -2
- package/docs/api/agent-control.md +18 -12
- package/docs/api/client.md +78 -0
- package/docs/api/delegation.md +72 -55
- package/docs/api/effect.md +5 -0
- package/docs/api/fleet.md +23 -23
- package/docs/api/http.md +2 -1
- package/docs/api/index.md +13 -0
- package/docs/api/model-preference.md +10 -10
- package/docs/api/testing.md +3 -3
- package/package.json +9 -8
|
@@ -52,7 +52,7 @@ const parseModelPreference: (
|
|
|
52
52
|
) => {
|
|
53
53
|
providerId: string;
|
|
54
54
|
modelId: string;
|
|
55
|
-
reasoning?: "
|
|
55
|
+
reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
|
|
56
56
|
} | null;
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -67,8 +67,8 @@ Decode the bounded client preference; availability remains model-owner policy.
|
|
|
67
67
|
|
|
68
68
|
#### Returns
|
|
69
69
|
|
|
70
|
-
\| \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"
|
|
71
|
-
`"low"` \| `"
|
|
70
|
+
\| \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"high"` \|
|
|
71
|
+
`"low"` \| `"max"` \| `"medium"` \| `"minimal"` \| `"xhigh"`; \} \| `null`
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
@@ -81,7 +81,7 @@ const parseModelPreferenceJson: (
|
|
|
81
81
|
) => {
|
|
82
82
|
providerId: string;
|
|
83
83
|
modelId: string;
|
|
84
|
-
reasoning?: "
|
|
84
|
+
reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
|
|
85
85
|
} | null;
|
|
86
86
|
```
|
|
87
87
|
|
|
@@ -96,8 +96,8 @@ Decode the serialized preference with the same maintained schema.
|
|
|
96
96
|
|
|
97
97
|
#### Returns
|
|
98
98
|
|
|
99
|
-
\| \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"
|
|
100
|
-
`"low"` \| `"
|
|
99
|
+
\| \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"high"` \|
|
|
100
|
+
`"low"` \| `"max"` \| `"medium"` \| `"minimal"` \| `"xhigh"`; \} \| `null`
|
|
101
101
|
|
|
102
102
|
---
|
|
103
103
|
|
|
@@ -133,7 +133,7 @@ Parse the footer's provider/model spelling; model ids may contain slashes.
|
|
|
133
133
|
| ------------ | ------------------------------------------------------------------------ | ------------- |
|
|
134
134
|
| `providerId` | `string` | `identifier` |
|
|
135
135
|
| `modelId` | `string` | `identifier` |
|
|
136
|
-
| `reasoning?` | `"
|
|
136
|
+
| `reasoning?` | `"high"` \| `"low"` \| `"max"` \| `"medium"` \| `"minimal"` \| `"xhigh"` | - |
|
|
137
137
|
|
|
138
138
|
---
|
|
139
139
|
|
|
@@ -143,7 +143,7 @@ Parse the footer's provider/model spelling; model ids may contain slashes.
|
|
|
143
143
|
function resolveModelPreference(layers): {
|
|
144
144
|
providerId: string;
|
|
145
145
|
modelId: string;
|
|
146
|
-
reasoning?: "
|
|
146
|
+
reasoning?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
|
|
147
147
|
} | null;
|
|
148
148
|
```
|
|
149
149
|
|
|
@@ -158,8 +158,8 @@ availability; an explicit choice never silently falls through on auth failure.
|
|
|
158
158
|
|
|
159
159
|
#### Returns
|
|
160
160
|
|
|
161
|
-
\| \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"
|
|
162
|
-
`"low"` \| `"
|
|
161
|
+
\| \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"high"` \|
|
|
162
|
+
`"low"` \| `"max"` \| `"medium"` \| `"minimal"` \| `"xhigh"`; \} \| `null`
|
|
163
163
|
|
|
164
164
|
## References
|
|
165
165
|
|
package/docs/api/testing.md
CHANGED
|
@@ -84,7 +84,7 @@ Optional canonical Agent inputs and a borrowed owner; defaults are in-memory.
|
|
|
84
84
|
type MemoryHost = Readonly<{
|
|
85
85
|
agent: ShiitakeOwnerAgent;
|
|
86
86
|
reconcile: () => Promise<void>;
|
|
87
|
-
settle: (sessionId, maxTicks?) => Promise<SessionSnapshot>;
|
|
87
|
+
settle: (sessionId, maxTicks?, beforeRead?) => Promise<SessionSnapshot>;
|
|
88
88
|
close: () => Promise<void>;
|
|
89
89
|
}>;
|
|
90
90
|
```
|
|
@@ -154,7 +154,7 @@ Script one model turn that replies with the system prompt it received.
|
|
|
154
154
|
function memoryHost(options?): Promise<Readonly<{
|
|
155
155
|
agent: ShiitakeOwnerAgent;
|
|
156
156
|
reconcile: () => Promise<void>;
|
|
157
|
-
settle: (sessionId, maxTicks?) => Promise<Readonly<{
|
|
157
|
+
settle: (sessionId, maxTicks?, beforeRead?) => Promise<Readonly<{
|
|
158
158
|
sessionId: string;
|
|
159
159
|
cursor: string | null;
|
|
160
160
|
hasMore: boolean;
|
|
@@ -237,7 +237,7 @@ privileges. No submitted JavaScript is evaluated by this helper.
|
|
|
237
237
|
|
|
238
238
|
`Promise`\<`Readonly`\<\{ `agent`:
|
|
239
239
|
[`ShiitakeOwnerAgent`](index.md#shiitakeowneragent); `reconcile`: () =>
|
|
240
|
-
`Promise`\<`void`\>; `settle`: (`sessionId`, `maxTicks?`) =>
|
|
240
|
+
`Promise`\<`void`\>; `settle`: (`sessionId`, `maxTicks?`, `beforeRead?`) =>
|
|
241
241
|
`Promise`\<`Readonly`\<\{ `sessionId`: `string`; `cursor`: `string` \| `null`;
|
|
242
242
|
`hasMore`: `boolean`; `oldestCursor?`: `string` \| `null`; `messages`: readonly
|
|
243
243
|
`Readonly`\<\{ `requestId?`: ... \| ...; `meta?`: ... \| ...; `data?`: ... \|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/shiitake",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Effect-native durable Session acceptance and bounded run orchestration",
|
|
6
6
|
"type": "module",
|
|
@@ -82,19 +82,19 @@
|
|
|
82
82
|
"node": ">=22.13"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@fungi.computer/bird-dog": "0.
|
|
85
|
+
"@fungi.computer/bird-dog": "0.2.0",
|
|
86
86
|
"@fungi.computer/cairn": "0.1.0",
|
|
87
|
-
"@fungi.computer/carrier": "0.
|
|
88
|
-
"@fungi.computer/knapsack": "0.
|
|
89
|
-
"@fungi.computer/mule": "0.
|
|
90
|
-
"@fungi.computer/mycelium": "0.2.
|
|
91
|
-
"@fungi.computer/seam": "0.
|
|
87
|
+
"@fungi.computer/carrier": "0.2.0",
|
|
88
|
+
"@fungi.computer/knapsack": "0.3.0",
|
|
89
|
+
"@fungi.computer/mule": "0.2.0",
|
|
90
|
+
"@fungi.computer/mycelium": "0.2.2",
|
|
91
|
+
"@fungi.computer/seam": "0.2.0",
|
|
92
92
|
"@fungi.computer/watchdog": "0.1.0",
|
|
93
93
|
"effect": "4.0.2",
|
|
94
94
|
"zod": "4.4.3",
|
|
95
95
|
"@earendil-works/pi-ai": "1.3.0",
|
|
96
96
|
"@fungi.computer/gills": "0.2.0",
|
|
97
|
-
"@fungi.computer/agar": "0.3.
|
|
97
|
+
"@fungi.computer/agar": "0.3.1"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@cloudflare/workers-types": "5.20260828.1",
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
"clean": "node --input-type=module --eval \"import { rm } from 'node:fs/promises'; await rm('dist', { recursive: true, force: true });\"",
|
|
133
133
|
"test": "pnpm run test:unit && pnpm run test:merge",
|
|
134
134
|
"test:unit": "vitest run",
|
|
135
|
+
"test:load": "vitest run --config vitest.load.config.ts",
|
|
135
136
|
"test:merge": "node test/cloudflare-durable-wake.native.mjs && node test/woodstock-storage-conformance.native.mjs && pnpm run test:docs",
|
|
136
137
|
"test:docs": "node --import tsx --test examples/bookmarks/checks.ts",
|
|
137
138
|
"docs": "tsx ../../tooling/repository/src/docs/cli.ts check --root ../..",
|