@ellipsis-dev/sdk 0.15.1 → 0.16.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/dist/chunk-RMPAMUAE.js +208 -0
- package/dist/index.d.ts +2 -2
- package/dist/store/index.d.ts +45 -2
- package/dist/store/index.js +318 -4
- package/dist/stream/index.d.ts +1 -1
- package/dist/stream/index.js +18 -189
- package/dist/{types-D9g-eZui.d.ts → types-DB1hOyQE.d.ts} +106 -98
- package/package.json +1 -1
- package/schema/frames.schema.json +172 -127
- package/schema/openapi.v1.json +167 -135
package/dist/stream/index.d.ts
CHANGED
package/dist/stream/index.js
CHANGED
|
@@ -1,192 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
var StreamAuthError = class extends Error {
|
|
20
|
-
constructor(message) {
|
|
21
|
-
super(message);
|
|
22
|
-
this.name = "StreamAuthError";
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
function streamQuery(afterSeq) {
|
|
26
|
-
const base = `protocol=${SESSION_STREAM_PROTOCOL_VERSION}`;
|
|
27
|
-
return afterSeq > 0 ? `${base}&after_seq=${afterSeq}` : base;
|
|
28
|
-
}
|
|
29
|
-
var HEARTBEAT_TIMEOUT_MS = 45e3;
|
|
30
|
-
var DEFAULT_MAX_RECONNECTS = 5;
|
|
31
|
-
function classifyCloseCode(code) {
|
|
32
|
-
switch (code) {
|
|
33
|
-
case WS_CLOSE_NORMAL:
|
|
34
|
-
return "normal";
|
|
35
|
-
case WS_CLOSE_AUTH_FAILED:
|
|
36
|
-
case 4401:
|
|
37
|
-
// dashboard ticket door: bad/expired ticket
|
|
38
|
-
case 4403:
|
|
39
|
-
return "auth";
|
|
40
|
-
case WS_CLOSE_UNSUPPORTED_PROTOCOL_VERSION:
|
|
41
|
-
case WS_CLOSE_NO_PROTOCOL:
|
|
42
|
-
return "unsupported";
|
|
43
|
-
default:
|
|
44
|
-
return "retry";
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function nextReconnectDelayMs(attempt) {
|
|
48
|
-
const base = 500;
|
|
49
|
-
const max = 8e3;
|
|
50
|
-
return Math.min(max, base * 2 ** Math.max(0, attempt - 1));
|
|
51
|
-
}
|
|
52
|
-
function decideReconnect(params) {
|
|
53
|
-
const { closeKind, everReceivedFrame, attempt, maxReconnects } = params;
|
|
54
|
-
if (closeKind === "auth") return { action: "fail-auth" };
|
|
55
|
-
if (closeKind === "unsupported") return { action: "fallback" };
|
|
56
|
-
const cap = everReceivedFrame ? maxReconnects : Math.min(2, maxReconnects);
|
|
57
|
-
if (attempt >= cap) return { action: "fallback" };
|
|
58
|
-
return { action: "reconnect", delayMs: nextReconnectDelayMs(attempt) };
|
|
59
|
-
}
|
|
60
|
-
function connectOnce(sock, emit, signal) {
|
|
61
|
-
return new Promise((resolve) => {
|
|
62
|
-
let settled = false;
|
|
63
|
-
let heartbeat;
|
|
64
|
-
const finish = (result) => {
|
|
65
|
-
if (settled) return;
|
|
66
|
-
settled = true;
|
|
67
|
-
if (heartbeat) clearTimeout(heartbeat);
|
|
68
|
-
if (signal) signal.removeEventListener("abort", onAbort);
|
|
69
|
-
sock.close();
|
|
70
|
-
resolve(result);
|
|
71
|
-
};
|
|
72
|
-
const onAbort = () => finish({ kind: "aborted" });
|
|
73
|
-
const bumpHeartbeat = () => {
|
|
74
|
-
if (heartbeat) clearTimeout(heartbeat);
|
|
75
|
-
heartbeat = setTimeout(
|
|
76
|
-
() => finish({ kind: "error", err: new Error("heartbeat timeout") }),
|
|
77
|
-
HEARTBEAT_TIMEOUT_MS
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
if (signal) {
|
|
81
|
-
if (signal.aborted) {
|
|
82
|
-
finish({ kind: "aborted" });
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
signal.addEventListener("abort", onAbort);
|
|
86
|
-
}
|
|
87
|
-
sock.onOpen(() => bumpHeartbeat());
|
|
88
|
-
sock.onMessage((data) => {
|
|
89
|
-
bumpHeartbeat();
|
|
90
|
-
let frame;
|
|
91
|
-
try {
|
|
92
|
-
frame = JSON.parse(data);
|
|
93
|
-
} catch {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
emit(frame);
|
|
97
|
-
if (frame.type === "done") {
|
|
98
|
-
finish({ kind: "done" });
|
|
99
|
-
} else if (frame.type === "error") {
|
|
100
|
-
finish({
|
|
101
|
-
kind: "frameError",
|
|
102
|
-
message: frame.message ?? "stream error"
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
sock.onClose((code) => finish({ kind: "closed", code }));
|
|
107
|
-
sock.onError((err) => finish({ kind: "error", err }));
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function sleep(ms, signal) {
|
|
111
|
-
return new Promise((resolve) => {
|
|
112
|
-
const timer = setTimeout(resolve, ms);
|
|
113
|
-
signal?.addEventListener(
|
|
114
|
-
"abort",
|
|
115
|
-
() => {
|
|
116
|
-
clearTimeout(timer);
|
|
117
|
-
resolve();
|
|
118
|
-
},
|
|
119
|
-
{ once: true }
|
|
120
|
-
);
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
async function streamSession(opts) {
|
|
124
|
-
const maxReconnects = opts.maxReconnects ?? DEFAULT_MAX_RECONNECTS;
|
|
125
|
-
let afterSeq = opts.afterSeq ?? 0;
|
|
126
|
-
let everReceivedFrame = false;
|
|
127
|
-
let attempt = 0;
|
|
128
|
-
let lastStatusWord = "";
|
|
129
|
-
let lastExitStatus = null;
|
|
130
|
-
const emit = (frame) => {
|
|
131
|
-
everReceivedFrame = true;
|
|
132
|
-
attempt = 0;
|
|
133
|
-
if (frame.type === "records_append") {
|
|
134
|
-
const records = frame.records;
|
|
135
|
-
for (const record of records) {
|
|
136
|
-
if (typeof record.feed_seq === "number") {
|
|
137
|
-
afterSeq = Math.max(afterSeq, record.feed_seq);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
} else if (frame.type === "snapshot" || frame.type === "session") {
|
|
141
|
-
const session = frame.session;
|
|
142
|
-
lastStatusWord = sessionStatusWord(session);
|
|
143
|
-
lastExitStatus = session.exit_status ?? null;
|
|
144
|
-
}
|
|
145
|
-
opts.onFrame(frame);
|
|
146
|
-
};
|
|
147
|
-
for (; ; ) {
|
|
148
|
-
if (opts.signal?.aborted) return { type: "aborted" };
|
|
149
|
-
let res;
|
|
150
|
-
try {
|
|
151
|
-
const sock = await opts.openSocket({
|
|
152
|
-
sessionId: opts.sessionId,
|
|
153
|
-
afterSeq,
|
|
154
|
-
query: streamQuery(afterSeq)
|
|
155
|
-
});
|
|
156
|
-
res = await connectOnce(sock, emit, opts.signal);
|
|
157
|
-
} catch (err) {
|
|
158
|
-
res = {
|
|
159
|
-
kind: "error",
|
|
160
|
-
err: err instanceof Error ? err : new Error(String(err))
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
if (res.kind === "done") {
|
|
164
|
-
return {
|
|
165
|
-
type: "done",
|
|
166
|
-
status: lastStatusWord,
|
|
167
|
-
exitStatus: lastExitStatus
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
if (res.kind === "frameError")
|
|
171
|
-
return { type: "error", message: res.message };
|
|
172
|
-
if (res.kind === "aborted") return { type: "aborted" };
|
|
173
|
-
attempt++;
|
|
174
|
-
const decision = decideReconnect({
|
|
175
|
-
closeKind: res.kind === "closed" ? classifyCloseCode(res.code) : void 0,
|
|
176
|
-
everReceivedFrame,
|
|
177
|
-
attempt,
|
|
178
|
-
maxReconnects
|
|
179
|
-
});
|
|
180
|
-
if (decision.action === "fail-auth") {
|
|
181
|
-
throw new StreamAuthError("not authorized to stream this session");
|
|
182
|
-
}
|
|
183
|
-
if (decision.action === "fallback") {
|
|
184
|
-
const why = res.kind === "error" ? res.err.message : `stream closed (code ${res.code})`;
|
|
185
|
-
throw new StreamUnavailableError(why);
|
|
186
|
-
}
|
|
187
|
-
await sleep(decision.delayMs ?? 0, opts.signal);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
SESSION_STREAM_PROTOCOL_VERSION,
|
|
3
|
+
StreamAuthError,
|
|
4
|
+
StreamUnavailableError,
|
|
5
|
+
WS_CLOSE_AUTH_FAILED,
|
|
6
|
+
WS_CLOSE_GOING_AWAY,
|
|
7
|
+
WS_CLOSE_NORMAL,
|
|
8
|
+
WS_CLOSE_NO_PROTOCOL,
|
|
9
|
+
WS_CLOSE_OVER_CAPACITY,
|
|
10
|
+
WS_CLOSE_SERVER_ERROR,
|
|
11
|
+
WS_CLOSE_UNSUPPORTED_PROTOCOL_VERSION,
|
|
12
|
+
classifyCloseCode,
|
|
13
|
+
decideReconnect,
|
|
14
|
+
nextReconnectDelayMs,
|
|
15
|
+
sessionStatusWord,
|
|
16
|
+
streamQuery,
|
|
17
|
+
streamSession
|
|
18
|
+
} from "../chunk-RMPAMUAE.js";
|
|
190
19
|
export {
|
|
191
20
|
SESSION_STREAM_PROTOCOL_VERSION,
|
|
192
21
|
StreamAuthError,
|
|
@@ -4625,16 +4625,13 @@ interface components {
|
|
|
4625
4625
|
* @description The session execution that produced the record, or null for session-scoped lifecycle records.
|
|
4626
4626
|
*/
|
|
4627
4627
|
execution_id?: string | null;
|
|
4628
|
+
/** @description What the session did to git, per repository, so a result row can show what it shipped without fetching the session. */
|
|
4629
|
+
git?: components['schemas']['SessionGit'] | null;
|
|
4628
4630
|
/**
|
|
4629
4631
|
* Id
|
|
4630
4632
|
* @description The matching record's unique identifier.
|
|
4631
4633
|
*/
|
|
4632
4634
|
id: string;
|
|
4633
|
-
/**
|
|
4634
|
-
* Output Prs
|
|
4635
|
-
* @description Pull requests the session created, so a result row can show what it shipped without fetching the session.
|
|
4636
|
-
*/
|
|
4637
|
-
output_prs?: components['schemas']['SessionPr'][] | null;
|
|
4638
4635
|
/**
|
|
4639
4636
|
* Record Type
|
|
4640
4637
|
* @description The record's event type.
|
|
@@ -5977,6 +5974,8 @@ interface components {
|
|
|
5977
5974
|
created_at: string;
|
|
5978
5975
|
/** @description How the session ended; null until it is terminal. */
|
|
5979
5976
|
exit_status?: components['schemas']['SessionExitStatus'] | null;
|
|
5977
|
+
/** @description What the session did to git, one entry per repository in its workspace: the commit and branch it sits on, per-file line counts for its uncommitted changes, and the pull requests it opened. Null if nothing was ever captured. */
|
|
5978
|
+
git?: components['schemas']['SessionGit'] | null;
|
|
5980
5979
|
/** @description The coding-agent harness the session runs on. */
|
|
5981
5980
|
harness: components['schemas']['Harness'];
|
|
5982
5981
|
/**
|
|
@@ -6002,13 +6001,6 @@ interface components {
|
|
|
6002
6001
|
metadata: {
|
|
6003
6002
|
[key: string]: string;
|
|
6004
6003
|
};
|
|
6005
|
-
/** @description Per-file line counts for the uncommitted changes in the session's workspace. Work the session committed is not included here — see output_prs. Null if no diff was ever captured. */
|
|
6006
|
-
output_diff?: components['schemas']['SessionDiff'] | null;
|
|
6007
|
-
/**
|
|
6008
|
-
* Output Prs
|
|
6009
|
-
* @description Pull requests the session created or updated.
|
|
6010
|
-
*/
|
|
6011
|
-
output_prs?: components['schemas']['SessionPr'][] | null;
|
|
6012
6004
|
/** @description What preceded this session, if anything. */
|
|
6013
6005
|
parent?: components['schemas']['SessionParent'];
|
|
6014
6006
|
/**
|
|
@@ -6147,37 +6139,6 @@ interface components {
|
|
|
6147
6139
|
*/
|
|
6148
6140
|
total: number;
|
|
6149
6141
|
};
|
|
6150
|
-
/**
|
|
6151
|
-
* SessionDiff
|
|
6152
|
-
* @description The counts half of a session's working-tree diff, small enough to ride on
|
|
6153
|
-
* agent_sessions and be returned by every session read. The patch text lives
|
|
6154
|
-
* in `agent_session_diffs` and is fetched on demand.
|
|
6155
|
-
*
|
|
6156
|
-
* Scope is UNCOMMITTED work only (`git diff HEAD`), so this answers "is there
|
|
6157
|
-
* unlanded work in this sandbox?" — a session that committed and pushed shows
|
|
6158
|
-
* no files here and its created PR instead.
|
|
6159
|
-
*/
|
|
6160
|
-
SessionDiff: {
|
|
6161
|
-
/** Files */
|
|
6162
|
-
files: components['schemas']['SessionDiffFile'][];
|
|
6163
|
-
};
|
|
6164
|
-
/**
|
|
6165
|
-
* SessionDiffFile
|
|
6166
|
-
* @description One file's uncommitted change in a session's sandbox, as `git diff HEAD`
|
|
6167
|
-
* --numstat reports it (with intent-to-add so new files count).
|
|
6168
|
-
*/
|
|
6169
|
-
SessionDiffFile: {
|
|
6170
|
-
/** Additions */
|
|
6171
|
-
additions: number;
|
|
6172
|
-
/** Deletions */
|
|
6173
|
-
deletions: number;
|
|
6174
|
-
/** Path */
|
|
6175
|
-
path: string;
|
|
6176
|
-
/** Repo */
|
|
6177
|
-
repo: string;
|
|
6178
|
-
/** Status */
|
|
6179
|
-
status: string;
|
|
6180
|
-
};
|
|
6181
6142
|
/**
|
|
6182
6143
|
* SessionExecution
|
|
6183
6144
|
* @description One runtime attempt of a session — the initial start, a cold wake of a
|
|
@@ -6266,6 +6227,75 @@ interface components {
|
|
|
6266
6227
|
* @enum {string}
|
|
6267
6228
|
*/
|
|
6268
6229
|
SessionExitStatus: 'completed' | 'budget_hit' | 'payment_required' | 'tool_call_failed' | 'lifecycle_hook_failed' | 'missing_repo_access' | 'missing_token_permissions' | 'missing_sandbox_variables' | 'blocked' | 'contact_email_required' | 'cancelled' | 'interrupted' | 'error' | 'stopped';
|
|
6230
|
+
/**
|
|
6231
|
+
* SessionGit
|
|
6232
|
+
* @description Every repo the session touched. Small enough to ride on `agent_sessions`
|
|
6233
|
+
* and be returned by every session read.
|
|
6234
|
+
*/
|
|
6235
|
+
SessionGit: {
|
|
6236
|
+
/**
|
|
6237
|
+
* Repos
|
|
6238
|
+
* @default []
|
|
6239
|
+
*/
|
|
6240
|
+
repos: components['schemas']['SessionGitRepo'][];
|
|
6241
|
+
};
|
|
6242
|
+
/**
|
|
6243
|
+
* SessionGitFile
|
|
6244
|
+
* @description One file's uncommitted change, as `git diff HEAD --numstat` reports it
|
|
6245
|
+
* (with intent-to-add, so a brand-new file still counts).
|
|
6246
|
+
*/
|
|
6247
|
+
SessionGitFile: {
|
|
6248
|
+
/** Additions */
|
|
6249
|
+
additions: number;
|
|
6250
|
+
/** Deletions */
|
|
6251
|
+
deletions: number;
|
|
6252
|
+
/** Path */
|
|
6253
|
+
path: string;
|
|
6254
|
+
/** Status */
|
|
6255
|
+
status: string;
|
|
6256
|
+
};
|
|
6257
|
+
/**
|
|
6258
|
+
* SessionGitPr
|
|
6259
|
+
* @description A pull request the session opened in this repo, denormalized at capture
|
|
6260
|
+
* time so a surface renders a labeled link without joining gh_prs. Live PR
|
|
6261
|
+
* state (open/merged/closed) is not stored — read gh_prs where a view needs
|
|
6262
|
+
* it. The repo is the parent object, so it is not repeated here.
|
|
6263
|
+
*/
|
|
6264
|
+
SessionGitPr: {
|
|
6265
|
+
/** Gh Pr Id */
|
|
6266
|
+
gh_pr_id?: number | null;
|
|
6267
|
+
/** Number */
|
|
6268
|
+
number: number;
|
|
6269
|
+
/** Title */
|
|
6270
|
+
title?: string | null;
|
|
6271
|
+
/** Url */
|
|
6272
|
+
url: string;
|
|
6273
|
+
};
|
|
6274
|
+
/**
|
|
6275
|
+
* SessionGitRepo
|
|
6276
|
+
* @description One checkout in the session's sandbox and everything the session did to
|
|
6277
|
+
* it, split by whether it survived the sandbox.
|
|
6278
|
+
*/
|
|
6279
|
+
SessionGitRepo: {
|
|
6280
|
+
/** Full Name */
|
|
6281
|
+
full_name: string;
|
|
6282
|
+
/** Local Commit */
|
|
6283
|
+
local_commit?: string | null;
|
|
6284
|
+
/**
|
|
6285
|
+
* Local Uncommitted Files
|
|
6286
|
+
* @default []
|
|
6287
|
+
*/
|
|
6288
|
+
local_uncommitted_files: components['schemas']['SessionGitFile'][];
|
|
6289
|
+
/**
|
|
6290
|
+
* Prs
|
|
6291
|
+
* @default []
|
|
6292
|
+
*/
|
|
6293
|
+
prs: components['schemas']['SessionGitPr'][];
|
|
6294
|
+
/** Remote Branch */
|
|
6295
|
+
remote_branch?: string | null;
|
|
6296
|
+
/** Remote Commit */
|
|
6297
|
+
remote_commit?: string | null;
|
|
6298
|
+
};
|
|
6269
6299
|
/**
|
|
6270
6300
|
* SessionLiveness
|
|
6271
6301
|
* @description The durable conversation axis (backs the surfaced `session` field).
|
|
@@ -6400,25 +6430,6 @@ interface components {
|
|
|
6400
6430
|
*/
|
|
6401
6431
|
session_id?: string | null;
|
|
6402
6432
|
};
|
|
6403
|
-
/**
|
|
6404
|
-
* SessionPr
|
|
6405
|
-
* @description A pull request this session created, denormalized at capture time so
|
|
6406
|
-
* session surfaces render a labeled link without joining gh_prs. Live PR
|
|
6407
|
-
* state (open/merged/closed) is not stored here — read it from gh_prs where
|
|
6408
|
-
* a view needs it.
|
|
6409
|
-
*/
|
|
6410
|
-
SessionPr: {
|
|
6411
|
-
/** Gh Pr Id */
|
|
6412
|
-
gh_pr_id?: number | null;
|
|
6413
|
-
/** Number */
|
|
6414
|
-
number: number;
|
|
6415
|
-
/** Repo Full Name */
|
|
6416
|
-
repo_full_name: string;
|
|
6417
|
-
/** Title */
|
|
6418
|
-
title?: string | null;
|
|
6419
|
-
/** Url */
|
|
6420
|
-
url: string;
|
|
6421
|
-
};
|
|
6422
6433
|
/**
|
|
6423
6434
|
* SessionPrompting
|
|
6424
6435
|
* @description The prompt-affordance projection. `enabled` answers "would a send work",
|
|
@@ -10844,6 +10855,10 @@ interface Session {
|
|
|
10844
10855
|
* How the session ended; null until it is terminal.
|
|
10845
10856
|
*/
|
|
10846
10857
|
exit_status: SessionExitStatus | null;
|
|
10858
|
+
/**
|
|
10859
|
+
* What the session did to git, one entry per repository in its workspace: the commit and branch it sits on, per-file line counts for its uncommitted changes, and the pull requests it opened. Null if nothing was ever captured.
|
|
10860
|
+
*/
|
|
10861
|
+
git: SessionGit | null;
|
|
10847
10862
|
harness: Harness;
|
|
10848
10863
|
/**
|
|
10849
10864
|
* Unique identifier of the session.
|
|
@@ -10863,14 +10878,6 @@ interface Session {
|
|
|
10863
10878
|
metadata: {
|
|
10864
10879
|
[k: string]: string;
|
|
10865
10880
|
};
|
|
10866
|
-
/**
|
|
10867
|
-
* Per-file line counts for the uncommitted changes in the session's workspace. Work the session committed is not included here — see output_prs. Null if no diff was ever captured.
|
|
10868
|
-
*/
|
|
10869
|
-
output_diff: SessionDiff | null;
|
|
10870
|
-
/**
|
|
10871
|
-
* Pull requests the session created or updated.
|
|
10872
|
-
*/
|
|
10873
|
-
output_prs: SessionPr[] | null;
|
|
10874
10881
|
parent: SessionParent;
|
|
10875
10882
|
/**
|
|
10876
10883
|
* The per-session prompt the session was started with.
|
|
@@ -11380,38 +11387,43 @@ interface SessionCost {
|
|
|
11380
11387
|
total: number;
|
|
11381
11388
|
}
|
|
11382
11389
|
/**
|
|
11383
|
-
*
|
|
11384
|
-
*
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
+
* Every repo the session touched. Small enough to ride on `agent_sessions`
|
|
11391
|
+
* and be returned by every session read.
|
|
11392
|
+
*/
|
|
11393
|
+
interface SessionGit {
|
|
11394
|
+
repos: SessionGitRepo[];
|
|
11395
|
+
}
|
|
11396
|
+
/**
|
|
11397
|
+
* One checkout in the session's sandbox and everything the session did to
|
|
11398
|
+
* it, split by whether it survived the sandbox.
|
|
11390
11399
|
*/
|
|
11391
|
-
interface
|
|
11392
|
-
|
|
11400
|
+
interface SessionGitRepo {
|
|
11401
|
+
full_name: string;
|
|
11402
|
+
local_commit: string | null;
|
|
11403
|
+
local_uncommitted_files: SessionGitFile[];
|
|
11404
|
+
prs: SessionGitPr[];
|
|
11405
|
+
remote_branch: string | null;
|
|
11406
|
+
remote_commit: string | null;
|
|
11393
11407
|
}
|
|
11394
11408
|
/**
|
|
11395
|
-
* One file's uncommitted change
|
|
11396
|
-
*
|
|
11409
|
+
* One file's uncommitted change, as `git diff HEAD --numstat` reports it
|
|
11410
|
+
* (with intent-to-add, so a brand-new file still counts).
|
|
11397
11411
|
*/
|
|
11398
|
-
interface
|
|
11412
|
+
interface SessionGitFile {
|
|
11399
11413
|
additions: number;
|
|
11400
11414
|
deletions: number;
|
|
11401
11415
|
path: string;
|
|
11402
|
-
repo: string;
|
|
11403
11416
|
status: string;
|
|
11404
11417
|
}
|
|
11405
11418
|
/**
|
|
11406
|
-
* A pull request
|
|
11407
|
-
*
|
|
11408
|
-
* state (open/merged/closed) is not stored
|
|
11409
|
-
*
|
|
11419
|
+
* A pull request the session opened in this repo, denormalized at capture
|
|
11420
|
+
* time so a surface renders a labeled link without joining gh_prs. Live PR
|
|
11421
|
+
* state (open/merged/closed) is not stored — read gh_prs where a view needs
|
|
11422
|
+
* it. The repo is the parent object, so it is not repeated here.
|
|
11410
11423
|
*/
|
|
11411
|
-
interface
|
|
11424
|
+
interface SessionGitPr {
|
|
11412
11425
|
gh_pr_id: number | null;
|
|
11413
11426
|
number: number;
|
|
11414
|
-
repo_full_name: string;
|
|
11415
11427
|
url: string;
|
|
11416
11428
|
}
|
|
11417
11429
|
/**
|
|
@@ -12028,6 +12040,10 @@ interface Session1 {
|
|
|
12028
12040
|
* How the session ended; null until it is terminal.
|
|
12029
12041
|
*/
|
|
12030
12042
|
exit_status: SessionExitStatus | null;
|
|
12043
|
+
/**
|
|
12044
|
+
* What the session did to git, one entry per repository in its workspace: the commit and branch it sits on, per-file line counts for its uncommitted changes, and the pull requests it opened. Null if nothing was ever captured.
|
|
12045
|
+
*/
|
|
12046
|
+
git: SessionGit | null;
|
|
12031
12047
|
harness: Harness;
|
|
12032
12048
|
/**
|
|
12033
12049
|
* Unique identifier of the session.
|
|
@@ -12047,14 +12063,6 @@ interface Session1 {
|
|
|
12047
12063
|
metadata: {
|
|
12048
12064
|
[k: string]: string;
|
|
12049
12065
|
};
|
|
12050
|
-
/**
|
|
12051
|
-
* Per-file line counts for the uncommitted changes in the session's workspace. Work the session committed is not included here — see output_prs. Null if no diff was ever captured.
|
|
12052
|
-
*/
|
|
12053
|
-
output_diff: SessionDiff | null;
|
|
12054
|
-
/**
|
|
12055
|
-
* Pull requests the session created or updated.
|
|
12056
|
-
*/
|
|
12057
|
-
output_prs: SessionPr[] | null;
|
|
12058
12066
|
parent: SessionParent;
|
|
12059
12067
|
/**
|
|
12060
12068
|
* The per-session prompt the session was started with.
|
|
@@ -12187,4 +12195,4 @@ type ReviewRequester = components['schemas']['ReviewRequester'];
|
|
|
12187
12195
|
type ReviewFinding = components['schemas']['ReviewFinding'];
|
|
12188
12196
|
type Finding = ReviewFinding;
|
|
12189
12197
|
|
|
12190
|
-
export type { SessionResponse as $, AgentConfigSource as A, BudgetSource as B, ClaudeSessionRecord as C, DeltaFrame as D, ErrorFrame as E, Finding as F, GithubAccountSnippet as G, Harness as H, SdkUserRecord as I, SendSessionMessageRequest as J, Session as K, LifecycleSessionRecord as L, SessionExecution as M, SessionExecutionsListResponse as N, SessionExitStatus as O, ParentKind as P, SessionFrame as Q, RecordsAppendFrame as R, SdkAssistantRecord as S,
|
|
12198
|
+
export type { SessionResponse as $, AgentConfigSource as A, BudgetSource as B, ClaudeSessionRecord as C, DeltaFrame as D, ErrorFrame as E, Finding as F, GithubAccountSnippet as G, Harness as H, SdkUserRecord as I, SendSessionMessageRequest as J, Session as K, LifecycleSessionRecord as L, SessionExecution as M, SessionExecutionsListResponse as N, SessionExitStatus as O, ParentKind as P, SessionFrame as Q, RecordsAppendFrame as R, SdkAssistantRecord as S, SessionGit as T, SessionLiveness as U, SessionMessage as V, SessionMessageResponse as W, SessionMessageStatus as X, SessionPrompting as Y, SessionRecord as Z, SessionRecordsListResponse as _, AttributionType as a, SessionSource as a0, SessionState as a1, SessionStatus as a2, SessionStreamFrame as a3, SessionSurface as a4, SessionsListResponse as a5, SnapshotFrame as a6, StreamFrame as a7, TokensInfo as a8, paths as a9, CodexFileChangeItem as aa, CodexMcpToolCallItem as ab, CodexEvent as b, components as c, CodexItem as d, CodexSessionRecord as e, CreateReviewRequest as f, DoneFrame as g, GithubAccountType as h, HeartbeatFrame as i, PromptBlockedReason as j, ResolvedReviewScope as k, Review as l, ReviewConfiguration as m, ReviewCounters as n, ReviewFinding as o, ReviewRequester as p, ReviewScope as q, ReviewScopeKind as r, ReviewStage as s, ReviewedCommit as t, ReviewsListResponse as u, SdkContentBlock as v, SdkRateLimitRecord as w, SdkRecord as x, SdkResultRecord as y, SdkSystemRecord as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ellipsis-dev/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "TypeScript SDK for the Ellipsis agents platform: /v1 REST types + client, the session stream WebSocket client, and the session transcript store.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|