@opencode-ai/protocol 0.0.0-next-14854 → 0.0.0-reserved.0
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/README.md +3 -0
- package/index.js +1 -0
- package/package.json +3 -23
- package/dist/api.d.ts +0 -49
- package/dist/api.js +0 -65
- package/dist/client.d.ts +0 -75
- package/dist/client.js +0 -61
- package/dist/errors.d.ts +0 -127
- package/dist/errors.js +0 -99
- package/dist/groups/agent.d.ts +0 -95
- package/dist/groups/agent.js +0 -15
- package/dist/groups/command.d.ts +0 -51
- package/dist/groups/command.js +0 -20
- package/dist/groups/credential.d.ts +0 -23
- package/dist/groups/credential.js +0 -28
- package/dist/groups/event.d.ts +0 -17224
- package/dist/groups/event.js +0 -49
- package/dist/groups/form.d.ts +0 -789
- package/dist/groups/form.js +0 -99
- package/dist/groups/fs.d.ts +0 -35
- package/dist/groups/fs.js +0 -51
- package/dist/groups/generate.d.ts +0 -32
- package/dist/groups/generate.js +0 -27
- package/dist/groups/health.d.ts +0 -5
- package/dist/groups/health.js +0 -9
- package/dist/groups/integration.d.ts +0 -105
- package/dist/groups/integration.js +0 -98
- package/dist/groups/location.d.ts +0 -16
- package/dist/groups/location.js +0 -32
- package/dist/groups/mcp.d.ts +0 -30
- package/dist/groups/mcp.js +0 -17
- package/dist/groups/message.d.ts +0 -446
- package/dist/groups/message.js +0 -42
- package/dist/groups/model.d.ts +0 -312
- package/dist/groups/model.js +0 -33
- package/dist/groups/permission.d.ts +0 -153
- package/dist/groups/permission.js +0 -99
- package/dist/groups/plugin.d.ts +0 -14
- package/dist/groups/plugin.js +0 -20
- package/dist/groups/project-copy.d.ts +0 -49
- package/dist/groups/project-copy.js +0 -44
- package/dist/groups/project.d.ts +0 -24
- package/dist/groups/project.js +0 -30
- package/dist/groups/provider.d.ts +0 -164
- package/dist/groups/provider.js +0 -34
- package/dist/groups/pty.d.ts +0 -145
- package/dist/groups/pty.js +0 -111
- package/dist/groups/question.d.ts +0 -92
- package/dist/groups/question.js +0 -56
- package/dist/groups/reference.d.ts +0 -13
- package/dist/groups/reference.js +0 -20
- package/dist/groups/session.d.ts +0 -5457
- package/dist/groups/session.js +0 -423
- package/dist/groups/shell.d.ts +0 -120
- package/dist/groups/shell.js +0 -65
- package/dist/groups/skill.d.ts +0 -19
- package/dist/groups/skill.js +0 -20
- package/dist/groups/vcs.d.ts +0 -33
- package/dist/groups/vcs.js +0 -37
- package/dist/middleware/authorization.d.ts +0 -13
- package/dist/middleware/authorization.js +0 -6
- package/dist/middleware/schema-error.d.ts +0 -13
- package/dist/middleware/schema-error.js +0 -4
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { Location } from "@opencode-ai/schema/location";
|
|
2
|
-
import { Context, Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/unstable/httpapi";
|
|
4
|
-
import { QuestionNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
5
|
-
export declare const makeQuestionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.question", HttpApiEndpoint.HttpApiEndpoint<"question.request.list", "GET", "/api/question/request", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
6
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
7
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
8
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
9
|
-
}>>;
|
|
10
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
11
|
-
readonly location: typeof Location.Info;
|
|
12
|
-
readonly data: Schema.$Array<Schema.Struct<{
|
|
13
|
-
readonly id: Schema.brand<Schema.String, "QuestionV2.ID"> & {
|
|
14
|
-
create: () => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
15
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
16
|
-
};
|
|
17
|
-
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
18
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
19
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
20
|
-
};
|
|
21
|
-
readonly questions: Schema.$Array<Schema.Struct<{
|
|
22
|
-
readonly custom: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
23
|
-
readonly question: Schema.String;
|
|
24
|
-
readonly header: Schema.String;
|
|
25
|
-
readonly options: Schema.$Array<Schema.Struct<{
|
|
26
|
-
readonly label: Schema.String;
|
|
27
|
-
readonly description: Schema.String;
|
|
28
|
-
}>>;
|
|
29
|
-
readonly multiple: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
30
|
-
}>>;
|
|
31
|
-
readonly tool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
32
|
-
readonly messageID: Schema.String;
|
|
33
|
-
readonly callID: Schema.String;
|
|
34
|
-
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
35
|
-
readonly messageID: Schema.String;
|
|
36
|
-
readonly callID: Schema.String;
|
|
37
|
-
}>>, never, never>;
|
|
38
|
-
}>>;
|
|
39
|
-
}>>, HttpApiEndpoint.Json<never>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.question.list", "GET", "/api/session/:sessionID/question", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
40
|
-
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
41
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
42
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
43
|
-
};
|
|
44
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
45
|
-
readonly data: Schema.$Array<Schema.Struct<{
|
|
46
|
-
readonly id: Schema.brand<Schema.String, "QuestionV2.ID"> & {
|
|
47
|
-
create: () => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
48
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
49
|
-
};
|
|
50
|
-
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
51
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
52
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
53
|
-
};
|
|
54
|
-
readonly questions: Schema.$Array<Schema.Struct<{
|
|
55
|
-
readonly custom: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
56
|
-
readonly question: Schema.String;
|
|
57
|
-
readonly header: Schema.String;
|
|
58
|
-
readonly options: Schema.$Array<Schema.Struct<{
|
|
59
|
-
readonly label: Schema.String;
|
|
60
|
-
readonly description: Schema.String;
|
|
61
|
-
}>>;
|
|
62
|
-
readonly multiple: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
63
|
-
}>>;
|
|
64
|
-
readonly tool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
65
|
-
readonly messageID: Schema.String;
|
|
66
|
-
readonly callID: Schema.String;
|
|
67
|
-
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
68
|
-
readonly messageID: Schema.String;
|
|
69
|
-
readonly callID: Schema.String;
|
|
70
|
-
}>>, never, never>;
|
|
71
|
-
}>>;
|
|
72
|
-
}>>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.question.reply", "POST", "/api/session/:sessionID/question/:requestID/reply", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
73
|
-
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
74
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
75
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
76
|
-
};
|
|
77
|
-
requestID: Schema.brand<Schema.String, "QuestionV2.ID"> & {
|
|
78
|
-
create: () => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
79
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
80
|
-
};
|
|
81
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
82
|
-
readonly answers: Schema.$Array<Schema.$Array<Schema.String>>;
|
|
83
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<typeof SessionNotFoundError | typeof QuestionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.question.reject", "POST", "/api/session/:sessionID/question/:requestID/reject", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
84
|
-
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
85
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
86
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
87
|
-
};
|
|
88
|
-
requestID: Schema.brand<Schema.String, "QuestionV2.ID"> & {
|
|
89
|
-
create: () => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
90
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV2.ID">;
|
|
91
|
-
};
|
|
92
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<typeof SessionNotFoundError | typeof QuestionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>>, false>;
|
package/dist/groups/question.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Question } from "@opencode-ai/schema/question";
|
|
2
|
-
import { Location } from "@opencode-ai/schema/location";
|
|
3
|
-
import { Session } from "@opencode-ai/schema/session";
|
|
4
|
-
import { Context, Schema } from "effect";
|
|
5
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
6
|
-
import { QuestionNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
7
|
-
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
|
-
export const makeQuestionGroup = (locationMiddleware, sessionLocationMiddleware) => HttpApiGroup.make("server.question")
|
|
9
|
-
.add(HttpApiEndpoint.get("question.request.list", "/api/question/request", {
|
|
10
|
-
query: LocationQuery,
|
|
11
|
-
success: Location.response(Schema.Array(Question.Request)),
|
|
12
|
-
})
|
|
13
|
-
.annotateMerge(locationQueryOpenApi)
|
|
14
|
-
.annotateMerge(OpenApi.annotations({
|
|
15
|
-
identifier: "v2.question.request.list",
|
|
16
|
-
summary: "List pending question requests",
|
|
17
|
-
description: "Retrieve pending question requests for a location.",
|
|
18
|
-
})))
|
|
19
|
-
.annotateMerge(OpenApi.annotations({ title: "questions", description: "Experimental question routes." }))
|
|
20
|
-
// Effect applies group middleware only to endpoints already added; session endpoints use session placement below.
|
|
21
|
-
.middleware(locationMiddleware)
|
|
22
|
-
.add(HttpApiEndpoint.get("session.question.list", "/api/session/:sessionID/question", {
|
|
23
|
-
params: { sessionID: Session.ID },
|
|
24
|
-
success: Schema.Struct({ data: Schema.Array(Question.Request) }),
|
|
25
|
-
error: SessionNotFoundError,
|
|
26
|
-
})
|
|
27
|
-
.middleware(sessionLocationMiddleware)
|
|
28
|
-
.annotateMerge(OpenApi.annotations({
|
|
29
|
-
identifier: "v2.session.question.list",
|
|
30
|
-
summary: "List session question requests",
|
|
31
|
-
description: "Retrieve pending question requests owned by a session.",
|
|
32
|
-
})))
|
|
33
|
-
.add(HttpApiEndpoint.post("session.question.reply", "/api/session/:sessionID/question/:requestID/reply", {
|
|
34
|
-
params: { sessionID: Session.ID, requestID: Question.ID },
|
|
35
|
-
payload: Question.Reply,
|
|
36
|
-
success: HttpApiSchema.NoContent,
|
|
37
|
-
error: [SessionNotFoundError, QuestionNotFoundError],
|
|
38
|
-
})
|
|
39
|
-
.middleware(sessionLocationMiddleware)
|
|
40
|
-
.annotateMerge(OpenApi.annotations({
|
|
41
|
-
identifier: "v2.session.question.reply",
|
|
42
|
-
summary: "Reply to pending question request",
|
|
43
|
-
description: "Answer a pending question request owned by a session.",
|
|
44
|
-
})))
|
|
45
|
-
.add(HttpApiEndpoint.post("session.question.reject", "/api/session/:sessionID/question/:requestID/reject", {
|
|
46
|
-
params: { sessionID: Session.ID, requestID: Question.ID },
|
|
47
|
-
success: HttpApiSchema.NoContent,
|
|
48
|
-
error: [SessionNotFoundError, QuestionNotFoundError],
|
|
49
|
-
})
|
|
50
|
-
.middleware(sessionLocationMiddleware)
|
|
51
|
-
.annotateMerge(OpenApi.annotations({
|
|
52
|
-
identifier: "v2.session.question.reject",
|
|
53
|
-
summary: "Reject pending question request",
|
|
54
|
-
description: "Reject a pending question request owned by a session.",
|
|
55
|
-
})))
|
|
56
|
-
.annotateMerge(OpenApi.annotations({ title: "session questions", description: "Experimental session question routes." }));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Location } from "@opencode-ai/schema/location";
|
|
2
|
-
import { Reference } from "@opencode-ai/schema/reference";
|
|
3
|
-
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
5
|
-
export declare const ReferenceGroup: HttpApiGroup.HttpApiGroup<"server.reference", HttpApiEndpoint.HttpApiEndpoint<"reference.list", "GET", "/api/reference", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
6
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
7
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
8
|
-
readonly workspace: Schema.optional<Schema.String>;
|
|
9
|
-
}>>;
|
|
10
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
11
|
-
readonly location: typeof Location.Info;
|
|
12
|
-
readonly data: Schema.$Array<typeof Reference.Info>;
|
|
13
|
-
}>>, HttpApiEndpoint.Json<never>, never, never>, false>;
|
package/dist/groups/reference.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Location } from "@opencode-ai/schema/location";
|
|
2
|
-
import { Reference } from "@opencode-ai/schema/reference";
|
|
3
|
-
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
|
|
5
|
-
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
|
-
export const ReferenceGroup = HttpApiGroup.make("server.reference")
|
|
7
|
-
.add(HttpApiEndpoint.get("reference.list", "/api/reference", {
|
|
8
|
-
query: LocationQuery,
|
|
9
|
-
success: Location.response(Schema.Array(Reference.Info)),
|
|
10
|
-
})
|
|
11
|
-
.annotateMerge(locationQueryOpenApi)
|
|
12
|
-
.annotateMerge(OpenApi.annotations({
|
|
13
|
-
identifier: "v2.reference.list",
|
|
14
|
-
summary: "List references",
|
|
15
|
-
description: "List references available in the requested location.",
|
|
16
|
-
})))
|
|
17
|
-
.annotateMerge(OpenApi.annotations({
|
|
18
|
-
title: "reference",
|
|
19
|
-
description: "Location-scoped project references.",
|
|
20
|
-
}));
|