@robota-sdk/agent-session 3.0.0-beta.94 → 3.0.0-beta.96
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 +152 -0
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.d.cts +14 -6
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.ts +14 -6
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,157 @@
|
|
|
1
1
|
# @robota-sdk/agent-session
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.96
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- @robota-sdk/agent-core@3.0.0-beta.96
|
|
7
|
+
- @robota-sdk/agent-file-authority@3.0.0-beta.96
|
|
8
|
+
- @robota-sdk/agent-interface-execution@3.0.0-beta.96
|
|
9
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.96
|
|
10
|
+
|
|
11
|
+
## 3.0.0-beta.95
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 04719a9: **A permission request names the tool call it is about.**
|
|
15
|
+
|
|
16
|
+
`IPermissionRequestEvent` gains an optional `executionId`: the same id the call's `tool_start` and
|
|
17
|
+
`tool_end` carry, so a surface can hold one row from the request to the call's end. The session's
|
|
18
|
+
permission path carries the call's id from the tool wrapper to the prompt (`IPermissionAskContext.executionId`)
|
|
19
|
+
and the framework's prompt registry stamps it on the event, so it reaches every client that receives
|
|
20
|
+
the event, the WebSocket and HTTP `permission_request` frames included. It is present whenever the
|
|
21
|
+
session reports that call (its own, or an in-process background agent's) and absent for a
|
|
22
|
+
child-process agent's forwarded request.
|
|
23
|
+
|
|
24
|
+
The ACP agent transport keys its permission rows by that id: the request's `toolCallId` is the
|
|
25
|
+
call's execution id, its start and end address the same row, a denial the session decides on its
|
|
26
|
+
own while the editor's dialog is open closes that one row, and two same-named calls each follow
|
|
27
|
+
their own row whatever order the editor answers in. A request that names no call gets a row that
|
|
28
|
+
closes with the answer, and is closed at the end of the turn if no answer came. The name-ordered
|
|
29
|
+
matching is gone.
|
|
30
|
+
- 04a6de4: **Reasoning text a provider streams now reaches the editor as an ACP `agent_thought_chunk`, through a new `thinking_delta` session event.**
|
|
31
|
+
|
|
32
|
+
`IChatOptions.onThinkingDelta`, `IRunOptions.onThinkingDelta` and `IResumeExecutionOptions.onThinkingDelta`
|
|
33
|
+
(typed `TThinkingDeltaCallback`) carry reasoning text from a provider through the run, and the session
|
|
34
|
+
options (`ISessionOptions.onThinkingDelta`, `ICreateSessionOptions.onThinkingDelta`) hand it to the
|
|
35
|
+
session's owner. `InteractiveSession` emits it as `thinking_delta(delta)`, beside `text_delta`. The
|
|
36
|
+
text is never part of the reply: it is not appended to the conversation, not streamed through
|
|
37
|
+
`onTextDelta`, and the core adds no record of its own for it (no text-delta log entry, no
|
|
38
|
+
`provider_stream_raw_delta`); a provider's own native payload capture and response metadata keep
|
|
39
|
+
what the provider sent, as before. A reasoning delta counts as provider activity for the idle
|
|
40
|
+
timeout whether or not anyone listens to it, so a model that is only thinking is not cut off. The
|
|
41
|
+
existing `thinking(isThinking)` event is unchanged and remains the busy indicator. Where a provider
|
|
42
|
+
sends no reasoning text, nothing is emitted and nothing new is switched on.
|
|
43
|
+
|
|
44
|
+
`@robota-sdk/agent-interface-session` is a major change because a new session event name makes an
|
|
45
|
+
exhaustive map over the event names stop compiling until it classifies the event.
|
|
46
|
+
|
|
47
|
+
`@robota-sdk/agent-transport-acp` sends each non-empty `thinking_delta` to the editor as an
|
|
48
|
+
`agent_thought_chunk`, in order with the message chunks, so `robota acp` shows the model's reasoning
|
|
49
|
+
in the editor. A turn that streamed only thoughts still shows its result text, because only reply
|
|
50
|
+
text marks a turn as streamed. The WebSocket wire, the HTTP stream, headless stream-json, `query()`
|
|
51
|
+
and the terminal UI do not carry the new event in this change (`@robota-sdk/agent-transport` and
|
|
52
|
+
`@robota-sdk/agent-ui-terminal` classify it as non-surface). A forked skill and an in-process subagent
|
|
53
|
+
pass their reply text up but not their reasoning.
|
|
54
|
+
|
|
55
|
+
Two providers already receive reasoning text and now report it. `@robota-sdk/agent-provider-openai`
|
|
56
|
+
passes `response.reasoning_summary_text.delta` events of a streamed Responses call to
|
|
57
|
+
`onThinkingDelta`; the API sends them only when the provider profile asks for a reasoning summary, and
|
|
58
|
+
no request option changed; a summary streamed in several parts, and the summary of a later reasoning
|
|
59
|
+
item, each start on a new paragraph (`\n\n`) so the parts do not run together.
|
|
60
|
+
`@robota-sdk/agent-provider-openai-compatible` reports the text of Gemma's thought channel, which the
|
|
61
|
+
provider already removed from the reply, as it streams across chunk boundaries, with each later
|
|
62
|
+
channel of one reply on a new paragraph; the reply text is unchanged. No other provider reports
|
|
63
|
+
reasoning, and Anthropic thinking is not enabled. A model fallback chain still moves to the next model when only reasoning had streamed.
|
|
64
|
+
|
|
65
|
+
The scripted test provider (`@robota-sdk/agent-core/testing`) accepts an optional `thinking` string on
|
|
66
|
+
a turn and delivers it through `onThinkingDelta` before the turn's text; the scripted session harness
|
|
67
|
+
collects `thinking_delta` and now keeps a scripted tool-call turn's `usage`, which it used to drop.
|
|
68
|
+
- 0ba247b: A tool result can now carry a view its source declared (an MCP app), and a surface can invoke a
|
|
69
|
+
runtime tool through the session's permission gate with a prompt. This is the contract and wiring
|
|
70
|
+
layer: nothing produces a view yet, and the GUI does not yet host one.
|
|
71
|
+
|
|
72
|
+
- `agent-core` — `IToolResult.view` carries an `IToolAppView` (source, `ui://` resource, mime type,
|
|
73
|
+
HTML, structured content, callable tools, the call's input). `view` is now a typed key of
|
|
74
|
+
`IToolResult`, so an extension that already used a `view` key with another type must rename it.
|
|
75
|
+
The view is display data: it never enters model context or the size that decides a spill, and a
|
|
76
|
+
result replaced by its reference keeps it.
|
|
77
|
+
- `agent-interface-session` — `invokeRuntimeTool` takes `permissionInteraction` (`'interactive'` or
|
|
78
|
+
the default `'deny'`), a `driverId` (a host that attributes prompts names it as the requester) and
|
|
79
|
+
an `executionId` its events carry. A finished model call's `tool_end` names its view with
|
|
80
|
+
`IToolState.appView` (`viewId`, source, resource), and the new
|
|
81
|
+
`ISessionToolAppViews.readToolAppView(viewId)` reads the document. A permission handler may take
|
|
82
|
+
`{ signal }`, and aborting it withdraws the prompt.
|
|
83
|
+
- `agent-session` — a direct call asks a person only when its caller says so, and the handler is
|
|
84
|
+
given the call's own signal; the tool end event carries the view, never in the logged result data.
|
|
85
|
+
- `agent-framework` — the view of a model's call is kept under a `viewId` the session mints, in a
|
|
86
|
+
bounded per-session store (16 views, 4 MiB each, 16 MiB in all, measured on the whole serialized
|
|
87
|
+
view), and read on demand, so the document never rides `tool_end` to every surface, never enters
|
|
88
|
+
the recorded history, and a repeated provider tool-call id cannot overwrite another turn's view.
|
|
89
|
+
A malformed view is dropped. A direct call keeps and names no view, recognised by the id it was
|
|
90
|
+
started with. A submission or agent wakeup that arrives while a direct call holds the session is
|
|
91
|
+
queued behind it, as during a turn, instead of refused. A direct call acting for a driver
|
|
92
|
+
attributes its permission prompt and tool events to that driver, and aborting its signal withdraws
|
|
93
|
+
an open prompt from every surface.
|
|
94
|
+
- `agent-transport` — a driving connection sends `call-app-tool` (answered by `app_tool_result`) and
|
|
95
|
+
`read-app-view` (answered by `app_view`). A call names its view and reaches only the tools that
|
|
96
|
+
view's source declared; a call or read that decodes but cannot be served answers `protocol_error`
|
|
97
|
+
echoing the `requestId`, while an observer's attempt is refused like any non-read. A call still
|
|
98
|
+
waiting on its prompt is cancelled when its connection goes away (for the resume bridge, when the
|
|
99
|
+
bridge is disposed). `maxFrameBytes` bounds an app answer to what a carrier's channel carries;
|
|
100
|
+
the WebRTC carrier uses a history page's worth. `IProtocolSession` now includes the runtime-tool
|
|
101
|
+
and app-view roles.
|
|
102
|
+
- `agent-ui-web` — the two new server messages are recorded as not rendered until the app-view host
|
|
103
|
+
consumes them.
|
|
104
|
+
|
|
105
|
+
An implementation of `IInteractiveSession` or `IProtocolSession` outside this repository must add
|
|
106
|
+
`readToolAppView` (and, for `IProtocolSession`, `listRuntimeTools` and `invokeRuntimeTool`); the
|
|
107
|
+
members are required so a host cannot silently lack them.
|
|
108
|
+
|
|
109
|
+
### Patch Changes
|
|
110
|
+
|
|
111
|
+
- 60f3965: **`robota mcp serve --ask-client` puts a caller's permission and ask prompts to the calling MCP client through elicitation instead of failing them.**
|
|
112
|
+
|
|
113
|
+
`@robota-sdk/agent-transport-mcp`: `createMcpTransport`, `createMcpHttpHost`,
|
|
114
|
+
`createMcpRemoteHttpHost` and `createAgentMcpServer` take `askClient`. Off by default, every prompt
|
|
115
|
+
is a tool error as before. On, and when the client declared form-mode elicitation, a permission or
|
|
116
|
+
ask prompt raised by that client's own call is put to it: a permission offers allow once or deny
|
|
117
|
+
only, never a remembered grant; an ask becomes a form (choice, multiple choice, free text); a masked
|
|
118
|
+
ask is never sent; deny, decline, cancel, a client error or an answer naming nothing offered keeps
|
|
119
|
+
today's outcome. stdio asks during the call. The HTTP hosts keep no session state, so they ask only
|
|
120
|
+
a client on the 2026-07-28 revision, through input-required rounds whose `requestState` is a
|
|
121
|
+
single-use random token naming one parked call; a 2025-era HTTP client keeps the tool error.
|
|
122
|
+
A call listens for prompts only while its own work drives the session, so a submission waiting
|
|
123
|
+
in the queue never holds another caller's prompt that it cannot answer.
|
|
124
|
+
Breaking for hand-written sessions: `IMcpTransportSession` now also requires `ISessionEvents`
|
|
125
|
+
(`on`/`off`), `ISessionPromptResolution` (`resolvePermission`/`resolveAsk`) and
|
|
126
|
+
`ISessionDriverAttribution` (`getActiveDriverId`), which `InteractiveSession` and the published
|
|
127
|
+
test double already implement.
|
|
128
|
+
|
|
129
|
+
`@robota-sdk/agent-interface-session` / `@robota-sdk/agent-session` / `@robota-sdk/agent-framework`:
|
|
130
|
+
`ISessionRuntimeTools.invokeRuntimeTool` (and `Session.invokeRuntimeTool`) accept
|
|
131
|
+
`options.permissionInteraction` and `options.driverId`. A direct call still denies a decision that
|
|
132
|
+
would need a person, and finds no one to ask a question, unless its caller passes
|
|
133
|
+
`permissionInteraction: 'interactive'`; then it asks the session's permission handler and its
|
|
134
|
+
tools get the session's ask port. `InteractiveSession` makes `driverId` the active driver while
|
|
135
|
+
the direct call runs, so a prompt the call raises carries it as `requesterDriverId`. With
|
|
136
|
+
`askClient` on, an MCP call runs under its own `mcp:<n>` driver id; a submission made that way is
|
|
137
|
+
attributed to it rather than to the owner.
|
|
138
|
+
|
|
139
|
+
`@robota-sdk/agent-transport`: exports `permissionSummaryArgument`, the argument a person recognises
|
|
140
|
+
a tool call by (`filePath` for the built-in file tools), for every transport that puts a permission
|
|
141
|
+
request to a person in its own wire form.
|
|
142
|
+
|
|
143
|
+
`@robota-sdk/agent-cli`: `mcp serve --ask-client` turns this on for whichever carrier the run serves.
|
|
144
|
+
- Updated dependencies [60f3965]
|
|
145
|
+
- Updated dependencies [115e104]
|
|
146
|
+
- Updated dependencies [04719a9]
|
|
147
|
+
- Updated dependencies [04a6de4]
|
|
148
|
+
- Updated dependencies [0ba247b]
|
|
149
|
+
- Updated dependencies [02053ec]
|
|
150
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.95
|
|
151
|
+
- @robota-sdk/agent-core@3.0.0-beta.95
|
|
152
|
+
- @robota-sdk/agent-interface-execution@3.0.0-beta.95
|
|
153
|
+
- @robota-sdk/agent-file-authority@3.0.0-beta.95
|
|
154
|
+
|
|
3
155
|
## 3.0.0-beta.94
|
|
4
156
|
### Patch Changes
|
|
5
157
|
|