@opencode/protocol 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.
package/dist/client.js CHANGED
@@ -60,6 +60,7 @@ export const effectOmitEndpoints = new Set([
60
60
  "fs.read",
61
61
  "fs.write",
62
62
  "media.get",
63
+ "artifacts.view",
63
64
  "pty.connect",
64
65
  "persistentPty.connect",
65
66
  "mcp.client",
package/dist/errors.d.ts CHANGED
@@ -190,6 +190,12 @@ declare const PtyNotFoundError_base: Schema.Class<PtyNotFoundError, Schema.Tagge
190
190
  }>, import("effect/Cause").YieldableError>;
191
191
  export declare class PtyNotFoundError extends PtyNotFoundError_base {
192
192
  }
193
+ declare const PtyFeatureUnsupportedError_base: Schema.Class<PtyFeatureUnsupportedError, Schema.TaggedStruct<"PtyFeatureUnsupportedError", {
194
+ readonly feature: Schema.String;
195
+ readonly message: Schema.String;
196
+ }>, import("effect/Cause").YieldableError>;
197
+ export declare class PtyFeatureUnsupportedError extends PtyFeatureUnsupportedError_base {
198
+ }
193
199
  declare const ShellNotFoundError_base: Schema.Class<ShellNotFoundError, Schema.TaggedStruct<"ShellNotFoundError", {
194
200
  readonly id: Schema.String;
195
201
  readonly message: Schema.String;
@@ -228,4 +234,10 @@ declare const ScheduleNotFoundError_base: Schema.Class<ScheduleNotFoundError, Sc
228
234
  }>, import("effect/Cause").YieldableError>;
229
235
  export declare class ScheduleNotFoundError extends ScheduleNotFoundError_base {
230
236
  }
237
+ declare const ArtifactNotFoundError_base: Schema.Class<ArtifactNotFoundError, Schema.TaggedStruct<"ArtifactNotFoundError", {
238
+ readonly artifactID: Schema.String;
239
+ readonly message: Schema.String;
240
+ }>, import("effect/Cause").YieldableError>;
241
+ export declare class ArtifactNotFoundError extends ArtifactNotFoundError_base {
242
+ }
231
243
  export {};
package/dist/errors.js CHANGED
@@ -150,6 +150,11 @@ export class PtyNotFoundError extends Schema.TaggedError()("PtyNotFoundError", {
150
150
  message: Schema.String,
151
151
  }, { httpApiStatus: 404 }) {
152
152
  }
153
+ export class PtyFeatureUnsupportedError extends Schema.TaggedError()("PtyFeatureUnsupportedError", {
154
+ feature: Schema.String,
155
+ message: Schema.String,
156
+ }, { httpApiStatus: 501 }) {
157
+ }
153
158
  export class ShellNotFoundError extends Schema.TaggedError()("ShellNotFoundError", {
154
159
  id: Schema.String,
155
160
  message: Schema.String,
@@ -190,3 +195,8 @@ export class ScheduleNotFoundError extends Schema.TaggedError()("ScheduleNotFoun
190
195
  message: Schema.String,
191
196
  }, { httpApiStatus: 404 }) {
192
197
  }
198
+ export class ArtifactNotFoundError extends Schema.TaggedError()("ArtifactNotFoundError", {
199
+ artifactID: Schema.String,
200
+ message: Schema.String,
201
+ }, { httpApiStatus: 404 }) {
202
+ }
@@ -0,0 +1,173 @@
1
+ import { Schema } from "effect";
2
+ import { HttpApiEndpoint, HttpApiSchema } from "effect/http-api";
3
+ import { ArtifactNotFoundError, FileNotFoundError, ForbiddenError, InvalidRequestError, LocationNotFoundError, ProviderNotFoundError, ServiceUnavailableError, SessionNotFoundError } from "../errors.js";
4
+ /** Lives in the `server.experimental` group (see `groups/experimental.ts`). */
5
+ export declare const ArtifactEndpoints: readonly [HttpApiEndpoint.HttpApiEndpoint<"artifacts.providers", "GET", "/api/experimental/artifacts/providers", never, Schema.toCodecStringTree<Schema.Struct<{
6
+ readonly location: Schema.optional<Schema.Struct<{
7
+ readonly directory: Schema.optional<Schema.String>;
8
+ }>>;
9
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
10
+ readonly location: Schema.Struct<{
11
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12
+ }>;
13
+ readonly data: Schema.$Array<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
+ }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof ServiceUnavailableError | typeof ForbiddenError>, never, never>, HttpApiEndpoint.HttpApiEndpoint<"artifacts.list", "GET", "/api/experimental/artifacts", never, Schema.toCodecStringTree<Schema.Struct<{
20
+ readonly location: Schema.optional<Schema.Struct<{
21
+ readonly directory: Schema.optional<Schema.String>;
22
+ }>>;
23
+ readonly sessionID: Schema.optional<Schema.brand<Schema.String, "SessionID"> & {
24
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
25
+ }>;
26
+ readonly provider: Schema.optional<Schema.brand<Schema.Trim, "Artifact.ProviderID">>;
27
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
28
+ readonly location: Schema.Struct<{
29
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
30
+ }>;
31
+ readonly data: Schema.$Array<Schema.Struct<{
32
+ readonly id: Schema.brand<Schema.String, "Artifact.ID"> & {
33
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
34
+ };
35
+ readonly provider: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
36
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
37
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
38
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
39
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
40
+ }>, never, never>;
41
+ readonly title: Schema.String;
42
+ readonly entry: Schema.String;
43
+ readonly url: Schema.String;
44
+ readonly time: Schema.Struct<{
45
+ readonly created: Schema.Finite;
46
+ readonly updated: Schema.Finite;
47
+ }>;
48
+ }>>;
49
+ }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof ServiceUnavailableError | typeof SessionNotFoundError | typeof ForbiddenError>, never, never>, HttpApiEndpoint.HttpApiEndpoint<"artifacts.create", "POST", "/api/experimental/artifacts", never, Schema.toCodecStringTree<Schema.Struct<{
50
+ readonly location: Schema.optional<Schema.Struct<{
51
+ readonly directory: Schema.optional<Schema.String>;
52
+ }>>;
53
+ }>>, Schema.toCodecJson<Schema.Struct<{
54
+ readonly title: Schema.String;
55
+ readonly files: Schema.$Record<Schema.String, Schema.String>;
56
+ readonly entry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
57
+ readonly provider: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Trim, "Artifact.ProviderID">>>, Schema.optionalKey<Schema.brand<Schema.Trim, "Artifact.ProviderID">>, never, never>;
58
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
59
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
60
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
61
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
62
+ }>, never, never>;
63
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
64
+ readonly location: Schema.Struct<{
65
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
66
+ }>;
67
+ readonly data: Schema.Struct<{
68
+ readonly id: Schema.brand<Schema.String, "Artifact.ID"> & {
69
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
70
+ };
71
+ readonly provider: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
72
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
73
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
74
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
75
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
76
+ }>, never, never>;
77
+ readonly title: Schema.String;
78
+ readonly entry: Schema.String;
79
+ readonly url: Schema.String;
80
+ readonly time: Schema.Struct<{
81
+ readonly created: Schema.Finite;
82
+ readonly updated: Schema.Finite;
83
+ }>;
84
+ }>;
85
+ }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof InvalidRequestError | typeof ServiceUnavailableError | typeof ProviderNotFoundError | typeof SessionNotFoundError | typeof ForbiddenError>, never, never>, HttpApiEndpoint.HttpApiEndpoint<"artifacts.get", "GET", "/api/experimental/artifacts/:artifactID", Schema.toCodecStringTree<Schema.Struct<{
86
+ artifactID: Schema.brand<Schema.String, "Artifact.ID"> & {
87
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
88
+ };
89
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
90
+ readonly location: Schema.optional<Schema.Struct<{
91
+ readonly directory: Schema.optional<Schema.String>;
92
+ }>>;
93
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
94
+ readonly location: Schema.Struct<{
95
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
96
+ }>;
97
+ readonly data: Schema.Struct<{
98
+ readonly info: Schema.Struct<{
99
+ readonly id: Schema.brand<Schema.String, "Artifact.ID"> & {
100
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
101
+ };
102
+ readonly provider: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
103
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
104
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
105
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
106
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
107
+ }>, never, never>;
108
+ readonly title: Schema.String;
109
+ readonly entry: Schema.String;
110
+ readonly url: Schema.String;
111
+ readonly time: Schema.Struct<{
112
+ readonly created: Schema.Finite;
113
+ readonly updated: Schema.Finite;
114
+ }>;
115
+ }>;
116
+ readonly files: Schema.$Record<Schema.String, Schema.String>;
117
+ }>;
118
+ }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof ServiceUnavailableError | typeof ForbiddenError | typeof ArtifactNotFoundError>, never, never>, HttpApiEndpoint.HttpApiEndpoint<"artifacts.update", "PATCH", "/api/experimental/artifacts/:artifactID", Schema.toCodecStringTree<Schema.Struct<{
119
+ artifactID: Schema.brand<Schema.String, "Artifact.ID"> & {
120
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
121
+ };
122
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
123
+ readonly location: Schema.optional<Schema.Struct<{
124
+ readonly directory: Schema.optional<Schema.String>;
125
+ }>>;
126
+ }>>, Schema.toCodecJson<Schema.Struct<{
127
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
128
+ readonly files: Schema.$Record<Schema.String, Schema.String>;
129
+ readonly entry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
130
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
131
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
132
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
133
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
134
+ }>, never, never>;
135
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
136
+ readonly location: Schema.Struct<{
137
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
138
+ }>;
139
+ readonly data: Schema.Struct<{
140
+ readonly id: Schema.brand<Schema.String, "Artifact.ID"> & {
141
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
142
+ };
143
+ readonly provider: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
144
+ readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
145
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
146
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
147
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
148
+ }>, never, never>;
149
+ readonly title: Schema.String;
150
+ readonly entry: Schema.String;
151
+ readonly url: Schema.String;
152
+ readonly time: Schema.Struct<{
153
+ readonly created: Schema.Finite;
154
+ readonly updated: Schema.Finite;
155
+ }>;
156
+ }>;
157
+ }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof InvalidRequestError | typeof ServiceUnavailableError | typeof SessionNotFoundError | typeof ForbiddenError | typeof ArtifactNotFoundError>, never, never>, HttpApiEndpoint.HttpApiEndpoint<"artifacts.delete", "DELETE", "/api/experimental/artifacts/:artifactID", Schema.toCodecStringTree<Schema.Struct<{
158
+ artifactID: Schema.brand<Schema.String, "Artifact.ID"> & {
159
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
160
+ };
161
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
162
+ readonly location: Schema.optional<Schema.Struct<{
163
+ readonly directory: Schema.optional<Schema.String>;
164
+ }>>;
165
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof LocationNotFoundError | typeof ServiceUnavailableError | typeof ForbiddenError | typeof ArtifactNotFoundError>, never, never>, HttpApiEndpoint.HttpApiEndpoint<"artifacts.view", "GET", "/api/experimental/artifacts/:artifactID/view/*", Schema.toCodecStringTree<Schema.Struct<{
166
+ artifactID: Schema.brand<Schema.String, "Artifact.ID"> & {
167
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
168
+ };
169
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
170
+ readonly location: Schema.optional<Schema.Struct<{
171
+ readonly directory: Schema.optional<Schema.String>;
172
+ }>>;
173
+ }>>, never, never, Schema.toCodecJson<Schema.Uint8Array>, Schema.toCodecJson<typeof LocationNotFoundError | typeof InvalidRequestError | typeof ServiceUnavailableError | typeof FileNotFoundError | typeof ForbiddenError | typeof ArtifactNotFoundError>, never, never>];
@@ -0,0 +1,80 @@
1
+ import { Artifact } from "@opencode/schema/artifact";
2
+ import { Location } from "@opencode/schema/location";
3
+ import { Session } from "@opencode/schema/session";
4
+ import { Schema } from "effect";
5
+ import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
6
+ import { ArtifactNotFoundError, FileNotFoundError, ForbiddenError, InvalidRequestError, LocationNotFoundError, ProviderNotFoundError, ServiceUnavailableError, SessionNotFoundError, } from "../errors.js";
7
+ import { LocationQuery, locationQueryOpenApi } from "./location.js";
8
+ const EXPERIMENTAL = "Experimental: needs experimental.artifacts in the Location's config and may change without notice.";
9
+ const params = { artifactID: Artifact.ID };
10
+ const ListQuery = Schema.Struct({
11
+ ...LocationQuery.fields,
12
+ sessionID: Schema.optional(Session.ID),
13
+ provider: Schema.optional(Artifact.ProviderID),
14
+ });
15
+ const annotations = (identifier, summary, description) => OpenApi.annotations({
16
+ identifier: `experimental.artifacts.${identifier}`,
17
+ summary,
18
+ description: `${description} ${EXPERIMENTAL}`,
19
+ transform: (operation) => ({ ...operation, tags: ["experimental"] }),
20
+ });
21
+ const commonErrors = [ForbiddenError, LocationNotFoundError, ServiceUnavailableError];
22
+ const itemErrors = [ArtifactNotFoundError, ...commonErrors];
23
+ /** Lives in the `server.experimental` group (see `groups/experimental.ts`). */
24
+ export const ArtifactEndpoints = [
25
+ HttpApiEndpoint.get("artifacts.providers", "/api/experimental/artifacts/providers", {
26
+ query: LocationQuery,
27
+ success: Location.response(Schema.Array(Artifact.Provider)),
28
+ error: commonErrors,
29
+ })
30
+ .annotateMerge(locationQueryOpenApi)
31
+ .annotateMerge(annotations("providers", "List artifact providers", "Return active artifact providers and default.")),
32
+ HttpApiEndpoint.get("artifacts.list", "/api/experimental/artifacts", {
33
+ query: ListQuery,
34
+ success: Location.response(Schema.Array(Artifact.Info)),
35
+ error: [SessionNotFoundError, ...commonErrors],
36
+ })
37
+ .annotateMerge(locationQueryOpenApi)
38
+ .annotateMerge(annotations("list", "List artifacts", "List published artifacts, newest update first.")),
39
+ HttpApiEndpoint.post("artifacts.create", "/api/experimental/artifacts", {
40
+ query: LocationQuery,
41
+ payload: Artifact.CreateInput,
42
+ success: Location.response(Artifact.Info),
43
+ error: [InvalidRequestError, ProviderNotFoundError, SessionNotFoundError, ...commonErrors],
44
+ })
45
+ .annotateMerge(locationQueryOpenApi)
46
+ .annotateMerge(annotations("create", "Create artifact", "Publish a new artifact through the selected or default artifact provider.")),
47
+ HttpApiEndpoint.get("artifacts.get", "/api/experimental/artifacts/:artifactID", {
48
+ params,
49
+ query: LocationQuery,
50
+ success: Location.response(Artifact.Content),
51
+ error: itemErrors,
52
+ })
53
+ .annotateMerge(locationQueryOpenApi)
54
+ .annotateMerge(annotations("get", "Read artifact", "Read an artifact's metadata and file contents.")),
55
+ HttpApiEndpoint.patch("artifacts.update", "/api/experimental/artifacts/:artifactID", {
56
+ params,
57
+ query: LocationQuery,
58
+ payload: Artifact.UpdateInput,
59
+ success: Location.response(Artifact.Info),
60
+ error: [InvalidRequestError, SessionNotFoundError, ...itemErrors],
61
+ })
62
+ .annotateMerge(locationQueryOpenApi)
63
+ .annotateMerge(annotations("update", "Update artifact", "Replace an artifact's files at the same ID and URL.")),
64
+ HttpApiEndpoint.delete("artifacts.delete", "/api/experimental/artifacts/:artifactID", {
65
+ params,
66
+ query: LocationQuery,
67
+ success: HttpApiSchema.NoContent,
68
+ error: itemErrors,
69
+ })
70
+ .annotateMerge(locationQueryOpenApi)
71
+ .annotateMerge(annotations("delete", "Delete artifact", "Remove an artifact and its stored files.")),
72
+ HttpApiEndpoint.get("artifacts.view", "/api/experimental/artifacts/:artifactID/view/*", {
73
+ params,
74
+ query: LocationQuery,
75
+ success: Schema.Uint8Array.pipe(HttpApiSchema.asUint8Array()),
76
+ error: [FileNotFoundError, InvalidRequestError, ...itemErrors],
77
+ })
78
+ .annotateMerge(locationQueryOpenApi)
79
+ .annotateMerge(annotations("view", "View local artifact", "Serve HTML and static files from the local provider.")),
80
+ ];
@@ -49,7 +49,7 @@ export declare const makeEventGroup: <const Definitions extends ReadonlyArray<De
49
49
  readonly data: {};
