@opencode/protocol 2.0.32 → 2.1.1

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.
@@ -5,10 +5,10 @@ import { Session } from "@opencode/schema/session";
5
5
  import { SessionStats } from "@opencode/schema/session-stats";
6
6
  import { InstructionEntry } from "@opencode/schema/instruction-entry";
7
7
  import { Project } from "@opencode/schema/project";
8
- import { AbsolutePath, DateTimeUtcFromMillis, NonNegativeInt, PositiveInt, RelativePath, statics, } from "@opencode/schema/schema";
8
+ import { DateTimeUtcFromMillis, NonNegativeInt, PositiveInt } from "@opencode/schema/schema";
9
9
  import { Event } from "@opencode/schema/event";
10
- import { Context, Effect, Result, Schema, SchemaGetter, SchemaParser, Struct } from "effect";
11
- import { Base64Url } from "effect/encoding";
10
+ import { SessionLegacy } from "@opencode/schema/session-legacy";
11
+ import { Context, Schema, SchemaGetter, Struct } from "effect";
12
12
  import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
13
13
  import { ConflictError, LocationNotFoundError, CommandExecutionError, CommandNotFoundError, FormAlreadySettledError, FormInvalidAnswerError, FormNotFoundError, InvalidCursorError, InvalidRequestError, MessageNotFoundError, ServiceUnavailableError, SessionBusyError, SessionNotFoundError, SkillNotFoundError, UnknownError, } from "../errors.js";
14
14
  import { Agent } from "@opencode/schema/agent";
@@ -21,64 +21,6 @@ import { EventLog } from "@opencode/schema/event-log";
21
21
  import { FileDiff } from "@opencode/schema/file-diff";
22
22
  import { Form } from "@opencode/schema/form";
23
23
  import { PublicSessionMessage } from "./message.js";
24
- const ParentIDFilter = Schema.Union([
25
- Session.ID,
26
- Schema.Null.pipe(Schema.encodeTo(Schema.Literal("null"), {
27
- decode: SchemaGetter.transform(() => null),
28
- encode: SchemaGetter.transform(() => "null"),
29
- })),
30
- ]).annotate({
31
- description: "Filter by parent session. Use null to return only root sessions.",
32
- });
33
- const SessionsQueryFields = {
34
- limit: Schema.NumberFromString.pipe(Schema.decodeTo(PositiveInt), Schema.optional).annotate({
35
- description: "Maximum number of sessions to return. Defaults to the newest 50 sessions.",
36
- }),
37
- order: Schema.optional(Schema.Union([Schema.Literal("asc"), Schema.Literal("desc")])).annotate({
38
- description: "Session order for the first page. Use desc for newest first or asc for oldest first.",
39
- }),
40
- search: Schema.optional(Schema.String),
41
- parentID: ParentIDFilter.pipe(Schema.optional),
42
- };
43
- const SessionsDirectoryQuery = Schema.Struct({
44
- ...SessionsQueryFields,
45
- directory: AbsolutePath,
46
- });
47
- const SessionsProjectQuery = Schema.Struct({
48
- ...SessionsQueryFields,
49
- project: Project.ID,
50
- subpath: RelativePath.pipe(Schema.optional),
51
- });
52
- const SessionsAllQuery = Schema.Struct(SessionsQueryFields);
53
- const withCursor = (schema) => schema.mapFields((fields) => ({
54
- ...Struct.omit(fields, ["limit"]),
55
- anchor: Session.ListAnchor,
56
- }));
57
- const SessionsCursorInput = Schema.Union([
58
- withCursor(SessionsDirectoryQuery),
59
- withCursor(SessionsProjectQuery),
60
- withCursor(SessionsAllQuery),
61
- ]);
62
- const SessionsCursorJson = Schema.fromJsonString(SessionsCursorInput);
63
- const encodeSessionsCursor = Schema.encodeSync(SessionsCursorJson);
64
- const decodeSessionsCursor = Schema.decodeUnknownEffect(SessionsCursorJson);
65
- const invalidCursor = "Invalid cursor";
66
- export const SessionsCursor = Schema.String.pipe(Schema.brand("SessionsCursor"), Schema.annotate({
67
- identifier: "SessionsCursor",
68
- description: "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.",
69
- }), statics((schema) => {
70
- // Read the default constructor without caching it on the schema, so `make` can be replaced.
71
- const make = SchemaParser.make(schema);
72
- return {
73
- make: (input) => make(Base64Url.encode(encodeSessionsCursor(input))),
74
- parse: (input) => Effect.suspend(() => {
75
- const result = Base64Url.decodeString(input);
76
- return Result.isFailure(result)
77
- ? Effect.fail(invalidCursor)
78
- : decodeSessionsCursor(result.success).pipe(Effect.mapError(() => invalidCursor));
79
- }),
80
- };
81
- }));
82
24
  const SessionActive = Schema.Struct({
83
25
  type: Schema.Literal("running"),
84
26
  }).annotate({ identifier: "SessionActive" });
