@triedotdev/mcp 1.0.164 → 1.0.166

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.
Files changed (62) hide show
  1. package/README.md +16 -2
  2. package/dist/{chunk-5TRCQAOE.js → chunk-2Z3TQNNK.js} +16 -5
  3. package/dist/chunk-2Z3TQNNK.js.map +1 -0
  4. package/dist/{chunk-5BYSJ7XT.js → chunk-GTKYBOXL.js} +13 -2
  5. package/dist/{chunk-5BYSJ7XT.js.map → chunk-GTKYBOXL.js.map} +1 -1
  6. package/dist/{chunk-D6E4Q4I6.js → chunk-HOGKPDZA.js} +302 -58
  7. package/dist/chunk-HOGKPDZA.js.map +1 -0
  8. package/dist/{chunk-LR46VMIE.js → chunk-JEZ7XJQN.js} +5 -5
  9. package/dist/{chunk-ERMLZJTK.js → chunk-JNUOW2JS.js} +13 -13
  10. package/dist/{chunk-62JD7MIS.js → chunk-LG5CBK6A.js} +15 -35
  11. package/dist/chunk-LG5CBK6A.js.map +1 -0
  12. package/dist/{chunk-LLDZDU2Y.js → chunk-LR5M4RTN.js} +79 -1
  13. package/dist/chunk-LR5M4RTN.js.map +1 -0
  14. package/dist/{chunk-Y4B3VEL7.js → chunk-MVVPJ73K.js} +438 -202
  15. package/dist/chunk-MVVPJ73K.js.map +1 -0
  16. package/dist/chunk-OBQ74FOU.js +27 -0
  17. package/dist/chunk-OBQ74FOU.js.map +1 -0
  18. package/dist/{chunk-IRZXBQVQ.js → chunk-S36IO3EE.js} +134 -101
  19. package/dist/chunk-S36IO3EE.js.map +1 -0
  20. package/dist/{chunk-HFVPHQL3.js → chunk-TQOO6A4G.js} +9 -9
  21. package/dist/{chunk-OKK4QNK3.js → chunk-UXRW2YSP.js} +86 -12
  22. package/dist/chunk-UXRW2YSP.js.map +1 -0
  23. package/dist/{chunk-ACU3IXZG.js → chunk-ZKKKLRZZ.js} +7 -7
  24. package/dist/cli/main.js +215 -57
  25. package/dist/cli/main.js.map +1 -1
  26. package/dist/cli/yolo-daemon.js +15 -14
  27. package/dist/cli/yolo-daemon.js.map +1 -1
  28. package/dist/{fast-analyzer-LLZ6FLP5.js → fast-analyzer-NJQO3TFD.js} +3 -3
  29. package/dist/{goal-manager-D6XKE3FY.js → goal-manager-DVX24UPZ.js} +5 -5
  30. package/dist/{goal-validator-4DDL7NBP.js → goal-validator-6Y5CDEMJ.js} +5 -5
  31. package/dist/{hypothesis-RI3Q33JB.js → hypothesis-UKPGOYY2.js} +5 -5
  32. package/dist/index.js +16 -15
  33. package/dist/index.js.map +1 -1
  34. package/dist/{issue-store-DUR5UTYK.js → issue-store-UZAPI5DU.js} +3 -3
  35. package/dist/{ledger-ZTR63P3L.js → ledger-CNFCJKHX.js} +8 -2
  36. package/dist/project-state-AHPA77SM.js +28 -0
  37. package/dist/server/mcp-server.js +16 -15
  38. package/dist/sync-M2FSWPBC.js +12 -0
  39. package/dist/{tiered-storage-FHHAJR4P.js → tiered-storage-OP74NPJY.js} +2 -2
  40. package/dist/tiered-storage-OP74NPJY.js.map +1 -0
  41. package/dist/{trie-agent-NYSPGZYS.js → trie-agent-6SWUHCVO.js} +12 -12
  42. package/dist/trie-agent-6SWUHCVO.js.map +1 -0
  43. package/package.json +1 -1
  44. package/dist/chunk-5TRCQAOE.js.map +0 -1
  45. package/dist/chunk-62JD7MIS.js.map +0 -1
  46. package/dist/chunk-D6E4Q4I6.js.map +0 -1
  47. package/dist/chunk-IRZXBQVQ.js.map +0 -1
  48. package/dist/chunk-LLDZDU2Y.js.map +0 -1
  49. package/dist/chunk-OKK4QNK3.js.map +0 -1
  50. package/dist/chunk-Y4B3VEL7.js.map +0 -1
  51. /package/dist/{chunk-LR46VMIE.js.map → chunk-JEZ7XJQN.js.map} +0 -0
  52. /package/dist/{chunk-ERMLZJTK.js.map → chunk-JNUOW2JS.js.map} +0 -0
  53. /package/dist/{chunk-HFVPHQL3.js.map → chunk-TQOO6A4G.js.map} +0 -0
  54. /package/dist/{chunk-ACU3IXZG.js.map → chunk-ZKKKLRZZ.js.map} +0 -0
  55. /package/dist/{fast-analyzer-LLZ6FLP5.js.map → fast-analyzer-NJQO3TFD.js.map} +0 -0
  56. /package/dist/{goal-manager-D6XKE3FY.js.map → goal-manager-DVX24UPZ.js.map} +0 -0
  57. /package/dist/{goal-validator-4DDL7NBP.js.map → goal-validator-6Y5CDEMJ.js.map} +0 -0
  58. /package/dist/{hypothesis-RI3Q33JB.js.map → hypothesis-UKPGOYY2.js.map} +0 -0
  59. /package/dist/{issue-store-DUR5UTYK.js.map → issue-store-UZAPI5DU.js.map} +0 -0
  60. /package/dist/{ledger-ZTR63P3L.js.map → ledger-CNFCJKHX.js.map} +0 -0
  61. /package/dist/{tiered-storage-FHHAJR4P.js.map → project-state-AHPA77SM.js.map} +0 -0
  62. /package/dist/{trie-agent-NYSPGZYS.js.map → sync-M2FSWPBC.js.map} +0 -0
