mirror of
https://gitee.com/zhangsken/opencode.git
synced 2026-10-16 10:30:01 +08:00
refactor(protocol): remove v2 operation prefixes
This commit is contained in:
+133
-133
@@ -53,13 +53,13 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 001 | `GET` | `/api/health` | `v2.health.get` | | |
|
||||
| [ ] 002 | `GET` | `/api/server` | `v2.server.get` | | |
|
||||
| [ ] 003 | `GET` | `/api/location` | `v2.location.get` | | |
|
||||
| [ ] 004 | `GET` | `/api/project` | `v2.project.list` | | |
|
||||
| [ ] 005 | `PATCH` | `/api/project/{projectID}` | `v2.project.update` | | |
|
||||
| [ ] 006 | `POST` | `/api/workspace` | `v2.workspace.create` | Proposed remove | Awaiting feedback in `#core`. |
|
||||
| [ ] 007 | `DELETE` | `/api/workspace/{workspaceID}` | `v2.workspace.destroy` | Proposed remove | Awaiting feedback in `#core`. |
|
||||
| [x] 001 | `GET` | `/api/health` | `health.get` | Change | Keep path; rename operation to `health.get`; remove redundant `healthy` response field. |
|
||||
| [ ] 002 | `GET` | `/api/server` | `server.get` | | |
|
||||
| [ ] 003 | `GET` | `/api/location` | `location.get` | | |
|
||||
| [ ] 004 | `GET` | `/api/project` | `project.list` | | |
|
||||
| [ ] 005 | `PATCH` | `/api/project/{projectID}` | `project.update` | | |
|
||||
| [ ] 006 | `POST` | `/api/workspace` | `workspace.create` | Proposed remove | Awaiting feedback in `#core`. |
|
||||
| [ ] 007 | `DELETE` | `/api/workspace/{workspaceID}` | `workspace.destroy` | Proposed remove | Awaiting feedback in `#core`. |
|
||||
|
||||
## Group 2: Configuration and capability catalogs
|
||||
|
||||
@@ -67,23 +67,23 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 008 | `GET` | `/api/agent` | `v2.agent.list` | | |
|
||||
| [ ] 009 | `GET` | `/api/agent/{agentID}` | `v2.agent.get` | | |
|
||||
| [ ] 010 | `GET` | `/api/plugin` | `v2.plugin.list` | | |
|
||||
| [ ] 011 | `POST` | `/api/plugin/await-activation` | `v2.plugin.awaitActivation` | | |
|
||||
| [ ] 012 | `POST` | `/api/plugin/check` | `v2.plugin.check` | | |
|
||||
| [ ] 013 | `POST` | `/api/plugin/update` | `v2.plugin.update` | | |
|
||||
| [ ] 014 | `GET` | `/api/model` | `v2.model.list` | | |
|
||||
| [ ] 015 | `GET` | `/api/model/default` | `v2.model.default` | | |
|
||||
| [ ] 016 | `GET` | `/api/provider` | `v2.provider.list` | | |
|
||||
| [ ] 017 | `GET` | `/api/provider/{providerID}` | `v2.provider.get` | | |
|
||||
| [ ] 018 | `GET` | `/api/command` | `v2.command.list` | | |
|
||||
| [ ] 019 | `GET` | `/api/skill` | `v2.skill.list` | | |
|
||||
| [ ] 020 | `GET` | `/api/reference` | `v2.reference.list` | | |
|
||||
| [ ] 021 | `GET` | `/api/config` | `v2.config.get` | | |
|
||||
| [ ] 022 | `GET` | `/api/config/preferences` | `v2.config.preferences` | | |
|
||||
| [ ] 023 | `PATCH` | `/api/config/preferences` | `v2.config.updatePreferences` | | |
|
||||
| [ ] 024 | `GET` | `/api/config/shell` | `v2.config.shells` | | |
|
||||
| [ ] 008 | `GET` | `/api/agent` | `agent.list` | | |
|
||||
| [ ] 009 | `GET` | `/api/agent/{agentID}` | `agent.get` | | |
|
||||
| [ ] 010 | `GET` | `/api/plugin` | `plugin.list` | | |
|
||||
| [ ] 011 | `POST` | `/api/plugin/await-activation` | `plugin.awaitActivation` | | |
|
||||
| [ ] 012 | `POST` | `/api/plugin/check` | `plugin.check` | | |
|
||||
| [ ] 013 | `POST` | `/api/plugin/update` | `plugin.update` | | |
|
||||
| [ ] 014 | `GET` | `/api/model` | `model.list` | | |
|
||||
| [ ] 015 | `GET` | `/api/model/default` | `model.default` | | |
|
||||
| [ ] 016 | `GET` | `/api/provider` | `provider.list` | | |
|
||||
| [ ] 017 | `GET` | `/api/provider/{providerID}` | `provider.get` | | |
|
||||
| [ ] 018 | `GET` | `/api/command` | `command.list` | | |
|
||||
| [ ] 019 | `GET` | `/api/skill` | `skill.list` | | |
|
||||
| [ ] 020 | `GET` | `/api/reference` | `reference.list` | | |
|
||||
| [ ] 021 | `GET` | `/api/config` | `config.get` | | |
|
||||
| [ ] 022 | `GET` | `/api/config/preferences` | `config.preferences` | | |
|
||||
| [ ] 023 | `PATCH` | `/api/config/preferences` | `config.updatePreferences` | | |
|
||||
| [ ] 024 | `GET` | `/api/config/shell` | `config.shells` | | |
|
||||
|
||||
## Group 3: Credentials, integrations, MCP, and web search
|
||||
|
||||
@@ -91,28 +91,28 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 025 | `GET` | `/api/integration` | `v2.integration.list` | | |
|
||||
| [ ] 026 | `GET` | `/api/integration/{integrationID}` | `v2.integration.get` | | |
|
||||
| [ ] 027 | `POST` | `/api/experimental/integration/wellknown` | `v2.experimental.integration.wellknown.add` | | |
|
||||
| [ ] 028 | `POST` | `/api/integration/{integrationID}/connect/key` | `v2.integration.connect.key` | | |
|
||||
| [ ] 029 | `POST` | `/api/integration/{integrationID}/connect/oauth` | `v2.integration.oauth.connect` | | |
|
||||
| [ ] 030 | `GET` | `/api/integration/{integrationID}/connect/oauth/{attemptID}` | `v2.integration.oauth.status` | | |
|
||||
| [ ] 031 | `DELETE` | `/api/integration/{integrationID}/connect/oauth/{attemptID}` | `v2.integration.oauth.cancel` | | |
|
||||
| [ ] 032 | `POST` | `/api/integration/{integrationID}/connect/oauth/{attemptID}/complete` | `v2.integration.oauth.complete` | | |
|
||||
| [ ] 033 | `POST` | `/api/integration/{integrationID}/connect/command` | `v2.integration.command.connect` | | |
|
||||
| [ ] 034 | `GET` | `/api/integration/{integrationID}/connect/command/{attemptID}` | `v2.integration.command.status` | | |
|
||||
| [ ] 035 | `DELETE` | `/api/integration/{integrationID}/connect/command/{attemptID}` | `v2.integration.command.cancel` | | |
|
||||
| [ ] 036 | `GET` | `/api/mcp` | `v2.mcp.list` | | |
|
||||
| [ ] 037 | `PUT` | `/api/mcp/{server}` | `v2.mcp.add` | | |
|
||||
| [ ] 038 | `DELETE` | `/api/mcp/{server}` | `v2.mcp.remove` | | |
|
||||
| [ ] 039 | `POST` | `/api/mcp/{server}/connect` | `v2.mcp.connect` | | |
|
||||
| [ ] 040 | `POST` | `/api/mcp/{server}/disconnect` | `v2.mcp.disconnect` | | |
|
||||
| [ ] 041 | `GET` | `/api/mcp/resource` | `v2.mcp.resource.catalog` | | |
|
||||
| [ ] 042 | `PATCH` | `/api/credential/{credentialID}` | `v2.credential.update` | | |
|
||||
| [ ] 043 | `DELETE` | `/api/credential/{credentialID}` | `v2.credential.remove` | | |
|
||||
| [ ] 044 | `POST` | `/api/credential/{credentialID}/activate` | `v2.credential.activate` | | |
|
||||
| [ ] 045 | `GET` | `/api/websearch/provider` | `v2.websearch.providers` | | |
|
||||
| [ ] 046 | `POST` | `/api/websearch` | `v2.websearch.query` | | |
|
||||
| [ ] 025 | `GET` | `/api/integration` | `integration.list` | | |
|
||||
| [ ] 026 | `GET` | `/api/integration/{integrationID}` | `integration.get` | | |
|
||||
| [ ] 027 | `POST` | `/api/experimental/integration/wellknown` | `experimental.integration.wellknown.add` | | |
|
||||
| [ ] 028 | `POST` | `/api/integration/{integrationID}/connect/key` | `integration.connect.key` | | |
|
||||
| [ ] 029 | `POST` | `/api/integration/{integrationID}/connect/oauth` | `integration.oauth.connect` | | |
|
||||
| [ ] 030 | `GET` | `/api/integration/{integrationID}/connect/oauth/{attemptID}` | `integration.oauth.status` | | |
|
||||
| [ ] 031 | `DELETE` | `/api/integration/{integrationID}/connect/oauth/{attemptID}` | `integration.oauth.cancel` | | |
|
||||
| [ ] 032 | `POST` | `/api/integration/{integrationID}/connect/oauth/{attemptID}/complete` | `integration.oauth.complete` | | |
|
||||
| [ ] 033 | `POST` | `/api/integration/{integrationID}/connect/command` | `integration.command.connect` | | |
|
||||
| [ ] 034 | `GET` | `/api/integration/{integrationID}/connect/command/{attemptID}` | `integration.command.status` | | |
|
||||
| [ ] 035 | `DELETE` | `/api/integration/{integrationID}/connect/command/{attemptID}` | `integration.command.cancel` | | |
|
||||
| [ ] 036 | `GET` | `/api/mcp` | `mcp.list` | | |
|
||||
| [ ] 037 | `PUT` | `/api/mcp/{server}` | `mcp.add` | | |
|
||||
| [ ] 038 | `DELETE` | `/api/mcp/{server}` | `mcp.remove` | | |
|
||||
| [ ] 039 | `POST` | `/api/mcp/{server}/connect` | `mcp.connect` | | |
|
||||
| [ ] 040 | `POST` | `/api/mcp/{server}/disconnect` | `mcp.disconnect` | | |
|
||||
| [ ] 041 | `GET` | `/api/mcp/resource` | `mcp.resource.catalog` | | |
|
||||
| [ ] 042 | `PATCH` | `/api/credential/{credentialID}` | `credential.update` | | |
|
||||
| [ ] 043 | `DELETE` | `/api/credential/{credentialID}` | `credential.remove` | | |
|
||||
| [ ] 044 | `POST` | `/api/credential/{credentialID}/activate` | `credential.activate` | | |
|
||||
| [ ] 045 | `GET` | `/api/websearch/provider` | `websearch.providers` | | |
|
||||
| [ ] 046 | `POST` | `/api/websearch` | `websearch.query` | | |
|
||||
|
||||
## Group 4: Session lifecycle
|
||||
|
||||
@@ -120,18 +120,18 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 047 | `GET` | `/api/session` | `v2.session.list` | | |
|
||||
| [ ] 048 | `POST` | `/api/session` | `v2.session.create` | | |
|
||||
| [ ] 049 | `GET` | `/api/session/stats` | `v2.session.stats` | | |
|
||||
| [ ] 050 | `GET` | `/api/session/active` | `v2.session.active` | | |
|
||||
| [ ] 051 | `GET` | `/api/session/{sessionID}` | `v2.session.get` | | |
|
||||
| [ ] 052 | `DELETE` | `/api/session/{sessionID}` | `v2.session.remove` | | |
|
||||
| [ ] 053 | `POST` | `/api/session/{sessionID}/fork` | `v2.session.fork` | | |
|
||||
| [ ] 054 | `POST` | `/api/session/{sessionID}/agent` | `v2.session.switchAgent` | | |
|
||||
| [ ] 055 | `POST` | `/api/session/{sessionID}/model` | `v2.session.switchModel` | | |
|
||||
| [ ] 056 | `POST` | `/api/session/{sessionID}/rename` | `v2.session.rename` | | |
|
||||
| [ ] 057 | `POST` | `/api/session/{sessionID}/move` | `v2.session.move` | | |
|
||||
| [ ] 058 | `POST` | `/api/session/{sessionID}/background` | `v2.session.background` | | |
|
||||
| [ ] 047 | `GET` | `/api/session` | `session.list` | | |
|
||||
| [ ] 048 | `POST` | `/api/session` | `session.create` | | |
|
||||
| [ ] 049 | `GET` | `/api/session/stats` | `session.stats` | | |
|
||||
| [ ] 050 | `GET` | `/api/session/active` | `session.active` | | |
|
||||
| [ ] 051 | `GET` | `/api/session/{sessionID}` | `session.get` | | |
|
||||
| [ ] 052 | `DELETE` | `/api/session/{sessionID}` | `session.remove` | | |
|
||||
| [ ] 053 | `POST` | `/api/session/{sessionID}/fork` | `session.fork` | | |
|
||||
| [ ] 054 | `POST` | `/api/session/{sessionID}/agent` | `session.switchAgent` | | |
|
||||
| [ ] 055 | `POST` | `/api/session/{sessionID}/model` | `session.switchModel` | | |
|
||||
| [ ] 056 | `POST` | `/api/session/{sessionID}/rename` | `session.rename` | | |
|
||||
| [ ] 057 | `POST` | `/api/session/{sessionID}/move` | `session.move` | | |
|
||||
| [ ] 058 | `POST` | `/api/session/{sessionID}/background` | `session.background` | | |
|
||||
|
||||
## Group 5: Session execution and inputs
|
||||
|
||||
@@ -139,17 +139,17 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 059 | `POST` | `/api/session/{sessionID}/prompt` | `v2.session.prompt` | | |
|
||||
| [ ] 060 | `POST` | `/api/session/{sessionID}/command` | `v2.session.command` | | |
|
||||
| [ ] 061 | `POST` | `/api/session/{sessionID}/skill` | `v2.session.skill` | | |
|
||||
| [ ] 062 | `POST` | `/api/session/{sessionID}/synthetic` | `v2.session.synthetic` | | |
|
||||
| [ ] 063 | `POST` | `/api/session/{sessionID}/shell` | `v2.session.shell` | | |
|
||||
| [ ] 064 | `POST` | `/api/session/{sessionID}/compact` | `v2.session.compact` | | |
|
||||
| [ ] 065 | `POST` | `/api/session/{sessionID}/wait` | `v2.session.wait` | | |
|
||||
| [ ] 066 | `POST` | `/api/session/{sessionID}/generate` | `v2.session.generate` | | |
|
||||
| [ ] 067 | `POST` | `/api/session/{sessionID}/interrupt` | `v2.session.interrupt` | | |
|
||||
| [ ] 068 | `PUT` | `/api/session/{sessionID}/environment` | `v2.session.environment` | | |
|
||||
| [ ] 069 | `POST` | `/api/session/{sessionID}/view` | `v2.session.view` | | |
|
||||
| [ ] 059 | `POST` | `/api/session/{sessionID}/prompt` | `session.prompt` | | |
|
||||
| [ ] 060 | `POST` | `/api/session/{sessionID}/command` | `session.command` | | |
|
||||
| [ ] 061 | `POST` | `/api/session/{sessionID}/skill` | `session.skill` | | |
|
||||
| [ ] 062 | `POST` | `/api/session/{sessionID}/synthetic` | `session.synthetic` | | |
|
||||
| [ ] 063 | `POST` | `/api/session/{sessionID}/shell` | `session.shell` | | |
|
||||
| [ ] 064 | `POST` | `/api/session/{sessionID}/compact` | `session.compact` | | |
|
||||
| [ ] 065 | `POST` | `/api/session/{sessionID}/wait` | `session.wait` | | |
|
||||
| [ ] 066 | `POST` | `/api/session/{sessionID}/generate` | `session.generate` | | |
|
||||
| [ ] 067 | `POST` | `/api/session/{sessionID}/interrupt` | `session.interrupt` | | |
|
||||
| [ ] 068 | `PUT` | `/api/session/{sessionID}/environment` | `session.environment` | | |
|
||||
| [ ] 069 | `POST` | `/api/session/{sessionID}/view` | `session.view` | | |
|
||||
|
||||
## Group 6: Session history and recovery
|
||||
|
||||
@@ -157,19 +157,19 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 070 | `POST` | `/api/session/import` | `v2.session.import` | | |
|
||||
| [ ] 071 | `GET` | `/api/session/{sessionID}/export` | `v2.session.export` | | |
|
||||
| [ ] 072 | `POST` | `/api/session/{sessionID}/revert/stage` | `v2.session.revert.stage` | | |
|
||||
| [ ] 073 | `POST` | `/api/session/{sessionID}/revert/clear` | `v2.session.revert.clear` | | |
|
||||
| [ ] 074 | `POST` | `/api/session/{sessionID}/revert/commit` | `v2.session.revert.commit` | | |
|
||||
| [ ] 075 | `GET` | `/api/session/{sessionID}/context` | `v2.session.context` | | |
|
||||
| [ ] 076 | `GET` | `/api/session/{sessionID}/diff` | `v2.session.diff` | | |
|
||||
| [ ] 077 | `GET` | `/api/session/{sessionID}/instructions/entries` | `v2.session.instructions.entry.list` | | |
|
||||
| [ ] 078 | `PUT` | `/api/session/{sessionID}/instructions/entries/{key}` | `v2.session.instructions.entry.put` | | |
|
||||
| [ ] 079 | `DELETE` | `/api/session/{sessionID}/instructions/entries/{key}` | `v2.session.instructions.entry.remove` | | |
|
||||
| [ ] 080 | `GET` | `/api/experimental/session/{sessionID}/log` | `v2.session.log` | | |
|
||||
| [ ] 081 | `GET` | `/api/session/{sessionID}/message/{messageID}` | `v2.session.message` | | |
|
||||
| [ ] 082 | `GET` | `/api/session/{sessionID}/message` | `v2.message.list` | | |
|
||||
| [ ] 070 | `POST` | `/api/session/import` | `session.import` | | |
|
||||
| [ ] 071 | `GET` | `/api/session/{sessionID}/export` | `session.export` | | |
|
||||
| [ ] 072 | `POST` | `/api/session/{sessionID}/revert/stage` | `session.revert.stage` | | |
|
||||
| [ ] 073 | `POST` | `/api/session/{sessionID}/revert/clear` | `session.revert.clear` | | |
|
||||
| [ ] 074 | `POST` | `/api/session/{sessionID}/revert/commit` | `session.revert.commit` | | |
|
||||
| [ ] 075 | `GET` | `/api/session/{sessionID}/context` | `session.context` | | |
|
||||
| [ ] 076 | `GET` | `/api/session/{sessionID}/diff` | `session.diff` | | |
|
||||
| [ ] 077 | `GET` | `/api/session/{sessionID}/instructions/entries` | `session.instructions.entry.list` | | |
|
||||
| [ ] 078 | `PUT` | `/api/session/{sessionID}/instructions/entries/{key}` | `session.instructions.entry.put` | | |
|
||||
| [ ] 079 | `DELETE` | `/api/session/{sessionID}/instructions/entries/{key}` | `session.instructions.entry.remove` | | |
|
||||
| [ ] 080 | `GET` | `/api/experimental/session/{sessionID}/log` | `session.log` | | |
|
||||
| [ ] 081 | `GET` | `/api/session/{sessionID}/message/{messageID}` | `session.message` | | |
|
||||
| [ ] 082 | `GET` | `/api/session/{sessionID}/message` | `message.list` | | |
|
||||
|
||||
## Group 7: Inbox, permissions, and forms
|
||||
|
||||
@@ -177,25 +177,25 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 083 | `GET` | `/api/session/{sessionID}/inbox` | `v2.session.inbox.list` | | |
|
||||
| [ ] 084 | `DELETE` | `/api/session/{sessionID}/inbox/{inboxID}` | `v2.session.inbox.cancel` | | |
|
||||
| [ ] 085 | `POST` | `/api/session/{sessionID}/inbox/{inboxID}/steer` | `v2.session.inbox.steer` | | |
|
||||
| [ ] 086 | `POST` | `/api/session/{sessionID}/inbox/{inboxID}/queue` | `v2.session.inbox.queue` | | |
|
||||
| [ ] 087 | `GET` | `/api/form/request` | `v2.form.request.list` | | |
|
||||
| [ ] 088 | `GET` | `/api/session/{sessionID}/form` | `v2.session.form.list` | | |
|
||||
| [ ] 089 | `POST` | `/api/session/{sessionID}/form` | `v2.session.form.create` | | |
|
||||
| [ ] 090 | `GET` | `/api/session/{sessionID}/form/{formID}` | `v2.session.form.get` | | |
|
||||
| [ ] 091 | `GET` | `/api/session/{sessionID}/form/{formID}/state` | `v2.session.form.state` | | |
|
||||
| [ ] 092 | `POST` | `/api/session/{sessionID}/form/{formID}/reply` | `v2.session.form.reply` | | |
|
||||
| [ ] 093 | `POST` | `/api/session/{sessionID}/form/{formID}/cancel` | `v2.session.form.cancel` | | |
|
||||
| [ ] 094 | `GET` | `/api/permission/request` | `v2.permission.request.list` | | |
|
||||
| [ ] 095 | `GET` | `/api/permission/saved` | `v2.permission.saved.list` | | |
|
||||
| [ ] 096 | `DELETE` | `/api/permission/saved/{id}` | `v2.permission.saved.remove` | | |
|
||||
| [ ] 097 | `POST` | `/api/session/{sessionID}/permission` | `v2.session.permission.create` | | |
|
||||
| [ ] 098 | `GET` | `/api/session/{sessionID}/permission` | `v2.session.permission.list` | | |
|
||||
| [ ] 099 | `GET` | `/api/session/{sessionID}/permission/{requestID}` | `v2.session.permission.get` | | |
|
||||
| [ ] 100 | `POST` | `/api/session/{sessionID}/permission/{requestID}/reply` | `v2.session.permission.reply` | | |
|
||||
| [ ] 101 | `PUT` | `/api/session/{sessionID}/permission/rules` | `v2.session.permission.rules` | | |
|
||||
| [ ] 083 | `GET` | `/api/session/{sessionID}/inbox` | `session.inbox.list` | | |
|
||||
| [ ] 084 | `DELETE` | `/api/session/{sessionID}/inbox/{inboxID}` | `session.inbox.cancel` | | |
|
||||
| [ ] 085 | `POST` | `/api/session/{sessionID}/inbox/{inboxID}/steer` | `session.inbox.steer` | | |
|
||||
| [ ] 086 | `POST` | `/api/session/{sessionID}/inbox/{inboxID}/queue` | `session.inbox.queue` | | |
|
||||
| [ ] 087 | `GET` | `/api/form/request` | `form.request.list` | | |
|
||||
| [ ] 088 | `GET` | `/api/session/{sessionID}/form` | `session.form.list` | | |
|
||||
| [ ] 089 | `POST` | `/api/session/{sessionID}/form` | `session.form.create` | | |
|
||||
| [ ] 090 | `GET` | `/api/session/{sessionID}/form/{formID}` | `session.form.get` | | |
|
||||
| [ ] 091 | `GET` | `/api/session/{sessionID}/form/{formID}/state` | `session.form.state` | | |
|
||||
| [ ] 092 | `POST` | `/api/session/{sessionID}/form/{formID}/reply` | `session.form.reply` | | |
|
||||
| [ ] 093 | `POST` | `/api/session/{sessionID}/form/{formID}/cancel` | `session.form.cancel` | | |
|
||||
| [ ] 094 | `GET` | `/api/permission/request` | `permission.request.list` | | |
|
||||
| [ ] 095 | `GET` | `/api/permission/saved` | `permission.saved.list` | | |
|
||||
| [ ] 096 | `DELETE` | `/api/permission/saved/{id}` | `permission.saved.remove` | | |
|
||||
| [ ] 097 | `POST` | `/api/session/{sessionID}/permission` | `session.permission.create` | | |
|
||||
| [ ] 098 | `GET` | `/api/session/{sessionID}/permission` | `session.permission.list` | | |
|
||||
| [ ] 099 | `GET` | `/api/session/{sessionID}/permission/{requestID}` | `session.permission.get` | | |
|
||||
| [ ] 100 | `POST` | `/api/session/{sessionID}/permission/{requestID}/reply` | `session.permission.reply` | | |
|
||||
| [ ] 101 | `PUT` | `/api/session/{sessionID}/permission/rules` | `session.permission.rules` | | |
|
||||
|
||||
## Group 8: Filesystem, worktrees, and VCS
|
||||
|
||||
@@ -203,18 +203,18 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 102 | `GET` | `/api/fs/read/*` | `v2.fs.read` | | |
|
||||
| [ ] 103 | `GET` | `/api/fs/list` | `v2.fs.list` | | |
|
||||
| [ ] 104 | `GET` | `/api/fs/find` | `v2.fs.find` | | |
|
||||
| [ ] 105 | `GET` | `/api/worktree` | `v2.worktree.list` | | |
|
||||
| [ ] 106 | `POST` | `/api/worktree` | `v2.worktree.create` | | |
|
||||
| [ ] 107 | `DELETE` | `/api/worktree` | `v2.worktree.remove` | | |
|
||||
| [ ] 108 | `POST` | `/api/worktree/refresh` | `v2.worktree.refresh` | | |
|
||||
| [ ] 109 | `GET` | `/api/vcs` | `v2.vcs.get` | | |
|
||||
| [ ] 110 | `GET` | `/api/vcs/base` | `v2.vcs.base` | | |
|
||||
| [ ] 111 | `GET` | `/api/vcs/status` | `v2.vcs.status` | | |
|
||||
| [ ] 112 | `GET` | `/api/vcs/branches` | `v2.vcs.branches` | | |
|
||||
| [ ] 113 | `GET` | `/api/vcs/diff` | `v2.vcs.diff` | | |
|
||||
| [ ] 102 | `GET` | `/api/fs/read/*` | `fs.read` | | |
|
||||
| [ ] 103 | `GET` | `/api/fs/list` | `fs.list` | | |
|
||||
| [ ] 104 | `GET` | `/api/fs/find` | `fs.find` | | |
|
||||
| [ ] 105 | `GET` | `/api/worktree` | `worktree.list` | | |
|
||||
| [ ] 106 | `POST` | `/api/worktree` | `worktree.create` | | |
|
||||
| [ ] 107 | `DELETE` | `/api/worktree` | `worktree.remove` | | |
|
||||
| [ ] 108 | `POST` | `/api/worktree/refresh` | `worktree.refresh` | | |
|
||||
| [ ] 109 | `GET` | `/api/vcs` | `vcs.get` | | |
|
||||
| [ ] 110 | `GET` | `/api/vcs/base` | `vcs.base` | | |
|
||||
| [ ] 111 | `GET` | `/api/vcs/status` | `vcs.status` | | |
|
||||
| [ ] 112 | `GET` | `/api/vcs/branches` | `vcs.branches` | | |
|
||||
| [ ] 113 | `GET` | `/api/vcs/diff` | `vcs.diff` | | |
|
||||
|
||||
## Group 9: PTYs, persistent terminals, and shells
|
||||
|
||||
@@ -222,13 +222,13 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 114 | `GET` | `/api/pty` | `v2.pty.list` | | |
|
||||
| [ ] 115 | `POST` | `/api/pty` | `v2.pty.create` | | |
|
||||
| [ ] 116 | `GET` | `/api/pty/{ptyID}` | `v2.pty.get` | | |
|
||||
| [ ] 117 | `PUT` | `/api/pty/{ptyID}` | `v2.pty.update` | | |
|
||||
| [ ] 118 | `DELETE` | `/api/pty/{ptyID}` | `v2.pty.remove` | | |
|
||||
| [ ] 119 | `POST` | `/api/pty/{ptyID}/connect-token` | `v2.pty.connect.token` | | |
|
||||
| [ ] 120 | `GET` | `/api/pty/{ptyID}/connect` | `v2.pty.connect` | | |
|
||||
| [ ] 114 | `GET` | `/api/pty` | `pty.list` | | |
|
||||
| [ ] 115 | `POST` | `/api/pty` | `pty.create` | | |
|
||||
| [ ] 116 | `GET` | `/api/pty/{ptyID}` | `pty.get` | | |
|
||||
| [ ] 117 | `PUT` | `/api/pty/{ptyID}` | `pty.update` | | |
|
||||
| [ ] 118 | `DELETE` | `/api/pty/{ptyID}` | `pty.remove` | | |
|
||||
| [ ] 119 | `POST` | `/api/pty/{ptyID}/connect-token` | `pty.connect.token` | | |
|
||||
| [ ] 120 | `GET` | `/api/pty/{ptyID}/connect` | `pty.connect` | | |
|
||||
| [ ] 121 | `GET` | `/api/experimental/session/{sessionID}/terminal/read` | `server.experimental.persistentPty.read` | | |
|
||||
| [ ] 122 | `GET` | `/api/experimental/session/{sessionID}/terminal` | `server.experimental.persistentPty.list` | | |
|
||||
| [ ] 123 | `POST` | `/api/experimental/session/{sessionID}/terminal` | `server.experimental.persistentPty.create` | | |
|
||||
@@ -239,13 +239,13 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
| [ ] 128 | `DELETE` | `/api/experimental/persistent-pty/{ptyID}` | `server.experimental.persistentPty.remove` | | |
|
||||
| [ ] 129 | `GET` | `/api/experimental/persistent-pty/{ptyID}/snapshot` | `server.experimental.persistentPty.snapshot` | | |
|
||||
| [ ] 130 | `POST` | `/api/experimental/persistent-pty/{ptyID}/connect-token` | `server.experimental.persistentPty.connectToken` | | |
|
||||
| [ ] 131 | `GET` | `/api/experimental/persistent-pty/{ptyID}/connect` | `v2.persistentPty.connect` | | |
|
||||
| [ ] 132 | `GET` | `/api/shell` | `v2.shell.list` | | |
|
||||
| [ ] 133 | `POST` | `/api/shell` | `v2.shell.create` | | |
|
||||
| [ ] 134 | `GET` | `/api/shell/{id}` | `v2.shell.get` | | |
|
||||
| [ ] 135 | `DELETE` | `/api/shell/{id}` | `v2.shell.remove` | | |
|
||||
| [ ] 136 | `PATCH` | `/api/shell/{id}/timeout` | `v2.shell.timeout` | | |
|
||||
| [ ] 137 | `GET` | `/api/shell/{id}/output` | `v2.shell.output` | | |
|
||||
| [ ] 131 | `GET` | `/api/experimental/persistent-pty/{ptyID}/connect` | `persistentPty.connect` | | |
|
||||
| [ ] 132 | `GET` | `/api/shell` | `shell.list` | | |
|
||||
| [ ] 133 | `POST` | `/api/shell` | `shell.create` | | |
|
||||
| [ ] 134 | `GET` | `/api/shell/{id}` | `shell.get` | | |
|
||||
| [ ] 135 | `DELETE` | `/api/shell/{id}` | `shell.remove` | | |
|
||||
| [ ] 136 | `PATCH` | `/api/shell/{id}/timeout` | `shell.timeout` | | |
|
||||
| [ ] 137 | `GET` | `/api/shell/{id}/output` | `shell.output` | | |
|
||||
|
||||
## Group 10: Events, RPC, and experimental operations
|
||||
|
||||
@@ -253,9 +253,9 @@ Review endpoints in document order. For each endpoint, select one disposition an
|
||||
|
||||
| Done | Method | Path | Operation ID | Decision | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| [ ] 138 | `POST` | `/api/generate` | `v2.generate.text` | | |
|
||||
| [ ] 139 | `POST` | `/api/rpc/{rpcID}/{method}` | `v2.rpc.call` | | |
|
||||
| [ ] 140 | `GET` | `/api/event` | `v2.event.subscribe` | | |
|
||||
| [ ] 141 | `GET` | `/api/debug/location` | `v2.debug.location.list` | | |
|
||||
| [ ] 142 | `DELETE` | `/api/debug/location` | `v2.debug.location.evict` | | |
|
||||
| [ ] 143 | `GET` | `/api/experimental/migration/v1` | `v2.experimental.migration.v1.status` | | |
|
||||
| [ ] 138 | `POST` | `/api/generate` | `generate.text` | | |
|
||||
| [ ] 139 | `POST` | `/api/rpc/{rpcID}/{method}` | `rpc.call` | | |
|
||||
| [ ] 140 | `GET` | `/api/event` | `event.subscribe` | | |
|
||||
| [ ] 141 | `GET` | `/api/debug/location` | `debug.location.list` | | |
|
||||
| [ ] 142 | `DELETE` | `/api/debug/location` | `debug.location.evict` | | |
|
||||
| [ ] 143 | `GET` | `/api/experimental/migration/v1` | `experimental.migration.v1.status` | | |
|
||||
|
||||
@@ -8,11 +8,11 @@ describe("api request resolution", () => {
|
||||
{
|
||||
paths: {
|
||||
"/api/session/{sessionID}": {
|
||||
get: { operationId: "v2.session.get" },
|
||||
get: { operationId: "session.get" },
|
||||
},
|
||||
},
|
||||
},
|
||||
"v2.session.get",
|
||||
"session.get",
|
||||
{ sessionID: "ses/a", workspace: "work" },
|
||||
),
|
||||
).toEqual({ method: "GET", path: "/api/session/ses%2Fa?workspace=work" })
|
||||
@@ -21,8 +21,8 @@ describe("api request resolution", () => {
|
||||
test("rejects a missing path parameter", () => {
|
||||
expect(() =>
|
||||
resolveOperation(
|
||||
{ paths: { "/api/session/{sessionID}": { get: { operationId: "v2.session.get" } } } },
|
||||
"v2.session.get",
|
||||
{ paths: { "/api/session/{sessionID}": { get: { operationId: "session.get" } } } },
|
||||
"session.get",
|
||||
{},
|
||||
),
|
||||
).toThrow("Missing path parameter: sessionID")
|
||||
@@ -30,6 +30,6 @@ describe("api request resolution", () => {
|
||||
|
||||
test("resolves curl-like method and path input", () => {
|
||||
expect(rawRequest(["post", "/api/foo"])).toEqual({ method: "POST", path: "/api/foo" })
|
||||
expect(rawRequest(["v2.session.list"])).toBeUndefined()
|
||||
expect(rawRequest(["session.list"])).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
+97
-97
@@ -9,7 +9,7 @@
|
||||
"/api/health": {
|
||||
"get": {
|
||||
"tags": ["health"],
|
||||
"operationId": "v2.health.get",
|
||||
"operationId": "health.get",
|
||||
"parameters": [],
|
||||
"security": [],
|
||||
"responses": {
|
||||
@@ -70,7 +70,7 @@
|
||||
"/api/server": {
|
||||
"get": {
|
||||
"tags": ["server"],
|
||||
"operationId": "v2.server.get",
|
||||
"operationId": "server.get",
|
||||
"parameters": [],
|
||||
"security": [],
|
||||
"responses": {
|
||||
@@ -122,7 +122,7 @@
|
||||
"/api/location": {
|
||||
"get": {
|
||||
"tags": ["location"],
|
||||
"operationId": "v2.location.get",
|
||||
"operationId": "location.get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -205,7 +205,7 @@
|
||||
"/api/agent": {
|
||||
"get": {
|
||||
"tags": ["agent"],
|
||||
"operationId": "v2.agent.list",
|
||||
"operationId": "agent.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -301,7 +301,7 @@
|
||||
"/api/plugin": {
|
||||
"get": {
|
||||
"tags": ["plugin"],
|
||||
"operationId": "v2.plugin.list",
|
||||
"operationId": "plugin.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -397,7 +397,7 @@
|
||||
"/api/session": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.list",
|
||||
"operationId": "session.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "workspace",
|
||||
@@ -606,7 +606,7 @@
|
||||
},
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.create",
|
||||
"operationId": "session.create",
|
||||
"parameters": [],
|
||||
"security": [],
|
||||
"responses": {
|
||||
@@ -713,7 +713,7 @@
|
||||
"/api/session/active": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.active",
|
||||
"operationId": "session.active",
|
||||
"parameters": [],
|
||||
"security": [],
|
||||
"responses": {
|
||||
@@ -767,7 +767,7 @@
|
||||
"/api/session/{sessionID}": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.get",
|
||||
"operationId": "session.get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -845,7 +845,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.remove",
|
||||
"operationId": "session.remove",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -911,7 +911,7 @@
|
||||
"/api/session/{sessionID}/fork": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.fork",
|
||||
"operationId": "session.fork",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1022,7 +1022,7 @@
|
||||
"/api/session/{sessionID}/agent": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.switchAgent",
|
||||
"operationId": "session.switchAgent",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1105,7 +1105,7 @@
|
||||
"/api/session/{sessionID}/model": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.switchModel",
|
||||
"operationId": "session.switchModel",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1188,7 +1188,7 @@
|
||||
"/api/session/{sessionID}/rename": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.rename",
|
||||
"operationId": "session.rename",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1271,7 +1271,7 @@
|
||||
"/api/session/{sessionID}/move": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.move",
|
||||
"operationId": "session.move",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1378,7 +1378,7 @@
|
||||
"/api/session/{sessionID}/prompt": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.prompt",
|
||||
"operationId": "session.prompt",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1528,7 +1528,7 @@
|
||||
"/api/session/{sessionID}/command": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.command",
|
||||
"operationId": "session.command",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1733,7 +1733,7 @@
|
||||
"/api/session/{sessionID}/skill": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.skill",
|
||||
"operationId": "session.skill",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1844,7 +1844,7 @@
|
||||
"/api/session/{sessionID}/synthetic": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.synthetic",
|
||||
"operationId": "session.synthetic",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -1950,7 +1950,7 @@
|
||||
"/api/session/{sessionID}/shell": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.shell",
|
||||
"operationId": "session.shell",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2048,7 +2048,7 @@
|
||||
"/api/session/{sessionID}/compact": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.compact",
|
||||
"operationId": "session.compact",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2166,7 +2166,7 @@
|
||||
"/api/session/{sessionID}/wait": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.wait",
|
||||
"operationId": "session.wait",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2242,7 +2242,7 @@
|
||||
"/api/session/{sessionID}/revert/stage": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.revert.stage",
|
||||
"operationId": "session.revert.stage",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2377,7 +2377,7 @@
|
||||
"/api/session/{sessionID}/revert/clear": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.revert.clear",
|
||||
"operationId": "session.revert.clear",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2462,7 +2462,7 @@
|
||||
"/api/session/{sessionID}/revert/commit": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.revert.commit",
|
||||
"operationId": "session.revert.commit",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2537,7 +2537,7 @@
|
||||
"/api/session/{sessionID}/context": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.context",
|
||||
"operationId": "session.context",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2630,7 +2630,7 @@
|
||||
"/api/session/{sessionID}/instructions/entries": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.instructions.entry.list",
|
||||
"operationId": "session.instructions.entry.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2713,7 +2713,7 @@
|
||||
"/api/session/{sessionID}/instructions/entries/{key}": {
|
||||
"put": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.instructions.entry.put",
|
||||
"operationId": "session.instructions.entry.put",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2800,7 +2800,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.instructions.entry.remove",
|
||||
"operationId": "session.instructions.entry.remove",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -2874,7 +2874,7 @@
|
||||
"/api/experimental/session/{sessionID}/log": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.log",
|
||||
"operationId": "session.log",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -3059,7 +3059,7 @@
|
||||
"/api/session/{sessionID}/interrupt": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.interrupt",
|
||||
"operationId": "session.interrupt",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -3125,7 +3125,7 @@
|
||||
"/api/session/{sessionID}/background": {
|
||||
"post": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.background",
|
||||
"operationId": "session.background",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -3191,7 +3191,7 @@
|
||||
"/api/session/{sessionID}/message/{messageID}": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.session.message",
|
||||
"operationId": "session.message",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -3287,7 +3287,7 @@
|
||||
"/api/session/{sessionID}/message": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "v2.message.list",
|
||||
"operationId": "message.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -3426,7 +3426,7 @@
|
||||
"/api/model": {
|
||||
"get": {
|
||||
"tags": ["model"],
|
||||
"operationId": "v2.model.list",
|
||||
"operationId": "model.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -3532,7 +3532,7 @@
|
||||
"/api/model/default": {
|
||||
"get": {
|
||||
"tags": ["model"],
|
||||
"operationId": "v2.model.default",
|
||||
"operationId": "model.default",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -3642,7 +3642,7 @@
|
||||
"/api/generate": {
|
||||
"post": {
|
||||
"tags": ["generate"],
|
||||
"operationId": "v2.generate.text",
|
||||
"operationId": "generate.text",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -3769,7 +3769,7 @@
|
||||
"/api/provider": {
|
||||
"get": {
|
||||
"tags": ["provider"],
|
||||
"operationId": "v2.provider.list",
|
||||
"operationId": "provider.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -3875,7 +3875,7 @@
|
||||
"/api/provider/{providerID}": {
|
||||
"get": {
|
||||
"tags": ["provider"],
|
||||
"operationId": "v2.provider.get",
|
||||
"operationId": "provider.get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "providerID",
|
||||
@@ -3996,7 +3996,7 @@
|
||||
"/api/integration": {
|
||||
"get": {
|
||||
"tags": ["integration"],
|
||||
"operationId": "v2.integration.list",
|
||||
"operationId": "integration.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -4092,7 +4092,7 @@
|
||||
"/api/integration/{integrationID}": {
|
||||
"get": {
|
||||
"tags": ["integration"],
|
||||
"operationId": "v2.integration.get",
|
||||
"operationId": "integration.get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "integrationID",
|
||||
@@ -4200,7 +4200,7 @@
|
||||
"/api/integration/{integrationID}/connect/key": {
|
||||
"post": {
|
||||
"tags": ["integration"],
|
||||
"operationId": "v2.integration.connect.key",
|
||||
"operationId": "integration.connect.key",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "integrationID",
|
||||
@@ -4318,7 +4318,7 @@
|
||||
"/api/integration/{integrationID}/connect/oauth": {
|
||||
"post": {
|
||||
"tags": ["integration"],
|
||||
"operationId": "v2.integration.connect.oauth",
|
||||
"operationId": "integration.connect.oauth",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "integrationID",
|
||||
@@ -4459,7 +4459,7 @@
|
||||
"/api/integration/attempt/{attemptID}": {
|
||||
"get": {
|
||||
"tags": ["integration"],
|
||||
"operationId": "v2.integration.attempt.status",
|
||||
"operationId": "integration.attempt.status",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "attemptID",
|
||||
@@ -4558,7 +4558,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["integration"],
|
||||
"operationId": "v2.integration.attempt.cancel",
|
||||
"operationId": "integration.attempt.cancel",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "attemptID",
|
||||
@@ -4642,7 +4642,7 @@
|
||||
"/api/integration/attempt/{attemptID}/complete": {
|
||||
"post": {
|
||||
"tags": ["integration"],
|
||||
"operationId": "v2.integration.attempt.complete",
|
||||
"operationId": "integration.attempt.complete",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "attemptID",
|
||||
@@ -4756,7 +4756,7 @@
|
||||
"/api/mcp": {
|
||||
"get": {
|
||||
"tags": ["mcp"],
|
||||
"operationId": "v2.mcp.list",
|
||||
"operationId": "mcp.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -4852,7 +4852,7 @@
|
||||
"/api/mcp/resource": {
|
||||
"get": {
|
||||
"tags": ["mcp"],
|
||||
"operationId": "v2.mcp.resource.catalog",
|
||||
"operationId": "mcp.resource.catalog",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -4945,7 +4945,7 @@
|
||||
"/api/credential/{credentialID}": {
|
||||
"patch": {
|
||||
"tags": ["credential"],
|
||||
"operationId": "v2.credential.update",
|
||||
"operationId": "credential.update",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "credentialID",
|
||||
@@ -5044,7 +5044,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["credential"],
|
||||
"operationId": "v2.credential.remove",
|
||||
"operationId": "credential.remove",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "credentialID",
|
||||
@@ -5128,7 +5128,7 @@
|
||||
"/api/project": {
|
||||
"get": {
|
||||
"tags": ["project"],
|
||||
"operationId": "v2.project.list",
|
||||
"operationId": "project.list",
|
||||
"parameters": [],
|
||||
"security": [],
|
||||
"responses": {
|
||||
@@ -5173,7 +5173,7 @@
|
||||
"/api/project/{projectID}/directories": {
|
||||
"get": {
|
||||
"tags": ["project"],
|
||||
"operationId": "v2.project.directories",
|
||||
"operationId": "project.directories",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "projectID",
|
||||
@@ -5264,7 +5264,7 @@
|
||||
"/api/form/request": {
|
||||
"get": {
|
||||
"tags": ["form"],
|
||||
"operationId": "v2.form.request.list",
|
||||
"operationId": "form.request.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -5367,7 +5367,7 @@
|
||||
"/api/session/{sessionID}/form": {
|
||||
"get": {
|
||||
"tags": ["form"],
|
||||
"operationId": "v2.session.form.list",
|
||||
"operationId": "session.form.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -5450,7 +5450,7 @@
|
||||
},
|
||||
"post": {
|
||||
"tags": ["form"],
|
||||
"operationId": "v2.session.form.create",
|
||||
"operationId": "session.form.create",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -5559,7 +5559,7 @@
|
||||
"/api/session/{sessionID}/form/{formID}": {
|
||||
"get": {
|
||||
"tags": ["form"],
|
||||
"operationId": "v2.session.form.get",
|
||||
"operationId": "session.form.get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -5657,7 +5657,7 @@
|
||||
"/api/session/{sessionID}/form/{formID}/state": {
|
||||
"get": {
|
||||
"tags": ["form"],
|
||||
"operationId": "v2.session.form.state",
|
||||
"operationId": "session.form.state",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -5748,7 +5748,7 @@
|
||||
"/api/session/{sessionID}/form/{formID}/reply": {
|
||||
"post": {
|
||||
"tags": ["form"],
|
||||
"operationId": "v2.session.form.reply",
|
||||
"operationId": "session.form.reply",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -5852,7 +5852,7 @@
|
||||
"/api/session/{sessionID}/form/{formID}/cancel": {
|
||||
"post": {
|
||||
"tags": ["form"],
|
||||
"operationId": "v2.session.form.cancel",
|
||||
"operationId": "session.form.cancel",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -5939,7 +5939,7 @@
|
||||
"/api/permission/request": {
|
||||
"get": {
|
||||
"tags": ["permission"],
|
||||
"operationId": "v2.permission.request.list",
|
||||
"operationId": "permission.request.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -6035,7 +6035,7 @@
|
||||
"/api/permission/saved": {
|
||||
"get": {
|
||||
"tags": ["permission"],
|
||||
"operationId": "v2.permission.saved.list",
|
||||
"operationId": "permission.saved.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "projectID",
|
||||
@@ -6103,7 +6103,7 @@
|
||||
"/api/permission/saved/{id}": {
|
||||
"delete": {
|
||||
"tags": ["permission"],
|
||||
"operationId": "v2.permission.saved.remove",
|
||||
"operationId": "permission.saved.remove",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
@@ -6147,7 +6147,7 @@
|
||||
"/api/session/{sessionID}/permission": {
|
||||
"post": {
|
||||
"tags": ["permission"],
|
||||
"operationId": "v2.session.permission.create",
|
||||
"operationId": "session.permission.create",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -6300,7 +6300,7 @@
|
||||
},
|
||||
"get": {
|
||||
"tags": ["permission"],
|
||||
"operationId": "v2.session.permission.list",
|
||||
"operationId": "session.permission.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -6383,7 +6383,7 @@
|
||||
"/api/session/{sessionID}/permission/{requestID}": {
|
||||
"get": {
|
||||
"tags": ["permission"],
|
||||
"operationId": "v2.session.permission.get",
|
||||
"operationId": "session.permission.get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -6479,7 +6479,7 @@
|
||||
"/api/session/{sessionID}/permission/{requestID}/reply": {
|
||||
"post": {
|
||||
"tags": ["permission"],
|
||||
"operationId": "v2.session.permission.reply",
|
||||
"operationId": "session.permission.reply",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -6588,7 +6588,7 @@
|
||||
"/api/fs/read/*": {
|
||||
"get": {
|
||||
"tags": ["filesystem"],
|
||||
"operationId": "v2.fs.read",
|
||||
"operationId": "fs.read",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -6672,7 +6672,7 @@
|
||||
"/api/fs/list": {
|
||||
"get": {
|
||||
"tags": ["filesystem"],
|
||||
"operationId": "v2.fs.list",
|
||||
"operationId": "fs.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -6783,7 +6783,7 @@
|
||||
"/api/fs/find": {
|
||||
"get": {
|
||||
"tags": ["filesystem"],
|
||||
"operationId": "v2.fs.find",
|
||||
"operationId": "fs.find",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -6911,7 +6911,7 @@
|
||||
"/api/command": {
|
||||
"get": {
|
||||
"tags": ["command"],
|
||||
"operationId": "v2.command.list",
|
||||
"operationId": "command.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -7007,7 +7007,7 @@
|
||||
"/api/skill": {
|
||||
"get": {
|
||||
"tags": ["skill"],
|
||||
"operationId": "v2.skill.list",
|
||||
"operationId": "skill.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -7103,7 +7103,7 @@
|
||||
"/api/event": {
|
||||
"get": {
|
||||
"tags": ["event"],
|
||||
"operationId": "v2.event.subscribe",
|
||||
"operationId": "event.subscribe",
|
||||
"parameters": [],
|
||||
"security": [],
|
||||
"responses": {
|
||||
@@ -7226,7 +7226,7 @@
|
||||
"/api/pty": {
|
||||
"get": {
|
||||
"tags": ["pty"],
|
||||
"operationId": "v2.pty.list",
|
||||
"operationId": "pty.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -7320,7 +7320,7 @@
|
||||
},
|
||||
"post": {
|
||||
"tags": ["pty"],
|
||||
"operationId": "v2.pty.create",
|
||||
"operationId": "pty.create",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -7447,7 +7447,7 @@
|
||||
"/api/pty/{ptyID}": {
|
||||
"get": {
|
||||
"tags": ["pty"],
|
||||
"operationId": "v2.pty.get",
|
||||
"operationId": "pty.get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "ptyID",
|
||||
@@ -7561,7 +7561,7 @@
|
||||
},
|
||||
"put": {
|
||||
"tags": ["pty"],
|
||||
"operationId": "v2.pty.update",
|
||||
"operationId": "pty.update",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "ptyID",
|
||||
@@ -7714,7 +7714,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["pty"],
|
||||
"operationId": "v2.pty.remove",
|
||||
"operationId": "pty.remove",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "ptyID",
|
||||
@@ -7813,7 +7813,7 @@
|
||||
"/api/pty/{ptyID}/connect-token": {
|
||||
"post": {
|
||||
"tags": ["pty"],
|
||||
"operationId": "v2.pty.connect.token",
|
||||
"operationId": "pty.connect.token",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "ptyID",
|
||||
@@ -7939,7 +7939,7 @@
|
||||
"/api/pty/{ptyID}/connect": {
|
||||
"get": {
|
||||
"tags": ["pty"],
|
||||
"operationId": "v2.pty.connect",
|
||||
"operationId": "pty.connect",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "ptyID",
|
||||
@@ -8044,7 +8044,7 @@
|
||||
"/api/shell": {
|
||||
"get": {
|
||||
"tags": ["shell"],
|
||||
"operationId": "v2.shell.list",
|
||||
"operationId": "shell.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -8138,7 +8138,7 @@
|
||||
},
|
||||
"post": {
|
||||
"tags": ["shell"],
|
||||
"operationId": "v2.shell.create",
|
||||
"operationId": "shell.create",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -8262,7 +8262,7 @@
|
||||
"/api/shell/{id}": {
|
||||
"get": {
|
||||
"tags": ["shell"],
|
||||
"operationId": "v2.shell.get",
|
||||
"operationId": "shell.get",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
@@ -8376,7 +8376,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["shell"],
|
||||
"operationId": "v2.shell.remove",
|
||||
"operationId": "shell.remove",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
@@ -8475,7 +8475,7 @@
|
||||
"/api/shell/{id}/timeout": {
|
||||
"patch": {
|
||||
"tags": ["shell"],
|
||||
"operationId": "v2.shell.timeout",
|
||||
"operationId": "shell.timeout",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
@@ -8613,7 +8613,7 @@
|
||||
"/api/shell/{id}/output": {
|
||||
"get": {
|
||||
"tags": ["shell"],
|
||||
"operationId": "v2.shell.output",
|
||||
"operationId": "shell.output",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
@@ -8781,7 +8781,7 @@
|
||||
"/api/question/request": {
|
||||
"get": {
|
||||
"tags": ["question"],
|
||||
"operationId": "v2.question.request.list",
|
||||
"operationId": "question.request.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -8877,7 +8877,7 @@
|
||||
"/api/session/{sessionID}/question": {
|
||||
"get": {
|
||||
"tags": ["question"],
|
||||
"operationId": "v2.session.question.list",
|
||||
"operationId": "session.question.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -8960,7 +8960,7 @@
|
||||
"/api/session/{sessionID}/question/{requestID}/reply": {
|
||||
"post": {
|
||||
"tags": ["question"],
|
||||
"operationId": "v2.session.question.reply",
|
||||
"operationId": "session.question.reply",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -9052,7 +9052,7 @@
|
||||
"/api/session/{sessionID}/question/{requestID}/reject": {
|
||||
"post": {
|
||||
"tags": ["question"],
|
||||
"operationId": "v2.session.question.reject",
|
||||
"operationId": "session.question.reject",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
@@ -9134,7 +9134,7 @@
|
||||
"/api/reference": {
|
||||
"get": {
|
||||
"tags": ["reference"],
|
||||
"operationId": "v2.reference.list",
|
||||
"operationId": "reference.list",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -9230,7 +9230,7 @@
|
||||
"/api/experimental/project/{projectID}/copy": {
|
||||
"post": {
|
||||
"tags": ["projectCopy"],
|
||||
"operationId": "v2.projectCopy.create",
|
||||
"operationId": "projectCopy.create",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "projectID",
|
||||
@@ -9347,7 +9347,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["projectCopy"],
|
||||
"operationId": "v2.projectCopy.remove",
|
||||
"operationId": "projectCopy.remove",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "projectID",
|
||||
@@ -9456,7 +9456,7 @@
|
||||
"/api/experimental/project/{projectID}/copy/refresh": {
|
||||
"post": {
|
||||
"tags": ["projectCopy"],
|
||||
"operationId": "v2.projectCopy.refresh",
|
||||
"operationId": "projectCopy.refresh",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "projectID",
|
||||
@@ -9545,7 +9545,7 @@
|
||||
"/api/vcs/status": {
|
||||
"get": {
|
||||
"tags": ["vcs"],
|
||||
"operationId": "v2.vcs.status",
|
||||
"operationId": "vcs.status",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -9641,7 +9641,7 @@
|
||||
"/api/vcs/diff": {
|
||||
"get": {
|
||||
"tags": ["vcs"],
|
||||
"operationId": "v2.vcs.diff",
|
||||
"operationId": "vcs.diff",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
@@ -9760,7 +9760,7 @@
|
||||
"/api/debug/location": {
|
||||
"get": {
|
||||
"tags": ["debug"],
|
||||
"operationId": "v2.debug.location.list",
|
||||
"operationId": "debug.location.list",
|
||||
"parameters": [],
|
||||
"security": [],
|
||||
"responses": {
|
||||
@@ -9803,7 +9803,7 @@
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["debug"],
|
||||
"operationId": "v2.debug.location.evict",
|
||||
"operationId": "debug.location.evict",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "location",
|
||||
|
||||
@@ -235,32 +235,32 @@ describe("OpenAPI.fromSpec", () => {
|
||||
path: "/api/fs/read/*",
|
||||
reason: "binary responses are not supported",
|
||||
})
|
||||
expect(toolAt(result.tools, "v2.health.get")).not.toBeUndefined()
|
||||
expect(toolAt(result.tools, "v2.session.get")).not.toBeUndefined()
|
||||
expect(toolAt(result.tools, "v2.session.create")).not.toBeUndefined()
|
||||
expect(toolAt(result.tools, "health.get")).not.toBeUndefined()
|
||||
expect(toolAt(result.tools, "session.get")).not.toBeUndefined()
|
||||
expect(toolAt(result.tools, "session.create")).not.toBeUndefined()
|
||||
|
||||
const sessionGet = toolAt(result.tools, "v2.session.get")
|
||||
const sessionGet = toolAt(result.tools, "session.get")
|
||||
expect(Tool.isTool(sessionGet)).toBe(true)
|
||||
if (!Tool.isTool(sessionGet)) throw new Error("v2.session.get was not generated")
|
||||
if (!Tool.isTool(sessionGet)) throw new Error("session.get was not generated")
|
||||
expect(inputTypeScript(sessionGet)).toBe("{ sessionID: string }")
|
||||
expect(outputTypeScript(sessionGet)).toContain("id: string")
|
||||
expect(outputTypeScript(sessionGet)).toContain("additions: number")
|
||||
|
||||
const switchAgent = toolAt(result.tools, "v2.session.switchAgent")
|
||||
const switchAgent = toolAt(result.tools, "session.switchAgent")
|
||||
expect(Tool.isTool(switchAgent)).toBe(true)
|
||||
if (!Tool.isTool(switchAgent)) throw new Error("v2.session.switchAgent was not generated")
|
||||
if (!Tool.isTool(switchAgent)) throw new Error("session.switchAgent was not generated")
|
||||
expect(inputTypeScript(switchAgent)).toBe("{ sessionID: string; agent: string }")
|
||||
|
||||
const instructionPut = toolAt(result.tools, "v2.session.instructions.entry.put")
|
||||
const instructionPut = toolAt(result.tools, "session.instructions.entry.put")
|
||||
expect(Tool.isTool(instructionPut)).toBe(true)
|
||||
if (!Tool.isTool(instructionPut)) throw new Error("v2.session.instructions.entry.put was not generated")
|
||||
if (!Tool.isTool(instructionPut)) throw new Error("session.instructions.entry.put was not generated")
|
||||
expect(inputTypeScript(instructionPut)).toBe("{ sessionID: string; key: string; value: unknown }")
|
||||
expect(toolAt(result.tools, "v2_session_instructions_entry_put_2")).toBeUndefined()
|
||||
expect(Tool.isTool(toolAt(result.tools, "v2.pty.connect"))).toBe(false)
|
||||
expect(toolAt(result.tools, "v2.session.log")).toBeUndefined()
|
||||
expect(toolAt(result.tools, "v2.event.subscribe")).toBeUndefined()
|
||||
expect(toolAt(result.tools, "v2.fs.read")).toBeUndefined()
|
||||
expect(toolAt(result.tools, "v2.pty.connect.token")).not.toBeUndefined()
|
||||
expect(toolAt(result.tools, "session_instructions_entry_put_2")).toBeUndefined()
|
||||
expect(Tool.isTool(toolAt(result.tools, "pty.connect"))).toBe(false)
|
||||
expect(toolAt(result.tools, "session.log")).toBeUndefined()
|
||||
expect(toolAt(result.tools, "event.subscribe")).toBeUndefined()
|
||||
expect(toolAt(result.tools, "fs.read")).toBeUndefined()
|
||||
expect(toolAt(result.tools, "pty.connect.token")).not.toBeUndefined()
|
||||
})
|
||||
|
||||
test("preserves operation path sanitization and collision handling", () => {
|
||||
@@ -978,7 +978,7 @@ describe("OpenAPI.fromSpec", () => {
|
||||
|
||||
expect(spec.security).toStrictEqual([])
|
||||
expect(isRecord(components.securitySchemes) ? Object.keys(components.securitySchemes) : []).toStrictEqual([])
|
||||
const health = toolAt(result.tools, "v2.health.get")
|
||||
const health = toolAt(result.tools, "health.get")
|
||||
const healthInput = Tool.isTool(health) && isRecord(health.input) ? health.input : undefined
|
||||
expect(healthInput).toMatchObject({ type: "object", properties: {} })
|
||||
const input = isRecord(healthInput) ? healthInput : {}
|
||||
@@ -1005,7 +1005,7 @@ describe("OpenAPI.fromSpec", () => {
|
||||
expect(result.value).toMatchObject({
|
||||
items: [
|
||||
{
|
||||
path: "tools.opencode.v2.health.get",
|
||||
path: "tools.opencode.health.get",
|
||||
description: "Check whether the API server is ready to accept requests.",
|
||||
},
|
||||
],
|
||||
@@ -1026,8 +1026,8 @@ describe("OpenAPI.fromSpec", () => {
|
||||
runtime
|
||||
.execute(
|
||||
`
|
||||
const existing = await tools.opencode.v2.session.get({ sessionID: "ses_123" })
|
||||
const created = await tools.opencode.v2.session.create({ id: "ses_456" })
|
||||
const existing = await tools.opencode.session.get({ sessionID: "ses_123" })
|
||||
const created = await tools.opencode.session.create({ id: "ses_456" })
|
||||
return { existing, created }
|
||||
`,
|
||||
)
|
||||
@@ -1047,8 +1047,8 @@ describe("OpenAPI.fromSpec", () => {
|
||||
|
||||
test("serializes deep-object query parameters from the opencode fixture", async () => {
|
||||
const client = recordingClient(() => json({ directory: "/tmp" }))
|
||||
const location = toolAt(OpenAPI.fromSpec({ spec: await opencodeSpec(), baseUrl }).tools, "v2.location.get")
|
||||
if (!Tool.isTool(location)) throw new Error("v2.location.get was not generated")
|
||||
const location = toolAt(OpenAPI.fromSpec({ spec: await opencodeSpec(), baseUrl }).tools, "location.get")
|
||||
if (!Tool.isTool(location)) throw new Error("location.get was not generated")
|
||||
|
||||
await Effect.runPromise(
|
||||
location
|
||||
@@ -1470,7 +1470,7 @@ describe("OpenAPI.fromSpec", () => {
|
||||
})
|
||||
|
||||
const result = await Effect.runPromise(
|
||||
runtime.execute("return await tools.opencode.v2.session.get({})").pipe(Effect.provide(layer)),
|
||||
runtime.execute("return await tools.opencode.session.get({})").pipe(Effect.provide(layer)),
|
||||
)
|
||||
|
||||
expect(result).toMatchObject({ ok: false })
|
||||
|
||||
+133
-133
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ export const AgentGroup = HttpApiGroup.make("server.agent")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.agent.list",
|
||||
identifier: "agent.list",
|
||||
summary: "List agents",
|
||||
description: "Retrieve currently registered agents.",
|
||||
}),
|
||||
@@ -30,7 +30,7 @@ export const AgentGroup = HttpApiGroup.make("server.agent")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.agent.get",
|
||||
identifier: "agent.get",
|
||||
summary: "Get agent",
|
||||
description: "Retrieve a single currently registered agent.",
|
||||
}),
|
||||
|
||||
@@ -13,7 +13,7 @@ export const CommandGroup = HttpApiGroup.make("server.command")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.command.list",
|
||||
identifier: "command.list",
|
||||
summary: "List commands",
|
||||
description: "Retrieve currently registered commands.",
|
||||
}),
|
||||
|
||||
@@ -13,7 +13,7 @@ export const ConfigGroup = HttpApiGroup.make("server.config")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.config.get",
|
||||
identifier: "config.get",
|
||||
summary: "Get configuration",
|
||||
description:
|
||||
"Return configuration documents and discovery sources for the requested location, from lowest to highest priority.",
|
||||
@@ -25,7 +25,7 @@ export const ConfigGroup = HttpApiGroup.make("server.config")
|
||||
success: Config.Preferences,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.config.preferences",
|
||||
identifier: "config.preferences",
|
||||
summary: "Get global preferences",
|
||||
description: "Return preferences from the highest-precedence global configuration document.",
|
||||
}),
|
||||
@@ -37,7 +37,7 @@ export const ConfigGroup = HttpApiGroup.make("server.config")
|
||||
success: Config.Preferences,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.config.updatePreferences",
|
||||
identifier: "config.updatePreferences",
|
||||
summary: "Update global preferences",
|
||||
description: "Patch preferences in the highest-precedence global configuration document.",
|
||||
}),
|
||||
@@ -48,7 +48,7 @@ export const ConfigGroup = HttpApiGroup.make("server.config")
|
||||
success: Schema.Array(ConfigShell.Option),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.config.shells",
|
||||
identifier: "config.shells",
|
||||
summary: "List available shells",
|
||||
description: "Return shells available to terminal and agent execution.",
|
||||
}),
|
||||
|
||||
@@ -14,7 +14,7 @@ export const CredentialGroup = HttpApiGroup.make("server.credential")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.credential.update",
|
||||
identifier: "credential.update",
|
||||
summary: "Update credential",
|
||||
description: "Update a stored credential label.",
|
||||
}),
|
||||
@@ -30,7 +30,7 @@ export const CredentialGroup = HttpApiGroup.make("server.credential")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.credential.activate",
|
||||
identifier: "credential.activate",
|
||||
summary: "Activate credential",
|
||||
description: "Activate a stored integration credential.",
|
||||
}),
|
||||
@@ -45,7 +45,7 @@ export const CredentialGroup = HttpApiGroup.make("server.credential")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.credential.remove",
|
||||
identifier: "credential.remove",
|
||||
summary: "Remove credential",
|
||||
description: "Remove a stored integration credential.",
|
||||
}),
|
||||
|
||||
@@ -9,7 +9,7 @@ export const DebugGroup = HttpApiGroup.make("server.debug")
|
||||
success: Schema.Array(Location.Ref),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.debug.location.list",
|
||||
identifier: "debug.location.list",
|
||||
summary: "List loaded locations",
|
||||
description: "List locations currently loaded by the server.",
|
||||
}),
|
||||
@@ -23,7 +23,7 @@ export const DebugGroup = HttpApiGroup.make("server.debug")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.debug.location.evict",
|
||||
identifier: "debug.location.evict",
|
||||
summary: "Evict a loaded location",
|
||||
description: "Dispose the requested location's cached services so its next use boots them fresh.",
|
||||
}),
|
||||
|
||||
@@ -45,7 +45,7 @@ const make = <const Definitions extends ReadonlyArray<Definition>>(definitions:
|
||||
success: HttpApiSchema.StreamSse({ data: EventSchema }),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.event.subscribe",
|
||||
identifier: "event.subscribe",
|
||||
summary: "Subscribe to events",
|
||||
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,7 +43,7 @@ export const makeFormGroup = <
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.form.request.list",
|
||||
identifier: "form.request.list",
|
||||
summary: "List pending form requests",
|
||||
description: "Retrieve pending forms for a location.",
|
||||
}),
|
||||
@@ -57,7 +57,7 @@ export const makeFormGroup = <
|
||||
error: SessionNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.form.list",
|
||||
identifier: "session.form.list",
|
||||
summary: "List session forms",
|
||||
description: "Retrieve pending forms for a session.",
|
||||
}),
|
||||
@@ -73,7 +73,7 @@ export const makeFormGroup = <
|
||||
.middleware(formLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.form.create",
|
||||
identifier: "session.form.create",
|
||||
summary: "Create session form",
|
||||
description: "Create a form for a session.",
|
||||
}),
|
||||
@@ -88,7 +88,7 @@ export const makeFormGroup = <
|
||||
.middleware(formLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.form.get",
|
||||
identifier: "session.form.get",
|
||||
summary: "Get session form",
|
||||
description: "Retrieve a form for a session.",
|
||||
}),
|
||||
@@ -103,7 +103,7 @@ export const makeFormGroup = <
|
||||
.middleware(formLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.form.state",
|
||||
identifier: "session.form.state",
|
||||
summary: "Get form state",
|
||||
description: "Retrieve the current state for a form.",
|
||||
}),
|
||||
@@ -119,7 +119,7 @@ export const makeFormGroup = <
|
||||
.middleware(formLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.form.reply",
|
||||
identifier: "session.form.reply",
|
||||
summary: "Reply to form",
|
||||
description: "Submit an answer to a pending form.",
|
||||
}),
|
||||
@@ -134,7 +134,7 @@ export const makeFormGroup = <
|
||||
.middleware(formLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.form.cancel",
|
||||
identifier: "session.form.cancel",
|
||||
summary: "Cancel form",
|
||||
description: "Cancel a pending form.",
|
||||
}),
|
||||
|
||||
@@ -30,7 +30,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.fs.read",
|
||||
identifier: "fs.read",
|
||||
summary: "Read file",
|
||||
description: "Serve one file relative to the requested location.",
|
||||
}),
|
||||
@@ -44,7 +44,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.fs.list",
|
||||
identifier: "fs.list",
|
||||
summary: "List directory",
|
||||
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.",
|
||||
@@ -59,7 +59,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.fs.find",
|
||||
identifier: "fs.find",
|
||||
summary: "Find files",
|
||||
description: "Find recursively ranked filesystem entries relative to the requested location.",
|
||||
}),
|
||||
|
||||
@@ -16,7 +16,7 @@ export const GenerateGroup = HttpApiGroup.make("server.generate")
|
||||
error: [InvalidRequestError, ServiceUnavailableError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.generate.text",
|
||||
identifier: "generate.text",
|
||||
summary: "Generate text",
|
||||
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.",
|
||||
|
||||
@@ -17,7 +17,7 @@ export const HealthGroup = HttpApiGroup.make("server.health")
|
||||
success: ServiceStatus.Health,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.health.get",
|
||||
identifier: "health.get",
|
||||
summary: "Check server health",
|
||||
description: "Report the owning server process and its application status.",
|
||||
}),
|
||||
|
||||
@@ -15,7 +15,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.list",
|
||||
identifier: "integration.list",
|
||||
summary: "List integrations",
|
||||
description: "Retrieve available integrations and their authentication methods.",
|
||||
}),
|
||||
@@ -30,7 +30,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.get",
|
||||
identifier: "integration.get",
|
||||
summary: "Get integration",
|
||||
description: "Retrieve one integration and its authentication methods.",
|
||||
}),
|
||||
@@ -46,7 +46,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.experimental.integration.wellknown.add",
|
||||
identifier: "experimental.integration.wellknown.add",
|
||||
summary: "Add wellknown integration",
|
||||
description: "Discover and persist an experimental wellknown integration source.",
|
||||
}),
|
||||
@@ -67,7 +67,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.connect.key",
|
||||
identifier: "integration.connect.key",
|
||||
summary: "Connect with key",
|
||||
description: "Run a key authentication method and store the resulting credential.",
|
||||
}),
|
||||
@@ -88,7 +88,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.oauth.connect",
|
||||
identifier: "integration.oauth.connect",
|
||||
summary: "Begin OAuth connection",
|
||||
description: "Start an OAuth attempt and return the authorization details.",
|
||||
}),
|
||||
@@ -103,7 +103,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.oauth.status",
|
||||
identifier: "integration.oauth.status",
|
||||
summary: "Get OAuth attempt status",
|
||||
description: "Poll the current status of an OAuth attempt.",
|
||||
}),
|
||||
@@ -124,7 +124,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.oauth.complete",
|
||||
identifier: "integration.oauth.complete",
|
||||
summary: "Complete OAuth connection",
|
||||
description: "Complete a code-based OAuth attempt and store the resulting credential.",
|
||||
}),
|
||||
@@ -139,7 +139,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.oauth.cancel",
|
||||
identifier: "integration.oauth.cancel",
|
||||
summary: "Cancel OAuth connection",
|
||||
description: "Cancel an OAuth attempt and release its resources.",
|
||||
}),
|
||||
@@ -159,7 +159,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.command.connect",
|
||||
identifier: "integration.command.connect",
|
||||
summary: "Begin command connection",
|
||||
description: "Start a command authentication attempt.",
|
||||
}),
|
||||
@@ -174,7 +174,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.command.status",
|
||||
identifier: "integration.command.status",
|
||||
summary: "Get command attempt status",
|
||||
description: "Poll the current status and output of a command authentication attempt.",
|
||||
}),
|
||||
@@ -189,7 +189,7 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.integration.command.cancel",
|
||||
identifier: "integration.command.cancel",
|
||||
summary: "Cancel command connection",
|
||||
description: "Cancel a command authentication attempt and terminate its process.",
|
||||
}),
|
||||
|
||||
@@ -35,7 +35,7 @@ export const LocationGroup = HttpApiGroup.make("server.location")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.location.get",
|
||||
identifier: "location.get",
|
||||
summary: "Get location",
|
||||
description: "Resolve the requested location or the server default location.",
|
||||
}),
|
||||
|
||||
@@ -14,7 +14,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.mcp.list",
|
||||
identifier: "mcp.list",
|
||||
summary: "List MCP servers",
|
||||
description: "Retrieve configured MCP servers and their connection status.",
|
||||
}),
|
||||
@@ -32,7 +32,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.mcp.add",
|
||||
identifier: "mcp.add",
|
||||
summary: "Add MCP server",
|
||||
description: "Add an MCP server at runtime or replace an existing one, connecting it immediately.",
|
||||
}),
|
||||
@@ -48,7 +48,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.mcp.remove",
|
||||
identifier: "mcp.remove",
|
||||
summary: "Remove MCP server",
|
||||
description: "Stop an MCP server and remove it from the runtime set until restart.",
|
||||
}),
|
||||
@@ -64,7 +64,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.mcp.connect",
|
||||
identifier: "mcp.connect",
|
||||
summary: "Connect MCP server",
|
||||
description: "Connect an MCP server at runtime, overriding a disabled configuration until restart.",
|
||||
}),
|
||||
@@ -80,7 +80,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.mcp.disconnect",
|
||||
identifier: "mcp.disconnect",
|
||||
summary: "Disconnect MCP server",
|
||||
description: "Disconnect an MCP server at runtime, removing its tools until reconnected.",
|
||||
}),
|
||||
@@ -94,7 +94,7 @@ export const McpGroup = HttpApiGroup.make("server.mcp")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.mcp.resource.catalog",
|
||||
identifier: "mcp.resource.catalog",
|
||||
summary: "List MCP resources",
|
||||
description: "Retrieve resources and resource templates from connected MCP servers.",
|
||||
}),
|
||||
|
||||
@@ -53,7 +53,7 @@ export const MessageGroup = HttpApiGroup.make("server.message")
|
||||
error: [InvalidCursorError, SessionNotFoundError, UnknownError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.message.list",
|
||||
identifier: "message.list",
|
||||
summary: "Get session messages",
|
||||
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.",
|
||||
|
||||
@@ -19,7 +19,7 @@ export const MigrationGroup = HttpApiGroup.make("server.migration")
|
||||
success: V1MigrationStatus,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.experimental.migration.v1.status",
|
||||
identifier: "experimental.migration.v1.status",
|
||||
summary: "Get V1 migration status",
|
||||
description: "Return the progress of the V1 to V2 session history migration.",
|
||||
}),
|
||||
|
||||
@@ -15,7 +15,7 @@ export const ModelGroup = HttpApiGroup.make("server.model")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.model.list",
|
||||
identifier: "model.list",
|
||||
summary: "List models",
|
||||
description:
|
||||
"Retrieve the current snapshot of available models ordered by release date. The snapshot may precede initial plugin settlement.",
|
||||
@@ -31,7 +31,7 @@ export const ModelGroup = HttpApiGroup.make("server.model")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.model.default",
|
||||
identifier: "model.default",
|
||||
summary: "Get default model",
|
||||
description: "Retrieve the model used when a session has no explicit model selection.",
|
||||
}),
|
||||
|
||||
@@ -27,7 +27,7 @@ export const makePermissionGroup = <
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.permission.request.list",
|
||||
identifier: "permission.request.list",
|
||||
summary: "List pending permission requests",
|
||||
description: "Retrieve pending permission requests for a location.",
|
||||
}),
|
||||
@@ -39,7 +39,7 @@ export const makePermissionGroup = <
|
||||
success: Schema.Struct({ data: Schema.Array(PermissionSaved.Info) }),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.permission.saved.list",
|
||||
identifier: "permission.saved.list",
|
||||
summary: "List saved permissions",
|
||||
description: "Retrieve saved permissions, optionally filtered by project.",
|
||||
}),
|
||||
@@ -51,7 +51,7 @@ export const makePermissionGroup = <
|
||||
success: HttpApiSchema.NoContent,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.permission.saved.remove",
|
||||
identifier: "permission.saved.remove",
|
||||
summary: "Remove saved permission",
|
||||
description: "Remove a saved permission by ID.",
|
||||
}),
|
||||
@@ -79,7 +79,7 @@ export const makePermissionGroup = <
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.permission.create",
|
||||
identifier: "session.permission.create",
|
||||
summary: "Create permission request",
|
||||
description: "Evaluate and, when approval is required, create a permission request for a session.",
|
||||
}),
|
||||
@@ -92,7 +92,7 @@ export const makePermissionGroup = <
|
||||
error: SessionNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.permission.list",
|
||||
identifier: "session.permission.list",
|
||||
summary: "List session permission requests",
|
||||
description: "Retrieve pending permission requests owned by a session.",
|
||||
}),
|
||||
@@ -107,7 +107,7 @@ export const makePermissionGroup = <
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.permission.get",
|
||||
identifier: "session.permission.get",
|
||||
summary: "Get permission request",
|
||||
description: "Retrieve a pending permission request owned by a session.",
|
||||
}),
|
||||
@@ -126,7 +126,7 @@ export const makePermissionGroup = <
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.permission.reply",
|
||||
identifier: "session.permission.reply",
|
||||
summary: "Reply to pending permission request",
|
||||
description: "Respond to a pending permission request owned by a session.",
|
||||
}),
|
||||
@@ -142,7 +142,7 @@ export const makePermissionGroup = <
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.permission.rules",
|
||||
identifier: "session.permission.rules",
|
||||
summary: "Replace session permission rules",
|
||||
description:
|
||||
"Replace the session-scoped permission rules. Rules are evaluated after the agent's rules, and the last matching rule wins.",
|
||||
|
||||
@@ -106,7 +106,7 @@ export const PersistentPtyGroup = HttpApiGroup.make("server.experimental")
|
||||
error: [ForbiddenError, PtyNotFoundError, ServiceUnavailableError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.persistentPty.connect",
|
||||
identifier: "persistentPty.connect",
|
||||
summary: "Connect to a persistent PTY",
|
||||
description: "Stream persistent PTY output through the OpenCode server.",
|
||||
transform: (operation) => ({
|
||||
|
||||
@@ -14,7 +14,7 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.plugin.list",
|
||||
identifier: "plugin.list",
|
||||
summary: "List plugins",
|
||||
description: "Retrieve enabled server plugins and their current status.",
|
||||
}),
|
||||
@@ -28,7 +28,7 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.plugin.awaitActivation",
|
||||
identifier: "plugin.awaitActivation",
|
||||
summary: "Wait for plugin activation",
|
||||
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.",
|
||||
@@ -45,7 +45,7 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.plugin.check",
|
||||
identifier: "plugin.check",
|
||||
summary: "Check plugin updates",
|
||||
description: "Check one or all package plugins for available updates.",
|
||||
}),
|
||||
@@ -61,7 +61,7 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.plugin.update",
|
||||
identifier: "plugin.update",
|
||||
summary: "Update plugins",
|
||||
description:
|
||||
"Update package plugins concurrently and notify active locations to reload them. Responds once every update has finished; fails when any update fails.",
|
||||
|
||||
@@ -12,7 +12,7 @@ export const ProjectGroup = HttpApiGroup.make("server.project")
|
||||
success: Schema.Array(Project.Info),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.project.list",
|
||||
identifier: "project.list",
|
||||
summary: "List projects",
|
||||
description: "List known projects.",
|
||||
}),
|
||||
@@ -26,7 +26,7 @@ export const ProjectGroup = HttpApiGroup.make("server.project")
|
||||
error: ProjectNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.project.update",
|
||||
identifier: "project.update",
|
||||
summary: "Update project",
|
||||
description: "Update the project canonical directory, display metadata, and workspace commands.",
|
||||
}),
|
||||
|
||||
@@ -15,7 +15,7 @@ export const ProviderGroup = HttpApiGroup.make("server.provider")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.provider.list",
|
||||
identifier: "provider.list",
|
||||
summary: "List providers",
|
||||
description: "Retrieve active AI providers so clients can show provider availability and configuration.",
|
||||
}),
|
||||
@@ -31,7 +31,7 @@ export const ProviderGroup = HttpApiGroup.make("server.provider")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.provider.get",
|
||||
identifier: "provider.get",
|
||||
summary: "Get provider",
|
||||
description: "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
|
||||
}),
|
||||
|
||||
@@ -27,7 +27,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.pty.list",
|
||||
identifier: "pty.list",
|
||||
summary: "List PTY sessions",
|
||||
description: "List PTY sessions for a location, including exited sessions retained until removal.",
|
||||
}),
|
||||
@@ -42,7 +42,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.pty.create",
|
||||
identifier: "pty.create",
|
||||
summary: "Create PTY session",
|
||||
description: "Create a pseudo-terminal session for a location.",
|
||||
}),
|
||||
@@ -58,7 +58,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.pty.get",
|
||||
identifier: "pty.get",
|
||||
summary: "Get PTY session",
|
||||
description: "Get one PTY session, including its exit code once exited.",
|
||||
}),
|
||||
@@ -75,7 +75,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.pty.update",
|
||||
identifier: "pty.update",
|
||||
summary: "Update PTY session",
|
||||
description: "Update the title or viewport size of one PTY session.",
|
||||
}),
|
||||
@@ -91,7 +91,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.pty.remove",
|
||||
identifier: "pty.remove",
|
||||
summary: "Remove PTY session",
|
||||
description: "Terminate and remove one PTY session.",
|
||||
}),
|
||||
@@ -108,7 +108,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.pty.connect.token",
|
||||
identifier: "pty.connect.token",
|
||||
summary: "Create PTY WebSocket token",
|
||||
description: "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
|
||||
}),
|
||||
@@ -123,7 +123,7 @@ export const PtyGroup = HttpApiGroup.make("server.pty")
|
||||
error: [ForbiddenError, PtyNotFoundError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.pty.connect",
|
||||
identifier: "pty.connect",
|
||||
summary: "Connect to PTY session",
|
||||
description: "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
|
||||
transform: (operation) => ({
|
||||
|
||||
@@ -13,7 +13,7 @@ export const ReferenceGroup = HttpApiGroup.make("server.reference")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.reference.list",
|
||||
identifier: "reference.list",
|
||||
summary: "List references",
|
||||
description: "List references available in the requested location.",
|
||||
}),
|
||||
|
||||
@@ -21,7 +21,7 @@ export const RpcGroup = HttpApiGroup.make("server.rpc")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.rpc.call",
|
||||
identifier: "rpc.call",
|
||||
summary: "Call a plugin RPC",
|
||||
description: "Dispatch a method to the currently registered RPC at the requested location.",
|
||||
}),
|
||||
|
||||
@@ -7,7 +7,7 @@ export const ServerGroup = HttpApiGroup.make("server.server")
|
||||
success: Schema.Struct({ urls: Schema.Array(Schema.String) }),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.server.get",
|
||||
identifier: "server.get",
|
||||
summary: "Get server information",
|
||||
description: "Return the URLs that can be used to connect to this server.",
|
||||
}),
|
||||
|
||||
@@ -142,7 +142,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [InvalidCursorError, InvalidRequestError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.list",
|
||||
identifier: "session.list",
|
||||
summary: "List sessions",
|
||||
description:
|
||||
"Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
|
||||
@@ -162,7 +162,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: InvalidRequestError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.stats",
|
||||
identifier: "session.stats",
|
||||
summary: "Get session statistics",
|
||||
description: "Aggregate local session activity, usage, and tool reliability for a time range.",
|
||||
}),
|
||||
@@ -182,7 +182,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
success: Schema.Struct({ data: Session.Info }),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.create",
|
||||
identifier: "session.create",
|
||||
summary: "Create session",
|
||||
description: "Create a session at the requested location.",
|
||||
}),
|
||||
@@ -198,7 +198,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [ConflictError, SessionNotFoundError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.import",
|
||||
identifier: "session.import",
|
||||
summary: "Import session",
|
||||
description:
|
||||
"Import a projected session transcript at the requested location. If parentID is supplied, the parent session must already exist; import parents before children.",
|
||||
@@ -213,7 +213,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [SessionNotFoundError, UnknownError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.export",
|
||||
identifier: "session.export",
|
||||
summary: "Export session",
|
||||
description: "Export a complete projected session transcript.",
|
||||
}),
|
||||
@@ -224,7 +224,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
success: Schema.Struct({ data: Schema.Record(Session.ID, SessionActive) }),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.active",
|
||||
identifier: "session.active",
|
||||
summary: "List active sessions",
|
||||
description:
|
||||
"Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
|
||||
@@ -238,7 +238,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: SessionNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.get",
|
||||
identifier: "session.get",
|
||||
summary: "Get session",
|
||||
description: "Retrieve a session by ID.",
|
||||
}),
|
||||
@@ -251,7 +251,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: SessionNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.remove",
|
||||
identifier: "session.remove",
|
||||
summary: "Delete session",
|
||||
description: "Delete a session and its child sessions.",
|
||||
}),
|
||||
@@ -267,7 +267,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.fork",
|
||||
identifier: "session.fork",
|
||||
summary: "Fork session",
|
||||
description: "Create a child session by copying projected history through or before a message boundary.",
|
||||
}),
|
||||
@@ -283,7 +283,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.switchAgent",
|
||||
identifier: "session.switchAgent",
|
||||
summary: "Switch session agent",
|
||||
description: "Switch the agent used by subsequent provider turns.",
|
||||
}),
|
||||
@@ -299,7 +299,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.switchModel",
|
||||
identifier: "session.switchModel",
|
||||
summary: "Switch session model",
|
||||
description: "Switch the model used by subsequent provider turns.",
|
||||
}),
|
||||
@@ -315,7 +315,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.rename",
|
||||
identifier: "session.rename",
|
||||
summary: "Rename session",
|
||||
description: "Update the session title.",
|
||||
}),
|
||||
@@ -329,7 +329,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [SessionNotFoundError, InvalidRequestError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.move",
|
||||
identifier: "session.move",
|
||||
summary: "Move session",
|
||||
description: "Move a session to another project directory, optionally transferring local changes.",
|
||||
}),
|
||||
@@ -351,7 +351,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.prompt",
|
||||
identifier: "session.prompt",
|
||||
summary: "Send message",
|
||||
description: "Durably admit one session input and schedule agent-loop execution unless resume is false.",
|
||||
}),
|
||||
@@ -371,7 +371,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.command",
|
||||
identifier: "session.command",
|
||||
summary: "Run command",
|
||||
description: "Execute a slash command callback immediately.",
|
||||
}),
|
||||
@@ -391,7 +391,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.skill",
|
||||
identifier: "session.skill",
|
||||
summary: "Activate skill",
|
||||
description: "Activate a skill for a session by appending a skill message and resuming execution.",
|
||||
}),
|
||||
@@ -414,7 +414,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.synthetic",
|
||||
identifier: "session.synthetic",
|
||||
summary: "Add synthetic message",
|
||||
description: "Durably admit synthetic session input and schedule execution unless resume is false.",
|
||||
}),
|
||||
@@ -433,7 +433,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.shell",
|
||||
identifier: "session.shell",
|
||||
summary: "Run shell command",
|
||||
description:
|
||||
"Execute one shell command in the session's working directory. Emits a shell.started event before execution and a shell.ended event with the merged output after.",
|
||||
@@ -453,7 +453,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.compact",
|
||||
identifier: "session.compact",
|
||||
summary: "Compact session",
|
||||
description:
|
||||
"Durably admit a session compaction request. Steers by default: it runs at the next step boundary instead of waiting behind queued prompts.",
|
||||
@@ -469,7 +469,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.wait",
|
||||
identifier: "session.wait",
|
||||
summary: "Wait for session",
|
||||
description: "Wait for a session agent loop to become idle.",
|
||||
}),
|
||||
@@ -485,7 +485,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.revert.stage",
|
||||
identifier: "session.revert.stage",
|
||||
summary: "Stage session revert",
|
||||
description: "Stage or move a reversible session boundary and optionally apply its file changes.",
|
||||
}),
|
||||
@@ -498,7 +498,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [SessionNotFoundError, SessionBusyError, UnknownError],
|
||||
})
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(OpenApi.annotations({ identifier: "v2.session.revert.clear", summary: "Clear staged revert" })),
|
||||
.annotateMerge(OpenApi.annotations({ identifier: "session.revert.clear", summary: "Clear staged revert" })),
|
||||
)
|
||||
.add(
|
||||
HttpApiEndpoint.post("session.revert.commit", "/api/session/:sessionID/revert/commit", {
|
||||
@@ -508,7 +508,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
})
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({ identifier: "v2.session.revert.commit", summary: "Commit staged revert" }),
|
||||
OpenApi.annotations({ identifier: "session.revert.commit", summary: "Commit staged revert" }),
|
||||
),
|
||||
)
|
||||
.add(
|
||||
@@ -518,7 +518,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [SessionNotFoundError, UnknownError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.context",
|
||||
identifier: "session.context",
|
||||
summary: "Get session context",
|
||||
description: "Retrieve the active context messages for a session (all messages after the last compaction).",
|
||||
}),
|
||||
@@ -542,7 +542,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [InvalidRequestError, MessageNotFoundError, SessionNotFoundError, UnknownError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.diff",
|
||||
identifier: "session.diff",
|
||||
summary: "Diff session turns",
|
||||
description:
|
||||
"Structured per-file diffs of the files a turn changed. A turn runs from the first prompt after the session was last idle until its next idle marker, so prompts steered in while it was busy belong to the same turn; `to` extends the range through a later turn. Compares the range's first recorded snapshot with its last; a step still running in the active session compares against the working copy. Ranges that span a location change are rejected. In sessions without any idle marker, a prompt's turn spans until the next user message.",
|
||||
@@ -556,7 +556,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: SessionNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.inbox.list",
|
||||
identifier: "session.inbox.list",
|
||||
summary: "List session inbox",
|
||||
description:
|
||||
"List durable enqueued session work not yet delivered, ordered by enqueue sequence. Includes user, synthetic, compaction, and move items.",
|
||||
@@ -570,7 +570,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [ConflictError, SessionNotFoundError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.inbox.cancel",
|
||||
identifier: "session.inbox.cancel",
|
||||
summary: "Cancel inbox input",
|
||||
description: "Cancel an inbox item that has not yet been delivered.",
|
||||
}),
|
||||
@@ -583,7 +583,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [ConflictError, SessionNotFoundError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.inbox.steer",
|
||||
identifier: "session.inbox.steer",
|
||||
summary: "Steer queued item",
|
||||
description: "Change a queued inbox item to steer delivery and wake session execution.",
|
||||
}),
|
||||
@@ -596,7 +596,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [ConflictError, SessionNotFoundError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.inbox.queue",
|
||||
identifier: "session.inbox.queue",
|
||||
summary: "Queue steered item",
|
||||
description: "Change a steered inbox item to queued delivery.",
|
||||
}),
|
||||
@@ -611,7 +611,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.instructions.entry.list",
|
||||
identifier: "session.instructions.entry.list",
|
||||
summary: "List instruction entries",
|
||||
description: "List API-managed instruction entries attached to the session.",
|
||||
}),
|
||||
@@ -627,7 +627,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.instructions.entry.put",
|
||||
identifier: "session.instructions.entry.put",
|
||||
summary: "Put instruction entry",
|
||||
description:
|
||||
"Attach or replace one durable instruction entry. Changes announce as updates at the next step boundary.",
|
||||
@@ -643,7 +643,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.instructions.entry.remove",
|
||||
identifier: "session.instructions.entry.remove",
|
||||
summary: "Remove instruction entry",
|
||||
description:
|
||||
"Remove one instruction entry; the removal is announced to the model at the next step boundary.",
|
||||
@@ -662,7 +662,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.generate",
|
||||
identifier: "session.generate",
|
||||
summary: "Generate text from session context",
|
||||
description: "Generate transient text from the current session context without mutating session history.",
|
||||
}),
|
||||
@@ -681,7 +681,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: SessionNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.log",
|
||||
identifier: "session.log",
|
||||
summary: "Read the session log",
|
||||
description:
|
||||
"Experimental durable session event log. Reads events after an exclusive aggregate sequence and continues with live events when follow=true.",
|
||||
@@ -702,7 +702,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.interrupt",
|
||||
identifier: "session.interrupt",
|
||||
summary: "Interrupt session execution",
|
||||
description:
|
||||
"Interrupt active execution owned by this OpenCode process. Returns interrupted=true when an active execution was interrupted and false for the idle no-op. When continue=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.",
|
||||
@@ -718,7 +718,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
.middleware(sessionLocationMiddleware)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.background",
|
||||
identifier: "session.background",
|
||||
summary: "Background blocking session tools",
|
||||
description:
|
||||
"Move active foreground backgroundable tools for this session into background observation. Idle requests are a no-op.",
|
||||
@@ -732,7 +732,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: [SessionNotFoundError, MessageNotFoundError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.message",
|
||||
identifier: "session.message",
|
||||
summary: "Get session message",
|
||||
description: "Retrieve one projected message owned by the Session.",
|
||||
}),
|
||||
@@ -746,7 +746,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: SessionNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.environment",
|
||||
identifier: "session.environment",
|
||||
summary: "Set session environment",
|
||||
description: "Replace the process environment used by local shell commands for this session.",
|
||||
}),
|
||||
@@ -760,7 +760,7 @@ export const makeSessionGroup = <I extends HttpApiMiddleware.AnyId, S>(sessionLo
|
||||
error: SessionNotFoundError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.session.view",
|
||||
identifier: "session.view",
|
||||
summary: "View session",
|
||||
description: "Mark the idle transition observed by the viewer as viewed.",
|
||||
}),
|
||||
|
||||
@@ -19,7 +19,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.shell.list",
|
||||
identifier: "shell.list",
|
||||
summary: "List running shell commands",
|
||||
description: "List currently running shell commands for a location. Exited commands are not included.",
|
||||
}),
|
||||
@@ -34,7 +34,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.shell.create",
|
||||
identifier: "shell.create",
|
||||
summary: "Run shell command",
|
||||
description:
|
||||
"Spawn one non-interactive shell command for a location. Combined stdout/stderr is captured to a file pageable via output.",
|
||||
@@ -51,7 +51,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.shell.get",
|
||||
identifier: "shell.get",
|
||||
summary: "Get shell command",
|
||||
description: "Get one shell command, including its status and exit code once exited.",
|
||||
}),
|
||||
@@ -68,7 +68,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.shell.timeout",
|
||||
identifier: "shell.timeout",
|
||||
summary: "Update shell timeout",
|
||||
description: "Replace a running shell command's timeout from now, or clear it with zero.",
|
||||
}),
|
||||
@@ -84,7 +84,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.shell.output",
|
||||
identifier: "shell.output",
|
||||
summary: "Read shell output",
|
||||
description: "Page through captured combined output by absolute byte cursor.",
|
||||
}),
|
||||
@@ -100,7 +100,7 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.shell.remove",
|
||||
identifier: "shell.remove",
|
||||
summary: "Remove shell command",
|
||||
description: "Terminate and remove one shell command and its retained output.",
|
||||
}),
|
||||
|
||||
@@ -13,7 +13,7 @@ export const SkillGroup = HttpApiGroup.make("server.skill")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.skill.list",
|
||||
identifier: "skill.list",
|
||||
summary: "List skills",
|
||||
description: "Retrieve currently registered skills.",
|
||||
}),
|
||||
|
||||
@@ -29,7 +29,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.vcs.get",
|
||||
identifier: "vcs.get",
|
||||
summary: "VCS info",
|
||||
description: "Get current and default branch information for the requested location.",
|
||||
}),
|
||||
@@ -44,7 +44,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.vcs.base",
|
||||
identifier: "vcs.base",
|
||||
summary: "VCS review base",
|
||||
description:
|
||||
"Infer a local review base from named branch creation history, or the repository default only when currently on that branch. Returns null before the first commit or when the provider lacks base metadata; ambiguous Git history requires an explicit base on diff requests.",
|
||||
@@ -59,7 +59,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.vcs.status",
|
||||
identifier: "vcs.status",
|
||||
summary: "VCS status",
|
||||
description: "List uncommitted working-copy changes relative to the requested location.",
|
||||
}),
|
||||
@@ -73,7 +73,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.vcs.branches",
|
||||
identifier: "vcs.branches",
|
||||
summary: "VCS branches",
|
||||
description: "List local and remote branches available at the requested location.",
|
||||
}),
|
||||
@@ -88,7 +88,7 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.vcs.diff",
|
||||
identifier: "vcs.diff",
|
||||
summary: "VCS diff",
|
||||
description:
|
||||
"Diff HEAD to the working copy (working), the base merge-base to the working copy (branch), or the base merge-base to HEAD (committed). Omitting base preserves repository-default comparison; supplying it overrides the comparison without saving it.",
|
||||
|
||||
@@ -15,7 +15,7 @@ export const WebSearchGroup = HttpApiGroup.make("server.websearch")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.websearch.providers",
|
||||
identifier: "websearch.providers",
|
||||
summary: "List web search providers",
|
||||
description: "Return the registered web search providers.",
|
||||
}),
|
||||
@@ -31,7 +31,7 @@ export const WebSearchGroup = HttpApiGroup.make("server.websearch")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.websearch.query",
|
||||
identifier: "websearch.query",
|
||||
summary: "Search the web",
|
||||
description:
|
||||
"Run one web search through the selected provider. Specify a provider to override the configured default.",
|
||||
|
||||
@@ -14,7 +14,7 @@ export const WorkspaceGroup = HttpApiGroup.make("server.workspace")
|
||||
error: [ConflictError, ProviderNotFoundError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.workspace.create",
|
||||
identifier: "workspace.create",
|
||||
summary: "Create workspace",
|
||||
description:
|
||||
"Create a logical workspace. A caller-supplied ID is idempotent when retried with the same provider; reusing it with another provider returns a conflict.",
|
||||
@@ -28,7 +28,7 @@ export const WorkspaceGroup = HttpApiGroup.make("server.workspace")
|
||||
error: UnknownError,
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.workspace.destroy",
|
||||
identifier: "workspace.destroy",
|
||||
summary: "Destroy workspace",
|
||||
description:
|
||||
"Make a workspace not exist. This operation is idempotent: an already-missing workspace succeeds with `destroyed: false`, while a workspace removed by this request returns `destroyed: true`.",
|
||||
|
||||
@@ -26,7 +26,7 @@ export const WorktreeGroup = HttpApiGroup.make("server.worktree")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.worktree.list",
|
||||
identifier: "worktree.list",
|
||||
summary: "List worktrees",
|
||||
description:
|
||||
"Discover worktrees through the requested location's strategies and return its project's inventory.",
|
||||
@@ -43,7 +43,7 @@ export const WorktreeGroup = HttpApiGroup.make("server.worktree")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.worktree.create",
|
||||
identifier: "worktree.create",
|
||||
summary: "Create worktree",
|
||||
description:
|
||||
"Create a local worktree using the location's registered strategy and directory defaults, then run the project's setup script.",
|
||||
@@ -60,7 +60,7 @@ export const WorktreeGroup = HttpApiGroup.make("server.worktree")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.worktree.remove",
|
||||
identifier: "worktree.remove",
|
||||
summary: "Remove worktree",
|
||||
description: "Remove a managed worktree from the requested location's project using its recorded strategy.",
|
||||
}),
|
||||
@@ -75,7 +75,7 @@ export const WorktreeGroup = HttpApiGroup.make("server.worktree")
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.worktree.refresh",
|
||||
identifier: "worktree.refresh",
|
||||
summary: "Refresh worktrees",
|
||||
description: "Discover worktrees from the requested location and reconcile the shared project inventory.",
|
||||
}),
|
||||
|
||||
+133
-133
File diff suppressed because it is too large
Load Diff
+133
-133
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user