@robota-sdk/agent-session-analytics 3.0.0-beta.100

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 ADDED
@@ -0,0 +1,382 @@
1
+ # @robota-sdk/agent-session-analytics
2
+
3
+ ## 3.0.0-beta.100
4
+ ### Patch Changes
5
+
6
+ - @robota-sdk/agent-core@3.0.0-beta.100
7
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.100
8
+ - @robota-sdk/agent-interface-session@3.0.0-beta.100
9
+
10
+ ## 3.0.0-beta.99
11
+ ### Patch Changes
12
+
13
+ - @robota-sdk/agent-core@3.0.0-beta.99
14
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.99
15
+ - @robota-sdk/agent-interface-session@3.0.0-beta.99
16
+
17
+ ## 3.0.0-beta.98
18
+ ### Patch Changes
19
+
20
+ - @robota-sdk/agent-core@3.0.0-beta.98
21
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.98
22
+ - @robota-sdk/agent-interface-session@3.0.0-beta.98
23
+
24
+ ## 3.0.0-beta.97
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [c207a31]
28
+ - Updated dependencies [9b4f63b]
29
+ - Updated dependencies [7911a7d]
30
+ - Updated dependencies [23a30cd]
31
+ - @robota-sdk/agent-core@3.0.0-beta.97
32
+ - @robota-sdk/agent-interface-session@3.0.0-beta.97
33
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.97
34
+
35
+ ## 3.0.0-beta.96
36
+ ### Patch Changes
37
+
38
+ - @robota-sdk/agent-core@3.0.0-beta.96
39
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.96
40
+ - @robota-sdk/agent-interface-session@3.0.0-beta.96
41
+
42
+ ## 3.0.0-beta.95
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [60f3965]
46
+ - Updated dependencies [115e104]
47
+ - Updated dependencies [04719a9]
48
+ - Updated dependencies [04a6de4]
49
+ - Updated dependencies [0ba247b]
50
+ - Updated dependencies [02053ec]
51
+ - @robota-sdk/agent-interface-session@3.0.0-beta.95
52
+ - @robota-sdk/agent-core@3.0.0-beta.95
53
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.95
54
+
55
+ ## 3.0.0-beta.94
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [fef3a50]
59
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.94
60
+ - @robota-sdk/agent-interface-session@3.0.0-beta.94
61
+ - @robota-sdk/agent-core@3.0.0-beta.94
62
+
63
+ ## 3.0.0-beta.93
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies
67
+ - @robota-sdk/agent-core@3.0.0-beta.93
68
+ - @robota-sdk/agent-interface-session@3.0.0-beta.93
69
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.93
70
+
71
+ ## 3.0.0-beta.92
72
+ ### Patch Changes
73
+
74
+ - Updated dependencies
75
+ - @robota-sdk/agent-core@3.0.0-beta.92
76
+ - @robota-sdk/agent-interface-session@3.0.0-beta.92
77
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.92
78
+
79
+ ## 3.0.0-beta.91
80
+ ### Patch Changes
81
+
82
+ - @robota-sdk/agent-core@3.0.0-beta.91
83
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.91
84
+ - @robota-sdk/agent-interface-session@3.0.0-beta.91
85
+
86
+ ## 3.0.0-beta.90
87
+ ### Patch Changes
88
+
89
+ - @robota-sdk/agent-core@3.0.0-beta.90
90
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.90
91
+ - @robota-sdk/agent-interface-session@3.0.0-beta.90
92
+
93
+ ## 3.0.0-beta.89
94
+ ### Patch Changes
95
+
96
+ - @robota-sdk/agent-core@3.0.0-beta.89
97
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.89
98
+ - @robota-sdk/agent-interface-session@3.0.0-beta.89
99
+
100
+ ## 3.0.0-beta.88
101
+
102
+ ### Patch Changes
103
+
104
+ - @robota-sdk/agent-core@3.0.0-beta.88
105
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.88
106
+ - @robota-sdk/agent-interface-session@3.0.0-beta.88
107
+
108
+ ## 3.0.0-beta.87
109
+
110
+ ### Patch Changes
111
+
112
+ - 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.
113
+ - Updated dependencies
114
+ - Updated dependencies [66af868]
115
+ - Updated dependencies [7d9cc66]
116
+ - Updated dependencies [7d9cc66]
117
+ - Updated dependencies [7d9cc66]
118
+ - Updated dependencies [7d9cc66]
119
+ - Updated dependencies [7d9cc66]
120
+ - Updated dependencies [7d9cc66]
121
+ - Updated dependencies [7d9cc66]
122
+ - Updated dependencies [7d9cc66]
123
+ - @robota-sdk/agent-core@3.0.0-beta.87
124
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.87
125
+ - @robota-sdk/agent-interface-session@3.0.0-beta.87
126
+
127
+ ## 3.0.0-beta.86
128
+
129
+ ### Patch Changes
130
+
131
+ - @robota-sdk/agent-core@3.0.0-beta.86
132
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.86
133
+ - @robota-sdk/agent-interface-session@3.0.0-beta.86
134
+
135
+ ## 3.0.0-beta.85
136
+
137
+ ### Patch Changes
138
+
139
+ - Updated dependencies [41cca13]
140
+ - Updated dependencies [ada3841]
141
+ - Updated dependencies [5093a30]
142
+ - Updated dependencies [94b2c87]
143
+ - Updated dependencies [3ab2eca]
144
+ - @robota-sdk/agent-core@3.0.0-beta.85
145
+ - @robota-sdk/agent-interface-session@3.0.0-beta.85
146
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.85
147
+
148
+ ## 3.0.0-beta.84
149
+
150
+ ### Patch Changes
151
+
152
+ - 9c6a8db: A personal usage aggregate's `costStatus` no longer reads as `'unknown'` just because one observation
153
+ in it couldn't be priced (a legacy row, an unknown model, an unpriced advisor call) — it now falls back
154
+ to `'unknown'` only when nothing in the aggregate could be priced at all, so `costUsd` and `costStatus`
155
+ agree with each other. The new `unpricedTurns` field counts the turns excluded from `costUsd` for this
156
+ reason, present only when that count is above zero.
157
+
158
+ The personal usage report also gained `sessionFirstSeen`, an ISO timestamp per session id of its
159
+ earliest observation or activity in the report — content-free, like the rest of the report — so a GUI
160
+ can label a session outside its own local listing by date instead of a raw id.
161
+
162
+ - Updated dependencies [9f46375]
163
+ - Updated dependencies [e8d70ac]
164
+ - Updated dependencies [9c6a8db]
165
+ - Updated dependencies [9c6a8db]
166
+ - @robota-sdk/agent-core@3.0.0-beta.84
167
+ - @robota-sdk/agent-interface-session@3.0.0-beta.84
168
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.84
169
+
170
+ ## 3.0.0-beta.83
171
+
172
+ ### Patch Changes
173
+
174
+ - 3c81769: A supervised session accepts attach connections on its control socket.
175
+
176
+ - A terminal of the same user sends `{"command":"attach","id","generation","mode":"drive"|"observe","protocol":1}`.
177
+ The session compares the generation with its own. It refuses another generation, an unknown mode or
178
+ protocol, or a fifth concurrent attach. Otherwise it answers `{"status":"attached","driverId":"attach:<n>"}`
179
+ and carries the ordinary session protocol as newline-delimited JSON on the same connection.
180
+ - The driver id is assigned by the session and a client-sent one is ignored. Turns submitted from an
181
+ attached terminal are attributed to it and counted under the new `attach` usage surface.
182
+ - `drive` sends prompts and answers the session's questions under the usual co-drive rules. `observe`
183
+ is read-only and never counts as a surface that can answer, so an unattended session still denies
184
+ its prompts at once.
185
+ - Detaching or crashing ends only that connection: a turn in progress keeps running, a prompt no other
186
+ surface can answer is denied, and the session returns to its unattached posture. A reader that falls
187
+ 1 MiB behind is disconnected, and an oversize frame closes only its own connection. Stopping the
188
+ session ends attached connections with it.
189
+ - Commands from an attached terminal carry the remote origin, so pairing, revoking and reading the
190
+ pairing link stay refused. An attached terminal is never an operator approver; supervised sessions
191
+ keep refusing mesh connections that need one.
192
+ - A client may send its first frames in the same write as the handshake; only the handshake line
193
+ itself is held to the control endpoint's line limit.
194
+ - `agent-framework`: the surface a turn was submitted on now reaches its usage observation. It was
195
+ dropped before, so remote-control turns were counted as `unknown`.
196
+ - The terminal client (`robota session attach`) and the view keys come separately.
197
+
198
+ - 57280bf: Every published package now declares `"engines": { "node": ">=22.12.0" }`. Before, 27 of the 38
199
+ packages declared no floor (`agent-core`, `agent-tools` and every provider among them),
200
+ `agent-session` and `agent-file-authority` declared `>=20.19.0`, and the other nine declared
201
+ `>=22.0.0`, so a consumer on Node 20 saw at most a warning from a transitive dependency.
202
+
203
+ Why 22.12: `agent-cli` and `agent-ui-terminal` need Node 22 through `ink` 7, and the CommonJS entries
204
+ of `agent-tools` and its dependents, `agent-transport`/`node` and its dependents, and
205
+ `agent-ui-terminal` `require()` ESM-only dependencies (`p-limit`, `jose`, `chalk`), which Node 22
206
+ supports unflagged only from 22.12. `engines` is advisory unless the consumer enables `engine-strict`.
207
+
208
+ No code changes: `tsdown` now reads `node22.12.0` as its build target from the field.
209
+
210
+ - 18c0d5c: Every published package now exports `./package.json`, so `require('<package>/package.json')` and
211
+ `import('<package>/package.json', { with: { type: 'json' } })` work instead of failing with
212
+ `ERR_PACKAGE_PATH_NOT_EXPORTED`, and each tarball now ships the package's `CHANGELOG.md`.
213
+ - Updated dependencies [3c81769]
214
+ - Updated dependencies [e689c8e]
215
+ - Updated dependencies [7b72344]
216
+ - Updated dependencies [6ae3f28]
217
+ - Updated dependencies [be0e53c]
218
+ - Updated dependencies [57f57f5]
219
+ - Updated dependencies [ba822c1]
220
+ - Updated dependencies [6e6b06b]
221
+ - Updated dependencies [8bd5fac]
222
+ - Updated dependencies [57280bf]
223
+ - Updated dependencies [5033dd9]
224
+ - Updated dependencies [18c0d5c]
225
+ - Updated dependencies [dbd888d]
226
+ - Updated dependencies [1887e54]
227
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.83
228
+ - @robota-sdk/agent-core@3.0.0-beta.83
229
+ - @robota-sdk/agent-interface-session@3.0.0-beta.83
230
+
231
+ ## 3.0.0-beta.82
232
+
233
+ ### Patch Changes
234
+
235
+ - Updated dependencies [c7f9203]
236
+ - @robota-sdk/agent-core@3.0.0-beta.82
237
+ - @robota-sdk/agent-interface-session@3.0.0-beta.82
238
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.82
239
+
240
+ ## 3.0.0-beta.81
241
+
242
+ ### Patch Changes
243
+
244
+ - Updated dependencies [3038eb7]
245
+ - Updated dependencies [02b7452]
246
+ - Updated dependencies [ec5e477]
247
+ - @robota-sdk/agent-core@3.0.0-beta.81
248
+ - @robota-sdk/agent-interface-session@3.0.0-beta.81
249
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.81
250
+
251
+ ## 3.0.0-beta.80
252
+
253
+ ### Minor Changes
254
+
255
+ - 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.
256
+
257
+ ### Patch Changes
258
+
259
+ - 9368d00: Advisor escalation: the main model can consult a second model at the decision points it chooses.
260
+
261
+ With an advisor configured (`--advisor <profile>[:<model>]`, or the `advisorModel` setting that
262
+ `/advisor` saves; the flag wins), the session gets an `Advisor({ question? })` tool. The advisor reads
263
+ the whole conversation — system prompt, messages, tool calls and results — serialized into one prompt
264
+ and sent with `toolChoice: 'none'`, truncated from the front to fit its window with the system prompt
265
+ kept, and declines when even that does not fit. Its answer comes back framed as guidance to verify;
266
+ an empty or refusing answer reads as declined. Calls are limited to two per turn and a fixed number
267
+ per session, parallel calls in one round share those limits, and a repeated question in the same
268
+ turn returns the earlier answer. A request that was sent counts even when the provider failed (the
269
+ decline is reported by class, never by its text); only a call declined before sending gives its slot
270
+ back.
271
+
272
+ Advisor usage, including in-process subagents', is recorded where each turn's usage is recorded —
273
+ the persisted session history, under the advisor's own provider and model — so `/cost`, usage reports
274
+ and resumed sessions include it. `/cost` now totals that history and prices each part on its own
275
+ model, showing "mixed" when more than one model was priced.
276
+
277
+ `/advisor <model>` and `/advisor off` change only where calls go, never the tool list, so the main
278
+ model's prompt cache is not invalidated mid-session; the tool is added only when a session starts
279
+ with an advisor. Sending history to a destination (provider type and endpoint host) the main model
280
+ does not already use needs a one-time consent per destination, kept in the user settings file; a
281
+ refusal is remembered for the session. The organization's `allowedProviders` applies, and
282
+ `PRODUCT_DISABLE_ADVISOR=1` turns it off completely. In-process subagents inherit the advisor, bound
283
+ to their own conversation; child-process subagents do not get it.
284
+
285
+ **`@robota-sdk/agent-framework` is `major` for one reason: `ICommandHostSessionAccess` gains a
286
+ required member,** `getSessionUsage()`, the session's persisted usage records. An external
287
+ implementation of that role port stops compiling until it adds the method. The rest is additive.
288
+
289
+ - `agent-session` — `formatConversationEntries`, the one text rendering of a conversation, now used
290
+ by compaction too. It keeps tool calls and results, marks a user message a peer session sent
291
+ (`user [from "peer:<id>"]`), and JSON-encodes every message onto one line so no content can forge
292
+ another entry; compaction previously flattened all of this. `Session.getProvider()` returns the
293
+ provider the session currently uses.
294
+ - `agent-framework` — `AdvisorController`, `createAdvisorTool`, the advisor spec helpers, provider
295
+ destinations (`describeProviderDestination`, `rememberProviderDestination`), `getSessionUsage` and
296
+ `ISessionUsageRecord`, the `onUsageRecorded` session option, and the optional `advisor` command
297
+ host adapter. Session assembly binds a host-supplied Advisor tool to the session holding it.
298
+ - `agent-command` — the `/advisor` command module; `/cost` reads the session's persisted usage.
299
+ - `agent-cli` — the `--advisor` flag, `advisorModel` setting, per-destination consent store and kill
300
+ switch.
301
+ - `agent-ui-terminal` — a usage line from another source (the advisor, a background task) names that
302
+ source and leaves out the context window it does not have.
303
+ - `agent-session-analytics` — personal usage counts an advisor call's tokens and cost toward its
304
+ turn without counting it as a turn.
305
+
306
+ - 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).
307
+ - Updated dependencies [7b6234c]
308
+ - Updated dependencies [37b4bd7]
309
+ - Updated dependencies [4eea54b]
310
+ - Updated dependencies [1698be4]
311
+ - Updated dependencies [d4189b9]
312
+ - Updated dependencies [9edae52]
313
+ - Updated dependencies [4078a72]
314
+ - Updated dependencies [4c73a0b]
315
+ - Updated dependencies [196a900]
316
+ - Updated dependencies [f336838]
317
+ - Updated dependencies [34e50f0]
318
+ - Updated dependencies [722e88a]
319
+ - Updated dependencies [d23c848]
320
+ - Updated dependencies [fec722f]
321
+ - Updated dependencies [2d3b2c0]
322
+ - Updated dependencies [4772067]
323
+ - Updated dependencies [9fbab1b]
324
+ - Updated dependencies [a009f5b]
325
+ - Updated dependencies [4f3c075]
326
+ - Updated dependencies [475e085]
327
+ - Updated dependencies [e477440]
328
+ - Updated dependencies [9dcb5da]
329
+ - Updated dependencies [a95ca85]
330
+ - Updated dependencies [b6d14ce]
331
+ - Updated dependencies [0382a51]
332
+ - Updated dependencies [93d061d]
333
+ - Updated dependencies [39554a1]
334
+ - Updated dependencies [d28430a]
335
+ - Updated dependencies [07b627f]
336
+ - Updated dependencies [d0de5b2]
337
+ - Updated dependencies [d6b9404]
338
+ - Updated dependencies [9814afc]
339
+ - @robota-sdk/agent-core@3.0.0-beta.80
340
+ - @robota-sdk/agent-interface-session@3.0.0-beta.80
341
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.80
342
+
343
+ ## 3.0.0-beta.79
344
+
345
+ ### Patch Changes
346
+
347
+ - @robota-sdk/agent-core@3.0.0-beta.79
348
+ - @robota-sdk/agent-interface-transport@3.0.0-beta.79
349
+
350
+ ## 3.0.0-beta.78
351
+
352
+ ### Patch Changes
353
+
354
+ - Updated dependencies [6f308d1]
355
+ - @robota-sdk/agent-core@3.0.0-beta.78
356
+ - @robota-sdk/agent-interface-transport@3.0.0-beta.78
357
+
358
+ ## 3.0.0-beta.77
359
+
360
+ ### Patch Changes
361
+
362
+ - Updated dependencies
363
+ - @robota-sdk/agent-core@3.0.0-beta.77
364
+ - @robota-sdk/agent-interface-transport@3.0.0-beta.77
365
+
366
+ ## 3.0.0-beta.76
367
+
368
+ ### Minor Changes
369
+
370
+ - c0a6287: Relocate session feature logic out of the CLI shell and the transport (DQ-AUDIT-004):
371
+
372
+ - Extract session-log timing analysis into the new `@robota-sdk/agent-session-analytics` package (pure analysis over canonical session records — no duplicate types, no file I/O). `agent-cli`'s `session analyze` command shrinks to thin wiring and loads records via the new `createUserSessionStore()` / existing `createProjectSessionStore()` framework facades.
373
+ - Move LLM-based session auto-naming (`generateSessionName`) from `agent-transport/tui` into `agent-framework` (session-lifecycle owner); the TUI transport now invokes it through the framework.
374
+
375
+ ### Patch Changes
376
+
377
+ - Updated dependencies
378
+ - Updated dependencies
379
+ - Updated dependencies
380
+ - Updated dependencies [576af62]
381
+ - @robota-sdk/agent-core@3.0.0-beta.76
382
+ - @robota-sdk/agent-interface-transport@3.0.0-beta.76