@opencode/protocol 0.0.0-dev-21106 → 0.0.0-dev-21107

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.
@@ -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"> & {
@@ -79,18 +57,40 @@ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credenti
79
57
  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
58
  }>]>;
81
59
  }>;
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<{
60
+ }>>, Schema.toCodecJson<typeof ConflictError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.list", "GET", "/api/credential", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
61
+ readonly data: Schema.$Array<Schema.Struct<{
62
+ readonly id: Schema.brand<Schema.String, "Credential.ID"> & {
63
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
64
+ };
65
+ readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
66
+ readonly label: Schema.String;
67
+ readonly active: Schema.Boolean;
68
+ readonly value: Schema.Union<readonly [Schema.Struct<{
69
+ readonly type: Schema.Literal<"oauth">;
70
+ readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
71
+ readonly refresh: Schema.String;
72
+ readonly access: Schema.String;
73
+ readonly expires: Schema.Int;
74
+ 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
+ }>, Schema.Struct<{
76
+ readonly type: Schema.Literal<"key">;
77
+ readonly key: Schema.String;
78
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
79
+ 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>;
80
+ }>, Schema.Struct<{
81
+ readonly type: Schema.Literal<"external">;
82
+ readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
83
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
84
+ }>]>;
85
+ }>>;
86
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
89
87
  credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
90
88
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
91
89
  };
92
- }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
90
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.update", "PATCH", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
93
91
  credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
94
92
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
95
93
  };
96
- }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;
94
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
95
+ readonly label: Schema.String;
96
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;