@opencode/protocol 0.0.0-dev-19553 → 0.0.0-dev-19557

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,22 @@
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
+ readonly project: Schema.Struct<{
13
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
14
+ global: string & import("effect/Brand").Brand<"Project.ID">;
15
+ };
16
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
17
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
18
+ }>;
19
+ }>;
13
20
  readonly data: Schema.$Array<Schema.Struct<{
14
21
  readonly id: Schema.brand<Schema.String, "Agent.ID">;
15
22
  readonly name: Schema.brand<Schema.String, "Agent.Name">;
@@ -101,10 +108,18 @@ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpA
101
108
  }>>, Schema.toCodecStringTree<Schema.Struct<{
102
109
  readonly location: Schema.optional<Schema.Struct<{
103
110
  readonly directory: Schema.optional<Schema.String>;
104
- readonly workspace: Schema.optional<Schema.String>;
105
111
  }>>;
106
112
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
107
- readonly location: typeof Location.Info;
113
+ readonly location: Schema.Struct<{
114
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
115
+ readonly project: Schema.Struct<{
116
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
117
+ global: string & import("effect/Brand").Brand<"Project.ID">;
118
+ };
119
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
120
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
121
+ }>;
122
+ }>;
108
123
  readonly data: Schema.Struct<{
109
124
  readonly id: Schema.brand<Schema.String, "Agent.ID">;
110
125
  readonly name: Schema.brand<Schema.String, "Agent.Name">;
@@ -1,13 +1,20 @@
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
+ readonly project: Schema.Struct<{
11
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
12
+ global: string & import("effect/Brand").Brand<"Project.ID">;
13
+ };
14
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
15
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
16
+ }>;
17
+ }>;
11
18
  readonly data: Schema.$Array<Schema.Struct<{
12
19
  readonly name: Schema.String;
13
20
  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;
@@ -6218,13 +6202,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6218
6202
  readonly type: Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>;
6219
6203
  readonly location: Schema.Struct<{
6220
6204
  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
6205
  }>;
6229
6206
  readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
6230
6207
  }>, ...Schema.Struct<{
@@ -6236,13 +6213,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6236
6213
  readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
6237
6214
  readonly location: Schema.optional<Schema.Struct<{
6238
6215
  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
6216
  }>>;
6247
6217
  }>[]]>>, Schema.Never, {
6248
6218
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
@@ -6261,8 +6231,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6261
6231
  readonly data: {
6262
6232
  readonly form: {
6263
6233
  readonly id: string & import("effect/Brand").Brand<"Form.ID">;
6264
- readonly sessionID: string;
6265
- readonly title: string;
6266
6234
  readonly fields: readonly [{
6267
6235
  readonly type: "string";
6268
6236
  readonly key: string;
@@ -6442,6 +6410,8 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6442
6410
  readonly description?: string | undefined;
6443
6411
  readonly title?: string | undefined;
6444
6412
  })[]];
6413
+ readonly sessionID: string;
6414
+ readonly title: string;
6445
6415
  readonly metadata?: {
6446
6416
  readonly [x: string]: unknown;
6447
6417
  } | undefined;
@@ -8432,7 +8402,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8432
8402
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8433
8403
  readonly location: {
8434
8404
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8435
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8436
8405
  };
8437
8406
  readonly data: {
8438
8407
  readonly [x: string]: unknown;
@@ -8448,7 +8417,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
8448
8417
  readonly type: "server.connected";
8449
8418
  readonly location?: {
8450
8419
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8451
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8452
8420
  } | undefined;
8453
8421
  readonly metadata?: {
8454
8422
  readonly [x: string]: unknown;
@@ -14609,13 +14577,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
14609
14577
  readonly type: Schema.TemplateLiteral<readonly ["rpc.", Schema.String]>;
14610
14578
  readonly location: Schema.Struct<{
14611
14579
  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
14580
  }>;
14620
14581
  readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
14621
14582
  }>, ...Schema.Struct<{
@@ -14627,13 +14588,6 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
14627
14588
  readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
14628
14589
  readonly location: Schema.optional<Schema.Struct<{
14629
14590
  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
14591
  }>>;
14638
14592
  }>[]]>;
14639
14593
  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,18 @@ 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
+ readonly project: Schema.Struct<{
134
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
135
+ global: string & import("effect/Brand").Brand<"Project.ID">;
136
+ };
137
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
138
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
139
+ }>;
140
+ }>;
134
141
  readonly data: Schema.$Array<Schema.Struct<{
135
142
  readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
136
143
  readonly type: Schema.Literal<"string">;
@@ -1,20 +1,26 @@
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
+ readonly project: Schema.Struct<{
17
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
18
+ global: string & import("effect/Brand").Brand<"Project.ID">;
19
+ };
20
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
21
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
22
+ }>;
23
+ }>;
18
24
  readonly data: Schema.$Array<Schema.Struct<{
19
25
  readonly path: Schema.brand<Schema.String, "RelativePath">;
20
26
  readonly type: Schema.Literals<readonly ["file", "directory"]>;
@@ -25,10 +31,18 @@ export declare const FileSystemGroup: HttpApiGroup.HttpApiGroup<"server.fs", Htt
25
31
  readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
26
32
  readonly location: Schema.optional<Schema.Struct<{
27
33
  readonly directory: Schema.optional<Schema.String>;
28
- readonly workspace: Schema.optional<Schema.String>;
29
34
  }>>;
30
35
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
31
- readonly location: typeof Location.Info;
36
+ readonly location: Schema.Struct<{
37
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
38
+ readonly project: Schema.Struct<{
39
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
40
+ global: string & import("effect/Brand").Brand<"Project.ID">;
41
+ };
42
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
43
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
44
+ }>;
45
+ }>;
32
46
  readonly data: Schema.$Array<Schema.Struct<{
33
47
  readonly path: Schema.brand<Schema.String, "RelativePath">;
34
48
  readonly type: Schema.Literals<readonly ["file", "directory"]>;
@@ -1,15 +1,22 @@
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
+ readonly project: Schema.Struct<{
13
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
14
+ global: string & import("effect/Brand").Brand<"Project.ID">;
15
+ };
16
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
17
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
18
+ }>;
19
+ }>;
13
20
  readonly data: Schema.$Array<Schema.Struct<{
14
21
  readonly id: Schema.brand<Schema.String, "Integration.ID">;
15
22
  readonly name: Schema.String;
@@ -500,10 +507,18 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
500
507
  }>>, Schema.toCodecStringTree<Schema.Struct<{
501
508
  readonly location: Schema.optional<Schema.Struct<{
502
509
  readonly directory: Schema.optional<Schema.String>;
503
- readonly workspace: Schema.optional<Schema.String>;
504
510
  }>>;
505
511
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
506
- readonly location: typeof Location.Info;
512
+ readonly location: Schema.Struct<{
513
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
514
+ readonly project: Schema.Struct<{
515
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
516
+ global: string & import("effect/Brand").Brand<"Project.ID">;
517
+ };
518
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
519
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
520
+ }>;
521
+ }>;
507
522
  readonly data: Schema.UndefinedOr<Schema.Struct<{
508
523
  readonly id: Schema.brand<Schema.String, "Integration.ID">;
509
524
  readonly name: Schema.String;
@@ -992,7 +1007,6 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
992
1007
  }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.wellknown.add", "POST", "/api/experimental/integration/wellknown", never, Schema.toCodecStringTree<Schema.Struct<{
