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

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
@@ -16,7 +16,6 @@ import { EventGroup, makeEventGroup } from "./groups/event.js";
16
16
  import type { Definition } from "@opencode/schema/event";
17
17
  import { AgentGroup } from "./groups/agent.js";
18
18
  import { PluginGroup } from "./groups/plugin.js";
19
- import { HealthGroup } from "./groups/health.js";
20
19
  import { ServerGroup } from "./groups/server.js";
21
20
  import { DebugGroup } from "./groups/debug.js";
22
21
  import { PtyGroup } from "./groups/pty.js";
@@ -39,7 +38,7 @@ type LocationGroups<LocationId extends HttpApiMiddleware.AnyId> = HttpApiGroup.A
39
38
  type SessionGroups<SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService> = ReturnType<typeof makeSessionGroup<SessionLocationId, SessionLocationService>> | typeof MessageGroup;
40
39
  type FormGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService> = ReturnType<typeof makeFormGroup<LocationId, LocationService, FormLocationId, FormLocationService>>;
41
40
  type MixedMiddlewareGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService> = ReturnType<typeof makePermissionGroup<LocationId, LocationService, SessionLocationId, SessionLocationService>>;
42
- type ApiGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Constraint> = typeof HealthGroup | 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;
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;
43
42
  type EventGroupFor<Definitions extends ReadonlyArray<Definition>> = ReturnType<typeof makeEventGroup<Definitions>>;
44
43
  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>>;
45
44
  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
@@ -15,7 +15,6 @@ import { RpcGroup } from "./groups/rpc.js";
15
15
  import { EventGroup, makeEventGroup } from "./groups/event.js";
16
16
  import { AgentGroup } from "./groups/agent.js";
17
17
  import { PluginGroup } from "./groups/plugin.js";
18
- import { HealthGroup } from "./groups/health.js";
19
18
  import { ServerGroup } from "./groups/server.js";
20
19
  import { DebugGroup } from "./groups/debug.js";
21
20
  import { PtyGroup } from "./groups/pty.js";
@@ -36,7 +35,6 @@ import { ConfigGroup } from "./groups/config.js";
36
35
  import { WorkspaceGroup } from "./groups/workspace.js";
37
36
  // Protocol owns middleware placement, while Server injects concrete keys so Core service identities stay downstream.
38
37
  const makeApiFromGroup = (eventGroup, locationMiddleware, formLocationMiddleware, sessionLocationMiddleware) => HttpApi.make("server")
39
- .add(HealthGroup)
40
38
  .add(ServerGroup)
41
39
  .add(LocationGroup.middleware(locationMiddleware))
42
40
  .add(AgentGroup.middleware(locationMiddleware))
package/dist/client.d.ts CHANGED
@@ -26,7 +26,6 @@ declare class SessionLocationMiddleware extends SessionLocationMiddleware_base {
26
26
  type ClientApiShape = Api<Context.Service.Identifier<typeof LocationMiddleware>, Context.Service.Shape<typeof LocationMiddleware>, Context.Service.Identifier<typeof SessionLocationMiddleware>, Context.Service.Shape<typeof SessionLocationMiddleware>, Context.Service.Identifier<typeof SessionLocationMiddleware>, Context.Service.Shape<typeof SessionLocationMiddleware>, typeof EventGroup>;
27
27
  export declare const ClientApi: ClientApiShape;
28
28
  export declare const groupNames: {
29
- readonly "server.health": "health";
30
29
  readonly "server.server": "server";
31
30
  readonly "server.debug": "debug";
32
31
  readonly "server.migration": "migration";
package/dist/client.js CHANGED
@@ -13,7 +13,6 @@ export const ClientApi = makeDefaultApi({
13
13
  sessionLocationMiddleware: SessionLocationMiddleware,
14
14
  });
15
15
  export const groupNames = {
16
- "server.health": "health",
17
16
  "server.server": "server",
18
17
  "server.debug": "debug",
19
18
  "server.migration": "migration",
@@ -11,7 +11,7 @@ export const AgentGroup = HttpApiGroup.make("server.agent")
11
11
  })
12
12
  .annotateMerge(locationQueryOpenApi)
13
13
  .annotateMerge(OpenApi.annotations({
14
- identifier: "v2.agent.list",
14
+ identifier: "agent.list",
15
15
  summary: "List agents",
16
16
  description: "Retrieve currently registered agents.",
17
17
  })))