@@ -104,6 +46,15 @@ const PublicInboxInfo = Schema.Union([
104
46
  SessionInbox.Compaction,
105
47
  PublicMove,
106
48
  ]).annotate({ identifier: "Session.Inbox.Info" });
49
+ // Transcripts exported before v2.1 carry older names for native data. The wire stays plain JSON so any export file
50
+ // is accepted; decoding upgrades those names and then validates the current message shape.
51
+ const ImportedMessages = Schema.Array(Schema.Json).pipe(Schema.decodeTo(Schema.Array(Schema.Unknown), {
52
+ decode: SchemaGetter.transform(SessionLegacy.messages),
53
+ encode: SchemaGetter.passthrough({ strict: false }),
54
+ }), Schema.decodeTo(Schema.Array(PublicSessionMessage), {
55
+ decode: SchemaGetter.passthrough({ strict: false }),
56
+ encode: SchemaGetter.passthrough({ strict: false }),
57
+ }));
107
58
  const FormCreatePayload = Schema.Struct({
108
59
  id: Form.ID.pipe(Schema.optional),
109
60
  title: Form.Info.fields.title,
@@ -114,12 +65,14 @@ const BooleanFromString = Schema.Literals(["true", "false"]).pipe(Schema.decodeT
114
65
  decode: SchemaGetter.transform((value) => value === "true"),
115
66
  encode: SchemaGetter.transform((value) => (value ? "true" : "false")),
116
67
  }));
68
+ // Kept so existing imports of SessionsCursor from Protocol keep working.
69
+ export const SessionsCursor = Session.ListCursor;
117
70
  export const SessionsQuery = Schema.Struct({
118
- ...SessionsQueryFields,
119
- directory: AbsolutePath.pipe(Schema.optional),
120
- project: Project.ID.pipe(Schema.optional),
121
- subpath: RelativePath.pipe(Schema.optional),
122
- cursor: SessionsCursor.pipe(Schema.optional),
71
+ limit: Schema.NumberFromString.pipe(Schema.decodeTo(PositiveInt), Schema.optional).annotate({
72
+ description: "Maximum number of sessions to return. Defaults to the newest 50 sessions.",
73
+ }),
74
+ ...Session.ListFilter.fields,
75
+ cursor: Session.ListCursor.pipe(Schema.optional),
123
76
  }).annotate({ identifier: "SessionsQuery" });
124
77
  export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddleware) => HttpApiGroup.make("server.session")
125
78
  .add(HttpApiEndpoint.get("session.list", "/api/session", {
@@ -127,8 +80,8 @@ export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddlewa
127
80
  success: Schema.Struct({
128
81
  data: Schema.Array(PublicSessionInfo),
129
82
  cursor: Schema.Struct({
130
- previous: SessionsCursor.pipe(Schema.optional),
131
- next: SessionsCursor.pipe(Schema.optional),
83
+ previous: Session.ListCursor.pipe(Schema.optional),
84
+ next: Session.ListCursor.pipe(Schema.optional),
132
85
  }),
133
86
  }).annotate({ identifier: "SessionsResponse" }),
134
87
  error: [InvalidCursorError, InvalidRequestError],
@@ -172,7 +125,8 @@ export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddlewa
172
125
  })))
173
126
  .add(HttpApiEndpoint.post("session.import", "/api/experimental/session/import", {
174
127
  payload: Schema.Struct({
175
- ...PublicSessionTransfer.fields,
128
+ info: PublicSessionTransfer.fields.info,
129
+ messages: ImportedMessages,
176
130
  location: Location.PublicRef.pipe(Schema.optional),
177
131
  }),
178
132
  success: Schema.Struct({ data: PublicSessionInfo }),
@@ -180,7 +134,7 @@ export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddlewa
180
134
  }).annotateMerge(OpenApi.annotations({
181
135
  identifier: "experimental.session.import",
182
136
  summary: "Import session",
183
- description: "Import a projected session transcript at the requested location. If parentID is supplied, the parent session must already exist; import parents before children.",
137
+ description: "Import a projected session transcript at the requested location. Accepts transcripts exported by earlier releases. If parentID is supplied, the parent session must already exist; import parents before children.",
184
138
  })))
