@opencode-ai/schema 0.0.0-next-15028 → 0.0.0-next-15032
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/durable-event-manifest.d.ts +108 -0
- package/dist/event-manifest.d.ts +216 -0
- package/dist/session-event.d.ts +578 -34
- package/dist/session-event.js +14 -1
- package/dist/session-input.d.ts +382 -0
- package/dist/session-input.js +13 -0
- package/dist/session-message.d.ts +2 -0
- package/dist/session-message.js +1 -0
- package/package.json +1 -1
package/dist/session-event.js
CHANGED
|
@@ -370,6 +370,14 @@ export const RetryScheduled = Event.durable({
|
|
|
370
370
|
});
|
|
371
371
|
export var Compaction;
|
|
372
372
|
(function (Compaction) {
|
|
373
|
+
Compaction.Admitted = Event.durable({
|
|
374
|
+
type: "session.compaction.admitted",
|
|
375
|
+
...options,
|
|
376
|
+
schema: {
|
|
377
|
+
...Base,
|
|
378
|
+
inputID: SessionMessage.ID,
|
|
379
|
+
},
|
|
380
|
+
});
|
|
373
381
|
Compaction.Started = Event.durable({
|
|
374
382
|
type: "session.compaction.started",
|
|
375
383
|
...options,
|
|
@@ -395,6 +403,11 @@ export var Compaction;
|
|
|
395
403
|
recent: Schema.String,
|
|
396
404
|
},
|
|
397
405
|
});
|
|
406
|
+
Compaction.Failed = Event.durable({
|
|
407
|
+
type: "session.compaction.failed",
|
|
408
|
+
...options,
|
|
409
|
+
schema: Base,
|
|
410
|
+
});
|
|
398
411
|
})(Compaction || (Compaction = {}));
|
|
399
412
|
export var RevertEvent;
|
|
400
413
|
(function (RevertEvent) {
|
|
@@ -410,7 +423,7 @@ export var RevertEvent;
|
|
|
410
423
|
schema: { ...Base, to: SessionMessage.ID },
|
|
411
424
|
});
|
|
412
425
|
})(RevertEvent || (RevertEvent = {}));
|
|
413
|
-
export const Definitions = Event.inventory(AgentSelected, ModelSelected, Moved, Renamed, Deleted, Forked, PromptPromoted, PromptAdmitted, Execution.Started, Execution.Succeeded, Execution.Failed, Execution.Interrupted, InstructionsUpdated, Synthetic, Skill.Activated, Shell.Started, Shell.Ended, Step.Started, Step.Ended, Step.Failed, Text.Started, Text.Delta, Text.Ended, Reasoning.Started, Reasoning.Delta, Reasoning.Ended, Tool.Input.Started, Tool.Input.Delta, Tool.Input.Ended, Tool.Called, Tool.Progress, Tool.Success, Tool.Failed, RetryScheduled, Compaction.Started, Compaction.Delta, Compaction.Ended, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
|
|
426
|
+
export const Definitions = Event.inventory(AgentSelected, ModelSelected, Moved, Renamed, Deleted, Forked, PromptPromoted, PromptAdmitted, Execution.Started, Execution.Succeeded, Execution.Failed, Execution.Interrupted, InstructionsUpdated, Synthetic, Skill.Activated, Shell.Started, Shell.Ended, Step.Started, Step.Ended, Step.Failed, Text.Started, Text.Delta, Text.Ended, Reasoning.Started, Reasoning.Delta, Reasoning.Ended, Tool.Input.Started, Tool.Input.Delta, Tool.Input.Ended, Tool.Called, Tool.Progress, Tool.Success, Tool.Failed, RetryScheduled, Compaction.Admitted, Compaction.Started, Compaction.Delta, Compaction.Ended, Compaction.Failed, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
|
|
414
427
|
export const DurableDefinitions = Event.inventory(...Definitions.filter((definition) => definition.durability === "durable"));
|
|
415
428
|
export const Durable = Schema.Union(DurableDefinitions, { mode: "oneOf" })
|
|
416
429
|
.pipe(Schema.toTaggedUnion("type"))
|
package/dist/session-input.d.ts
CHANGED
|
@@ -180,3 +180,385 @@ export declare const Admitted: Schema.Struct<{
|
|
|
180
180
|
readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
181
181
|
readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
182
182
|
}>;
|
|
183
|
+
export interface PromptEntry extends Schema.Schema.Type<typeof PromptEntry> {
|
|
184
|
+
}
|
|
185
|
+
export declare const PromptEntry: Schema.Struct<{
|
|
186
|
+
readonly admittedSeq: Schema.Int;
|
|
187
|
+
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
188
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
189
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
190
|
+
};
|
|
191
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
192
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
193
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
194
|
+
};
|
|
195
|
+
readonly prompt: Schema.Struct<{
|
|
196
|
+
readonly text: Schema.String;
|
|
197
|
+
readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
198
|
+
readonly data: Schema.String;
|
|
199
|
+
readonly mime: Schema.String;
|
|
200
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
201
|
+
readonly type: Schema.Literal<"inline">;
|
|
202
|
+
}>, Schema.Struct<{
|
|
203
|
+
readonly type: Schema.Literal<"uri">;
|
|
204
|
+
readonly uri: Schema.String;
|
|
205
|
+
}>]>;
|
|
206
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
207
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
208
|
+
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
209
|
+
readonly start: Schema.Finite;
|
|
210
|
+
readonly end: Schema.Finite;
|
|
211
|
+
readonly text: Schema.String;
|
|
212
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
213
|
+
readonly start: Schema.Finite;
|
|
214
|
+
readonly end: Schema.Finite;
|
|
215
|
+
readonly text: Schema.String;
|
|
216
|
+
}>>, never, never>;
|
|
217
|
+
}> & {
|
|
218
|
+
create: (input: import("./prompt.js").FileAttachment) => {
|
|
219
|
+
readonly data: string;
|
|
220
|
+
readonly mime: string;
|
|
221
|
+
readonly source: {
|
|
222
|
+
readonly type: "inline";
|
|
223
|
+
} | {
|
|
224
|
+
readonly type: "uri";
|
|
225
|
+
readonly uri: string;
|
|
226
|
+
};
|
|
227
|
+
readonly name?: string | undefined;
|
|
228
|
+
readonly description?: string | undefined;
|
|
229
|
+
readonly mention?: {
|
|
230
|
+
readonly start: number;
|
|
231
|
+
readonly end: number;
|
|
232
|
+
readonly text: string;
|
|
233
|
+
} | undefined;
|
|
234
|
+
};
|
|
235
|
+
}>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
236
|
+
readonly data: Schema.String;
|
|
237
|
+
readonly mime: Schema.String;
|
|
238
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
239
|
+
readonly type: Schema.Literal<"inline">;
|
|
240
|
+
}>, Schema.Struct<{
|
|
241
|
+
readonly type: Schema.Literal<"uri">;
|
|
242
|
+
readonly uri: Schema.String;
|
|
243
|
+
}>]>;
|
|
244
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
245
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
246
|
+
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
247
|
+
readonly start: Schema.Finite;
|
|
248
|
+
readonly end: Schema.Finite;
|
|
249
|
+
readonly text: Schema.String;
|
|
250
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
251
|
+
readonly start: Schema.Finite;
|
|
252
|
+
readonly end: Schema.Finite;
|
|
253
|
+
readonly text: Schema.String;
|
|
254
|
+
}>>, never, never>;
|
|
255
|
+
}> & {
|
|
256
|
+
create: (input: import("./prompt.js").FileAttachment) => {
|
|
257
|
+
readonly data: string;
|
|
258
|
+
readonly mime: string;
|
|
259
|
+
readonly source: {
|
|
260
|
+
readonly type: "inline";
|
|
261
|
+
} | {
|
|
262
|
+
readonly type: "uri";
|
|
263
|
+
readonly uri: string;
|
|
264
|
+
};
|
|
265
|
+
readonly name?: string | undefined;
|
|
266
|
+
readonly description?: string | undefined;
|
|
267
|
+
readonly mention?: {
|
|
268
|
+
readonly start: number;
|
|
269
|
+
readonly end: number;
|
|
270
|
+
readonly text: string;
|
|
271
|
+
} | undefined;
|
|
272
|
+
};
|
|
273
|
+
}>>, never, never>;
|
|
274
|
+
readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
275
|
+
readonly name: Schema.String;
|
|
276
|
+
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
277
|
+
readonly start: Schema.Finite;
|
|
278
|
+
readonly end: Schema.Finite;
|
|
279
|
+
readonly text: Schema.String;
|
|
280
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
281
|
+
readonly start: Schema.Finite;
|
|
282
|
+
readonly end: Schema.Finite;
|
|
283
|
+
readonly text: Schema.String;
|
|
284
|
+
}>>, never, never>;
|
|
285
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
286
|
+
readonly name: Schema.String;
|
|
287
|
+
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
288
|
+
readonly start: Schema.Finite;
|
|
289
|
+
readonly end: Schema.Finite;
|
|
290
|
+
readonly text: Schema.String;
|
|
291
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
292
|
+
readonly start: Schema.Finite;
|
|
293
|
+
readonly end: Schema.Finite;
|
|
294
|
+
readonly text: Schema.String;
|
|
295
|
+
}>>, never, never>;
|
|
296
|
+
}>>>, never, never>;
|
|
297
|
+
}> & {
|
|
298
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
299
|
+
readonly text: string;
|
|
300
|
+
readonly files?: readonly {
|
|
301
|
+
readonly data: string;
|
|
302
|
+
readonly mime: string;
|
|
303
|
+
readonly source: {
|
|
304
|
+
readonly type: "inline";
|
|
305
|
+
} | {
|
|
306
|
+
readonly type: "uri";
|
|
307
|
+
readonly uri: string;
|
|
308
|
+
};
|
|
309
|
+
readonly name?: string | undefined;
|
|
310
|
+
readonly description?: string | undefined;
|
|
311
|
+
readonly mention?: {
|
|
312
|
+
readonly start: number;
|
|
313
|
+
readonly end: number;
|
|
314
|
+
readonly text: string;
|
|
315
|
+
} | undefined;
|
|
316
|
+
}[] | undefined;
|
|
317
|
+
readonly agents?: readonly {
|
|
318
|
+
readonly name: string;
|
|
319
|
+
readonly mention?: {
|
|
320
|
+
readonly start: number;
|
|
321
|
+
readonly end: number;
|
|
322
|
+
readonly text: string;
|
|
323
|
+
} | undefined;
|
|
324
|
+
}[] | undefined;
|
|
325
|
+
}>;
|
|
326
|
+
fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents">) => {
|
|
327
|
+
readonly text: string;
|
|
328
|
+
readonly files?: readonly {
|
|
329
|
+
readonly data: string;
|
|
330
|
+
readonly mime: string;
|
|
331
|
+
readonly source: {
|
|
332
|
+
readonly type: "inline";
|
|
333
|
+
} | {
|
|
334
|
+
readonly type: "uri";
|
|
335
|
+
readonly uri: string;
|
|
336
|
+
};
|
|
337
|
+
readonly name?: string | undefined;
|
|
338
|
+
readonly description?: string | undefined;
|
|
339
|
+
readonly mention?: {
|
|
340
|
+
readonly start: number;
|
|
341
|
+
readonly end: number;
|
|
342
|
+
readonly text: string;
|
|
343
|
+
} | undefined;
|
|
344
|
+
}[] | undefined;
|
|
345
|
+
readonly agents?: readonly {
|
|
346
|
+
readonly name: string;
|
|
347
|
+
readonly mention?: {
|
|
348
|
+
readonly start: number;
|
|
349
|
+
readonly end: number;
|
|
350
|
+
readonly text: string;
|
|
351
|
+
} | undefined;
|
|
352
|
+
}[] | undefined;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
|
|
356
|
+
readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
357
|
+
readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
358
|
+
readonly type: Schema.Literal<"prompt">;
|
|
359
|
+
}>;
|
|
360
|
+
export interface Compaction extends Schema.Schema.Type<typeof Compaction> {
|
|
361
|
+
}
|
|
362
|
+
export declare const Compaction: Schema.Struct<{
|
|
363
|
+
readonly type: Schema.Literal<"compaction">;
|
|
364
|
+
readonly admittedSeq: Schema.Int;
|
|
365
|
+
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
366
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
367
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
368
|
+
};
|
|
369
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
370
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
371
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
372
|
+
};
|
|
373
|
+
readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
374
|
+
readonly handledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
375
|
+
}>;
|
|
376
|
+
export declare const Entry: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
377
|
+
readonly admittedSeq: Schema.Int;
|
|
378
|
+
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
379
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
380
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
381
|
+
};
|
|
382
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
383
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
384
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
385
|
+
};
|
|
386
|
+
readonly prompt: Schema.Struct<{
|
|
387
|
+
readonly text: Schema.String;
|
|
388
|
+
readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
389
|
+
readonly data: Schema.String;
|
|
390
|
+
readonly mime: Schema.String;
|
|
391
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
392
|
+
readonly type: Schema.Literal<"inline">;
|
|
393
|
+
}>, Schema.Struct<{
|
|
394
|
+
readonly type: Schema.Literal<"uri">;
|
|
395
|
+
readonly uri: Schema.String;
|
|
396
|
+
}>]>;
|
|
397
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
398
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
399
|
+
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
400
|
+
readonly start: Schema.Finite;
|
|
401
|
+
readonly end: Schema.Finite;
|
|
402
|
+
readonly text: Schema.String;
|
|
403
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
404
|
+
readonly start: Schema.Finite;
|
|
405
|
+
readonly end: Schema.Finite;
|
|
406
|
+
readonly text: Schema.String;
|
|
407
|
+
}>>, never, never>;
|
|
408
|
+
}> & {
|
|
409
|
+
create: (input: import("./prompt.js").FileAttachment) => {
|
|
410
|
+
readonly data: string;
|
|
411
|
+
readonly mime: string;
|
|
412
|
+
readonly source: {
|
|
413
|
+
readonly type: "inline";
|
|
414
|
+
} | {
|
|
415
|
+
readonly type: "uri";
|
|
416
|
+
readonly uri: string;
|
|
417
|
+
};
|
|
418
|
+
readonly name?: string | undefined;
|
|
419
|
+
readonly description?: string | undefined;
|
|
420
|
+
readonly mention?: {
|
|
421
|
+
readonly start: number;
|
|
422
|
+
readonly end: number;
|
|
423
|
+
readonly text: string;
|
|
424
|
+
} | undefined;
|
|
425
|
+
};
|
|
426
|
+
}>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
427
|
+
readonly data: Schema.String;
|
|
428
|
+
readonly mime: Schema.String;
|
|
429
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
430
|
+
readonly type: Schema.Literal<"inline">;
|
|
431
|
+
}>, Schema.Struct<{
|
|
432
|
+
readonly type: Schema.Literal<"uri">;
|
|
433
|
+
readonly uri: Schema.String;
|
|
434
|
+
}>]>;
|
|
435
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
436
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
437
|
+
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
438
|
+
readonly start: Schema.Finite;
|
|
439
|
+
readonly end: Schema.Finite;
|
|
440
|
+
readonly text: Schema.String;
|
|
441
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
442
|
+
readonly start: Schema.Finite;
|
|
443
|
+
readonly end: Schema.Finite;
|
|
444
|
+
readonly text: Schema.String;
|
|
445
|
+
}>>, never, never>;
|
|
446
|
+
}> & {
|
|
447
|
+
create: (input: import("./prompt.js").FileAttachment) => {
|
|
448
|
+
readonly data: string;
|
|
449
|
+
readonly mime: string;
|
|
450
|
+
readonly source: {
|
|
451
|
+
readonly type: "inline";
|
|
452
|
+
} | {
|
|
453
|
+
readonly type: "uri";
|
|
454
|
+
readonly uri: string;
|
|
455
|
+
};
|
|
456
|
+
readonly name?: string | undefined;
|
|
457
|
+
readonly description?: string | undefined;
|
|
458
|
+
readonly mention?: {
|
|
459
|
+
readonly start: number;
|
|
460
|
+
readonly end: number;
|
|
461
|
+
readonly text: string;
|
|
462
|
+
} | undefined;
|
|
463
|
+
};
|
|
464
|
+
}>>, never, never>;
|
|
465
|
+
readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
466
|
+
readonly name: Schema.String;
|
|
467
|
+
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
468
|
+
readonly start: Schema.Finite;
|
|
469
|
+
readonly end: Schema.Finite;
|
|
470
|
+
readonly text: Schema.String;
|
|
471
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
472
|
+
readonly start: Schema.Finite;
|
|
473
|
+
readonly end: Schema.Finite;
|
|
474
|
+
readonly text: Schema.String;
|
|
475
|
+
}>>, never, never>;
|
|
476
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
477
|
+
readonly name: Schema.String;
|
|
478
|
+
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
479
|
+
readonly start: Schema.Finite;
|
|
480
|
+
readonly end: Schema.Finite;
|
|
481
|
+
readonly text: Schema.String;
|
|
482
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
483
|
+
readonly start: Schema.Finite;
|
|
484
|
+
readonly end: Schema.Finite;
|
|
485
|
+
readonly text: Schema.String;
|
|
486
|
+
}>>, never, never>;
|
|
487
|
+
}>>>, never, never>;
|
|
488
|
+
}> & {
|
|
489
|
+
equivalence: import("effect/Equivalence").Equivalence<{
|
|
490
|
+
readonly text: string;
|
|
491
|
+
readonly files?: readonly {
|
|
492
|
+
readonly data: string;
|
|
493
|
+
readonly mime: string;
|
|
494
|
+
readonly source: {
|
|
495
|
+
readonly type: "inline";
|
|
496
|
+
} | {
|
|
497
|
+
readonly type: "uri";
|
|
498
|
+
readonly uri: string;
|
|
499
|
+
};
|
|
500
|
+
readonly name?: string | undefined;
|
|
501
|
+
readonly description?: string | undefined;
|
|
502
|
+
readonly mention?: {
|
|
503
|
+
readonly start: number;
|
|
504
|
+
readonly end: number;
|
|
505
|
+
readonly text: string;
|
|
506
|
+
} | undefined;
|
|
507
|
+
}[] | undefined;
|
|
508
|
+
readonly agents?: readonly {
|
|
509
|
+
readonly name: string;
|
|
510
|
+
readonly mention?: {
|
|
511
|
+
readonly start: number;
|
|
512
|
+
readonly end: number;
|
|
513
|
+
readonly text: string;
|
|
514
|
+
} | undefined;
|
|
515
|
+
}[] | undefined;
|
|
516
|
+
}>;
|
|
517
|
+
fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents">) => {
|
|
518
|
+
readonly text: string;
|
|
519
|
+
readonly files?: readonly {
|
|
520
|
+
readonly data: string;
|
|
521
|
+
readonly mime: string;
|
|
522
|
+
readonly source: {
|
|
523
|
+
readonly type: "inline";
|
|
524
|
+
} | {
|
|
525
|
+
readonly type: "uri";
|
|
526
|
+
readonly uri: string;
|
|
527
|
+
};
|
|
528
|
+
readonly name?: string | undefined;
|
|
529
|
+
readonly description?: string | undefined;
|
|
530
|
+
readonly mention?: {
|
|
531
|
+
readonly start: number;
|
|
532
|
+
readonly end: number;
|
|
533
|
+
readonly text: string;
|
|
534
|
+
} | undefined;
|
|
535
|
+
}[] | undefined;
|
|
536
|
+
readonly agents?: readonly {
|
|
537
|
+
readonly name: string;
|
|
538
|
+
readonly mention?: {
|
|
539
|
+
readonly start: number;
|
|
540
|
+
readonly end: number;
|
|
541
|
+
readonly text: string;
|
|
542
|
+
} | undefined;
|
|
543
|
+
}[] | undefined;
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
|
|
547
|
+
readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
548
|
+
readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
549
|
+
readonly type: Schema.Literal<"prompt">;
|
|
550
|
+
}>, Schema.Struct<{
|
|
551
|
+
readonly type: Schema.Literal<"compaction">;
|
|
552
|
+
readonly admittedSeq: Schema.Int;
|
|
553
|
+
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
554
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
555
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
556
|
+
};
|
|
557
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
558
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
559
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
560
|
+
};
|
|
561
|
+
readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
562
|
+
readonly handledSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
563
|
+
}>]>;
|
|
564
|
+
export type Entry = typeof Entry.Type;
|
package/dist/session-input.js
CHANGED
|
@@ -16,3 +16,16 @@ export const Admitted = Schema.Struct({
|
|
|
16
16
|
timeCreated: DateTimeUtcFromMillis,
|
|
17
17
|
promotedSeq: NonNegativeInt.pipe(optional),
|
|
18
18
|
}).annotate({ identifier: "SessionInput.Admitted" });
|
|
19
|
+
export const PromptEntry = Schema.Struct({
|
|
20
|
+
type: Schema.Literal("prompt"),
|
|
21
|
+
...Admitted.fields,
|
|
22
|
+
}).annotate({ identifier: "SessionInput.PromptEntry" });
|
|
23
|
+
export const Compaction = Schema.Struct({
|
|
24
|
+
type: Schema.Literal("compaction"),
|
|
25
|
+
admittedSeq: NonNegativeInt,
|
|
26
|
+
id: SessionMessage.ID,
|
|
27
|
+
sessionID: SessionID,
|
|
28
|
+
timeCreated: DateTimeUtcFromMillis,
|
|
29
|
+
handledSeq: NonNegativeInt.pipe(optional),
|
|
30
|
+
}).annotate({ identifier: "SessionInput.Compaction" });
|
|
31
|
+
export const Entry = Schema.Union([PromptEntry, Compaction]).pipe(Schema.toTaggedUnion("type"));
|
|
@@ -1135,6 +1135,7 @@ export declare const Compaction: Schema.Struct<{
|
|
|
1135
1135
|
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
1136
1136
|
}>;
|
|
1137
1137
|
readonly type: Schema.Literal<"compaction">;
|
|
1138
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed"]>;
|
|
1138
1139
|
readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
|
|
1139
1140
|
readonly summary: Schema.String;
|
|
1140
1141
|
readonly recent: Schema.String;
|
|
@@ -1644,6 +1645,7 @@ export declare const Message: Schema.Union<readonly [Schema.Struct<{
|
|
|
1644
1645
|
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
1645
1646
|
}>;
|
|
1646
1647
|
readonly type: Schema.Literal<"compaction">;
|
|
1648
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed"]>;
|
|
1647
1649
|
readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
|
|
1648
1650
|
readonly summary: Schema.String;
|
|
1649
1651
|
readonly recent: Schema.String;
|
package/dist/session-message.js
CHANGED
|
@@ -159,6 +159,7 @@ export const Assistant = Schema.Struct({
|
|
|
159
159
|
}).annotate({ identifier: "Session.Message.Assistant" });
|
|
160
160
|
export const Compaction = Schema.Struct({
|
|
161
161
|
type: Schema.Literal("compaction"),
|
|
162
|
+
status: Schema.Literals(["queued", "running", "completed", "failed"]),
|
|
162
163
|
reason: Schema.Literals(["auto", "manual"]),
|
|
163
164
|
summary: Schema.String,
|
|
164
165
|
recent: Schema.String,
|