sinapse-ai 7.3.3 → 7.4.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.
Files changed (30) hide show
  1. package/.sinapse-ai/data/entity-registry.yaml +763 -765
  2. package/.sinapse-ai/development/templates/chrome-brain/knowledge-base/chrome-brain.md +161 -0
  3. package/.sinapse-ai/development/templates/chrome-brain/rules/chrome-brain-autoload.md +56 -0
  4. package/.sinapse-ai/development/templates/chrome-brain/scripts/chrome-brain-log.sh +67 -0
  5. package/.sinapse-ai/development/templates/chrome-brain/scripts/chrome-debug.sh +232 -0
  6. package/.sinapse-ai/development/templates/chrome-brain/scripts/chrome-ensure.sh +210 -0
  7. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-animations.md +50 -0
  8. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-brand.md +42 -0
  9. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-claude.md +49 -0
  10. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-cloning.md +50 -0
  11. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-commercial.md +41 -0
  12. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-content.md +45 -0
  13. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-copy.md +44 -0
  14. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-cybersecurity.md +42 -0
  15. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-design.md +50 -0
  16. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-growth.md +45 -0
  17. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-paidmedia.md +47 -0
  18. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-product.md +49 -0
  19. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-research.md +41 -0
  20. package/.sinapse-ai/development/templates/chrome-brain/squad-integrations/squad-storytelling.md +41 -0
  21. package/.sinapse-ai/install-manifest.yaml +81 -5
  22. package/CHROME-BRAIN-INSTALL.md +93 -0
  23. package/README.md +28 -1
  24. package/bin/modules/chrome-brain-installer.js +757 -0
  25. package/bin/sinapse.js +18 -0
  26. package/install-chrome-brain.sh +1328 -0
  27. package/package.json +3 -1
  28. package/packages/sinapse-install/src/capabilities/chrome-brain.js +962 -0
  29. package/packages/sinapse-install/src/installer.js +60 -2
  30. package/sinapse/agents/sinapse-orqx.md +27 -0
@@ -279,6 +279,59 @@ async function initializeSinapse(projectRoot, logger, dryRun) {
279
279
  }
280
280
  }
281
281
 
