@opencode-ai/schema 0.0.0-dev-18199 → 0.0.0-dev-18202

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.
@@ -4471,6 +4471,150 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
4471
4471
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
4472
4472
  };
4473
4473
  }>;
4474
+ }, Schema.Struct<{
4475
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
4476
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
4477
+ };
4478
+ readonly created: Schema.Finite;
4479
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
4480
+ readonly type: Schema.Literal<"persistent-pty.added">;
4481
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
4482
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
4483
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
4484
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4485
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4486
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
4487
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4488
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4489
+ }>, never, never>;
4490
+ }>>>, Schema.optionalKey<Schema.Struct<{
4491
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
4492
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
4493
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4494
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4495
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
4496
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4497
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4498
+ }>, never, never>;
4499
+ }>>, never, never>;
4500
+ readonly data: Schema.Struct<{
4501
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4502
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
4503
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4504
+ };
4505
+ readonly terminal: Schema.Struct<{
4506
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4507
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
4508
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4509
+ };
4510
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
4511
+ readonly size: Schema.Struct<{
4512
+ readonly cols: Schema.Int;
4513
+ readonly rows: Schema.Int;
4514
+ }>;
4515
+ readonly output: Schema.Struct<{
4516
+ readonly head: Schema.Int;
4517
+ readonly tail: Schema.Int;
4518
+ }>;
4519
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
4520
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
4521
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
4522
+ };
4523
+ readonly title: Schema.String;
4524
+ readonly command: Schema.String;
4525
+ readonly args: Schema.$Array<Schema.String>;
4526
+ readonly cwd: Schema.String;
4527
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
4528
+ readonly pid: Schema.Int;
4529
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
4530
+ }>;
4531
+ }>;
4532
+ }> & {
4533
+ type: "persistent-pty.added";
4534
+ durability: "ephemeral";
4535
+ durable: undefined;
4536
+ data: Schema.Struct<{
4537
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4538
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
4539
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4540
+ };
4541
+ readonly terminal: Schema.Struct<{
4542
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4543
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
4544
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4545
+ };
4546
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
4547
+ readonly size: Schema.Struct<{
4548
+ readonly cols: Schema.Int;
4549
+ readonly rows: Schema.Int;
4550
+ }>;
4551
+ readonly output: Schema.Struct<{
4552
+ readonly head: Schema.Int;
4553
+ readonly tail: Schema.Int;
4554
+ }>;
4555
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
4556
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
4557
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
4558
+ };
4559
+ readonly title: Schema.String;
4560
+ readonly command: Schema.String;
4561
+ readonly args: Schema.$Array<Schema.String>;
4562
+ readonly cwd: Schema.String;
4563
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
4564
+ readonly pid: Schema.Int;
4565
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
4566
+ }>;
4567
+ }>;
4568
+ }, Schema.Struct<{
4569
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
4570
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
4571
+ };
4572
+ readonly created: Schema.Finite;
4573
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
4574
+ readonly type: Schema.Literal<"persistent-pty.removed">;
4575
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
4576
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
4577
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
4578
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4579
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4580
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
4581
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4582
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4583
+ }>, never, never>;
4584
+ }>>>, Schema.optionalKey<Schema.Struct<{
4585
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
4586
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
4587
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4588
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4589
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
4590
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
4591
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
4592
+ }>, never, never>;
4593
+ }>>, never, never>;
4594
+ readonly data: Schema.Struct<{
4595
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4596
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
4597
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4598
+ };
4599
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
4600
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
4601
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
4602
+ };
4603
+ }>;
4604
+ }> & {
4605
+ type: "persistent-pty.removed";
4606
+ durability: "ephemeral";
4607
+ durable: undefined;
4608
+ data: Schema.Struct<{
4609
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
4610
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
4611
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4612
+ };
4613
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
4614
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
4615
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
4616
+ };
4617
+ }>;
4474
4618
  }, Schema.Struct<{
4475
4619
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
4476
4620
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -10035,6 +10179,150 @@ export declare const Definitions: readonly [Schema.Struct<{
10035
10179
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
10036
10180
  };
10037
10181
  }>;
10182
+ }, Schema.Struct<{
10183
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
10184
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
10185
+ };
10186
+ readonly created: Schema.Finite;
10187
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
10188
+ readonly type: Schema.Literal<"persistent-pty.added">;
10189
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
10190
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
10191
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
10192
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10193
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
10194
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
10195
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10196
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
10197
+ }>, never, never>;
10198
+ }>>>, Schema.optionalKey<Schema.Struct<{
10199
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
10200
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
10201
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10202
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
10203
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
10204
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10205
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
10206
+ }>, never, never>;
10207
+ }>>, never, never>;
10208
+ readonly data: Schema.Struct<{
10209
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
10210
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
10211
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
10212
+ };
10213
+ readonly terminal: Schema.Struct<{
10214
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
10215
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
10216
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
10217
+ };
10218
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
10219
+ readonly size: Schema.Struct<{
10220
+ readonly cols: Schema.Int;
10221
+ readonly rows: Schema.Int;
10222
+ }>;
10223
+ readonly output: Schema.Struct<{
10224
+ readonly head: Schema.Int;
10225
+ readonly tail: Schema.Int;
10226
+ }>;
10227
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
10228
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
10229
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
10230
+ };
10231
+ readonly title: Schema.String;
10232
+ readonly command: Schema.String;
10233
+ readonly args: Schema.$Array<Schema.String>;
10234
+ readonly cwd: Schema.String;
10235
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
10236
+ readonly pid: Schema.Int;
10237
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
10238
+ }>;
10239
+ }>;
10240
+ }> & {
10241
+ type: "persistent-pty.added";
10242
+ durability: "ephemeral";
10243
+ durable: undefined;
10244
+ data: Schema.Struct<{
10245
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
10246
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
10247
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
10248
+ };
10249
+ readonly terminal: Schema.Struct<{
10250
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
10251
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
10252
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
10253
+ };
10254
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
10255
+ readonly size: Schema.Struct<{
10256
+ readonly cols: Schema.Int;
10257
+ readonly rows: Schema.Int;
10258
+ }>;
10259
+ readonly output: Schema.Struct<{
10260
+ readonly head: Schema.Int;
10261
+ readonly tail: Schema.Int;
10262
+ }>;
10263
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
10264
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
10265
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
10266
+ };
10267
+ readonly title: Schema.String;
10268
+ readonly command: Schema.String;
10269
+ readonly args: Schema.$Array<Schema.String>;
10270
+ readonly cwd: Schema.String;
10271
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
10272
+ readonly pid: Schema.Int;
10273
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
10274
+ }>;
10275
+ }>;
10276
+ }, Schema.Struct<{
10277
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
10278
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
10279
+ };
10280
+ readonly created: Schema.Finite;
10281
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
10282
+ readonly type: Schema.Literal<"persistent-pty.removed">;
10283
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
10284
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
10285
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
10286
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10287
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
10288
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
10289
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10290
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
10291
+ }>, never, never>;
10292
+ }>>>, Schema.optionalKey<Schema.Struct<{
10293
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
10294
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
10295
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10296
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
10297
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
10298
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10299
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
10300
+ }>, never, never>;
10301
+ }>>, never, never>;
10302
+ readonly data: Schema.Struct<{
10303
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
10304
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
10305
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
10306
+ };
10307
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
10308
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
10309
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
10310
+ };
10311
+ }>;
10312
+ }> & {
10313
+ type: "persistent-pty.removed";
10314
+ durability: "ephemeral";
10315
+ durable: undefined;
10316
+ data: Schema.Struct<{
10317
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
10318
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
10319
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
10320
+ };
10321
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
10322
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
10323
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
10324
+ };
10325
+ }>;
10038
10326
  }, Schema.Struct<{
10039
10327
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
10040
10328
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -16,6 +16,7 @@ import { LspEvent } from "./lsp-event.js";
16
16
  import { McpEvent } from "./mcp-event.js";
17
17
  import { ModelsDev } from "./models-dev.js";
18
18
  import { Permission } from "./permission.js";
19
+ import { PersistentPty } from "./persistent-pty.js";
19
20
  import { Plugin } from "./plugin.js";
20
21
  import { Project } from "./project.js";
21
22
  import { Worktree } from "./worktree.js";
@@ -34,7 +35,7 @@ import { WorktreeEvent } from "./worktree-event.js";
34
35
  import { WebSearch } from "./websearch.js";
35
36
  const coreDefinitions = Event.inventory(...SessionEvent.Definitions);
36
37
  const foundationDefinitions = Event.inventory(...ModelsDev.Event.Definitions, ...Integration.Event.Definitions, ...Catalog.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
37
- const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Worktree.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...Shell.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions);
38
+ const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Worktree.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...PersistentPty.Event.Definitions, ...Shell.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions);
38
39
  export const ServerDefinitions = Event.inventory(...foundationDefinitions, ...featureDefinitions,
39
40
  // Current events the TUI consumes from the public stream.
40
41
  ...SessionStatusEvent.Definitions, ...TuiEvent.Definitions, ...InstallationEvent.Definitions, ...VcsEvent.Definitions, McpEvent.StatusChanged, McpEvent.ResourcesChanged);
