@opencode/protocol 0.0.0-dev-19555 → 0.0.0-dev-19559

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/api.d.ts CHANGED
@@ -33,12 +33,11 @@ import { WorktreeGroup } from "./groups/worktree.js";
33
33
  import { VcsGroup } from "./groups/vcs.js";
34
34
  import { MigrationGroup } from "./groups/migration.js";
35
35
  import { ConfigGroup } from "./groups/config.js";
36
- import { WorkspaceGroup } from "./groups/workspace.js";
37
36
  type LocationGroups<LocationId extends HttpApiMiddleware.AnyId> = HttpApiGroup.AddMiddleware<typeof LocationGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof AgentGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof PluginGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof ModelGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof ProviderGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof IntegrationGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof WebSearchGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof McpGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof CredentialGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof ProjectGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof FileSystemGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof CommandGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof SkillGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof RpcGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof PtyGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof ShellGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof ReferenceGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof WorktreeGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof VcsGroup, LocationId> | HttpApiGroup.AddMiddleware<typeof ConfigGroup, LocationId>;
38
37
  type SessionGroups<SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService> = ReturnType<typeof makeSessionGroup<SessionLocationId, SessionLocationService>> | typeof MessageGroup;
39
38
  type FormGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService> = ReturnType<typeof makeFormGroup<LocationId, LocationService, FormLocationId, FormLocationService>>;
40
39
  type MixedMiddlewareGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService> = ReturnType<typeof makePermissionGroup<LocationId, LocationService, SessionLocationId, SessionLocationService>>;
41
- type ApiGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Constraint> = typeof ServerGroup | typeof DebugGroup | typeof MigrationGroup | typeof WorkspaceGroup | typeof GenerateGroup | typeof PersistentPtyGroup | LocationGroups<LocationId> | FormGroups<LocationId, LocationService, FormLocationId, FormLocationService> | SessionGroups<SessionLocationId, SessionLocationService> | MixedMiddlewareGroups<LocationId, LocationService, SessionLocationId, SessionLocationService> | Event;
40
+ type ApiGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Constraint> = typeof ServerGroup | typeof DebugGroup | typeof MigrationGroup | typeof GenerateGroup | typeof PersistentPtyGroup | LocationGroups<LocationId> | FormGroups<LocationId, LocationService, FormLocationId, FormLocationService> | SessionGroups<SessionLocationId, SessionLocationService> | MixedMiddlewareGroups<LocationId, LocationService, SessionLocationId, SessionLocationService> | Event;
42
41
  type EventGroupFor<Definitions extends ReadonlyArray<Definition>> = ReturnType<typeof makeEventGroup<Definitions>>;
43
42
  export type Api<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Constraint> = HttpApi.HttpApi<"server", HttpApiGroup.AddMiddleware<HttpApiGroup.AddMiddleware<ApiGroups<LocationId, LocationService, FormLocationId, FormLocationService, SessionLocationId, SessionLocationService, Event>, Authorization>, SchemaErrorMiddleware>>;
44
43
  export declare const makeApi: <const Definitions extends ReadonlyArray<Definition>, LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(options: {
package/dist/api.js CHANGED
@@ -32,7 +32,6 @@ import { WorktreeGroup } from "./groups/worktree.js";
32
32
  import { VcsGroup } from "./groups/vcs.js";
33
33
  import { MigrationGroup } from "./groups/migration.js";
34
34
  import { ConfigGroup } from "./groups/config.js";
35
- import { WorkspaceGroup } from "./groups/workspace.js";
36
35
  // Protocol owns middleware placement, while Server injects concrete keys so Core service identities stay downstream.
37
36
  const makeApiFromGroup = (eventGroup, locationMiddleware, formLocationMiddleware, sessionLocationMiddleware) => HttpApi.make("server")
38
37
  .add(ServerGroup)
@@ -60,7 +59,6 @@ const makeApiFromGroup = (eventGroup, locationMiddleware, formLocationMiddleware
60
59
  .add(ShellGroup.middleware(locationMiddleware))
61
60
  .add(ReferenceGroup.middleware(locationMiddleware))
62
61
  .add(WorktreeGroup.middleware(locationMiddleware))
63
- .add(WorkspaceGroup)
64
62
  .add(VcsGroup.middleware(locationMiddleware))
65
63
  .add(DebugGroup)
66
64
  .add(MigrationGroup)
package/dist/client.d.ts CHANGED
@@ -54,7 +54,6 @@ export declare const groupNames: {
54
54
  readonly "server.reference": "reference";
55
55
  readonly "server.project": "project";
56
56
  readonly "server.worktree": "worktree";
57
- readonly "server.workspace": "workspace";
58
57
  readonly "server.vcs": "vcs";
59
58
  readonly "server.config": "config";
60
59
  };
package/dist/client.js CHANGED
@@ -41,7 +41,6 @@ export const groupNames = {
41
41
  "server.reference": "reference",
42
42
  "server.project": "project",
43
43
  "server.worktree": "worktree",
44
- "server.workspace": "workspace",
45
44
  "server.vcs": "vcs",
46
45
  "server.config": "config",
47
46
  };
@@ -1,15 +1,15 @@
1
1
  import { Agent } from "@opencode/schema/agent";
2
- import { Location } from "@opencode/schema/location";
3
2
  import { Schema } from "effect";
4
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
5
4
  import { AgentNotFoundError } from "../errors.js";
6
5
  export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpApiEndpoint.HttpApiEndpoint<"agent.list", "GET", "/api/agent", never, Schema.toCodecStringTree<Schema.Struct<{
7
6
  readonly location: Schema.optional<Schema.Struct<{
8
7
  readonly directory: Schema.optional<Schema.String>;
9
- readonly workspace: Schema.optional<Schema.String>;
10
8
  }>>;
11
9
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
12
- readonly location: typeof Location.Info;
10
+ readonly location: Schema.Struct<{
11
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12
+ }>;
13
13
  readonly data: Schema.$Array<Schema.Struct<{
14
14
  readonly id: Schema.brand<Schema.String, "Agent.ID">;
15
15
  readonly name: Schema.brand<Schema.String, "Agent.Name">;
@@ -101,10 +101,11 @@ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpA
101
101
  }>>, Schema.toCodecStringTree<Schema.Struct<{
102
102
  readonly location: Schema.optional<Schema.Struct<{
103
103
  readonly directory: Schema.optional<Schema.String>;
104
- readonly workspace: Schema.optional<Schema.String>;
105
104
  }>>;
106
105
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
107
- readonly location: typeof Location.Info;
106
+ readonly location: Schema.Struct<{
107
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
108
+ }>;
108
109
  readonly data: Schema.Struct<{
109
110
  readonly id: Schema.brand<Schema.String, "Agent.ID">;
110
111
  readonly name: Schema.brand<Schema.String, "Agent.Name">;
@@ -1,13 +1,13 @@
1
- import { Location } from "@opencode/schema/location";
2
1
  import { Schema } from "effect";
3
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
3
  export declare const CommandGroup: HttpApiGroup.HttpApiGroup<"server.command", HttpApiEndpoint.HttpApiEndpoint<"command.list", "GET", "/api/command", never, Schema.toCodecStringTree<Schema.Struct<{
5
4
  readonly location: Schema.optional<Schema.Struct<{
6
5
  readonly directory: Schema.optional<Schema.String>;
7
- readonly workspace: Schema.optional<Schema.String>;
8
6
  }>>;
9
7
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
10
- readonly location: typeof Location.Info;
8
+ readonly location: Schema.Struct<{
9
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
10
+ }>;
11
11
  readonly data: Schema.$Array<Schema.Struct<{
12
12
  readonly name: Schema.String;
13
13
  readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -4,7 +4,6 @@ import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
4
  export declare const ConfigGroup: HttpApiGroup.HttpApiGroup<"server.config", HttpApiEndpoint.HttpApiEndpoint<"config.get", "GET", "/api/config", never, Schema.toCodecStringTree<Schema.Struct<{
5
5
  readonly location: Schema.optional<Schema.Struct<{
6
6
  readonly directory: Schema.optional<Schema.String>;
7
- readonly workspace: Schema.optional<Schema.String>;
8
7
  }>>;
9
8
  }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Union<readonly [typeof Config.Document, typeof Config.Directory, typeof Config.AgentsDirectory, typeof Config.ClaudeDirectory]>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"config.preferences", "GET", "/api/config/preferences", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
10
9
  readonly shell: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -7,7 +7,6 @@ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credenti
7
7
  }>>, Schema.toCodecStringTree<Schema.Struct<{
8
8
  readonly location: Schema.optional<Schema.Struct<{
9
9
  readonly directory: Schema.optional<Schema.String>;
10
- readonly workspace: Schema.optional<Schema.String>;
11
10
  }>>;
12
11
  }>>, Schema.toCodecJson<Schema.Struct<{
13
12
  readonly label: Schema.String;
@@ -18,7 +17,6 @@ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credenti
18
17
  }>>, Schema.toCodecStringTree<Schema.Struct<{
19
18
  readonly location: Schema.optional<Schema.Struct<{
20
19
  readonly directory: Schema.optional<Schema.String>;
21
- readonly workspace: Schema.optional<Schema.String>;
22
20
  }>>;
23
21
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
24
22
  credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
@@ -27,6 +25,5 @@ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credenti
27
25
  }>>, Schema.toCodecStringTree<Schema.Struct<{
28
26
  readonly location: Schema.optional<Schema.Struct<{
29
27
  readonly directory: Schema.optional<Schema.String>;
30
- readonly workspace: Schema.optional<Schema.String>;
31
28
  }>>;
32
29
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;
@@ -2,16 +2,8 @@ import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
3
3
  export declare const DebugGroup: HttpApiGroup.HttpApiGroup<"server.debug", HttpApiEndpoint.HttpApiEndpoint<"debug.location", "GET", "/api/debug/location", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
4
4
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
6
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
7
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
10
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11
- }>, never, never>;
12
5
  }>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"debug.location.evict", "DELETE", "/api/debug/location", never, Schema.toCodecStringTree<Schema.Struct<{
13
6
  readonly location: Schema.optional<Schema.Struct<{
14
7
  readonly directory: Schema.optional<Schema.String>;
15
- readonly workspace: Schema.optional<Schema.String>;
16
8
  }>>;
17
9
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;
@@ -4,7 +4,7 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/un
4
4
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
5
5
  export const DebugGroup = HttpApiGroup.make("server.debug")
6
6
  .add(HttpApiEndpoint.get("debug.location", "/api/debug/location", {
7
- success: Schema.Array(Location.Ref),
7
+ success: Schema.Array(Location.PublicRef),
8
8
  }).annotateMerge(OpenApi.annotations({
9
9
  identifier: "debug.location.list",
10
10
  summary: "List loaded locations",
@@ -11,13 +11,6 @@ export declare const makeEventGroup: <const Definitions extends ReadonlyArray<De
11
11
  readonly type: Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>;
12
12
  readonly location: Schema.Struct<{
13
13
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
15
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
17
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
18
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
19
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
20
- }>, never, never>;
21
14
  }>;
22
15
  readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
23
16
  }>, ...Schema.Struct<{
@@ -29,19 +22,11 @@ export declare const makeEventGroup: <const Definitions extends ReadonlyArray<De
29
22
  readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
30
23
  readonly location: Schema.optional<Schema.Struct<{
31
24
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
32
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
33
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
34
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
35
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
36
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
37
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
38
- }>, never, never>;
39
25
  }>>;
40
26
  }>[]]>>, Schema.Never, (readonly [...{ [K in keyof Definitions]: Definitions[K]["Type"]; }, {
41
27
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
42
28
  readonly location: {
43
29
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
44
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
45
30
  };
46
31
  readonly data: {
47
32
  readonly [x: string]: unknown;
@@ -57,7 +42,6 @@ export declare const makeEventGroup: <const Definitions extends ReadonlyArray<De
57
42
  readonly type: "server.connected";
58
43
  readonly location?: {
59
44
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
60
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
61
45
  } | undefined;
62
46
  readonly metadata?: {
63
47
  readonly [x: string]: unknown;
@@ -4603,7 +4587,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
4603
4587
  readonly time: Schema.Struct<{
4604
4588
  readonly created: Schema.Int;
4605
4589
  readonly updated: Schema.Int;
4606
- readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
4607
4590
  }>;
4608
4591
  readonly sandboxes: Schema.$Array<Schema.String>;
4609
4592
  }>;
@@ -4635,7 +4618,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
4635
4618
  readonly time: Schema.Struct<{
4636
4619
  readonly created: Schema.Int;
4637
4620
  readonly updated: Schema.Int;
4638
- readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
4639
4621
  }>;
4640
4622
  readonly sandboxes: Schema.$Array<Schema.String>;
4641
4623
  }>;
@@ -6218,13 +6200,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6218
6200
  readonly type: Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>;
6219
6201
  readonly location: Schema.Struct<{
6220
6202
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
6221
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
6222
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6223
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6224
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
6225
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6226
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6227
- }>, never, never>;
6228
6203
  }>;
6229
6204
  readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
6230
6205
  }>, ...Schema.Struct<{
@@ -6236,13 +6211,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6236
6211
  readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
6237
6212
  readonly location: Schema.optional<Schema.Struct<{
6238
6213
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
6239
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
6240
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6241
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6242
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
6243
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6244
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6245
- }>, never, never>;
6246
6214
  }>>;
6247
6215
  }>[]]>>, Schema.Never, {
6248
6216
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
@@ -6261,8 +6229,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6261
6229
  readonly data: {
6262
6230
  readonly form: {
6263
6231
  readonly id: string & import("effect/Brand").Brand<"Form.ID">;
6264
- readonly sessionID: string;
6265
- readonly title: string;
6266
6232
  readonly fields: readonly [{
6267
6233
  readonly type: "string";
6268
6234
  readonly key: string;
@@ -6442,6 +6408,8 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6442
6408
  readonly description?: string | undefined;
6443
6409
  readonly title?: string | undefined;
6444
6410
  })[]];
6411
+ readonly sessionID: string;
6412
+ readonly title: string;
6445
6413
  readonly metadata?: {
6446
6414
  readonly [x: string]: unknown;
6447
6415
  } | undefined;
@@ -6591,7 +6559,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6591
6559
  readonly time: {
6592
6560
  readonly created: number;
6593
6561
  readonly updated: number;
6594
- readonly initialized?: number | undefined;
6595
6562
  };
6596
6563
  readonly sandboxes: readonly string[];
6597
6564
  readonly name?: string | undefined;
@@ -8432,7 +8399,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8432
8399
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8433
8400
  readonly location: {
8434
8401
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8435
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8436
8402
  };
8437
8403
  readonly data: {
8438
8404
  readonly [x: string]: unknown;
@@ -8448,7 +8414,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8448
8414
  readonly type: "server.connected";
8449
8415
  readonly location?: {
8450
8416
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8451
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8452
8417
  } | undefined;
8453
8418
  readonly metadata?: {
8454
8419
  readonly [x: string]: unknown;
@@ -12994,7 +12959,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
12994
12959
  readonly time: Schema.Struct<{
12995
12960
  readonly created: Schema.Int;
12996
12961
  readonly updated: Schema.Int;
12997
- readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
12998
12962
  }>;
12999
12963
  readonly sandboxes: Schema.$Array<Schema.String>;
13000
12964
  }>;
@@ -13026,7 +12990,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
13026
12990
  readonly time: Schema.Struct<{
13027
12991
  readonly created: Schema.Int;
13028
12992
  readonly updated: Schema.Int;
13029
- readonly initialized: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
13030
12993
  }>;
13031
12994
  readonly sandboxes: Schema.$Array<Schema.String>;
13032
12995
  }>;
@@ -14609,13 +14572,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
14609
14572
  readonly type: Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>;
14610
14573
  readonly location: Schema.Struct<{
14611
14574
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14612
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14613
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14614
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14615
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
14616
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14617
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14618
- }>, never, never>;
14619
14575
  }>;
14620
14576
  readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
14621
14577
  }>, ...Schema.Struct<{
@@ -14627,13 +14583,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
14627
14583
  readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
14628
14584
  readonly location: Schema.optional<Schema.Struct<{
14629
14585
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
14630
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
14631
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14632
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14633
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
14634
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
14635
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14636
- }>, never, never>;
14637
14586
  }>>;
14638
14587
  }>[]]>;
14639
14588
  export type OpenCodeEvent = typeof OpenCodeEvent.Type;
@@ -6,14 +6,14 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/un
6
6
  const fields = {
7
7
  id: Event.ID,
8
8
  metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
9
- location: Schema.optional(Location.Ref),
9
+ location: Schema.optional(Location.PublicRef),
10
10
  };
11
11
  const rpcEvent = Schema.Struct({
12
12
  id: Event.ID,
13
13
  created: Schema.Finite,
14
14
  metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
15
15
  type: Schema.TemplateLiteral(["rpc.", Schema.String]),
16
- location: Location.Ref,
16
+ location: Location.PublicRef,
17
17
  data: Schema.Record(Schema.String, Schema.Unknown),
18
18
  }).annotate({ identifier: "V2Event.rpc" });
19
19
  const schema = (definitions) => Schema.Union([
@@ -1,4 +1,3 @@
1
- import { Location } from "@opencode/schema/location";
2
1
  import { Context, Schema } from "effect";
3
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/unstable/httpapi";
4
3
  import { ConflictError, FormAlreadySettledError, FormInvalidAnswerError, FormNotFoundError, InvalidRequestError, SessionNotFoundError } from "../errors.js";
@@ -127,10 +126,11 @@ export type CreatePayload = typeof CreatePayload.Type;
127
126
  export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, formLocationMiddleware: Context.Key<FormLocationId, FormLocationService>) => HttpApiGroup.HttpApiGroup<"server.form", HttpApiEndpoint.HttpApiEndpoint<"form.request.list", "GET", "/api/form/request", never, Schema.toCodecStringTree<Schema.Struct<{
128
127
  readonly location: Schema.optional<Schema.Struct<{
129
128
  readonly directory: Schema.optional<Schema.String>;
130
- readonly workspace: Schema.optional<Schema.String>;
131
129
  }>>;
132
130
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
133
- readonly location: typeof Location.Info;
131
+ readonly location: Schema.Struct<{
132
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
133
+ }>;
134
134
  readonly data: Schema.$Array<Schema.Struct<{
135
135
  readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
136
136
  readonly type: Schema.Literal<"string">;
@@ -1,20 +1,19 @@
1
- import { Location } from "@opencode/schema/location";
2
1
  import { Schema } from "effect";
3
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
3
  import { FileNotFoundError } from "../errors.js";
5
4
  export declare const FileSystemGroup: HttpApiGroup.HttpApiGroup<"server.fs", HttpApiEndpoint.HttpApiEndpoint<"fs.read", "GET", "/api/fs/read/*", never, Schema.toCodecStringTree<Schema.Struct<{
6
5
  readonly location: Schema.optional<Schema.Struct<{
7
6
  readonly directory: Schema.optional<Schema.String>;
8
- readonly workspace: Schema.optional<Schema.String>;
9
7
  }>>;
10
8
  }>>, never, never, Schema.toCodecJson<Schema.Uint8Array>, Schema.toCodecJson<typeof FileNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"fs.list", "GET", "/api/fs/list", never, Schema.toCodecStringTree<Schema.Struct<{
11
9
  readonly path: Schema.optional<Schema.String>;
12
10
  readonly location: Schema.optional<Schema.Struct<{
13
11
  readonly directory: Schema.optional<Schema.String>;
14
- readonly workspace: Schema.optional<Schema.String>;
15
12
  }>>;
16
13
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
17
- readonly location: typeof Location.Info;
14
+ readonly location: Schema.Struct<{
15
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
16
+ }>;
18
17
  readonly data: Schema.$Array<Schema.Struct<{
19
18
  readonly path: Schema.brand<Schema.String, "RelativePath">;
20
19
  readonly type: Schema.Literals<readonly ["file", "directory"]>;
@@ -25,10 +24,11 @@ export declare const FileSystemGroup: HttpApiGroup.HttpApiGroup<"server.fs", Htt
25
24
  readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
26
25
  readonly location: Schema.optional<Schema.Struct<{
27
26
  readonly directory: Schema.optional<Schema.String>;
28
- readonly workspace: Schema.optional<Schema.String>;
29
27
  }>>;
30
28
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
31
- readonly location: typeof Location.Info;
29
+ readonly location: Schema.Struct<{
30
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
31
+ }>;
32
32
  readonly data: Schema.$Array<Schema.Struct<{
33
33
  readonly path: Schema.brand<Schema.String, "RelativePath">;
34
34
  readonly type: Schema.Literals<readonly ["file", "directory"]>;
@@ -1,15 +1,15 @@
1
1
  import { Integration } from "@opencode/schema/integration";
2
- import { Location } from "@opencode/schema/location";
3
2
  import { Schema } from "effect";
4
3
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
5
4
  import { InvalidRequestError } from "../errors.js";
6
5
  export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integration", HttpApiEndpoint.HttpApiEndpoint<"integration.list", "GET", "/api/integration", never, Schema.toCodecStringTree<Schema.Struct<{
7
6
  readonly location: Schema.optional<Schema.Struct<{
8
7
  readonly directory: Schema.optional<Schema.String>;
9
- readonly workspace: Schema.optional<Schema.String>;
10
8
  }>>;
11
9
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
12
- readonly location: typeof Location.Info;
10
+ readonly location: Schema.Struct<{
11
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12
+ }>;
13
13
  readonly data: Schema.$Array<Schema.Struct<{
14
14
  readonly id: Schema.brand<Schema.String, "Integration.ID">;
15
15
  readonly name: Schema.String;
@@ -500,10 +500,11 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
500
500
  }>>, Schema.toCodecStringTree<Schema.Struct<{
501
501
  readonly location: Schema.optional<Schema.Struct<{
502
502
  readonly directory: Schema.optional<Schema.String>;
503
- readonly workspace: Schema.optional<Schema.String>;
504
503
  }>>;
505
504
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
506
- readonly location: typeof Location.Info;
505
+ readonly location: Schema.Struct<{
506
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
507
+ }>;
507
508
  readonly data: Schema.UndefinedOr<Schema.Struct<{
508
509
  readonly id: Schema.brand<Schema.String, "Integration.ID">;
509
510
  readonly name: Schema.String;
@@ -992,7 +993,6 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
992
993
  }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.wellknown.add", "POST", "/api/experimental/integration/wellknown", never, Schema.toCodecStringTree<Schema.Struct<{
993
994
  readonly location: Schema.optional<Schema.Struct<{
994
995
  readonly directory: Schema.optional<Schema.String>;
995
- readonly workspace: Schema.optional<Schema.String>;
996
996
  }>>;
997
997
  }>>, Schema.toCodecJson<Schema.Struct<{
998
998
  readonly url: Schema.String;
@@ -1001,7 +1001,6 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1001
1001
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1002
1002
  readonly location: Schema.optional<Schema.Struct<{
1003
1003
  readonly directory: Schema.optional<Schema.String>;
1004
- readonly workspace: Schema.optional<Schema.String>;
1005
1004
  }>>;
1006
1005
  }>>, Schema.toCodecJson<Schema.Struct<{
1007
1006
  readonly key: Schema.String;
@@ -1012,14 +1011,15 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1012
1011
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1013
1012
  readonly location: Schema.optional<Schema.Struct<{
1014
1013
  readonly directory: Schema.optional<Schema.String>;
1015
- readonly workspace: Schema.optional<Schema.String>;
1016
1014
  }>>;
1017
1015
  }>>, Schema.toCodecJson<Schema.Struct<{
1018
1016
  readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
1019
1017
  readonly answer: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>;
1020
1018
  readonly label: Schema.optional<Schema.String>;
1021
1019
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1022
- readonly location: typeof Location.Info;
1020
+ readonly location: Schema.Struct<{
1021
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1022
+ }>;
1023
1023
  readonly data: typeof Integration.Attempt;
1024
1024
  }>>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.oauth.status", "GET", "/api/integration/:integrationID/connect/oauth/:attemptID", Schema.toCodecStringTree<Schema.Struct<{
1025
1025
  integrationID: Schema.brand<Schema.String, "Integration.ID">;
@@ -1029,10 +1029,11 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1029
1029
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1030
1030
  readonly location: Schema.optional<Schema.Struct<{
1031
1031
  readonly directory: Schema.optional<Schema.String>;
1032
- readonly workspace: Schema.optional<Schema.String>;
1033
1032
  }>>;
1034
1033
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1035
- readonly location: typeof Location.Info;
1034
+ readonly location: Schema.Struct<{
1035
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1036
+ }>;
1036
1037
  readonly data: Schema.Union<readonly [Schema.Struct<{
1037
1038
  readonly status: Schema.Literal<"pending">;
1038
1039
  readonly time: Schema.Struct<{
@@ -1067,7 +1068,6 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1067
1068
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1068
1069
  readonly location: Schema.optional<Schema.Struct<{
1069
1070
  readonly directory: Schema.optional<Schema.String>;
1070
- readonly workspace: Schema.optional<Schema.String>;
1071
1071
  }>>;
1072
1072
  }>>, Schema.toCodecJson<Schema.Struct<{
1073
1073
  readonly code: Schema.optional<Schema.String>;
@@ -1079,20 +1079,20 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1079
1079
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1080
1080
  readonly location: Schema.optional<Schema.Struct<{
1081
1081
  readonly directory: Schema.optional<Schema.String>;
1082
- readonly workspace: Schema.optional<Schema.String>;
1083
1082
  }>>;
1084
1083
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.command.connect", "POST", "/api/integration/:integrationID/connect/command", Schema.toCodecStringTree<Schema.Struct<{
1085
1084
  integrationID: Schema.brand<Schema.String, "Integration.ID">;
1086
1085
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1087
1086
  readonly location: Schema.optional<Schema.Struct<{
1088
1087
  readonly directory: Schema.optional<Schema.String>;
1089
- readonly workspace: Schema.optional<Schema.String>;
1090
1088
  }>>;
1091
1089
  }>>, Schema.toCodecJson<Schema.Struct<{
1092
1090
  readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
1093
1091
  readonly label: Schema.optional<Schema.String>;
1094
1092
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1095
- readonly location: typeof Location.Info;
1093
+ readonly location: Schema.Struct<{
1094
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1095
+ }>;
1096
1096
  readonly data: Schema.Struct<{
1097
1097
  readonly attemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & {
1098
1098
  create: () => string & import("effect/Brand").Brand<"Integration.AttemptID">;
@@ -1110,10 +1110,11 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1110
1110
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1111
1111
  readonly location: Schema.optional<Schema.Struct<{
1112
1112
  readonly directory: Schema.optional<Schema.String>;
1113
- readonly workspace: Schema.optional<Schema.String>;
1114
1113
  }>>;
1115
1114
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1116
- readonly location: typeof Location.Info;
1115
+ readonly location: Schema.Struct<{
1116
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1117
+ }>;
1117
1118
  readonly data: Schema.Union<readonly [Schema.Struct<{
1118
1119
  readonly status: Schema.Literal<"pending">;
1119
1120
  readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -1149,6 +1150,5 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1149
1150
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1150
1151
  readonly location: Schema.optional<Schema.Struct<{
1151
1152
  readonly directory: Schema.optional<Schema.String>;
1152
- readonly workspace: Schema.optional<Schema.String>;
1153
1153
  }>>;
1154
1154
  }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;
@@ -1,16 +1,22 @@
1
- import { Location } from "@opencode/schema/location";
2
1
  import { Schema } from "effect";
3
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
3
  export declare const LocationQuery: Schema.Struct<{
5
4
  readonly location: Schema.optional<Schema.Struct<{
6
5
  readonly directory: Schema.optional<Schema.String>;
7
- readonly workspace: Schema.optional<Schema.String>;
8
6
  }>>;
9
7
  }>;
10
8
  export declare const locationQueryOpenApi: import("effect/Context").Context<never>;
11
9
  export declare const LocationGroup: HttpApiGroup.HttpApiGroup<"server.location", HttpApiEndpoint.HttpApiEndpoint<"location.get", "GET", "/api/location", never, Schema.toCodecStringTree<Schema.Struct<{
12
10
  readonly location: Schema.optional<Schema.Struct<{
13
11
  readonly directory: Schema.optional<Schema.String>;
14
- readonly workspace: Schema.optional<Schema.String>;
15
12
  }>>;
16
- }>>, never, never, Schema.toCodecJson<typeof Location.Info>, never, never, never>, false>;
13
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
14
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
15
+ readonly project: Schema.Struct<{
16
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
17
+ global: string & import("effect/Brand").Brand<"Project.ID">;
18
+ };
19
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
20
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
21
+ }>;
22
+ }>>, never, never, never>, false>;
@@ -4,7 +4,6 @@ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
4
4
  export const LocationQuery = Schema.Struct({
5
5
  location: Schema.optional(Schema.Struct({
6
6
  directory: Schema.optional(Schema.String),
7
- workspace: Schema.optional(Schema.String),
8
7
  })),
9
8
  }).annotate({ identifier: "LocationQuery" });
10
9
  export const locationQueryOpenApi = OpenApi.annotations({
@@ -23,7 +22,7 @@ export const locationQueryOpenApi = OpenApi.annotations({
23
22
  export const LocationGroup = HttpApiGroup.make("server.location")
24
23
  .add(HttpApiEndpoint.get("location.get", "/api/location", {
25
24
  query: LocationQuery,
26
- success: Location.Info,
25
+ success: Location.PublicInfo,
27
26
  })
28
27
  .annotateMerge(locationQueryOpenApi)
29
28
  .annotateMerge(OpenApi.annotations({