@ellipsis-dev/sdk 0.2.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 CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AgentSessionWire, L as ListSessionRecordsResponse, a as ListSessionTurnsResponse, S as SessionMessageWire } from './types-F94JllmC.js';
2
- export { b as AgentSessionExitStatus, c as AgentSessionPr, d as AgentSessionSource, e as AgentSessionStatus, f as AgentTurn, g as AgentTurnStatus, h as AttributionType, B as BudgetSource, D as DefaultResolution, i as DeltaFrame, j as DoneFrame, E as ErrorFrame, G as GithubAccountSnippet, k as GithubAccountType, H as Harness, l as HeartbeatFrame, M as ModelTokensInfo, P as ParentKind, R as RecordsAppendFrame, m as SendSessionMessageRequest, n as SessionFrame, o as SessionLiveness, p as SessionMessageStatus, q as SessionRecordWire, r as SessionState, s as SessionStreamFrame, t as SessionSurface, u as SnapshotFrame, v as StreamFrame, T as TokensInfo, w as TurnTokensInfo, x as components, y as paths } from './types-F94JllmC.js';
1
+ import { A as AgentSessionWire, L as ListSessionRecordsResponse, a as ListSessionTurnsResponse, b as ListSessionExecutionsResponse, S as SessionMessageWire } from './types-CtvSTnzA.js';
2
+ export { c as AgentSessionExitStatus, d as AgentSessionPr, e as AgentSessionSource, f as AgentSessionStatus, g as AgentTurn, h as AgentTurnStatus, i as AttributionType, B as BudgetSource, D as DefaultResolution, j as DeltaFrame, k as DoneFrame, E as ErrorFrame, G as GithubAccountSnippet, l as GithubAccountType, H as Harness, m as HeartbeatFrame, M as ModelTokensInfo, P as ParentKind, R as RecordsAppendFrame, n as SendSessionMessageRequest, o as SessionExecutionWire, p as SessionFrame, q as SessionLiveness, r as SessionMessageStatus, s as SessionRecordWire, t as SessionState, u as SessionStreamFrame, v as SessionSurface, w as SnapshotFrame, x as StreamFrame, T as TokensInfo, y as TurnTokensInfo, z as components, C as paths } from './types-CtvSTnzA.js';
3
3
 
4
4
  type FetchJson = (path: string, init?: {
5
5
  method?: string;
@@ -14,9 +14,10 @@ declare class EllipsisClient {
14
14
  limit?: number;
15
15
  }): Promise<ListSessionRecordsResponse>;
16
16
  getSessionTurns(sessionId: string): Promise<ListSessionTurnsResponse>;
17
+ getSessionExecutions(sessionId: string): Promise<ListSessionExecutionsResponse>;
17
18
  sendSessionMessage(sessionId: string, message: string, options?: {
18
19
  idempotencyKey?: string;
19
20
  }): Promise<SessionMessageWire>;
20
21
  }
21
22
 
22
- export { AgentSessionWire, EllipsisClient, type FetchJson, ListSessionRecordsResponse, ListSessionTurnsResponse, SessionMessageWire };
23
+ export { AgentSessionWire, EllipsisClient, type FetchJson, ListSessionExecutionsResponse, ListSessionRecordsResponse, ListSessionTurnsResponse, SessionMessageWire };
package/dist/index.js CHANGED
@@ -30,6 +30,16 @@ var EllipsisClient = class {
30
30
  `/v1/sessions/${encodeURIComponent(sessionId)}/turns`
31
31
  );
32
32
  }
33
+ // The session's executions (initial start, cold wakes, infra retries) with
34
+ // their launch context: `system_prompt_append` is the text Ellipsis appends
35
+ // to Claude Code's default system prompt, alongside the initial query and
36
+ // model. Per execution because each cold wake persists its own launch
37
+ // config.
38
+ async getSessionExecutions(sessionId) {
39
+ return await this.fetchJson(
40
+ `/v1/sessions/${encodeURIComponent(sessionId)}/executions`
41
+ );
42
+ }
33
43
  // Send a message into the session's inbox (§4.2). Returns the created (or,
34
44
  // on an idempotent retry, the original) inbox row — clients key optimistic
35
45
  // echo chips on its id. `idempotencyKey` makes retries safe per
