@opencode/protocol 2.0.3 → 2.0.5
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/api.d.ts +4 -6
- package/dist/api.js +4 -8
- package/dist/client.d.ts +0 -2
- package/dist/client.js +0 -2
- package/dist/errors.d.ts +20 -0
- package/dist/errors.js +17 -0
- package/dist/groups/agent.d.ts +6 -5
- package/dist/groups/agent.js +2 -2
- package/dist/groups/command.d.ts +3 -3
- package/dist/groups/command.js +1 -1
- package/dist/groups/config.d.ts +5 -13
- package/dist/groups/config.js +11 -18
- package/dist/groups/credential.d.ts +3 -18
- package/dist/groups/credential.js +3 -10
- package/dist/groups/debug.d.ts +0 -8
- package/dist/groups/debug.js +3 -3
- package/dist/groups/event.d.ts +99 -74
- package/dist/groups/event.js +3 -3
- package/dist/groups/form.d.ts +6 -654
- package/dist/groups/form.js +6 -83
- package/dist/groups/fs.d.ts +6 -6
- package/dist/groups/fs.js +3 -3
- package/dist/groups/generate.d.ts +1 -1
- package/dist/groups/generate.js +2 -2
- package/dist/groups/integration.d.ts +27 -27
- package/dist/groups/integration.js +19 -16
- package/dist/groups/location.d.ts +10 -4
- package/dist/groups/location.js +2 -3
- package/dist/groups/mcp.d.ts +11 -13
- package/dist/groups/mcp.js +10 -10
- package/dist/groups/message.d.ts +698 -40
- package/dist/groups/message.js +26 -3
- package/dist/groups/migration.js +1 -1
- package/dist/groups/model.d.ts +12 -9
- package/dist/groups/model.js +2 -2
- package/dist/groups/permission.d.ts +9 -16
- package/dist/groups/permission.js +8 -20
- package/dist/groups/persistent-pty.js +1 -1
- package/dist/groups/plugin.d.ts +7 -12
- package/dist/groups/plugin.js +3 -13
- package/dist/groups/project.d.ts +1 -14
- package/dist/groups/project.js +2 -13
- package/dist/groups/provider.d.ts +8 -7
- package/dist/groups/provider.js +2 -2
- package/dist/groups/pty.d.ts +15 -12
- package/dist/groups/pty.js +8 -8
- package/dist/groups/reference.d.ts +8 -12
- package/dist/groups/reference.js +16 -3
- package/dist/groups/rpc.d.ts +0 -1
- package/dist/groups/rpc.js +1 -1
- package/dist/groups/server.d.ts +9 -1
- package/dist/groups/server.js +11 -5
- package/dist/groups/session.d.ts +1085 -793
- package/dist/groups/session.js +172 -94
- package/dist/groups/shell.d.ts +13 -43
- package/dist/groups/shell.js +6 -24
- package/dist/groups/skill.d.ts +4 -5
- package/dist/groups/skill.js +1 -1
- package/dist/groups/vcs.d.ts +17 -12
- package/dist/groups/vcs.js +6 -6
- package/dist/groups/websearch.d.ts +6 -5
- package/dist/groups/websearch.js +2 -2
- package/dist/groups/worktree.d.ts +17 -23
- package/dist/groups/worktree.js +21 -30
- package/package.json +2 -2
- package/dist/groups/health.d.ts +0 -15
- package/dist/groups/health.js +0 -20
- package/dist/groups/workspace.d.ts +0 -22
- package/dist/groups/workspace.js +0 -27
package/dist/groups/form.js
CHANGED
|
@@ -1,95 +1,18 @@
|
|
|
1
1
|
import { Form } from "@opencode/schema/form";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Context, Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware,
|
|
5
|
-
import { ConflictError, FormAlreadySettledError, FormInvalidAnswerError, FormNotFoundError, InvalidRequestError, SessionNotFoundError, } from "../errors.js";
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, OpenApi } from "effect/unstable/httpapi";
|
|
6
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
title: Form.Info.fields.title,
|
|
10
|
-
metadata: Form.Info.fields.metadata,
|
|
11
|
-
fields: Form.Info.fields.fields,
|
|
12
|
-
}).annotate({ identifier: "Form.CreatePayload" });
|
|
13
|
-
// Form routes intentionally look session-scoped, but use a form-specific middleware instead of
|
|
14
|
-
// SessionLocationMiddleware. The middleware treats real session IDs normally and has an
|
|
15
|
-
// undocumented `global` sentinel branch for MCP elicitation forms that are still Location-scoped
|
|
16
|
-
// but not session-owned. This is temporary and should disappear once elicitations are attributable.
|
|
17
|
-
export const makeFormGroup = (locationMiddleware, formLocationMiddleware) => HttpApiGroup.make("server.form")
|
|
18
|
-
.add(HttpApiEndpoint.get("form.request.list", "/api/form/request", {
|
|
6
|
+
export const makeFormGroup = (locationMiddleware) => HttpApiGroup.make("server.form")
|
|
7
|
+
.add(HttpApiEndpoint.get("form.list", "/api/form", {
|
|
19
8
|
query: LocationQuery,
|
|
20
9
|
success: Location.response(Schema.Array(Form.Info)),
|
|
21
10
|
})
|
|
22
11
|
.annotateMerge(locationQueryOpenApi)
|
|
23
12
|
.annotateMerge(OpenApi.annotations({
|
|
24
|
-
identifier: "
|
|
25
|
-
summary: "List pending
|
|
13
|
+
identifier: "form.list",
|
|
14
|
+
summary: "List pending forms",
|
|
26
15
|
description: "Retrieve pending forms for a location.",
|
|
27
16
|
})))
|
|
28
17
|
.middleware(locationMiddleware)
|
|
29
|
-
.
|
|
30
|
-
params: { sessionID: Schema.String },
|
|
31
|
-
success: Schema.Struct({ data: Schema.Array(Form.Info) }),
|
|
32
|
-
error: SessionNotFoundError,
|
|
33
|
-
}).annotateMerge(OpenApi.annotations({
|
|
34
|
-
identifier: "v2.session.form.list",
|
|
35
|
-
summary: "List session forms",
|
|
36
|
-
description: "Retrieve pending forms for a session.",
|
|
37
|
-
})))
|
|
38
|
-
.add(HttpApiEndpoint.post("session.form.create", "/api/session/:sessionID/form", {
|
|
39
|
-
params: { sessionID: Schema.String },
|
|
40
|
-
payload: CreatePayload,
|
|
41
|
-
success: Schema.Struct({ data: Form.Info }),
|
|
42
|
-
error: [SessionNotFoundError, ConflictError, InvalidRequestError],
|
|
43
|
-
})
|
|
44
|
-
.middleware(formLocationMiddleware)
|
|
45
|
-
.annotateMerge(OpenApi.annotations({
|
|
46
|
-
identifier: "v2.session.form.create",
|
|
47
|
-
summary: "Create session form",
|
|
48
|
-
description: "Create a form for a session.",
|
|
49
|
-
})))
|
|
50
|
-
.add(HttpApiEndpoint.get("session.form.get", "/api/session/:sessionID/form/:formID", {
|
|
51
|
-
params: { sessionID: Schema.String, formID: Form.ID },
|
|
52
|
-
success: Schema.Struct({ data: Form.Info }),
|
|
53
|
-
error: [SessionNotFoundError, FormNotFoundError],
|
|
54
|
-
})
|
|
55
|
-
.middleware(formLocationMiddleware)
|
|
56
|
-
.annotateMerge(OpenApi.annotations({
|
|
57
|
-
identifier: "v2.session.form.get",
|
|
58
|
-
summary: "Get session form",
|
|
59
|
-
description: "Retrieve a form for a session.",
|
|
60
|
-
})))
|
|
61
|
-
.add(HttpApiEndpoint.get("session.form.state", "/api/session/:sessionID/form/:formID/state", {
|
|
62
|
-
params: { sessionID: Schema.String, formID: Form.ID },
|
|
63
|
-
success: Schema.Struct({ data: Form.State }),
|
|
64
|
-
error: [SessionNotFoundError, FormNotFoundError],
|
|
65
|
-
})
|
|
66
|
-
.middleware(formLocationMiddleware)
|
|
67
|
-
.annotateMerge(OpenApi.annotations({
|
|
68
|
-
identifier: "v2.session.form.state",
|
|
69
|
-
summary: "Get form state",
|
|
70
|
-
description: "Retrieve the current state for a form.",
|
|
71
|
-
})))
|
|
72
|
-
.add(HttpApiEndpoint.post("session.form.reply", "/api/session/:sessionID/form/:formID/reply", {
|
|
73
|
-
params: { sessionID: Schema.String, formID: Form.ID },
|
|
74
|
-
payload: Form.Reply,
|
|
75
|
-
success: HttpApiSchema.NoContent,
|
|
76
|
-
error: [SessionNotFoundError, FormAlreadySettledError, FormInvalidAnswerError, FormNotFoundError],
|
|
77
|
-
})
|
|
78
|
-
.middleware(formLocationMiddleware)
|
|
79
|
-
.annotateMerge(OpenApi.annotations({
|
|
80
|
-
identifier: "v2.session.form.reply",
|
|
81
|
-
summary: "Reply to form",
|
|
82
|
-
description: "Submit an answer to a pending form.",
|
|
83
|
-
})))
|
|
84
|
-
.add(HttpApiEndpoint.post("session.form.cancel", "/api/session/:sessionID/form/:formID/cancel", {
|
|
85
|
-
params: { sessionID: Schema.String, formID: Form.ID },
|
|
86
|
-
success: HttpApiSchema.NoContent,
|
|
87
|
-
error: [SessionNotFoundError, FormAlreadySettledError, FormNotFoundError],
|
|
88
|
-
})
|
|
89
|
-
.middleware(formLocationMiddleware)
|
|
90
|
-
.annotateMerge(OpenApi.annotations({
|
|
91
|
-
identifier: "v2.session.form.cancel",
|
|
92
|
-
summary: "Cancel form",
|
|
93
|
-
description: "Cancel a pending form.",
|
|
94
|
-
})))
|
|
95
|
-
.annotateMerge(OpenApi.annotations({ title: "form", description: "Session form routes." }));
|
|
18
|
+
.annotateMerge(OpenApi.annotations({ title: "form", description: "Location form routes." }));
|
package/dist/groups/fs.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { Location } from "@opencode/schema/location";
|
|
2
1
|
import { Schema } from "effect";
|
|
3
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
4
3
|
import { FileNotFoundError } from "../errors.js";
|
|
5
4
|
export declare const FileSystemGroup: HttpApiGroup.HttpApiGroup<"server.fs", HttpApiEndpoint.HttpApiEndpoint<"fs.read", "GET", "/api/fs/read/*", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
7
6
|
readonly directory: Schema.optional<Schema.String>;
|
|
8
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
9
7
|
}>>;
|
|
10
8
|
}>>, never, never, Schema.toCodecJson<Schema.Uint8Array>, Schema.toCodecJson<typeof FileNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"fs.list", "GET", "/api/fs/list", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
11
9
|
readonly path: Schema.optional<Schema.String>;
|
|
12
10
|
readonly location: Schema.optional<Schema.Struct<{
|
|
13
11
|
readonly directory: Schema.optional<Schema.String>;
|
|
14
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
15
12
|
}>>;
|
|
16
13
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
17
|
-
readonly location:
|
|
14
|
+
readonly location: Schema.Struct<{
|
|
15
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
16
|
+
}>;
|
|
18
17
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
19
18
|
readonly path: Schema.brand<Schema.String, "RelativePath">;
|
|
20
19
|
readonly type: Schema.Literals<readonly ["file", "directory"]>;
|
|
@@ -25,10 +24,11 @@ export declare const FileSystemGroup: HttpApiGroup.HttpApiGroup<"server.fs", Htt
|
|
|
25
24
|
readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
|
|
26
25
|
readonly location: Schema.optional<Schema.Struct<{
|
|
27
26
|
readonly directory: Schema.optional<Schema.String>;
|
|
28
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
29
27
|
}>>;
|
|
30
28
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
31
|
-
readonly location:
|
|
29
|
+
readonly location: Schema.Struct<{
|
|
30
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
31
|
+
}>;
|
|
32
32
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
33
33
|
readonly path: Schema.brand<Schema.String, "RelativePath">;
|
|
34
34
|
readonly type: Schema.Literals<readonly ["file", "directory"]>;
|
package/dist/groups/fs.js
CHANGED
|
@@ -25,7 +25,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
|
|
|
25
25
|
})
|
|
26
26
|
.annotateMerge(locationQueryOpenApi)
|
|
27
27
|
.annotateMerge(OpenApi.annotations({
|
|
28
|
-
identifier: "
|
|
28
|
+
identifier: "fs.read",
|
|
29
29
|
summary: "Read file",
|
|
30
30
|
description: "Serve one file relative to the requested location.",
|
|
31
31
|
})))
|
|
@@ -35,7 +35,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
|
|
|
35
35
|
})
|
|
36
36
|
.annotateMerge(locationQueryOpenApi)
|
|
37
37
|
.annotateMerge(OpenApi.annotations({
|
|
38
|
-
identifier: "
|
|
38
|
+
identifier: "fs.list",
|
|
39
39
|
summary: "List directory",
|
|
40
40
|
description: "List direct children using an absolute path or a path relative to the requested location, including parents and siblings outside its directory. Entry paths remain relative to the requested location; listing does not switch locations.",
|
|
41
41
|
})))
|
|
@@ -45,7 +45,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
|
|
|
45
45
|
})
|
|
46
46
|
.annotateMerge(locationQueryOpenApi)
|
|
47
47
|
.annotateMerge(OpenApi.annotations({
|
|
48
|
-
identifier: "
|
|
48
|
+
identifier: "fs.find",
|
|
49
49
|
summary: "Find files",
|
|
50
50
|
description: "Find recursively ranked filesystem entries relative to the requested location.",
|
|
51
51
|
})))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
3
3
|
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
4
|
-
export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate", HttpApiEndpoint.HttpApiEndpoint<"generate.text", "POST", "/api/generate", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
4
|
+
export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate", HttpApiEndpoint.HttpApiEndpoint<"generate.text", "POST", "/api/experimental/generate", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
5
5
|
readonly prompt: Schema.String;
|
|
6
6
|
readonly model: Schema.optional<Schema.Struct<{
|
|
7
7
|
readonly id: Schema.brand<Schema.String, "Model.ID">;
|
package/dist/groups/generate.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Schema } from "effect";
|
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
|
|
4
4
|
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
5
5
|
export const GenerateGroup = HttpApiGroup.make("server.generate")
|
|
6
|
-
.add(HttpApiEndpoint.post("generate.text", "/api/generate", {
|
|
6
|
+
.add(HttpApiEndpoint.post("generate.text", "/api/experimental/generate", {
|
|
7
7
|
payload: Schema.Struct({
|
|
8
8
|
prompt: Schema.String,
|
|
9
9
|
model: Model.Ref.pipe(Schema.optional),
|
|
@@ -13,7 +13,7 @@ export const GenerateGroup = HttpApiGroup.make("server.generate")
|
|
|
13
13
|
}).annotate({ identifier: "GenerateTextResponse" }),
|
|
14
14
|
error: [InvalidRequestError, ServiceUnavailableError],
|
|
15
15
|
}).annotateMerge(OpenApi.annotations({
|
|
16
|
-
identifier: "
|
|
16
|
+
identifier: "experimental.generate.text",
|
|
17
17
|
summary: "Generate text",
|
|
18
18
|
description: "Run one stateless model generation using the server's base configuration and return the assistant text. Uses the base configuration's default model when none is specified.",
|
|
19
19
|
})))
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Integration } from "@opencode/schema/integration";
|
|
2
|
-
import { Location } from "@opencode/schema/location";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
|
|
5
|
-
import { InvalidRequestError } from "../errors.js";
|
|
4
|
+
import { IntegrationAttemptNotFoundError, IntegrationMethodNotFoundError, IntegrationNotFoundError, InvalidRequestError } from "../errors.js";
|
|
6
5
|
export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integration", HttpApiEndpoint.HttpApiEndpoint<"integration.list", "GET", "/api/integration", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
7
6
|
readonly location: Schema.optional<Schema.Struct<{
|
|
8
7
|
readonly directory: Schema.optional<Schema.String>;
|
|
9
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
10
8
|
}>>;
|
|
11
9
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
12
|
-
readonly location:
|
|
10
|
+
readonly location: Schema.Struct<{
|
|
11
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
12
|
+
}>;
|
|
13
13
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
14
14
|
readonly id: Schema.brand<Schema.String, "Integration.ID">;
|
|
15
15
|
readonly name: Schema.String;
|
|
@@ -500,11 +500,12 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
500
500
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
501
501
|
readonly location: Schema.optional<Schema.Struct<{
|
|
502
502
|
readonly directory: Schema.optional<Schema.String>;
|
|
503
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
504
503
|
}>>;
|
|
505
504
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
506
|
-
readonly location:
|
|
507
|
-
|
|
505
|
+
readonly location: Schema.Struct<{
|
|
506
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
507
|
+
}>;
|
|
508
|
+
readonly data: Schema.Struct<{
|
|
508
509
|
readonly id: Schema.brand<Schema.String, "Integration.ID">;
|
|
509
510
|
readonly name: Schema.String;
|
|
510
511
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
@@ -988,11 +989,10 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
988
989
|
readonly type: Schema.Literal<"env">;
|
|
989
990
|
readonly name: Schema.String;
|
|
990
991
|
}>]>>;
|
|
991
|
-
}
|
|
992
|
-
}>>,
|
|
992
|
+
}>;
|
|
993
|
+
}>>, Schema.toCodecJson<typeof IntegrationNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.wellknown.add", "POST", "/api/experimental/integration/wellknown", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
993
994
|
readonly location: Schema.optional<Schema.Struct<{
|
|
994
995
|
readonly directory: Schema.optional<Schema.String>;
|
|
995
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
996
996
|
}>>;
|
|
997
997
|
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
998
998
|
readonly url: Schema.String;
|
|
@@ -1001,25 +1001,25 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1001
1001
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1002
1002
|
readonly location: Schema.optional<Schema.Struct<{
|
|
1003
1003
|
readonly directory: Schema.optional<Schema.String>;
|
|
1004
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
1005
1004
|
}>>;
|
|
1006
1005
|
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
1007
1006
|
readonly key: Schema.String;
|
|
1008
1007
|
readonly answer: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>;
|
|
1009
1008
|
readonly label: Schema.optional<Schema.String>;
|
|
1010
|
-
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.oauth.connect", "POST", "/api/integration/:integrationID/connect/oauth", Schema.toCodecStringTree<Schema.Struct<{
|
|
1009
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError | typeof IntegrationNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.oauth.connect", "POST", "/api/integration/:integrationID/connect/oauth", Schema.toCodecStringTree<Schema.Struct<{
|
|
1011
1010
|
integrationID: Schema.brand<Schema.String, "Integration.ID">;
|
|
1012
1011
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1013
1012
|
readonly location: Schema.optional<Schema.Struct<{
|
|
1014
1013
|
readonly directory: Schema.optional<Schema.String>;
|
|
1015
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
1016
1014
|
}>>;
|
|
1017
1015
|
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
1018
1016
|
readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
|
|
1019
1017
|
readonly answer: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>;
|
|
1020
1018
|
readonly label: Schema.optional<Schema.String>;
|
|
1021
1019
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1022
|
-
readonly location:
|
|
1020
|
+
readonly location: Schema.Struct<{
|
|
1021
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1022
|
+
}>;
|
|
1023
1023
|
readonly data: typeof Integration.Attempt;
|
|
1024
1024
|
}>>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.oauth.status", "GET", "/api/integration/:integrationID/connect/oauth/:attemptID", Schema.toCodecStringTree<Schema.Struct<{
|
|
1025
1025
|
integrationID: Schema.brand<Schema.String, "Integration.ID">;
|
|
@@ -1029,10 +1029,11 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1029
1029
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1030
1030
|
readonly location: Schema.optional<Schema.Struct<{
|
|
1031
1031
|
readonly directory: Schema.optional<Schema.String>;
|
|
1032
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
1033
1032
|
}>>;
|
|
1034
1033
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1035
|
-
readonly location:
|
|
1034
|
+
readonly location: Schema.Struct<{
|
|
1035
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1036
|
+
}>;
|
|
1036
1037
|
readonly data: Schema.Union<readonly [Schema.Struct<{
|
|
1037
1038
|
readonly status: Schema.Literal<"pending">;
|
|
1038
1039
|
readonly time: Schema.Struct<{
|
|
@@ -1059,7 +1060,7 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1059
1060
|
readonly expires: Schema.Number;
|
|
1060
1061
|
}>;
|
|
1061
1062
|
}>]>;
|
|
1062
|
-
}>>,
|
|
1063
|
+
}>>, Schema.toCodecJson<typeof IntegrationNotFoundError | typeof IntegrationAttemptNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.oauth.complete", "POST", "/api/integration/:integrationID/connect/oauth/:attemptID/complete", Schema.toCodecStringTree<Schema.Struct<{
|
|
1063
1064
|
integrationID: Schema.brand<Schema.String, "Integration.ID">;
|
|
1064
1065
|
attemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & {
|
|
1065
1066
|
create: () => string & import("effect/Brand").Brand<"Integration.AttemptID">;
|
|
@@ -1067,11 +1068,10 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1067
1068
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1068
1069
|
readonly location: Schema.optional<Schema.Struct<{
|
|
1069
1070
|
readonly directory: Schema.optional<Schema.String>;
|
|
1070
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
1071
1071
|
}>>;
|
|
1072
1072
|
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
1073
1073
|
readonly code: Schema.optional<Schema.String>;
|
|
1074
|
-
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.oauth.cancel", "DELETE", "/api/integration/:integrationID/connect/oauth/:attemptID", Schema.toCodecStringTree<Schema.Struct<{
|
|
1074
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError | typeof IntegrationNotFoundError | typeof IntegrationAttemptNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.oauth.cancel", "DELETE", "/api/integration/:integrationID/connect/oauth/:attemptID", Schema.toCodecStringTree<Schema.Struct<{
|
|
1075
1075
|
integrationID: Schema.brand<Schema.String, "Integration.ID">;
|
|
1076
1076
|
attemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & {
|
|
1077
1077
|
create: () => string & import("effect/Brand").Brand<"Integration.AttemptID">;
|
|
@@ -1079,20 +1079,20 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1079
1079
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1080
1080
|
readonly location: Schema.optional<Schema.Struct<{
|
|
1081
1081
|
readonly directory: Schema.optional<Schema.String>;
|
|
1082
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
1083
1082
|
}>>;
|
|
1084
1083
|
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.command.connect", "POST", "/api/integration/:integrationID/connect/command", Schema.toCodecStringTree<Schema.Struct<{
|
|
1085
1084
|
integrationID: Schema.brand<Schema.String, "Integration.ID">;
|
|
1086
1085
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1087
1086
|
readonly location: Schema.optional<Schema.Struct<{
|
|
1088
1087
|
readonly directory: Schema.optional<Schema.String>;
|
|
1089
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
1090
1088
|
}>>;
|
|
1091
1089
|
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
1092
1090
|
readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
|
|
1093
1091
|
readonly label: Schema.optional<Schema.String>;
|
|
1094
1092
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1095
|
-
readonly location:
|
|
1093
|
+
readonly location: Schema.Struct<{
|
|
1094
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1095
|
+
}>;
|
|
1096
1096
|
readonly data: Schema.Struct<{
|
|
1097
1097
|
readonly attemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & {
|
|
1098
1098
|
create: () => string & import("effect/Brand").Brand<"Integration.AttemptID">;
|
|
@@ -1102,7 +1102,7 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1102
1102
|
readonly expires: Schema.Number;
|
|
1103
1103
|
}>;
|
|
1104
1104
|
}>;
|
|
1105
|
-
}>>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.command.status", "GET", "/api/integration/:integrationID/connect/command/:attemptID", Schema.toCodecStringTree<Schema.Struct<{
|
|
1105
|
+
}>>, Schema.toCodecJson<typeof InvalidRequestError | typeof IntegrationNotFoundError | typeof IntegrationMethodNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.command.status", "GET", "/api/integration/:integrationID/connect/command/:attemptID", Schema.toCodecStringTree<Schema.Struct<{
|
|
1106
1106
|
integrationID: Schema.brand<Schema.String, "Integration.ID">;
|
|
1107
1107
|
attemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & {
|
|
1108
1108
|
create: () => string & import("effect/Brand").Brand<"Integration.AttemptID">;
|
|
@@ -1110,10 +1110,11 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1110
1110
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1111
1111
|
readonly location: Schema.optional<Schema.Struct<{
|
|
1112
1112
|
readonly directory: Schema.optional<Schema.String>;
|
|
1113
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
1114
1113
|
}>>;
|
|
1115
1114
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1116
|
-
readonly location:
|
|
1115
|
+
readonly location: Schema.Struct<{
|
|
1116
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1117
|
+
}>;
|
|
1117
1118
|
readonly data: Schema.Union<readonly [Schema.Struct<{
|
|
1118
1119
|
readonly status: Schema.Literal<"pending">;
|
|
1119
1120
|
readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
@@ -1141,7 +1142,7 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1141
1142
|
readonly expires: Schema.Number;
|
|
1142
1143
|
}>;
|
|
1143
1144
|
}>]>;
|
|
1144
|
-
}>>,
|
|
1145
|
+
}>>, Schema.toCodecJson<typeof IntegrationNotFoundError | typeof IntegrationAttemptNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.command.cancel", "DELETE", "/api/integration/:integrationID/connect/command/:attemptID", Schema.toCodecStringTree<Schema.Struct<{
|
|
1145
1146
|
integrationID: Schema.brand<Schema.String, "Integration.ID">;
|
|
1146
1147
|
attemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & {
|
|
1147
1148
|
create: () => string & import("effect/Brand").Brand<"Integration.AttemptID">;
|
|
@@ -1149,6 +1150,5 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
1149
1150
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
1150
1151
|
readonly location: Schema.optional<Schema.Struct<{
|
|
1151
1152
|
readonly directory: Schema.optional<Schema.String>;
|
|
1152
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
1153
1153
|
}>>;
|
|
1154
1154
|
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;
|
|
@@ -3,7 +3,7 @@ import { Location } from "@opencode/schema/location";
|
|
|
3
3
|
import { Form } from "@opencode/schema/form";
|
|
4
4
|
import { Schema } from "effect";
|
|
5
5
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
6
|
-
import { InvalidRequestError } from "../errors.js";
|
|
6
|
+
import { IntegrationAttemptNotFoundError, IntegrationMethodNotFoundError, IntegrationNotFoundError, InvalidRequestError, } from "../errors.js";
|
|
7
7
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
8
|
export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
9
9
|
.add(HttpApiEndpoint.get("integration.list", "/api/integration", {
|
|
@@ -12,18 +12,19 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
12
12
|
})
|
|
13
13
|
.annotateMerge(locationQueryOpenApi)
|
|
14
14
|
.annotateMerge(OpenApi.annotations({
|
|
15
|
-
identifier: "
|
|
15
|
+
identifier: "integration.list",
|
|
16
16
|
summary: "List integrations",
|
|
17
17
|
description: "Retrieve available integrations and their authentication methods.",
|
|
18
18
|
})))
|
|
19
19
|
.add(HttpApiEndpoint.get("integration.get", "/api/integration/:integrationID", {
|
|
20
20
|
params: { integrationID: Integration.ID },
|
|
21
21
|
query: LocationQuery,
|
|
22
|
-
success: Location.response(
|
|
22
|
+
success: Location.response(Integration.Info),
|
|
23
|
+
error: IntegrationNotFoundError,
|
|
23
24
|
})
|
|
24
25
|
.annotateMerge(locationQueryOpenApi)
|
|
25
26
|
.annotateMerge(OpenApi.annotations({
|
|
26
|
-
identifier: "
|
|
27
|
+
identifier: "integration.get",
|
|
27
28
|
summary: "Get integration",
|
|
28
29
|
description: "Retrieve one integration and its authentication methods.",
|
|
29
30
|
})))
|
|
@@ -35,7 +36,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
35
36
|
})
|
|
36
37
|
.annotateMerge(locationQueryOpenApi)
|
|
37
38
|
.annotateMerge(OpenApi.annotations({
|
|
38
|
-
identifier: "
|
|
39
|
+
identifier: "experimental.integration.wellknown.add",
|
|
39
40
|
summary: "Add wellknown integration",
|
|
40
41
|
description: "Discover and persist an experimental wellknown integration source.",
|
|
41
42
|
})))
|
|
@@ -48,11 +49,11 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
48
49
|
label: Schema.optional(Schema.String),
|
|
49
50
|
}),
|
|
50
51
|
success: HttpApiSchema.NoContent,
|
|
51
|
-
error: InvalidRequestError,
|
|
52
|
+
error: [IntegrationNotFoundError, InvalidRequestError],
|
|
52
53
|
})
|
|
53
54
|
.annotateMerge(locationQueryOpenApi)
|
|
54
55
|
.annotateMerge(OpenApi.annotations({
|
|
55
|
-
identifier: "
|
|
56
|
+
identifier: "integration.connect.key",
|
|
56
57
|
summary: "Connect with key",
|
|
57
58
|
description: "Run a key authentication method and store the resulting credential.",
|
|
58
59
|
})))
|
|
@@ -69,7 +70,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
69
70
|
})
|
|
70
71
|
.annotateMerge(locationQueryOpenApi)
|
|
71
72
|
.annotateMerge(OpenApi.annotations({
|
|
72
|
-
identifier: "
|
|
73
|
+
identifier: "integration.oauth.connect",
|
|
73
74
|
summary: "Begin OAuth connection",
|
|
74
75
|
description: "Start an OAuth attempt and return the authorization details.",
|
|
75
76
|
})))
|
|
@@ -77,10 +78,11 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
77
78
|
params: { integrationID: Integration.ID, attemptID: Integration.AttemptID },
|
|
78
79
|
query: LocationQuery,
|
|
79
80
|
success: Location.response(Integration.AttemptStatus),
|
|
81
|
+
error: [IntegrationNotFoundError, IntegrationAttemptNotFoundError],
|
|
80
82
|
})
|
|
81
83
|
.annotateMerge(locationQueryOpenApi)
|
|
82
84
|
.annotateMerge(OpenApi.annotations({
|
|
83
|
-
identifier: "
|
|
85
|
+
identifier: "integration.oauth.status",
|
|
84
86
|
summary: "Get OAuth attempt status",
|
|
85
87
|
description: "Poll the current status of an OAuth attempt.",
|
|
86
88
|
})))
|
|
@@ -89,11 +91,11 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
89
91
|
query: LocationQuery,
|
|
90
92
|
payload: Schema.Struct({ code: Schema.optional(Schema.String) }),
|
|
91
93
|
success: HttpApiSchema.NoContent,
|
|
92
|
-
error: InvalidRequestError,
|
|
94
|
+
error: [IntegrationNotFoundError, IntegrationAttemptNotFoundError, InvalidRequestError],
|
|
93
95
|
})
|
|
94
96
|
.annotateMerge(locationQueryOpenApi)
|
|
95
97
|
.annotateMerge(OpenApi.annotations({
|
|
96
|
-
identifier: "
|
|
98
|
+
identifier: "integration.oauth.complete",
|
|
97
99
|
summary: "Complete OAuth connection",
|
|
98
100
|
description: "Complete a code-based OAuth attempt and store the resulting credential.",
|
|
99
101
|
})))
|
|
@@ -104,7 +106,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
104
106
|
})
|
|
105
107
|
.annotateMerge(locationQueryOpenApi)
|
|
106
108
|
.annotateMerge(OpenApi.annotations({
|
|
107
|
-
identifier: "
|
|
109
|
+
identifier: "integration.oauth.cancel",
|
|
108
110
|
summary: "Cancel OAuth connection",
|
|
109
111
|
description: "Cancel an OAuth attempt and release its resources.",
|
|
110
112
|
})))
|
|
@@ -116,11 +118,11 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
116
118
|
label: Schema.optional(Schema.String),
|
|
117
119
|
}),
|
|
118
120
|
success: Location.response(Integration.CommandAttempt),
|
|
119
|
-
error: InvalidRequestError,
|
|
121
|
+
error: [IntegrationNotFoundError, IntegrationMethodNotFoundError, InvalidRequestError],
|
|
120
122
|
})
|
|
121
123
|
.annotateMerge(locationQueryOpenApi)
|
|
122
124
|
.annotateMerge(OpenApi.annotations({
|
|
123
|
-
identifier: "
|
|
125
|
+
identifier: "integration.command.connect",
|
|
124
126
|
summary: "Begin command connection",
|
|
125
127
|
description: "Start a command authentication attempt.",
|
|
126
128
|
})))
|
|
@@ -128,10 +130,11 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
128
130
|
params: { integrationID: Integration.ID, attemptID: Integration.AttemptID },
|
|
129
131
|
query: LocationQuery,
|
|
130
132
|
success: Location.response(Integration.CommandAttemptStatus),
|
|
133
|
+
error: [IntegrationNotFoundError, IntegrationAttemptNotFoundError],
|
|
131
134
|
})
|
|
132
135
|
.annotateMerge(locationQueryOpenApi)
|
|
133
136
|
.annotateMerge(OpenApi.annotations({
|
|
134
|
-
identifier: "
|
|
137
|
+
identifier: "integration.command.status",
|
|
135
138
|
summary: "Get command attempt status",
|
|
136
139
|
description: "Poll the current status and output of a command authentication attempt.",
|
|
137
140
|
})))
|
|
@@ -142,7 +145,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
142
145
|
})
|
|
143
146
|
.annotateMerge(locationQueryOpenApi)
|
|
144
147
|
.annotateMerge(OpenApi.annotations({
|
|
145
|
-
identifier: "
|
|
148
|
+
identifier: "integration.command.cancel",
|
|
146
149
|
summary: "Cancel command connection",
|
|
147
150
|
description: "Cancel a command authentication attempt and terminate its process.",
|
|
148
151
|
})))
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import { Location } from "@opencode/schema/location";
|
|
2
1
|
import { Schema } from "effect";
|
|
3
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
4
3
|
export declare const LocationQuery: Schema.Struct<{
|
|
5
4
|
readonly location: Schema.optional<Schema.Struct<{
|
|
6
5
|
readonly directory: Schema.optional<Schema.String>;
|
|
7
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
8
6
|
}>>;
|
|
9
7
|
}>;
|
|
10
8
|
export declare const locationQueryOpenApi: import("effect/Context").Context<never>;
|
|
11
9
|
export declare const LocationGroup: HttpApiGroup.HttpApiGroup<"server.location", HttpApiEndpoint.HttpApiEndpoint<"location.get", "GET", "/api/location", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
12
10
|
readonly location: Schema.optional<Schema.Struct<{
|
|
13
11
|
readonly directory: Schema.optional<Schema.String>;
|
|
14
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
15
12
|
}>>;
|
|
16
|
-
}>>, never, never, Schema.toCodecJson<
|
|
13
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
14
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
15
|
+
readonly project: Schema.Struct<{
|
|
16
|
+
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
|
17
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
18
|
+
};
|
|
19
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
20
|
+
readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
|
|
21
|
+
}>;
|
|
22
|
+
}>>, never, never, never>, false>;
|
package/dist/groups/location.js
CHANGED
|
@@ -4,7 +4,6 @@ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
|
|
|
4
4
|
export const LocationQuery = Schema.Struct({
|
|
5
5
|
location: Schema.optional(Schema.Struct({
|
|
6
6
|
directory: Schema.optional(Schema.String),
|
|
7
|
-
workspace: Schema.optional(Schema.String),
|
|
8
7
|
})),
|
|
9
8
|
}).annotate({ identifier: "LocationQuery" });
|
|
10
9
|
export const locationQueryOpenApi = OpenApi.annotations({
|
|
@@ -23,11 +22,11 @@ export const locationQueryOpenApi = OpenApi.annotations({
|
|
|
23
22
|
export const LocationGroup = HttpApiGroup.make("server.location")
|
|
24
23
|
.add(HttpApiEndpoint.get("location.get", "/api/location", {
|
|
25
24
|
query: LocationQuery,
|
|
26
|
-
success: Location.
|
|
25
|
+
success: Location.PublicInfo,
|
|
27
26
|
})
|
|
28
27
|
.annotateMerge(locationQueryOpenApi)
|
|
29
28
|
.annotateMerge(OpenApi.annotations({
|
|
30
|
-
identifier: "
|
|
29
|
+
identifier: "location.get",
|
|
31
30
|
summary: "Get location",
|
|
32
31
|
description: "Resolve the requested location or the server default location.",
|
|
33
32
|
})))
|
package/dist/groups/mcp.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Mcp } from "@opencode/schema/mcp";
|
|
2
|
-
import { Location } from "@opencode/schema/location";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
|
|
5
4
|
import { McpServerNotFoundError } from "../errors.js";
|
|
6
5
|
export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEndpoint.HttpApiEndpoint<"mcp.list", "GET", "/api/mcp", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
7
6
|
readonly location: Schema.optional<Schema.Struct<{
|
|
8
7
|
readonly directory: Schema.optional<Schema.String>;
|
|
9
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
10
8
|
}>>;
|
|
11
9
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
12
|
-
readonly location:
|
|
10
|
+
readonly location: Schema.Struct<{
|
|
11
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
12
|
+
}>;
|
|
13
13
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
14
14
|
readonly name: Schema.String;
|
|
15
15
|
readonly status: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
|
|
@@ -23,46 +23,44 @@ export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEn
|
|
|
23
23
|
readonly error: Schema.String;
|
|
24
24
|
}>, Schema.Struct<{
|
|
25
25
|
readonly status: Schema.Literal<"needs_auth">;
|
|
26
|
+
readonly error: Schema.String;
|
|
26
27
|
}>]>;
|
|
27
28
|
readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;
|
|
28
29
|
}>>;
|
|
29
|
-
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.add", "PUT", "/api/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
30
|
+
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.add", "PUT", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
30
31
|
server: Schema.String;
|
|
31
32
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
32
33
|
readonly location: Schema.optional<Schema.Struct<{
|
|
33
34
|
readonly directory: Schema.optional<Schema.String>;
|
|
34
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
35
35
|
}>>;
|
|
36
36
|
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
37
37
|
readonly config: Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>;
|
|
38
|
-
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.remove", "DELETE", "/api/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
38
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.remove", "DELETE", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
|
|
39
39
|
server: Schema.String;
|
|
40
40
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
41
41
|
readonly location: Schema.optional<Schema.Struct<{
|
|
42
42
|
readonly directory: Schema.optional<Schema.String>;
|
|
43
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
44
43
|
}>>;
|
|
45
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.connect", "POST", "/api/mcp/:server/connect", Schema.toCodecStringTree<Schema.Struct<{
|
|
44
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.connect", "POST", "/api/experimental/mcp/:server/connect", Schema.toCodecStringTree<Schema.Struct<{
|
|
46
45
|
server: Schema.String;
|
|
47
46
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
48
47
|
readonly location: Schema.optional<Schema.Struct<{
|
|
49
48
|
readonly directory: Schema.optional<Schema.String>;
|
|
50
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
51
49
|
}>>;
|
|
52
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
|
|
50
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/experimental/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
|
|
53
51
|
server: Schema.String;
|
|
54
52
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
55
53
|
readonly location: Schema.optional<Schema.Struct<{
|
|
56
54
|
readonly directory: Schema.optional<Schema.String>;
|
|
57
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
58
55
|
}>>;
|
|
59
56
|
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"mcp.resource.catalog", "GET", "/api/mcp/resource", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
60
57
|
readonly location: Schema.optional<Schema.Struct<{
|
|
61
58
|
readonly directory: Schema.optional<Schema.String>;
|
|
62
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
63
59
|
}>>;
|
|
64
60
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
65
|
-
readonly location:
|
|
61
|
+
readonly location: Schema.Struct<{
|
|
62
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
63
|
+
}>;
|
|
66
64
|
readonly data: Schema.Struct<{
|
|
67
65
|
readonly resources: Schema.$Array<Schema.Struct<{
|
|
68
66
|
readonly server: Schema.String;
|