@opencode/protocol 2.0.32 → 2.1.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/dist/errors.d.ts CHANGED
@@ -149,6 +149,12 @@ declare const PermissionNotFoundError_base: Schema.Class<PermissionNotFoundError
149
149
  }>, import("effect/Cause").YieldableError>;
150
150
  export declare class PermissionNotFoundError extends PermissionNotFoundError_base {
151
151
  }
152
+ declare const PermissionSavedNotFoundError_base: Schema.Class<PermissionSavedNotFoundError, Schema.TaggedStruct<"PermissionSavedNotFoundError", {
153
+ readonly id: Schema.String;
154
+ readonly message: Schema.String;
155
+ }>, import("effect/Cause").YieldableError>;
156
+ export declare class PermissionSavedNotFoundError extends PermissionSavedNotFoundError_base {
157
+ }
152
158
  declare const FormNotFoundError_base: Schema.Class<FormNotFoundError, Schema.TaggedStruct<"FormNotFoundError", {
153
159
  readonly id: Schema.String;
154
160
  readonly message: Schema.String;
package/dist/errors.js CHANGED
@@ -118,6 +118,11 @@ export class PermissionNotFoundError extends Schema.TaggedError()("PermissionNot
118
118
  message: Schema.String,
119
119
  }, { httpApiStatus: 404 }) {
120
120
  }
121
+ export class PermissionSavedNotFoundError extends Schema.TaggedError()("PermissionSavedNotFoundError", {
122
+ id: Schema.String,
123
+ message: Schema.String,
124
+ }, { httpApiStatus: 404 }) {
125
+ }
121
126
  export class FormNotFoundError extends Schema.TaggedError()("FormNotFoundError", {
122
127
  id: Schema.String,
123
128
  message: Schema.String,
@@ -2,7 +2,9 @@ import { Agent } from "@opencode/schema/agent";
2
2
  import { Schema } from "effect";
3
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
4
4
  import { AgentNotFoundError } from "../errors.js";
5
- export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpApiEndpoint.HttpApiEndpoint<"agent.list", "GET", "/api/agent", never, Schema.toCodecStringTree<Schema.Struct<{
5
+ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpApiEndpoint.HttpApiEndpoint<"agent.get", "GET", "/api/agent/:agentID", Schema.toCodecStringTree<Schema.Struct<{
6
+ agentID: Schema.brand<Schema.String, "Agent.ID">;
7
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
6
8
  readonly location: Schema.optional<Schema.Struct<{
7
9
  readonly directory: Schema.optional<Schema.String>;
8
10
  }>>;
@@ -10,7 +12,7 @@ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpA
10
12
  readonly location: Schema.Struct<{
11
13
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12
14
  }>;
13
- readonly data: Schema.$Array<Schema.Struct<{
15
+ readonly data: Schema.Struct<{
14
16
  readonly id: Schema.brand<Schema.String, "Agent.ID">;
15
17
  readonly name: Schema.brand<Schema.String, "Agent.Name">;
16
18
  readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
@@ -110,10 +112,8 @@ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpA
110
112
  effect: "ask";
111
113
  })[];
112
114
  };
113
- }>;
114
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"agent.get", "GET", "/api/agent/:agentID", Schema.toCodecStringTree<Schema.Struct<{
115
- agentID: Schema.brand<Schema.String, "Agent.ID">;
116
- }>>, Schema.toCodecStringTree<Schema.Struct<{
115
+ };
116
+ }>>, Schema.toCodecJson<typeof AgentNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"agent.list", "GET", "/api/agent", never, Schema.toCodecStringTree<Schema.Struct<{
117
117
  readonly location: Schema.optional<Schema.Struct<{
118
118
  readonly directory: Schema.optional<Schema.String>;
119
119
  }>>;
@@ -121,7 +121,7 @@ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpA
121
121
  readonly location: Schema.Struct<{
122
122
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
123
123
  }>;
124
- readonly data: Schema.Struct<{
124
+ readonly data: Schema.$Array<Schema.Struct<{
125
125
  readonly id: Schema.brand<Schema.String, "Agent.ID">;
126
126
  readonly name: Schema.brand<Schema.String, "Agent.Name">;
127
127
  readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
@@ -221,5 +221,5 @@ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpA
221
221
  effect: "ask";
222
222
  })[];
223
223
  };
224
- };
225
- }>>, Schema.toCodecJson<typeof AgentNotFoundError>, never, never>, false>;
224
+ }>;
225
+ }>>, never, never, never>, false>;
@@ -1,33 +1,11 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
3
3
  import { ConflictError } from "../errors.js";
4
- export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credential", HttpApiEndpoint.HttpApiEndpoint<"credential.list", "GET", "/api/credential", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
5
- readonly data: Schema.$Array<Schema.Struct<{
6
- readonly id: Schema.brand<Schema.String, "Credential.ID"> & {
7
- create: () => string & import("effect/Brand").Brand<"Credential.ID">;
8
- };
9
- readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
10
- readonly label: Schema.String;
11
- readonly active: Schema.Boolean;
12
- readonly value: Schema.Union<readonly [Schema.Struct<{
13
- readonly type: Schema.Literal<"oauth">;
14
- readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
15
- readonly refresh: Schema.String;
16
- readonly access: Schema.String;
17
- readonly expires: Schema.Int;
18
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
19
- }>, Schema.Struct<{
20
- readonly type: Schema.Literal<"key">;
21
- readonly key: Schema.String;
22
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
23
- readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
24
- }>, Schema.Struct<{
25
- readonly type: Schema.Literal<"external">;
26
- readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
27
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
28
- }>]>;
29
- }>>;
30
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.create", "POST", "/api/credential", never, never, Schema.toCodecJson<Schema.Struct<{
4
+ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credential", HttpApiEndpoint.HttpApiEndpoint<"credential.activate", "POST", "/api/credential/:credentialID/activate", Schema.toCodecStringTree<Schema.Struct<{
5
+ credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
6
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
7
+ };
8
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.create", "POST", "/api/credential", never, never, Schema.toCodecJson<Schema.Struct<{
31
9
  readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Credential.ID"> & {
32
10
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
33
11
  }>>, Schema.optionalKey<Schema.brand<Schema.String, "Credential.ID"> & {
@@ -46,7 +24,6 @@ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credenti
46
24
  readonly type: Schema.Literal<"key">;
47
25
  readonly key: Schema.String;
48
26
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
49
- readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
50
27
  }>, Schema.Struct<{
51
28
  readonly type: Schema.Literal<"external">;
52
29
  readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
@@ -72,25 +49,45 @@ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credenti
72
49
  readonly type: Schema.Literal<"key">;
73
50
  readonly key: Schema.String;
74
51
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
75
- readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
76
52
  }>, Schema.Struct<{
77
53
  readonly type: Schema.Literal<"external">;
78
54
  readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
79
55
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
80
56
  }>]>;
81
57
  }>;
82
- }>>, Schema.toCodecJson<typeof ConflictError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.update", "PATCH", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
83
- credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
84
- create: () => string & import("effect/Brand").Brand<"Credential.ID">;
85
- };
86
- }>>, never, Schema.toCodecJson<Schema.Struct<{
87
- readonly label: Schema.String;
88
- }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.activate", "POST", "/api/credential/:credentialID/activate", Schema.toCodecStringTree<Schema.Struct<{
58
+ }>>, Schema.toCodecJson<typeof ConflictError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.list", "GET", "/api/credential", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
59
+ readonly data: Schema.$Array<Schema.Struct<{
60
+ readonly id: Schema.brand<Schema.String, "Credential.ID"> & {
61
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
62
+ };
63
+ readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
64
+ readonly label: Schema.String;
65
+ readonly active: Schema.Boolean;
66
+ readonly value: Schema.Union<readonly [Schema.Struct<{
67
+ readonly type: Schema.Literal<"oauth">;
68
+ readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
69
+ readonly refresh: Schema.String;
70
+ readonly access: Schema.String;
71
+ readonly expires: Schema.Int;
72
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
73
+ }>, Schema.Struct<{
74
+ readonly type: Schema.Literal<"key">;
75
+ readonly key: Schema.String;
76
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
77
+ }>, Schema.Struct<{
78
+ readonly type: Schema.Literal<"external">;
79
+ readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
80
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
81
+ }>]>;
82
+ }>>;
83
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
89
84
  credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
90
85
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
91
86
  };
92
- }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
87
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.update", "PATCH", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
93
88
  credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
94
89
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
95
90
  };
96
- }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;
91
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
92
+ readonly label: Schema.String;
93
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;