Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
c2ca149
fix(opencode): preserve prompt tool enables with empty agent permissi…
jquense Mar 16, 2026
59c530c
fix(opencode): teach Kit's test what an ID is (#17745)
Hona Mar 16, 2026
4d7cbdc
fix(ci): workaround by using hoisted Bun linker on Windows (#17751)
Hona Mar 16, 2026
51fcd04
Wrap question option descriptions instead of truncating (#17782)
nexxeln Mar 16, 2026
c523aac
fix(cli): scope active org labels to the active account (#16957)
kitlangton Mar 16, 2026
15b27e0
fix(app): agent switch should not reset thinking level (#17470)
bugulo Mar 16, 2026
e718db6
fix(core): consider code: context_length_exceeded as context overflow…
ghost91- Mar 16, 2026
4cb2996
fix(opencode): apply message transforms during compaction (#17823)
Tarquinen Mar 16, 2026
469c3a4
refactor(instance): move scoped services to LayerMap (#17544)
kitlangton Mar 16, 2026
d4694d0
chore: generate
opencode-agent[bot] Mar 16, 2026
9e740d9
stack: effectify-file-watcher-service (#17827)
kitlangton Mar 16, 2026
ca3af5d
chore: generate
opencode-agent[bot] Mar 16, 2026
e5cbecf
fix+refactor(vcs): fix HEAD filter bug and effectify VcsService (#17829)
kitlangton Mar 16, 2026
410fbd8
chore: generate
opencode-agent[bot] Mar 16, 2026
2cbdf04
refactor(file-time): effectify FileTimeService with Semaphore locks (…
kitlangton Mar 16, 2026
03d84f4
chore: generate
opencode-agent[bot] Mar 16, 2026
3353562
refactor(format): effectify FormatService as scoped service (#17675)
kitlangton Mar 16, 2026
df65085
chore: generate
opencode-agent[bot] Mar 16, 2026
69381f6
refactor(file): effectify FileService as scoped service (#17845)
kitlangton Mar 16, 2026
8da511d
chore: generate
opencode-agent[bot] Mar 16, 2026
6880936
fix: github copilot enterprise integration (#17847)
rekram1-node Mar 16, 2026
e9a17e4
fix(windows): restore /editor support on Windows (#17146)
AbigailJixiangyuyu Mar 16, 2026
3849822
refactor(skill): effectify SkillService as scoped service (#17849)
kitlangton Mar 16, 2026
1cdc558
chore: generate
opencode-agent[bot] Mar 16, 2026
60af447
chore: update nix node_modules hashes
opencode-agent[bot] Mar 16, 2026
d7093ab
chore: update nix node_modules hashes
opencode-agent[bot] Mar 17, 2026
a64f604
fix(tui): check for selected text instead of any selection in dialog …
altendky Mar 17, 2026
cb69501
test(opencode): deflake file and tool timing (#17859)
Hona Mar 17, 2026
e416e59
test(app): deflake slash terminal toggle flow (#17881)
Hona Mar 17, 2026
f13da80
chore: denounce ai spammer (#17901)
rekram1-node Mar 17, 2026
544315d
docs: add describe annotation to snapshot config field (#17861)
altendky Mar 17, 2026
e14e874
chore: generate
opencode-agent[bot] Mar 17, 2026
dbbe931
fix(app): avoid prompt tooltip Switch on startup (#17857)
Hona Mar 17, 2026
b07b5a9
chore: generate
opencode-agent[bot] Mar 17, 2026
0afeaea
app: inherit owner when creating prompt session
Brendonovich Mar 17, 2026
ba22976
fix: inline review comment submit and layout (#17948)
nexxeln Mar 17, 2026
6708c3f
docs: mark tools config as deprecated (#17951)
OpeOginni Mar 17, 2026
dadddc9
zen: deprecate gemini 3 pro
fwang Mar 17, 2026
0772a95
wip: zen
fwang Mar 17, 2026
7daea69
tweak(ui): add an empty state to the sidebar when no projects (#17971)
iamdavidhill Mar 17, 2026
fbabc97
zen: error logging
fwang Mar 17, 2026
350df0b
zen: add missing model lab names
fwang Mar 17, 2026
6c04739
wip: zen
fwang Mar 17, 2026
fee3c19
add prompt schema validation debug logs (#17812)
kitlangton Mar 17, 2026
9e7c136
refactor(snapshot): effectify SnapshotService (#17878)
kitlangton Mar 18, 2026
bc949af
chore: generate
opencode-agent[bot] Mar 18, 2026
4b4dd2b
fix: Add apply_patch to EDIT_TOOLS filter (#18009)
ariane-emory Mar 18, 2026
5dfe86d
refactor(truncation): effectify TruncateService, delete Scheduler (#1…
kitlangton Mar 18, 2026
0292f1b
chore: generate
opencode-agent[bot] Mar 18, 2026
a849a17
feat(enterprise): contact form now pushes to salesforce 🙄 (#17964)
R44VC0RP Mar 18, 2026
fe43bdb
wip: zen
fwang Mar 18, 2026
1b86c27
wip: zen
fwang Mar 18, 2026
56102ff
fix(core): detect vLLM context overflow errors (#17763)
ghost91- Mar 18, 2026
37c5295
zen: gpt 5.4 mini and nano
fwang Mar 18, 2026
a43783a
app: initialize command catalog more efficiently
Brendonovich Mar 18, 2026
4ba7d3b
app: replace autoselect effects with single resource
Brendonovich Mar 18, 2026
331dacf
app: remove debug text
Brendonovich Mar 18, 2026
79635b8
docs(cli): update experimental TY LSP flag description for clarity ac…
OpeOginni Mar 18, 2026
58dce01
chore: generate
opencode-agent[bot] Mar 18, 2026
bfd4787
tui: clean up search button in session header by removing magnifying …
iamdavidhill Mar 18, 2026
d2194f6
Revert "tui: clean up search button in session header by removing mag…
iamdavidhill Mar 18, 2026
3256886
tui: make the title bar search easier to scan without a redundant icon
iamdavidhill Mar 18, 2026
0ca51ee
tweak(ui): theme overrides (#17958)
iamdavidhill Mar 18, 2026
976aae7
fix(desktop): fix error handling by adding errorName function to iden…
OpeOginni Mar 18, 2026
47cf267
zen: fix routing non OC traffic
fwang Mar 18, 2026
822bb7b
tweak: update gpt subscription model list (#18101)
rekram1-node Mar 18, 2026
171e69c
feat: integrate support for multi step auth flows for providers that …
rekram1-node Mar 18, 2026
a800583
refactor(effect): unify service namespaces and align naming (#18093)
kitlangton Mar 18, 2026
c3ddc85
chore: generate
opencode-agent[bot] Mar 18, 2026
3558deb
zen: minimax m2.7
fwang Mar 18, 2026
3f1c96a
zen: minimax m2.7
fwang Mar 18, 2026
8006c29
fix: docs
fwang Mar 18, 2026
1b0096b
docs: update go models
fwang Mar 18, 2026
8ee939c
tweak: remove unnecessary parts from the fallback system prompt (#18140)
rekram1-node Mar 18, 2026
54ed87d
fix(windows): use cross-spawn for shim-backed commands (#18010)
Hona Mar 18, 2026
a93d98b
chore: update nix node_modules hashes
opencode-agent[bot] Mar 18, 2026
5ddfe4a
chore: type Provider.list() as Record<ProviderID, Info>, delete dead …
kitlangton Mar 18, 2026
773c119
chore: generate
opencode-agent[bot] Mar 18, 2026
81be544
feat(filesystem): add AppFileSystem service, migrate Snapshot (#18138)
kitlangton Mar 18, 2026
5d2f8d7
fix: restore recent test regressions and upgrade effect beta (#18158)
Hona Mar 18, 2026
1c74c27
chore: update nix node_modules hashes
opencode-agent[bot] Mar 19, 2026
d90e3a2
chore: update nix node_modules hashes
opencode-agent[bot] Mar 19, 2026
a7ea935
zen: add mimo pro/omni models
fwang Mar 19, 2026
84e62fc
fix(session): preserve tagged error messages (#18165)
kitlangton Mar 19, 2026
8e09e8c
feat: integrate multistep auth flows into desktop app (#18103)
rekram1-node Mar 19, 2026
1ac1a02
anthropic legal requests (#18186)
thdxr Mar 19, 2026
5a0bfa7
chore: generate
opencode-agent[bot] Mar 19, 2026
f4a9fe2
fix(app): ignore repeated Enter submits in prompt input (#18148)
Mar 19, 2026
bd4527b
fix(desktop): remote server switching (#17214)
OpeOginni Mar 19, 2026
cbf4b68
electron: lazily read updater enabled
Brendonovich Mar 19, 2026
84f60d9
app: fix workspace flicker when switching directories (#18207)
Brendonovich Mar 19, 2026
e6f5214
feat: add git-backed session review modes (#17961)
nexxeln Mar 19, 2026
d178d82
chore: generate
opencode-agent[bot] Mar 19, 2026
41aa254
fix(app): show review on the empty session route (#18251)
nexxeln Mar 19, 2026
0d7e62a
fix forked prompt attachments losing file parts (#17815)
kitlangton Mar 19, 2026
aeece61
ignore: revert 3 commits that broke dev branch (#18260)
rekram1-node Mar 19, 2026
baa2041
chore: generate
opencode-agent[bot] Mar 19, 2026
0540751
fix(core): use a queue to process events in event routes (#18259)
jlongster Mar 19, 2026
a6f23cb
chore: generate
opencode-agent[bot] Mar 19, 2026
d69962b
fix(core): disable chunk timeout by default (#18264)
jlongster Mar 19, 2026
48a7f0f
Fix `base64Decode` import in workspaces.spec.ts (#18274)
jlongster Mar 19, 2026
2dbcd79
fix: stabilize agent and skill ordering in prompt descriptions (#18261)
jorgitin02 Mar 19, 2026
4f21757
chore: generate
opencode-agent[bot] Mar 19, 2026
6e09a1d
fix(account): handle pending console login polling (#18281)
kitlangton Mar 19, 2026
a6ef9e9
chore: generate
opencode-agent[bot] Mar 19, 2026
bd44489
go: upi payment
fwang Mar 19, 2026
63585db
refactor: replace Bun.sleep with node:timers/promises sleep (#18301)
thdxr Mar 19, 2026
9a58c43
go: upi translation
fwang Mar 19, 2026
812d1bb
chore: inline tool descriptions, remove separate .txt files (#18303)
thdxr Mar 19, 2026
2c056c9
doc: update translator to gpt model
fwang Mar 19, 2026
ddcb32a
refactor(tui): replace Bun-specific APIs with portable alternatives (…
thdxr Mar 19, 2026
37b8662
refactor: abstract SQLite behind runtime-conditional #db import (#18316)
thdxr Mar 20, 2026
52a7a04
refactor: replace Bun shell execution with portable Process utilities…
thdxr Mar 20, 2026
6fcc970
fix: include cache bin directory in which() lookups (#18320)
thdxr Mar 20, 2026
92cd908
feat: add Node.js entry point and build script (#18324)
thdxr Mar 20, 2026
949191a
chore: update nix node_modules hashes
opencode-agent[bot] Mar 20, 2026
b3d0446
feat: switch xai provider to responses API (#18175)
Jaaneek Mar 20, 2026
1071aca
fix: miscellaneous small fixes (#18328)
thdxr Mar 20, 2026
e71a21e
chore: update nix node_modules hashes
opencode-agent[bot] Mar 20, 2026
7866dbc
fix: avoid truncate permission import cycle (#18292)
Hona Mar 20, 2026
d460614
fix: lots of desktop stability, better e2e error logging (#18300)
Hona Mar 20, 2026
4989632
patch solid to try fix memo undefined under transition bug (#18338)
Brendonovich Mar 20, 2026
83cdb4d
chore: update nix node_modules hashes
opencode-agent[bot] Mar 20, 2026
0bbf26a
deslopity deslopity (#18343)
Hona Mar 20, 2026
27a70ad
fix(app): align review file comments with diff comments (#18406)
nexxeln Mar 20, 2026
d0a5730
app: file type filter on desktop + multiple files (#18403)
Brendonovich Mar 20, 2026
83023e4
docs: add Cloudflare Workers AI provider (#18322)
mchenco Mar 20, 2026
bfdc38e
tweak: adjust codex plugin logic so that codex instruction isn't alwa…
rekram1-node Mar 20, 2026
e78944e
effectify Installation service, drop Effect suffix from namespaces (#…
kitlangton Mar 20, 2026
51618e9
chore: generate
opencode-agent[bot] Mar 20, 2026
05d3e65
feat: enable GitLab Agent Platform with workflow model discovery (#18…
vglafirov Mar 20, 2026
ce845a0
chore: update nix node_modules hashes
opencode-agent[bot] Mar 20, 2026
d70099b
fix: apply Layer.fresh at instance service definition site (#18418)
kitlangton Mar 20, 2026
12b8e1c
chore: generate
opencode-agent[bot] Mar 20, 2026
24f9df5
fix: update stale account url/email on re-login (#18426)
kitlangton Mar 20, 2026
5c6ec1c
fix question cross out
thdxr Mar 20, 2026
3f249ab
commit and push
thdxr Mar 20, 2026
214a6c6
fix: switch consumers to service imports to break bundle cycles (#18438)
kitlangton Mar 20, 2026
129fe1e
ci
thdxr Mar 20, 2026
45ae7dc
Update VOUCHED list
github-actions[bot] Mar 21, 2026
dc00448
ignore: add danieljoshuanazareth to disavow list (#18476)
rekram1-node Mar 21, 2026
5dc4790
allow customizing DB location
thdxr Mar 21, 2026
6a64177
fix(zen): emit cost chunk in client-facing format, not upstream forma…
kitlangton Mar 21, 2026
40aeaa1
chore: generate
opencode-agent[bot] Mar 21, 2026
38e0dc9
Move service state into InstanceState, flatten service facades (#18483)
kitlangton Mar 21, 2026
2e0d5d2
chore: generate
opencode-agent[bot] Mar 21, 2026
9b805e1
wip: zen
fwang Mar 21, 2026
f80343b
fix annotation
thdxr Mar 21, 2026
fb6bf0b
chore: generate
opencode-agent[bot] Mar 21, 2026
9ad6588
app: allow navigating projects with keybinds (#18502)
Brendonovich Mar 21, 2026
6a16db4
app: manage mutation loading states with tanstack query (#18501)
Brendonovich Mar 21, 2026
9f7a76d
chore: generate
opencode-agent[bot] Mar 21, 2026
d5337b4
chore: update nix node_modules hashes
opencode-agent[bot] Mar 21, 2026
cc818f8
fix(provider): only set thinkingConfig for models with reasoning capa…
Protocol-zero-0 Mar 21, 2026
040f551
Upgrade opentui to 0.1.88 (#18079)
kommander Mar 21, 2026
832b8e2
chore: update nix node_modules hashes
opencode-agent[bot] Mar 21, 2026
10a3d6c
effectify SessionStatus service (#18565)
kitlangton Mar 21, 2026
0e0e7a4
effectify Command service (#18568)
kitlangton Mar 22, 2026
3236f22
effectify Plugin service (#18570)
kitlangton Mar 22, 2026
e82c5a9
chore: generate
opencode-agent[bot] Mar 22, 2026
fe53af4
effectify ToolRegistry service (#18571)
kitlangton Mar 22, 2026
13bac9c
effectify Pty service (#18572)
kitlangton Mar 22, 2026
c529529
fix(app): terminal rename from context menu (#18263)
neriousy Mar 22, 2026
32f9dc6
fix(ui): stop auto close of sidebar on resize (#18647)
iamdavidhill Mar 22, 2026
e2d03ce
feat: interactive update flow for non-patch releases (#18662)
thdxr Mar 22, 2026
eb3bfff
release: v1.3.0
Mar 22, 2026
4df67fb
refactor: kilo compat for v1.3.0
catrielmuller Apr 11, 2026
fa2c979
resolve merge conflicts
catrielmuller Apr 11, 2026
b230383
fix: fix main package.json
catrielmuller Apr 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/actions/setup-bun/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,13 @@ runs:
shell: bash

- name: Install dependencies
run: bun install
run: |
# Workaround for patched peer variants
# e.g. ./patches/ for standard-openapi
# https://github.com/oven-sh/bun/issues/28147
if [ "$RUNNER_OS" = "Windows" ]; then
bun install --linker hoisted
else
bun install
fi
shell: bash
26 changes: 21 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,17 @@ jobs:
# kilocode_change - disabled: packages/app is not actively maintained
if: false
name: e2e (${{ matrix.settings.name }})
needs: unit
strategy:
fail-fast: false
matrix:
settings:
- name: linux
host: blacksmith-4vcpu-ubuntu-2404
playwright: bunx playwright install --with-deps
- name: windows
host: blacksmith-4vcpu-windows-2025
playwright: bunx playwright install
runs-on: ${{ matrix.settings.host }}
env:
PLAYWRIGHT_BROWSERS_PATH: 0
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers
defaults:
run:
shell: bash
Expand All @@ -78,9 +75,28 @@ jobs:
- name: Setup Bun
uses: ./.github/actions/setup-bun

- name: Read Playwright version
id: playwright-version
run: |
version=$(node -e 'console.log(require("./packages/app/package.json").devDependencies["@playwright/test"])')
echo "version=$version" >> "$GITHUB_OUTPUT"

- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.playwright-browsers
key: ${{ runner.os }}-${{ runner.arch }}-playwright-${{ steps.playwright-version.outputs.version }}-chromium

- name: Install Playwright system dependencies
if: runner.os == 'Linux'
working-directory: packages/app
run: bunx playwright install-deps chromium

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: packages/app
run: ${{ matrix.settings.playwright }}
run: bunx playwright install chromium

- name: Run app e2e tests
run: bun --cwd packages/app test:e2e:local
Expand Down
121 changes: 121 additions & 0 deletions .kilo/plans/1775851318486-tidy-comet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Re-implement kilocode changes on new `packages/opencode/src/permission/next.ts`

## Context

The upstream `next.ts` was refactored to use an Effect-based `PermissionService` (`service.ts`). The old kilocode changes were lost. The new `next.ts` is a thin adapter that delegates to `service.ts` via `runPromise`. We need to re-add all kilocode-specific functionality.

The old kilocode changes provided:
1. **`toConfig()`** — inverse of `fromConfig`, converts rules back to config format
2. **`saveAlwaysRules()`** — granular always-allow/deny rule persistence (used by `/permission/:requestID/always-rules` route)
3. **`allowEverything()`** — toggle allow-all mode per-session or globally (used by `/permission/allow-everything` route)
4. **`pending()`** — get a single pending request by ID
5. **Config protection** — force "ask" for config file edits, disable "always" for config files
6. **Session-scoped rules** — `s.session[sessionID]` local ruleset evaluated alongside approved rules
7. **Null sentinel filtering** in `fromConfig` — skip `null` entries from config patches
8. **`drainCovered()`** integration — auto-resolve sibling pending permissions after rule changes
9. **`ruleset` stored on `PendingEntry`** — needed by `drainCovered` and `saveAlwaysRules`
10. **Persist always-rules to global config** in `reply("always")`

## Architecture Decision

The new code splits into two layers:
- **`service.ts`** — Effect-based `PermissionService` with `ask`, `reply`, `list` (upstream code)
- **`next.ts`** — namespace adapter that wraps `service.ts` and adds non-Effect exports

**Strategy**: Add kilocode features in `next.ts` (the adapter layer) to minimize changes to shared `service.ts`. Where service-level changes are unavoidable (e.g., storing `ruleset` on `PendingEntry`, adding `session` to state, config protection in `ask`/`reply`), annotate them with `kilocode_change` markers in `service.ts`.

## Changes

### 1. `packages/opencode/src/permission/service.ts` — Minimal shared-code changes

These changes are necessary because the service owns the state and Effect logic:

#### 1a. Add `session` to `State` type
```ts
type State = {
pending: Map<PermissionID, PendingEntry>
approved: Ruleset
session: Record<string, Ruleset> // kilocode_change
}
```
Initialize `session: {}` in the `InstanceState.make` factory.

#### 1b. Add `ruleset` to `PendingEntry`
```ts
interface PendingEntry {
info: Request
ruleset: Ruleset // kilocode_change
deferred: Deferred.Deferred<void, RejectedError | CorrectedError>
}
```
Store `ruleset` when creating pending entries in `ask`.

#### 1c. Config protection in `ask`
- Import `ConfigProtection` from `@/kilocode/permission/config-paths`
- Evaluate with `local` session rules: `evaluate(permission, pattern, ruleset, state.approved, local)`
- After evaluating `allow`, check `ConfigProtection.isRequest(request)` and if true, override to `ask` behavior
- Inject `disableAlways` metadata key when config-protected

#### 1d. Config protection in `reply("always")`
- Import `ConfigProtection`
- Before persisting always-rules, check `ConfigProtection.isRequest(existing.info)` — if true, downgrade to `once` (resolve deferred, return early)
- When evaluating pending siblings after "always", include `item.ruleset` in `evaluate()` call
- After resolving pending siblings, persist always-rules to global config via `Config.updateGlobal`

#### 1e. Export new service methods on `PermissionService.Api`
Add to the interface:
- `saveAlwaysRules`
- `allowEverything`
- `pending`

Implement them inside the `Layer.effect` block as Effect functions.

#### 1f. `DeniedError` constructor compatibility
The old `DeniedError` accepted a `Ruleset` directly. The new one uses `Schema.TaggedErrorClass` with `{ ruleset: Schema.Any }`. The `drain.ts` currently calls `new DeniedError(ruleset)` — need to update to `new DeniedError({ ruleset })` in `drain.ts`, or keep compatibility. Since `drain.ts` is kilocode-owned, update `drain.ts`.

### 2. `packages/opencode/src/permission/next.ts` — Adapter additions

#### 2a. Add `toConfig()` function
Port the `toConfig` implementation with `SCALAR_ONLY_PERMISSIONS` set. This is a pure function that doesn't need the service.

#### 2b. Add null sentinel filtering to `fromConfig()`
Add `if (value === null) continue` after the string check, and filter nulls from object entries.

#### 2c. Add `saveAlwaysRules` export
Delegate to `runPromise((service) => service.saveAlwaysRules(input))`.

#### 2d. Add `allowEverything` export
Delegate to `runPromise((service) => service.allowEverything(input))`.

#### 2e. Add `pending` export
Delegate to `runPromise((service) => service.pending(input))`.

### 3. `packages/opencode/src/kilocode/permission/drain.ts` — Update for new types

The `drain.ts` file needs to be updated for the new architecture:
- The `PendingEntry` now uses `Deferred` instead of `resolve`/`reject` callbacks
- `DeniedError` is now an Effect `TaggedErrorClass` requiring `new DeniedError({ ruleset })`
- **Option A**: Rewrite `drainCovered` as an Effect function that receives the state and uses `Deferred.succeed`/`Deferred.fail`
- **Option B**: Keep `drainCovered` as a plain async function but adapt the interface

Since `drain.ts` is kilocode-only code, **Option A** is cleaner — rewrite it as an Effect function that operates directly on the `State` type from `service.ts`.

### 4. No changes needed

- `config-paths.ts` — unchanged, works as-is
- `routes.ts` — unchanged, already calls `PermissionNext.allowEverything`, `PermissionNext.toConfig`
- `server/routes/permission.ts` — unchanged, already calls `PermissionNext.saveAlwaysRules`

## File change summary

| File | Type | Description |
|------|------|-------------|
| `packages/opencode/src/permission/service.ts` | Modify (shared) | Add session state, ruleset on PendingEntry, config protection, new service methods, persist always-rules |
| `packages/opencode/src/permission/next.ts` | Modify (shared) | Add toConfig, null filtering in fromConfig, delegate new methods |
| `packages/opencode/src/kilocode/permission/drain.ts` | Modify (kilo) | Adapt to Effect Deferred + new DeniedError constructor |

## Verification

- `bun run typecheck` from `packages/opencode/`
- `bun test` from `packages/opencode/` to ensure no regressions
- Verify the permission routes still compile by checking the server builds
8 changes: 5 additions & 3 deletions .opencode/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
plans/
bun.lock
node_modules
plans
package.json
package-lock.json
bun.lock
.gitignore
package-lock.json
12 changes: 10 additions & 2 deletions .opencode/tool/github-pr-search.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference path="../env.d.ts" />
import { tool } from "@kilocode/plugin"
import DESCRIPTION from "./github-pr-search.txt"

async function githubFetch(endpoint: string, options: RequestInit = {}) {
const response = await fetch(`https://api.github.com${endpoint}`, {
Expand All @@ -24,7 +23,16 @@ interface PR {
}

export default tool({
description: DESCRIPTION,
description: `Use this tool to search GitHub pull requests by title and description.

This tool searches PRs in the anomalyco/opencode repository and returns LLM-friendly results including:
- PR number and title
- Author
- State (open/closed/merged)
- Labels
- Description snippet

Use the query parameter to search for keywords that might appear in PR titles or descriptions.`,
args: {
query: tool.schema.string().describe("Search query for PR titles and descriptions"),
limit: tool.schema.number().describe("Maximum number of results to return").default(10),
Expand Down
10 changes: 0 additions & 10 deletions .opencode/tool/github-pr-search.txt

This file was deleted.

27 changes: 23 additions & 4 deletions .opencode/tool/github-triage.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
/// <reference path="../env.d.ts" />
// import { Octokit } from "@octokit/rest"
import { tool } from "@kilocode/plugin"
import DESCRIPTION from "./github-triage.txt"
import { tool } from "@opencode-ai/plugin"
// kilocode_change start
const TEAM = {
desktop: ["kirillk"],
zen: ["chrarnoldus"],
tui: ["alex-alecu", "marius-kilocode", "catrielmuller"],
core: ["alex-alecu", "marius-kilocode", "catrielmuller"],
docs: ["lambertjosh"],
windows: ["imanolmzd-svg", "kirillk"],
} as const
// kilocode_change end

const ASSIGNEES = [...new Set(Object.values(TEAM).flat())]

function pick<T>(items: readonly T[]) {
return items[Math.floor(Math.random() * items.length)]!
}

function getIssueNumber(): number {
const issue = parseInt(process.env.ISSUE_NUMBER ?? "", 10)
Expand All @@ -26,7 +40,12 @@ async function githubFetch(endpoint: string, options: RequestInit = {}) {
}

export default tool({
description: DESCRIPTION,
description: `Use this tool to assign and/or label a GitHub issue.

Choose labels and assignee using the current triage policy and ownership rules.
Pick the most fitting labels for the issue and assign one owner.

If unsure, choose the team/section with the most overlap with the issue and assign a member from that team at random.`,
args: {
assignee: tool.schema
.enum(["thdxr", "adamdotdevin", "rekram1-node", "fwang", "jayair", "kommander"])
Expand Down
6 changes: 0 additions & 6 deletions .opencode/tool/github-triage.txt

This file was deleted.

Loading
Loading