fix(coding-agent): avoid fork-only pi-ai imports

Merged
CO
6mo ago
+171-52

Closes #2

Summary

  • move senpi-specific thinking-tier helpers into packages/coding-agent
  • move compaction tool-pair repair into packages/coding-agent
  • stop importing fork-only helper exports from published @earendil-works/pi-ai

Verification

  • npx biome check --error-on-warnings packages/coding-agent/src/core/agent-session.ts packages/coding-agent/src/core/sdk.ts packages/coding-agent/src/core/thinking-levels.ts packages/coding-agent/src/core/extensions/builtin/compaction/index.ts packages/coding-agent/src/core/extensions/builtin/compaction/repair-tool-pairs.ts packages/coding-agent/test/compaction/tool-pair-repair.test.ts
  • npx tsgo --noEmit
  • cd packages/coding-agent && npx tsx ../../node_modules/vitest/dist/cli.js --run test/compaction/tool-pair-repair.test.ts
  • npm run check

Summary by cubic

Prevents ESM import errors in the packaged @code-yeongyu/senpi by internalizing fork-only helpers previously imported from @earendil-works/pi-ai. Stabilizes CI by typechecking the web UI against workspace sources and building workspace entries before tests.

  • Bug Fixes
    • Moved thinking-tier helpers to src/core/thinking-levels.ts and compaction repair to builtin/compaction/repair-tool-pairs.ts; updated agent-session.ts, sdk.ts, and compaction code/tests; removed fork-only @earendil-works/pi-ai imports.
    • Updated packages/web-ui and example tsconfig.json to map @earendil-works/* to workspace src files and include DOM libs for CI typechecking.
    • CI: added a build step (npm run build) before tests.
    • Tests: added stopWorkingLoader stub in interactive-mode-import-command.test.ts to match the command context.