@okx_ai/okx-trade-cli 1.3.1-beta.7 → 1.3.1-beta.9
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/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +1 -1
package/dist/index.js
CHANGED
|
@@ -898,7 +898,7 @@ function getDohBinaryPath() {
|
|
|
898
898
|
return process.env.OKX_DOH_BINARY_PATH;
|
|
899
899
|
}
|
|
900
900
|
const ext = process.platform === "win32" ? ".exe" : "";
|
|
901
|
-
return join(DOH_BIN_DIR, `okx-
|
|
901
|
+
return join(DOH_BIN_DIR, `okx-pilot${ext}`);
|
|
902
902
|
}
|
|
903
903
|
function execDohBinary(domain, exclude = [], userAgent) {
|
|
904
904
|
if (!ALLOWED_DOMAIN_RE.test(domain)) {
|
|
@@ -1331,10 +1331,10 @@ var OKX_CODE_BEHAVIORS = {
|
|
|
1331
1331
|
"50011": { retry: true, suggestion: "Rate limited. Back off and retry after a delay." },
|
|
1332
1332
|
"50061": { retry: true, suggestion: "Too many connections. Reduce request frequency and retry." },
|
|
1333
1333
|
// Server temporarily unavailable → retryable
|
|
1334
|
-
"50001": { retry: true, suggestion: "
|
|
1335
|
-
"50004": { retry: true, suggestion: "Endpoint
|
|
1334
|
+
"50001": { retry: true, suggestion: "Service temporarily unavailable. Retry in a few minutes." },
|
|
1335
|
+
"50004": { retry: true, suggestion: "Endpoint request timeout. Retry later." },
|
|
1336
1336
|
"50013": { retry: true, suggestion: "System busy. Retry after 1-2 seconds." },
|
|
1337
|
-
"50026": { retry: true, suggestion: "
|
|
1337
|
+
"50026": { retry: true, suggestion: "System error. Retry in a few minutes." },
|
|
1338
1338
|
// Region / compliance restriction → do not retry
|
|
1339
1339
|
"51155": { retry: false, suggestion: "Feature unavailable in your region (site: {site}). Verify your site setting matches your account registration region. Available sites: global, eea, us. Do not retry." },
|
|
1340
1340
|
"51734": { retry: false, suggestion: "Feature not supported for your KYC country (site: {site}). Verify your site setting matches your account registration region. Available sites: global, eea, us. Do not retry." },
|
|
@@ -5219,7 +5219,7 @@ function registerOnchainEarnTools() {
|
|
|
5219
5219
|
];
|
|
5220
5220
|
}
|
|
5221
5221
|
var DCD_CODE_BEHAVIORS = {
|
|
5222
|
-
"50001": { retry: true, suggestion: "
|
|
5222
|
+
"50001": { retry: true, suggestion: "Service temporarily unavailable. Retry in a few minutes." },
|
|
5223
5223
|
"50002": { retry: false, suggestion: "Invalid JSON in request body. This is likely a bug \u2014 check request parameters." },
|
|
5224
5224
|
"50014": { retry: false, suggestion: "Missing required parameter. Check that all required fields are provided." },
|
|
5225
5225
|
"50016": { retry: false, suggestion: "notionalCcy does not match productId option type. Use baseCcy for CALL, quoteCcy for PUT." },
|
|
@@ -7837,10 +7837,10 @@ var NEWS_DETAIL = "/api/v5/orbit/news-detail";
|
|
|
7837
7837
|
var NEWS_DOMAINS = "/api/v5/orbit/news-platform";
|
|
7838
7838
|
var SENTIMENT_QUERY = "/api/v5/orbit/currency-sentiment-query";
|
|
7839
7839
|
var SENTIMENT_RANKING = "/api/v5/orbit/currency-sentiment-ranking";
|
|
7840
|
-
var NEWS_LANGUAGE = ["
|
|
7840
|
+
var NEWS_LANGUAGE = ["en-US", "zh-CN"];
|
|
7841
7841
|
function langHeader(lang) {
|
|
7842
|
-
|
|
7843
|
-
return { "Accept-Language":
|
|
7842
|
+
if (lang === "zh-CN" || lang === "zh_CN") return { "Accept-Language": "zh-CN" };
|
|
7843
|
+
return { "Accept-Language": "en-US" };
|
|
7844
7844
|
}
|
|
7845
7845
|
var NEWS_DETAIL_LVL = ["brief", "summary", "full"];
|
|
7846
7846
|
var NEWS_IMPORTANCE = ["high", "medium", "low"];
|
|
@@ -7849,7 +7849,7 @@ var NEWS_SORT = ["latest", "relevant"];
|
|
|
7849
7849
|
var SENTIMENT_PERIOD = ["1h", "4h", "24h"];
|
|
7850
7850
|
var D_COINS_NEWS = 'Comma-separated uppercase ticker symbols (e.g. "BTC,ETH"). Normalize names/aliases to standard tickers.';
|
|
7851
7851
|
var D_COINS_SENTIMENT = 'Comma-separated uppercase ticker symbols, max 20 (e.g. "BTC,ETH"). Normalize names/aliases to standard tickers.';
|
|
7852
|
-
var D_LANGUAGE = "Content language:
|
|
7852
|
+
var D_LANGUAGE = "Content language: zh-CN or en-US. Infer from user's message. No server default.";
|
|
7853
7853
|
var D_BEGIN = "Start time, Unix epoch milliseconds. Parse relative time if given (e.g. 'yesterday', 'last 7 days').";
|
|
7854
7854
|
var D_END = "End time, Unix epoch milliseconds. Parse relative time if given. Omit for no upper bound.";
|
|
7855
7855
|
var D_IMPORTANCE = "Importance filter: high (server default), medium, low. Omit unless user wants broader coverage.";
|
|
@@ -10107,7 +10107,7 @@ function getPlatformDir() {
|
|
|
10107
10107
|
return map[`${p}-${a}`] ?? null;
|
|
10108
10108
|
}
|
|
10109
10109
|
function getBinaryName() {
|
|
10110
|
-
return platform() === "win32" ? "okx-
|
|
10110
|
+
return platform() === "win32" ? "okx-pilot.exe" : "okx-pilot";
|
|
10111
10111
|
}
|
|
10112
10112
|
function hashFile(filePath) {
|
|
10113
10113
|
const buf = readFileSync7(filePath);
|
|
@@ -10990,7 +10990,7 @@ async function cmdDiagnoseMcp(options = {}) {
|
|
|
10990
10990
|
|
|
10991
10991
|
// src/commands/diagnose.ts
|
|
10992
10992
|
var CLI_VERSION = readCliVersion();
|
|
10993
|
-
var GIT_HASH = true ? "
|
|
10993
|
+
var GIT_HASH = true ? "e0312e6" : "dev";
|
|
10994
10994
|
function maskKey2(key) {
|
|
10995
10995
|
if (!key) return "(not set)";
|
|
10996
10996
|
if (key.length <= 8) return "****";
|
|
@@ -12314,24 +12314,24 @@ var CLI_REGISTRY = {
|
|
|
12314
12314
|
commands: {
|
|
12315
12315
|
latest: {
|
|
12316
12316
|
toolName: "news_get_latest",
|
|
12317
|
-
usage: "okx news latest [--coins BTC,ETH] [--lang
|
|
12317
|
+
usage: "okx news latest [--coins BTC,ETH] [--lang zh-CN] [--limit 20]"
|
|
12318
12318
|
},
|
|
12319
12319
|
important: {
|
|
12320
12320
|
toolName: "news_get_latest",
|
|
12321
|
-
usage: "okx news important [--coins BTC,ETH] [--lang
|
|
12321
|
+
usage: "okx news important [--coins BTC,ETH] [--lang zh-CN] [--limit 20]",
|
|
12322
12322
|
description: "Get important/high-impact crypto news"
|
|
12323
12323
|
},
|
|
12324
12324
|
"by-coin": {
|
|
12325
12325
|
toolName: "news_get_by_coin",
|
|
12326
|
-
usage: "okx news by-coin --coins BTC [--importance high] [--lang
|
|
12326
|
+
usage: "okx news by-coin --coins BTC [--importance high] [--lang zh-CN]"
|
|
12327
12327
|
},
|
|
12328
12328
|
search: {
|
|
12329
12329
|
toolName: "news_search",
|
|
12330
|
-
usage: "okx news search --keyword <term> [--coins BTC] [--sentiment bullish] [--lang
|
|
12330
|
+
usage: "okx news search --keyword <term> [--coins BTC] [--sentiment bullish] [--lang zh-CN]"
|
|
12331
12331
|
},
|
|
12332
12332
|
detail: {
|
|
12333
12333
|
toolName: "news_get_detail",
|
|
12334
|
-
usage: "okx news detail <id> [--lang
|
|
12334
|
+
usage: "okx news detail <id> [--lang zh-CN]"
|
|
12335
12335
|
},
|
|
12336
12336
|
domains: {
|
|
12337
12337
|
toolName: "news_get_domains",
|
|
@@ -16882,7 +16882,7 @@ async function cmdEventCancel(run, opts) {
|
|
|
16882
16882
|
// src/index.ts
|
|
16883
16883
|
var _require3 = createRequire3(import.meta.url);
|
|
16884
16884
|
var CLI_VERSION2 = _require3("../package.json").version;
|
|
16885
|
-
var GIT_HASH2 = true ? "
|
|
16885
|
+
var GIT_HASH2 = true ? "e0312e6" : "dev";
|
|
16886
16886
|
function handleDohCommand(action, json, force, binaryPath) {
|
|
16887
16887
|
if (action === "status") return cmdDohStatus(json, binaryPath);
|
|
16888
16888
|
if (action === "install") return cmdDohInstall(json, binaryPath);
|
|
@@ -17726,7 +17726,7 @@ function handleNewsCommand(run, action, rest, v, json) {
|
|
|
17726
17726
|
const limit = v.limit !== void 0 ? Number(v.limit) : void 0;
|
|
17727
17727
|
const begin = v.begin !== void 0 ? Number(v.begin) : void 0;
|
|
17728
17728
|
const end = v.end !== void 0 ? Number(v.end) : void 0;
|
|
17729
|
-
const language = v.lang ?? "
|
|
17729
|
+
const language = v.lang ?? "en-US";
|
|
17730
17730
|
const detailLvl = v["detail-lvl"];
|
|
17731
17731
|
const after = v.after;
|
|
17732
17732
|
const period = v.period;
|