knip fails on main: 9 unused exports under modes/rpc/machine-op

Open Beginner friendly
#6,813 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
bun, typescript
Domain
tooling

Research direction

Reproduce with bun run knip:check from the repo root, then open the files under packages/coding-agent/src/modes/rpc/machine-op/ at the listed line numbers (handler.ts:42, live-handle.ts:11-12, machine-terminals.ts:14, op-args.ts:17, real-path.ts:26,63, terminal-input.ts:8, wire.ts:20). For each name, drop the export keyword, or leave it and add a real consumer such as a test that pins the limit. Done is a clean knip run; the ./dist/bedrock-provider.js entry in packages/ai/knip.jsonc is a separate optional hint.

Written by the indexing model from the issue text.

Description

Summary

bun run knip:check fails on main with 9 unused exports, all under packages/coding-agent/src/modes/rpc/machine-op/:

  • handler.ts:42 RELAY_HOST_READ_MAX_BYTES
  • live-handle.ts:11 OUTPUT_SETTLE_MS, :12 RETAINED_OUTPUT_BYTES
  • machine-terminals.ts:14 MACHINE_TERMINALS_MAX
  • op-args.ts:17 READ_RANGE_MAX_BYTES
  • real-path.ts:26 realPathUnder, :63 within
  • terminal-input.ts:8 KEY_GAP_MS
  • wire.ts:20 MACHINE_OP_COMMANDS

knip also hints that ./dist/bedrock-provider.js can be removed from ignoreUnresolved in packages/ai/knip.jsonc.

Expected

knip is clean. Each name is un-exported, or used by a real consumer (for example a test that pins a limit) where that consumer needs it.

Related

Found while verifying #6809 (#6807), which fixes the two knip items #6767 left; these 9 come from a different change.

Dominant language
TypeScript
Stars
517
Forks
163
Avg merge
23h 31m
Merged PRs (30d)
700

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from code-yeongyu/senpi

All issues in code-yeongyu/senpi

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.