milens 0.6.6 → 0.6.7
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/.agents/skills/adapters/SKILL.md +14 -14
- package/.agents/skills/analyzer/SKILL.md +26 -24
- package/.agents/skills/apps/SKILL.md +10 -8
- package/.agents/skills/docs/SKILL.md +13 -8
- package/.agents/skills/milens/SKILL.md +164 -43
- package/.agents/skills/milens-security-review/SKILL.md +224 -224
- package/.agents/skills/orchestrator/SKILL.md +3 -1
- package/.agents/skills/parser/SKILL.md +16 -15
- package/.agents/skills/root/SKILL.md +20 -20
- package/.agents/skills/security/SKILL.md +1 -0
- package/.agents/skills/server/SKILL.md +8 -8
- package/.agents/skills/store/SKILL.md +12 -12
- package/.agents/skills/test/SKILL.md +57 -26
- package/README.md +7 -8
- package/dist/ui/progress.d.ts +28 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +100 -0
- package/dist/ui/progress.js.map +1 -0
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ When working with code in **server/**, follow these mandatory safety rules:
|
|
|
26
26
|
| See file symbols | `mcp_milens_get_file_symbols` |
|
|
27
27
|
|
|
28
28
|
## Overview
|
|
29
|
-
Contains
|
|
29
|
+
Contains 99 symbols (16 exported) across 5 files.
|
|
30
30
|
|
|
31
31
|
## Key Symbols
|
|
32
32
|
- **`HookManager`** [class] (src/server/hooks.ts:43) — 8 refs
|
|
@@ -39,27 +39,27 @@ Contains 94 symbols (16 exported) across 5 files.
|
|
|
39
39
|
- **`defaultOnPostCompact`** [function] (src/server/hooks.ts:358) — 4 refs
|
|
40
40
|
- **`SessionContext`** [interface] (src/server/hooks.ts:15) — 4 refs
|
|
41
41
|
- **`registerAllPrompts`** [function] (src/server/mcp-prompts.ts:637) — 4 refs
|
|
42
|
-
- **`createMcpServer`** [function] (src/server/mcp.ts:
|
|
42
|
+
- **`createMcpServer`** [function] (src/server/mcp.ts:420) — 4 refs
|
|
43
43
|
- **`generateTestPlan`** [function] (src/server/test-plan.ts:14) — 4 refs
|
|
44
44
|
- **`FileWatcher`** [class] (src/server/watcher.ts:50) — 3 refs
|
|
45
|
-
- **`startStdio`** [function] (src/server/mcp.ts:
|
|
46
|
-
- **`startHttp`** [function] (src/server/mcp.ts:
|
|
45
|
+
- **`startStdio`** [function] (src/server/mcp.ts:2907) — 2 refs
|
|
46
|
+
- **`startHttp`** [function] (src/server/mcp.ts:2946) — 2 refs
|
|
47
47
|
|
|
48
48
|
## Entry Points
|
|
49
|
-
- **`get`** [method] —
|
|
49
|
+
- **`get`** [method] — 12 incoming references
|
|
50
50
|
- **`HookManager`** [class] — 8 incoming references
|
|
51
51
|
- **`loadConfig`** [method] — 7 incoming references
|
|
52
52
|
- **`HookConfig`** [interface] — 5 incoming references
|
|
53
53
|
- **`defaultOnSessionStart`** [function] — 4 incoming references
|
|
54
54
|
|
|
55
55
|
## Dependencies
|
|
56
|
-
- **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+
|
|
57
|
-
- **analyzer**: `reviewPr`, `analyze`, `resolve`, `
|
|
56
|
+
- **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+36 more)
|
|
57
|
+
- **analyzer**: `reviewPr`, `analyze`, `resolve`, `clear`
|
|
58
58
|
- **parser**: `getParser`, `loadLanguage`, `ALL_LANGS`
|
|
59
59
|
- **security**: `loadRules`
|
|
60
60
|
- **orchestrator**: `Orchestrator`, `snapshot`, `compare`, `runAndFormat`
|
|
61
61
|
- **root**: `has`
|
|
62
|
-
- **test**: `dbPath`
|
|
62
|
+
- **test**: `add`, `dbPath`
|
|
63
63
|
|
|
64
64
|
## Used By
|
|
65
65
|
- **root**: `startHttp`, `startStdio`, `HookManager`, `get`, `enableHook`, `loadConfig`, `saveConfig`, `disableHook`
|
|
@@ -29,9 +29,9 @@ When working with code in **store/**, follow these mandatory safety rules:
|
|
|
29
29
|
Contains 135 symbols (15 exported) across 5 files.
|
|
30
30
|
|
|
31
31
|
## Key Symbols
|
|
32
|
-
- **`Database`** [class] (src/store/db.ts:10) —
|
|
32
|
+
- **`Database`** [class] (src/store/db.ts:10) — 79 refs
|
|
33
33
|
- **`AnnotationStore`** [class] (src/store/annotations.ts:10) — 19 refs
|
|
34
|
-
- **`RepoRegistry`** [class] (src/store/registry.ts:18) —
|
|
34
|
+
- **`RepoRegistry`** [class] (src/store/registry.ts:18) — 16 refs
|
|
35
35
|
- **`runDecayPass`** [function] (src/store/confidence.ts:85) — 6 refs
|
|
36
36
|
- **`buildEmbeddingText`** [function] (src/store/vectors.ts:250) — 4 refs
|
|
37
37
|
- **`TfIdfProvider`** [class] (src/store/vectors.ts:44) — 4 refs
|
|
@@ -46,24 +46,24 @@ Contains 135 symbols (15 exported) across 5 files.
|
|
|
46
46
|
- **`SimilarResult`** [interface] (src/store/vectors.ts:23) — 0 refs
|
|
47
47
|
|
|
48
48
|
## Entry Points
|
|
49
|
-
- **`Database`** [class] —
|
|
50
|
-
- **`close`** [method] —
|
|
51
|
-
- **`get`** [method] —
|
|
49
|
+
- **`Database`** [class] — 79 incoming references
|
|
50
|
+
- **`close`** [method] — 31 incoming references
|
|
51
|
+
- **`get`** [method] — 23 incoming references
|
|
52
52
|
- **`AnnotationStore`** [class] — 19 incoming references
|
|
53
|
-
- **`
|
|
53
|
+
- **`RepoRegistry`** [class] — 16 incoming references
|
|
54
54
|
|
|
55
55
|
## Dependencies
|
|
56
56
|
- **root**: `Annotation`, `AnnotationKey`, `Session`, `EvolutionEvent`, `CodeSymbol`, `SymbolLink`, `RepoEntry`, `has` (+1 more)
|
|
57
|
-
- **
|
|
58
|
-
- **
|
|
57
|
+
- **test**: `add`, `dbPath`
|
|
58
|
+
- **analyzer**: `resolve`
|
|
59
59
|
|
|
60
60
|
## Used By
|
|
61
|
-
- **root**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `register` (+
|
|
61
|
+
- **root**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `register` (+24 more)
|
|
62
62
|
- **analyzer**: `Database`, `TfIdfProvider`, `EmbeddingStore`, `buildEmbeddingText`, `get`, `clearFiles`, `clear`, `isFileUpToDate` (+23 more)
|
|
63
63
|
- **orchestrator**: `Database`, `findSymbolByName`, `findUpstream`, `clear`, `getTestCoverageGaps`, `findDeadCode`, `close`
|
|
64
|
-
- **server**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+
|
|
65
|
-
- **test**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+
|
|
66
|
-
- **apps**: `remove`, `Database`, `getCodebaseSummary`, `close`
|
|
64
|
+
- **server**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+36 more)
|
|
65
|
+
- **test**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+77 more)
|
|
66
|
+
- **apps**: `remove`, `getAnnotations`, `Database`, `getCodebaseSummary`, `close`
|
|
67
67
|
- **docs**: `remove`
|
|
68
68
|
- **parser**: `load`
|
|
69
69
|
|
|
@@ -26,50 +26,76 @@ When working with code in **test/**, follow these mandatory safety rules:
|
|
|
26
26
|
| See file symbols | `mcp_milens_get_file_symbols` |
|
|
27
27
|
|
|
28
28
|
## Overview
|
|
29
|
-
Contains
|
|
29
|
+
Contains 328 symbols (119 exported) across 77 files.
|
|
30
30
|
|
|
31
31
|
## Key Symbols
|
|
32
|
+
- **`User`** [class] (test/fixtures/accuracy/py-project/src/models.py:1) — 6 refs
|
|
33
|
+
- **`Calculator`** [class] (test/fixtures/accuracy/js-project/src/calculator.js:1) — 5 refs
|
|
32
34
|
- **`User`** [interface] (test/fixtures/ts-project/src/models.ts:1) — 5 refs
|
|
35
|
+
- **`save`** [method] (test/fixtures/accuracy/py-project/src/models.py:14) — 4 refs
|
|
36
|
+
- **`User`** [interface] (test/fixtures/accuracy/ts-project/src/models.ts:1) — 3 refs
|
|
37
|
+
- **`User`** [class] (test/fixtures/py-project/models.py:1) — 3 refs
|
|
38
|
+
- **`User`** [class] (test/fixtures/accuracy/ruby-project/src/models.rb:1) — 3 refs
|
|
39
|
+
- **`createCalc`** [function] (test/fixtures/accuracy/js-project/src/calculator.js:6) — 2 refs
|
|
40
|
+
- **`UserRepository`** [class] (test/fixtures/accuracy/ts-project/src/models.ts:12) — 2 refs
|
|
33
41
|
- **`createUser`** [function] (test/fixtures/ts-project/src/models.ts:9) — 2 refs
|
|
34
42
|
- **`UserRole`** [type] (test/fixtures/ts-project/src/models.ts:7) — 2 refs
|
|
35
|
-
- **`
|
|
36
|
-
- **`
|
|
37
|
-
- **`
|
|
38
|
-
- **`
|
|
39
|
-
- **`Architecture`** [section] (test/fixtures/md-project/docs/guide.md:15) — 1 refs
|
|
40
|
-
- **`Models`** [section] (test/fixtures/md-project/docs/guide.md:19) — 1 refs
|
|
41
|
-
- **`Authentication`** [section] (test/fixtures/md-project/docs/guide.md:25) — 1 refs
|
|
42
|
-
- **`API Reference`** [section] (test/fixtures/md-project/docs/guide.md:35) — 1 refs
|
|
43
|
-
- **`Endpoints`** [section] (test/fixtures/md-project/docs/guide.md:37) — 1 refs
|
|
44
|
-
- **`Error Codes`** [section] (test/fixtures/md-project/docs/guide.md:42) — 1 refs
|
|
45
|
-
- **`Contributing`** [section] (test/fixtures/md-project/docs/guide.md:46) — 1 refs
|
|
46
|
-
- **`UserController`** [class] (test/fixtures/ts-project/src/nest-sample.ts:18) — 1 refs
|
|
43
|
+
- **`UserService`** [class] (test/fixtures/ts-project/src/nest-sample.ts:27) — 2 refs
|
|
44
|
+
- **`Save`** [method] (test/fixtures/accuracy/go-project/src/models/user.go:16) — 2 refs
|
|
45
|
+
- **`UserRepo`** [class] (test/fixtures/accuracy/py-project/src/models.py:10) — 2 refs
|
|
46
|
+
- **`UserService`** [class] (test/fixtures/accuracy/py-project/src/service.py:4) — 2 refs
|
|
47
47
|
|
|
48
48
|
## Entry Points
|
|
49
|
+
- **`add`** [method] — 43 incoming references
|
|
49
50
|
- **`lang`** [variable] — 12 incoming references
|
|
50
51
|
- **`dbPath`** [function] — 10 incoming references
|
|
51
|
-
- **`User`** [
|
|
52
|
-
- **`
|
|
53
|
-
- **`createUser`** [function] — 2 incoming references
|
|
52
|
+
- **`User`** [class] — 6 incoming references
|
|
53
|
+
- **`Calculator`** [class] — 5 incoming references
|
|
54
54
|
|
|
55
55
|
## Dependencies
|
|
56
|
-
- **
|
|
57
|
-
- **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+
|
|
56
|
+
- **analyzer**: `analyze`, `loadAliases`, `getCachedTree`, `clearTreeCache`, `enrichMetadata`, `resolveLinksWithStats`, `resolveLinks`, `reviewSymbol` (+10 more)
|
|
57
|
+
- **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+77 more)
|
|
58
|
+
- **root**: `generateAgentsMd`, `AnnotationKey`, `CodeSymbol`, `SymbolLink`, `computeMetrics`, `formatMetricsReport`, `MilensMetrics`, `RawImport` (+17 more)
|
|
58
59
|
- **security**: `detectEcosystem`, `parseDependencies`, `checkVulnerabilities`, `auditDependencies`, `loadRules`, `getRulesByCategory`, `getRulesBySeverity`
|
|
59
|
-
- **
|
|
60
|
-
- **parser**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `spec`, `extractHtmlScripts`, `extractHtmlRefs` (+7 more)
|
|
60
|
+
- **parser**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `extractVueCompositionApi`, `extractVueTemplateAst`, `spec` (+11 more)
|
|
61
61
|
- **server**: `HookManager`, `HookConfig`, `defaultOnSessionStart`, `defaultOnSessionEnd`, `defaultOnPreCommit`, `defaultOnFileChange`, `defaultOnPreCompact`, `defaultOnPostCompact` (+10 more)
|
|
62
62
|
- **orchestrator**: `Orchestrator`, `formatReport`, `OrchestratorReport`, `subscribe`, `run`, `snapshot`, `compare`, `cancel` (+3 more)
|
|
63
63
|
|
|
64
64
|
## Used By
|
|
65
|
-
- **apps**: `dbPath`
|
|
66
|
-
- **
|
|
67
|
-
- **root**: `dbPath`
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
- **
|
|
65
|
+
- **apps**: `add`, `dbPath`
|
|
66
|
+
- **docs**: `add`
|
|
67
|
+
- **root**: `add`, `dbPath`
|
|
68
|
+
- **analyzer**: `add`, `parser`, `lang`
|
|
69
|
+
- **orchestrator**: `add`
|
|
70
|
+
- **parser**: `lang`, `add`, `parser`
|
|
71
|
+
- **security**: `add`
|
|
72
|
+
- **server**: `add`, `dbPath`
|
|
73
|
+
- **store**: `add`, `dbPath`
|
|
71
74
|
|
|
72
75
|
## Files
|
|
76
|
+
- test/fixtures/accuracy/go-project/src/admin.go
|
|
77
|
+
- test/fixtures/accuracy/go-project/src/main.go
|
|
78
|
+
- test/fixtures/accuracy/go-project/src/models/user.go
|
|
79
|
+
- test/fixtures/accuracy/java-project/src/Models.java
|
|
80
|
+
- test/fixtures/accuracy/java-project/src/Service.java
|
|
81
|
+
- test/fixtures/accuracy/js-project/src/app.js
|
|
82
|
+
- test/fixtures/accuracy/js-project/src/calculator.js
|
|
83
|
+
- test/fixtures/accuracy/js-project/src/extend.js
|
|
84
|
+
- test/fixtures/accuracy/php-project/src/admin.php
|
|
85
|
+
- test/fixtures/accuracy/php-project/src/models.php
|
|
86
|
+
- test/fixtures/accuracy/php-project/src/service.php
|
|
87
|
+
- test/fixtures/accuracy/py-project/src/admin.py
|
|
88
|
+
- test/fixtures/accuracy/py-project/src/models.py
|
|
89
|
+
- test/fixtures/accuracy/py-project/src/service.py
|
|
90
|
+
- test/fixtures/accuracy/ruby-project/src/mixins.rb
|
|
91
|
+
- test/fixtures/accuracy/ruby-project/src/models.rb
|
|
92
|
+
- test/fixtures/accuracy/ruby-project/src/service.rb
|
|
93
|
+
- test/fixtures/accuracy/rust-project/src/admin.rs
|
|
94
|
+
- test/fixtures/accuracy/rust-project/src/main.rs
|
|
95
|
+
- test/fixtures/accuracy/rust-project/src/models.rs
|
|
96
|
+
- test/fixtures/accuracy/ts-project/src/auth.ts
|
|
97
|
+
- test/fixtures/accuracy/ts-project/src/index.ts
|
|
98
|
+
- test/fixtures/accuracy/ts-project/src/models.ts
|
|
73
99
|
- test/fixtures/go-project/models/user.go
|
|
74
100
|
- test/fixtures/go-project/service/handler.go
|
|
75
101
|
- test/fixtures/html-project/css/main.css
|
|
@@ -89,6 +115,7 @@ Contains 195 symbols (43 exported) across 49 files.
|
|
|
89
115
|
- test/fixtures/vue-project-refs/src/views/TestView.vue
|
|
90
116
|
- test/fixtures/vue-project/src/composables/useClipboard.js
|
|
91
117
|
- test/fixtures/vue-project/src/views/TestView.vue
|
|
118
|
+
- test/unit/accuracy.test.ts
|
|
92
119
|
- test/unit/agents-md.test.ts
|
|
93
120
|
- test/unit/annotations.test.ts
|
|
94
121
|
- test/unit/cli.test.ts
|
|
@@ -96,6 +123,7 @@ Contains 195 symbols (43 exported) across 49 files.
|
|
|
96
123
|
- test/unit/database.test.ts
|
|
97
124
|
- test/unit/db-extended.test.ts
|
|
98
125
|
- test/unit/deps-audit.test.ts
|
|
126
|
+
- test/unit/engine.test.ts
|
|
99
127
|
- test/unit/enrich.test.ts
|
|
100
128
|
- test/unit/extractor.test.ts
|
|
101
129
|
- test/unit/hooks.test.ts
|
|
@@ -105,6 +133,7 @@ Contains 195 symbols (43 exported) across 49 files.
|
|
|
105
133
|
- test/unit/mcp-prompts.test.ts
|
|
106
134
|
- test/unit/mcp-tools.test.ts
|
|
107
135
|
- test/unit/metrics.test.ts
|
|
136
|
+
- test/unit/mro.test.ts
|
|
108
137
|
- test/unit/orchestrator.test.ts
|
|
109
138
|
- test/unit/parser-extract-cache.test.ts
|
|
110
139
|
- test/unit/parser-loader.test.ts
|
|
@@ -112,10 +141,12 @@ Contains 195 symbols (43 exported) across 49 files.
|
|
|
112
141
|
- test/unit/resolver.test.ts
|
|
113
142
|
- test/unit/review.test.ts
|
|
114
143
|
- test/unit/scanner.test.ts
|
|
144
|
+
- test/unit/scope-resolver.test.ts
|
|
115
145
|
- test/unit/security-rules.test.ts
|
|
116
146
|
- test/unit/server-test-plan.test.ts
|
|
117
147
|
- test/unit/skills.test.ts
|
|
118
148
|
- test/unit/testplan.test.ts
|
|
149
|
+
- test/unit/uninstall.test.ts
|
|
119
150
|
- test/unit/utils.test.ts
|
|
120
151
|
- test/unit/vectors.test.ts
|
|
121
152
|
- test/unit/vue-import.test.ts
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<a href="https://www.npmjs.com/package/milens"><img src="https://img.shields.io/npm/v/milens" alt="npm"></a>
|
|
8
8
|
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="node"></a>
|
|
9
9
|
<a href="https://github.com/fuze210699/milens/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="license"></a>
|
|
10
|
-
<img src="https://img.shields.io/badge/tools-
|
|
10
|
+
<img src="https://img.shields.io/badge/tools-43-purple" alt="43 tools">
|
|
11
11
|
<img src="https://img.shields.io/badge/languages-12-blue" alt="12 languages">
|
|
12
12
|
<img src="https://img.shields.io/badge/prompts-7-orange" alt="7 prompts">
|
|
13
13
|
<img src="https://img.shields.io/badge/security-50%2B-red" alt="50+ rules">
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
## Quick Install
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
milens init --profile full
|
|
32
|
+
milens analyze -p . --force
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
37
|
## What is Milens?
|
|
38
38
|
|
|
39
|
-
Milens builds a **knowledge graph** of your codebase — functions, classes, imports, calls, and inheritance chains — then exposes it through
|
|
39
|
+
Milens builds a **knowledge graph** of your codebase — functions, classes, imports, calls, and inheritance chains — then exposes it through 43 MCP tools. AI agents query the graph instead of reading files.
|
|
40
40
|
|
|
41
41
|
- **Parse 12 languages.** Tree-sitter WASM — TS, JS, Python, Java, Go, Rust, PHP, Ruby, Vue, HTML, CSS, Markdown.
|
|
42
42
|
- **Query instantly.** FTS5 + recursive CTE — all in SQLite, no API calls.
|
|
@@ -67,7 +67,7 @@ Analyzer ── extractFromTree() + dual-path resolver
|
|
|
67
67
|
Store ──── SQLite + FTS5 (symbols, links, metadata, embeddings)
|
|
68
68
|
│
|
|
69
69
|
▼
|
|
70
|
-
Server ─── MCP stdio/HTTP (
|
|
70
|
+
Server ─── MCP stdio/HTTP (43 tools)
|
|
71
71
|
│
|
|
72
72
|
├── AI Agent (MCP client)
|
|
73
73
|
└── CLI (terminal)
|
|
@@ -157,7 +157,7 @@ Open your AI agent. It auto-loads `AGENTS.md` with codebase context. You're read
|
|
|
157
157
|
|
|
158
158
|
| Feature | Description |
|
|
159
159
|
|---|---|
|
|
160
|
-
| **Code Intelligence** |
|
|
160
|
+
| **Code Intelligence** | 43 MCP tools — search, impact, context, trace, routes |
|
|
161
161
|
| **Security Scanner** | 50+ rules across 9 categories + dependency audit |
|
|
162
162
|
| **Sub-Agent Prompts** | 7 prompts — plan, review, tdd, security, architect, debug, dead_code_remove |
|
|
163
163
|
| **CLI Workflows** | 7 commands — tdd, review, plan, onboard, security-scan, refactor, handoff |
|
|
@@ -403,7 +403,7 @@ Each adapter is in the `adapters/` directory with ready-to-copy config files and
|
|
|
403
403
|
```bash
|
|
404
404
|
MILENS_PROFILE=minimal milens serve # 10 tools — lighter footprint
|
|
405
405
|
MILENS_PROFILE=standard milens serve # 25 tools — full daily coding
|
|
406
|
-
milens serve --profile full #
|
|
406
|
+
milens serve --profile full # 43 tools — everything
|
|
407
407
|
```
|
|
408
408
|
|
|
409
409
|
---
|
|
@@ -507,7 +507,6 @@ Everything that touches your code stays on your filesystem. Built for production
|
|
|
507
507
|
## License
|
|
508
508
|
|
|
509
509
|
Core (analyzer, parser, store, CLI, MCP tools): **MIT License**
|
|
510
|
-
Advanced features (GitHub App, enterprise): Commercial license
|
|
511
510
|
See [LICENSE](LICENSE) for details.
|
|
512
511
|
|
|
513
512
|
---
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface AnalysisStats {
|
|
2
|
+
filesScanned: number;
|
|
3
|
+
filesParsed: number;
|
|
4
|
+
symbolCount: number;
|
|
5
|
+
linkCount: number;
|
|
6
|
+
durationMs: number;
|
|
7
|
+
unresolvedImports: number;
|
|
8
|
+
unresolvedCalls: number;
|
|
9
|
+
externalImports: number;
|
|
10
|
+
externalCalls: number;
|
|
11
|
+
}
|
|
12
|
+
export declare enum ProgressPhase {
|
|
13
|
+
SCAN = "Scanning",
|
|
14
|
+
PARSE = "Parsing",
|
|
15
|
+
RESOLVE = "Resolving",
|
|
16
|
+
ENRICH = "Enriching",
|
|
17
|
+
PERSIST = "Saving"
|
|
18
|
+
}
|
|
19
|
+
export interface ProgressReporter {
|
|
20
|
+
startPhase(phase: ProgressPhase, total: number): void;
|
|
21
|
+
tick(detail?: string): void;
|
|
22
|
+
update(current: number, detail?: string): void;
|
|
23
|
+
endPhase(): void;
|
|
24
|
+
done(stats: AnalysisStats): void;
|
|
25
|
+
finalize(): void;
|
|
26
|
+
}
|
|
27
|
+
export declare function createProgressReporter(): ProgressReporter;
|
|
28
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/ui/progress.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,oBAAY,aAAa;IACvB,IAAI,aAAgB;IACpB,KAAK,YAAc;IACnB,OAAO,cAAc;IACrB,MAAM,cAAe;IACrB,OAAO,WAAW;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACtD,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/C,QAAQ,IAAI,IAAI,CAAC;IACjB,IAAI,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACjC,QAAQ,IAAI,IAAI,CAAC;CAClB;AAED,wBAAgB,sBAAsB,IAAI,gBAAgB,CAQzD"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export var ProgressPhase;
|
|
2
|
+
(function (ProgressPhase) {
|
|
3
|
+
ProgressPhase["SCAN"] = "Scanning";
|
|
4
|
+
ProgressPhase["PARSE"] = "Parsing";
|
|
5
|
+
ProgressPhase["RESOLVE"] = "Resolving";
|
|
6
|
+
ProgressPhase["ENRICH"] = "Enriching";
|
|
7
|
+
ProgressPhase["PERSIST"] = "Saving";
|
|
8
|
+
})(ProgressPhase || (ProgressPhase = {}));
|
|
9
|
+
export function createProgressReporter() {
|
|
10
|
+
if (process.env.MILENS_QUIET || process.argv.includes('--quiet')) {
|
|
11
|
+
return new NullRenderer();
|
|
12
|
+
}
|
|
13
|
+
if (process.stdout.isTTY && !process.env.CI) {
|
|
14
|
+
return new AnsiRenderer();
|
|
15
|
+
}
|
|
16
|
+
return new TextRenderer();
|
|
17
|
+
}
|
|
18
|
+
const BAR_WIDTH = 30;
|
|
19
|
+
class AnsiRenderer {
|
|
20
|
+
phase = ProgressPhase.SCAN;
|
|
21
|
+
total = 0;
|
|
22
|
+
current = 0;
|
|
23
|
+
phaseStartTime = 0;
|
|
24
|
+
totalStartTime = Date.now();
|
|
25
|
+
cols = process.stdout.columns ?? 80;
|
|
26
|
+
startPhase(phase, total) {
|
|
27
|
+
this.phase = phase;
|
|
28
|
+
this.total = total;
|
|
29
|
+
this.current = 0;
|
|
30
|
+
this.phaseStartTime = Date.now();
|
|
31
|
+
process.stdout.write('\x1b[?25l');
|
|
32
|
+
this.render();
|
|
33
|
+
}
|
|
34
|
+
tick(detail) {
|
|
35
|
+
this.current++;
|
|
36
|
+
this.render(detail);
|
|
37
|
+
}
|
|
38
|
+
update(current, detail) {
|
|
39
|
+
this.current = current;
|
|
40
|
+
this.render(detail);
|
|
41
|
+
}
|
|
42
|
+
endPhase() {
|
|
43
|
+
const elapsed = Date.now() - this.phaseStartTime;
|
|
44
|
+
const count = this.total > 0 ? ` ${Math.max(this.current, this.total)}/${this.total}` : '';
|
|
45
|
+
process.stdout.write(`\r\x1b[2K${this.phase.padEnd(12)}${count} (${elapsed}ms)\n`);
|
|
46
|
+
}
|
|
47
|
+
done(stats) {
|
|
48
|
+
process.stdout.write('\x1b[?25h');
|
|
49
|
+
const totalMs = Date.now() - this.totalStartTime;
|
|
50
|
+
process.stdout.write(`\n✓ Indexed ${stats.symbolCount} symbols, ${stats.linkCount} links across ${stats.filesParsed} files (${totalMs}ms)\n`);
|
|
51
|
+
}
|
|
52
|
+
finalize() {
|
|
53
|
+
process.stdout.write('\x1b[?25h');
|
|
54
|
+
}
|
|
55
|
+
render(detail) {
|
|
56
|
+
const pct = this.total > 0 ? this.current / this.total : 0;
|
|
57
|
+
const filled = Math.round(pct * BAR_WIDTH);
|
|
58
|
+
const bar = '[' + '='.repeat(filled) + '>'.repeat(filled < BAR_WIDTH ? 1 : 0) + ' '.repeat(Math.max(0, BAR_WIDTH - filled - 1)) + ']';
|
|
59
|
+
const pctStr = Math.round(pct * 100).toString().padStart(3);
|
|
60
|
+
let line = `\r\x1b[2K${this.phase.padEnd(12)} ${bar} ${pctStr}% (${this.current}/${this.total})`;
|
|
61
|
+
if (detail) {
|
|
62
|
+
const maxDetail = Math.max(0, this.cols - line.length - 3);
|
|
63
|
+
if (maxDetail > 10)
|
|
64
|
+
line += ` ${detail.slice(-maxDetail)}`;
|
|
65
|
+
}
|
|
66
|
+
process.stdout.write(line);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
class TextRenderer {
|
|
70
|
+
phase = ProgressPhase.SCAN;
|
|
71
|
+
total = 0;
|
|
72
|
+
current = 0;
|
|
73
|
+
phaseStartTime = 0;
|
|
74
|
+
startPhase(phase, total) {
|
|
75
|
+
this.phase = phase;
|
|
76
|
+
this.total = total;
|
|
77
|
+
this.current = 0;
|
|
78
|
+
this.phaseStartTime = Date.now();
|
|
79
|
+
}
|
|
80
|
+
tick() { this.current++; }
|
|
81
|
+
update(current) { this.current = current; }
|
|
82
|
+
endPhase() {
|
|
83
|
+
const elapsed = Date.now() - this.phaseStartTime;
|
|
84
|
+
const count = this.total > 0 ? ` (${Math.max(this.current, this.total)}/${this.total})` : '';
|
|
85
|
+
console.error(`[${this.phase.toLowerCase()}] Done${count} in ${elapsed}ms`);
|
|
86
|
+
}
|
|
87
|
+
done(stats) {
|
|
88
|
+
console.log(`\n✓ Indexed ${stats.symbolCount} symbols, ${stats.linkCount} links across ${stats.filesParsed} files (${stats.durationMs}ms)`);
|
|
89
|
+
}
|
|
90
|
+
finalize() { }
|
|
91
|
+
}
|
|
92
|
+
class NullRenderer {
|
|
93
|
+
startPhase() { }
|
|
94
|
+
tick() { }
|
|
95
|
+
update() { }
|
|
96
|
+
endPhase() { }
|
|
97
|
+
done() { }
|
|
98
|
+
finalize() { }
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/ui/progress.ts"],"names":[],"mappings":"AAYA,MAAM,CAAN,IAAY,aAMX;AAND,WAAY,aAAa;IACvB,kCAAoB,CAAA;IACpB,kCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,mCAAkB,CAAA;AACpB,CAAC,EANW,aAAa,KAAb,aAAa,QAMxB;AAWD,MAAM,UAAU,sBAAsB;IACpC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACjE,OAAO,IAAI,YAAY,EAAE,CAAC;IAC5B,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QAC5C,OAAO,IAAI,YAAY,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,IAAI,YAAY,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,MAAM,YAAY;IACR,KAAK,GAAkB,aAAa,CAAC,IAAI,CAAC;IAC1C,KAAK,GAAG,CAAC,CAAC;IACV,OAAO,GAAG,CAAC,CAAC;IACZ,cAAc,GAAG,CAAC,CAAC;IACnB,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC5B,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;IAE5C,UAAU,CA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AAK,CAAC,WAAW,WAAW,KAAK,CAAC,UAAU,KAAK,CAAC,CAAC;IAC9I,CAAC;IAED,QAAQ,KAAU,CAAC;CACpB;AAED,MAAM,YAAY;IAChB,UAAU,KAAU,CAAC;IACrB,IAAI,KAAU,CAAC;IACf,MAAM,KAAU,CAAC;IACjB,QAAQ,KAAU,CAAC;IACnB,IAAI,KAAU,CAAC;IACf,QAAQ,KAAU,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "milens",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "AI-DOS: Code Intelligence Platform — knowledge graphs, security scanning, and closed-loop AI development. 41 MCP tools, 7 sub-agent prompts, 50 security rules, 7 CLI workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|