@opencode/protocol 0.0.0-dev-1021 → 0.0.0-dev-1024

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.
@@ -1,7 +1,7 @@
1
1
  import { Agent } from "@opencode/schema/agent";
2
2
  import { Schema } from "effect";
3
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
4
- import { AgentNotFoundError, ServiceUnavailableError } from "../errors.js";
4
+ import { AgentNotFoundError } from "../errors.js";
5
5
  export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpApiEndpoint.HttpApiEndpoint<"agent.get", "GET", "/api/agent/:agentID", Schema.toCodecStringTree<Schema.Struct<{
6
6
  agentID: Schema.brand<Schema.String, "Agent.ID">;
7
7
  }>>, Schema.toCodecStringTree<Schema.Struct<{
@@ -264,4 +264,4 @@ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpA
264
264
  })[];
265
265
  };
266
266
  }>;
267
- }>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never>, false>;
267
+ }>>, never, never, never>, false>;
@@ -3,12 +3,11 @@ import { Location } from "@opencode/schema/location";
3
3
  import { Schema } from "effect";
4
4
  import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
5
5
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
6
- import { AgentNotFoundError, ServiceUnavailableError } from "../errors.js";
6
+ import { AgentNotFoundError } from "../errors.js";
7
7
  export const AgentGroup = HttpApiGroup.make("server.agent")
8
8
  .add(HttpApiEndpoint.get("agent.list", "/api/agent", {
9
9
  query: LocationQuery,
10
10
  success: Location.response(Schema.Array(Agent.Info)),
11
- error: ServiceUnavailableError,
12
11
  })
13
12
  .annotateMerge(locationQueryOpenApi)
14
13
  .annotateMerge(OpenApi.annotations({
@@ -43,6 +43,13 @@ export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate",
43
43
  readonly type: Schema.Literal<"predicate">;
44
44
  readonly name: Schema.String;
45
45
  readonly instructions: Schema.String;
46
+ readonly criteria: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
47
+ readonly true: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
48
+ readonly false: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
49
+ }>>>, Schema.optionalKey<Schema.Struct<{
50
+ readonly true: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
51
+ readonly false: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
52
+ }>>, never, never>;
46
53
  }>, Schema.Struct<{
47
54
  readonly type: Schema.Literal<"choice">;
48
55
  readonly name: Schema.String;
@@ -1,6 +1,5 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
- import { ServiceUnavailableError } from "../errors.js";
4
3
  export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpApiEndpoint.HttpApiEndpoint<"skill.list", "GET", "/api/skill", never, Schema.toCodecStringTree<Schema.Struct<{
5
4
  readonly location: Schema.optional<Schema.Struct<{
6
5
  readonly directory: Schema.optional<Schema.String>;
@@ -17,4 +16,4 @@ export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpA
17
16
  readonly path: Schema.brand<Schema.String, "AbsolutePath">;
18
17
  readonly content: Schema.String;
19
18
  }>>;
20
- }>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never>, false>;
19
+ }>>, never, never, never>, false>;
@@ -2,13 +2,11 @@ import { Skill } from "@opencode/schema/skill";
2
2
  import { Location } from "@opencode/schema/location";
3
3
  import { Schema } from "effect";
4
4
  import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
5
- import { ServiceUnavailableError } from "../errors.js";
6
5
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
7
6
  export const SkillGroup = HttpApiGroup.make("server.skill")
8
7
  .add(HttpApiEndpoint.get("skill.list", "/api/skill", {
9
8
  query: LocationQuery,
10
9
  success: Location.response(Schema.Array(Skill.Info)),
11
- error: ServiceUnavailableError,
12
10
  })
13
11
  .annotateMerge(locationQueryOpenApi)
14
12
  .annotateMerge(OpenApi.annotations({
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-1021",
4
+ "version": "0.0.0-dev-1024",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "typecheck:tsc": "tsc --noEmit"
36
36
  },
37
37
  "dependencies": {
38
- "@opencode/schema": "0.0.0-dev-1021",
38
+ "@opencode/schema": "0.0.0-dev-1024",
39
39
  "effect": "4.1.0"
40
40
  },
41
41
  "devDependencies": {