993
1008
  readonly location: Schema.optional<Schema.Struct<{
994
1009
  readonly directory: Schema.optional<Schema.String>;
995
- readonly workspace: Schema.optional<Schema.String>;
996
1010
  }>>;
997
1011
  }>>, Schema.toCodecJson<Schema.Struct<{
998
1012
  readonly url: Schema.String;
@@ -1001,7 +1015,6 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1001
1015
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1002
1016
  readonly location: Schema.optional<Schema.Struct<{
1003
1017
  readonly directory: Schema.optional<Schema.String>;
1004
- readonly workspace: Schema.optional<Schema.String>;
1005
1018
  }>>;
1006
1019
  }>>, Schema.toCodecJson<Schema.Struct<{
1007
1020
  readonly key: Schema.String;
@@ -1012,14 +1025,22 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1012
1025
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1013
1026
  readonly location: Schema.optional<Schema.Struct<{
1014
1027
  readonly directory: Schema.optional<Schema.String>;
1015
- readonly workspace: Schema.optional<Schema.String>;
1016
1028
  }>>;
1017
1029
  }>>, Schema.toCodecJson<Schema.Struct<{
1018
1030
  readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
1019
1031
  readonly answer: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>;
1020
1032
  readonly label: Schema.optional<Schema.String>;
1021
1033
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1022
- readonly location: typeof Location.Info;
1034
+ readonly location: Schema.Struct<{
1035
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1036
+ readonly project: Schema.Struct<{
1037
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
1038
+ global: string & import("effect/Brand").Brand<"Project.ID">;
1039
+ };
1040
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1041
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
1042
+ }>;
1043
+ }>;
1023
1044
  readonly data: typeof Integration.Attempt;
