@opencode/schema 2.2.3 → 2.2.4

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.
@@ -0,0 +1,160 @@
1
+ export * as Artifact from "./artifact.js";
2
+ import { Schema } from "effect";
3
+ export declare const ID: Schema.brand<Schema.String, "Artifact.ID"> & {
4
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
5
+ };
6
+ export type ID = typeof ID.Type;
7
+ export declare const ProviderID: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
8
+ export type ProviderID = typeof ProviderID.Type;
9
+ export declare const Capability: Schema.Literals<readonly ["static", "server-code", "sqlite", "durable-objects"]>;
10
+ export type Capability = typeof Capability.Type;
11
+ export interface Provider extends Schema.Schema.Type<typeof Provider> {
12
+ }
13
+ export declare const Provider: Schema.Struct<{
14
+ readonly id: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
15
+ readonly name: Schema.String;
16
+ readonly capabilities: Schema.$Array<Schema.Literals<readonly ["static", "server-code", "sqlite", "durable-objects"]>>;
17
+ readonly default: Schema.Boolean;
18
+ }>;
19
+ export interface Time extends Schema.Schema.Type<typeof Time> {
20
+ }
21
+ export declare const Time: Schema.Struct<{
22
+ readonly created: Schema.Finite;
23
+ readonly updated: Schema.Finite;
24
+ }>;
25
+ export interface Info extends Schema.Schema.Type<typeof Info> {
26
+ }
27
+ export declare const Info: Schema.Struct<{
28
+ readonly id: Schema.brand<Schema.String, "Artifact.ID"> & {
29
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
30
+ };
31
+ readonly provider: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
32
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
33
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
34
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
35
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
36
+ }>, never, never>;
37
+ readonly title: Schema.String;
38
+ readonly entry: Schema.String;
39
+ readonly url: Schema.String;
40
+ readonly time: Schema.Struct<{
41
+ readonly created: Schema.Finite;
42
+ readonly updated: Schema.Finite;
43
+ }>;
44
+ }>;
45
+ export interface Content extends Schema.Schema.Type<typeof Content> {
46
+ }
47
+ export declare const Content: Schema.Struct<{
48
+ readonly info: Schema.Struct<{
49
+ readonly id: Schema.brand<Schema.String, "Artifact.ID"> & {
50
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
51
+ };
52
+ readonly provider: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
53
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
54
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
55
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
56
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
57
+ }>, never, never>;
58
+ readonly title: Schema.String;
59
+ readonly entry: Schema.String;
60
+ readonly url: Schema.String;
61
+ readonly time: Schema.Struct<{
62
+ readonly created: Schema.Finite;
63
+ readonly updated: Schema.Finite;
64
+ }>;
65
+ }>;
66
+ readonly files: Schema.$Record<Schema.String, Schema.String>;
67
+ }>;
68
+ export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {
69
+ }
70
+ export declare const CreateInput: Schema.Struct<{
71
+ readonly title: Schema.String;
72
+ readonly files: Schema.$Record<Schema.String, Schema.String>;
73
+ readonly entry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
74
+ readonly provider: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Trim, "Artifact.ProviderID">>>, Schema.optionalKey<Schema.brand<Schema.Trim, "Artifact.ProviderID">>, never, never>;
75
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
76
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
77
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
78
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
79
+ }>, never, never>;
80
+ }>;
81
+ export interface UpdateInput extends Schema.Schema.Type<typeof UpdateInput> {
82
+ }
83
+ export declare const UpdateInput: Schema.Struct<{
84
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
85
+ readonly files: Schema.$Record<Schema.String, Schema.String>;
86
+ readonly entry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
87
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
88
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
89
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
90
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
91
+ }>, never, never>;
92
+ }>;
93
+ export declare const Event: {
94
+ Updated: Schema.Struct<{
95
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
96
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
97
+ };
98
+ readonly created: Schema.Finite;
99
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
100
+ readonly type: Schema.Literal<"artifact.updated">;
101
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
102
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
103
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
104
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
105
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
106
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
107
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
108
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
109
+ }>, never, never>;
110
+ }>>>, Schema.optionalKey<Schema.Struct<{
111
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
112
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
113
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
114
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
115
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
116
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
117
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
118
+ }>, never, never>;
119
+ }>>, never, never>;
120
+ readonly data: Schema.Struct<{}>;
121
+ }> & {
122
+ type: "artifact.updated";
123
+ durability: "ephemeral";
124
+ durable: undefined;
125
+ data: Schema.Struct<{}>;
126
+ };
127
+ Definitions: readonly [Schema.Struct<{
128
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
129
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
130
+ };
131
+ readonly created: Schema.Finite;
132
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
133
+ readonly type: Schema.Literal<"artifact.updated">;
134
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
135
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
136
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
137
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
138
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
139
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
140
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
141
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
142
+ }>, never, never>;
143
+ }>>>, Schema.optionalKey<Schema.Struct<{
144
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
145
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
146
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
147
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
148
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
149
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
150
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
151
+ }>, never, never>;
152
+ }>>, never, never>;
153
+ readonly data: Schema.Struct<{}>;
154
+ }> & {
155
+ type: "artifact.updated";
156
+ durability: "ephemeral";
157
+ durable: undefined;
158
+ data: Schema.Struct<{}>;
159
+ }];
160
+ };
@@ -0,0 +1,54 @@
1
+ export * as Artifact from "./artifact.js";
2
+ import { Schema } from "effect";
3
+ import { ephemeral, inventory } from "./event.js";
4
+ import { ascending } from "./identifier.js";
5
+ import { optional, statics } from "./schema.js";
6
+ import { SessionID } from "./session-id.js";
7
+ export const ID = Schema.String.check(Schema.isStartingWith("art_")).pipe(Schema.brand("Artifact.ID"), Schema.annotate({ identifier: "Artifact.ID" }), statics((schema) => ({
8
+ create: () => schema.make("art_" + ascending()),
9
+ })));
10
+ export const ProviderID = Schema.Trim.check(Schema.isNonEmpty()).pipe(Schema.brand("Artifact.ProviderID"), Schema.annotate({ identifier: "Artifact.ProviderID" }));
11
+ export const Capability = Schema.Literals(["static", "server-code", "sqlite", "durable-objects"]).annotate({
12
+ identifier: "Artifact.Capability",
13
+ });
14
+ export const Provider = Schema.Struct({
15
+ id: ProviderID,
16
+ name: Schema.String,
17
+ capabilities: Schema.Array(Capability),
18
+ default: Schema.Boolean,
19
+ }).annotate({ identifier: "Artifact.Provider" });
20
+ export const Time = Schema.Struct({
21
+ created: Schema.Finite,
22
+ updated: Schema.Finite,
23
+ }).annotate({ identifier: "Artifact.Time" });
24
+ export const Info = Schema.Struct({
25
+ id: ID,
26
+ provider: ProviderID,
27
+ sessionID: SessionID.pipe(optional),
28
+ title: Schema.String,
29
+ entry: Schema.String,
30
+ url: Schema.String,
31
+ time: Time,
32
+ }).annotate({ identifier: "Artifact.Info" });
33
+ export const Content = Schema.Struct({
34
+ info: Info,
35
+ files: Schema.Record(Schema.String, Schema.String),
36
+ }).annotate({ identifier: "Artifact.Content" });
37
+ export const CreateInput = Schema.Struct({
38
+ title: Schema.String,
39
+ files: Schema.Record(Schema.String, Schema.String),
40
+ entry: Schema.String.pipe(optional),
41
+ provider: ProviderID.pipe(optional),
42
+ sessionID: SessionID.pipe(optional),
43
+ }).annotate({ identifier: "Artifact.CreateInput" });
44
+ export const UpdateInput = Schema.Struct({
45
+ title: Schema.String.pipe(optional),
46
+ files: Schema.Record(Schema.String, Schema.String),
47
+ entry: Schema.String.pipe(optional),
48
+ sessionID: SessionID.pipe(optional),
49
+ }).annotate({ identifier: "Artifact.UpdateInput" });
50
+ const Updated = ephemeral({
51
+ type: "artifact.updated",
52
+ schema: {},
53
+ });
54
+ export const Event = { Updated, Definitions: inventory(Updated) };
@@ -43,6 +43,7 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
43
43
  }>]>, never, never>>, never, never>;
44
44
  }>]>>, never, never>;
45
45
  readonly schedules: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
46
+ readonly artifacts: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
46
47
  readonly subagent_depth: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
47
48
  readonly location_idle_timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.DurationFromString, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.DurationFromString, Schema.Literal<false>]>>, never, never>;
48
49
  readonly policies: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.decodeTo<Schema.toType<Schema.Struct<{
@@ -31,6 +31,9 @@ export class Info extends Schema.Class("ConfigExperimental.Info")({
31
31
  schedules: Schema.Boolean.pipe(optional).annotate({
32
32
  description: "Enable experimental scheduled tasks that wake a session with a prompt. Defaults to false.",
33
33
  }),
34
+ artifacts: Schema.Boolean.pipe(optional).annotate({
35
+ description: "Enable experimental artifacts backed by pluggable providers. Defaults to false.",
36
+ }),
34
37
  subagent_depth: NonNegativeInt.pipe(optional).annotate({
35
38
  description: "Maximum subagent nesting depth. Defaults to 1.",
36
39
  }),
@@ -5125,6 +5125,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
5125
5125
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5126
5126
  create: () => string & import("effect/Brand").Brand<"SessionID">;
5127
5127
  };
5128
+ readonly userTitle: Schema.NullOr<Schema.String>;
5128
5129
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
5129
5130
  readonly size: Schema.Struct<{
5130
5131
  readonly cols: Schema.Int;
@@ -5159,6 +5160,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
5159
5160
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5160
5161
  create: () => string & import("effect/Brand").Brand<"SessionID">;
5161
5162
  };
5163
+ readonly userTitle: Schema.NullOr<Schema.String>;
5162
5164
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
5163
5165
  readonly size: Schema.Struct<{
5164
5166
  readonly cols: Schema.Int;
@@ -5218,6 +5220,98 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
5218
5220
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
5219
5221
  };
5220
5222
  }>;
5223
+ }, Schema.Struct<{
5224
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5225
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
5226
+ };
5227
+ readonly created: Schema.Finite;
5228
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
5229
+ readonly type: Schema.Literal<"persistent-pty.updated">;
5230
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
5231
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5232
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5233
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5234
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5235
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5236
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5237
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5238
+ }>, never, never>;
5239
+ }>>>, Schema.optionalKey<Schema.Struct<{
5240
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5241
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5242
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5243
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5244
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5245
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5246
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5247
+ }>, never, never>;
5248
+ }>>, never, never>;
5249
+ readonly data: Schema.Struct<{
5250
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5251
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5252
+ };
5253
+ readonly terminal: Schema.Struct<{
5254
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
5255
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
5256
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
5257
+ };
5258
+ readonly title: Schema.String;
5259
+ readonly command: Schema.String;
5260
+ readonly args: Schema.$Array<Schema.String>;
5261
+ readonly cwd: Schema.String;
5262
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
5263
+ readonly pid: Schema.Int;
5264
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
5265
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5266
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5267
+ };
5268
+ readonly userTitle: Schema.NullOr<Schema.String>;
5269
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
5270
+ readonly size: Schema.Struct<{
5271
+ readonly cols: Schema.Int;
5272
+ readonly rows: Schema.Int;
5273
+ }>;
5274
+ readonly output: Schema.Struct<{
5275
+ readonly head: Schema.Int;
5276
+ readonly tail: Schema.Int;
5277
+ }>;
5278
+ }>;
5279
+ }>;
5280
+ }> & {
5281
+ type: "persistent-pty.updated";
5282
+ durability: "ephemeral";
5283
+ durable: undefined;
5284
+ data: Schema.Struct<{
5285
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5286
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5287
+ };
5288
+ readonly terminal: Schema.Struct<{
5289
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
5290
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
5291
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
5292
+ };
5293
+ readonly title: Schema.String;
5294
+ readonly command: Schema.String;
5295
+ readonly args: Schema.$Array<Schema.String>;
5296
+ readonly cwd: Schema.String;
5297
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
5298
+ readonly pid: Schema.Int;
5299
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
5300
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5301
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5302
+ };
5303
+ readonly userTitle: Schema.NullOr<Schema.String>;
5304
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
5305
+ readonly size: Schema.Struct<{
5306
+ readonly cols: Schema.Int;
5307
+ readonly rows: Schema.Int;
5308
+ }>;
5309
+ readonly output: Schema.Struct<{
5310
+ readonly head: Schema.Int;
5311
+ readonly tail: Schema.Int;
5312
+ }>;
5313
+ }>;
5314
+ }>;
5221
5315
  }, Schema.Struct<{
5222
5316
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5223
5317
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -5784,6 +5878,38 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
5784
5878
  durability: "ephemeral";
5785
5879
  durable: undefined;
5786
5880
  data: Schema.Struct<{}>;
5881
+ }, Schema.Struct<{
5882
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5883
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
5884
+ };
5885
+ readonly created: Schema.Finite;
5886
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
5887
+ readonly type: Schema.Literal<"artifact.updated">;
5888
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
5889
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5890
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5891
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5892
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5893
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5894
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5895
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5896
+ }>, never, never>;
5897
+ }>>>, Schema.optionalKey<Schema.Struct<{
5898
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5899
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5900
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5901
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5902
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5903
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5904
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5905
+ }>, never, never>;
5906
+ }>>, never, never>;
5907
+ readonly data: Schema.Struct<{}>;
5908
+ }> & {
5909
+ type: "artifact.updated";
5910
+ durability: "ephemeral";
5911
+ durable: undefined;
5912
+ data: Schema.Struct<{}>;
5787
5913
  }, Schema.Struct<{
5788
5914
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5789
5915
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -11445,6 +11571,7 @@ export declare const Definitions: readonly [Schema.Struct<{
11445
11571
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
11446
11572
  create: () => string & import("effect/Brand").Brand<"SessionID">;
11447
11573
  };
11574
+ readonly userTitle: Schema.NullOr<Schema.String>;
11448
11575
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
11449
11576
  readonly size: Schema.Struct<{
11450
11577
  readonly cols: Schema.Int;
@@ -11479,6 +11606,7 @@ export declare const Definitions: readonly [Schema.Struct<{
11479
11606
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
11480
11607
  create: () => string & import("effect/Brand").Brand<"SessionID">;
11481
11608
  };
11609
+ readonly userTitle: Schema.NullOr<Schema.String>;
11482
11610
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
11483
11611
  readonly size: Schema.Struct<{
11484
11612
  readonly cols: Schema.Int;
@@ -11538,6 +11666,98 @@ export declare const Definitions: readonly [Schema.Struct<{
11538
11666
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
11539
11667
  };
11540
11668
  }>;
11669
+ }, Schema.Struct<{
11670
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
11671
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
11672
+ };
11673
+ readonly created: Schema.Finite;
11674
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
11675
+ readonly type: Schema.Literal<"persistent-pty.updated">;
11676
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
11677
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
11678
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
11679
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
11680
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11681
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
11682
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
11683
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11684
+ }>, never, never>;
11685
+ }>>>, Schema.optionalKey<Schema.Struct<{
11686
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
11687
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
11688
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
11689
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11690
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
11691
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
11692
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11693
+ }>, never, never>;
11694
+ }>>, never, never>;
11695
+ readonly data: Schema.Struct<{
11696
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
11697
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
11698
+ };
11699
+ readonly terminal: Schema.Struct<{
11700
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
11701
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
11702
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
11703
+ };
11704
+ readonly title: Schema.String;
11705
+ readonly command: Schema.String;
11706
+ readonly args: Schema.$Array<Schema.String>;
11707
+ readonly cwd: Schema.String;
11708
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
11709
+ readonly pid: Schema.Int;
11710
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
11711
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
11712
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
11713
+ };
11714
+ readonly userTitle: Schema.NullOr<Schema.String>;
11715
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
11716
+ readonly size: Schema.Struct<{
11717
+ readonly cols: Schema.Int;
11718
+ readonly rows: Schema.Int;
11719
+ }>;
11720
+ readonly output: Schema.Struct<{
11721
+ readonly head: Schema.Int;
11722
+ readonly tail: Schema.Int;
11723
+ }>;
11724
+ }>;
11725
+ }>;
11726
+ }> & {
11727
+ type: "persistent-pty.updated";
11728
+ durability: "ephemeral";
11729
+ durable: undefined;
11730
+ data: Schema.Struct<{
11731
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
11732
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
11733
+ };
11734
+ readonly terminal: Schema.Struct<{
11735
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
11736
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
11737
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
11738
+ };
11739
+ readonly title: Schema.String;
11740
+ readonly command: Schema.String;
11741
+ readonly args: Schema.$Array<Schema.String>;
11742
+ readonly cwd: Schema.String;
11743
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
11744
+ readonly pid: Schema.Int;
11745
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
11746
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
11747
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
11748
+ };
11749
+ readonly userTitle: Schema.NullOr<Schema.String>;
11750
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
11751
+ readonly size: Schema.Struct<{
11752
+ readonly cols: Schema.Int;
11753
+ readonly rows: Schema.Int;
11754
+ }>;
11755
+ readonly output: Schema.Struct<{
11756
+ readonly head: Schema.Int;
11757
+ readonly tail: Schema.Int;
11758
+ }>;
11759
+ }>;
11760
+ }>;
11541
11761
  }, Schema.Struct<{
11542
11762
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
11543
11763
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -12104,6 +12324,38 @@ export declare const Definitions: readonly [Schema.Struct<{
12104
12324
  durability: "ephemeral";
12105
12325
  durable: undefined;
12106
12326
  data: Schema.Struct<{}>;
12327
+ }, Schema.Struct<{
12328
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
12329
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
12330
+ };
12331
+ readonly created: Schema.Finite;
12332
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
12333
+ readonly type: Schema.Literal<"artifact.updated">;
12334
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
12335
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12336
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
12337
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
12338
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
12339
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
12340
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
12341
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
12342
+ }>, never, never>;
12343
+ }>>>, Schema.optionalKey<Schema.Struct<{
12344
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12345
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
12346
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
12347
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
12348
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
12349
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
12350
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
12351
+ }>, never, never>;
12352
+ }>>, never, never>;
12353
+ readonly data: Schema.Struct<{}>;
12354
+ }> & {
12355
+ type: "artifact.updated";
12356
+ durability: "ephemeral";
12357
+ durable: undefined;
12358
+ data: Schema.Struct<{}>;
12107
12359
  }, Schema.Struct<{
12108
12360
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
12109
12361
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -1,6 +1,7 @@
1
1
  export * as EventManifest from "./event-manifest.js";
2
2
  import { Schema } from "effect";
3
3
  import { Agent } from "./agent.js";
4
+ import { Artifact } from "./artifact.js";
4
5
  import { Command } from "./command.js";
5
6
  import { Config } from "./config.js";
6
7
  import { Credential } from "./credential.js";
@@ -37,7 +38,7 @@ import { WorktreeEvent } from "./worktree-event.js";
37
38
  import { WebSearch } from "./websearch.js";
38
39
  const coreDefinitions = Event.inventory(...SessionEvent.Definitions);
39
40
  const foundationDefinitions = Event.inventory(...LocationEvent.Definitions, ...ModelsDev.Event.Definitions, ...Credential.Event.Definitions, ...Integration.Event.Definitions, ...Provider.Event.Definitions, ...Model.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
40
- const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Project.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);
41
+ const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Project.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, ...Artifact.Event.Definitions);
41
42
  export const ServerDefinitions = Event.inventory(...foundationDefinitions, ...featureDefinitions,
42
43
  // Current events the TUI consumes from the public stream.
43
44
  ...SessionStatusEvent.Definitions, ...TuiEvent.Definitions, ...InstallationEvent.Definitions, ...VcsEvent.Definitions, McpEvent.StatusChanged, McpEvent.ResourcesChanged);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { Agent } from "./agent.js";