185
139
  .add(HttpApiEndpoint.get("session.export", "/api/experimental/session/:sessionID/export", {
186
140
  params: { sessionID: Session.ID },
@@ -259,6 +213,9 @@ export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddlewa
259
213
  title: Schema.String.pipe(Schema.optional),
260
214
  metadata: Session.Metadata.pipe(Schema.optional),
261
215
  permissions: Permission.Ruleset.pipe(Schema.optional),
216
+ archived: Schema.Boolean.pipe(Schema.optional).annotate({
217
+ description: "Archive the session with true or restore it with false. Repeating the current state is a no-op.",
218
+ }),
262
219
  }),
263
220
  success: HttpApiSchema.NoContent,
264
221
  error: SessionNotFoundError,
@@ -1,15 +1,20 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
3
3
  import { ShellNotFoundError } from "../errors.js";
4
- export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpApiEndpoint.HttpApiEndpoint<"shell.list", "GET", "/api/shell", never, Schema.toCodecStringTree<Schema.Struct<{
4
+ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpApiEndpoint.HttpApiEndpoint<"shell.create", "POST", "/api/shell", never, Schema.toCodecStringTree<Schema.Struct<{
5
5
  readonly location: Schema.optional<Schema.Struct<{
6
6
  readonly directory: Schema.optional<Schema.String>;
7
7
  }>>;
8
- }>>, never, never, Schema.toCodecJson<Schema.Struct<{
8
+ }>>, Schema.toCodecJson<Schema.Struct<{
9
+ readonly command: Schema.String;
10
+ readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
11
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
12
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
13
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
9
14
  readonly location: Schema.Struct<{
10
15
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
11
16
  }>;
12
- readonly data: Schema.$Array<Schema.Struct<{
17
+ readonly data: Schema.Struct<{
13
18
  readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
14
19
  create: () => string & import("effect/Brand").Brand<"Shell.ID">;
15
20
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
@@ -27,17 +32,17 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
27
32
  readonly started: Schema.Finite;
28
33
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
29
34
  }>;
30
- }>>;
31
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.create", "POST", "/api/shell", never, Schema.toCodecStringTree<Schema.Struct<{
35
+ }>;
36
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.get", "GET", "/api/shell/:id", Schema.toCodecStringTree<Schema.Struct<{
37
+ id: Schema.brand<Schema.String, "Shell.ID"> & {
38
+ create: () => string & import("effect/Brand").Brand<"Shell.ID">;
39
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
40
+ };
41
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
32
42
  readonly location: Schema.optional<Schema.Struct<{
33
43
  readonly directory: Schema.optional<Schema.String>;
34
44
  }>>;
35
- }>>, Schema.toCodecJson<Schema.Struct<{
36
- readonly command: Schema.String;
37
- readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
38
- readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
39
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
40
- }>>, never, Schema.toCodecJson<Schema.Struct<{
45
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
41
46
  readonly location: Schema.Struct<{
42
47
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
43
48
  }>;
@@ -60,12 +65,7 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
60
65
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
61
66
  }>;
62
67
  }>;
63
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.get", "GET", "/api/shell/:id", Schema.toCodecStringTree<Schema.Struct<{
64
- id: Schema.brand<Schema.String, "Shell.ID"> & {
65
- create: () => string & import("effect/Brand").Brand<"Shell.ID">;
66
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
67
- };
68
- }>>, Schema.toCodecStringTree<Schema.Struct<{
68
+ }>>, Schema.toCodecJson<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.list", "GET", "/api/shell", never, Schema.toCodecStringTree<Schema.Struct<{
69
69
  readonly location: Schema.optional<Schema.Struct<{
70
70
  readonly directory: Schema.optional<Schema.String>;
71
71
  }>>;
@@ -73,7 +73,7 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
73
73
  readonly location: Schema.Struct<{
74
74
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
75
75
  }>;
76
- readonly data: Schema.Struct<{
76
+ readonly data: Schema.$Array<Schema.Struct<{
77
77
  readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
78
78
  create: () => string & import("effect/Brand").Brand<"Shell.ID">;
79
79
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
@@ -91,8 +91,8 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
91
91
  readonly started: Schema.Finite;
92
92
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
93
93
  }>;
94
- }>;
95
- }>>, Schema.toCodecJson<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.output", "GET", "/api/shell/:id/output", Schema.toCodecStringTree<Schema.Struct<{
94
+ }>>;
95
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.output", "GET", "/api/shell/:id/output", Schema.toCodecStringTree<Schema.Struct<{
96
96
  id: Schema.brand<Schema.String, "Shell.ID"> & {
97
97
  create: () => string & import("effect/Brand").Brand<"Shell.ID">;
98
98
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
@@ -7,12 +7,7 @@ declare const VcsInitNotSupportedError_base: Schema.Class<VcsInitNotSupportedErr
7
7
  }>, import("effect/Cause").YieldableError>;
