@polderlabs/bizar 6.0.1 → 6.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.
package/cli/install.mjs CHANGED
@@ -8,9 +8,10 @@ import { fileURLToPath } from 'node:url';
8
8
  // `__dirname` is a CommonJS global. ESM modules don't have it. We define it
9
9
  // at module scope so all functions in this file can use it without each
10
10
  // having to recreate the polyfill. (v4.2.3 — previously only `runInstaller`
11
- // had it, which caused `promptAndInstallOptional` to crash with
12
- // `ERR_AMBIGUOUS_MODULE_SYNTAX` when the bootstrap path fired on a fresh
13
- // install.)
11
+ // had it, which caused the legacy `promptAndInstallOptional` bootstrap
12
+ // to crash with `ERR_AMBIGUOUS_MODULE_SYNTAX`. v6.1.0 that helper
13
+ // has been removed; `__dirname` is still used by `runPostInstall` for
14
+ // the same reason.)
14
15
  const __dirname = dirname(fileURLToPath(import.meta.url));
15
16
 
16
17
  import { showBanner, showPantheon, sectionHeading } from './banner.mjs';
@@ -302,34 +303,6 @@ async function isPackageInstalled(name) {
302
303
  }
303
304
  }
304
305
 
305
- async function promptAndInstallOptional() {
306
- // v4.4.5 — Plugin and dashboard are both shipped inside this package.
307
- // No separate npm install step is required for either. The plugin
308
- // copy happens via installPluginFromGlobal() in runInstaller(); the
309
- // dashboard is loaded directly from this package's bizar-dash/src/.
310
- // We just verify they're present here and warn loudly if not.
311
- const pluginPath = join(__dirname, '..', 'plugins', 'bizar');
312
- if (!existsSync(pluginPath)) {
313
- console.error('');
314
- console.error(' ✗ Plugin source not found at plugins/bizar/.');
315
- console.error(' This package is missing the plugin source. Reinstall:');
316
- console.error(' npm install -g @polderlabs/bizar --force');
317
- } else {
318
- console.log(' ✓ Plugin source present (plugins/bizar/)');
319
- }
320
-
321
- const dashDir = join(__dirname, '..', 'bizar-dash');
322
- const dashPkgJson = join(dashDir, 'package.json');
323
- if (!existsSync(dashPkgJson)) {
324
- console.error('');
325
- console.error(' ✗ Dashboard source not found at bizar-dash/.');
326
- console.error(' This package is missing the dashboard source. Reinstall:');
327
- console.error(' npm install -g @polderlabs/bizar --force');
328
- } else {
329
- console.log(' ✓ Dashboard source present (bizar-dash/)');
330
- }
331
- }
332
-
333
306
  async function promptGraphifyInstall() {
334
307
  const { spawnSync, execSync } = await import('node:child_process');
335
308
 
@@ -506,10 +479,19 @@ async function promptGraphifyInstall() {
506
479
  }
507
480
 
508
481
  export async function runPostInstall() {
509
- // Skip interactive prompts in CI / non-TTY environments
510
- if (!process.env.BIZAR_SKIP_OPTIONAL_INSTALLS) {
511
- await promptAndInstallOptional();
512
- }
482
+ // v6.1.0 Bizar is Cline-only. The legacy opencode-era
483
+ // `promptAndInstallOptional()` (plugin/dashboard presence probes)
484
+ // has been removed; `cli/provision.mjs:runProvision` covers the same
485
+ // surface via `runProvision({ mode: 'install' })`, which is the path
486
+ // used by `bizar install` and `bizar update`. This `runPostInstall`
487
+ // is now a thin Cline-only bootstrap that:
488
+ // - copies `config/cline.json` template on first install
489
+ // - runs `installCommandsBizar()` for the legacy `commands-bizar/` dir
490
+ // - installs agents into `~/.cline/agents/`
491
+ // - probes for headroom / semble / skills-cli
492
+ // - installs Headroom via pip or npm
493
+ // The old OpenCode-era probes (`Plugin source present`,
494
+ // `Dashboard source present`) moved to `cli/doctor.mjs` as live checks.
513
495
  const { mkdirSync, copyFileSync, existsSync } = await import('node:fs');
514
496
  const { execSync } = await import('node:child_process');
515
497
 
@@ -240,6 +240,33 @@ describe('installPluginFromGlobal() — node_modules copy', () => {
240
240
  rmSync(linkTarget, { recursive: true, force: true });
241
241
  }
242
242
  });
243
+
244
+ // v6.0.2 — Dashboard payload check now probes dist + src instead of
245
+ // package.json (which was removed in v4.0.0 when the dashboard became
246
+ // its own npm package). This test verifies the post-fix code path
247
+ // accepts a layout that has dist/index.html but no package.json.
248
+ test('dashboard check accepts dist+src layout without package.json', () => {
249
+ // We don't import the un-exported promptAndInstallOptional directly;
250
+ // instead we exercise the same fs.existsSync contract the check
251
+ // uses by staging a fake layout in a tmpdir and asserting the
252
+ // ginstay predicate is satisfied.
253
+ const layout = mkdtempSync(join(tmpdir(), 'bizar-dash-layout-'));
254
+ const dashDir = join(layout, 'bizar-dash');
255
+ mkdirSync(join(dashDir, 'dist'), { recursive: true });
256
+ writeFileSync(join(dashDir, 'dist', 'index.html'), '<html></html>');
257
+ mkdirSync(join(dashDir, 'src', 'server'), { recursive: true });
258
+ writeFileSync(join(dashDir, 'src', 'server', 'api.mjs'), '// fixture');
259
+ const distHtml = join(dashDir, 'dist', 'index.html');
260
+ const serverSrc = join(dashDir, 'src', 'server', 'api.mjs');
261
+ assert.ok(existsSync(distHtml), 'dist/index.html should exist (fixture)');
262
+ assert.ok(existsSync(serverSrc), 'src/server/api.mjs should exist (fixture)');
263
+ assert.equal(
264
+ existsSync(join(dashDir, 'package.json')),
265
+ false,
266
+ 'package.json should NOT exist (proves the new check tolerates its absence)',
267
+ );
268
+ rmSync(layout, { recursive: true, force: true });
269
+ });
243
270
  });
