@robota-sdk/agent-session 3.0.0-beta.96 → 3.0.0-beta.99
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 +39 -0
- package/README.md +43 -2
- package/dist/node/index.cjs +10 -10
- package/dist/node/index.d.cts +90 -77
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.ts +90 -77
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +10 -10
- package/dist/node/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @robota-sdk/agent-session
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.99
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- @robota-sdk/agent-core@3.0.0-beta.99
|
|
7
|
+
- @robota-sdk/agent-file-authority@3.0.0-beta.99
|
|
8
|
+
- @robota-sdk/agent-interface-execution@3.0.0-beta.99
|
|
9
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.99
|
|
10
|
+
|
|
11
|
+
## 3.0.0-beta.98
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- @robota-sdk/agent-core@3.0.0-beta.98
|
|
15
|
+
- @robota-sdk/agent-file-authority@3.0.0-beta.98
|
|
16
|
+
- @robota-sdk/agent-interface-execution@3.0.0-beta.98
|
|
17
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.98
|
|
18
|
+
|
|
19
|
+
## 3.0.0-beta.97
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 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.
|
|
23
|
+
- 9b4f63b: Allow explicitly borrowed providers to outlive agent destruction and Session shutdown while keeping
|
|
24
|
+
owned providers as the default. Track replaced and removed provider cleanup, expose current provider
|
|
25
|
+
registrations after swapping, and hold Roundtable resource leases until runtime teardown finishes.
|
|
26
|
+
Borrowing does not permit concurrent provider use across leases.
|
|
27
|
+
Serialize manager lifecycle transitions so reinitialization cannot admit providers during pending teardown.
|
|
28
|
+
- 7911a7d: Preserve pending execution discovery and input admission in atomic Session conversation snapshots.
|
|
29
|
+
Strict synchronous checkpoints now gate waiting, settlement and abandonment acknowledgment; failed saves
|
|
30
|
+
require checkpoint repair without repeating execution. Restore before framework queue and autonomous
|
|
31
|
+
input admission, and refuse unresolved conversation copies. Read v1/v2 session envelopes and write v2;
|
|
32
|
+
older readers preserve v2 as unsupported, so coordinate reader versions when rolling back.
|
|
33
|
+
- Updated dependencies [c207a31]
|
|
34
|
+
- Updated dependencies [9b4f63b]
|
|
35
|
+
- Updated dependencies [7911a7d]
|
|
36
|
+
- Updated dependencies [23a30cd]
|
|
37
|
+
- @robota-sdk/agent-core@3.0.0-beta.97
|
|
38
|
+
- @robota-sdk/agent-interface-session@3.0.0-beta.97
|
|
39
|
+
- @robota-sdk/agent-interface-execution@3.0.0-beta.97
|
|
40
|
+
- @robota-sdk/agent-file-authority@3.0.0-beta.97
|
|
41
|
+
|
|
3
42
|
## 3.0.0-beta.96
|
|
4
43
|
### Patch Changes
|
|
5
44
|
|
package/README.md
CHANGED
|
@@ -102,7 +102,7 @@ While an execution waits, `run` refuses new input. `getPendingExecution()` retur
|
|
|
102
102
|
saved. A journaled `run`, `runRecoverable` or resume that fails (a storage failure, an unreconciled
|
|
103
103
|
effect) while its tool calls are open in history also leaves the execution pending, with only the
|
|
104
104
|
waits whose effect never started in `requests`; resume it once the journal is readable, or abandon
|
|
105
|
-
it. A failure after its rounds settled ends it like an ordinary turn.
|
|
105
|
+
it. A failure after its rounds settled ends it like an ordinary turn once its configured checkpoint accepts the settled snapshot.
|
|
106
106
|
`abandonPendingExecution(executionId)` gives it up without running anything: its open tool calls
|
|
107
107
|
are closed as failed in this Session's history and this Session can no longer resume it, but the
|
|
108
108
|
journal is left untouched. Discard that execution's journal records yourself; otherwise a Session
|
|
@@ -115,6 +115,47 @@ reconciliation error rather than being replayed. Turn-level lifecycle hooks are
|
|
|
115
115
|
continuation because their effects lack durable receipts; structured-output recovery is unsupported.
|
|
116
116
|
This API alone does not provide arbitrary-effect recovery or durable Roundtable execution.
|
|
117
117
|
|
|
118
|
+
### Save and reconstruct a pending conversation
|
|
119
|
+
|
|
120
|
+
Use `getConversationSnapshot()` to capture messages and pending discovery together. A configured
|
|
121
|
+
`sessionStore` does this automatically; framework persistence uses the same projection. Restore the
|
|
122
|
+
complete saved record into a pristine Session with the same ID and canonical workspace:
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
const loaded = store.load(session.getSessionId());
|
|
126
|
+
if (loaded.status === 'valid') {
|
|
127
|
+
// Construct restoredSession with loaded.record.id and loaded.record.cwd first.
|
|
128
|
+
restoredSession.restoreConversation(loaded.record);
|
|
129
|
+
const pending = restoredSession.getPendingExecution();
|
|
130
|
+
// New input is refused until the host resumes this exact execution with its journal,
|
|
131
|
+
// or calls restoredSession.abandonPendingExecution(pending.executionId).
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Saved requests are discovery only. They do not retain consent, live resolvers, provider objects or
|
|
136
|
+
proof that an effect never started. Abandoning restored discovery records unknown outcomes.
|
|
137
|
+
|
|
138
|
+
`checkpointHistory?: () => void` takes precedence over the lower Session store. Its successful return
|
|
139
|
+
must synchronously acknowledge the complete current snapshot; store ports obey the same rule.
|
|
140
|
+
Returned thenables are rejected and observed. A callback that secretly queues writes or omits pending
|
|
141
|
+
discovery is incompatible with this guarantee. Without a persistence sink, journal execution remains
|
|
142
|
+
process scoped; `checkpoint()` refuses to imply a saved snapshot.
|
|
143
|
+
|
|
144
|
+
A failed waiting save rejects instead of returning `waiting`. A failed settled or abandonment save
|
|
145
|
+
keeps admission blocked. Repair the sink and call `checkpoint(): void` to retry only the settled bytes;
|
|
146
|
+
it never repeats provider calls or effects. Repeating the same abandonment can retry its failed save
|
|
147
|
+
without duplicating receipts. Public conversation mutations remain blocked during unresolved recovery.
|
|
148
|
+
`abandonPendingExecution` retains its synchronous `void` signature and now throws when its configured
|
|
149
|
+
save cannot acknowledge closure. An original execution error remains primary if a secondary save fails.
|
|
150
|
+
|
|
151
|
+
Coordinated readers accept strict v1 and v2 envelopes; all new file/workspace/artifact writes use v2.
|
|
152
|
+
Older readers report v2 as unsupported and preserve its bytes, including settled records. Roll back
|
|
153
|
+
these packages together or retain a compatible reader; do not strip recovery fields or downgrade the
|
|
154
|
+
header. Available acknowledged snapshots carry this guarantee. Missing snapshots and history-only
|
|
155
|
+
replay cannot rediscover pending identity; marker-free legacy interrupted-call repair remains unchanged.
|
|
156
|
+
This does not add cross-process fencing, power-loss/fsync guarantees, arbitrary-effect recovery or
|
|
157
|
+
durable Roundtable execution. Unresolved forks and workspace copies are refused before destination writes.
|
|
158
|
+
|
|
118
159
|
## Features
|
|
119
160
|
|
|
120
161
|
| Feature | Description |
|
|
@@ -161,7 +202,7 @@ This API alone does not provide arbitrary-effect recovery or durable Roundtable
|
|
|
161
202
|
|
|
162
203
|
| Export | Kind | Description |
|
|
163
204
|
| ------------------------------------------------------------------------------------------------------------ | ------------------- | ---------------------------------------------------------------------------------------- |
|
|
164
|
-
| `Session` | Class | Wraps `ConversationAgent` with permissions, hooks, compaction, logging and persistence
|
|
205
|
+
| `Session` | Class | Wraps `ConversationAgent` with permissions, hooks, compaction, logging and persistence |
|
|
165
206
|
| `ISessionOptions`, `ISessionRunOptions`, `ISessionShutdownOptions` | Types | Constructor, run and shutdown options |
|
|
166
207
|
| `SessionBusyError`, `TurnClaim` | Classes | The refusal of a concurrent turn, and the identity of the running turn |
|
|
167
208
|
| `PermissionEnforcer` | Class | Tool permission checks, hook execution and output truncation |
|