@@ -23,7 +23,7 @@ export const AgentGroup = HttpApiGroup.make("server.agent")
23
23
  })
24
24
  .annotateMerge(locationQueryOpenApi)
25
25
  .annotateMerge(OpenApi.annotations({
26
- identifier: "v2.agent.get",
26
+ identifier: "agent.get",
27
27
  summary: "Get agent",
28
28
  description: "Retrieve a single currently registered agent.",
29
29
  })))
@@ -10,7 +10,7 @@ export const CommandGroup = HttpApiGroup.make("server.command")
10
10
  })
11
11
  .annotateMerge(locationQueryOpenApi)
12
12
  .annotateMerge(OpenApi.annotations({
13
- identifier: "v2.command.list",
13
+ identifier: "command.list",
14
14
  summary: "List commands",
15
15
  description: "Retrieve currently registered commands.",
16
16
  })))
@@ -10,14 +10,14 @@ export const ConfigGroup = HttpApiGroup.make("server.config")
10
10
  })
11
11
  .annotateMerge(locationQueryOpenApi)
12
12
  .annotateMerge(OpenApi.annotations({
13
- identifier: "v2.config.get",
13
+ identifier: "config.get",
14
14
  summary: "Get configuration",
15
15
  description: "Return configuration documents and discovery sources for the requested location, from lowest to highest priority.",
16
16
  })))
17
17
  .add(HttpApiEndpoint.get("config.preferences", "/api/config/preferences", {
18
18
  success: Config.Preferences,
19
19
  }).annotateMerge(OpenApi.annotations({
20
- identifier: "v2.config.preferences",
20
+ identifier: "config.preferences",
21
21
  summary: "Get global preferences",
22
22
  description: "Return preferences from the highest-precedence global configuration document.",
23
23
  })))
@@ -25,14 +25,14 @@ export const ConfigGroup = HttpApiGroup.make("server.config")
25
25
  payload: Config.PreferencesPatch,
26
26
  success: Config.Preferences,
27
27
  }).annotateMerge(OpenApi.annotations({
28
- identifier: "v2.config.updatePreferences",
28
+ identifier: "config.updatePreferences",
29
29
  summary: "Update global preferences",
30
30
  description: "Patch preferences in the highest-precedence global configuration document.",
31
31
  })))
32
32
  .add(HttpApiEndpoint.get("config.shells", "/api/config/shell", {
33
33
  success: Schema.Array(ConfigShell.Option),
34
34
  }).annotateMerge(OpenApi.annotations({
35
- identifier: "v2.config.shells",
35
+ identifier: "config.shells",
36
36
  summary: "List available shells",
37
37
  description: "Return shells available to terminal and agent execution.",
38
38
  })))
@@ -11,7 +11,7 @@ export const CredentialGroup = HttpApiGroup.make("server.credential")
11
11
  })
12
12
  .annotateMerge(locationQueryOpenApi)
13
13
  .annotateMerge(OpenApi.annotations({
14
- identifier: "v2.credential.update",
14
+ identifier: "credential.update",
15
15
  summary: "Update credential",
16
16
  description: "Update a stored credential label.",
17
17
  })))
@@ -23,7 +23,7 @@ export const CredentialGroup = HttpApiGroup.make("server.credential")
23
23
  })
24
24
  .annotateMerge(locationQueryOpenApi)
25
25
  .annotateMerge(OpenApi.annotations({
26
- identifier: "v2.credential.activate",
26
+ identifier: "credential.activate",
27
27
  summary: "Activate credential",
28
28
  description: "Activate a stored integration credential.",
29
29
  })))
@@ -34,7 +34,7 @@ export const CredentialGroup = HttpApiGroup.make("server.credential")
34
34
  })
