@triedotdev/mcp 1.0.80 → 1.0.82
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/README.md +87 -18
- package/dist/{agent-smith-XGYNJUCJ.js → agent-smith-MCKGNWPL.js} +3 -3
- package/dist/{agent-smith-runner-QHYGVRNR.js → agent-smith-runner-GP5HLL7E.js} +3 -3
- package/dist/{chunk-45NUFTNV.js → chunk-7OVM6KEY.js} +29 -2
- package/dist/chunk-7OVM6KEY.js.map +1 -0
- package/dist/chunk-B7CLAOEK.js +532 -0
- package/dist/chunk-B7CLAOEK.js.map +1 -0
- package/dist/{chunk-LKXDJESG.js → chunk-CGALCUZE.js} +8520 -8520
- package/dist/chunk-CGALCUZE.js.map +1 -0
- package/dist/{chunk-Z7N7KDK3.js → chunk-DCJKNE2L.js} +2 -1
- package/dist/{chunk-432E2RYB.js → chunk-IDDEVC3M.js} +112 -543
- package/dist/chunk-IDDEVC3M.js.map +1 -0
- package/dist/{chunk-EWQF6INU.js → chunk-TBRU735C.js} +2 -2
- package/dist/{chunk-KCAWTZ7P.js → chunk-W4SQE6F7.js} +600 -135
- package/dist/chunk-W4SQE6F7.js.map +1 -0
- package/dist/{chunk-D3F7VKCN.js → chunk-YHQYOD6M.js} +300 -440
- package/dist/chunk-YHQYOD6M.js.map +1 -0
- package/dist/cli/main.d.ts +15 -0
- package/dist/cli/main.js +252 -62
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +8 -7
- package/dist/cli/yolo-daemon.js.map +1 -1
- package/dist/{guardian-agent-UPLAQWJK.js → guardian-agent-GWYDNLWC.js} +7 -3
- package/dist/index.js +83 -16
- package/dist/index.js.map +1 -1
- package/dist/workers/agent-worker.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-432E2RYB.js.map +0 -1
- package/dist/chunk-45NUFTNV.js.map +0 -1
- package/dist/chunk-D3F7VKCN.js.map +0 -1
- package/dist/chunk-KCAWTZ7P.js.map +0 -1
- package/dist/chunk-LKXDJESG.js.map +0 -1
- /package/dist/{agent-smith-XGYNJUCJ.js.map → agent-smith-MCKGNWPL.js.map} +0 -0
- /package/dist/{agent-smith-runner-QHYGVRNR.js.map → agent-smith-runner-GP5HLL7E.js.map} +0 -0
- /package/dist/{chunk-Z7N7KDK3.js.map → chunk-DCJKNE2L.js.map} +0 -0
- /package/dist/{chunk-EWQF6INU.js.map → chunk-TBRU735C.js.map} +0 -0
- /package/dist/{guardian-agent-UPLAQWJK.js.map → guardian-agent-GWYDNLWC.js.map} +0 -0
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
- **Sets and tracks goals**: "Reduce login bugs by 50%" then actually measures progress and celebrates wins
|
|
11
11
|
- **Tests your theories**: "Mondays have more bugs" — Trie validates with real data and builds confidence over time
|
|
12
12
|
- **Learns from your incidents**: Train it on your specific patterns, not generic rules that don't fit your prompting
|
|
13
|
+
- **Predicts "Gotchas" proactively**: Ingests Linear tickets and correlates them with past failures to warn you before you even push code
|
|
13
14
|
|
|
14
15
|
## Goal
|
|
15
16
|
|
|
@@ -49,15 +50,15 @@ trie status
|
|
|
49
50
|
When bugs happen, tell Trie about them:
|
|
50
51
|
|
|
51
52
|
```bash
|
|
52
|
-
# Report
|
|
53
|
-
trie tell "Users can't log in after
|
|
53
|
+
# Report a specific incident
|
|
54
|
+
trie tell "Users can't log in after password reset"
|
|
54
55
|
|
|
55
|
-
#
|
|
56
|
-
trie
|
|
56
|
+
# Train Trie from your history (reverts/bugfixes)
|
|
57
|
+
trie learn
|
|
57
58
|
|
|
58
|
-
# Give feedback on
|
|
59
|
-
trie ok #
|
|
60
|
-
trie bad #
|
|
59
|
+
# Give feedback on patterns (staged files)
|
|
60
|
+
trie ok # Pattern is good
|
|
61
|
+
trie bad # Pattern is bad
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
## Why Trie Exists
|
|
@@ -172,6 +173,42 @@ trie watch
|
|
|
172
173
|
|
|
173
174
|
Interactive panels for goals, memory, scout activity, and more.
|
|
174
175
|
|
|
176
|
+
**Running in Background:**
|
|
177
|
+
To keep `trie watch` running in the background, use `screen` or `tmux`:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Using screen
|
|
181
|
+
screen -S trie-watch
|
|
182
|
+
trie watch
|
|
183
|
+
# Press Ctrl+A then D to detach
|
|
184
|
+
# Reattach with: screen -r trie-watch
|
|
185
|
+
|
|
186
|
+
# Using tmux
|
|
187
|
+
tmux new -s trie-watch
|
|
188
|
+
trie watch
|
|
189
|
+
# Press Ctrl+B then D to detach
|
|
190
|
+
# Reattach with: tmux attach -t trie-watch
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
This allows you to keep the guardian running while using other terminals. The interactive dashboard will be available when you reattach.
|
|
194
|
+
|
|
195
|
+
### JIT Defect Prediction ("Gotchas")
|
|
196
|
+
Trie connects to your issue tracker and project history to predict problems *while you work*:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# 1. Connect Linear
|
|
200
|
+
trie linear auth <your-api-key>
|
|
201
|
+
trie linear sync
|
|
202
|
+
|
|
203
|
+
# 2. Learn from history automatically
|
|
204
|
+
trie learn
|
|
205
|
+
|
|
206
|
+
# 3. Predict for current changes
|
|
207
|
+
trie gotcha
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Trie will warn you if your current task correlates with historical regressions or high-risk signatures.
|
|
211
|
+
|
|
175
212
|
### Integration with AI Coding Tools
|
|
176
213
|
|
|
177
214
|
Trie provides MCP (Model Context Protocol) tools for seamless integration with Claude, Cursor, and other AI assistants:
|
|
@@ -237,17 +274,41 @@ trie init
|
|
|
237
274
|
```
|
|
238
275
|
|
|
239
276
|
### API Key Configuration
|
|
240
|
-
|
|
277
|
+
Trie works best with these keys:
|
|
278
|
+
|
|
279
|
+
1. **ANTHROPIC_API_KEY**: Enables AI-powered analysis and explanations.
|
|
280
|
+
2. **LINEAR_API_KEY**: Enables JIT defect prediction by syncing your active tickets.
|
|
281
|
+
|
|
282
|
+
#### 1. Set via Environment (Recommended for MCP)
|
|
283
|
+
Add these to your `.env` file or shell config:
|
|
241
284
|
|
|
242
285
|
```bash
|
|
243
|
-
|
|
244
|
-
|
|
286
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
287
|
+
export LINEAR_API_KEY=lin_api_...
|
|
288
|
+
```
|
|
245
289
|
|
|
246
|
-
|
|
247
|
-
|
|
290
|
+
#### 2. Set via CLI (Persistent per project)
|
|
291
|
+
```bash
|
|
292
|
+
trie linear auth <your-key>
|
|
248
293
|
```
|
|
249
294
|
|
|
250
|
-
|
|
295
|
+
#### 3. Set in MCP Config (Cursor/Claude Code)
|
|
296
|
+
Add to your MCP server configuration:
|
|
297
|
+
|
|
298
|
+
```json
|
|
299
|
+
{
|
|
300
|
+
"mcpServers": {
|
|
301
|
+
"trie": {
|
|
302
|
+
"command": "npx",
|
|
303
|
+
"args": ["-y", "@triedotdev/mcp"],
|
|
304
|
+
"env": {
|
|
305
|
+
"ANTHROPIC_API_KEY": "your-key",
|
|
306
|
+
"LINEAR_API_KEY": "your-key"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
```
|
|
251
312
|
|
|
252
313
|
### AI Tool Integration
|
|
253
314
|
|
|
@@ -260,7 +321,8 @@ Add to your MCP settings:
|
|
|
260
321
|
"command": "trie",
|
|
261
322
|
"args": ["mcp"],
|
|
262
323
|
"env": {
|
|
263
|
-
"ANTHROPIC_API_KEY": "your-api-key-here"
|
|
324
|
+
"ANTHROPIC_API_KEY": "your-api-key-here",
|
|
325
|
+
"LINEAR_API_KEY": "your-key"
|
|
264
326
|
}
|
|
265
327
|
}
|
|
266
328
|
}
|
|
@@ -279,8 +341,8 @@ Cursor has built-in MCP support. Add the above configuration to your Cursor MCP
|
|
|
279
341
|
trie init # Set up Trie in your project
|
|
280
342
|
trie scan # Analyze codebase with intelligent skill selection
|
|
281
343
|
trie status # View project health and memory stats
|
|
282
|
-
trie
|
|
283
|
-
trie
|
|
344
|
+
trie learn # Train Trie from history or feedback
|
|
345
|
+
trie gotcha # Predict problems with current changes
|
|
284
346
|
```
|
|
285
347
|
|
|
286
348
|
### Memory Management
|
|
@@ -288,6 +350,7 @@ trie tell "<msg>" # Report an incident to build memory
|
|
|
288
350
|
trie memory search "auth" # Search incident history
|
|
289
351
|
trie memory stats # View memory statistics
|
|
290
352
|
trie memory purge smart # Clean up old/resolved issues
|
|
353
|
+
trie learn # Extract patterns from reverts/fixes
|
|
291
354
|
```
|
|
292
355
|
|
|
293
356
|
### Goals & Learning
|
|
@@ -295,18 +358,24 @@ trie memory purge smart # Clean up old/resolved issues
|
|
|
295
358
|
trie goal add "<goal>" # Set improvement goal
|
|
296
359
|
trie hypothesis add "<theory>" # Test a hypothesis
|
|
297
360
|
trie goal list # View progress
|
|
361
|
+
trie linear sync # Sync Linear tickets for intent context
|
|
298
362
|
```
|
|
299
363
|
|
|
300
364
|
### Feedback & Training
|
|
301
365
|
```bash
|
|
302
|
-
trie ok #
|
|
303
|
-
trie bad #
|
|
366
|
+
trie ok # Pattern is good (alias: learn ok)
|
|
367
|
+
trie bad # Pattern is bad (alias: learn bad)
|
|
368
|
+
trie learn # Learn from your git history
|
|
304
369
|
trie pause # Disable warnings for 1 hour
|
|
305
370
|
```
|
|
306
371
|
|
|
307
372
|
### Watch Mode
|
|
308
373
|
```bash
|
|
309
374
|
trie watch # Start interactive monitoring dashboard
|
|
375
|
+
|
|
376
|
+
# Run in background with screen/tmux:
|
|
377
|
+
screen -S trie-watch && trie watch # Detach: Ctrl+A, D
|
|
378
|
+
tmux new -s trie-watch && trie watch # Detach: Ctrl+B, D
|
|
310
379
|
```
|
|
311
380
|
|
|
312
381
|
## Configuration
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSmithSkill,
|
|
3
3
|
PATTERN_HUNTER_CONFIGS
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-TBRU735C.js";
|
|
5
|
+
import "./chunk-DCJKNE2L.js";
|
|
6
6
|
import "./chunk-CM7EHNQK.js";
|
|
7
7
|
import "./chunk-MIL54SAF.js";
|
|
8
8
|
import "./chunk-DGUM43GV.js";
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
AgentSmithSkill,
|
|
12
12
|
PATTERN_HUNTER_CONFIGS
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=agent-smith-
|
|
14
|
+
//# sourceMappingURL=agent-smith-MCKGNWPL.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSmithSkill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TBRU735C.js";
|
|
4
4
|
import {
|
|
5
5
|
getAIStatusMessage,
|
|
6
6
|
isAIAvailable,
|
|
7
7
|
runAIAnalysis
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DCJKNE2L.js";
|
|
9
9
|
import {
|
|
10
10
|
getWorkingDirectory
|
|
11
11
|
} from "./chunk-CM7EHNQK.js";
|
|
@@ -570,4 +570,4 @@ ${getAIStatusMessage()}`);
|
|
|
570
570
|
export {
|
|
571
571
|
runAgentSmith
|
|
572
572
|
};
|
|
573
|
-
//# sourceMappingURL=agent-smith-runner-
|
|
573
|
+
//# sourceMappingURL=agent-smith-runner-GP5HLL7E.js.map
|
|
@@ -2,6 +2,10 @@ import {
|
|
|
2
2
|
getGoalManager,
|
|
3
3
|
getInsightStore
|
|
4
4
|
} from "./chunk-U5P3O5G5.js";
|
|
5
|
+
import {
|
|
6
|
+
ContextGraph,
|
|
7
|
+
GotchaPredictor
|
|
8
|
+
} from "./chunk-B7CLAOEK.js";
|
|
5
9
|
import {
|
|
6
10
|
getGuardianState
|
|
7
11
|
} from "./chunk-75J4HQTD.js";
|
|
@@ -12,7 +16,7 @@ import {
|
|
|
12
16
|
import {
|
|
13
17
|
isAIAvailable,
|
|
14
18
|
runAIAnalysis
|
|
15
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-DCJKNE2L.js";
|
|
16
20
|
import {
|
|
17
21
|
getHistoricalInsights,
|
|
18
22
|
searchIssues,
|
|
@@ -1970,6 +1974,7 @@ var GuardianAgent = class {
|
|
|
1970
1974
|
hypothesisEngine;
|
|
1971
1975
|
escalationManager;
|
|
1972
1976
|
metaLearner;
|
|
1977
|
+
gotchaPredictor;
|
|
1973
1978
|
constructor(projectPath) {
|
|
1974
1979
|
this.projectPath = projectPath;
|
|
1975
1980
|
this.projectName = basename2(projectPath);
|
|
@@ -1980,6 +1985,7 @@ var GuardianAgent = class {
|
|
|
1980
1985
|
this.hypothesisEngine = getHypothesisEngine(projectPath);
|
|
1981
1986
|
this.escalationManager = getEscalationManager(projectPath);
|
|
1982
1987
|
this.metaLearner = getMetaLearner(projectPath);
|
|
1988
|
+
this.gotchaPredictor = new GotchaPredictor(projectPath, new ContextGraph(projectPath));
|
|
1983
1989
|
}
|
|
1984
1990
|
/**
|
|
1985
1991
|
* Initialize the Guardian - loads persistent state and historical data
|
|
@@ -2271,6 +2277,27 @@ var GuardianAgent = class {
|
|
|
2271
2277
|
await this.markInsightCreated("risk-prediction");
|
|
2272
2278
|
}
|
|
2273
2279
|
}
|
|
2280
|
+
const gotchas = await this.gotchaPredictor.predictGotchas(context.filesChanged);
|
|
2281
|
+
for (const gotcha of gotchas) {
|
|
2282
|
+
if (this.canCreateInsight(`gotcha-${gotcha.id}`)) {
|
|
2283
|
+
const explanation = await this.gotchaPredictor.synthesizeGotchaExplanation(gotcha);
|
|
2284
|
+
const insight = this.createInsight({
|
|
2285
|
+
type: "warning",
|
|
2286
|
+
message: `[Gotcha] ${gotcha.message}`,
|
|
2287
|
+
context: explanation,
|
|
2288
|
+
suggestedAction: gotcha.recommendation,
|
|
2289
|
+
priority: gotcha.riskLevel === "critical" ? 9 : 7,
|
|
2290
|
+
category: "quality",
|
|
2291
|
+
details: {
|
|
2292
|
+
affectedFiles: context.filesChanged.map((f) => basename2(f)),
|
|
2293
|
+
examples: [gotcha.message, explanation]
|
|
2294
|
+
}
|
|
2295
|
+
});
|
|
2296
|
+
newInsights.push(insight);
|
|
2297
|
+
await this.addInsight(insight);
|
|
2298
|
+
await this.markInsightCreated(`gotcha-${gotcha.id}`);
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2274
2301
|
} catch {
|
|
2275
2302
|
}
|
|
2276
2303
|
}
|
|
@@ -2563,4 +2590,4 @@ export {
|
|
|
2563
2590
|
GuardianAgent,
|
|
2564
2591
|
getGuardian
|
|
2565
2592
|
};
|
|
2566
|
-
//# sourceMappingURL=chunk-
|
|
2593
|
+
//# sourceMappingURL=chunk-7OVM6KEY.js.map
|