feat(pi): add plan mode - #6372
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Block & policy: New mode dropdown option, Execution: New Event pipeline: Reviewed by Cursor Bugbot for commit 2b653a6. Bugbot is set up for automated code reviews on this repo. Configure here. |
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
8f7faa6 to
e948398
Compare
|
@cursor review |
Greptile SummaryThis PR adds a BYOK-only Plan mode that runs Pi against a disposable GitHub checkout and returns a planning document without a GitHub write/finalization phase.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/executor/handlers/pi/cloud/plan/backend.ts | Implements the disposable Plan-mode clone, credential scoping, Pi execution, event handling, redaction, cancellation, and cleanup flow. |
| apps/sim/executor/handlers/pi/pi-handler.ts | Routes cloud_plan executions, supplies contextual inputs, emits only the canonical final plan in streaming mode, and omits change-oriented outputs. |
| apps/sim/blocks/blocks/pi.ts | Exposes Plan mode with its required sandbox inputs, BYOK behavior, contextual options, and Plan-appropriate outputs. |
| apps/sim/executor/handlers/pi/core/events.ts | Extracts text blocks from the final assistant message into a canonical final event. |
| apps/sim/providers/pi-providers.ts | Classifies Plan alongside other sandbox modes that require user-provided model credentials. |
Sequence Diagram
sequenceDiagram
participant Workflow
participant Handler as Pi Handler
participant Sandbox
participant GitHub
participant Pi
Workflow->>Handler: Execute cloud_plan
Handler->>Handler: Resolve BYOK key, skills, memory
Handler->>Sandbox: Create disposable sandbox
Sandbox->>GitHub: Clone selected/default branch
Sandbox->>Sandbox: Detach checkout and remove origin
Handler->>Sandbox: Write scrubbed prompt
Sandbox->>Pi: Run with model/search credentials
Pi-->>Handler: Progress and final events
Handler-->>Workflow: Final Markdown plan and usage
Sandbox-->>Handler: Dispose sandbox
Reviews (5): Last reviewed commit: "fix(pi): stream only final plan content" | Re-trigger Greptile
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 07949ce. Configure here.
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2b653a6. Configure here.
Summary
Validation
Stack
This PR is intentionally based on refactor/pi-mode-folders (PR #6362). After #6362 merges, this branch will be rebased onto current staging, the PR will be retargeted to staging, and the full validation and bot-review cycle will be repeated.