@polderlabs/bizar 6.2.1 → 6.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar",
3
- "version": "6.2.1",
3
+ "version": "6.2.3",
4
4
  "description": "Norse-pantheon multi-agent system for cline — 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": {
@@ -24,7 +24,7 @@
24
24
  "test:sdk": "node_modules/.bin/vitest run --root packages/sdk",
25
25
  "test:web": "cd bizar-dash && npx vitest run",
26
26
  "test:sdk:watch": "node_modules/.bin/vitest --root packages/sdk",
27
- "test": "npm run typecheck && npm run test:sdk && node --test cli/install.test.mjs cli/provision.test.mjs cli/commands/validate.test.mjs && bun test plugins/bizar/tests/loop.test.ts plugins/bizar/tests/block.test.ts plugins/bizar/tests/stall-think.test.ts plugins/bizar/tests/tools/bg-get-comments.test.ts plugins/bizar/tests/tools/bg-spawn-delegation.test.ts plugins/bizar/tests/tools/cline-runner.test.ts plugins/bizar/tests/settings.test.ts plugins/bizar/tests/commands.test.ts plugins/bizar/tests/commands-impl.test.ts plugins/bizar/tests/tools/plan-action.test.ts plugins/bizar/tests/tools/wait-for-feedback.test.ts plugins/bizar/tests/tools/read-glyph-feedback.test.ts plugins/bizar/tests/reasoning-clean.test.ts plugins/bizar/tests/key-rotation.test.ts && node bizar-dash/tests/smoke-v2.mjs && node --test bizar-dash/tests/path-safe.test.mjs bizar-dash/tests/tmux-wrap.test.mjs bizar-dash/tests/cline-sessions-detail.test.mjs bizar-dash/tests/cline-runner.test.mjs bizar-dash/tests/mod-instructions.node.test.mjs bizar-dash/tests/mod-upgrade.node.test.mjs bizar-dash/tests/graphify-mod-spawn.node.test.mjs bizar-dash/tests/no-agent-browser.node.test.mjs bizar-dash/tests/providers-store-backup-keys.node.test.mjs bizar-dash/tests/dashboard-ports.test.mjs bizar-dash/tests/submit-feedback.test.mjs bizar-dash/tests/yaml.test.mjs bizar-dash/tests/memory-store.test.mjs bizar-dash/tests/memory-schema.test.mjs bizar-dash/tests/memory-secrets.test.mjs bizar-dash/tests/memory-git.test.mjs bizar-dash/tests/memory-sync.test.mjs bizar-dash/tests/obsidian-back-compat.test.mjs bizar-dash/tests/memory-lightrag.test.mjs bizar-dash/tests/memory-config.test.mjs bizar-dash/tests/memory-cli.test.mjs bizar-dash/tests/memory-cli-readlistdelete.test.mjs bizar-dash/tests/memory-cli-setup.test.mjs bizar-dash/tests/memory-conflicts.test.mjs bizar-dash/tests/memory-namespace.test.mjs bizar-dash/tests/memory-path-safety.test.mjs bizar-dash/tests/memory-protocol-drift.test.mjs bizar-dash/tests/memory-roundtrip.test.mjs bizar-dash/tests/cli-bugfixes.test.mjs bizar-dash/tests/server-bugfixes.test.mjs bizar-dash/tests/frontend-bugfixes.test.mjs",
27
+ "test": "npm run typecheck && npm run test:sdk && node --test cli/install.test.mjs cli/provision.test.mjs cli/commands/validate.test.mjs cli/commands/setup-provider.test.mjs cli/commands/rca.test.mjs && bun test plugins/bizar/tests/loop.test.ts plugins/bizar/tests/block.test.ts plugins/bizar/tests/stall-think.test.ts plugins/bizar/tests/tools/bg-get-comments.test.ts plugins/bizar/tests/tools/bg-spawn-delegation.test.ts plugins/bizar/tests/tools/cline-runner.test.ts plugins/bizar/tests/settings.test.ts plugins/bizar/tests/commands.test.ts plugins/bizar/tests/commands-impl.test.ts plugins/bizar/tests/tools/plan-action.test.ts plugins/bizar/tests/tools/wait-for-feedback.test.ts plugins/bizar/tests/tools/read-glyph-feedback.test.ts plugins/bizar/tests/reasoning-clean.test.ts plugins/bizar/tests/key-rotation.test.ts && node bizar-dash/tests/smoke-v2.mjs && node --test bizar-dash/tests/path-safe.test.mjs bizar-dash/tests/tmux-wrap.test.mjs bizar-dash/tests/cline-sessions-detail.test.mjs bizar-dash/tests/cline-runner.test.mjs bizar-dash/tests/mod-instructions.node.test.mjs bizar-dash/tests/mod-upgrade.node.test.mjs bizar-dash/tests/graphify-mod-spawn.node.test.mjs bizar-dash/tests/no-agent-browser.node.test.mjs bizar-dash/tests/providers-store-backup-keys.node.test.mjs bizar-dash/tests/dashboard-ports.test.mjs bizar-dash/tests/submit-feedback.test.mjs bizar-dash/tests/yaml.test.mjs bizar-dash/tests/memory-store.test.mjs bizar-dash/tests/memory-schema.test.mjs bizar-dash/tests/memory-secrets.test.mjs bizar-dash/tests/memory-git.test.mjs bizar-dash/tests/memory-sync.test.mjs bizar-dash/tests/obsidian-back-compat.test.mjs bizar-dash/tests/memory-lightrag.test.mjs bizar-dash/tests/memory-config.test.mjs bizar-dash/tests/memory-cli.test.mjs bizar-dash/tests/memory-cli-readlistdelete.test.mjs bizar-dash/tests/memory-cli-setup.test.mjs bizar-dash/tests/memory-conflicts.test.mjs bizar-dash/tests/memory-namespace.test.mjs bizar-dash/tests/memory-path-safety.test.mjs bizar-dash/tests/memory-protocol-drift.test.mjs bizar-dash/tests/memory-roundtrip.test.mjs bizar-dash/tests/cli-bugfixes.test.mjs bizar-dash/tests/server-bugfixes.test.mjs bizar-dash/tests/frontend-bugfixes.test.mjs",
28
28
  "build": "npm run build:sdk && npm run build:dash",
29
29
  "prepublishOnly": "npm run build"
30
30
  },
@@ -1,14 +1,19 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar-plugin",
3
- "version": "6.2.1",
3
+ "version": "6.2.3",
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",
7
7
  "cline": {
8
8
  "plugins": [
9
9
  {
10
- "paths": ["./index.ts"],
11
- "capabilities": ["tools", "hooks"]
10
+ "paths": [
11
+ "./index.ts"
12
+ ],
13
+ "capabilities": [
14
+ "tools",
15
+ "hooks"
16
+ ]
12
17
  }
13
18
  ]
14
19
  },
@@ -21,8 +26,14 @@
21
26
  "@cline/shared": "*"
22
27
  },
23
28
  "peerDependenciesMeta": {
24
- "@cline/sdk": { "optional": true },
25
- "@cline/core": { "optional": true },
26
- "@cline/shared": { "optional": true }
29
+ "@cline/sdk": {
30
+ "optional": true
31
+ },
32
+ "@cline/core": {
33
+ "optional": true
34
+ },
35
+ "@cline/shared": {
36
+ "optional": true
37
+ }
27
38
  }
28
39
  }
@@ -160,7 +160,7 @@ export class ClineRuntime {
160
160
  workspaceRoot: opts.workspaceRoot,
161
161
  cwd: opts.workspaceRoot,
162
162
  enableTools: true,
163
- enableSpawnAgent: false,
163
+ enableSpawnAgent: true,
164
164
  enableAgentTeams: true,
165
165
  ...(execution ? { execution } : {}),
166
166
  ...(recovery ? { onConsecutiveMistakeLimitReached: recovery } : {}),
@@ -180,7 +180,7 @@ describe("ClineRuntime.startSession — agent teams plumbing (v6.2.0)", () => {
180
180
  expect(cfg.enableAgentTeams).toBe(true);
181
181
  });
182
182
 
183
- test("enableTools is true, enableSpawnAgent is false", async () => {
183
+ test("enableTools is true, enableSpawnAgent is true (subagents + task tool)", async () => {
184
184
  const runtime = new ClineRuntime({ logger: stubLogger() });
185
185
  (runtime as unknown as { core: unknown }).core = makeFakeCore();
186
186
  await runtime.startSession({
@@ -191,7 +191,8 @@ describe("ClineRuntime.startSession — agent teams plumbing (v6.2.0)", () => {
191
191
  });
192
192
  const cfg = capturedConfig[0]!.config;
193
193
  expect(cfg.enableTools).toBe(true);
194
- expect(cfg.enableSpawnAgent).toBe(false);
194
+ expect(cfg.enableSpawnAgent).toBe(true,
195
+ "enableSpawnAgent must be true so Odin can use the `task` tool and `use_subagents`");
195
196
  });
196
197
 
197
198
  test("all three boolean flags survive even when caller passes no opts", async () => {
@@ -206,7 +207,27 @@ describe("ClineRuntime.startSession — agent teams plumbing (v6.2.0)", () => {
206
207
  const cfg = capturedConfig[0]!.config;
207
208
  expect(cfg.enableAgentTeams).toBe(true);
208
209
  expect(cfg.enableTools).toBe(true);
209
- expect(cfg.enableSpawnAgent).toBe(false);
210
+ expect(cfg.enableSpawnAgent).toBe(true,
211
+ "v6.2.3 — subagents + task tool must be available even without caller opts");
212
+ });
213
+ });
214
+
215
+ describe("ClineRuntime.startSession — subagents plumbing (v6.2.3)", () => {
216
+ test("enableSpawnAgent regression: must NEVER be false (v6.2.3 fix)", async () => {
217
+ // v6.2.3 flipped enableSpawnAgent from false → true. Before this
218
+ // change, Odin could not use the `task` tool or `use_subagents`,
219
+ // which silently broke subagent delegation. This test pins the fix.
220
+ const runtime = new ClineRuntime({ logger: stubLogger() });
221
+ (runtime as unknown as { core: unknown }).core = makeFakeCore();
222
+ await runtime.startSession({
223
+ providerId: "anthropic",
224
+ modelId: "claude-sonnet-4-6",
225
+ workspaceRoot: "/tmp",
226
+ prompt: "go",
227
+ });
228
+ const cfg = capturedConfig[0]!.config;
229
+ expect(cfg.enableSpawnAgent).not.toBe(false);
230
+ expect(cfg.enableSpawnAgent).toBe(true);
210
231
  });
211
232
  });
212
233
 
@@ -125,7 +125,7 @@ if (!existsSync(PLUGIN_PATH)) {
125
125
  }
126
126
  record('plugin entry resolves', true, PLUGIN_PATH);
127
127
 
128
- // ── 1. Verify enableAgentTeams in source (the v6.2.0 fix) ──────
128
+ // ── 1. Verify enableAgentTeams + enableSpawnAgent in source (v6.2.0 / v6.2.3) ───────
129
129
  try {
130
130
  const { readFileSync } = await import('node:fs');
131
131
  const srcPath = join(REPO_ROOT, 'plugins', 'bizar', 'src', 'clineruntime.ts');
@@ -133,10 +133,17 @@ try {
133
133
  record('clineruntime.ts source present', false, `${srcPath} missing`);
134
134
  } else {
135
135
  const text = readFileSync(srcPath, 'utf8');
136
- if (/enableAgentTeams:\s*true/.test(text)) {
137
- record('enableAgentTeams: true in clineruntime.ts', true, 'team-spawn tool will work');
136
+ const teamsOk = /enableAgentTeams:\s*true/.test(text);
137
+ const spawnOk = /enableSpawnAgent:\s*true/.test(text);
138
+ if (teamsOk && spawnOk) {
139
+ record('enableAgentTeams + enableSpawnAgent: true in clineruntime.ts', true,
140
+ '/team and /subagent (use_subagents + task tool) both work');
138
141
  } else {
139
- record('enableAgentTeams: true in clineruntime.ts', false, 'REGRESSION: /team will not function');
142
+ const missing = [];
143
+ if (!teamsOk) missing.push('enableAgentTeams');
144
+ if (!spawnOk) missing.push('enableSpawnAgent');
145
+ record('enableAgentTeams + enableSpawnAgent: true in clineruntime.ts', false,
146
+ `REGRESSION: missing ${missing.join(', ')} — /team and subagents will not function`);
140
147
  }
141
148
  }
142
149
  } catch (err) {
@@ -149,18 +156,20 @@ try {
149
156
  const tplPath = join(REPO_ROOT, 'config', 'cline.json.template');
150
157
  const tpl = JSON.parse(readFileSync(tplPath, 'utf8'));
151
158
  const hasPlugin = Array.isArray(tpl.plugin) && tpl.plugin.length > 0;
152
- const has9router = tpl.provider && tpl.provider['9router'];
159
+ // v6.2.2 template MUST NOT have a provider block (installer no
160
+ // longer touches provider config; user configures their own).
161
+ const hasNoProvider = !tpl.provider;
153
162
  const hasDefaultAgent = tpl.default_agent;
154
163
  const hasCommands = tpl.command && tpl.command.team && tpl.command.test && tpl.command.validate;
155
- if (hasPlugin && has9router && hasDefaultAgent && hasCommands) {
156
- record('cline.json.template is complete', true, 'plugin, 9router, default_agent, /team, /test, /validate');
164
+ if (hasPlugin && hasNoProvider && hasDefaultAgent && hasCommands) {
165
+ record('cline.json.template is complete (no provider — user configures their own)', true, 'plugin, default_agent, /team, /test, /validate');
157
166
  } else {
158
167
  const missing = [];
159
168
  if (!hasPlugin) missing.push('plugin[]');
160
- if (!has9router) missing.push('provider.9router');
169
+ if (!hasNoProvider) missing.push('provider (should be absent — user configures)');
161
170
  if (!hasDefaultAgent) missing.push('default_agent');
162
171
  if (!hasCommands) missing.push('command.team/test/validate');
163
- record('cline.json.template is complete', false, `missing: ${missing.join(', ')}`);
172
+ record('cline.json.template is complete (no provider — user configures their own)', false, `missing/wrong: ${missing.join(', ')}`);
164
173
  }
165
174
  } catch (err) {
166
175
  record('cline.json.template readable', false, err.message);
@@ -376,6 +385,52 @@ try {
376
385
  record('bizar validate command present', false, err.message);
377
386
  }
378
387
 
388
+ // ── 12.6. Verify Cline CLI integration (v6.2.3) ─────────────────
389
+ // v6.2.3 — pass-through wrappers for Cline CLI commands + sample.
390
+ try {
391
+ const { existsSync } = await import('node:fs');
392
+ const clineCmd = join(REPO_ROOT, 'cli', 'commands', 'cline-cmd.mjs');
393
+ const rcaCmd = join(REPO_ROOT, 'cli', 'commands', 'rca.mjs');
394
+ const rcaTest = join(REPO_ROOT, 'cli', 'commands', 'rca.test.mjs');
395
+ const setupProviderCmd = join(REPO_ROOT, 'cli', 'commands', 'setup-provider.mjs');
396
+ const setupProviderTest = join(REPO_ROOT, 'cli', 'commands', 'setup-provider.test.mjs');
397
+ if (existsSync(clineCmd)) {
398
+ const text = (await import('node:fs')).readFileSync(clineCmd, 'utf8');
399
+ const hasConfig = /runClineConfig\b/.test(text);
400
+ const hasHistory = /runClineHistory\b/.test(text);
401
+ const hasHub = /runClineHub\b/.test(text);
402
+ const hasHook = /runClineHook\b/.test(text);
403
+ const hasTeam = /runClineTeam\b/.test(text);
404
+ const hasSubagent = /runClineSubagent\b/.test(text);
405
+ if (hasConfig && hasHistory && hasHub && hasHook && hasTeam && hasSubagent) {
406
+ record('bizar cline-cmd wrappers present', true, 'config, history, hub, hook, team, subagent');
407
+ } else {
408
+ const missing = [];
409
+ if (!hasConfig) missing.push('config');
410
+ if (!hasHistory) missing.push('history');
411
+ if (!hasHub) missing.push('hub');
412
+ if (!hasHook) missing.push('hook');
413
+ if (!hasTeam) missing.push('team');
414
+ if (!hasSubagent) missing.push('subagent');
415
+ record('bizar cline-cmd wrappers present', false, `missing: ${missing.join(', ')}`);
416
+ }
417
+ } else {
418
+ record('bizar cline-cmd wrappers present', false, 'cli/commands/cline-cmd.mjs missing');
419
+ }
420
+ if (existsSync(rcaCmd) && existsSync(rcaTest)) {
421
+ record('bizar rca (GitHub Issue RCA sample) present', true, 'cli/commands/rca.{mjs,test.mjs}');
422
+ } else {
423
+ record('bizar rca (GitHub Issue RCA sample) present', false, 'cli/commands/rca.* missing');
424
+ }
425
+ if (existsSync(setupProviderCmd) && existsSync(setupProviderTest)) {
426
+ record('bizar setup-provider + auto-migrate present', true, 'cli/commands/setup-provider.{mjs,test.mjs}');
427
+ } else {
428
+ record('bizar setup-provider + auto-migrate present', false, 'cli/commands/setup-provider.* missing');
429
+ }
430
+ } catch (err) {
431
+ record('bizar cline-cmd integration present', false, err.message);
432
+ }
433
+
379
434
  // ── 13. Verify package.json version is consistent ──────────────
380
435
  try {
381
436
  const { readFileSync } = await import('node:fs');