@opencode/protocol 0.0.0-dev-19714 → 0.0.0-dev-19716
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/groups/server.d.ts +9 -3
- package/dist/groups/server.js +10 -7
- package/package.json +2 -2
package/dist/groups/server.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const ServerInfo: Schema.Struct<{
|
|
4
4
|
readonly version: Schema.String;
|
|
5
5
|
readonly pid: Schema.Int;
|
|
6
6
|
readonly urls: Schema.$Array<Schema.String>;
|
|
7
|
+
readonly paths: Schema.Struct<{
|
|
8
|
+
readonly tmp: Schema.String;
|
|
9
|
+
}>;
|
|
7
10
|
}>;
|
|
8
|
-
export type
|
|
9
|
-
export declare const ServerGroup: HttpApiGroup.HttpApiGroup<"server.server", HttpApiEndpoint.HttpApiEndpoint<"server.
|
|
11
|
+
export type ServerInfo = typeof ServerInfo.Type;
|
|
12
|
+
export declare const ServerGroup: HttpApiGroup.HttpApiGroup<"server.server", HttpApiEndpoint.HttpApiEndpoint<"server.info", "GET", "/api/info", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
10
13
|
readonly version: Schema.String;
|
|
11
14
|
readonly pid: Schema.Int;
|
|
12
15
|
readonly urls: Schema.$Array<Schema.String>;
|
|
16
|
+
readonly paths: Schema.Struct<{
|
|
17
|
+
readonly tmp: Schema.String;
|
|
18
|
+
}>;
|
|
13
19
|
}>>, never, never, never>, false>;
|
package/dist/groups/server.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
|
|
3
|
-
export const
|
|
3
|
+
export const ServerInfo = Schema.Struct({
|
|
4
4
|
version: Schema.String,
|
|
5
5
|
// 0 means the runtime has no OS process identity (e.g. workerd).
|
|
6
6
|
pid: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
7
7
|
urls: Schema.Array(Schema.String),
|
|
8
|
-
|
|
8
|
+
paths: Schema.Struct({
|
|
9
|
+
tmp: Schema.String,
|
|
10
|
+
}),
|
|
11
|
+
}).annotate({ identifier: "ServerInfo" });
|
|
9
12
|
export const ServerGroup = HttpApiGroup.make("server.server")
|
|
10
|
-
.add(HttpApiEndpoint.get("server.
|
|
11
|
-
success:
|
|
13
|
+
.add(HttpApiEndpoint.get("server.info", "/api/info", {
|
|
14
|
+
success: ServerInfo,
|
|
12
15
|
}).annotateMerge(OpenApi.annotations({
|
|
13
|
-
identifier: "server.
|
|
14
|
-
summary: "Get server
|
|
15
|
-
description: "Return the server identity, connection URLs, and readiness status.",
|
|
16
|
+
identifier: "server.info",
|
|
17
|
+
summary: "Get server info",
|
|
18
|
+
description: "Return the server identity, connection URLs, paths, and readiness status.",
|
|
16
19
|
})))
|
|
17
20
|
.annotateMerge(OpenApi.annotations({ title: "server" }));
|
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-19716",
|
|
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-19716",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|