@bitget-ai/bitget-agent-skill 4.0.2 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,40 @@ All notable changes to `bitget-agent-skill` are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.0.4] - 2026-11-24
9
+
10
+ ### Fixed
11
+
12
+ - **Codex after a disconnect.** `disconnectAgent` ends the authorization on
13
+ the server, but Codex keeps its own copy of the login and tries it again at
14
+ every start, then marks the server as needing authentication without
15
+ saying how to fix it. One user was stuck this way for two days. After a
16
+ disconnect in Codex the skill now runs `codex mcp logout
17
+ bitget-mcp-server`, and the troubleshooting table says how to recover
18
+ (`codex mcp logout`, then `codex mcp login`).
19
+
20
+ Can be published at any time; it does not depend on a server change.
21
+
22
+ ## [4.0.3] - 2026-11-19
23
+
24
+ Publish after agent-oauth-server and quant-data-platform with the roster of
25
+ connected agents are both live.
26
+
27
+ ### Added
28
+
29
+ - **Other agents on the account.** When a result carries `connectedAgents`, the agent tells the user who else is connected and points out any marked `new`. It leaves orders that carry another agent's `agentTag` alone. `getConnectedAgents` lists every connection with its last activity.
30
+ - **Removing an agent the user no longer uses:** `disconnectAgent` with that agent's `agentTag`.
31
+ - **Saying why a call is unauthorized.** The server now says whether the agent was disconnected by the user, by another agent, for being unused, and so on; the agent passes that on before offering to authorize again.
32
+ - **Evaluation scenarios** for the three cases above.
33
+
34
+ ### Fixed (from running real Codex sessions through the onboarding prompt)
35
+
36
+ - **`codex mcp add` already starts the login** in recent Codex versions and opens the browser. The skill told the agent to run `codex mcp login` after it, which made the first link useless. It now says to let that login finish.
37
+ - **Codex waits about five minutes** for the callback. The Codex notes say so, and to start a new login and use only the new link after a timeout.
38
+ - **Headless Codex:** `codex mcp login --no-browser` prints the link and takes the address the browser ends on. This replaces the instructions to run the login in the background and request the callback by hand.
39
+ - **One link at a time:** after a retry, the user is asked to close older authorization tabs, which look the same but no longer work.
40
+ - **A target the installer could not write to** (for example `~/.agents/skills` inside the Codex sandbox) is now treated as not installed: the agent runs the installer again with permission, or tells the user.
41
+
8
42
  ## [4.0.2] - 2026-11-19
9
43
 
10
44
  Publish after quant-data-platform with `disconnectAgent` and agent-oauth-server
package/README.md CHANGED
@@ -32,13 +32,29 @@
32
32
 
33
33
  ## Quick Start
34
34
 
35
- Paste this into your AI agent (requires Node.js 20+):
35
+ Copy this to your AI agent:
36
36
 
37
37
  ```prompt
38
- Please set up Bitget for me: 1. Run npx @bitget-ai/bitget-agent-skill@latest --target all and read the installed SKILL.md; 2. Follow it to connect the MCP https://agent.bitget.com/mcp and open the authorization page. Tell me when it is done.
38
+ Connect me to Bitget through its MCP server: https://agent.bitget.com/mcp
39
+
40
+ If you can run shell commands, first install the official skill with
41
+ `npx @bitget-ai/bitget-agent-skill@latest --target all`, read the SKILL.md
42
+ it prints, and follow it. If you can't, tell me how to add that URL as an
43
+ MCP server or connector in this app.
44
+
45
+ Then start authorization. I will log in and approve in my browser. This
46
+ flow has no API keys, so don't ask me for one.
47
+
48
+ You are done when a read-only account call succeeds. Show me my balance.
39
49
  ```
40
50
 
41
- A browser window opens for you to log in to Bitget and approve. You never copy an API key.
51
+ What to expect:
52
+
53
+ - A Bitget page opens in your browser. You log in, pick or create an Agentic account, and approve.
54
+ - You are never asked for an API key. If an agent or a page asks for one, stop.
55
+ - To disconnect later, tell your agent "disconnect from Bitget".
56
+
57
+ Installing the skill needs Node.js 20 or later. An AI app that cannot run commands only needs the MCP address added as a connector; the server itself tells the agent how to sign in, trade safely and disconnect.
42
58
 
43
59
  **Verify it worked.** Ask your AI: *"Show my Bitget Agentic account assets."* If it returns your balances, you are connected.