@@ -1,9 +1,9 @@
1
- import {
2
- getProjectState
3
- } from "./chunk-5BYSJ7XT.js";
4
1
  import {
5
2
  searchIssues
6
- } from "./chunk-IRZXBQVQ.js";
3
+ } from "./chunk-S36IO3EE.js";
4
+ import {
5
+ getProjectState
6
+ } from "./chunk-GTKYBOXL.js";
7
7
 
8
8
  // src/agent/goal-validator.ts
9
9
  async function getActiveGoals(projectPath) {
@@ -38,9 +38,9 @@ async function recordGoalViolationFixed(goal, file, projectPath) {
38
38
  lastFixedFile: file
39
39
  }
40
40
  });
41
- const { resolveGoalViolation } = await import("./issue-store-DUR5UTYK.js");
41
+ const { resolveGoalViolation } = await import("./issue-store-UZAPI5DU.js");
42
42
  await resolveGoalViolation(file, goal.description, projectPath);
43
- const { getGoalManager } = await import("./goal-manager-D6XKE3FY.js");
43
+ const { getGoalManager } = await import("./goal-manager-DVX24UPZ.js");
44
44
  const goalManager = getGoalManager(projectPath);
45
45
  await goalManager.updateGoalProgress();
46
46
  }
@@ -351,4 +351,4 @@ export {
351
351
  measureInitialGoalValue,
352
352
  checkFilesForGoalViolations
353
353
  };
354
- //# sourceMappingURL=chunk-ACU3IXZG.js.map
354
+ //# sourceMappingURL=chunk-ZKKKLRZZ.js.map
package/dist/cli/main.js CHANGED
@@ -13,17 +13,19 @@ import {
13
13
  } from "../chunk-OLNZJ3XV.js";
