mega-brain-ai 1.1.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.
Potentially problematic release.
This version of mega-brain-ai might be problematic. Click here for more details.
- package/.claude/CLAUDE.md +155 -0
- package/.claude/commands/agents.md +161 -0
- package/.claude/commands/ask.md +117 -0
- package/.claude/commands/benchmark.md +224 -0
- package/.claude/commands/chat.md +343 -0
- package/.claude/commands/compare.md +116 -0
- package/.claude/commands/conclave.md +194 -0
- package/.claude/commands/config.md +133 -0
- package/.claude/commands/council.md +194 -0
- package/.claude/commands/create-agent.md +452 -0
- package/.claude/commands/debate.md +157 -0
- package/.claude/commands/documentation/create-architecture-documentation.md +175 -0
- package/.claude/commands/dossiers.md +180 -0
- package/.claude/commands/evolve.md +223 -0
- package/.claude/commands/extract-dna.md +170 -0
- package/.claude/commands/extract-knowledge.md +507 -0
- package/.claude/commands/inbox.md +296 -0
- package/.claude/commands/ingest-empresa.md +191 -0
- package/.claude/commands/ingest.md +182 -0
- package/.claude/commands/jarvis-briefing.md +67 -0
- package/.claude/commands/jarvis-control.md +169 -0
- package/.claude/commands/jarvis-full.md +181 -0
- package/.claude/commands/jarvis.md +212 -0
- package/.claude/commands/ler-drive.md +212 -0
- package/.claude/commands/log.md +158 -0
- package/.claude/commands/loop.md +133 -0
- package/.claude/commands/loops.md +73 -0
- package/.claude/commands/mission-autopilot.md +538 -0
- package/.claude/commands/mission.md +353 -0
- package/.claude/commands/process-inbox.md +148 -0
- package/.claude/commands/process-jarvis.md +3036 -0
- package/.claude/commands/process-video.md +131 -0
- package/.claude/commands/rag-search.md +78 -0
- package/.claude/commands/resume.md +33 -0
- package/.claude/commands/save.md +38 -0
- package/.claude/commands/scan-inbox.md +125 -0
- package/.claude/commands/setup.md +99 -0
- package/.claude/commands/system-digest.md +243 -0
- package/.claude/commands/verify.md +182 -0
- package/.claude/commands/view-dna.md +169 -0
- package/.claude/hooks/agent_doctor.py +433 -0
- package/.claude/hooks/agent_memory_persister.py +203 -0
- package/.claude/hooks/auto_formatter.py +158 -0
- package/.claude/hooks/checkpoint_writer.py +244 -0
- package/.claude/hooks/claude_md_guard.py +146 -0
- package/.claude/hooks/creation_validator.py +357 -0
- package/.claude/hooks/enforce_dual_location.py +501 -0
- package/.claude/hooks/enforce_plan_mode.py +220 -0
- package/.claude/hooks/inbox_age_alert.py +367 -0
- package/.claude/hooks/jarvis_briefing.py +506 -0
- package/.claude/hooks/ledger_updater.py +301 -0
- package/.claude/hooks/memory_hints_injector.py +251 -0
- package/.claude/hooks/memory_updater.py +202 -0
- package/.claude/hooks/multi_agent_hook.py +464 -0
- package/.claude/hooks/notification_system.py +120 -0
- package/.claude/hooks/pattern_analyzer.py +526 -0
- package/.claude/hooks/pending_tracker.py +188 -0
- package/.claude/hooks/post_batch_cascading.py +1740 -0
- package/.claude/hooks/post_output_validator.py +358 -0
- package/.claude/hooks/post_tool_use.py +120 -0
- package/.claude/hooks/post_write_validator.py +200 -0
- package/.claude/hooks/quality_watchdog.py +394 -0
- package/.claude/hooks/ralph_wiggum.py +277 -0
- package/.claude/hooks/session-source-sync.py +218 -0
- package/.claude/hooks/session_autosave_v2.py +1135 -0
- package/.claude/hooks/session_end.py +203 -0
- package/.claude/hooks/session_start.py +939 -0
- package/.claude/hooks/skill_indexer.py +48 -0
- package/.claude/hooks/skill_router.py +358 -0
- package/.claude/hooks/stop_hook_completeness.py +178 -0
- package/.claude/hooks/subagent_tracker.py +163 -0
- package/.claude/hooks/token_checkpoint.py +584 -0
- package/.claude/hooks/user_prompt_submit.py +125 -0
- package/.claude/rules/ANTHROPIC-STANDARDS.md +384 -0
- package/.claude/rules/CLAUDE-LITE.md +201 -0
- package/.claude/rules/RULE-GROUP-1.md +320 -0
- package/.claude/rules/RULE-GROUP-2.md +307 -0
- package/.claude/rules/RULE-GROUP-3.md +248 -0
- package/.claude/rules/RULE-GROUP-4.md +427 -0
- package/.claude/rules/RULE-GROUP-5.md +388 -0
- package/.claude/rules/RULE-GROUP-6.md +387 -0
- package/.claude/rules/logging.md +53 -0
- package/.claude/rules/mcp-governance.md +128 -0
- package/.claude/rules/pipeline.md +60 -0
- package/.claude/rules/state-management.md +93 -0
- package/.claude/scripts/apply-tags.py +77 -0
- package/.claude/scripts/batch-extract-transcriptions.py +132 -0
- package/.claude/scripts/build-complete-index.py +250 -0
- package/.claude/scripts/build-planilha-index.py +170 -0
- package/.claude/scripts/complete-tag-matching.py +250 -0
- package/.claude/scripts/deduplicate-inbox.py +139 -0
- package/.claude/scripts/docx-xml-extractor.py +141 -0
- package/.claude/scripts/extract-docx-text.py +58 -0
- package/.claude/scripts/extract-single-transcription.py +74 -0
- package/.claude/scripts/extract_docx_from_gdrive.py +77 -0
- package/.claude/scripts/organized-downloader.py +246 -0
- package/.claude/scripts/planilha-tagger.py +187 -0
- package/.claude/scripts/revert-tags.py +70 -0
- package/.claude/scripts/source-sync.py +265 -0
- package/.claude/scripts/tag-inbox-files.py +276 -0
- package/.claude/scripts/tag-inbox-v2.py +253 -0
- package/.claude/scripts/test-extraction.py +35 -0
- package/.claude/scripts/test-full-extraction.py +74 -0
- package/.claude/skills/00-SKILL-CREATOR/SKILL.md +186 -0
- package/.claude/skills/01-SKILL-DOCS-MEGABRAIN/SKILL.md +251 -0
- package/.claude/skills/02-SKILL-PYTHON-MEGABRAIN/SKILL.md +323 -0
- package/.claude/skills/03-SKILL-AGENT-CREATION/SKILL.md +374 -0
- package/.claude/skills/04-SKILL-KNOWLEDGE-EXTRACTION/SKILL.md +318 -0
- package/.claude/skills/05-SKILL-PIPELINE-JARVIS/SKILL.md +430 -0
- package/.claude/skills/06-SKILL-BRAINSTORMING/SKILL.md +72 -0
- package/.claude/skills/07-SKILL-DISPATCHING-PARALLEL-AGENTS/SKILL.md +193 -0
- package/.claude/skills/08-SKILL-EXECUTING-PLANS/SKILL.md +114 -0
- package/.claude/skills/09-SKILL-WRITING-PLANS/SKILL.md +184 -0
- package/.claude/skills/10-SKILL-VERIFICATION-BEFORE-COMPLETION/SKILL.md +130 -0
- package/.claude/skills/11-SKILL-USING-SUPERPOWERS/SKILL.md +105 -0
- package/.claude/skills/DETECTION-PROTOCOL.md +217 -0
- package/.claude/skills/README.md +240 -0
- package/.claude/skills/SKILL-REGISTRY.md +284 -0
- package/.claude/skills/SKILL-SUGGESTIONS.md +114 -0
- package/.claude/skills/_TEMPLATES/SKILL-WRITER-GUIDE.md +385 -0
- package/.claude/skills/chronicler/SKILL.md +146 -0
- package/.claude/skills/chronicler/chronicler_core.py +468 -0
- package/.claude/skills/code-review/SKILL.md +160 -0
- package/.claude/skills/council/SKILL.md +210 -0
- package/.claude/skills/executor/SKILL.md +161 -0
- package/.claude/skills/fase-2-5-tagging/SKILL.md +182 -0
- package/.claude/skills/feature-dev/SKILL.md +154 -0
- package/.claude/skills/finance-agent/SKILL.md +137 -0
- package/.claude/skills/frontend-design/SKILL.md +165 -0
- package/.claude/skills/gdrive-transcription-downloader/SKILL.md +249 -0
- package/.claude/skills/gemini-fallback/SKILL.md +67 -0
- package/.claude/skills/gemini-fallback/gemini_fetch.py +0 -0
- package/.claude/skills/gha/SKILL.md +96 -0
- package/.claude/skills/gha/gha_diagnostic.py +227 -0
- package/.claude/skills/github-workflow/SKILL.md +190 -0
- package/.claude/skills/hookify/SKILL.md +134 -0
- package/.claude/skills/hybrid-source-reading/SKILL.md +265 -0
- package/.claude/skills/jarvis/SKILL.md +546 -0
- package/.claude/skills/jarvis-briefing/SKILL.md +340 -0
- package/.claude/skills/ler-planilha/SKILL.md +281 -0
- package/.claude/skills/plugin-dev/SKILL.md +176 -0
- package/.claude/skills/pr-review-toolkit/SKILL.md +178 -0
- package/.claude/skills/resume/SKILL.md +61 -0
- package/.claude/skills/save/SKILL.md +87 -0
- package/.claude/skills/skill-writer/SKILL.md +153 -0
- package/.claude/skills/skill-writer/examples.md +191 -0
- package/.claude/skills/skill-writer/troubleshooting.md +205 -0
- package/.claude/skills/smart-download-tagger/SKILL.md +148 -0
- package/.claude/skills/source-sync/SKILL.md +240 -0
- package/.claude/skills/sync-docs/SKILL.md +193 -0
- package/.claude/skills/sync-docs/config.json +37 -0
- package/.claude/skills/sync-docs/gdrive_sync.py +358 -0
- package/.claude/skills/sync-docs/reauth.py +71 -0
- package/.claude/skills/talent-agent/SKILL.md +183 -0
- package/.claude/skills/verify/SKILL.md +154 -0
- package/.claude/skills/verify/verify_runner.py +0 -0
- package/.claude/skills/verify-6-levels/SKILL.md +234 -0
- package/.claude/templates/BATCH-LOG-TEMPLATE.md +221 -0
- package/.claudeignore +9 -0
- package/.gitattributes +4 -0
- package/.github/layer1-allowlist.txt +80 -0
- package/.github/layer2-manifest.txt +40 -0
- package/.gitignore +219 -0
- package/README.md +1210 -0
- package/agents/_templates/INDEX.md +741 -0
- package/agents/_templates/TEMPLATE-AGENT-MD-ULTRA-ROBUSTO-V3.md +2399 -0
- package/agents/boardroom/CHECKLIST-MASTER.md +281 -0
- package/agents/boardroom/INTEGRATION-GUIDE.md +406 -0
- package/agents/boardroom/README.md +238 -0
- package/agents/boardroom/config/BOARDROOM-CONFIG.md +186 -0
- package/agents/boardroom/config/TTS-INTEGRATION.md +258 -0
- package/agents/boardroom/config/VOICE-PROFILES.md +624 -0
- package/agents/boardroom/config/voice_mapping.json +128 -0
- package/agents/boardroom/scripts/audio_generator.py +375 -0
- package/agents/boardroom/scripts/audio_generator_edge.py +353 -0
- package/agents/boardroom/scripts/jarvis_boardroom_hook.py +415 -0
- package/agents/boardroom/scripts/notebooklm_generator.py +578 -0
- package/agents/boardroom/templates/EPISODE-TEMPLATE.md +367 -0
- package/agents/boardroom/templates/scene-templates/SCENE-AGENT-DEBATE.md +252 -0
- package/agents/boardroom/templates/scene-templates/SCENE-COUNCIL.md +270 -0
- package/agents/boardroom/templates/scene-templates/SCENE-DNA-CONSULTATION.md +126 -0
- package/agents/boardroom/templates/scene-templates/SCENE-QUESTION.md +174 -0
- package/agents/boardroom/workflows/WORKFLOW-AUDIO-GENERATION.md +421 -0
- package/agents/constitution/BASE-CONSTITUTION.md +254 -0
- package/agents/council/CRITIC.md +197 -0
- package/agents/council/DEVILS-ADVOCATE.md +274 -0
- package/agents/council/SYNTHESIZER.md +293 -0
- package/agents/council/advogado-do-diabo/AGENT.md +489 -0
- package/agents/council/advogado-do-diabo/SOUL.md +100 -0
- package/agents/council/critico-metodologico/AGENT.md +670 -0
- package/agents/council/critico-metodologico/SOUL.md +107 -0
- package/agents/council/sintetizador/AGENT.md +558 -0
- package/agents/council/sintetizador/SOUL.md +94 -0
- package/agents/persons/_example/AGENT-EXAMPLE.md +42 -0
- package/agents/persons/_example/DNA-EXAMPLE.yaml +61 -0
- package/agents/protocols/AGENT-COGNITION-PROTOCOL.md +779 -0
- package/agents/protocols/AGENT-INTEGRITY-PROTOCOL.md +692 -0
- package/agents/protocols/BATCH-VISUAL-PROTOCOL.md +841 -0
- package/agents/protocols/DNA-CONFIG-TEMPLATE.yaml +181 -0
- package/agents/protocols/DNA-EXTRACTION-PROTOCOL.md +370 -0
- package/agents/protocols/EPISTEMIC-PROTOCOL.md +333 -0
- package/agents/protocols/LOG-STRUCTURE-PROTOCOL.md +65 -0
- package/agents/protocols/MEMORY-PROTOCOL.md +567 -0
- package/agents/protocols/NARRATIVE-SYNTHESIS-PROTOCOL.md +278 -0
- package/agents/protocols/PHASE-4-VERIFICATION-CHECKPOINT.md +146 -0
- package/agents/protocols/SOUL-TEMPLATE.md +416 -0
- package/agents/protocols/TEMPLATE-EVOLUTION-PROTOCOL.md +544 -0
- package/agents/protocols/VISUAL-DIFF-PROTOCOL.md +159 -0
- package/agents/sua-empresa/README.md +44 -0
- package/agents/sua-empresa/_example/jds/EXAMPLE-JD.md +42 -0
- package/agents/sua-empresa/_example/org/EXAMPLE-ORG.md +32 -0
- package/agents/sua-empresa/_example/roles/EXAMPLE-ROLE.md +38 -0
- package/bin/cli.js +2 -0
- package/bin/lib/ascii-art.js +234 -0
- package/bin/lib/installer.js +402 -0
- package/bin/lib/setup-wizard.js +95 -0
- package/bin/lib/validate-email.js +109 -0
- package/bin/mega-brain.js +97 -0
- package/bin/push.js +342 -0
- package/bin/templates/env.example +38 -0
- package/inbox/.gitkeep +0 -0
- package/integrations/README.md +46 -0
- package/integrations/mcps/MCP-REGISTRY.md +56 -0
- package/integrations/mcps/excalidraw/CONFIG.md +56 -0
- package/integrations/mcps/gdrive/CONFIG.md +38 -0
- package/knowledge/dna/.gitkeep +0 -0
- package/knowledge/dossiers/persons/.gitkeep +0 -0
- package/knowledge/dossiers/persons/DOSSIER-EXAMPLE.md +49 -0
- package/knowledge/dossiers/system/.gitkeep +0 -0
- package/knowledge/dossiers/themes/.gitkeep +0 -0
- package/knowledge/playbooks/.gitkeep +0 -0
- package/knowledge/playbooks/PLAYBOOK-EXAMPLE.md +50 -0
- package/knowledge/sources/.gitkeep +0 -0
- package/logs/.gitkeep +0 -0
- package/package.json +128 -0
- package/processing/canonical/.gitkeep +0 -0
- package/processing/chunks/.gitkeep +0 -0
- package/processing/insights/.gitkeep +0 -0
- package/processing/narratives/.gitkeep +0 -0
- package/reference/CONSELHO.md +337 -0
- package/reference/CONTEXT7_README.md +28 -0
- package/reference/JARVIS-LOGGING-PROTOCOL.md +380 -0
- package/reference/QUICK-START.md +197 -0
- package/reference/README-RALPH-CASCATEAMENTO.md +207 -0
- package/reference/TEMPLATE-MASTER.md +727 -0
- package/reference/prds/prd-jarvis-mega-brain-v3.md +1305 -0
- package/reference/templates/phase5/IMPLEMENTATION-GUIDE.md +355 -0
- package/reference/templates/phase5/MOGA-BRAIN-PHASE5-TEMPLATES.md +1284 -0
- package/reference/templates/phase5/README.md +165 -0
- package/reference/workflow-claude-code-boris-cherny-continuous-claude.md +2232 -0
- package/system/database/001_moneyclub_buyers.sql +160 -0
- package/system/database/002_premium_token.sql +97 -0
- package/system/database/apply-migration.mjs +129 -0
- package/system/docs/MEGA-BRAIN-DEMO-COMPLETA.md +1226 -0
- package/system/docs/MEGA-BRAIN-MANIFESTO-COMPLETO.md +1054 -0
- package/system/docs/MOGA-BRAIN-EXPLICACAO-COMPLETA.md +791 -0
- package/system/docs/STRATEGIC-INTEGRATION-GUIDE.md +725 -0
- package/system/docs/architecture/01-system-context.md +136 -0
- package/system/docs/architecture/02-components.md +225 -0
- package/system/docs/architecture/03-data-flow.md +235 -0
- package/system/docs/architecture/04-integrations.md +283 -0
- package/system/docs/architecture/README.md +71 -0
- package/system/docs/architecture/diagrams/component-diagram.mmd +50 -0
- package/system/docs/architecture/diagrams/data-flow.mmd +39 -0
- package/system/docs/architecture/diagrams/system-overview.mmd +68 -0
- package/system/protocols/AGENT-AUTHORITY.md +217 -0
- package/system/protocols/CONSTITUICAO-BASE.md +115 -0
- package/system/protocols/CONSTITUTION.md +231 -0
- package/system/protocols/GOVERNANCE-MAP.md +123 -0
- package/system/protocols/HOOK-SECURITY-THREAT-MODEL.md +152 -0
- package/system/protocols/ORQUESTRACAO-PROTOCOL.md +215 -0
- package/system/protocols/_archive/CHUNKING-PROTOCOL.md +207 -0
- package/system/protocols/_archive/ENTITY-RESOLUTION-PROTOCOL.md +269 -0
- package/system/protocols/_archive/INSIGHT-EXTRACTION-PROTOCOL.md +257 -0
- package/system/protocols/_archive/NARRATIVE-SYNTHESIS-PROTOCOL.md +290 -0
- package/system/protocols/agents/AGENT-INTERACTION.md +315 -0
- package/system/protocols/agents/CORTEX-PROTOCOL.md +520 -0
- package/system/protocols/agents/EPISTEMIC-PROTOCOL.md +465 -0
- package/system/protocols/agents/MEMORY-PROTOCOL.md +366 -0
- package/system/protocols/agents/WAR-ROOM.md +355 -0
- package/system/protocols/company/COMPANY-DOCUMENT-PROTOCOL.md +793 -0
- package/system/protocols/company/COMPANY-ENRICHMENT-PROTOCOL.md +679 -0
- package/system/protocols/conclave/CONCLAVE-LOG-TEMPLATE-v2.md +309 -0
- package/system/protocols/conclave/CONCLAVE-PROTOCOL.md +518 -0
- package/system/protocols/conclave/DEBATE-DYNAMICS-CONFIG.yaml +322 -0
- package/system/protocols/conclave/DEBATE-DYNAMICS-PROTOCOL.md +613 -0
- package/system/protocols/conclave/DEBATE-PROTOCOL.md +323 -0
- package/system/protocols/council/COUNCIL-LOG-TEMPLATE-v2.md +309 -0
- package/system/protocols/council/COUNCIL-PROTOCOL.md +518 -0
- package/system/protocols/council/DEBATE-DYNAMICS-CONFIG.yaml +322 -0
- package/system/protocols/council/DEBATE-DYNAMICS-PROTOCOL.md +613 -0
- package/system/protocols/council/DEBATE-PROTOCOL.md +323 -0
- package/system/protocols/dna/DNA-EXTRACTION-PROTOCOL.md +1214 -0
- package/system/protocols/dna/ENRICHMENT-PROTOCOL.md +408 -0
- package/system/protocols/dna/REASONING-MODEL-PROTOCOL.md +331 -0
- package/system/protocols/pipeline/DOSSIER-COMPILATION-PROTOCOL.md +790 -0
- package/system/protocols/pipeline/NARRATIVE-METABOLISM-PROTOCOL.md +292 -0
- package/system/protocols/pipeline/PIPELINE-JARVIS-v2.1.md +606 -0
- package/system/protocols/pipeline/PROMPT-1.1-CHUNKING.md +154 -0
- package/system/protocols/pipeline/PROMPT-1.2-ENTITY-RESOLUTION.md +186 -0
- package/system/protocols/pipeline/PROMPT-2.1-DNA-TAGS-INCREMENT.md +208 -0
- package/system/protocols/pipeline/PROMPT-2.1-INSIGHT-EXTRACTION.md +191 -0
- package/system/protocols/pipeline/PROMPT-3.1-NARRATIVE-SYNTHESIS.md +331 -0
- package/system/protocols/pipeline/SOURCES-COMPILATION-PROTOCOL.md +340 -0
- package/system/protocols/system/AUTO-LOG-PROTOCOL.md +369 -0
- package/system/protocols/system/CHECKPOINT-ENFORCEMENT.md +176 -0
- package/system/protocols/system/ENFORCEMENT.md +435 -0
- package/system/protocols/system/LOG-TEMPLATES.md +1068 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Mega Brain - AI Knowledge Management System
|
|
5
|
+
* CLI Entry Point
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* npx mega-brain install - Install Mega Brain in current/specified directory
|
|
9
|
+
* npx mega-brain validate - Validate MoneyClub email
|
|
10
|
+
* npx mega-brain push - Push to Layer 1/2/3 remote
|
|
11
|
+
* npx mega-brain upgrade - Upgrade Community to Premium
|
|
12
|
+
* npx mega-brain --help - Show help
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { createRequire } from 'module';
|
|
16
|
+
import { fileURLToPath } from 'url';
|
|
17
|
+
import { dirname, resolve } from 'path';
|
|
18
|
+
import { readFileSync } from 'fs';
|
|
19
|
+
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = dirname(__filename);
|
|
22
|
+
const require = createRequire(import.meta.url);
|
|
23
|
+
|
|
24
|
+
const pkg = JSON.parse(readFileSync(resolve(__dirname, '..', 'package.json'), 'utf-8'));
|
|
25
|
+
|
|
26
|
+
const args = process.argv.slice(2);
|
|
27
|
+
const command = args[0];
|
|
28
|
+
|
|
29
|
+
async function main() {
|
|
30
|
+
const { showBanner } = await import('./lib/ascii-art.js');
|
|
31
|
+
|
|
32
|
+
showBanner(pkg.version);
|
|
33
|
+
|
|
34
|
+
if (!command || command === '--help' || command === '-h') {
|
|
35
|
+
showHelp();
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (command === 'install') {
|
|
40
|
+
const { runInstaller } = await import('./lib/installer.js');
|
|
41
|
+
await runInstaller(pkg.version);
|
|
42
|
+
} else if (command === 'validate') {
|
|
43
|
+
const { validateEmail } = await import('./lib/validate-email.js');
|
|
44
|
+
const email = args[1];
|
|
45
|
+
if (!email) {
|
|
46
|
+
console.error('\n Uso: mega-brain validate <email>\n');
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
const result = await validateEmail(email);
|
|
50
|
+
console.log(result.valid ? `\n Email válido: ${result.name}` : `\n Email inválido: ${result.reason}`);
|
|
51
|
+
setTimeout(() => process.exit(result.valid ? 0 : 1), 100);
|
|
52
|
+
} else if (command === 'push') {
|
|
53
|
+
// Dynamic import of push module
|
|
54
|
+
await import('./push.js');
|
|
55
|
+
} else if (command === 'upgrade') {
|
|
56
|
+
const { runUpgrade } = await import('./lib/installer.js');
|
|
57
|
+
if (typeof runUpgrade === 'function') {
|
|
58
|
+
await runUpgrade(pkg.version);
|
|
59
|
+
} else {
|
|
60
|
+
console.log('\n Funcionalidade de upgrade será disponibilizada em breve.');
|
|
61
|
+
console.log(' Por enquanto, reinstale com: mega-brain install\n');
|
|
62
|
+
}
|
|
63
|
+
} else {
|
|
64
|
+
console.error(`\n Comando desconhecido: ${command}`);
|
|
65
|
+
showHelp();
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function showHelp() {
|
|
71
|
+
console.log(`
|
|
72
|
+
Mega Brain v${pkg.version}
|
|
73
|
+
AI Knowledge Management System
|
|
74
|
+
|
|
75
|
+
Comandos:
|
|
76
|
+
install Instalar Mega Brain (PREMIUM ou Community)
|
|
77
|
+
validate Validar email MoneyClub (mega-brain validate <email>)
|
|
78
|
+
push Push para Layer 1/2/3 (mega-brain push [--layer N])
|
|
79
|
+
upgrade Atualizar Community para Premium
|
|
80
|
+
--help Mostrar esta mensagem
|
|
81
|
+
|
|
82
|
+
Layers:
|
|
83
|
+
Layer 1 Community (público) — shell sem conteúdo
|
|
84
|
+
Layer 2 Premium (MoneyClub) — shell + cérebro
|
|
85
|
+
Layer 3 Full Backup (pessoal) — tudo incluindo dados sensíveis
|
|
86
|
+
|
|
87
|
+
Exemplos:
|
|
88
|
+
npx mega-brain install
|
|
89
|
+
npx mega-brain push --layer 1
|
|
90
|
+
npx mega-brain push
|
|
91
|
+
`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
main().catch((err) => {
|
|
95
|
+
console.error('\n Erro inesperado:', err.message);
|
|
96
|
+
setTimeout(() => process.exit(1), 100);
|
|
97
|
+
});
|
package/bin/push.js
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Mega Brain - 3-Layer Push System
|
|
5
|
+
*
|
|
6
|
+
* Pushes content to the appropriate git remote based on layer selection:
|
|
7
|
+
* Layer 1 (public) → Only allowlisted files → remote "public"
|
|
8
|
+
* Layer 2 (premium) → Layer 1 + premium content → remote "premium"
|
|
9
|
+
* Layer 3 (backup) → Everything, no filtering → remote "backup"
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* mega-brain push Interactive layer selection
|
|
13
|
+
* mega-brain push --layer 1 Direct push to Layer 1
|
|
14
|
+
* mega-brain push --layer 2 Direct push to Layer 2
|
|
15
|
+
* mega-brain push --layer 3 Direct push to Layer 3
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { createInterface } from 'readline';
|
|
19
|
+
import { readFileSync, existsSync, mkdirSync, cpSync, rmSync, readdirSync, statSync } from 'fs';
|
|
20
|
+
import { resolve, dirname, join, relative } from 'path';
|
|
21
|
+
import { fileURLToPath } from 'url';
|
|
22
|
+
import { execSync } from 'child_process';
|
|
23
|
+
|
|
24
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
25
|
+
const __dirname = dirname(__filename);
|
|
26
|
+
const PROJECT_ROOT = resolve(__dirname, '..');
|
|
27
|
+
|
|
28
|
+
function prompt(question) {
|
|
29
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
30
|
+
return new Promise((res) => {
|
|
31
|
+
rl.question(question, (answer) => {
|
|
32
|
+
rl.close();
|
|
33
|
+
res(answer.trim());
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function git(cmd, opts = {}) {
|
|
39
|
+
try {
|
|
40
|
+
return execSync(`git ${cmd}`, {
|
|
41
|
+
cwd: PROJECT_ROOT,
|
|
42
|
+
encoding: 'utf-8',
|
|
43
|
+
stdio: opts.silent ? 'pipe' : 'inherit',
|
|
44
|
+
...opts,
|
|
45
|
+
});
|
|
46
|
+
} catch (err) {
|
|
47
|
+
if (opts.silent) return '';
|
|
48
|
+
throw err;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function loadAllowlist(filePath) {
|
|
53
|
+
if (!existsSync(filePath)) return [];
|
|
54
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
55
|
+
return content
|
|
56
|
+
.split('\n')
|
|
57
|
+
.map((l) => l.trim())
|
|
58
|
+
.filter((l) => l && !l.startsWith('#'));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function matchesPattern(filePath, patterns) {
|
|
62
|
+
for (const pattern of patterns) {
|
|
63
|
+
// Exact match
|
|
64
|
+
if (filePath === pattern) return true;
|
|
65
|
+
// Directory match (pattern ends with /)
|
|
66
|
+
if (pattern.endsWith('/') && filePath.startsWith(pattern)) return true;
|
|
67
|
+
// File starts with pattern directory
|
|
68
|
+
if (filePath.startsWith(pattern + '/')) return true;
|
|
69
|
+
// Glob-like: pattern without trailing slash matches as prefix
|
|
70
|
+
if (!pattern.includes('*') && filePath.startsWith(pattern)) return true;
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function getTrackedFiles() {
|
|
76
|
+
const output = git('ls-files', { silent: true, stdio: 'pipe' });
|
|
77
|
+
return output.split('\n').filter(Boolean);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function getRemotes() {
|
|
81
|
+
const output = git('remote -v', { silent: true, stdio: 'pipe' });
|
|
82
|
+
const remotes = {};
|
|
83
|
+
for (const line of output.split('\n')) {
|
|
84
|
+
const match = line.match(/^(\S+)\s+(\S+)\s+\(push\)/);
|
|
85
|
+
if (match) remotes[match[1]] = match[2];
|
|
86
|
+
}
|
|
87
|
+
return remotes;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async function selectLayer(args) {
|
|
91
|
+
// Check for --layer flag
|
|
92
|
+
const layerIdx = args.indexOf('--layer');
|
|
93
|
+
if (layerIdx !== -1 && args[layerIdx + 1]) {
|
|
94
|
+
const layer = parseInt(args[layerIdx + 1], 10);
|
|
95
|
+
if ([1, 2, 3].includes(layer)) return layer;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
console.log(`
|
|
99
|
+
┌──────────────────────────────────────────────────────────────┐
|
|
100
|
+
│ MEGA BRAIN — PUSH LAYERS │
|
|
101
|
+
├──────────────────────────────────────────────────────────────┤
|
|
102
|
+
│ │
|
|
103
|
+
│ [1] Layer 1 — COMMUNITY (Público) │
|
|
104
|
+
│ Shell do sistema + comandos + estrutura vazia │
|
|
105
|
+
│ Remote: public → GitHub público │
|
|
106
|
+
│ │
|
|
107
|
+
│ [2] Layer 2 — PREMIUM (MoneyClub Members) │
|
|
108
|
+
│ Layer 1 + Mentes Clonadas + Playbooks + DNAs │
|
|
109
|
+
│ Remote: premium → GitHub privado (gated) │
|
|
110
|
+
│ │
|
|
111
|
+
│ [3] Layer 3 — FULL BACKUP (Pessoal) │
|
|
112
|
+
│ Tudo. Inbox, logs, .env, dados sensíveis │
|
|
113
|
+
│ Remote: backup → GitHub privado (seu) │
|
|
114
|
+
│ │
|
|
115
|
+
└──────────────────────────────────────────────────────────────┘
|
|
116
|
+
`);
|
|
117
|
+
|
|
118
|
+
const choice = await prompt(' Selecione a Layer (1/2/3): ');
|
|
119
|
+
const layer = parseInt(choice, 10);
|
|
120
|
+
if (![1, 2, 3].includes(layer)) {
|
|
121
|
+
console.error('\n Opção inválida. Use 1, 2 ou 3.\n');
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
return layer;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function getRemoteName(layer) {
|
|
128
|
+
return { 1: 'public', 2: 'premium', 3: 'backup' }[layer];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function getLayerLabel(layer) {
|
|
132
|
+
return {
|
|
133
|
+
1: 'COMMUNITY (Layer 1 — Público)',
|
|
134
|
+
2: 'PREMIUM (Layer 2 — MoneyClub)',
|
|
135
|
+
3: 'FULL BACKUP (Layer 3 — Pessoal)',
|
|
136
|
+
}[layer];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async function pushLayer3(remoteName, branch) {
|
|
140
|
+
// Layer 3: push everything, no filtering
|
|
141
|
+
console.log(`\n Enviando TUDO para remote "${remoteName}"...`);
|
|
142
|
+
git(`push ${remoteName} ${branch}`);
|
|
143
|
+
console.log(`\n Layer 3 enviada com sucesso para ${remoteName}/${branch}`);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
async function pushFiltered(layer, remoteName, branch) {
|
|
147
|
+
const allowlistPath = resolve(PROJECT_ROOT, '.github', 'layer1-allowlist.txt');
|
|
148
|
+
const allowlist = loadAllowlist(allowlistPath);
|
|
149
|
+
|
|
150
|
+
if (allowlist.length === 0) {
|
|
151
|
+
console.error('\n ERRO: Allowlist vazia ou não encontrada.');
|
|
152
|
+
console.error(` Verifique: ${allowlistPath}\n`);
|
|
153
|
+
process.exit(1);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const syncDir = resolve(PROJECT_ROOT, '.layer-sync', `layer${layer}`);
|
|
157
|
+
|
|
158
|
+
console.log(`\n Preparando Layer ${layer}...`);
|
|
159
|
+
|
|
160
|
+
// Clean previous sync
|
|
161
|
+
if (existsSync(syncDir)) {
|
|
162
|
+
rmSync(syncDir, { recursive: true, force: true });
|
|
163
|
+
}
|
|
164
|
+
mkdirSync(syncDir, { recursive: true });
|
|
165
|
+
|
|
166
|
+
// Initialize git in sync dir if needed
|
|
167
|
+
const syncGit = (cmd) =>
|
|
168
|
+
execSync(`git ${cmd}`, { cwd: syncDir, encoding: 'utf-8', stdio: 'pipe' });
|
|
169
|
+
|
|
170
|
+
// Get all tracked files
|
|
171
|
+
const allFiles = getTrackedFiles();
|
|
172
|
+
|
|
173
|
+
// Filter based on layer
|
|
174
|
+
let includedFiles;
|
|
175
|
+
if (layer === 1) {
|
|
176
|
+
// Layer 1: only allowlisted files
|
|
177
|
+
includedFiles = allFiles.filter((f) => matchesPattern(f, allowlist));
|
|
178
|
+
} else {
|
|
179
|
+
// Layer 2: allowlisted + premium (exclude Layer 3 personal data)
|
|
180
|
+
const layer3Exclusions = [
|
|
181
|
+
'inbox/',
|
|
182
|
+
'logs/',
|
|
183
|
+
'.env',
|
|
184
|
+
'.mcp.json',
|
|
185
|
+
'.claude/agent-memory/',
|
|
186
|
+
'.claude/aios/',
|
|
187
|
+
'.claude/sessions/',
|
|
188
|
+
'.claude/monitoring/',
|
|
189
|
+
'.claude/learning-system/',
|
|
190
|
+
'.claude/mission-control/',
|
|
191
|
+
'system/backups/',
|
|
192
|
+
'system/jarvis-voice/audiobooks/',
|
|
193
|
+
'system/jarvis-voice/voice_id',
|
|
194
|
+
'system/jarvis-voice/vapi_config.json',
|
|
195
|
+
'system/registry/',
|
|
196
|
+
'system/temp/',
|
|
197
|
+
'system/archive/',
|
|
198
|
+
];
|
|
199
|
+
includedFiles = allFiles.filter(
|
|
200
|
+
(f) => !layer3Exclusions.some((excl) => f.startsWith(excl) || f === excl.replace(/\/$/, ''))
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
console.log(` ${includedFiles.length} arquivos selecionados para Layer ${layer}`);
|
|
205
|
+
|
|
206
|
+
// Copy selected files to sync dir
|
|
207
|
+
let copied = 0;
|
|
208
|
+
for (const file of includedFiles) {
|
|
209
|
+
const srcPath = resolve(PROJECT_ROOT, file);
|
|
210
|
+
const destPath = resolve(syncDir, file);
|
|
211
|
+
const destDir = dirname(destPath);
|
|
212
|
+
|
|
213
|
+
if (!existsSync(srcPath)) continue;
|
|
214
|
+
|
|
215
|
+
if (!existsSync(destDir)) {
|
|
216
|
+
mkdirSync(destDir, { recursive: true });
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
try {
|
|
220
|
+
cpSync(srcPath, destPath);
|
|
221
|
+
copied++;
|
|
222
|
+
} catch {
|
|
223
|
+
// Skip files that can't be copied
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
console.log(` ${copied} arquivos copiados para staging`);
|
|
228
|
+
|
|
229
|
+
// Initialize git repo in sync dir and push
|
|
230
|
+
try {
|
|
231
|
+
syncGit('init');
|
|
232
|
+
syncGit('add -A');
|
|
233
|
+
|
|
234
|
+
// Get current commit message from main repo
|
|
235
|
+
const lastMsg = git('log -1 --format=%s', { silent: true, stdio: 'pipe' }).trim();
|
|
236
|
+
const commitMsg = `[Layer ${layer}] ${lastMsg}`;
|
|
237
|
+
|
|
238
|
+
syncGit(`commit -m "${commitMsg.replace(/"/g, '\\"')}" --allow-empty`);
|
|
239
|
+
|
|
240
|
+
// Get remote URL
|
|
241
|
+
const remotes = getRemotes();
|
|
242
|
+
const remoteUrl = remotes[remoteName];
|
|
243
|
+
|
|
244
|
+
if (!remoteUrl) {
|
|
245
|
+
console.error(`\n ERRO: Remote "${remoteName}" não configurado.`);
|
|
246
|
+
console.error(' Configure com: git remote add ' + remoteName + ' <url>\n');
|
|
247
|
+
process.exit(1);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
syncGit(`remote add ${remoteName} ${remoteUrl}`);
|
|
251
|
+
console.log(`\n Enviando para ${remoteName}...`);
|
|
252
|
+
|
|
253
|
+
execSync(`git push ${remoteName} HEAD:${branch} --force`, {
|
|
254
|
+
cwd: syncDir,
|
|
255
|
+
encoding: 'utf-8',
|
|
256
|
+
stdio: 'inherit',
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
console.log(`\n Layer ${layer} enviada com sucesso!`);
|
|
260
|
+
} finally {
|
|
261
|
+
// Cleanup
|
|
262
|
+
try {
|
|
263
|
+
rmSync(syncDir, { recursive: true, force: true });
|
|
264
|
+
} catch {
|
|
265
|
+
// Ignore cleanup errors
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
async function main() {
|
|
271
|
+
const args = process.argv.slice(2).filter((a) => a !== 'push');
|
|
272
|
+
|
|
273
|
+
console.log(`
|
|
274
|
+
┌──────────────────────────────────────────────────────────────┐
|
|
275
|
+
│ MEGA BRAIN — 3-LAYER PUSH SYSTEM │
|
|
276
|
+
└──────────────────────────────────────────────────────────────┘`);
|
|
277
|
+
|
|
278
|
+
// Check for uncommitted changes
|
|
279
|
+
const status = git('status --porcelain', { silent: true, stdio: 'pipe' }).trim();
|
|
280
|
+
if (status) {
|
|
281
|
+
console.log('\n AVISO: Existem mudanças não commitadas:');
|
|
282
|
+
console.log(
|
|
283
|
+
status
|
|
284
|
+
.split('\n')
|
|
285
|
+
.slice(0, 5)
|
|
286
|
+
.map((l) => ` ${l}`)
|
|
287
|
+
.join('\n')
|
|
288
|
+
);
|
|
289
|
+
if (status.split('\n').length > 5) {
|
|
290
|
+
console.log(` ... e mais ${status.split('\n').length - 5} arquivos`);
|
|
291
|
+
}
|
|
292
|
+
const proceed = await prompt('\n Continuar mesmo assim? (s/n): ');
|
|
293
|
+
if (proceed.toLowerCase() !== 's') {
|
|
294
|
+
console.log('\n Push cancelado. Faça commit primeiro.\n');
|
|
295
|
+
process.exit(0);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const layer = await selectLayer(args);
|
|
300
|
+
const remoteName = getRemoteName(layer);
|
|
301
|
+
const branch = git('rev-parse --abbrev-ref HEAD', { silent: true, stdio: 'pipe' }).trim() || 'main';
|
|
302
|
+
|
|
303
|
+
// Verify remote exists
|
|
304
|
+
const remotes = getRemotes();
|
|
305
|
+
if (!remotes[remoteName]) {
|
|
306
|
+
console.error(`\n ERRO: Remote "${remoteName}" não existe.`);
|
|
307
|
+
console.error(`\n Remotes disponíveis:`);
|
|
308
|
+
for (const [name, url] of Object.entries(remotes)) {
|
|
309
|
+
console.error(` ${name} → ${url}`);
|
|
310
|
+
}
|
|
311
|
+
console.error(`\n Adicione com: git remote add ${remoteName} <url>\n`);
|
|
312
|
+
process.exit(1);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
console.log(`\n Layer: ${getLayerLabel(layer)}`);
|
|
316
|
+
console.log(` Remote: ${remoteName} → ${remotes[remoteName]}`);
|
|
317
|
+
console.log(` Branch: ${branch}`);
|
|
318
|
+
|
|
319
|
+
const confirm = await prompt('\n Confirmar push? (s/n): ');
|
|
320
|
+
if (confirm.toLowerCase() !== 's') {
|
|
321
|
+
console.log('\n Push cancelado.\n');
|
|
322
|
+
process.exit(0);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if (layer === 3) {
|
|
326
|
+
await pushLayer3(remoteName, branch);
|
|
327
|
+
} else {
|
|
328
|
+
await pushFiltered(layer, remoteName, branch);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
console.log(`
|
|
332
|
+
┌──────────────────────────────────────────────────────────────┐
|
|
333
|
+
│ PUSH CONCLUÍDO │
|
|
334
|
+
│ Layer ${layer} → ${remoteName} (${branch})${' '.repeat(Math.max(0, 35 - remoteName.length - branch.length))}│
|
|
335
|
+
└──────────────────────────────────────────────────────────────┘
|
|
336
|
+
`);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
main().catch((err) => {
|
|
340
|
+
console.error(`\n Erro: ${err.message}\n`);
|
|
341
|
+
process.exit(1);
|
|
342
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Mega Brain - Environment Configuration
|
|
2
|
+
# Copy this file to .env and fill in your API keys
|
|
3
|
+
# Run /setup in Claude Code for guided configuration
|
|
4
|
+
|
|
5
|
+
# ═══════════════════════════════════════════════════════
|
|
6
|
+
# REQUIRED - Without this, video transcription won't work
|
|
7
|
+
# ═══════════════════════════════════════════════════════
|
|
8
|
+
|
|
9
|
+
# OpenAI API (Whisper) - Video & audio transcription
|
|
10
|
+
# Essential for /ingest with YouTube videos and audio files
|
|
11
|
+
# The system uploads media and transcribes via Whisper API
|
|
12
|
+
# Get yours at: https://platform.openai.com/api-keys
|
|
13
|
+
OPENAI_API_KEY=
|
|
14
|
+
|
|
15
|
+
# ═══════════════════════════════════════════════════════
|
|
16
|
+
# RECOMMENDED - Highly recommended for full functionality
|
|
17
|
+
# ═══════════════════════════════════════════════════════
|
|
18
|
+
|
|
19
|
+
# Voyage AI - Semantic search in knowledge base
|
|
20
|
+
# Enables Conclave and agents to find evidence in your materials
|
|
21
|
+
# Powers the RAG (Retrieval Augmented Generation) pipeline
|
|
22
|
+
# Get yours at: https://dash.voyageai.com/api-keys
|
|
23
|
+
VOYAGE_API_KEY=
|
|
24
|
+
|
|
25
|
+
# ═══════════════════════════════════════════════════════
|
|
26
|
+
# OPTIONAL - Enable additional features
|
|
27
|
+
# ═══════════════════════════════════════════════════════
|
|
28
|
+
|
|
29
|
+
# Anthropic API (Claude) - NOT needed with Claude Code Max/Pro
|
|
30
|
+
# Only required for standalone scripts outside Claude Code
|
|
31
|
+
# Get yours at: https://console.anthropic.com/settings/keys
|
|
32
|
+
ANTHROPIC_API_KEY=
|
|
33
|
+
|
|
34
|
+
# Google Drive Import - Import content from Google Drive
|
|
35
|
+
# PDFs, documents, spreadsheets directly from your Drive
|
|
36
|
+
# Setup at: https://console.cloud.google.com/apis/credentials
|
|
37
|
+
GOOGLE_CLIENT_ID=
|
|
38
|
+
GOOGLE_CLIENT_SECRET=
|
package/inbox/.gitkeep
ADDED
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# integrations - MCP Hub & Notifications
|
|
2
|
+
|
|
3
|
+
> **Versao:** 1.0.0
|
|
4
|
+
> **Status:** Em construcao (SPEC-004)
|
|
5
|
+
|
|
6
|
+
## Descricao
|
|
7
|
+
|
|
8
|
+
Central de integrações do [SUA EMPRESA] OS, incluindo MCPs e sistemas de notificação.
|
|
9
|
+
|
|
10
|
+
## Estrutura
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
integrations/
|
|
14
|
+
├── mcps/ # MCP Hub
|
|
15
|
+
│ ├── MCP-REGISTRY.md # Registro central (a criar)
|
|
16
|
+
│ ├── gdrive/ # Google Drive + Sheets (ATIVO)
|
|
17
|
+
│ ├── excalidraw/ # Diagramas (ATIVO)
|
|
18
|
+
│ ├── playwright/ # Automacao web (AIOS)
|
|
19
|
+
│ ├── desktop-commander/ # Controle desktop (AIOS)
|
|
20
|
+
│ └── exa/ # Search avancado (AIOS)
|
|
21
|
+
└── notifications/ # Sistema de notificacoes
|
|
22
|
+
├── ntfy/ # Push notifications (Ralph Inferno)
|
|
23
|
+
└── discord/ # Webhooks (Ralph Inferno)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## MCPs Ativos
|
|
27
|
+
|
|
28
|
+
| MCP | Status | Descricao |
|
|
29
|
+
|-----|--------|-----------|
|
|
30
|
+
| gdrive | ✅ ATIVO | Google Drive + Sheets |
|
|
31
|
+
| excalidraw | ✅ ATIVO | Diagramas |
|
|
32
|
+
|
|
33
|
+
## MCPs Pendentes (AIOS)
|
|
34
|
+
|
|
35
|
+
| MCP | Fonte | Descricao |
|
|
36
|
+
|-----|-------|-----------|
|
|
37
|
+
| playwright | AIOS | Automacao web, screenshots |
|
|
38
|
+
| desktop-commander | AIOS | Controle de desktop |
|
|
39
|
+
| exa | AIOS | Search avancado |
|
|
40
|
+
|
|
41
|
+
## Notifications Pendentes (Ralph Inferno)
|
|
42
|
+
|
|
43
|
+
| Sistema | Descricao |
|
|
44
|
+
|---------|-----------|
|
|
45
|
+
| ntfy | Push notifications para celular |
|
|
46
|
+
| discord | Webhooks para canal |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# MCP Registry - [SUA EMPRESA] OS
|
|
2
|
+
|
|
3
|
+
> **Versao:** 1.0.0
|
|
4
|
+
> **Atualizado:** 2026-01-17
|
|
5
|
+
|
|
6
|
+
## MCPs Registrados
|
|
7
|
+
|
|
8
|
+
### ATIVOS
|
|
9
|
+
|
|
10
|
+
| MCP | Comandos | Fonte |
|
|
11
|
+
|-----|----------|-------|
|
|
12
|
+
| **gdrive** | `gdrive_search`, `gdrive_read_file`, `gsheets_read`, `gsheets_update_cell`, `gdocs_create` | Mega Brain |
|
|
13
|
+
| **excalidraw** | `create_element`, `update_element`, `delete_element`, `query_elements`, `create_from_mermaid` | Mega Brain |
|
|
14
|
+
|
|
15
|
+
### PENDENTES (A Configurar)
|
|
16
|
+
|
|
17
|
+
| MCP | Comandos Previstos | Fonte |
|
|
18
|
+
|-----|-------------------|-------|
|
|
19
|
+
| **playwright** | `navigate`, `screenshot`, `click`, `fill`, `extract` | AIOS |
|
|
20
|
+
| **desktop-commander** | `execute`, `read_file`, `write_file`, `list_dir` | AIOS |
|
|
21
|
+
| **exa** | `search`, `get_contents` | AIOS |
|
|
22
|
+
|
|
23
|
+
## Como Usar
|
|
24
|
+
|
|
25
|
+
### gdrive
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
# Buscar arquivos
|
|
29
|
+
mcp__gdrive__gdrive_search(query="nome do arquivo")
|
|
30
|
+
|
|
31
|
+
# Ler arquivo
|
|
32
|
+
mcp__gdrive__gdrive_read_file(fileId="...")
|
|
33
|
+
|
|
34
|
+
# Ler planilha
|
|
35
|
+
mcp__gdrive__gsheets_read(spreadsheetId="...")
|
|
36
|
+
|
|
37
|
+
# Atualizar celula
|
|
38
|
+
mcp__gdrive__gsheets_update_cell(fileId="...", range="A1", value="...")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### excalidraw
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
# Criar elemento
|
|
45
|
+
mcp__excalidraw__create_element(type="rectangle", x=0, y=0, width=100, height=50)
|
|
46
|
+
|
|
47
|
+
# Criar de Mermaid
|
|
48
|
+
mcp__excalidraw__create_from_mermaid(mermaidDiagram="graph TD; A-->B")
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Adicionar Novo MCP
|
|
52
|
+
|
|
53
|
+
1. Criar pasta em `/integrations/mcps/[nome]/`
|
|
54
|
+
2. Criar `CONFIG.md` com instrucoes
|
|
55
|
+
3. Atualizar este registry
|
|
56
|
+
4. Configurar em `settings.json` se necessario
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Excalidraw MCP
|
|
2
|
+
|
|
3
|
+
> **Status:** ✅ ATIVO
|
|
4
|
+
> **Fonte:** Mega Brain (nativo)
|
|
5
|
+
|
|
6
|
+
## Comandos Disponiveis
|
|
7
|
+
|
|
8
|
+
| Comando | Descricao |
|
|
9
|
+
|---------|-----------|
|
|
10
|
+
| `create_element` | Criar novo elemento |
|
|
11
|
+
| `update_element` | Atualizar elemento existente |
|
|
12
|
+
| `delete_element` | Deletar elemento |
|
|
13
|
+
| `query_elements` | Buscar elementos |
|
|
14
|
+
| `get_resource` | Obter recurso (scene, library, theme) |
|
|
15
|
+
| `group_elements` | Agrupar elementos |
|
|
16
|
+
| `ungroup_elements` | Desagrupar |
|
|
17
|
+
| `align_elements` | Alinhar elementos |
|
|
18
|
+
| `distribute_elements` | Distribuir elementos |
|
|
19
|
+
| `lock_elements` | Travar elementos |
|
|
20
|
+
| `unlock_elements` | Destravar elementos |
|
|
21
|
+
| `create_from_mermaid` | Criar diagrama de Mermaid |
|
|
22
|
+
| `batch_create_elements` | Criar multiplos elementos |
|
|
23
|
+
|
|
24
|
+
## Tipos de Elementos
|
|
25
|
+
|
|
26
|
+
- `rectangle`
|
|
27
|
+
- `ellipse`
|
|
28
|
+
- `diamond`
|
|
29
|
+
- `arrow`
|
|
30
|
+
- `text`
|
|
31
|
+
- `label`
|
|
32
|
+
- `freedraw`
|
|
33
|
+
- `line`
|
|
34
|
+
|
|
35
|
+
## Exemplos
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
# Criar retangulo
|
|
39
|
+
mcp__excalidraw__create_element(
|
|
40
|
+
type="rectangle",
|
|
41
|
+
x=100, y=100,
|
|
42
|
+
width=200, height=100,
|
|
43
|
+
backgroundColor="#e3f2fd"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
# Criar de Mermaid
|
|
47
|
+
mcp__excalidraw__create_from_mermaid(
|
|
48
|
+
mermaidDiagram="graph TD; A[Start]-->B[Process]; B-->C[End]"
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
# Criar multiplos elementos
|
|
52
|
+
mcp__excalidraw__batch_create_elements(elements=[
|
|
53
|
+
{"type": "rectangle", "x": 0, "y": 0, "width": 100, "height": 50},
|
|
54
|
+
{"type": "text", "x": 10, "y": 20, "text": "Hello"}
|
|
55
|
+
])
|
|
56
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Google Drive MCP
|
|
2
|
+
|
|
3
|
+
> **Status:** ✅ ATIVO
|
|
4
|
+
> **Fonte:** Mega Brain (nativo)
|
|
5
|
+
|
|
6
|
+
## Comandos Disponiveis
|
|
7
|
+
|
|
8
|
+
| Comando | Descricao |
|
|
9
|
+
|---------|-----------|
|
|
10
|
+
| `gdrive_search` | Buscar arquivos no Drive |
|
|
11
|
+
| `gdrive_read_file` | Ler conteudo de arquivo |
|
|
12
|
+
| `gsheets_read` | Ler planilha completa ou ranges |
|
|
13
|
+
| `gsheets_update_cell` | Atualizar celula de planilha |
|
|
14
|
+
| `gdocs_create` | Criar documento Google Docs |
|
|
15
|
+
|
|
16
|
+
## IDs Importantes ([SUA EMPRESA])
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
kpis_master: "1I2GR7npvdEamVZJdGPbh1IfyYPW-_KcRyWFMCrs-OXo"
|
|
20
|
+
dre_2025: "1kjSCf0m9sJ-3n8n9zXJg7jdfM4RP01OQ8-QS5HdiMhc"
|
|
21
|
+
hiring_folder: "1GWbhrQZZwSToq7oLfHQ34vCf5VyjcxWL"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Exemplos
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
# Buscar arquivo
|
|
28
|
+
result = mcp__gdrive__gdrive_search(query="nome do arquivo")
|
|
29
|
+
|
|
30
|
+
# Ler planilha inteira
|
|
31
|
+
data = mcp__gdrive__gsheets_read(spreadsheetId="ID_AQUI")
|
|
32
|
+
|
|
33
|
+
# Ler ranges especificos
|
|
34
|
+
data = mcp__gdrive__gsheets_read(
|
|
35
|
+
spreadsheetId="ID_AQUI",
|
|
36
|
+
ranges=["Sheet1!A1:B10", "Sheet2!C1:D5"]
|
|
37
|
+
)
|
|
38
|
+
```
|
|
File without changes
|
|
File without changes
|