50
50
  }[]])[number]>, never, never, never>, false>;
51
51
  export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpApiEndpoint.HttpApiEndpoint<"event.subscribe", "GET", "/api/event", never, Schema.toCodecStringTree<Schema.Struct<{
52
- readonly types: Schema.optional<Schema.ArrayEnsure<Schema.Union<readonly [Schema.Literals<readonly ("agent.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated")[]>, Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>]>>>;
52
+ readonly types: Schema.optional<Schema.ArrayEnsure<Schema.Union<readonly [Schema.Literals<readonly ("agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated")[]>, Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>]>>>;
53
53
  }>>, never, never, HttpApiSchema.StreamSse<HttpApiSchema.SseEventFromData<Schema.Union<readonly [Schema.Struct<{
54
54
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
55
55
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -5173,6 +5173,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
5173
5173
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5174
5174
  create: () => string & import("effect/Brand").Brand<"SessionID">;
5175
5175
  };
5176
+ readonly userTitle: Schema.NullOr<Schema.String>;
5176
5177
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
5177
5178
  readonly size: Schema.Struct<{
5178
5179
  readonly cols: Schema.Int;
@@ -5207,6 +5208,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
5207
5208
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5208
5209
  create: () => string & import("effect/Brand").Brand<"SessionID">;
5209
5210
  };
5211
+ readonly userTitle: Schema.NullOr<Schema.String>;
5210
5212
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
5211
5213
  readonly size: Schema.Struct<{
5212
5214
  readonly cols: Schema.Int;
@@ -5266,6 +5268,98 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
5266
5268
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
5267
5269
  };
5268
5270
  }>;
5271
+ }, Schema.Struct<{
5272
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5273
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
5274
+ };
5275
+ readonly created: Schema.Finite;
5276
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
5277
+ readonly type: Schema.Literal<"persistent-pty.updated">;
5278
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
5279
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5280
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5281
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5282
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5283
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5284
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5285
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5286
+ }>, never, never>;
5287
+ }>>>, Schema.optionalKey<Schema.Struct<{
5288
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5289
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5290
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5291
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5292
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5293
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5294
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5295
+ }>, never, never>;
5296
+ }>>, never, never>;
5297
+ readonly data: Schema.Struct<{
5298
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5299
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5300
+ };
5301
+ readonly terminal: Schema.Struct<{
5302
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
5303
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
5304
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
5305
+ };
5306
+ readonly title: Schema.String;
5307
+ readonly command: Schema.String;
5308
+ readonly args: Schema.$Array<Schema.String>;
5309
+ readonly cwd: Schema.String;
5310
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
5311
+ readonly pid: Schema.Int;
5312
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
5313
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5314
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5315
+ };
5316
+ readonly userTitle: Schema.NullOr<Schema.String>;
5317
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
5318
+ readonly size: Schema.Struct<{
5319
+ readonly cols: Schema.Int;
5320
+ readonly rows: Schema.Int;
5321
+ }>;
5322
+ readonly output: Schema.Struct<{
5323
+ readonly head: Schema.Int;
5324
+ readonly tail: Schema.Int;
5325
+ }>;
5326
+ }>;
5327
+ }>;
5328
+ }> & {
5329
+ type: "persistent-pty.updated";
5330
+ durability: "ephemeral";
5331
+ durable: undefined;
5332
+ data: Schema.Struct<{
5333
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5334
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5335
+ };
5336
+ readonly terminal: Schema.Struct<{
5337
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
5338
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
5339
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
5340
+ };
5341
+ readonly title: Schema.String;
5342
+ readonly command: Schema.String;
5343
+ readonly args: Schema.$Array<Schema.String>;
5344
+ readonly cwd: Schema.String;
5345
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
5346
+ readonly pid: Schema.Int;
5347
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
5348
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5349
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5350
+ };
5351
+ readonly userTitle: Schema.NullOr<Schema.String>;
5352
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
5353
+ readonly size: Schema.Struct<{
5354
+ readonly cols: Schema.Int;
5355
+ readonly rows: Schema.Int;
5356
+ }>;
5357
+ readonly output: Schema.Struct<{
5358
+ readonly head: Schema.Int;
5359
+ readonly tail: Schema.Int;
5360
+ }>;
5361
+ }>;
5362
+ }>;
5269
5363
  }, Schema.Struct<{
5270
5364
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5271
5365
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -5832,6 +5926,38 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
5832
5926
  durability: "ephemeral";
5833
5927
  durable: undefined;
5834
5928
  data: Schema.Struct<{}>;
5929
+ }, Schema.Struct<{
5930
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5931
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
5932
+ };
5933
+ readonly created: Schema.Finite;
5934
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
5935
+ readonly type: Schema.Literal<"artifact.updated">;
5936
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
5937
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5938
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5939
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5940
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5941
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5942
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5943
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5944
+ }>, never, never>;
5945
+ }>>>, Schema.optionalKey<Schema.Struct<{
5946
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5947
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5948
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5949
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5950
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5951
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5952
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5953
+ }>, never, never>;
5954
+ }>>, never, never>;
5955
+ readonly data: Schema.Struct<{}>;
5956
+ }> & {
5957
+ type: "artifact.updated";
5958
+ durability: "ephemeral";
5959
+ durable: undefined;
5960
+ data: Schema.Struct<{}>;
5835
5961
  }, Schema.Struct<{
5836
5962
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5837
5963
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -7628,6 +7754,18 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
7628
7754
  readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
7629
7755
  } | undefined;
7630
7756
  readonly data: {};
7757
+ } | {
7758
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
7759
+ readonly created: number;
7760
+ readonly metadata?: {
7761
+ readonly [x: string]: unknown;
7762
+ } | undefined;
7763
+ readonly type: "artifact.updated";
7764
+ readonly location?: {
7765
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
7766
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
7767
+ } | undefined;
7768
+ readonly data: {};
7631
7769
  } | {
7632
7770
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
7633
7771
  readonly created: number;
@@ -8107,6 +8245,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8107
8245
  readonly pid: number;
8108
8246
  readonly exitCode?: number | undefined;
8109
8247
  readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
8248
+ readonly userTitle: string | null;
8110
8249
  readonly foregroundProcess: string | null;
8111
8250
  readonly size: {
8112
8251
  readonly cols: number;
@@ -8133,6 +8272,41 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8133
8272
  readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
8134
8273
  readonly ptyID: string & import("effect/Brand").Brand<"PtyID">;
8135
8274
  };
8275
+ } | {
8276
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8277
+ readonly created: number;
8278
+ readonly metadata?: {
8279
+ readonly [x: string]: unknown;
8280
+ } | undefined;
8281
+ readonly type: "persistent-pty.updated";
8282
+ readonly location?: {
8283
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8284
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8285
+ } | undefined;
8286
+ readonly data: {
8287
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
8288
+ readonly terminal: {
8289
+ readonly id: string & import("effect/Brand").Brand<"PtyID">;
8290
+ readonly title: string;
8291
+ readonly command: string;
8292
+ readonly args: readonly string[];
8293
+ readonly cwd: string;
8294
+ readonly status: "exited" | "running";
8295
+ readonly pid: number;
8296
+ readonly exitCode?: number | undefined;
8297
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
8298
+ readonly userTitle: string | null;
8299
+ readonly foregroundProcess: string | null;
8300
+ readonly size: {
8301
+ readonly cols: number;
8302
+ readonly rows: number;
8303
+ };
8304
+ readonly output: {
8305
+ readonly head: number;
8306
+ readonly tail: number;
8307
+ };
8308
+ };
8309
+ };
8136
8310
  } | {
8137
8311
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8138
8312
  readonly created: number;
@@ -13750,6 +13924,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
13750
13924
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
13751
13925
  create: () => string & import("effect/Brand").Brand<"SessionID">;
13752
13926
  };
13927
+ readonly userTitle: Schema.NullOr<Schema.String>;
13753
13928
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
13754
13929
  readonly size: Schema.Struct<{
13755
13930
  readonly cols: Schema.Int;
@@ -13784,6 +13959,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
13784
13959
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
13785
13960
  create: () => string & import("effect/Brand").Brand<"SessionID">;
13786
13961
  };
13962
+ readonly userTitle: Schema.NullOr<Schema.String>;
13787
13963
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
13788
13964
  readonly size: Schema.Struct<{
13789
13965
  readonly cols: Schema.Int;
@@ -13843,6 +14019,98 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
13843
14019
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
13844
14020
  };
13845
14021
  }>;
14022
+ }, Schema.Struct<{
14023
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
14024
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
14025
+ };
14026
+ readonly created: Schema.Finite;
14027
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
14028
+ readonly type: Schema.Literal<"persistent-pty.updated">;
14029
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
14030
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14031
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14032
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14033
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14034
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
14035
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14036
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14037
+ }>, never, never>;
14038
+ }>>>, Schema.optionalKey<Schema.Struct<{
14039
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14040
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14041
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14042
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14043
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
14044
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14045
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14046
+ }>, never, never>;
14047
+ }>>, never, never>;
14048
+ readonly data: Schema.Struct<{
14049
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
14050
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
14051
+ };
14052
+ readonly terminal: Schema.Struct<{
14053
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
14054
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
14055
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
14056
+ };
14057
+ readonly title: Schema.String;
14058
+ readonly command: Schema.String;
14059
+ readonly args: Schema.$Array<Schema.String>;
14060
+ readonly cwd: Schema.String;
14061
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
14062
+ readonly pid: Schema.Int;
14063
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
14064
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
14065
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
14066
+ };
14067
+ readonly userTitle: Schema.NullOr<Schema.String>;
14068
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
14069
+ readonly size: Schema.Struct<{
14070
+ readonly cols: Schema.Int;
14071
+ readonly rows: Schema.Int;
14072
+ }>;
14073
+ readonly output: Schema.Struct<{
14074
+ readonly head: Schema.Int;
14075
+ readonly tail: Schema.Int;
14076
+ }>;
14077
+ }>;
14078
+ }>;
14079
+ }> & {
14080
+ type: "persistent-pty.updated";
14081
+ durability: "ephemeral";
14082
+ durable: undefined;
14083
+ data: Schema.Struct<{
14084
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
14085
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
14086
+ };
14087
+ readonly terminal: Schema.Struct<{
14088
+ readonly id: Schema.brand<Schema.String, "PtyID"> & {
14089
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
14090
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
14091
+ };
14092
+ readonly title: Schema.String;
14093
+ readonly command: Schema.String;
14094
+ readonly args: Schema.$Array<Schema.String>;
14095
+ readonly cwd: Schema.String;
14096
+ readonly status: Schema.Literals<readonly ["running", "exited"]>;
14097
+ readonly pid: Schema.Int;
14098
+ readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
14099
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
14100
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
14101
+ };
14102
+ readonly userTitle: Schema.NullOr<Schema.String>;
14103
+ readonly foregroundProcess: Schema.NullOr<Schema.String>;
14104
+ readonly size: Schema.Struct<{
14105
+ readonly cols: Schema.Int;
14106
+ readonly rows: Schema.Int;
14107
+ }>;
14108
+ readonly output: Schema.Struct<{
14109
+ readonly head: Schema.Int;
14110
+ readonly tail: Schema.Int;
14111
+ }>;
14112
+ }>;
14113
+ }>;
13846
14114
  }, Schema.Struct<{
13847
14115
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
13848
14116
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -14409,6 +14677,38 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
14409
14677
  durability: "ephemeral";
14410
14678
  durable: undefined;
14411
14679
  data: Schema.Struct<{}>;
14680
+ }, Schema.Struct<{
14681
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
14682
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
14683
+ };
14684
+ readonly created: Schema.Finite;
14685
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
14686
+ readonly type: Schema.Literal<"artifact.updated">;
14687
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
14688
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14689
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14690
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14691
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14692
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
14693
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14694
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14695
+ }>, never, never>;
14696
+ }>>>, Schema.optionalKey<Schema.Struct<{
14697
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14698
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14699
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14700
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14701
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
14702
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14703
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14704
+ }>, never, never>;
14705
+ }>>, never, never>;
14706
+ readonly data: Schema.Struct<{}>;
14707
+ }> & {
14708
+ type: "artifact.updated";
14709
+ durability: "ephemeral";
14710
+ durable: undefined;
14711
+ data: Schema.Struct<{}>;
14412
14712
  }, Schema.Struct<{
14413
14713
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
14414
14714
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -1,5 +1,173 @@
1
1
  /** `server.experimental`: routes under /api/experimental, without compatibility guarantees. */
2
- export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").HttpApiGroup<"server.experimental", import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"media.get", "GET", "/api/experimental/media/:hash", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2
+ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").HttpApiGroup<"server.experimental", import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"artifacts.create", "POST", "/api/experimental/artifacts", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
3
+ readonly location: import("effect/Schema").optional<import("effect/Schema").Struct<{
4
+ readonly directory: import("effect/Schema").optional<import("effect/Schema").String>;
5
+ }>>;
6
+ }>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
7
+ readonly title: import("effect/Schema").String;
8
+ readonly files: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
9
+ readonly entry: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").String>>, import("effect/Schema").optionalKey<import("effect/Schema").String>, never, never>;
10
+ readonly provider: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").Trim, "Artifact.ProviderID">>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").Trim, "Artifact.ProviderID">>, never, never>;
11
+ readonly sessionID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
12
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
13
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
14
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
15
+ }>, never, never>;
16
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
17
+ readonly location: import("effect/Schema").Struct<{
18
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
19
+ }>;
20
+ readonly data: import("effect/Schema").Struct<{
21
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Artifact.ID"> & {
22
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
23
+ };
24
+ readonly provider: import("effect/Schema").brand<import("effect/Schema").Trim, "Artifact.ProviderID">;
25
+ readonly sessionID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
26
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
27
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
28
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
29
+ }>, never, never>;
30
+ readonly title: import("effect/Schema").String;
31
+ readonly entry: import("effect/Schema").String;
32
+ readonly url: import("effect/Schema").String;
33
+ readonly time: import("effect/Schema").Struct<{
34
+ readonly created: import("effect/Schema").Finite;
35
+ readonly updated: import("effect/Schema").Finite;
36
+ }>;
37
+ }>;
38
+ }>>, import("effect/Schema").toCodecJson<typeof import("../errors.js").LocationNotFoundError | typeof import("../errors.js").InvalidRequestError | typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").ProviderNotFoundError | typeof import("../errors.js").SessionNotFoundError | typeof import("../errors.js").ForbiddenError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"artifacts.delete", "DELETE", "/api/experimental/artifacts/:artifactID", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
39
+ artifactID: import("effect/Schema").brand<import("effect/Schema").String, "Artifact.ID"> & {
40
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
41
+ };
42
+ }>>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
43
+ readonly location: import("effect/Schema").optional<import("effect/Schema").Struct<{
44
+ readonly directory: import("effect/Schema").optional<import("effect/Schema").String>;
45
+ }>>;
46
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/http-api/HttpApiSchema").NoContent>, import("effect/Schema").toCodecJson<typeof import("../errors.js").LocationNotFoundError | typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").ForbiddenError | typeof import("../errors.js").ArtifactNotFoundError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"artifacts.get", "GET", "/api/experimental/artifacts/:artifactID", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
47
+ artifactID: import("effect/Schema").brand<import("effect/Schema").String, "Artifact.ID"> & {
48
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
49
+ };
50
+ }>>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
51
+ readonly location: import("effect/Schema").optional<import("effect/Schema").Struct<{
52
+ readonly directory: import("effect/Schema").optional<import("effect/Schema").String>;
53
+ }>>;
54
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
55
+ readonly location: import("effect/Schema").Struct<{
56
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
57
+ }>;
58
+ readonly data: import("effect/Schema").Struct<{
59
+ readonly info: import("effect/Schema").Struct<{
60
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Artifact.ID"> & {
61
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
62
+ };
63
+ readonly provider: import("effect/Schema").brand<import("effect/Schema").Trim, "Artifact.ProviderID">;
64
+ readonly sessionID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
65
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
66
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
67
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
68
+ }>, never, never>;
69
+ readonly title: import("effect/Schema").String;
70
+ readonly entry: import("effect/Schema").String;
71
+ readonly url: import("effect/Schema").String;
72
+ readonly time: import("effect/Schema").Struct<{
73
+ readonly created: import("effect/Schema").Finite;
74
+ readonly updated: import("effect/Schema").Finite;
75
+ }>;
76
+ }>;
77
+ readonly files: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
78
+ }>;
79
+ }>>, import("effect/Schema").toCodecJson<typeof import("../errors.js").LocationNotFoundError | typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").ForbiddenError | typeof import("../errors.js").ArtifactNotFoundError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"artifacts.list", "GET", "/api/experimental/artifacts", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
80
+ readonly location: import("effect/Schema").optional<import("effect/Schema").Struct<{
81
+ readonly directory: import("effect/Schema").optional<import("effect/Schema").String>;
82
+ }>>;
83
+ readonly sessionID: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
84
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
85
+ }>;
86
+ readonly provider: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").Trim, "Artifact.ProviderID">>;
87
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
88
+ readonly location: import("effect/Schema").Struct<{
89
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
90
+ }>;
91
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
92
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Artifact.ID"> & {
93
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
94
+ };
95
+ readonly provider: import("effect/Schema").brand<import("effect/Schema").Trim, "Artifact.ProviderID">;
96
+ readonly sessionID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
97
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
98
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
99
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
100
+ }>, never, never>;
101
+ readonly title: import("effect/Schema").String;
102
+ readonly entry: import("effect/Schema").String;
103
+ readonly url: import("effect/Schema").String;
104
+ readonly time: import("effect/Schema").Struct<{
105
+ readonly created: import("effect/Schema").Finite;
106
+ readonly updated: import("effect/Schema").Finite;
107
+ }>;
108
+ }>>;
109
+ }>>, import("effect/Schema").toCodecJson<typeof import("../errors.js").LocationNotFoundError | typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").SessionNotFoundError | typeof import("../errors.js").ForbiddenError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"artifacts.providers", "GET", "/api/experimental/artifacts/providers", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
110
+ readonly location: import("effect/Schema").optional<import("effect/Schema").Struct<{
111
+ readonly directory: import("effect/Schema").optional<import("effect/Schema").String>;
112
+ }>>;
113
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
114
+ readonly location: import("effect/Schema").Struct<{
115
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
116
+ }>;
117
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
118
+ readonly id: import("effect/Schema").brand<import("effect/Schema").Trim, "Artifact.ProviderID">;
119
+ readonly name: import("effect/Schema").String;
120
+ readonly capabilities: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["static", "server-code", "sqlite", "durable-objects"]>>;
121
+ readonly default: import("effect/Schema").Boolean;
122
+ }>>;
123
+ }>>, import("effect/Schema").toCodecJson<typeof import("../errors.js").LocationNotFoundError | typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").ForbiddenError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"artifacts.update", "PATCH", "/api/experimental/artifacts/:artifactID", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
124
+ artifactID: import("effect/Schema").brand<import("effect/Schema").String, "Artifact.ID"> & {
125
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
126
+ };
127
+ }>>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
128
+ readonly location: import("effect/Schema").optional<import("effect/Schema").Struct<{
129
+ readonly directory: import("effect/Schema").optional<import("effect/Schema").String>;
130
+ }>>;
131
+ }>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
132
+ readonly title: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").String>>, import("effect/Schema").optionalKey<import("effect/Schema").String>, never, never>;
133
+ readonly files: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
134
+ readonly entry: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").String>>, import("effect/Schema").optionalKey<import("effect/Schema").String>, never, never>;
135
+ readonly sessionID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
136
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
137
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
138
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
139
+ }>, never, never>;
140
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
141
+ readonly location: import("effect/Schema").Struct<{
142
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
143
+ }>;
144
+ readonly data: import("effect/Schema").Struct<{
145
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Artifact.ID"> & {
146
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
147
+ };
148
+ readonly provider: import("effect/Schema").brand<import("effect/Schema").Trim, "Artifact.ProviderID">;
149
+ readonly sessionID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
150
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
151
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
152
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
153
+ }>, never, never>;
154
+ readonly title: import("effect/Schema").String;
155
+ readonly entry: import("effect/Schema").String;
156
+ readonly url: import("effect/Schema").String;
157
+ readonly time: import("effect/Schema").Struct<{
158
+ readonly created: import("effect/Schema").Finite;
159
+ readonly updated: import("effect/Schema").Finite;
160
+ }>;
161
+ }>;
162
+ }>>, import("effect/Schema").toCodecJson<typeof import("../errors.js").LocationNotFoundError | typeof import("../errors.js").InvalidRequestError | typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").SessionNotFoundError | typeof import("../errors.js").ForbiddenError | typeof import("../errors.js").ArtifactNotFoundError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"artifacts.view", "GET", "/api/experimental/artifacts/:artifactID/view/*", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
163
+ artifactID: import("effect/Schema").brand<import("effect/Schema").String, "Artifact.ID"> & {
164
+ create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
165
+ };
166
+ }>>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
167
+ readonly location: import("effect/Schema").optional<import("effect/Schema").Struct<{
168
+ readonly directory: import("effect/Schema").optional<import("effect/Schema").String>;
169
+ }>>;
170
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Uint8Array>, import("effect/Schema").toCodecJson<typeof import("../errors.js").LocationNotFoundError | typeof import("../errors.js").InvalidRequestError | typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").FileNotFoundError | typeof import("../errors.js").ForbiddenError | typeof import("../errors.js").ArtifactNotFoundError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"media.get", "GET", "/api/experimental/media/:hash", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
3
171
  hash: import("effect/Schema").String;
4
172
  }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Uint8Array>, import("effect/Schema").toCodecJson<typeof import("../errors.js").InvalidRequestError | typeof import("../errors.js").FileNotFoundError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"persistentPty.connect", "GET", "/api/experimental/persistent-pty/:ptyID/connect", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
5
173
  ptyID: import("effect/Schema").brand<import("effect/Schema").String, "PtyID"> & {
@@ -51,6 +219,7 @@ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").H
51
219
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
52
220
  create: () => string & import("effect/Brand").Brand<"SessionID">;
53
221
  };
222
+ readonly userTitle: import("effect/Schema").NullOr<import("effect/Schema").String>;
54
223
  readonly foregroundProcess: import("effect/Schema").NullOr<import("effect/Schema").String>;
55
224
  readonly size: import("effect/Schema").Struct<{
56
225
  readonly cols: import("effect/Schema").Int;
@@ -82,6 +251,7 @@ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").H
82
251
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
83
252
  create: () => string & import("effect/Brand").Brand<"SessionID">;
84
253
  };
254
+ readonly userTitle: import("effect/Schema").NullOr<import("effect/Schema").String>;
85
255
  readonly foregroundProcess: import("effect/Schema").NullOr<import("effect/Schema").String>;
86
256
  readonly size: import("effect/Schema").Struct<{
87
257
  readonly cols: import("effect/Schema").Int;
@@ -119,6 +289,7 @@ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").H
119
289
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
120
290
  create: () => string & import("effect/Brand").Brand<"SessionID">;
121
291
  };
292
+ readonly userTitle: import("effect/Schema").NullOr<import("effect/Schema").String>;
122
293
  readonly foregroundProcess: import("effect/Schema").NullOr<import("effect/Schema").String>;
123
294
  readonly size: import("effect/Schema").Struct<{
124
295
  readonly cols: import("effect/Schema").Int;
@@ -181,6 +352,7 @@ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").H
181
352
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
182
353
  create: () => string & import("effect/Brand").Brand<"SessionID">;
183
354
  };
355
+ readonly userTitle: import("effect/Schema").NullOr<import("effect/Schema").String>;
184
356
  readonly foregroundProcess: import("effect/Schema").NullOr<import("effect/Schema").String>;
185
357
  readonly size: import("effect/Schema").Struct<{
186
358
  readonly cols: import("effect/Schema").Int;
@@ -205,10 +377,14 @@ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").H
205
377
  };
206
378
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
207
379
  readonly attachmentID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").String>>, import("effect/Schema").optionalKey<import("effect/Schema").String>, never, never>;
208
- readonly size: import("effect/Schema").Struct<{
380
+ readonly size: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
209
381
  readonly cols: import("effect/Schema").Int;
210
382
  readonly rows: import("effect/Schema").Int;
211
- }>;
383
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
384
+ readonly cols: import("effect/Schema").Int;
385
+ readonly rows: import("effect/Schema").Int;
386
+ }>>, never, never>;
387
+ readonly title: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").NullOr<import("effect/Schema").String>>>, import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").String>>, never, never>;
212
388
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
213
389
  readonly data: import("effect/Schema").Struct<{
214
390
  readonly id: import("effect/Schema").brand<import("effect/Schema").String, "PtyID"> & {
@@ -225,6 +401,7 @@ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").H
225
401
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
226
402
  create: () => string & import("effect/Brand").Brand<"SessionID">;
227
403
  };
404
+ readonly userTitle: import("effect/Schema").NullOr<import("effect/Schema").String>;
228
405
  readonly foregroundProcess: import("effect/Schema").NullOr<import("effect/Schema").String>;
229
406
  readonly size: import("effect/Schema").Struct<{
230
407
  readonly cols: import("effect/Schema").Int;
@@ -235,7 +412,7 @@ export declare const ExperimentalGroup: import("effect/http-api/HttpApiGroup").H
235
412
  readonly tail: import("effect/Schema").Int;
236
413
  }>;
237
414
  }>;
238
- }>>, import("effect/Schema").toCodecJson<typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").PtyNotFoundError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"schedule.create", "POST", "/api/experimental/schedule", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
415
+ }>>, import("effect/Schema").toCodecJson<typeof import("../errors.js").ServiceUnavailableError | typeof import("../errors.js").PtyNotFoundError | typeof import("../errors.js").PtyFeatureUnsupportedError>, never, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"schedule.create", "POST", "/api/experimental/schedule", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
239
416
  readonly name: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").String>>, import("effect/Schema").optionalKey<import("effect/Schema").String>, never, never>;
240
417
  readonly when: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
241
418
  readonly tz: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").String>>, import("effect/Schema").optionalKey<import("effect/Schema").String>, never, never>;
@@ -1,5 +1,6 @@
1
+ import { ArtifactEndpoints } from "./artifact.js";
1
2
  import { MediaGetEndpoint } from "./media.js";
2
3
  import { PersistentPtyGroup } from "./persistent-pty.js";
3
4
  import { ScheduleEndpoints } from "./schedule.js";
4
5
  /** `server.experimental`: routes under /api/experimental, without compatibility guarantees. */
