Files
kilocode/package.json
T
marius-kilocode 203f19f5d6 fix(cli): keep PTY output and exit emitted before listeners attach
bun-pty fires onData and onExit once from its read loop and drops events
that arrive while no listener is attached. Two races lost them for short
lived children such as sh -c 'printf x; exit 7':

- The Pty service registers its listeners after yield* Effect.sync(spawn),
  and the fiber can yield there for 20-100 ms under load. Buffer early
  events in a latch and replay them when a listener attaches.
- The bun-pty Terminal constructor runs the first read synchronously, so
  output the reader thread queued while the child started fired with no
  listeners at all. Patch bun-pty to defer the first read by a microtask.

Under 6x parallel load the pty tests failed 8 of 24 runs before and pass
36 of 36 with both changes.
2026-09-11 11:15:57 +02:00

185 lines
6.6 KiB
JSON

{
"$schema": "https://json.schemastore.org/package.json",
"name": "@kilocode/kilo",
"description": "AI-powered development tool",
"private": true,
"type": "module",
"packageManager": "bun@1.3.14",
"scripts": {
"dev": "KILO_CLIENT=cli bun run --cwd packages/opencode --conditions=node src/index.ts",
"dev:stats": "bun sst shell --stage=production -- bun run --cwd packages/stats/app dev",
"dev:storybook": "bun --cwd packages/storybook storybook",
"lint": "oxlint",
"check:architecture": "bun run script/check-architecture.ts",
"check:duplication": "bun run script/check-kilocode-duplication.ts",
"typecheck": "bun turbo typecheck",
"upgrade-opentui": "bun run script/upgrade-opentui.ts",
"postinstall": "bun run --cwd packages/core fix-node-pty && bun run script/setup-git.ts",
"prepare": "husky",
"random": "echo 'Random script'",
"sso": "aws sso login --sso-session=opencode --no-browser",
"test": "echo 'do not run tests from root' && exit 1",
"test:script:ci": "mkdir -p .artifacts/unit && bun test ./script --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml",
"extension": "bun --cwd packages/kilo-vscode script/launch.ts",
"extension:isolated": "bun --cwd packages/kilo-vscode script/launch.ts --isolated",
"extension:isolated:clean": "bun --cwd packages/kilo-vscode script/launch.ts --isolated --clean",
"dev-setup": "bun run --cwd packages/opencode --conditions=browser src/index.ts dev-setup",
"dev:local": "bun run packages/opencode/script/dev-local.ts"
},
"workspaces": {
"packages": [
"packages/*",
"packages/sdk/js"
],
"catalog": {
"@effect/opentelemetry": "4.0.0-beta.83",
"@effect/platform-node": "4.0.0-beta.83",
"@anthropic-ai/sandbox-runtime": "0.0.63",
"@npmcli/arborist": "9.4.0",
"@types/bun": "1.3.14",
"@types/cross-spawn": "6.0.6",
"@octokit/rest": "22.0.0",
"@opentui/core": "0.5.11",
"@opentui/solid": "0.5.11",
"ulid": "3.0.1",
"@kobalte/core": "0.13.11",
"@types/luxon": "3.7.1",
"@types/node": "24.12.4",
"@types/semver": "7.7.1",
"@tsconfig/node22": "22.0.2",
"@tsconfig/bun": "1.0.9",
"@cloudflare/workers-types": "4.20251008.0",
"@openauthjs/openauth": "0.0.0-20250322224806",
"@pierre/diffs": "1.2.10",
"@solid-primitives/storage": "4.3.3",
"@tailwindcss/vite": "4.1.11",
"diff": "8.0.4",
"dompurify": "3.4.13",
"drizzle-kit": "1.0.0-rc.2",
"drizzle-orm": "1.0.0-rc.2",
"effect": "4.0.0-beta.83",
"ai": "6.0.235",
"cross-spawn": "7.0.6",
"hono": "4.12.12",
"hono-openapi": "1.1.2",
"ipaddr.js": "2.4.0",
"fuzzysort": "3.1.0",
"luxon": "3.6.1",
"marked": "18.0.7",
"marked-shiki": "1.2.1",
"remend": "1.3.0",
"@playwright/test": "1.59.1",
"semver": "7.7.4",
"typescript": "5.8.2",
"@typescript/native-preview": "7.0.0-dev.20260316.1",
"zod": "4.1.8",
"remeda": "2.26.0",
"shiki": "4.2.0",
"solid-list": "0.3.0",
"tailwindcss": "4.1.11",
"virtua": "0.49.1",
"vite": "7.3.5",
"@solidjs/meta": "0.29.4",
"@solidjs/router": "0.15.4",
"@solidjs/start": "https://pkg.pr.new/@solidjs/start@dfb2020",
"solid-js": "1.9.12",
"vite-plugin-solid": "2.11.10",
"@lydell/node-pty": "1.2.0-beta.12",
"@opentui/keymap": "0.5.11",
"@effect/sql-sqlite-bun": "4.0.0-beta.83",
"@hono/standard-validator": "0.2.0",
"@hono/zod-validator": "0.4.2",
"sst": "4.13.1",
"@tanstack/solid-virtual": "3.13.32",
"@shikijs/stream": "4.2.0",
"@corvu/drawer": "0.2.4",
"solid-sonner": "0.3.1"
}
},
"devDependencies": {
"@tsconfig/bun": "catalog:",
"@types/mime-types": "3.0.1",
"@typescript/native-preview": "catalog:",
"glob": "13.0.5",
"husky": "9.1.7",
"oxlint": "1.60.0",
"oxlint-tsgolint": "0.21.0",
"prettier": "3.6.2",
"semver": "^7.6.0",
"turbo": "2.10.2",
"@types/bun": "catalog:",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.27.10",
"@actions/artifact": "5.0.1",
"sst": "catalog:"
},
"dependencies": {
"@kilocode/plugin": "workspace:*",
"@opencode-ai/script": "workspace:*",
"@kilocode/sdk": "workspace:*",
"typescript": "catalog:",
"@aws-sdk/client-s3": "3.933.0",
"heap-snapshot-toolkit": "1.1.3"
},
"repository": {
"type": "git",
"url": "https://github.com/Kilo-Org/kilocode"
},
"license": "MIT",
"prettier": {
"semi": false,
"printWidth": 120
},
"trustedDependencies": [
"esbuild",
"node-pty",
"protobufjs",
"tree-sitter",
"tree-sitter-bash",
"web-tree-sitter",
"electron"
],
"overrides": {
"@types/bun": "catalog:",
"@types/node": "catalog:",
"effect": "catalog:",
"@effect/platform-node-shared": "4.0.0-beta.74",
"path-to-regexp": ">=8.4.0",
"picomatch": ">=2.3.2",
"defu": "6.1.6",
"lodash": "4.18.1",
"@xmldom/xmldom": ">=0.8.12",
"smol-toml": ">=1.6.1",
"fastify": ">=5.8.3",
"vite": "7.3.5",
"diff": "8.0.4",
"dompurify": "3.4.13",
"happy-dom": ">=20.8.9",
"@opentui/core": "catalog:",
"@opentui/solid": "catalog:",
"solid-js": "catalog:",
"@opentui/keymap": "catalog:"
},
"patchedDependencies": {
"@npmcli/agent@4.0.2": "patches/@npmcli%2Fagent@4.0.2.patch",
"@silvia-odwyer/photon-node@0.3.4": "patches/@silvia-odwyer%2Fphoton-node@0.3.4.patch",
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
"@ai-sdk/xai@3.0.102": "patches/@ai-sdk%2Fxai@3.0.102.patch",
"@ai-sdk/mistral@3.0.51": "patches/@ai-sdk%2Fmistral@3.0.51.patch",
"gcp-metadata@8.1.2": "patches/gcp-metadata@8.1.2.patch",
"@ai-sdk/google@3.0.73": "patches/@ai-sdk%2Fgoogle@3.0.73.patch",
"@pierre/trees@1.0.0-beta.4": "patches/@pierre%2Ftrees@1.0.0-beta.4.patch",
"@modelcontextprotocol/sdk@1.29.0": "patches/@modelcontextprotocol%2Fsdk@1.29.0.patch",
"effect@4.0.0-beta.83": "patches/effect@4.0.0-beta.83.patch",
"virtua@0.49.1": "patches/virtua@0.49.1.patch",
"@ff-labs/fff-bun@0.9.4": "patches/@ff-labs%2Ffff-bun@0.9.4.patch",
"pacote@21.5.1": "patches/pacote@21.5.1.patch",
"mammoth@1.12.0": "patches/mammoth@1.12.0.patch",
"@tanstack/virtual-core@3.17.3": "patches/@tanstack%2Fvirtual-core@3.17.3.patch",
"solid-js@1.9.12": "patches/solid-js@1.9.12.patch",
"bun-pty@0.4.8": "patches/bun-pty@0.4.8.patch"
},
"version": "7.6.2",
"peerDependencies": {}
}