@opencode-ai/protocol 0.0.0-next-17430 → 0.0.0-next-17444
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/groups/event.d.ts
CHANGED
|
@@ -3867,7 +3867,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
3867
3867
|
readonly action: Schema.String;
|
|
3868
3868
|
readonly resources: Schema.$Array<Schema.String>;
|
|
3869
3869
|
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
3870
|
-
readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
3871
3870
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
3872
3871
|
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
3873
3872
|
readonly type: Schema.Literal<"tool">;
|
|
@@ -3894,7 +3893,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
3894
3893
|
readonly action: Schema.String;
|
|
3895
3894
|
readonly resources: Schema.$Array<Schema.String>;
|
|
3896
3895
|
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
3897
|
-
readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
3898
3896
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
3899
3897
|
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
3900
3898
|
readonly type: Schema.Literal<"tool">;
|
|
@@ -5928,7 +5926,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
5928
5926
|
readonly [x: string]: unknown;
|
|
5929
5927
|
} | undefined;
|
|
5930
5928
|
readonly save?: readonly string[] | undefined;
|
|
5931
|
-
readonly opaque?: boolean | undefined;
|
|
5932
5929
|
readonly source?: {
|
|
5933
5930
|
readonly type: "tool";
|
|
5934
5931
|
readonly messageID: string;
|
|
@@ -11532,7 +11529,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
11532
11529
|
readonly action: Schema.String;
|
|
11533
11530
|
readonly resources: Schema.$Array<Schema.String>;
|
|
11534
11531
|
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
11535
|
-
readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
11536
11532
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
11537
11533
|
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
11538
11534
|
readonly type: Schema.Literal<"tool">;
|
|
@@ -11559,7 +11555,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
11559
11555
|
readonly action: Schema.String;
|
|
11560
11556
|
readonly resources: Schema.$Array<Schema.String>;
|
|
11561
11557
|
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
11562
|
-
readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
11563
11558
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
11564
11559
|
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
11565
11560
|
readonly type: Schema.Literal<"tool">;
|
|
@@ -17,7 +17,6 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
17
17
|
readonly action: Schema.String;
|
|
18
18
|
readonly resources: Schema.$Array<Schema.String>;
|
|
19
19
|
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
20
|
-
readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
21
20
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
22
21
|
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
23
22
|
readonly type: Schema.Literal<"tool">;
|
|
@@ -57,12 +56,13 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
57
56
|
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
58
57
|
};
|
|
59
58
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
60
|
-
readonly
|
|
61
|
-
|
|
59
|
+
readonly id: Schema.optional<Schema.brand<Schema.String, "Permission.ID"> & {
|
|
60
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
|
|
61
|
+
}>;
|
|
62
62
|
readonly action: Schema.String;
|
|
63
63
|
readonly resources: Schema.$Array<Schema.String>;
|
|
64
64
|
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
65
|
-
readonly
|
|
65
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
66
66
|
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
67
67
|
readonly type: Schema.Literal<"tool">;
|
|
68
68
|
readonly messageID: Schema.String;
|
|
@@ -72,9 +72,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
72
72
|
readonly messageID: Schema.String;
|
|
73
73
|
readonly id: Schema.String;
|
|
74
74
|
}>]>>, never, never>;
|
|
75
|
-
readonly
|
|
76
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
|
|
77
|
-
}>;
|
|
75
|
+
readonly agent: Schema.optional<Schema.brand<Schema.String, "Agent.ID">>;
|
|
78
76
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
79
77
|
readonly data: Schema.Struct<{
|
|
80
78
|
readonly id: Schema.brand<Schema.String, "Permission.ID"> & {
|
|
@@ -96,7 +94,6 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
96
94
|
readonly action: Schema.String;
|
|
97
95
|
readonly resources: Schema.$Array<Schema.String>;
|
|
98
96
|
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
99
|
-
readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
100
97
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
101
98
|
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
102
99
|
readonly type: Schema.Literal<"tool">;
|
|
@@ -128,7 +125,6 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
128
125
|
readonly action: Schema.String;
|
|
129
126
|
readonly resources: Schema.$Array<Schema.String>;
|
|
130
127
|
readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
131
|
-
readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
132
128
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
133
129
|
readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
134
130
|
readonly type: Schema.Literal<"tool">;
|
|
@@ -4,7 +4,7 @@ import { Permission } from "@opencode-ai/schema/permission";
|
|
|
4
4
|
import { PermissionSaved } from "@opencode-ai/schema/permission-saved";
|
|
5
5
|
import { Project } from "@opencode-ai/schema/project";
|
|
6
6
|
import { Session } from "@opencode-ai/schema/session";
|
|
7
|
-
import { Context, Schema
|
|
7
|
+
import { Context, Schema } from "effect";
|
|
8
8
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
9
9
|
import { PermissionNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
10
10
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
@@ -41,7 +41,11 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
|
|
|
41
41
|
params: { sessionID: Session.ID },
|
|
42
42
|
payload: Schema.Struct({
|
|
43
43
|
id: Permission.ID.pipe(Schema.optional),
|
|
44
|
-
|
|
44
|
+
action: Permission.Request.fields.action,
|
|
45
|
+
resources: Permission.Request.fields.resources,
|
|
46
|
+
save: Permission.Request.fields.save,
|
|
47
|
+
metadata: Permission.Request.fields.metadata,
|
|
48
|
+
source: Permission.Request.fields.source,
|
|
45
49
|
agent: Agent.ID.pipe(Schema.optional),
|
|
46
50
|
}),
|
|
47
51
|
success: Schema.Struct({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode-ai/protocol",
|
|
4
|
-
"version": "0.0.0-next-
|
|
4
|
+
"version": "0.0.0-next-17444",
|
|
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-ai/schema": "0.0.0-next-
|
|
35
|
+
"@opencode-ai/schema": "0.0.0-next-17444",
|
|
36
36
|
"effect": "4.0.0-beta.101"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|