Skip to content

Add daemon-backed Pi npm plugin - #8

Draft
Stephen Belanger (Qard) wants to merge 5 commits into
agent/opencode-daemon-integrationfrom
agent/pi-daemon-integration
Draft

Add daemon-backed Pi npm plugin#8
Stephen Belanger (Qard) wants to merge 5 commits into
agent/opencode-daemon-integrationfrom
agent/pi-daemon-integration

Conversation

@Qard

@Qard Stephen Belanger (Qard) commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • import @braintrust/pi-extension as monorepo-owned package content while preserving its version, docs, fixtures, and compatibility tooling
  • replace the shipped Pi tracing state machine with the shared fail-open daemon client while retaining tracing status and permalink UI
  • send only a non-secret session route: optional profile and organization selection plus a typed destination; omitted profile is resolved as the default by the daemon host
  • keep project selection inside the destination instead of separate project, parent-span, or root-span fields
  • add a Pi Rust translator for turns, LLMs, streaming timing, tools, skills, compaction, branch summaries, attachment, shutdown, and recovery
  • remove the Braintrust SDK and local span state from the runtime tarball; the imported processor remains test-only for fixture parity
  • add pnpm tarball build/validation/publish safeguards and a rolling five-minor Pi compatibility matrix
  • run the actual Pi CLI through the shared integration harness with deterministic model inference, the built extension tarball, the daemon, and mock Braintrust ingest

Validation

  • make validate-pi (6 files, 60 tests, package build, smoke import, and tarball validation)
  • cargo test --manifest-path bt-daemon/Cargo.toml --all-features --locked
  • cargo clippy --manifest-path bt-daemon/Cargo.toml --all-targets --all-features --locked -- -D warnings
  • PI_BIN=... PI_EXTENSION_PATH=... BT_AGENT_INFERENCE_MODE=mock BT_AGENT_INGEST_MODE=mock cargo test --manifest-path bt-daemon/Cargo.toml --all-features --locked --test agent_integration pi_session_emits_traces -- --ignored --nocapture --test-threads=1
  • clean tarball install with @earendil-works/pi-coding-agent@0.80.10; pi --version reported 0.80.10
  • compatibility resolver selected 0.79.10, 0.80.10, 0.81.1, 0.82.1, and 0.83.0

Release safety

No npm package, marketplace repository, tag, or GitHub release was published. Real npm publishing requires an explicit release confirmation.

Stack

This PR intentionally targets the OpenCode integration branch and should merge only after the OpenCode foundation.

@Qard
Stephen Belanger (Qard) force-pushed the agent/pi-daemon-integration branch from 913c627 to bf6240a Compare August 5, 2026 13:59
@Qard
Stephen Belanger (Qard) force-pushed the agent/opencode-daemon-integration branch from 99fe5ec to f0928df Compare August 5, 2026 18:11
@Qard
Stephen Belanger (Qard) force-pushed the agent/pi-daemon-integration branch from bf6240a to a018461 Compare August 5, 2026 18:19
@Qard
Stephen Belanger (Qard) force-pushed the agent/opencode-daemon-integration branch from f0928df to b83b9ef Compare August 5, 2026 18:22
@Qard
Stephen Belanger (Qard) force-pushed the agent/pi-daemon-integration branch 3 times, most recently from a592ba1 to e9cb3bf Compare August 5, 2026 18:27
@Qard
Stephen Belanger (Qard) force-pushed the agent/pi-daemon-integration branch from 33516dd to b926482 Compare August 5, 2026 19:43
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