5
- export const ExperimentalGroup = PersistentPtyGroup.add(MediaGetEndpoint, ...ScheduleEndpoints);
6
+ export const ExperimentalGroup = PersistentPtyGroup.add(MediaGetEndpoint, ...ScheduleEndpoints, ...ArtifactEndpoints);
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
3
- import { ForbiddenError, InvalidRequestError, PtyNotFoundError, ServiceUnavailableError } from "../errors.js";
3
+ import { ForbiddenError, InvalidRequestError, PtyFeatureUnsupportedError, PtyNotFoundError, ServiceUnavailableError } from "../errors.js";
4
4
  import { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE } from "./pty.js";
5
5
  export { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE };
6
6
  export declare const PERSISTENT_PTY_CONNECT_PATH = "/api/experimental/persistent-pty/:ptyID/connect";
@@ -55,6 +55,7 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
55
55
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
56
56
  create: () => string & import("effect/Brand").Brand<"SessionID">;
57
57
  };
58
+ readonly userTitle: Schema.NullOr<Schema.String>;
58
59
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
59
60
  readonly size: Schema.Struct<{
60
61
  readonly cols: Schema.Int;
@@ -86,6 +87,7 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
86
87
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
87
88
  create: () => string & import("effect/Brand").Brand<"SessionID">;
88
89
  };
90
+ readonly userTitle: Schema.NullOr<Schema.String>;
89
91
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
90
92
  readonly size: Schema.Struct<{
91
93
  readonly cols: Schema.Int;
@@ -123,6 +125,7 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
123
125
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
124
126
  create: () => string & import("effect/Brand").Brand<"SessionID">;
125
127
  };
128
+ readonly userTitle: Schema.NullOr<Schema.String>;
126
129
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
127
130
  readonly size: Schema.Struct<{
128
131
  readonly cols: Schema.Int;
@@ -185,6 +188,7 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
185
188
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
186
189
  create: () => string & import("effect/Brand").Brand<"SessionID">;
187
190
  };
191
+ readonly userTitle: Schema.NullOr<Schema.String>;
188
192
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
189
193
  readonly size: Schema.Struct<{
190
194
  readonly cols: Schema.Int;
@@ -209,10 +213,14 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
209
213
  };
210
214
  }>>, never, Schema.toCodecJson<Schema.Struct<{
211
215
  readonly attachmentID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
212
- readonly size: Schema.Struct<{
216
+ readonly size: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
213
217
  readonly cols: Schema.Int;
214
218
  readonly rows: Schema.Int;
215
- }>;
219
+ }>>>, Schema.optionalKey<Schema.Struct<{
220
+ readonly cols: Schema.Int;
221
+ readonly rows: Schema.Int;
222
+ }>>, never, never>;
223
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NullOr<Schema.String>>>, Schema.optionalKey<Schema.NullOr<Schema.String>>, never, never>;
216
224
  }>>, never, Schema.toCodecJson<Schema.Struct<{
217
225
  readonly data: Schema.Struct<{
218
226
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
@@ -229,6 +237,7 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
229
237
  readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
230
238
  create: () => string & import("effect/Brand").Brand<"SessionID">;
231
239
  };
240
+ readonly userTitle: Schema.NullOr<Schema.String>;
232
241
  readonly foregroundProcess: Schema.NullOr<Schema.String>;
233
242
  readonly size: Schema.Struct<{
234
243
  readonly cols: Schema.Int;
@@ -239,4 +248,4 @@ export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.exper
239
248
  readonly tail: Schema.Int;
240
249
  }>;
241
250
  }>;
