@opencode/protocol 0.0.0-dev-19560 → 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.
|
@@ -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
|
|
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>;
|
package/dist/groups/reference.js
CHANGED
|
@@ -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(
|
|
22
|
+
success: Location.response(Schema.Array(PublicInfo)),
|
|
10
23
|
})
|
|
11
24
|
.annotateMerge(locationQueryOpenApi)
|
|
12
25
|
.annotateMerge(OpenApi.annotations({
|
package/dist/groups/skill.d.ts
CHANGED
|
@@ -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
|
|
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-
|
|
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-
|
|
35
|
+
"@opencode/schema": "0.0.0-dev-19561",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|