The compat re-export and the build's CJS-redirect plugin only existed to work
around the 'G9' crash that's actually a Bun --splitting bug (now fixed by
splitting:false). With splitting off the morphsdk ESM barrel bundles cleanly,
so import it directly in warpgrep.ts and remove the indirection.
The real cause of the 'Exported binding G9 needs to refer to a top-level
declared variable' SyntaxError is a Bun 1.3.14 --splitting codegen bug
(oven-sh/bun#25621), not @morphllm/morphsdk. With splitting:true Bun emits
invalid cross-chunk re-exports (import{vn as G9}) that crash the compiled
baseline binary at startup. Disabling splitting produces a valid binary;
verified the 'as G9' artifact is gone from the compiled output.
The morphsdkCjsPlugin called require.resolve on the raw dist/.../client.cjs
path, which is not an exported subpath in the package's exports map, so Bun
aborted the release build with 'Cannot find module ...client.cjs'.
Resolve through the public specifier @morphllm/morphsdk/tools/warp-grep/client
instead — require.resolve uses the package's "require" condition, mapping it
straight to client.cjs.
The createRequire approach from #10955 did not prevent the Bun ESM
splitter from generating invalid output. Bun 1.3.14 with
`conditions: ["browser"]` resolves @morphllm/morphsdk via the "import"
condition (pre-split ESM barrel) even inside createRequire() calls,
pulling in 52 chunk-*.js files that cause:
SyntaxError: Exported binding 'G9' needs to refer to a top-level declared variable.
Fix: add a morphsdkCjsPlugin in script/build.ts using Bun's onResolve
API to redirect the module specifier to the absolute path of client.cjs
before the ESM splitter is invoked. client.cjs is a self-contained
~2300-line CJS bundle with no chunk-*.js imports.
morphsdk.ts is simplified to a plain re-export — the CJS redirection
happens at build time, no source-level workaround needed.
* feat(session-export): scaffold module with config constants
* feat(session-export): add zstd compression wrapper
* feat(session-export): event and envelope type definitions
* feat(session-export): eligibility check with kill-switch
* feat(session-export): org signal collector with auth resolver
* feat(session-export): worker SQLite schema and storage helpers
* feat(session-export): content-addressed chunker with zstd dedup
* feat(session-export): client-side light scrubber
* feat(session-export): IPC contract and inbox with back-pressure
* feat(session-export): persist scrubbed events with chunked payloads
* feat(session-export): worker entry point with inbox drain loop
* feat(session-export): main-thread capture module
* feat(session-export): workspace baseline and delta fibers
* feat(session-export): sync subscriber and tool io chunking
* feat(session-export): bootstrap wiring and compaction hook
* feat(session-export): wire capture hooks into sessions
* feat(session-export): uploader and buffer cap
* chore(session-export): annotate shared session hooks
* changeset(session-export): add release note
* fix(session-export): keep bootstrap non-blocking without instance context
* feat(session-export): respawn worker after failures
* test(session-export): add performance budget assertions
* test(session-export): add worker end-to-end smoke test
* fix(session-export): strip identity and high-risk baseline paths
* test(session-export): gate perf assertions for stable sweeps
* fix(session-export): bundle worker in single-file builds
* fix(session-export): make capture envelopes cloneable
* fix(session-export): drain worker on CLI shutdown
* feat(session-export): capture workspace baseline and deltas
* fix(session-export): preserve request metadata
* test(session-export): cover request metadata capture
* feat(cli): send indexed session export batches
* feat(cli): authorize session export uploads
* fix(cli): flush session export shutdown uploads
* feat(cli): optimize session export replay payloads
* fix(cli): include session export surface metadata
* fix(session-export): decrement chunk refs after upload
decRefChunks was never called, so chunk ref_count stayed at 1 (or
higher with dedup) and DELETE FROM chunk WHERE ref_count <= 0 never
matched. Chunks accumulated in the local SQLite buffer until the 50 GB
cap. Call decRefChunks alongside markUploaded so deleteUploaded can
reclaim the rows.
* fix(session-export): add periodic uploader flush timer
flushIntervalMs and retryBackoffMaxMs were both defined in config and
neither was referenced anywhere; scheduleFlush only ran on inbound
events or reconnect. After a 5xx or network failure the row was backed
off for 1 s, but if no further event arrived the retry never fired and
the events stranded until the CLI restarted. Drive a periodic flush
from a setInterval, unref the handle so it doesn't pin the process, and
clear it from a new dispose() hook the worker calls on shutdown.
* fix(session-export): stop emitting absolute workspace root in baseline
CaptureMetadata.root was the literal absolute filesystem path
(/Users/<name>/Projects/<repo>), shipped in every
workspace_baseline_completed event and not stripped by handlers'
identity filter. The field was set but never read anywhere downstream
— file paths in the baseline are already relative, so the root added
no replay signal. Remove the field outright.
* fix(session-export): cap pendingEvents result set
The SELECT had no LIMIT clause, so under a backlog (network outage,
crashed receiver) it would materialize the full pending table into a
JavaScript array before the byte-limit truncation applied. With a
50 GB buffer cap that is hundreds of MB of heap inside the worker per
drain. Add LIMIT 500 — the drain loop already re-queries until empty,
so no events are missed.
* fix(session-export): exponential retry backoff up to retryBackoffMaxMs
Both the 5xx and network-error branches always retried after the floor
delay regardless of how many attempts had already failed, and
retryBackoffMaxMs was unreferenced. During a sustained outage every
session re-tried at roughly 1 Hz against the dead receiver. Surface
upload_attempts on EventRow and compute the next delay as
min * 2^attempts capped at max.
* fix(session-export): evict superseded workspace snapshots on remember
createWorkspaceProvider retained every captured snapshot — in-memory
and inside the persisted state file — even after the session moved on
to a newer one. For a 1k-file repo over a 100-turn session that is
~2 GB of unreachable heap plus a state file that grows monotonically.
Drop the previous snapshot for the session on remember() when no other
session still references it.
* fix(session-export): anchor aws_secret_key scrubber to key name
The bare 40-char base64 pattern matched every 40-character hex string,
including all git commit SHAs. Tool outputs, diffs, and conversation
messages were silently rewritten as <<REDACTED:aws_secret_key>>,
destroying lineage information in training data. Require the key name
context — naked secrets in unstructured text are rare and the .env /
.aws/credentials high-risk path strip already covers the common case.
* fix(session-export): preserve root linkage in SyncSubscriber events
SyncSubscriber hardcoded rootSessionId = sessionId on every tool,
permission, and feedback event, so sub-agent sessions lost their root
linkage and a future training pipeline could not reconstruct the
agent topology from these side-channel events. Expose the rootSessionId
mapping from Capture and plumb it through the same pattern as
getTurnId.
* fix(session-export): atomic chunk GC after upload
markUploaded + decRefChunks + deleteUploaded were three separate SQL
statements; a crash between markUploaded and decRefChunks would leave
events flagged uploaded (never retried) and chunks with stale
ref_count (never reclaimed by deleteUploaded). Bundle the three calls
into a single transactional commitUploaded helper so either all three
land or none of them do.
* fix(session-export): wait on transient sqlite locks
* fix(session-export): snapshot current workspace directory
* fix(cli): preserve Kilo model export metadata
* fix(cli): send anon id for session export
* fix(cli): fallback to telemetry anon id
* chore(cli): annotate session export config test
* chore: remove session export docs
* fix(cli): harden session export uploads
* fix(cli): preserve stream lifecycle for session export
* fix(kilo-docs): exclude session export ingest link
* fix(cli): restrict session export workspace sync to git repos
* chore: remove session export changeset
* fix(cli): tighten session export payload types
* fix(cli): type session export model payloads
* fix(cli): simplify session export cleanup
* fix(cli): avoid session export shutdown race
* refactor(cli): use drizzle for session export storage
* fix(cli): finalize session export sqlite statements
* fix(cli): link compaction exports to root sessions
* fix(cli): stop exporting raw stream parts
* fix(cli): prune stale workspace snapshots
* refactor(cli): clarify chunk ref counting
* test(cli): clarify dropped upload assertions
* ci: avoid visual path filter action failure
* fix(cli): preserve in-flight workspace snapshots
* fix(cli): stop uploading baseline start events
* fix(cli): trim redundant export metadata
* fix(cli): trim workspace export bookkeeping
* fix(cli): fold terminal outcome into tool exports
* fix(cli): dedupe request context in export batches
* fix(cli): normalize compaction export payloads
* fix(cli): avoid duplicate tool result exports
* test(cli): align session export expectations
* fix(cli): run secretlint during session export scrubbing
* fix(cli): keep retried export batches contiguous
* fix(cli): include agent info in session exports
* fix(cli): flush pending session exports on serve startup
* fix(cli): drop exports when scrubbing fails
* fix(cli): narrow secretlint value extraction
* fix(cli): limit exported agent info
* test(cli): remove brittle agent export source assertion
* fix(cli): ignore corrupt session export workspace state
* fix(cli): keep session export close best effort
* fix(cli): avoid following session export symlinks
* fix(cli): preserve session export chunk ref counts
* fix(cli): retry transient session export uploads
* fix(cli): validate session export ingest endpoint
* fix(cli): tolerate missing export token details
* fix(cli): fail closed on session export org lookup
* fix(cli): decode session export permission replies
* fix(cli): finalize session export on stream close
* fix(cli): bound session export baseline timeout
* fix(cli): avoid persisting workspace file contents
* fix(cli): bound workspace snapshot capture
* fix(cli): validate session export worker messages
* fix(cli): revoke stale session export eligibility
* fix(cli): scope session export workspaces
* fix(cli): extend session export shutdown flush
* fix(cli): infer free Kilo models for export
* fix(cli): avoid duplicate chunk refs
* fix(cli): throttle session export uploads
* fix(cli): harden session export capture
* feat: disclose free model data collection (#10767)
* feat: disclose free model data collection
* chore(cli): document free model footer sorting
* fix(vscode): add free model data translations
* fix: simplify free model data label
* fix: simplify data collection badges
* fix: remove duplicate model info disclosure
* fix: restore composer data tooltip
* fix: align jetbrains data collection indicator
* fix: align free model data indicators
* fix(vscode): show data collection in model preview
* fix: limit data indicators to kilo gateway
* test(cli): relax prompt cancel timeout
* test(cli): annotate prompt cancel timeout
* test(cli): classify prompt queue runtime test
* fix(cli): defer session export startup
Mechanical follow-up to the v1.14.33 merge:
- src/server/routes/ui.ts: remove dead proxy fallback (proxy/createHash/csp were intentionally commented out by Kilo; the Effect/Promise paths still referenced them)
- src/kilocode/{plan-followup,session/prompt}.ts: pass Instance.current to Session.plan(input, instance)
- src/server/routes/instance/httpapi/handlers/session.ts: cast PromptPayload spread to PromptInput (readonly→mutable schema/runtime mismatch)
- src/plugin/index.ts: cast external @opencode-ai/plugin auth plugins through unknown to bridge to local @kilocode/plugin types
- script/build.ts: drop duplicate sourcemap key (Kilo's release-aware version wins)
- test/kilocode/indexing-{startup,worktree}.test.ts: switch from Instance.disposeAll/InstanceBootstrap-as-effect to disposeAllInstances/getBootstrapRunEffect
- test/kilocode/model-cache-org.test.ts: convert Instance.provide init from async fn to Effect
- test/kilocode/kilo-loader-auth.test.ts: drop ModelsDev.Data.reset() (no longer exists)
- test/kilocode/plan-exit-detection.test.ts, plan-followup.test.ts: pass Instance.current to Session.plan
- test/kilocode/{plan-followup,session-list}.test.ts: replace Session.list() with AppRuntime.runPromise(Session.Service.use((svc) => svc.list()))
The upstream build script tries to bundle packages/app/ which was removed in #9845. Guard the embed step so the CLI build still works, and revert the --skip-embed-web-ui workaround from #9885 since it is no longer needed.
The kilo-cli artifact ballooned from ~1 GB to 1.83 GB after the codebase
indexing PR started emitting external sourcemaps and copying tree-sitter
wasms per target. The resulting 1.83 GB artifact triggered a silent
partial-extract in actions/download-artifact@v4 during build-vscode,
causing the 2026-04-29 publish run to fail with 'CLI binary not found'.
- Skip external sourcemaps in release builds (~620 MB saved across
12 targets); dev builds still emit maps for local debugging.
- Exclude any stray .map files from the CI artifact and skip zstd
compression on binaries (saves ~60 s on upload and reduces the
chance of partial-extract bugs on the download side).
Refs: PR #6966 (commit f74d54c4), run 25096325401
The `Installation.isLocal()` gate in dev-setup rejected locally-built
binaries because KILO_CHANNEL bakes the git branch name, not "local".
`detectRepo()` also failed inside a Bun single-file executable where
`import.meta.url` resolves to a `/$bunfs/` virtual path.
Introduce a build-time `KILO_BUILD_KIND` flag (source/release) derived
from `Script.release`, guard dev-setup/dev-alias registration on it,
and rewrite `detectRepo()` to try KILO_DEV_REPO, `import.meta.url`
(skipping bunfs), `process.execPath`, then `process.cwd()`.
* tweak: use theme tokens for debug bar surface
* chore: update nix node_modules hashes
* feat(tui): add heap snapshot functionality for TUI and server (#19028)
* ci
* change model for changelog
* release: v1.3.2
* fix(opencode): skip typechecking generated models snapshot (#19018)
* Revert "fix(app): more startup efficiency (#18985)"
This reverts commit 98b3340cee.
* Revert "fix(app): startup efficiency (#18854)"
This reverts commit 546748a461.
* effectify Worktree service (#18679)
* fix: increase operations-per-run to 1000 and pin stale action to v10.2.0
The stale-issues workflow was hitting the default 30 operations limit,
preventing it from processing all 2900+ issues/PRs. Increased to 1000
to handle the full backlog. Also pinned to exact v10.2.0 for reproducibility.
* Add close-issues script and GitHub Action
- Create script/github/close-issues.ts to close stale issues after 60 days
- Add GitHub Action workflow to run daily at 2 AM
- Remove old stale-issues workflow to avoid conflicts
* Fix close-issues workflow permissions
- Add contents: read permission for checkout
- Use github.token instead of secrets.GITHUB_TOKEN
* Process issues sequentially to avoid rate limits
* Change issue close reason from not_planned to completed
* fix(opencode): avoid snapshotting files over 2MB (#19043)
* fix: provide merge context to beta conflict resolver (#19055)
* tweak: only spawn lsp servers for files in current instance (or cwd if instance is global) (#19058)
* fix: beta resolver typecheck + build smoke check (#19060)
* fix: unblock beta conflict recovery (#19068)
* electron: add createDirectory to open directory picker (#19071)
* electron: remove file extension from electron-store wrapper (#19082)
* app: pre-warm project globalSync state when navigate project via keybind (#19088)
* fix(app): move message navigation off cmd+arrow (#18728)
* Reapply "fix(app): startup efficiency (#18854)"
This reverts commit a379eb3867.
* Reapply "fix(app): more startup efficiency (#18985)"
This reverts commit cbe1337f24.
* fix(app): hash inline script for csp
* Revert "fix(app): startup efficiency"
* Reapply "fix(app): startup efficiency"
This reverts commit 898456a25c.
* fix(app): opencode web server url
* chore(app): markdown playground in storyboard
* chore(app): markdown playground in storyboard
* feat(core): initial implementation of syncing (#17814)
* chore: generate
* chore: bump modelcontextprotocol/sdk to 1.27.1 (#19064)
* chore: storybook tweaks
* feat: restore git-backed review modes with effectful git service (#18900)
* chore: generate
* chore: update nix node_modules hashes
* chore: cleanup
* chore: remove dead code for todoread tool (#19128)
* chore: storybook tweaks
* fix(opencode): classify ZlibError from Bun fetch as retryable instead of unknown (#19104)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
* fix(task): respect agent permission config for todowrite tool (#19125)
* fix(app): agent normalization (#19169)
* fix: Windows e2e stability (CrossSpawnSpawner, snapshot isolation, session race guards) (#19163)
* fix+refactor(mcp): lifecycle tests, cancelPending fix, Effect migration (#19042)
* effectify Bus service: migrate to Effect PubSub + InstanceState (#18579)
* file: use Effect.cached for scan deduplication (#19164)
* ignore: update disavowed list (#19184)
* skill: use Effect.cached for load deduplication (#19165)
* chore: generate
* fix: bump gitlab-ai-provider to 5.3.3 for DWS tool approval support (#19185)
* test: restore 5 workers on Windows e2e (#19188)
* fix(opencode): image paste on Windows Terminal 1.25+ with kitty keyboard (#17674)
* chore: update nix node_modules hashes
* wip: zen
* wip: zen
* go: do not respect disabled zen models
* fix: ensure enterprise url is set properly during auth flow (#19212)
* revert: roll back git-backed review modes (#19295)
* chore: generate
* tui: bypass local SSE event streaming in worker (#19183)
* feat: embed WebUI in binary with proxy flags (#19299)
Co-authored-by: BlankParticle <blankparticle@gmail.com>
* release: v1.3.3
* chore: generate
* changelog ci tweaks
* refactor(lsp): effectify LSP service with InstanceState (#19150)
* chore: generate
* feat: add gpt prompt so non codex gpt models have their own system prompt modeled after codex cli (#19220)
* feat(core): remove workspace server, WorkspaceContext, start work towards better routing (#19316)
* effectify Config service (#19139)
* chore: generate
* refactor(config): use cachedInvalidateWithTTL, bump effect to beta.37 (#19322)
* fix(mcp): close transport on failed/timed-out connections (#19200)
* fix(app): more startup perf (#19288)
* chore: generate
* chore: update nix node_modules hashes
* fix(app): don't bundle fonts (#19329)
* chore: generate
* fix(app): default shell tool to collapsed
* fix(app): remove fork session button
* fix(ui): reduce markdown jank while responses stream (#19304)
* fix: web ui bundle build on windows (#19337)
* refactor(effect): yield services instead of promise facades (#19325)
* chore: generate
* refactor(vcs): replace async git() with ChildProcessSpawner (#19361)
* fix(opencode): ignore generated models snapshot files (#19362)
* fix(ui): keep partial markdown readable while responses stream (#19403)
* chore: update nix node_modules hashes
* fix(app): persist queued followups across project switches (#19421)
* refactor(tool-registry): yield Config/Plugin services, use Effect.forEach (#19363)
* chore: generate
* tui plugins (#19347)
* chore: generate
* effectify Skill service internals (#19364)
* chore: update nix node_modules hashes
* effectify Plugin service internals (#19365)
* refactor(core): split out instance and route through workspaces (#19335)
* chore(app): more spacing controls
* fix(ui): make streamed markdown feel more continuous (#19404)
* fix(app): resize layout viewport when mobile keyboard appears (#15841)
* fix(desktop-electron): match dev dock icon inset on macOS (#19429)
* fix(app): default file tree to closed with minimum width (#19426)
* fix flaky plugin tests (no mock.module for bun) (#19445)
* tweak: add additional overflow error patterns (#19446)
* no theme override in dev (#19456)
* feat: AI SDK v6 support (#18433)
* refactor(session): effectify Session service (#19449)
* refactor(core): move more responsibility to workspace routing (#19455)
* chore: update nix node_modules hashes
* refactor(format): use ChildProcessSpawner instead of Process.spawn (#19457)
* chore: generate
* Single target plugin entrypoints (#19467)
* refactor(session): effectify SessionCompaction service (#19459)
* feat(ci): use Azure Artifact Signing for Windows releases (#15201)
* fix(app): more startup efficiency (#19454)
* update effect to 4.0.0-beta.42 (#19484)
* chore: update nix node_modules hashes
* tweak: adjust bash tool description to increase cache hit rates between projects (#19487)
* refactor(session): move context into prompt footer (#19486)
* refactor(prompt): remove variant cycle display from footer (#19489)
* feat: add model variant selection dialog (#19488)
* fix: restore subagent footer and fix style guide violations (#19491)
* tweak(session): add top spacing and remove obsolete docs prompt
* upgrade opentui to 0.1.91 (#19440)
* refactor(file): use AppFileSystem instead of raw Filesystem (#19458)
* chore: generate
* chore: update nix node_modules hashes
* kv theme before default fallback (#19523)
* feat: open dialog for model variant selection instead of cycling (#19534)
* refactor(session): effectify session processor (#19485)
* feat: dialog variant menu and subagent improvements (#19537)
* use theme color for prompt placeholder (#19535)
* fix: update opencode-gitlab-auth to 2.0.1 (#19552)
* chore: update nix node_modules hashes
* prompt slot (#19563)
* fix: respect semver build identifiers for nix (#11915)
* fix: nix embedded web-ui support (#19561)
* ignore: kill todo (#19566)
* chore: update nix node_modules hashes
* wip: zen
* wip: zen
* zen: ZDR policy
* ci: cancel stale nix-hashes runs (#19571)
* release: v1.3.4
* refactor: kilo compat for v1.3.4
* fix: migration types
* refactor: upgrade kilo-gateway to ai sdk v6
* refactor: improve upstream merge script
* fix: fix some tests
* style(kilo-vscode): adjust indentation and formatting in parts-util and PopupSelector
Normalize boolean expression indentation in isCompletionResult to use
consistent 4-space alignment and reformat PopupSelectorProps generic
interface declaration to split the Omit type across multiple lines.
* docs(kilo-docs): update auto-generated source links
Remove outdated URLs and add new bug report issue link pointing to
anomalyco/opencode repository. Drop references to kilocode bug report
template and config precedence order docs, reducing total unique URLs
from 262 to 261.
* fix(kilo-ui): remove unused NerdFonts story and MONO_NERD_FONTS import
Drop the NerdFonts story from font.stories.tsx along with the unused
MONO_NERD_FONTS import, as the exported constant is no longer available
from the @opencode-ai/ui/font module.
* chore: update visual regression baselines
* fix(opencode): move Show conditional wrapper outside box in home onboarding
Relocate the Show component to wrap the box element instead of being
nested inside it, preventing the empty box from rendering when the
onboarding tip is not visible.
---------
Co-authored-by: Jay V <air@live.ca>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Dax <mail@thdxr.com>
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: opencode <opencode@sst.dev>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: James Long <longster@gmail.com>
Co-authored-by: André Cruz <acruz@cloudflare.com>
Co-authored-by: Ariane Emory <97994360+ariane-emory@users.noreply.github.com>
Co-authored-by: Vladimir Glafirov <vglafirov@gitlab.com>
Co-authored-by: Frank <frank@anoma.ly>
Co-authored-by: BlankParticle <blankparticle@gmail.com>
Co-authored-by: Sebastian <hasta84@gmail.com>
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>
Co-authored-by: Caleb Norton <n0603919@outlook.com>
Co-authored-by: Imanol Maiztegui <imanol.mzd@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>