2
+ export { Artifact } from "./artifact.js";
2
3
  export { Command } from "./command.js";
3
4
  export { Config } from "./config.js";
4
5
  export { Connection } from "./connection.js";
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { Agent } from "./agent.js";
2
+ export { Artifact } from "./artifact.js";
2
3
  export { Command } from "./command.js";
3
4
  export { Config } from "./config.js";
4
5
  export { Connection } from "./connection.js";
@@ -15,6 +15,7 @@ export declare const Info: Schema.Struct<{
15
15
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
16
16
  create: () => string & import("effect/Brand").Brand<"SessionID">;
17
17
  };
18
+ readonly userTitle: Schema.NullOr<Schema.String>;
18
19
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
19
20
  readonly size: Schema.Struct<{
20
21
  readonly cols: Schema.Int;
@@ -53,10 +54,14 @@ export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {
53
54
  }
54
55
  export declare const UpdateInput: Schema.Struct<{
55
56
  readonly attachmentID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
56
- readonly size: Schema.Struct<{
57
+ readonly size: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
57
58
  readonly cols: Schema.Int;
58
59
  readonly rows: Schema.Int;
59
- }>;
60
+ }>>>, Schema.optionalKey<Schema.Struct<{
61
+ readonly cols: Schema.Int;
62
+ readonly rows: Schema.Int;
63
+ }>>, never, never>;
64
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NullOr<Schema.String>>>, Schema.optionalKey<Schema.NullOr<Schema.String>>, never, never>;
60
65
  }>;