242
- }>>, Schema.toCodecJson<typeof ServiceUnavailableError | typeof PtyNotFoundError>, never, never>, false>;
251
+ }>>, Schema.toCodecJson<typeof ServiceUnavailableError | typeof PtyNotFoundError | typeof PtyFeatureUnsupportedError>, never, never>, false>;
@@ -4,7 +4,7 @@ import { PtyTicket } from "@opencode/schema/pty-ticket";
4
4
  import { Session } from "@opencode/schema/session";
5
5
  import { Schema } from "effect";
6
6
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
7
- import { ForbiddenError, InvalidRequestError, PtyNotFoundError, ServiceUnavailableError } from "../errors.js";
7
+ import { ForbiddenError, InvalidRequestError, PtyFeatureUnsupportedError, PtyNotFoundError, ServiceUnavailableError, } from "../errors.js";
8
8
  import { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE } from "./pty.js";
9
9
  export { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE };
10
10
  export const PERSISTENT_PTY_CONNECT_PATH = "/api/experimental/persistent-pty/:ptyID/connect";
@@ -55,8 +55,11 @@ export const PersistentPtyGroup = HttpApiGroup.make("server.experimental")
55
55
  params: { ptyID: Pty.ID },
56
56
  payload: PersistentPty.UpdateInput,
57
57
  success: Schema.Struct({ data: PersistentPty.Info }),
58
- error: terminalErrors,
59
- }).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.update" })))
58
+ error: [...terminalErrors, PtyFeatureUnsupportedError],
59
+ }).annotateMerge(OpenApi.annotations({
60
+ identifier: "experimental.persistentPty.update",
61
+ description: "Resize when size is present and rename when title is present; a null title clears the user title so the shell's title shows again. Renaming fails with 501 while the terminal service predates renaming.",
62
+ })))
60
63
  .add(HttpApiEndpoint.get("persistentPty.snapshot", "/api/experimental/persistent-pty/:ptyID/snapshot", {
61
64
  params: { ptyID: Pty.ID },
62
65
  success: Schema.Struct({ data: PersistentPty.Snapshot }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/protocol",
4
- "version": "2.2.3",
4
+ "version": "2.2.4",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "typecheck:tsc": "tsc --noEmit"
36
36
  },
37
37
  "dependencies": {
38
- "@opencode/schema": "2.2.3",
38
+ "@opencode/schema": "2.2.4",
39
39
  "effect": "4.0.6"
40
40
  },
41
41
  "devDependencies": {