Commit Graph

40 Commits

Author SHA1 Message Date
Igor Šćekić ed19d4872c fix(share): skip session sync when kilo token is invalid
Validate the kilo API token against the user endpoint before syncing and
cache auth validity per token to avoid repeated checks.
2026-01-29 11:12:20 +01:00
Igor Šćekić 282e3ba4ae perf(share): debounce session sync and retry on failure
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.
2026-01-28 18:31:47 +01:00
Igor Šćekić 722c97da92 refactor(share): remove redundant share url empty check 2026-01-28 16:25:54 +01:00
Igor Šćekić fbd25d609f fix(share): update auth login hint in unshare error 2026-01-28 16:25:17 +01:00
Igor Šćekić e76cc9a55d chore(share): rename disable share env var
Update share modules, CI workflow, and e2e scripts to use
KILO_DISABLE_SHARE instead of OPENCODE_DISABLE_SHARE.
2026-01-28 16:17:18 +01:00
Igor Šćekić 1dcbe284a6 fix(share): surface share/unshare failures with errors
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.
2026-01-28 16:16:29 +01:00
Igor Šćekić d431c1622d Merge branch 'dev' into add-session-sync 2026-01-28 16:08:58 +01:00
Catriel Müller 8b1cc1440a refactor: rename sdk package 2026-01-28 14:27:18 +01:00
Igor Šćekić e877b984ae fix(share): delete sessions via session API endpoint 2026-01-28 11:34:47 +01:00
Igor Šćekić b5787409e1 fix(share): use proper Bearer auth header casing 2026-01-28 10:44:49 +01:00
Igor Šćekić 923cb45976 fix(share): default to production ingest and app URLs 2026-01-27 22:27:05 +01:00
Igor Šćekić 5c88b996f1 feat(share): add unshare flow via session api
Add ShareNext.unshare to call the session unshare endpoint and clear the
stored share url, and update Session.unshare to use the new method.
2026-01-27 20:40:23 +01:00
Igor Šćekić 842d4f2c17 feat(share): persist generated share url to storage 2026-01-27 20:01:52 +01:00
Igor Šćekić 0dc0b4bec3 feat(share): create share link via session api
Implement share() by posting to the session share endpoint and returning
the generated public URL, with an early return when no client is
available.
2026-01-27 19:58:53 +01:00
Igor Šćekić 91bdc96896 refactor(share): use Auth for token and ingest path
Replace kilocode token lookup via provider config with Auth.get("kilo") and
switch session share ingestion from ingestUrl to ingestPath.
2026-01-27 15:52:19 +01:00
Igor Šćekić 7a6281aca9 feat(share): authenticate share-next requests with kilocode token
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.
2026-01-27 13:22:21 +01:00
Igor Šćekić 6233c03186 feat(share): align share-next session API usage
Update default enterprise URL port, switch session creation to `/api/session`,
and drop secret handling from stored share data and sync payloads.
2026-01-27 12:56:27 +01:00
Igor Šćekić 3b31a5c565 feat(share): create share sessions with ingest URL
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()`.
2026-01-27 09:51:51 +01:00
Adam 03d7467ea2 test(app): initial e2e test setup 2026-01-19 09:03:52 -06:00
Luke Parker c600114db9 fix(share): handle NotFoundError for non-shared sessions in sync (#6634) 2026-01-02 04:16:12 -06:00
Ravi Kumar 54569b5552 fix(session): fix unshare command not clearing share state (#5523) 2025-12-14 22:05:06 -06:00
Dax Raad 578072bb8e use new share url 2025-12-11 00:43:00 -05:00
Dax ea7ec60f51 v2 SDK (#5216)
Co-authored-by: GitHub Action <action@github.com>
2025-12-07 19:04:14 -05:00
Dax 6d3fc63658 core: refactor provider and model system (#5033)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: thdxr <thdxr@users.noreply.github.com>
2025-12-03 21:09:03 -05:00
Dax Raad 69d1381ba3 core: refactor share system to separate session IDs from share IDs
- 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
2025-11-24 22:58:47 -05:00
Adam 3fb57044d1 wip(share): more styling 2025-11-24 15:10:39 -06:00
Dax 49408c00e9 enterprise (#4617)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
2025-11-21 20:41:27 -05:00
Dax Raad 61f6091de1 ci: test 2025-10-14 14:56:21 -04:00
Dax Raad 289783f627 ci: version stuff 2025-10-14 14:52:05 -04:00
Dax f993541e0b 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
2025-09-01 17:15:49 -04:00
Dax f884766445 v2 message format and upgrade to ai sdk v5 (#743)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Liang-Shih Lin <liangshihlin@proton.me>
Co-authored-by: Dominik Engelhardt <dominikengelhardt@ymail.com>
Co-authored-by: Jay V <air@live.ca>
Co-authored-by: adamdottv <2363879+adamdottv@users.noreply.github.com>
2025-07-07 15:53:43 -04:00
Dax Raad ed4f862b49 fix /unshare 2025-07-03 15:34:04 -04:00
adamdottv 8825cd3811 feat(tui): unshare command 2025-07-03 07:09:09 -05:00
Dax Raad 2ec0611f42 lazy load formatters 2025-06-27 11:33:37 -04:00
Dax Raad 61160dc220 docs: readme 2025-06-20 15:22:41 -04:00
Dax Raad ec1c9f8cd1 use production share url 2025-06-19 14:21:00 -04:00
Dax Raad 658067186a ignore: share page stuff 2025-06-18 16:13:33 -04:00
Dax Raad 7f8f46f9fe Refactor session module structure and improve error handling
- 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>
2025-06-04 17:38:54 -04:00
Dax Raad 6df19f1828 Standardize code style to no semicolons and remove unused @types/node dependency
🤖 Generated with opencode
Co-Authored-By: opencode <noreply@opencode.ai>
2025-05-30 22:14:09 -04:00
Dax Raad f3da73553c sync 2025-05-30 20:48:36 -04:00