@opencode/protocol 0.0.0-dev-20800 → 0.0.0-dev-20802

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.
@@ -96,7 +96,40 @@ export declare const SessionsQuery: Schema.Struct<{
96
96
  global: string & import("effect/Brand").Brand<"Project.ID">;
97
97
  }>;
98
98
  readonly subpath: Schema.optional<Schema.brand<Schema.String, "RelativePath">>;
99
- readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor">>;
99
+ readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor"> & {
100
+ make: (input: typeof SessionsCursorInput.Type) => string & import("effect/Brand").Brand<"SessionsCursor">;
101
+ parse: (input: string) => Effect.Effect<{
102
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
103
+ readonly anchor: {
104
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
105
+ readonly time: number;
106
+ readonly direction: "previous" | "next";
107
+ };
108
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
109
+ readonly search?: string | undefined;
110
+ readonly order?: "asc" | "desc" | undefined;
111
+ } | {
112
+ readonly project: string & import("effect/Brand").Brand<"Project.ID">;
113
+ readonly anchor: {
114
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
115
+ readonly time: number;
116
+ readonly direction: "previous" | "next";
117
+ };
118
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
119
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
120
+ readonly search?: string | undefined;
121
+ readonly order?: "asc" | "desc" | undefined;
122
+ } | {
123
+ readonly anchor: {
124
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
125
+ readonly time: number;
126
+ readonly direction: "previous" | "next";
127
+ };
128
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
129
+ readonly search?: string | undefined;
130
+ readonly order?: "asc" | "desc" | undefined;
131
+ }, "Invalid cursor", never>;
132
+ }>;
100
133
  readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
101
134
  readonly order: Schema.optional<Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>>;
102
135
  readonly search: Schema.optional<Schema.String>;
@@ -111,7 +144,40 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
111
144
  global: string & import("effect/Brand").Brand<"Project.ID">;
112
145
  }>;
113
146
  readonly subpath: Schema.optional<Schema.brand<Schema.String, "RelativePath">>;
114
- readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor">>;
147
+ readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor"> & {
148
+ make: (input: typeof SessionsCursorInput.Type) => string & import("effect/Brand").Brand<"SessionsCursor">;
149
+ parse: (input: string) => Effect.Effect<{
150
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
151
+ readonly anchor: {
152
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
153
+ readonly time: number;
154
+ readonly direction: "previous" | "next";
155
+ };
156
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
157
+ readonly search?: string | undefined;
158
+ readonly order?: "asc" | "desc" | undefined;
159
+ } | {
160
+ readonly project: string & import("effect/Brand").Brand<"Project.ID">;
161
+ readonly anchor: {
162
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
163
+ readonly time: number;
164
+ readonly direction: "previous" | "next";
165
+ };
166
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
167
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
168
+ readonly search?: string | undefined;
169
+ readonly order?: "asc" | "desc" | undefined;
170
+ } | {
171
+ readonly anchor: {
172
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
173
+ readonly time: number;
174
+ readonly direction: "previous" | "next";
175
+ };
176
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
177
+ readonly search?: string | undefined;
178
+ readonly order?: "asc" | "desc" | undefined;
179
+ }, "Invalid cursor", never>;
180
+ }>;
115
181
  readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
116
182
  readonly order: Schema.optional<Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>>;
117
183
  readonly search: Schema.optional<Schema.String>;
@@ -63,7 +63,10 @@ const SessionsCursorJson = Schema.fromJsonString(SessionsCursorInput);
63
63
  const encodeSessionsCursor = Schema.encodeSync(SessionsCursorJson);
64
64
  const decodeSessionsCursor = Schema.decodeUnknownEffect(SessionsCursorJson);
65
65
  const invalidCursor = "Invalid cursor";
66
- export const SessionsCursor = Schema.String.pipe(Schema.brand("SessionsCursor"), statics((schema) => {
66
+ export const SessionsCursor = Schema.String.pipe(Schema.brand("SessionsCursor"), Schema.annotate({
67
+ identifier: "SessionsCursor",
68
+ description: "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.",
69
+ }), statics((schema) => {
67
70
  // Read the default constructor without caching it on the schema, so `make` can be replaced.
68
71
  const make = SchemaParser.make(schema);
69
72
  return {
@@ -111,15 +114,12 @@ const BooleanFromString = Schema.Literals(["true", "false"]).pipe(Schema.decodeT
111
114
  decode: SchemaGetter.transform((value) => value === "true"),
112
115
  encode: SchemaGetter.transform((value) => (value ? "true" : "false")),
113
116
  }));
114
- const SessionsQueryCursor = SessionsCursor.annotate({
115
- description: "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.",
116
- });
117
117
  export const SessionsQuery = Schema.Struct({
118
118
  ...SessionsQueryFields,
119
119
  directory: AbsolutePath.pipe(Schema.optional),
120
120
  project: Project.ID.pipe(Schema.optional),
121
121
  subpath: RelativePath.pipe(Schema.optional),
122
- cursor: SessionsQueryCursor.pipe(Schema.optional),
122
+ cursor: SessionsCursor.pipe(Schema.optional),
123
123
  }).annotate({ identifier: "SessionsQuery" });
124
124
  export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddleware) => HttpApiGroup.make("server.session")
125
125
  .add(HttpApiEndpoint.get("session.list", "/api/session", {
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-20800",
4
+ "version": "0.0.0-dev-20802",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -32,8 +32,8 @@
32
32
  "typecheck": "tsgo --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@opencode/schema": "0.0.0-dev-20800",
36
- "effect": "4.0.0-rc.118"
35
+ "@opencode/schema": "0.0.0-dev-20802",
36
+ "effect": "4.0.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@tsconfig/bun": "1.0.9",