@opencode/protocol 0.0.0-dev-21631 → 0.0.0-dev-21641
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/debug.d.ts +5 -3
- package/dist/groups/debug.js +8 -3
- package/package.json +2 -2
package/dist/groups/debug.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
|
-
import { UnknownError } from "../errors.js";
|
|
4
|
-
export declare const DebugGroup: HttpApiGroup.HttpApiGroup<"server.debug", HttpApiEndpoint.HttpApiEndpoint<"debug.heapDump", "POST", "/api/debug/heap-dump", never,
|
|
3
|
+
import { InvalidRequestError, UnknownError } from "../errors.js";
|
|
4
|
+
export declare const DebugGroup: HttpApiGroup.HttpApiGroup<"server.debug", HttpApiEndpoint.HttpApiEndpoint<"debug.heapDump", "POST", "/api/debug/heap-dump", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
6
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
5
7
|
readonly path: Schema.String;
|
|
6
8
|
readonly pid: Schema.Int;
|
|
7
|
-
}>>, Schema.toCodecJson<typeof UnknownError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"debug.location", "GET", "/api/debug/location", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
9
|
+
}>>, Schema.toCodecJson<typeof InvalidRequestError | typeof UnknownError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"debug.location", "GET", "/api/debug/location", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
8
10
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
9
11
|
}>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"debug.location.evict", "DELETE", "/api/debug/location", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
10
12
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/debug.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Location } from "@opencode/schema/location";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
|
-
import { UnknownError } from "../errors.js";
|
|
4
|
+
import { InvalidRequestError, UnknownError } from "../errors.js";
|
|
5
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
6
|
export const DebugGroup = HttpApiGroup.make("server.debug")
|
|
7
7
|
.add(HttpApiEndpoint.post("debug.heapDump", "/api/debug/heap-dump", {
|
|
8
|
+
query: Schema.Struct({
|
|
9
|
+
directory: Schema.String.pipe(Schema.optional, Schema.annotate({
|
|
10
|
+
description: "Absolute server-local directory to write the snapshot into, created when missing. Defaults to the server's log directory.",
|
|
11
|
+
})),
|
|
12
|
+
}),
|
|
8
13
|
success: Schema.Struct({ path: Schema.String, pid: Schema.Int }),
|
|
9
|
-
error: UnknownError,
|
|
14
|
+
error: [InvalidRequestError, UnknownError],
|
|
10
15
|
}).annotateMerge(OpenApi.annotations({
|
|
11
16
|
identifier: "debug.heapDump",
|
|
12
17
|
summary: "Write a heap snapshot",
|
|
13
|
-
description: "Write a JavaScript heap snapshot of the server process into its log directory and return the server-local path once the file is complete. Pauses the server while the heap serializes and can temporarily increase its memory use. The snapshot can contain credentials, prompts, and file contents.",
|
|
18
|
+
description: "Write a JavaScript heap snapshot of the server process into its log directory, or the requested directory, and return the server-local path once the file is complete. Pauses the server while the heap serializes and can temporarily increase its memory use. The snapshot can contain credentials, prompts, and file contents.",
|
|
14
19
|
})))
|
|
15
20
|
.add(HttpApiEndpoint.get("debug.location", "/api/debug/location", {
|
|
16
21
|
success: Schema.Array(Location.PublicRef),
|
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-21641",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"typecheck:tsc": "tsc --noEmit"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@opencode/schema": "0.0.0-dev-
|
|
37
|
+
"@opencode/schema": "0.0.0-dev-21641",
|
|
38
38
|
"effect": "4.0.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|