@ellipsis-dev/sdk 0.30.0 → 0.31.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/README.md +4 -4
- package/dist/{chunk-K252XHLI.js → chunk-G2AEYZW2.js} +4 -8
- package/dist/index.d.ts +469 -529
- package/dist/index.js +244 -378
- package/dist/store/index.d.ts +24 -26
- package/dist/store/index.js +189 -277
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +1 -1
- package/dist/{types-DrPhhfOb.d.ts → types-BQxZcD0_.d.ts} +3133 -5348
- package/package.json +1 -1
- package/schema/collection_frames.schema.json +265 -248
- package/schema/frames.schema.json +3245 -5445
- package/schema/lifecycle.schema.json +182 -323
- package/schema/openapi.v1.json +3369 -6810
package/README.md
CHANGED
|
@@ -45,14 +45,14 @@ Web and CLI renderers can use `splitLedger(groupRecordsToChatTurns(records))`
|
|
|
45
45
|
and `entryBody(entry, { live, now, liveText, liveSummary })` from `@ellipsis-dev/sdk/store`.
|
|
46
46
|
`now` is epoch milliseconds. The returned `items` are the collapsed view:
|
|
47
47
|
one `isWorkFold(item)` section for progress, thinking and tools, with final
|
|
48
|
-
replies,
|
|
49
|
-
|
|
48
|
+
replies, turn outcome and closing notices kept visible.
|
|
49
|
+
`members.get(item.key)` contains
|
|
50
50
|
that section's rows; nested tool folds use the same map and `isToolFold`.
|
|
51
51
|
Renderers own expansion state and can recursively display the members.
|
|
52
52
|
|
|
53
53
|
The work key stays stable as records stream in and after replay. The live
|
|
54
|
-
label advances from `
|
|
55
|
-
the platform and native turn events arrive. While the agent works, the heading
|
|
54
|
+
label advances from `Preparing environment` to `Starting agent` to `Working`
|
|
55
|
+
as the platform and native turn events arrive. While the agent works, the heading
|
|
56
56
|
from `store.getSnapshot().liveSummary` replaces `Working` when available.
|
|
57
57
|
Pass the summary only to the entry being answered (`loading: true`, add a loading
|
|
58
58
|
indicator in the renderer). The returned `seconds` uses platform turn start
|
|
@@ -8,7 +8,7 @@ var WS_CLOSE_AUTH_FAILED = 1008;
|
|
|
8
8
|
var WS_CLOSE_SERVER_ERROR = 1011;
|
|
9
9
|
var WS_CLOSE_OVER_CAPACITY = 1013;
|
|
10
10
|
function sessionStatusWord(session) {
|
|
11
|
-
return session.
|
|
11
|
+
return session.turn?.status ?? "none";
|
|
12
12
|
}
|
|
13
13
|
var StreamUnavailableError = class extends Error {
|
|
14
14
|
constructor(message) {
|
|
@@ -136,7 +136,7 @@ async function streamSession(opts) {
|
|
|
136
136
|
let everReceivedFrame = false;
|
|
137
137
|
let attempt = 0;
|
|
138
138
|
let lastStatusWord = "";
|
|
139
|
-
let
|
|
139
|
+
let lastReason = null;
|
|
140
140
|
const emit = (frame) => {
|
|
141
141
|
everReceivedFrame = true;
|
|
142
142
|
attempt = 0;
|
|
@@ -150,7 +150,7 @@ async function streamSession(opts) {
|
|
|
150
150
|
} else if (frame.type === "snapshot" || frame.type === "session") {
|
|
151
151
|
const session = frame.session;
|
|
152
152
|
lastStatusWord = sessionStatusWord(session);
|
|
153
|
-
|
|
153
|
+
lastReason = session.turn?.reason ?? null;
|
|
154
154
|
}
|
|
155
155
|
opts.onFrame(frame);
|
|
156
156
|
};
|
|
@@ -171,11 +171,7 @@ async function streamSession(opts) {
|
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
173
|
if (res.kind === "done") {
|
|
174
|
-
return {
|
|
175
|
-
type: "done",
|
|
176
|
-
status: lastStatusWord,
|
|
177
|
-
exitStatus: lastExitStatus
|
|
178
|
-
};
|
|
174
|
+
return { type: "done", status: lastStatusWord, reason: lastReason };
|
|
179
175
|
}
|
|
180
176
|
if (res.kind === "frameError")
|
|
181
177
|
return { type: "error", message: res.message };
|