Uh oh!
There was an error while loading. Please reload this page.
feat(ai-providers): add Antigravity and Cursor OAuth providers - #269
feat(ai-providers): add Antigravity and Cursor OAuth providers#269JS-banana wants to merge 5 commits into
Conversation
tt-a1i
left a comment
There was a problem hiding this comment.
Reviewed exact head 128a1d4b9ba93339e022cd864ee504c56aa47cc3.
The Pi-native provider direction is valuable, and the focused provider tests cover substantial protocol behavior. However, the standard installed-runtime acceptance currently fails on both required Linux jobs. This is a PR-introduced release blocker, not the unrelated UI fixture failure described in the PR body.
Both Node 22.19.0 and Node 24 complete the test suites, then fail after pi install "$PWD" when pi --offline --no-session --mode rpc auto-loads the new extension:
Cannot find module .../@earendil-works/pi-ai/dist/compat.js/api/google-shared
Please use a runtime-resolvable public Pi API or vendor the required licensed conversion logic locally, and add a clean-install/runtime-load regression test that proves the published package can load the provider extension. The branch is also behind current main, so required checks must be rerun after the fix and update.
Uh oh!
There was an error while loading. Please reload this page.
128a1d4 to
6a45d6bCompareJS-banana
commented
Aug 29, 2026
已按 review 修复,当前 head 为 |
tt-a1i
left a comment
There was a problem hiding this comment.
已复审精确 head ea120dd4f1f7790ce8ec631226e356325fa7f03a。
之前反馈的 google-shared 深层导入导致安装后加载失败,当前版本已修复:本地隔离 Pi 配置下,pi list 唯一 OpenPI 来源为该 head 的 checkout,源码安装后的离线 RPC 自动加载通过;当前 Node 22/24 CI 的源码与打包加载 smoke 也均通过。这项旧阻塞不再重复计入。
本轮按仓库规范和功能契约分别复核,并补充本地回环 HTTP/HTTP2 对抗检查,确认 4 项需修改的问题,详见行内评论:
- P1:Cursor 不完整的 token usage 被 Pi 当作完整上下文用量,破坏上下文估计和自动压缩阈值。
- P2:拒绝 Cursor 原生 exec 后,仍可能向 Pi 返回成功终态。
- P2:Antigravity 非 2xx 响应体读取绕过请求超时。
- P2:Antigravity 在版本发现期间取消登录后,仍启动回调监听并继续等待。
验证:本地 Node v26.3.0;provider 专项 54/54;bun run check 通过;完整测试 Node 1068 passed / 1 skipped,Vitest 30/30。上述对抗检查使用假凭据和本地模拟响应,没有登录真实账号或调用实际模型。现有测试绿色不能覆盖这四条遗漏路径。
没有发现 Cursor 原生工具实际执行或权限绕过;第 2 项是失败没有正确传播到 Pi 的终态问题。原生 provider 注册、凭据归 Pi 管理的方向可以保留。
请修复并补回归测试后再复审。真实账号的登录/刷新、Antigravity 普通 Pi 工具调用、Cursor 纯聊天及取消仍需单独验收;分支落后于 main,更新后也需要新的精确 head CI。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
JS-banana
commented
Aug 31, 2026
已完成本轮 review 并更新到精确 head
验证:provider 58/58; |
tt-a1i
left a comment
There was a problem hiding this comment.
复审 exact head 9644edb07e6183b6922439487697596106acd0f8。Pi-native provider 方向可保留。此前4项问题中,Cursor拒绝exec后明确失败、Antigravity错误响应body有界读取、版本发现阶段取消OAuth三项已有实质修复,本次不重复计入。
Standards
注册、权限和配置入口没有新增确认违规。独立审查另发现条件性提示:自定义fetch提供的ReadableStream若cancel()永不结束,错误body读取finally仍会等待;仅mock transport复现,未证明原生fetch受影响,本次不将其算作新增阻塞。
Spec
仍有1项P2:Cursor usage全部置零后,Pi能估算上下文展示,但纯Cursor新会话没有lastUsageIndex,当前Pi 0.84.1真实阈值压缩入口会提前返回false。因此PR正文声称的context/compaction fallback仍不完整;详见行内。
验证:check通过,provider专项58/58;使用当前checkout依赖直接调用真实AgentSession.prototype._checkCompaction,800000字符输入+当前全零usage格式响应,estimate.tokens=200001、lastUsageIndex=null、compactCalls=0。没有修改Pi方法或替换其判断。全套并行尝试发生setup集成子进程超时,不能记为全套通过。日常pi list仍唯一指向openpi-main-runtime,本轮结论来自精确源码和依赖测试,不冒充该PR已安装验收;未登录真实账号、调用真实模型或验收代理E2E。
请补真实Pi压缩入口的回归,并按Pi支持的usage/压缩契约解决或明确修订支持边界;不要伪造计费usage,也不要另造一套压缩生命周期。
Uh oh!
There was an error while loading. Please reload this page.
tt-a1i
commented
Aug 31, 2026
当前 head 9644edb 已复审:旧4项中3项修复;剩下 Cursor 全零usage导致纯Cursor会话不进入Pi阈值压缩。真实Pi入口复现已确认,详见 #269 (review) 。check和58项provider专项通过;真实账号E2E仍未验收。本轮未改代码或合并。 |
9644edb to
849a13eCompareRegister opt-in Google Antigravity (full Pi tools) and experimental Cursor (chat-only) providers so users can /login with existing subscriptions without forking Pi or bypassing its permission lifecycle.
849a13e to
12d9c43Compare
Problem
OpenPI currently has no Pi-native way to use an existing Google Antigravity or Cursor subscription as a provider. Users otherwise need a fork or a parallel agent/provider stack, which would bypass Pi ownership of credentials, model selection, tools, permissions, and session lifecycle.
Related: #234. Project-wide Pi baseline follow-up: #328 and #330.
Value
This adds opt-in OAuth providers at Pi's existing provider seam:
Approach
extensions/ai-providers/without adding package defaults or an extension-specific setup command.tokenDeltais deliberately not published as complete usage. Pi 0.84.3+ estimates the all-Cursor history at the realAgentSession._checkCompactionentry and can trigger threshold compaction. Pi 0.84.1 retains correct unknown usage but cannot threshold-compact a session with no usage-backed response; chore(deps): define and enforce the supported Pi baseline #328 tracks the project-wide baseline decision separately.composer-2.5is explicitly pinned to the Standard lane rather than the server's Fast default.SimpleStreamOptions.toolChoicetype is handled locally without changing this PR's package manifest or lockfile.THIRD_PARTY_NOTICES.md.Validation
Exact local head:
12d9c43d145819dae7010aeb52e7d8827cd2e83e.Pi 0.84.1 (the current frozen lock):
bun install --frozen-lockfile— installed Pi 0.84.1.bun run check— passed (config contract, discipline ledger, format, lint, TypeScript).PI_CODING_AGENT_DIR+bun run test— Node 1173 passed / 1 skipped; Vitest 30/30.Pi 0.84.4 (isolated latest-compatible install; no tracked dependency changes):
bun run check— passed.PI_CODING_AGENT_DIR+bun run test— Node 1173 passed / 1 skipped; Vitest 30/30.git diff upstream/main -- package.json bun.lockis empty: dependency/baseline changes are intentionally excluded from this feature PR.Earlier real-account evidence covered OAuth login,
/model, text/multi-turn chat, and non-text input. The current exact head changes lifecycle/error/model-metadata boundaries and has not been rerun against real Cursor/Antigravity accounts; that remains explicit acceptance work.Impact
google-antigravityand experimentalcursorlogin/model choices.