diff options
| author | Dax <[email protected]> | 2025-09-01 17:15:49 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-01 17:15:49 -0400 |
| commit | f993541e0b538388969defc94d08c3a7af5ef873 (patch) | |
| tree | ae9898664175faf69583e0bbb1b10135c645d798 /packages/sdk/stainless | |
| parent | e2df3eb44dc8b032f74ed0273a53be5f83aaab13 (diff) | |
| download | opencode-f993541e0b538388969defc94d08c3a7af5ef873.tar.gz opencode-f993541e0b538388969defc94d08c3a7af5ef873.zip | |
Refactor to support multiple instances inside single opencode process (#2360)
This release has a bunch of minor breaking changes if you are using opencode plugins or sdk
1. storage events have been removed (we might bring this back but had some issues)
2. concept of `app` is gone - there is a new concept called `project` and endpoints to list projects and get the current project
3. plugin receives `directory` which is cwd and `worktree` which is where the root of the project is if it's a git repo
4. the session.chat function has been renamed to session.prompt in sdk. it no longer requires model to be passed in (model is now an object)
5. every endpoint takes an optional `directory` parameter to operate as though opencode is running in that directory
Diffstat (limited to 'packages/sdk/stainless')
| -rwxr-xr-x | packages/sdk/stainless/generate.ts | 2 | ||||
| -rw-r--r-- | packages/sdk/stainless/stainless.yml | 25 |
2 files changed, 21 insertions, 6 deletions
diff --git a/packages/sdk/stainless/generate.ts b/packages/sdk/stainless/generate.ts index 6b1877f6b..22224224d 100755 --- a/packages/sdk/stainless/generate.ts +++ b/packages/sdk/stainless/generate.ts @@ -8,7 +8,7 @@ console.log(process.cwd()) await $`rm -rf go` await $`bun run --conditions=development ../../opencode/src/index.ts generate > openapi.json` -await $`stl builds create --branch dev --pull --allow-empty --+target go` +await $`stl builds create --branch main --pull --allow-empty --+target go` await $`rm -rf ../go` await $`mv opencode-go/ ../go` diff --git a/packages/sdk/stainless/stainless.yml b/packages/sdk/stainless/stainless.yml index f829e2280..1efe263a0 100644 --- a/packages/sdk/stainless/stainless.yml +++ b/packages/sdk/stainless/stainless.yml @@ -45,19 +45,27 @@ resources: # This method is always streaming. param_discriminator: null + path: + models: + path: Path + methods: + get: get /path + app: models: app: App provider: Provider model: Model - agent: Agent methods: - get: get /app - init: post /app/init log: post /log - agents: get /agent providers: get /config/providers + agent: + models: + agent: Agent + methods: + list: get /agent + find: models: symbol: Symbol @@ -92,6 +100,13 @@ resources: methods: list: get /command + project: + models: + project: Project + methods: + list: get /project + current: get /project/current + session: models: session: Session @@ -132,7 +147,7 @@ resources: summarize: post /session/{id}/summarize message: get /session/{id}/message/{messageID} messages: get /session/{id}/message - chat: post /session/{id}/message + prompt: post /session/{id}/message command: post /session/{id}/command shell: post /session/{id}/shell update: patch /session/{id} |