8
8
  export declare class VcsInitNotSupportedError extends VcsInitNotSupportedError_base {
9
9
  }
10
- export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEndpoint.HttpApiEndpoint<"vcs.init", "POST", "/api/vcs/init", never, Schema.toCodecStringTree<Schema.Struct<{
11
- readonly provider: Schema.optional<Schema.String>;
12
- readonly location: Schema.optional<Schema.Struct<{
13
- readonly directory: Schema.optional<Schema.String>;
14
- }>>;
15
- }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError | typeof ConflictError | typeof ServiceUnavailableError | typeof VcsInitNotSupportedError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.get", "GET", "/api/vcs", never, Schema.toCodecStringTree<Schema.Struct<{
10
+ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEndpoint.HttpApiEndpoint<"vcs.base", "GET", "/api/vcs/base", never, Schema.toCodecStringTree<Schema.Struct<{
16
11
  readonly location: Schema.optional<Schema.Struct<{
17
12
  readonly directory: Schema.optional<Schema.String>;
18
13
  }>>;
@@ -20,43 +15,41 @@ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEn
20
15
  readonly location: Schema.Struct<{
21
16
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
22
17
  }>;
23
- readonly data: Schema.Struct<{
24
- readonly provider: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
25
- readonly branch: Schema.Struct<{
26
- readonly current: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
27
- readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
28
- }>;
29
- }>;
30
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.base", "GET", "/api/vcs/base", never, Schema.toCodecStringTree<Schema.Struct<{
18
+ readonly data: Schema.NullOr<Schema.Struct<{
19
+ readonly name: Schema.String;
20
+ readonly ref: Schema.String;
21
+ readonly source: Schema.Literals<readonly ["reflog", "default"]>;
22
+ }>>;
23
+ }>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.branch.list", "GET", "/api/vcs/branch", never, Schema.toCodecStringTree<Schema.Struct<{
31
24
  readonly location: Schema.optional<Schema.Struct<{
32
25
  readonly directory: Schema.optional<Schema.String>;
33
26
  }>>;
27
+ readonly search: Schema.optional<Schema.String>;
28
+ readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
34
29
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
35
30
  readonly location: Schema.Struct<{
36
31
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
37
32
  }>;
38
- readonly data: Schema.NullOr<Schema.Struct<{
39
- readonly name: Schema.String;
40
- readonly ref: Schema.String;
41
- readonly source: Schema.Literals<readonly ["reflog", "default"]>;
42
- }>>;
43
- }>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.status", "GET", "/api/vcs/status", never, Schema.toCodecStringTree<Schema.Struct<{
33
+ readonly data: Schema.$Array<Schema.String>;
34
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.diff", "GET", "/api/vcs/diff", never, Schema.toCodecStringTree<Schema.Struct<{
44
35
  readonly location: Schema.optional<Schema.Struct<{
45
36
  readonly directory: Schema.optional<Schema.String>;
46
37
  }>>;
38
+ readonly mode: Schema.Literals<readonly ["working", "branch", "committed"]>;
39
+ readonly base: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
40
+ readonly context: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
47
41
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
48
42
  readonly location: Schema.Struct<{
49
43
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
50
44
  }>;
51
45
  readonly data: Schema.$Array<Schema.Struct<{
52
46
  readonly file: Schema.String;
47
+ readonly patch: Schema.String;
53
48
  readonly additions: Schema.Int;
54
49
  readonly deletions: Schema.Int;
55
50
  readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
56
51
  }>>;
57
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.branch.list", "GET", "/api/vcs/branch", never, Schema.toCodecStringTree<Schema.Struct<{
58
- readonly search: Schema.optional<Schema.String>;
59
- readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
52
+ }>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.get", "GET", "/api/vcs", never, Schema.toCodecStringTree<Schema.Struct<{
60
53
  readonly location: Schema.optional<Schema.Struct<{
61
54
  readonly directory: Schema.optional<Schema.String>;
62
55
  }>>;
@@ -64,11 +57,19 @@ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEn
64
57
  readonly location: Schema.Struct<{
65
58
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
66
59
  }>;