35
35
  .annotateMerge(locationQueryOpenApi)
36
36
  .annotateMerge(OpenApi.annotations({
37
- identifier: "v2.credential.remove",
37
+ identifier: "credential.remove",
38
38
  summary: "Remove credential",
39
39
  description: "Remove a stored integration credential.",
40
40
  })));
@@ -6,7 +6,7 @@ export const DebugGroup = HttpApiGroup.make("server.debug")
6
6
  .add(HttpApiEndpoint.get("debug.location", "/api/debug/location", {
7
7
  success: Schema.Array(Location.Ref),
8
8
  }).annotateMerge(OpenApi.annotations({
9
- identifier: "v2.debug.location.list",
9
+ identifier: "debug.location.list",
10
10
  summary: "List loaded locations",
11
11
  description: "List locations currently loaded by the server.",
12
12
  })))
@@ -16,7 +16,7 @@ export const DebugGroup = HttpApiGroup.make("server.debug")
16
16
  })
17
17
  .annotateMerge(locationQueryOpenApi)
18
18
  .annotateMerge(OpenApi.annotations({
19
- identifier: "v2.debug.location.evict",
19
+ identifier: "debug.location.evict",
20
20
  summary: "Evict a loaded location",
21
21
  description: "Dispose the requested location's cached services so its next use boots them fresh.",
22
22
  })))
@@ -37,7 +37,7 @@ const make = (definitions) => {
37
37
  .add(HttpApiEndpoint.get("event.subscribe", "/api/event", {
38
38
  success: HttpApiSchema.StreamSse({ data: EventSchema }),
39
39
  }).annotateMerge(OpenApi.annotations({
40
- identifier: "v2.event.subscribe",
40
+ identifier: "event.subscribe",
41
41
  summary: "Subscribe to events",
42
42
  description: "Subscribe to native events and plugin RPC events across all server locations. Volatile by contract: a slow consumer overflows and fails the stream, and events during disconnection are missed.",
43
43
  })))
@@ -21,7 +21,7 @@ export const makeFormGroup = (locationMiddleware, formLocationMiddleware) => Htt
21
21
  })
22
22
  .annotateMerge(locationQueryOpenApi)
23
23
  .annotateMerge(OpenApi.annotations({
24
- identifier: "v2.form.request.list",
24
+ identifier: "form.request.list",
25
25
  summary: "List pending form requests",
26
26
  description: "Retrieve pending forms for a location.",
27
27
  })))
@@ -31,7 +31,7 @@ export const makeFormGroup = (locationMiddleware, formLocationMiddleware) => Htt
31
31
  success: Schema.Struct({ data: Schema.Array(Form.Info) }),
32
32
  error: SessionNotFoundError,
33
33
  }).annotateMerge(OpenApi.annotations({
34
- identifier: "v2.session.form.list",
34
+ identifier: "session.form.list",
35
35
  summary: "List session forms",
36
36
  description: "Retrieve pending forms for a session.",
37
37
  })))
@@ -43,7 +43,7 @@ export const makeFormGroup = (locationMiddleware, formLocationMiddleware) => Htt
43
43
  })
44
44
  .middleware(formLocationMiddleware)
45
45
  .annotateMerge(OpenApi.annotations({
46
- identifier: "v2.session.form.create",
46
+ identifier: "session.form.create",
47
47
  summary: "Create session form",
48
48
  description: "Create a form for a session.",
49
49
  })))
@@ -54,7 +54,7 @@ export const makeFormGroup = (locationMiddleware, formLocationMiddleware) => Htt
54
54
  })
55
55
  .middleware(formLocationMiddleware)
56
56
  .annotateMerge(OpenApi.annotations({
57
- identifier: "v2.session.form.get",
57
+ identifier: "session.form.get",
58
58
  summary: "Get session form",
59
59
  description: "Retrieve a form for a session.",
60
60
  })))
@@ -65,7 +65,7 @@ export const makeFormGroup = (locationMiddleware, formLocationMiddleware) => Htt
65
65
  })
66
66
  .middleware(formLocationMiddleware)
67
67
  .annotateMerge(OpenApi.annotations({
68
- identifier: "v2.session.form.state",
68
+ identifier: "session.form.state",
69
69
  summary: "Get form state",
70
70
  description: "Retrieve the current state for a form.",
71
71
  })))
@@ -77,7 +77,7 @@ export const makeFormGroup = (locationMiddleware, formLocationMiddleware) => Htt
77
77
  })
78
78
  .middleware(formLocationMiddleware)
79
79
  .annotateMerge(OpenApi.annotations({
80
- identifier: "v2.session.form.reply",
80
+ identifier: "session.form.reply",
81
81
  summary: "Reply to form",
82
82
  description: "Submit an answer to a pending form.",
83
83
  })))
@@ -88,7 +88,7 @@ export const makeFormGroup = (locationMiddleware, formLocationMiddleware) => Htt
88
88
  })
89
89
  .middleware(formLocationMiddleware)
90
90
  .annotateMerge(OpenApi.annotations({
91
- identifier: "v2.session.form.cancel",
91
+ identifier: "session.form.cancel",
92
92
  summary: "Cancel form",
93
93
  description: "Cancel a pending form.",
94
94
  })))
package/dist/groups/fs.js CHANGED
@@ -25,7 +25,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
25
25
  })
26
26
  .annotateMerge(locationQueryOpenApi)
27
27
  .annotateMerge(OpenApi.annotations({
28
- identifier: "v2.fs.read",
28
+ identifier: "fs.read",
29
29
  summary: "Read file",
30
30
  description: "Serve one file relative to the requested location.",
31
31
  })))
@@ -35,7 +35,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
35
35
  })
36
36
  .annotateMerge(locationQueryOpenApi)
37
37
  .annotateMerge(OpenApi.annotations({
38
- identifier: "v2.fs.list",
38
+ identifier: "fs.list",
39
39
  summary: "List directory",
40
40
  description: "List direct children using an absolute path or a path relative to the requested location, including parents and siblings outside its directory. Entry paths remain relative to the requested location; listing does not switch locations.",
41
41
  })))
@@ -45,7 +45,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
45
45
  })
46
46
  .annotateMerge(locationQueryOpenApi)
47
47
  .annotateMerge(OpenApi.annotations({
48
- identifier: "v2.fs.find",
48
+ identifier: "fs.find",
49
49
  summary: "Find files",
50
50
  description: "Find recursively ranked filesystem entries relative to the requested location.",
51
51
  })))
@@ -13,7 +13,7 @@ export const GenerateGroup = HttpApiGroup.make("server.generate")
13
13
  }).annotate({ identifier: "GenerateTextResponse" }),
14
14
  error: [InvalidRequestError, ServiceUnavailableError],
15
15
  }).annotateMerge(OpenApi.annotations({
16
- identifier: "v2.generate.text",
16
+ identifier: "generate.text",
17
17
  summary: "Generate text",
18
18
  description: "Run one stateless model generation using the server's base configuration and return the assistant text. Uses the base configuration's default model when none is specified.",
19
19
  })))
@@ -12,7 +12,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
12
12
  })
13
13
  .annotateMerge(locationQueryOpenApi)
14
14
  .annotateMerge(OpenApi.annotations({
15
- identifier: "v2.integration.list",
15
+ identifier: "integration.list",
16
16
  summary: "List integrations",
17
17
  description: "Retrieve available integrations and their authentication methods.",
18
18
  })))
@@ -23,7 +23,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
23
23
  })
24
24
  .annotateMerge(locationQueryOpenApi)
25
25
  .annotateMerge(OpenApi.annotations({
26
- identifier: "v2.integration.get",
26
+ identifier: "integration.get",
27
27
  summary: "Get integration",
28
28
  description: "Retrieve one integration and its authentication methods.",
29
29
  })))
@@ -35,7 +35,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
35
35
  })
36
36
  .annotateMerge(locationQueryOpenApi)
