@opencode/protocol 0.0.0-beta-19500 → 0.0.0-dev-19274

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.
@@ -5,7 +5,6 @@ export declare const SessionMessagesQuery: Schema.Struct<{
5
5
  readonly limit: Schema.optional<Schema.NumberFromString>;
6
6
  readonly order: Schema.optional<Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>>;
7
7
  readonly cursor: Schema.optional<Schema.String>;
8
- readonly type: Schema.optional<Schema.Literals<("skill" | "compaction" | "system" | "shell" | "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "assistant")[]>>;
9
8
  }>;
10
9
  export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", HttpApiEndpoint.HttpApiEndpoint<"session.messages", "GET", "/api/session/:sessionID/message", Schema.toCodecStringTree<Schema.Struct<{
11
10
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
@@ -16,7 +15,6 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
16
15
  readonly limit: Schema.optional<Schema.NumberFromString>;
17
16
  readonly order: Schema.optional<Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>>;
18
17
  readonly cursor: Schema.optional<Schema.String>;
19
- readonly type: Schema.optional<Schema.Literals<("skill" | "compaction" | "system" | "shell" | "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "assistant")[]>>;
20
18
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
21
19
  readonly data: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
22
20
  readonly type: Schema.tag<"agent-switched">;
@@ -559,28 +557,6 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
559
557
  }>;
560
558
  readonly type: Schema.tag<"compaction">;
561
559
  }>, Schema.Struct<{
562
- readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
563
- zero: number & import("effect/Brand").Brand<"Money.USD">;
564
- }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
565
- zero: number & import("effect/Brand").Brand<"Money.USD">;
566
- }>, never, never>;
567
- readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
568
- readonly input: Schema.Finite;
569
- readonly output: Schema.Finite;
570
- readonly reasoning: Schema.Finite;
571
- readonly cache: Schema.Struct<{
572
- readonly read: Schema.Finite;
573
- readonly write: Schema.Finite;
574
- }>;
575
- }>>>, Schema.optionalKey<Schema.Struct<{
576
- readonly input: Schema.Finite;
577
- readonly output: Schema.Finite;
578
- readonly reasoning: Schema.Finite;
579
- readonly cache: Schema.Struct<{
580
- readonly read: Schema.Finite;
581
- readonly write: Schema.Finite;
582
- }>;
583
- }>>, never, never>;
584
560
  readonly status: Schema.tag<"completed">;
585
561
  readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
586
562
  readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
@@ -688,28 +664,6 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
688
664
  }>;
689
665
  readonly type: Schema.tag<"compaction">;
690
666
  }>, Schema.Struct<{
691
- readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
692
- zero: number & import("effect/Brand").Brand<"Money.USD">;
693
- }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
694
- zero: number & import("effect/Brand").Brand<"Money.USD">;
695
- }>, never, never>;
696
- readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
697
- readonly input: Schema.Finite;
698
- readonly output: Schema.Finite;
699
- readonly reasoning: Schema.Finite;
700
- readonly cache: Schema.Struct<{
701
- readonly read: Schema.Finite;
702
- readonly write: Schema.Finite;
703
- }>;
704
- }>>>, Schema.optionalKey<Schema.Struct<{
705
- readonly input: Schema.Finite;
706
- readonly output: Schema.Finite;
707
- readonly reasoning: Schema.Finite;
708
- readonly cache: Schema.Struct<{
709
- readonly read: Schema.Finite;
710
- readonly write: Schema.Finite;
711
- }>;
712
- }>>, never, never>;
713
667
  readonly status: Schema.tag<"failed">;
714
668
  readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
