@triedotdev/mcp 1.0.94 → 1.0.99
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 +145 -137
- package/dist/{chunk-JAAIHNOE.js → chunk-APMV77PU.js} +21 -6
- package/dist/chunk-APMV77PU.js.map +1 -0
- package/dist/{chunk-HLSBTOVE.js → chunk-B3MNN3XB.js} +13 -18
- package/dist/{chunk-HLSBTOVE.js.map → chunk-B3MNN3XB.js.map} +1 -1
- package/dist/{chunk-IIF5XDCJ.js → chunk-DIZFGLXE.js} +787 -4696
- package/dist/chunk-DIZFGLXE.js.map +1 -0
- package/dist/{chunk-JO6RVXS6.js → chunk-F4NJ4CBP.js} +2 -2
- package/dist/{chunk-AZRCKBGF.js → chunk-FNCCZ3XB.js} +1222 -75
- package/dist/chunk-FNCCZ3XB.js.map +1 -0
- package/dist/chunk-G76DYVGX.js +136 -0
- package/dist/chunk-G76DYVGX.js.map +1 -0
- package/dist/chunk-HSNE46VE.js +956 -0
- package/dist/chunk-HSNE46VE.js.map +1 -0
- package/dist/{chunk-STEFLYPR.js → chunk-IXO4G4D3.js} +2 -2
- package/dist/{chunk-OEYIOOYB.js → chunk-JDHR5BDR.js} +2 -3
- package/dist/chunk-NIASHOAB.js +1304 -0
- package/dist/chunk-NIASHOAB.js.map +1 -0
- package/dist/{chunk-CKM6A3G6.js → chunk-OVRG5RP3.js} +6 -7
- package/dist/chunk-OVRG5RP3.js.map +1 -0
- package/dist/{chunk-RYRVEO2B.js → chunk-R3I2GCZC.js} +3 -3
- package/dist/{chunk-WT3XQCG2.js → chunk-R4AAPFXC.js} +2 -2
- package/dist/cli/create-agent.js +931 -7
- package/dist/cli/create-agent.js.map +1 -1
- package/dist/cli/main.js +151 -383
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +13 -20
- package/dist/cli/yolo-daemon.js.map +1 -1
- package/dist/{goal-manager-HOZ7R2QV.js → goal-manager-LAOT4QQX.js} +6 -6
- package/dist/guardian-agent-M352CBE5.js +19 -0
- package/dist/index.js +1025 -1550
- package/dist/index.js.map +1 -1
- package/dist/{issue-store-DXIOP6AK.js → issue-store-W2X33X2X.js} +4 -4
- package/dist/{progress-LHI66U7B.js → progress-PQVEM7BR.js} +2 -2
- package/dist/{vibe-code-signatures-C5A4BHXD.js → vibe-code-signatures-ELEWJFGZ.js} +3 -3
- package/dist/{vulnerability-signatures-SVIHJQO5.js → vulnerability-signatures-EIJQX2TS.js} +3 -3
- package/dist/workers/agent-worker.js +2 -11
- package/dist/workers/agent-worker.js.map +1 -1
- package/package.json +2 -2
- package/dist/agent-smith-MYQ35URL.js +0 -14
- package/dist/agent-smith-runner-4TBONXCP.js +0 -573
- package/dist/agent-smith-runner-4TBONXCP.js.map +0 -1
- package/dist/cache-manager-RMPRPD5T.js +0 -10
- package/dist/chunk-AZRCKBGF.js.map +0 -1
- package/dist/chunk-CKM6A3G6.js.map +0 -1
- package/dist/chunk-E2ZATINO.js +0 -10879
- package/dist/chunk-E2ZATINO.js.map +0 -1
- package/dist/chunk-FFWNZUG2.js +0 -266
- package/dist/chunk-FFWNZUG2.js.map +0 -1
- package/dist/chunk-FK6DQKDY.js +0 -175
- package/dist/chunk-FK6DQKDY.js.map +0 -1
- package/dist/chunk-IFGF33R5.js +0 -279
- package/dist/chunk-IFGF33R5.js.map +0 -1
- package/dist/chunk-IIF5XDCJ.js.map +0 -1
- package/dist/chunk-JAAIHNOE.js.map +0 -1
- package/dist/chunk-ODWDESYP.js +0 -141
- package/dist/chunk-ODWDESYP.js.map +0 -1
- package/dist/chunk-OWBWNXSC.js +0 -955
- package/dist/chunk-OWBWNXSC.js.map +0 -1
- package/dist/chunk-Q764X2WD.js +0 -2124
- package/dist/chunk-Q764X2WD.js.map +0 -1
- package/dist/chunk-RE6ZWXJC.js +0 -279
- package/dist/chunk-RE6ZWXJC.js.map +0 -1
- package/dist/chunk-RNJ6JKMA.js +0 -2270
- package/dist/chunk-RNJ6JKMA.js.map +0 -1
- package/dist/chunk-Y62VM3ER.js +0 -536
- package/dist/chunk-Y62VM3ER.js.map +0 -1
- package/dist/git-45LZUUYA.js +0 -29
- package/dist/guardian-agent-RB2UQP5V.js +0 -21
- package/dist/progress-LHI66U7B.js.map +0 -1
- package/dist/vibe-code-signatures-C5A4BHXD.js.map +0 -1
- package/dist/vulnerability-signatures-SVIHJQO5.js.map +0 -1
- /package/dist/{chunk-JO6RVXS6.js.map → chunk-F4NJ4CBP.js.map} +0 -0
- /package/dist/{chunk-STEFLYPR.js.map → chunk-IXO4G4D3.js.map} +0 -0
- /package/dist/{chunk-OEYIOOYB.js.map → chunk-JDHR5BDR.js.map} +0 -0
- /package/dist/{chunk-RYRVEO2B.js.map → chunk-R3I2GCZC.js.map} +0 -0
- /package/dist/{chunk-WT3XQCG2.js.map → chunk-R4AAPFXC.js.map} +0 -0
- /package/dist/{agent-smith-MYQ35URL.js.map → goal-manager-LAOT4QQX.js.map} +0 -0
- /package/dist/{cache-manager-RMPRPD5T.js.map → guardian-agent-M352CBE5.js.map} +0 -0
- /package/dist/{git-45LZUUYA.js.map → issue-store-W2X33X2X.js.map} +0 -0
- /package/dist/{goal-manager-HOZ7R2QV.js.map → progress-PQVEM7BR.js.map} +0 -0
- /package/dist/{guardian-agent-RB2UQP5V.js.map → vibe-code-signatures-ELEWJFGZ.js.map} +0 -0
- /package/dist/{issue-store-DXIOP6AK.js.map → vulnerability-signatures-EIJQX2TS.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,26 +1,41 @@
|
|
|
1
|
-
# Trie: Trainable AI Agent for
|
|
1
|
+
# Trie: Trainable AI Agent for AI-Generated Codebases
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Your autonomous agent that learns from every incident, extracts decisions from every change, and predicts problems before they happen.**
|
|
4
4
|
|
|
5
5
|
[](https://www.trie.dev) [](https://x.com/louiskishfy)
|
|
6
6
|
|
|
7
7
|
## What Trie Does
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
9
|
+
Trie is an **autonomous, trainable AI agent** that maintains a decision ledger for your codebase:
|
|
10
|
+
|
|
11
|
+
- **🤖 Autonomous Operation**: Run `trie watch` and the agent monitors your codebase 24/7
|
|
12
|
+
- **🧠 Intelligent Extraction**: Automatically extracts decisions, facts, blockers from every change
|
|
13
|
+
- **📊 Decision Ledger**: Builds institutional knowledge that travels from Cursor → CLI → CI/CD
|
|
14
|
+
- **🎯 Predictive Intelligence**: `trie gotcha` queries the ledger to predict problems before they happen
|
|
15
|
+
- **📈 Continuous Learning**: Feed it incidents with `trie tell`, teach it patterns with your history
|
|
16
|
+
|
|
17
|
+
The agent learns from every incident, decision, and fix. When you ship, Trie remembers. When something breaks, Trie learns. Over time, your agent gets better at predicting what will go wrong before it does.
|
|
14
18
|
|
|
15
19
|
## Goal
|
|
16
20
|
|
|
17
|
-
Trie
|
|
21
|
+
**Trie is your personal AI agent that maintains multiple codebases without losing context.**
|
|
22
|
+
|
|
23
|
+
Every bug you fix teaches the agent a pattern that protects all your projects. Every incident you report becomes institutional knowledge that travels with your code. Every decision you make—and the tradeoffs you considered—gets extracted and stored automatically by the agent.
|
|
24
|
+
|
|
25
|
+
Instead of burning tokens on the same questions across different repos or forgetting why you architected something a certain way six months ago, **your agent remembers for you**. Instead of losing track of edge cases and tradeoffs as you switch between tools, **your agent maintains system coherence**.
|
|
26
|
+
|
|
27
|
+
The result is faster development with fewer production fires, because **your agent gets smarter every time something breaks** instead of starting from zero in every conversation.
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
### How the Agent Works
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
1. **`trie watch`** - Start the agent, it monitors your codebase autonomously
|
|
32
|
+
2. **Agent Extracts** - Every file change → extract decisions, facts, blockers
|
|
33
|
+
3. **Agent Stores** - Builds decision ledger with rich metadata and tag expansion
|
|
34
|
+
4. **`trie gotcha`** - Agent queries ledger to predict problems in your current changes
|
|
35
|
+
5. **`trie tell`** - Feed agent incidents to improve its predictions
|
|
36
|
+
6. **Agent Learns** - Gets better at predicting what matters in YOUR codebase
|
|
22
37
|
|
|
23
|
-
**Your thinking and planning keep up with code generation. Your decisions persist across tools. Your edge cases don't get forgotten.**
|
|
38
|
+
**Your thinking and planning keep up with code generation. Your decisions persist across tools. Your edge cases don't get forgotten. Your agent handles it all.**
|
|
24
39
|
|
|
25
40
|
## Quick Start
|
|
26
41
|
|
|
@@ -37,30 +52,49 @@ cd your-project
|
|
|
37
52
|
trie init
|
|
38
53
|
```
|
|
39
54
|
|
|
40
|
-
### 2.
|
|
55
|
+
### 2. Start the Agent
|
|
56
|
+
|
|
57
|
+
The agent runs autonomously, watching your codebase and building the decision ledger:
|
|
41
58
|
|
|
42
59
|
```bash
|
|
43
|
-
#
|
|
44
|
-
trie
|
|
60
|
+
# Start the autonomous agent
|
|
61
|
+
trie watch
|
|
45
62
|
|
|
46
|
-
#
|
|
47
|
-
|
|
63
|
+
# The agent now:
|
|
64
|
+
# - Watches file changes in real-time
|
|
65
|
+
# - Extracts decisions, facts, blockers from every change
|
|
66
|
+
# - Builds decision ledger automatically
|
|
67
|
+
# - Predicts problems based on historical patterns
|
|
48
68
|
```
|
|
49
69
|
|
|
50
|
-
### 3.
|
|
70
|
+
### 3. Teach the Agent
|
|
51
71
|
|
|
52
|
-
When bugs happen,
|
|
72
|
+
When bugs happen, teach the agent:
|
|
53
73
|
|
|
54
74
|
```bash
|
|
55
|
-
# Report a specific incident
|
|
56
|
-
trie tell "Users can't log in after password reset"
|
|
75
|
+
# Report a specific incident (agent extracts structured signals)
|
|
76
|
+
trie tell "Users can't log in after password reset - bcrypt config was wrong"
|
|
57
77
|
|
|
58
|
-
# Train
|
|
78
|
+
# Train agent from your git history (reverts/bugfixes)
|
|
59
79
|
trie learn
|
|
60
80
|
|
|
61
|
-
#
|
|
62
|
-
trie
|
|
63
|
-
|
|
81
|
+
# Query what the agent knows
|
|
82
|
+
trie gotcha # Predicts problems in your current changes
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 4. Let the Agent Work
|
|
86
|
+
|
|
87
|
+
The agent learns continuously:
|
|
88
|
+
- Every commit → Extracts decisions
|
|
89
|
+
- Every incident → Learns patterns
|
|
90
|
+
- Every fix → Updates predictions
|
|
91
|
+
- Every change → Queries ledger for "gotchas"
|
|
92
|
+
|
|
93
|
+
**Set `ANTHROPIC_API_KEY` for full signal extraction** (Claude Haiku for fast, cheap extraction)
|
|
94
|
+
|
|
95
|
+
# Give feedback on predictions
|
|
96
|
+
trie ok # Prediction was helpful
|
|
97
|
+
trie bad # Prediction was wrong
|
|
64
98
|
```
|
|
65
99
|
|
|
66
100
|
## Why Trie Exists
|
|
@@ -85,8 +119,6 @@ Trie remembers your decisions across tools, tracks the tradeoffs you've made, an
|
|
|
85
119
|
|
|
86
120
|
### Intelligent Analysis
|
|
87
121
|
|
|
88
|
-
- 26 built-in scouts - Automated analyzers for security, performance, accessibility, and more.
|
|
89
|
-
- Custom skills - Add external analyzers from the community.
|
|
90
122
|
- Risk scoring - Intelligent priority ranking based on your actual incident history.
|
|
91
123
|
- Edge case detection - Identifies recurring issues and patterns you've hit before.
|
|
92
124
|
- System coherence - Tracks relationships between files, changes, incidents, fixes, and decisions.
|
|
@@ -109,8 +141,8 @@ Trie remembers your decisions across tools, tracks the tradeoffs you've made, an
|
|
|
109
141
|
|
|
110
142
|
Trie uses a "Guardian Agent" architecture:
|
|
111
143
|
|
|
112
|
-
-
|
|
113
|
-
- Guardian
|
|
144
|
+
- Analyzes your code for potential issues based on your incident history.
|
|
145
|
+
- Guardian decides what matters based on your history.
|
|
114
146
|
- Memory Tree stores incident patterns using a trie data structure for fast lookups.
|
|
115
147
|
- Learning Loop improves predictions based on your feedback.
|
|
116
148
|
|
|
@@ -119,10 +151,13 @@ Trie uses a "Guardian Agent" architecture:
|
|
|
119
151
|
```
|
|
120
152
|
your-project/
|
|
121
153
|
├── .trie/
|
|
154
|
+
│ ├── hot/ # In-memory current session
|
|
155
|
+
│ ├── warm/ # Queryable decisions DB
|
|
156
|
+
│ │ └── decisions.db # SQLite database
|
|
157
|
+
│ ├── cold/ # Archived history
|
|
122
158
|
│ ├── memory/ # Incident history
|
|
123
159
|
│ ├── patterns/ # Learned patterns
|
|
124
160
|
│ ├── context.json # Project knowledge graph
|
|
125
|
-
│ ├── context.db # SQLite graph (decisions, relationships)
|
|
126
161
|
│ └── config.json # Settings
|
|
127
162
|
├── src/
|
|
128
163
|
└── .git/
|
|
@@ -146,6 +181,61 @@ Relationship tracking - Files ↔ Changes ↔ Incidents ↔ Fixes ↔ Decisions
|
|
|
146
181
|
|
|
147
182
|
When you switch from Cursor to Claude Code to terminal, Trie remembers. Your thinking and planning keep up with code generation because every tool shares the same memory.
|
|
148
183
|
|
|
184
|
+
### Signal Extraction: Context Without Pollution
|
|
185
|
+
|
|
186
|
+
**The Problem**: Agents drown in raw data. Dumping 10,000 lines of logs, 500 Slack messages, and 200 commits into context is expensive and ineffective.
|
|
187
|
+
|
|
188
|
+
**Trie's Solution**: Extract signal, not noise.
|
|
189
|
+
|
|
190
|
+
#### Three-Tier Architecture
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
HOT (In-Memory)
|
|
194
|
+
└─ Current session data
|
|
195
|
+
└─ Active decisions being worked on
|
|
196
|
+
|
|
197
|
+
WARM (Queryable DB)
|
|
198
|
+
└─ Recent decisions, facts, blockers
|
|
199
|
+
└─ Agents query what they need: "decisions related to auth in last 30 days"
|
|
200
|
+
└─ Fast retrieval, targeted results
|
|
201
|
+
|
|
202
|
+
COLD (Archived)
|
|
203
|
+
└─ Full history, indexed but dormant
|
|
204
|
+
└─ Moves here after 90 days of low access
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
#### How Extraction Works
|
|
208
|
+
|
|
209
|
+
1. **Raw Input** → You report an incident or commit code
|
|
210
|
+
2. **Extraction** → Cheap model (Haiku) pulls out structured signals:
|
|
211
|
+
- **Decisions**: "Chose bcrypt over sha256 for password hashing"
|
|
212
|
+
- **Facts**: "Stripe requires TLS 1.2+ for EU transactions"
|
|
213
|
+
- **Blockers**: "Missing VAT validation blocks EU checkout"
|
|
214
|
+
- **Questions**: "Should we cache session tokens?"
|
|
215
|
+
|
|
216
|
+
3. **Storage** → Structured data goes to WARM storage with embeddings
|
|
217
|
+
4. **Query** → Agents ask: `trie_get_decisions(relatedTo: "payments")`
|
|
218
|
+
5. **Targeted Context** → Agent gets 5 relevant decisions, not 5,000 raw logs
|
|
219
|
+
|
|
220
|
+
#### MCP Query Tools
|
|
221
|
+
|
|
222
|
+
Agents don't get dumps—they **query** for what they need:
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
// Agent queries decision ledger
|
|
226
|
+
trie_get_decisions({
|
|
227
|
+
relatedTo: "auth/validator.ts",
|
|
228
|
+
since: "30d",
|
|
229
|
+
limit: 5
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
// Returns targeted context:
|
|
233
|
+
// 1. "Always validate email before Stripe checkout" (3 weeks ago)
|
|
234
|
+
// 2. "EU customers need VAT validation" (2 months ago)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Why this matters**: Context management IS the product. Agents get the right information at the right moment, not everything dumped at once.
|
|
238
|
+
|
|
149
239
|
## Core Workflow
|
|
150
240
|
|
|
151
241
|
### 0. Planning Phase
|
|
@@ -242,7 +332,7 @@ Real-time monitoring with visual dashboard:
|
|
|
242
332
|
trie watch
|
|
243
333
|
```
|
|
244
334
|
|
|
245
|
-
Interactive panels for goals, memory,
|
|
335
|
+
Interactive panels for goals, memory, analysis activity, and more.
|
|
246
336
|
|
|
247
337
|
Running in Background: To keep trie watch running in the background, use screen or tmux:
|
|
248
338
|
|
|
@@ -284,40 +374,19 @@ Trie will warn you if your current task correlates with historical regressions o
|
|
|
284
374
|
|
|
285
375
|
Trie provides MCP (Model Context Protocol) tools for seamless integration with Claude, Cursor, and other AI assistants:
|
|
286
376
|
|
|
287
|
-
|
|
377
|
+
**Core Tools:**
|
|
378
|
+
trie_tell - Report incidents and extract structured signals
|
|
288
379
|
trie_check - Quick risk assessment
|
|
289
|
-
trie_tell - Report incidents
|
|
290
380
|
trie_memory - Search incident history
|
|
291
381
|
trie_fix - Apply suggested fixes
|
|
292
382
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
Security Scout - Vulnerabilities, injection risks, secrets
|
|
300
|
-
Privacy Scout - PII handling, GDPR/HIPAA compliance
|
|
301
|
-
Legal Scout - Regulatory compliance patterns
|
|
302
|
-
SOC2 Scout - Access controls, audit trails
|
|
303
|
-
|
|
304
|
-
### Code Quality
|
|
305
|
-
|
|
306
|
-
Bug Scout - Common bugs, edge cases, null safety
|
|
307
|
-
Architecture Scout - SOLID principles, scalability issues
|
|
308
|
-
Types Scout - Type errors, missing annotations
|
|
309
|
-
Clean Scout - AI-generated code cleanup
|
|
383
|
+
**Query Tools (NEW - Signal Extraction):**
|
|
384
|
+
trie_get_decisions - Query decisions with filters (tags, time, file)
|
|
385
|
+
trie_get_blockers - Get active blockers only
|
|
386
|
+
trie_get_related_decisions - Find related context
|
|
387
|
+
trie_query_context - Natural language queries across all signal types
|
|
310
388
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
Accessibility Scout - WCAG compliance, screen readers
|
|
314
|
-
UX Scout - User journey analysis, usability issues
|
|
315
|
-
Design Scout - Visual consistency, design systems
|
|
316
|
-
|
|
317
|
-
### Operations
|
|
318
|
-
|
|
319
|
-
DevOps Scout - Configuration issues, deployment patterns
|
|
320
|
-
Performance Scout - Speed bottlenecks, optimization opportunities
|
|
389
|
+
**Why query tools matter**: Instead of dumping everything into context, agents ask for exactly what they need. This prevents context pollution and keeps agents focused on relevant signal.
|
|
321
390
|
|
|
322
391
|
## Installation & Setup
|
|
323
392
|
|
|
@@ -419,7 +488,7 @@ Note: VS Code extension is coming soon.
|
|
|
419
488
|
|
|
420
489
|
```bash
|
|
421
490
|
trie init # Set up Trie in your project
|
|
422
|
-
trie
|
|
491
|
+
trie tell # Report incidents (extracts decisions, facts, blockers)
|
|
423
492
|
trie status # View project health and memory stats
|
|
424
493
|
trie learn # Train Trie from history or feedback
|
|
425
494
|
trie gotcha # Predict problems with current changes
|
|
@@ -466,6 +535,8 @@ tmux new -s trie-watch && trie watch # Detach: Ctrl+B, D
|
|
|
466
535
|
|
|
467
536
|
### Scan Behavior
|
|
468
537
|
|
|
538
|
+
> **Note**: Trie no longer uses traditional "scans". Instead, it extracts structured signals from incidents, commits, and conversations. Configuration below is for legacy compatibility.
|
|
539
|
+
|
|
469
540
|
Create .trie/config.json:
|
|
470
541
|
|
|
471
542
|
```json
|
|
@@ -524,11 +595,11 @@ Trie sends notifications to Slack for team collaboration:
|
|
|
524
595
|
```
|
|
525
596
|
|
|
526
597
|
**What Trie sends to Slack:**
|
|
527
|
-
-
|
|
528
|
-
-
|
|
598
|
+
- Decision extractions from incidents
|
|
599
|
+
- Active blockers
|
|
600
|
+
- Risk predictions from gotcha
|
|
529
601
|
- Daily/weekly team summaries
|
|
530
|
-
-
|
|
531
|
-
- Bulk fix notifications
|
|
602
|
+
- Critical decision changes
|
|
532
603
|
|
|
533
604
|
## CI/CD Integration
|
|
534
605
|
|
|
@@ -539,9 +610,9 @@ Trie sends notifications to Slack for team collaboration:
|
|
|
539
610
|
trie ci github
|
|
540
611
|
|
|
541
612
|
# Creates .github/workflows/trie.yml with:
|
|
542
|
-
# -
|
|
613
|
+
# - Decision ledger queries
|
|
543
614
|
# - Memory caching for speed
|
|
544
|
-
# -
|
|
615
|
+
# - Risk prediction on PRs
|
|
545
616
|
```
|
|
546
617
|
|
|
547
618
|
### Custom CI
|
|
@@ -549,7 +620,10 @@ trie ci github
|
|
|
549
620
|
```bash
|
|
550
621
|
# In your CI pipeline
|
|
551
622
|
npm install -g trie
|
|
552
|
-
|
|
623
|
+
# Query decision ledger for risks
|
|
624
|
+
trie gotcha
|
|
625
|
+
# Check memory for related incidents
|
|
626
|
+
trie memory search "deployment"
|
|
553
627
|
```
|
|
554
628
|
|
|
555
629
|
## Memory System
|
|
@@ -567,7 +641,6 @@ Performance over time
|
|
|
567
641
|
Global patterns stored in ~/.trie/memory/:
|
|
568
642
|
|
|
569
643
|
Patterns that apply across projects
|
|
570
|
-
Skill effectiveness data
|
|
571
644
|
Your personal coding patterns
|
|
572
645
|
|
|
573
646
|
### Memory Management
|
|
@@ -588,82 +661,17 @@ trie memory purge old --days=90
|
|
|
588
661
|
|
|
589
662
|
What happens at the 10,000 issue cap: Trie will deduplicate new repeats, compact older issues into summaries, and if it still exceeds the cap it will prune the oldest/lowest-value issues (it does not “overwrite” in place).
|
|
590
663
|
|
|
591
|
-
## Custom Skills
|
|
592
|
-
|
|
593
|
-
### Adding External Skills
|
|
594
|
-
|
|
595
|
-
```bash
|
|
596
|
-
# From skill repositories
|
|
597
|
-
trie skill install vercel/ai-best-practices
|
|
598
|
-
trie skill install anthropic/typescript-patterns
|
|
599
|
-
|
|
600
|
-
# From any GitHub repo
|
|
601
|
-
trie skill install username/repo-name
|
|
602
|
-
```
|
|
603
|
-
|
|
604
|
-
### Security & Safe Installation
|
|
605
|
-
|
|
606
|
-
Trie automatically scans all skills for security risks before installation.
|
|
607
|
-
|
|
608
|
-
When installing skills:
|
|
609
|
-
|
|
610
|
-
Skills are scanned for malicious patterns
|
|
611
|
-
Critical risks flagged with strong warnings
|
|
612
|
-
High risks flagged with warnings
|
|
613
|
-
Shell commands Trie runs are logged to .trie/audit/ (e.g. skill install git clone, PR review git/gh, skill gating which/where, file picker helpers)
|
|
614
|
-
|
|
615
|
-
```bash
|
|
616
|
-
# View audit logs
|
|
617
|
-
trie audit logs
|
|
618
|
-
|
|
619
|
-
# View security info for installed skill
|
|
620
|
-
trie skills info skill-name
|
|
621
|
-
```
|
|
622
|
-
|
|
623
|
-
Best Practices:
|
|
624
|
-
|
|
625
|
-
Only install from trusted sources (verified organizations)
|
|
626
|
-
Review security warnings and all .md carefully before using
|
|
627
|
-
Check audit logs periodically: trie audit stats (and investigate anything unexpected with trie audit skill <name>)
|
|
628
|
-
|
|
629
|
-
### Creating Your Own Skills
|
|
630
|
-
|
|
631
|
-
```bash
|
|
632
|
-
# Create from documentation
|
|
633
|
-
trie skill create my-skill --doc=./coding-standards.md
|
|
634
|
-
|
|
635
|
-
# This creates a custom analyzer based on your documentation
|
|
636
|
-
```
|
|
637
|
-
|
|
638
|
-
### Skill Format
|
|
639
|
-
|
|
640
|
-
Skills are simple markdown files with detection rules:
|
|
641
|
-
|
|
642
|
-
```markdown
|
|
643
|
-
# My Custom Skill
|
|
644
|
-
|
|
645
|
-
## Detection Rules
|
|
646
|
-
- File patterns: `*.js`, `*.ts`
|
|
647
|
-
- Code patterns: `console.log`, `debugger`
|
|
648
|
-
|
|
649
|
-
## Analysis
|
|
650
|
-
Look for debugging statements left in production code.
|
|
651
|
-
|
|
652
|
-
## Fix Suggestions
|
|
653
|
-
Remove or replace with proper logging.
|
|
654
|
-
```
|
|
655
|
-
|
|
656
664
|
## Troubleshooting
|
|
657
665
|
|
|
658
666
|
### Common Issues
|
|
659
667
|
|
|
660
|
-
Trie not finding issues
|
|
668
|
+
**Trie not finding issues**: You haven't taught Trie about your specific patterns yet. Use `trie tell` to report incidents and build your decision ledger.
|
|
661
669
|
|
|
662
|
-
|
|
670
|
+
**Memory queries returning empty**: The warm storage is empty. Report some incidents with `trie tell` or run `trie learn` to extract from git history.
|
|
663
671
|
|
|
664
|
-
|
|
672
|
+
**Query tools not working**: Make sure you've initialized Trie with `trie init` and have ANTHROPIC_API_KEY set for signal extraction.
|
|
665
673
|
|
|
666
|
-
Hooks not working
|
|
674
|
+
**Hooks not working**: Reinstall with `trie init`. Make sure you have write permissions to .git/hooks/.
|
|
667
675
|
|
|
668
676
|
### Getting Help
|
|
669
677
|
- Issues: [Report bugs and request features](https://x.com/louiskishfy)
|
|
@@ -144,7 +144,7 @@ var AgentProgressReporter = class {
|
|
|
144
144
|
console.error(`
|
|
145
145
|
[SCOUT] ${this.agentName.toUpperCase()} starting...`);
|
|
146
146
|
}
|
|
147
|
-
analyzing(
|
|
147
|
+
analyzing(_file) {
|
|
148
148
|
if (!this.verbose || _interactiveMode) return;
|
|
149
149
|
}
|
|
150
150
|
aiReview(context) {
|
|
@@ -158,12 +158,22 @@ var AgentProgressReporter = class {
|
|
|
158
158
|
const current = this.issuesBySeverity.get(severity) || 0;
|
|
159
159
|
this.issuesBySeverity.set(severity, current + 1);
|
|
160
160
|
if (severity === "critical") {
|
|
161
|
-
this.criticalIssues.push({
|
|
161
|
+
this.criticalIssues.push({
|
|
162
|
+
severity,
|
|
163
|
+
issue,
|
|
164
|
+
...file !== void 0 ? { file } : {},
|
|
165
|
+
...line !== void 0 ? { line } : {}
|
|
166
|
+
});
|
|
162
167
|
if (this.verbose && !_interactiveMode) {
|
|
163
168
|
this.flushCriticalAndSerious();
|
|
164
169
|
}
|
|
165
170
|
} else if (severity === "serious") {
|
|
166
|
-
this.seriousIssues.push({
|
|
171
|
+
this.seriousIssues.push({
|
|
172
|
+
severity,
|
|
173
|
+
issue,
|
|
174
|
+
...file !== void 0 ? { file } : {},
|
|
175
|
+
...line !== void 0 ? { line } : {}
|
|
176
|
+
});
|
|
167
177
|
}
|
|
168
178
|
if (!this.verbose || _interactiveMode) return;
|
|
169
179
|
const normalizedIssue = issue.replace(/at line \d+/gi, "").replace(/in .+$/gi, "").trim();
|
|
@@ -171,7 +181,12 @@ var AgentProgressReporter = class {
|
|
|
171
181
|
if (!this.batchedIssues.has(key)) {
|
|
172
182
|
this.batchedIssues.set(key, []);
|
|
173
183
|
}
|
|
174
|
-
this.batchedIssues.get(key).push({
|
|
184
|
+
this.batchedIssues.get(key).push({
|
|
185
|
+
severity,
|
|
186
|
+
issue,
|
|
187
|
+
...file !== void 0 ? { file } : {},
|
|
188
|
+
...line !== void 0 ? { line } : {}
|
|
189
|
+
});
|
|
175
190
|
if (severity === "critical") {
|
|
176
191
|
this.flushBatchedIssues();
|
|
177
192
|
} else {
|
|
@@ -205,7 +220,7 @@ var AgentProgressReporter = class {
|
|
|
205
220
|
const moderateGroups = [];
|
|
206
221
|
const lowGroups = [];
|
|
207
222
|
for (const [key, issues] of this.batchedIssues.entries()) {
|
|
208
|
-
const [severity, pattern] = key.split(":", 2);
|
|
223
|
+
const [severity, pattern = ""] = key.split(":", 2);
|
|
209
224
|
const count = issues.length;
|
|
210
225
|
const examples = issues.slice(0, 2).map((i) => i.issue);
|
|
211
226
|
if (severity === "moderate") {
|
|
@@ -295,4 +310,4 @@ export {
|
|
|
295
310
|
getProgressReporter,
|
|
296
311
|
resetProgressReporter
|
|
297
312
|
};
|
|
298
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-APMV77PU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/progress.ts"],"sourcesContent":["/**\n * Progress Reporter for Trie Agent\n * \n * Provides real-time feedback to users as the agent works.\n * Uses console.error because MCP clients display stderr to users.\n */\n\n/**\n * Global interactive mode flag\n * When enabled, suppresses all console output (handled by InteractiveDashboard instead)\n */\nlet _interactiveMode = false;\n\n/**\n * Enable or disable interactive mode\n * When enabled, all console output from ProgressReporter and AgentProgressReporter is suppressed\n */\nexport function setInteractiveMode(enabled: boolean): void {\n _interactiveMode = enabled;\n}\n\n/**\n * Check if interactive mode is enabled\n */\nexport function isInteractiveMode(): boolean {\n return _interactiveMode;\n}\n\nexport type ProgressPhase = \n | 'init'\n | 'discovery'\n | 'reading'\n | 'analyzing'\n | 'ai-review'\n | 'prioritizing'\n | 'complete';\n\nexport interface ProgressCallback {\n (phase: ProgressPhase, message: string, detail?: string): void;\n}\n\n/**\n * Progress Reporter - streams status updates to the user\n */\nexport class ProgressReporter {\n private currentPhase: ProgressPhase = 'init';\n private startTime: number = Date.now();\n private phaseStartTime: number = Date.now();\n private verbose: boolean;\n\n constructor(options: { verbose?: boolean } = {}) {\n this.verbose = options.verbose ?? true;\n }\n\n /**\n * Report a status update\n */\n report(message: string, detail?: string): void {\n if (!this.verbose || _interactiveMode) return;\n \n const prefix = this.getPhaseIcon(this.currentPhase);\n const fullMessage = detail ? `${message}: ${detail}` : message;\n console.error(`${prefix} ${fullMessage}`);\n }\n\n /**\n * Start a new phase\n */\n startPhase(phase: ProgressPhase, message: string): void {\n this.currentPhase = phase;\n this.phaseStartTime = Date.now();\n this.report(message);\n }\n\n /**\n * Update within current phase\n */\n update(message: string, detail?: string): void {\n this.report(message, detail);\n }\n\n /**\n * Report progress on a file\n */\n file(action: string, filePath: string): void {\n // Show just the filename for cleaner output\n const fileName = filePath.split('/').pop() || filePath;\n this.report(action, fileName);\n }\n\n /**\n * Report an AI analysis step\n */\n ai(action: string, context?: string): void {\n if (_interactiveMode) return;\n const prefix = '[AI]';\n const message = context ? `${action}: ${context}` : action;\n console.error(`${prefix} ${message}`);\n }\n\n /**\n * Report a finding\n */\n finding(severity: 'critical' | 'serious' | 'moderate' | 'low', message: string): void {\n if (_interactiveMode) return;\n const labels = {\n critical: '[CRITICAL]',\n serious: '[SERIOUS]',\n moderate: '[MODERATE]',\n low: '[LOW]'\n };\n console.error(` ${labels[severity]} ${message}`);\n }\n\n /**\n * Complete current phase\n */\n completePhase(summary: string): void {\n const elapsed = Date.now() - this.phaseStartTime;\n this.report(`Done: ${summary}`, `(${elapsed}ms)`);\n }\n\n /**\n * Complete the entire operation\n */\n complete(summary: string): void {\n if (_interactiveMode) return;\n const totalElapsed = Date.now() - this.startTime;\n console.error('');\n console.error(`----------------------------------------`);\n console.error(`[COMPLETE] ${summary}`);\n console.error(` Total time: ${(totalElapsed / 1000).toFixed(2)}s`);\n console.error(`----------------------------------------`);\n console.error('');\n }\n\n /**\n * Report an error\n */\n error(message: string, detail?: string): void {\n if (_interactiveMode) return;\n const fullMessage = detail ? `${message}: ${detail}` : message;\n console.error(`[ERROR] ${fullMessage}`);\n }\n\n /**\n * Report a warning\n */\n warn(message: string, detail?: string): void {\n if (_interactiveMode) return;\n const fullMessage = detail ? `${message}: ${detail}` : message;\n console.error(`[WARN] ${fullMessage}`);\n }\n\n /**\n * Get icon for current phase\n */\n private getPhaseIcon(phase: ProgressPhase): string {\n const icons: Record<ProgressPhase, string> = {\n 'init': '>>',\n 'discovery': '>>',\n 'reading': '>>',\n 'analyzing': '>>',\n 'ai-review': '[AI]',\n 'prioritizing': '>>',\n 'complete': '[OK]'\n };\n return icons[phase] || '>>';\n }\n\n /**\n * Create a sub-reporter for a specific agent\n */\n forAgent(agentName: string): AgentProgressReporter {\n return new AgentProgressReporter(agentName, this.verbose);\n }\n}\n\n/**\n * Progress reporter scoped to a specific agent\n */\nexport class AgentProgressReporter {\n private agentName: string;\n private verbose: boolean;\n private issueCount: number = 0;\n private issuesBySeverity: Map<string, number> = new Map();\n private batchedIssues: Map<string, Array<{ severity: string; issue: string; file?: string; line?: number }>> = new Map();\n private criticalIssues: Array<{ severity: string; issue: string; file?: string; line?: number }> = [];\n private seriousIssues: Array<{ severity: string; issue: string; file?: string; line?: number }> = [];\n private flushTimer: NodeJS.Timeout | null = null;\n private readonly BATCH_DELAY_MS = 100; // Batch issues for 100ms before flushing\n\n constructor(agentName: string, verbose: boolean = true) {\n this.agentName = agentName;\n this.verbose = verbose;\n }\n\n start(): void {\n if (!this.verbose || _interactiveMode) return;\n console.error(`\\n[SCOUT] ${this.agentName.toUpperCase()} starting...`);\n }\n\n analyzing(_file: string): void {\n if (!this.verbose || _interactiveMode) return;\n // Suppress individual file analysis messages - they're too verbose\n // The progress updates from streaming manager will show file progress\n }\n\n aiReview(context: string): void {\n if (!this.verbose || _interactiveMode) return;\n // Suppress AI review messages - they're too verbose during watch mode\n // Only show if there are very few issues (indicating a focused scan)\n if (this.issueCount < 5) {\n console.error(` [AI] reviewing: ${context}`);\n }\n }\n\n found(severity: string, issue: string, file?: string, line?: number): void {\n this.issueCount++;\n \n // Track by severity\n const current = this.issuesBySeverity.get(severity) || 0;\n this.issuesBySeverity.set(severity, current + 1);\n\n // Store critical and serious issues for detailed output\n if (severity === 'critical') {\n this.criticalIssues.push({\n severity,\n issue,\n ...(file !== undefined ? { file } : {}),\n ...(line !== undefined ? { line } : {}),\n });\n // Flush critical issues immediately\n if (this.verbose && !_interactiveMode) {\n this.flushCriticalAndSerious();\n }\n } else if (severity === 'serious') {\n this.seriousIssues.push({\n severity,\n issue,\n ...(file !== undefined ? { file } : {}),\n ...(line !== undefined ? { line } : {}),\n });\n }\n\n // Batch similar issues together for cleaner output\n if (!this.verbose || _interactiveMode) return;\n\n // Normalize issue description for grouping (remove line numbers, file paths)\n const normalizedIssue = issue.replace(/at line \\d+/gi, '').replace(/in .+$/gi, '').trim();\n const key = `${severity}:${normalizedIssue}`;\n \n if (!this.batchedIssues.has(key)) {\n this.batchedIssues.set(key, []);\n }\n this.batchedIssues.get(key)!.push({\n severity,\n issue,\n ...(file !== undefined ? { file } : {}),\n ...(line !== undefined ? { line } : {}),\n });\n\n // Schedule flush (debounced) - but flush immediately for critical\n if (severity === 'critical') {\n this.flushBatchedIssues();\n } else {\n if (this.flushTimer) {\n clearTimeout(this.flushTimer);\n }\n this.flushTimer = setTimeout(() => this.flushBatchedIssues(), this.BATCH_DELAY_MS);\n }\n }\n\n private flushCriticalAndSerious(): void {\n // Always show critical issues immediately\n for (const issue of this.criticalIssues) {\n console.error(` [CRITICAL] Found: ${issue.issue}`);\n }\n this.criticalIssues = [];\n }\n\n private flushBatchedIssues(): void {\n if (!this.verbose || _interactiveMode) return;\n\n // Always show critical issues immediately (should already be flushed, but double-check)\n if (this.criticalIssues.length > 0) {\n this.flushCriticalAndSerious();\n }\n\n // Show serious issues (limit to first 10 to avoid spam)\n if (this.seriousIssues.length > 0) {\n for (const issue of this.seriousIssues.slice(0, 10)) {\n console.error(` [SERIOUS] Found: ${issue.issue}`);\n }\n if (this.seriousIssues.length > 10) {\n console.error(` ... and ${this.seriousIssues.length - 10} more serious issues`);\n }\n this.seriousIssues = [];\n }\n\n if (this.batchedIssues.size === 0) return;\n\n // For moderate and low issues, group similar ones together\n const moderateGroups: Array<{ pattern: string; count: number; examples: string[] }> = [];\n const lowGroups: Array<{ pattern: string; count: number; examples: string[] }> = [];\n\n for (const [key, issues] of this.batchedIssues.entries()) {\n const [severity, pattern = ''] = key.split(':', 2);\n const count = issues.length;\n const examples = issues.slice(0, 2).map(i => i.issue);\n\n if (severity === 'moderate') {\n moderateGroups.push({ pattern, count, examples });\n } else if (severity === 'low') {\n lowGroups.push({ pattern, count, examples });\n }\n }\n\n // Show moderate issues (grouped, max 5 groups)\n if (moderateGroups.length > 0) {\n for (const group of moderateGroups.slice(0, 5)) {\n if (group.count === 1) {\n console.error(` [MODERATE] Found: ${group.examples[0]}`);\n } else {\n console.error(` [MODERATE] Found: ${group.pattern} (${group.count} instances)`);\n }\n }\n if (moderateGroups.length > 5) {\n const remaining = moderateGroups.slice(5).reduce((sum, g) => sum + g.count, 0);\n console.error(` ... and ${remaining} more moderate issues`);\n }\n }\n\n // Show low issues (grouped, max 3 groups, only if not too many)\n // Suppress low issues if there are too many total issues\n if (lowGroups.length > 0 && this.issueCount < 200) {\n for (const group of lowGroups.slice(0, 3)) {\n if (group.count === 1) {\n console.error(` [LOW] Found: ${group.examples[0]}`);\n } else {\n console.error(` [LOW] Found: ${group.pattern} (${group.count} instances)`);\n }\n }\n if (lowGroups.length > 3) {\n const remaining = lowGroups.slice(3).reduce((sum, g) => sum + g.count, 0);\n console.error(` ... and ${remaining} more low-severity issues`);\n }\n } else if (lowGroups.length > 0) {\n // Too many issues - just show summary\n const totalLow = lowGroups.reduce((sum, g) => sum + g.count, 0);\n console.error(` [LOW] Found ${totalLow} low-severity issues (suppressed for brevity)`);\n }\n\n this.batchedIssues.clear();\n }\n\n complete(summary?: string): void {\n // Flush any remaining batched issues\n if (this.flushTimer) {\n clearTimeout(this.flushTimer);\n this.flushTimer = null;\n }\n this.flushBatchedIssues();\n\n if (!this.verbose || _interactiveMode) return;\n\n // Build a better summary\n const severityCounts: string[] = [];\n if (this.issuesBySeverity.get('critical')) {\n severityCounts.push(`${this.issuesBySeverity.get('critical')} critical`);\n }\n if (this.issuesBySeverity.get('serious')) {\n severityCounts.push(`${this.issuesBySeverity.get('serious')} serious`);\n }\n if (this.issuesBySeverity.get('moderate')) {\n severityCounts.push(`${this.issuesBySeverity.get('moderate')} moderate`);\n }\n if (this.issuesBySeverity.get('low')) {\n severityCounts.push(`${this.issuesBySeverity.get('low')} low`);\n }\n\n const severitySummary = severityCounts.length > 0 \n ? ` (${severityCounts.join(', ')})`\n : '';\n \n const msg = summary || `${this.issueCount} issues found${severitySummary}`;\n console.error(` Done: ${this.agentName}: ${msg}`);\n }\n\n getIssueCount(): number {\n return this.issueCount;\n }\n\n getIssuesBySeverity(): Map<string, number> {\n return new Map(this.issuesBySeverity);\n }\n}\n\n/**\n * Global singleton for easy access\n */\nlet globalReporter: ProgressReporter | null = null;\n\nexport function getProgressReporter(options?: { verbose?: boolean }): ProgressReporter {\n if (!globalReporter) {\n globalReporter = new ProgressReporter(options);\n }\n return globalReporter;\n}\n\nexport function resetProgressReporter(): void {\n globalReporter = null;\n}\n"],"mappings":";AAWA,IAAI,mBAAmB;AAMhB,SAAS,mBAAmB,SAAwB;AACzD,qBAAmB;AACrB;AAKO,SAAS,oBAA6B;AAC3C,SAAO;AACT;AAkBO,IAAM,mBAAN,MAAuB;AAAA,EACpB,eAA8B;AAAA,EAC9B,YAAoB,KAAK,IAAI;AAAA,EAC7B,iBAAyB,KAAK,IAAI;AAAA,EAClC;AAAA,EAER,YAAY,UAAiC,CAAC,GAAG;AAC/C,SAAK,UAAU,QAAQ,WAAW;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,SAAiB,QAAuB;AAC7C,QAAI,CAAC,KAAK,WAAW,iBAAkB;AAEvC,UAAM,SAAS,KAAK,aAAa,KAAK,YAAY;AAClD,UAAM,cAAc,SAAS,GAAG,OAAO,KAAK,MAAM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AC/C;AACA,SAAO;AACT;AAEO,SAAS,wBAA8B;AAC5C,mBAAiB;AACnB;","names":[]}
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContextGraph,
|
|
3
|
+
GotchaPredictor,
|
|
4
|
+
findCrossProjectPatterns,
|
|
5
|
+
isAIAvailable,
|
|
6
|
+
recordToGlobalMemory,
|
|
7
|
+
runAIAnalysis
|
|
8
|
+
} from "./chunk-NIASHOAB.js";
|
|
1
9
|
import {
|
|
2
10
|
getGoalManager,
|
|
3
11
|
getInsightStore
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
ContextGraph,
|
|
7
|
-
GotchaPredictor
|
|
8
|
-
} from "./chunk-Y62VM3ER.js";
|
|
12
|
+
} from "./chunk-OVRG5RP3.js";
|
|
9
13
|
import {
|
|
10
14
|
getGuardianState
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
findCrossProjectPatterns,
|
|
14
|
-
recordToGlobalMemory
|
|
15
|
-
} from "./chunk-FFWNZUG2.js";
|
|
15
|
+
} from "./chunk-R3I2GCZC.js";
|
|
16
16
|
import {
|
|
17
17
|
autoResolveIssues,
|
|
18
18
|
getHistoricalInsights,
|
|
19
19
|
getIssueHash,
|
|
20
20
|
searchIssues,
|
|
21
21
|
storeIssues
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
isAIAvailable,
|
|
25
|
-
runAIAnalysis
|
|
26
|
-
} from "./chunk-ODWDESYP.js";
|
|
22
|
+
} from "./chunk-JDHR5BDR.js";
|
|
27
23
|
|
|
28
24
|
// src/guardian/guardian-agent.ts
|
|
29
25
|
import { basename as basename2 } from "path";
|
|
@@ -2362,7 +2358,7 @@ var GuardianAgent = class {
|
|
|
2362
2358
|
await this.guardianState.recordScan();
|
|
2363
2359
|
try {
|
|
2364
2360
|
const riskLevel = issues.filter((i) => i.severity === "critical").length > 0 ? "critical" : issues.filter((i) => i.severity === "serious").length >= 3 ? "high" : issues.length > 10 ? "medium" : "low";
|
|
2365
|
-
const { calculateAdaptiveScanFrequency } = await import("./goal-manager-
|
|
2361
|
+
const { calculateAdaptiveScanFrequency } = await import("./goal-manager-LAOT4QQX.js");
|
|
2366
2362
|
const result = await calculateAdaptiveScanFrequency(riskLevel);
|
|
2367
2363
|
await this.guardianState.setScanFrequency(result.frequencyMs);
|
|
2368
2364
|
} catch {
|
|
@@ -2592,8 +2588,7 @@ function getGuardian(projectPath) {
|
|
|
2592
2588
|
}
|
|
2593
2589
|
|
|
2594
2590
|
export {
|
|
2595
|
-
SlackIntegration,
|
|
2596
2591
|
GuardianAgent,
|
|
2597
2592
|
getGuardian
|
|
2598
2593
|
};
|
|
2599
|
-
//# sourceMappingURL=chunk-
|
|
2594
|
+
//# sourceMappingURL=chunk-B3MNN3XB.js.map
|