-
Notifications
You must be signed in to change notification settings - Fork 3
Ask before create-bot and keep browser fallback #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2afc1a6
6a280ab
e0bf4d1
bb4b25b
9880131
2622ea2
ae3441a
1251add
39f0416
a52801f
88930b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,15 +30,20 @@ agent-browser install | |
|
|
||
| ## Browser Automation Path | ||
|
|
||
| 1. Connect to the Chrome CDP endpoint started by `pnpm chrome:debug`. | ||
| 2. Open the Feishu Open Platform app list. | ||
| 3. If the user is not logged in, stop and ask them to finish login in that browser window. | ||
| 4. After login, continue without asking the user to click through normal console steps. | ||
| 5. Follow the target state in `docs/feishu-console-automation.md`. | ||
| 6. Persist the resulting `FEISHU_APP_ID` and `FEISHU_APP_SECRET` into `.env.real`. | ||
| 7. If the user's machine already has `~/.codex/auth.json`, set `CODEX_HOME_SOURCE` in `.env.real` to that absolute host path. Only use `OPENAI_API_KEY` when local Codex auth is missing. | ||
| 8. Keep `CODEX_ARTIFACTS_DIR` pointed at the default artifact directory unless the user explicitly wants another export location. | ||
| 9. Keep `CODEX_WORKSPACE_HOST_PATH` pointed at the dedicated runtime workspace. Do not mount the repository checkout itself to `/workspace`. | ||
| 1. Ask the user one explicit question first: whether they want to create a new bot. | ||
| 2. If the answer is yes, run `npx -y lark-op-cli@latest create-bot --name "Codex 机器人"`. | ||
| 3. In the create-bot branch, read the command output continuously instead of waiting for process exit. | ||
| 4. In the create-bot branch, if the command shows an ASCII QR code or other login prompt, surface it to the user immediately so they can scan or confirm. | ||
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This step now forbids creating a bot in the browser fallback ( Useful? React with 👍 / 👎. |
||
| 9. After the target bot/app is confirmed, continue without asking the user to click through normal console steps. | ||
| 10. Follow the target state in `docs/feishu-console-automation.md`. | ||
| 11. Persist the resulting `FEISHU_APP_ID` and `FEISHU_APP_SECRET` into `.env.real`. | ||
| 12. If the user's machine already has `~/.codex/auth.json`, set `CODEX_HOME_SOURCE` in `.env.real` to that absolute host path. Only use `OPENAI_API_KEY` when local Codex auth is missing. | ||
| 13. Keep `CODEX_ARTIFACTS_DIR` pointed at the default artifact directory unless the user explicitly wants another export location. | ||
| 14. Keep `CODEX_WORKSPACE_HOST_PATH` pointed at the dedicated runtime workspace. Do not mount the repository checkout itself to `/workspace`. | ||
|
|
||
| ## Runtime Setup | ||
|
|
||
|
|
@@ -52,7 +57,7 @@ pnpm docker:smoke | |
| If smoke passes, provide the user with: | ||
|
|
||
| - the app name used | ||
| - whether a new app was created or an existing one was reused | ||
| - whether an existing app was reused or a new one was created | ||
| - the Docker status | ||
| - how to test the bot in Feishu | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prompt now gates the Feishu/OpenAI login check behind the
如果我回答“不要”branch, so users who answer “要” can be sent downcreate-botwithout first handling missing auth state (for example, no local~/.codexlogin). 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 👍 / 👎.