@nifrajs/ag-ui 5.1.0 → 5.2.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 +212 -0
- package/package.json +5 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# @nifrajs/ag-ui
|
|
2
|
+
|
|
3
|
+
## 5.2.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9498cf8: The package ships its `CHANGELOG.md`, so the installed package has the notes for every version, as the GitHub release does. Before, the tarball held only the code, `README.md`, `LICENSE` and `package.json`.
|
|
8
|
+
|
|
9
|
+
## 5.1.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- abb4354: The package now ships the MIT `LICENSE` text, as every other @nifrajs package already did.
|
|
14
|
+
- a59d419: `mountAgUI` answers refusals and failures with the status they mean, as `mountAgent` now does. A `Response` thrown from `ports` or `evidenceOwner` (a 401 with its challenge, say) is sent as built; before, every throw from either became `400 bad_request`. A refusal thrown from `evidenceOwner` answers `403 { error: "forbidden" }`, and any other throw from `ports` reaches the app's error handling as the fault it is.
|
|
15
|
+
|
|
16
|
+
## 5.0.0
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 6340cd8: A replay connection that closes detaches its live view from the turn: `mountAgent` and `mountAgUI` return the view when the client cancels, and the memory evidence log stops sending evidence to a returned view. The logged run keeps recording for the next reconnect. `createMemoryAgentEvidenceLog({ maxSubscribers })` caps live views per running turn (default 64); one more ends the oldest. `createAgentEvidenceStream({ onReturn })` reports when a consumer returns its stream.
|
|
21
|
+
- 34b3014: New `resumeApproval: "port"` agent port option keeps the configured approval port authoritative when a run resumes. By default a step that suspended for approval takes the decision the resuming caller sends in `resume.approval`. Over A2A, or on a public AG-UI or `mountAgent` route, that caller can be the party asking for the tool. With `resumeApproval: "port"` the approval port is asked again and receives the caller's decision as `callerDecision`, and its verdict stands. Without a port, such a resume suspends again.
|
|
22
|
+
- 7775c2b: Detach AG-UI viewers on initial or later output overflow, cancel unlogged work, and preserve logged run results for replay. Parse fragmented agent SSE frames with linear scanning and UTF-8 accounting. Bound each DevTools connection's pending bytes and close stalled readers, replaying only the recent history that fits.
|
|
23
|
+
- Updated dependencies [2198640]
|
|
24
|
+
- Updated dependencies [6b96131]
|
|
25
|
+
- Updated dependencies [d6a7fa0]
|
|
26
|
+
- Updated dependencies [6340cd8]
|
|
27
|
+
- Updated dependencies [34b3014]
|
|
28
|
+
- Updated dependencies [848ce97]
|
|
29
|
+
- Updated dependencies [a0a02f4]
|
|
30
|
+
- Updated dependencies [0aed425]
|
|
31
|
+
- Updated dependencies [eaf030b]
|
|
32
|
+
- Updated dependencies [7de0397]
|
|
33
|
+
- Updated dependencies [1af7543]
|
|
34
|
+
- Updated dependencies [4199ff3]
|
|
35
|
+
- Updated dependencies [90d9ee6]
|
|
36
|
+
- Updated dependencies [364a234]
|
|
37
|
+
- Updated dependencies [c06cba5]
|
|
38
|
+
- Updated dependencies [f4d3852]
|
|
39
|
+
- Updated dependencies [4a82ae0]
|
|
40
|
+
- Updated dependencies [0ff867a]
|
|
41
|
+
- Updated dependencies [e7391bf]
|
|
42
|
+
- Updated dependencies [0b80a59]
|
|
43
|
+
- Updated dependencies [c64db12]
|
|
44
|
+
- Updated dependencies [3753104]
|
|
45
|
+
- Updated dependencies [4b3b1fa]
|
|
46
|
+
- Updated dependencies [3562557]
|
|
47
|
+
- Updated dependencies [53087f3]
|
|
48
|
+
- Updated dependencies [2def6c7]
|
|
49
|
+
- Updated dependencies [b5b5bc3]
|
|
50
|
+
- Updated dependencies [22e1777]
|
|
51
|
+
- Updated dependencies [3a483cd]
|
|
52
|
+
- Updated dependencies [35f52c7]
|
|
53
|
+
- Updated dependencies [343cb81]
|
|
54
|
+
- Updated dependencies [d91fd44]
|
|
55
|
+
- Updated dependencies [b13e071]
|
|
56
|
+
- Updated dependencies [077657f]
|
|
57
|
+
- Updated dependencies [a5963cb]
|
|
58
|
+
- Updated dependencies [05aac0e]
|
|
59
|
+
- Updated dependencies [1a6616f]
|
|
60
|
+
- Updated dependencies [7775c2b]
|
|
61
|
+
- Updated dependencies [846e2f6]
|
|
62
|
+
- Updated dependencies [aadd9fc]
|
|
63
|
+
- Updated dependencies [ea16748]
|
|
64
|
+
- Updated dependencies [fc0284a]
|
|
65
|
+
- Updated dependencies [5b22f4d]
|
|
66
|
+
- Updated dependencies [1b94593]
|
|
67
|
+
- Updated dependencies [9f58295]
|
|
68
|
+
- Updated dependencies [b9608ac]
|
|
69
|
+
- Updated dependencies [7a165de]
|
|
70
|
+
- Updated dependencies [4064f36]
|
|
71
|
+
- Updated dependencies [48aad8c]
|
|
72
|
+
- Updated dependencies [41050ed]
|
|
73
|
+
- Updated dependencies [fc837cb]
|
|
74
|
+
- Updated dependencies [b80ce77]
|
|
75
|
+
- Updated dependencies [9b1acc9]
|
|
76
|
+
- Updated dependencies [740109f]
|
|
77
|
+
- Updated dependencies [e0a25fe]
|
|
78
|
+
- Updated dependencies [3630b6e]
|
|
79
|
+
- Updated dependencies [1290c6d]
|
|
80
|
+
- Updated dependencies [d0a7d58]
|
|
81
|
+
- @nifrajs/agent@5.0.0
|
|
82
|
+
- @nifrajs/core@5.0.0
|
|
83
|
+
|
|
84
|
+
## 4.0.2
|
|
85
|
+
|
|
86
|
+
## 4.0.1
|
|
87
|
+
|
|
88
|
+
## 4.0.0
|
|
89
|
+
|
|
90
|
+
### Minor Changes
|
|
91
|
+
|
|
92
|
+
- 7b2ff47: Resumable agent streams can be scoped to the caller:
|
|
93
|
+
|
|
94
|
+
- New `evidenceOwner` option on `mountAgent` and `mountAgUI`. It returns the caller's user or tenant id, and turns are recorded and replayed under it. Another caller's `Last-Event-ID` reconnect or reused turn id finds none of that caller's turns. It runs before any replay is served, and throwing from it refuses the request.
|
|
95
|
+
- New `scopeAgentEvidenceLog(log, owner)` in `@nifrajs/agent/events` returns the per-owner view of an `AgentEvidenceLog` that the seams use.
|
|
96
|
+
- `mountAgent` answers `400 { error: "invalid_turn_id" }` for a `turnId` that is not a bounded token before it reads the evidence log, matching `mountAgUI`.
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- d2329f5: A resume continues only the step the turn suspended on. The saved state keeps a SHA-256 digest of the suspended tool input, and a continuation that names another tool, effect id or kind, or replays different input, is refused with `AgentResumeMismatchError` before anything runs (`mountAgent` answers 409). A caller's `approval` answers only a step that suspended for approval; a step suspended for budget or cancellation asks the approval port again.
|
|
101
|
+
- 1eb77df: An SSE client that disconnects mid-run no longer ends the turn as failed. With an `evidenceLog`, the run keeps going and records its real result, so a `Last-Event-ID` reconnect replays that result instead of `run_failed`/`RUN_ERROR`. Without an `evidenceLog`, the disconnect aborts `ports.signal` (combined with any signal the caller's ports carry), so the model and tool loop stop and the turn suspends as `cancelled`.
|
|
102
|
+
- Updated dependencies [6695a23]
|
|
103
|
+
- Updated dependencies [7b2ff47]
|
|
104
|
+
- Updated dependencies [422248c]
|
|
105
|
+
- Updated dependencies [62115dd]
|
|
106
|
+
- Updated dependencies [dbc91b6]
|
|
107
|
+
- Updated dependencies [d2329f5]
|
|
108
|
+
- Updated dependencies [1eb77df]
|
|
109
|
+
- Updated dependencies [dde125b]
|
|
110
|
+
- Updated dependencies [72b62fa]
|
|
111
|
+
- Updated dependencies [aa44e93]
|
|
112
|
+
- Updated dependencies [4a3ee60]
|
|
113
|
+
- Updated dependencies [aad6297]
|
|
114
|
+
- Updated dependencies [dad0d41]
|
|
115
|
+
- Updated dependencies [538adc2]
|
|
116
|
+
- Updated dependencies [f47edd1]
|
|
117
|
+
- Updated dependencies [df9530a]
|
|
118
|
+
- Updated dependencies [3e6973f]
|
|
119
|
+
- Updated dependencies [25e8edf]
|
|
120
|
+
- Updated dependencies [2b5e5fc]
|
|
121
|
+
- Updated dependencies [3b090de]
|
|
122
|
+
- Updated dependencies [da7d792]
|
|
123
|
+
- Updated dependencies [612a296]
|
|
124
|
+
- Updated dependencies [fb14dfa]
|
|
125
|
+
- Updated dependencies [8ae97f6]
|
|
126
|
+
- Updated dependencies [4af6f39]
|
|
127
|
+
- Updated dependencies [ca8b50d]
|
|
128
|
+
- Updated dependencies [b00a889]
|
|
129
|
+
- Updated dependencies [b53d64f]
|
|
130
|
+
- Updated dependencies [66fd712]
|
|
131
|
+
- Updated dependencies [9c3d524]
|
|
132
|
+
- Updated dependencies [738e7a1]
|
|
133
|
+
- Updated dependencies [4801cac]
|
|
134
|
+
- Updated dependencies [1b2d53a]
|
|
135
|
+
- Updated dependencies [25fe13d]
|
|
136
|
+
- Updated dependencies [0852290]
|
|
137
|
+
- Updated dependencies [0589dbe]
|
|
138
|
+
- Updated dependencies [2e2d8c0]
|
|
139
|
+
- Updated dependencies [856f5ce]
|
|
140
|
+
- Updated dependencies [18aa5aa]
|
|
141
|
+
- Updated dependencies [cfd86b3]
|
|
142
|
+
- Updated dependencies [8ff96c9]
|
|
143
|
+
- Updated dependencies [4c46199]
|
|
144
|
+
- Updated dependencies [eef4932]
|
|
145
|
+
- Updated dependencies [6de8686]
|
|
146
|
+
- Updated dependencies [d7892ea]
|
|
147
|
+
- Updated dependencies [4936309]
|
|
148
|
+
- Updated dependencies [ff5a779]
|
|
149
|
+
- Updated dependencies [bbdc5a1]
|
|
150
|
+
- Updated dependencies [10bc446]
|
|
151
|
+
- Updated dependencies [e8270d9]
|
|
152
|
+
- Updated dependencies [ff4a062]
|
|
153
|
+
- Updated dependencies [43ba944]
|
|
154
|
+
- Updated dependencies [46c741a]
|
|
155
|
+
- Updated dependencies [7bfa25e]
|
|
156
|
+
- Updated dependencies [4936309]
|
|
157
|
+
- Updated dependencies [6e257a6]
|
|
158
|
+
- Updated dependencies [4a03d30]
|
|
159
|
+
- Updated dependencies [8e30090]
|
|
160
|
+
- Updated dependencies [28f3aaf]
|
|
161
|
+
- Updated dependencies [6d20355]
|
|
162
|
+
- Updated dependencies [6907cbe]
|
|
163
|
+
- Updated dependencies [b64c3ee]
|
|
164
|
+
- Updated dependencies [bda9637]
|
|
165
|
+
- Updated dependencies [81c720e]
|
|
166
|
+
- Updated dependencies [ed60b23]
|
|
167
|
+
- Updated dependencies [a158b74]
|
|
168
|
+
- Updated dependencies [ff25d68]
|
|
169
|
+
- @nifrajs/agent@4.0.0
|
|
170
|
+
- @nifrajs/core@4.0.0
|
|
171
|
+
|
|
172
|
+
## 3.5.0
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- d5b7c22: Harden request boundaries, error handling, resource limits, signing, and cross-runtime adapters for safer production releases.
|
|
177
|
+
|
|
178
|
+
## 3.4.0
|
|
179
|
+
|
|
180
|
+
## 3.3.0
|
|
181
|
+
|
|
182
|
+
## 3.2.0
|
|
183
|
+
|
|
184
|
+
### Minor Changes
|
|
185
|
+
|
|
186
|
+
- 6eedba9: Widen AG-UI protocol conformance: tool evidence now ends with a `TOOL_CALL_RESULT` carrying the token-only outcome (`{ outcome, code? }`), evidence-derived events carry the evidence `timestamp`, and `RUN_FINISHED` reports the spec `outcome` - `{ type: "success" }` on completion, `{ type: "interrupt", interrupts: [...] }` on suspension with the continuation in the interrupt's `metadata`. Suspended runs resume through the standard `RunAgentInput.resume` array (a `cancelled` entry without an explicit approval resumes as a denial); the `forwardedProps.resume` form keeps working. A new `emitMessagesSnapshot` option (default off) emits a `MESSAGES_SNAPSHOT` of the request messages plus the assistant output before `RUN_FINISHED`.
|
|
187
|
+
- 7aee593: Live token streaming and the AG-UI state channel. A streaming model port now turns into live `TEXT_MESSAGE_*` frames (the terminal text block is suppressed when text was streamed), `REASONING_*` messages, and provisional `TOOL_CALL_START` + `TOOL_CALL_ARGS` calls that the following tool evidence closes. The `ports` factory receives `(c, run)` with `run.turnId` and `run.sharedState`: `body.state` seeds the document (announced as `STATE_SNAPSHOT`), and every patch streams as `STATE_DELTA` with RFC 6902 ops. `usage` deltas are summed per `(provider, model)` and stamped as the spec `usage: TokenUsage[]` array on the terminal `RUN_FINISHED` - kept by the stored terminal events, so a replayed stream reports the same totals. Non-streaming ports and existing single-argument `ports` factories are unaffected.
|
|
188
|
+
- 3eacb4a: Resumable SSE evidence streams.
|
|
189
|
+
|
|
190
|
+
`@nifrajs/agent/events` gains the `AgentEvidenceLog` seam and its in-memory reference
|
|
191
|
+
(`createMemoryAgentEvidenceLog`): per-turn step evidence is recorded, replayable after a `seq`
|
|
192
|
+
cursor, and live-subscribable while the turn runs.
|
|
193
|
+
|
|
194
|
+
With an `evidenceLog` configured, `mountAgent` and `mountAgUI` stamp evidence frames with SSE
|
|
195
|
+
`id: <seq>` and serve reconnects: a re-POST of the same turn with a `Last-Event-ID` header replays
|
|
196
|
+
the missed evidence and rejoins a still-running turn live, or replays the stored terminal frame -
|
|
197
|
+
the run is never re-executed. Malformed cursors are rejected with 400, unknown turns with 409.
|
|
198
|
+
|
|
199
|
+
- fdca0ce: New agent protocol adapter packages. `@nifrajs/a2a` mounts a nifra agent as an Agent2Agent (A2A) 1.0 server: the agent card on GET, the JSON-RPC binding on POST with `SendMessage`, `SendStreamingMessage` (step evidence over SSE), and `GetTask`, plus human-in-the-loop resume through message metadata. `@nifrajs/ag-ui` mounts the same agent as an AG-UI endpoint: `RunAgentInput` in, the AG-UI event stream out - run lifecycle, tool-call and step events, text message events for the output, and a typed continuation for resume. Both are protocol bridges over `@nifrajs/agent` - the request body goes through core's bounded, prototype-guarded framing lane, and the model, state store, and approval transport are injected per request.
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- 893f7b3: Agent-run tracing and composable telemetry ports.
|
|
204
|
+
|
|
205
|
+
`@nifrajs/agent-telemetry` gains `traceAgentRun`: one OpenTelemetry span per bounded agent run, one
|
|
206
|
+
child span per step evidence item, with tool names, effect ids, error codes, and effect-ledger heads
|
|
207
|
+
as span attributes. Only the runner's constrained token-only evidence is exported; telemetry is
|
|
208
|
+
fail-open and can never fail the turn it observes.
|
|
209
|
+
|
|
210
|
+
`@nifrajs/agent` gains `combineAgentTelemetry` to fan one run's step evidence out to several
|
|
211
|
+
telemetry ports. The HTTP seams - `mountAgent`, the A2A adapter, and the AG-UI adapter - now compose
|
|
212
|
+
their SSE evidence stream with a caller-injected telemetry port instead of replacing it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nifrajs/ag-ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Mount a nifra agent as an AG-UI (Agent-User Interaction protocol) endpoint - one POST accepting RunAgentInput, a stream of AG-UI events out over SSE: run lifecycle, step and tool-call events from the runner's step evidence, text message events for the output, and a typed continuation for human-in-the-loop resume. A protocol bridge over @nifrajs/agent; the model, state store, and approval transport stay injected per request.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -29,15 +29,16 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|
|
32
|
-
"src"
|
|
32
|
+
"src",
|
|
33
|
+
"CHANGELOG.md"
|
|
33
34
|
],
|
|
34
35
|
"sideEffects": false,
|
|
35
36
|
"scripts": {
|
|
36
37
|
"build": "tsc -p tsconfig.build.json && bun run ../../scripts/fix-dts.ts dist"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
|
-
"@nifrajs/agent": "^5.
|
|
40
|
-
"@nifrajs/core": "^5.
|
|
40
|
+
"@nifrajs/agent": "^5.2.0",
|
|
41
|
+
"@nifrajs/core": "^5.2.0"
|
|
41
42
|
},
|
|
42
43
|
"peerDependenciesMeta": {
|
|
43
44
|
"@nifrajs/core": {
|