esoul-sdk 0.20.0 → 0.21.1
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/CHANGELOG.md +41 -0
- package/README.md +1 -0
- package/api-reference.md +231 -11
- package/dist/manifest.d.ts +67 -6
- package/dist/manifest.js +31 -0
- package/dist/server.d.ts +98 -0
- package/dist/server.js +31 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.js +4 -0
- package/dist/testing/llm.d.ts +45 -0
- package/dist/testing/llm.js +76 -0
- package/dist/testing/sim-gmail/personas.d.ts +2 -0
- package/dist/testing/sim-gmail/personas.js +17 -9
- package/dist/types.d.ts +7 -1
- package/docs/10-testing.md +14 -0
- package/docs/19-model-calls.md +149 -0
- package/llms-full.txt +168 -0
- package/llms.txt +1 -0
- package/package.json +1 -1
- package/schemas/plugin.schema.json +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
Releases before 0.20.0 are recorded in the repository history only.
|
|
4
4
|
|
|
5
|
+
## 0.21.1
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **SimGmail people answer an agent's mail.** A persona that is a person (`reply`, `optout`) now reads and
|
|
10
|
+
answers mail marked `Auto-Submitted` (what an app's autonomous agent sends, RFC 3834) — as people do. Only a
|
|
11
|
+
machine responder (`ooo`) stays silent to it, and a dead address bounces it. Before, every persona ignored
|
|
12
|
+
it, so a simulated conversation with an autonomous agent stopped after the first reply.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`esoul-sdk/testing` exports the failed-request list** (`listFailedRequests`, `subscribeFailedRequests`,
|
|
17
|
+
`resetFailedRequests`) so a test can assert that a click which failed reverted and was named on the banner
|
|
18
|
+
(`runOptimistic` from `esoul-sdk/react`).
|
|
19
|
+
|
|
20
|
+
## 0.21.0
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **Model calls, billed: `llm` in `plugin.json` and `llm(ctx).generate(req)` in `esoul-sdk/server`.**
|
|
25
|
+
Declare `"llm": { "why", "dailyBudgetUsd"? (default 5, at most 100), "models"? }` and call
|
|
26
|
+
`llm(ctx).generate({ purpose, model?, system?, messages, tools?, schema?, maxOutputTokens?, temperature? })`
|
|
27
|
+
from an op or a route — or `ctx.llm.generate(…)` from a task. The app instance's workspace **owner**
|
|
28
|
+
pays from their AI credits; every call is recorded with the app, the instance and `purpose`; the
|
|
29
|
+
app's spend per owner per UTC day is capped by `dailyBudgetUsd`. `model` is a tier (`fast`,
|
|
30
|
+
`balanced`, `best`) or a gateway id on the platform's allowlist (DeepSeek, Claude, GPT mini/nano,
|
|
31
|
+
Gemini Flash) or in `llm.models`. `tools` are definitions: the model's calls come back in
|
|
32
|
+
`toolCalls`, never executed by the platform. `schema` (JSON Schema) returns the answer parsed in
|
|
33
|
+
`object`. A refusal throws `LlmUnavailable` (`isLlmUnavailable`) with `code` `not_declared` |
|
|
34
|
+
`not_allowed` | `no_credits` | `budget_exceeded` | `model_not_allowed` | `provider_unavailable`.
|
|
35
|
+
Schema: `PluginLlmSchema`. See `docs/19-model-calls.md`.
|
|
36
|
+
- **`scriptedModel(policy?)` in `esoul-sdk/testing`.** A deterministic stand-in for `llm(ctx)`: scripted
|
|
37
|
+
texts, objects and tool calls by matching the last user message (or a function), a short echo by
|
|
38
|
+
default, zero cost, every request in `.calls`. The Forge box answers every model call with one.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **App files may not import a model SDK** (`ai`, `@ai-sdk/*`, `openai`, `@anthropic-ai/*`,
|
|
43
|
+
`@google/genai`, `@inngest/ai`) — the box check and the install inspection refuse it, tests
|
|
44
|
+
included. Apps call models through `llm(ctx)`.
|
|
45
|
+
|
|
5
46
|
## 0.20.0
|
|
6
47
|
|
|
7
48
|
### Added
|
package/README.md
CHANGED
|
@@ -573,6 +573,7 @@ Exits 0 when the folder is a well-formed application package; otherwise prints e
|
|
|
573
573
|
| [14. Your own tables](docs/14-database.md) | `db`, rules, scopes, sealed fields, indexes, migrations |
|
|
574
574
|
| [15. Realtime](docs/15-realtime.md) | Topics, audiences, addressing |
|
|
575
575
|
| [16. Bindings](docs/16-bindings.md) | Slots, contracts, reaching another application |
|
|
576
|
+
| [19. Model calls](docs/19-model-calls.md) | `llm(ctx)`: billed model calls, budgets, `scriptedModel()` for tests |
|
|
576
577
|
|
|
577
578
|
## Versions
|
|
578
579
|
|