44
60
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.2
1
+ 4.0.4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitget-ai/bitget-agent-skill",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "packageManager": "pnpm@8.14.1",
5
5
  "description": "Official Bitget AI skill — teaches Claude Code, Codex, Cursor, OpenClaw and other AI agents to connect the Bitget cloud MCP (https://agent.bitget.com/mcp), authorize a Bitget Agentic account with browser OAuth, and trade or query from natural language. No local API keys. Run `npx @bitget-ai/bitget-agent-skill` to deploy into your AI tool's skill directory.",
6
6
  "type": "module",
@@ -19,7 +19,7 @@ license: MIT
19
19
  compatibility: Requires an AI client that can connect remote HTTP MCP servers with OAuth, and network access to agent.bitget.com and bitget.com.
20
20
  metadata:
21
21
  author: "Bitget"
22
- version: "4.0.2"
22
+ version: "4.0.4"
23
23
  updated: "2026-11-19"
24
24
  mcp-server: "https://agent.bitget.com/mcp"
25
25
  ---
@@ -105,8 +105,13 @@ The server refuses high-risk writes (cancel all, close all, countdown cancel-all
105
105
  do_request_open_api(operation_id="disconnectAgent", confirm=true)
106
106
  ```
107
107
 
108
+ Then clear this client's own copy of the login, or it keeps trying the old one: in Codex run `codex mcp logout bitget-mcp-server` (use the name the server was added under). To connect again later: `codex mcp login bitget-mcp-server`.
109
+
108
110
  Do not send the user to the Bitget website to disconnect. Do not call it for any other reason, such as an error or an expired token.
109
111
 
112
+ - **Other agents on the account.** A result may carry `connectedAgents`: the other agents connected to this account, sent when one joins or leaves. Tell the user in one sentence. If one is marked `new`, say so plainly: the user may not have connected it. An order whose `clientOid` starts with another agent's `agentTag` is that agent's order: do not cancel or change it unless the user asks. `do_request_open_api(operation_id="getConnectedAgents")` lists every connection with when it was last active. To disconnect one of them at the user's request, pass its tag: `do_request_open_api(operation_id="disconnectAgent", params={"agentTag": "<tag>"}, confirm=true)`.
113
+ - **When a private call says why it is unauthorized,** tell the user that reason (for example "disconnected at the user's request", "disconnected by another agent", "not used for a long time") before you offer to authorize again.
114
+
110
115
  - **Token validity** is judged only by an unauthorized or HTTP 401 result from a private call. Do not assume a lifetime, and do not describe it as an API key expiring. Once the token is invalid, stop trading and re-authorize first.
111
116
 
112
117
  ## Old setups
@@ -71,19 +71,23 @@ These apply to Codex CLI and the Codex desktop app only. They are the standard p
71
71
  ```
72
72
 
73
73
  No callback setting is needed. If `~/.codex/config.toml` already has `callback_url` and `callback_port` for this server, leave them; they still work.
74
- - **Login:**
74
+
75
+ Recent Codex versions start the login as part of `add`: the command prints the authorization link, opens the browser, and waits. If it does, that is the login. Let it finish and do not start another one, because a new login makes the first link useless.
76
+ - **Login** (when `add` did not start one, or to log in again):
75
77
 
76
78
  ```bash
77
79
  codex mcp login bitget-mcp-server
78
80
  ```
79
81
 
80
- The command prints the authorization link, opens the browser, and waits for the callback. **Keep it running until the user has finished in the browser.** The link only works while this command is waiting, so do not stop the command, or let it time out, and hand the link over afterwards. Behind a proxy:
82
+ The command prints the link, opens the browser, and waits for the callback. The link works only while the command is waiting, and Codex stops waiting after about five minutes. So keep the command running, tell the user to approve now, and if it times out, run it again and use the new link. Behind a proxy, prefix it with `HTTPS_PROXY=<proxy> HTTP_PROXY=<proxy>`.
83
+ - **One link at a time.** Every login makes a new link and the earlier ones stop working, but they look the same. If the user retries, ask them to close older Bitget authorization tabs and use only the newest link.
84
+ - **No browser on this machine** (remote or headless):
81
85
 
82
86
  ```bash
83
- HTTPS_PROXY=<proxy> HTTP_PROXY=<proxy> codex mcp login bitget-mcp-server
87
+ codex mcp login --no-browser bitget-mcp-server
84
88
  ```
85
89
 
86
- - **No browser on this machine** (remote or headless): start the login in the background and give the user the link it printed. After they approve, their browser lands on an address that starts with `http://127.0.0.1:` or `http://localhost:` and cannot load, because the callback is waiting on this machine and not on theirs. Ask them to paste that full address, then request it here (for example `curl '<address>'`). The login command then finishes.
90
+ It prints the link and then asks for the address the browser ends on. Give the user the link. After they approve, their browser lands on an address that starts with `http://127.0.0.1:` or `http://localhost:` and may not load, because the callback is meant for this machine. Ask them to paste that full address, and enter it at the prompt. Run the command where you can write to its input.
87
91
  - **On the page:** "Create a new Agentic account" → tick the agreement boxes → Authorize.
88
92
  - **New session:** Codex loads a newly registered server when the next session starts. `codex mcp list` shows whether the server is registered and logged in. After a first-time setup, ask the user to start a new session before trading.
89
93
  - **Desktop app:** it shares `~/.codex/config.toml` and the login state with the CLI. After one CLI login the app shows connected, with no extra click.
@@ -21,6 +21,8 @@ npx @bitget-ai/bitget-agent-skill@latest --target all
21
21
 
22
22
  Read the `SKILL.md` path the installer prints, in full, yourself. Do not ask the user to open it. Keep `@latest`: versions before 4.0.0 install a discontinued skill by default.
23
23
 
24
+ Check the installer's summary line. A target marked `✗` was not installed, so that client will not see the skill. This happens when a sandbox blocks writing to the home directory (Codex reads `~/.agents/skills`). Run the command again with permission to write there, or tell the user which client is missing the skill and the command to run themselves.
25
+
24
26
  ## 2. Register the cloud MCP
25
27
 
26
28
  There is one address: `https://agent.bitget.com/mcp`. Register it yourself, under the server name `bitget-mcp-server`. Do not change the domain and do not configure `BITGET_API_*`.
@@ -52,7 +54,7 @@ Claude Code loads the server when the next session starts (step 3).
52
54
  codex mcp add bitget-mcp-server --url https://agent.bitget.com/mcp --oauth-client-id codex
53
55
  ```
54
56
 
55
- Nothing else needs to be configured. Codex loads the server when the next session starts (step 3); the login in step 5 is a shell command and can be done before that.
57
+ Nothing else needs to be configured. Recent Codex versions start the login right away as part of this command: if a link is printed and the browser opens, that is the login from step 5, so let it finish and do not start another. Codex loads the server when the next session starts (step 3); the login can be done before that.
56
58
 
57
59
  **Other clients**
58
60
 
@@ -10,7 +10,10 @@ Find the situation in the table and take the action. If nothing matches and the
10
10
  | Not logged in, and the user wants to trade or query the account | Follow `authorization.md` |
11
11
  | A private call returns unauthorized or HTTP 401, or this agent was disconnected | The token is invalid. Stop trading and follow `authorization.md` |
12
12
  | The user cancelled, or the callback did not complete | Say "Authorization was not completed. Should I start again?" |
13
- | The user asks to disconnect or log out | `do_request_open_api(operation_id="disconnectAgent", confirm=true)`, after telling them what it does ("Account rules" in `SKILL.md`). Do not send them to the Bitget website |
13
+ | A result carries `connectedAgents` | Tell the user who else is connected, and point out any marked `new`. Leave their orders alone ("Account rules" in `SKILL.md`) |
14
+ | The user asks to remove an agent they no longer use | `getConnectedAgents`, show the list with last activity, then `disconnectAgent` with that agent's `agentTag` and `confirm=true` after the user picks one |
15
+ | The user asks to disconnect or log out | `do_request_open_api(operation_id="disconnectAgent", confirm=true)`, after telling them what it does ("Account rules" in `SKILL.md`). Do not send them to the Bitget website. In Codex, then run `codex mcp logout bitget-mcp-server` |
16
+ | Codex keeps saying the server needs authentication after a disconnect | Codex is still trying the old login. Run `codex mcp logout bitget-mcp-server`, then `codex mcp login bitget-mcp-server` to connect again |
14
17
  | The flow finishes but a private call still says not logged in | Wait a few seconds and retry the read-only call once. If it still fails, run one fresh authorization round |
15
18
  | Codex: the authorization link does not complete | The `codex mcp login` command that printed it is no longer running. Run it again and keep it running until the user finishes ("Codex notes" in `authorization.md`) |
16
19
  | Selecting an existing account on the authorization page fails | The account was created by the old SDK or npm tools. The user creates a new account |