37
37
  .annotateMerge(OpenApi.annotations({
38
- identifier: "v2.experimental.integration.wellknown.add",
38
+ identifier: "experimental.integration.wellknown.add",
39
39
  summary: "Add wellknown integration",
40
40
  description: "Discover and persist an experimental wellknown integration source.",
41
41
  })))
@@ -52,7 +52,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
52
52
  })
53
53
  .annotateMerge(locationQueryOpenApi)
54
54
  .annotateMerge(OpenApi.annotations({
55
- identifier: "v2.integration.connect.key",
55
+ identifier: "integration.connect.key",
56
56
  summary: "Connect with key",
57
57
  description: "Run a key authentication method and store the resulting credential.",
58
58
  })))
@@ -69,7 +69,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
69
69
  })
70
70
  .annotateMerge(locationQueryOpenApi)
71
71
  .annotateMerge(OpenApi.annotations({
72
- identifier: "v2.integration.oauth.connect",
72
+ identifier: "integration.oauth.connect",
73
73
  summary: "Begin OAuth connection",
74
74
  description: "Start an OAuth attempt and return the authorization details.",
75
75
  })))
@@ -80,7 +80,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
80
80
  })
81
81
  .annotateMerge(locationQueryOpenApi)
82
82
  .annotateMerge(OpenApi.annotations({
83
- identifier: "v2.integration.oauth.status",
83
+ identifier: "integration.oauth.status",
84
84
  summary: "Get OAuth attempt status",
85
85
  description: "Poll the current status of an OAuth attempt.",
86
86
  })))
@@ -93,7 +93,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
93
93
  })
94
94
  .annotateMerge(locationQueryOpenApi)
95
95
  .annotateMerge(OpenApi.annotations({
96
- identifier: "v2.integration.oauth.complete",
96
+ identifier: "integration.oauth.complete",
97
97
  summary: "Complete OAuth connection",
98
98
  description: "Complete a code-based OAuth attempt and store the resulting credential.",
99
99
  })))
@@ -104,7 +104,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
104
104
  })
105
105
  .annotateMerge(locationQueryOpenApi)
106
106
  .annotateMerge(OpenApi.annotations({
107
- identifier: "v2.integration.oauth.cancel",
107
+ identifier: "integration.oauth.cancel",
108
108
  summary: "Cancel OAuth connection",
109
109
  description: "Cancel an OAuth attempt and release its resources.",
110
110
  })))
@@ -120,7 +120,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
120
120
  })
121
121
  .annotateMerge(locationQueryOpenApi)
122
122
  .annotateMerge(OpenApi.annotations({
123
- identifier: "v2.integration.command.connect",
123
+ identifier: "integration.command.connect",
124
124
  summary: "Begin command connection",
125
125
  description: "Start a command authentication attempt.",
126
126
  })))
@@ -131,7 +131,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
131
131
  })
132
132
  .annotateMerge(locationQueryOpenApi)
133
133
  .annotateMerge(OpenApi.annotations({
134
- identifier: "v2.integration.command.status",
134
+ identifier: "integration.command.status",
135
135
  summary: "Get command attempt status",
136
136
  description: "Poll the current status and output of a command authentication attempt.",
137
137
  })))
@@ -142,7 +142,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
142
142
  })
143
143
  .annotateMerge(locationQueryOpenApi)
144
144
  .annotateMerge(OpenApi.annotations({
145
- identifier: "v2.integration.command.cancel",
145
+ identifier: "integration.command.cancel",
146
146
  summary: "Cancel command connection",
147
147
  description: "Cancel a command authentication attempt and terminate its process.",
148
148
  })))
@@ -27,7 +27,7 @@ export const LocationGroup = HttpApiGroup.make("server.location")
27
27
  })
28
28
  .annotateMerge(locationQueryOpenApi)
29
29
  .annotateMerge(OpenApi.annotations({
30
- identifier: "v2.location.get",
30
+ identifier: "location.get",
31
31
  summary: "Get location",
32
32
  description: "Resolve the requested location or the server default location.",
33
33
  })))
@@ -11,7 +11,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
11
11
  })
12
12
  .annotateMerge(locationQueryOpenApi)
