@ftarganski/omni-ai 1.1.9 → 1.2.0
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 +314 -1115
- package/dist/cli/bin.js +1043 -155
- package/dist/history.d.ts +1 -0
- package/dist/history.js +545 -0
- package/dist/index.d.ts +1 -0
- package/package.json +11 -6
package/README.md
CHANGED
|
@@ -1,412 +1,123 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Ftarganski/omni-ai/main/docs/images/logo.png" alt="omni-ai" width="140" />
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
# omni-ai
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Provider-agnostic AI agents and skills framework for TypeScript monorepos.**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Como funciona
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
cd meu-projeto
|
|
13
|
-
omni run backend-dev "crie o módulo de pedidos com CRUD e GraphQL"
|
|
14
|
-
│
|
|
15
|
-
▼
|
|
16
|
-
CLI (omni)
|
|
17
|
-
│ lê config/omni-ai.yaml ← provider, modelo e agentsDir
|
|
18
|
-
│ resolve "backend-dev" ← busca agents/**/*.yaml por name:
|
|
19
|
-
│ instancia o provider ← AnthropicProvider / OpenAIProvider
|
|
20
|
-
│ monta o SkillRegistry ← read-file, write-file, search-code...
|
|
21
|
-
│ cria o Agent → agent.run()
|
|
22
|
-
│
|
|
23
|
-
└─ Loop agentico:
|
|
24
|
-
1. Envia systemPrompt + input para o LLM
|
|
25
|
-
2. LLM retorna texto ou tool calls
|
|
26
|
-
3. Skills são executadas (lê/escreve arquivos no meu-projeto/)
|
|
27
|
-
4. Resultados voltam para o LLM
|
|
28
|
-
5. Repete até concluir ou atingir maxIterations
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
As skills (`read-file`, `write-file`, `search-code`, etc.) operam sempre no **diretório onde você executou o comando** (`process.cwd()`). O config e os agents ficam no repositório `omni-ai`.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Instalação
|
|
36
|
-
|
|
37
|
-
### Pré-requisitos
|
|
38
|
-
|
|
39
|
-
| Ferramenta | Versão mínima |
|
|
40
|
-
|------------|---------------|
|
|
41
|
-
| Node.js | 22.x |
|
|
42
|
-
| pnpm | 9.x |
|
|
43
|
-
|
|
44
|
-
### 1. Clonar e instalar
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
git clone https://github.com/Ftarganski/omni-ai.git
|
|
48
|
-
cd omni-ai
|
|
49
|
-
pnpm install
|
|
50
|
-
pnpm build
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 2. Configurar o provider
|
|
54
|
-
|
|
55
|
-
**Opção A — wizard interativo (recomendado):**
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
omni init
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**Opção B — manual:**
|
|
8
|
+
Configure any LLM provider — Anthropic, OpenAI, GitHub Copilot, Google Gemini, Groq, Ollama, or any self-hosted endpoint — and compose reusable agents for your projects via CLI or programmatic API.
|
|
62
9
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
Edite `config/omni-ai.yaml` e `.env` de acordo com o provider escolhido. Veja a seção [Providers](#providers) abaixo.
|
|
69
|
-
|
|
70
|
-
### 3. Disponibilizar o CLI globalmente
|
|
71
|
-
|
|
72
|
-
**Opção A — via npm (pacote publicado):**
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
npm install -g @ftarganski/omni-ai
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**Opção B — via link local (desenvolvimento):**
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
# Na raiz do omni-ai, uma vez só
|
|
82
|
-
pnpm build
|
|
83
|
-
npm link bundle/omni-ai
|
|
84
|
-
```
|
|
10
|
+
[](https://www.npmjs.com/package/@ftarganski/omni-ai)
|
|
11
|
+
[](https://github.com/Ftarganski/omni-ai/blob/main/LICENSE)
|
|
12
|
+
[](https://nodejs.org)
|
|
13
|
+
[](https://www.typescriptlang.org)
|
|
14
|
+
</div>
|
|
85
15
|
|
|
86
|
-
|
|
16
|
+
<br />
|
|
87
17
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
# A partir do próprio omni-ai (ou de qualquer projeto)
|
|
92
|
-
omni list agents
|
|
93
|
-
omni list providers
|
|
94
|
-
omni list skills
|
|
95
|
-
```
|
|
18
|
+
<div align="center">
|
|
19
|
+
<img src="https://raw.githubusercontent.com/Ftarganski/omni-ai/main/docs/images/banner.png" alt="omni-ai — run AI agents for backend, frontend, UX and QA" width="100%" />
|
|
20
|
+
</div>
|
|
96
21
|
|
|
97
22
|
---
|
|
98
23
|
|
|
99
|
-
##
|
|
24
|
+
## Why omni-ai
|
|
100
25
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
# Com sessão de memória (persiste entre runs)
|
|
109
|
-
omni run backend-dev "continue o módulo de pedidos" --session user1:feature1
|
|
110
|
-
|
|
111
|
-
# Modo verbose — mostra iterações e tokens por step
|
|
112
|
-
omni run qa-backend "valide src/orders/orders.service.ts" --verbose
|
|
113
|
-
|
|
114
|
-
# Salvar output em arquivo
|
|
115
|
-
omni run backend-dev "crie módulo de notificações" --output implementacao.md
|
|
116
|
-
```
|
|
26
|
+
- **Provider-agnostic** — swap LLM providers with one line in your config, no code changes
|
|
27
|
+
- **21 ready-made agents** — backend (NestJS), frontend (React), UX audit, QA validation
|
|
28
|
+
- **Composable skills** — 20+ tools (filesystem, git, HTTP, accessibility audit, image analysis) that agents call as needed
|
|
29
|
+
- **Session memory** — SQLite-backed persistent sessions with semantic search and token compaction
|
|
30
|
+
- **Third-party agent history** — import and search local history from Claude Code and Codex, scoped to your current project by default
|
|
31
|
+
- **Extensible** — define custom agents in YAML, skills in TypeScript, providers via `IProvider`
|
|
32
|
+
- **MCP-compatible** — expose skills as MCP tools or consume any MCP server as skills
|
|
117
33
|
|
|
118
34
|
---
|
|
119
35
|
|
|
120
|
-
##
|
|
121
|
-
|
|
122
|
-
### `omni run`
|
|
36
|
+
## How It Works
|
|
123
37
|
|
|
124
38
|
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
# Frontend — gera componente
|
|
143
|
-
omni run frontend-dev "crie a página de listagem de pedidos com filtros e paginação"
|
|
144
|
-
|
|
145
|
-
# UX — audita e corrige problemas
|
|
146
|
-
omni run ux-lead "audite o componente OrderForm"
|
|
147
|
-
|
|
148
|
-
# QA — valida código gerado
|
|
149
|
-
omni run qa-lead "valide todos os arquivos em src/orders/"
|
|
150
|
-
|
|
151
|
-
# Com memória entre sessões
|
|
152
|
-
omni run backend-dev "o que você implementou no módulo de customers?" --session dev1:customers
|
|
153
|
-
|
|
154
|
-
# Agente específico + output em arquivo
|
|
155
|
-
omni run backend-schema "crie o schema para a entidade Invoice" --output invoice-schema.md
|
|
39
|
+
cd my-project
|
|
40
|
+
omni run backend-dev "create the orders module with CRUD and GraphQL"
|
|
41
|
+
│
|
|
42
|
+
▼
|
|
43
|
+
CLI (omni)
|
|
44
|
+
│ reads config/omni-ai.yaml ← provider, model, agentsDir
|
|
45
|
+
│ resolves "backend-dev" ← finds agents/**/*.yaml by name:
|
|
46
|
+
│ instantiates the provider ← AnthropicProvider / OpenAIProvider
|
|
47
|
+
│ builds the SkillRegistry ← read-file, write-file, search-code…
|
|
48
|
+
│ creates the Agent → agent.run()
|
|
49
|
+
│
|
|
50
|
+
└─ Agentic loop:
|
|
51
|
+
1. Sends systemPrompt + input to the LLM
|
|
52
|
+
2. LLM returns text or tool calls
|
|
53
|
+
3. Skills execute (read/write files in my-project/)
|
|
54
|
+
4. Results return to the LLM
|
|
55
|
+
5. Repeats until done or maxIterations reached
|
|
156
56
|
```
|
|
157
57
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
### `omni list`
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
omni list agents # Lista todos os agentes disponíveis (nome + descrição)
|
|
164
|
-
omni list skills # Lista todas as skills registradas
|
|
165
|
-
omni list providers # Lista os providers registrados e seus tipos
|
|
166
|
-
```
|
|
58
|
+
Skills always operate within **the directory where you run the command** (`process.cwd()`), never outside it.
|
|
167
59
|
|
|
168
60
|
---
|
|
169
61
|
|
|
170
|
-
|
|
62
|
+
## Quick Start
|
|
171
63
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
omni chain "<prompt>" <agent1> <agent2> [agent3...]
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
| Opção | Tipo | Descrição |
|
|
179
|
-
|-------|------|-----------|
|
|
180
|
-
| `--config <path>` | string | Caminho para o `omni-ai.yaml` |
|
|
181
|
-
| `--output <file>` | string | Salva o output final em arquivo |
|
|
182
|
-
| `--verbose` | flag | Imprime o output de cada agente intermediário |
|
|
183
|
-
| `--stream` | flag | Transmite tokens em tempo real para cada agente da cadeia |
|
|
184
|
-
|
|
185
|
-
**Exemplos:**
|
|
64
|
+
### 1. Install
|
|
186
65
|
|
|
187
66
|
```bash
|
|
188
|
-
|
|
189
|
-
omni chain "crie módulo de orders" backend-schema backend-dev qa-backend
|
|
190
|
-
|
|
191
|
-
# Geração de componente + auditoria UX
|
|
192
|
-
omni chain "crie a página de listagem de pedidos" frontend-dev ux-reviewer
|
|
193
|
-
|
|
194
|
-
# Com output salvo
|
|
195
|
-
omni chain "crie o módulo de customers" backend-schema backend-dev qa-backend --output customers.md
|
|
196
|
-
|
|
197
|
-
# Verbose — mostra output intermediário de cada agente
|
|
198
|
-
omni chain "crie módulo de invoices" backend-schema backend-dev --verbose
|
|
199
|
-
|
|
200
|
-
# Streaming em tempo real ao longo da cadeia
|
|
201
|
-
omni chain "crie e revise o módulo de orders" backend-dev qa-backend --stream
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**Output visual:**
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
◆ backend-schema [anthropic / claude-sonnet-4-6]
|
|
208
|
-
... (3 iterações)
|
|
209
|
-
|
|
210
|
-
↓ saída passada para: backend-dev
|
|
211
|
-
|
|
212
|
-
◆ backend-dev [anthropic / claude-sonnet-4-6]
|
|
213
|
-
... (8 iterações)
|
|
214
|
-
|
|
215
|
-
↓ saída passada para: qa-backend
|
|
216
|
-
|
|
217
|
-
◆ qa-backend [anthropic / claude-sonnet-4-6]
|
|
218
|
-
... (4 iterações)
|
|
219
|
-
|
|
220
|
-
<output final do qa-backend>
|
|
221
|
-
|
|
222
|
-
Tokens: 18.400 entrada · 5.200 saída · ~$0.084
|
|
67
|
+
npm install -g @ftarganski/omni-ai
|
|
223
68
|
```
|
|
224
69
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
### `omni init`
|
|
228
|
-
|
|
229
|
-
Wizard interativo que gera `config/omni-ai.yaml` e atualiza o `.env` sem editar arquivos manualmente.
|
|
70
|
+
### 2. Configure (interactive wizard)
|
|
230
71
|
|
|
231
72
|
```bash
|
|
232
73
|
omni init
|
|
233
74
|
```
|
|
234
75
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
1. Perguntar qual provider usar (Copilot, Anthropic, OpenAI ou Custom/self-hosted)
|
|
238
|
-
2. Solicitar a API key ou token via campo oculto (não aparece no terminal)
|
|
239
|
-
3. Permitir selecionar o modelo padrão
|
|
240
|
-
4. Opcionalmente configurar um segundo provider para agentes específicos
|
|
241
|
-
5. Gerar `config/omni-ai.yaml` e atualizar `.env` preservando entradas existentes
|
|
242
|
-
6. Exibir os próximos passos com exemplos de comandos
|
|
243
|
-
|
|
244
|
-
**Quando usar:** na primeira vez que configurar o omni-ai, ou quando quiser trocar ou adicionar um provider.
|
|
245
|
-
|
|
246
|
-
> Se `config/omni-ai.yaml` já existir, o wizard pergunta antes de sobrescrever.
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
### `omni serve`
|
|
251
|
-
|
|
252
|
-
Inicia um servidor HTTP local para executar agentes via REST ou SSE.
|
|
253
|
-
|
|
254
|
-
```
|
|
255
|
-
omni serve [opções]
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
| Opção | Tipo | Descrição |
|
|
259
|
-
|-------|------|-----------|
|
|
260
|
-
| `--port <number>` | number | Porta (padrão: 3000) |
|
|
261
|
-
| `--config <path>` | string | Caminho para `omni-ai.yaml` |
|
|
262
|
-
|
|
263
|
-
**Endpoints:**
|
|
264
|
-
|
|
265
|
-
| Método | Rota | Descrição |
|
|
266
|
-
|--------|------|-----------|
|
|
267
|
-
| `GET` | `/health` | Status do servidor e versão |
|
|
268
|
-
| `GET` | `/agents` | Lista todos os agentes disponíveis |
|
|
269
|
-
| `POST` | `/run` | Executa um agente (JSON response) |
|
|
270
|
-
| `POST` | `/run/stream` | Executa um agente com streaming SSE |
|
|
271
|
-
|
|
272
|
-
```bash
|
|
273
|
-
# Iniciar o servidor
|
|
274
|
-
omni serve --port 4000
|
|
275
|
-
|
|
276
|
-
# Executar um agente via API
|
|
277
|
-
curl -X POST http://localhost:3000/run \
|
|
278
|
-
-H "Content-Type: application/json" \
|
|
279
|
-
-d '{"agent": "backend-dev", "prompt": "liste os endpoints do módulo de orders"}'
|
|
280
|
-
|
|
281
|
-
# Com sessão
|
|
282
|
-
curl -X POST http://localhost:3000/run \
|
|
283
|
-
-d '{"agent": "backend-dev", "prompt": "continue o módulo de customers", "session": "dev1:customers"}'
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
### `omni watch`
|
|
289
|
-
|
|
290
|
-
Reexecuta um agente automaticamente quando arquivos do projeto mudam.
|
|
291
|
-
|
|
292
|
-
```
|
|
293
|
-
omni watch <agent> "<prompt>" [opções]
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
| Opção | Tipo | Descrição |
|
|
297
|
-
|-------|------|-----------|
|
|
298
|
-
| `--config <path>` | string | Caminho para `omni-ai.yaml` |
|
|
299
|
-
| `--glob <pattern>` | string | Glob dos arquivos a observar (padrão: `src/**/*.{ts,js,yaml,json}`) |
|
|
300
|
-
| `--debounce <ms>` | number | Delay de debounce em ms (padrão: 500) |
|
|
301
|
-
| `--stream` | flag | Transmite tokens em tempo real |
|
|
302
|
-
|
|
303
|
-
```bash
|
|
304
|
-
# Reexecuta qa-backend sempre que um .ts muda
|
|
305
|
-
omni watch qa-backend "valide os arquivos modificados" --glob "src/**/*.ts"
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
### `omni eval`
|
|
311
|
-
|
|
312
|
-
Avalia um agente contra um dataset de pares `(input, expected)`.
|
|
313
|
-
|
|
314
|
-
```
|
|
315
|
-
omni eval <agent> <dataset.json> [opções]
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
| Opção | Tipo | Descrição |
|
|
319
|
-
|-------|------|-----------|
|
|
320
|
-
| `--config <path>` | string | Caminho para `omni-ai.yaml` |
|
|
321
|
-
| `--concurrency <n>` | number | Avaliações paralelas (padrão: 3) |
|
|
322
|
-
| `--output <file>` | string | Salva relatório JSON em arquivo |
|
|
323
|
-
|
|
324
|
-
**Formato do dataset:**
|
|
325
|
-
|
|
326
|
-
```json
|
|
327
|
-
[
|
|
328
|
-
{ "input": "qual é a capital do Brasil?", "expected": "Brasília" },
|
|
329
|
-
{ "input": "o que é TypeScript?", "expected": "superset tipado de JavaScript" }
|
|
330
|
-
]
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
**Saída:**
|
|
334
|
-
|
|
335
|
-
```
|
|
336
|
-
◆ omni eval agent: backend-dev dataset: qa.json
|
|
337
|
-
|
|
338
|
-
✓ q1 exact
|
|
339
|
-
✓ q2 contains
|
|
340
|
-
✗ q3 miss
|
|
76
|
+
The wizard asks for your provider and API key, then generates `config/omni-ai.yaml` and `.env`.
|
|
341
77
|
|
|
342
|
-
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
---
|
|
346
|
-
|
|
347
|
-
### `omni export`
|
|
348
|
-
|
|
349
|
-
Exporta o histórico de uma sessão como Markdown ou JSON.
|
|
350
|
-
|
|
351
|
-
```
|
|
352
|
-
omni export <sessionId> [opções]
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
| Opção | Tipo | Descrição |
|
|
356
|
-
|-------|------|-----------|
|
|
357
|
-
| `--format <format>` | `markdown` \| `json` | Formato de saída (padrão: `markdown`) |
|
|
358
|
-
| `--output <file>` | string | Salva em arquivo em vez de stdout |
|
|
359
|
-
| `--limit <n>` | number | Limita às últimas N mensagens |
|
|
78
|
+
**Or configure manually:**
|
|
360
79
|
|
|
361
80
|
```bash
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
# Exportar como JSON para arquivo
|
|
366
|
-
omni export dev1:customers --format json --output session.json
|
|
81
|
+
cp config/omni-ai.example.yaml config/omni-ai.yaml
|
|
82
|
+
cp .env.example .env
|
|
83
|
+
# edit both files with your provider and key
|
|
367
84
|
```
|
|
368
85
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
### `omni mcp serve`
|
|
372
|
-
|
|
373
|
-
Expõe todas as skills registradas como ferramentas MCP sobre stdio. Permite que clientes MCP (como Claude Desktop) chamem as skills diretamente.
|
|
86
|
+
### 3. Run your first agent
|
|
374
87
|
|
|
375
88
|
```bash
|
|
376
|
-
|
|
377
|
-
|
|
89
|
+
# enter your project directory
|
|
90
|
+
cd /path/to/my-project
|
|
378
91
|
|
|
379
|
-
|
|
92
|
+
# list available agents
|
|
93
|
+
omni list agents
|
|
380
94
|
|
|
381
|
-
|
|
95
|
+
# run an agent
|
|
96
|
+
omni run backend-dev "create the orders module with CRUD"
|
|
382
97
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
"mcpServers": {
|
|
386
|
-
"omni-ai": {
|
|
387
|
-
"command": "omni",
|
|
388
|
-
"args": ["mcp", "serve"]
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
98
|
+
# chain agents in a pipeline
|
|
99
|
+
omni chain "create orders module" backend-schema backend-dev qa-backend
|
|
392
100
|
```
|
|
393
101
|
|
|
394
102
|
---
|
|
395
103
|
|
|
396
104
|
## Providers
|
|
397
105
|
|
|
398
|
-
###
|
|
106
|
+
### Supported Providers
|
|
399
107
|
|
|
400
|
-
|
|
108
|
+
| Provider | Type | Key Required | Notes |
|
|
109
|
+
|----------|------|-------------|-------|
|
|
110
|
+
| GitHub Copilot | `copilot` | GitHub token | No separate account needed |
|
|
111
|
+
| Anthropic (Claude) | `anthropic` | Anthropic API key | Claude Opus, Sonnet, Haiku |
|
|
112
|
+
| OpenAI (GPT) | `openai` | OpenAI API key | GPT-4o, o1, o3-mini |
|
|
113
|
+
| Google Gemini | `google` | Google API key | Gemini 2.0 Flash, 1.5 Pro |
|
|
114
|
+
| Groq | `groq` | Groq API key | Llama, DeepSeek (free tier) |
|
|
115
|
+
| Ollama | `ollama` | None | Local models, no API key |
|
|
116
|
+
| Custom / Azure | `custom` | Varies | Any OpenAI-compatible endpoint |
|
|
401
117
|
|
|
402
|
-
|
|
403
|
-
# 1. Autenticar com GitHub CLI (se ainda não fez)
|
|
404
|
-
gh auth login
|
|
118
|
+
### Configuration Examples
|
|
405
119
|
|
|
406
|
-
|
|
407
|
-
gh auth token
|
|
408
|
-
# Copia o valor e cola no .env abaixo
|
|
409
|
-
```
|
|
120
|
+
**GitHub Copilot** (recommended if you already have a GitHub subscription):
|
|
410
121
|
|
|
411
122
|
```bash
|
|
412
123
|
# .env
|
|
@@ -416,7 +127,6 @@ GITHUB_TOKEN=ghp_...
|
|
|
416
127
|
```yaml
|
|
417
128
|
# config/omni-ai.yaml
|
|
418
129
|
defaultProvider: copilot
|
|
419
|
-
|
|
420
130
|
providers:
|
|
421
131
|
- name: copilot
|
|
422
132
|
type: copilot
|
|
@@ -425,11 +135,7 @@ providers:
|
|
|
425
135
|
defaultModel: gpt-4o
|
|
426
136
|
```
|
|
427
137
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
---
|
|
431
|
-
|
|
432
|
-
### Anthropic (Claude)
|
|
138
|
+
**Anthropic (Claude):**
|
|
433
139
|
|
|
434
140
|
```bash
|
|
435
141
|
# .env
|
|
@@ -437,9 +143,7 @@ ANTHROPIC_API_KEY=sk-ant-api03-...
|
|
|
437
143
|
```
|
|
438
144
|
|
|
439
145
|
```yaml
|
|
440
|
-
# config/omni-ai.yaml
|
|
441
146
|
defaultProvider: anthropic
|
|
442
|
-
|
|
443
147
|
providers:
|
|
444
148
|
- name: anthropic
|
|
445
149
|
type: anthropic
|
|
@@ -447,389 +151,219 @@ providers:
|
|
|
447
151
|
defaultModel: claude-sonnet-4-6
|
|
448
152
|
```
|
|
449
153
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
**Modelos disponíveis:**
|
|
453
|
-
|
|
454
|
-
| Modelo | ID | Uso recomendado |
|
|
455
|
-
|--------|----|-----------------|
|
|
456
|
-
| Claude Opus 4.7 | `claude-opus-4-7` | Raciocínio complexo, contexto longo |
|
|
457
|
-
| Claude Sonnet 4.6 | `claude-sonnet-4-6` | Qualidade/velocidade balanceados ✓ |
|
|
458
|
-
| Claude Haiku 4.5 | `claude-haiku-4-5-20251001` | Tarefas rápidas e de baixo custo |
|
|
459
|
-
|
|
460
|
-
> **Atenção:** A API Anthropic requer `temperature <= 1.0`. O adapter valida isso automaticamente.
|
|
461
|
-
|
|
462
|
-
---
|
|
463
|
-
|
|
464
|
-
### OpenAI (GPT)
|
|
465
|
-
|
|
466
|
-
```bash
|
|
467
|
-
# .env
|
|
468
|
-
OPENAI_API_KEY=sk-proj-...
|
|
469
|
-
```
|
|
154
|
+
**Multiple providers** (each agent can use a different one):
|
|
470
155
|
|
|
471
156
|
```yaml
|
|
472
|
-
|
|
473
|
-
defaultProvider: openai
|
|
474
|
-
|
|
157
|
+
defaultProvider: copilot
|
|
475
158
|
providers:
|
|
476
|
-
- name:
|
|
477
|
-
type:
|
|
478
|
-
apiKey: ${
|
|
159
|
+
- name: copilot
|
|
160
|
+
type: copilot
|
|
161
|
+
apiKey: ${GITHUB_TOKEN}
|
|
479
162
|
defaultModel: gpt-4o
|
|
480
|
-
```
|
|
481
163
|
|
|
482
|
-
|
|
164
|
+
- name: anthropic
|
|
165
|
+
type: anthropic
|
|
166
|
+
apiKey: ${ANTHROPIC_API_KEY}
|
|
167
|
+
defaultModel: claude-sonnet-4-6
|
|
483
168
|
|
|
484
|
-
|
|
169
|
+
- name: ollama
|
|
170
|
+
type: ollama # no API key required
|
|
171
|
+
defaultModel: llama3.2
|
|
172
|
+
```
|
|
485
173
|
|
|
486
|
-
|
|
487
|
-
|--------|----|-----------------|
|
|
488
|
-
| GPT-4o | `gpt-4o` | Multimodal, raciocínio forte |
|
|
489
|
-
| GPT-4o mini | `gpt-4o-mini` | Rápido, custo eficiente |
|
|
490
|
-
| o1 | `o1` | Raciocínio avançado |
|
|
491
|
-
| o3-mini | `o3-mini` | Raciocínio rápido |
|
|
174
|
+
In any agent YAML, add `provider: anthropic` to override the default for that agent only.
|
|
492
175
|
|
|
493
176
|
---
|
|
494
177
|
|
|
495
|
-
|
|
178
|
+
## CLI Reference
|
|
179
|
+
|
|
180
|
+
### `omni run` — Run a single agent
|
|
496
181
|
|
|
497
182
|
```bash
|
|
498
|
-
|
|
499
|
-
GOOGLE_API_KEY=AIza...
|
|
183
|
+
omni run <agent> "<prompt>" [options]
|
|
500
184
|
```
|
|
501
185
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
186
|
+
| Option | Description |
|
|
187
|
+
|--------|-------------|
|
|
188
|
+
| `--config <path>` | Path to `omni-ai.yaml` (auto-detected by default) |
|
|
189
|
+
| `--session <id>` | Session ID `"resourceId:threadId"` — enables SQLite memory across runs |
|
|
190
|
+
| `--output <file>` | Save output to a file |
|
|
191
|
+
| `--verbose` | Show each iteration, tool calls, and token count |
|
|
192
|
+
| `--stream` | Stream tokens in real time |
|
|
505
193
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
194
|
+
```bash
|
|
195
|
+
omni run backend-dev "create the customers module with CRUD and GraphQL"
|
|
196
|
+
omni run frontend-dev "create the orders listing page with filters and pagination"
|
|
197
|
+
omni run ux-lead "audit the OrderForm component"
|
|
198
|
+
omni run qa-lead "validate all files in src/orders/"
|
|
199
|
+
omni run backend-dev "what did you implement in the last session?" --session dev1:orders
|
|
511
200
|
```
|
|
512
201
|
|
|
513
|
-
Como obter: [aistudio.google.com](https://aistudio.google.com) → Get API key
|
|
514
|
-
|
|
515
|
-
**Modelos disponíveis:**
|
|
516
|
-
|
|
517
|
-
| Modelo | ID | Uso recomendado |
|
|
518
|
-
|--------|----|-----------------|
|
|
519
|
-
| Gemini 2.0 Flash | `gemini-2.0-flash` | Rápido, multimodal, custo baixo ✓ |
|
|
520
|
-
| Gemini 1.5 Pro | `gemini-1.5-pro` | Contexto longo (1M tokens) |
|
|
521
|
-
|
|
522
202
|
---
|
|
523
203
|
|
|
524
|
-
###
|
|
204
|
+
### `omni chain` — Pipeline multiple agents
|
|
525
205
|
|
|
526
206
|
```bash
|
|
527
|
-
|
|
528
|
-
GROQ_API_KEY=gsk_...
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
```yaml
|
|
532
|
-
# config/omni-ai.yaml
|
|
533
|
-
providers:
|
|
534
|
-
- name: groq
|
|
535
|
-
type: groq
|
|
536
|
-
apiKey: ${GROQ_API_KEY}
|
|
537
|
-
defaultModel: llama-3.3-70b-versatile
|
|
207
|
+
omni chain "<prompt>" <agent1> <agent2> [agent3...]
|
|
538
208
|
```
|
|
539
209
|
|
|
540
|
-
|
|
210
|
+
The output of each agent becomes the input of the next.
|
|
541
211
|
|
|
542
|
-
|
|
212
|
+
```bash
|
|
213
|
+
# Schema → implementation → validation
|
|
214
|
+
omni chain "create orders module" backend-schema backend-dev qa-backend
|
|
543
215
|
|
|
544
|
-
|
|
216
|
+
# Component generation + UX audit
|
|
217
|
+
omni chain "create orders listing page" frontend-dev ux-reviewer
|
|
545
218
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
providers:
|
|
549
|
-
- name: ollama
|
|
550
|
-
type: ollama
|
|
551
|
-
defaultModel: llama3.2
|
|
552
|
-
# baseUrl padrão: http://localhost:11434/v1
|
|
219
|
+
# With output saved to file
|
|
220
|
+
omni chain "create customers module" backend-schema backend-dev qa-backend --output customers.md
|
|
553
221
|
```
|
|
554
222
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
---
|
|
558
|
-
|
|
559
|
-
### Custom / self-hosted (Azure, vLLM, LM Studio...)
|
|
223
|
+
**Visual output:**
|
|
560
224
|
|
|
561
|
-
Qualquer endpoint compatível com a API OpenAI de chat completions:
|
|
562
|
-
|
|
563
|
-
```yaml
|
|
564
|
-
# config/omni-ai.yaml
|
|
565
|
-
providers:
|
|
566
|
-
- name: azure
|
|
567
|
-
type: custom
|
|
568
|
-
baseUrl: https://meu-recurso.openai.azure.com/openai/deployments/gpt-4o
|
|
569
|
-
apiKey: ${AZURE_API_KEY}
|
|
570
|
-
defaultModel: gpt-4o
|
|
571
225
|
```
|
|
226
|
+
◆ backend-schema [anthropic / claude-sonnet-4-6]
|
|
227
|
+
... (3 iterations)
|
|
572
228
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
---
|
|
229
|
+
↓ output passed to: backend-dev
|
|
576
230
|
|
|
577
|
-
|
|
231
|
+
◆ backend-dev [anthropic / claude-sonnet-4-6]
|
|
232
|
+
... (8 iterations)
|
|
578
233
|
|
|
579
|
-
|
|
234
|
+
↓ output passed to: qa-backend
|
|
580
235
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
providers:
|
|
585
|
-
- name: copilot
|
|
586
|
-
type: copilot
|
|
587
|
-
apiKey: ${GITHUB_TOKEN}
|
|
588
|
-
defaultModel: gpt-4o
|
|
589
|
-
|
|
590
|
-
- name: anthropic
|
|
591
|
-
type: anthropic
|
|
592
|
-
apiKey: ${ANTHROPIC_API_KEY}
|
|
593
|
-
defaultModel: claude-sonnet-4-6
|
|
236
|
+
◆ qa-backend [anthropic / claude-sonnet-4-6]
|
|
237
|
+
... (4 iterations)
|
|
594
238
|
|
|
595
|
-
|
|
596
|
-
type: custom
|
|
597
|
-
baseUrl: http://localhost:11434/v1
|
|
598
|
-
defaultModel: llama3.2
|
|
239
|
+
Tokens: 18,400 input · 5,200 output · ~$0.084
|
|
599
240
|
```
|
|
600
241
|
|
|
601
|
-
No arquivo YAML do agente, basta declarar `provider: anthropic` para sobrescrever o padrão apenas para aquele agente.
|
|
602
|
-
|
|
603
242
|
---
|
|
604
243
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
### `omni-ai.yaml`
|
|
608
|
-
|
|
609
|
-
```yaml
|
|
610
|
-
version: "1"
|
|
611
|
-
|
|
612
|
-
# Provider padrão para todos os agentes (a menos que o agente sobrescreva)
|
|
613
|
-
defaultProvider: copilot
|
|
614
|
-
|
|
615
|
-
# Diretório dos YAML de agentes (relativo à raiz do omni-ai)
|
|
616
|
-
agentsDir: agents
|
|
244
|
+
### Other Commands
|
|
617
245
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
Você é um revisor de código especialista...
|
|
631
|
-
skills:
|
|
632
|
-
- read-file
|
|
633
|
-
- search-code
|
|
634
|
-
maxIterations: 5
|
|
635
|
-
|
|
636
|
-
# Agente com override de provider/modelo
|
|
637
|
-
- name: doc-writer
|
|
638
|
-
description: Gera documentação
|
|
639
|
-
provider: anthropic # sobrescreve defaultProvider só para este agente
|
|
640
|
-
model: claude-haiku-4-5-20251001 # sobrescreve defaultModel
|
|
641
|
-
systemPrompt: |
|
|
642
|
-
Você é um redator técnico...
|
|
643
|
-
maxIterations: 3
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
### Herança de provider e modelo
|
|
647
|
-
|
|
648
|
-
```
|
|
649
|
-
omni-ai.yaml
|
|
650
|
-
└─ defaultProvider: copilot ← se aplica a todos os agentes
|
|
651
|
-
└─ providers[copilot]
|
|
652
|
-
└─ defaultModel: gpt-4o ← se aplica a todos os agentes
|
|
653
|
-
|
|
654
|
-
agents/backend/backend-dev.yaml
|
|
655
|
-
├─ provider: (ausente) → usa defaultProvider (copilot)
|
|
656
|
-
├─ provider: anthropic → sobrescreve só para este agente
|
|
657
|
-
├─ model: (ausente) → usa defaultModel do provider resolvido
|
|
658
|
-
└─ model: gpt-4o-mini → sobrescreve só para este agente
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
### Campos do agente YAML
|
|
662
|
-
|
|
663
|
-
| Campo | Tipo | Padrão | Descrição |
|
|
664
|
-
|-------|------|--------|-----------|
|
|
665
|
-
| `name` | `string` | obrigatório | Identificador único |
|
|
666
|
-
| `description` | `string` | obrigatório | O que o agente faz |
|
|
667
|
-
| `provider` | `string` | herda | Nome do provider — omita para usar `defaultProvider` |
|
|
668
|
-
| `model` | `string` | herda | ID do modelo — omita para usar `defaultModel` do provider |
|
|
669
|
-
| `systemPrompt` | `string` | obrigatório | Instruções do agente |
|
|
670
|
-
| `skills` | `string[]` | `[]` | Skills que o agente pode chamar como ferramentas |
|
|
671
|
-
| `maxIterations` | `number` | `10` | Máximo de iterações do loop agentico |
|
|
672
|
-
| `temperature` | `number` | padrão do provider | Temperatura de amostragem (0–2; max 1.0 para Anthropic) |
|
|
673
|
-
|
|
674
|
-
---
|
|
675
|
-
|
|
676
|
-
## Catálogo de agentes
|
|
677
|
-
|
|
678
|
-
### Backend (7 agentes)
|
|
679
|
-
|
|
680
|
-
| Agente | Arquivo | O que faz |
|
|
681
|
-
|--------|---------|-----------|
|
|
682
|
-
| `backend-dev` | `agents/backend/backend-dev.yaml` | Orquestrador — feature NestJS completa: schema → serviço → resolver → listeners → tests |
|
|
683
|
-
| `backend-schema` | `agents/backend/backend-schema.yaml` | Schema DynamoDB OneTable com `defineSchema()` |
|
|
684
|
-
| `backend-service` | `agents/backend/backend-service.yaml` | NestJS service com CRUD, eventos, error helpers, caching |
|
|
685
|
-
| `backend-resolver` | `agents/backend/backend-resolver.yaml` | GraphQL resolver com padrão federation + SDL |
|
|
686
|
-
| `backend-listener` | `agents/backend/backend-listener.yaml` | Event listeners com `@OnEventCatcher` |
|
|
687
|
-
| `backend-test` | `agents/backend/backend-test.yaml` | Testes Jest de integração com DynamoDB local real |
|
|
688
|
-
| `backend-atom-app` | `agents/backend/backend-atom-app.yaml` | Conectores Atom framework (sessões, ARNs, roteamento de mensagens) |
|
|
689
|
-
|
|
690
|
-
### Frontend (5 agentes)
|
|
691
|
-
|
|
692
|
-
| Agente | Arquivo | O que faz |
|
|
693
|
-
|--------|---------|-----------|
|
|
694
|
-
| `frontend-dev` | `agents/frontend/frontend-dev.yaml` | Orquestrador — feature React completa: route → componentes → hooks |
|
|
695
|
-
| `frontend-ui-component` | `agents/frontend/frontend-ui-component.yaml` | Componentes UI primitivos estilo shadcn/ui com CVA + Radix |
|
|
696
|
-
| `frontend-module-component` | `agents/frontend/frontend-module-component.yaml` | Componentes de feature conectados a dados (TanStack Query) |
|
|
697
|
-
| `frontend-page-route` | `agents/frontend/frontend-page-route.yaml` | Páginas TanStack Router com layouts responsivos |
|
|
698
|
-
| `frontend-custom-hook` | `agents/frontend/frontend-custom-hook.yaml` | Custom React hooks tipados e SSR-safe |
|
|
699
|
-
|
|
700
|
-
### UX (5 agentes)
|
|
701
|
-
|
|
702
|
-
| Agente | Arquivo | O que faz |
|
|
703
|
-
|--------|---------|-----------|
|
|
704
|
-
| `ux-lead` | `agents/ux/ux-lead.yaml` | Orquestrador — auditoria UX completa em 10 dimensões, corrige críticos e documenta os demais |
|
|
705
|
-
| `ux-reviewer` | `agents/ux/ux-reviewer.yaml` | Revisão UX detalhada com findings por severidade (Critical / Moderate / Low) |
|
|
706
|
-
| `ux-states` | `agents/ux/ux-states.yaml` | Componentes de estado: Skeleton, Empty, Error e Success |
|
|
707
|
-
| `ux-forms` | `agents/ux/ux-forms.yaml` | Formulários com validação, autocomplete, acessibilidade e estados de loading |
|
|
708
|
-
| `ux-motion` | `agents/ux/ux-motion.yaml` | Micro-interações e transições com `motion-safe:` obrigatório |
|
|
709
|
-
|
|
710
|
-
### QA (4 agentes)
|
|
711
|
-
|
|
712
|
-
| Agente | Arquivo | O que faz |
|
|
713
|
-
|--------|---------|-----------|
|
|
714
|
-
| `qa-lead` | `agents/qa/qa-lead.yaml` | Orquestrador — classifica arquivos, delega aos agentes especializados e emite veredicto de merge |
|
|
715
|
-
| `qa-frontend` | `agents/qa/qa-frontend.yaml` | Valida React/TypeScript: imports, tokens Tailwind, responsividade, acessibilidade |
|
|
716
|
-
| `qa-ux` | `agents/qa/qa-ux.yaml` | Valida UX: feedback states, formulários, motion, content tone |
|
|
717
|
-
| `qa-backend` | `agents/qa/qa-backend.yaml` | Valida NestJS: services, resolvers, schema GraphQL, listeners, testes |
|
|
246
|
+
| Command | Description |
|
|
247
|
+
|---------|-------------|
|
|
248
|
+
| `omni list agents` | List all available agents with names and descriptions |
|
|
249
|
+
| `omni list skills` | List all registered skills |
|
|
250
|
+
| `omni list providers` | List registered providers and their types |
|
|
251
|
+
| `omni init` | Interactive wizard to generate `omni-ai.yaml` and `.env` |
|
|
252
|
+
| `omni serve [--port N]` | Start a local HTTP server (REST + SSE) to call agents via API |
|
|
253
|
+
| `omni watch <agent> "<prompt>"` | Re-run an agent automatically on file changes |
|
|
254
|
+
| `omni eval <agent> <dataset.json>` | Evaluate an agent against an `(input, expected)` dataset |
|
|
255
|
+
| `omni export <sessionId>` | Export session history as Markdown or JSON |
|
|
256
|
+
| `omni history sources\|import\|search\|show\|locate\|doctor` | Import and search third-party agent history (Claude Code, Codex) — scoped to the current project by default |
|
|
257
|
+
| `omni mcp serve` | Expose all registered skills as MCP tools over stdio (includes `search-history`, `show-history-event`) |
|
|
718
258
|
|
|
719
259
|
---
|
|
720
260
|
|
|
721
|
-
##
|
|
261
|
+
## Built-in Agents (21)
|
|
722
262
|
|
|
723
|
-
|
|
263
|
+
### Backend — NestJS / TypeScript (7 agents)
|
|
724
264
|
|
|
725
|
-
|
|
265
|
+
| Agent | What it does |
|
|
266
|
+
|-------|-------------|
|
|
267
|
+
| `backend-dev` | Orchestrator — full NestJS feature: schema → service → resolver → listeners → tests |
|
|
268
|
+
| `backend-schema` | DynamoDB OneTable schema with `defineSchema()` |
|
|
269
|
+
| `backend-service` | NestJS service with CRUD, events, error helpers, caching |
|
|
270
|
+
| `backend-resolver` | GraphQL resolver with federation pattern + SDL |
|
|
271
|
+
| `backend-listener` | Event listeners with `@OnEventCatcher` |
|
|
272
|
+
| `backend-test` | Jest integration tests with real local DynamoDB |
|
|
273
|
+
| `backend-atom-app` | Atom framework connectors (sessions, ARNs, message routing) |
|
|
726
274
|
|
|
727
|
-
|
|
728
|
-
|-------|-----------|
|
|
729
|
-
| `read-file` | Lê o conteúdo completo de um arquivo |
|
|
730
|
-
| `write-file` | Escreve ou sobrescreve um arquivo (cria diretórios automaticamente) |
|
|
731
|
-
| `list-directory` | Lista arquivos em um diretório (recursivo, filtro por extensão) |
|
|
275
|
+
### Frontend — React / TypeScript (5 agents)
|
|
732
276
|
|
|
733
|
-
|
|
277
|
+
| Agent | What it does |
|
|
278
|
+
|-------|-------------|
|
|
279
|
+
| `frontend-dev` | Orchestrator — full React feature: route → components → hooks |
|
|
280
|
+
| `frontend-ui-component` | Primitive UI components (shadcn/ui style, CVA + Radix) |
|
|
281
|
+
| `frontend-module-component` | Feature components connected to data (TanStack Query) |
|
|
282
|
+
| `frontend-page-route` | TanStack Router pages with responsive layouts |
|
|
283
|
+
| `frontend-custom-hook` | Typed, SSR-safe custom React hooks |
|
|
734
284
|
|
|
735
|
-
|
|
736
|
-
|-------|-----------|
|
|
737
|
-
| `search-code` | Busca texto ou regex em arquivos TypeScript/TSX |
|
|
285
|
+
### UX (5 agents)
|
|
738
286
|
|
|
739
|
-
|
|
287
|
+
| Agent | What it does |
|
|
288
|
+
|-------|-------------|
|
|
289
|
+
| `ux-lead` | Orchestrator — full UX audit across 10 dimensions, fixes critical issues |
|
|
290
|
+
| `ux-reviewer` | Detailed UX review with findings by severity (Critical / Moderate / Low) |
|
|
291
|
+
| `ux-states` | State components: Skeleton, Empty, Error, Success |
|
|
292
|
+
| `ux-forms` | Forms with validation, autocomplete, accessibility, loading states |
|
|
293
|
+
| `ux-motion` | Micro-interactions and transitions (always `motion-safe:`) |
|
|
740
294
|
|
|
741
|
-
|
|
742
|
-
|-------|-----------|
|
|
743
|
-
| `audit-accessibility` | Scan heurístico de a11y em TSX (alt, aria-label, foco, contraste...) |
|
|
295
|
+
### QA (4 agents)
|
|
744
296
|
|
|
745
|
-
|
|
297
|
+
| Agent | What it does |
|
|
298
|
+
|-------|-------------|
|
|
299
|
+
| `qa-lead` | Orchestrator — classifies files, delegates to specialists, emits merge verdict |
|
|
300
|
+
| `qa-frontend` | Validates React/TypeScript: imports, Tailwind tokens, responsiveness, a11y |
|
|
301
|
+
| `qa-ux` | Validates UX: feedback states, forms, motion, content tone |
|
|
302
|
+
| `qa-backend` | Validates NestJS: services, resolvers, GraphQL schema, listeners, tests |
|
|
746
303
|
|
|
747
|
-
|
|
748
|
-
|-------|-----------|
|
|
749
|
-
| `git-status` | Retorna o status atual do repositório |
|
|
750
|
-
| `git-diff` | Retorna o diff de um arquivo ou do repositório |
|
|
751
|
-
| `git-log` | Lista commits recentes com autoria e mensagem |
|
|
752
|
-
| `git-commit-message` | Gera mensagem de commit a partir de um diff (chamada LLM) |
|
|
753
|
-
|
|
754
|
-
**HTTP (`@ftarganski/omni-ai/skills/http`)**
|
|
755
|
-
|
|
756
|
-
| Skill | O que faz |
|
|
757
|
-
|-------|-----------|
|
|
758
|
-
| `http-request` | Requisição HTTP autenticada (Bearer, Basic, OAuth2 client-credentials) |
|
|
759
|
-
|
|
760
|
-
**Multimodal (`@ftarganski/omni-ai/skills/multimodal`)**
|
|
761
|
-
|
|
762
|
-
| Skill | O que faz |
|
|
763
|
-
|-------|-----------|
|
|
764
|
-
| `analyze-image` | Analisa screenshots, diagramas ou mockups via providers com visão |
|
|
765
|
-
|
|
766
|
-
**Backend (`@ftarganski/omni-ai/skills/backend`)**
|
|
304
|
+
---
|
|
767
305
|
|
|
768
|
-
|
|
769
|
-
|-------|-----------|
|
|
770
|
-
| `find-code-pattern` | Localiza padrões de código em arquivos TypeScript |
|
|
771
|
-
| `analyze-nestjs-module` | Analisa estrutura de módulos NestJS |
|
|
772
|
-
| `analyze-dynamo-schema` | Analisa schemas DynamoDB/TableService |
|
|
773
|
-
| `analyze-graphql-schema` | Analisa schemas GraphQL |
|
|
306
|
+
## Skills Library
|
|
774
307
|
|
|
775
|
-
|
|
308
|
+
Skills are the tools agents call during the agentic loop. All operate within `cwd` — never outside the target project.
|
|
776
309
|
|
|
777
|
-
|
|
|
778
|
-
|
|
779
|
-
|
|
|
780
|
-
|
|
|
781
|
-
| `
|
|
310
|
+
| Category | Subpath | Skills |
|
|
311
|
+
|----------|---------|--------|
|
|
312
|
+
| Filesystem | `/skills/fs` | `read-file`, `write-file`, `list-directory` |
|
|
313
|
+
| Code | `/skills/code` | `search-code` (text/regex across TypeScript files) |
|
|
314
|
+
| UX | `/skills/ux` | `audit-accessibility` (heuristic a11y scan of TSX) |
|
|
315
|
+
| Git | `/skills/git` | `git-status`, `git-diff`, `git-log`, `git-commit-message` |
|
|
316
|
+
| HTTP | `/skills/http` | `http-request` (Bearer, Basic, OAuth2 client-credentials) |
|
|
317
|
+
| Multimodal | `/skills/multimodal` | `analyze-image` (screenshots, diagrams, mockups) |
|
|
318
|
+
| Backend | `/skills/backend` | `find-code-pattern`, `analyze-nestjs-module`, `analyze-dynamo-schema`, `analyze-graphql-schema` |
|
|
319
|
+
| Frontend | `/skills/frontend` | `find-component-pattern`, `analyze-component`, `analyze-module-structure` |
|
|
320
|
+
| QA | `/skills/qa` | `find-test-pattern`, `analyze-test-coverage` |
|
|
782
321
|
|
|
783
|
-
|
|
322
|
+
---
|
|
784
323
|
|
|
785
|
-
|
|
786
|
-
|-------|-----------|
|
|
787
|
-
| `find-test-pattern` | Localiza padrões em arquivos de teste |
|
|
788
|
-
| `analyze-test-coverage` | Analisa cobertura de testes por módulo |
|
|
324
|
+
## Third-Party Agent History (`@ftarganski/omni-ai/history`)
|
|
789
325
|
|
|
790
|
-
|
|
326
|
+
Import, normalize and search local history from other agent harnesses (Claude Code, Codex) — 100% local, no network calls, no LLM calls. Two parsers ship out of the box (`ClaudeCodeHistoryParser`, `CodexHistoryParser`) behind a generic `IHistoryParser` contract.
|
|
791
327
|
|
|
792
|
-
`
|
|
328
|
+
On a machine with multiple projects/clients, one harness's history usually spans every project, not just the current one. `omni history search` and the `search-history`/`show-history-event` MCP skills default to the current project's scope, so an agent working in project A never sees project B's imported history unless `--all-projects` (or `allProjects: true`) is passed explicitly. Full details in [`docs/history.md`](https://github.com/Ftarganski/omni-ai/blob/main/docs/history.md).
|
|
793
329
|
|
|
794
330
|
---
|
|
795
331
|
|
|
796
|
-
##
|
|
332
|
+
## Memory & Sessions
|
|
797
333
|
|
|
798
|
-
### Via CLI
|
|
334
|
+
### Via CLI
|
|
799
335
|
|
|
800
336
|
```bash
|
|
801
|
-
#
|
|
802
|
-
omni run backend-dev "
|
|
337
|
+
# First run — session is created and stored in ~/.omni-ai/sessions.db
|
|
338
|
+
omni run backend-dev "create the orders module with CRUD" --session dev1:orders
|
|
803
339
|
|
|
804
|
-
#
|
|
805
|
-
omni run backend-dev "
|
|
340
|
+
# Second run — agent loads session history as context
|
|
341
|
+
omni run backend-dev "add the search listener to the orders module" --session dev1:orders
|
|
806
342
|
|
|
807
|
-
#
|
|
808
|
-
omni run backend-dev "
|
|
343
|
+
# Query previous context
|
|
344
|
+
omni run backend-dev "which files did you create in the last session?" --session dev1:orders
|
|
809
345
|
```
|
|
810
346
|
|
|
811
|
-
|
|
347
|
+
Session ID format: `"resourceId:threadId"`. Use `resourceId` for user/project and `threadId` for the feature or conversation.
|
|
812
348
|
|
|
813
|
-
### Via API
|
|
349
|
+
### Via Programmatic API
|
|
814
350
|
|
|
815
351
|
```typescript
|
|
816
352
|
import { createRuntime } from "@ftarganski/omni-ai";
|
|
817
353
|
import { SQLiteMemoryStore, ObservationMaskingCompactor } from "@ftarganski/omni-ai/memory";
|
|
818
354
|
|
|
819
|
-
const runtime = await createRuntime({
|
|
820
|
-
skills: [/* suas skills extras */],
|
|
821
|
-
});
|
|
355
|
+
const runtime = await createRuntime({ skills: [] });
|
|
822
356
|
|
|
823
|
-
//
|
|
824
|
-
const result = await runtime.run("backend-dev", "
|
|
357
|
+
// Simple run, no memory
|
|
358
|
+
const result = await runtime.run("backend-dev", "create the customers module");
|
|
825
359
|
console.log(result.output);
|
|
826
360
|
|
|
827
|
-
//
|
|
361
|
+
// With cross-session persistence
|
|
828
362
|
const store = new SQLiteMemoryStore({ path: "./sessions.db" });
|
|
829
363
|
|
|
830
364
|
const result2 = await runtime.run(
|
|
831
365
|
"backend-dev",
|
|
832
|
-
"
|
|
366
|
+
"add search to the customers module",
|
|
833
367
|
{
|
|
834
368
|
session: { resourceId: "user-42", threadId: "feature-customers" },
|
|
835
369
|
memoryStore: store,
|
|
@@ -837,223 +371,76 @@ const result2 = await runtime.run(
|
|
|
837
371
|
);
|
|
838
372
|
```
|
|
839
373
|
|
|
840
|
-
###
|
|
374
|
+
### Token Compaction
|
|
841
375
|
|
|
842
|
-
|
|
376
|
+
Without compaction, each iteration re-sends the full history:
|
|
843
377
|
|
|
844
378
|
```
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
379
|
+
Iteration 1: 1,000 tokens
|
|
380
|
+
Iteration 2: 3,500 tokens
|
|
381
|
+
Iteration 3: 8,200 tokens → Total: 26,700 tokens
|
|
382
|
+
Iteration 4: 14,000 tokens
|
|
849
383
|
```
|
|
850
384
|
|
|
851
|
-
|
|
385
|
+
With `ObservationMaskingCompactor` (zero LLM cost):
|
|
852
386
|
|
|
853
387
|
```
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
388
|
+
Iteration 1: 1,000 tokens
|
|
389
|
+
Iteration 2: 3,500 tokens
|
|
390
|
+
Iteration 3: 1,800 tokens ← old tool results masked
|
|
391
|
+
Iteration 4: 2,100 tokens → Total: 8,400 tokens (68% reduction)
|
|
858
392
|
```
|
|
859
393
|
|
|
860
|
-
| Compactor |
|
|
861
|
-
|
|
862
|
-
| `ObservationMaskingCompactor` |
|
|
863
|
-
| `SummaryCompactor` | LLM
|
|
394
|
+
| Compactor | Strategy | LLM calls | Best for |
|
|
395
|
+
|-----------|----------|-----------|----------|
|
|
396
|
+
| `ObservationMaskingCompactor` | Replaces old tool result bodies with `[masked ~N tokens]` | 0 | File-intensive agents |
|
|
397
|
+
| `SummaryCompactor` | LLM summarizes old messages, keeps N recent verbatim | 1 per trigger | Long conversations, multi-step reasoning |
|
|
864
398
|
|
|
865
399
|
---
|
|
866
400
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
`SemanticMemoryStore` substitui a busca por palavras-chave (FTS5) por similaridade de coseno usando embeddings do provider.
|
|
870
|
-
|
|
871
|
-
```typescript
|
|
872
|
-
import { createRuntime } from "@ftarganski/omni-ai";
|
|
873
|
-
import { SQLiteMemoryStore, SemanticMemoryStore } from "@ftarganski/omni-ai/memory";
|
|
874
|
-
import { OpenAIProvider } from "@ftarganski/omni-ai/provider-openai";
|
|
875
|
-
|
|
876
|
-
// Provider com suporte a embeddings (capabilities.embedding = true)
|
|
877
|
-
const embeddingProvider = new OpenAIProvider({ apiKey: process.env.OPENAI_API_KEY! });
|
|
878
|
-
|
|
879
|
-
// Persiste mensagens no SQLite + busca semântica em memória
|
|
880
|
-
const store = new SemanticMemoryStore(
|
|
881
|
-
embeddingProvider,
|
|
882
|
-
new SQLiteMemoryStore({ path: "./sessions.db" })
|
|
883
|
-
);
|
|
884
|
-
|
|
885
|
-
const runtime = await createRuntime({ skills, memoryStore: store });
|
|
886
|
-
```
|
|
887
|
-
|
|
888
|
-
**Busca por similaridade:**
|
|
401
|
+
## Programmatic API
|
|
889
402
|
|
|
890
403
|
```typescript
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
5 // topK
|
|
895
|
-
);
|
|
896
|
-
// results: [{ content: "...", score: 0.91 }, ...]
|
|
897
|
-
```
|
|
898
|
-
|
|
899
|
-
**`VectorIndex`** — índice vetorial in-memory para uso direto:
|
|
900
|
-
|
|
901
|
-
```typescript
|
|
902
|
-
import { VectorIndex } from "@ftarganski/omni-ai/memory";
|
|
903
|
-
|
|
904
|
-
const index = new VectorIndex<string>();
|
|
905
|
-
index.add("doc1", embeddingVector1);
|
|
906
|
-
index.add("doc2", embeddingVector2);
|
|
907
|
-
|
|
908
|
-
const results = index.query(queryVector, 3); // [{ id: "doc1", score: 0.94 }, ...]
|
|
909
|
-
```
|
|
910
|
-
|
|
911
|
-
---
|
|
912
|
-
|
|
913
|
-
## Estrutura do repositório
|
|
914
|
-
|
|
915
|
-
```
|
|
916
|
-
omni-ai/
|
|
917
|
-
│
|
|
918
|
-
├── packages/ # pacotes npm (pnpm workspaces)
|
|
919
|
-
│ ├── core/ # @omni-ai/core
|
|
920
|
-
│ │ └── src/
|
|
921
|
-
│ │ ├── types.ts # IProvider, ISkill, IAgent, IMemoryStore...
|
|
922
|
-
│ │ ├── config/
|
|
923
|
-
│ │ │ ├── schema.ts # Zod schema do omni-ai.yaml
|
|
924
|
-
│ │ │ └── loader.ts # loadConfig() com substituição de env vars
|
|
925
|
-
│ │ ├── agents/
|
|
926
|
-
│ │ │ ├── agent.ts # Loop agentico + integração de memória
|
|
927
|
-
│ │ │ └── loader.ts # loadAgent() — carrega YAML + resolve provider
|
|
928
|
-
│ │ ├── providers/registry.ts # ProviderRegistry (factory por type string)
|
|
929
|
-
│ │ ├── skills/registry.ts # SkillRegistry
|
|
930
|
-
│ │ └── bootstrap.ts # createRuntime() — API de alto nível
|
|
931
|
-
│ │
|
|
932
|
-
│ ├── provider-anthropic/ # @omni-ai/provider-anthropic
|
|
933
|
-
│ │ └── src/
|
|
934
|
-
│ │ ├── provider.ts # AnthropicProvider implements IProvider
|
|
935
|
-
│ │ ├── mappers.ts # Conversão omni-ai ↔ Anthropic SDK types
|
|
936
|
-
│ │ └── index.ts # Registra "anthropic" no ProviderRegistry
|
|
937
|
-
│ │
|
|
938
|
-
│ ├── provider-openai/ # @omni-ai/provider-openai
|
|
939
|
-
│ │ └── src/
|
|
940
|
-
│ │ ├── provider.ts # OpenAIProvider implements IProvider
|
|
941
|
-
│ │ ├── mappers.ts # Conversão omni-ai ↔ OpenAI SDK types
|
|
942
|
-
│ │ └── index.ts # Registra "openai" e "copilot" no ProviderRegistry
|
|
943
|
-
│ │
|
|
944
|
-
│ ├── memory/ # @omni-ai/memory
|
|
945
|
-
│ │ └── src/
|
|
946
|
-
│ │ ├── stores/
|
|
947
|
-
│ │ │ ├── in-memory.ts # InMemoryStore (padrão, sem persistência)
|
|
948
|
-
│ │ │ ├── sqlite.ts # SQLiteMemoryStore (arquivo local, FTS5)
|
|
949
|
-
│ │ │ └── semantic-memory-store.ts # SemanticMemoryStore (busca por cosine similarity)
|
|
950
|
-
│ │ ├── compactors/
|
|
951
|
-
│ │ │ ├── observation-masking.ts # Mascara tool results antigos (zero LLM)
|
|
952
|
-
│ │ │ └── summary.ts # Resumo por LLM (1 chamada por trigger)
|
|
953
|
-
│ │ ├── vector.ts # VectorIndex + cosineSimilarity
|
|
954
|
-
│ │ └── utils.ts # estimateTokens() compartilhado
|
|
955
|
-
│ │
|
|
956
|
-
│ ├── skills-fs/ # @omni-ai/skills-fs
|
|
957
|
-
│ │ └── src/
|
|
958
|
-
│ │ ├── read-file.ts # Lê arquivo (com validação de path traversal)
|
|
959
|
-
│ │ ├── write-file.ts # Escreve arquivo (com validação de path)
|
|
960
|
-
│ │ └── list-directory.ts # Lista diretório (com validação de path)
|
|
961
|
-
│ │
|
|
962
|
-
│ ├── skills-code/ # @omni-ai/skills-code
|
|
963
|
-
│ │ └── src/
|
|
964
|
-
│ │ └── search-code.ts # Busca texto/regex em arquivos TypeScript
|
|
965
|
-
│ │
|
|
966
|
-
│ ├── skills-ux/ # @omni-ai/skills-ux
|
|
967
|
-
│ │ └── src/
|
|
968
|
-
│ │ └── audit-accessibility.ts # Scan heurístico a11y de componentes TSX
|
|
969
|
-
│ │
|
|
970
|
-
│ └── cli/ # @omni-ai/cli
|
|
971
|
-
│ └── src/
|
|
972
|
-
│ ├── bin.ts # Entry point, carrega .env
|
|
973
|
-
│ ├── commands/
|
|
974
|
-
│ │ ├── run.ts # omni run <agent> "<prompt>"
|
|
975
|
-
│ │ ├── chain.ts # omni chain "<prompt>" <agent1> <agent2>...
|
|
976
|
-
│ │ ├── list.ts # omni list agents|skills|providers
|
|
977
|
-
│ │ └── init.ts # omni init — wizard interativo
|
|
978
|
-
│ └── utils/
|
|
979
|
-
│ ├── format.ts # Output formatado (tokens, iterações, erros)
|
|
980
|
-
│ └── config-path.ts # Resolve caminho do omni-ai.yaml
|
|
981
|
-
│
|
|
982
|
-
├── agents/ # Definições YAML dos agentes (21 agentes)
|
|
983
|
-
│ ├── backend/ # 7 agentes NestJS/TypeScript
|
|
984
|
-
│ ├── frontend/ # 5 agentes React/TypeScript
|
|
985
|
-
│ ├── ux/ # 5 agentes UX
|
|
986
|
-
│ └── qa/ # 4 agentes QA
|
|
987
|
-
│
|
|
988
|
-
├── docs/ # Documentação
|
|
989
|
-
│ ├── providers/
|
|
990
|
-
│ │ ├── anthropic.md # Setup detalhado Anthropic
|
|
991
|
-
│ │ ├── openai.md # Setup detalhado OpenAI
|
|
992
|
-
│ │ └── copilot.md # Setup detalhado GitHub Copilot
|
|
993
|
-
│ └── templates/
|
|
994
|
-
│ ├── agent.yaml # Template para novos agentes
|
|
995
|
-
│ └── skill.ts # Template para novas skills
|
|
996
|
-
│
|
|
997
|
-
├── config/
|
|
998
|
-
│ └── omni-ai.example.yaml # Template de configuração (copie → omni-ai.yaml)
|
|
999
|
-
│
|
|
1000
|
-
├── .env.example # Template de variáveis de ambiente
|
|
1001
|
-
└── tsconfig.ide.json # Paths para resolução de tipos no VS Code
|
|
1002
|
-
```
|
|
1003
|
-
|
|
1004
|
-
---
|
|
1005
|
-
|
|
1006
|
-
## Usando de outro projeto
|
|
1007
|
-
|
|
1008
|
-
O `omni-ai` é um repositório central — os agentes e o config ficam nele. Você usa o CLI de dentro de qualquer projeto alvo.
|
|
1009
|
-
|
|
1010
|
-
### Setup único (instalação global)
|
|
1011
|
-
|
|
1012
|
-
```bash
|
|
1013
|
-
npm install -g @ftarganski/omni-ai
|
|
1014
|
-
```
|
|
1015
|
-
|
|
1016
|
-
### Uso do dia a dia
|
|
1017
|
-
|
|
1018
|
-
```bash
|
|
1019
|
-
# 1. Entrar no projeto alvo
|
|
1020
|
-
cd /caminho/para/meu-projeto
|
|
1021
|
-
|
|
1022
|
-
# 2. Rodar agentes normalmente
|
|
1023
|
-
omni run backend-dev "crie o módulo de produtos"
|
|
1024
|
-
omni run frontend-dev "crie a página de listagem de produtos"
|
|
1025
|
-
omni run qa-lead "valide src/products/"
|
|
1026
|
-
omni run ux-reviewer "audite src/components/modules/Products/"
|
|
1027
|
-
```
|
|
404
|
+
import { createRuntime, parallel } from "@ftarganski/omni-ai";
|
|
405
|
+
import { readFileSkill, writeFileSkill } from "@ftarganski/omni-ai/skills/fs";
|
|
406
|
+
import { searchCodeSkill } from "@ftarganski/omni-ai/skills/code";
|
|
1028
407
|
|
|
1029
|
-
|
|
408
|
+
const runtime = await createRuntime({
|
|
409
|
+
skills: [readFileSkill, writeFileSkill, searchCodeSkill],
|
|
410
|
+
});
|
|
1030
411
|
|
|
1031
|
-
|
|
412
|
+
// Single agent run
|
|
413
|
+
const result = await runtime.run("backend-dev", "create the invoices module");
|
|
414
|
+
console.log(`Done in ${result.iterations} iterations`);
|
|
415
|
+
console.log(result.output);
|
|
1032
416
|
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
417
|
+
// Run multiple agents in parallel
|
|
418
|
+
const outcome = await parallel(runtime, {
|
|
419
|
+
agents: ["backend-dev", "qa-backend", "ux-reviewer"],
|
|
420
|
+
input: "review the orders module for quality, tests, and accessibility",
|
|
421
|
+
});
|
|
1036
422
|
|
|
1037
|
-
|
|
1038
|
-
|
|
423
|
+
for (const [agent, res] of Object.entries(outcome.results)) {
|
|
424
|
+
if ("error" in res) console.error(`${agent}: ${res.error}`);
|
|
425
|
+
else console.log(`${agent} (${res.iterations} iterations):\n${res.output}`);
|
|
426
|
+
}
|
|
1039
427
|
```
|
|
1040
428
|
|
|
1041
429
|
---
|
|
1042
430
|
|
|
1043
|
-
##
|
|
1044
|
-
|
|
1045
|
-
### Criar um agente personalizado
|
|
431
|
+
## Extending the Framework
|
|
1046
432
|
|
|
1047
|
-
|
|
433
|
+
### Custom Agent (YAML, no rebuild needed)
|
|
1048
434
|
|
|
1049
435
|
```yaml
|
|
436
|
+
# agents/my-domain/my-agent.yaml
|
|
1050
437
|
name: my-agent
|
|
1051
|
-
description:
|
|
1052
|
-
# provider: anthropic #
|
|
1053
|
-
# model: gpt-4o-mini #
|
|
438
|
+
description: What this agent does in one line
|
|
439
|
+
# provider: anthropic # optional — inherits defaultProvider
|
|
440
|
+
# model: gpt-4o-mini # optional — inherits defaultModel
|
|
1054
441
|
systemPrompt: |
|
|
1055
|
-
|
|
1056
|
-
|
|
442
|
+
You are a specialist in...
|
|
443
|
+
Describe constraints, output format, and behavior.
|
|
1057
444
|
skills:
|
|
1058
445
|
- read-file
|
|
1059
446
|
- search-code
|
|
@@ -1062,50 +449,33 @@ maxIterations: 10
|
|
|
1062
449
|
temperature: 0.2
|
|
1063
450
|
```
|
|
1064
451
|
|
|
1065
|
-
|
|
452
|
+
Available immediately via `omni run my-agent "..."` — no rebuild required.
|
|
1066
453
|
|
|
1067
|
-
###
|
|
1068
|
-
|
|
1069
|
-
Copie `docs/templates/skill.ts` e implemente `ISkill`:
|
|
454
|
+
### Custom Skill (TypeScript)
|
|
1070
455
|
|
|
1071
456
|
```typescript
|
|
1072
457
|
import type { ISkill } from "@ftarganski/omni-ai";
|
|
1073
458
|
import { z } from "zod";
|
|
1074
459
|
|
|
1075
460
|
const InputSchema = z.object({
|
|
1076
|
-
query: z.string().describe("
|
|
461
|
+
query: z.string().describe("Search term"),
|
|
1077
462
|
});
|
|
1078
463
|
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
export const myDatabaseSkill: ISkill<Input, string[]> = {
|
|
464
|
+
export const myDatabaseSkill: ISkill<z.infer<typeof InputSchema>, string[]> = {
|
|
1082
465
|
name: "search-database",
|
|
1083
|
-
description: "
|
|
466
|
+
description: "Searches records in an external database",
|
|
1084
467
|
|
|
1085
|
-
async execute(input
|
|
468
|
+
async execute(input) {
|
|
1086
469
|
const { query } = InputSchema.parse(input);
|
|
1087
|
-
// sua lógica aqui
|
|
1088
470
|
return await fetchFromExternalApi(query);
|
|
1089
471
|
},
|
|
1090
472
|
};
|
|
1091
|
-
```
|
|
1092
473
|
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
```typescript
|
|
1096
|
-
import { createRuntime } from "@ftarganski/omni-ai";
|
|
1097
|
-
import { myDatabaseSkill } from "./my-database-skill.js";
|
|
1098
|
-
|
|
1099
|
-
const runtime = await createRuntime({
|
|
1100
|
-
skills: [myDatabaseSkill],
|
|
1101
|
-
});
|
|
474
|
+
// Register when creating the runtime
|
|
475
|
+
const runtime = await createRuntime({ skills: [myDatabaseSkill] });
|
|
1102
476
|
```
|
|
1103
477
|
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
### Criar um provider personalizado
|
|
1107
|
-
|
|
1108
|
-
Implemente `IProvider` de `@ftarganski/omni-ai`:
|
|
478
|
+
### Custom Provider
|
|
1109
479
|
|
|
1110
480
|
```typescript
|
|
1111
481
|
import type { IProvider, CompletionRequest, CompletionResponse } from "@ftarganski/omni-ai";
|
|
@@ -1133,13 +503,11 @@ class MyProvider implements IProvider {
|
|
|
1133
503
|
}
|
|
1134
504
|
}
|
|
1135
505
|
|
|
1136
|
-
// Registrar o type string para o omni-ai.yaml
|
|
1137
506
|
registerProvider("my-provider", (config) => new MyProvider(config));
|
|
1138
507
|
```
|
|
1139
508
|
|
|
1140
|
-
Adicione o `docs/providers/<nome>.md` e declare no `omni-ai.yaml`:
|
|
1141
|
-
|
|
1142
509
|
```yaml
|
|
510
|
+
# config/omni-ai.yaml
|
|
1143
511
|
providers:
|
|
1144
512
|
- name: my-provider
|
|
1145
513
|
type: my-provider
|
|
@@ -1149,46 +517,15 @@ providers:
|
|
|
1149
517
|
|
|
1150
518
|
---
|
|
1151
519
|
|
|
1152
|
-
##
|
|
1153
|
-
|
|
1154
|
-
### Agentes paralelos — `parallel()`
|
|
1155
|
-
|
|
1156
|
-
Executa múltiplos agentes ao mesmo tempo no mesmo input e agrega os resultados.
|
|
1157
|
-
|
|
1158
|
-
```typescript
|
|
1159
|
-
import { createRuntime, parallel } from "@ftarganski/omni-ai";
|
|
1160
|
-
|
|
1161
|
-
const runtime = await createRuntime({ skills });
|
|
1162
|
-
|
|
1163
|
-
const result = await parallel(runtime, {
|
|
1164
|
-
agents: ["backend-dev", "qa-backend", "ux-reviewer"],
|
|
1165
|
-
input: "revise o módulo de orders para qualidade, testes e acessibilidade",
|
|
1166
|
-
});
|
|
1167
|
-
|
|
1168
|
-
for (const [agent, outcome] of Object.entries(result.results)) {
|
|
1169
|
-
if ("error" in outcome) {
|
|
1170
|
-
console.error(`${agent}: ${outcome.error}`);
|
|
1171
|
-
} else {
|
|
1172
|
-
console.log(`${agent} (${outcome.iterations} iterações):\n${outcome.output}\n`);
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
520
|
+
## Advanced
|
|
1175
521
|
|
|
1176
|
-
|
|
1177
|
-
```
|
|
1178
|
-
|
|
1179
|
-
Um agente com falha não cancela os demais — `parallel()` usa `Promise.allSettled` internamente.
|
|
1180
|
-
|
|
1181
|
-
---
|
|
522
|
+
### Skill Middleware
|
|
1182
523
|
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
Intercepção configurável ao redor de cada chamada de skill. Útil para logging, rate-limiting, cache e auditoria.
|
|
524
|
+
Configurable interception around every skill call — logging, rate-limiting, caching, auditing.
|
|
1186
525
|
|
|
1187
526
|
```typescript
|
|
1188
|
-
import { createRuntime } from "@ftarganski/omni-ai";
|
|
1189
527
|
import type { SkillMiddlewareFn } from "@ftarganski/omni-ai";
|
|
1190
528
|
|
|
1191
|
-
// Middleware de logging
|
|
1192
529
|
const loggingMiddleware: SkillMiddlewareFn = async (name, input, ctx, next) => {
|
|
1193
530
|
console.time(`skill:${name}`);
|
|
1194
531
|
const result = await next();
|
|
@@ -1196,31 +533,14 @@ const loggingMiddleware: SkillMiddlewareFn = async (name, input, ctx, next) => {
|
|
|
1196
533
|
return result;
|
|
1197
534
|
};
|
|
1198
535
|
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
const cachingMiddleware: SkillMiddlewareFn = async (name, input, ctx, next) => {
|
|
1202
|
-
const key = `${name}:${JSON.stringify(input)}`;
|
|
1203
|
-
if (cache.has(key)) return cache.get(key);
|
|
1204
|
-
const result = await next();
|
|
1205
|
-
cache.set(key, result);
|
|
1206
|
-
return result;
|
|
1207
|
-
};
|
|
1208
|
-
|
|
1209
|
-
const runtime = await createRuntime({ skills });
|
|
1210
|
-
|
|
1211
|
-
// Middleware configurado por agente no YAML ou programaticamente
|
|
1212
|
-
const result = await runtime.run("backend-dev", "revise os arquivos em src/", {
|
|
1213
|
-
middleware: [loggingMiddleware, cachingMiddleware],
|
|
536
|
+
const result = await runtime.run("backend-dev", "review src/", {
|
|
537
|
+
middleware: [loggingMiddleware],
|
|
1214
538
|
});
|
|
1215
539
|
```
|
|
1216
540
|
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
---
|
|
1220
|
-
|
|
1221
|
-
### MCP — Model Context Protocol
|
|
541
|
+
### MCP Integration
|
|
1222
542
|
|
|
1223
|
-
|
|
543
|
+
**Expose skills as MCP tools:**
|
|
1224
544
|
|
|
1225
545
|
```typescript
|
|
1226
546
|
import { createMcpServer } from "@ftarganski/omni-ai/mcp";
|
|
@@ -1231,57 +551,54 @@ const server = createMcpServer([readFileSkill, writeFileSkill], { name: "omni-ai
|
|
|
1231
551
|
await server.connect(new StdioServerTransport());
|
|
1232
552
|
```
|
|
1233
553
|
|
|
1234
|
-
|
|
554
|
+
**Or via CLI:**
|
|
1235
555
|
|
|
1236
556
|
```bash
|
|
1237
557
|
omni mcp serve
|
|
1238
558
|
```
|
|
1239
559
|
|
|
1240
|
-
|
|
560
|
+
**Claude Desktop integration (`claude_desktop_config.json`):**
|
|
561
|
+
|
|
562
|
+
```json
|
|
563
|
+
{
|
|
564
|
+
"mcpServers": {
|
|
565
|
+
"omni-ai": {
|
|
566
|
+
"command": "omni",
|
|
567
|
+
"args": ["mcp", "serve"]
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
**Consume an external MCP server as skills:**
|
|
1241
574
|
|
|
1242
575
|
```typescript
|
|
1243
576
|
import { connectMcpSkills } from "@ftarganski/omni-ai/mcp";
|
|
1244
577
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
1245
|
-
import { createRuntime } from "@ftarganski/omni-ai";
|
|
1246
578
|
|
|
1247
|
-
// Conecta a um servidor MCP externo e descobre seus tools
|
|
1248
579
|
const transport = new StdioClientTransport({ command: "npx", args: ["-y", "@my/mcp-server"] });
|
|
1249
580
|
const mcpSkills = await connectMcpSkills(transport);
|
|
1250
581
|
|
|
1251
|
-
// Usa os tools remotos como qualquer ISkill nativa
|
|
1252
582
|
const runtime = await createRuntime({ skills: mcpSkills });
|
|
1253
|
-
const result = await runtime.run("backend-dev", "pesquise na documentação o contrato da API");
|
|
1254
583
|
```
|
|
1255
584
|
|
|
1256
585
|
---
|
|
1257
586
|
|
|
1258
|
-
##
|
|
587
|
+
## TypeScript Interfaces
|
|
1259
588
|
|
|
1260
589
|
```typescript
|
|
1261
|
-
|
|
590
|
+
import type {
|
|
591
|
+
IProvider, ISkill, IAgent, IMemoryStore,
|
|
592
|
+
CompletionRequest, CompletionResponse,
|
|
593
|
+
AgentConfig, AgentRunOptions, AgentRunResult,
|
|
594
|
+
SessionId, SkillMiddlewareFn,
|
|
595
|
+
} from "@ftarganski/omni-ai";
|
|
1262
596
|
|
|
1263
597
|
interface IProvider {
|
|
1264
598
|
readonly name: string;
|
|
1265
599
|
readonly capabilities: ProviderCapabilities;
|
|
1266
600
|
complete(request: CompletionRequest): Promise<CompletionResponse>;
|
|
1267
|
-
embed?(request: EmbeddingRequest): Promise<EmbeddingResponse>;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
interface ProviderCapabilities {
|
|
1271
|
-
chat: boolean;
|
|
1272
|
-
embedding: boolean;
|
|
1273
|
-
streaming: boolean; // suporte a onToken em CompletionRequest
|
|
1274
|
-
toolUse: boolean;
|
|
1275
|
-
vision: boolean;
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
interface CompletionRequest {
|
|
1279
|
-
messages: Message[];
|
|
1280
|
-
model?: string;
|
|
1281
|
-
temperature?: number;
|
|
1282
|
-
systemPrompt?: string;
|
|
1283
|
-
tools?: ToolDefinition[];
|
|
1284
|
-
onToken?: (chunk: string) => void; // habilita streaming chunk a chunk
|
|
601
|
+
embed?(request: EmbeddingRequest): Promise<EmbeddingResponse>;
|
|
1285
602
|
}
|
|
1286
603
|
|
|
1287
604
|
interface ISkill<TInput = unknown, TOutput = unknown> {
|
|
@@ -1290,37 +607,23 @@ interface ISkill<TInput = unknown, TOutput = unknown> {
|
|
|
1290
607
|
execute(input: TInput, ctx: SkillContext): Promise<TOutput>;
|
|
1291
608
|
}
|
|
1292
609
|
|
|
1293
|
-
interface IAgent {
|
|
1294
|
-
readonly config: AgentConfig;
|
|
1295
|
-
run(options: AgentRunOptions): Promise<AgentRunResult>;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
// Intercepta a execução de cada skill — chame next() para continuar a cadeia
|
|
1299
|
-
type SkillMiddlewareFn = (
|
|
1300
|
-
name: string,
|
|
1301
|
-
input: unknown,
|
|
1302
|
-
ctx: SkillContext,
|
|
1303
|
-
next: () => Promise<unknown>
|
|
1304
|
-
) => Promise<unknown>;
|
|
1305
|
-
|
|
1306
610
|
interface AgentConfig {
|
|
1307
611
|
name: string;
|
|
1308
612
|
description: string;
|
|
1309
|
-
provider?: string; //
|
|
1310
|
-
model?: string; //
|
|
613
|
+
provider?: string; // optional — inherits defaultProvider
|
|
614
|
+
model?: string; // optional — inherits defaultModel
|
|
1311
615
|
systemPrompt: string;
|
|
1312
616
|
skills?: string[];
|
|
1313
|
-
maxIterations?: number; //
|
|
617
|
+
maxIterations?: number; // default: 10
|
|
1314
618
|
temperature?: number;
|
|
1315
|
-
|
|
1316
|
-
middleware?: SkillMiddlewareFn[]; // interceptação de tool calls
|
|
619
|
+
middleware?: SkillMiddlewareFn[];
|
|
1317
620
|
}
|
|
1318
621
|
|
|
1319
622
|
interface AgentRunOptions {
|
|
1320
623
|
input: string;
|
|
1321
624
|
context?: Record<string, unknown>;
|
|
1322
|
-
session?: SessionId;
|
|
1323
|
-
onToken?: (chunk: string) => void; //
|
|
625
|
+
session?: SessionId;
|
|
626
|
+
onToken?: (chunk: string) => void; // enables real-time token streaming
|
|
1324
627
|
}
|
|
1325
628
|
|
|
1326
629
|
interface AgentRunResult {
|
|
@@ -1330,163 +633,59 @@ interface AgentRunResult {
|
|
|
1330
633
|
}
|
|
1331
634
|
|
|
1332
635
|
interface SessionId {
|
|
1333
|
-
resourceId: string; //
|
|
1334
|
-
threadId: string; //
|
|
636
|
+
resourceId: string; // stable identifier (e.g. user ID, workspace ID)
|
|
637
|
+
threadId: string; // conversation or feature identifier
|
|
1335
638
|
}
|
|
1336
639
|
```
|
|
1337
640
|
|
|
1338
641
|
---
|
|
1339
642
|
|
|
1340
|
-
##
|
|
1341
|
-
|
|
1342
|
-
O npm publica um único pacote com subpath exports:
|
|
643
|
+
## Package Exports
|
|
1343
644
|
|
|
1344
645
|
```
|
|
1345
|
-
@ftarganski/omni-ai ← core: Agent, Runtime, ISkill, IProvider
|
|
1346
|
-
@ftarganski/omni-ai/skills ← todas as skills
|
|
646
|
+
@ftarganski/omni-ai ← core: Agent, Runtime, ISkill, IProvider…
|
|
1347
647
|
@ftarganski/omni-ai/skills/fs ← read-file, write-file, list-directory
|
|
1348
|
-
@ftarganski/omni-ai/skills/git ← git-diff, git-log, git-status, git-commit-message
|
|
1349
648
|
@ftarganski/omni-ai/skills/code ← search-code
|
|
1350
|
-
@ftarganski/omni-ai/skills/http ← http-request
|
|
1351
649
|
@ftarganski/omni-ai/skills/ux ← audit-accessibility
|
|
1352
|
-
@ftarganski/omni-ai/skills/
|
|
1353
|
-
@ftarganski/omni-ai/skills/
|
|
1354
|
-
@ftarganski/omni-ai/skills/
|
|
650
|
+
@ftarganski/omni-ai/skills/git ← git-diff, git-log, git-status, git-commit-message
|
|
651
|
+
@ftarganski/omni-ai/skills/http ← http-request
|
|
652
|
+
@ftarganski/omni-ai/skills/multimodal ← analyze-image
|
|
653
|
+
@ftarganski/omni-ai/skills/backend ← analyze-dynamo-schema, analyze-graphql-schema…
|
|
654
|
+
@ftarganski/omni-ai/skills/frontend ← analyze-component, analyze-module-structure…
|
|
1355
655
|
@ftarganski/omni-ai/skills/qa ← analyze-test-coverage, find-test-pattern
|
|
1356
|
-
@ftarganski/omni-ai/memory ← SQLiteMemoryStore,
|
|
1357
|
-
@ftarganski/omni-ai/
|
|
656
|
+
@ftarganski/omni-ai/memory ← SQLiteMemoryStore, SemanticMemoryStore, compactors, VectorIndex
|
|
657
|
+
@ftarganski/omni-ai/history ← HistoryStore, IHistoryParser, searchHistorySkill, showEventSkill
|
|
658
|
+
@ftarganski/omni-ai/mcp ← createMcpServer, connectMcpSkills
|
|
1358
659
|
@ftarganski/omni-ai/provider-anthropic ← AnthropicProvider
|
|
1359
660
|
@ftarganski/omni-ai/provider-openai ← OpenAIProvider (+ Copilot, Groq, Ollama)
|
|
1360
661
|
@ftarganski/omni-ai/provider-google ← GoogleProvider
|
|
1361
|
-
bin: omni
|
|
662
|
+
bin: omni ← full CLI
|
|
1362
663
|
```
|
|
1363
664
|
|
|
1364
|
-
Internamente o repositório é um monorepo com pacotes separados (`packages/core`, `packages/skills`, etc.) que são bundlados pelo tsup no pacote único publicado.
|
|
1365
|
-
|
|
1366
|
-
---
|
|
1367
|
-
|
|
1368
|
-
## Comandos de desenvolvimento
|
|
1369
|
-
|
|
1370
|
-
```bash
|
|
1371
|
-
# Instalar dependências
|
|
1372
|
-
pnpm install
|
|
1373
|
-
|
|
1374
|
-
# Build de todos os pacotes
|
|
1375
|
-
pnpm build
|
|
1376
|
-
|
|
1377
|
-
# Type-check sem build
|
|
1378
|
-
pnpm typecheck
|
|
1379
|
-
|
|
1380
|
-
# Lint em todos os pacotes
|
|
1381
|
-
pnpm lint
|
|
1382
|
-
|
|
1383
|
-
# Rodar testes
|
|
1384
|
-
pnpm test
|
|
1385
|
-
|
|
1386
|
-
# Build de um pacote interno específico
|
|
1387
|
-
pnpm --filter @omni-ai/core build
|
|
1388
|
-
|
|
1389
|
-
# Reconstruir e testar o CLI
|
|
1390
|
-
pnpm build && omni list agents
|
|
1391
|
-
```
|
|
1392
|
-
|
|
1393
|
-
### Publicar uma nova versão
|
|
1394
|
-
|
|
1395
|
-
```bash
|
|
1396
|
-
pnpm release # patch: 1.0.0 → 1.0.1
|
|
1397
|
-
pnpm release minor # minor: 1.0.0 → 1.1.0
|
|
1398
|
-
pnpm release major # major: 1.0.0 → 2.0.0
|
|
1399
|
-
```
|
|
1400
|
-
|
|
1401
|
-
O script cria a branch `release/x.x.x`, commita o bump de versão e abre o PR para `main`. Ao mergear, o GitHub Actions publica automaticamente no npm e cria a GitHub Release.
|
|
1402
|
-
|
|
1403
|
-
---
|
|
1404
|
-
|
|
1405
|
-
## Roadmap
|
|
1406
|
-
|
|
1407
|
-
### Concluído
|
|
1408
|
-
|
|
1409
|
-
**Pacote publicado**
|
|
1410
|
-
- [x] `@ftarganski/omni-ai` — pacote único com todos os subpaths, bin `omni`, bundlado via tsup
|
|
1411
|
-
|
|
1412
|
-
**Internamente (monorepo, não publicados)**
|
|
1413
|
-
- [x] core — interfaces, ProviderRegistry, SkillRegistry, config schema (Zod), `parallel()`, `SkillMiddleware`
|
|
1414
|
-
- [x] memory — InMemoryStore, SQLiteMemoryStore, SemanticMemoryStore, VectorIndex, ObservationMaskingCompactor, SummaryCompactor
|
|
1415
|
-
- [x] mcp — servidor MCP (expõe skills como tools) e cliente MCP (`McpSkill`, `connectMcpSkills`)
|
|
1416
|
-
- [x] provider-anthropic — adapter completo com mapeamento de tipos, tool use e streaming
|
|
1417
|
-
- [x] provider-openai — cobre OpenAI, GitHub Copilot, Groq, Ollama e qualquer endpoint OpenAI-compatible
|
|
1418
|
-
- [x] provider-google — adapter Google Gemini com chat, vision e embeddings
|
|
1419
|
-
- [x] skills — 20 skills em 8 subpaths: fs, code, ux, git, http, multimodal, backend, frontend, qa
|
|
1420
|
-
- [x] cli — `omni run`, `omni list`, `omni chain`, `omni init`, `omni new`, `omni serve`, `omni watch`, `omni eval`, `omni export`, `omni mcp serve`
|
|
1421
|
-
|
|
1422
|
-
**Core**
|
|
1423
|
-
- [x] Bootstrap `createRuntime()` — API de alto nível para uso programático
|
|
1424
|
-
- [x] 21 agentes prontos — backend (7), frontend (5), ux (5), qa (4)
|
|
1425
|
-
- [x] Herança de provider/modelo — agentes herdam do config, podem sobrescrever
|
|
1426
|
-
- [x] Agentes inline — definição direta no `omni-ai.yaml`
|
|
1427
|
-
- [x] Streaming de tokens em tempo real
|
|
1428
|
-
- [x] Memória e sessões — SQLite persistente com FTS5 e busca semântica por embeddings
|
|
1429
|
-
- [x] Compactors — redução automática de contexto (masking + summarization)
|
|
1430
|
-
- [x] Retry automático com backoff exponencial + fallback de provider
|
|
1431
|
-
- [x] `SkillMiddleware` — cadeia de interceptação configurável por agente
|
|
1432
|
-
- [x] `parallel()` — execução concorrente de múltiplos agentes com agregação de resultados
|
|
1433
|
-
- [x] Suporte multimodal — `ContentPart[]` em mensagens; `analyze-image` skill
|
|
1434
|
-
- [x] Compatibilidade MCP — `omni mcp serve` (stdio), `McpSkill` para consumir servers externos
|
|
1435
|
-
- [x] 296 testes automatizados — 41 arquivos, cobertura ≥ 80% em todas as métricas
|
|
1436
|
-
- [x] Biome — linting e formatação unificados em todos os pacotes
|
|
1437
|
-
- [x] CI/CD — GitHub Actions: lint → build → typecheck → test; branch protection; publish workflow
|
|
1438
|
-
|
|
1439
|
-
### Próximos passos
|
|
1440
|
-
|
|
1441
|
-
**CLI & DX**
|
|
1442
|
-
- [x] `omni new` — scaffold interativo para criar agente, skill ou provider a partir de template
|
|
1443
|
-
- [x] `omni eval` — avaliação em lote: roda agente contra dataset de `(input, expected)` e reporta acurácia
|
|
1444
|
-
- [x] `omni serve` — inicia servidor HTTP local para chamar agentes via REST ou SSE (sem CLI)
|
|
1445
|
-
- [x] `omni watch` — reexecuta agente automaticamente quando arquivos do projeto mudam (modo dev)
|
|
1446
|
-
- [x] `omni export` — exporta histórico de sessão em markdown ou JSON
|
|
1447
|
-
|
|
1448
|
-
**Providers & resiliência**
|
|
1449
|
-
- [x] `@omni-ai/provider-google` — adapter para Gemini 1.5 / 2.0 (chat, vision, embeddings)
|
|
1450
|
-
- [x] Suporte a Groq — modelos Llama/DeepSeek via LPU (free tier, sem cartão)
|
|
1451
|
-
- [x] Suporte a Ollama — modelos locais sem API key (Llama, Qwen, Phi, DeepSeek)
|
|
1452
|
-
- [x] Retry automático com backoff exponencial — recuperação transparente de rate-limit e erros 5xx
|
|
1453
|
-
- [x] Fallback de provider — rota pedidos para um provider secundário quando o primário falha
|
|
1454
|
-
|
|
1455
|
-
**Skills**
|
|
1456
|
-
- [x] `@omni-ai/skills-git` — git status, diff, log, commit message (para agentes de review e release)
|
|
1457
|
-
- [x] `@omni-ai/skills-http` — chamadas HTTP autenticadas (OAuth/Bearer) para integrar APIs externas
|
|
1458
|
-
- [x] Suporte multimodal — skill `analyze-image` para análise de screenshots, diagramas e mockups
|
|
1459
|
-
|
|
1460
|
-
**Core**
|
|
1461
|
-
- [x] Compatibilidade MCP (Model Context Protocol) — expor skills como tools MCP e consumir servidores MCP externos
|
|
1462
|
-
- [x] Agentes paralelos — `parallel()` wrapper para rodar agentes concorrentemente e agregar resultados
|
|
1463
|
-
- [x] `SkillMiddleware` — hooks de interceptação para logging, rate-limiting e cache de tool calls
|
|
1464
|
-
- [x] Publicação npm — publicar os pacotes `@omni-ai/*` no registro público do npm
|
|
1465
|
-
|
|
1466
665
|
---
|
|
1467
666
|
|
|
1468
667
|
## Troubleshooting
|
|
1469
668
|
|
|
1470
669
|
**`omni: command not found`**
|
|
1471
|
-
|
|
670
|
+
The CLI is not globally linked. Run `npm install -g @ftarganski/omni-ai`.
|
|
1472
671
|
|
|
1473
672
|
**`Provider "anthropic" not found in config`**
|
|
1474
|
-
|
|
673
|
+
`config/omni-ai.yaml` does not exist or does not declare the provider. Run `omni init`.
|
|
1475
674
|
|
|
1476
675
|
**`Error: ANTHROPIC_API_KEY is not set`**
|
|
1477
|
-
|
|
676
|
+
The environment variable is not loaded. Verify `.env` exists and contains the key. The CLI loads `.env` automatically.
|
|
1478
677
|
|
|
1479
678
|
**`maxIterations exceeded`**
|
|
1480
|
-
|
|
679
|
+
The agent hit the iteration limit without finishing. Increase `maxIterations` in the agent YAML or make the prompt more specific.
|
|
1481
680
|
|
|
1482
|
-
**
|
|
1483
|
-
Use `ObservationMaskingCompactor` via
|
|
681
|
+
**High token consumption**
|
|
682
|
+
Use `ObservationMaskingCompactor` via the programmatic API. Reduces context by up to 70% for file-intensive agents.
|
|
1484
683
|
|
|
1485
684
|
**`Access denied: path resolves outside the working directory`**
|
|
1486
|
-
|
|
685
|
+
The agent attempted to access a file outside `cwd`. Run the command from inside the target project directory.
|
|
1487
686
|
|
|
1488
|
-
**Build
|
|
1489
|
-
|
|
687
|
+
**Build fails with `Cannot find module`**
|
|
688
|
+
A referenced package has not been built yet. Run `pnpm build` at the root.
|
|
1490
689
|
|
|
1491
690
|
---
|
|
1492
691
|
|