naracli 1.0.45 → 1.0.46
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/nara-cli-bundle.cjs +128 -112
- package/package.json +1 -1
- package/src/cli/commands/quest.ts +15 -1
package/dist/nara-cli-bundle.cjs
CHANGED
|
@@ -33817,7 +33817,7 @@ var require_bindings = __commonJS({
|
|
|
33817
33817
|
var fs = require("fs");
|
|
33818
33818
|
var path = require("path");
|
|
33819
33819
|
var fileURLToPath = require_file_uri_to_path();
|
|
33820
|
-
var
|
|
33820
|
+
var join6 = path.join;
|
|
33821
33821
|
var dirname2 = path.dirname;
|
|
33822
33822
|
var exists = fs.accessSync && function(path2) {
|
|
33823
33823
|
try {
|
|
@@ -33877,7 +33877,7 @@ var require_bindings = __commonJS({
|
|
|
33877
33877
|
var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
|
|
33878
33878
|
var tries = [], i = 0, l = opts.try.length, n, b, err;
|
|
33879
33879
|
for (; i < l; i++) {
|
|
33880
|
-
n =
|
|
33880
|
+
n = join6.apply(
|
|
33881
33881
|
null,
|
|
33882
33882
|
opts.try[i].map(function(p) {
|
|
33883
33883
|
return opts[p] || p;
|
|
@@ -33938,7 +33938,7 @@ var require_bindings = __commonJS({
|
|
|
33938
33938
|
if (dir === ".") {
|
|
33939
33939
|
dir = process.cwd();
|
|
33940
33940
|
}
|
|
33941
|
-
if (exists(
|
|
33941
|
+
if (exists(join6(dir, "package.json")) || exists(join6(dir, "node_modules"))) {
|
|
33942
33942
|
return dir;
|
|
33943
33943
|
}
|
|
33944
33944
|
if (prev === dir) {
|
|
@@ -33947,7 +33947,7 @@ var require_bindings = __commonJS({
|
|
|
33947
33947
|
);
|
|
33948
33948
|
}
|
|
33949
33949
|
prev = dir;
|
|
33950
|
-
dir =
|
|
33950
|
+
dir = join6(dir, "..");
|
|
33951
33951
|
}
|
|
33952
33952
|
};
|
|
33953
33953
|
}
|
|
@@ -95380,7 +95380,7 @@ var require_buffer_list = __commonJS({
|
|
|
95380
95380
|
}
|
|
95381
95381
|
}, {
|
|
95382
95382
|
key: "join",
|
|
95383
|
-
value: function
|
|
95383
|
+
value: function join6(s) {
|
|
95384
95384
|
if (this.length === 0) return "";
|
|
95385
95385
|
var p = this.head;
|
|
95386
95386
|
var ret = "" + p.data;
|
|
@@ -125905,7 +125905,7 @@ var import_meta = {};
|
|
|
125905
125905
|
var BN254_FIELD = 21888242871839275222246405745257275088696311157297823662689037894645226208583n;
|
|
125906
125906
|
async function resolveDefaultZkPaths() {
|
|
125907
125907
|
const { fileURLToPath } = await import("url");
|
|
125908
|
-
const { dirname: dirname2, join:
|
|
125908
|
+
const { dirname: dirname2, join: join6 } = await import("path");
|
|
125909
125909
|
let dir;
|
|
125910
125910
|
if (import_meta.url) {
|
|
125911
125911
|
dir = dirname2(fileURLToPath(import_meta.url));
|
|
@@ -125915,8 +125915,8 @@ async function resolveDefaultZkPaths() {
|
|
|
125915
125915
|
dir = dirname2(req.resolve("nara-sdk/package.json")) + "/src";
|
|
125916
125916
|
}
|
|
125917
125917
|
return {
|
|
125918
|
-
wasm:
|
|
125919
|
-
zkey:
|
|
125918
|
+
wasm: join6(dir, "zk", "answer_proof.wasm"),
|
|
125919
|
+
zkey: join6(dir, "zk", "answer_proof_final.zkey")
|
|
125920
125920
|
};
|
|
125921
125921
|
}
|
|
125922
125922
|
function hexFromBytes(bytes) {
|
|
@@ -128972,13 +128972,13 @@ var BN254_PRIME = 21888242871839275222246405745257275088696311157297823662689037
|
|
|
128972
128972
|
var MERKLE_LEVELS = 64;
|
|
128973
128973
|
async function resolveDefaultZkPaths2() {
|
|
128974
128974
|
const { fileURLToPath } = await import("url");
|
|
128975
|
-
const { dirname: dirname2, join:
|
|
128975
|
+
const { dirname: dirname2, join: join6 } = await import("path");
|
|
128976
128976
|
const dir = dirname2(fileURLToPath(import_meta2.url));
|
|
128977
128977
|
return {
|
|
128978
|
-
withdrawWasm:
|
|
128979
|
-
withdrawZkey:
|
|
128980
|
-
ownershipWasm:
|
|
128981
|
-
ownershipZkey:
|
|
128978
|
+
withdrawWasm: join6(dir, "zk", "withdraw.wasm"),
|
|
128979
|
+
withdrawZkey: join6(dir, "zk", "withdraw_final.zkey"),
|
|
128980
|
+
ownershipWasm: join6(dir, "zk", "ownership.wasm"),
|
|
128981
|
+
ownershipZkey: join6(dir, "zk", "ownership_final.zkey")
|
|
128982
128982
|
};
|
|
128983
128983
|
}
|
|
128984
128984
|
var ZKID_DENOMINATIONS = {
|
|
@@ -130023,6 +130023,22 @@ async function handleWalletAddress(options) {
|
|
|
130023
130023
|
|
|
130024
130024
|
// src/cli/commands/quest.ts
|
|
130025
130025
|
var import_web398 = __toESM(require_index_cjs(), 1);
|
|
130026
|
+
var import_node_path4 = require("node:path");
|
|
130027
|
+
var import_meta3 = {};
|
|
130028
|
+
var _getMetaUrl = () => {
|
|
130029
|
+
try {
|
|
130030
|
+
return import_meta3.url;
|
|
130031
|
+
} catch {
|
|
130032
|
+
return void 0;
|
|
130033
|
+
}
|
|
130034
|
+
};
|
|
130035
|
+
function getZkOptions() {
|
|
130036
|
+
if (_getMetaUrl()) return void 0;
|
|
130037
|
+
return {
|
|
130038
|
+
circuitWasmPath: (0, import_node_path4.join)(__dirname, "zk", "answer_proof.wasm"),
|
|
130039
|
+
zkeyPath: (0, import_node_path4.join)(__dirname, "zk", "answer_proof_final.zkey")
|
|
130040
|
+
};
|
|
130041
|
+
}
|
|
130026
130042
|
var DEFAULT_QUEST_RELAY_URL2 = process.env.QUEST_RELAY_URL || "https://quest-api.nara.build/";
|
|
130027
130043
|
var QUEST_ERRORS = {
|
|
130028
130044
|
6e3: "unauthorized",
|
|
@@ -130147,7 +130163,7 @@ async function handleQuestAnswer(answer, options) {
|
|
|
130147
130163
|
printInfo("Generating ZK proof...");
|
|
130148
130164
|
let proof;
|
|
130149
130165
|
try {
|
|
130150
|
-
proof = await generateProof(answer, quest.answerHash, wallet.publicKey, quest.round);
|
|
130166
|
+
proof = await generateProof(answer, quest.answerHash, wallet.publicKey, quest.round, getZkOptions());
|
|
130151
130167
|
} catch (err) {
|
|
130152
130168
|
if (err.message?.includes("Assert Failed")) {
|
|
130153
130169
|
printError("Wrong answer");
|
|
@@ -131434,266 +131450,266 @@ async function searchMultiselect(options) {
|
|
|
131434
131450
|
// src/cli/commands/skillsInstall.ts
|
|
131435
131451
|
var import_promises2 = require("node:fs/promises");
|
|
131436
131452
|
var import_node_fs2 = require("node:fs");
|
|
131437
|
-
var
|
|
131453
|
+
var import_node_path5 = require("node:path");
|
|
131438
131454
|
var import_node_os4 = require("node:os");
|
|
131439
131455
|
var import_web399 = __toESM(require_index_cjs(), 1);
|
|
131440
131456
|
var home = (0, import_node_os4.homedir)();
|
|
131441
|
-
var xdgConfig = process.env.XDG_CONFIG_HOME || (0,
|
|
131442
|
-
var claudeHome = process.env.CLAUDE_CONFIG_DIR?.trim() || (0,
|
|
131443
|
-
var codexHome = process.env.CODEX_HOME?.trim() || (0,
|
|
131457
|
+
var xdgConfig = process.env.XDG_CONFIG_HOME || (0, import_node_path5.join)(home, ".config");
|
|
131458
|
+
var claudeHome = process.env.CLAUDE_CONFIG_DIR?.trim() || (0, import_node_path5.join)(home, ".claude");
|
|
131459
|
+
var codexHome = process.env.CODEX_HOME?.trim() || (0, import_node_path5.join)(home, ".codex");
|
|
131444
131460
|
function openClawGlobalDir() {
|
|
131445
|
-
if ((0, import_node_fs2.existsSync)((0,
|
|
131446
|
-
if ((0, import_node_fs2.existsSync)((0,
|
|
131447
|
-
if ((0, import_node_fs2.existsSync)((0,
|
|
131448
|
-
return (0,
|
|
131461
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".openclaw"))) return (0, import_node_path5.join)(home, ".openclaw/skills");
|
|
131462
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".clawdbot"))) return (0, import_node_path5.join)(home, ".clawdbot/skills");
|
|
131463
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".moltbot"))) return (0, import_node_path5.join)(home, ".moltbot/skills");
|
|
131464
|
+
return (0, import_node_path5.join)(home, ".openclaw/skills");
|
|
131449
131465
|
}
|
|
131450
131466
|
var AGENT_CONFIGS = {
|
|
131451
131467
|
// ── Universal agents (share .agents/skills) ───────────────────
|
|
131452
131468
|
amp: {
|
|
131453
131469
|
displayName: "Amp",
|
|
131454
131470
|
projectDir: ".agents/skills",
|
|
131455
|
-
globalDir: (0,
|
|
131456
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131471
|
+
globalDir: (0, import_node_path5.join)(xdgConfig, "agents/skills"),
|
|
131472
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(xdgConfig, "amp"))
|
|
131457
131473
|
},
|
|
131458
131474
|
cline: {
|
|
131459
131475
|
displayName: "Cline",
|
|
131460
131476
|
projectDir: ".agents/skills",
|
|
131461
|
-
globalDir: (0,
|
|
131462
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131477
|
+
globalDir: (0, import_node_path5.join)(home, ".agents/skills"),
|
|
131478
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".cline"))
|
|
131463
131479
|
},
|
|
131464
131480
|
codex: {
|
|
131465
131481
|
displayName: "Codex",
|
|
131466
131482
|
projectDir: ".agents/skills",
|
|
131467
|
-
globalDir: (0,
|
|
131483
|
+
globalDir: (0, import_node_path5.join)(codexHome, "skills"),
|
|
131468
131484
|
detect: () => (0, import_node_fs2.existsSync)(codexHome) || (0, import_node_fs2.existsSync)("/etc/codex")
|
|
131469
131485
|
},
|
|
131470
131486
|
cursor: {
|
|
131471
131487
|
displayName: "Cursor",
|
|
131472
131488
|
projectDir: ".agents/skills",
|
|
131473
|
-
globalDir: (0,
|
|
131474
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131489
|
+
globalDir: (0, import_node_path5.join)(home, ".cursor/skills"),
|
|
131490
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".cursor"))
|
|
131475
131491
|
},
|
|
131476
131492
|
"gemini-cli": {
|
|
131477
131493
|
displayName: "Gemini CLI",
|
|
131478
131494
|
projectDir: ".agents/skills",
|
|
131479
|
-
globalDir: (0,
|
|
131480
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131495
|
+
globalDir: (0, import_node_path5.join)(home, ".gemini/skills"),
|
|
131496
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".gemini"))
|
|
131481
131497
|
},
|
|
131482
131498
|
"github-copilot": {
|
|
131483
131499
|
displayName: "GitHub Copilot",
|
|
131484
131500
|
projectDir: ".agents/skills",
|
|
131485
|
-
globalDir: (0,
|
|
131486
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131501
|
+
globalDir: (0, import_node_path5.join)(home, ".copilot/skills"),
|
|
131502
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".copilot"))
|
|
131487
131503
|
},
|
|
131488
131504
|
"kimi-cli": {
|
|
131489
131505
|
displayName: "Kimi Code CLI",
|
|
131490
131506
|
projectDir: ".agents/skills",
|
|
131491
|
-
globalDir: (0,
|
|
131492
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131507
|
+
globalDir: (0, import_node_path5.join)(home, ".config/agents/skills"),
|
|
131508
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".kimi"))
|
|
131493
131509
|
},
|
|
131494
131510
|
opencode: {
|
|
131495
131511
|
displayName: "OpenCode",
|
|
131496
131512
|
projectDir: ".agents/skills",
|
|
131497
|
-
globalDir: (0,
|
|
131498
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131513
|
+
globalDir: (0, import_node_path5.join)(xdgConfig, "opencode/skills"),
|
|
131514
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(xdgConfig, "opencode"))
|
|
131499
131515
|
},
|
|
131500
131516
|
replit: {
|
|
131501
131517
|
displayName: "Replit",
|
|
131502
131518
|
projectDir: ".agents/skills",
|
|
131503
|
-
globalDir: (0,
|
|
131504
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131519
|
+
globalDir: (0, import_node_path5.join)(xdgConfig, "agents/skills"),
|
|
131520
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(process.cwd(), ".replit")),
|
|
131505
131521
|
showInUniversalList: false
|
|
131506
131522
|
},
|
|
131507
131523
|
// ── Additional agents (custom skill dirs) ─────────────────────
|
|
131508
131524
|
adal: {
|
|
131509
131525
|
displayName: "AdaL",
|
|
131510
131526
|
projectDir: ".adal/skills",
|
|
131511
|
-
globalDir: (0,
|
|
131512
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131527
|
+
globalDir: (0, import_node_path5.join)(home, ".adal/skills"),
|
|
131528
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".adal"))
|
|
131513
131529
|
},
|
|
131514
131530
|
antigravity: {
|
|
131515
131531
|
displayName: "Antigravity",
|
|
131516
131532
|
projectDir: ".agent/skills",
|
|
131517
|
-
globalDir: (0,
|
|
131518
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131533
|
+
globalDir: (0, import_node_path5.join)(home, ".gemini/antigravity/skills"),
|
|
131534
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".gemini/antigravity"))
|
|
131519
131535
|
},
|
|
131520
131536
|
augment: {
|
|
131521
131537
|
displayName: "Augment",
|
|
131522
131538
|
projectDir: ".augment/skills",
|
|
131523
|
-
globalDir: (0,
|
|
131524
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131539
|
+
globalDir: (0, import_node_path5.join)(home, ".augment/skills"),
|
|
131540
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".augment"))
|
|
131525
131541
|
},
|
|
131526
131542
|
"claude-code": {
|
|
131527
131543
|
displayName: "Claude Code",
|
|
131528
131544
|
projectDir: ".claude/skills",
|
|
131529
|
-
globalDir: (0,
|
|
131545
|
+
globalDir: (0, import_node_path5.join)(claudeHome, "skills"),
|
|
131530
131546
|
detect: () => (0, import_node_fs2.existsSync)(claudeHome)
|
|
131531
131547
|
},
|
|
131532
131548
|
codebuddy: {
|
|
131533
131549
|
displayName: "CodeBuddy",
|
|
131534
131550
|
projectDir: ".codebuddy/skills",
|
|
131535
|
-
globalDir: (0,
|
|
131536
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131551
|
+
globalDir: (0, import_node_path5.join)(home, ".codebuddy/skills"),
|
|
131552
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(process.cwd(), ".codebuddy")) || (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".codebuddy"))
|
|
131537
131553
|
},
|
|
131538
131554
|
"command-code": {
|
|
131539
131555
|
displayName: "Command Code",
|
|
131540
131556
|
projectDir: ".commandcode/skills",
|
|
131541
|
-
globalDir: (0,
|
|
131542
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131557
|
+
globalDir: (0, import_node_path5.join)(home, ".commandcode/skills"),
|
|
131558
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".commandcode"))
|
|
131543
131559
|
},
|
|
131544
131560
|
continue: {
|
|
131545
131561
|
displayName: "Continue",
|
|
131546
131562
|
projectDir: ".continue/skills",
|
|
131547
|
-
globalDir: (0,
|
|
131548
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131563
|
+
globalDir: (0, import_node_path5.join)(home, ".continue/skills"),
|
|
131564
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(process.cwd(), ".continue")) || (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".continue"))
|
|
131549
131565
|
},
|
|
131550
131566
|
cortex: {
|
|
131551
131567
|
displayName: "Cortex Code",
|
|
131552
131568
|
projectDir: ".cortex/skills",
|
|
131553
|
-
globalDir: (0,
|
|
131554
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131569
|
+
globalDir: (0, import_node_path5.join)(home, ".snowflake/cortex/skills"),
|
|
131570
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".snowflake/cortex"))
|
|
131555
131571
|
},
|
|
131556
131572
|
crush: {
|
|
131557
131573
|
displayName: "Crush",
|
|
131558
131574
|
projectDir: ".crush/skills",
|
|
131559
|
-
globalDir: (0,
|
|
131560
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131575
|
+
globalDir: (0, import_node_path5.join)(home, ".config/crush/skills"),
|
|
131576
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".config/crush"))
|
|
131561
131577
|
},
|
|
131562
131578
|
droid: {
|
|
131563
131579
|
displayName: "Droid",
|
|
131564
131580
|
projectDir: ".factory/skills",
|
|
131565
|
-
globalDir: (0,
|
|
131566
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131581
|
+
globalDir: (0, import_node_path5.join)(home, ".factory/skills"),
|
|
131582
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".factory"))
|
|
131567
131583
|
},
|
|
131568
131584
|
goose: {
|
|
131569
131585
|
displayName: "Goose",
|
|
131570
131586
|
projectDir: ".goose/skills",
|
|
131571
|
-
globalDir: (0,
|
|
131572
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131587
|
+
globalDir: (0, import_node_path5.join)(xdgConfig, "goose/skills"),
|
|
131588
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(xdgConfig, "goose"))
|
|
131573
131589
|
},
|
|
131574
131590
|
"iflow-cli": {
|
|
131575
131591
|
displayName: "iFlow CLI",
|
|
131576
131592
|
projectDir: ".iflow/skills",
|
|
131577
|
-
globalDir: (0,
|
|
131578
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131593
|
+
globalDir: (0, import_node_path5.join)(home, ".iflow/skills"),
|
|
131594
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".iflow"))
|
|
131579
131595
|
},
|
|
131580
131596
|
junie: {
|
|
131581
131597
|
displayName: "Junie",
|
|
131582
131598
|
projectDir: ".junie/skills",
|
|
131583
|
-
globalDir: (0,
|
|
131584
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131599
|
+
globalDir: (0, import_node_path5.join)(home, ".junie/skills"),
|
|
131600
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".junie"))
|
|
131585
131601
|
},
|
|
131586
131602
|
kilo: {
|
|
131587
131603
|
displayName: "Kilo Code",
|
|
131588
131604
|
projectDir: ".kilocode/skills",
|
|
131589
|
-
globalDir: (0,
|
|
131590
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131605
|
+
globalDir: (0, import_node_path5.join)(home, ".kilocode/skills"),
|
|
131606
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".kilocode"))
|
|
131591
131607
|
},
|
|
131592
131608
|
"kiro-cli": {
|
|
131593
131609
|
displayName: "Kiro CLI",
|
|
131594
131610
|
projectDir: ".kiro/skills",
|
|
131595
|
-
globalDir: (0,
|
|
131596
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131611
|
+
globalDir: (0, import_node_path5.join)(home, ".kiro/skills"),
|
|
131612
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".kiro"))
|
|
131597
131613
|
},
|
|
131598
131614
|
kode: {
|
|
131599
131615
|
displayName: "Kode",
|
|
131600
131616
|
projectDir: ".kode/skills",
|
|
131601
|
-
globalDir: (0,
|
|
131602
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131617
|
+
globalDir: (0, import_node_path5.join)(home, ".kode/skills"),
|
|
131618
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".kode"))
|
|
131603
131619
|
},
|
|
131604
131620
|
mcpjam: {
|
|
131605
131621
|
displayName: "MCPJam",
|
|
131606
131622
|
projectDir: ".mcpjam/skills",
|
|
131607
|
-
globalDir: (0,
|
|
131608
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131623
|
+
globalDir: (0, import_node_path5.join)(home, ".mcpjam/skills"),
|
|
131624
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".mcpjam"))
|
|
131609
131625
|
},
|
|
131610
131626
|
"mistral-vibe": {
|
|
131611
131627
|
displayName: "Mistral Vibe",
|
|
131612
131628
|
projectDir: ".vibe/skills",
|
|
131613
|
-
globalDir: (0,
|
|
131614
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131629
|
+
globalDir: (0, import_node_path5.join)(home, ".vibe/skills"),
|
|
131630
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".vibe"))
|
|
131615
131631
|
},
|
|
131616
131632
|
mux: {
|
|
131617
131633
|
displayName: "Mux",
|
|
131618
131634
|
projectDir: ".mux/skills",
|
|
131619
|
-
globalDir: (0,
|
|
131620
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131635
|
+
globalDir: (0, import_node_path5.join)(home, ".mux/skills"),
|
|
131636
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".mux"))
|
|
131621
131637
|
},
|
|
131622
131638
|
neovate: {
|
|
131623
131639
|
displayName: "Neovate",
|
|
131624
131640
|
projectDir: ".neovate/skills",
|
|
131625
|
-
globalDir: (0,
|
|
131626
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131641
|
+
globalDir: (0, import_node_path5.join)(home, ".neovate/skills"),
|
|
131642
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".neovate"))
|
|
131627
131643
|
},
|
|
131628
131644
|
openclaw: {
|
|
131629
131645
|
displayName: "OpenClaw",
|
|
131630
131646
|
projectDir: "skills",
|
|
131631
131647
|
globalDir: openClawGlobalDir(),
|
|
131632
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131648
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".openclaw")) || (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".clawdbot")) || (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".moltbot"))
|
|
131633
131649
|
},
|
|
131634
131650
|
openhands: {
|
|
131635
131651
|
displayName: "OpenHands",
|
|
131636
131652
|
projectDir: ".openhands/skills",
|
|
131637
|
-
globalDir: (0,
|
|
131638
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131653
|
+
globalDir: (0, import_node_path5.join)(home, ".openhands/skills"),
|
|
131654
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".openhands"))
|
|
131639
131655
|
},
|
|
131640
131656
|
pi: {
|
|
131641
131657
|
displayName: "Pi",
|
|
131642
131658
|
projectDir: ".pi/skills",
|
|
131643
|
-
globalDir: (0,
|
|
131644
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131659
|
+
globalDir: (0, import_node_path5.join)(home, ".pi/agent/skills"),
|
|
131660
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".pi/agent"))
|
|
131645
131661
|
},
|
|
131646
131662
|
pochi: {
|
|
131647
131663
|
displayName: "Pochi",
|
|
131648
131664
|
projectDir: ".pochi/skills",
|
|
131649
|
-
globalDir: (0,
|
|
131650
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131665
|
+
globalDir: (0, import_node_path5.join)(home, ".pochi/skills"),
|
|
131666
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".pochi"))
|
|
131651
131667
|
},
|
|
131652
131668
|
qoder: {
|
|
131653
131669
|
displayName: "Qoder",
|
|
131654
131670
|
projectDir: ".qoder/skills",
|
|
131655
|
-
globalDir: (0,
|
|
131656
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131671
|
+
globalDir: (0, import_node_path5.join)(home, ".qoder/skills"),
|
|
131672
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".qoder"))
|
|
131657
131673
|
},
|
|
131658
131674
|
"qwen-code": {
|
|
131659
131675
|
displayName: "Qwen Code",
|
|
131660
131676
|
projectDir: ".qwen/skills",
|
|
131661
|
-
globalDir: (0,
|
|
131662
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131677
|
+
globalDir: (0, import_node_path5.join)(home, ".qwen/skills"),
|
|
131678
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".qwen"))
|
|
131663
131679
|
},
|
|
131664
131680
|
roo: {
|
|
131665
131681
|
displayName: "Roo Code",
|
|
131666
131682
|
projectDir: ".roo/skills",
|
|
131667
|
-
globalDir: (0,
|
|
131668
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131683
|
+
globalDir: (0, import_node_path5.join)(home, ".roo/skills"),
|
|
131684
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".roo"))
|
|
131669
131685
|
},
|
|
131670
131686
|
trae: {
|
|
131671
131687
|
displayName: "Trae",
|
|
131672
131688
|
projectDir: ".trae/skills",
|
|
131673
|
-
globalDir: (0,
|
|
131674
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131689
|
+
globalDir: (0, import_node_path5.join)(home, ".trae/skills"),
|
|
131690
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".trae"))
|
|
131675
131691
|
},
|
|
131676
131692
|
"trae-cn": {
|
|
131677
131693
|
displayName: "Trae CN",
|
|
131678
131694
|
projectDir: ".trae/skills",
|
|
131679
|
-
globalDir: (0,
|
|
131680
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131695
|
+
globalDir: (0, import_node_path5.join)(home, ".trae-cn/skills"),
|
|
131696
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".trae-cn"))
|
|
131681
131697
|
},
|
|
131682
131698
|
windsurf: {
|
|
131683
131699
|
displayName: "Windsurf",
|
|
131684
131700
|
projectDir: ".windsurf/skills",
|
|
131685
|
-
globalDir: (0,
|
|
131686
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131701
|
+
globalDir: (0, import_node_path5.join)(home, ".codeium/windsurf/skills"),
|
|
131702
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".codeium/windsurf"))
|
|
131687
131703
|
},
|
|
131688
131704
|
zencoder: {
|
|
131689
131705
|
displayName: "Zencoder",
|
|
131690
131706
|
projectDir: ".zencoder/skills",
|
|
131691
|
-
globalDir: (0,
|
|
131692
|
-
detect: () => (0, import_node_fs2.existsSync)((0,
|
|
131707
|
+
globalDir: (0, import_node_path5.join)(home, ".zencoder/skills"),
|
|
131708
|
+
detect: () => (0, import_node_fs2.existsSync)((0, import_node_path5.join)(home, ".zencoder"))
|
|
131693
131709
|
}
|
|
131694
131710
|
};
|
|
131695
131711
|
function getLockPath(global2, cwd) {
|
|
131696
|
-
return global2 ? (0,
|
|
131712
|
+
return global2 ? (0, import_node_path5.join)(xdgConfig, "nara/skills-lock.json") : (0, import_node_path5.join)(cwd, ".nara/skills-lock.json");
|
|
131697
131713
|
}
|
|
131698
131714
|
async function readLock(global2, cwd) {
|
|
131699
131715
|
try {
|
|
@@ -131705,7 +131721,7 @@ async function readLock(global2, cwd) {
|
|
|
131705
131721
|
}
|
|
131706
131722
|
async function writeLock(lock, global2, cwd) {
|
|
131707
131723
|
const lockPath = getLockPath(global2, cwd);
|
|
131708
|
-
await (0, import_promises2.mkdir)((0,
|
|
131724
|
+
await (0, import_promises2.mkdir)((0, import_node_path5.dirname)(lockPath), { recursive: true });
|
|
131709
131725
|
await (0, import_promises2.writeFile)(lockPath, JSON.stringify(lock, null, 2) + "\n", "utf-8");
|
|
131710
131726
|
}
|
|
131711
131727
|
function detectAgents() {
|
|
@@ -131722,23 +131738,23 @@ function resolveInstallDirs(agentIds, global2, cwd) {
|
|
|
131722
131738
|
return {
|
|
131723
131739
|
agentId: id,
|
|
131724
131740
|
displayName: cfg.displayName,
|
|
131725
|
-
dir: global2 ? cfg.globalDir : (0,
|
|
131741
|
+
dir: global2 ? cfg.globalDir : (0, import_node_path5.join)(cwd, cfg.projectDir)
|
|
131726
131742
|
};
|
|
131727
131743
|
});
|
|
131728
131744
|
}
|
|
131729
131745
|
async function writeSkillFiles(name, content, targets) {
|
|
131730
131746
|
const written = [];
|
|
131731
131747
|
for (const { dir } of targets) {
|
|
131732
|
-
const skillDir = (0,
|
|
131748
|
+
const skillDir = (0, import_node_path5.join)(dir, name);
|
|
131733
131749
|
await (0, import_promises2.mkdir)(skillDir, { recursive: true });
|
|
131734
|
-
await (0, import_promises2.writeFile)((0,
|
|
131735
|
-
written.push((0,
|
|
131750
|
+
await (0, import_promises2.writeFile)((0, import_node_path5.join)(skillDir, "SKILL.md"), content);
|
|
131751
|
+
written.push((0, import_node_path5.join)(skillDir, "SKILL.md"));
|
|
131736
131752
|
}
|
|
131737
131753
|
return written;
|
|
131738
131754
|
}
|
|
131739
131755
|
async function removeSkillFiles(name, targets) {
|
|
131740
131756
|
for (const { dir } of targets) {
|
|
131741
|
-
await (0, import_promises2.rm)((0,
|
|
131757
|
+
await (0, import_promises2.rm)((0, import_node_path5.join)(dir, name), { recursive: true, force: true });
|
|
131742
131758
|
}
|
|
131743
131759
|
}
|
|
131744
131760
|
function shortenPath(fullPath, cwd) {
|
|
@@ -131848,7 +131864,7 @@ async function handleSkillsAdd(name, options) {
|
|
|
131848
131864
|
const additionalTargets = targets.filter((t) => !universalIds.includes(t.agentId));
|
|
131849
131865
|
const summaryLines = [];
|
|
131850
131866
|
if (universalTargets.length > 0) {
|
|
131851
|
-
const canonicalPath = (0,
|
|
131867
|
+
const canonicalPath = (0, import_node_path5.join)(universalTargets[0].dir, name);
|
|
131852
131868
|
summaryLines.push(`${import_picocolors3.default.cyan(shortenPath(canonicalPath, cwd))}`);
|
|
131853
131869
|
summaryLines.push(
|
|
131854
131870
|
` ${import_picocolors3.default.dim("\u2500\u2500")} ${import_picocolors3.default.bold("Universal (.agents/skills)")} ${import_picocolors3.default.dim("\u2500\u2500 always included \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")}`
|
|
@@ -131859,7 +131875,7 @@ async function handleSkillsAdd(name, options) {
|
|
|
131859
131875
|
}
|
|
131860
131876
|
for (const t of additionalTargets) {
|
|
131861
131877
|
if (summaryLines.length > 0) summaryLines.push("");
|
|
131862
|
-
const filePath = (0,
|
|
131878
|
+
const filePath = (0, import_node_path5.join)(t.dir, name, "SKILL.md");
|
|
131863
131879
|
summaryLines.push(`${import_picocolors3.default.cyan(shortenPath(filePath, cwd))}`);
|
|
131864
131880
|
summaryLines.push(` ${import_picocolors3.default.green("\u2022")} ${t.displayName}`);
|
|
131865
131881
|
}
|
|
@@ -131939,9 +131955,9 @@ async function handleSkillsList(options) {
|
|
|
131939
131955
|
let canonicalPath = "";
|
|
131940
131956
|
for (const [, cfg] of Object.entries(AGENT_CONFIGS)) {
|
|
131941
131957
|
if (!cfg.detect()) continue;
|
|
131942
|
-
const dir = isGlobal ? cfg.globalDir : (0,
|
|
131943
|
-
if ((0, import_node_fs2.existsSync)((0,
|
|
131944
|
-
if (!canonicalPath) canonicalPath = shortenPath((0,
|
|
131958
|
+
const dir = isGlobal ? cfg.globalDir : (0, import_node_path5.join)(cwd, cfg.projectDir);
|
|
131959
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path5.join)(dir, name, "SKILL.md"))) {
|
|
131960
|
+
if (!canonicalPath) canonicalPath = shortenPath((0, import_node_path5.join)(dir, name), cwd);
|
|
131945
131961
|
installedAgents.push(cfg.displayName);
|
|
131946
131962
|
}
|
|
131947
131963
|
}
|
|
@@ -133229,7 +133245,7 @@ function registerCommands(program3) {
|
|
|
133229
133245
|
}
|
|
133230
133246
|
|
|
133231
133247
|
// bin/nara-cli.ts
|
|
133232
|
-
var version2 = true ? "1.0.
|
|
133248
|
+
var version2 = true ? "1.0.46" : "dev";
|
|
133233
133249
|
var program2 = new Command();
|
|
133234
133250
|
program2.name("naracli").description("CLI for the Nara chain (Solana-compatible)").version(version2);
|
|
133235
133251
|
program2.option("-r, --rpc-url <url>", "RPC endpoint URL").option("-w, --wallet <path>", "Path to wallet keypair JSON file").option("-j, --json", "Output in JSON format");
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
import { Connection, Keypair } from "@solana/web3.js";
|
|
7
|
+
import { join } from "node:path";
|
|
7
8
|
import { loadWallet, getRpcUrl } from "../utils/wallet";
|
|
8
9
|
import {
|
|
9
10
|
formatOutput,
|
|
@@ -25,9 +26,22 @@ import {
|
|
|
25
26
|
getStakeInfo,
|
|
26
27
|
type ActivityLog,
|
|
27
28
|
type StakeInfo,
|
|
29
|
+
type QuestOptions,
|
|
28
30
|
} from "nara-sdk";
|
|
29
31
|
import { loadNetworkConfig } from "../utils/agent-config";
|
|
30
32
|
|
|
33
|
+
// In CJS bundle (dist/naracli.cjs), import.meta.url is undefined and SDK
|
|
34
|
+
// cannot auto-resolve ZK circuit paths. Provide them explicitly via __dirname.
|
|
35
|
+
// Use indirect access to avoid esbuild empty-import-meta warning.
|
|
36
|
+
const _getMetaUrl = () => { try { return import.meta.url; } catch { return undefined; } };
|
|
37
|
+
function getZkOptions(): QuestOptions | undefined {
|
|
38
|
+
if (_getMetaUrl()) return undefined; // dev mode: SDK resolves paths itself
|
|
39
|
+
return {
|
|
40
|
+
circuitWasmPath: join(__dirname, "zk", "answer_proof.wasm"),
|
|
41
|
+
zkeyPath: join(__dirname, "zk", "answer_proof_final.zkey"),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
31
45
|
const DEFAULT_QUEST_RELAY_URL = process.env.QUEST_RELAY_URL || "https://quest-api.nara.build/";
|
|
32
46
|
|
|
33
47
|
// ─── Anchor error parsing ────────────────────────────────────────
|
|
@@ -178,7 +192,7 @@ async function handleQuestAnswer(
|
|
|
178
192
|
|
|
179
193
|
let proof;
|
|
180
194
|
try {
|
|
181
|
-
proof = await generateProof(answer, quest.answerHash, wallet.publicKey, quest.round);
|
|
195
|
+
proof = await generateProof(answer, quest.answerHash, wallet.publicKey, quest.round, getZkOptions());
|
|
182
196
|
} catch (err: any) {
|
|
183
197
|
if (err.message?.includes("Assert Failed")) {
|
|
184
198
|
printError("Wrong answer");
|