Skip to content

feat(pi): add native Pi Coding Agent support - #1259

Merged
Teingi merged 16 commits into
oceanbase:masterfrom
pi-dal:agent/pi-coding-agent-support
Aug 21, 2026
Merged

feat(pi): add native Pi Coding Agent support#1259
Teingi merged 16 commits into
oceanbase:masterfrom
pi-dal:agent/pi-coding-agent-support

Conversation

@pi-dal

@pi-dal pi-dal commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Closes #1258

Rationale for this change

Pi Coding Agent currently has no PowerContext integration. This adds the smallest native workflow that restores durable project context and transfers work between Pi sessions. It is deliberately not a field-for-field or operation-for-operation clone of the Claude Code integration.

What changes are included in this PR?

  • Add the native Pi package, setup/diagnostic support, CI validation, and a real Pi CLI end-to-end smoke test.
  • Restore bounded context before normal prompts and capture eligible prompt evidence without syncing Pi transcripts.
  • Expose named pc_* Memory and Handoff tools, with interactive confirmation and secret rejection for durable writes.
  • Require confirmation for explicit /pc flush operations.
  • Share credential-safe GitHub source validation between Pi and DSH setup, rejecting credential-bearing URLs and redacting clone failures.
  • Centralize tool registration and document installation, configuration, and the supported workflow in English and Chinese.

Are there any user-facing changes?

Users can install with powercontext setup pi and access native pc_* Memory/Handoff tools and /pc diagnostics in Pi. No breaking API or persisted-format changes.

How was this change tested?

  • mise exec -- make pi-test
  • mise exec -- make test (547 passed, 1 skipped)
  • mise exec -- make contract-test
  • mise exec -- make docs-test
  • mise exec -- make check

AI usage statement

Implemented with Codex (GPT-5) under user direction.

@CLAassistant

CLAassistant commented Aug 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@PsiACE
PsiACE self-requested a review August 18, 2026 12:23
@pi-dal
pi-dal marked this pull request as ready for review August 19, 2026 13:36
@pi-dal

pi-dal commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Testing for this change is complete.

  • Targeted Git-source, Pi, and DSH tests: 15 passed
  • mise exec -- make pi-test: 23 passed
  • mise exec -- make test: passed
  • mise exec -- make check: passed
  • mise exec -- make contract-test: 27 passed
  • mise exec -- make docs-test: passed

The PR is ready for review. Please start reviewing when convenient.

pi-dal added 3 commits August 20, 2026 10:05
…nt-support

# Conflicts:
#	README.md
#	docs/en/docs/how-to/install-and-run.md
#	docs/en/docs/index.md
#	docs/zh/docs/how-to/install-and-run.md
#	docs/zh/docs/index.md
…nt-support

# Conflicts:
#	README.md
#	scripts/generate_js_operations.py
…nt-support

# Conflicts:
#	README.md
#	docs/en/docs/index.md
#	docs/zh/docs/index.md
#	zensical.toml
@pi-dal

pi-dal commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Conflicts with current master are resolved in 8443ec6; the PR is now mergeable.

Validation completed:

  • mise exec -- make check
  • mise exec -- make test — 615 passed, 12 skipped
  • mise exec -- make pi-test — 23 passed
  • mise exec -- make contract-test — 29 passed
  • mise exec -- make docs-test

Please begin review when convenient.

@Teingi

Teingi commented Aug 20, 2026

Copy link
Copy Markdown
Member

License check failed

Comment thread integrations/pi/plugins/powercontext/src/capture.ts Outdated
@pi-dal

pi-dal commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

The review feedback and the failed license check are addressed in a5f619c.

The Pi secret check now uses the centralized boundary-aware scrubber, with regression coverage for password assignments, token-shaped credentials, PEM keys, and ordinary risk-based text. All files reported by the License Check now have Apache-2.0 headers.

Testing is complete:

  • mise exec -- make check
  • mise exec -- make test — 615 passed, 12 skipped
  • mise exec -- make pi-test — 27 passed
  • mise exec -- make contract-test — 29 passed
  • mise exec -- make docs-test

The branch is pushed and ready for review.

Comment thread integrations/pi/plugins/powercontext/src/capture.ts Outdated
@pi-dal

pi-dal commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

All GitHub checks are now green, including License Check.

The review feedback is addressed, the latest master is merged, and the branch is ready for review. Please review when convenient.

@Teingi

Teingi commented Aug 21, 2026

Copy link
Copy Markdown
Member

GitHub currently reports merge conflicts with the latest master branch. Please resolve them and update the PR. Thanks!

@pi-dal

pi-dal commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@Teingi Resolved in a3d7c4e.

I merged the current master (7915a4d) and resolved the CLI conflict while retaining both the Pi and Hermes setup/doctor commands. GitHub now reports the PR as mergeable.

Validation completed:

  • mise exec -- make check
  • mise exec -- make test
  • mise exec -- make pi-test — 29 passed
  • mise exec -- make contract-test — 29 passed
  • mise exec -- make docs-test
  • mise exec -- uv run pytest tests/test_pi_cli.py tests/test_hermes_cli.py tests/test_system_cli.py — 48 passed

The branch is pushed and ready for review.

@Teingi Teingi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teingi
Teingi merged commit 0530a35 into oceanbase:master Aug 21, 2026
12 checks passed
@AlexStocks

Copy link
Copy Markdown
Contributor

@pi-dal if we have supported pi, please submit another PR and update the readme to let users know this feature.

@pi-dal

pi-dal commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@AlexStocks Added the requested README follow-up in #1309.

It announces Pi Coding Agent support in the English, Chinese, and Japanese READMEs; provides a working master-based install and verification path; adds Pi to the official integrations table; and links to the detailed Pi configuration guide.

Validation completed:

  • mise exec -- make docs-test
  • mise exec -- make check

Please review #1309 when convenient.

222twotwotwo pushed a commit to 222twotwotwo/powercontext that referenced this pull request Aug 23, 2026
* feat(pi): add native Pi package

* fix(pi): harden package compatibility

* fix(pi): remove unverified version gate

* feat(pi): align tools with Claude Code

* fix(pi): complete Claude Code parity

* refactor(pi): narrow native tool surface

* fix(integrations): secure explicit writes and Git sources

* docs: align integration installation refs

* fix(integrations): harden remote setup

* fix(pi): harden secret capture checks

* fix(pi): retain captures after flush failures
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.

feat(pi): add native Pi Coding Agent support

4 participants