@opencode-ai/protocol 0.0.0-next-16884 → 0.0.0-next-16892

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.
@@ -0,0 +1,28 @@
1
+ import { Schema } from "effect";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
3
+ export declare const V1MigrationStatus: Schema.Union<readonly [Schema.Struct<{
4
+ readonly status: Schema.Literals<readonly ["required", "completed"]>;
5
+ }>, Schema.Struct<{
6
+ readonly status: Schema.Literal<"running">;
7
+ readonly progress: Schema.Struct<{
8
+ readonly label: Schema.String;
9
+ readonly numerator: Schema.optional<Schema.Int>;
10
+ readonly denominator: Schema.optional<Schema.Int>;
11
+ }>;
12
+ }>, Schema.Struct<{
13
+ readonly status: Schema.Literal<"error">;
14
+ readonly error: Schema.String;
15
+ }>]>;
16
+ export declare const MigrationGroup: HttpApiGroup.HttpApiGroup<"server.migration", HttpApiEndpoint.HttpApiEndpoint<"migration.v1.status", "GET", "/api/experimental/migration/v1", never, never, never, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
17
+ readonly status: Schema.Literals<readonly ["required", "completed"]>;
18
+ }>, Schema.Struct<{
19
+ readonly status: Schema.Literal<"running">;
20
+ readonly progress: Schema.Struct<{
21
+ readonly label: Schema.String;
22
+ readonly numerator: Schema.optional<Schema.Int>;
23
+ readonly denominator: Schema.optional<Schema.Int>;
24
+ }>;
25
+ }>, Schema.Struct<{
26
+ readonly status: Schema.Literal<"error">;
27
+ readonly error: Schema.String;
28
+ }>]>>, never, never, never>, false>;
@@ -0,0 +1,21 @@
1
+ import { Schema } from "effect";
2
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
3
+ const V1MigrationProgress = Schema.Struct({
4
+ label: Schema.String,
5
+ numerator: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
6
+ denominator: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
7
+ });
8
+ export const V1MigrationStatus = Schema.Union([
9
+ Schema.Struct({ status: Schema.Literals(["required", "completed"]) }),
10
+ Schema.Struct({ status: Schema.Literal("running"), progress: V1MigrationProgress }),
11
+ Schema.Struct({ status: Schema.Literal("error"), error: Schema.String }),
12
+ ]);
13
+ export const MigrationGroup = HttpApiGroup.make("server.migration")
14
+ .add(HttpApiEndpoint.get("migration.v1.status", "/api/experimental/migration/v1", {
15
+ success: V1MigrationStatus,
16
+ }).annotateMerge(OpenApi.annotations({
17
+ identifier: "v2.experimental.migration.v1.status",
18
+ summary: "Get V1 migration status",
19
+ description: "Return the progress of the V1 to V2 session history migration.",
20
+ })))
21
+ .annotateMerge(OpenApi.annotations({ title: "migration" }));
@@ -781,7 +781,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
781
781
  }>>>, never, never>;
782
782
  }>>, never, never>;
783
783
  }>;
784
- }>>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.remove", "DELETE", "/api/session/:sessionID", Schema.toCodecStringTree<Schema.Struct<{
784
+ }>>, Schema.toCodecJson<typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.remove", "DELETE", "/api/session/:sessionID", Schema.toCodecStringTree<Schema.Struct<{
785
785
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
786
786
  create: () => string & import("effect/Brand").Brand<"SessionID">;
787
787
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -1028,7 +1028,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1028
1028
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1029
1029
  create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1030
1030
  }>, never, never>;
1031
- }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.prompt", "POST", "/api/session/:sessionID/prompt", Schema.toCodecStringTree<Schema.Struct<{
1031
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError | typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.prompt", "POST", "/api/session/:sessionID/prompt", Schema.toCodecStringTree<Schema.Struct<{
1032
1032
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
1033
1033
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1034
1034
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -2072,7 +2072,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
2072
2072
  }>;
2073
2073
  readonly type: Schema.tag<"compaction">;
2074
2074
  }>]>]>>;
2075
- }>>, Schema.toCodecJson<typeof UnknownError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.pending.list", "GET", "/api/session/:sessionID/pending", Schema.toCodecStringTree<Schema.Struct<{
2075
+ }>>, Schema.toCodecJson<typeof UnknownError | typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.pending.list", "GET", "/api/session/:sessionID/pending", Schema.toCodecStringTree<Schema.Struct<{
2076
2076
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
2077
2077
  create: () => string & import("effect/Brand").Brand<"SessionID">;
2078
2078
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -2223,7 +2223,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
2223
2223
  };
2224
2224
  readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2225
2225
  }>]>>;
