Loading...
Loading...
Compare original and translation side by side
First use:will download go-easy and dependencies (~23 MB) on the first call. Advise the user of a possible delay on the first response.npx
首次使用说明:首次调用时,会下载go-easy及其依赖包(约23MB)。请告知用户首次响应可能会有延迟。npx
@marcfargas/go-easy/gmail/drive/calendar/tasks/authnpx go-gmailnpx go-drivenpx go-calendarnpx go-tasks--confirmnpx go-easyauth listauth addauth remove@marcfargas/go-easy/gmail/drive/calendar/tasks/authnpx go-gmailnpx go-drivenpx go-calendarnpx go-tasks--confirmnpx go-easyauth listauth addauth remove| Service | Gateway CLI | Status | Details |
|---|---|---|---|
| Gmail | | ✅ Ready | gmail.md |
| Drive | | ✅ Ready | drive.md |
| Calendar | | ✅ Ready | calendar.md |
| Tasks | | ✅ Ready | tasks.md |
| 服务 | 网关CLI | 状态 | 详情 |
|---|---|---|---|
| Gmail | | ✅ 已就绪 | gmail.md |
| Drive | | ✅ 已就绪 | drive.md |
| Calendar | | ✅ 已就绪 | calendar.md |
| Tasks | | ✅ 已就绪 | tasks.md |
~/.go-easy/~/.go-easy/npx go-easy auth listnpx go-easy auth listundefinedundefinedundefinedundefined
**Agent workflow:**
1. Call `auth add <email>` → get `{ status: "started", authUrl }`
2. Show URL to user: *"Please click this link to authorize: [url]"*
3. Wait ~15 seconds, then poll: `auth add <email>`
4. Repeat polling until `status` is `complete`, `denied`, `expired`, or `error`
5. On `complete`: continue with the task
**Possible statuses:**
| Status | Meaning | Action |
|--------|---------|--------|
| `started` | Auth server launched, waiting for user | Show URL, start polling |
| `waiting` | Server alive, user hasn't completed | Keep polling every 15s |
| `complete` | Success — token stored | Continue with task |
| `partial` | User didn't grant all scopes | Inform user, may retry |
| `denied` | User clicked "Deny" | Inform user |
| `expired` | 5-minute timeout | Retry with `auth add` |
| `error` | Server/token exchange failed | Show message, retry |
If account is already fully configured, `auth add` returns `{ status: "complete" }` immediately (idempotent).
**Agent操作流程:**
1. 执行`auth add <email>` → 获取`{ status: "started", authUrl }`
2. 向用户展示URL:*"请点击此链接完成授权:[url]"*
3. 等待约15秒后执行轮询:`auth add <email>`
4. 重复轮询,直到`status`变为`complete`、`denied`、`expired`或`error`
5. 当`status`为`complete`时:继续执行任务
**可能的状态说明:**
| 状态 | 含义 | 操作建议 |
|--------|---------|--------|
| `started` | 认证服务已启动,等待用户操作 | 展示URL并开始轮询 |
| `waiting` | 服务正常运行,用户尚未完成操作 | 每15秒执行一次轮询 |
| `complete` | 认证成功——令牌已存储 | 继续执行任务 |
| `partial` | 用户未授予全部权限 | 告知用户,可重试 |
| `denied` | 用户点击了“拒绝” | 告知用户 |
| `expired` | 5分钟超时 | 重新执行`auth add`命令 |
| `error` | 服务/令牌交换失败 | 展示错误信息并重试 |
如果账户已完成完整配置,执行`auth add`会立即返回`{ status: "complete" }`(幂等操作)。npx go-easy auth remove marc@blegal.eu --confirmnpx go-easy auth remove marc@blegal.eu --confirm
Without `--confirm`: shows what would happen, exits with code 2.
如果未添加`--confirm`参数:会展示将要执行的操作,然后以状态码2退出。fix{ "error": "AUTH_NO_ACCOUNT", "message": "Account \"x@y.com\" not configured", "fix": "npx go-easy auth add x@y.com" }fixfix{ "error": "AUTH_NO_ACCOUNT", "message": "Account \\"x@y.com\\" not configured", "fix": "npx go-easy auth add x@y.com" }fix--confirm--confirm--confirm--confirm--confirm--confirm--confirm--confirmC:\dev\go-easyC:\\dev\\go-easyundefinedundefined
Load the per-service doc for the full reference:
- Gmail → [gmail.md](gmail.md)
- Drive → [drive.md](drive.md)
- Calendar → [calendar.md](calendar.md)
- Tasks → [tasks.md](tasks.md)
请查阅各服务对应的文档获取完整参考:
- Gmail → [gmail.md](gmail.md)
- Drive → [drive.md](drive.md)
- Calendar → [calendar.md](calendar.md)
- Tasks → [tasks.md](tasks.md)",