61
66
  export interface UpdateInput extends Schema.Schema.Type<typeof UpdateInput> {
62
67
  }
@@ -76,6 +81,7 @@ export declare const Snapshot: Schema.Struct<{
76
81
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
77
82
  create: () => string & import("effect/Brand").Brand<"SessionID">;
78
83
  };
84
+ readonly userTitle: Schema.NullOr<Schema.String>;
79
85
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
80
86
  readonly size: Schema.Struct<{
81
87
  readonly cols: Schema.Int;
@@ -161,6 +167,7 @@ export declare const Added: Schema.Struct<{
161
167
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
162
168
  create: () => string & import("effect/Brand").Brand<"SessionID">;
163
169
  };
170
+ readonly userTitle: Schema.NullOr<Schema.String>;
164
171
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
165
172
  readonly size: Schema.Struct<{
166
173
  readonly cols: Schema.Int;
@@ -195,6 +202,7 @@ export declare const Added: Schema.Struct<{
195
202
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
196
203
  create: () => string & import("effect/Brand").Brand<"SessionID">;
197
204
  };
205
+ readonly userTitle: Schema.NullOr<Schema.String>;
198
206
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
199
207
  readonly size: Schema.Struct<{
200
208
  readonly cols: Schema.Int;
@@ -256,6 +264,99 @@ export declare const Removed: Schema.Struct<{
256
264
  };
257
265
  }>;
258
266
  };
267
+ export declare const Updated: Schema.Struct<{
268
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
269
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
270
+ };
271
+ readonly created: Schema.Finite;
272
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
273
+ readonly type: Schema.Literal<"persistent-pty.updated">;
274
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
275
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
276
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
277
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
278
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
279
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
280
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
281
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
282
+ }>, never, never>;
283
+ }>>>, Schema.optionalKey<Schema.Struct<{
284
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
285
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
286
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
287
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
288
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
289
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
290
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
291
+ }>, never, never>;
292
+ }>>, never, never>;
293
+ readonly data: Schema.Struct<{
294
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
295
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
296
+ };
297
+ readonly terminal: Schema.Struct<{
298
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
299
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
300
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
301
+ };
302
+ readonly title: Schema.String;
303
+ readonly command: Schema.String;
304
+ readonly args: Schema.$Array<Schema.String>;
305
+ readonly cwd: Schema.String;
306
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
307
+ readonly pid: Schema.Int;
308
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
309
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
310
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
311
+ };
312
+ readonly userTitle: Schema.NullOr<Schema.String>;
313
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
314
+ readonly size: Schema.Struct<{
315
+ readonly cols: Schema.Int;
316
+ readonly rows: Schema.Int;
317
+ }>;
318
+ readonly output: Schema.Struct<{
319
+ readonly head: Schema.Int;
320
+ readonly tail: Schema.Int;
321
+ }>;
322
+ }>;
323
+ }>;
324
+ }> & {
325
+ type: "persistent-pty.updated";
326
+ durability: "ephemeral";
327
+ durable: undefined;
328
+ data: Schema.Struct<{
329
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
330
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
331
+ };
332
+ readonly terminal: Schema.Struct<{
333
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
334
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
335
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
336
+ };
337
+ readonly title: Schema.String;
338
+ readonly command: Schema.String;
339
+ readonly args: Schema.$Array<Schema.String>;
340
+ readonly cwd: Schema.String;
341
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
342
+ readonly pid: Schema.Int;
343
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
344
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
345
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
346
+ };
347
+ readonly userTitle: Schema.NullOr<Schema.String>;
348
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
349
+ readonly size: Schema.Struct<{
350
+ readonly cols: Schema.Int;
351
+ readonly rows: Schema.Int;
352
+ }>;
353
+ readonly output: Schema.Struct<{
354
+ readonly head: Schema.Int;
355
+ readonly tail: Schema.Int;
356
+ }>;
357
+ }>;
358
+ }>;
359
+ };
259
360
  export declare const Event: {
260
361
  Added: Schema.Struct<{
261
362
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -302,6 +403,7 @@ export declare const Event: {
302
403
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
303
404
  create: () => string & import("effect/Brand").Brand<"SessionID">;
304
405
  };
406
+ readonly userTitle: Schema.NullOr<Schema.String>;
305
407
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
306
408
  readonly size: Schema.Struct<{
307
409
  readonly cols: Schema.Int;
@@ -336,6 +438,7 @@ export declare const Event: {
336
438
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
337
439
  create: () => string & import("effect/Brand").Brand<"SessionID">;
338
440
  };
441
+ readonly userTitle: Schema.NullOr<Schema.String>;
339
442
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
340
443
  readonly size: Schema.Struct<{
341
444
  readonly cols: Schema.Int;
@@ -397,6 +500,99 @@ export declare const Event: {
397
500
  };
398
501
  }>;
399
502
  };
503
+ Updated: Schema.Struct<{
504
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
505
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
506
+ };
507
+ readonly created: Schema.Finite;
508
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
509
+ readonly type: Schema.Literal<"persistent-pty.updated">;
510
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
511
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
512
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
513
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
514
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
515
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
516
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
517
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
518
+ }>, never, never>;
519
+ }>>>, Schema.optionalKey<Schema.Struct<{
520
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
521
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
522
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
523
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
524
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
525
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
526
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
527
+ }>, never, never>;
528
+ }>>, never, never>;
529
+ readonly data: Schema.Struct<{
530
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
531
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
532
+ };
533
+ readonly terminal: Schema.Struct<{
534
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
535
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
536
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
537
+ };
538
+ readonly title: Schema.String;
539
+ readonly command: Schema.String;
540
+ readonly args: Schema.$Array<Schema.String>;
541
+ readonly cwd: Schema.String;
542
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
543
+ readonly pid: Schema.Int;
544
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
545
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
546
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
547
+ };
548
+ readonly userTitle: Schema.NullOr<Schema.String>;
549
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
550
+ readonly size: Schema.Struct<{
551
+ readonly cols: Schema.Int;
552
+ readonly rows: Schema.Int;
553
+ }>;
554
+ readonly output: Schema.Struct<{
555
+ readonly head: Schema.Int;
556
+ readonly tail: Schema.Int;
557
+ }>;
558
+ }>;
559
+ }>;
560
+ }> & {
561
+ type: "persistent-pty.updated";
562
+ durability: "ephemeral";
563
+ durable: undefined;
564
+ data: Schema.Struct<{
565
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
566
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
567
+ };
568
+ readonly terminal: Schema.Struct<{
569
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
570
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
571
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
572
+ };
573
+ readonly title: Schema.String;
574
+ readonly command: Schema.String;
575
+ readonly args: Schema.$Array<Schema.String>;
576
+ readonly cwd: Schema.String;
577
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
578
+ readonly pid: Schema.Int;
579
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
580
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
581
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
582
+ };
583
+ readonly userTitle: Schema.NullOr<Schema.String>;
584
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
585
+ readonly size: Schema.Struct<{
586
+ readonly cols: Schema.Int;
587
+ readonly rows: Schema.Int;
588
+ }>;
589
+ readonly output: Schema.Struct<{
590
+ readonly head: Schema.Int;
591
+ readonly tail: Schema.Int;
592
+ }>;
593
+ }>;
594
+ }>;
595
+ };
400
596
  Definitions: readonly [Schema.Struct<{
401
597
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
402
598
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -442,6 +638,7 @@ export declare const Event: {
442
638
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
443
639
  create: () => string & import("effect/Brand").Brand<"SessionID">;
444
640
  };
641
+ readonly userTitle: Schema.NullOr<Schema.String>;
445
642
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
446
643
  readonly size: Schema.Struct<{
447
644
  readonly cols: Schema.Int;
@@ -476,6 +673,7 @@ export declare const Event: {
476
673
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
477
674
  create: () => string & import("effect/Brand").Brand<"SessionID">;
478
675
  };
676
+ readonly userTitle: Schema.NullOr<Schema.String>;
479
677
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
480
678
  readonly size: Schema.Struct<{
481
679
  readonly cols: Schema.Int;
@@ -535,5 +733,97 @@ export declare const Event: {
535
733
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
536
734
  };
537
735
  }>;
736
+ }, Schema.Struct<{
737
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
738
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
739
+ };
740
+ readonly created: Schema.Finite;
741
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
742
+ readonly type: Schema.Literal<"persistent-pty.updated">;
743
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
744
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
745
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
746
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
747
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
748
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
749
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
750
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
751
+ }>, never, never>;
752
+ }>>>, Schema.optionalKey<Schema.Struct<{
753
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
754
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
755
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
756
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
757
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
758
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
759
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
760
+ }>, never, never>;
761
+ }>>, never, never>;
762
+ readonly data: Schema.Struct<{
763
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
764
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
765
+ };
766
+ readonly terminal: Schema.Struct<{
767
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
768
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
769
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
770
+ };
771
+ readonly title: Schema.String;
772
+ readonly command: Schema.String;
773
+ readonly args: Schema.$Array<Schema.String>;
774
+ readonly cwd: Schema.String;
775
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
776
+ readonly pid: Schema.Int;
777
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
778
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
779
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
780
+ };
781
+ readonly userTitle: Schema.NullOr<Schema.String>;
782
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
783
+ readonly size: Schema.Struct<{
784
+ readonly cols: Schema.Int;
785
+ readonly rows: Schema.Int;
786
+ }>;
787
+ readonly output: Schema.Struct<{
788
+ readonly head: Schema.Int;
789
+ readonly tail: Schema.Int;
790
+ }>;
791
+ }>;
792
+ }>;
793
+ }> & {
794
+ type: "persistent-pty.updated";
795
+ durability: "ephemeral";
796
+ durable: undefined;
797
+ data: Schema.Struct<{
798
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
799
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
800
+ };
801
+ readonly terminal: Schema.Struct<{
802
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
803
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
804
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
805
+ };
806
+ readonly title: Schema.String;
807
+ readonly command: Schema.String;
808
+ readonly args: Schema.$Array<Schema.String>;
809
+ readonly cwd: Schema.String;
810
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
811
+ readonly pid: Schema.Int;
812
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
813
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
814
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
815
+ };
816
+ readonly userTitle: Schema.NullOr<Schema.String>;
817
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
818
+ readonly size: Schema.Struct<{
819
+ readonly cols: Schema.Int;
820
+ readonly rows: Schema.Int;
821
+ }>;
822
+ readonly output: Schema.Struct<{
823
+ readonly head: Schema.Int;
824
+ readonly tail: Schema.Int;
825
+ }>;
826
+ }>;
827
+ }>;
538
828
  }];
