mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-29 03:44:06 +08:00
b976b5a013
* feat(memory): opt-in project memory — capture, recall, CLI + TUI integration Add project memory: the standalone @kilocode/kilo-memory effect layer plus the opencode CLI/server/TUI integration. Memory is disabled by default, so it is a no-op until enabled (no behavior change when off). Capture (turn-close consolidation): per-op parse salvage, secret redaction that skips the offending op instead of aborting the batch, supersede-only auto-updates (never model-driven deletes), correction-aware echo handling, non-LLM fallback digests on interrupted/error turns, a shared interval throttle with idle-flush. Recall + injection: keyword tokenizer with camelCase/compound splitting, light stemming, and an English-first stopword filter (Unicode-aware; non-English falls back to plain token-overlap), a live relevance floor, a budget-reserved startup index, a session-digest catalog, and per-session prompt-cache pinning of the injected memory block. Surfaces: kilo_memory_save / kilo_memory_recall tools, the memory HTTP API (contract schemas live in the package), and a status-focused TUI sidebar showing auto-save, loaded context, and active recall, plus the /memory dialog. * fix(memory): address PR review feedback - C1: bump @kilocode/kilo-memory in the changeset - C2: redact secrets before they hit the audit log (skip + salvage paths); redact before truncating in salvageTyped so a secret straddling the 500-char cap can't leak an unmatched fragment; opText -> salvageText - C3: de-abbreviate savedOperations, "changes" wording, ops.ts -> operations.ts - C4: log.warn on the remaining silent-catch fallbacks (turn diff, memory context injection, tool-visibility check) - C5: relocate memory storage from ~/.kilo to Global.Path.data, delete the now-dead needsDependencyInstall guard, add /memory status (root path) and /memory edit ($VISUAL/$EDITOR + auto-rebuild) - C6: replace the hardcoded English stopword list with corpus-derived ubiquitous-term filtering (df across the user's own entries) and the English suffix stemmer with suffix-tolerant term matching, so recall noise-filtering works in any language - C8: delete the CORRECTION_INTENT English regex; echo turns now run typed capture (digest stays echo-gated), bounded by the interval throttle, with the typed prompt as the language-agnostic content filter - C9: exclude generated paths (dist/build/coverage/*.gen.*/*.map/snapshots) from the durable-diff churn fallback so generated churn can't burn a consolidation call - C11: fix duplicated assert in httpapi-memory test; assert the error body - kilo-code-bot batch: clause-boundary regex fix, byte-safe catalog truncation, max-length guards on remember/correct/forget payloads (text, query, key, sessionID), trim consistency in reconcile, param-shadowing rename, missing doc entry for kilo_memory_recall, dead-code removal, dialog UI fixes, memoryEnabledCache eviction bound, dedicated Configure schema, recall permission renderer, covered-session pointer cap, redact chat transcript before the consolidation model call, split configProtected metadata from disableAlways so memory-save prompts don't show config-file copy, drop unused MemoryService.layer provide from tool registry - redact colon-separated low-entropy secrets too (password: hunterx), accepting the prose false-positive tradeoff (secret: enabled) in favor of not missing a real secret - rename lastConsolidatedAt -> lastTypedConsolidationAt to make its narrow scope (typed-consolidation throttle clock) explicit; regen openapi/SDK - drop now-dead home/config fields from MemoryPaths.Host after the data-dir relocation; add Process.splitCommand for quoted $EDITOR/$VISUAL paths with spaces, used by /memory edit and the pre-existing Editor.open utility * refactor(memory): shared client helpers, capture hardening, /memory UX rework - extract client-side derivations into kilo-memory so both frontends share one implementation: MemoryDecisions.summarize (decision-log summary), MemoryAutosaveStatus.summarize (autosave-status semantics), and MemoryMarkerMeta (marker wire contract encode/decode) - match exact-key upserts via the canonical stored id (slugged key, normalized section) so a re-emitted spaced/uppercase key updates the entry instead of falling to fuzzy dedupe - salvageTyped throws on valid JSON without an operations array so the caller's fallback path records a parse error instead of a silent zero-op success - rename memory tool metadata files -> sources (stripPartMetadata rewrites tool-part metadata.files assuming apply_patch records, mangling string[]) - read state instead of status for tool enabled checks; dedupe TUI helpers (errorMessage, shared route(), Locale.number, relativeTime) - /memory UX: bare /memory opens a help modal driven by a structured command catalog in kilo-memory; /memory on|off become the canonical toggle verbs (enable/disable kept as quiet aliases); /memory status opens a clean overview dialog (root path, autosave, startup context, source counts, index size) instead of a toast; /memory show is the single full audit view (inspect removed)
205 lines
6.5 KiB
JSON
205 lines
6.5 KiB
JSON
{
|
|
"$schema": "https://json.schemastore.org/package.json",
|
|
"version": "7.4.1",
|
|
"name": "@kilocode/cli",
|
|
"type": "module",
|
|
"license": "MIT",
|
|
"private": false,
|
|
"scripts": {
|
|
"typecheck": "tsgo --noEmit",
|
|
"test": "bun run script/test-runner.ts",
|
|
"test:ci": "bun run script/test-runner.ts --ci",
|
|
"test:httpapi": "bun run script/httpapi-exercise.ts --mode coverage --fail-on-missing --fail-on-skip && bun run script/httpapi-exercise.ts --mode auth --fail-on-missing --fail-on-skip && bun run script/httpapi-exercise.ts --mode effect --fail-on-missing --fail-on-skip",
|
|
"bench:test": "bun run script/bench-test-suite.ts",
|
|
"profile:test": "bun run script/profile-test-files.ts",
|
|
"build": "bun run script/build.ts",
|
|
"fix-node-pty": "bun run script/fix-node-pty.ts",
|
|
"dev": "bun run --conditions=browser ./src/index.ts",
|
|
"dev:temporary": "bun run --conditions=browser ./src/temporary.ts",
|
|
"db": "bun drizzle-kit"
|
|
},
|
|
"bin": {
|
|
"kilo": "./bin/kilo",
|
|
"kilocode": "./bin/kilo"
|
|
},
|
|
"exports": {
|
|
"./*": "./src/*.ts"
|
|
},
|
|
"imports": {
|
|
"#db": {
|
|
"bun": "./src/storage/db.bun.ts",
|
|
"node": "./src/storage/db.node.ts",
|
|
"default": "./src/storage/db.bun.ts"
|
|
},
|
|
"#pty": {
|
|
"bun": "./src/pty/pty.bun.ts",
|
|
"node": "./src/pty/pty.node.ts",
|
|
"default": "./src/pty/pty.bun.ts"
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@effect/language-service": "0.84.2",
|
|
"@octokit/webhooks-types": "7.6.1",
|
|
"@opencode-ai/script": "workspace:*",
|
|
"@opencode-ai/core": "workspace:*",
|
|
"@parcel/watcher-darwin-arm64": "2.5.1",
|
|
"@parcel/watcher-darwin-x64": "2.5.1",
|
|
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
|
|
"@parcel/watcher-linux-arm64-musl": "2.5.1",
|
|
"@parcel/watcher-linux-x64-glibc": "2.5.1",
|
|
"@parcel/watcher-linux-x64-musl": "2.5.1",
|
|
"@parcel/watcher-win32-arm64": "2.5.1",
|
|
"@parcel/watcher-win32-x64": "2.5.1",
|
|
"@tsconfig/bun": "catalog:",
|
|
"@types/bun": "catalog:",
|
|
"@types/cross-spawn": "catalog:",
|
|
"@types/mime-types": "3.0.1",
|
|
"@types/node": "catalog:",
|
|
"@types/npm-package-arg": "6.1.4",
|
|
"@types/semver": "^7.5.8",
|
|
"@types/turndown": "5.0.5",
|
|
"@types/which": "3.0.4",
|
|
"@types/yargs": "17.0.33",
|
|
"@typescript/native-preview": "catalog:",
|
|
"drizzle-kit": "catalog:",
|
|
"drizzle-orm": "catalog:",
|
|
"prettier": "3.6.2",
|
|
"typescript": "catalog:",
|
|
"vscode-languageserver-types": "3.17.5",
|
|
"why-is-node-running": "3.2.2",
|
|
"@types/npmcli__arborist": "6.3.3",
|
|
"@opencode-ai/http-recorder": "workspace:*"
|
|
},
|
|
"dependencies": {
|
|
"@actions/core": "1.11.1",
|
|
"@actions/github": "6.0.1",
|
|
"@agentclientprotocol/sdk": "0.21.0",
|
|
"@ai-sdk/alibaba": "1.0.17",
|
|
"@ai-sdk/amazon-bedrock": "4.0.96",
|
|
"@ai-sdk/anthropic": "3.0.71",
|
|
"@ai-sdk/azure": "3.0.49",
|
|
"@ai-sdk/cerebras": "2.0.54",
|
|
"@ai-sdk/cohere": "3.0.27",
|
|
"@ai-sdk/deepinfra": "2.0.41",
|
|
"@ai-sdk/gateway": "3.0.104",
|
|
"@ai-sdk/google": "3.0.63",
|
|
"@ai-sdk/google-vertex": "4.0.112",
|
|
"@ai-sdk/groq": "3.0.31",
|
|
"@ai-sdk/mistral": "3.0.27",
|
|
"@ai-sdk/openai": "3.0.53",
|
|
"@ai-sdk/openai-compatible": "2.0.48",
|
|
"@ai-sdk/perplexity": "3.0.26",
|
|
"@ai-sdk/provider": "3.0.8",
|
|
"@ai-sdk/provider-utils": "4.0.23",
|
|
"@ai-sdk/togetherai": "2.0.41",
|
|
"@ai-sdk/vercel": "2.0.39",
|
|
"@ai-sdk/xai": "3.0.92",
|
|
"@aws-sdk/credential-providers": "3.1025.0",
|
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
"@effect/opentelemetry": "catalog:",
|
|
"@effect/platform-node": "catalog:",
|
|
"@gitlab/gitlab-ai-provider": "3.6.0",
|
|
"@gitlab/opencode-gitlab-auth": "1.3.3",
|
|
"@kilocode/kilo-gateway": "workspace:*",
|
|
"@kilocode/kilo-indexing": "workspace:*",
|
|
"@kilocode/kilo-memory": "workspace:*",
|
|
"@kilocode/kilo-telemetry": "workspace:*",
|
|
"@kilocode/plugin": "workspace:*",
|
|
"@kilocode/plugin-atomic-chat": "workspace:*",
|
|
"@kilocode/sandbox": "workspace:*",
|
|
"@kilocode/sdk": "workspace:*",
|
|
"@lydell/node-pty": "catalog:",
|
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
"@morphllm/morphsdk": "0.2.166",
|
|
"@npmcli/arborist": "9.4.0",
|
|
"@octokit/graphql": "9.0.2",
|
|
"@octokit/rest": "catalog:",
|
|
"@opencode-ai/llm": "workspace:*",
|
|
"@opencode-ai/script": "workspace:*",
|
|
"@opencode-ai/ui": "workspace:*",
|
|
"@openrouter/ai-sdk-provider": "2.9.0",
|
|
"@opentelemetry/api": "1.9.0",
|
|
"@opentelemetry/sdk-trace-base": "2.6.1",
|
|
"@opentelemetry/sdk-trace-node": "2.6.1",
|
|
"@opentui/core": "catalog:",
|
|
"@opentui/keymap": "catalog:",
|
|
"@opentui/solid": "catalog:",
|
|
"@parcel/watcher": "2.5.1",
|
|
"@secretlint/core": "10.2.2",
|
|
"@secretlint/secretlint-rule-preset-recommend": "10.2.2",
|
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
"@solid-primitives/event-bus": "1.1.2",
|
|
"@solid-primitives/scheduled": "1.5.2",
|
|
"@types/ws": "8.18.1",
|
|
"@zip.js/zip.js": "2.7.62",
|
|
"ai": "catalog:",
|
|
"ai-gateway-provider": "3.1.2",
|
|
"bonjour-service": "1.3.0",
|
|
"bun-pty": "0.4.8",
|
|
"chardet": "2.1.1",
|
|
"cli-sound": "1.1.3",
|
|
"clipboardy": "4.0.0",
|
|
"cross-spawn": "catalog:",
|
|
"decimal.js": "10.5.0",
|
|
"diff": "catalog:",
|
|
"drizzle-orm": "catalog:",
|
|
"effect": "catalog:",
|
|
"fuzzysort": "3.1.0",
|
|
"gitlab-ai-provider": "6.8.0",
|
|
"google-auth-library": "10.5.0",
|
|
"gray-matter": "4.0.3",
|
|
"htmlparser2": "8.0.2",
|
|
"iconv-lite": "0.7.2",
|
|
"ignore": "7.0.5",
|
|
"immer": "11.1.4",
|
|
"jsonc-parser": "3.3.1",
|
|
"mammoth": "1.12.0",
|
|
"mime-types": "3.0.2",
|
|
"npm-package-arg": "13.0.2",
|
|
"open": "10.1.2",
|
|
"opencode-gitlab-auth": "2.0.1",
|
|
"opencode-poe-auth": "0.0.1",
|
|
"opentui-spinner": "catalog:",
|
|
"remeda": "catalog:",
|
|
"ripgrep": "0.3.1",
|
|
"semver": "^7.6.3",
|
|
"simple-git": "3.36.0",
|
|
"solid-js": "catalog:",
|
|
"strip-ansi": "7.1.2",
|
|
"tree-sitter-bash": "0.25.0",
|
|
"tree-sitter-powershell": "0.25.10",
|
|
"tree-sitter-wasms": "^0.1.12",
|
|
"turndown": "7.2.0",
|
|
"ulid": "catalog:",
|
|
"venice-ai-sdk-provider": "2.0.1",
|
|
"vscode-jsonrpc": "8.2.1",
|
|
"web-tree-sitter": "0.25.10",
|
|
"which": "6.0.1",
|
|
"ws": "8.21.0",
|
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
|
|
"yargs": "18.0.0",
|
|
"zod": "catalog:"
|
|
},
|
|
"overrides": {
|
|
"drizzle-orm": "catalog:"
|
|
},
|
|
"peerDependencies": {},
|
|
"keywords": [
|
|
"cli",
|
|
"tui",
|
|
"terminal",
|
|
"ai",
|
|
"agent",
|
|
"assistant",
|
|
"coding-agent",
|
|
"kilo-code",
|
|
"kilo",
|
|
"opencode",
|
|
"ink",
|
|
"react",
|
|
"copilot",
|
|
"autocomplete",
|
|
"developer-tools"
|
|
]
|
|
}
|