Ask before create-bot and keep browser fallback#2
Conversation
|
@codex 来 review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88930b6fc8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ```text | ||
| 打开这个仓库后,严格按照 README.md、AGENTS.md、docs/codex-bootstrap-playbook.md、docs/feishu-console-automation.md 执行。优先走 Docker,不要把普通的控制台配置步骤推回给我。先运行 pnpm install、pnpm bootstrap:env、pnpm chrome:debug;如果我没登录飞书开放平台或 OpenAI/Codex,再停下来让我登录。登录完成后,用 Chrome CDP 自动配置飞书开发者平台,拿到 FEISHU_APP_ID 和 FEISHU_APP_SECRET 后写回 .env.real,然后用 Docker 启动并验证服务,最后告诉我怎么在飞书里测试。 | ||
| 打开这个仓库后,严格按照 README.md、AGENTS.md、docs/codex-bootstrap-playbook.md、docs/feishu-console-automation.md 执行。优先走 Docker,不要把普通的控制台配置步骤推回给我。先运行 pnpm install、pnpm bootstrap:env、pnpm chrome:debug。然后先明确问我一个问题:是否要创建新的机器人。如果我回答“要”,就异步执行 `npx -y lark-op-cli@latest create-bot --name "Codex 机器人"` 并持续读取输出;如果过程中出现扫码登录,请把 ASCII 二维码原样转发给我。如果我回答“不要”,再确认我是否已经登录飞书开放平台或 OpenAI/Codex;如果我没登录,再停下来让我登录。登录完成后,就继续走原来的浏览器和 agent-browser / Chrome CDP 方案,只选择已有机器人并完成后续配置,不要再创建新的机器人。拿到 FEISHU_APP_ID 和 FEISHU_APP_SECRET 后写回 .env.real,然后用 Docker 启动并验证服务,最后告诉我怎么在飞书里测试。 |
There was a problem hiding this comment.
Keep auth checkpoint in the create-bot branch
This prompt now gates the Feishu/OpenAI login check behind the 如果我回答“不要” branch, so users who answer “要” can be sent down create-bot without first handling missing auth state (for example, no local ~/.codex login). In that case the run can stall or fail later instead of stopping at the intended human checkpoint, which regresses the bootstrap reliability for fresh environments; keep the login check unconditional or duplicate it in the create-bot branch.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88930b6fc8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 5. If the answer is no, connect to the Chrome CDP endpoint started by `pnpm chrome:debug`. | ||
| 6. Open the Feishu Open Platform app list. | ||
| 7. If the user is not logged in, stop and ask them to finish login in that browser window. | ||
| 8. In the browser branch, continue with the original browser/CDP path and select an existing target bot in Feishu Open Platform. Do not create a new bot in this branch. |
There was a problem hiding this comment.
Preserve app creation in browser fallback path
This step now forbids creating a bot in the browser fallback (Do not create a new bot in this branch), which regresses the prior flow where the browser path could still create an app when none existed. If a user answers “no” to the CLI create-bot branch (for example due to CLI/login constraints) and their tenant has no existing bot, the bootstrap process dead-ends and cannot reach the documented target state or produce FEISHU_APP_ID/FEISHU_APP_SECRET.
Useful? React with 👍 / 👎.
Summary
npx -y lark-op-cli@latest create-bot --name "Codex 机器人", streams output, and immediately surfaces any ASCII QR login promptagent-browserpath for bot selection or creationWhy this matters
Files changed
README.mddocs/codex-bootstrap-prompt.mddocs/codex-bootstrap-playbook.mdValidation