@justmpm/ai-tool 0.4.0 → 0.4.2
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
CHANGED
|
@@ -97,6 +97,49 @@ ai-tool context src/hooks/useAuth.ts --format=json
|
|
|
97
97
|
|
|
98
98
|
Ideal para entender rapidamente a API publica de um arquivo.
|
|
99
99
|
|
|
100
|
+
### `areas` - Areas/Dominios Funcionais
|
|
101
|
+
|
|
102
|
+
Lista todas as areas funcionais do projeto (auth, dashboard, stripe, etc).
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
ai-tool areas
|
|
106
|
+
ai-tool areas --format=json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Output:**
|
|
110
|
+
- Lista de areas detectadas automaticamente
|
|
111
|
+
- Contagem de arquivos por area
|
|
112
|
+
- Distribuicao de categorias por area
|
|
113
|
+
|
|
114
|
+
### `area` - Detalhe de uma Area
|
|
115
|
+
|
|
116
|
+
Mostra todos os arquivos de uma area especifica.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
ai-tool area auth
|
|
120
|
+
ai-tool area meus-pets --type=hook # Filtra por categoria
|
|
121
|
+
ai-tool area stripe --full # Mostra todos os arquivos
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Output:**
|
|
125
|
+
- Arquivos agrupados por categoria
|
|
126
|
+
- Descricao inferida de cada arquivo
|
|
127
|
+
|
|
128
|
+
### `areas init` - Configuracao de Areas
|
|
129
|
+
|
|
130
|
+
Gera arquivo de configuracao editavel para areas.
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
ai-tool areas init
|
|
134
|
+
ai-tool areas init --force # Sobrescreve config existente
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Cria `.analyze/areas.config.json` com:
|
|
138
|
+
- Areas detectadas automaticamente
|
|
139
|
+
- Patterns glob para cada area
|
|
140
|
+
- Keywords de deteccao
|
|
141
|
+
- Descricoes manuais de arquivos
|
|
142
|
+
|
|
100
143
|
## Servidor MCP
|
|
101
144
|
|
|
102
145
|
Integra com Claude Desktop e outras ferramentas MCP.
|
|
@@ -111,6 +154,9 @@ ai-tool --mcp
|
|
|
111
154
|
- `aitool_impact_analysis` - Analise de impacto
|
|
112
155
|
- `aitool_suggest_reads` - Sugestao de leitura
|
|
113
156
|
- `aitool_file_context` - Contexto do arquivo
|
|
157
|
+
- `aitool_list_areas` - Lista areas funcionais
|
|
158
|
+
- `aitool_area_detail` - Detalhe de uma area
|
|
159
|
+
- `aitool_areas_init` - Gera config de areas
|
|
114
160
|
|
|
115
161
|
### Configuracao Claude Code
|
|
116
162
|
|
|
@@ -148,7 +194,7 @@ Adicione ao `claude_desktop_config.json`:
|
|
|
148
194
|
## Uso Programatico
|
|
149
195
|
|
|
150
196
|
```typescript
|
|
151
|
-
import { map, dead, impact, suggest, context } from "@justmpm/ai-tool";
|
|
197
|
+
import { map, dead, impact, suggest, context, areas, area, areasInit } from "@justmpm/ai-tool";
|
|
152
198
|
|
|
153
199
|
// Mapa do projeto
|
|
154
200
|
const projectMap = await map({ format: "json" });
|
|
@@ -164,6 +210,15 @@ const suggestions = await suggest("Button", { limit: 5 });
|
|
|
164
210
|
|
|
165
211
|
// Contexto do arquivo
|
|
166
212
|
const fileContext = await context("Button", { format: "json" });
|
|
213
|
+
|
|
214
|
+
// Areas funcionais
|
|
215
|
+
const projectAreas = await areas({ format: "json" });
|
|
216
|
+
|
|
217
|
+
// Detalhe de uma area
|
|
218
|
+
const authArea = await area("auth", { type: "hook" });
|
|
219
|
+
|
|
220
|
+
// Gerar config de areas
|
|
221
|
+
await areasInit({ force: false });
|
|
167
222
|
```
|
|
168
223
|
|
|
169
224
|
## Opcoes
|
|
@@ -3194,7 +3194,10 @@ function getAllCodeFiles4(dir, files = [], baseDir = dir) {
|
|
|
3194
3194
|
}
|
|
3195
3195
|
|
|
3196
3196
|
// src/index.ts
|
|
3197
|
-
|
|
3197
|
+
import { createRequire } from "module";
|
|
3198
|
+
var require2 = createRequire(import.meta.url);
|
|
3199
|
+
var pkg = require2("../package.json");
|
|
3200
|
+
var VERSION = pkg.version;
|
|
3198
3201
|
|
|
3199
3202
|
export {
|
|
3200
3203
|
detectCategory,
|
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
impact,
|
|
11
11
|
map,
|
|
12
12
|
suggest
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WN7FTU6M.js";
|
|
14
14
|
|
|
15
15
|
// src/cli.ts
|
|
16
16
|
var HELP = `
|
|
@@ -85,7 +85,7 @@ async function main() {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
if (flags.mcp) {
|
|
88
|
-
const { startMcpServer } = await import("./server-
|
|
88
|
+
const { startMcpServer } = await import("./server-SPVMWDEO.js");
|
|
89
89
|
await startMcpServer();
|
|
90
90
|
return;
|
|
91
91
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -501,6 +501,6 @@ declare const AREA_DESCRIPTIONS: Record<string, string>;
|
|
|
501
501
|
* ```
|
|
502
502
|
*/
|
|
503
503
|
|
|
504
|
-
declare const VERSION
|
|
504
|
+
declare const VERSION: string;
|
|
505
505
|
|
|
506
506
|
export { AREA_DESCRIPTIONS, AREA_NAMES, type AreaConfig, type AreaDetailResult, type AreaFile, type AreaOptions, type AreasConfigFile, type AreasOptions, type AreasResult, type CommandOptions, type ContextOptions, type ContextResult, type DeadFile, type DeadOptions, type DeadResult, type DetectedArea, FOLDER_PATTERNS, type FileCategory, type FileInfo, type FolderStats, type FunctionInfo, type ImpactFile, type ImpactOptions, type ImpactResult, type ImportInfo, KEYWORD_PATTERNS, type MapOptions, type MapResult, type OutputFormat, type ParamInfo, type RiskInfo, type SuggestOptions, type SuggestResult, type Suggestion, type SuggestionPriority, type TypeInfo, type TypeKind, VERSION, area, areas, areasInit, categoryIcons, clearFirebaseCache, configExists, context, dead, deadFix, detectCategory, detectFileAreas, filterCloudFunctionsFalsePositives, getAreaDescription, getAreaName, getCacheDir, getFileDescription, hasFirebaseFunctions, impact, inferFileDescription, invalidateCache, isCacheValid, isCodeFile, isEntryPoint, isExportedCloudFunction, isFirebaseProject, map, readConfig, removeArea, setArea, setFileDescription, suggest, writeConfig };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED