@ellipsis-dev/sdk 0.30.0 → 0.32.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.
@@ -1,150 +1,8 @@
1
1
  {
2
2
  "$defs": {
3
- "MessageDeliveredPayload": {
4
- "additionalProperties": true,
5
- "description": "message_delivered \u2014 a turn consumed the message.",
6
- "properties": {
7
- "message_id": {
8
- "title": "Message Id",
9
- "type": "string"
10
- },
11
- "turn_id": {
12
- "title": "Turn Id",
13
- "type": "string"
14
- }
15
- },
16
- "required": [
17
- "message_id",
18
- "turn_id"
19
- ],
20
- "title": "MessageDeliveredPayload",
21
- "type": "object"
22
- },
23
- "MessageReceivedPayload": {
3
+ "EnvironmentOutputPayload": {
24
4
  "additionalProperties": true,
25
- "description": "message_received \u2014 a message landed in the session inbox. Puts \"what\narrived, from whom, when\" in the downloadable log; the session_messages\nrow is the internal delivery projection.",
26
- "properties": {
27
- "author": {
28
- "anyOf": [
29
- {
30
- "type": "string"
31
- },
32
- {
33
- "type": "null"
34
- }
35
- ],
36
- "default": null,
37
- "title": "Author"
38
- },
39
- "body": {
40
- "title": "Body",
41
- "type": "string"
42
- },
43
- "closes_session": {
44
- "default": false,
45
- "title": "Closes Session",
46
- "type": "boolean"
47
- },
48
- "message_id": {
49
- "title": "Message Id",
50
- "type": "string"
51
- },
52
- "sender_attribution_id": {
53
- "anyOf": [
54
- {
55
- "type": "string"
56
- },
57
- {
58
- "type": "null"
59
- }
60
- ],
61
- "default": null,
62
- "title": "Sender Attribution Id"
63
- },
64
- "sender_attribution_type": {
65
- "anyOf": [
66
- {
67
- "type": "string"
68
- },
69
- {
70
- "type": "null"
71
- }
72
- ],
73
- "default": null,
74
- "title": "Sender Attribution Type"
75
- }
76
- },
77
- "required": [
78
- "message_id",
79
- "body"
80
- ],
81
- "title": "MessageReceivedPayload",
82
- "type": "object"
83
- },
84
- "MessageRequeuedPayload": {
85
- "additionalProperties": true,
86
- "description": "message_requeued \u2014 an errored turn returned the message to the inbox\n(at-least-once delivery; the next wake redelivers).",
87
- "properties": {
88
- "message_id": {
89
- "title": "Message Id",
90
- "type": "string"
91
- },
92
- "turn_id": {
93
- "title": "Turn Id",
94
- "type": "string"
95
- }
96
- },
97
- "required": [
98
- "message_id",
99
- "turn_id"
100
- ],
101
- "title": "MessageRequeuedPayload",
102
- "type": "object"
103
- },
104
- "OutboxCollectedPayload": {
105
- "additionalProperties": true,
106
- "description": "outbox_collected \u2014 the platform read a code_review session's\n/ellipsis/outbox/* at finalize (CODE_REVIEW_v3.md \u00a73). Carries both raw\nand parsed so the feed alone tells the whole delivery story; the\ncode_review_outbox table is the queryable projection of this record.",
107
- "properties": {
108
- "findings": {
109
- "default": [],
110
- "items": {
111
- "additionalProperties": true,
112
- "type": "object"
113
- },
114
- "title": "Findings",
115
- "type": "array"
116
- },
117
- "parse_errors": {
118
- "default": [],
119
- "items": {
120
- "additionalProperties": true,
121
- "type": "object"
122
- },
123
- "title": "Parse Errors",
124
- "type": "array"
125
- },
126
- "parser_version": {
127
- "title": "Parser Version",
128
- "type": "string"
129
- },
130
- "raw": {
131
- "additionalProperties": {
132
- "type": "string"
133
- },
134
- "default": {},
135
- "title": "Raw",
136
- "type": "object"
137
- }
138
- },
139
- "required": [
140
- "parser_version"
141
- ],
142
- "title": "OutboxCollectedPayload",
143
- "type": "object"
144
- },
145
- "SandboxOutputPayload": {
146
- "additionalProperties": true,
147
- "description": "sandbox_output \u2014 one chunk of provisioning/lifecycle-script output.\nMany fire per execution; `chunk` rides the idempotency key. These records\nARE the durable copy (archived into the session log's S3 segments), under\na high per-session cap + truncation marker.",
5
+ "description": "environment_output: one chunk of output from preparing the environment,\nincluding the customer's own hooks. Many fire per turn; `chunk` orders them\nwithin a step.",
148
6
  "properties": {
149
7
  "chunk": {
150
8
  "title": "Chunk",
@@ -184,12 +42,12 @@
184
42
  "chunk",
185
43
  "lines"
186
44
  ],
187
- "title": "SandboxOutputPayload",
45
+ "title": "EnvironmentOutputPayload",
188
46
  "type": "object"
189
47
  },
190
- "SandboxPhasePayload": {
48
+ "EnvironmentPhasePayload": {
191
49
  "additionalProperties": true,
192
- "description": "sandbox_phase \u2014 one transition of the provisioning state machine, so\nclients can narrate 'found a cached image' / 'cloning' / 'snapshotting'\nlive and locate failures. Phases are an OPEN vocabulary (SandboxPhase has\nthe known values); `detail` carries phase-specific extras additively\n(e.g. {\"cache_tier\": \"incremental\"} on image completion).",
50
+ "description": "environment_phase: one transition of environment preparation, so clients\ncan narrate progress live and locate failures. Phases are an OPEN\nvocabulary; `detail` carries phase-specific extras additively.",
193
51
  "properties": {
194
52
  "detail": {
195
53
  "anyOf": [
@@ -241,32 +99,24 @@
241
99
  "phase",
242
100
  "status"
243
101
  ],
244
- "title": "SandboxPhasePayload",
102
+ "title": "EnvironmentPhasePayload",
245
103
  "type": "object"
246
104
  },
247
- "SandboxReadyPayload": {
105
+ "EnvironmentReadyPayload": {
248
106
  "additionalProperties": true,
249
- "description": "sandbox_ready \u2014 the box is up and the harness is about to launch: the\nsummary anchor closing the provisioning story. cache_tier/phase_timings\nduplicate the sandboxes-row columns purely for rendering convenience \u2014 the\nrow is the authority (\u00a72).",
107
+ "description": "environment_ready: the environment is prepared and the agent is about\nto start.",
250
108
  "properties": {
251
- "cache_tier": {
109
+ "duration_ms": {
252
110
  "anyOf": [
253
111
  {
254
- "type": "string"
112
+ "type": "integer"
255
113
  },
256
114
  {
257
115
  "type": "null"
258
116
  }
259
117
  ],
260
118
  "default": null,
261
- "title": "Cache Tier"
262
- },
263
- "phase_timings": {
264
- "additionalProperties": {
265
- "type": "number"
266
- },
267
- "default": {},
268
- "title": "Phase Timings",
269
- "type": "object"
119
+ "title": "Duration Ms"
270
120
  },
271
121
  "repositories": {
272
122
  "items": {
@@ -279,96 +129,34 @@
279
129
  "required": [
280
130
  "repositories"
281
131
  ],
282
- "title": "SandboxReadyPayload",
283
- "type": "object"
284
- },
285
- "SandboxStartingPayload": {
286
- "additionalProperties": true,
287
- "description": "sandbox_starting \u2014 provisioning begins for this execution.",
288
- "properties": {
289
- "repositories": {
290
- "items": {
291
- "type": "string"
292
- },
293
- "title": "Repositories",
294
- "type": "array"
295
- }
296
- },
297
- "required": [
298
- "repositories"
299
- ],
300
- "title": "SandboxStartingPayload",
132
+ "title": "EnvironmentReadyPayload",
301
133
  "type": "object"
302
134
  },
303
- "SessionCancelledPayload": {
135
+ "MessageDeliveredPayload": {
304
136
  "additionalProperties": true,
305
- "description": "session_cancelled \u2014 a preflight gate cancelled the session before any\nsandbox existed. Session-scoped (no execution).",
137
+ "description": "message_delivered: the agent started on the message.",
306
138
  "properties": {
307
- "reason": {
308
- "title": "Reason",
139
+ "message_id": {
140
+ "title": "Message Id",
309
141
  "type": "string"
310
- }
311
- },
312
- "required": [
313
- "reason"
314
- ],
315
- "title": "SessionCancelledPayload",
316
- "type": "object"
317
- },
318
- "SessionClosedPayload": {
319
- "additionalProperties": true,
320
- "description": "session_closed \u2014 the conversation terminalized (closing event's final\nturn, or an ephemeral session's terminal).",
321
- "properties": {},
322
- "title": "SessionClosedPayload",
323
- "type": "object"
324
- },
325
- "SessionIdlePayload": {
326
- "additionalProperties": true,
327
- "description": "session_idle \u2014 the warm loop ended and the durable conversation is\nparked; the next message wakes it.",
328
- "properties": {},
329
- "title": "SessionIdlePayload",
330
- "type": "object"
331
- },
332
- "SessionResumedPayload": {
333
- "additionalProperties": true,
334
- "description": "session_resumed \u2014 a wake mounted the teardown snapshots and --resumed\nthe transcript. Its ABSENCE after a wake is the degraded-wake signal.",
335
- "properties": {
336
- "wake_index": {
337
- "title": "Wake Index",
338
- "type": "integer"
339
- }
340
- },
341
- "required": [
342
- "wake_index"
343
- ],
344
- "title": "SessionResumedPayload",
345
- "type": "object"
346
- },
347
- "SessionRetryingPayload": {
348
- "additionalProperties": true,
349
- "description": "session_retrying \u2014 a transient infra failure before the agent acted\nhanded the session back for another attempt (bounded).",
350
- "properties": {
351
- "attempt": {
352
- "title": "Attempt",
353
- "type": "integer"
354
142
  },
355
- "reason": {
356
- "title": "Reason",
143
+ "turn_id": {
144
+ "title": "Turn Id",
357
145
  "type": "string"
358
146
  }
359
147
  },
360
148
  "required": [
361
- "reason",
362
- "attempt"
149
+ "message_id",
150
+ "turn_id"
363
151
  ],
364
- "title": "SessionRetryingPayload",
152
+ "title": "MessageDeliveredPayload",
365
153
  "type": "object"
366
154
  },
367
- "SessionScheduledPayload": {
155
+ "MessageReceivedPayload": {
368
156
  "additionalProperties": true,
369
- "description": "session_scheduled \u2014 the session row exists and is queued for a worker.\nThe one session-scoped record emitted at creation (no execution yet).",
157
+ "description": "message_received: a message landed in the session inbox and its turn was\ncreated. `turn_id` is the turn that will answer it.",
370
158
  "properties": {
371
- "config_commit_sha": {
159
+ "author": {
372
160
  "anyOf": [
373
161
  {
374
162
  "type": "string"
@@ -378,9 +166,22 @@
378
166
  }
379
167
  ],
380
168
  "default": null,
381
- "title": "Config Commit Sha"
169
+ "title": "Author"
382
170
  },
383
- "config_name": {
171
+ "body": {
172
+ "title": "Body",
173
+ "type": "string"
174
+ },
175
+ "closes_session": {
176
+ "default": false,
177
+ "title": "Closes Session",
178
+ "type": "boolean"
179
+ },
180
+ "message_id": {
181
+ "title": "Message Id",
182
+ "type": "string"
183
+ },
184
+ "sender_attribution_id": {
384
185
  "anyOf": [
385
186
  {
386
187
  "type": "string"
@@ -390,43 +191,95 @@
390
191
  }
391
192
  ],
392
193
  "default": null,
393
- "title": "Config Name"
194
+ "title": "Sender Attribution Id"
394
195
  },
395
- "source": {
396
- "title": "Source",
397
- "type": "string"
196
+ "sender_attribution_type": {
197
+ "anyOf": [
198
+ {
199
+ "type": "string"
200
+ },
201
+ {
202
+ "type": "null"
203
+ }
204
+ ],
205
+ "default": null,
206
+ "title": "Sender Attribution Type"
207
+ },
208
+ "turn_id": {
209
+ "anyOf": [
210
+ {
211
+ "type": "string"
212
+ },
213
+ {
214
+ "type": "null"
215
+ }
216
+ ],
217
+ "default": null,
218
+ "title": "Turn Id"
398
219
  }
399
220
  },
400
221
  "required": [
401
- "source"
222
+ "message_id",
223
+ "body"
402
224
  ],
403
- "title": "SessionScheduledPayload",
225
+ "title": "MessageReceivedPayload",
404
226
  "type": "object"
405
227
  },
406
- "SessionStartingPayload": {
228
+ "MessageRequeuedPayload": {
407
229
  "additionalProperties": true,
408
- "description": "session_starting \u2014 a worker claimed the session and preflight passed.\nEmitted on EVERY claim; clients render wake_index > 0 as a wake.",
230
+ "description": "message_requeued: a turn was interrupted before answering, so the\nmessage goes back to the inbox with a new pending turn.",
409
231
  "properties": {
410
- "attempt": {
411
- "title": "Attempt",
412
- "type": "integer"
232
+ "message_id": {
233
+ "title": "Message Id",
234
+ "type": "string"
413
235
  },
414
- "wake_index": {
415
- "title": "Wake Index",
416
- "type": "integer"
236
+ "requeued_turn_id": {
237
+ "anyOf": [
238
+ {
239
+ "type": "string"
240
+ },
241
+ {
242
+ "type": "null"
243
+ }
244
+ ],
245
+ "default": null,
246
+ "title": "Requeued Turn Id"
247
+ },
248
+ "turn_id": {
249
+ "title": "Turn Id",
250
+ "type": "string"
417
251
  }
418
252
  },
419
253
  "required": [
420
- "attempt",
421
- "wake_index"
254
+ "message_id",
255
+ "turn_id"
422
256
  ],
423
- "title": "SessionStartingPayload",
257
+ "title": "MessageRequeuedPayload",
258
+ "type": "object"
259
+ },
260
+ "SessionClosedPayload": {
261
+ "additionalProperties": true,
262
+ "description": "session_closed: the conversation closed permanently.",
263
+ "properties": {},
264
+ "title": "SessionClosedPayload",
424
265
  "type": "object"
425
266
  },
426
- "TurnCompletedPayload": {
267
+ "TurnEndedPayload": {
427
268
  "additionalProperties": true,
428
- "description": "turn_completed \u2014 the turn's result event closed it.",
269
+ "description": "turn_ended: the turn reached its final status. `status`, `reason`, and\n`detail` match the turn on the session object.",
429
270
  "properties": {
271
+ "detail": {
272
+ "anyOf": [
273
+ {
274
+ "type": "string"
275
+ },
276
+ {
277
+ "type": "null"
278
+ }
279
+ ],
280
+ "default": null,
281
+ "title": "Detail"
282
+ },
430
283
  "duration_ms": {
431
284
  "anyOf": [
432
285
  {
@@ -439,26 +292,22 @@
439
292
  "default": null,
440
293
  "title": "Duration Ms"
441
294
  },
442
- "turn_id": {
443
- "title": "Turn Id",
295
+ "reason": {
296
+ "anyOf": [
297
+ {
298
+ "type": "string"
299
+ },
300
+ {
301
+ "type": "null"
302
+ }
303
+ ],
304
+ "default": null,
305
+ "title": "Reason"
306
+ },
307
+ "status": {
308
+ "title": "Status",
444
309
  "type": "string"
445
310
  },
446
- "turn_index": {
447
- "title": "Turn Index",
448
- "type": "integer"
449
- }
450
- },
451
- "required": [
452
- "turn_id",
453
- "turn_index"
454
- ],
455
- "title": "TurnCompletedPayload",
456
- "type": "object"
457
- },
458
- "TurnFailedPayload": {
459
- "additionalProperties": true,
460
- "description": "turn_failed \u2014 the turn terminalized without completing (its consumed\nmessages requeue).",
461
- "properties": {
462
311
  "turn_id": {
463
312
  "title": "Turn Id",
464
313
  "type": "string"
@@ -470,14 +319,15 @@
470
319
  },
471
320
  "required": [
472
321
  "turn_id",
473
- "turn_index"
322
+ "turn_index",
323
+ "status"
474
324
  ],
475
- "title": "TurnFailedPayload",
325
+ "title": "TurnEndedPayload",
476
326
  "type": "object"
477
327
  },
478
328
  "TurnStartedPayload": {
479
329
  "additionalProperties": true,
480
- "description": "turn_started \u2014 a message-exchange began.",
330
+ "description": "turn_started: the agent started on the turn's message.",
481
331
  "properties": {
482
332
  "turn_id": {
483
333
  "title": "Turn Id",
@@ -497,8 +347,17 @@
497
347
  }
498
348
  },
499
349
  "$schema": "https://json-schema.org/draft/2020-12/schema",
500
- "description": "Payloads of source='lifecycle' session records, keyed by record_type. Contract (SESSION_LIFECYCLE_EVENTS.md \u00a72): payload changes are additive-only; clients MUST ignore unknown record types and unknown payload fields, and MUST render unknown phase/step/status values generically.",
350
+ "description": "Payloads of source='lifecycle' session records, keyed by record_type. Contract: payload changes are additive-only; clients MUST ignore unknown record types and unknown payload fields, and MUST render unknown phase/step/status values generically.",
501
351
  "properties": {
352
+ "environment_output": {
353
+ "$ref": "#/$defs/EnvironmentOutputPayload"
354
+ },
355
+ "environment_phase": {
356
+ "$ref": "#/$defs/EnvironmentPhasePayload"
357
+ },
358
+ "environment_ready": {
359
+ "$ref": "#/$defs/EnvironmentReadyPayload"
360
+ },
502
361
  "message_delivered": {
503
362
  "$ref": "#/$defs/MessageDeliveredPayload"
504
363
  },
@@ -508,70 +367,25 @@
508
367
  "message_requeued": {
509
368
  "$ref": "#/$defs/MessageRequeuedPayload"
510
369
  },
511
- "outbox_collected": {
512
- "$ref": "#/$defs/OutboxCollectedPayload"
513
- },
514
- "sandbox_output": {
515
- "$ref": "#/$defs/SandboxOutputPayload"
516
- },
517
- "sandbox_phase": {
518
- "$ref": "#/$defs/SandboxPhasePayload"
519
- },
520
- "sandbox_ready": {
521
- "$ref": "#/$defs/SandboxReadyPayload"
522
- },
523
- "sandbox_starting": {
524
- "$ref": "#/$defs/SandboxStartingPayload"
525
- },
526
- "session_cancelled": {
527
- "$ref": "#/$defs/SessionCancelledPayload"
528
- },
529
370
  "session_closed": {
530
371
  "$ref": "#/$defs/SessionClosedPayload"
531
372
  },
532
- "session_idle": {
533
- "$ref": "#/$defs/SessionIdlePayload"
534
- },
535
- "session_resumed": {
536
- "$ref": "#/$defs/SessionResumedPayload"
537
- },
538
- "session_retrying": {
539
- "$ref": "#/$defs/SessionRetryingPayload"
540
- },
541
- "session_scheduled": {
542
- "$ref": "#/$defs/SessionScheduledPayload"
543
- },
544
- "session_starting": {
545
- "$ref": "#/$defs/SessionStartingPayload"
546
- },
547
- "turn_completed": {
548
- "$ref": "#/$defs/TurnCompletedPayload"
549
- },
550
- "turn_failed": {
551
- "$ref": "#/$defs/TurnFailedPayload"
373
+ "turn_ended": {
374
+ "$ref": "#/$defs/TurnEndedPayload"
552
375
  },
553
376
  "turn_started": {
554
377
  "$ref": "#/$defs/TurnStartedPayload"
555
378
  }
556
379
  },
557
380
  "required": [
381
+ "environment_output",
382
+ "environment_phase",
383
+ "environment_ready",
558
384
  "message_delivered",
559
385
  "message_received",
560
386
  "message_requeued",
561
- "outbox_collected",
562
- "sandbox_output",
563
- "sandbox_phase",
564
- "sandbox_ready",
565
- "sandbox_starting",
566
- "session_cancelled",
567
387
  "session_closed",
568
- "session_idle",
569
- "session_resumed",
570
- "session_retrying",
571
- "session_scheduled",
572
- "session_starting",
573
- "turn_completed",
574
- "turn_failed",
388
+ "turn_ended",
575
389
  "turn_started"
576
390
  ],
577
391
  "title": "LifecyclePayloads",