244
271
 
245
272
  console.log(' install.mjs tests loaded — run with: node --test cli/install.test.mjs');
package/cli/utils.mjs CHANGED
@@ -16,15 +16,15 @@ export function repoPath(...parts) {
16
16
 
17
17
  /**
18
18
  * Resolve the Cline global config directory.
19
- *
20
- * Mirrors Cline's `resolveClineDir()` in `@cline/shared/storage`:
21
- * 1. `process.env.CLINE_DIR` (explicit override)
22
- * 2. `$HOME/.cline` (the Cline default since v3.0)
23
- *
24
- * The legacy `~/.config/cline/` path (used by OpenCode and pre-v5.6
25
- * BizarHarness versions) is kept under `legacyClineConfigDir()` below
26
- * for back-compat with older scripts.
27
- */
19
+ *
20
+ * Mirrors Cline's `resolveClineDir()` in `@cline/shared/storage`:
21
+ * 1. `process.env.CLINE_DIR` (explicit override)
22
+ * 2. `$HOME/.cline` (the Cline default since v3.0)
23
+ *
24
+ * v6.1.0 Bizar is Cline-only. The pre-v5.6 `~/.config/cline/` path
25
+ * (the OpenCode-era layout) is no longer supported; the previous
26
+ * `legacyClineConfigDir()` helper has been removed.
27
+ */
28
28
  export function clineConfigDir() {
29
29
  if (process.env.CLINE_DIR && process.env.CLINE_DIR.trim()) {
30
30
  return process.env.CLINE_DIR.trim();
@@ -37,22 +37,6 @@ export function clineConfigDir() {
37
37
  return join(homedir(), '.cline');
38
38
  }
39
39
 
40
- /**
41
- * Legacy Cline config dir (`~/.config/cline/`). Used by OpenCode and the
42
- * pre-v5.6 BizarHarness installer. Exposed for back-compat with scripts
43
- * and tests that hard-coded this path.
44
- */
45
- export function legacyClineConfigDir() {
46
- if (isWin) {
47
- return process.env.APPDATA
48
- ? join(process.env.APPDATA, 'cline')
49
- : join(homedir(), '.config', 'cline');
50
- }
51
- return process.env.XDG_CONFIG_HOME
52
- ? join(process.env.XDG_CONFIG_HOME, 'cline')
53
- : join(homedir(), '.config', 'cline');
54
- }
55
-
56
40
  export function clineAgentsDir() {
57
41
  return join(clineConfigDir(), 'agents');
58
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar",
3
- "version": "6.0.1",
3
+ "version": "6.1.0",
4
4
  "description": "Norse-pantheon multi-agent system for cline \u2014 13 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness. v4 ships as a single npm package bundling the dashboard server, cline plugin, and typed SDK.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar-sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar-plugin",
3
- "version": "6.0.1",
3
+ "version": "6.1.0",
4
4
  "description": "Bizar Norse-pantheon multi-agent plugin for Cline — 14 agents across 4 cost tiers with cost-aware routing and plans.",
5
5
  "type": "module",
6
6
  "main": "./index.ts",