Skip to content

feat(provider): Pi support#50

Merged
steipete merged 2 commits into
openclaw:mainfrom
danielmarbach:pi-agent
May 17, 2026
Merged

feat(provider): Pi support#50
steipete merged 2 commits into
openclaw:mainfrom
danielmarbach:pi-agent

Conversation

@danielmarbach
Copy link
Copy Markdown
Contributor

@danielmarbach danielmarbach commented May 17, 2026

What

Adds a pi provider so clawpatch can use the pi coding agent for review, fix, revalidate, and agent map workflows.

How it works

Shells out to pi -p --no-session in non-interactive print mode with all discovery flags disabled (--no-context-files --no-skills --no-extensions --no-prompt-templates --no-themes) to isolate the invocation from project/user config.

  • Read-only (map, review, revalidate): passes --tools read to restrict pi to the read tool only
  • Write (fix): uses the default tool set (read, bash, edit, write)
  • Prompt delivery: written to temp file, passed via @<path> file reference
  • Model: --model <pattern> forwarded from config (supports anthropic/claude-sonnet-4 and sonnet:high shorthands)
  • Reasoning effort: --thinking <level> mapped from clawpatch reasoning effort
  • Timeout: 180s default, configurable via CLAWPATCH_PI_TIMEOUT_MS or CLAWPATCH_PROVIDER_TIMEOUT_MS
  • Output parsing: reuses shared extractJson() helper

Files changed

  • src/provider.tspiProvider + runPiJson, piPrompt, piFailureMessage, piTimeoutMs helpers
  • src/provider.test.tsproviderByName("pi") assertion
  • CHANGELOG.md — entry under 0.2.1
  • docs/providers.md — pi section with usage, flags, and permission caveats

Checks

pnpm typecheck && pnpm lint && pnpm test && pnpm build

442 tests passing. Dogfooded against pi 0.74.1 with clawpatch doctor, clawpatch map --source agent, and clawpatch review.

@danielmarbach danielmarbach marked this pull request as ready for review May 17, 2026 13:46
@danielmarbach danielmarbach changed the title feat: Pi support feat(provider): Pi support May 17, 2026
@steipete steipete merged commit 7646011 into openclaw:main May 17, 2026
2 checks 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.

2 participants