Skip to content

pi: package delegate for standalone publication - #73

Merged
cmpadden merged 1 commit into
mainfrom
pi/delegate-package
Nov 13, 2026
Merged

cmpadden merged 1 commit into
mainfrom
pi/delegate-package

Conversation

@cmpadden

Copy link
Copy Markdown
Owner

Summary

  • Refactor the existing delegate extension into the standalone, publishable @colton.padden/pi-delegate@0.1.0 package while keeping it in the Stow-managed pi/.pi/agent/extensions/delegate/ directory.
  • Move runtime code into src/ and tests into tests/; Pi discovers the manifest's src/index.ts entry point without a shim or build step. All five runtime files are byte-for-byte unchanged, preserving the tool, settings, concurrency/queueing, cancellation, trust handling, and tmux monitors.
  • Add package-local development scripts, a lockfile, host peer dependencies, changelog, and MIT license retaining the upstream Pi subagent attribution.
  • Explicitly allowlist the five runtime files (including monitor-view.mjs) and package documentation. Tests, tooling, installed dependencies, lockfiles, and runtime state are excluded from the nine-file tarball.
  • Document the local publication workflow. No publishing automation or npm publication is performed by this PR.

Validation

  • npm ci --ignore-scripts --no-audit --no-fund
  • npm run check — type-checking and all 48 tests pass, including the original 45 tests and real isolated tmux tests.
  • npm publish --dry-run --json — passes the prepack checks and contains exactly the nine intended files, with public access configured and no bundled dependencies.
  • Also verified a clean standalone copy outside dotfiles and extracted-tarball execution through Pi with a fake child; the packed viewer resolves its sibling path, renders through Node, and exits on cleanup.
  • Staged-file pre-commit checks and git diff --cached --check pass; staged changes audited for secrets, private URLs, installed dependencies, and runtime state.
  • make format passes without changes.
  • make lint is blocked only by the missing local shellcheck executable; its other checks pass.

Local publishing after merge

Review the package contents and confirm the npm account/version before publication:

cd pi/.pi/agent/extensions/delegate
npm whoami # should report colton.padden
npm ci --ignore-scripts
npm run check
npm publish --dry-run
npm publish --access public

The package has no private: true blocker, and publishConfig.access is public. Node.js 24+ is required. Publication remains an explicit local action; no model requests or paid API calls were used for validation.

@cmpadden
cmpadden merged commit 90cc0fb into main Nov 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant