Kimi Code CLI — The Starting Point for Next-Gen Agents
This report presents the forensic synthetic code analysis of MoonshotAI/kimi-code, a TypeScript project with 3,097 GitHub stars. SynthScan v2.0 examined 729,260 lines of code across 3400 source files, recording 1248 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 2.5 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1248 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/acp-adapter/test/approval-cancel.test.ts | 80 | function makeCancellableApprovalSession(sessionId: string): { | CODE |
| LOW | packages/acp-adapter/test/session-resume.test.ts | 70 | function makeSessionWithMainConfig( | CODE |
| LOW | …/acp-adapter/test/session-config-option-funnel.test.ts | 113 | function extractSingleConfigOptionUpdate( | CODE |
| LOW | packages/acp-adapter/src/config-options.ts | 186 | export async function buildSessionConfigOptions( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 34 | export function assistantDeltaToSessionUpdate( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 67 | export function turnEndReasonToStopReason( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 158 | export function toolCallStartToSessionUpdate( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 203 | export function toolCallDeltaToSessionUpdate( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 251 | export function toolCallLazyCreateToSessionUpdate( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 291 | export function toolCallStartedUpgradeToSessionUpdate( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 331 | export function toolProgressToSessionUpdate( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 354 | export function thinkingDeltaToSessionUpdate( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 379 | export function toolResultToSessionUpdate( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 485 | export function availableCommandsUpdateNotification( | CODE |
| LOW | packages/acp-adapter/src/events-map.ts | 516 | export function configOptionUpdateNotification( | CODE |
| LOW | packages/acp-adapter/src/approval.ts | 94 | export function approvalRequestToPermissionOptions( | CODE |
| LOW | packages/acp-adapter/src/approval.ts | 147 | export function permissionResponseToApprovalResponse( | CODE |
| LOW | packages/acp-adapter/src/approval.ts | 256 | export function buildPermissionToolCallUpdate( | CODE |
| LOW | packages/acp-adapter/src/model-catalog.ts | 84 | export function deriveDefaultThinkingEffort(alias: ModelAlias): string { | CODE |
| LOW | packages/acp-adapter/src/session.ts | 1478 | function formatCompactionCompleted(result: CompactionCompletedResult): string { | CODE |
| LOW | packages/acp-adapter/src/session.ts | 1636 | function toolMessageContentToAcpToolCallContent( | CODE |
| LOW | packages/acp-adapter/src/question.ts | 50 | export function questionItemToPermissionOptions( | CODE |
| LOW | packages/acp-adapter/src/server.ts | 1083 | function sessionSummaryToSessionInfo(summary: SessionSummary): SessionInfo { | CODE |
| LOW | packages/oauth/test/managed-kimi-code.test.ts | 844 | function makeThinkingTypeModelsResponse(): Response { | CODE |
| LOW | packages/oauth/src/oauth.ts | 101 | export async function requestDeviceAuthorization( | CODE |
| LOW | packages/oauth/src/identity.ts | 124 | export function parseKimiCodeCustomHeaders( | CODE |
| LOW | packages/oauth/src/managed-kimi-code.ts | 348 | export function resolveKimiCodeRuntimeAuth(options: { | CODE |
| LOW | packages/oauth/src/managed-kimi-code.ts | 445 | export function parseSupportsThinkingType(value: unknown): SupportsThinkingType | undefined { | CODE |
| LOW | packages/oauth/src/managed-kimi-code.ts | 477 | export async function fetchManagedKimiCodeModels( | CODE |
| LOW | packages/oauth/src/managed-kimi-code.ts | 513 | export function applyManagedKimiCodeConfig( | CODE |
| LOW | packages/oauth/src/managed-kimi-code.ts | 617 | export function applyManagedKimiCodeLogoutConfig(config: ManagedKimiConfigShape): void { | CODE |
| LOW | packages/oauth/src/managed-kimi-code.ts | 707 | export function clearManagedKimiCodeConfig( | CODE |
| LOW | packages/oauth/src/managed-kimi-code.ts | 751 | function assertPositiveContextLength(model: ManagedKimiCodeModelInfo): void { | CODE |
| LOW | packages/oauth/src/managed-kimi-code.ts | 757 | export async function provisionManagedKimiCodeConfigAfterLogin( | CODE |
| LOW⚡ | packages/oauth/src/managed-feedback-upload.ts | 51 | export function kimiCodeFeedbackUploadUrl(baseUrl?: string): string { | CODE |
| LOW⚡ | packages/oauth/src/managed-feedback-upload.ts | 55 | export function kimiCodeFeedbackUploadCompleteUrl(baseUrl?: string): string { | CODE |
| LOW⚡ | packages/oauth/src/managed-feedback-upload.ts | 59 | export async function fetchCreateFeedbackUploadUrl( | CODE |
| LOW | packages/oauth/src/managed-feedback-upload.ts | 73 | export async function fetchCompleteFeedbackUpload( | CODE |
| LOW | packages/oauth/src/toolkit.ts | 440 | export function resolveKimiTokenStorageName(input: { | CODE |
| LOW | packages/oauth/src/refreshProviderModels.ts | 114 | function customRegistrySourceCredentialKey(source: CustomRegistrySource): string { | CODE |
| LOW | packages/oauth/src/refreshProviderModels.ts | 118 | async function fetchCustomRegistryFromSources( | CODE |
| LOW | packages/oauth/src/refreshProviderModels.ts | 141 | function collectModelIdsForAliases( | CODE |
| LOW | packages/oauth/src/refreshProviderModels.ts | 163 | function generatedProviderAliasKeys( | CODE |
| LOW | packages/oauth/src/refreshProviderModels.ts | 256 | function preserveUserProviderAliases( | CODE |
| LOW | packages/oauth/src/refreshProviderModels.ts | 308 | function clearDefaultThinkingWhenDefaultRemoved( | CODE |
| LOW | packages/oauth/src/custom-registry.ts | 261 | export function capabilitiesFromCustomEntry(model: CustomRegistryModelEntry): string[] { | CODE |
| LOW | packages/oauth/src/custom-registry.ts | 312 | export function applyCustomRegistryProvider( | CODE |
| LOW | packages/oauth/src/custom-registry.ts | 372 | export function removeCustomRegistryProvider( | CODE |
| LOW | packages/oauth/src/custom-registry.ts | 416 | export function applyCustomRegistryEntries( | CODE |
| LOW | packages/agent-core-v2/test/app/bootstrap/stubs.ts | 54 | export function registerBootstrapServices(reg: ServiceRegistration): void { | CODE |
| LOW | …re-v2/test/app/skillCatalog/skill-tool-manager.test.ts | 29 | function recordContainsSkillLoaded(record: unknown, skillName: string): boolean { | CODE |
| LOW | …-v2/test/app/skillCatalog/plugin-session-start.test.ts | 100 | function pluginSessionStartMessages(ctx: ReturnType<typeof testAgent>) { | CODE |
| LOW | …gent-core-v2/test/app/llmProtocol/select-tools.test.ts | 46 | function makeChatCompletionResponse() { | CODE |
| LOW | …t-core-v2/test/app/sessionExport/sessionExport.test.ts | 783 | function registerSessionExportServices( | CODE |
| LOW | packages/agent-core-v2/test/app/telemetry/stubs.ts | 58 | export function registerTelemetryServices(reg: ServiceRegistration): void { | CODE |
| LOW | …-v2/test/app/sessionLifecycle/sessionLifecycle.test.ts | 191 | function persistentWorkspaceRegistryStub(): IWorkspaceRegistry { | CODE |
| LOW | …-v2/test/app/sessionLifecycle/sessionLifecycle.test.ts | 298 | function agentLifecycleWithMainStub(): IAgentLifecycleService { | CODE |
| LOW | …-v2/test/app/sessionLifecycle/sessionLifecycle.test.ts | 324 | function agentLifecycleCapturingPlanSpy(opts: { mainPreexists?: boolean } = {}): { | CODE |
| LOW | packages/agent-core-v2/test/wire/persistence.test.ts | 77 | async function createFileAppendLogHarness(): Promise<{ | CODE |
| LOW | packages/agent-core-v2/test/wire/resume.test.ts | 945 | function resumeDeferredSystemReminderHistory(): WireRecord[] { | CODE |
| 770 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/acp-adapter/src/kaos-acp.ts | 49 | // ── identity ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/acp-adapter/src/kaos-acp.ts | 60 | // ── path operations: delegate to inner ───────────────────────────── | COMMENT |
| MEDIUM | packages/acp-adapter/src/kaos-acp.ts | 116 | // ── reads: route through ACP `fs/readTextFile` ───────────────────── | COMMENT |
| MEDIUM | packages/acp-adapter/src/kaos-acp.ts | 182 | // ── writes: route through ACP `fs/writeTextFile` ─────────────────── | COMMENT |
| MEDIUM | packages/acp-adapter/src/kaos-acp.ts | 242 | // ── process execution: delegate to inner ─────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth-manager.test.ts | 73 | // ── ensureFresh ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth-manager.test.ts | 392 | // ── force=true propagates errors (no silent swallow) ────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth-manager.test.ts | 586 | // ── login ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth-manager.test.ts | 748 | // ── logout & hasToken ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth-manager.test.ts | 779 | // ── slow_down RFC 8628 §3.5 ──────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth-manager.test.ts | 818 | // ── FileTokenStorage integration ─────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth.test.ts | 116 | // ── Fixtures ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth.test.ts | 176 | // ── requestDeviceAuthorization ──────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth.test.ts | 313 | // ── pollDeviceToken ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth.test.ts | 457 | // ── refreshAccessToken ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth.test.ts | 611 | // ── network error retry / 400 fail-fast ─────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/storage.test.ts | 168 | // ── atomic save leaves no .tmp sibling ──────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth-manager-multi-process.test.ts | 37 | // ───────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/test/oauth-manager-multi-process.test.ts | 39 | // ───────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/src/oauth.ts | 99 | // ── requestDeviceAuthorization ──────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/src/oauth.ts | 142 | // ── pollDeviceToken ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/src/oauth.ts | 195 | // ── refreshAccessToken ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/oauth/src/managed-usage.ts | 255 | // ── HTTP fetch ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/kap-server/test/snapshotReader.unit.test.ts | 33 | // ─── tiny stubs ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/kap-server/test/snapshotReader.unit.test.ts | 138 | // ─── SnapshotReader.read ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/test/session-resume.test.ts | 64 | // ── Gap 1: cold-session /messages ────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/test/session-resume.test.ts | 121 | // ── Gap 2: live status field ─────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/scenarios/03-refresh-replay.ts | 154 | // ── Phase 0 ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/scenarios/03-refresh-replay.ts | 204 | // ── Phase 0 again — simulate a browser refresh (cheap re-probe) ────── | COMMENT |
| MEDIUM | packages/server-e2e/scenarios/03-refresh-replay.ts | 263 | // ── Phase 2: persisted REST snapshot reflects the first prompt ─────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 176 | // ── Probes + model catalog ───────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 201 | // ── Sessions ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 271 | // ── Terminals ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 307 | // ── Workspaces ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 329 | // ── Folder picker (fs:browse + fs:home) ───────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 337 | // ── Uploads ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 356 | // ── Messages ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 364 | // ── Prompts ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/http.ts | 396 | // ── Approvals / Questions (reverse-RPC resolves) ──────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 193 | // ── Probes + model catalog ───────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 210 | // ── HTTP convenience surface ──────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 253 | // ── Terminals ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 273 | // ── Workspaces + folder picker ────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 367 | // ── WS lifecycle ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 458 | // ── WS observation ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 484 | // ── Terminal WS controls ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 552 | // ── Reverse RPC (approval + question) ─────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 602 | // ── High-level convenience ────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/client.ts | 658 | // ── internals ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/index.ts | 71 | // ── server-v2 SDK (additive) ────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/v2/transport/ws.ts | 243 | // ── Wire frame shapes (client view; not validated) ───────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/v2/resources/types.ts | 14 | // ── Shared wire shapes ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/v2/resources/types.ts | 79 | // ── Precise override maps (keyed by action name) ─────────────────────────── | COMMENT |
| MEDIUM | packages/server-e2e/src/v2/resources/session.ts | 64 | // ── Flattened `session` resource ───────────────────────────────────────── | COMMENT |
| MEDIUM | packages/klient/examples/media-recovery.ts | 105 | // ── fixtures ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/klient/examples/media-recovery.ts | 199 | // ── main ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/kaos/test/ssh.test.ts | 531 | // ── stat(): the one method that already wraps errors. ──────────────── | COMMENT |
| MEDIUM | packages/kaos/test/ssh.test.ts | 625 | // in ssh.ts so every method gets the same wrapping for free. ───────── | COMMENT |
| MEDIUM | packages/kaos/test/ssh.test.ts | 848 | // ── path helpers ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/kaos/test/ssh.test.ts | 857 | // ── stat + buildStMode variants ───────────────────────────────────── | COMMENT |
| 144 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/acp-adapter/src/session.ts | 921 | sessionId: string, | COMMENT |
| LOW | packages/acp-adapter/src/session.ts | 941 | // delta → tool_call_update" mapping puts updates on the wire | COMMENT |
| LOW | packages/acp-adapter/src/auth-methods.ts | 1 | // Advertise the `terminal-auth` method to ACP clients. Two paths coexist: | COMMENT |
| LOW | packages/acp-adapter/src/slash.ts | 1 | // Slash-command detection for ACP `session/prompt`. | COMMENT |
| LOW | packages/acp-adapter/src/server.ts | 261 | // transparent passthrough for unknown fields (see | COMMENT |
| LOW | packages/acp-adapter/src/server.ts | 301 | session, | COMMENT |
| LOW | packages/oauth/src/oauth-manager.ts | 301 | const token = initial.token; | COMMENT |
| LOW | packages/kap-server/src/start.ts | 221 | passwordConfigured = passwordHash !== undefined; | COMMENT |
| LOW | …-server/src/transport/ws/v1/sessionEventBroadcaster.ts | 521 | ) { | COMMENT |
| LOW | packages/kap-server/src/routes/tasks.ts | 281 | COMMENT | |
| LOW | packages/kaos/test/local.test.ts | 541 | // | COMMENT |
| LOW | packages/kaos/test/e2e/ssh-resolve-path.test.ts | 1 | import type { Client, SFTPWrapper, Stats as SFTPStats } from 'ssh2'; | COMMENT |
| LOW | packages/kaos/test/e2e/exec-edge-cases.test.ts | 1 | import { mkdtemp, realpath, rm } from 'node:fs/promises'; | COMMENT |
| LOW | packages/kaos/src/ssh.ts | 641 | const [currentPattern, ...remainingParts] = patternParts; | COMMENT |
| LOW | packages/kaos/src/local.ts | 321 | yield* this._globWalk(resolved, patternParts, caseSensitive, initVisited); | COMMENT |
| LOW | packages/kaos/src/local.ts | 361 | // remaining pattern parts (or yield basePath itself when `**` | COMMENT |
| LOW | packages/pi-tui/test/editor.test.ts | 4201 | }); | COMMENT |
| LOW | packages/kosong/src/errors.ts | 141 | // upstream gateway that forwards the original error only as text, with no | COMMENT |
| LOW | packages/kosong/src/errors.ts | 161 | COMMENT | |
| LOW | packages/kosong/src/errors.ts | 381 | return REQUEST_TOO_LARGE_MESSAGE_PATTERNS.some((pattern) => pattern.test(lowerMessage)); | COMMENT |
| LOW | packages/kosong/src/errors.ts | 401 | // `tool_call_id` with no matching `tool_calls` entry in the preceding | COMMENT |
| LOW | packages/kosong/src/providers/anthropic.ts | 581 | // Signed: emit the block with its signature. api.anthropic.com requires a | COMMENT |
| LOW | packages/kosong/src/providers/anthropic.ts | 1021 | // Convert messages, then merge consecutive user messages into one. Strict | COMMENT |
| LOW | packages/node-sdk/src/index.ts | 61 | COMMENT | |
| LOW | packages/agent-core/test/tools/image-compress.test.ts | 1561 | // misrepresented. This proves the two tests above can fail (the probe | COMMENT |
| LOW | packages/agent-core/test/tools/rg-locator.test.ts | 341 | COMMENT | |
| LOW | packages/agent-core/test/tools/cron/cron-list.test.ts | 281 | it('one-shot nextFireAt is anchored at createdAt, not nowMs (pending today’s slot)', async () => { | COMMENT |
| LOW | …ent-core/test/agent/bg-idle-notification-repro.test.ts | 241 | it('RESUME: terminal bg tasks discovered on reconcile are SILENTLY injected (no auto-turn)', async () => { | COMMENT |
| LOW | …agent-core/test/agent/background/agent-timeout.test.ts | 61 | }); | COMMENT |
| LOW | …agent-core/test/agent/background/agent-timeout.test.ts | 81 | vi.useFakeTimers({ toFake: ['setTimeout', 'clearTimeout'] }); | COMMENT |
| LOW | …ore/test/agent/compaction/anthropic-compliance.test.ts | 1 | // Anthropic-compliance smoke tests for compaction. | COMMENT |
| LOW | …ore/test/agent/compaction/compaction-scenarios.test.ts | 1 | // Compaction scenario + probe tests. | COMMENT |
| LOW | packages/agent-core/src/errors.ts | 1 | // Barrel re-export so #/errors resolves to a single .ts file (the first | COMMENT |
| LOW | packages/agent-core/src/index.ts | 161 | // that need the emitter `Event<T>` type import it from the explicit sub-path | COMMENT |
| LOW | packages/agent-core/src/tools/cron/scheduler.ts | 381 | } else { | COMMENT |
| LOW | packages/agent-core/src/tools/cron/cron-create.ts | 201 | } | COMMENT |
| LOW | packages/agent-core/src/agent/records/types.ts | 21 | COMMENT | |
| LOW | packages/agent-core/src/agent/context/projector.ts | 121 | // by a matching `tool_result` in the immediately following message(s). A | COMMENT |
| LOW | packages/agent-core/src/agent/context/projector.ts | 141 | // trailing-open-exchange trim plus replay's interrupted-result synthesis own that | COMMENT |
| LOW | packages/agent-core/src/agent/context/index.ts | 241 | } | COMMENT |
| LOW | packages/agent-core/src/agent/context/index.ts | 321 | role: 'user', | COMMENT |
| LOW | packages/agent-core/src/agent/compaction/full.ts | 321 | try { | COMMENT |
| LOW | packages/agent-core/src/agent/compaction/full.ts | 421 | let summary: string | undefined; | COMMENT |
| LOW | packages/agent-core/src/agent/compaction/full.ts | 581 | // Loaded dynamic tool schemas are deliberately NOT rebuilt: compaction | COMMENT |
| LOW | packages/agent-core/src/agent/compaction/micro.ts | 61 | // const cacheMissed = cacheAgeMs !== null && cacheAgeMs >= config.cacheMissedThresholdMs; | COMMENT |
| LOW | packages/agent-core/src/agent/compaction/micro.ts | 81 | // // two compaction paths can be compared on the same axis. | COMMENT |
| LOW | packages/agent-core/src/agent/compaction/micro.ts | 101 | // previous_cutoff: previousCutoff, | COMMENT |
| LOW | packages/agent-core/src/agent/compaction/micro.ts | 121 | // for (const msg of messages) { | COMMENT |
| LOW | packages/agent-core/src/agent/turn/index.ts | 601 | this.closeAbandonedToolExchange(ended); | COMMENT |
| LOW | packages/agent-core/src/agent/turn/index.ts | 801 | // the turn so the goal driver blocks the goal at the boundary. | COMMENT |
| LOW | …ages/agent-core/src/agent/permission/policies/index.ts | 41 | new AutoModeApprovePermissionPolicy(agent), | COMMENT |
| LOW | …nt-core/src/services/coreProcess/coreProcessService.ts | 81 | // undefined` and synthesizes a closure that ALWAYS throws | COMMENT |
| LOW | …nt-core/src/services/coreProcess/coreProcessService.ts | 241 | COMMENT | |
| LOW | packages/agent-core/src/services/message/transcript.ts | 261 | // ContextMemory.applyCompaction. Re-deriving it from the full | COMMENT |
| LOW | …nt-core/src/services/authSummary/authSummaryService.ts | 141 | COMMENT | |
| LOW | packages/agent-core/src/session/git-context.ts | 61 | // empty block (the subagent works without git context, same as before): | COMMENT |
| LOW | packages/minidb/bench/measure-session-memory.ts | 1 | // bench/measure-session-memory.ts | COMMENT |
| LOW | packages/minidb/bench/message-composed.ts | 1 | // bench/message-composed.ts | COMMENT |
| LOW | packages/minidb/bench/session-children.ts | 1 | // bench/session-children.ts | COMMENT |
| LOW | packages/minidb/bench/session-children.ts | 21 | // -> O(N log N) | COMMENT |
| 62 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/pi-tui/test/markdown.test.ts | 165 | `1. Lorem ipsum dolor sit amet. | CODE |
| LOW | packages/pi-tui/test/markdown.test.ts | 165 | `1. Lorem ipsum dolor sit amet. | CODE |
| LOW | packages/pi-tui/test/markdown.test.ts | 182 | "1. Lorem ipsum dolor sit amet.", | CODE |
| LOW | packages/pi-tui/test/markdown.test.ts | 182 | "1. Lorem ipsum dolor sit amet.", | CODE |
| LOW | packages/pi-tui/test/markdown.test.ts | 1271 | assert.ok(joinedPlain.includes("user@example.com"), "Should contain email"); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1246 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1246 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1249 | assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit "); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1254 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1254 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1257 | assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit "); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1262 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1262 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1265 | assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit "); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1271 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1271 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1274 | assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit "); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1280 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1280 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1283 | assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit "); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1289 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1289 | const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30); | CODE |
| LOW⚡ | packages/pi-tui/test/editor.test.ts | 1292 | assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit "); | CODE |
| LOW | packages/pi-tui/src/components/markdown.ts | 547 | // For mailto: links strip the prefix (autolinked emails use text="foo@bar.com" | COMMENT |
| LOW | …ckages/migration-legacy/test/sessions/classify.test.ts | 27 | expect(await classifySessionDir(p)).toBe('placeholder'); | CODE |
| LOW | packages/migration-legacy/src/sessions/classify.ts | 6 | export type SessionClass = 'placeholder' | 'empty' | 'malformed' | 'real'; | CODE |
| LOW | packages/migration-legacy/src/sessions/classify.ts | 16 | if (entries.length === 1 && entries[0] === 'test') return 'placeholder'; | CODE |
| LOW | packages/migration-legacy/src/sessions/index.ts | 83 | if (cls === 'placeholder') { | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 55 | 'lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt', | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 55 | 'lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt', | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 61 | ' init[D] lorem ipsum dolor sit amet consectetur adipiscing elit sed do', | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 61 | ' init[D] lorem ipsum dolor sit amet consectetur adipiscing elit sed do', | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 67 | const description = 'lorem ipsum dolor sit amet consectetur adipiscing elit '.repeat(4).trim(); | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 67 | const description = 'lorem ipsum dolor sit amet consectetur adipiscing elit '.repeat(4).trim(); | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 74 | expect(lines[1]).toMatch(/^ {2}init\[D\] {8}lorem ipsum/); | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 80 | const description = 'lorem ipsum dolor sit amet consectetur adipiscing elit '.repeat(4).trim(); | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 80 | const description = 'lorem ipsum dolor sit amet consectetur adipiscing elit '.repeat(4).trim(); | CODE |
| LOW⚡ | …est/tui/components/editor/wrapping-select-list.test.ts | 86 | expect(lines[0]).toMatch(/^\[S\]→ goal {8}lorem ipsum/); | CODE |
| LOW | apps/kimi-web/src/components/ui/Textarea.vue | 32 | :placeholder="placeholder" | CODE |
| LOW | apps/kimi-web/src/components/ui/Input.vue | 49 | :placeholder="placeholder" | CODE |
| LOW | apps/kimi-web/src/components/chat/Composer.vue | 906 | :placeholder="placeholder" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | AGENTS.md | 73 | - In public text and test data, replace real internal identifiers with neutral placeholders such as `example.com`, `exam | CODE |
| HIGH | CLAUDE.md | 73 | - In public text and test data, replace real internal identifiers with neutral placeholders such as `example.com`, `exam | CODE |
| HIGH | .agents/skills/gen-docs/SKILL.md | 78 | - **Public examples**: Never write real internal endpoints, key names, account names, or service names into docs. Use ne | CODE |
| HIGH | .agents/skills/gen-changesets/SKILL.md | 73 | - Do not include real internal endpoints, key names, account names, or service names. If an example is needed, use neutr | CODE |
| HIGH | .agents/skills/sync-changelog/SKILL.md | 132 | Public-text rule: do not copy real internal endpoints, key names, account names, or service names into docs changelogs. | CODE |
| HIGH | .agents/skills/translate-docs/SKILL.md | 58 | - **Public examples**: Do not introduce real internal endpoints, key names, account names, or service names while transl | CODE |
| HIGH | docs/zh/configuration/env-vars.md | 92 | export KIMI_MODEL_API_KEY="YOUR_API_KEY" | CODE |
| HIGH | docs/en/configuration/env-vars.md | 92 | export KIMI_MODEL_API_KEY="YOUR_API_KEY" | CODE |
| HIGH | apps/kimi-code/test/cli/doctor.test.ts | 59 | api_key = "YOUR_API_KEY" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …es/agent-core/test/agent/background/rpc-events.test.ts | 179 | const trackCall = agent.telemetry.track.mock.calls.find( | CODE |
| CRITICAL | …i/controllers/session-event-handler-goal-queue.test.ts | 172 | const component = host.state.transcriptContainer.addChild.mock.calls.at(-1)?.[0]; | CODE |
| CRITICAL | apps/kimi-code/src/tui/controllers/btw-panel.ts | 142 | if (!this.host.state.btwPanelContainer.children.includes(panel)) return; | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | packages/node-sdk/examples/t8-race-direct.ts | 37 | // Step 1: check index | COMMENT |
| LOW⚡ | packages/node-sdk/examples/t8-race-direct.ts | 45 | // Step 2: simulate "isDirectory" check + mkdir gap | COMMENT |
| LOW⚡ | packages/node-sdk/examples/t8-race-direct.ts | 54 | // Step 3: append index | COMMENT |
| LOW⚡ | …gent-core/test/loop/tool-exchange-fallback.e2e.test.ts | 465 | // Step 1: normal projection rejected, degraded resend recovers. | COMMENT |
| LOW⚡ | …gent-core/test/loop/tool-exchange-fallback.e2e.test.ts | 468 | // Step 2: built straight from the degraded projection, not the normal one. | COMMENT |
| LOW | packages/agent-core/src/session/git-context.ts | 52 | // Step 1: is this a git repo? `rev-parse` is the authoritative probe — it | COMMENT |
| LOW | packages/agent-core/src/session/git-context.ts | 69 | // Step 2: collect context in parallel. Every probe is optional — git | COMMENT |
| LOW⚡ | apps/vis/server/test/lib/context-projector.test.ts | 458 | // Step 1: append u1, u2 then undo(1) → removes u2, leaves [u1, <undo marker>]. | COMMENT |
| LOW⚡ | apps/vis/server/test/lib/context-projector.test.ts | 459 | // Step 2: append u3, u4 → array is [u1, <undo marker>, u3, u4]. | COMMENT |
| LOW⚡ | apps/vis/server/test/lib/context-projector.test.ts | 493 | // Step 1: append tool c0, user u1 then undo(1) → removes u1, leaves | COMMENT |
| LOW⚡ | apps/vis/server/test/lib/context-projector.test.ts | 495 | // Step 2: append tool c1 → array is [c0, <undo marker>, c1]. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | packages/node-sdk/examples/t8-race-direct.ts | 37 | // Step 1: check index | COMMENT |
| LOW⚡ | packages/node-sdk/examples/t8-race-direct.ts | 45 | // Step 2: simulate "isDirectory" check + mkdir gap | COMMENT |
| LOW⚡ | packages/node-sdk/examples/t8-race-direct.ts | 54 | // Step 3: append index | COMMENT |
| LOW⚡ | …gent-core/test/loop/tool-exchange-fallback.e2e.test.ts | 465 | // Step 1: normal projection rejected, degraded resend recovers. | COMMENT |
| LOW⚡ | …gent-core/test/loop/tool-exchange-fallback.e2e.test.ts | 468 | // Step 2: built straight from the degraded projection, not the normal one. | COMMENT |
| LOW | packages/agent-core/src/session/git-context.ts | 52 | // Step 1: is this a git repo? `rev-parse` is the authoritative probe — it | COMMENT |
| LOW | packages/agent-core/src/session/git-context.ts | 69 | // Step 2: collect context in parallel. Every probe is optional — git | COMMENT |
| LOW⚡ | apps/vis/server/test/lib/context-projector.test.ts | 458 | // Step 1: append u1, u2 then undo(1) → removes u2, leaves [u1, <undo marker>]. | COMMENT |
| LOW⚡ | apps/vis/server/test/lib/context-projector.test.ts | 459 | // Step 2: append u3, u4 → array is [u1, <undo marker>, u3, u4]. | COMMENT |
| LOW⚡ | apps/vis/server/test/lib/context-projector.test.ts | 493 | // Step 1: append tool c0, user u1 then undo(1) → removes u1, leaves | COMMENT |
| LOW⚡ | apps/vis/server/test/lib/context-projector.test.ts | 495 | // Step 2: append tool c1 → array is [c0, <undo marker>, c1]. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/kap-server/src/services/auth/tokenStore.ts | 45 | // robust even on filesystems with coarse (1s) mtime resolution. | COMMENT |
| MEDIUM | packages/node-sdk/src/sdk-rpc-client.ts | 20 | import { KimiHarness } from '#/kimi-harness'; | CODE |
| MEDIUM | packages/node-sdk/src/index.ts | 1 | export { KimiHarness } from '#/kimi-harness'; | CODE |
| MEDIUM | packages/node-sdk/src/index.ts | 2 | export type { KimiHarnessRuntimeOptions } from '#/kimi-harness'; | CODE |
| MEDIUM | …s/agent-core/test/agent/cron/agent-integration.test.ts | 59 | // precise unit being asserted, and it stays robust if the loop / | COMMENT |
| MEDIUM | packages/agent-core/src/tools/support/rg-locator.ts | 298 | // Match on basename (not full path) — keeps the matcher robust | COMMENT |
| MEDIUM | packages/minidb/test/e2e/crash-recovery.test.ts | 28 | // the kill clock, so the test is robust even under heavy CPU contention. | COMMENT |
| MEDIUM | packages/minidb/test/e2e/compaction-race.test.ts | 79 | // measuring absolute timing, so the assertion stays robust under CPU/IO load | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | plugins/official/kimi-datasource/SKILL.md | 61 | ### 例 2:用户问"找几篇 retrieval augmented generation 的综述" | COMMENT |
| MEDIUM | packages/kosong/CHANGELOG.md | 35 | - [#1131](https://github.com/MoonshotAI/kimi-code/pull/1131) [`76c643b`](https://github.com/MoonshotAI/kimi-code/commit/ | CODE |
| MEDIUM | packages/agent-core/CHANGELOG.md | 74 | - [#1131](https://github.com/MoonshotAI/kimi-code/pull/1131) [`76c643b`](https://github.com/MoonshotAI/kimi-code/commit/ | CODE |
| MEDIUM | packages/agent-core/CHANGELOG.md | 378 | - [#211](https://github.com/MoonshotAI/kimi-code/pull/211) [`54590d3`](https://github.com/MoonshotAI/kimi-code/commit/54 | CODE |
| MEDIUM | packages/agent-core/CHANGELOG.md | 484 | - [#17](https://github.com/MoonshotAI/kimi-code/pull/17) [`bfbd522`](https://github.com/MoonshotAI/kimi-code/commit/bfbd | CODE |
| MEDIUM | apps/kimi-code/CHANGELOG.md | 620 | - [#1131](https://github.com/MoonshotAI/kimi-code/pull/1131) [`76c643b`](https://github.com/MoonshotAI/kimi-code/commit/ | CODE |
| MEDIUM | apps/kimi-code/CHANGELOG.md | 1350 | - [#211](https://github.com/MoonshotAI/kimi-code/pull/211) [`54590d3`](https://github.com/MoonshotAI/kimi-code/commit/54 | CODE |
| MEDIUM | apps/kimi-code/CHANGELOG.md | 1538 | - [#17](https://github.com/MoonshotAI/kimi-code/pull/17) [`bfbd522`](https://github.com/MoonshotAI/kimi-code/commit/bfbd | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | apps/kimi-code/src/tui/utils/printable-key.ts | 18 | * The module's existence is itself the "don't forget to decode" constraint: | COMMENT |