@opencode-ai/protocol 0.0.0-next-15609 → 0.0.0-next-15613

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,41 +1,14 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
3
3
  export declare namespace ServiceStatus {
4
- const State: Schema.Union<readonly [Schema.Struct<{
5
- readonly type: Schema.Literal<"starting">;
6
- }>, Schema.Struct<{
7
- readonly type: Schema.Literal<"ready">;
8
- }>, Schema.Struct<{
9
- readonly type: Schema.Literal<"stopping">;
10
- readonly targetVersion: Schema.optional<Schema.String>;
11
- }>, Schema.Struct<{
12
- readonly type: Schema.Literal<"failed">;
13
- readonly message: Schema.String;
14
- readonly action: Schema.String;
15
- }>]>;
16
- type State = typeof State.Type;
17
4
  const Health: Schema.Struct<{
18
5
  readonly healthy: Schema.Literal<true>;
19
6
  readonly version: Schema.String;
20
7
  readonly pid: Schema.Int;
21
- readonly instanceID: Schema.optional<Schema.String>;
22
- readonly status: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
23
- readonly type: Schema.Literal<"starting">;
24
- }>, Schema.Struct<{
25
- readonly type: Schema.Literal<"ready">;
26
- }>, Schema.Struct<{
27
- readonly type: Schema.Literal<"stopping">;
28
- readonly targetVersion: Schema.optional<Schema.String>;
29
- }>, Schema.Struct<{
30
- readonly type: Schema.Literal<"failed">;
31
- readonly message: Schema.String;
32
- readonly action: Schema.String;
33
- }>]>, never>;
34
8
  }>;
35
9
  type Health = typeof Health.Type;
36
10
  const StopRequest: Schema.Struct<{
37
11
  readonly instanceID: Schema.String;
38
- readonly targetVersion: Schema.optional<Schema.String>;
39
12
  }>;
40
13
  type StopRequest = typeof StopRequest.Type;
41
14
  const StopResponse: Schema.Struct<{
@@ -47,22 +20,8 @@ export declare const HealthGroup: HttpApiGroup.HttpApiGroup<"server.health", Htt
47
20
  readonly healthy: Schema.Literal<true>;
48
21
  readonly version: Schema.String;
49
22
  readonly pid: Schema.Int;
50
- readonly instanceID: Schema.optional<Schema.String>;
51
- readonly status: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
52
- readonly type: Schema.Literal<"starting">;
53
- }>, Schema.Struct<{
54
- readonly type: Schema.Literal<"ready">;
55
- }>, Schema.Struct<{
56
- readonly type: Schema.Literal<"stopping">;
57
- readonly targetVersion: Schema.optional<Schema.String>;
58
- }>, Schema.Struct<{
59
- readonly type: Schema.Literal<"failed">;
60
- readonly message: Schema.String;
61
- readonly action: Schema.String;
62
- }>]>, never>;
63
23
  }>>, HttpApiEndpoint.Json<never>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"health.stop", "POST", "/api/service/stop", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
64
24
  readonly instanceID: Schema.String;
65
- readonly targetVersion: Schema.optional<Schema.String>;
66
25
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
67
26
  readonly accepted: Schema.Boolean;
68
27
  }>>, HttpApiEndpoint.Json<never>, never, never>, false>;
@@ -1,30 +1,14 @@
1
- import { Effect, Schema } from "effect";
1
+ import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
3
3
  export var ServiceStatus;
4
4
  (function (ServiceStatus) {
5
- ServiceStatus.State = Schema.Union([
6
- Schema.Struct({ type: Schema.Literal("starting") }),
7
- Schema.Struct({ type: Schema.Literal("ready") }),
8
- Schema.Struct({
9
- type: Schema.Literal("stopping"),
10
- targetVersion: Schema.String.pipe(Schema.optional),
11
- }),
12
- Schema.Struct({
13
- type: Schema.Literal("failed"),
14
- message: Schema.String,
15
- action: Schema.String,
16
- }),
17
- ]).annotate({ identifier: "ServiceStatus" });
18
5
  ServiceStatus.Health = Schema.Struct({
19
6
  healthy: Schema.Literal(true),
20
7
  version: Schema.String,
21
8
  pid: Schema.Int.check(Schema.isGreaterThan(0)),
22
- instanceID: Schema.String.pipe(Schema.optional),
23
- status: ServiceStatus.State.pipe(Schema.withDecodingDefaultKey(Effect.succeed({ type: "ready" }))),
24
9
  }).annotate({ identifier: "ServiceHealth" });
25
10
  ServiceStatus.StopRequest = Schema.Struct({
26
11
  instanceID: Schema.String,
27
- targetVersion: Schema.String.pipe(Schema.optional),
28
12
  }).annotate({ identifier: "ServiceStopRequest" });
29
13
  ServiceStatus.StopResponse = Schema.Struct({
30
14
  accepted: Schema.Boolean,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/protocol",
4
- "version": "0.0.0-next-15609",
4
+ "version": "0.0.0-next-15613",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsgo --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@opencode-ai/schema": "0.0.0-next-15609",
29
+ "@opencode-ai/schema": "0.0.0-next-15613",
30
30
  "effect": "4.0.0-beta.83"
31
31
  },
32
32
  "devDependencies": {