@@ -1,4 +1,4 @@
1
- import { q as SessionRecordWire, A as AgentSessionWire, S as SessionMessageWire, v as StreamFrame } from '../types-F94JllmC.js';
1
+ import { s as SessionRecordWire, A as AgentSessionWire, S as SessionMessageWire, x as StreamFrame } from '../types-CtvSTnzA.js';
2
2
 
3
3
  interface ChatToolNode {
4
4
  key: string;
@@ -1,4 +1,4 @@
1
- import { v as StreamFrame, A as AgentSessionWire } from '../types-F94JllmC.js';
1
+ import { x as StreamFrame, A as AgentSessionWire } from '../types-CtvSTnzA.js';
2
2
 
3
3
  declare const SESSION_STREAM_PROTOCOL_VERSION = 3;
4
4
  declare const WS_CLOSE_NORMAL = 1000;
@@ -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;
@@ -1177,5 +1269,7 @@ type ListSessionRecordsResponse = components['schemas']['ListSessionRecordsRespo
1177
1269
  type ListSessionTurnsResponse = components['schemas']['ListSessionTurnsResponse'];
1178
1270
  type AgentTurn = components['schemas']['AgentTurn'];
1179
1271
  type AgentTurnStatus = components['schemas']['AgentTurnStatus'];
1272
+ type ListSessionExecutionsResponse = components['schemas']['ListSessionExecutionsResponse'];
1273
+ type SessionExecutionWire = components['schemas']['SessionExecutionWire'];
1180
1274
 
1181
- export type { AgentSessionWire as A, BudgetSource as B, 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, AgentSessionExitStatus as b, AgentSessionPr as c, AgentSessionSource as d, AgentSessionStatus as e, AgentTurn as f, AgentTurnStatus as g, AttributionType as h, DeltaFrame as i, DoneFrame as j, GithubAccountType as k, HeartbeatFrame as l, SendSessionMessageRequest as m, SessionFrame as n, SessionLiveness as o, SessionMessageStatus as p, SessionRecordWire as q, SessionState as r, SessionStreamFrame as s, SessionSurface as t, SnapshotFrame as u, StreamFrame as v, TurnTokensInfo as w, components as x, paths as y };
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.2.0",
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",
@@ -733,6 +733,16 @@
733
733
  "title": "DefaultResolution",
734
734
  "type": "string"
735
735
  },
736
+ "ExecutionStatus": {
737
+ "description": "Per-execution status ladder (was AgentProcessStatus). Distinct from the\nsession's durable `session_state` and from `agent_sessions.status`, which\nremains the atomic claim/dispatch guard.",
738
+ "enum": [
739
+ "running",
740
+ "failed",
741
+ "done"
742
+ ],
743
+ "title": "ExecutionStatus",
744
+ "type": "string"
745
+ },
736
746
  "GithubAccountSnippet": {
737
747
  "description": "Sometimes the GitHub API returns a user of github (can include bots)\nusing this snippet instead of the full GithubAccount model. One example,\nis when the API returns a pull request.\n\nThis is the least amount of info we need to represent a GitHub account.",
738
748
  "properties": {
@@ -791,6 +801,22 @@
791
801
  "title": "Harness",
792
802
  "type": "string"
793
803
  },
804
+ "ListSessionExecutionsResponse": {
805
+ "properties": {
806
+ "executions": {
807
+ "items": {
808
+ "$ref": "#/components/schemas/SessionExecutionWire"
809
+ },
810
+ "title": "Executions",
811
+ "type": "array"
812
+ }
813
+ },
814
+ "required": [
815
+ "executions"
816
+ ],
817
+ "title": "ListSessionExecutionsResponse",
818
+ "type": "object"
819
+ },
794
820
  "ListSessionRecordsResponse": {
795
821
  "properties": {
796
822
  "earliest_feed_seq": {
@@ -947,6 +973,98 @@
947
973
  "title": "SendSessionMessageRequest",
948
974
  "type": "object"
949
975
  },
976
+ "SessionExecutionWire": {
977
+ "properties": {
978
+ "agent_session_id": {
979
+ "title": "Agent Session Id",
980
+ "type": "string"
981
+ },
982
+ "attempt_index": {
983
+ "title": "Attempt Index",
984
+ "type": "integer"
985
+ },
986
+ "created_at": {
987
+ "format": "date-time",
988
+ "title": "Created At",
989
+ "type": "string"
990
+ },
991
+ "execution_index": {
992
+ "title": "Execution Index",
993
+ "type": "integer"
994
+ },
995
+ "exit_status": {
996
+ "anyOf": [
997
+ {
998
+ "type": "string"
999
+ },
1000
+ {
1001
+ "type": "null"
1002
+ }
1003
+ ],
1004
+ "title": "Exit Status"
1005
+ },
1006
+ "id": {
1007
+ "title": "Id",
1008
+ "type": "string"
1009
+ },
1010
+ "model": {
1011
+ "anyOf": [
1012
+ {
1013
+ "type": "string"
1014
+ },
1015
+ {
1016
+ "type": "null"
1017
+ }
1018
+ ],
1019
+ "title": "Model"
1020
+ },
1021
+ "query": {
1022
+ "anyOf": [
1023
+ {
1024
+ "type": "string"
1025
+ },
1026
+ {
1027
+ "type": "null"
1028
+ }
1029
+ ],
1030
+ "title": "Query"
1031
+ },
1032
+ "resumed": {
1033
+ "title": "Resumed",
1034
+ "type": "boolean"
1035
+ },
1036
+ "status": {
1037
+ "$ref": "#/components/schemas/ExecutionStatus"
1038
+ },
1039
+ "system_prompt_append": {
1040
+ "anyOf": [
1041
+ {
1042
+ "type": "string"
1043
+ },
1044
+ {
1045
+ "type": "null"
1046
+ }
1047
+ ],
1048
+ "title": "System Prompt Append"
1049
+ },
1050
+ "wake_index": {
1051
+ "title": "Wake Index",
1052
+ "type": "integer"
1053
+ }
1054
+ },
1055
+ "required": [
1056
+ "id",
1057
+ "agent_session_id",
1058
+ "created_at",
1059
+ "execution_index",
1060
+ "wake_index",
1061
+ "attempt_index",
1062
+ "resumed",
1063
+ "status"
1064
+ ],
1065
+ "title": "SessionExecutionWire",
1066
+ "type": "object"
1067
+ },
950
1068
  "SessionLiveness": {
951
1069
  "description": "The durable conversation axis (backs the surfaced `session` field).",
952
1070
  "enum": [
@@ -1626,6 +1744,69 @@
1626
1744
  ]
1627
1745
  }
1628
1746
  },
1747
+ "/v1/sessions/{session_id}/executions": {
1748
+ "get": {
1749
+ "operationId": "get_agent_session_executions_v1_sessions__session_id__executions_get",
1750
+ "parameters": [
1751
+ {
1752
+ "in": "path",
1753
+ "name": "session_id",
1754
+ "required": true,
1755
+ "schema": {
1756
+ "title": "Session Id",
1757
+ "type": "string"
1758
+ }
1759
+ },
1760
+ {
1761
+ "in": "header",
1762
+ "name": "user-agent",
1763
+ "required": false,
1764
+ "schema": {
1765
+ "anyOf": [
1766
+ {
1767
+ "type": "string"
1768
+ },
1769
+ {
1770
+ "type": "null"
1771
+ }
1772
+ ],
1773
+ "title": "User-Agent"
1774
+ }
1775
+ }
1776
+ ],
1777
+ "responses": {
1778
+ "200": {
1779
+ "content": {
1780
+ "application/json": {
1781
+ "schema": {
1782
+ "$ref": "#/components/schemas/ListSessionExecutionsResponse"
1783
+ }
1784
+ }
1785
+ },
1786
+ "description": "Successful Response"
1787
+ },
1788
+ "422": {
1789
+ "content": {
1790
+ "application/json": {
1791
+ "schema": {
1792
+ "$ref": "#/components/schemas/HTTPValidationError"
1793
+ }
1794
+ }
1795
+ },
1796
+ "description": "Validation Error"
1797
+ }
1798
+ },
1799
+ "security": [
1800
+ {
1801
+ "HTTPBearer": []
1802
+ }
1803
+ ],
1804
+ "summary": "Get Agent Session Executions",
1805
+ "tags": [
1806
+ "v1"
1807
+ ]
1808
+ }
1809
+ },
1629
1810
  "/v1/sessions/{session_id}/messages": {
1630
1811
  "post": {
1631
1812
  "operationId": "send_agent_session_message_v1_sessions__session_id__messages_post",