14
14
  import {
15
15
  LearningEngine,
16
- exportToJson,
17
16
  formatFriendlyError,
18
17
  handleCheckpointCommand,
19
- importFromJson,
20
18
  isTrieInitialized,
21
19
  perceiveCurrentChanges,
22
20
  reasonAboutChangesHumanReadable
23
- } from "../chunk-62JD7MIS.js";
21
+ } from "../chunk-LG5CBK6A.js";
24
22
  import {
25
23
  measureInitialGoalValue
26
- } from "../chunk-ACU3IXZG.js";
24
+ } from "../chunk-ZKKKLRZZ.js";
25
+ import {
26
+ exportToJson,
27
+ importFromJson
28
+ } from "../chunk-OBQ74FOU.js";
27
29
  import {
28
30
  loadConfig,
29
31
  saveConfig
@@ -40,17 +42,17 @@ import {
40
42
  listTrackedProjects,
41
43
  searchGlobalPatterns,
42
44
  updateGlobalMemoryMd
43
- } from "../chunk-HFVPHQL3.js";
44
- import {
45
- getStorage
46
- } from "../chunk-LLDZDU2Y.js";
45
+ } from "../chunk-TQOO6A4G.js";
46
+ import "../chunk-SY6KQG44.js";
47
+ import "../chunk-OMR4YCBS.js";
47
48
  import {
48
49
  ContextGraph
49
50
  } from "../chunk-VUL52BQL.js";
50
- import "../chunk-FQ45QP5A.js";
51
+ import "../chunk-6NLHFIYA.js";
51
52
  import {
52
- getProjectState
53
- } from "../chunk-5BYSJ7XT.js";
53
+ getStorage
54
+ } from "../chunk-LR5M4RTN.js";
55
+ import "../chunk-FQ45QP5A.js";
54
56
  import {
55
57
  getDailyLogs,
56
58
  getMemoryStats,
@@ -58,11 +60,11 @@ import {
58
60
  markIssueResolved,
59
61
  purgeIssues,
60
62
  searchIssues
61
- } from "../chunk-IRZXBQVQ.js";
63
+ } from "../chunk-S36IO3EE.js";
64
+ import {
65
+ getProjectState
66
+ } from "../chunk-GTKYBOXL.js";
62
67
  import "../chunk-EFWVF6TI.js";
63
- import "../chunk-SY6KQG44.js";
64
- import "../chunk-OMR4YCBS.js";
65
- import "../chunk-6NLHFIYA.js";
66
68
  import {
67
69
  getAutonomyConfig,
68
70
  recordBypass,
@@ -75,23 +77,28 @@ import {
75
77
  correctLedgerEntries,
76
78
  detectLegacyLedger,
77
79
  formatAuditLog,
80
+ generateKeyPair,
78
81
  getAuditStatistics,
79
82
  getCorrectionStats,
80
83
  getEntryCorrectionHistory,
81
84
  getLedgerBlocks,
82
85
  getLedgerSyncStatus,
86
+ getPublicKey,
83
87
  getRecentAuditLogs,
84
88
  getStagedChanges,
85
89
  getStorageStats,
86
90
  getUncommittedChanges,
91
+ hasSigningKey,
87
92
  initializeSharedLedger,
88
93
  isGitRepo,
94
+ loadKeyPair,
89
95
  migrateLegacyLedger,
90
96
  pushLedgerToShared,
97
+ saveKeyPair,
91
98
  shouldCompress,
92
99
  syncLedgerFromShared,
93
100
  verifyLedger
94
- } from "../chunk-Y4B3VEL7.js";
101
+ } from "../chunk-MVVPJ73K.js";
95
102
  import "../chunk-43X6JBEM.js";
96
103
  import {
97
104
  getTrieDirectory,
@@ -103,10 +110,10 @@ import {
103
110
  } from "../chunk-DGUM43GV.js";
104
111
 
105
112
  // src/cli/main.ts
106
- import { resolve as resolve2, join as join5, dirname as dirname2 } from "path";
113
+ import { resolve, join as join6, dirname } from "path";
107
114
  import { readFileSync as readFileSync2, realpathSync } from "fs";
108
- import { fileURLToPath as fileURLToPath2 } from "url";
109
- import pc9 from "picocolors";
115
+ import { fileURLToPath } from "url";
116
+ import pc10 from "picocolors";
110
117
 
111
118
  // src/hooks/install.ts
112
119
  import fs from "fs";
@@ -339,6 +346,23 @@ Run "trie help" to see all available commands.
339
346
  console.log("\nGit hooks not installed (no .git directory found).");
340
347
  }
341
348
  ensureGitignore(workDir);
