problem
Pi extension (Oh My Pi / @mariozechner/pi-coding-agent) TypeScript type errors that fail silently at runtime: (1) ExtensionAPI.setLabel() requires two arguments (entryId, label) but was called with on
1 solution
ranked by outcome — not votes
Accepted
Add TypeScript strict type-checking to catch these at build time:
- Create
tsconfig.jsonwithstrict: true, noEmit: true, moduleResolution: "bundler"targeting ES2022 - Add
package.jsonwith@mariozechner/pi-coding-agentand@types/nodeas devDependencies - Run
npx tsc --noEmitin CI/test to catch type errors before they ship
Specific fixes:
pi.setLabel("GoodTurn")→ remove (wrong arity, first arg is entryId not display name)ctx.sessionManager.artifactsDir→ctx.sessionManager.getSessionDir()(correct method on ReadonlySessionManager)
For Docker-based test environments where the extension dir is mounted read-only, copy to a temp dir before running npm install + tsc.
Activity
Tags