@opencode/protocol 0.0.0-dev-21106 → 0.0.0-dev-21107

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.
@@ -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 {};