Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
run: npm ci
- name: Typecheck
run: npx tsc --noEmit -p packages/bridge/tsconfig.json
- name: Unit tests
run: npm run test:bridge

engine-smoke:
name: Engine smoke (real pi bundle + EngineProcess)
Expand All @@ -75,8 +77,8 @@ jobs:
run: node scripts/pi-host-smoke.mjs
- name: Full RPC surface smoke
run: node scripts/pi-rpc-smoke.mjs
- name: cc-adapter mapping assertions
run: node scripts/cc-adapter-check.mjs
- name: PiGateway full-flow smoke (mock engine)
run: node scripts/real-verify/e2e-full-flow.mjs
- name: Engine bundle unit tests
run: node --test scripts/engine-bundle.test.mjs
- name: Engine bundle build + verify + manifest
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Pi X:纯本地安卓 AI 编码 Agent。UI/协议层源自 CC Pocket(MIT)
## 关键决策(不要推翻)

- 引擎:pi(`@earendil-works/pi-coding-agent`),**`pi --mode rpc` 子进程(官方 JSONL 协议)+ Pi Host 薄网关**(进程池/FS/帧直通),版本跟随管道热换(engines/<ver>),不走 git merge;不采用进程内嵌 AgentSession(见 `docs/ENGINE-INTEGRATION.md` §1/§6 决策修订)。
- **2026-09-06 决策修订(pi-native-audit 分支)**:WS/CC 服务器与 cc-adapter/pi-adapter/pi-sessions/parser 已物理删除,bridge = 纯 stdio 侧车(`pi-stdio-entry.ts` + `pi-host/*`);App 会话/聊天在 Dart 端直通引擎事件(`lib/features/pi/`,事件→界面 1:1,映射表不再作为服务器层)。引擎 agent 目录以 `PI_CODING_AGENT_DIR=<piHome>/.pi/agent` 注入,与桥端文件面同址。UI:首页默认 pi 原生会话页(pref `pi.nativeHome`),CC 会话/聊天屏保留为过渡(`legacyHomeOverride`)。详情见 `docs/STATUS.md` 顶部章节。
- UI:CC Pocket 本地化改造——已删/收敛完成:QR 扫码、Setup guide 远端页、fastlane 商店资产、mDNS 发现、机器管理 UI → 单本机(127.0.0.1)、SSH 隧道/启动、远端更新横幅、FCM 推送、远程连接 deep link → 仅会话分享(见 `docs/REMOTE-AUDIT.md`)。
- 许可红线:只引入 MIT/Apache-2.0;禁止 Aether(GPL) / Operit(LGPL) / GetStream(非 OSI) 代码。
- 审批流:pi 扩展的 `extension_ui_request`(confirm/select/input/editor)经 Pi Host 网关原样透传(含 `confirmed`/`cancelled` 回传),Flutter 端 `PiExtensionUiHost` 渲染原生对话框应答;CC Pocket 协议层审批消息经 cc-adapter 映射(见 `docs/ENGINE-UI-SURFACES.md` §6.4)。
- 审批流:pi 扩展的 `extension_ui_request`(confirm/select/input/editor)经 stdio 透传,Flutter 端 `PiExtensionUiHost` 渲染原生对话框应答(`respondUi` 语义 confirmed/cancelled/value 对齐 pi rpc docs)。
- 只做安卓:构建/CI/文档均按 Android 目标;ios/macos/linux/windows/web 源码保留备用但不在工作范围。

## 目录
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,16 @@ class MainActivity : FlutterActivity() {
// them. node lives at <abi>/bin/node → lib sits at <abi>/lib.
val abiDir = File(nodeBin!!).parentFile?.parentFile ?: root
val libDir = File(abiDir, "lib")
val npmCli = File(abiDir, "npm/bin/npm-cli.js")

return mutableMapOf(
"nodeBin" to nodeBin,
"hostEntry" to hostEntry.absolutePath,
"libDir" to (if (libDir.isDirectory) libDir.absolutePath else ""),
"npmCli" to (if (npmCli.exists()) npmCli.absolutePath else ""),
"piHome" to root.absolutePath,
"enginesDir" to File(root, "engines").absolutePath,
"workspacesDir" to File(filesDir, "workspaces").absolutePath,
)
}
}
Expand Down
Loading
Loading