13
13
  .annotateMerge(OpenApi.annotations({
14
- identifier: "v2.mcp.list",
14
+ identifier: "mcp.list",
15
15
  summary: "List MCP servers",
16
16
  description: "Retrieve configured MCP servers and their connection status.",
17
17
  })))
@@ -25,7 +25,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
25
25
  })
26
26
  .annotateMerge(locationQueryOpenApi)
27
27
  .annotateMerge(OpenApi.annotations({
28
- identifier: "v2.mcp.add",
28
+ identifier: "mcp.add",
29
29
  summary: "Add MCP server",
30
30
  description: "Add an MCP server at runtime or replace an existing one, connecting it immediately.",
31
31
  })))
@@ -37,7 +37,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
37
37
  })
38
38
  .annotateMerge(locationQueryOpenApi)
39
39
  .annotateMerge(OpenApi.annotations({
40
- identifier: "v2.mcp.remove",
40
+ identifier: "mcp.remove",
41
41
  summary: "Remove MCP server",
42
42
  description: "Stop an MCP server and remove it from the runtime set until restart.",
43
43
  })))
@@ -49,7 +49,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
49
49
  })
50
50
  .annotateMerge(locationQueryOpenApi)
51
51
  .annotateMerge(OpenApi.annotations({
52
- identifier: "v2.mcp.connect",
52
+ identifier: "mcp.connect",
53
53
  summary: "Connect MCP server",
54
54
  description: "Connect an MCP server at runtime, overriding a disabled configuration until restart.",
55
55
  })))
@@ -61,7 +61,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
61
61
  })
62
62
  .annotateMerge(locationQueryOpenApi)
63
63
  .annotateMerge(OpenApi.annotations({
64
- identifier: "v2.mcp.disconnect",
64
+ identifier: "mcp.disconnect",
65
65
  summary: "Disconnect MCP server",
66
66
  description: "Disconnect an MCP server at runtime, removing its tools until reconnected.",
67
67
  })))
@@ -71,7 +71,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
71
71
  })
72
72
  .annotateMerge(locationQueryOpenApi)
73
73
  .annotateMerge(OpenApi.annotations({
74
- identifier: "v2.mcp.resource.catalog",
74
+ identifier: "mcp.resource.catalog",
75
75
  summary: "List MCP resources",
76
76
  description: "Retrieve resources and resource templates from connected MCP servers.",
77
77
  })))
@@ -41,7 +41,7 @@ export const MessageGroup = HttpApiGroup.make("server.message")
41
41
  }).annotate({ identifier: "SessionMessagesResponse" }),
42
42
  error: [InvalidCursorError, SessionNotFoundError, UnknownError],
43
43
  }).annotateMerge(OpenApi.annotations({
44
- identifier: "v2.message.list",
44
+ identifier: "message.list",
45
45
  summary: "Get session messages",
46
46
  description: "Retrieve projected messages for a session, optionally filtered by type. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline, passing the same type filter on each page.",
47
47
  })))
@@ -14,7 +14,7 @@ export const MigrationGroup = HttpApiGroup.make("server.migration")
14
14
  .add(HttpApiEndpoint.get("migration.v1.status", "/api/experimental/migration/v1", {
15
15
  success: V1MigrationStatus,
16
16
  }).annotateMerge(OpenApi.annotations({
17
- identifier: "v2.experimental.migration.v1.status",
17
+ identifier: "experimental.migration.v1.status",
18
18
  summary: "Get V1 migration status",
19
19
  description: "Return the progress of the V1 to V2 session history migration.",
20
20
  })))
@@ -12,7 +12,7 @@ export const ModelGroup = HttpApiGroup.make("server.model")
12
12
  })
13
13
  .annotateMerge(locationQueryOpenApi)
14
14
  .annotateMerge(OpenApi.annotations({
15
- identifier: "v2.model.list",
15
+ identifier: "model.list",
16
16
  summary: "List models",
17
17
  description: "Retrieve the current snapshot of available models ordered by release date. The snapshot may precede initial plugin settlement.",
18
18
  })))
@@ -23,7 +23,7 @@ export const ModelGroup = HttpApiGroup.make("server.model")
23
23
  })
24
24
  .annotateMerge(locationQueryOpenApi)
25
25
  .annotateMerge(OpenApi.annotations({
26
- identifier: "v2.model.default",
26
+ identifier: "model.default",
27
27
  summary: "Get default model",
28
28
  description: "Retrieve the model used when a session has no explicit model selection.",
29
29
  })))
@@ -15,7 +15,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
15
15
  })
16
16
  .annotateMerge(locationQueryOpenApi)
17
17
  .annotateMerge(OpenApi.annotations({
18
- identifier: "v2.permission.request.list",
18
+ identifier: "permission.request.list",
19
19
  summary: "List pending permission requests",
20
20
  description: "Retrieve pending permission requests for a location.",
21
21
  })))
@@ -23,7 +23,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
23
23
  query: Schema.Struct({ projectID: Project.ID.pipe(Schema.optional) }),
24
24
  success: Schema.Struct({ data: Schema.Array(PermissionSaved.Info) }),
25
25
  }).annotateMerge(OpenApi.annotations({
26
- identifier: "v2.permission.saved.list",
26
+ identifier: "permission.saved.list",
27
27
  summary: "List saved permissions",
28
28
  description: "Retrieve saved permissions, optionally filtered by project.",
29
29
  })))
@@ -31,7 +31,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
31
31
  params: { id: PermissionSaved.ID },
32
32
  success: HttpApiSchema.NoContent,
33
33
  }).annotateMerge(OpenApi.annotations({
34
- identifier: "v2.permission.saved.remove",
34
+ identifier: "permission.saved.remove",
35
35
  summary: "Remove saved permission",
36
36
  description: "Remove a saved permission by ID.",
37
37
  })))
@@ -55,7 +55,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
55
55
  })
56
56
  .middleware(sessionLocationMiddleware)
57
57
  .annotateMerge(OpenApi.annotations({
58
- identifier: "v2.session.permission.create",
58
+ identifier: "session.permission.create",
59
59
  summary: "Create permission request",
60
60
  description: "Evaluate and, when approval is required, create a permission request for a session.",
61
61
  })))
@@ -64,7 +64,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
64
64
  success: Schema.Struct({ data: Schema.Array(Permission.Request) }),
65
65
  error: SessionNotFoundError,
66
66
  }).annotateMerge(OpenApi.annotations({
67
- identifier: "v2.session.permission.list",
67
+ identifier: "session.permission.list",
68
68
  summary: "List session permission requests",
69
69
  description: "Retrieve pending permission requests owned by a session.",
70
70
  })))
@@ -75,7 +75,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
75
75
  })
76
76
  .middleware(sessionLocationMiddleware)
77
77
  .annotateMerge(OpenApi.annotations({
78
- identifier: "v2.session.permission.get",
78
+ identifier: "session.permission.get",
79
79
  summary: "Get permission request",
80
80
  description: "Retrieve a pending permission request owned by a session.",
81
81
  })))
@@ -90,7 +90,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
90
90
  })
91
91
  .middleware(sessionLocationMiddleware)
92
92
  .annotateMerge(OpenApi.annotations({
93
- identifier: "v2.session.permission.reply",
93
+ identifier: "session.permission.reply",
94
94
  summary: "Reply to pending permission request",
95
95
  description: "Respond to a pending permission request owned by a session.",
96
96
  })))
@@ -102,7 +102,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
102
102
  })
103
103
  .middleware(sessionLocationMiddleware)
104
104
  .annotateMerge(OpenApi.annotations({
105
- identifier: "v2.session.permission.rules",
105
+ identifier: "session.permission.rules",
106
106
  summary: "Replace session permission rules",
107
107
  description: "Replace the session-scoped permission rules. Rules are evaluated after the agent's rules, and the last matching rule wins.",
108
108
  })))
@@ -76,7 +76,7 @@ export const PersistentPtyGroup = HttpApiGroup.make("server.experimental")
76
76
  success: Schema.Boolean,
77
77
  error: [ForbiddenError, PtyNotFoundError, ServiceUnavailableError],
78
78
  }).annotateMerge(OpenApi.annotations({
79
- identifier: "v2.persistentPty.connect",
79
+ identifier: "persistentPty.connect",
80
80
  summary: "Connect to a persistent PTY",
81
81
  description: "Stream persistent PTY output through the OpenCode server.",
82
82
  transform: (operation) => ({
@@ -11,7 +11,7 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
11
11
  })
12
12
  .annotateMerge(locationQueryOpenApi)
13
13
  .annotateMerge(OpenApi.annotations({
14
- identifier: "v2.plugin.list",
14
+ identifier: "plugin.list",
15
15
  summary: "List plugins",
16
16
  description: "Retrieve enabled server plugins and their current status.",
17
17
  })))
@@ -21,7 +21,7 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
21
21
  })
22
22
  .annotateMerge(locationQueryOpenApi)
23
23
  .annotateMerge(OpenApi.annotations({
24
- identifier: "v2.plugin.awaitActivation",
24
+ identifier: "plugin.awaitActivation",
25
25
  summary: "Wait for plugin activation",
26
26
  description: "Wait for configured plugin activation at a Location to settle, including missing-package installs. Completion does not imply every plugin succeeded or background resource discovery finished. Cancelling this wait does not cancel activation.",
27
27
  })))
@@ -33,7 +33,7 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
33
33
  })
34
34
  .annotateMerge(locationQueryOpenApi)
35
35
  .annotateMerge(OpenApi.annotations({
36
- identifier: "v2.plugin.check",
36
+ identifier: "plugin.check",
37
37
  summary: "Check plugin updates",
38
38
  description: "Check one or all package plugins for available updates.",
39
39
  })))
@@ -45,7 +45,7 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
45
45
  })
46
46
  .annotateMerge(locationQueryOpenApi)
47
47
  .annotateMerge(OpenApi.annotations({
48
- identifier: "v2.plugin.update",
48
+ identifier: "plugin.update",
49
49
  summary: "Update plugins",
50
50
  description: "Update package plugins concurrently and notify active locations to reload them. Responds once every update has finished; fails when any update fails.",
51
51
  })))
@@ -8,7 +8,7 @@ export const ProjectGroup = HttpApiGroup.make("server.project")
8
8
  .add(HttpApiEndpoint.get("project.list", root, {
9
9
  success: Schema.Array(Project.Info),
10
10
  }).annotateMerge(OpenApi.annotations({
11
- identifier: "v2.project.list",
11
+ identifier: "project.list",
12
12
  summary: "List projects",
13
13
  description: "List known projects.",
14
14
  })))
@@ -18,7 +18,7 @@ export const ProjectGroup = HttpApiGroup.make("server.project")
18
18
  success: Project.Info,
19
19
  error: ProjectNotFoundError,
20
20
  }).annotateMerge(OpenApi.annotations({
21
- identifier: "v2.project.update",
21
+ identifier: "project.update",
22
22
  summary: "Update project",
23
23
  description: "Update the project canonical directory, display metadata, and workspace commands.",
24
24
  })))
@@ -12,7 +12,7 @@ export const ProviderGroup = HttpApiGroup.make("server.provider")
12
12
  })
13
13
  .annotateMerge(locationQueryOpenApi)
14
14
  .annotateMerge(OpenApi.annotations({
15
- identifier: "v2.provider.list",
15
+ identifier: "provider.list",
16
16
  summary: "List providers",
17
17
  description: "Retrieve active AI providers so clients can show provider availability and configuration.",
18
18
  })))
@@ -24,7 +24,7 @@ export const ProviderGroup = HttpApiGroup.make("server.provider")
24
24
  })
25
25
  .annotateMerge(locationQueryOpenApi)
26
26
  .annotateMerge(OpenApi.annotations({
27
- identifier: "v2.provider.get",
27
+ identifier: "provider.get",
28
28
  summary: "Get provider",
29
29
  description: "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
30
30
  })))