@ellipsis-dev/sdk 0.1.0 → 0.2.1
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/index.d.ts +4 -3
- package/dist/index.js +10 -0
- package/dist/store/index.d.ts +15 -5
- package/dist/store/index.js +226 -51
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +1 -1
- package/dist/{types-BRE4NMnS.d.ts → types-CtvSTnzA.d.ts} +97 -14
- package/package.json +1 -1
- package/schema/frames.schema.json +2 -29
- package/schema/lifecycle.schema.json +505 -0
- package/schema/openapi.v1.json +181 -0
|
@@ -16,6 +16,23 @@ interface paths {
|
|
|
16
16
|
patch?: never;
|
|
17
17
|
trace?: never;
|
|
18
18
|
};
|
|
19
|
+
'/v1/sessions/{session_id}/executions': {
|
|
20
|
+
parameters: {
|
|
21
|
+
query?: never;
|
|
22
|
+
header?: never;
|
|
23
|
+
path?: never;
|
|
24
|
+
cookie?: never;
|
|
25
|
+
};
|
|
26
|
+
/** Get Agent Session Executions */
|
|
27
|
+
get: operations['get_agent_session_executions_v1_sessions__session_id__executions_get'];
|
|
28
|
+
put?: never;
|
|
29
|
+
post?: never;
|
|
30
|
+
delete?: never;
|
|
31
|
+
options?: never;
|
|
32
|
+
head?: never;
|
|
33
|
+
patch?: never;
|
|
34
|
+
trace?: never;
|
|
35
|
+
};
|
|
19
36
|
'/v1/sessions/{session_id}/messages': {
|
|
20
37
|
parameters: {
|
|
21
38
|
query?: never;
|
|
@@ -348,6 +365,14 @@ interface components {
|
|
|
348
365
|
* @enum {string}
|
|
349
366
|
*/
|
|
350
367
|
DefaultResolution: 'repo_default' | 'account_default' | 'none';
|
|
368
|
+
/**
|
|
369
|
+
* ExecutionStatus
|
|
370
|
+
* @description Per-execution status ladder (was AgentProcessStatus). Distinct from the
|
|
371
|
+
* session's durable `session_state` and from `agent_sessions.status`, which
|
|
372
|
+
* remains the atomic claim/dispatch guard.
|
|
373
|
+
* @enum {string}
|
|
374
|
+
*/
|
|
375
|
+
ExecutionStatus: 'running' | 'failed' | 'done';
|
|
351
376
|
/**
|
|
352
377
|
* GithubAccountSnippet
|
|
353
378
|
* @description Sometimes the GitHub API returns a user of github (can include bots)
|
|
@@ -380,6 +405,11 @@ interface components {
|
|
|
380
405
|
* @enum {string}
|
|
381
406
|
*/
|
|
382
407
|
Harness: 'claude_code';
|
|
408
|
+
/** ListSessionExecutionsResponse */
|
|
409
|
+
ListSessionExecutionsResponse: {
|
|
410
|
+
/** Executions */
|
|
411
|
+
executions: components['schemas']['SessionExecutionWire'][];
|
|
412
|
+
};
|
|
383
413
|
/** ListSessionRecordsResponse */
|
|
384
414
|
ListSessionRecordsResponse: {
|
|
385
415
|
/** Earliest Feed Seq */
|
|
@@ -476,6 +506,35 @@ interface components {
|
|
|
476
506
|
/** Message */
|
|
477
507
|
message: string;
|
|
478
508
|
};
|
|
509
|
+
/** SessionExecutionWire */
|
|
510
|
+
SessionExecutionWire: {
|
|
511
|
+
/** Agent Session Id */
|
|
512
|
+
agent_session_id: string;
|
|
513
|
+
/** Attempt Index */
|
|
514
|
+
attempt_index: number;
|
|
515
|
+
/**
|
|
516
|
+
* Created At
|
|
517
|
+
* Format: date-time
|
|
518
|
+
*/
|
|
519
|
+
created_at: string;
|
|
520
|
+
/** Execution Index */
|
|
521
|
+
execution_index: number;
|
|
522
|
+
/** Exit Status */
|
|
523
|
+
exit_status?: string | null;
|
|
524
|
+
/** Id */
|
|
525
|
+
id: string;
|
|
526
|
+
/** Model */
|
|
527
|
+
model?: string | null;
|
|
528
|
+
/** Query */
|
|
529
|
+
query?: string | null;
|
|
530
|
+
/** Resumed */
|
|
531
|
+
resumed: boolean;
|
|
532
|
+
status: components['schemas']['ExecutionStatus'];
|
|
533
|
+
/** System Prompt Append */
|
|
534
|
+
system_prompt_append?: string | null;
|
|
535
|
+
/** Wake Index */
|
|
536
|
+
wake_index: number;
|
|
537
|
+
};
|
|
479
538
|
/**
|
|
480
539
|
* SessionLiveness
|
|
481
540
|
* @description The durable conversation axis (backs the surfaced `session` field).
|
|
@@ -767,6 +826,39 @@ interface operations {
|
|
|
767
826
|
};
|
|
768
827
|
};
|
|
769
828
|
};
|
|
829
|
+
get_agent_session_executions_v1_sessions__session_id__executions_get: {
|
|
830
|
+
parameters: {
|
|
831
|
+
query?: never;
|
|
832
|
+
header?: {
|
|
833
|
+
'user-agent'?: string | null;
|
|
834
|
+
};
|
|
835
|
+
path: {
|
|
836
|
+
session_id: string;
|
|
837
|
+
};
|
|
838
|
+
cookie?: never;
|
|
839
|
+
};
|
|
840
|
+
requestBody?: never;
|
|
841
|
+
responses: {
|
|
842
|
+
/** @description Successful Response */
|
|
843
|
+
200: {
|
|
844
|
+
headers: {
|
|
845
|
+
[name: string]: unknown;
|
|
846
|
+
};
|
|
847
|
+
content: {
|
|
848
|
+
'application/json': components['schemas']['ListSessionExecutionsResponse'];
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
/** @description Validation Error */
|
|
852
|
+
422: {
|
|
853
|
+
headers: {
|
|
854
|
+
[name: string]: unknown;
|
|
855
|
+
};
|
|
856
|
+
content: {
|
|
857
|
+
'application/json': components['schemas']['HTTPValidationError'];
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
};
|
|
770
862
|
send_agent_session_message_v1_sessions__session_id__messages_post: {
|
|
771
863
|
parameters: {
|
|
772
864
|
query?: never;
|
|
@@ -876,9 +968,9 @@ interface operations {
|
|
|
876
968
|
}
|
|
877
969
|
|
|
878
970
|
/**
|
|
879
|
-
* One server-to-client frame of the Ellipsis session stream protocol
|
|
971
|
+
* One server-to-client frame of the Ellipsis session stream protocol v3 (WS /v1/sessions/{id}/stream?protocol=3). Clients MUST ignore frames with unknown `type` values — additive frames are not a protocol break.
|
|
880
972
|
*/
|
|
881
|
-
type SessionStreamFrame = SnapshotFrame | RecordsAppendFrame |
|
|
973
|
+
type SessionStreamFrame = SnapshotFrame | RecordsAppendFrame | SessionFrame | DeltaFrame | HeartbeatFrame | DoneFrame | ErrorFrame;
|
|
882
974
|
type AttributionType = 'github_user' | 'linear_user' | 'slack_user' | 'api_key';
|
|
883
975
|
type SessionMessageStatus = 'pending' | 'delivered';
|
|
884
976
|
type GithubAccountType = 'User' | 'Organization' | 'Bot' | 'Mannequin';
|
|
@@ -1123,17 +1215,6 @@ interface TurnTokensInfo {
|
|
|
1123
1215
|
input_tokens: number;
|
|
1124
1216
|
output_tokens: number;
|
|
1125
1217
|
}
|
|
1126
|
-
/**
|
|
1127
|
-
* LWW snapshot of the OPEN inbox slice: all PENDING rows plus rows that
|
|
1128
|
-
* flipped (delivered, re-pended) within this connection since the last frame.
|
|
1129
|
-
* Deliberately not the full message history — delivered rows render through
|
|
1130
|
-
* their transcript user-echo records; structural history stays on REST
|
|
1131
|
-
* /turns (§3.3).
|
|
1132
|
-
*/
|
|
1133
|
-
interface MessagesFrame {
|
|
1134
|
-
messages: SessionMessageWire[];
|
|
1135
|
-
type: 'messages';
|
|
1136
|
-
}
|
|
1137
1218
|
/**
|
|
1138
1219
|
* LWW snapshot of the enriched public session (§4.1) — the only way
|
|
1139
1220
|
* status/state/cost arrive. Resent whole on any field change.
|
|
@@ -1188,5 +1269,7 @@ type ListSessionRecordsResponse = components['schemas']['ListSessionRecordsRespo
|
|
|
1188
1269
|
type ListSessionTurnsResponse = components['schemas']['ListSessionTurnsResponse'];
|
|
1189
1270
|
type AgentTurn = components['schemas']['AgentTurn'];
|
|
1190
1271
|
type AgentTurnStatus = components['schemas']['AgentTurnStatus'];
|
|
1272
|
+
type ListSessionExecutionsResponse = components['schemas']['ListSessionExecutionsResponse'];
|
|
1273
|
+
type SessionExecutionWire = components['schemas']['SessionExecutionWire'];
|
|
1191
1274
|
|
|
1192
|
-
export type { AgentSessionWire as A, BudgetSource as B, DefaultResolution as D, ErrorFrame as E, GithubAccountSnippet as G, Harness as H, ListSessionRecordsResponse as L,
|
|
1275
|
+
export type { AgentSessionWire as A, BudgetSource as B, paths as C, DefaultResolution as D, ErrorFrame as E, GithubAccountSnippet as G, Harness as H, ListSessionRecordsResponse as L, ModelTokensInfo as M, ParentKind as P, RecordsAppendFrame as R, SessionMessageWire as S, TokensInfo as T, ListSessionTurnsResponse as a, ListSessionExecutionsResponse as b, AgentSessionExitStatus as c, AgentSessionPr as d, AgentSessionSource as e, AgentSessionStatus as f, AgentTurn as g, AgentTurnStatus as h, AttributionType as i, DeltaFrame as j, DoneFrame as k, GithubAccountType as l, HeartbeatFrame as m, SendSessionMessageRequest as n, SessionExecutionWire as o, SessionFrame as p, SessionLiveness as q, SessionMessageStatus as r, SessionRecordWire as s, SessionState as t, SessionStreamFrame as u, SessionSurface as v, SnapshotFrame as w, StreamFrame as x, TurnTokensInfo as y, components as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ellipsis-dev/sdk",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
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",
|
|
@@ -757,30 +757,6 @@
|
|
|
757
757
|
"title": "HeartbeatFrame",
|
|
758
758
|
"type": "object"
|
|
759
759
|
},
|
|
760
|
-
"MessagesFrame": {
|
|
761
|
-
"description": "LWW snapshot of the OPEN inbox slice: all PENDING rows plus rows that\nflipped (delivered, re-pended) within this connection since the last frame.\nDeliberately not the full message history \u2014 delivered rows render through\ntheir transcript user-echo records; structural history stays on REST\n/turns (\u00a73.3).",
|
|
762
|
-
"properties": {
|
|
763
|
-
"messages": {
|
|
764
|
-
"items": {
|
|
765
|
-
"$ref": "#/$defs/SessionMessageWire"
|
|
766
|
-
},
|
|
767
|
-
"title": "Messages",
|
|
768
|
-
"type": "array"
|
|
769
|
-
},
|
|
770
|
-
"type": {
|
|
771
|
-
"const": "messages",
|
|
772
|
-
"default": "messages",
|
|
773
|
-
"title": "Type",
|
|
774
|
-
"type": "string"
|
|
775
|
-
}
|
|
776
|
-
},
|
|
777
|
-
"required": [
|
|
778
|
-
"messages",
|
|
779
|
-
"type"
|
|
780
|
-
],
|
|
781
|
-
"title": "MessagesFrame",
|
|
782
|
-
"type": "object"
|
|
783
|
-
},
|
|
784
760
|
"ModelTokensInfo": {
|
|
785
761
|
"properties": {
|
|
786
762
|
"cache_creation_input_tokens": {
|
|
@@ -1243,7 +1219,7 @@
|
|
|
1243
1219
|
"type": "array"
|
|
1244
1220
|
},
|
|
1245
1221
|
"protocol": {
|
|
1246
|
-
"default":
|
|
1222
|
+
"default": 3,
|
|
1247
1223
|
"title": "Protocol",
|
|
1248
1224
|
"type": "integer"
|
|
1249
1225
|
},
|
|
@@ -1396,7 +1372,7 @@
|
|
|
1396
1372
|
}
|
|
1397
1373
|
},
|
|
1398
1374
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1399
|
-
"description": "One server-to-client frame of the Ellipsis session stream protocol
|
|
1375
|
+
"description": "One server-to-client frame of the Ellipsis session stream protocol v3 (WS /v1/sessions/{id}/stream?protocol=3). Clients MUST ignore frames with unknown `type` values \u2014 additive frames are not a protocol break.",
|
|
1400
1376
|
"oneOf": [
|
|
1401
1377
|
{
|
|
1402
1378
|
"$ref": "#/$defs/SnapshotFrame"
|
|
@@ -1404,9 +1380,6 @@
|
|
|
1404
1380
|
{
|
|
1405
1381
|
"$ref": "#/$defs/RecordsAppendFrame"
|
|
1406
1382
|
},
|
|
1407
|
-
{
|
|
1408
|
-
"$ref": "#/$defs/MessagesFrame"
|
|
1409
|
-
},
|
|
1410
1383
|
{
|
|
1411
1384
|
"$ref": "#/$defs/SessionFrame"
|
|
1412
1385
|
},
|