Commit Graph

57 Commits

Author SHA1 Message Date
Catriel Müller 1eedad9213 Refactor publish workflow and environment variables (#261)
* feat: changelog generation

* refactor: rename all ENV variables to KILO prefix

* refactor: publish rework

* refactor: publish rework

* refactor: unify git commiter action

* refactor: add all kilobots to the team
2026-02-12 09:00:51 +01:00
Catriel Müller f8131c2e00 feat: merge opencode v1.1.54 2026-02-10 22:10:03 -03:00
Catriel Müller 88f06392d5 resolve merge conflicts 2026-02-03 19:28:35 -03:00
Catriel Müller 6131bb35e5 refactor: kilo compat for v1.1.43 2026-02-03 18:25:15 -03:00
Igor Šćekić b4b05db389 refactor(share): rename ShareNext to KiloSessions
Move share/ingest modules under kilo-sessions and update bootstrap and
session share/unshare/remove flows to use KiloSessions. Update ingest
queue test imports accordingly.
2026-02-02 12:39:24 +01:00
Igor Šćekić c06a87abe9 fix(share): resolve orgId from auth when env missing
Fetch orgId from KILO auth when KILO_ORG_ID is not set and cache the
result briefly to avoid repeated lookups during ingest sync.
2026-01-30 11:02:57 +01:00
Igor Šćekić 5f927347cc feat(share): sync kilo platform/org metadata to ingest
Add `kilo_meta` items to the ingest queue with a stable key so updates
coalesce, and send metadata derived from `KILO_PLATFORM` and `KILO_ORG_ID`
during session sync.
2026-01-29 22:09:11 +01:00
Igor Šćekić 9d0f9da3b8 feat(share): allow ingest url override via env var 2026-01-29 19:32:37 +01:00
Igor Šćekić e99573595e chore: annotate files with kilocode_change markers 2026-01-29 18:38:33 +01:00
Igor Šćekić 1bb41afc72 refactor(share): extract ingest queue into module
Move per-session debounce/retry ingest logic into a reusable IngestQueue
helper and wire ShareNext to use it, including an auth error callback to
clear cached credentials. Add test coverage for coalescing, throttling,
retry/backoff, and non-retryable failures.
2026-01-29 14:10:10 +01:00
Igor Šćekić 452a88ec8d refactor(share): remove legacy Share sync module
Drop Share.init() from bootstrap and delete the old Share
implementation now superseded by ShareNext.
2026-01-29 13:06:29 +01:00
Igor Šćekić f5b7b82d6d fix(share): encode session id in share/unshare urls 2026-01-29 12:59:43 +01:00
Igor Šćekić 81f69b4f04 fix(share): add retry/backoff to session sync flush
Coalesce ingest updates with a per-session due time and schedule flushes
to respect active backoff windows.

Retry transient failures (network, 429, 5xx, etc.) with capped exponential
backoff and a small retry budget, while avoiding overwriting newer queued
updates during in-flight retries.
2026-01-29 12:26:53 +01:00
Igor Šćekić b81323b062 fix(share): block share/unshare when ingest disabled
Add ingest-disabled guardrails to share and unshare, and harden
session removal by encoding the session id and logging network/HTTP
failures instead of throwing.
2026-01-29 12:08:28 +01:00
Igor Šćekić b3d2673499 fix(share): avoid caching auth on network failures
Skip caching when the auth request fails without a response so
subsequent calls can retry instead of persisting an invalid state.
2026-01-29 11:50:30 +01:00
Igor Šćekić 7067554978 feat(share): allow disabling session ingest
Add `KILO_DISABLE_SESSION_INGEST` to skip session ingest initialization.
Also cache the ingest client briefly to reduce repeated auth/token checks and
surface clearer errors when session creation requests fail.
2026-01-29 11:27:03 +01:00
Igor Šćekić 1b75836d8a fix(share): remove disabled guard from getClient 2026-01-29 11:15:39 +01:00
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