Coalesce frequent session updates into a per-session debounce queue with
stable entity keys to reduce redundant POSTs. Improve resilience by
handling async init/full sync errors, validating responses, and requeueing
failed batches without overwriting newer updates.
Throw explicit errors when sharing is disabled or credentials are missing,
validate session sync initialization, and check HTTP responses/public_id
before persisting the share URL.
Add a reusable client that injects bearer auth headers using the Kilo
provider configuration (kilocodeToken or apiKey fallback), and gate share
init/create/sync/remove when sharing is disabled or no token is present.
Update ShareNext to create sessions via `/api/opencode/session` and
persist/use `ingestUrl` for syncing. Automatically create share sessions
on `Session.Created` and route session sharing through `ShareNext.share()`.
- Generate shorter share IDs from session IDs for better URL structure
- Update API routes to use shareID parameter instead of sessionID
- Improve sync mechanism with better data queuing and deduplication
- Maintain backward compatibility while improving security and organization
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
- Rename session.ts to index.ts for cleaner module imports
- Update all imports to use new session module structure
- Add error metadata tracking to message schema
- Improve error handling in session stream processing
🤖 Generated with [OpenCode](https://opencode.ai)
Co-Authored-By: OpenCode <noreply@opencode.ai>