@robota-sdk/agent-core 3.0.0-beta.97 → 3.0.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/CHANGELOG.md +952 -0
- package/dist/browser/index.d.ts +24 -12
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +10 -10
- package/dist/browser/index.js.map +1 -1
- package/dist/node/{index-BFTag17m.d.ts → index-BHWuBVuS.d.ts} +25 -13
- package/dist/node/index-BHWuBVuS.d.ts.map +1 -0
- package/dist/node/{index-De7jXKGE.d.cts → index-DTZWUDgg.d.cts} +25 -13
- package/dist/node/index-DTZWUDgg.d.cts.map +1 -0
- package/dist/node/index.cjs +10 -10
- package/dist/node/index.d.cts +2 -2
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +12 -12
- package/dist/node/index.js.map +1 -1
- package/dist/node/node.cjs +1 -1
- package/dist/node/node.d.cts.map +1 -1
- package/dist/node/node.d.ts.map +1 -1
- package/dist/node/node.js +1 -1
- package/dist/node/node.js.map +1 -1
- package/dist/node/testing/index.d.cts +1 -1
- package/dist/node/testing/index.d.ts +1 -1
- package/package.json +3 -3
- package/dist/node/index-BFTag17m.d.ts.map +0 -1
- package/dist/node/index-De7jXKGE.d.cts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,957 @@
|
|
|
1
1
|
# @robota-sdk/agent-core
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
### Major Changes
|
|
5
|
+
|
|
6
|
+
- 4eea54b: **`@robota-sdk/agent-core` removes `IMCPToolConfig` and `IToolFactory.createMCPTool()` with no compatibility facade.**
|
|
7
|
+
|
|
8
|
+
Both were exported with no producer and no consumer. `IToolFactory` had no implementation anywhere in
|
|
9
|
+
this repository — `grep -rn 'IToolFactory' packages/*/src apps/*/src` returned only the declaration
|
|
10
|
+
and its export line — and nothing constructed an `IMCPToolConfig`. An MCP server definition is now
|
|
11
|
+
owned by `@robota-sdk/agent-mcp` (MCP-001), which also absorbs the raw/validated/resolved
|
|
12
|
+
forms, source provenance and shadow metadata, strict foreign `mcpServers` decoding, environment
|
|
13
|
+
templates, whole-entry precedence, reversible disable overlays, redacted management projections and
|
|
14
|
+
activation identity.
|
|
15
|
+
|
|
16
|
+
`major` because an exported type and an interface member are gone. An external implementer of
|
|
17
|
+
`IToolFactory` — there is none in this repository — stops compiling until it removes its
|
|
18
|
+
`createMCPTool` member; a caller of the removed type must take the `agent-mcp` definition contract
|
|
19
|
+
instead. No facade is retained deliberately: keeping a deprecated alias would re-create the state
|
|
20
|
+
this change exists to end, two MCP contracts with one of them dead.
|
|
21
|
+
|
|
22
|
+
`@robota-sdk/agent-mcp` is the same workspace package previously named `@robota-sdk/agent-tool-mcp`,
|
|
23
|
+
renamed in place. It stays `private`, so the rename publishes nothing; MCP-002 owns its publication
|
|
24
|
+
together with the official MCP TypeScript SDK client and the first product-reachable slice.
|
|
25
|
+
- f336838: One permission evaluation order for every caller. The interactive session, background tasks and
|
|
26
|
+
subagents used to run two different resolvers, so the same call could be decided differently
|
|
27
|
+
depending on who made it. They now share `evaluatePermission`, and a background policy only adds a
|
|
28
|
+
ceiling, an ask-everything flag and the task's own lists to it:
|
|
29
|
+
|
|
30
|
+
deny → caller ceiling → unevaluable deny (ask) → never-auto-approve set (ask) → ask-everything →
|
|
31
|
+
bypassPermissions → allow → mode.
|
|
32
|
+
|
|
33
|
+
- **`ask` rules.** `permissions.ask` patterns always ask, in every mode including
|
|
34
|
+
`bypassPermissions`. They are matched per command like a deny rule, and are validated at
|
|
35
|
+
construction alongside `allow` and `deny`.
|
|
36
|
+
- **Never auto-approved, bypass included:** removing a critical path with `rm`/`rmdir` (the root, a
|
|
37
|
+
top-level directory, home, the working directory or a parent), and a modify-class write into
|
|
38
|
+
`.git`, the configured project-state directory, `.claude`, `.agents`, `.mcp.json`, `.gitconfig`, `.npmrc` or a shell rc file.
|
|
39
|
+
Files inside an isolated worktree (`the configured project-state directory/worktrees/<name>/…`) are ordinary files. With no
|
|
40
|
+
approver attached, an ask is a denial.
|
|
41
|
+
- **A ceiling is checked before bypass and before any ask.** A subagent's `inherit-allowlist` ceiling
|
|
42
|
+
is now the parent's *effective* rules, read live at spawn: settings, preset lists and command
|
|
43
|
+
auto-allows. It used to be the raw settings file. An unevaluable deny under a policy now asks,
|
|
44
|
+
like everywhere else, where it used to deny outright; with no approver it is still a denial.
|
|
45
|
+
- **Settings layers union `permissions.allow`**, as they already did `deny`. A checked-in project
|
|
46
|
+
file no longer silently discards the user's allow list.
|
|
47
|
+
- **Print mode, `createQuery()` and headless sessions default to `default` mode**, not
|
|
48
|
+
`bypassPermissions`. They have no approver, so a call that would ask is denied. Pass
|
|
49
|
+
`--permission-mode` / `permissionMode: 'bypassPermissions'` explicitly for unattended runs.
|
|
50
|
+
|
|
51
|
+
**Breaking:**
|
|
52
|
+
- `@robota-sdk/agent-core` removes `resolvePermissionByPolicy` and `TPermissionPolicyDecision` in
|
|
53
|
+
favour of `projectPermissionPolicy` plus `evaluatePermission`'s new `context` argument.
|
|
54
|
+
- `@robota-sdk/agent-framework` changes the settings merge rule for `permissions.allow`, and the
|
|
55
|
+
default permission mode of `createQuery()` and headless sessions.
|
|
56
|
+
- 475e085: **BREAKING — CORE-028: the Node-only surface moves from the main barrel to `@robota-sdk/agent-core/node`.**
|
|
57
|
+
|
|
58
|
+
`canonicalizePath`, `isPathInside`, `CommandExecutor` and `HttpExecutor` were exported from the main
|
|
59
|
+
barrel. Each one needs `node:fs`, `node:path` or `node:child_process`, so the package's `browser`
|
|
60
|
+
build had those three builtins in its static import graph — a package declaring a `browser` export
|
|
61
|
+
condition while statically importing Node builtins. A bundler resolves that one of two ways: it
|
|
62
|
+
errors, or it aliases the builtin to an empty object and the code fails later at a call site with no
|
|
63
|
+
useful trace. Neither is a build you want to ship.
|
|
64
|
+
|
|
65
|
+
The four now live at the `./node` subpath, which makes the dependency legible at the import site
|
|
66
|
+
instead of hiding it inside a barrel. The main barrel's static graph imports zero Node builtins,
|
|
67
|
+
which a test now holds at zero rather than at a list of known remainders.
|
|
68
|
+
|
|
69
|
+
**Migration** — change the import path; no signature changed:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
// before
|
|
73
|
+
import {
|
|
74
|
+
canonicalizePath,
|
|
75
|
+
isPathInside,
|
|
76
|
+
CommandExecutor,
|
|
77
|
+
HttpExecutor,
|
|
78
|
+
} from '@robota-sdk/agent-core';
|
|
79
|
+
|
|
80
|
+
// after
|
|
81
|
+
import {
|
|
82
|
+
canonicalizePath,
|
|
83
|
+
isPathInside,
|
|
84
|
+
CommandExecutor,
|
|
85
|
+
HttpExecutor,
|
|
86
|
+
} from '@robota-sdk/agent-core/node';
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`./node` carries `"browser": null`, declaring that the subpath has no browser implementation, so a
|
|
90
|
+
resolver that honours a null target refuses it by name instead of quietly serving the Node build.
|
|
91
|
+
|
|
92
|
+
That declaration is worth stating precisely, because it was measured rather than assumed. Bundling
|
|
93
|
+
`import '@robota-sdk/agent-core/node'` under `['browser', 'import', 'default']` with the repo's own
|
|
94
|
+
bundler does NOT stop at the null: through a workspace link it resolves the `source` entry and then
|
|
95
|
+
fails on `node:fs`, `node:path` and `node:child_process`. The build still breaks, and the message
|
|
96
|
+
still names the Node dependency, so the failure is visible either way — but by a different mechanism
|
|
97
|
+
than the null, and only spec-compliant resolvers give the cleaner error. The claim here is the
|
|
98
|
+
declaration, not a guarantee about every bundler.
|
|
99
|
+
|
|
100
|
+
### Minor Changes
|
|
101
|
+
|
|
102
|
+
- 1698be4: A child-process subagent can no longer send the parent's provider credential to a different
|
|
103
|
+
endpoint.
|
|
104
|
+
|
|
105
|
+
- **Before spawning a child**, the parent compares every environment variable that decides where
|
|
106
|
+
the provider connects or which credential it sends. If the child's environment differs, the job
|
|
107
|
+
is refused before the credential leaves the parent. The error names the variable, never its
|
|
108
|
+
value. The variables compared are:
|
|
109
|
+
- the proxy and TLS variables;
|
|
110
|
+
- the variables the provider's SDK reads, such as `OPENAI_BASE_URL`, `ANTHROPIC_AUTH_TOKEN` and
|
|
111
|
+
the Vertex settings;
|
|
112
|
+
- the credential's own variable.
|
|
113
|
+
- **The child** repeats the check before it builds its provider. It builds that provider from the
|
|
114
|
+
parent's effective connection exactly: it no longer fills in a base URL, options or a default
|
|
115
|
+
credential from its own registry, and a credential reference that resolves to nothing is refused.
|
|
116
|
+
- **Where the effective connection comes from:** the parent applies its own definition defaults
|
|
117
|
+
(base URL, options). `profileName` is sent only when it names the connection actually sent.
|
|
118
|
+
- **New contracts:**
|
|
119
|
+
- `IProviderDefinition.destinationEnvironment`, declared by every built-in provider.
|
|
120
|
+
- `createProviderFromExactProfile`, `connectionEnvironmentNames`,
|
|
121
|
+
`findConnectionEnvironmentDivergence`, `sealConnectionEnvironment`,
|
|
122
|
+
`verifyConnectionEnvironment` and `TRANSPORT_ENVIRONMENT`.
|
|
123
|
+
- The start payload's `connectionCheck`.
|
|
124
|
+
- The child-process runner's `providerDefinitions` option, now required: a provider with no
|
|
125
|
+
definition there is refused, because its connection cannot be checked.
|
|
126
|
+
- d4189b9: The rest of the per-server MCP OAuth lifecycle: signing in to a server without a local browser,
|
|
127
|
+
signing out of it with token revocation, and each server's sign-in state in `/mcp`.
|
|
128
|
+
|
|
129
|
+
- **`robota mcp login <name> --no-browser`** prints the authorization URL and reads the redirect URL
|
|
130
|
+
the user pastes back (not echoed). `runMCPOAuthLogin` takes `readRedirect` for this; nothing
|
|
131
|
+
listens on the redirect URI then. The pasted URL is held to the loopback listener's rules through
|
|
132
|
+
`createPastedRedirectAcceptor`: it must be the registered redirect URI (same origin and path, no
|
|
133
|
+
user info), carry the sign-in's `state` (compared in constant time), and is accepted once; an
|
|
134
|
+
error redirect is `authorization-denied` without its `error_description`, and the RFC 9207 `iss`
|
|
135
|
+
check applies as before. `openBrowser` now also receives the redirect URI. `readRedirect` gets a
|
|
136
|
+
signal that aborts on cancel or at `callbackTimeoutMs` (5 minutes by default, as for the loopback
|
|
137
|
+
listener); a paste longer than the prompt accepts fails as `redirect-too-long`.
|
|
138
|
+
- **Signing out** (`runMCPOAuthLogout`; `robota mcp logout <name>`; `/mcp logout <serverId>`):
|
|
139
|
+
deletes the stored credential under the refresh lock, then revokes the refresh token and the
|
|
140
|
+
access token (RFC 7009) when the stored issuer advertises `revocation_endpoint`. Revocation is a
|
|
141
|
+
POST through the egress policy that never follows a redirect and is byte-bounded; it authenticates
|
|
142
|
+
the client by `revocation_endpoint_auth_methods_supported` when advertised, otherwise the way its
|
|
143
|
+
refresh does. The local delete always happens. Each token's outcome is reported in `tokens`, and
|
|
144
|
+
overall as `revoked`, `partial`, `unsupported`, `failed` or `not-attempted`, with fixed reasons
|
|
145
|
+
only (new: `revocation-failed`, and `token-type-not-revocable` for RFC 7009
|
|
146
|
+
`unsupported_token_type`). `/mcp logout` also makes the session's authenticator drop the token it
|
|
147
|
+
holds (`IMCPOAuthAuthenticator.forget`).
|
|
148
|
+
- **Sign-in state:** `readMCPOAuthCredentialState` answers `signed-in`, `expired-refreshable`,
|
|
149
|
+
`sign-in-required` or `signed-out` — never anything token-derived. `/mcp` shows it for every
|
|
150
|
+
OAuth server; a server this session was told needs a sign-in reads `sign-in-required`.
|
|
151
|
+
`ICommandMCPActivationAdapter` gains optional `oauthStatus` and `oauthLogout`
|
|
152
|
+
(`ICommandMCPOAuthStatus`, `ICommandMCPOAuthLogoutResult`).
|
|
153
|
+
- **No in-session sign-in:** signing in stays `robota mcp login <server>` in a terminal, since it
|
|
154
|
+
needs the terminal (browser, pasted redirect, hidden secret prompt) a running session owns. `/mcp`
|
|
155
|
+
names that command for a server that needs a sign-in, as does the session's sign-in notice; the
|
|
156
|
+
server name is shown there only when it is safe to paste into any shell — a plain token not
|
|
157
|
+
starting with `-` or `=` — and is otherwise replaced by `<server>` (`shellArgumentForDisplay` in
|
|
158
|
+
`agent-core`; nothing is quoted, since quoting rules differ between shells). Server names in OAuth
|
|
159
|
+
notices have control and format characters escaped.
|
|
160
|
+
- **Refresh hardening:** on `invalid_grant`, the store is read again under the lock; a refresh token
|
|
161
|
+
another holder rotated in meanwhile is kept (and used when still valid) instead of being deleted.
|
|
162
|
+
The expiry skew is capped at half the token's lifetime, so a short-lived token is not refreshed on
|
|
163
|
+
every request; credentials now record `issuedAt` for this.
|
|
164
|
+
- 9edae52: Remote MCP servers can authenticate with OAuth: `robota mcp login <name>` signs in, and sessions
|
|
165
|
+
send the stored token.
|
|
166
|
+
|
|
167
|
+
- **Declaring it:** `"oauth": { "clientId"?, "callbackPort"?, "authServerMetadataUrl"?, "scopes"? }`
|
|
168
|
+
on a remote server definition, decoded into `IMCPOAuthConfig`.
|
|
169
|
+
- `authServerMetadataUrl` must be `https`. `scopes` wins over the server's metadata and a 401's
|
|
170
|
+
`scope`.
|
|
171
|
+
- A `clientId` needs a `callbackPort`: a pre-registered client's redirect URI is fixed.
|
|
172
|
+
- `clientSecret`, unknown keys and `${}` templates are refused; `oauth` beside `headersHelper`,
|
|
173
|
+
or on a stdio server, is refused.
|
|
174
|
+
- `oauth` is no longer reported as unsupported authentication, and it is part of the definition
|
|
175
|
+
fingerprint.
|
|
176
|
+
- **Signing in** (`runMCPOAuthLogin`; `robota mcp login <name> [--client-secret]`):
|
|
177
|
+
- Discovery is done here, not by the SDK's `discoverOAuthServerInfo`: the protected-resource
|
|
178
|
+
metadata `resource` must be the canonical server URL, the authorization server's `issuer` must
|
|
179
|
+
be the server it was fetched for, the server, authorization, token and registration
|
|
180
|
+
endpoints must be `https`, and the authorization server must advertise PKCE `S256`
|
|
181
|
+
(`pkce-unsupported` otherwise). A 401's `resource_metadata` is never followed to another origin,
|
|
182
|
+
and a server without resource metadata is not guessed at.
|
|
183
|
+
`authServerMetadataUrl` skips resource discovery.
|
|
184
|
+
- Dynamic client registration when there is no `clientId`; PKCE, a random `state` and the
|
|
185
|
+
RFC 8707 resource indicator on the authorization request; the RFC 9207 `iss` checked on the
|
|
186
|
+
redirect when sent, and required when the server promises it.
|
|
187
|
+
- The loopback callback listens on `127.0.0.1`, checks `Host`, answers only `GET /callback` with
|
|
188
|
+
the sign-in's `state` (compared in constant time), once, within 5 minutes, and serves a static
|
|
189
|
+
page that never shows `error_description`.
|
|
190
|
+
- The browser opens by argv (`open`, `xdg-open`, `rundll32 url.dll,FileProtocolHandler`) and only
|
|
191
|
+
for an `https` URL. `--client-secret` asks for the secret without echo (or reads stdin's first
|
|
192
|
+
line) and only for a pre-registered client.
|
|
193
|
+
- **Network:** every OAuth request goes through the egress policy and is capped at 256 KiB.
|
|
194
|
+
`agent-core` adds `postWithEgressPolicy`, which refuses a redirect (`redirect_refused`) instead
|
|
195
|
+
of following it; registration, token and refresh requests use it.
|
|
196
|
+
- **Storage:** `IMCPOAuthCredentialStore` (`get`/`set`/`delete`), keyed by the server's security
|
|
197
|
+
identity and canonical URL together. `createFileOAuthCredentialStore` keeps 0600 files in a 0700
|
|
198
|
+
`the configured user data directory`. The issuer, token endpoint and client (with its secret, if any, and
|
|
199
|
+
the client authentication method dynamic registration returned) are stored with the tokens. A
|
|
200
|
+
sign-in stores its credential under the refresh lock, so a refresh in flight cannot overwrite it.
|
|
201
|
+
- **Sessions** (`createOAuthAuthenticator`, wired for every `oauth` definition):
|
|
202
|
+
- Sends the stored token as `Authorization: Bearer`, refreshing it first when expired — including
|
|
203
|
+
a token cached earlier in the session — and only at the stored token endpoint.
|
|
204
|
+
- One refresh at a time per credential: in a process through `MCPSingleFlightCache`, across
|
|
205
|
+
processes under `createFileOAuthRefreshLock`, re-reading the store once the lock is held. A
|
|
206
|
+
stale lock is taken over, and a lock released, only after it is renamed aside and proven to be
|
|
207
|
+
the one judged — never another process's fresh lock.
|
|
208
|
+
- A 401 rediscovers, then refreshes once and retries; an authorization server that changed clears
|
|
209
|
+
the tokens — compared, under the lock, with what is stored then, so a newer sign-in is kept. `invalid_grant`, or nothing stored, asks the user to run `robota mcp login <name>`. A 403
|
|
210
|
+
`insufficient_scope` fails and names the scope.
|
|
211
|
+
- An `oauth` definition is never connected without the authenticator (`oauth-unavailable`).
|
|
212
|
+
- Failures are `MCPOAuthError` with a fixed reason; no code, verifier, token, secret or
|
|
213
|
+
authorization-server text reaches an error, a notice or a log.
|
|
214
|
+
- 4078a72: Model fallback chain. `--fallback-model a,b` (or the `fallbackModel` settings array; the flag wins) names up to three models a turn moves to when its model is overloaded, unavailable or failing on the server. An entry is a provider profile, `profile:model`, a bare model on the primary's provider, or `default`. The move happens only before any output has streamed, lasts for the current turn, and is shown as a system note; entries that cannot be built are passed over and entries outside the organization's `allowedProviders` are dropped with a notice. `FallbackProvider` in agent-framework implements it over the session's provider; `IChatOptions` gains `executionId`, `onModelFallback` and `preserveContextWindow`, `IAIProvider` gains optional `resolveModelRoute`, and the execution loop emits a `provider_fallback` event and attributes requests, call observations, committed replies, the response cache and usage to the model that answered. A turn that ran on more than one model records per-model `modelShares` on its usage observation, which personal usage reports split by model and provider. A `/provider` switch keeps the chain, read again for the new primary.
|
|
215
|
+
- 4c73a0b: Provider failures keep the vendor's HTTP status and error type. `ProviderError` gains `status` and `type`, adapters throw `ProviderError` (or `RateLimitError` for a rate limit) instead of a bare `Error`, an Anthropic mid-stream `overloaded_error` event surfaces as a `ProviderError` with that type, and media errors carry `status`. New `classifyProviderFailure` says whether a failure is worth retrying on another model, and `toProviderError` is the shared adapter mapping.
|
|
216
|
+
- 196a900: Permission rules can say more than one argument per tool.
|
|
217
|
+
|
|
218
|
+
- **`Tool(name:value)` in deny and ask rules** matches a named top-level parameter, with `*` in the
|
|
219
|
+
value (`Bash(run_in_background:true)`, `Agent(model:opus*)`, `github__create_issue(repo:acme/*)`).
|
|
220
|
+
It is a parameter rule only when `name` is one of the tool's parameters, so
|
|
221
|
+
`WebFetch(https://…)` keeps its meaning. A parameter the call omits never matches, and a
|
|
222
|
+
non-scalar value is unevaluable, so the call asks. Allow rules may not use the form.
|
|
223
|
+
- **A rule on the primary field** (`Bash(command:rm *)`) is reported at startup and asks on every
|
|
224
|
+
call, instead of being silently ignored.
|
|
225
|
+
- **Tool-name globs.** Deny and ask rules may glob the tool name (`github__*`). Allow rules may do so
|
|
226
|
+
only after a literal `<server>__` prefix; an unanchored allow glob is refused at construction.
|
|
227
|
+
- **A bare-name deny removes the tool from the model's context.** `Tool`, `Tool(*)` or a name glob
|
|
228
|
+
withholds it from the offered set and the deferred-tool catalogue, live, instead of offering it
|
|
229
|
+
and refusing every call. `IAgentConfig.isToolVisible` is the new seam.
|
|
230
|
+
- **MCP canonical names keep the whole `<server>__` prefix when truncated**, so a server glob still
|
|
231
|
+
names every tool of that server.
|
|
232
|
+
- 34e50f0: A new permission mode, `auto`, lets a model classifier approve or block what would otherwise prompt.
|
|
233
|
+
|
|
234
|
+
- **What it decides:**
|
|
235
|
+
- Reads and in-workspace edits run as in `acceptEdits`.
|
|
236
|
+
- Commands and other calls the mode leaves open go to the classifier, a side call to the
|
|
237
|
+
session's own model. It sees the call, the working directory and the git remotes, never the
|
|
238
|
+
conversation.
|
|
239
|
+
- A block reaches the model with its reason, so it can take another route.
|
|
240
|
+
- **What still reaches a person, or is refused:**
|
|
241
|
+
- Deny rules and background ceilings apply first.
|
|
242
|
+
- `ask` rules, critical removals and protected paths ask a person.
|
|
243
|
+
- After 3 refusals in a row (blocks, or no usable verdict), or 20 blocks in the session, the
|
|
244
|
+
mode asks a person until one approves.
|
|
245
|
+
With no one to ask, the call is denied.
|
|
246
|
+
- **Allow rules:** in `auto` mode, allow rules that approve any command are set aside while the
|
|
247
|
+
mode is on. Examples are `Bash(*)`, an interpreter (`Bash(python *)`), a package runner
|
|
248
|
+
(`Bash(npm run *)`, `Bash(pnpm exec *)`), `Agent`, `ExecuteCommand` or `Computer`. Narrow
|
|
249
|
+
rules still apply.
|
|
250
|
+
- **Retry:** `/permissions` lists classifier blocks. `/permissions retry <n>` lets that exact call
|
|
251
|
+
run once, unjudged, when the model tries it again.
|
|
252
|
+
- **Turning it on and off:**
|
|
253
|
+
- `--permission-mode auto`, `/mode auto` or `/permissions auto`.
|
|
254
|
+
- An organization turns it off with `disableAutoMode` in the org policy.
|
|
255
|
+
- **New contracts:**
|
|
256
|
+
- `TPermissionMode` gains `'auto'`.
|
|
257
|
+
- `allowRulesForAutoMode` and `isBroadExecutionAllowRule`.
|
|
258
|
+
- `IPermissionClassifier` and `AutoModeGate`.
|
|
259
|
+
- The `permissionClassifier` session option.
|
|
260
|
+
- `Session.retryPermissionDenial`, and `retryDenial` on the permission-mode adapter.
|
|
261
|
+
- The `'classifier'` denial reason.
|
|
262
|
+
- `createModelPermissionClassifier`.
|
|
263
|
+
- The `disableAutoMode` option on `createSession` and `IOrgPolicy`.
|
|
264
|
+
- 722e88a: Shell commands can run in an OS-level sandbox: bubblewrap on Linux and WSL2, Seatbelt on macOS.
|
|
265
|
+
|
|
266
|
+
- **Confinement:** covers the command and every process it starts.
|
|
267
|
+
- Writes are limited to the working directory, the temporary directories and
|
|
268
|
+
`sandbox.filesystem.allowWrite`.
|
|
269
|
+
- Agent, git-hook, MCP and shell configuration inside the workspace stays read-only.
|
|
270
|
+
- `sandbox.filesystem.denyRead` hides paths from the command.
|
|
271
|
+
- The network is on or off (`sandbox.network.enabled`).
|
|
272
|
+
- **Modes:** `/sandbox` switches between `auto-allow`, `regular` and `off` for the next command and
|
|
273
|
+
saves the choice.
|
|
274
|
+
- In `auto-allow` (`sandbox.autoAllowBashIfSandboxed`), a confined command runs without a prompt
|
|
275
|
+
in `default` and `acceptEdits`.
|
|
276
|
+
- Deny rules, ask rules, critical removals and plan mode still apply first.
|
|
277
|
+
- **Exclusions:** `sandbox.excludedCommands` run unconfined, through the ordinary permission path.
|
|
278
|
+
- **When the sandbox cannot run:** a missing or unusable backend is reported at startup, in
|
|
279
|
+
`robota doctor` and in `/sandbox`, and commands then run unconfined.
|
|
280
|
+
`sandbox.failIfUnavailable` refuses to start instead.
|
|
281
|
+
- **New contracts:**
|
|
282
|
+
- `OsSandboxClient`, `detectOsSandbox`, `bubblewrapArguments`, `seatbeltProfile`.
|
|
283
|
+
- `ISandboxClient.wrapCommand` and `autoApproves`.
|
|
284
|
+
- `IPermissionEvaluationContext.sandboxAutoApproved`.
|
|
285
|
+
- The `commandSandbox` session option.
|
|
286
|
+
- The `sandbox` settings key and the `sandbox` command host adapter.
|
|
287
|
+
- d23c848: Built-in read-only shell commands run without a prompt.
|
|
288
|
+
|
|
289
|
+
A Bash call is decided like a read, and runs without a prompt in every mode (`plan` included), when
|
|
290
|
+
every command in it comes from the fixed read-only set (`ls`, `cat`, `grep`, `find` without actions,
|
|
291
|
+
`git status`/`log`/`diff`/`show` and similar) and it also:
|
|
292
|
+
|
|
293
|
+
- stays inside the workspace: every path operand resolves inside once symlinks are followed, as
|
|
294
|
+
`Read` requires;
|
|
295
|
+
- uses only printable ASCII syntax that bash, zsh, fish and PowerShell all read the same way.
|
|
296
|
+
|
|
297
|
+
Deny and ask rules still apply first. A command that writes through a redirect, expands or
|
|
298
|
+
substitutes anything, or runs git outside the session's repository takes the ordinary path.
|
|
299
|
+
|
|
300
|
+
New exports: `isReadOnlyCommandLine` and `TResolveInWorkspace`. `IPermissionEvaluationContext`
|
|
301
|
+
gains `resolveInWorkspace`, which `PermissionEnforcer` supplies.
|
|
302
|
+
- 3038eb7: A message from another session is instant messaging: text from an untrusted third party that
|
|
303
|
+
carries no authority. What the model does with it is decided by the session's ordinary permissions —
|
|
304
|
+
rules, permission mode and remembered consent — exactly like the session's own work. The per-origin
|
|
305
|
+
peer policy is gone.
|
|
306
|
+
|
|
307
|
+
**BREAKING**
|
|
308
|
+
|
|
309
|
+
- `agent-core`: `IPermissionEvaluationContext.peerTurn` is now a boolean. It decides only whether a
|
|
310
|
+
`repliesToPeer` tool exists; every other call in a peer turn is decided as in any turn. Removed:
|
|
311
|
+
`isToolAvailableInPeerTurn`, `isSecretPath`, `IPeerTurnAuthority`, `TPeerReach` (now exported by
|
|
312
|
+
`agent-interface-session-mobility`) and `IToolPermissionProfile.workspacePaths`.
|
|
313
|
+
- `agent-tools`: `Read` and `Glob` no longer declare `workspacePaths`.
|
|
314
|
+
- `agent-session`: `ISessionRunOptions.peerReach` is replaced by `peerTurn?: boolean`, and
|
|
315
|
+
`ISessionOptions.allowPeerChanges` is removed. An ask in a peer turn is answered like any other:
|
|
316
|
+
a consent the operator remembered answers it, and an "always allow" given there is remembered.
|
|
317
|
+
- `agent-interface-session`: `IPeerTurnContext` no longer has `reach`; it carries only the reply
|
|
318
|
+
route.
|
|
319
|
+
- `agent-interface-session-mobility`: `peerReachOf` is removed; `TPeerReach` moves here. A delegated
|
|
320
|
+
turn carries no reach.
|
|
321
|
+
- `agent-framework`: the `peers.allowChanges` setting is removed (an existing value is ignored). A
|
|
322
|
+
peer turn is offered the ordinary tools, plus `peer_reply`.
|
|
323
|
+
|
|
324
|
+
**Changes**
|
|
325
|
+
|
|
326
|
+
- `agent-framework`: the per-turn statement tells the model the message is an opinion from an
|
|
327
|
+
untrusted third party, not its owner's instruction, and that it decides for itself whether and how
|
|
328
|
+
to act. A message still expands no `@path` and attaches no context reference, and its requests
|
|
329
|
+
still carry no provider-hosted tool, since no permission step can decide one. The session takes
|
|
330
|
+
at most 6 messages a minute and 30 an hour from each sender for a turn; a message over the limit
|
|
331
|
+
is refused with a reason the sender receives. A prompt answer given in the name of a `peer:` or `external:`
|
|
332
|
+
driver is ignored. External-event turns keep their tool-less baseline.
|
|
333
|
+
- `agent-cli`: incoming peer turns carry only their reply route.
|
|
334
|
+
- 02b7452: A reply to a peer session is decided by the permission system like any call that sends something
|
|
335
|
+
off this machine, and it goes only to the sender that was admitted.
|
|
336
|
+
|
|
337
|
+
- `agent-core` — a tool declaring `repliesToPeer` is still refused outside a peer turn; inside one it
|
|
338
|
+
is decided by the ordinary steps: deny, ask and allow rules, then the mode. It declares no risk
|
|
339
|
+
class, so it asks by default, is refused in plan mode and proceeds under bypass. `IPeerTurnAuthority`
|
|
340
|
+
no longer has `toolUsed`.
|
|
341
|
+
- `agent-session` — an "always allow" answer to the reply is remembered and answers later replies,
|
|
342
|
+
as for any tool; other asks in a peer turn still need a fresh approval each time.
|
|
343
|
+
- `agent-framework` — `peer_reply` asks the operator by default, showing the full text and the peer
|
|
344
|
+
it goes to; `permissions.allow`/`deny` rules naming `peer_reply` apply. `PeerMessageIngress`
|
|
345
|
+
refuses a message whose origin names a sender other than the admitted one, or whose admission names
|
|
346
|
+
no sender, and submits the turn with the admitted identity.
|
|
347
|
+
- `agent-cli` — a local peer message is taken as coming from the session it names only when that
|
|
348
|
+
session confirms, at its own socket, that it is sending exactly that message to this receiver.
|
|
349
|
+
The reply target, the driver id and the operator's notices come from the confirmed sender. A
|
|
350
|
+
session on an earlier version cannot confirm, so its messages are refused; both sessions need this
|
|
351
|
+
version to message each other.
|
|
352
|
+
- e689c8e: Follow-ups to connection approval and `/handoff`.
|
|
353
|
+
|
|
354
|
+
- `agent-transport-webrtc-web` — the browser remote client says `Waiting for the host to approve this connection…`
|
|
355
|
+
(`awaiting-approval`) after pairing, and `Connected` only once the host's session answers. A host that closes the
|
|
356
|
+
channel instead is shown as `refused` and is not retried, since a retry would only ask the operator again; a
|
|
357
|
+
first connection lost before the host answered is `failed`. Reconnect attempts count until the host admits a
|
|
358
|
+
connection, so a link that keeps dropping while approval is pending gives up instead of asking again and again.
|
|
359
|
+
- `agent-core`, `agent-session`, `agent-framework` — a turn that did not come from the operator stores its
|
|
360
|
+
`turnSource` (`peer`, `external`, `agent-wakeup`) beside `driverId` on the user message and in the display
|
|
361
|
+
history (`IRunOptions.turnSource`), so a session handed off keeps where each turn came from.
|
|
362
|
+
- `agent-cli` — a `/handoff` resent after a lost confirmation reports what stays behind as it is now, not as it was
|
|
363
|
+
at the first attempt, and after refusing to resend a session that changed, the hand-off status shows that refusal
|
|
364
|
+
instead of the earlier lost confirmation.
|
|
365
|
+
- ec5e477: Add a credential store port (`ICredentialStore` in `agent-core`) and keep the CLI's secrets behind it: the OS keychain through the optional `@napi-rs/keyring` binding (macOS Keychain, Windows Credential Manager, Linux Secret Service), else an owner-only file under `the configured user data directory`. The backend is chosen at first use, recorded, and named by `/remote-control status`; a recorded keychain that stops working fails closed instead of degrading to the file.
|
|
366
|
+
|
|
367
|
+
The remote-control host identity key moves into the store. The old `the configured user data directory` may have been copied by backups or dotfile sync, so it is not carried over: on the first run after upgrading a new host key is generated, the old file is removed, and the operator is told once that trusted devices must pair again.
|
|
368
|
+
- c7f9203: Connected sessions can send each other files.
|
|
369
|
+
|
|
370
|
+
- `/peers send-file <session-id> <path>` sends a copy of any file the operator can read to another
|
|
371
|
+
live session on this host.
|
|
372
|
+
- The model sends a file only through the `peer_send_file` tool. Every call asks the user, showing
|
|
373
|
+
the path, size, hash and destination; no permission mode, rule or remembered consent answers it.
|
|
374
|
+
The tool reaches only files inside the workspace whose path does not look like it holds secrets
|
|
375
|
+
(`.env*`, `~/.ssh`, keys and credentials), and it does not exist in a turn a peer's message started.
|
|
376
|
+
- The receiving operator approves every file. A received file is kept as an inert copy (mode 0600)
|
|
377
|
+
under `the configured user data directory<sender>/`. It is never run and never placed in the model's context.
|
|
378
|
+
The conversation is told only its name, size and sha256. A name that leaves that directory is
|
|
379
|
+
refused, a symbolic link is never written through, and nothing is overwritten.
|
|
380
|
+
- Transfers travel on a channel of their own (a separate connection on this host, a separate data
|
|
381
|
+
channel between devices), in chunks the receiver paces, up to 32 MiB, and are kept only when the
|
|
382
|
+
whole content matches the offered sha256. A transfer that ends early is discarded; there is no
|
|
383
|
+
resume.
|
|
384
|
+
|
|
385
|
+
**API**
|
|
386
|
+
|
|
387
|
+
- `agent-interface-session-mobility`: the `file` capability, which asks the operator for every
|
|
388
|
+
request; `ConnectionAuthority.authorizeFile`; `IFileOffer` and `IFileFrameChannel`.
|
|
389
|
+
- `agent-transport/node`: `sendFileOverChannel` and `receiveFileOverChannel`, the carrier over any
|
|
390
|
+
`IFileFrameChannel`; `DEFAULT_MAX_FILE_BYTES`.
|
|
391
|
+
- `agent-transport-webrtc`: `IDeviceMeshLink.openFileChannel` and `onFileChannel`.
|
|
392
|
+
- `agent-remote-pairing`: `file` joins `DEVICE_CAPABILITIES`. A device certificate that names it is
|
|
393
|
+
refused as malformed by an earlier version.
|
|
394
|
+
- `agent-core`: `IToolPermissionProfile.notInPeerTurn` withholds a tool from a turn a peer's message
|
|
395
|
+
started.
|
|
396
|
+
- `agent-framework`: `ICommandLocalPeersAdapter.prepareFile`.
|
|
397
|
+
- be0e53c: A tool instance shared by several sessions sends each call's span to the session that made the call.
|
|
398
|
+
|
|
399
|
+
- **Before:** each session set its event service on the shared instance, so the span went to whichever session had set it last.
|
|
400
|
+
- **`agent-core`:** `IToolExecutionContext` gains an optional `instanceEventService`. `FunctionTool` emits its span there when a call carries one.
|
|
401
|
+
- **`agent-session`:** the permission wrapper keeps its session's service and passes it with every call.
|
|
402
|
+
- 9f46375: A run can record its model calls and tool effects in a journal the host owns, and continue from it
|
|
403
|
+
later. Pass `executionJournal` in the run options: each model request and response, and each tool
|
|
404
|
+
call's intent, start and result, is written and awaited before the run moves on. If a write fails,
|
|
405
|
+
the run stops with an `ExecutionJournalError`, even when it is also being cancelled; the model never
|
|
406
|
+
sees it as a tool failure it could retry. A journaled run waits for a cancelled model call to
|
|
407
|
+
finish, because its late reply can still carry usage or tool calls that must be recorded.
|
|
408
|
+
|
|
409
|
+
With a journal that can also read its records back (`IRecoverableExecutionJournal`), a new `ConversationAgent`
|
|
410
|
+
for the same conversation continues where the old one stopped, without new user input and without
|
|
411
|
+
repeating calls whose results were saved:
|
|
412
|
+
|
|
413
|
+
- `ConversationAgent.resumeToolCalls()` runs the latest saved batch of tool calls without calling the model.
|
|
414
|
+
- `ConversationAgent.resume()` continues the whole execution, keeping its remaining round and repeated-input
|
|
415
|
+
limits. It refuses a different provider or model. Turn-level lifecycle hooks do not run again, and
|
|
416
|
+
structured output cannot be recovered. A deferred tool the execution had loaded that is no longer
|
|
417
|
+
registered raises `ExecutionRecoveryError`.
|
|
418
|
+
|
|
419
|
+
A tool can ask for an answer before it acts, through `continuation` on its execution context. The
|
|
420
|
+
request is saved and the run ends with `ExecutionSuspendedError`, without a completion or failure.
|
|
421
|
+
Tools already running beside it finish and save their real results; only calls not yet started wait.
|
|
422
|
+
Answering it through `toolResponses` on a later `resume()` continues the same action; an unanswered
|
|
423
|
+
request never lets the tool act. A tool call that may have started without a saved result raises
|
|
424
|
+
`ExecutionRecoveryError` and must be reconciled by the host: it is never run again automatically.
|
|
425
|
+
`isExecutionControlError` recognizes these errors. `callJournaledProvider`, with an
|
|
426
|
+
`IModelJournalContext`, journals a model call made outside a run.
|
|
427
|
+
- 04a6de4: **Reasoning text a provider streams now reaches the editor as an ACP `agent_thought_chunk`, through a new `thinking_delta` session event.**
|
|
428
|
+
|
|
429
|
+
`IChatOptions.onThinkingDelta`, `IRunOptions.onThinkingDelta` and `IResumeExecutionOptions.onThinkingDelta`
|
|
430
|
+
(typed `TThinkingDeltaCallback`) carry reasoning text from a provider through the run, and the session
|
|
431
|
+
options (`ISessionOptions.onThinkingDelta`, `ICreateSessionOptions.onThinkingDelta`) hand it to the
|
|
432
|
+
session's owner. `InteractiveSession` emits it as `thinking_delta(delta)`, beside `text_delta`. The
|
|
433
|
+
text is never part of the reply: it is not appended to the conversation, not streamed through
|
|
434
|
+
`onTextDelta`, and the core adds no record of its own for it (no text-delta log entry, no
|
|
435
|
+
`provider_stream_raw_delta`); a provider's own native payload capture and response metadata keep
|
|
436
|
+
what the provider sent, as before. A reasoning delta counts as provider activity for the idle
|
|
437
|
+
timeout whether or not anyone listens to it, so a model that is only thinking is not cut off. The
|
|
438
|
+
existing `thinking(isThinking)` event is unchanged and remains the busy indicator. Where a provider
|
|
439
|
+
sends no reasoning text, nothing is emitted and nothing new is switched on.
|
|
440
|
+
|
|
441
|
+
`@robota-sdk/agent-interface-session` is a major change because a new session event name makes an
|
|
442
|
+
exhaustive map over the event names stop compiling until it classifies the event.
|
|
443
|
+
|
|
444
|
+
`@robota-sdk/agent-transport-acp` sends each non-empty `thinking_delta` to the editor as an
|
|
445
|
+
`agent_thought_chunk`, in order with the message chunks, so `robota acp` shows the model's reasoning
|
|
446
|
+
in the editor. A turn that streamed only thoughts still shows its result text, because only reply
|
|
447
|
+
text marks a turn as streamed. The WebSocket wire, the HTTP stream, headless stream-json, `query()`
|
|
448
|
+
and the terminal UI do not carry the new event in this change (`@robota-sdk/agent-transport` and
|
|
449
|
+
`@robota-sdk/agent-ui-terminal` classify it as non-surface). A forked skill and an in-process subagent
|
|
450
|
+
pass their reply text up but not their reasoning.
|
|
451
|
+
|
|
452
|
+
Two providers already receive reasoning text and now report it. `@robota-sdk/agent-provider-openai`
|
|
453
|
+
passes `response.reasoning_summary_text.delta` events of a streamed Responses call to
|
|
454
|
+
`onThinkingDelta`; the API sends them only when the provider profile asks for a reasoning summary, and
|
|
455
|
+
no request option changed; a summary streamed in several parts, and the summary of a later reasoning
|
|
456
|
+
item, each start on a new paragraph (`\n\n`) so the parts do not run together.
|
|
457
|
+
`@robota-sdk/agent-provider-openai-compatible` reports the text of Gemma's thought channel, which the
|
|
458
|
+
provider already removed from the reply, as it streams across chunk boundaries, with each later
|
|
459
|
+
channel of one reply on a new paragraph; the reply text is unchanged. No other provider reports
|
|
460
|
+
reasoning, and Anthropic thinking is not enabled. A model fallback chain still moves to the next model when only reasoning had streamed.
|
|
461
|
+
|
|
462
|
+
The scripted test provider (`@robota-sdk/agent-core/testing`) accepts an optional `thinking` string on
|
|
463
|
+
a turn and delivers it through `onThinkingDelta` before the turn's text; the scripted session harness
|
|
464
|
+
collects `thinking_delta` and now keeps a scripted tool-call turn's `usage`, which it used to drop.
|
|
465
|
+
- 0ba247b: A tool result can now carry a view its source declared (an MCP app), and a surface can invoke a
|
|
466
|
+
runtime tool through the session's permission gate with a prompt. This is the contract and wiring
|
|
467
|
+
layer: nothing produces a view yet, and the GUI does not yet host one.
|
|
468
|
+
|
|
469
|
+
- `agent-core` — `IToolResult.view` carries an `IToolAppView` (source, `ui://` resource, mime type,
|
|
470
|
+
HTML, structured content, callable tools, the call's input). `view` is now a typed key of
|
|
471
|
+
`IToolResult`, so an extension that already used a `view` key with another type must rename it.
|
|
472
|
+
The view is display data: it never enters model context or the size that decides a spill, and a
|
|
473
|
+
result replaced by its reference keeps it.
|
|
474
|
+
- `agent-interface-session` — `invokeRuntimeTool` takes `permissionInteraction` (`'interactive'` or
|
|
475
|
+
the default `'deny'`), a `driverId` (a host that attributes prompts names it as the requester) and
|
|
476
|
+
an `executionId` its events carry. A finished model call's `tool_end` names its view with
|
|
477
|
+
`IToolState.appView` (`viewId`, source, resource), and the new
|
|
478
|
+
`ISessionToolAppViews.readToolAppView(viewId)` reads the document. A permission handler may take
|
|
479
|
+
`{ signal }`, and aborting it withdraws the prompt.
|
|
480
|
+
- `agent-session` — a direct call asks a person only when its caller says so, and the handler is
|
|
481
|
+
given the call's own signal; the tool end event carries the view, never in the logged result data.
|
|
482
|
+
- `agent-framework` — the view of a model's call is kept under a `viewId` the session mints, in a
|
|
483
|
+
bounded per-session store (16 views, 4 MiB each, 16 MiB in all, measured on the whole serialized
|
|
484
|
+
view), and read on demand, so the document never rides `tool_end` to every surface, never enters
|
|
485
|
+
the recorded history, and a repeated provider tool-call id cannot overwrite another turn's view.
|
|
486
|
+
A malformed view is dropped. A direct call keeps and names no view, recognised by the id it was
|
|
487
|
+
started with. A submission or agent wakeup that arrives while a direct call holds the session is
|
|
488
|
+
queued behind it, as during a turn, instead of refused. A direct call acting for a driver
|
|
489
|
+
attributes its permission prompt and tool events to that driver, and aborting its signal withdraws
|
|
490
|
+
an open prompt from every surface.
|
|
491
|
+
- `agent-transport` — a driving connection sends `call-app-tool` (answered by `app_tool_result`) and
|
|
492
|
+
`read-app-view` (answered by `app_view`). A call names its view and reaches only the tools that
|
|
493
|
+
view's source declared; a call or read that decodes but cannot be served answers `protocol_error`
|
|
494
|
+
echoing the `requestId`, while an observer's attempt is refused like any non-read. A call still
|
|
495
|
+
waiting on its prompt is cancelled when its connection goes away (for the resume bridge, when the
|
|
496
|
+
bridge is disposed). `maxFrameBytes` bounds an app answer to what a carrier's channel carries;
|
|
497
|
+
the WebRTC carrier uses a history page's worth. `IProtocolSession` now includes the runtime-tool
|
|
498
|
+
and app-view roles.
|
|
499
|
+
- `agent-ui-web` — the two new server messages are recorded as not rendered until the app-view host
|
|
500
|
+
consumes them.
|
|
501
|
+
|
|
502
|
+
An implementation of `IInteractiveSession` or `IProtocolSession` outside this repository must add
|
|
503
|
+
`readToolAppView` (and, for `IProtocolSession`, `listRuntimeTools` and `invokeRuntimeTool`); the
|
|
504
|
+
members are required so a host cannot silently lack them.
|
|
505
|
+
- fec722f: Carry a trusted canonical absolute execution root from DAG product composition through worker task
|
|
506
|
+
input and node lifecycle context. Filesystem-capable DAG nodes now use that injected authority instead
|
|
507
|
+
of ambient `process.cwd()`, and authored `cwd` values may only narrow it.
|
|
508
|
+
|
|
509
|
+
BREAKING: `ITaskExecutionInput`, `INodeExecutionContext`, worker composition dependencies,
|
|
510
|
+
`LocalDagRuntimeProvider`, and the CLI-local runner now require an execution root at their non-convenience
|
|
511
|
+
boundaries. `createDagFramework()` preserves no-argument construction by validating and capturing its
|
|
512
|
+
current directory at the factory boundary. The filesystem-backed skill node is explicitly Node-only and
|
|
513
|
+
no longer advertises a browser export condition.
|
|
514
|
+
- 2d3b2c0: Make shell resolution executable-aware across managed and scheduled background command runners. The core
|
|
515
|
+
resolver now accepts one request with explicit-executable precedence, returns matching argument families
|
|
516
|
+
for sh/bash, PowerShell/pwsh, and cmd, and fails closed with `UnsupportedShellError` for unknown explicit
|
|
517
|
+
executables. Executor exposes one shared request adapter and both concrete runners consume its pair.
|
|
518
|
+
- 4772067: **BREAKING — ARCH-031: the subagent seam is derived from its transport SSOT instead of copied.**
|
|
519
|
+
|
|
520
|
+
One field family — what a subagent job IS — was declared three times as independent shapes and carried
|
|
521
|
+
between them by six hand-written object literals that nothing checked for totality. A field added to
|
|
522
|
+
either side had to be hand-copied at every hop, and a miss compiled clean as a silent no-op. TYPE-003
|
|
523
|
+
named this cause and derived one hop; the next two changes each dropped a field at a hop it had skipped
|
|
524
|
+
(CORE-025's permission policy, and ANALYTICS-001's `usage`, dropped in the very commit that added it).
|
|
525
|
+
|
|
526
|
+
```ts
|
|
527
|
+
// now, in @robota-sdk/agent-interface-transport
|
|
528
|
+
export type ISubagentSpawnRequest = Omit<IAgentBackgroundTaskRequest, 'kind'>;
|
|
529
|
+
export type ISubagentJobResult = Omit<IBackgroundTaskResult, 'kind' | 'exitCode' | 'signalCode'>;
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
All four projections collapse to spreads. `parentTaskId` and `providerProfile` now reach the runner
|
|
533
|
+
because they exist on the source, not because someone remembered them.
|
|
534
|
+
|
|
535
|
+
**Per package, classified against each barrel:**
|
|
536
|
+
|
|
537
|
+
- **`agent-executor` (major)** — the barrel loses `ISubagentSpawnRequest` and `ISubagentJobResult` (they
|
|
538
|
+
moved to their owner; re-publishing them here would be a pass-through re-export). `ISubagentJobStart`
|
|
539
|
+
and `ISubagentJobHandle` rename `jobId` → `taskId`, `ISubagentJobStart` gains `worktree?`, and
|
|
540
|
+
`ISubagentWorktreePrepareRequest` renames `jobId` → `taskId`.
|
|
541
|
+
- **`agent-framework` (major)** — the barrel loses eleven type-only re-exports of `agent-executor`-owned
|
|
542
|
+
types. They carried zero runtime values, so they bought none of the assembly convenience a runtime
|
|
543
|
+
facade exists for, while making one field family look like it had three owners. Separately,
|
|
544
|
+
`ISpawnAgentTaskRequest.permissionPolicy` goes optional → **required**.
|
|
545
|
+
- **`agent-subagent-runner` (major)** — `ISubagentWorkerStartPayload` renames `jobId` → `taskId` and gains
|
|
546
|
+
`worktree?`. This package is not in the item's declared `area:`; the audit that caught it is the reason
|
|
547
|
+
it is here.
|
|
548
|
+
- **`agent-interface-transport` (minor)** — two new barrel exports; nothing removed or renamed.
|
|
549
|
+
- **`agent-core` (minor)** — **two** new barrel exports. `DEFAULT_BACKGROUND_PERMISSION_POLICY` is the
|
|
550
|
+
intended one; collapsing the hand-listed permissions block to `export *` also surfaced
|
|
551
|
+
`clearRegisteredToolArgumentKeys`, which the old list had omitted. It is documented as public rather
|
|
552
|
+
than re-narrowed — a barrel that cannot fall out of step with its owner is the point of the collapse.
|
|
553
|
+
Nothing was removed: all nine previously-listed permission types remain on the barrel.
|
|
554
|
+
- **`agent-cli` (patch)** — migrated as the only in-repo implementer of `ISubagentWorktreeAdapter`; no
|
|
555
|
+
barrel change.
|
|
556
|
+
|
|
557
|
+
**`permissionPolicy` is now required at the spawn boundary**, and its default is one exported constant
|
|
558
|
+
owned by the permission SSOT. It was previously applied as `?? 'inherit-allowlist'` in the middle of a
|
|
559
|
+
projection, in **two** packages independently, with nothing keeping them equal — a security-relevant value
|
|
560
|
+
whose default was declared twice. Every spawn site now states its own policy.
|
|
561
|
+
|
|
562
|
+
**The worktree identity moved to the runner envelope.** It is runner-produced — the worktree does not
|
|
563
|
+
exist when a caller builds a request — so it rides on `ISubagentJobStart.worktree` and crosses the IPC
|
|
564
|
+
boundary there. The runner no longer also rewrites `request.cwd`, which had given ARCH-010's execution-root
|
|
565
|
+
rule two carriers that could disagree. `branchName` **relocated rather than being deleted**: it has no
|
|
566
|
+
reader in this repository today, and for a library that is not a reason to drop a legitimate contract.
|
|
567
|
+
|
|
568
|
+
**Renames are consistent across the SPI** (`type` → `agentType`, `jobId` → `taskId`) rather than applied to
|
|
569
|
+
one shape, which would have left two names for one identifier in a single file. The IPC validator's
|
|
570
|
+
string-literal keys are now typed against the contract, so the next rename is a compile error instead of a
|
|
571
|
+
runtime rejection of every start payload.
|
|
572
|
+
- 9fbab1b: Provider DIP Stage B (ARCH-PROVIDER-003), part 1: collapse infrastructure. Adds the
|
|
573
|
+
provider-registry-driven `@robota-sdk/dag-node-llm-text` node that supersedes the
|
|
574
|
+
per-vendor LLM nodes + router, relocates the provider config resolver into
|
|
575
|
+
`agent-core`, adds SSOT cost/allowedModels fields, inverts the `llm-text` validator
|
|
576
|
+
tombstone, and wires `createDagFramework({ providers })`. Additive — the per-vendor
|
|
577
|
+
nodes still exist; consumer migration + their removal follow in part 2.
|
|
578
|
+
- b6d14ce: Make the universal JSON-schema subset able to express an object, so a nested `z.object()` keeps its
|
|
579
|
+
properties and required fields instead of reaching the model as `{ "type": "object" }`. Tools and
|
|
580
|
+
structured-output schemas with one level of nesting are now advertised in full and enforced on the
|
|
581
|
+
tool-input path; `z.union` / `z.discriminatedUnion` / `z.literal` are supported and map to `anyOf`
|
|
582
|
+
and single-value enums; `.nullable()` keeps its null branch; and Zod's `strip`, `strict` and
|
|
583
|
+
`passthrough` modes stop collapsing into two `additionalProperties` emissions. Fixes the shipped
|
|
584
|
+
`Computer` and `AskUserQuestion` built-ins, whose action and question fields were being dropped
|
|
585
|
+
entirely.
|
|
586
|
+
|
|
587
|
+
`agent-core` is **minor**, not patch: `IObjectParameterSchema` is a new export, and
|
|
588
|
+
`IParameterSchema.type` became optional (a union node carries `anyOf` instead of a type), which is a
|
|
589
|
+
consumer-visible type change — two call sites in this repo needed editing to keep compiling.
|
|
590
|
+
`additionalProperties` also widened to `boolean | IParameterSchema`, and `required` and `anyOf` are
|
|
591
|
+
new members. The provider packages are **patch**: each adapts to the widened subset without changing
|
|
592
|
+
its own public surface.
|
|
593
|
+
|
|
594
|
+
### Patch Changes
|
|
595
|
+
|
|
596
|
+
- 7b6234c: A tool call whose arguments fail to decode to a JSON object (invalid JSON, or a `null`/scalar/array
|
|
597
|
+
root — including a stream truncated mid-argument) no longer breaks the rest of its batch or the round
|
|
598
|
+
after it. Every other call in the same batch still executes and gets its real result; the malformed
|
|
599
|
+
call gets a clear per-call error instead, naming the tool and call id, and the run continues rather
|
|
600
|
+
than rejecting. The Anthropic and Gemini providers no longer throw when building the next request
|
|
601
|
+
from a conversation that still carries that call's original malformed arguments.
|
|
602
|
+
- 8bd5fac: Cached input tokens are no longer dropped (#3209 R3). The OpenAI and OpenAI-compatible adapters read
|
|
603
|
+
`prompt_tokens_details.cached_tokens` (Chat Completions, including the final streamed usage chunk) and
|
|
604
|
+
`input_tokens_details.cached_tokens` (Responses, OpenAI and Qwen) into `cacheReadTokens` on the message
|
|
605
|
+
usage: the part of the prompt served from the provider's prompt cache, present only when reported.
|
|
606
|
+
It reaches the committed assistant message, `readTokenUsageFromMessage()`, and the
|
|
607
|
+
`provider_call_completed` execution event, so a consumer can apply the cache discount.
|
|
608
|
+
|
|
609
|
+
New `sumMessagesUsage(messages)` sums the usage on assistant messages (with `cacheReadTokens` when any
|
|
610
|
+
reported it), so one run's usage is `sumMessagesUsage(agent.getHistory().slice(before))` without
|
|
611
|
+
converting through `messageToHistoryEntry` (#3209 S1). `sumHistoryUsage` returns the same triple as before.
|
|
612
|
+
|
|
613
|
+
A forced-summary reply now keeps the usage its provider reported the same way a tool round's reply
|
|
614
|
+
does: an endpoint that omits `total_tokens` no longer loses exactly the summary call's usage (#3209 N3). Counts
|
|
615
|
+
the adapter could not attest as a consistent total are recorded with `usageProvenance: 'partial'`.
|
|
616
|
+
- 57280bf: Every published package now declares `"engines": { "node": ">=22.12.0" }`. Before, 27 of the 38
|
|
617
|
+
packages declared no floor (`agent-core`, `agent-tools` and every provider among them),
|
|
618
|
+
`agent-session` and `agent-file-authority` declared `>=20.19.0`, and the other nine declared
|
|
619
|
+
`>=22.0.0`, so a consumer on Node 20 saw at most a warning from a transitive dependency.
|
|
620
|
+
|
|
621
|
+
Why 22.12: `agent-cli` and `agent-ui-terminal` need Node 22 through `ink` 7, and the CommonJS entries
|
|
622
|
+
of `agent-tools` and its dependents, `agent-transport`/`node` and its dependents, and
|
|
623
|
+
`agent-ui-terminal` `require()` ESM-only dependencies (`p-limit`, `jose`, `chalk`), which Node 22
|
|
624
|
+
supports unflagged only from 22.12. `engines` is advisory unless the consumer enables `engine-strict`.
|
|
625
|
+
|
|
626
|
+
No code changes: `tsdown` now reads `node22.12.0` as its build target from the field.
|
|
627
|
+
- 5033dd9: When the round cap ends a run on a tool round and the follow-up summary call fails, `run()` and
|
|
628
|
+
`runStream()` now reject with that call's own provider error (for example a `RateLimitError` with
|
|
629
|
+
`recoverable: true`, or the provider's 400 error) instead of a generic
|
|
630
|
+
`[STRICT-POLICY] Failed execution result missing error field` error. The failure is recorded in
|
|
631
|
+
history like a failed round. An aborted summary call now resolves the run as interrupted, like an aborted round, instead of failing.
|
|
632
|
+
- 18c0d5c: Every published package now exports `./package.json`, so `require('<package>/package.json')` and
|
|
633
|
+
`import('<package>/package.json', { with: { type: 'json' } })` work instead of failing with
|
|
634
|
+
`ERR_PACKAGE_PATH_NOT_EXPORTED`, and each tarball now ships the package's `CHANGELOG.md`.
|
|
635
|
+
- dbd888d: A `run()` or `runStream()` whose signal is already aborted when its turn comes now fails as an abort:
|
|
636
|
+
`name === 'AbortError'`, so `isAbortFailure(err)` holds without the signal. The signal's own reason is
|
|
637
|
+
thrown when it already is an `AbortError` (the default `controller.abort()`); any other reason,
|
|
638
|
+
including an error that only wraps an abort, becomes the `cause` of an abort error whose message says
|
|
639
|
+
`Run aborted before it started`, or `Run aborted while queued behind another run on this instance`
|
|
640
|
+
only when the run actually waited behind another. It still never reaches the provider or the history.
|
|
641
|
+
Previously it was a plain `Error` that always claimed the run had been queued.
|
|
642
|
+
- 1887e54: A run's answer now comes from its own turn. A turn run with `allowToolOnlyCompletion` that ends in
|
|
643
|
+
tool calls resolves with `''` instead of throwing a `[STRICT-POLICY]` error, and a later turn that
|
|
644
|
+
produces no text no longer resolves with the previous turn's answer. An aborted run resolves with the
|
|
645
|
+
text it committed before the abort (the same text history keeps, marked `interrupted`) instead of
|
|
646
|
+
`''`, and its result lists the tool calls the turn handled before the abort. `tokensUsed`, which plugins receive
|
|
647
|
+
after each run, counts only that run's provider calls instead of the whole conversation's.
|
|
648
|
+
- 41cca13: Fixed `run(input, { allowToolOnlyCompletion: true })` throwing an internal `[STRICT-POLICY]` error
|
|
649
|
+
when a round produced neither a tool call nor any text — for example a tool-calling decision agent
|
|
650
|
+
whose model answered with nothing at all. `allowToolOnlyCompletion` only widens what counts as a
|
|
651
|
+
finished turn (a tool call alone, with no final text); an ordinary text-only reply already completes
|
|
652
|
+
normally and is unaffected, and a turn that ends in tool results still resolves with `''`. A turn
|
|
653
|
+
that ends with neither text nor a tool result now rejects with a new, catchable `EmptyCompletionError`
|
|
654
|
+
(`code: 'EMPTY_COMPLETION'`) instead of the internal invariant message; `resume()` of such an
|
|
655
|
+
execution raises the same error.
|
|
656
|
+
- ada3841: Dispatch tool-call plugin hooks around each decoded attempt, including unknown-tool refusals,
|
|
657
|
+
and emit the event emitter plugin's before-execution event. A pre-effect wait resumes the same
|
|
658
|
+
logical call without repeating its before hooks; recovered results do not replay call hooks.
|
|
659
|
+
|
|
660
|
+
Pair parallel tool analytics by the logical execution ID, including calls of the same tool.
|
|
661
|
+
- 5093a30: A `the agent runtime` run now calls `beforeConversation`, with `beforeExecution`, and `onStreamingChunk` for
|
|
662
|
+
each streamed piece of text, in order; the round waits for those chunk hooks before it goes on,
|
|
663
|
+
whether the provider call returned, failed or was interrupted. `EventEmitterPlugin` therefore emits
|
|
664
|
+
`CONVERSATION_START`.
|
|
665
|
+
|
|
666
|
+
The run result's `toolCalls` now carry each executed call's id and `result: null` for one that
|
|
667
|
+
failed, so `EventEmitterPlugin` emits `TOOL_ERROR` instead of `TOOL_SUCCESS` for a failed call, and
|
|
668
|
+
`WebhookPlugin`'s `tool.executed` payload reports it as failed with its call id.
|
|
669
|
+
|
|
670
|
+
`EXECUTION_START`, `EXECUTION_COMPLETE` and `EXECUTION_ERROR` are marked deprecated: no run emits
|
|
671
|
+
them; the `AGENT_EXECUTION_*` events are the ones a run emits. `beforeToolCall`,
|
|
672
|
+
`beforeToolExecution` and `afterToolCall` are still not called.
|
|
673
|
+
- 94b2c87: A PreToolUse `command` hook can now steer a tool call, not only refuse it. The permission gate
|
|
674
|
+
applies the winning `hookSpecificOutput.permissionDecision`:
|
|
675
|
+
|
|
676
|
+
- `allow` skips the prompt a person would otherwise get. Deny rules, refusals from the mode, the
|
|
677
|
+
`auto` mode classifier and asks that must reach a person (an `ask` rule, a protected path, a
|
|
678
|
+
policy that asks about everything) still apply.
|
|
679
|
+
- `ask` sends the call to a person even when the mode or a remembered consent would run it. The
|
|
680
|
+
answer is not remembered, and with no one to ask the call is refused.
|
|
681
|
+
- `defer` leaves the call to the normal flow, as before.
|
|
682
|
+
|
|
683
|
+
Before this change these decisions were read and then ignored.
|
|
684
|
+
|
|
685
|
+
`updatedInput` is still not applied: the call runs the input it was made with, and an `allow` sent
|
|
686
|
+
with an `updatedInput` is not applied either, since it approved another input.
|
|
687
|
+
|
|
688
|
+
`runHooks` (agent-core) now reads a decision and an `updatedInput` only from `command` hooks: a
|
|
689
|
+
`prompt` or `agent` hook answers from a model that reads the tool input it judges, so it can only
|
|
690
|
+
refuse. With several hooks, `ask` now outranks `defer` (`deny` > `ask` > `defer` > `allow`), and the
|
|
691
|
+
reported `updatedInput` is the one sent with the winning decision.
|
|
692
|
+
- 3ab2eca: - External presets accept every permission mode a session does, `auto` included; `auto` used to fail validation.
|
|
693
|
+
- `createDagFramework({ ports: { costMeta } })` wires cost-metadata management; without it cost operations still report that they are unsupported.
|
|
694
|
+
- `startCli()` runs the subagent worker when a subagent starts the embedder's entry script again, as the product executable already did; an embedded CLI used to start a second CLI there.
|
|
695
|
+
- The provider `executor` option docs no longer import a `RemoteExecutor` that does not exist, and `IRemoteExecutorConfig` is marked deprecated: nothing implements a remote executor.
|
|
696
|
+
- 2c612ba: Release the migrated Robota product with its public SDK namespace, robota command, compatible SDK exports, internal product configuration, and verified CLI startup and delivery corrections.
|
|
697
|
+
- 66af868: Accept Claude-compatible WebFetch domain permission rules during session initialization while preserving hostname boundaries and deny/ask enforcement.
|
|
698
|
+
- 6f41c53: Update Zod, OpenAI, and Undici to patched releases so installed Robota artifacts do not carry the
|
|
699
|
+
known production dependency vulnerabilities. The Zod schema bridge now preserves the supported
|
|
700
|
+
object, record, enum, literal, wrapper, and transform contracts on Zod 4, and the OpenAI-compatible
|
|
701
|
+
response parser safely ignores non-function tool-call variants introduced by the current SDK.
|
|
702
|
+
- a009f5b: Provider DIP Stage E (ARCH-PROVIDER-006): repo-hygiene + policy cleanup. Codified the
|
|
703
|
+
Family Decomposition Rule in project-structure.md (split driver = consumer/third-party
|
|
704
|
+
opt-in installability / extension-point registration, not dep-weight). Removed dangling
|
|
705
|
+
tracked references to deleted packages (tsconfig project refs, eslint glob, changeset
|
|
706
|
+
config `fixed` + pending changeset files), pruned 37 dead `.changeset/pre.json` entries,
|
|
707
|
+
and removed 24 untracked husk directories. Closes ARL-15 — the provider dependency-
|
|
708
|
+
inversion arc (Stages A–E) is complete.
|
|
709
|
+
- c207a31: Keep automatic compaction aligned with the active model and pending input, preserve provider usage when estimating new context, and keep summary text out of the response stream. Display live context changes and successful automatic compaction in the shared app interface.
|
|
710
|
+
- 9b4f63b: Allow explicitly borrowed providers to outlive agent destruction and Session shutdown while keeping
|
|
711
|
+
owned providers as the default. Track replaced and removed provider cleanup, expose current provider
|
|
712
|
+
registrations after swapping, and hold Roundtable resource leases until runtime teardown finishes.
|
|
713
|
+
Borrowing does not permit concurrent provider use across leases.
|
|
714
|
+
Serialize manager lifecycle transitions so reinitialization cannot admit providers during pending teardown.
|
|
715
|
+
- 4f3c075: Assemble complete, verified package generations before switching build output; preserve the previous generation on build failure and pack only verified regular-file images. Include copied CLI web assets in affected-build ordering and artifact transfer. Preserve the CLI version in managed build paths. Public runtime contracts remain compatible (patch).
|
|
716
|
+
- e477440: CORE-033: the abnormal paths now emit the required replay events, and history stays append-only
|
|
717
|
+
|
|
718
|
+
`provider_request`, `assistant_message_committed` and `history_mutation` are REQUIRED families, and
|
|
719
|
+
`agent-session` builds its session log from them: replaying every announced append, in order, is
|
|
720
|
+
supposed to reconstruct the conversation. Three engine sites appended without announcing, so the
|
|
721
|
+
reconstruction diverged at exactly the moments a reader goes to the log — the round cap, the
|
|
722
|
+
hard-capacity block, and a provider failure. On a capped run the summary the user actually read was
|
|
723
|
+
absent from every replay, and the provider call that produced it was invisible.
|
|
724
|
+
|
|
725
|
+
- The forced-summary call emits `provider_request` (`forcedSummary: true`, carrying the assembled
|
|
726
|
+
messages), then `assistant_message_committed` and `history_mutation` for the summary it commits.
|
|
727
|
+
- The hard-capacity block announces its diagnostic — the only message explaining why the turn stopped.
|
|
728
|
+
- A provider failure announces the `Request failed: …` record it appends.
|
|
729
|
+
|
|
730
|
+
The forced-summary call also **rewrote** history: it appended a synthetic round-limit instruction,
|
|
731
|
+
sent it, then removed it with `clear()` + re-add — a non-append mutation this vocabulary has no way
|
|
732
|
+
to describe. The instruction is a per-call prompt artifact, so it no longer enters the conversation
|
|
733
|
+
store at all; it exists only in the outgoing array, the same shape the structured-output transport
|
|
734
|
+
uses for a schema instruction. Nothing is added, so nothing has to be removed, and `mutation` still
|
|
735
|
+
needs no removal member.
|
|
736
|
+
|
|
737
|
+
The item also reported that the streaming path emitted no families at all. CORE-042 had already
|
|
738
|
+
fixed that by removing the second engine — `runStream` runs the same `execute()` — and this change
|
|
739
|
+
adds the test that says so rather than leaving it assumed.
|
|
740
|
+
- 9dcb5da: CORE-035: the identical-tool-input loop guard throws a named error, and the SPEC now matches it
|
|
741
|
+
|
|
742
|
+
The SPEC documented an `AbortError` thrown at the Nth identical call. The code threw a bare `Error`
|
|
743
|
+
at the N+1th. The type difference was behavioral, not cosmetic: `isAbortFailure` resolves an
|
|
744
|
+
`AbortError` as `success: true, interrupted: true`, so a run that detected a pathological loop and
|
|
745
|
+
produced no answer would have been reported as a SUCCESS.
|
|
746
|
+
|
|
747
|
+
Resolved toward the code's semantics and the SPEC's intent, which are not the same thing:
|
|
748
|
+
|
|
749
|
+
- **Failure, not abort.** A guard trip is the agent giving up, not the user cancelling. `AbortError`
|
|
750
|
+
means the caller asked the turn to stop, and here nobody did.
|
|
751
|
+
- **Named, not bare.** `SameToolInputLoopError` (`code: 'SAME_TOOL_INPUT_LOOP'`, `category: 'system'`,
|
|
752
|
+
`recoverable: true`) carries `toolName`, `callCount` and `maxSameToolInputs`. Naming a type is what
|
|
753
|
+
the SPEC was reaching for: a caller must be able to tell "the agent looped" from "the network died",
|
|
754
|
+
and CORE-027 carries those fields out intact.
|
|
755
|
+
- **`maxSameToolInputs` is a MAXIMUM.** The Nth identical call is allowed; the N+1th trips. The SPEC's
|
|
756
|
+
"N or more times" contradicted its own option name.
|
|
757
|
+
|
|
758
|
+
`ErrorUtils` moves to `utils/error-utils.ts`, split from the class taxonomy it operates on — two
|
|
759
|
+
responsibilities in one file, and keeping them together made the taxonomy file impossible to extend.
|
|
760
|
+
Both remain exported from the package entry.
|
|
761
|
+
- a95ca85: Apply `config.systemMessage` on the streaming path. `runStream()` built its provider request straight
|
|
762
|
+
from the conversation store and never entered the session initialization that attaches the system
|
|
763
|
+
prompt, so an agent obeyed its persona through `run()` and ignored it through `runStream()` — silently,
|
|
764
|
+
on the default interactive surface. An agent used through both entry points only acquired its prompt
|
|
765
|
+
from the first non-streaming turn onward.
|
|
766
|
+
|
|
767
|
+
The streaming path now enters the same `initializeConversationStore` the round path enters, so the
|
|
768
|
+
prompt, the inject-once rule and the conversation restore are owned in one place. Contained under
|
|
769
|
+
CORE-042, which is the duplication itself.
|
|
770
|
+
- 0382a51: CORE-041: `z.nativeEnum()` and `z.date()` convert; the rest of the boundary is published, not discovered
|
|
771
|
+
|
|
772
|
+
`zodToJsonSchema` threw `Unsupported Zod type: …` on five constructs, so a schema Zod accepts could
|
|
773
|
+
not be turned into a tool or a structured-output spec. Re-running the decision the item reserved,
|
|
774
|
+
those five are two different problems:
|
|
775
|
+
|
|
776
|
+
- **`ZodNativeEnum` and `ZodDate` are exactly expressible** and were missing for no reason.
|
|
777
|
+
A native enum becomes an `enum` of its VALUES — for a numeric TypeScript enum the compiler's
|
|
778
|
+
reverse mapping is filtered out, so a field accepting `0` is no longer advertised as accepting
|
|
779
|
+
`"Low"`. A date becomes `{ type: 'string', format: 'date-time' }`, which is not a lossy stand-in:
|
|
780
|
+
JSON has no date type, so a string is what the provider receives either way.
|
|
781
|
+
- **`ZodTuple`, `ZodIntersection` and `ZodLazy` are not expressible**, and still throw. A tuple needs
|
|
782
|
+
positional `items` (the subset models `items` as one schema), an intersection needs `allOf`,
|
|
783
|
+
recursion needs `$ref` — none of which the field-enumerated provider mappers would forward.
|
|
784
|
+
Adopting `zod-to-json-schema` does not dissolve this, as CORE-039 had conceded it might: the
|
|
785
|
+
library emits exactly those constructs. The difficulty was never parsing Zod; the target language
|
|
786
|
+
cannot say these things.
|
|
787
|
+
|
|
788
|
+
Mapping them lossily was rejected — a tuple flattened to `array of anyOf[...]` would tell the model
|
|
789
|
+
that any order and any length are acceptable, a contract the author did not write.
|
|
790
|
+
|
|
791
|
+
The error now names the construct, says why the subset cannot carry it, and names a Zod expression to
|
|
792
|
+
write instead. `Unsupported Zod type: ZodTuple` told a consumer the name of their own construct and
|
|
793
|
+
nothing they could act on.
|
|
794
|
+
- 93d061d: CORE-043: structured output now knows which transport can carry the schema before the first call
|
|
795
|
+
|
|
796
|
+
`run(input, { output })` asked every provider for `responseFormat: { type: 'json_schema' }`. A
|
|
797
|
+
provider whose surface cannot express that accepted the option and dropped it — and the schema was
|
|
798
|
+
stated in words only by the RETRY feedback turn, which runs on attempt two. So against such a
|
|
799
|
+
provider, attempt one carried nothing describing the required shape and could only succeed by luck:
|
|
800
|
+
the advertised three attempts were really two, and the first was spent discovering something the
|
|
801
|
+
capability table already knew.
|
|
802
|
+
|
|
803
|
+
A `(provider, model)` pair now resolves to a mechanism (`response_schema` / `json_object` / `none`)
|
|
804
|
+
and a provenance (`catalog` / `vendor-default` / `undeclared` / `unverified-endpoint`), and the
|
|
805
|
+
request is shaped to match at the one seam that holds both the resolved provider and the outgoing
|
|
806
|
+
messages. When the wire cannot carry the shape, the schema is stated in the prompt on the FIRST
|
|
807
|
+
attempt. Each structured request emits a `structured_output_transport` event reporting what the
|
|
808
|
+
request actually did.
|
|
809
|
+
|
|
810
|
+
- `IAIProvider.endpointIsVendorDefault?()` — a provider configured with a custom `baseURL` reports
|
|
811
|
+
it, so the runtime stops claiming enforcement a gateway may not provide. Separate from
|
|
812
|
+
`capabilityTable?()` on purpose: `@robota-sdk/agent-provider-openai` declares no table (nobody has
|
|
813
|
+
verified one) and must still be able to answer.
|
|
814
|
+
- DeepSeek's capability table declared `json_schema`; DeepSeek guarantees the response PARSES but
|
|
815
|
+
takes no schema parameter. Corrected to `json_object`.
|
|
816
|
+
- A provider that declares nothing is still sent the request unchanged — silence is not a denial.
|
|
817
|
+
- 39554a1: CORE-047: the model-configuration API is reachable before the first turn
|
|
818
|
+
|
|
819
|
+
`getModel()`, `setModel()` and `swapDefaultProvider()` refused on a freshly constructed agent with
|
|
820
|
+
`Agent must be fully initialized before ...`. So you had to ask the model a question before you could
|
|
821
|
+
ask which model you were using.
|
|
822
|
+
|
|
823
|
+
The state they guarded — the provider registry and the current `(provider, model)` pair — turned out
|
|
824
|
+
to be synchronous and derived entirely from config the constructor had already validated. It merely
|
|
825
|
+
lived inside the async initializer, next to work that genuinely is async (modules, plugins, the
|
|
826
|
+
execution service). Both steps now run in the constructor, so an agent knows which model it is
|
|
827
|
+
configured for from the moment it exists, and the readiness guard on those three methods protected
|
|
828
|
+
nothing and is gone.
|
|
829
|
+
|
|
830
|
+
A destroyed agent still refuses — and now says so accurately (`AIProviders was disposed`) instead of
|
|
831
|
+
misreporting teardown as missing initialization.
|
|
832
|
+
|
|
833
|
+
`ConversationAgent.ensureReady()` is unchanged and remains the way to complete the asynchronous half without
|
|
834
|
+
running a turn. It is no longer a precondition for reading or changing the model.
|
|
835
|
+
- d28430a: CORE-048: `resolveStructuredOutputCapability` is exported
|
|
836
|
+
|
|
837
|
+
`TStructuredOutputMechanism` and `TStructuredOutputProvenance` were already public while the function
|
|
838
|
+
that produces them was not — a caller could name the answer but not obtain it. Exporting it also lets
|
|
839
|
+
a consumer ask, before spending a call, what will happen to their schema against a given
|
|
840
|
+
`(provider, model)` pair.
|
|
841
|
+
|
|
842
|
+
No behaviour changed. This falls out of CORE-048, which asked whether a forced tool call should join
|
|
843
|
+
the mechanism vocabulary and answered no: the transport would need a provider that both lacks a
|
|
844
|
+
schema parameter and has enforceable strict tool arguments, and across this workspace that
|
|
845
|
+
intersection is empty.
|
|
846
|
+
- 7d9cc66: Add trusted host scheduling for model tool rounds, with dependencies, bounded independent work,
|
|
847
|
+
and shared-resource reader/writer exclusion. Unknown resources serialize conservatively. Failed
|
|
848
|
+
predecessors or invalid plans produce paired skipped receipts, while settled recovery receipts
|
|
849
|
+
and already running sibling outcomes remain intact.
|
|
850
|
+
- 7d9cc66: Retain typed text and image observations alongside structured tool data through runtime settlement, history, and recovery. Deliver tool images as native content in OpenAI Responses and Anthropic requests, retain structured error receipts, include media in bounded result admission, and reject malformed MCP image observations with reconciliation state intact.
|
|
851
|
+
- 7d9cc66: Preserve a result for each remaining call when a sequential tool batch stops after failure. Persist skipped calls without dispatch and reject recovery records that claim an executed action was skipped.
|
|
852
|
+
- df02568: Local OpenAI-compatible servers can be set up without saving a placeholder API key. Explicit credentials and environment references remain effective for authenticated servers and connection tests. Optional credentials are managed through the user-only provider edit command.
|
|
853
|
+
- 07b627f: A local peer can now be answered, and what its turn may do depends on where it runs.
|
|
854
|
+
|
|
855
|
+
- `agent-core`: the permission evaluator takes a peer turn's authority as one more input
|
|
856
|
+
(`IPermissionEvaluationContext.peerTurn`), decided after the deny list and ceiling and before
|
|
857
|
+
bypass and allow rules. A peer on another host uses no tool. A peer on the same host may use an
|
|
858
|
+
inspect-class tool that declares `workspacePaths`, only when every named location resolves inside
|
|
859
|
+
the workspace and is not a credential (`isSecretPath`); write and execute tools are refused unless
|
|
860
|
+
enabled, and then every use asks. A tool declaring `repliesToPeer` exists only in a peer turn and
|
|
861
|
+
asks once the turn used another tool. New: `isToolAvailableInPeerTurn`, `TPeerReach`,
|
|
862
|
+
`IPeerTurnAuthority`. `IRunOptions.withholdHostedTools` leaves a provider's hosted tools out of a
|
|
863
|
+
run's requests (`nativeWebTools` with `false` withholds a hosted tool for one call).
|
|
864
|
+
- `agent-tools`: `Read` and `Glob` declare the arguments that say where they look. `Grep` does not:
|
|
865
|
+
it reads files it was never named, so a peer turn does not get it.
|
|
866
|
+
- `agent-session`: `ISessionRunOptions.peerReach` makes a run a peer turn for the permission policy;
|
|
867
|
+
every ask in it needs a fresh approval, and its requests carry no provider-hosted tool. `ISessionOptions.allowPeerChanges` enables write and execute
|
|
868
|
+
tools for same-host peer turns.
|
|
869
|
+
- `agent-interface-session`: `ISubmitOptions.peer` (`IPeerTurnContext`) carries a peer turn's reach,
|
|
870
|
+
the message it answers and the session a reply goes to.
|
|
871
|
+
- `agent-interface-session-mobility`: `IPeerMessage.inReplyTo` threads a conversation;
|
|
872
|
+
`peerReachOf(admission)` maps admission to a reach.
|
|
873
|
+
- `agent-framework`: a peer turn is offered what its origin allows, and a new `peer_reply` tool
|
|
874
|
+
answers the peer that sent the message, threaded to it. The setting `peers.allowChanges` enables
|
|
875
|
+
write and execute tools for same-host peer turns.
|
|
876
|
+
- `agent-ui-terminal`: a permission prompt in a peer turn names the requesting peer.
|
|
877
|
+
- `agent-cli`: incoming peer turns carry their reach and reply route; a conversation is limited in
|
|
878
|
+
depth and in how often this session answers it, and a reply over a limit is not sent and the
|
|
879
|
+
operator is told.
|
|
880
|
+
- `agent-provider-anthropic`, `agent-provider-openai-compatible` (Qwen): a request whose
|
|
881
|
+
`nativeWebTools` sets a hosted tool to `false` is sent without it.
|
|
882
|
+
- d0de5b2: A peer session's message now reaches the model as a peer's, and a peer turn runs on the external
|
|
883
|
+
baseline.
|
|
884
|
+
|
|
885
|
+
- `agent-core` marks every user message whose driver id starts with `peer:` as
|
|
886
|
+
`<peer_message from="…">…</peer_message>` in the outgoing request — both the round and the forced
|
|
887
|
+
summary — while the stored history keeps the text as sent. Wrapper-shaped text in user and tool
|
|
888
|
+
messages is escaped, and an id that is not a plain identifier is printed as `peer:unverified`.
|
|
889
|
+
New exports: `peerDriverOf`, `printablePeerDriver`.
|
|
890
|
+
- `agent-session`'s conversation transcript (compaction, advisor) labels a peer message with the same
|
|
891
|
+
printable id, so no rendering echoes a sender-chosen id that is not a plain identifier.
|
|
892
|
+
- `agent-framework` runs a `peer` turn like an `external` one — no tools (`toolChoice: 'none'`), no
|
|
893
|
+
`@path` expansion, no context references — and adds a per-turn system statement that the message
|
|
894
|
+
came from another session and carries no authority. A `peer` turn must carry a `peer:` driver id.
|
|
895
|
+
- 9c6a8db: Provider adapters now throw the specific typed failure a vendor response describes, instead of a
|
|
896
|
+
generic `ProviderError` carrying only its status. A 401/403 (or a vendor-specific authentication type)
|
|
897
|
+
becomes an `AuthenticationError`; a response naming an unavailable model — by code or, when the vendor
|
|
898
|
+
gives neither (Anthropic's and Gemini's real bodies carry no distinguishing code), by its message —
|
|
899
|
+
becomes a `ModelNotAvailableError`, whose `model` is now optional since a bare HTTP status does not
|
|
900
|
+
always name one; a transport failure becomes a `NetworkError`, which now also carries the provider
|
|
901
|
+
name. A 429's `retry-after` header (a delta or an HTTP-date) is read into `RateLimitError.retryAfter`
|
|
902
|
+
when the vendor sends one.
|
|
903
|
+
|
|
904
|
+
Vendor error text is scrubbed of anything that reads like a credential — an `Authorization`/`Bearer`
|
|
905
|
+
value, an API key in a header, query string or JSON body, a bare `sk-`/`AIza…` token — before it is
|
|
906
|
+
kept on any of these typed errors, so a misconfigured self-hosted gateway that echoes a request back
|
|
907
|
+
can no longer leak one into a message or a "Details" disclosure. The new `scrubSecrets` export applies
|
|
908
|
+
the same scrubbing to arbitrary text.
|
|
909
|
+
- dfb9b15: Release the integrated provider credential isolation and consumer runtime and interaction composition updates.
|
|
910
|
+
- 7d9cc66: Retain typed resource and audio observations alongside structured tool results through history, durable receipts, recovery, size admission, and session persistence. Preserve opaque resource references without fetching them, project embedded text and explicit unsupported binary/audio diagnostics into provider requests and compaction transcripts, and validate persisted observation shapes on reload.
|
|
911
|
+
- 7d9cc66: Retain registered tool source attribution in observations and preserve ordered outcome receipts independently of conversation summaries.
|
|
912
|
+
- d6b9404: Remove polynomial-ReDoS backtracking (SEC-003, CodeQL `js/polynomial-redos`) from three parsers whose input is not repo-controlled.
|
|
913
|
+
|
|
914
|
+
`parseStructuredResponseText` (agent-core) parses raw model output; its fenced-code-block regex used `\s*\n`, and because `\s` also matches a newline the two overlapped, so an unterminated fence containing many blank lines was rejected in O(n^2) — 12.7s for a 400 KB string, now ~1ms. The whitespace run is now restricted to horizontal whitespace, which makes the newline split point unique.
|
|
915
|
+
|
|
916
|
+
`/schedule cron` and `/monitor` (agent-command) are declared `modelInvocable: true`, so their argument string is composed by the model. Both matched the trailing instruction with `\s+(.+)$`; since `.` also matches a space the split point was ambiguous and a non-matching argument cost O(n^2) — ~15s for a 200 KB argument, now <1ms. The instruction is now required to start with a non-space character, which pins the split point without changing which inputs are accepted.
|
|
917
|
+
|
|
918
|
+
No behaviour change: the set of accepted inputs and the parsed values are identical in every case.
|
|
919
|
+
- 62663ae: Harden local file writes, permission denials, monitor access, and one-time external event admission.
|
|
920
|
+
- 23a30cd: Preserve paired tool history when the repeated-input guard rejects an ordinary run, recording every blocked batch member as undispatched while retaining the original failure.
|
|
921
|
+
- 7d9cc66: Observe scheduler queue intervals separately from pre-dispatch admission, permission and tool work.
|
|
922
|
+
Preserve valid duration totals when live trace detail is bounded, reporting invalid evidence explicitly
|
|
923
|
+
through content-free console and OTLP traces without altering dispatch, recovery or settlement.
|
|
924
|
+
- 9814afc: Type-SSOT convergence (TYPE-003; re-audit CONTRACT-002/003/011/012 + RUNTIME-47 + STRUCT-04). Behavior is unchanged — this is a type-level refactor. `ITokenUsage` (agent-core) is confirmed as the usage-triple SSOT: `ISessionUsageTotals` and `IBackgroundTaskUsage` become aliases, and every inline `{ promptTokens; completionTokens; totalTokens }` copy (service/orchestration/executor/remote-client shapes) now references the SSOT (structurally identical → patch). The subagent-job contracts derive from the background-task SSOT — `TSubagentJobStatus = Exclude<TBackgroundTaskStatus, 'paused'>`, mode alias, and a `Pick`-projection `ISubagentJobState` — with a compile-enforced parity test so a drifting hand copy can no longer exist. `@robota-sdk/agent-session` is minor because the public `ISessionRecord` type is now the typed `IInteractiveSessionRecord` alias (previously a relaxed `unknown[]` mirror): runtime behavior of `SessionStore` is identical, but downstream code that assigned loose payloads to the record's fields may need explicit casts at its own trust boundary (the framework store facade's `as unknown as` cast bridge is deleted). agent-session's duplicate `@robota-sdk/agent-core` deps/devDeps declaration is also removed (STRUCT-04).
|
|
925
|
+
- 7d9cc66: Retain registered attribution on refused and interrupted call receipts without replacing the source of actual or recovered settlements, and project undispatched registered calls into live and restored presentation history.
|
|
926
|
+
- 02053ec: Leave unregistered DeepSeek model costs unknown instead of applying unrelated legacy model prices.
|
|
927
|
+
|
|
928
|
+
## 3.0.0-beta.106
|
|
929
|
+
|
|
930
|
+
## 3.0.0-beta.105
|
|
931
|
+
|
|
932
|
+
## 3.0.0-beta.104
|
|
933
|
+
|
|
934
|
+
## 3.0.0-beta.103
|
|
935
|
+
### Patch Changes
|
|
936
|
+
|
|
937
|
+
- 6f41c53: Update Zod, OpenAI, and Undici to patched releases so installed Robota artifacts do not carry the
|
|
938
|
+
known production dependency vulnerabilities. The Zod schema bridge now preserves the supported
|
|
939
|
+
object, record, enum, literal, wrapper, and transform contracts on Zod 4, and the OpenAI-compatible
|
|
940
|
+
response parser safely ignores non-function tool-call variants introduced by the current SDK.
|
|
941
|
+
|
|
942
|
+
## 3.0.0-beta.102
|
|
943
|
+
|
|
944
|
+
## 3.0.0-beta.101
|
|
945
|
+
### Patch Changes
|
|
946
|
+
|
|
947
|
+
- 62663ae: Harden local file writes, permission denials, monitor access, and one-time external event admission.
|
|
948
|
+
|
|
949
|
+
## 3.0.0-beta.100
|
|
950
|
+
|
|
951
|
+
## 3.0.0-beta.99
|
|
952
|
+
|
|
953
|
+
## 3.0.0-beta.98
|
|
954
|
+
|
|
3
955
|
## 3.0.0-beta.97
|
|
4
956
|
### Patch Changes
|
|
5
957
|
|