2226
- }>>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.list", "GET", "/api/session/:sessionID/instructions/entries", Schema.toCodecStringTree<Schema.Struct<{
2226
+ }>>, Schema.toCodecJson<typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.list", "GET", "/api/session/:sessionID/instructions/entries", Schema.toCodecStringTree<Schema.Struct<{
2227
2227
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
2228
2228
  create: () => string & import("effect/Brand").Brand<"SessionID">;
2229
2229
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -2267,6 +2267,196 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
2267
2267
  after: Schema.optional<Schema.compose<Schema.brand<Schema.Int, "Event.Seq">, Schema.NumberFromString>>;
2268
2268
  follow: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
2269
2269
  }>>, never, never, HttpApiSchema.StreamSse<HttpApiSchema.SseEventFromData<Schema.Union<readonly [Schema.Union<readonly [...((Schema.Struct<{
2270
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
2271
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
2272
+ };
2273
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2274
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2275
+ readonly type: Schema.Literal<"session.created">;
2276
+ readonly durable: Schema.Struct<{
2277
+ readonly aggregateID: Schema.String;
2278
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
2279
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
2280
+ }>;
2281
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2282
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2283
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
2284
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2285
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2286
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
2287
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2288
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2289
+ }>, never, never>;
2290
+ }>>>, Schema.optionalKey<Schema.Struct<{
2291
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2292
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
2293
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2294
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2295
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
2296
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2297
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2298
+ }>, never, never>;
2299
+ }>>, never, never>;
2300
+ readonly data: Schema.Struct<{
2301
+ readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
2302
+ global: string & import("effect/Brand").Brand<"Project.ID">;
2303
+ };
2304
+ readonly location: Schema.Struct<{
2305
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2306
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
2307
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2308
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2309
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
2310
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2311
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2312
+ }>, never, never>;
2313
+ }>;
2314
+ readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
2315
+ readonly parentID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
2316
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2317
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2318
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
2319
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2320
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2321
+ }>, never, never>;
2322
+ readonly slug: Schema.String;
2323
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2324
+ readonly agent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>;
2325
+ readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2326
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2327
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2328
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2329
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2330
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2331
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2332
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2333
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2334
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2335
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2336
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2337
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2338
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2339
+ };
2340
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2341
+ }> & {
2342
+ parse: (input: string) => {
2343
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2344
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2345
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2346
+ };
2347
+ }>>, Schema.optionalKey<Schema.Struct<{
2348
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2349
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2350
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2351
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2352
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2353
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2354
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2355
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2356
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2357
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2358
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2359
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2360
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2361
+ };
2362
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2363
+ }> & {
2364
+ parse: (input: string) => {
2365
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2366
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2367
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2368
+ };
2369
+ }>, never, never>;
2370
+ readonly version: Schema.String;
2371
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
2372
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2373
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2374
+ };
2375
+ }>;
2376
+ }> & {
2377
+ type: "session.created";
2378
+ durability: "durable";
2379
+ durable: {
2380
+ readonly version: number;
2381
+ readonly aggregate: string;
2382
+ };
2383
+ data: Schema.Struct<{
2384
+ readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
2385
+ global: string & import("effect/Brand").Brand<"Project.ID">;
2386
+ };
2387
+ readonly location: Schema.Struct<{
2388
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2389
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
2390
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2391
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2392
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
2393
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2394
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2395
+ }>, never, never>;
2396
+ }>;
2397
+ readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
2398
+ readonly parentID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
2399
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2400
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2401
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
2402
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2403
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2404
+ }>, never, never>;
2405
+ readonly slug: Schema.String;
2406
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2407
+ readonly agent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>;
2408
+ readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2409
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2410
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2411
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2412
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2413
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2414
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2415
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2416
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2417
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2418
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2419
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2420
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2421
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2422
+ };
2423
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2424
+ }> & {
2425
+ parse: (input: string) => {
2426
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2427
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2428
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2429
+ };
2430
+ }>>, Schema.optionalKey<Schema.Struct<{
2431
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2432
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2433
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2434
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2435
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2436
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2437
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2438
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2439
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2440
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2441
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2442
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2443
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2444
+ };
2445
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2446
+ }> & {
2447
+ parse: (input: string) => {
2448
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2449
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2450
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2451
+ };
2452
+ }>, never, never>;
2453
+ readonly version: Schema.String;
2454
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
2455
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2456
+ descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
2457
+ };
2458
+ }>;
2459
+ }) | (Schema.Struct<{
2270
2460
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
2271
2461
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
2272
2462
  };
@@ -5151,6 +5341,41 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
5151
5341
  readonly aggregateID: Schema.String;
5152
5342
  readonly seq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Int, "Event.Seq">>>, Schema.optionalKey<Schema.brand<Schema.Int, "Event.Seq">>, never, never>;
5153
5343
  }>]>>, Schema.Never, {
5344
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
5345
+ readonly data: {
5346
+ readonly location: {
5347
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
5348
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
5349
+ };
5350
+ readonly version: string;
5351
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
5352
+ readonly projectID: string & import("effect/Brand").Brand<"Project.ID">;
5353
+ readonly slug: string;
5354
+ readonly model?: {
5355
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
5356
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
5357
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
5358
+ } | undefined;
5359
+ readonly agent?: (string & import("effect/Brand").Brand<"Agent.ID">) | undefined;
5360
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
5361
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | undefined;
5362
+ readonly title?: string | undefined;
5363
+ };
5364
+ readonly durable: {
5365
+ readonly aggregateID: string;
5366
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
5367
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
5368
+ };
5369
+ readonly type: "session.created";
5370
+ readonly created: import("effect/DateTime").Utc;
5371
+ readonly location?: {
5372
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
5373
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
5374
+ } | undefined;
5375
+ readonly metadata?: {
5376
+ readonly [x: string]: unknown;
5377
+ } | undefined;
5378
+ } | {
5154
5379
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
5155
5380
  readonly data: {
5156
5381
  readonly agent: string & import("effect/Brand").Brand<"Agent.ID">;
@@ -6182,7 +6407,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
6182
6407
  readonly aggregateID: string;
6183
6408
  readonly type: "log.synced";
6184
6409
  readonly seq?: (number & import("effect/Brand").Brand<"Event.Seq">) | undefined;
6185
- }>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.interrupt", "POST", "/api/session/:sessionID/interrupt", Schema.toCodecStringTree<Schema.Struct<{
6410
+ }>, Schema.toCodecJson<typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.interrupt", "POST", "/api/session/:sessionID/interrupt", Schema.toCodecStringTree<Schema.Struct<{
6186
6411
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
6187
6412
  create: () => string & import("effect/Brand").Brand<"SessionID">;