67
- readonly data: Schema.$Array<Schema.String>;
68
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.diff", "GET", "/api/vcs/diff", never, Schema.toCodecStringTree<Schema.Struct<{
69
- readonly mode: Schema.Literals<readonly ["working", "branch", "committed"]>;
70
- readonly base: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
71
- readonly context: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
60
+ readonly data: Schema.Struct<{
61
+ readonly provider: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
62
+ readonly branch: Schema.Struct<{
63
+ readonly current: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
64
+ readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
65
+ }>;
66
+ }>;
67
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.init", "POST", "/api/vcs/init", never, Schema.toCodecStringTree<Schema.Struct<{
68
+ readonly location: Schema.optional<Schema.Struct<{
69
+ readonly directory: Schema.optional<Schema.String>;
70
+ }>>;
71
+ readonly provider: Schema.optional<Schema.String>;
72
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError | typeof ConflictError | typeof ServiceUnavailableError | typeof VcsInitNotSupportedError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.status", "GET", "/api/vcs/status", never, Schema.toCodecStringTree<Schema.Struct<{
72
73
  readonly location: Schema.optional<Schema.Struct<{
73
74
  readonly directory: Schema.optional<Schema.String>;
74
75
  }>>;
@@ -78,10 +79,9 @@ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEn
78
79
  }>;
79
80
  readonly data: Schema.$Array<Schema.Struct<{
80
81
  readonly file: Schema.String;
81
- readonly patch: Schema.String;
82
82
  readonly additions: Schema.Int;
83
83
  readonly deletions: Schema.Int;
84
84
  readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
85
85
  }>>;
86
- }>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never>, false>;
86
+ }>>, never, never, never>, false>;
87
87
  export {};
@@ -10,14 +10,7 @@ declare const WorktreeError_base: Schema.Class<WorktreeError, Schema.TaggedStruc
10
10
  }>, import("effect/Cause").YieldableError>;
11
11
  export declare class WorktreeError extends WorktreeError_base {
12
12
  }
13
- export declare const WorktreeGroup: HttpApiGroup.HttpApiGroup<"server.worktree", HttpApiEndpoint.HttpApiEndpoint<"worktree.list", "GET", "/api/worktree", never, Schema.toCodecStringTree<Schema.Struct<{
14
- readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
15
- global: string & import("effect/Brand").Brand<"Project.ID">;
16
- };
17
- }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
18
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
19
- readonly strategy: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
20
- }>>>, Schema.toCodecJson<typeof ProjectNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"worktree.create", "POST", "/api/worktree", never, never, Schema.toCodecJson<Schema.Struct<{
13
+ export declare const WorktreeGroup: HttpApiGroup.HttpApiGroup<"server.worktree", HttpApiEndpoint.HttpApiEndpoint<"worktree.create", "POST", "/api/worktree", never, never, Schema.toCodecJson<Schema.Struct<{
21
14
  readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
22
15
  global: string & import("effect/Brand").Brand<"Project.ID">;
23
16
  };
@@ -27,15 +20,22 @@ export declare const WorktreeGroup: HttpApiGroup.HttpApiGroup<"server.worktree",
27
20
  readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
28
21
  }>>, never, Schema.toCodecJson<Schema.Struct<{
29
22
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
30
- }>>, Schema.toCodecJson<typeof ProjectNotFoundError | typeof WorktreeError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"worktree.remove", "DELETE", "/api/worktree", never, never, Schema.toCodecJson<Schema.Struct<{
23
+ }>>, Schema.toCodecJson<typeof ProjectNotFoundError | typeof WorktreeError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"worktree.list", "GET", "/api/worktree", never, Schema.toCodecStringTree<Schema.Struct<{
31
24
  readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
32
25
  global: string & import("effect/Brand").Brand<"Project.ID">;
33
26
  };
27
+ }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
34
28
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
35
- readonly force: Schema.Boolean;
36
- }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof ProjectNotFoundError | typeof WorktreeError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"worktree.refresh", "POST", "/api/worktree/refresh", never, never, Schema.toCodecJson<Schema.Struct<{
29
+ readonly strategy: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
30
+ }>>>, Schema.toCodecJson<typeof ProjectNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"worktree.refresh", "POST", "/api/worktree/refresh", never, never, Schema.toCodecJson<Schema.Struct<{
37
31
  readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
38
32
  global: string & import("effect/Brand").Brand<"Project.ID">;
39
33
  };
34
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof ProjectNotFoundError | typeof WorktreeError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"worktree.remove", "DELETE", "/api/worktree", never, never, Schema.toCodecJson<Schema.Struct<{
35
+ readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
36
+ global: string & import("effect/Brand").Brand<"Project.ID">;
37
+ };
38
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
39
+ readonly force: Schema.Boolean;
40
40
  }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof ProjectNotFoundError | typeof WorktreeError>, never, never>, false>;
41
41
  export {};