Skip to content

feat(pi): add BYOK Exa search to Create PR#5924

Open
BillLeoutsakosvl346 wants to merge 3 commits into
stagingfrom
feature/pi-exa
Open

feat(pi): add BYOK Exa search to Create PR#5924
BillLeoutsakosvl346 wants to merge 3 commits into
stagingfrom
feature/pi-exa

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • add a default-off internet search option to Pi Create PR backed exclusively by workspace Exa BYOK
  • isolate the model process from Exa and GitHub credentials with a bounded capability broker, hardened extension hooks, and a fresh finalizer sandbox
  • add fenced search budgets, cleanup/migrations, deployment configuration, documentation, and extensive security/integration coverage

Test plan

  • focused Pi Exa suite (17 files, 134 tests)
  • real PostgreSQL capability integration tests, including stale fencing, settlement, and cleanup
  • full monorepo test suite (1,105 files, 14,245 tests)
  • Sim TypeScript check
  • production monorepo build
  • strict API validation, migration safety, monorepo boundaries, realtime prune, client boundary, and React Query audits
  • two independent reviewed-development cycles with no remaining Critical, High, or Medium findings
  • credentialed staging Pi/Exa smoke before enabling the default-off server feature flag

Made with Cursor

@BillLeoutsakosvl346
BillLeoutsakosvl346 requested a review from a team as a code owner July 24, 2026 10:50
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 24, 2026 3:18pm

Request Review

@gitguardian

gitguardian Bot commented Jul 24, 2026

Copy link
Copy Markdown

️✅ 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.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 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.

@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds default-off, workspace-BYOK Exa search to Pi Create PR.

  • Introduces a bounded search capability broker with reservation, settlement, expiration, and cleanup.
  • Isolates model, Exa, and GitHub credentials through hardened extension hooks and a fresh finalizer sandbox.
  • Adds deployment configuration, database migrations, documentation, CI checks, and focused security and integration coverage.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure related to the previous credential-isolation thread remains.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/executor/handlers/pi/cloud-search-backend.ts Orchestrates the isolated search-enabled worker and credential-bearing finalizer flow.
apps/sim/executor/handlers/pi/pi-search-extension.ts Adds repository-confined tools, sanitized subprocess execution, search access, and secret filtering.
apps/sim/app/api/internal/pi/exa-search/route.ts Implements the authenticated, budgeted Exa BYOK capability broker.
apps/sim/lib/pi/exa-search/capabilities.ts Implements capability authentication, leasing, fencing, settlement, and cleanup.
packages/db/migrations/0269_swift_talisman.sql Adds persistent state required for bounded Pi search capabilities.

Sequence Diagram

sequenceDiagram
  participant Pi as Pi worker
  participant Broker as Exa capability broker
  participant DB as Capability store
  participant Exa as Exa API
  participant Finalizer as Fresh finalizer sandbox
  Pi->>Broker: Search request + short-lived capability
  Broker->>DB: Authenticate and reserve budget
  Broker->>Exa: Search with workspace BYOK
  Exa-->>Broker: Bounded results
  Broker->>DB: Settle reservation
  Broker-->>Pi: Sanitized search results
  Pi-->>Finalizer: Validated change manifest
  Finalizer->>Finalizer: Re-clone, build commit, and push
Loading

Reviews (5): Last reviewed commit: "fix(sandbox): enforce Daytona output lim..." | Re-trigger Greptile

Comment thread apps/sim/executor/handlers/pi/cloud-search-backend.ts
@blacksmith-sh

This comment has been minimized.

Comment thread .github/workflows/test-build.yml
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 05579af. Configure here.

Comment thread apps/sim/lib/pi/exa-search/capabilities.ts
Comment thread apps/sim/lib/execution/remote-sandbox/e2b.ts
Add a default-off, capability-backed search path that uses workspace-owned Exa credentials while isolating model, Exa, and GitHub secrets from untrusted coding tools and finalization.
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

2 issues from previous reviews remain unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ac4a7bf. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

Fail closed even when the E2B SDK resolves a command after reporting a callback overflow.
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cursor review

Comment thread apps/sim/lib/execution/remote-sandbox/daytona.ts
Fail closed when Daytona resolves log delivery after a callback overflow, matching E2B provider behavior.
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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 faf7e93. Configure here.

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