6188
6413
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -6681,5 +6906,5 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
6681
6906
  }>;
6682
6907
  readonly type: Schema.tag<"compaction">;
6683
6908
  }>]>]>;
6684
- }>>, Schema.toCodecJson<typeof SessionNotFoundError | typeof MessageNotFoundError>, I, HttpApiMiddleware.Requires<I>>, false>;
6909
+ }>>, Schema.toCodecJson<typeof SessionNotFoundError | typeof MessageNotFoundError>, never, never>, false>;
6685
6910
  export {};
@@ -130,7 +130,6 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
130
130
  success: Schema.Struct({ data: Session.Info }),
131
131
  error: SessionNotFoundError,
132
132
  })
133
- .middleware(sessionLocationMiddleware)
134
133
  .annotateMerge(OpenApi.annotations({
135
134
  identifier: "v2.session.get",
136
135
  summary: "Get session",
@@ -201,7 +200,6 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
201
200
  success: HttpApiSchema.NoContent,
202
201
  error: [SessionNotFoundError, InvalidRequestError],
203
202
  })
204
- .middleware(sessionLocationMiddleware)
205
203
  .annotateMerge(OpenApi.annotations({
206
204
  identifier: "v2.session.move",
207
205
  summary: "Move session",
@@ -351,7 +349,6 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
351
349
  success: Schema.Struct({ data: Schema.Array(SessionMessage.Info) }),
352
350
  error: [SessionNotFoundError, UnknownError],
353
351
  })
354
- .middleware(sessionLocationMiddleware)
355
352
  .annotateMerge(OpenApi.annotations({
356
353
  identifier: "v2.session.context",
357
354
  summary: "Get session context",
@@ -362,7 +359,6 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
362
359
  success: Schema.Struct({ data: Schema.Array(SessionPending.Info) }),
363
360
  error: SessionNotFoundError,
364
361
  })
365
- .middleware(sessionLocationMiddleware)
366
362
  .annotateMerge(OpenApi.annotations({
367
363
  identifier: "v2.session.pending.list",
368
364
  summary: "List pending session work",
@@ -427,7 +423,6 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
427
423
  }),
428
424
  error: SessionNotFoundError,
429
425
  })
430
- .middleware(sessionLocationMiddleware)
431
426
  .annotateMerge(OpenApi.annotations({
432
427
  identifier: "v2.session.log",
433
428
  summary: "Read the session log",
@@ -460,7 +455,6 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
460
455
  success: Schema.Struct({ data: SessionMessage.Info }),
461
456
  error: [SessionNotFoundError, MessageNotFoundError],
462
457
  })
463
- .middleware(sessionLocationMiddleware)
464
458
  .annotateMerge(OpenApi.annotations({
465
459
  identifier: "v2.session.message",
466
460
  summary: "Get session message",
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-16884",
4
+ "version": "0.0.0-next-16892",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "typecheck": "tsgo --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "@opencode-ai/schema": "0.0.0-next-16884",
31
+ "@opencode-ai/schema": "0.0.0-next-16892",
32
32
  "effect": "4.0.0-beta.101"
33
33
  },
34
34
  "devDependencies": {