@triedotdev/mcp 1.0.149 → 1.0.151
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/LICENSE +21 -0
- package/README.md +116 -30
- package/dist/{autonomy-config-ZCOSTMPD.js → autonomy-config-3APNC6QF.js} +3 -3
- package/dist/{chat-store-OJLJCJFI.js → chat-store-HMTDL7I2.js} +3 -3
- package/dist/{chunk-LD7ZEFNY.js → chunk-3KZBC3RJ.js} +2 -2
- package/dist/{chunk-SH7H3WRU.js → chunk-4TQQP7JD.js} +3 -3
- package/dist/{chunk-SH7H3WRU.js.map → chunk-4TQQP7JD.js.map} +1 -1
- package/dist/{chunk-GAL7OIYU.js → chunk-4UDBGYI3.js} +15 -15
- package/dist/{chunk-72KSLD7A.js → chunk-74R4XSFB.js} +5 -5
- package/dist/{chunk-ZDDE442Q.js → chunk-7HYOJ4Q7.js} +8 -8
- package/dist/{chunk-ZDDE442Q.js.map → chunk-7HYOJ4Q7.js.map} +1 -1
- package/dist/{chunk-OTQEFXHU.js → chunk-ABY2R7OK.js} +2 -2
- package/dist/{chunk-QH77RQB3.js → chunk-ED7PLRQA.js} +5 -6
- package/dist/chunk-ED7PLRQA.js.map +1 -0
- package/dist/{chunk-23RJT5WT.js → chunk-F7BMFOZ6.js} +2 -2
- package/dist/{chunk-53KUI7RQ.js → chunk-G7Q23IGF.js} +35 -10
- package/dist/{chunk-53KUI7RQ.js.map → chunk-G7Q23IGF.js.map} +1 -1
- package/dist/{chunk-CU5VDH6F.js → chunk-GLY76TSI.js} +2 -2
- package/dist/{chunk-B2AHQ2IR.js → chunk-IFBEAOHH.js} +12 -12
- package/dist/{chunk-ILGMFND2.js → chunk-JIS2OCZR.js} +4 -4
- package/dist/{chunk-FG467PDD.js → chunk-LNUMECBJ.js} +2 -2
- package/dist/{chunk-FPEMP54L.js → chunk-OJXFQRUE.js} +2 -2
- package/dist/{chunk-5KJ4UJOY.js → chunk-QQG42HCI.js} +2 -2
- package/dist/{chunk-7OJ6JIPL.js → chunk-REHKDCI6.js} +7 -150
- package/dist/chunk-REHKDCI6.js.map +1 -0
- package/dist/{chunk-HYNDXZAU.js → chunk-SU3WCAC4.js} +103 -75
- package/dist/chunk-SU3WCAC4.js.map +1 -0
- package/dist/{chunk-4C67GV3O.js → chunk-TCNCNWGV.js} +2 -2
- package/dist/{chunk-NKHO34UZ.js → chunk-TU7D5DEW.js} +2 -2
- package/dist/{chunk-ZUEAHFSY.js → chunk-TWPX6PHF.js} +313 -61
- package/dist/chunk-TWPX6PHF.js.map +1 -0
- package/dist/{chunk-FH335WL5.js → chunk-TWQPOVRA.js} +2 -2
- package/dist/{chunk-YOJGSRZK.js → chunk-V3O7C2LY.js} +2 -2
- package/dist/{chunk-V7AY2EJO.js → chunk-WOTLY5NA.js} +2 -2
- package/dist/cli/create-agent.js +8 -40
- package/dist/cli/create-agent.js.map +1 -1
- package/dist/cli/main.js +55 -93
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +20 -20
- package/dist/{client-INNE2GGZ.js → client-5L64D5SQ.js} +3 -3
- package/dist/{codebase-index-FMIULFZQ.js → codebase-index-OOE7OAHP.js} +3 -3
- package/dist/{fast-analyzer-CTT3MCPE.js → fast-analyzer-FMU3X4AZ.js} +5 -5
- package/dist/github-ingester-C66ZRUYC.js +11 -0
- package/dist/{goal-manager-IGUMDGCA.js → goal-manager-VTBFFYN4.js} +7 -7
- package/dist/{goal-validator-DV6DRSGF.js → goal-validator-EM5XVWVC.js} +6 -6
- package/dist/{graph-J4OGTYCO.js → graph-26JPZ3DF.js} +3 -3
- package/dist/{hypothesis-O72ZLVOW.js → hypothesis-4UPE7KXU.js} +7 -7
- package/dist/{incident-index-BWW2UEY7.js → incident-index-H6APJ4S3.js} +3 -3
- package/dist/index.js +118 -313
- package/dist/index.js.map +1 -1
- package/dist/{insight-store-Q62UGMTF.js → insight-store-QEEUQR5L.js} +3 -3
- package/dist/{issue-store-4FPABLC6.js → issue-store-C6XYENE5.js} +4 -4
- package/dist/{ledger-43SIVE7X.js → ledger-VNA4DX3Z.js} +13 -5
- package/dist/linear-ingester-WIUBWF55.js +11 -0
- package/dist/{tiered-storage-VZL7KK64.js → tiered-storage-P6Z3NV2Q.js} +3 -3
- package/dist/trie-agent-GJJJCL6P.js +27 -0
- package/package.json +4 -6
- package/dist/chunk-7OJ6JIPL.js.map +0 -1
- package/dist/chunk-G76DYVGX.js +0 -136
- package/dist/chunk-G76DYVGX.js.map +0 -1
- package/dist/chunk-HYNDXZAU.js.map +0 -1
- package/dist/chunk-QH77RQB3.js.map +0 -1
- package/dist/chunk-ZUEAHFSY.js.map +0 -1
- package/dist/comprehension-46F7ZNKL.js +0 -821
- package/dist/comprehension-46F7ZNKL.js.map +0 -1
- package/dist/github-ingester-J2ZFYXVE.js +0 -11
- package/dist/linear-ingester-JRDQAIAA.js +0 -11
- package/dist/trie-agent-ET3DAP5Y.js +0 -27
- package/dist/workers/agent-worker.d.ts +0 -2
- package/dist/workers/agent-worker.js +0 -28
- package/dist/workers/agent-worker.js.map +0 -1
- /package/dist/{autonomy-config-ZCOSTMPD.js.map → autonomy-config-3APNC6QF.js.map} +0 -0
- /package/dist/{chat-store-OJLJCJFI.js.map → chat-store-HMTDL7I2.js.map} +0 -0
- /package/dist/{chunk-LD7ZEFNY.js.map → chunk-3KZBC3RJ.js.map} +0 -0
- /package/dist/{chunk-GAL7OIYU.js.map → chunk-4UDBGYI3.js.map} +0 -0
- /package/dist/{chunk-72KSLD7A.js.map → chunk-74R4XSFB.js.map} +0 -0
- /package/dist/{chunk-OTQEFXHU.js.map → chunk-ABY2R7OK.js.map} +0 -0
- /package/dist/{chunk-23RJT5WT.js.map → chunk-F7BMFOZ6.js.map} +0 -0
- /package/dist/{chunk-CU5VDH6F.js.map → chunk-GLY76TSI.js.map} +0 -0
- /package/dist/{chunk-B2AHQ2IR.js.map → chunk-IFBEAOHH.js.map} +0 -0
- /package/dist/{chunk-ILGMFND2.js.map → chunk-JIS2OCZR.js.map} +0 -0
- /package/dist/{chunk-FG467PDD.js.map → chunk-LNUMECBJ.js.map} +0 -0
- /package/dist/{chunk-FPEMP54L.js.map → chunk-OJXFQRUE.js.map} +0 -0
- /package/dist/{chunk-5KJ4UJOY.js.map → chunk-QQG42HCI.js.map} +0 -0
- /package/dist/{chunk-4C67GV3O.js.map → chunk-TCNCNWGV.js.map} +0 -0
- /package/dist/{chunk-NKHO34UZ.js.map → chunk-TU7D5DEW.js.map} +0 -0
- /package/dist/{chunk-FH335WL5.js.map → chunk-TWQPOVRA.js.map} +0 -0
- /package/dist/{chunk-YOJGSRZK.js.map → chunk-V3O7C2LY.js.map} +0 -0
- /package/dist/{chunk-V7AY2EJO.js.map → chunk-WOTLY5NA.js.map} +0 -0
- /package/dist/{client-INNE2GGZ.js.map → client-5L64D5SQ.js.map} +0 -0
- /package/dist/{codebase-index-FMIULFZQ.js.map → codebase-index-OOE7OAHP.js.map} +0 -0
- /package/dist/{fast-analyzer-CTT3MCPE.js.map → fast-analyzer-FMU3X4AZ.js.map} +0 -0
- /package/dist/{github-ingester-J2ZFYXVE.js.map → github-ingester-C66ZRUYC.js.map} +0 -0
- /package/dist/{goal-manager-IGUMDGCA.js.map → goal-manager-VTBFFYN4.js.map} +0 -0
- /package/dist/{goal-validator-DV6DRSGF.js.map → goal-validator-EM5XVWVC.js.map} +0 -0
- /package/dist/{graph-J4OGTYCO.js.map → graph-26JPZ3DF.js.map} +0 -0
- /package/dist/{hypothesis-O72ZLVOW.js.map → hypothesis-4UPE7KXU.js.map} +0 -0
- /package/dist/{incident-index-BWW2UEY7.js.map → incident-index-H6APJ4S3.js.map} +0 -0
- /package/dist/{insight-store-Q62UGMTF.js.map → insight-store-QEEUQR5L.js.map} +0 -0
- /package/dist/{issue-store-4FPABLC6.js.map → issue-store-C6XYENE5.js.map} +0 -0
- /package/dist/{ledger-43SIVE7X.js.map → ledger-VNA4DX3Z.js.map} +0 -0
- /package/dist/{linear-ingester-JRDQAIAA.js.map → linear-ingester-WIUBWF55.js.map} +0 -0
- /package/dist/{tiered-storage-VZL7KK64.js.map → tiered-storage-P6Z3NV2Q.js.map} +0 -0
- /package/dist/{trie-agent-ET3DAP5Y.js.map → trie-agent-GJJJCL6P.js.map} +0 -0
package/dist/cli/main.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
completeBootstrap,
|
|
4
|
-
getSkillCategories,
|
|
5
4
|
initProjectInfo,
|
|
6
5
|
initializeBootstrapFiles,
|
|
7
6
|
loadContextState,
|
|
8
7
|
loadProjectInfo,
|
|
9
8
|
needsBootstrap,
|
|
10
9
|
projectInfoExists
|
|
11
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-REHKDCI6.js";
|
|
12
11
|
import {
|
|
13
12
|
LinearIngester
|
|
14
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-3KZBC3RJ.js";
|
|
15
14
|
import {
|
|
16
15
|
LearningEngine,
|
|
17
16
|
exportToJson,
|
|
@@ -21,14 +20,14 @@ import {
|
|
|
21
20
|
isTrieInitialized,
|
|
22
21
|
perceiveCurrentChanges,
|
|
23
22
|
reasonAboutChangesHumanReadable
|
|
24
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-G7Q23IGF.js";
|
|
25
24
|
import {
|
|
26
25
|
loadConfig,
|
|
27
26
|
saveConfig
|
|
28
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-TU7D5DEW.js";
|
|
29
28
|
import {
|
|
30
29
|
IncidentIndex
|
|
31
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-TCNCNWGV.js";
|
|
32
31
|
import "../chunk-ZV2K6M7T.js";
|
|
33
32
|
import {
|
|
34
33
|
GotchaPredictor,
|
|
@@ -38,39 +37,39 @@ import {
|
|
|
38
37
|
listTrackedProjects,
|
|
39
38
|
searchGlobalPatterns,
|
|
40
39
|
updateGlobalMemoryMd
|
|
41
|
-
} from "../chunk-
|
|
42
|
-
import {
|
|
43
|
-
getStorage
|
|
44
|
-
} from "../chunk-FG467PDD.js";
|
|
40
|
+
} from "../chunk-IFBEAOHH.js";
|
|
45
41
|
import {
|
|
46
42
|
ContextGraph
|
|
47
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-TWQPOVRA.js";
|
|
48
44
|
import {
|
|
49
45
|
measureInitialGoalValue
|
|
50
|
-
} from "../chunk-
|
|
51
|
-
import "../chunk-
|
|
46
|
+
} from "../chunk-7HYOJ4Q7.js";
|
|
47
|
+
import "../chunk-OJXFQRUE.js";
|
|
52
48
|
import {
|
|
53
49
|
getProjectState
|
|
54
|
-
} from "../chunk-
|
|
55
|
-
import {
|
|
56
|
-
getDailyLogs,
|
|
57
|
-
getMemoryStats,
|
|
58
|
-
getRecentIssues,
|
|
59
|
-
markIssueResolved,
|
|
60
|
-
purgeIssues,
|
|
61
|
-
searchIssues
|
|
62
|
-
} from "../chunk-QH77RQB3.js";
|
|
63
|
-
import "../chunk-EFWVF6TI.js";
|
|
50
|
+
} from "../chunk-GLY76TSI.js";
|
|
64
51
|
import "../chunk-F4NJ4CBP.js";
|
|
65
52
|
import "../chunk-IXO4G4D3.js";
|
|
66
53
|
import "../chunk-6NLHFIYA.js";
|
|
54
|
+
import {
|
|
55
|
+
getStorage
|
|
56
|
+
} from "../chunk-LNUMECBJ.js";
|
|
67
57
|
import {
|
|
68
58
|
getAutonomyConfig,
|
|
69
59
|
recordBypass,
|
|
70
60
|
shouldAutoFix,
|
|
71
61
|
shouldBlockPush,
|
|
72
62
|
trackIssueOccurrence
|
|
73
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-QQG42HCI.js";
|
|
64
|
+
import {
|
|
65
|
+
getDailyLogs,
|
|
66
|
+
getMemoryStats,
|
|
67
|
+
getRecentIssues,
|
|
68
|
+
markIssueResolved,
|
|
69
|
+
purgeIssues,
|
|
70
|
+
searchIssues
|
|
71
|
+
} from "../chunk-ED7PLRQA.js";
|
|
72
|
+
import "../chunk-EFWVF6TI.js";
|
|
74
73
|
import {
|
|
75
74
|
compressOldBlocks,
|
|
76
75
|
correctLedgerEntries,
|
|
@@ -82,7 +81,6 @@ import {
|
|
|
82
81
|
getLedgerBlocks,
|
|
83
82
|
getLedgerSyncStatus,
|
|
84
83
|
getRecentAuditLogs,
|
|
85
|
-
getSkillAuditLogs,
|
|
86
84
|
getStagedChanges,
|
|
87
85
|
getStorageStats,
|
|
88
86
|
getUncommittedChanges,
|
|
@@ -93,12 +91,12 @@ import {
|
|
|
93
91
|
shouldCompress,
|
|
94
92
|
syncLedgerFromShared,
|
|
95
93
|
verifyLedger
|
|
96
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-TWPX6PHF.js";
|
|
97
95
|
import "../chunk-43X6JBEM.js";
|
|
98
96
|
import {
|
|
99
97
|
getTrieDirectory,
|
|
100
98
|
getWorkingDirectory
|
|
101
|
-
} from "../chunk-
|
|
99
|
+
} from "../chunk-4TQQP7JD.js";
|
|
102
100
|
import "../chunk-APMV77PU.js";
|
|
103
101
|
import {
|
|
104
102
|
__require
|
|
@@ -273,7 +271,7 @@ async function handleInitCommand(args) {
|
|
|
273
271
|
\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2551
|
|
274
272
|
\u2551 \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u2551
|
|
275
273
|
\u2551 \u2551
|
|
276
|
-
\u2551 Your code quality agent and
|
|
274
|
+
\u2551 Your code quality agent and tools registry \u2551
|
|
277
275
|
\u2551 \u2551
|
|
278
276
|
\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\u255D
|
|
279
277
|
|
|
@@ -316,29 +314,11 @@ async function handleInitCommand(args) {
|
|
|
316
314
|
if (result.stack.database) console.log(` Database: ${result.stack.database}`);
|
|
317
315
|
if (result.stack.auth) console.log(` Auth: ${result.stack.auth}`);
|
|
318
316
|
if (result.stack.packageManager) console.log(` Package Manager: ${result.stack.packageManager}`);
|
|
319
|
-
if (result.stack.suggestedSkills.length > 0) {
|
|
320
|
-
const topSkills = result.stack.suggestedSkills.slice(0, 5);
|
|
321
|
-
console.log("\nSuggested Skills (based on your stack):");
|
|
322
|
-
for (const skill of topSkills) {
|
|
323
|
-
console.log(` trie skills add ${skill}`);
|
|
324
|
-
}
|
|
325
|
-
if (result.stack.suggestedSkills.length > 5) {
|
|
326
|
-
console.log(` ... and ${result.stack.suggestedSkills.length - 5} more: trie skills suggest`);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
const categories = getSkillCategories();
|
|
330
|
-
const topCategories = categories.slice(0, 5);
|
|
331
|
-
console.log("\nExplore skill categories:");
|
|
332
|
-
for (const cat of topCategories) {
|
|
333
|
-
console.log(` trie skills list ${cat.name.padEnd(15)} # ${cat.count} skills`);
|
|
334
|
-
}
|
|
335
|
-
console.log(` trie skills list categories # see all ${categories.length} categories`);
|
|
336
|
-
console.log("\nBrowse all skills: https://skills.sh");
|
|
337
317
|
console.log(`
|
|
338
318
|
Quick Start:
|
|
339
|
-
1. trie
|
|
340
|
-
2. trie
|
|
341
|
-
3. trie
|
|
319
|
+
1. trie watch # Start watching (nudges as you code)
|
|
320
|
+
2. trie tell "what broke" # Teach Trie about past incidents
|
|
321
|
+
3. trie check # Risk check before pushing
|
|
342
322
|
|
|
343
323
|
Trie is now active via git hooks (pre-commit, pre-push).
|
|
344
324
|
For real-time nudges while coding, run "trie watch" in a terminal.
|
|
@@ -1220,9 +1200,9 @@ For CURSOR (~/.cursor/mcp.json):
|
|
|
1220
1200
|
}
|
|
1221
1201
|
}
|
|
1222
1202
|
|
|
1223
|
-
STEP 4:
|
|
1203
|
+
STEP 4: Get started!
|
|
1224
1204
|
${pc3.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")}
|
|
1225
|
-
Ask your AI assistant: "
|
|
1205
|
+
Ask your AI assistant: "Use trie" for the menu, or "Use trie_fix" for fixes
|
|
1226
1206
|
`);
|
|
1227
1207
|
}
|
|
1228
1208
|
function getCurrentConfig() {
|
|
@@ -1381,8 +1361,8 @@ async function handleAutoFixCommand(args, issues) {
|
|
|
1381
1361
|
const dryRun = args.includes("--dry-run");
|
|
1382
1362
|
const skipConfirm = args.includes("--yes") || args.includes("-y");
|
|
1383
1363
|
if (!issues || issues.length === 0) {
|
|
1384
|
-
console.error(pc4.yellow("No issues provided. Run
|
|
1385
|
-
console.error(pc4.dim(" trie
|
|
1364
|
+
console.error(pc4.yellow("No issues provided. Run trie watch first, or use trie_fix via MCP."));
|
|
1365
|
+
console.error(pc4.dim(" trie watch"));
|
|
1386
1366
|
return;
|
|
1387
1367
|
}
|
|
1388
1368
|
let fixes = detectAutoFixes(issues);
|
|
@@ -2216,35 +2196,11 @@ async function handleAuditCommand(args) {
|
|
|
2216
2196
|
const logs = await getRecentAuditLogs(limit);
|
|
2217
2197
|
if (logs.length === 0) {
|
|
2218
2198
|
console.log("\nNo audit logs found.");
|
|
2219
|
-
console.log("Audit logs are created when
|
|
2199
|
+
console.log("Audit logs are created when tools execute commands.\n");
|
|
2220
2200
|
return;
|
|
2221
2201
|
}
|
|
2222
2202
|
console.log(`
|
|
2223
|
-
Recent
|
|
2224
|
-
`);
|
|
2225
|
-
for (const log of logs) {
|
|
2226
|
-
console.log(formatAuditLog(log));
|
|
2227
|
-
console.log("");
|
|
2228
|
-
}
|
|
2229
|
-
break;
|
|
2230
|
-
}
|
|
2231
|
-
case "skill": {
|
|
2232
|
-
if (!rest[0]) {
|
|
2233
|
-
console.log("Usage: trie audit skill <skill-name>");
|
|
2234
|
-
console.log("");
|
|
2235
|
-
console.log("View audit logs for a specific skill.");
|
|
2236
|
-
return;
|
|
2237
|
-
}
|
|
2238
|
-
const skillName = rest[0];
|
|
2239
|
-
const logs = await getSkillAuditLogs(skillName);
|
|
2240
|
-
if (logs.length === 0) {
|
|
2241
|
-
console.log(`
|
|
2242
|
-
No audit logs found for skill: ${skillName}
|
|
2243
|
-
`);
|
|
2244
|
-
return;
|
|
2245
|
-
}
|
|
2246
|
-
console.log(`
|
|
2247
|
-
Audit Logs for ${skillName} (${logs.length} executions):
|
|
2203
|
+
Recent Executions (last ${logs.length}):
|
|
2248
2204
|
`);
|
|
2249
2205
|
for (const log of logs) {
|
|
2250
2206
|
console.log(formatAuditLog(log));
|
|
@@ -2260,7 +2216,7 @@ Audit Logs for ${skillName} (${logs.length} executions):
|
|
|
2260
2216
|
console.log(` \u2705 Successful: ${stats.successfulExecutions}`);
|
|
2261
2217
|
console.log(` \u274C Failed: ${stats.failedExecutions}`);
|
|
2262
2218
|
console.log("");
|
|
2263
|
-
console.log(`Unique
|
|
2219
|
+
console.log(`Unique tools executed: ${stats.uniqueSkills}`);
|
|
2264
2220
|
console.log("");
|
|
2265
2221
|
console.log(`Commands executed: ${stats.totalCommands}`);
|
|
2266
2222
|
if (stats.blockedCommands > 0) {
|
|
@@ -2282,21 +2238,19 @@ Audit Logs for ${skillName} (${logs.length} executions):
|
|
|
2282
2238
|
console.log(`
|
|
2283
2239
|
Audit - View security audit logs
|
|
2284
2240
|
|
|
2285
|
-
Trie logs
|
|
2286
|
-
|
|
2241
|
+
Trie logs tool operations for security auditing. View what
|
|
2242
|
+
commands were executed and any blocked operations.
|
|
2287
2243
|
|
|
2288
2244
|
Commands:
|
|
2289
2245
|
trie audit logs [count] Show recent audit logs (default: 20)
|
|
2290
|
-
trie audit skill <name> Show logs for a specific skill
|
|
2291
2246
|
trie audit stats Show audit statistics
|
|
2292
2247
|
|
|
2293
2248
|
Examples:
|
|
2294
2249
|
trie audit logs 50 Show last 50 executions
|
|
2295
|
-
trie audit skill security Show all executions of security skill
|
|
2296
2250
|
trie audit stats View overall statistics
|
|
2297
2251
|
|
|
2298
2252
|
Audit logs are stored in .trie/audit/ and include:
|
|
2299
|
-
\u2022
|
|
2253
|
+
\u2022 Tool name and source
|
|
2300
2254
|
\u2022 Commands executed
|
|
2301
2255
|
\u2022 Network calls made
|
|
2302
2256
|
\u2022 Files accessed/modified
|
|
@@ -2914,12 +2868,16 @@ import pc8 from "picocolors";
|
|
|
2914
2868
|
import { Command as Command2 } from "commander";
|
|
2915
2869
|
function createLedgerCommand() {
|
|
2916
2870
|
const ledger = new Command2("ledger").description("Manage and inspect the ledger");
|
|
2917
|
-
ledger.command("verify").description("Verify ledger chain integrity").action(async () => {
|
|
2871
|
+
ledger.command("verify").description("Verify ledger chain integrity and signatures").action(async () => {
|
|
2918
2872
|
try {
|
|
2919
2873
|
console.log("Verifying ledger chain...");
|
|
2874
|
+
console.log(" \u2022 Checking block hashes");
|
|
2875
|
+
console.log(" \u2022 Verifying Merkle roots");
|
|
2876
|
+
console.log(" \u2022 Validating Ed25519 signatures");
|
|
2920
2877
|
const result = await verifyLedger();
|
|
2921
2878
|
if (result.valid) {
|
|
2922
2879
|
console.log(pc8.green("\u2713 Ledger chain is valid"));
|
|
2880
|
+
console.log(pc8.dim(" All blocks, hashes, and signatures verified"));
|
|
2923
2881
|
} else {
|
|
2924
2882
|
console.log(pc8.red(`\u2717 Ledger chain is invalid: ${result.error}`));
|
|
2925
2883
|
process.exit(1);
|
|
@@ -2951,10 +2909,15 @@ function createLedgerCommand() {
|
|
|
2951
2909
|
}
|
|
2952
2910
|
console.log(`Entries: ${block.entries.length}`);
|
|
2953
2911
|
console.log(`Hash: ${pc8.dim(block.blockHash.slice(0, 16))}...`);
|
|
2912
|
+
const signedEntries = block.entries.filter((e) => e.signature);
|
|
2913
|
+
if (signedEntries.length > 0) {
|
|
2914
|
+
console.log(`Signed: ${pc8.green(`${signedEntries.length}/${block.entries.length}`)}`);
|
|
2915
|
+
}
|
|
2954
2916
|
if (block.entries.length > 0) {
|
|
2955
2917
|
console.log("Issues:");
|
|
2956
2918
|
for (const entry of block.entries) {
|
|
2957
|
-
|
|
2919
|
+
const signatureIndicator = entry.signature ? pc8.green("\u2713") : pc8.dim("\u25CB");
|
|
2920
|
+
console.log(` ${signatureIndicator} ${entry.severity} - ${entry.file} (${entry.agent})`);
|
|
2958
2921
|
}
|
|
2959
2922
|
}
|
|
2960
2923
|
console.log("");
|
|
@@ -2983,7 +2946,9 @@ function createLedgerCommand() {
|
|
|
2983
2946
|
if (blocks.length > 0) {
|
|
2984
2947
|
const firstBlock = blocks[0];
|
|
2985
2948
|
const lastBlock = blocks[blocks.length - 1];
|
|
2986
|
-
|
|
2949
|
+
if (firstBlock && lastBlock) {
|
|
2950
|
+
console.log(`Date range: ${pc8.dim(`${firstBlock.date} to ${lastBlock.date}`)}`);
|
|
2951
|
+
}
|
|
2987
2952
|
}
|
|
2988
2953
|
const authorCounts = /* @__PURE__ */ new Map();
|
|
2989
2954
|
for (const block of blocks) {
|
|
@@ -3223,7 +3188,6 @@ USAGE:
|
|
|
3223
3188
|
|
|
3224
3189
|
COMMANDS:
|
|
3225
3190
|
init Initialize Trie in your project
|
|
3226
|
-
scan Scan codebase once and exit
|
|
3227
3191
|
watch Start watching (nudges as you code)
|
|
3228
3192
|
Use screen/tmux to run in background
|
|
3229
3193
|
check Run risk check before pushing
|
|
@@ -3255,7 +3219,6 @@ EXAMPLES:
|
|
|
3255
3219
|
trie init # Initialize Trie in your project
|
|
3256
3220
|
trie watch # Start watching (nudges as you code)
|
|
3257
3221
|
trie watch # Run in background: screen -S trie-watch
|
|
3258
|
-
trie scan # Scan your codebase now
|
|
3259
3222
|
|
|
3260
3223
|
trie tell "users couldn't log in" # Report an incident
|
|
3261
3224
|
trie ok # Mark current pattern as good
|
|
@@ -3275,7 +3238,6 @@ EXAMPLES:
|
|
|
3275
3238
|
|
|
3276
3239
|
MCP TOOLS (use via Cursor/Claude Desktop):
|
|
3277
3240
|
trie_linear_sync Sync active tickets from Linear
|
|
3278
|
-
trie_scan Scan with decision ledger
|
|
3279
3241
|
trie_fix Generate high-confidence fix prompts
|
|
3280
3242
|
trie_explain Explain code, issues, or changes
|
|
3281
3243
|
trie_watch Watch mode for autonomous reporting
|
|
@@ -3303,7 +3265,7 @@ ${pc9.bold("Last Scan:")} ${lastScanDate.toLocaleDateString()} (${daysAgo === 0
|
|
|
3303
3265
|
console.log(pc9.dim(` Issues found: ${state.lastScan.issues.total} (${state.lastScan.issues.critical} critical, ${state.lastScan.issues.serious} serious)`));
|
|
3304
3266
|
} else {
|
|
3305
3267
|
console.log(`
|
|
3306
|
-
${pc9.bold("Last Scan:")} Never ${pc9.dim("(run `trie
|
|
3268
|
+
${pc9.bold("Last Scan:")} Never ${pc9.dim("(run `trie watch` to get started)")}`);
|
|
3307
3269
|
}
|
|
3308
3270
|
console.log(`
|
|
3309
3271
|
${pc9.bold("Memory Stats:")}`);
|
|
@@ -3336,7 +3298,7 @@ ${pc9.yellow("\u2B22 Notice:")} Memory usage high - consider running: ${pc9.bold
|
|
|
3336
3298
|
}
|
|
3337
3299
|
console.log(`
|
|
3338
3300
|
${pc9.bold("Quick Commands:")}`);
|
|
3339
|
-
console.log(pc9.dim(" trie
|
|
3301
|
+
console.log(pc9.dim(" trie watch - Start watching for nudges"));
|
|
3340
3302
|
console.log(pc9.dim(" trie memory stats - Detailed memory statistics"));
|
|
3341
3303
|
console.log(pc9.dim(" trie project - View project information"));
|
|
3342
3304
|
console.log("");
|