mirror of
https://github.com/NanmiCoder/claude-code-haha.git
synced 2026-10-10 11:53:10 +08:00
a5fe04a485
Nothing checked src/ for unreferenced imports. desktop/tsconfig.json sets
noUnusedLocals and eslint covers desktop/ only; the root tsconfig.json sets
no such option and nothing installs typescript or bun-types at the root, so
no tool reads it at all. Splitting handler.ts left nine imports whose
symbols had moved out, and a human found them by reading the diff.
Measured before choosing. Under a temporary tsconfig extending the root
one, tsc reports 3225 errors over src/ and scripts/ before noUnusedLocals
and 3871 after — 646 net, on a baseline that already fails. That option
would land disabled, so this adds a narrow check instead: imports only,
one directory.
The analysis is lexical like module-graph.ts, but it blanks comments and
literal text first, so a symbol kept alive only by a comment still reports
dead — the exact shape the handler.ts split left behind. Template
substitutions, `//` inside a URL string and quotes inside a regex literal
must survive that blanking or a live import reads as dead;
src/utils/terminalShellEnvironment.ts is the last one and mis-lexing it
blanked 130 lines. Where blanking desyncs anyway the result no longer
parses, so the file is reported as degraded rather than mis-analysed: 6 of
2149 files repo-wide, none under src/server/ws.
src/server/ws/ also joins policyPrefixes. The check reads its files rather
than importing them, so the import graph cannot route a ws-only diff to
this lane, and without the prefix the check would never run on the diffs it
was written for.
Verified by mutation, each reverted from an explicit backup:
- planted `import { randomUUID }` into src/server/ws/events.ts →
check:policy 216 pass / 1 fail, reporting
"src/server/ws/events.ts:1 randomUUID"
- disabled line-comment blanking → 1 fail; block-comment blanking → 2 fail;
regex-literal detection → 2 fail (the extra one is the desync guard)
- pointed DEAD_IMPORT_ROOTS at a missing directory → 1 fail, so the check
cannot silently scan nothing
- dropped src/server/ws/ from policyPrefixes → 1 fail, and change-policy
reports policy=false for a ws-only diff
check:policy is 219 pass / 0 fail; src/server/__tests__/websocket-handler
.test.ts is 87 pass / 0 fail.
122 lines
5.9 KiB
JSON
122 lines
5.9 KiB
JSON
{
|
|
"name": "claude-code-local",
|
|
"version": "999.0.0-local",
|
|
"private": true,
|
|
"type": "module",
|
|
"packageManager": "bun@1.3.14",
|
|
"bin": {
|
|
"claude-haha": "./bin/claude-haha"
|
|
},
|
|
"scripts": {
|
|
"claude-haha": "bun --no-env-file run ./bin/claude-haha",
|
|
"start": "bun --no-env-file run ./bin/claude-haha",
|
|
"perf:local-index": "bun run scripts/perf/local-index-benchmark.ts",
|
|
"perf:local-index:10k": "bun run scripts/perf/local-index-benchmark.ts --sessions 10000 --runs 20",
|
|
"check:pr": "bun run scripts/pr/check-pr.ts",
|
|
"check:impact": "bun run scripts/pr/impact-report.ts",
|
|
"check:policy": "bun test ./scripts/pr/bun-test-filter.test.ts ./scripts/pr/change-policy.test.ts ./scripts/pr/changed-files.test.ts ./scripts/pr/dead-imports.test.ts ./scripts/pr/module-graph.test.ts ./scripts/pr/pr-triage-workflow.test.ts ./scripts/pr/pr-quality-workflow.test.ts ./scripts/pr/release-workflow.test.ts ./scripts/pr/quality-contract.test.ts ./scripts/pr/test-environment.test.ts ./scripts/release-update-metadata.test.ts ./scripts/git-hooks/install.test.ts ./scripts/quality-gate/quarantine.test.ts ./scripts/quality-gate/coverage.test.ts ./scripts/quality-gate/provider-smoke/execute.test.ts ./scripts/quality-gate/desktop-smoke/execute.test.ts ./scripts/quality-gate/providerTargets.test.ts ./scripts/quality-gate/runner.test.ts ./scripts/quality-gate/sandbox.test.ts ./scripts/quality-gate/agent-flow/scenarios.test.ts ./scripts/quality-gate/agent-flow/live.test.ts ./scripts/quality-gate/desktop-smoke/deterministic.test.ts",
|
|
"check:server": "bun run scripts/pr/run-server-tests.ts",
|
|
"check:provider-contract": "bun run scripts/pr/run-provider-contract-tests.ts",
|
|
"check:chat-contract": "bun run scripts/pr/run-chat-contract-tests.ts",
|
|
"check:agent-flow": "bun run scripts/quality-gate/agent-flow/index.ts",
|
|
"check:desktop-ui-smoke": "bun run scripts/quality-gate/desktop-smoke/deterministic-cli.ts",
|
|
"check:desktop": "cd desktop && bun run lint && bun run test -- --run && bun run build",
|
|
"check:electron": "cd desktop && bun run check:electron",
|
|
"check:adapters": "cd adapters && bun test",
|
|
"check:native": "cd desktop && bun run build:sidecars && bun run test:compiled-sidecar-smoke && bun run check:electron && CSC_IDENTITY_AUTO_DISCOVERY=false bun run electron:package:dir && cd .. && bun run test:package-smoke:current",
|
|
"check:docs": "npm --prefix site ci --loglevel=error && npm --prefix site run --loglevel=error build && npm --prefix site run --loglevel=error check",
|
|
"check:persistence-upgrade": "bun run scripts/quality-gate/persistence-upgrade.ts",
|
|
"check:quarantine": "bun run scripts/quality-gate/quarantine.ts --enforce-review-date",
|
|
"check:coverage": "bun run scripts/quality-gate/coverage.ts",
|
|
"hooks:install": "bun run scripts/git-hooks/install.ts",
|
|
"verify": "bun run quality:pr",
|
|
"quality:gate": "bun run scripts/quality-gate/index.ts",
|
|
"quality:verify": "bun run quality:pr",
|
|
"quality:providers": "bun run scripts/quality-gate/providers.ts",
|
|
"quality:pr": "bun run quality:gate --mode pr",
|
|
"quality:push": "bun run quality:gate --mode pr --skip coverage",
|
|
"quality:baseline": "bun run quality:gate --mode baseline",
|
|
"quality:release": "bun run quality:gate --mode release",
|
|
"quality:smoke": "bun run quality:gate --mode baseline --allow-live --only 'provider-smoke:*' --only 'desktop-smoke:*'",
|
|
"test:package-smoke": "bun run scripts/quality-gate/package-smoke/index.ts",
|
|
"test:package-smoke:current": "bun run scripts/quality-gate/package-smoke/current.ts",
|
|
"docs:dev": "npm --prefix site run dev",
|
|
"docs:build": "npm --prefix site run build",
|
|
"docs:preview": "npm --prefix site run preview",
|
|
"check:agent-flow:live": "bun run scripts/quality-gate/agent-flow/live-cli.ts"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/sandbox-runtime": "^0.0.44",
|
|
"@anthropic-ai/sdk": "^0.80.0",
|
|
"@aws-sdk/client-bedrock-runtime": "^3.1020.0",
|
|
"@commander-js/extra-typings": "^14.0.0",
|
|
"@growthbook/growthbook": "^1.6.5",
|
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
"@opentelemetry/api-logs": "^0.214.0",
|
|
"@opentelemetry/core": "^2.6.1",
|
|
"@opentelemetry/resources": "^2.6.1",
|
|
"@opentelemetry/sdk-logs": "^0.214.0",
|
|
"@opentelemetry/sdk-metrics": "^2.6.1",
|
|
"@opentelemetry/sdk-trace-base": "^2.6.1",
|
|
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
"ajv": "^8.18.0",
|
|
"asciichart": "^1.5.25",
|
|
"auto-bind": "^5.0.1",
|
|
"axios": "^1.14.0",
|
|
"bidi-js": "^1.0.3",
|
|
"chalk": "^5.6.2",
|
|
"chokidar": "^5.0.0",
|
|
"cli-boxes": "^4.0.1",
|
|
"code-excerpt": "^4.0.0",
|
|
"diff": "^8.0.4",
|
|
"emoji-regex": "^10.6.0",
|
|
"env-paths": "^4.0.0",
|
|
"execa": "^9.6.1",
|
|
"fflate": "^0.8.3",
|
|
"figures": "^6.1.0",
|
|
"fuse.js": "^7.1.0",
|
|
"get-east-asian-width": "^1.5.0",
|
|
"google-auth-library": "^10.6.2",
|
|
"highlight.js": "^11.11.1",
|
|
"https-proxy-agent": "^8.0.0",
|
|
"ignore": "^7.0.5",
|
|
"indent-string": "^5.0.0",
|
|
"ink": "^6.8.0",
|
|
"jsonc-parser": "^3.3.1",
|
|
"lodash-es": "^4.17.23",
|
|
"lru-cache": "^11.2.7",
|
|
"marked": "^17.0.5",
|
|
"medium-zoom": "^1.1.0",
|
|
"p-map": "^7.0.4",
|
|
"picomatch": "^4.0.4",
|
|
"proper-lockfile": "^4.1.2",
|
|
"qrcode": "^1.5.4",
|
|
"react": "^19.2.4",
|
|
"react-reconciler": "^0.33.0",
|
|
"semver": "^7.7.4",
|
|
"shell-quote": "^1.8.3",
|
|
"signal-exit": "^4.1.0",
|
|
"stack-utils": "^2.0.6",
|
|
"strip-ansi": "^7.2.0",
|
|
"supports-hyperlinks": "^4.4.0",
|
|
"tree-kill": "^1.2.2",
|
|
"turndown": "^7.2.4",
|
|
"type-fest": "^5.5.0",
|
|
"undici": "^7.24.6",
|
|
"usehooks-ts": "^3.1.1",
|
|
"vscode-jsonrpc": "^8.2.1",
|
|
"vscode-languageserver-types": "^3.17.5",
|
|
"wrap-ansi": "^10.0.0",
|
|
"ws": "^8.20.0",
|
|
"xss": "^1.0.15",
|
|
"yaml": "^2.8.3",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"overrides": {
|
|
"follow-redirects": "^1.16.0"
|
|
},
|
|
"devDependencies": {
|
|
"mermaid": "^11.14.0"
|
|
}
|
|
}
|