@opencode/protocol 0.0.0-dev-19656 → 0.0.0-dev-19657
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.
|
@@ -157,15 +157,4 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
157
157
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
158
158
|
readonly decision: Schema.Literals<readonly ["once", "always", "reject"]>;
|
|
159
159
|
readonly message: Schema.optional<Schema.String>;
|
|
160
|
-
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof PermissionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId
|
|
161
|
-
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
162
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
163
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
164
|
-
};
|
|
165
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
166
|
-
readonly permissions: Schema.$Array<Schema.Struct<{
|
|
167
|
-
readonly action: Schema.String;
|
|
168
|
-
readonly resource: Schema.String;
|
|
169
|
-
readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
|
|
170
|
-
}>>;
|
|
171
|
-
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>>, false>;
|
|
160
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof PermissionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>>, false>;
|
|
@@ -93,17 +93,5 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
|
|
|
93
93
|
identifier: "session.permission.reply",
|
|
94
94
|
summary: "Reply to pending permission request",
|
|
95
95
|
description: "Respond to a pending permission request owned by a session.",
|
|
96
|
-
})))
|
|
97
|
-
.add(HttpApiEndpoint.put("session.permission.rules", "/api/session/:sessionID/permission/rules", {
|
|
98
|
-
params: { sessionID: Session.ID },
|
|
99
|
-
payload: Schema.Struct({ permissions: Permission.Ruleset }),
|
|
100
|
-
success: HttpApiSchema.NoContent,
|
|
101
|
-
error: SessionNotFoundError,
|
|
102
|
-
})
|
|
103
|
-
.middleware(sessionLocationMiddleware)
|
|
104
|
-
.annotateMerge(OpenApi.annotations({
|
|
105
|
-
identifier: "session.permission.rules",
|
|
106
|
-
summary: "Replace session permission rules",
|
|
107
|
-
description: "Replace the session-scoped permission rules. Rules are evaluated after the agent's rules, and the last matching rule wins.",
|
|
108
96
|
})))
|
|
109
97
|
.annotateMerge(OpenApi.annotations({ title: "permission", description: "Experimental permission routes." }));
|
package/dist/groups/session.d.ts
CHANGED
|
@@ -3016,13 +3016,18 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
|
|
|
3016
3016
|
readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
|
|
3017
3017
|
};
|
|
3018
3018
|
};
|
|
3019
|
-
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.
|
|
3019
|
+
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.update", "PATCH", "/api/session/:sessionID", Schema.toCodecStringTree<Schema.Struct<{
|
|
3020
3020
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
3021
3021
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
3022
3022
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
3023
3023
|
};
|
|
3024
3024
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
3025
|
-
readonly title: Schema.String
|
|
3025
|
+
readonly title: Schema.optional<Schema.String>;
|
|
3026
|
+
readonly permissions: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
3027
|
+
readonly action: Schema.String;
|
|
3028
|
+
readonly resource: Schema.String;
|
|
3029
|
+
readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
|
|
3030
|
+
}>>>;
|
|
3026
3031
|
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.move", "POST", "/api/session/:sessionID/move", Schema.toCodecStringTree<Schema.Struct<{
|
|
3027
3032
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
3028
3033
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
package/dist/groups/session.js
CHANGED
|
@@ -249,17 +249,20 @@ export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddlewa
|
|
|
249
249
|
summary: "Switch session model",
|
|
250
250
|
description: "Switch the model used by subsequent provider turns.",
|
|
251
251
|
})))
|
|
252
|
-
.add(HttpApiEndpoint.patch("session.
|
|
252
|
+
.add(HttpApiEndpoint.patch("session.update", "/api/session/:sessionID", {
|
|
253
253
|
params: { sessionID: Session.ID },
|
|
254
|
-
payload: Schema.Struct({
|
|
254
|
+
payload: Schema.Struct({
|
|
255
|
+
title: Schema.String.pipe(Schema.optional),
|
|
256
|
+
permissions: Permission.Ruleset.pipe(Schema.optional),
|
|
257
|
+
}),
|
|
255
258
|
success: HttpApiSchema.NoContent,
|
|
256
259
|
error: SessionNotFoundError,
|
|
257
260
|
})
|
|
258
261
|
.middleware(sessionLocationMiddleware)
|
|
259
262
|
.annotateMerge(OpenApi.annotations({
|
|
260
|
-
identifier: "session.
|
|
261
|
-
summary: "
|
|
262
|
-
description: "Update
|
|
263
|
+
identifier: "session.update",
|
|
264
|
+
summary: "Update session",
|
|
265
|
+
description: "Update mutable session properties.",
|
|
263
266
|
})))
|
|
264
267
|
.add(HttpApiEndpoint.post("session.move", "/api/session/:sessionID/move", {
|
|
265
268
|
params: { sessionID: Session.ID },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/protocol",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-19657",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typecheck": "tsgo --noEmit"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@opencode/schema": "0.0.0-dev-
|
|
35
|
+
"@opencode/schema": "0.0.0-dev-19657",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|