package/dist/index.d.ts CHANGED
@@ -31,6 +31,7 @@ export { Shell } from "./shell.js";
31
31
  export { Skill } from "./skill.js";
32
32
  export { TokenUsage } from "./token-usage.js";
33
33
  export { Pty } from "./pty.js";
34
+ export { PersistentPty } from "./persistent-pty.js";
34
35
  export { PtyTicket } from "./pty-ticket.js";
35
36
  export { Question } from "./question.js";
36
37
  export { Workspace } from "./workspace.js";
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ export { Shell } from "./shell.js";
31
31
  export { Skill } from "./skill.js";
32
32
  export { TokenUsage } from "./token-usage.js";
33
33
  export { Pty } from "./pty.js";
34
+ export { PersistentPty } from "./persistent-pty.js";
34
35
  export { PtyTicket } from "./pty-ticket.js";
35
36
  export { Question } from "./question.js";
36
37
  export { Workspace } from "./workspace.js";
@@ -0,0 +1,530 @@
1
+ export * as PersistentPty from "./persistent-pty.js";
2
+ import { Schema } from "effect";
3
+ export declare const Info: Schema.Struct<{
4
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
6
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
7
+ };
8
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
9
+ readonly size: Schema.Struct<{
10
+ readonly cols: Schema.Int;
11
+ readonly rows: Schema.Int;
12
+ }>;
13
+ readonly output: Schema.Struct<{
14
+ readonly head: Schema.Int;
15
+ readonly tail: Schema.Int;
16
+ }>;
17
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
18
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
19
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
20
+ };
21
+ readonly title: Schema.String;
22
+ readonly command: Schema.String;
23
+ readonly args: Schema.$Array<Schema.String>;
24
+ readonly cwd: Schema.String;
25
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
26
+ readonly pid: Schema.Int;
27
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
28
+ }>;
29
+ export interface Info extends Schema.Schema.Type<typeof Info> {
30
+ }
31
+ export declare const CreateInput: Schema.Struct<{
32
+ readonly command: Schema.String;
33
+ readonly args: Schema.$Array<Schema.String>;
34
+ readonly cwd: Schema.String;
35
+ readonly title: Schema.String;
36
+ readonly env: Schema.$Record<Schema.String, Schema.String>;
37
+ readonly size: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
38
+ readonly cols: Schema.Int;
39
+ readonly rows: Schema.Int;
40
+ }>>>, Schema.optionalKey<Schema.Struct<{
41
+ readonly cols: Schema.Int;
42
+ readonly rows: Schema.Int;
43
+ }>>, never, never>;
44
+ }>;
45
+ export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {
46
+ }
47
+ export declare const UpdateInput: Schema.Struct<{
48
+ readonly attachmentID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
49
+ readonly size: Schema.Struct<{
50
+ readonly cols: Schema.Int;
51
+ readonly rows: Schema.Int;
52
+ }>;
53
+ }>;
54
+ export interface UpdateInput extends Schema.Schema.Type<typeof UpdateInput> {
55
+ }
56
+ export declare const Snapshot: Schema.Struct<{
57
+ readonly info: Schema.Struct<{
58
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
59
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
60
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
61
+ };
62
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
63
+ readonly size: Schema.Struct<{
64
+ readonly cols: Schema.Int;
65
+ readonly rows: Schema.Int;
66
+ }>;
67
+ readonly output: Schema.Struct<{
68
+ readonly head: Schema.Int;
69
+ readonly tail: Schema.Int;
70
+ }>;
71
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
72
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
73
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
74
+ };
75
+ readonly title: Schema.String;
76
+ readonly command: Schema.String;
77
+ readonly args: Schema.$Array<Schema.String>;
78
+ readonly cwd: Schema.String;
79
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
80
+ readonly pid: Schema.Int;
81
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
82
+ }>;
83
+ readonly text: Schema.String;
84
+ readonly checkpoint: Schema.Uint8Array;
85
+ readonly cursor: Schema.Struct<{
86
+ readonly x: Schema.Int;
87
+ readonly y: Schema.Int;
88
+ }>;
89
+ }>;
90
+ export interface Snapshot extends Schema.Schema.Type<typeof Snapshot> {
91
+ }
92
+ export declare const Added: Schema.Struct<{
93
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
94
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
95
+ };
96
+ readonly created: Schema.Finite;
97
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
98
+ readonly type: Schema.Literal<"persistent-pty.added">;
99
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
100
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
101
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
102
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
103
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
104
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
105
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
106
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
107
+ }>, never, never>;
108
+ }>>>, Schema.optionalKey<Schema.Struct<{
109
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
110
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
111
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
112
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
113
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
114
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
115
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
116
+ }>, never, never>;
117
+ }>>, never, never>;
118
+ readonly data: Schema.Struct<{
119
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
120
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
121
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
122
+ };
123
+ readonly terminal: Schema.Struct<{
124
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
125
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
126
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
127
+ };
128
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
129
+ readonly size: Schema.Struct<{
130
+ readonly cols: Schema.Int;
131
+ readonly rows: Schema.Int;
132
+ }>;
133
+ readonly output: Schema.Struct<{
134
+ readonly head: Schema.Int;
135
+ readonly tail: Schema.Int;
136
+ }>;
137
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
138
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
139
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
140
+ };
141
+ readonly title: Schema.String;
142
+ readonly command: Schema.String;
143
+ readonly args: Schema.$Array<Schema.String>;
144
+ readonly cwd: Schema.String;
145
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
146
+ readonly pid: Schema.Int;
147
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
148
+ }>;
149
+ }>;
150
+ }> & {
151
+ type: "persistent-pty.added";
152
+ durability: "ephemeral";
153
+ durable: undefined;
154
+ data: Schema.Struct<{
155
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
156
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
157
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
158
+ };
159
+ readonly terminal: Schema.Struct<{
160
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
161
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
162
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
163
+ };
164
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
165
+ readonly size: Schema.Struct<{
166
+ readonly cols: Schema.Int;
167
+ readonly rows: Schema.Int;
168
+ }>;
169
+ readonly output: Schema.Struct<{
170
+ readonly head: Schema.Int;
171
+ readonly tail: Schema.Int;
172
+ }>;
173
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
174
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
175
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
176
+ };
177
+ readonly title: Schema.String;
178
+ readonly command: Schema.String;
179
+ readonly args: Schema.$Array<Schema.String>;
180
+ readonly cwd: Schema.String;
181
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
182
+ readonly pid: Schema.Int;
183
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
184
+ }>;
185
+ }>;
186
+ };
187
+ export declare const Removed: Schema.Struct<{
188
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
189
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
190
+ };
191
+ readonly created: Schema.Finite;
192
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
193
+ readonly type: Schema.Literal<"persistent-pty.removed">;
194
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
195
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
196
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
197
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
198
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
199
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
200
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
201
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
202
+ }>, never, never>;
203
+ }>>>, Schema.optionalKey<Schema.Struct<{
204
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
205
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
206
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
207
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
208
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
209
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
210
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
211
+ }>, never, never>;
212
+ }>>, never, never>;
213
+ readonly data: Schema.Struct<{
214
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
215
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
216
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
217
+ };
218
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
219
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
220
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
221
+ };
222
+ }>;
223
+ }> & {
224
+ type: "persistent-pty.removed";
225
+ durability: "ephemeral";
226
+ durable: undefined;
227
+ data: Schema.Struct<{
228
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
229
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
230
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
231
+ };
232
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
233
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
234
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
235
+ };
236
+ }>;
237
+ };
238
+ export declare const Event: {
239
+ Added: Schema.Struct<{
240
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
241
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
242
+ };
243
+ readonly created: Schema.Finite;
244
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
245
+ readonly type: Schema.Literal<"persistent-pty.added">;
246
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
247
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
248
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
249
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
250
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
251
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
252
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
253
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
254
+ }>, never, never>;
255
+ }>>>, Schema.optionalKey<Schema.Struct<{
256
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
257
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
258
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
259
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
260
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
261
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
262
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
263
+ }>, never, never>;
264
+ }>>, never, never>;
265
+ readonly data: Schema.Struct<{
266
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
267
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
268
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
269
+ };
270
+ readonly terminal: Schema.Struct<{
271
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
272
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
273
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
274
+ };
275
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
276
+ readonly size: Schema.Struct<{
277
+ readonly cols: Schema.Int;
278
+ readonly rows: Schema.Int;
279
+ }>;
280
+ readonly output: Schema.Struct<{
281
+ readonly head: Schema.Int;
282
+ readonly tail: Schema.Int;
283
+ }>;
284
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
285
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
286
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
287
+ };
288
+ readonly title: Schema.String;
289
+ readonly command: Schema.String;
290
+ readonly args: Schema.$Array<Schema.String>;
291
+ readonly cwd: Schema.String;
292
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
293
+ readonly pid: Schema.Int;
294
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
295
+ }>;
296
+ }>;
297
+ }> & {
298
+ type: "persistent-pty.added";
299
+ durability: "ephemeral";
300
+ durable: undefined;
301
+ data: Schema.Struct<{
302
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
303
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
304
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
305
+ };
306
+ readonly terminal: Schema.Struct<{
307
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
308
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
309
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
310
+ };
311
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
312
+ readonly size: Schema.Struct<{
313
+ readonly cols: Schema.Int;
314
+ readonly rows: Schema.Int;
315
+ }>;
316
+ readonly output: Schema.Struct<{
317
+ readonly head: Schema.Int;
318
+ readonly tail: Schema.Int;
319
+ }>;
320
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
321
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
322
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
323
+ };
324
+ readonly title: Schema.String;
325
+ readonly command: Schema.String;
326
+ readonly args: Schema.$Array<Schema.String>;
327
+ readonly cwd: Schema.String;
328
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
329
+ readonly pid: Schema.Int;
330
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
331
+ }>;
332
+ }>;
333
+ };
334
+ Removed: Schema.Struct<{
335
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
336
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
337
+ };
338
+ readonly created: Schema.Finite;
339
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
340
+ readonly type: Schema.Literal<"persistent-pty.removed">;
341
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
342
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
343
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
344
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
345
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
346
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
347
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
348
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
349
+ }>, never, never>;
350
+ }>>>, Schema.optionalKey<Schema.Struct<{
351
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
352
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
353
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
354
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
355
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
356
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
357
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
358
+ }>, never, never>;
359
+ }>>, never, never>;
360
+ readonly data: Schema.Struct<{
361
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
362
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
363
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
364
+ };
365
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
366
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
367
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
368
+ };
369
+ }>;
370
+ }> & {
371
+ type: "persistent-pty.removed";
372
+ durability: "ephemeral";
373
+ durable: undefined;
374
+ data: Schema.Struct<{
375
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
376
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
377
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
378
+ };
379
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
380
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
381
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
382
+ };
383
+ }>;
384
+ };
385
+ Definitions: readonly [Schema.Struct<{
386
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
387
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
388
+ };
389
+ readonly created: Schema.Finite;
390
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
391
+ readonly type: Schema.Literal<"persistent-pty.added">;
392
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
393
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
394
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
395
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
396
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
397
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
398
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
399
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
400
+ }>, never, never>;
401
+ }>>>, Schema.optionalKey<Schema.Struct<{
402
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
403
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
404
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
405
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
406
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
407
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
408
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
409
+ }>, never, never>;
410
+ }>>, never, never>;
411
+ readonly data: Schema.Struct<{
412
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
413
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
414
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
415
+ };
416
+ readonly terminal: Schema.Struct<{
417
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
418
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
419
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
420
+ };
421
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
422
+ readonly size: Schema.Struct<{
423
+ readonly cols: Schema.Int;
424
+ readonly rows: Schema.Int;
425
+ }>;
426
+ readonly output: Schema.Struct<{
427
+ readonly head: Schema.Int;
428
+ readonly tail: Schema.Int;
429
+ }>;
430
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
431
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
432
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
433
+ };
434
+ readonly title: Schema.String;
435
+ readonly command: Schema.String;
436
+ readonly args: Schema.$Array<Schema.String>;
437
+ readonly cwd: Schema.String;
438
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
439
+ readonly pid: Schema.Int;
440
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
441
+ }>;
442
+ }>;
443
+ }> & {
444
+ type: "persistent-pty.added";
445
+ durability: "ephemeral";
446
+ durable: undefined;
447
+ data: Schema.Struct<{
448
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
449
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
450
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
451
+ };
452
+ readonly terminal: Schema.Struct<{
453
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
454
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
455
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
456
+ };
457
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
458
+ readonly size: Schema.Struct<{
459
+ readonly cols: Schema.Int;
460
+ readonly rows: Schema.Int;
461
+ }>;
462
+ readonly output: Schema.Struct<{
463
+ readonly head: Schema.Int;
464
+ readonly tail: Schema.Int;
465
+ }>;
466
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
467
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
468
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
469
+ };
470
+ readonly title: Schema.String;
471
+ readonly command: Schema.String;
472
+ readonly args: Schema.$Array<Schema.String>;
473
+ readonly cwd: Schema.String;
474
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
475
+ readonly pid: Schema.Int;
476
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
477
+ }>;
478
+ }>;
479
+ }, Schema.Struct<{
480
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
481
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
482
+ };
483
+ readonly created: Schema.Finite;
484
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
485
+ readonly type: Schema.Literal<"persistent-pty.removed">;
486
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
487
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
488
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
489
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
490
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
491
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
492
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
493
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
494
+ }>, never, never>;
495
+ }>>>, Schema.optionalKey<Schema.Struct<{
496
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
497
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
498
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
499
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
500
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
501
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
502
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
503
+ }>, never, never>;
504
+ }>>, never, never>;
505
+ readonly data: Schema.Struct<{
506
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
507
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
508
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
509
+ };
510
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
511
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
512
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
513
+ };
514
+ }>;
515
+ }> & {
516
+ type: "persistent-pty.removed";
517
+ durability: "ephemeral";
518
+ durable: undefined;
519
+ data: Schema.Struct<{
520
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
521
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
522
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
523
+ };
524
+ readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
525
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
526
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
527
+ };
528
+ }>;
529
+ }];
530
+ };
@@ -0,0 +1,34 @@
1
+ export * as PersistentPty from "./persistent-pty.js";
2
+ import { Schema } from "effect";
3
+ import { ephemeral, inventory } from "./event.js";
4
+ import { Pty } from "./pty.js";
5
+ import { NonNegativeInt, PositiveInt, optional } from "./schema.js";
6
+ import { Session } from "./session.js";
7
+ export const Info = Schema.Struct({
8
+ ...Pty.Info.fields,
9
+ sessionID: Session.ID,
10
+ foregroundProcess: Schema.NullOr(Schema.String),
11
+ size: Schema.Struct({ cols: PositiveInt, rows: PositiveInt }),
12
+ output: Schema.Struct({ head: NonNegativeInt, tail: NonNegativeInt }),
13
+ }).annotate({ identifier: "PersistentPty.Info" });
14
+ export const CreateInput = Schema.Struct({
15
+ command: Schema.String,
16
+ args: Schema.Array(Schema.String),
17
+ cwd: Schema.String,
18
+ title: Schema.String,
19
+ env: Schema.Record(Schema.String, Schema.String),
20
+ size: optional(Schema.Struct({ cols: PositiveInt, rows: PositiveInt })),
21
+ }).annotate({ identifier: "PersistentPty.CreateInput" });
22
+ export const UpdateInput = Schema.Struct({
23
+ attachmentID: optional(Schema.String),
24
+ size: Schema.Struct({ cols: PositiveInt, rows: PositiveInt }),
25
+ }).annotate({ identifier: "PersistentPty.UpdateInput" });
26
+ export const Snapshot = Schema.Struct({
27
+ info: Info,
28
+ text: Schema.String,
29
+ checkpoint: Schema.Uint8Array,
30
+ cursor: Schema.Struct({ x: NonNegativeInt, y: NonNegativeInt }),
31
+ }).annotate({ identifier: "PersistentPty.Snapshot" });
32
+ export const Added = ephemeral({ type: "persistent-pty.added", schema: { sessionID: Session.ID, terminal: Info } });
33
+ export const Removed = ephemeral({ type: "persistent-pty.removed", schema: { sessionID: Session.ID, ptyID: Pty.ID } });
34
+ export const Event = { Added, Removed, Definitions: inventory(Added, Removed) };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/schema",
4
- "version": "0.0.0-dev-18199",
4
+ "version": "0.0.0-dev-18202",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {