chore: regenerate SDK

This commit is contained in:
Imanol Maiztegui
2026-04-27 19:00:21 +02:00
parent d4e44b6128
commit 85eb4fa69b
24 changed files with 69197 additions and 1122 deletions
@@ -1,13 +1,13 @@
on:
schedule:
- cron: "7,37 * * * *" # every 30 min at :07 and :37
- cron: "7,37 * * * *" # every 30 min at :07 and :37
workflow_dispatch:
concurrency:
group: opencode-release-watch
cancel-in-progress: false
permissions:
permissions:
contents: read
jobs:
@@ -66,4 +66,3 @@ jobs:
with:
path: .cache/last-seen
key: last-seen-${{ steps.fetch.outputs.tag }}
+21 -23
View File
@@ -32,11 +32,11 @@ For in-process tests (no socket, fastest loop) see `packages/opencode/test/kiloc
## 2. `kilo serve` vs `bun dev serve` — important
| Command | What it runs |
|---|---|
| `kilo serve` | The npm-installed production CLI on `$PATH`. **Not the code in this repo.** |
| `bun dev serve …` (repo root) | The local main-branch backend from this worktree. **This is what you want.** |
| `bun run --cwd packages/opencode --conditions=browser src/index.ts serve …` | Same as `bun dev serve`, fully expanded. |
| Command | What it runs |
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `kilo serve` | The npm-installed production CLI on `$PATH`. **Not the code in this repo.** |
| `bun dev serve …` (repo root) | The local main-branch backend from this worktree. **This is what you want.** |
| `bun run --cwd packages/opencode --conditions=browser src/index.ts serve …` | Same as `bun dev serve`, fully expanded. |
Root `package.json` defines `"dev"` as the full `bun run --cwd packages/opencode --conditions=browser src/index.ts` invocation, so `bun dev <args>` forwards `<args>` to the local CLI entry point (`packages/opencode/src/index.ts`) without touching the installed binary.
@@ -82,13 +82,13 @@ BASE="http://127.0.0.1:$PORT"
### Flags (`packages/opencode/src/cli/network.ts`)
| Flag | Default | Notes |
|---|---|---|
| `--port` | `0` (OS-assigned) | Must be passed literally when overriding `opencode.json`'s `server.port`. |
| `--hostname` | `127.0.0.1` | Becomes `0.0.0.0` when `--mdns` is set without an override. |
| `--mdns` | `false` | Publishes an mDNS SRV record. |
| `--mdns-domain` | `kilo.local` | |
| `--cors` | `[]` | Extra allowed origins. |
| Flag | Default | Notes |
| --------------- | ----------------- | ------------------------------------------------------------------------- |
| `--port` | `0` (OS-assigned) | Must be passed literally when overriding `opencode.json`'s `server.port`. |
| `--hostname` | `127.0.0.1` | Becomes `0.0.0.0` when `--mdns` is set without an override. |
| `--mdns` | `false` | Publishes an mDNS SRV record. |
| `--mdns-domain` | `kilo.local` | |
| `--cors` | `[]` | Extra allowed origins. |
## 4. The two mandatory request knobs
@@ -190,14 +190,14 @@ rm -f /tmp/kilo-serve.pid /tmp/kilo-serve.log
## 7. Useful environment variables
| Var | Why you'd set it |
|---|---|
| `KILO_SERVER_PASSWORD` | Enable Basic auth. Omit for auth-bypassed local testing. |
| `KILO_DB=":memory:"` | Skip on-disk SQLite — hermetic runs. |
| `KILO_DISABLE_DEFAULT_PLUGINS=true` | Don't auto-load bundled plugins. |
| `KILO_WORKSPACE_ID=<id>` | Single-workspace mode; disables control-plane routes. |
| `KILO_TELEMETRY_LEVEL=off` | Disable PostHog during tests. |
| `KILO_CONFIG_CONTENT='{…}'` | Inline JSON config without writing a file. |
| Var | Why you'd set it |
| ----------------------------------- | -------------------------------------------------------- |
| `KILO_SERVER_PASSWORD` | Enable Basic auth. Omit for auth-bypassed local testing. |
| `KILO_DB=":memory:"` | Skip on-disk SQLite — hermetic runs. |
| `KILO_DISABLE_DEFAULT_PLUGINS=true` | Don't auto-load bundled plugins. |
| `KILO_WORKSPACE_ID=<id>` | Single-workspace mode; disables control-plane routes. |
| `KILO_TELEMETRY_LEVEL=off` | Disable PostHog during tests. |
| `KILO_CONFIG_CONTENT='{…}'` | Inline JSON config without writing a file. |
## 8. Last resort: typed SDK via a throwaway script
@@ -209,9 +209,7 @@ import { createKiloClient } from "@kilocode/sdk/v2"
const port = process.env.PORT!
const pass = process.env.KILO_SERVER_PASSWORD
const headers = pass
? { Authorization: "Basic " + Buffer.from("kilo:" + pass).toString("base64") }
: undefined
const headers = pass ? { Authorization: "Basic " + Buffer.from("kilo:" + pass).toString("base64") } : undefined
const client = createKiloClient({
baseUrl: `http://127.0.0.1:${port}`,
+2 -4
View File
@@ -398,8 +398,7 @@ export const dict = {
"toast.session.unshare.failed.description": "Une erreur s'est produite lors de l'annulation du partage de la session",
"toast.session.listFailed.title": "Échec du chargement des sessions pour {{project}}",
"toast.update.title": "Mise à jour disponible",
"toast.update.description":
"Une nouvelle version d'Kilo ({{version}}) est maintenant disponible pour installation.",
"toast.update.description": "Une nouvelle version d'Kilo ({{version}}) est maintenant disponible pour installation.",
"toast.update.action.installRestart": "Installer et redémarrer",
"toast.update.action.notYet": "Pas encore",
"error.page.title": "Quelque chose s'est mal passé",
@@ -549,8 +548,7 @@ export const dict = {
"sidebar.workspaces.enable": "Activer les espaces de travail",
"sidebar.workspaces.disable": "Désactiver les espaces de travail",
"sidebar.gettingStarted.title": "Commencer",
"sidebar.gettingStarted.line1":
"Kilo inclut des modèles gratuits pour que vous puissiez commencer immédiatement.",
"sidebar.gettingStarted.line1": "Kilo inclut des modèles gratuits pour que vous puissiez commencer immédiatement.",
"sidebar.gettingStarted.line2":
"Connectez n'importe quel fournisseur pour utiliser des modèles, y compris Claude, GPT, Gemini etc.",
"sidebar.project.recentSessions": "Sessions récentes",
+1 -2
View File
@@ -149,8 +149,7 @@ export const dict = {
"provider.connect.oauth.code.invalid": "รหัสการอนุญาตไม่ถูกต้อง",
"provider.connect.oauth.auto.visit.prefix": "เยี่ยมชม ",
"provider.connect.oauth.auto.visit.link": "ลิงก์นี้",
"provider.connect.oauth.auto.visit.suffix":
" และป้อนรหัสด้านล่างเพื่อเชื่อมต่อบัญชีและใช้โมเดล {{provider}} ใน Kilo",
"provider.connect.oauth.auto.visit.suffix": " และป้อนรหัสด้านล่างเพื่อเชื่อมต่อบัญชีและใช้โมเดล {{provider}} ใน Kilo",
"provider.connect.oauth.auto.confirmationCode": "รหัสยืนยัน",
"provider.connect.toast.connected.title": "{{provider}} ที่เชื่อมต่อแล้ว",
"provider.connect.toast.connected.description": "โมเดล {{provider}} พร้อมใช้งานแล้ว",
+1 -2
View File
@@ -150,8 +150,7 @@ export const dict = {
"provider.connect.oauth.code.invalid": "授權碼無效",
"provider.connect.oauth.auto.visit.prefix": "造訪 ",
"provider.connect.oauth.auto.visit.link": "此連結",
"provider.connect.oauth.auto.visit.suffix":
" 並輸入以下程式碼,以連線你的帳戶並在 Kilo 中使用 {{provider}} 模型。",
"provider.connect.oauth.auto.visit.suffix": " 並輸入以下程式碼,以連線你的帳戶並在 Kilo 中使用 {{provider}} 模型。",
"provider.connect.oauth.auto.confirmationCode": "確認碼",
"provider.connect.toast.connected.title": "{{provider}} 已連線",
"provider.connect.toast.connected.description": "現在可以使用 {{provider}} 模型了。",
@@ -71,9 +71,7 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
const activeFileTab = tabState.activeFileTab
const closableTab = tabState.closableTab
const shown = () =>
platform.platform !== "desktop" ||
import.meta.env.VITE_KILO_CHANNEL !== "beta" ||
settings.general.showFileTree()
platform.platform !== "desktop" || import.meta.env.VITE_KILO_CHANNEL !== "beta" || settings.general.showFileTree()
const idle = { type: "idle" as const }
const status = () => sync.data.session_status[params.id ?? ""] ?? idle
@@ -20,11 +20,11 @@ When you describe a task, the agent uses its tools — `read`, `grep`, `glob`, a
Type `@` in the chat input to get autocomplete suggestions. You can mention:
| Mention | Description | Example |
| ---------------- | ----------------------------------------------------- | --------------- |
| **File** | Attach a file's contents to your message | `@src/utils.ts` |
| **Terminal** | Include your active VS Code terminal output | `@terminal` |
| **Git Changes** | Attach uncommitted working-tree diffs and new files | `@git-changes` |
| Mention | Description | Example |
| --------------- | --------------------------------------------------- | --------------- |
| **File** | Attach a file's contents to your message | `@src/utils.ts` |
| **Terminal** | Include your active VS Code terminal output | `@terminal` |
| **Git Changes** | Attach uncommitted working-tree diffs and new files | `@git-changes` |
Selecting a suggestion inserts the mention and highlights it in the input. File contents, terminal output, and git changes are attached as context when you send the message.
@@ -587,7 +587,7 @@ Options:
--path directory path to generate the agent file [string]
--description what the agent should do [string]
--mode agent mode [string] [choices: "all", "primary", "subagent"]
--tools comma-separated list of tools to enable (default: all). Available: "bash, read, write, edit, list, glob, grep, webfetch, task, todowrite" [string]
--tools comma-separated list of tools to enable (default: all). Available: "bash, read, write, edit, glob, grep, webfetch, task, todowrite" [string]
-m, --model model to use in the format of provider/model [string]
```
@@ -472,12 +472,12 @@ Default legacy mode slugs (`code`, `build`, `architect`, `ask`, `debug`, `orches
The CLI reads legacy mode files from the following locations (in load order). When the same slug appears in multiple sources, the **last loaded source wins**:
| Load Order | Path | Format | Scope |
|------------|------|--------|-------|
| 1 | VSCode extension global storage `/settings/custom_modes.yaml` | YAML | Global |
| 2 | `~/.kilocode/cli/global/settings/custom_modes.yaml` | YAML | Global |
| 3 | `~/.kilocodemodes` | YAML | Global |
| 4 | `<project>/.kilocodemodes` | YAML | Project (wins on conflict) |
| Load Order | Path | Format | Scope |
| ---------- | ------------------------------------------------------------- | ------ | -------------------------- |
| 1 | VSCode extension global storage `/settings/custom_modes.yaml` | YAML | Global |
| 2 | `~/.kilocode/cli/global/settings/custom_modes.yaml` | YAML | Global |
| 3 | `~/.kilocodemodes` | YAML | Global |
| 4 | `<project>/.kilocodemodes` | YAML | Project (wins on conflict) |
{% callout type="info" %}
`~/.config/kilo/` is the XDG config directory for the new agent format — legacy `custom_modes.yaml` placed there will **not** be loaded. Use `~/.config/kilo/agent/*.md` or `~/.config/kilo/kilo.jsonc` for new agent definitions instead.
+1 -1
View File
@@ -32,7 +32,7 @@ export const GenerateCommand = {
}
}
const raw = JSON.stringify(specs, null, 2)
// kilocode_change start - replace upstream product name in all descriptions
// kilocode_change start - replace upstream product name in all descriptions
.replaceAll("OpenCode", "Kilo")
.replaceAll("opencode.local", "kilo.local")
.replaceAll("opencode serve", "kilo serve")
@@ -21,11 +21,12 @@ export function DialogSessionRename(props: DialogSessionRenameProps) {
title="Rename Session"
value={session()?.title ?? props.title} // kilocode_change
onConfirm={(value) => {
void sdk.client.session.update({
sessionID: props.session,
title: value,
})
.then(() => props.onConfirm?.()) // kilocode_change
void sdk.client.session
.update({
sessionID: props.session,
title: value,
})
.then(() => props.onConfirm?.()) // kilocode_change
dialog.clear()
}}
onCancel={() => dialog.clear()}
+2 -5
View File
@@ -19,8 +19,7 @@ function number(key: string) {
const KILO_EXPERIMENTAL = truthy("KILO_EXPERIMENTAL")
const KILO_DISABLE_CLAUDE_CODE = truthy("KILO_DISABLE_CLAUDE_CODE")
const KILO_DISABLE_CLAUDE_CODE_SKILLS =
KILO_DISABLE_CLAUDE_CODE || truthy("KILO_DISABLE_CLAUDE_CODE_SKILLS")
const KILO_DISABLE_CLAUDE_CODE_SKILLS = KILO_DISABLE_CLAUDE_CODE || truthy("KILO_DISABLE_CLAUDE_CODE_SKILLS")
const copy = process.env["KILO_EXPERIMENTAL_DISABLE_COPY_ON_SELECT"]
export const Flag = {
@@ -55,9 +54,7 @@ export const Flag = {
// Experimental
KILO_EXPERIMENTAL,
KILO_EXPERIMENTAL_FILEWATCHER: Config.boolean("KILO_EXPERIMENTAL_FILEWATCHER").pipe(
Config.withDefault(false),
),
KILO_EXPERIMENTAL_FILEWATCHER: Config.boolean("KILO_EXPERIMENTAL_FILEWATCHER").pipe(Config.withDefault(false)),
KILO_EXPERIMENTAL_DISABLE_FILEWATCHER: Config.boolean("KILO_EXPERIMENTAL_DISABLE_FILEWATCHER").pipe(
Config.withDefault(false),
),
@@ -84,7 +84,10 @@ export namespace KilocodeConfigInjector {
* Merge permission configs, preserving order and handling duplicates.
* Incoming rules take precedence (kilocode patterns override).
*/
function mergePermissions(existing: ConfigPermission.Info | undefined, incoming: ConfigPermission.Info): ConfigPermission.Info {
function mergePermissions(
existing: ConfigPermission.Info | undefined,
incoming: ConfigPermission.Info,
): ConfigPermission.Info {
if (!existing) return incoming
const result: ConfigPermission.Info = { ...existing }
@@ -200,7 +200,10 @@ export namespace IgnoreMigrator {
* Load .kilocodeignore and return permission config.
* Handles all logging internally.
*/
export async function loadIgnoreConfig(projectDir: string, skipGlobalPaths?: boolean): Promise<ConfigPermission.Info> {
export async function loadIgnoreConfig(
projectDir: string,
skipGlobalPaths?: boolean,
): Promise<ConfigPermission.Info> {
try {
const result = await migrate({ projectDir, skipGlobalPaths })
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -1312,8 +1312,7 @@ const layer: Layer.Layer<
const providerID = ProviderID.make(id)
// kilocode_change start - keep OAuth plugin source when config and Codex auth coexist
const oauth =
auths[providerID]?.type === "oauth" &&
plugins.some((x) => x.auth?.provider === providerID && x.auth.loader)
auths[providerID]?.type === "oauth" && plugins.some((x) => x.auth?.provider === providerID && x.auth.loader)
const partial: Partial<Info> = oauth ? {} : { source: "config" }
if (provider.env) partial.env = provider.env
// kilocode_change end
+2 -1
View File
@@ -108,7 +108,8 @@ const app = (upgrade: UpgradeWebSocket) =>
const log = Log.Default.clone().tag("service", "server-proxy")
export async function http(url: string | URL, extra: HeadersInit | undefined, req: Request, workspaceID: WorkspaceID) {
if (!(await Workspace.isSyncing(workspaceID))) { // kilocode_change missing await
if (!(await Workspace.isSyncing(workspaceID))) {
// kilocode_change missing await
return new Response(`broken sync connection for workspace: ${workspaceID}`, {
status: 503,
headers: {
+2 -1
View File
@@ -83,7 +83,8 @@ export const layer = Layer.effect(
const skill = yield* Skill.Service
return Service.of({
environment(model, editorContext) { // kilocode_change
environment(model, editorContext) {
// kilocode_change
const project = Instance.project
return [
[
+1 -1
View File
@@ -338,4 +338,4 @@ export const write = <T>(key: string[], content: T) => runPromise((svc) => svc.w
export const remove = (key: string[]) => runPromise((svc) => svc.remove(key))
export const list = (prefix: string[]) => runPromise((svc) => svc.list(prefix))
export const update = <T>(key: string[], fn: (draft: T) => void) => runPromise((svc) => svc.update<T>(key, fn))
// kilocode_change end
// kilocode_change end
+2 -1
View File
@@ -56,7 +56,8 @@ export const Parameters = Schema.Struct({
workdir: Schema.optional(Schema.String).annotate({
description: `The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.`,
}),
description: Schema.optional(Schema.String).annotate({ // kilocode_change
description: Schema.optional(Schema.String).annotate({
// kilocode_change
// kilocode_change start
description:
"Recommended: a clear, concise description of what this command does in 5-10 words. Examples:\nInput: ls\nOutput: Lists files in current directory\n\nInput: git status\nOutput: Shows working tree status\n\nInput: npm install\nOutput: Installs package dependencies\n\nInput: mkdir foo\nOutput: Creates directory 'foo'",
+76 -39
View File
@@ -467,45 +467,32 @@ export type EventCommandExecuted = {
}
}
export type SuggestionAction = {
/**
* Button or option label (1-5 words)
*/
label: string
/**
* Brief explanation of what this action does
*/
description?: string
/**
* Synthetic user prompt to inject when this action is accepted
*/
prompt: string
}
export type SuggestionRequest = {
id: string
sessionID: string
/**
* Suggestion text shown to the user
*/
text: string
/**
* Available actions the user can take
*/
actions: Array<SuggestionAction>
/**
* Whether this suggestion blocks prompt input. When unset, the TUI treats the suggestion as blocking for backwards compatibility; the built-in suggest tool always sets this to false.
*/
blocking?: boolean
tool?: {
messageID: string
callID: string
}
}
export type EventSuggestionShown = {
type: "suggestion.shown"
properties: SuggestionRequest
properties: {
id: string
sessionID: string
text: string
actions: Array<{
/**
* Button or option label (1-5 words)
*/
label: string
/**
* Brief explanation of what this action does
*/
description?: string
/**
* Synthetic user prompt to inject when this action is accepted
*/
prompt: string
}>
blocking?: boolean
tool?: {
messageID: string
callID: string
}
}
}
export type EventSuggestionAccepted = {
@@ -514,7 +501,20 @@ export type EventSuggestionAccepted = {
sessionID: string
requestID: string
index: number
action: SuggestionAction
action: {
/**
* Button or option label (1-5 words)
*/
label: string
/**
* Brief explanation of what this action does
*/
description?: string
/**
* Synthetic user prompt to inject when this action is accepted
*/
prompt: string
}
}
}
@@ -1828,7 +1828,8 @@ export type Config = {
*/
prompt?: string
}
/* Thresholds for truncating tool output. When output exceeds either limit, the full text is written to the truncation directory and a preview is returned.
/**
* Thresholds for truncating tool output. When output exceeds either limit, the full text is written to the truncation directory and a preview is returned.
*/
tool_output?: {
/**
@@ -2422,6 +2423,42 @@ export type FormatterStatus = {
enabled: boolean
}
export type SuggestionAction = {
/**
* Button or option label (1-5 words)
*/
label: string
/**
* Brief explanation of what this action does
*/
description?: string
/**
* Synthetic user prompt to inject when this action is accepted
*/
prompt: string
}
export type SuggestionRequest = {
id: string
sessionID: string
/**
* Suggestion text shown to the user
*/
text: string
/**
* Available actions the user can take
*/
actions: Array<SuggestionAction>
/**
* Whether this suggestion blocks prompt input. When unset, the TUI treats the suggestion as blocking for backwards compatibility; the built-in suggest tool always sets this to false.
*/
blocking?: boolean
tool?: {
messageID: string
callID: string
}
}
export type GlobalHealthData = {
body?: never
path?: never
+1377 -1005
View File
File diff suppressed because it is too large Load Diff
+1 -8
View File
@@ -1,12 +1,5 @@
import { NodeFileSystem } from "@effect/platform-node"
import {
dirname,
isAbsolute,
join,
relative,
resolve as pathResolve,
sep,
} from "path" // kilocode_change - harden containment checks
import { dirname, isAbsolute, join, relative, resolve as pathResolve, sep } from "path" // kilocode_change - harden containment checks
import { realpathSync } from "fs"
import * as NFS from "fs/promises"
import { lookup } from "mime-types"
+1 -1
View File
@@ -7,4 +7,4 @@
/// <reference path="../../sst-env.d.ts" />
import "sst"
export {}
export {}