539
829
  };
@@ -7,6 +7,7 @@ import { Session } from "./session.js";
7
7
  export const Info = Schema.Struct({
8
8
  ...Pty.Info.fields,
9
9
  sessionID: Session.ID,
10
+ userTitle: Schema.NullOr(Schema.String),
10
11
  foregroundProcess: Schema.NullOr(Schema.String),
11
12
  size: Schema.Struct({ cols: PositiveInt, rows: PositiveInt }),
12
13
  output: Schema.Struct({ head: NonNegativeInt, tail: NonNegativeInt }),
@@ -27,7 +28,8 @@ export const CreateInput = Schema.Struct({
27
28
  }).annotate({ identifier: "PersistentPty.CreateInput" });
28
29
  export const UpdateInput = Schema.Struct({
29
30
  attachmentID: optional(Schema.String),
30
- size: Schema.Struct({ cols: PositiveInt, rows: PositiveInt }),
31
+ size: optional(Schema.Struct({ cols: PositiveInt, rows: PositiveInt })),
32
+ title: optional(Schema.NullOr(Schema.String)),
31
33
  }).annotate({ identifier: "PersistentPty.UpdateInput" });
32
34
  export const Snapshot = Schema.Struct({
33
35
  info: Info,
@@ -52,4 +54,5 @@ export const ReadResult = Schema.Struct({
52
54
  }).annotate({ identifier: "PersistentPty.ReadResult" });
53
55
  export const Added = ephemeral({ type: "persistent-pty.added", schema: { sessionID: Session.ID, terminal: Info } });
54
56
  export const Removed = ephemeral({ type: "persistent-pty.removed", schema: { sessionID: Session.ID, ptyID: Pty.ID } });
55
- export const Event = { Added, Removed, Definitions: inventory(Added, Removed) };
57
+ export const Updated = ephemeral({ type: "persistent-pty.updated", schema: { sessionID: Session.ID, terminal: Info } });
58
+ export const Event = { Added, Removed, Updated, Definitions: inventory(Added, Removed, Updated) };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/schema",
4
- "version": "2.2.3",
4
+ "version": "2.2.4",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {