Skip to content

toolcraft@0.0.12: bundled @poe-code/task-list imports unbundled @poe-code/process-runner — runCLI fails at module load #282

@kamilio

Description

@kamilio

Summary

toolcraft@0.0.12 is unusable as published: importing anything from toolcraft/cli crashes at module load because a transitive @poe-code/process-runner is neither bundled in the tarball nor published to npm.

Repro

mkdir t && cd t && bun init -y
bun add toolcraft@0.0.12
echo 'import { runCLI } from "toolcraft/cli"; console.log(typeof runCLI);' > x.ts
bun x.ts
error: Cannot find module '@poe-code/process-runner' from
'.../node_modules/.bun/toolcraft@0.0.12/node_modules/toolcraft/node_modules/@poe-code/task-list/dist/backends/gh-issues-client.js'

Evidence

toolcraft@0.0.12's package.json lists @poe-code/task-list in bundleDependencies (good — it's in the tarball at package/node_modules/@poe-code/task-list/).

But the bundled @poe-code/task-list@0.0.1's own package.json declares:

"dependencies": {
  "@poe-code/file-lock": "*",
  "@poe-code/process-runner": "*",
  "yaml": "*"
}

@poe-code/process-runner is:

  • not in toolcraft's bundle (ls package/node_modules/@poe-code/ → no process-runner)
  • not published on npm — curl -sI https://registry.npmjs.org/@poe-code/process-runner returns 404

It is imported eagerly at the top of @poe-code/task-list/dist/backends/gh-issues-client.js:

import { createHostRunner } from "@poe-code/process-runner";

…and that file is reachable from toolcraft's CLI entrypoint, so any import "toolcraft/cli" crashes.

The same *-version pattern means several other transitive deps (tiny-mcp-client, auth-store) only work because they happen to be bundled — process-runner slipped through.

Suggested fix

Any of:

  1. Add @poe-code/process-runner to toolcraft's bundleDependencies so the tarball is self-contained.
  2. Publish @poe-code/process-runner (and the other @poe-code/* workspace packages) to npm so installers can resolve them normally — and prefer real semver ranges over *.
  3. Make the gh-issues-client backend in @poe-code/task-list lazy-load @poe-code/process-runner so it's only required when that backend is actually used.

For context: this blocked an attempt to migrate from poe-code/cmdkit (dropped from poe-code exports at 3.0.188) to standalone toolcraft. We're currently pinned at poe-code@3.0.187 because of this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions