@polderlabs/bizar 3.20.12 → 3.20.14
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/install.sh +40 -10
- package/package.json +2 -2
package/install.sh
CHANGED
|
@@ -419,23 +419,53 @@ fi
|
|
|
419
419
|
# ── Bizar plugin (mirrored from npm package to ~/.config/opencode/plugins/) ─
|
|
420
420
|
section "Install Bizar opencode plugin"
|
|
421
421
|
|
|
422
|
-
PLUGIN_SRC="$REPO_DIR/plugins/bizar"
|
|
423
422
|
PLUGIN_DST="$CONFIG_DIR/plugins/bizar"
|
|
424
|
-
|
|
423
|
+
|
|
424
|
+
# v3.20.12: two sources, in priority order:
|
|
425
|
+
# 1. Local repo's plugins/bizar/ (for `git clone` users)
|
|
426
|
+
# 2. Globally installed @polderlabs/bizar-plugin (for `npm i -g` users)
|
|
427
|
+
# The npm-installed plugin also needs its bundled node_modules/ copied
|
|
428
|
+
# alongside (it depends on @polderlabs/bizar-sdk, which isn't on npm).
|
|
429
|
+
# This previously lived in cli/install.mjs:installPluginFromGlobal();
|
|
430
|
+
# duplicating the logic here makes install.sh the single source of truth.
|
|
431
|
+
PLUGIN_SRC=""
|
|
432
|
+
if [ -d "$REPO_DIR/plugins/bizar" ]; then
|
|
433
|
+
PLUGIN_SRC="$REPO_DIR/plugins/bizar"
|
|
434
|
+
PLUGIN_SRC_KIND="local repo"
|
|
435
|
+
elif have_cmd npm; then
|
|
436
|
+
# Resolve the npm global plugin path. `npm root -g` gives us
|
|
437
|
+
# /usr/local/lib/node_modules; the plugin lives in @polderlabs/bizar-plugin/.
|
|
438
|
+
NPM_GLOBAL_ROOT=$(npm root -g 2>/dev/null || echo "")
|
|
439
|
+
if [ -n "$NPM_GLOBAL_ROOT" ] && [ -d "$NPM_GLOBAL_ROOT/@polderlabs/bizar-plugin" ]; then
|
|
440
|
+
PLUGIN_SRC="$NPM_GLOBAL_ROOT/@polderlabs/bizar-plugin"
|
|
441
|
+
PLUGIN_SRC_KIND="@polderlabs/bizar-plugin (global)"
|
|
442
|
+
fi
|
|
443
|
+
fi
|
|
444
|
+
|
|
445
|
+
if [ -n "$PLUGIN_SRC" ]; then
|
|
425
446
|
mkdir -p "$PLUGIN_DST"
|
|
426
447
|
while IFS= read -r -d '' f; do
|
|
427
448
|
rel="${f#$PLUGIN_SRC/}"
|
|
449
|
+
case "$rel" in
|
|
450
|
+
node_modules/*|dist/*|*.log|.DS_Store) continue ;;
|
|
451
|
+
esac
|
|
428
452
|
mkdir -p "$(dirname "$PLUGIN_DST/$rel")"
|
|
429
453
|
cp "$f" "$PLUGIN_DST/$rel"
|
|
430
|
-
done < <(find "$PLUGIN_SRC"
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
454
|
+
done < <(find "$PLUGIN_SRC" -type f -print0)
|
|
455
|
+
note "plugins/bizar/ copied from $PLUGIN_SRC_KIND"
|
|
456
|
+
|
|
457
|
+
# Copy node_modules from the npm plugin package (the plugin imports
|
|
458
|
+
# @polderlabs/bizar-sdk, which isn't on npm). Idempotent.
|
|
459
|
+
if [ "$PLUGIN_SRC_KIND" != "local repo" ] && [ -d "$PLUGIN_SRC/node_modules" ]; then
|
|
460
|
+
if cp -R "$PLUGIN_SRC/node_modules/." "$PLUGIN_DST/node_modules/" 2>/dev/null; then
|
|
461
|
+
N_PKG=$(find "$PLUGIN_SRC/node_modules" -maxdepth 1 -mindepth 1 -type d 2>/dev/null | wc -l)
|
|
462
|
+
note "node_modules (~$N_PKG packages) bundled with deployed plugin"
|
|
463
|
+
else
|
|
464
|
+
warn "could not copy plugin node_modules (manual: cp -r $PLUGIN_SRC/node_modules $PLUGIN_DST/)"
|
|
465
|
+
fi
|
|
466
|
+
fi
|
|
437
467
|
else
|
|
438
|
-
warn "Bizar plugin source not found
|
|
468
|
+
warn "Bizar plugin source not found (install @polderlabs/bizar-plugin: npm i -g @polderlabs/bizar-plugin)"
|
|
439
469
|
fi
|
|
440
470
|
|
|
441
471
|
# ── Merge opencode.json (template + user's existing config) ────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polderlabs/bizar",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.14",
|
|
4
4
|
"description": "Norse-pantheon multi-agent system for opencode — 13 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"build:sdk": "npm run build -w @polderlabs/bizar-sdk",
|
|
22
22
|
"test:sdk": "npm run test -w @polderlabs/bizar-sdk",
|
|
23
23
|
"test:sdk:watch": "npm run test:watch -w @polderlabs/bizar-sdk",
|
|
24
|
-
"test": "npm run typecheck && npm run test:sdk && (cd plugins/bizar && bun test tests/loop.test.ts tests/block.test.ts tests/stall-think.test.ts tests/tools/bg-get-comments.test.ts tests/tools/bg-spawn-delegation.test.ts tests/tools/opencode-runner.test.ts tests/settings.test.ts tests/commands.test.ts tests/commands-impl.test.ts tests/tools/plan-action.test.ts tests/tools/wait-for-feedback.test.ts tests/reasoning-clean.test.ts 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/opencode-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",
|
|
24
|
+
"test": "npm run typecheck && npm run test:sdk && (cd plugins/bizar && bun test tests/loop.test.ts tests/block.test.ts tests/stall-think.test.ts tests/tools/bg-get-comments.test.ts tests/tools/bg-spawn-delegation.test.ts tests/tools/opencode-runner.test.ts tests/settings.test.ts tests/commands.test.ts tests/commands-impl.test.ts tests/tools/plan-action.test.ts tests/tools/wait-for-feedback.test.ts tests/reasoning-clean.test.ts 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/opencode-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",
|
|
25
25
|
"build": "npm run build:sdk"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|