Port a JavaScript app to strict TypeScript
an agent harness with tools and a workspace
Suite v5 (version 5.0) · 44 scored tasks · cut 2026-11-19· What changed
What it asks
This is Toolshed, a small inventory and lending tracker for a community tool library, written in plain JavaScript (ES modules, Node 18+). Read README.md first.
Port it to TypeScript with strict typing, without changing what it does.
What to do:
1. Convert every module in `src/` to TypeScript (`.ts`) and remove the `.js` originals. Keep the module names, the exported names and the call signatures, so `import { main } from "./cli"` still works.
2. Add a `tsconfig.json` at the project root that turns on `strict`, covers `src/`, and makes `npx tsc -p tsconfig.json` pass with no errors. Don't switch off any strict option, don't use `// @ts-ignore`, `// @ts-nocheck` or `// @ts-expect-error`, and don't write `any`.
3. Type the data as it really is. A tool's status is one of its three values, not a string; the fields that can hold `null` are typed as nullable; the events the store announces are a union you can narrow on its `type`; data read from the JSON file is untrusted until it has been checked.
4. Behavior stays identical: the same command output, error messages, exit codes, saved JSON and audit lines for the same input. Fix nothing and improve nothing while you are in there; if something looks odd, port it as it is.
5. The tests in `test/` must keep passing as they are (`npm test`). They are plain JavaScript and import the modules without a file extension; don't weaken or delete any of them.
`package.json` and the lockfile stay as they are: `typescript`, `@types/node` and `vitest` are already installed. Only `src/` and `tsconfig.json` count. Run `npx tsc -p tsconfig.json` and `npm test` before you finish, and end with a short summary of the places where the types were not obvious. How it's scored
Test groups
- A real TypeScript port
- Types model the data
- Behavior unchanged
- Existing tests still pass
Scored 23 tests in total, scaled to 10, by hidden tests.
Which checks trip models up
Share of the 37 setups’ newest counted runs that passed each check, hardest first. A part-credit check counts the share it earned.
Score spread
One dot per setup, at its mean score. Dots at the same score stack. Select a dot for its run.
Local Cloud
Show the scores as a table
Best performers
Each model's best setup (the one the leaderboard ranks it by, on its Overall score), ranked by score on this task, then time. Check squares are from the setup's newest counted run. Select a run ID to open that run.
| # | Maker | Model | Setup | Score | A real TypeScript port | Types model the data | Behavior unchanged | Time | Tokens out | Cost |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Anthropic | claude-sonnet-5.5 | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | 1m 16s | 13k | $0.142 |
| 2 | OpenAI | gpt-6-luna | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | 2m 07s | 12k | $0.821 |
| 3 | Z.ai (OpenRouter) | glm-5.3-flash | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | 2m 17s | 21k | $0.294 |
| 4 | DeepSeek | deepseek-v4.1-flash | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | 2m 26s | 31k | $0.068 |
| 5 | Qwen | qwen3.6-35b-a3b | local 6bit · reasoning off · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 10.0 | ✓ | ✓ | ✓ | 3m 25s | 11k | ≈$0.00063 |
| 6 | Poolside | laguna-xs-2.1 | local q4_k_m · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood) | 10.0 | ✓ | ✓ | ✓ | 20m 01s | 13k | ≈$0.0024 |
| 7 | Qwen | qwen3.8-27b | cloud pi openrouter | 9.6 | ✓ | ✓ | ~ | 2m 46s | 30k | $1.06 |
| 8 | Qwen | qwen3.6-35b-a3b | local 6bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 9.6 | ✓ | ~ | ✓ | 5m 44s | 14k | ≈$0.0010 |
| 9 | Mistral AI | mistralai/devstral-small-2-2512 | local q4_k_m · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 9.6 | ~ | ✓ | ✓ | 20m 01s | 15k | ≈$0.0037 |
| 10 | OpenAI | gpt-6.1-sol | cloud pi openrouter | 9.1 | ✓ | ~ | ✓ | 1m 53s | 6.1k | $0.361 |
| 11 | Unknown | nvidia-nemotron-3.5-lightning-30b-a3b | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 5.0 | ~ | ✓ | ~ | 20m 00s | 33k | ≈$0.0037 |
| 12 | NVIDIA | nemotron-3-nano-4b | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 4.8 | ~ | ✕ | ~ | 46s | 2.6k | ≈$0.00014 |
| 13 | Unknown | granite-4.2-3b | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 4.3 | ~ | ~ | ~ | 20m 00s | 34k | ≈$0.0037 |
| 14 | Recursive | flint | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 1.7 | ~ | ✕ | ~ | 20m 01s | 5.4k | ≈$0.0037 |
| 15 | Moonshot AI | kimi-k2.6 | cloud pi openrouter | 0.0 | ✕ | ✕ | ✕ | 0.7s | 0 | $0.049 |
| 16 | Anthropic | claude-opus-5.5 | cloud pi openrouter | 0.0×2 | ✕ | ✕ | ✕ | 8.7s | 0 | $0.047 |
| 17 | Allen Institute for AI | allenai/olmocr-2-7b | local q4_k_m · opencode Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | 10.0s | 417 | ≈<$0.0001 |
| 18 | Mistral AI | ministral-3-14b-reasoning | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | 16s | 0 | ≈<$0.0001 |
| 19 | OpenAI | gpt-oss-20b | local mxfp4 · reasoning low · opencode Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | 24s | 215 | ≈<$0.0001 |
| 20 | OpenAI | gpt-oss-20b | local mxfp4 · reasoning medium · pi Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | 35s | 161 | ≈<$0.0001 |
| 21 | OpenAI | gpt-oss-20b | local mxfp4 · reasoning high · pi Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | 40s | 253 | ≈<$0.0001 |
| 22 | Qwen | qwen3.8-27b | local q3_k_s · reasoning high · pi AMD Ryzen 7 7700, NVIDIA RTX 5070 Ti 16 GB, 32 GB (Whitehall) | 0.0 | ✕ | ✕ | ✕ | 8m 42s | 17k | ≈$0.0093 |
| 23 | thinkingmachines | thinkingmachines/inkling-2-mini | local q4_k_m · reasoning low · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | 10m 13s | 17k | ≈$0.0019 |
| 24 | Qwen | qwen3.8-27b | local 4bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | 10m 17s | 18k | ≈$0.0019 |
| 25 | thinkingmachines | thinkingmachines/inkling-2-mini | local q4_k_m · reasoning high · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0×2 | ✕ | ✕ | ✕ | 10m 36s | 17k | ≈$0.0019 |
| 26 | Ornith AI | ornith-1.5-9b | local q4_k_m · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | 16m 08s | 18k | ≈$0.0020 |
- Anthropiccloud pi openrouterScore 10.0✓✓✓Time 1m 16sTokens out 13kCost $0.142
- OpenAIcloud pi openrouterScore 10.0✓✓✓Time 2m 07sTokens out 12kCost $0.821
- Z.ai (OpenRouter)cloud pi openrouterScore 10.0✓✓✓Time 2m 17sTokens out 21kCost $0.294
- DeepSeekcloud pi openrouterScore 10.0✓✓✓Time 2m 26sTokens out 31kCost $0.068
- Qwenlocal 6bit · reasoning off · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 10.0✓✓✓Time 3m 25sTokens out 11kCost ≈$0.00063
- Poolsidelocal q4_k_m · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood)Score 10.0✓✓✓Time 20m 01sTokens out 13kCost ≈$0.0024
- Qwencloud pi openrouterScore 9.6✓✓~Time 2m 46sTokens out 30kCost $1.06
- Qwenlocal 6bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 9.6✓~✓Time 5m 44sTokens out 14kCost ≈$0.0010
- Mistral AIlocal q4_k_m · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 9.6~✓✓Time 20m 01sTokens out 15kCost ≈$0.0037
- OpenAIcloud pi openrouterScore 9.1✓~✓Time 1m 53sTokens out 6.1kCost $0.361
- Unknownlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 5.0~✓~Time 20m 00sTokens out 33kCost ≈$0.0037
- NVIDIAlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 4.8~✕~Time 46sTokens out 2.6kCost ≈$0.00014
- Unknownlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 4.3~~~Time 20m 00sTokens out 34kCost ≈$0.0037
- Recursivelocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 1.7~✕~Time 20m 01sTokens out 5.4kCost ≈$0.0037
- Moonshot AIcloud pi openrouterScore 0.0✕✕✕Time 0.7sTokens out 0Cost $0.049
- Anthropiccloud pi openrouterScore 0.0×2 runs✕✕✕Time 8.7sTokens out 0Cost $0.047
- Allen Institute for AIlocal q4_k_m · opencode Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕Time 10.0sTokens out 417Cost ≈<$0.0001
- Mistral AIlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕Time 16sTokens out 0Cost ≈<$0.0001
- OpenAIlocal mxfp4 · reasoning low · opencode Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕Time 24sTokens out 215Cost ≈<$0.0001
- OpenAIlocal mxfp4 · reasoning medium · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕Time 35sTokens out 161Cost ≈<$0.0001
- OpenAIlocal mxfp4 · reasoning high · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕Time 40sTokens out 253Cost ≈<$0.0001
- Qwenlocal q3_k_s · reasoning high · pi AMD Ryzen 7 7700, NVIDIA RTX 5070 Ti 16 GB, 32 GB (Whitehall)Score 0.0✕✕✕Time 8m 42sTokens out 17kCost ≈$0.0093
- thinkingmachineslocal q4_k_m · reasoning low · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕Time 10m 13sTokens out 17kCost ≈$0.0019
- Qwenlocal 4bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕Time 10m 17sTokens out 18kCost ≈$0.0019
- thinkingmachineslocal q4_k_m · reasoning high · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0×2 runs✕✕✕Time 10m 36sTokens out 17kCost ≈$0.0019
- Ornith AIlocal q4_k_m · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕Time 16m 08sTokens out 18kCost ≈$0.0020
Score against effort
Score against median time per run, log scale. Up and to the left is better. Each dot is a setup; the best setup of each model is named. Times and costs are from different machines and providers, so read them as each setup's own, not as a like-for-like speed test.
Local Cloud
Show the points as a table
Harness comparison
The same task through each agent harness this suite scores for it.
| Harness | Setups | Mean score | Best score | Median time |
|---|---|---|---|---|
| opencode | 8 | 3.7 | 10.0 | 5m 27s |
| pi | 29 | 3.9 | 10.0 | 2m 26s |
- opencodeSetups 8Mean score 3.7Best score 10.0Median time 5m 27s
- piSetups 29Mean score 3.9Best score 10.0Median time 2m 26s
Same setup, different harness
opencodepi
Show the scores as a table
| Setup | Harness scores |
|---|---|
| gpt-6-luna | opencode 9.6 · pi 10.0 |
| glm-5.3-flash | opencode 0.0 · pi 10.0 |
| deepseek-v4.1-flash | opencode 10.0 · pi 10.0 |
| qwen3.6-35b-a3b (reasoning on) | opencode 10.0 · pi 9.6 |
| allenai/olmocr-2-7b | opencode 0.0 · pi 0.0 |
| gpt-oss-20b (reasoning low) | opencode 0.0 · pi 0.0 |
| qwen3.8-27b (reasoning on) | opencode 0.0 · pi 0.0 |
| thinkingmachines/inkling-2-mini (reasoning high) | opencode 0.0 · pi 0.0 |