1024
1045
  }>>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.oauth.status", "GET", "/api/integration/:integrationID/connect/oauth/:attemptID", Schema.toCodecStringTree<Schema.Struct<{
1025
1046
  integrationID: Schema.brand<Schema.String, "Integration.ID">;
@@ -1029,10 +1050,18 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1029
1050
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1030
1051
  readonly location: Schema.optional<Schema.Struct<{
1031
1052
  readonly directory: Schema.optional<Schema.String>;
1032
- readonly workspace: Schema.optional<Schema.String>;
1033
1053
  }>>;
1034
1054
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1035
- readonly location: typeof Location.Info;
1055
+ readonly location: Schema.Struct<{
1056
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1057
+ readonly project: Schema.Struct<{
1058
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
1059
+ global: string & import("effect/Brand").Brand<"Project.ID">;
1060
+ };
1061
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1062
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
1063
+ }>;
1064
+ }>;
1036
1065
  readonly data: Schema.Union<readonly [Schema.Struct<{
1037
1066
  readonly status: Schema.Literal<"pending">;
1038
1067
  readonly time: Schema.Struct<{
@@ -1067,7 +1096,6 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1067
1096
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1068
1097
  readonly location: Schema.optional<Schema.Struct<{
1069
1098
  readonly directory: Schema.optional<Schema.String>;
1070
- readonly workspace: Schema.optional<Schema.String>;
1071
1099
  }>>;
1072
1100
  }>>, Schema.toCodecJson<Schema.Struct<{
1073
1101
  readonly code: Schema.optional<Schema.String>;
@@ -1079,20 +1107,27 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1079
1107
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1080
1108
  readonly location: Schema.optional<Schema.Struct<{
1081
1109
  readonly directory: Schema.optional<Schema.String>;
1082
- readonly workspace: Schema.optional<Schema.String>;
1083
1110
  }>>;
1084
1111
  }>>, 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
1112
  integrationID: Schema.brand<Schema.String, "Integration.ID">;
1086
1113
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1087
1114
  readonly location: Schema.optional<Schema.Struct<{
1088
1115
  readonly directory: Schema.optional<Schema.String>;
1089
- readonly workspace: Schema.optional<Schema.String>;
1090
1116
  }>>;
1091
1117
  }>>, Schema.toCodecJson<Schema.Struct<{
1092
1118
  readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
1093
1119
  readonly label: Schema.optional<Schema.String>;
1094
1120
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1095
- readonly location: typeof Location.Info;
1121
+ readonly location: Schema.Struct<{
1122
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1123
+ readonly project: Schema.Struct<{
1124
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
1125
+ global: string & import("effect/Brand").Brand<"Project.ID">;
1126
+ };
1127
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1128
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
1129
+ }>;
1130
+ }>;
1096
1131
  readonly data: Schema.Struct<{
1097
1132
  readonly attemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & {
1098
1133
  create: () => string & import("effect/Brand").Brand<"Integration.AttemptID">;
@@ -1110,10 +1145,18 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1110
1145
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1111
1146
  readonly location: Schema.optional<Schema.Struct<{
1112
1147
  readonly directory: Schema.optional<Schema.String>;
1113
- readonly workspace: Schema.optional<Schema.String>;
1114
1148
  }>>;
1115
1149
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1116
- readonly location: typeof Location.Info;
1150
+ readonly location: Schema.Struct<{
1151
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1152
+ readonly project: Schema.Struct<{
1153
+ readonly id: Schema.brand<Schema.String, "Project.ID"> & {
1154
+ global: string & import("effect/Brand").Brand<"Project.ID">;
1155
+ };
1156
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1157
+ readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
1158
+ }>;
1159
+ }>;
1117
1160
  readonly data: Schema.Union<readonly [Schema.Struct<{
1118
1161
  readonly status: Schema.Literal<"pending">;
1119
1162
  readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -1149,6 +1192,5 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
1149
1192
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1150
1193
  readonly location: Schema.optional<Schema.Struct<{
1151
1194
  readonly directory: Schema.optional<Schema.String>;
1152
- readonly workspace: Schema.optional<Schema.String>;
1153
1195
  }>>;
1154
1196
  }>>, 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>;