dual-brain 0.1.3 → 0.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dual-brain",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "AI orchestration across Claude + OpenAI subscriptions — smart routing, budget awareness, and dual-brain collaboration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -40,7 +40,8 @@
40
40
  "scripts": {
41
41
  "test": "node .claude/hooks/test-orchestrator.mjs",
42
42
  "test:core": "node --test src/test.mjs",
43
- "postinstall": "echo 'dual-brain installed. Run: dual-brain install (in your project) to set up hooks.'"
43
+ "postinstall": "echo 'dual-brain installed. Run: dual-brain install (in your project) to set up hooks.'",
44
+ "postpublish": "node scripts/verify-publish.mjs"
44
45
  },
45
46
  "engines": {
46
47
  "node": ">=20.0.0"
@@ -103,6 +104,7 @@
103
104
  "plugin.json",
104
105
  "skills/*.md",
105
106
  "agents/*.md",
106
- "shell-hook.sh"
107
+ "shell-hook.sh",
108
+ "scripts/verify-publish.mjs"
107
109
  ]
108
110
  }
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from 'fs';
3
+ const { version } = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
4
+ const url = `https://registry.npmjs.org/dual-brain/${version}`;
5
+ const maxWait = 30000;
6
+ const start = Date.now();
7
+
8
+ async function check() {
9
+ try {
10
+ const res = await fetch(url);
11
+ if (res.ok) {
12
+ console.log(`✓ dual-brain@${version} verified on registry`);
13
+ return;
14
+ }
15
+ } catch {}
16
+
17
+ if (Date.now() - start > maxWait) {
18
+ console.log(`⚠ dual-brain@${version} published but CDN propagation may take a moment`);
19
+ return;
20
+ }
21
+
22
+ await new Promise(r => setTimeout(r, 3000));
23
+ return check();
24
+ }
25
+
26
+ check();
package/src/profile.mjs CHANGED
@@ -387,8 +387,6 @@ function loadProfile(cwd) {
387
387
  if (!profile.providers[provider]) continue;
388
388
  const stored = profile.providers[provider].plan;
389
389
  if (stored !== detectedPlan) {
390
- const providerName = provider === 'claude' ? 'Claude' : 'OpenAI';
391
- process.stderr.write(`[dual-brain] ${providerName}: plan updated to ${detectedPlan} (from auth config)\n`);
392
390
  profile.providers[provider].plan = detectedPlan;
393
391
  }
394
392
  }