sinapse-ai 1.11.1 → 1.11.3
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/.sinapse-ai/install-manifest.yaml +1 -1
- package/CHANGELOG.md +2 -5
- package/bin/commands/install.js +5 -0
- package/bin/modules/chrome-brain-installer.js +13 -8
- package/package.json +1 -1
- package/packages/installer/src/wizard/index.js +34 -16
- package/packages/sinapse-install/src/capabilities/chrome-brain.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
## [1.11.
|
|
1
|
+
## [1.11.3](https://github.com/caioimori/sinapse-ai/compare/1.11.2...1.11.3) (2026-06-19)
|
|
2
2
|
|
|
3
3
|
### Bug Fixes
|
|
4
4
|
|
|
5
|
-
* **
|
|
6
|
-
* **greeting:** normaliza id longo do agente para sugestao de proximo-passo ([f82bfe0](https://github.com/caioimori/sinapse-ai/commit/f82bfe00509ba68385cab702967ba09c1b38acae))
|
|
7
|
-
* **greeting:** normaliza id longo tambem no gating do modo bob ([6974f14](https://github.com/caioimori/sinapse-ai/commit/6974f14a79f8156052b5866e0eb2eaabf83aed37))
|
|
8
|
-
* **ide-sync:** commita espelho Claude (squad orqx) p/ destravar parity gate ([35909f1](https://github.com/caioimori/sinapse-ai/commit/35909f1754155779609bb2dbba9534a990e60d62))
|
|
5
|
+
* **chrome-brain:** nao abrir o browser em toda sessao (remove hook SessionStart) ([63824bf](https://github.com/caioimori/sinapse-ai/commit/63824bfcaef491cb4012d966a05f2a3c32d944fe))
|
|
9
6
|
|
|
10
7
|
# Changelog
|
|
11
8
|
|
package/bin/commands/install.js
CHANGED
|
@@ -478,6 +478,11 @@ async function cmdInstallGlobal(opts = {}) {
|
|
|
478
478
|
quiet: true,
|
|
479
479
|
language: language,
|
|
480
480
|
selectedLLM: llmChoice,
|
|
481
|
+
// Phase 7 (above) already installed Chrome Brain globally — tell the wizard
|
|
482
|
+
// to skip its own copy so it doesn't run twice (duplicate output + duplicate
|
|
483
|
+
// optional-dep warning). The wizard still runs Chrome Brain when invoked
|
|
484
|
+
// standalone (no skip flag).
|
|
485
|
+
skipChromeBrain: true,
|
|
481
486
|
});
|
|
482
487
|
logger.always(` ${GREEN}OK${NC} Project files installed (.sinapse-ai/, .claude/)`);
|
|
483
488
|
} else {
|
|
@@ -377,12 +377,13 @@ function installHooks() {
|
|
|
377
377
|
const ensureCmd = path.join(binDir, 'chrome-ensure').replace(/\\/g, '/');
|
|
378
378
|
const logCmd = path.join(binDir, 'chrome-brain-log').replace(/\\/g, '/');
|
|
379
379
|
const hookDefs = {
|
|
380
|
-
// SessionStart
|
|
381
|
-
//
|
|
382
|
-
//
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
380
|
+
// NO SessionStart hook on purpose. Launching Chrome at every session start
|
|
381
|
+
// popped a browser window unprompted on boot (bad UX, esp. for new users).
|
|
382
|
+
// The lazy PreToolUse hook below already runs chrome-ensure right before any
|
|
383
|
+
// browser tool call, so Chrome is guaranteed up exactly when (and only when)
|
|
384
|
+
// it's needed — matching the documented design
|
|
385
|
+
// (templates/chrome-brain/rules/chrome-brain-autoload.md:
|
|
386
|
+
// "Chrome connection is guaranteed by PreToolUse hook").
|
|
386
387
|
PreToolUse: [
|
|
387
388
|
{ matcher: 'mcp__chrome-devtools__*', hooks: [{ type: 'command', command: ensureCmd }] },
|
|
388
389
|
{ matcher: 'mcp__claude-in-chrome__*', hooks: [{ type: 'command', command: ensureCmd }] },
|
|
@@ -428,8 +429,12 @@ function installMcp(platform) {
|
|
|
428
429
|
const npmCmd = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
429
430
|
execSync(`${npmCmd} install -g dev-browser`, { stdio: 'pipe', timeout: 120000 });
|
|
430
431
|
ok('dev-browser installed globally');
|
|
431
|
-
} catch
|
|
432
|
-
|
|
432
|
+
} catch {
|
|
433
|
+
// Optional dependency — never block install. Keep the message to ONE calm line
|
|
434
|
+
// (the raw npm/EPERM/EEXIST stderr is intentionally swallowed; it scares users and
|
|
435
|
+
// is not actionable). The MCP entry is still written below so a later manual
|
|
436
|
+
// `npm install -g dev-browser` activates it.
|
|
437
|
+
warn('dev-browser (navegador automatico opcional) nao instalado — segue normal. Opcional depois: npm install -g dev-browser');
|
|
433
438
|
// Do NOT throw — continue with rest of install
|
|
434
439
|
}
|
|
435
440
|
|
package/package.json
CHANGED
|
@@ -1128,8 +1128,10 @@ async function runWizard(options = {}) {
|
|
|
1128
1128
|
console.log('Installation may be incomplete. Check logs in .sinapse/ directory.');
|
|
1129
1129
|
}
|
|
1130
1130
|
|
|
1131
|
-
// Chrome Brain: Auto-install browser automation capability
|
|
1132
|
-
|
|
1131
|
+
// Chrome Brain: Auto-install browser automation capability.
|
|
1132
|
+
// Skipped when the global installer (cmdInstallGlobal Phase 7) already ran it,
|
|
1133
|
+
// to avoid a duplicate run + duplicate optional-dep warning.
|
|
1134
|
+
if (!answers.skipChromeBrain && (answers.selectedLLM === 'claude-code' || answers.selectedLLM === 'both')) {
|
|
1133
1135
|
try {
|
|
1134
1136
|
const chromeBrainPath = path.join(__dirname, '..', '..', '..', '..', 'bin', 'modules', 'chrome-brain-installer');
|
|
1135
1137
|
const { detectChrome, installScripts, installHooks, installMcp, installKnowledgeBase } = require(chromeBrainPath);
|
|
@@ -1152,17 +1154,28 @@ async function runWizard(options = {}) {
|
|
|
1152
1154
|
}
|
|
1153
1155
|
}
|
|
1154
1156
|
|
|
1155
|
-
// Apply SINAPSE branding to Claude Code CLI (so both `sinapse` and `claude` show SINAPSE branding)
|
|
1157
|
+
// Apply SINAPSE branding to Claude Code CLI (so both `sinapse` and `claude` show SINAPSE branding).
|
|
1158
|
+
// Pre-check that the Claude Code CLI is actually present: if it isn't, skip with ONE calm line
|
|
1159
|
+
// instead of letting the patch script print a scary "[ERRO] ... CLI nao encontrado" + stack.
|
|
1156
1160
|
if (answers.selectedLLM === 'claude-code' || answers.selectedLLM === 'both') {
|
|
1161
|
+
const brandingPatchPath = path.join(__dirname, '..', '..', '..', '..', 'scripts', 'sinapse-patch.js');
|
|
1162
|
+
let claudeCliPresent = false;
|
|
1157
1163
|
try {
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1164
|
+
execSync(process.platform === 'win32' ? 'where claude' : 'command -v claude', { stdio: 'ignore' });
|
|
1165
|
+
claudeCliPresent = true;
|
|
1166
|
+
} catch {
|
|
1167
|
+
claudeCliPresent = false;
|
|
1168
|
+
}
|
|
1169
|
+
if (!claudeCliPresent) {
|
|
1170
|
+
console.log('ℹ️ Branding do Claude Code: pulado (Claude Code CLI nao detectado). Aplique depois com: sinapse brand');
|
|
1171
|
+
} else if (fse.existsSync(brandingPatchPath)) {
|
|
1172
|
+
try {
|
|
1173
|
+
// stdio: 'pipe' (not 'inherit') so the patch's internal logs stay quiet on success.
|
|
1174
|
+
execSync(`node "${brandingPatchPath}"`, { stdio: 'pipe' });
|
|
1175
|
+
console.log('✅ Branding do Claude Code aplicado.');
|
|
1176
|
+
} catch {
|
|
1177
|
+
console.log('ℹ️ Branding do Claude Code: pulado. Aplique depois com: sinapse brand');
|
|
1162
1178
|
}
|
|
1163
|
-
} catch (error) {
|
|
1164
|
-
console.log(`\n⚠️ Branding patch skipped: ${error.message}`);
|
|
1165
|
-
console.log(' You can apply it later with: sinapse brand\n');
|
|
1166
1179
|
}
|
|
1167
1180
|
}
|
|
1168
1181
|
|
|
@@ -1211,12 +1224,17 @@ async function runWizard(options = {}) {
|
|
|
1211
1224
|
answers.infraApplied = false;
|
|
1212
1225
|
}
|
|
1213
1226
|
|
|
1214
|
-
// Show completion with LLM label + honest dependency status
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1227
|
+
// Show completion with LLM label + honest dependency status.
|
|
1228
|
+
// Suppressed in quiet/embedded mode (cmdInstallGlobal calls the wizard with
|
|
1229
|
+
// quiet: true and prints its OWN authoritative summary box afterwards) — printing
|
|
1230
|
+
// both produced two completion screens with contradictory counts.
|
|
1231
|
+
if (!options.quiet) {
|
|
1232
|
+
showCompletion({
|
|
1233
|
+
llmLabel: llmLabel(answers.selectedLLM),
|
|
1234
|
+
llmValue: answers.selectedLLM,
|
|
1235
|
+
depsInstalled: answers.depsInstalled !== false,
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1220
1238
|
|
|
1221
1239
|
return answers;
|
|
1222
1240
|
} catch (error) {
|
|
@@ -351,9 +351,9 @@ function mergeHooks() {
|
|
|
351
351
|
const ensureCmd = path.join(binDir, 'chrome-ensure').replace(/\\/g, '/');
|
|
352
352
|
const logCmd = path.join(binDir, 'chrome-brain-log').replace(/\\/g, '/');
|
|
353
353
|
const newHooks = {
|
|
354
|
-
SessionStart
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
// NO SessionStart hook on purpose — it popped a Chrome window on every boot.
|
|
355
|
+
// The lazy PreToolUse hook below launches Chrome only when a browser tool is
|
|
356
|
+
// actually called ("Chrome connection is guaranteed by PreToolUse hook").
|
|
357
357
|
PreToolUse: [
|
|
358
358
|
{ matcher: 'mcp__chrome-devtools__*', hooks: [{ type: 'command', command: ensureCmd }] },
|
|
359
359
|
{ matcher: 'mcp__claude-in-chrome__*', hooks: [{ type: 'command', command: ensureCmd }] },
|