@maestro-ai/mcp-server 2.6.1 → 5.0.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/dist/content/.version.json +16 -0
- package/dist/data/project-templates.d.ts +37 -0
- package/dist/data/project-templates.d.ts.map +1 -0
- package/dist/data/project-templates.js +208 -0
- package/dist/data/project-templates.js.map +1 -0
- package/dist/errors/index.d.ts +84 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +158 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/flows/onboarding-orchestrator.d.ts.map +1 -1
- package/dist/flows/onboarding-orchestrator.js +126 -91
- package/dist/flows/onboarding-orchestrator.js.map +1 -1
- package/dist/gates/validator.d.ts +2 -1
- package/dist/gates/validator.d.ts.map +1 -1
- package/dist/gates/validator.js +33 -2
- package/dist/gates/validator.js.map +1 -1
- package/dist/index.js +19 -164
- package/dist/index.js.map +1 -1
- package/dist/middleware/flow-engine.middleware.d.ts +14 -0
- package/dist/middleware/flow-engine.middleware.d.ts.map +1 -0
- package/dist/middleware/flow-engine.middleware.js +51 -0
- package/dist/middleware/flow-engine.middleware.js.map +1 -0
- package/dist/middleware/index.d.ts +36 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +45 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/persistence.middleware.d.ts +14 -0
- package/dist/middleware/persistence.middleware.d.ts.map +1 -0
- package/dist/middleware/persistence.middleware.js +55 -0
- package/dist/middleware/persistence.middleware.js.map +1 -0
- package/dist/middleware/skill-injection.middleware.d.ts +15 -0
- package/dist/middleware/skill-injection.middleware.d.ts.map +1 -0
- package/dist/middleware/skill-injection.middleware.js +63 -0
- package/dist/middleware/skill-injection.middleware.js.map +1 -0
- package/dist/middleware/state-loader.middleware.d.ts +13 -0
- package/dist/middleware/state-loader.middleware.d.ts.map +1 -0
- package/dist/middleware/state-loader.middleware.js +36 -0
- package/dist/middleware/state-loader.middleware.js.map +1 -0
- package/dist/router.d.ts +46 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +441 -0
- package/dist/router.js.map +1 -0
- package/dist/services/content-resolver.service.d.ts +96 -0
- package/dist/services/content-resolver.service.d.ts.map +1 -0
- package/dist/services/content-resolver.service.js +280 -0
- package/dist/services/content-resolver.service.js.map +1 -0
- package/dist/services/flow-engine.d.ts +82 -0
- package/dist/services/flow-engine.d.ts.map +1 -0
- package/dist/services/flow-engine.js +270 -0
- package/dist/services/flow-engine.js.map +1 -0
- package/dist/services/onboarding.service.d.ts +20 -0
- package/dist/services/onboarding.service.d.ts.map +1 -0
- package/dist/services/onboarding.service.js +49 -0
- package/dist/services/onboarding.service.js.map +1 -0
- package/dist/services/skill-loader.service.d.ts +81 -0
- package/dist/services/skill-loader.service.d.ts.map +1 -0
- package/dist/services/skill-loader.service.js +321 -0
- package/dist/services/skill-loader.service.js.map +1 -0
- package/dist/services/specialist.service.d.ts +20 -0
- package/dist/services/specialist.service.d.ts.map +1 -0
- package/dist/services/specialist.service.js +115 -0
- package/dist/services/specialist.service.js.map +1 -0
- package/dist/services/state.service.d.ts +59 -0
- package/dist/services/state.service.d.ts.map +1 -0
- package/dist/services/state.service.js +131 -0
- package/dist/services/state.service.js.map +1 -0
- package/dist/stdio.js +329 -437
- package/dist/stdio.js.map +1 -1
- package/dist/tests/content-resolver.test.d.ts +5 -0
- package/dist/tests/content-resolver.test.d.ts.map +1 -0
- package/dist/tests/content-resolver.test.js +157 -0
- package/dist/tests/content-resolver.test.js.map +1 -0
- package/dist/tests/middleware.test.d.ts +5 -0
- package/dist/tests/middleware.test.d.ts.map +1 -0
- package/dist/tests/middleware.test.js +228 -0
- package/dist/tests/middleware.test.js.map +1 -0
- package/dist/tests/skill-loader.test.d.ts +5 -0
- package/dist/tests/skill-loader.test.d.ts.map +1 -0
- package/dist/tests/skill-loader.test.js +242 -0
- package/dist/tests/skill-loader.test.js.map +1 -0
- package/dist/tools/aprovar-gate.d.ts.map +1 -1
- package/dist/tools/aprovar-gate.js +35 -0
- package/dist/tools/aprovar-gate.js.map +1 -1
- package/dist/tools/brainstorm.d.ts.map +1 -1
- package/dist/tools/brainstorm.js +90 -49
- package/dist/tools/brainstorm.js.map +1 -1
- package/dist/tools/classificar.d.ts.map +1 -1
- package/dist/tools/classificar.js +20 -1
- package/dist/tools/classificar.js.map +1 -1
- package/dist/tools/confirmar-classificacao.d.ts.map +1 -1
- package/dist/tools/confirmar-classificacao.js +20 -1
- package/dist/tools/confirmar-classificacao.js.map +1 -1
- package/dist/tools/consolidated/analisar.d.ts +56 -0
- package/dist/tools/consolidated/analisar.d.ts.map +1 -0
- package/dist/tools/consolidated/analisar.js +96 -0
- package/dist/tools/consolidated/analisar.js.map +1 -0
- package/dist/tools/consolidated/avancar.d.ts +67 -0
- package/dist/tools/consolidated/avancar.d.ts.map +1 -0
- package/dist/tools/consolidated/avancar.js +132 -0
- package/dist/tools/consolidated/avancar.js.map +1 -0
- package/dist/tools/consolidated/checkpoint-tool.d.ts +66 -0
- package/dist/tools/consolidated/checkpoint-tool.d.ts.map +1 -0
- package/dist/tools/consolidated/checkpoint-tool.js +111 -0
- package/dist/tools/consolidated/checkpoint-tool.js.map +1 -0
- package/dist/tools/consolidated/validar.d.ts +63 -0
- package/dist/tools/consolidated/validar.d.ts.map +1 -0
- package/dist/tools/consolidated/validar.js +104 -0
- package/dist/tools/consolidated/validar.js.map +1 -0
- package/dist/tools/contexto.d.ts.map +1 -1
- package/dist/tools/contexto.js +18 -0
- package/dist/tools/contexto.js.map +1 -1
- package/dist/tools/discovery.d.ts +10 -10
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +82 -56
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/iniciar-projeto.d.ts +48 -0
- package/dist/tools/iniciar-projeto.d.ts.map +1 -1
- package/dist/tools/iniciar-projeto.js +234 -45
- package/dist/tools/iniciar-projeto.js.map +1 -1
- package/dist/tools/maestro-tool.d.ts +51 -0
- package/dist/tools/maestro-tool.d.ts.map +1 -0
- package/dist/tools/maestro-tool.js +224 -0
- package/dist/tools/maestro-tool.js.map +1 -0
- package/dist/tools/prd-writer.d.ts +1 -1
- package/dist/tools/prd-writer.d.ts.map +1 -1
- package/dist/tools/prd-writer.js +138 -2
- package/dist/tools/prd-writer.js.map +1 -1
- package/dist/tools/proximo.d.ts.map +1 -1
- package/dist/tools/proximo.js +22 -16
- package/dist/tools/proximo.js.map +1 -1
- package/dist/tools/salvar.d.ts.map +1 -1
- package/dist/tools/salvar.js +13 -0
- package/dist/tools/salvar.js.map +1 -1
- package/dist/tools/setup-inicial.d.ts.map +1 -1
- package/dist/tools/setup-inicial.js +12 -0
- package/dist/tools/setup-inicial.js.map +1 -1
- package/dist/tools/status.d.ts.map +1 -1
- package/dist/tools/status.js +6 -0
- package/dist/tools/status.js.map +1 -1
- package/dist/tools/validar-gate.d.ts.map +1 -1
- package/dist/tools/validar-gate.js +25 -0
- package/dist/tools/validar-gate.js.map +1 -1
- package/dist/types/index.d.ts +20 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/response.d.ts +49 -0
- package/dist/types/response.d.ts.map +1 -1
- package/dist/types/response.js.map +1 -1
- package/dist/utils/smart-defaults.d.ts +56 -0
- package/dist/utils/smart-defaults.d.ts.map +1 -0
- package/dist/utils/smart-defaults.js +113 -0
- package/dist/utils/smart-defaults.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "5.0.0",
|
|
3
|
+
"hash": "auto-generated",
|
|
4
|
+
"injected_at": "2026-02-06T00:00:00.000Z",
|
|
5
|
+
"source": "builtin",
|
|
6
|
+
"content_version": "1.0",
|
|
7
|
+
"compatibility": {
|
|
8
|
+
"min_server_version": "5.0.0",
|
|
9
|
+
"max_server_version": "5.x"
|
|
10
|
+
},
|
|
11
|
+
"checksums": {
|
|
12
|
+
"skills_count": 0,
|
|
13
|
+
"templates_count": 0,
|
|
14
|
+
"rules_count": 0
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Templates de Projeto — Projetos pré-configurados para onboarding rápido
|
|
3
|
+
*
|
|
4
|
+
* Cada template contém discovery pré-preenchido, tipo/complexidade inferidos,
|
|
5
|
+
* e stack sugerida. Permite criar projeto com 1-2 interações.
|
|
6
|
+
*/
|
|
7
|
+
export interface ProjectTemplate {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
emoji: string;
|
|
12
|
+
tipo_artefato: 'poc' | 'script' | 'internal' | 'product';
|
|
13
|
+
nivel_complexidade: 'simples' | 'medio' | 'complexo';
|
|
14
|
+
discovery_preenchido: {
|
|
15
|
+
problema: string;
|
|
16
|
+
publico_alvo: string;
|
|
17
|
+
funcionalidades_principais: string[];
|
|
18
|
+
plataformas: string[];
|
|
19
|
+
stack_sugerida: {
|
|
20
|
+
frontend?: string;
|
|
21
|
+
backend?: string;
|
|
22
|
+
database?: string;
|
|
23
|
+
infra?: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
perguntas_essenciais: string[];
|
|
27
|
+
}
|
|
28
|
+
export declare const PROJECT_TEMPLATES: ProjectTemplate[];
|
|
29
|
+
/**
|
|
30
|
+
* Busca template por ID
|
|
31
|
+
*/
|
|
32
|
+
export declare function getTemplate(id: string): ProjectTemplate | null;
|
|
33
|
+
/**
|
|
34
|
+
* Lista templates disponíveis formatado
|
|
35
|
+
*/
|
|
36
|
+
export declare function listTemplatesFormatted(): string;
|
|
37
|
+
//# sourceMappingURL=project-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-templates.d.ts","sourceRoot":"","sources":["../../src/data/project-templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IACzD,kBAAkB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IACrD,oBAAoB,EAAE;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,0BAA0B,EAAE,MAAM,EAAE,CAAC;QACrC,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,cAAc,EAAE;YACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,KAAK,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC;KACL,CAAC;IACF,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAClC;AAED,eAAO,MAAM,iBAAiB,EAAE,eAAe,EA4L9C,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAE9D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAI/C"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Templates de Projeto — Projetos pré-configurados para onboarding rápido
|
|
3
|
+
*
|
|
4
|
+
* Cada template contém discovery pré-preenchido, tipo/complexidade inferidos,
|
|
5
|
+
* e stack sugerida. Permite criar projeto com 1-2 interações.
|
|
6
|
+
*/
|
|
7
|
+
export const PROJECT_TEMPLATES = [
|
|
8
|
+
{
|
|
9
|
+
id: "saas-b2b",
|
|
10
|
+
name: "SaaS B2B",
|
|
11
|
+
description: "Aplicação SaaS multi-tenant para empresas com autenticação, dashboard e billing",
|
|
12
|
+
emoji: "🏢",
|
|
13
|
+
tipo_artefato: "product",
|
|
14
|
+
nivel_complexidade: "complexo",
|
|
15
|
+
discovery_preenchido: {
|
|
16
|
+
problema: "Empresas precisam de uma solução digital para gerenciar [processo]",
|
|
17
|
+
publico_alvo: "Empresas de médio porte, gestores e equipes operacionais",
|
|
18
|
+
funcionalidades_principais: [
|
|
19
|
+
"Autenticação multi-tenant (SSO opcional)",
|
|
20
|
+
"Dashboard com métricas e KPIs",
|
|
21
|
+
"Gestão de usuários e permissões (RBAC)",
|
|
22
|
+
"Planos e billing (Stripe/similar)",
|
|
23
|
+
"API RESTful para integrações",
|
|
24
|
+
"Notificações (email + in-app)",
|
|
25
|
+
],
|
|
26
|
+
plataformas: ["Web (responsivo)"],
|
|
27
|
+
stack_sugerida: {
|
|
28
|
+
frontend: "Next.js + TailwindCSS + shadcn/ui",
|
|
29
|
+
backend: "Node.js + Express/Fastify",
|
|
30
|
+
database: "PostgreSQL + Redis",
|
|
31
|
+
infra: "Docker + AWS/Vercel",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
perguntas_essenciais: [
|
|
35
|
+
"Qual processo específico o SaaS vai resolver?",
|
|
36
|
+
"Qual será o modelo de pricing (freemium, por seat, por uso)?",
|
|
37
|
+
"Precisa de integrações com sistemas externos?",
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "ecommerce",
|
|
42
|
+
name: "E-commerce",
|
|
43
|
+
description: "Loja virtual com catálogo, carrinho, checkout e gestão de pedidos",
|
|
44
|
+
emoji: "🛒",
|
|
45
|
+
tipo_artefato: "product",
|
|
46
|
+
nivel_complexidade: "complexo",
|
|
47
|
+
discovery_preenchido: {
|
|
48
|
+
problema: "Vender [produtos/serviços] online com experiência de compra fluida",
|
|
49
|
+
publico_alvo: "Consumidores finais (B2C) interessados em [nicho]",
|
|
50
|
+
funcionalidades_principais: [
|
|
51
|
+
"Catálogo de produtos com busca e filtros",
|
|
52
|
+
"Carrinho de compras persistente",
|
|
53
|
+
"Checkout com múltiplos métodos de pagamento",
|
|
54
|
+
"Gestão de pedidos e status",
|
|
55
|
+
"Sistema de avaliações",
|
|
56
|
+
"Painel administrativo",
|
|
57
|
+
],
|
|
58
|
+
plataformas: ["Web (responsivo)", "PWA"],
|
|
59
|
+
stack_sugerida: {
|
|
60
|
+
frontend: "Next.js + TailwindCSS",
|
|
61
|
+
backend: "Node.js + API REST",
|
|
62
|
+
database: "PostgreSQL",
|
|
63
|
+
infra: "Vercel + Stripe",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
perguntas_essenciais: [
|
|
67
|
+
"Que tipo de produtos serão vendidos?",
|
|
68
|
+
"Qual gateway de pagamento (Stripe, PagSeguro, etc.)?",
|
|
69
|
+
"Precisa de gestão de estoque?",
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "api-microservices",
|
|
74
|
+
name: "API / Microserviços",
|
|
75
|
+
description: "API RESTful ou sistema de microserviços com documentação e testes",
|
|
76
|
+
emoji: "🔌",
|
|
77
|
+
tipo_artefato: "product",
|
|
78
|
+
nivel_complexidade: "medio",
|
|
79
|
+
discovery_preenchido: {
|
|
80
|
+
problema: "Expor dados/funcionalidades como API para consumo por [clientes/apps]",
|
|
81
|
+
publico_alvo: "Desenvolvedores e sistemas que consomem a API",
|
|
82
|
+
funcionalidades_principais: [
|
|
83
|
+
"API RESTful com versionamento",
|
|
84
|
+
"Autenticação (JWT/OAuth2)",
|
|
85
|
+
"Rate limiting e throttling",
|
|
86
|
+
"Documentação OpenAPI/Swagger",
|
|
87
|
+
"Testes automatizados (unit + integration)",
|
|
88
|
+
"Logging e monitoramento",
|
|
89
|
+
],
|
|
90
|
+
plataformas: ["API Server"],
|
|
91
|
+
stack_sugerida: {
|
|
92
|
+
backend: "Node.js + Fastify (ou Express)",
|
|
93
|
+
database: "PostgreSQL + Redis (cache)",
|
|
94
|
+
infra: "Docker + CI/CD",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
perguntas_essenciais: [
|
|
98
|
+
"Quais recursos/entidades a API vai expor?",
|
|
99
|
+
"Qual volume esperado de requisições?",
|
|
100
|
+
"Precisa de comunicação assíncrona (filas, eventos)?",
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "mobile-app",
|
|
105
|
+
name: "App Mobile",
|
|
106
|
+
description: "Aplicativo mobile cross-platform com backend e push notifications",
|
|
107
|
+
emoji: "📱",
|
|
108
|
+
tipo_artefato: "product",
|
|
109
|
+
nivel_complexidade: "complexo",
|
|
110
|
+
discovery_preenchido: {
|
|
111
|
+
problema: "Usuários precisam de [funcionalidade] acessível pelo celular",
|
|
112
|
+
publico_alvo: "Usuários mobile (iOS e Android)",
|
|
113
|
+
funcionalidades_principais: [
|
|
114
|
+
"Telas principais com navegação fluida",
|
|
115
|
+
"Autenticação (social login + email)",
|
|
116
|
+
"Push notifications",
|
|
117
|
+
"Sincronização offline-first",
|
|
118
|
+
"Integração com API backend",
|
|
119
|
+
"Deep linking",
|
|
120
|
+
],
|
|
121
|
+
plataformas: ["iOS", "Android"],
|
|
122
|
+
stack_sugerida: {
|
|
123
|
+
frontend: "React Native + Expo",
|
|
124
|
+
backend: "Node.js + API REST",
|
|
125
|
+
database: "PostgreSQL + SQLite (local)",
|
|
126
|
+
infra: "AWS/Firebase",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
perguntas_essenciais: [
|
|
130
|
+
"Qual a funcionalidade principal do app?",
|
|
131
|
+
"Precisa funcionar offline?",
|
|
132
|
+
"Quais integrações nativas (câmera, GPS, etc.)?",
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "landing-page",
|
|
137
|
+
name: "Landing Page",
|
|
138
|
+
description: "Página de captura ou institucional com formulário e analytics",
|
|
139
|
+
emoji: "🌐",
|
|
140
|
+
tipo_artefato: "poc",
|
|
141
|
+
nivel_complexidade: "simples",
|
|
142
|
+
discovery_preenchido: {
|
|
143
|
+
problema: "Apresentar [produto/serviço] e capturar leads/conversões",
|
|
144
|
+
publico_alvo: "Visitantes interessados em [oferta]",
|
|
145
|
+
funcionalidades_principais: [
|
|
146
|
+
"Hero section com CTA principal",
|
|
147
|
+
"Seções de benefícios/features",
|
|
148
|
+
"Social proof (depoimentos, logos)",
|
|
149
|
+
"Formulário de captura",
|
|
150
|
+
"Analytics e tracking",
|
|
151
|
+
"SEO otimizado",
|
|
152
|
+
],
|
|
153
|
+
plataformas: ["Web"],
|
|
154
|
+
stack_sugerida: {
|
|
155
|
+
frontend: "Next.js + TailwindCSS",
|
|
156
|
+
infra: "Vercel",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
perguntas_essenciais: [
|
|
160
|
+
"Qual é a oferta/produto principal?",
|
|
161
|
+
"Qual a ação desejada do visitante (cadastro, compra, contato)?",
|
|
162
|
+
],
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: "dashboard",
|
|
166
|
+
name: "Dashboard / Admin Panel",
|
|
167
|
+
description: "Painel administrativo com gráficos, tabelas e gestão de dados",
|
|
168
|
+
emoji: "📊",
|
|
169
|
+
tipo_artefato: "internal",
|
|
170
|
+
nivel_complexidade: "medio",
|
|
171
|
+
discovery_preenchido: {
|
|
172
|
+
problema: "Equipe precisa visualizar e gerenciar [dados/processos] de forma centralizada",
|
|
173
|
+
publico_alvo: "Equipe interna (gestores, analistas, operadores)",
|
|
174
|
+
funcionalidades_principais: [
|
|
175
|
+
"Dashboard com gráficos e KPIs",
|
|
176
|
+
"Tabelas com busca, filtro e paginação",
|
|
177
|
+
"CRUD de entidades principais",
|
|
178
|
+
"Controle de acesso (RBAC)",
|
|
179
|
+
"Exportação de dados (CSV, PDF)",
|
|
180
|
+
"Auditoria de ações",
|
|
181
|
+
],
|
|
182
|
+
plataformas: ["Web"],
|
|
183
|
+
stack_sugerida: {
|
|
184
|
+
frontend: "Next.js + shadcn/ui + Recharts",
|
|
185
|
+
backend: "Node.js + Prisma",
|
|
186
|
+
database: "PostgreSQL",
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
perguntas_essenciais: [
|
|
190
|
+
"Quais dados/métricas precisam ser visualizados?",
|
|
191
|
+
"Quantos tipos de usuário com permissões diferentes?",
|
|
192
|
+
"Precisa integrar com sistemas existentes?",
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
];
|
|
196
|
+
/**
|
|
197
|
+
* Busca template por ID
|
|
198
|
+
*/
|
|
199
|
+
export function getTemplate(id) {
|
|
200
|
+
return PROJECT_TEMPLATES.find(t => t.id === id) || null;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Lista templates disponíveis formatado
|
|
204
|
+
*/
|
|
205
|
+
export function listTemplatesFormatted() {
|
|
206
|
+
return PROJECT_TEMPLATES.map(t => `- **${t.emoji} ${t.name}** (\`${t.id}\`) — ${t.description} [${t.nivel_complexidade}]`).join("\n");
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=project-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-templates.js","sourceRoot":"","sources":["../../src/data/project-templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwBH,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAChD;QACI,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,iFAAiF;QAC9F,KAAK,EAAE,IAAI;QACX,aAAa,EAAE,SAAS;QACxB,kBAAkB,EAAE,UAAU;QAC9B,oBAAoB,EAAE;YAClB,QAAQ,EAAE,oEAAoE;YAC9E,YAAY,EAAE,0DAA0D;YACxE,0BAA0B,EAAE;gBACxB,0CAA0C;gBAC1C,+BAA+B;gBAC/B,wCAAwC;gBACxC,mCAAmC;gBACnC,8BAA8B;gBAC9B,+BAA+B;aAClC;YACD,WAAW,EAAE,CAAC,kBAAkB,CAAC;YACjC,cAAc,EAAE;gBACZ,QAAQ,EAAE,mCAAmC;gBAC7C,OAAO,EA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ions e contexto.
|
|
5
|
+
* Quando um erro tem `recovery`, a IA sabe exatamente como corrigi-lo.
|
|
6
|
+
*/
|
|
7
|
+
import type { NextAction } from "../types/response.js";
|
|
8
|
+
/**
|
|
9
|
+
* Erro base do Maestro com código e recovery action
|
|
10
|
+
*/
|
|
11
|
+
export declare class MaestroError extends Error {
|
|
12
|
+
readonly code: string;
|
|
13
|
+
readonly recovery?: NextAction;
|
|
14
|
+
readonly details?: Record<string, unknown>;
|
|
15
|
+
constructor(message: string, code: string, options?: {
|
|
16
|
+
recovery?: NextAction;
|
|
17
|
+
details?: Record<string, unknown>;
|
|
18
|
+
cause?: Error;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Erro de validação de input
|
|
23
|
+
*/
|
|
24
|
+
export declare class ValidationError extends MaestroError {
|
|
25
|
+
constructor(message: string, options?: {
|
|
26
|
+
field?: string;
|
|
27
|
+
expected?: string;
|
|
28
|
+
received?: string;
|
|
29
|
+
recovery?: NextAction;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Erro de estado inválido
|
|
34
|
+
*/
|
|
35
|
+
export declare class StateError extends MaestroError {
|
|
36
|
+
constructor(message: string, options?: {
|
|
37
|
+
currentState?: string;
|
|
38
|
+
expectedState?: string;
|
|
39
|
+
recovery?: NextAction;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Erro de fluxo (transição inválida, fase não encontrada, etc.)
|
|
44
|
+
*/
|
|
45
|
+
export declare class FlowError extends MaestroError {
|
|
46
|
+
constructor(message: string, options?: {
|
|
47
|
+
currentPhase?: string;
|
|
48
|
+
targetPhase?: string;
|
|
49
|
+
recovery?: NextAction;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Erro de persistência (falha ao ler/escrever arquivos)
|
|
54
|
+
*/
|
|
55
|
+
export declare class PersistenceError extends MaestroError {
|
|
56
|
+
constructor(message: string, options?: {
|
|
57
|
+
path?: string;
|
|
58
|
+
operation?: "read" | "write";
|
|
59
|
+
recovery?: NextAction;
|
|
60
|
+
cause?: Error;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Erro de tool não encontrada
|
|
65
|
+
*/
|
|
66
|
+
export declare class ToolNotFoundError extends MaestroError {
|
|
67
|
+
constructor(toolName: string);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Formata um MaestroError para resposta de tool
|
|
71
|
+
*/
|
|
72
|
+
export declare function formatMaestroError(error: MaestroError): {
|
|
73
|
+
content: Array<{
|
|
74
|
+
type: "text";
|
|
75
|
+
text: string;
|
|
76
|
+
}>;
|
|
77
|
+
isError: boolean;
|
|
78
|
+
next_action?: NextAction;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Wraps uma função de tool com error handling automático
|
|
82
|
+
*/
|
|
83
|
+
export declare function withErrorHandling<T extends Record<string, unknown>>(toolName: string, handler: (args: T) => Promise<any>): (args: T) => Promise<any>;
|
|
84
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACnC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAG9C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,UAAU,CAAC;QACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EA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AAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,UAAU,CAAC;CAC5B,CA4BA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,GACnC,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CA0B3B"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Handling Estruturado do Maestro
|
|
3
|
+
*
|
|
4
|
+
* Hierarquia de erros com códigos, recovery actions e contexto.
|
|
5
|
+
* Quando um erro tem `recovery`, a IA sabe exatamente como corrigi-lo.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Erro base do Maestro com código e recovery action
|
|
9
|
+
*/
|
|
10
|
+
export class MaestroError extends Error {
|
|
11
|
+
code;
|
|
12
|
+
recovery;
|
|
13
|
+
details;
|
|
14
|
+
constructor(message, code, options) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.name = "MaestroError";
|
|
17
|
+
this.code = code;
|
|
18
|
+
this.recovery = options?.recovery;
|
|
19
|
+
this.details = options?.details;
|
|
20
|
+
if (options?.cause)
|
|
21
|
+
this.cause = options.cause;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Erro de validação de input
|
|
26
|
+
*/
|
|
27
|
+
export class ValidationError extends MaestroError {
|
|
28
|
+
constructor(message, options) {
|
|
29
|
+
super(message, "VALIDATION_ERROR", {
|
|
30
|
+
recovery: options?.recovery,
|
|
31
|
+
details: {
|
|
32
|
+
field: options?.field,
|
|
33
|
+
expected: options?.expected,
|
|
34
|
+
received: options?.received,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
this.name = "ValidationError";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Erro de estado inválido
|
|
42
|
+
*/
|
|
43
|
+
export class StateError extends MaestroError {
|
|
44
|
+
constructor(message, options) {
|
|
45
|
+
super(message, "STATE_ERROR", {
|
|
46
|
+
recovery: options?.recovery,
|
|
47
|
+
details: {
|
|
48
|
+
currentState: options?.currentState,
|
|
49
|
+
expectedState: options?.expectedState,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
this.name = "StateError";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Erro de fluxo (transição inválida, fase não encontrada, etc.)
|
|
57
|
+
*/
|
|
58
|
+
export class FlowError extends MaestroError {
|
|
59
|
+
constructor(message, options) {
|
|
60
|
+
super(message, "FLOW_ERROR", {
|
|
61
|
+
recovery: options?.recovery,
|
|
62
|
+
details: {
|
|
63
|
+
currentPhase: options?.currentPhase,
|
|
64
|
+
targetPhase: options?.targetPhase,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
this.name = "FlowError";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Erro de persistência (falha ao ler/escrever arquivos)
|
|
72
|
+
*/
|
|
73
|
+
export class PersistenceError extends MaestroError {
|
|
74
|
+
constructor(message, options) {
|
|
75
|
+
super(message, "PERSISTENCE_ERROR", {
|
|
76
|
+
recovery: options?.recovery,
|
|
77
|
+
details: {
|
|
78
|
+
path: options?.path,
|
|
79
|
+
operation: options?.operation,
|
|
80
|
+
},
|
|
81
|
+
cause: options?.cause,
|
|
82
|
+
});
|
|
83
|
+
this.name = "PersistenceError";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Erro de tool não encontrada
|
|
88
|
+
*/
|
|
89
|
+
export class ToolNotFoundError extends MaestroError {
|
|
90
|
+
constructor(toolName) {
|
|
91
|
+
super(`Tool não encontrada: ${toolName}`, "TOOL_NOT_FOUND", {
|
|
92
|
+
recovery: {
|
|
93
|
+
tool: "maestro",
|
|
94
|
+
description: "Use o entry point inteligente para encontrar a tool correta",
|
|
95
|
+
args_template: { diretorio: "{{diretorio}}" },
|
|
96
|
+
requires_user_input: false,
|
|
97
|
+
},
|
|
98
|
+
details: { toolName },
|
|
99
|
+
});
|
|
100
|
+
this.name = "ToolNotFoundError";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Formata um MaestroError para resposta de tool
|
|
105
|
+
*/
|
|
106
|
+
export function formatMaestroError(error) {
|
|
107
|
+
let text = `# ❌ ${error.name}: ${error.message}\n\n`;
|
|
108
|
+
text += `**Código:** \`${error.code}\`\n\n`;
|
|
109
|
+
if (error.details) {
|
|
110
|
+
text += "**Detalhes:**\n";
|
|
111
|
+
for (const [key, value] of Object.entries(error.details)) {
|
|
112
|
+
if (value !== undefined) {
|
|
113
|
+
text += `- **${key}:** ${value}\n`;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
text += "\n";
|
|
117
|
+
}
|
|
118
|
+
if (error.recovery) {
|
|
119
|
+
text += `## 🔄 Ação de Recuperação\n\n`;
|
|
120
|
+
text += `**Tool:** \`${error.recovery.tool}\`\n`;
|
|
121
|
+
text += `**Descrição:** ${error.recovery.description}\n`;
|
|
122
|
+
if (error.recovery.user_prompt) {
|
|
123
|
+
text += `\n> ${error.recovery.user_prompt}\n`;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
content: [{ type: "text", text }],
|
|
128
|
+
isError: true,
|
|
129
|
+
next_action: error.recovery,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Wraps uma função de tool com error handling automático
|
|
134
|
+
*/
|
|
135
|
+
export function withErrorHandling(toolName, handler) {
|
|
136
|
+
return async (args) => {
|
|
137
|
+
try {
|
|
138
|
+
return await handler(args);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
if (error instanceof MaestroError) {
|
|
142
|
+
return formatMaestroError(error);
|
|
143
|
+
}
|
|
144
|
+
// Erro genérico — wrappa em MaestroError
|
|
145
|
+
const maestroErr = new MaestroError(`Erro inesperado em ${toolName}: ${String(error)}`, "UNEXPECTED_ERROR", {
|
|
146
|
+
recovery: {
|
|
147
|
+
tool: "status",
|
|
148
|
+
description: "Verificar status do projeto após erro",
|
|
149
|
+
args_template: { estado_json: "{{estado_json}}", diretorio: "{{diretorio}}" },
|
|
150
|
+
requires_user_input: false,
|
|
151
|
+
},
|
|
152
|
+
cause: error instanceof Error ? error : undefined,
|
|
153
|
+
});
|
|
154
|
+
return formatMaestroError(maestroErr);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACnB,IAAI,CAAS;IACb,QAAQ,CAAc;IACtB,OAAO,CAA2B;IAElD,YACI,OAAe,EACf,IAAY,EACZ,OAIC;QAED,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,QAAQ,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,CAAC;QAChC,IAAI,OAAO,EAAE,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IACnD,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,YAAY;IAC7C,YACI,OAAe,EACf,OAKC;QAED,KAAK,CAAC,OAAO,EAAE,kBAAkB,E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ator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"onboarding-orchestrator.d.ts","sourceRoot":"","sources":["../../src/flows/onboarding-orchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,mBAAmB,CAAC;AAuBnE,UAAU,0BAA0B;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,GAAG,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACzD,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACvC;AA+BD;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,CA8DlG;AA0WD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;CAsBxC,CAAC"}
|