715
669
  readonly error: Schema.Struct<{
@@ -13,20 +13,6 @@ export const SessionMessagesQuery = Schema.Struct({
13
13
  cursor: Schema.optional(Schema.String.annotate({
14
14
  description: "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order.",
15
15
  })),
16
- type: Schema.optional(Schema.Literals([
17
- "agent-switched",
18
- "model-switched",
19
- "location-switched",
20
- "user",
21
- "synthetic",
22
- "system",
23
- "skill",
24
- "shell",
25
- "assistant",
26
- "compaction",
27
- ])).annotate({
28
- description: "Filter by message type before pagination. When omitted, all message types are returned. Pass the same type when following cursors.",
29
- }),
30
16
  }).annotate({ identifier: "SessionMessagesQuery" });
31
17
  export const MessageGroup = HttpApiGroup.make("server.message")
32
18
  .add(HttpApiEndpoint.get("session.messages", "/api/session/:sessionID/message", {
@@ -43,7 +29,7 @@ export const MessageGroup = HttpApiGroup.make("server.message")
43
29
  }).annotateMerge(OpenApi.annotations({
44
30
  identifier: "v2.message.list",
45
31
  summary: "Get session messages",
46
- description: "Retrieve projected messages for a session, optionally filtered by type. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline, passing the same type filter on each page.",
32
+ description: "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
47
33
  })))
48
34
  .annotateMerge(OpenApi.annotations({
49
35
  title: "session",
@@ -132,7 +132,6 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
132
132
  readonly mode: Schema.Literal<"provider">;
133
133
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
134
134
  }>]>>, never, never>;
135
- readonly websocket: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
136
135
  }> & {
137
136
  default: (providerID: import("@opencode/schema/provider").ID, id: Model.ID) => {
138
137
  id: string & import("effect/Brand").Brand<"Model.ID">;
@@ -286,7 +285,6 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
286
285
  readonly mode: Schema.Literal<"provider">;
287
286
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
288
287
  }>]>>, never, never>;
289
- readonly websocket: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
290
288
  }> & {
291
289
  default: (providerID: import("@opencode/schema/provider").ID, id: Model.ID) => {
292
290
  id: string & import("effect/Brand").Brand<"Model.ID">;
@@ -153,15 +153,4 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
153
153
  }>>, never, Schema.toCodecJson<Schema.Struct<{
154
154
  readonly reply: Schema.Literals<readonly ["once", "always", "reject"]>;
155
155
  readonly message: Schema.optional<Schema.String>;
156
- }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof PermissionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.rules", "PUT", "/api/session/:sessionID/permission/rules", Schema.toCodecStringTree<Schema.Struct<{
157
- sessionID: Schema.brand<Schema.String, "SessionID"> & {
158
- create: () => string & import("effect/Brand").Brand<"SessionID">;
159
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
160
- };
161
- }>>, never, Schema.toCodecJson<Schema.Struct<{
162
- readonly permissions: Schema.$Array<Schema.Struct<{
163
- readonly action: Schema.String;
164
- readonly resource: Schema.String;
165
- readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
166
- }>>;
167
- }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>>, false>;
156
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof PermissionNotFoundError>, SessionLocationId, HttpApiMiddleware.Requires<SessionLocationId>>, false>;
@@ -93,17 +93,5 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
93
93
  identifier: "v2.session.permission.reply",
94
94
  summary: "Reply to pending permission request",
95
95
  description: "Respond to a pending permission request owned by a session.",
96
- })))
97
- .add(HttpApiEndpoint.put("session.permission.rules", "/api/session/:sessionID/permission/rules", {
98
- params: { sessionID: Session.ID },
99
- payload: Schema.Struct({ permissions: Permission.Ruleset }),
100
- success: HttpApiSchema.NoContent,
101
- error: SessionNotFoundError,
102
- })
103
- .middleware(sessionLocationMiddleware)
104
- .annotateMerge(OpenApi.annotations({
105
- identifier: "v2.session.permission.rules",
106
- summary: "Replace session permission rules",
107
- description: "Replace the session-scoped permission rules. Rules are evaluated after the agent's rules, and the last matching rule wins.",
108
96
  })))
109
97
  .annotateMerge(OpenApi.annotations({ title: "permission", description: "Experimental permission routes." }));
@@ -67,7 +67,6 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
67
67
  readonly mode: Schema.Literal<"provider">;
68
68
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
69
69
  }>]>>, never, never>;
70
- readonly websocket: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
71
70
  }> & {
72
71
  empty: (id: Provider.ID) => Provider.Info;
73
72
  }>;
@@ -149,7 +148,6 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
149
148
  readonly mode: Schema.Literal<"provider">;
150
149
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
151
150
  }>]>>, never, never>;
152
- readonly websocket: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
153
151
  }> & {
154
152
  empty: (id: Provider.ID) => Provider.Info;
155
153
  };