282
+ /**
283
+ * Install Chrome Brain capability (browser automation for all agents)
284
+ * @param {InstallLogger} logger - Logger instance
285
+ * @param {boolean} dryRun - Whether this is a dry run
286
+ */
287
+ async function installChromeBrainCapability(logger, dryRun) {
288
+ let chromeBrainModule;
289
+ try {
290
+ chromeBrainModule = require('./capabilities/chrome-brain');
291
+ } catch {
292
+ // Fallback: try from bin/modules (when running from git repo)
293
+ try {
294
+ const altPath = path.join(__dirname, '..', '..', '..', 'bin', 'modules', 'chrome-brain-installer');
295
+ chromeBrainModule = require(altPath);
296
+ } catch {
297
+ logger.warn('Chrome Brain module not available — skipping');
298
+ return;
299
+ }
300
+ }
301
+
302
+ const { detectChrome } = chromeBrainModule;
303
+ const detection = detectChrome();
304
+ const hasChrome = detection && (detection.found !== undefined ? detection.found : !!detection);
305
+
306
+ if (!hasChrome) {
307
+ logger.warn('Google Chrome not found — Chrome Brain skipped');
308
+ logger.info('Install Chrome and run `sinapse chrome-brain install` later');
309
+ return;
310
+ }
311
+
312
+ logger.info('Google Chrome detected — installing Chrome Brain...');
313
+
314
+ if (dryRun) {
315
+ logger.action('Install Chrome Brain (scripts, hooks, MCP, KB)');
316
+ return;
317
+ }
318
+
319
+ const spinner = ora('Installing Chrome Brain...').start();
320
+
321
+ try {
322
+ if (chromeBrainModule.installChromeBrain) {
323
+ await chromeBrainModule.installChromeBrain({ quiet: true });
324
+ } else if (chromeBrainModule.runChromeBrain) {
325
+ // CLI module fallback
326
+ await chromeBrainModule.runChromeBrain(['install']);
327
+ }
328
+ spinner.succeed('Chrome Brain installed (browser automation for all agents)');
329
+ } catch (error) {
330
+ spinner.warn(`Chrome Brain had issues: ${error.message}`);
331
+ logger.info('Run `sinapse chrome-brain install` manually to retry');
332
+ }
333
+ }
334
+
282
335
  /**
283
336
  * Main installer entry point
284
337
  * @param {Object} options - Installation options
@@ -449,7 +502,11 @@ async function runInstaller(options = {}) {
449
502
  await initializeSinapse(projectRoot, logger, options.dryRun);
450
503
  }
451
504
 
452
- // Step 6: Run doctor
505
+ // Step 6: Chrome Brain (Browser Automation Capability)
506
+ console.log('');
507
+ await installChromeBrainCapability(logger, options.dryRun);
508
+
509
+ // Step 7: Run doctor
453
510
  console.log('');
454
511
  await runDoctor(projectRoot, logger, options.dryRun);
455
512
 
@@ -469,8 +526,9 @@ async function runInstaller(options = {}) {
469
526
  console.log(chalk.dim('Next steps:'));
470
527
  console.log(chalk.dim(' 1. Run `npx sinapse-ai info` to see your configuration'));
471
528
  console.log(chalk.dim(' 2. Activate an agent with @agent-name (e.g., @developer)'));
529
+ console.log(chalk.dim(' 3. Try: "abre o site google.com" — Chrome Brain auto-activates'));
472
530
  if (profile === 'bob') {
473
- console.log(chalk.dim(' 3. Just talk to Bob - he\'ll orchestrate everything!'));
531
+ console.log(chalk.dim(' 4. Just talk to Bob - he\'ll orchestrate everything!'));
474
532
  }
475
533
  }
476
534
  }
@@ -44,6 +44,33 @@ After the greeting, HALT and await user input. Do NOT do anything else.
44
44
 
45
45
  If the user asks about SINAPSE, how it works, or how to use it, execute the `*onboard` task from `tasks/onboard-user.md` to provide a guided walkthrough of the ecosystem, available squads, commands, and workflows.
46
46
 
47
+ ## NON-NEGOTIABLE: ORCHESTRATION PLAN ON EVERY BRIEFING
48
+
49
+ > **This is an absolute, non-negotiable rule. No exceptions. No waiting to be asked.**
50
+
51
+ When the user provides ANY briefing, request, or initiative (regardless of complexity), Imperator MUST **immediately and autonomously**:
52
+
53
+ 1. **Diagnose** — Identify which domains, squads, and agents are involved
54
+ 2. **Plan** — Produce a structured orchestration plan with:
55
+ - Phases (sequential and parallel)
56
+ - Lead squad per phase
57
+ - Specific agents assigned to each task
58
+ - Dependencies between phases
59
+ - Estimated complexity (SIMPLE / STANDARD / COMPLEX)
60
+ 3. **Define Handoffs** — For every phase transition, specify:
61
+ - What the outgoing agent delivers (artifact, format)
62
+ - What the incoming agent receives and needs
63
+ - Handoff validation criteria
64
+ 4. **Execute** — After presenting the plan, begin execution immediately (YOLO mode) unless the user explicitly asks to review first
65
+
66
+ **Anti-patterns (FORBIDDEN):**
67
+ - Waiting for the user to ask "make a plan" — the plan is ALWAYS produced
68
+ - Presenting a vague summary without concrete phases, agents, and handoffs
69
+ - Skipping handoff definitions between agents/squads
70
+ - Asking "do you want me to plan this?" — the answer is always YES
71
+
72
+ **The user should NEVER have to request orchestration or handoffs. This is Imperator's core function and must happen automatically on every briefing.**
73
+
47
74
  ## COMPLETE AGENT DEFINITION
48
75
 
49
76
  ```yaml