@candledottv/cli 0.8.1 → 0.8.3
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 +54 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19175,10 +19175,12 @@ async function executionStatus(cfg, doFetch) {
|
|
|
19175
19175
|
["tier", tier],
|
|
19176
19176
|
["limits", limits]
|
|
19177
19177
|
].filter(([, r]) => !r.ok);
|
|
19178
|
+
const tierBody = tier.ok ? tier.body : undefined;
|
|
19178
19179
|
return {
|
|
19179
19180
|
text: JSON.stringify({
|
|
19180
19181
|
success: true,
|
|
19181
19182
|
ready: unreadable.length === 0 ? true : undefined,
|
|
19183
|
+
notice: tierBody?.maxExpired ? tierBody.maxExpiredNotice : undefined,
|
|
19182
19184
|
unreadable: unreadable.length > 0 ? unreadable.map(([name]) => name) : undefined,
|
|
19183
19185
|
wallets: wallets2.body,
|
|
19184
19186
|
tier: tier.body,
|
|
@@ -19545,7 +19547,7 @@ var init_tools = __esm(() => {
|
|
|
19545
19547
|
});
|
|
19546
19548
|
|
|
19547
19549
|
// ../mcp/src/version.ts
|
|
19548
|
-
var SERVER_VERSION = "0.6.
|
|
19550
|
+
var SERVER_VERSION = "0.6.3";
|
|
19549
19551
|
|
|
19550
19552
|
// ../mcp/src/server.ts
|
|
19551
19553
|
var exports_server = {};
|
|
@@ -20258,7 +20260,7 @@ async function resolveApiKey(deps, profile) {
|
|
|
20258
20260
|
}
|
|
20259
20261
|
|
|
20260
20262
|
// src/version.ts
|
|
20261
|
-
var CLI_VERSION = "0.8.
|
|
20263
|
+
var CLI_VERSION = "0.8.3";
|
|
20262
20264
|
|
|
20263
20265
|
// src/commands/auth.ts
|
|
20264
20266
|
var DEVICE_CODE_PATH = "/api/v1/agent/device/code";
|
|
@@ -20735,6 +20737,30 @@ async function doctor(args, ctx) {
|
|
|
20735
20737
|
passDetail
|
|
20736
20738
|
}));
|
|
20737
20739
|
}
|
|
20740
|
+
if (!apiKey) {
|
|
20741
|
+
rows.push({ check: "Plan", state: "SKIP", detail: "no API key to check" });
|
|
20742
|
+
} else {
|
|
20743
|
+
const tierRes = await apiRequest("/api/v1/agent/tier", {
|
|
20744
|
+
auth: "key",
|
|
20745
|
+
credentials: { apiKey },
|
|
20746
|
+
apiUrl,
|
|
20747
|
+
fetch: deps.fetch,
|
|
20748
|
+
env: deps.env
|
|
20749
|
+
});
|
|
20750
|
+
const tierBody = tierRes.ok ? tierRes.body : undefined;
|
|
20751
|
+
if (!tierBody || typeof tierBody.tier !== "string") {
|
|
20752
|
+
rows.push({ check: "Plan", state: "SKIP", detail: "tier not reported" });
|
|
20753
|
+
} else if (tierBody.maxExpired) {
|
|
20754
|
+
rows.push({
|
|
20755
|
+
check: "Plan",
|
|
20756
|
+
state: "WARN",
|
|
20757
|
+
detail: tierBody.maxExpiredNotice ?? `Max expired; this account is now on the ${tierBody.tier} plan`
|
|
20758
|
+
});
|
|
20759
|
+
} else {
|
|
20760
|
+
const fee = typeof tierBody.feeBps === "number" ? ` (${tierBody.feeBps / 100}% trade fee)` : "";
|
|
20761
|
+
rows.push({ check: "Plan", state: "PASS", detail: `${tierBody.tier}${fee}` });
|
|
20762
|
+
}
|
|
20763
|
+
}
|
|
20738
20764
|
let account;
|
|
20739
20765
|
if (!apiKey) {
|
|
20740
20766
|
rows.push({ check: "Launch wallet delegated", state: "SKIP", detail: "no API key to check" });
|
|
@@ -25279,22 +25305,32 @@ async function walletsImport(args, ctx) {
|
|
|
25279
25305
|
}
|
|
25280
25306
|
async function verifyImportLanded(args) {
|
|
25281
25307
|
const { deps } = args.ctx;
|
|
25282
|
-
|
|
25283
|
-
|
|
25284
|
-
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
|
|
25308
|
+
let cursor = null;
|
|
25309
|
+
let account;
|
|
25310
|
+
for (let pageCount = 0;pageCount < 25; pageCount++) {
|
|
25311
|
+
const query = cursor === null ? "?limit=100" : `?limit=100&cursor=${encodeURIComponent(cursor)}`;
|
|
25312
|
+
const listed = await apiRequest(`/api/v1/agent/wallets${query}`, {
|
|
25313
|
+
method: "GET",
|
|
25314
|
+
auth: "key",
|
|
25315
|
+
credentials: { apiKey: args.apiKey },
|
|
25316
|
+
apiUrl: args.apiUrl,
|
|
25317
|
+
fetch: deps.fetch,
|
|
25318
|
+
env: deps.env
|
|
25319
|
+
});
|
|
25320
|
+
if (!listed.ok)
|
|
25321
|
+
return { status: "unchecked", ...account !== undefined ? { account } : {} };
|
|
25322
|
+
const body = listed.body;
|
|
25323
|
+
if (!Array.isArray(body.page))
|
|
25324
|
+
return { status: "unchecked", ...account !== undefined ? { account } : {} };
|
|
25325
|
+
account ??= body.page.find((row) => typeof row.userAddress === "string")?.userAddress;
|
|
25326
|
+
if (body.page.some((row) => row._id === args.id)) {
|
|
25327
|
+
return { status: "verified", ...account !== undefined ? { account } : {} };
|
|
25328
|
+
}
|
|
25329
|
+
if (body.isDone !== false || typeof body.continueCursor !== "string")
|
|
25330
|
+
break;
|
|
25331
|
+
cursor = body.continueCursor;
|
|
25332
|
+
}
|
|
25333
|
+
return { status: "missing", ...account !== undefined ? { account } : {} };
|
|
25298
25334
|
}
|
|
25299
25335
|
async function walletsRevoke(args, ctx) {
|
|
25300
25336
|
const { deps, apiUrl, json } = ctx;
|
package/package.json
CHANGED