@opencode/protocol 0.0.0-dev-19559 → 0.0.0-dev-19561

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.
@@ -38,11 +38,7 @@ export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", Htt
38
38
  readonly ref: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
39
39
  }>]>;
40
40
  }>>;
41
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.awaitActivation", "POST", "/api/plugin/await-activation", never, Schema.toCodecStringTree<Schema.Struct<{
42
- readonly location: Schema.optional<Schema.Struct<{
43
- readonly directory: Schema.optional<Schema.String>;
44
- }>>;
45
- }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.check", "POST", "/api/plugin/check", never, Schema.toCodecStringTree<Schema.Struct<{
41
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.check", "POST", "/api/plugin/check", never, Schema.toCodecStringTree<Schema.Struct<{
46
42
  readonly location: Schema.optional<Schema.Struct<{
47
43
  readonly directory: Schema.optional<Schema.String>;
48
44
  }>>;
@@ -14,16 +14,6 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
14
14
  identifier: "plugin.list",
15
15
  summary: "List plugins",
16
16
  description: "Retrieve enabled server plugins and their current status.",
17
- })))
18
- .add(HttpApiEndpoint.post("plugin.awaitActivation", "/api/plugin/await-activation", {
19
- query: LocationQuery,
20
- success: HttpApiSchema.NoContent,
21
- })
22
- .annotateMerge(locationQueryOpenApi)
23
- .annotateMerge(OpenApi.annotations({
24
- identifier: "plugin.awaitActivation",
25
- summary: "Wait for plugin activation",
26
- description: "Wait for configured plugin activation at a Location to settle, including missing-package installs. Completion does not imply every plugin succeeded or background resource discovery finished. Cancelling this wait does not cancel activation.",
27
17
  })))
28
18
  .add(HttpApiEndpoint.post("plugin.check", "/api/plugin/check", {
29
19
  query: LocationQuery,
@@ -9,21 +9,17 @@ export declare const ReferenceGroup: HttpApiGroup.HttpApiGroup<"server.reference
9
9
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
10
10
  }>;
11
11
  readonly data: Schema.$Array<Schema.Struct<{
12
- readonly name: Schema.String;
13
- readonly path: Schema.brand<Schema.String, "AbsolutePath">;
14
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
15
- readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
16
12
  readonly source: Schema.Union<readonly [Schema.Struct<{
17
13
  readonly type: Schema.Literal<"local">;
18
14
  readonly path: Schema.brand<Schema.String, "AbsolutePath">;
19
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
20
- readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
21
15
  }>, Schema.Struct<{
22
16
  readonly type: Schema.Literal<"git">;
23
- readonly repository: Schema.String;
24
17
  readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
25
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
26
- readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
18
+ readonly repository: Schema.String;
27
19
  }>]>;
20
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
21
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
22
+ readonly name: Schema.String;
23
+ readonly hidden: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
28
24
  }>>;
29
25
  }>>, never, never, never>, false>;
@@ -1,12 +1,25 @@
1
1
  import { Location } from "@opencode/schema/location";
2
2
  import { Reference } from "@opencode/schema/reference";
3
- import { Schema } from "effect";
3
+ import { Schema, Struct } from "effect";
4
4
  import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
5
5
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
6
+ const PublicLocalSource = Schema.Struct(Struct.omit(Reference.LocalSource.fields, ["description", "hidden"])).annotate({
7
+ identifier: "Reference.LocalSource",
8
+ });
9
+ const PublicGitSource = Schema.Struct(Struct.omit(Reference.GitSource.fields, ["description", "hidden"])).annotate({
10
+ identifier: "Reference.GitSource",
11
+ });
12
+ const PublicSource = Schema.Union([PublicLocalSource, PublicGitSource])
13
+ .pipe(Schema.toTaggedUnion("type"))
14
+ .annotate({ identifier: "Reference.Source" });
15
+ const PublicInfo = Schema.Struct({
16
+ ...Struct.omit(Reference.Info.fields, ["source"]),
17
+ source: PublicSource,
18
+ }).annotate({ identifier: "Reference.Info" });
6
19
  export const ReferenceGroup = HttpApiGroup.make("server.reference")
7
20
  .add(HttpApiEndpoint.get("reference.list", "/api/reference", {
8
21
  query: LocationQuery,
9
- success: Location.response(Schema.Array(Reference.Info)),
22
+ success: Location.response(Schema.Array(PublicInfo)),
10
23
  })
11
24
  .annotateMerge(locationQueryOpenApi)
12
25
  .annotateMerge(OpenApi.annotations({
@@ -12,9 +12,8 @@ export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpA
12
12
  readonly id: Schema.brand<Schema.String, "Skill.ID">;
13
13
  readonly name: Schema.brand<Schema.String, "Skill.Name">;
14
14
  readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
15
- readonly slash: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
16
15
  readonly autoinvoke: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
17
- readonly location: Schema.brand<Schema.String, "AbsolutePath">;
16
+ readonly path: Schema.brand<Schema.String, "AbsolutePath">;
18
17
  readonly content: Schema.String;
19
18
  }>>;
20
19
  }>>, never, never, never>, false>;
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-19559",
4
+ "version": "0.0.0-dev-19561",
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-19559",
35
+ "@opencode/schema": "0.0.0-dev-19561",
36
36
  "effect": "4.0.0-rc.112"
37
37
  },
38
38
  "devDependencies": {