@t2000/cli 5.18.0 → 5.19.0
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
CHANGED
|
@@ -30749,6 +30749,23 @@ async function listModels(opts) {
|
|
|
30749
30749
|
}));
|
|
30750
30750
|
}
|
|
30751
30751
|
var RECEIPT_ANCHORED_SUFFIX = "::anchor::ReceiptAnchored";
|
|
30752
|
+
function normalizeClaims(claims) {
|
|
30753
|
+
if (!claims) {
|
|
30754
|
+
return [];
|
|
30755
|
+
}
|
|
30756
|
+
if (Array.isArray(claims)) {
|
|
30757
|
+
return claims.filter((c) => c.name).map((c) => ({
|
|
30758
|
+
name: c.name,
|
|
30759
|
+
status: c.status ?? "unknown",
|
|
30760
|
+
source: c.source
|
|
30761
|
+
}));
|
|
30762
|
+
}
|
|
30763
|
+
return Object.entries(claims).map(([name, v]) => ({
|
|
30764
|
+
name,
|
|
30765
|
+
status: v?.status ?? "unknown",
|
|
30766
|
+
source: v?.source
|
|
30767
|
+
}));
|
|
30768
|
+
}
|
|
30752
30769
|
function fullnodeUrl(network) {
|
|
30753
30770
|
return network === "testnet" ? "https://fullnode.testnet.sui.io" : "https://fullnode.mainnet.sui.io";
|
|
30754
30771
|
}
|
|
@@ -30842,6 +30859,7 @@ async function verifyReceipt(receiptId, opts = {}) {
|
|
|
30842
30859
|
});
|
|
30843
30860
|
const upstreamEv = receipt.event_log.find((e) => e.type === "upstream.verified");
|
|
30844
30861
|
const upstreamOk = upstreamEv?.result === "verified";
|
|
30862
|
+
const claims = normalizeClaims(upstreamEv?.claims);
|
|
30845
30863
|
checks.push({
|
|
30846
30864
|
name: "Confidential upstream",
|
|
30847
30865
|
status: upstreamEv ? upstreamOk ? "pass" : "fail" : "skip",
|
|
@@ -30943,8 +30961,11 @@ async function verifyReceipt(receiptId, opts = {}) {
|
|
|
30943
30961
|
workloadId,
|
|
30944
30962
|
upstream: upstreamEv ? {
|
|
30945
30963
|
provider: upstreamEv.provider ?? upstreamEv.upstream_name,
|
|
30964
|
+
modelId: upstreamEv.model_id,
|
|
30946
30965
|
result: upstreamEv.result,
|
|
30947
|
-
tcbStatus: upstreamEv.tcb_status
|
|
30966
|
+
tcbStatus: upstreamEv.tcb_status,
|
|
30967
|
+
sessionId: upstreamEv.session_id,
|
|
30968
|
+
claims: claims.length > 0 ? claims : void 0
|
|
30948
30969
|
} : void 0,
|
|
30949
30970
|
anchor
|
|
30950
30971
|
};
|
|
@@ -35035,6 +35056,15 @@ function registerVerify(program3) {
|
|
|
35035
35056
|
for (const check2 of result.checks) {
|
|
35036
35057
|
printLine(` ${mark(check2)} ${import_picocolors10.default.bold(check2.name)}${trustTag(check2)}`);
|
|
35037
35058
|
printLine(` ${import_picocolors10.default.dim(check2.detail)}`);
|
|
35059
|
+
if (check2.name === "Confidential upstream" && result.upstream) {
|
|
35060
|
+
for (const c of result.upstream.claims ?? []) {
|
|
35061
|
+
const src = c.source ? import_picocolors10.default.dim(` (${c.source})`) : "";
|
|
35062
|
+
printLine(` ${import_picocolors10.default.dim("\xB7")} ${c.name}: ${c.status}${src}`);
|
|
35063
|
+
}
|
|
35064
|
+
if (result.upstream.sessionId) {
|
|
35065
|
+
printLine(import_picocolors10.default.dim(` session: ${result.upstream.sessionId}`));
|
|
35066
|
+
}
|
|
35067
|
+
}
|
|
35038
35068
|
}
|
|
35039
35069
|
printBlank();
|
|
35040
35070
|
if (result.anchor) {
|
|
@@ -35417,7 +35447,7 @@ function registerMcpStart(parent) {
|
|
|
35417
35447
|
parent.command("start", { isDefault: true }).description("Start MCP server (stdio transport \u2014 for AI client integration)").option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").action(async (opts) => {
|
|
35418
35448
|
let mod3;
|
|
35419
35449
|
try {
|
|
35420
|
-
mod3 = await import("./dist-
|
|
35450
|
+
mod3 = await import("./dist-MKAGVSAK.js");
|
|
35421
35451
|
} catch {
|
|
35422
35452
|
console.error("MCP server not installed. Run:\n npm install -g @t2000/mcp");
|
|
35423
35453
|
process.exit(1);
|