349
+ const skipKeys = args.includes("--no-keys");
350
+ if (!skipKeys && !hasSigningKey(workDir)) {
351
+ console.log("\nSetting up Ed25519 signing for governance ledger...");
352
+ try {
353
+ const keyPair = await generateKeyPair();
354
+ saveKeyPair(keyPair, workDir);
355
+ console.log(` \u2713 Signing key generated`);
356
+ console.log(` Public key: ${keyPair.publicKey.slice(0, 16)}...${keyPair.publicKey.slice(-8)}`);
357
+ console.log(" All ledger entries will be signed automatically.");
358
+ console.log(" Your private key stays local (never committed to git).");
359
+ } catch (keyError) {
360
+ console.log(` \u26A0 Could not generate signing key: ${keyError}`);
361
+ console.log(' Run "trie keys generate" to set up signing later.');
362
+ }
363
+ } else if (hasSigningKey(workDir)) {
364
+ console.log("\n\u2713 Signing key already configured (ledger entries will be signed)");
365
+ }
342
366
  if (!process.env.ANTHROPIC_API_KEY) {
343
367
  console.log(`
344
368
  Note: Running in pattern-only mode. For AI-powered analysis, set your API key:
@@ -868,8 +892,6 @@ import { writeFile, mkdir, chmod } from "fs/promises";
868
892
  import { join } from "path";
869
893
  import { existsSync } from "fs";
870
894
  import pc2 from "picocolors";
871
- import { dirname } from "path";
872
- import { fileURLToPath } from "url";
873
895
  async function installGitHooks2() {
874
896
  const workDir = getWorkingDirectory(void 0, true);
875
897
  const isRepo = await isGitRepo(workDir);
@@ -949,8 +971,6 @@ async function checkGitHooks() {
949
971
  postMergeInstalled: existsSync(postMergePath)
950
972
  };
951
973
  }
952
- var __filename2 = fileURLToPath(import.meta.url);
953
- var __dirname2 = dirname(__filename2);
954
974
  async function handlePreCommitCommand(_args) {
955
975
  console.log(pc2.cyan("\u{1F50D} Running pre-commit hook..."));
956
976
  console.log(pc2.dim("Checking ledger for issues in staged files...\n"));
@@ -974,7 +994,7 @@ async function handlePreCommitCommand(_args) {
974
994
  console.error(pc2.yellow("\u26A0 Could not get staged files, skipping pre-commit check"));
975
995
  process.exit(0);
976
996
  }
977
- const { searchIssues: searchIssues2 } = await import("../issue-store-DUR5UTYK.js");
997
+ const { searchIssues: searchIssues2 } = await import("../issue-store-UZAPI5DU.js");
978
998
  let criticalIssues = 0;
979
999
  let totalIssues = 0;
980
1000
  const issuesByFile = /* @__PURE__ */ new Map();
@@ -1351,10 +1371,10 @@ async function promptUser(question) {
1351
1371
  input: process.stdin,
1352
1372
  output: process.stderr
1353
1373
  });
1354
- return new Promise((resolve3) => {
1374
+ return new Promise((resolve2) => {
1355
1375
  rl.question(question, (answer) => {
1356
1376
  rl.close();
1357
- resolve3(answer.toLowerCase().trim());
1377
+ resolve2(answer.toLowerCase().trim());
1358
1378
  });
1359
1379
  });
1360
1380
  }
@@ -3195,13 +3215,145 @@ ${pc8.yellow("\u{1F4A1} Tip:")} Run ${pc8.bold("trie ledger compress")} to archi
3195
3215
  return ledger;
3196
3216
  }
3197
3217
 
3218
+ // src/cli/keys.ts
3219
+ import pc9 from "picocolors";
3220
+ import { join as join5 } from "path";
3221
+ async function handleKeysCommand(args) {
3222
+ const subcommand = args[0]?.toLowerCase() || "status";
3223
+ const workDir = getWorkingDirectory(void 0, true);
3224
+ switch (subcommand) {
3225
+ case "generate":
3226
+ case "create":
3227
+ case "init":
3228
+ await handleKeysGenerate(workDir, args.includes("--force") || args.includes("-f"));
3229
+ break;
3230
+ case "status":
3231
+ case "info":
3232
+ await handleKeysStatus(workDir);
3233
+ break;
3234
+ case "public":
3235
+ case "pubkey":
3236
+ await handleKeysPublic(workDir);
3237
+ break;
3238
+ case "help":
3239
+ case "--help":
3240
+ case "-h":
3241
+ showKeysHelp();
3242
+ break;
3243
+ default:
3244
+ console.error(pc9.red(`Unknown subcommand: ${subcommand}`));
3245
+ showKeysHelp();
3246
+ process.exit(1);
3247
+ }
3248
+ }
3249
+ async function handleKeysGenerate(workDir, force) {
3250
+ const hasKey = hasSigningKey(workDir);
3251
+ if (hasKey && !force) {
3252
+ console.log(pc9.yellow("Signing key already exists."));
3253
+ console.log(pc9.dim("Use --force to regenerate (WARNING: will invalidate existing signatures)"));
3254
+ const pubKey = getPublicKey(workDir);
3255
+ if (pubKey) {
3256
+ console.log(`
3257
+ Public key: ${pc9.cyan(pubKey.slice(0, 16))}...${pc9.cyan(pubKey.slice(-8))}`);
3258
+ }
3259
+ return;
3260
+ }
3261
+ if (hasKey && force) {
3262
+ console.log(pc9.yellow("Regenerating signing key..."));
3263
+ console.log(pc9.red("WARNING: This will invalidate all existing signatures in the ledger."));
3264
+ }
3265
+ console.log("Generating Ed25519 signing key pair...\n");
3266
+ const keyPair = await generateKeyPair();
3267
+ saveKeyPair(keyPair, workDir);
3268
+ const keysDir = join5(getTrieDirectory(workDir), "keys");
3269
+ console.log(pc9.green("\u2713 Signing key generated successfully\n"));
3270
+ console.log(`Location: ${pc9.dim(keysDir)}`);
3271
+ console.log(`Public key: ${pc9.cyan(keyPair.publicKey.slice(0, 16))}...${pc9.cyan(keyPair.publicKey.slice(-8))}`);
3272
+ console.log(`Algorithm: ${pc9.dim("Ed25519")}
3273
+ `);
3274
+ console.log(pc9.bold("What this means:"));
3275
+ console.log(" \u2022 All new ledger entries will be signed automatically");
3276
+ console.log(" \u2022 Signatures prove who created each entry");
3277
+ console.log(" \u2022 Tampering with entries will be detectable");
3278
+ console.log(" \u2022 Your private key stays local (never committed to git)\n");
3279
+ console.log(pc9.yellow("Security notes:"));
3280
+ console.log(" \u2022 The private key is stored in .trie/keys/signing-key.json");
3281
+ console.log(" \u2022 This directory is automatically added to .gitignore");
3282
+ console.log(" \u2022 Back up this key if you need to prove authorship later");
3283
+ console.log(" \u2022 Team members each generate their own keys");
3284
+ }
3285
+ async function handleKeysStatus(workDir) {
3286
+ const hasKey = hasSigningKey(workDir);
3287
+ const keysDir = join5(getTrieDirectory(workDir), "keys");
3288
+ console.log(pc9.bold("Signing Key Status\n"));
3289
+ if (hasKey) {
3290
+ const keyPair = loadKeyPair(workDir);
3291
+ const keyPath = join5(keysDir, "signing-key.json");
3292
+ console.log(`Status: ${pc9.green("\u2713 Active")}`);
3293
+ console.log(`Location: ${pc9.dim(keyPath)}`);
3294
+ if (keyPair) {
3295
+ console.log(`Public key: ${pc9.cyan(keyPair.publicKey.slice(0, 16))}...${pc9.cyan(keyPair.publicKey.slice(-8))}`);
3296
+ }
3297
+ console.log(`Algorithm: ${pc9.dim("Ed25519")}`);
3298
+ console.log(`
3299
+ New ledger entries will be ${pc9.green("signed automatically")}.`);
3300
+ } else {
3301
+ console.log(`Status: ${pc9.yellow("\u25CB Not configured")}`);
3302
+ console.log(`
3303
+ Ledger entries are ${pc9.yellow("not being signed")}.`);
3304
+ console.log(`
3305
+ To enable signing, run:`);
3306
+ console.log(` ${pc9.cyan("trie keys generate")}`);
3307
+ }
3308
+ }
3309
+ async function handleKeysPublic(workDir) {
3310
+ const pubKey = getPublicKey(workDir);
3311
+ if (!pubKey) {
3312
+ console.error(pc9.yellow("No signing key found."));
3313
+ console.error(`Run ${pc9.cyan("trie keys generate")} to create one.`);
3314
+ process.exit(1);
3315
+ }
3316
+ console.log(pubKey);
3317
+ }
3318
+ function showKeysHelp() {
3319
+ console.log(`
3320
+ ${pc9.bold("trie keys")} - Manage Ed25519 signing keys for the governance ledger
3321
+
3322
+ ${pc9.bold("USAGE:")}
3323
+ trie keys <command> [options]
3324
+
3325
+ ${pc9.bold("COMMANDS:")}
3326
+ generate Generate a new Ed25519 signing key pair
3327
+ status Show current key status (default)
3328
+ public Print the public key (for sharing/verification)
3329
+ help Show this help message
3330
+
3331
+ ${pc9.bold("OPTIONS:")}
3332
+ --force, -f Force regenerate key (WARNING: invalidates signatures)
3333
+
3334
+ ${pc9.bold("EXAMPLES:")}
3335
+ trie keys # Check if signing is configured
3336
+ trie keys generate # Generate a new signing key
3337
+ trie keys public # Get your public key for verification
3338
+
3339
+ ${pc9.bold("ABOUT SIGNING:")}
3340
+ Ed25519 signatures provide:
3341
+ \u2022 ${pc9.green("Authenticity")} - Prove who created each ledger entry
3342
+ \u2022 ${pc9.green("Tamper-evidence")} - Detect if entries are modified
3343
+ \u2022 ${pc9.green("Accountability")} - Track decisions to humans or agents
3344
+
3345
+ Keys are stored locally in .trie/keys/ and never committed to git.
3346
+ Each team member should generate their own key.
3347
+ `);
3348
+ }
3349
+
3198
3350
  // src/cli/main.ts
3199
- var __filename3 = fileURLToPath2(import.meta.url);
3200
- var __dirname3 = dirname2(__filename3);
3351
+ var __filename2 = fileURLToPath(import.meta.url);
3352
+ var __dirname2 = dirname(__filename2);
3201
3353
  var DEFAULT_VERSION = "0.0.0";
3202
3354
  function getCliVersion() {
3203
3355
  try {
3204
- const pkgPath = resolve2(__dirname3, "..", "..", "package.json");
3356
+ const pkgPath = resolve(__dirname2, "..", "..", "package.json");
3205
3357
  const pkg = JSON.parse(readFileSync2(pkgPath, "utf-8"));
3206
3358
  return typeof pkg.version === "string" && pkg.version.trim() ? pkg.version.trim() : DEFAULT_VERSION;
3207
3359
  } catch {
@@ -3255,6 +3407,7 @@ COMMANDS:
3255
3407
  status Quick health check (project health + memory stats)
3256
3408
  project View/manage project info (.trie/PROJECT.md)
3257
3409
  setup Configure API key and environment
3410
+ keys Manage Ed25519 signing keys (for ledger signatures)
3258
3411
 
3259
3412
  ci Generate GitHub Actions workflow with memory caching
3260
3413
 
@@ -3306,47 +3459,47 @@ async function handleStatusCommand() {
3306
3459
  const lastScanDate = new Date(state.lastScan.timestamp);
3307
3460
  const daysAgo = Math.floor((Date.now() - lastScanDate.getTime()) / (1e3 * 60 * 60 * 24));
3308
3461
  console.log(`
3309
- ${pc9.bold("Last Scan:")} ${lastScanDate.toLocaleDateString()} (${daysAgo === 0 ? "today" : daysAgo === 1 ? "yesterday" : `${daysAgo} days ago`})`);
3310
- console.log(pc9.dim(` Files scanned: ${state.lastScan.filesScanned}`));
3311
- console.log(pc9.dim(` Issues found: ${state.lastScan.issues.total} (${state.lastScan.issues.critical} critical, ${state.lastScan.issues.serious} serious)`));
3462
+ ${pc10.bold("Last Scan:")} ${lastScanDate.toLocaleDateString()} (${daysAgo === 0 ? "today" : daysAgo === 1 ? "yesterday" : `${daysAgo} days ago`})`);
3463
+ console.log(pc10.dim(` Files scanned: ${state.lastScan.filesScanned}`));
3464
+ console.log(pc10.dim(` Issues found: ${state.lastScan.issues.total} (${state.lastScan.issues.critical} critical, ${state.lastScan.issues.serious} serious)`));
3312
3465
  } else {
3313
3466
  console.log(`
3314
- ${pc9.bold("Last Scan:")} Never ${pc9.dim("(run `trie watch` to get started)")}`);
3467
+ ${pc10.bold("Last Scan:")} Never ${pc10.dim("(run `trie watch` to get started)")}`);
3315
3468
  }
3316
3469
  console.log(`
3317
- ${pc9.bold("Memory Stats:")}`);
3318
- console.log(pc9.dim(` Active Issues: ${memoryStats.activeIssues}`));
3319
- console.log(pc9.dim(` Resolved: ${memoryStats.resolvedCount}`));
3320
- console.log(pc9.dim(` Total (all-time): ${memoryStats.totalIssues}`));
3470
+ ${pc10.bold("Memory Stats:")}`);
3471
+ console.log(pc10.dim(` Active Issues: ${memoryStats.activeIssues}`));
3472
+ console.log(pc10.dim(` Resolved: ${memoryStats.resolvedCount}`));
3473
+ console.log(pc10.dim(` Total (all-time): ${memoryStats.totalIssues}`));
3321
3474
  const cap = memoryStats.capacityInfo;
3322
- const capIndicator = cap.isAtCap ? pc9.red("\u25CB") : cap.percentFull >= 80 ? pc9.yellow("\u25C9") : pc9.green("\u25CF");
3323
- console.log(` ${capIndicator} Memory Usage: ${pc9.bold(cap.percentFull + "%")} ${pc9.dim(`(${cap.current}/${cap.max})`)}`);
3475
+ const capIndicator = cap.isAtCap ? pc10.red("\u25CB") : cap.percentFull >= 80 ? pc10.yellow("\u25C9") : pc10.green("\u25CF");
3476
+ console.log(` ${capIndicator} Memory Usage: ${pc10.bold(cap.percentFull + "%")} ${pc10.dim(`(${cap.current}/${cap.max})`)}`);
3324
3477
  if (memoryStats.activeIssues > 0) {
3325
3478
  console.log(`
3326
- ${pc9.bold("Active Issues by Severity:")}`);
3479
+ ${pc10.bold("Active Issues by Severity:")}`);
3327
3480
  const severityOrder = ["critical", "serious", "moderate", "low", "info"];
3328
3481
  for (const severity of severityOrder) {
3329
3482
  const count = memoryStats.activeIssuesBySeverity[severity] || 0;
3330
3483
  if (count > 0) {
3331
- console.log(pc9.dim(` ${severity}: ${count}`));
3484
+ console.log(pc10.dim(` ${severity}: ${count}`));
3332
3485
  }
3333
3486
  }
3334
3487
  } else if (memoryStats.totalIssues > 0) {
3335
3488
  console.log(`
3336
- ${pc9.green("\u25CF")} All issues have been resolved`);
3489
+ ${pc10.green("\u25CF")} All issues have been resolved`);
3337
3490
  }
3338
3491
  if (cap.isAtCap) {
3339
3492
  console.log(`
3340
- ${pc9.yellow("\u2B22 Warning:")} Memory at capacity - consider running: ${pc9.bold("trie memory purge smart")}`);
3493
+ ${pc10.yellow("\u2B22 Warning:")} Memory at capacity - consider running: ${pc10.bold("trie memory purge smart")}`);
3341
3494
  } else if (cap.percentFull >= 80) {
3342
3495
  console.log(`
3343
- ${pc9.yellow("\u2B22 Notice:")} Memory usage high - consider running: ${pc9.bold("trie memory purge smart")}`);
3496
+ ${pc10.yellow("\u2B22 Notice:")} Memory usage high - consider running: ${pc10.bold("trie memory purge smart")}`);
3344
3497
  }
3345
3498
  console.log(`
3346
- ${pc9.bold("Quick Commands:")}`);
3347
- console.log(pc9.dim(" trie watch - Start watching for nudges"));
3348
- console.log(pc9.dim(" trie memory stats - Detailed memory statistics"));
3349
- console.log(pc9.dim(" trie project - View project information"));
3499
+ ${pc10.bold("Quick Commands:")}`);
3500
+ console.log(pc10.dim(" trie watch - Start watching for nudges"));
3501
+ console.log(pc10.dim(" trie memory stats - Detailed memory statistics"));
3502
+ console.log(pc10.dim(" trie project - View project information"));
3350
3503
  console.log("");
3351
3504
  } catch (error) {
3352
3505
  console.error("Error loading status:", error);
@@ -3364,7 +3517,7 @@ async function handleProject(args) {
3364
3517
  \u2551 PROJECT.md Created \u2551
3365
3518
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
3366
3519
 
3367
- ${pc9.bold("Path:")} ${result.path}
3520
+ ${pc10.bold("Path:")} ${result.path}
3368
3521
 
3369
3522
  A template has been created with sections for:
3370
3523
  \u2022 Project Overview
@@ -3389,7 +3542,7 @@ Next steps:
3389
3542
  }
3390
3543
  if (subcommand === "edit") {
3391
3544
  const editor = process.env.EDITOR || process.env.VISUAL || "nano";
3392
- const projectPath = join5(getTrieDirectory(workDir), "PROJECT.md");
3545
+ const projectPath = join6(getTrieDirectory(workDir), "PROJECT.md");
3393
3546
  if (!projectInfoExists(workDir)) {
3394
3547
  console.log("No PROJECT.md found. Creating one first...");
3395
3548
  await initProjectInfo(workDir);
@@ -3407,7 +3560,7 @@ Next steps:
3407
3560
  \u2551 Project Information \u2551
3408
3561
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
3409
3562
 
3410
- ${pc9.bold("No PROJECT.md found in this project.")}
3563
+ ${pc10.bold("No PROJECT.md found in this project.")}
3411
3564
 
3412
3565
  COMMANDS:
3413
3566
  trie project init Create PROJECT.md from template
@@ -3435,7 +3588,7 @@ This info is available via trie://project MCP resource.
3435
3588
  \u2551 Project Information \u2551
3436
3589
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
3437
3590
 
3438
- ${pc9.bold("Path:")} ${join5(getTrieDirectory(workDir), "PROJECT.md")}
3591
+ ${pc10.bold("Path:")} ${join6(getTrieDirectory(workDir), "PROJECT.md")}
3439
3592
 
3440
3593
  ${"-".repeat(68)}
3441
3594
  `);
@@ -3444,10 +3597,10 @@ ${"-".repeat(68)}
3444
3597
  async function runWatch(args) {
3445
3598
  const { spawn } = await import("child_process");
3446
3599
  let daemonPath;
3447
- if (__filename3.endsWith(".ts")) {
3448
- daemonPath = resolve2(__dirname3, "yolo-daemon.ts");
3600
+ if (__filename2.endsWith(".ts")) {
3601
+ daemonPath = resolve(__dirname2, "yolo-daemon.ts");
3449
3602
  } else {
3450
- daemonPath = resolve2(__dirname3, "yolo-daemon.js");
3603
+ daemonPath = resolve(__dirname2, "yolo-daemon.js");
3451
3604
  }
3452
3605
  const executor = daemonPath.endsWith(".ts") ? "npx" : "node";
3453
3606
  const execArgs = daemonPath.endsWith(".ts") ? ["tsx", daemonPath, ...args] : [daemonPath, ...args];
@@ -3590,10 +3743,15 @@ async function main() {
3590
3743
  ledgerCommand.parse(["node", "trie", "ledger", ...restArgs], { from: "user" });
3591
3744
  }
3592
3745
  break;
3746
+ case "keys":
3747
+ case "key":
3748
+ case "signing":
3749
+ await handleKeysCommand(restArgs);
3750
+ break;
3593
3751
  default:
3594
3752
  if (command.startsWith("-")) {
3595
3753
  const { spawn } = __require("child_process");
3596
- const daemonPath = resolve2(__dirname3, "yolo-daemon.js");
3754
+ const daemonPath = resolve(__dirname2, "yolo-daemon.js");
3597
3755
  const child = spawn("node", [daemonPath, ...args], {
3598
3756
  stdio: "inherit",
3599
3757
  env: process.env
@@ -3613,7 +3771,7 @@ var isEntryPoint = (() => {
3613
3771
  if (!entry) return false;
3614
3772
  try {
3615
3773
  const realEntry = realpathSync(entry);
3616
- const realThis = fileURLToPath2(import.meta.url);
3774
+ const realThis = fileURLToPath(import.meta.url);
3617
3775
  return realEntry === realThis;
3618
3776
  } catch {
3619
3777
  return !process.env.VITEST && !process.env.VITEST_WORKER_ID;