@orchid-labs/pluxx 0.1.11 → 0.1.13

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/dist/cli/index.js CHANGED
@@ -21515,6 +21515,74 @@ NODE
21515
21515
  function hasInstallerUserConfig(config, platform) {
21516
21516
  return collectUserConfigEntries(config, [platform]).length > 0;
21517
21517
  }
21518
+ function renderInstallerMcpPathMaterializationSnippet(platform, installDirVariable) {
21519
+ if (platform !== "codex") return "";
21520
+ return `
21521
+ export PLUXX_INSTALL_DIR="${installDirVariable}"
21522
+
21523
+ node <<'NODE'
21524
+ const fs = require('fs')
21525
+ const path = require('path')
21526
+
21527
+ const installDir = process.env.PLUXX_INSTALL_DIR
21528
+
21529
+ if (installDir) {
21530
+ const materializeInstalledStdioPath = (value) => {
21531
+ if (typeof value !== 'string') return value
21532
+
21533
+ const normalized = value.replace(/\\\\/g, '/')
21534
+ const rootRef = normalized.match(/^\\$\\{(?:CLAUDE_PLUGIN_ROOT|CURSOR_PLUGIN_ROOT|PLUGIN_ROOT)\\}[\\\\/](.+)$/)
21535
+
21536
+ if (rootRef) {
21537
+ return path.resolve(installDir, rootRef[1])
21538
+ }
21539
+
21540
+ if (normalized.startsWith('./') || normalized.startsWith('../')) {
21541
+ return path.resolve(installDir, normalized)
21542
+ }
21543
+
21544
+ return value
21545
+ }
21546
+
21547
+ for (const relativePath of ['.mcp.json', 'mcp.json']) {
21548
+ const filepath = path.join(installDir, relativePath)
21549
+ if (!fs.existsSync(filepath)) continue
21550
+
21551
+ const payload = JSON.parse(fs.readFileSync(filepath, 'utf8'))
21552
+ let changed = false
21553
+
21554
+ for (const server of Object.values(payload.mcpServers || {})) {
21555
+ if (!server || typeof server !== 'object') continue
21556
+
21557
+ if (typeof server.command === 'string') {
21558
+ const nextCommand = materializeInstalledStdioPath(server.command)
21559
+ changed ||= nextCommand !== server.command
21560
+ server.command = nextCommand
21561
+ }
21562
+
21563
+ if (Array.isArray(server.args)) {
21564
+ const nextArgs = server.args.map(materializeInstalledStdioPath)
21565
+ changed ||= nextArgs.some((value, index) => value !== server.args[index])
21566
+ server.args = nextArgs
21567
+ }
21568
+ }
21569
+
21570
+ if (changed) {
21571
+ fs.writeFileSync(filepath, JSON.stringify(payload, null, 2) + '\\n')
21572
+ }
21573
+ }
21574
+ }
21575
+ NODE
21576
+ `;
21577
+ }
21578
+ function renderInstallerRuntimeBootstrapSnippet(installDirVariable) {
21579
+ return `
21580
+ if [[ -f "${installDirVariable}/scripts/bootstrap-runtime.sh" ]]; then
21581
+ echo "Preparing local plugin runtime dependencies..."
21582
+ bash "${installDirVariable}/scripts/bootstrap-runtime.sh"
21583
+ fi
21584
+ `;
21585
+ }
21518
21586
  function renderInstallClaudeCodeScript(config) {
21519
21587
  return `#!/usr/bin/env bash
21520
21588
  set -euo pipefail
@@ -21579,6 +21647,8 @@ mkdir -p "$INSTALL_ROOT/.claude-plugin" "$INSTALL_ROOT/plugins"
21579
21647
  rm -rf "$INSTALL_ROOT/plugins/$PLUGIN_NAME"
21580
21648
  cp -R "$BUNDLE_DIR" "$INSTALL_ROOT/plugins/$PLUGIN_NAME"
21581
21649
  ${renderInstallerUserConfigSnippet(config, "claude-code", "$INSTALL_ROOT/plugins/$PLUGIN_NAME")}
21650
+ ${renderInstallerMcpPathMaterializationSnippet("claude-code", "$INSTALL_ROOT/plugins/$PLUGIN_NAME")}
21651
+ ${renderInstallerRuntimeBootstrapSnippet("$INSTALL_ROOT/plugins/$PLUGIN_NAME")}
21582
21652
 
21583
21653
  cat > "$INSTALL_ROOT/.claude-plugin/marketplace.json" <<JSON
21584
21654
  {
@@ -21672,6 +21742,8 @@ mkdir -p "$(dirname "$INSTALL_DIR")"
21672
21742
  rm -rf "$INSTALL_DIR"
21673
21743
  cp -R "$BUNDLE_DIR" "$INSTALL_DIR"
21674
21744
  ${renderInstallerUserConfigSnippet(config, "cursor", "$INSTALL_DIR")}
21745
+ ${renderInstallerMcpPathMaterializationSnippet("cursor", "$INSTALL_DIR")}
21746
+ ${renderInstallerRuntimeBootstrapSnippet("$INSTALL_DIR")}
21675
21747
 
21676
21748
  echo "Installed $PLUGIN_NAME to $INSTALL_DIR"
21677
21749
  echo "If Cursor is already open, use Developer: Reload Window or restart Cursor so the plugin is picked up."
@@ -21730,6 +21802,8 @@ mkdir -p "$(dirname "$INSTALL_DIR")"
21730
21802
  rm -rf "$INSTALL_DIR"
21731
21803
  cp -R "$BUNDLE_DIR" "$INSTALL_DIR"
21732
21804
  ${renderInstallerUserConfigSnippet(config, "codex", "$INSTALL_DIR")}
21805
+ ${renderInstallerMcpPathMaterializationSnippet("codex", "$INSTALL_DIR")}
21806
+ ${renderInstallerRuntimeBootstrapSnippet("$INSTALL_DIR")}
21733
21807
 
21734
21808
  mkdir -p "$(dirname "$MARKETPLACE_PATH")"
21735
21809
 
@@ -21845,6 +21919,8 @@ mkdir -p "$(dirname "$INSTALL_DIR")" "$SKILLS_ROOT"
21845
21919
  rm -rf "$INSTALL_DIR"
21846
21920
  cp -R "$BUNDLE_DIR" "$INSTALL_DIR"
21847
21921
  ${renderInstallerUserConfigSnippet(config, "opencode", "$INSTALL_DIR")}
21922
+ ${renderInstallerMcpPathMaterializationSnippet("opencode", "$INSTALL_DIR")}
21923
+ ${renderInstallerRuntimeBootstrapSnippet("$INSTALL_DIR")}
21848
21924
 
21849
21925
  export ENTRY_PATH
21850
21926
  export PLUGIN_NAME
@@ -1 +1 @@
1
- {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/cli/publish.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAG7D,KAAK,cAAc,GAAG,KAAK,GAAG,gBAAgB,CAAA;AAC9C,KAAK,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAA;AACzE,KAAK,qBAAqB,GAAG,WAAW,GAAG,QAAQ,CAAA;AAEnD,UAAU,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ACnB,YAAY,EAAE,OAAO,CAAA;SACtB,CAAA;QACD,aAAa,EAAE;YACb,OAAO,EAAE,OAAO,CAAA;YAChB,QAAQ,EAAE,OAAO,CAAA;YACjB,IAAI,CAAC,EAAE,MAAM,CAAA;YACb,UAAU,CAAC,EAAE,MAAM,CAAA;YACnB,kBAAkB,EAAE,OAAO,CAAA;YAC3B,MAAM,EAAE,gBAAgB,EAAE,CAAA;SAC3B,CAAA;KACF,CAAA;IACD,MAAM,EAAE,YAAY,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,EAAE,EAAE,OAAO,CAAA;IACX,SAAS,CAAC,EAAE;QACV,GAAG,CAAC,EAAE;YAAE,EAAE,EAAE,OAAO,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;QACtC,aAAa,CAAC,EAAE;YAAE,EAAE,EAAE,OAAO,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KACjD,CAAA;CACF;AAwPD,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,GAAE,kBAAuB,GAAG,WAAW,CAmD/F;AA04BD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE,CAoC7D;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,GAAE,kBAAuB,GAAG,gBAAgB,CA8EnG"}
package/dist/index.js CHANGED
@@ -9550,6 +9550,74 @@ NODE
9550
9550
  function hasInstallerUserConfig(config, platform) {
9551
9551
  return collectUserConfigEntries(config, [platform]).length > 0;
9552
9552
  }
9553
+ function renderInstallerMcpPathMaterializationSnippet(platform, installDirVariable) {
9554
+ if (platform !== "codex") return "";
9555
+ return `
9556
+ export PLUXX_INSTALL_DIR="${installDirVariable}"
9557
+
9558
+ node <<'NODE'
9559
+ const fs = require('fs')
9560
+ const path = require('path')
9561
+
9562
+ const installDir = process.env.PLUXX_INSTALL_DIR
9563
+
9564
+ if (installDir) {
9565
+ const materializeInstalledStdioPath = (value) => {
9566
+ if (typeof value !== 'string') return value
9567
+
9568
+ const normalized = value.replace(/\\\\/g, '/')
9569
+ const rootRef = normalized.match(/^\\$\\{(?:CLAUDE_PLUGIN_ROOT|CURSOR_PLUGIN_ROOT|PLUGIN_ROOT)\\}[\\\\/](.+)$/)
9570
+
9571
+ if (rootRef) {
9572
+ return path.resolve(installDir, rootRef[1])
9573
+ }
9574
+
9575
+ if (normalized.startsWith('./') || normalized.startsWith('../')) {
9576
+ return path.resolve(installDir, normalized)
9577
+ }
9578
+
9579
+ return value
9580
+ }
9581
+
9582
+ for (const relativePath of ['.mcp.json', 'mcp.json']) {
9583
+ const filepath = path.join(installDir, relativePath)
9584
+ if (!fs.existsSync(filepath)) continue
9585
+
9586
+ const payload = JSON.parse(fs.readFileSync(filepath, 'utf8'))
9587
+ let changed = false
9588
+
9589
+ for (const server of Object.values(payload.mcpServers || {})) {
9590
+ if (!server || typeof server !== 'object') continue
9591
+
9592
+ if (typeof server.command === 'string') {
9593
+ const nextCommand = materializeInstalledStdioPath(server.command)
9594
+ changed ||= nextCommand !== server.command
9595
+ server.command = nextCommand
9596
+ }
9597
+
9598
+ if (Array.isArray(server.args)) {
9599
+ const nextArgs = server.args.map(materializeInstalledStdioPath)
9600
+ changed ||= nextArgs.some((value, index) => value !== server.args[index])
9601
+ server.args = nextArgs
9602
+ }
9603
+ }
9604
+
9605
+ if (changed) {
9606
+ fs.writeFileSync(filepath, JSON.stringify(payload, null, 2) + '\\n')
9607
+ }
9608
+ }
9609
+ }
9610
+ NODE
9611
+ `;
9612
+ }
9613
+ function renderInstallerRuntimeBootstrapSnippet(installDirVariable) {
9614
+ return `
9615
+ if [[ -f "${installDirVariable}/scripts/bootstrap-runtime.sh" ]]; then
9616
+ echo "Preparing local plugin runtime dependencies..."
9617
+ bash "${installDirVariable}/scripts/bootstrap-runtime.sh"
9618
+ fi
9619
+ `;
9620
+ }
9553
9621
  function renderInstallClaudeCodeScript(config) {
9554
9622
  return `#!/usr/bin/env bash
9555
9623
  set -euo pipefail
@@ -9614,6 +9682,8 @@ mkdir -p "$INSTALL_ROOT/.claude-plugin" "$INSTALL_ROOT/plugins"
9614
9682
  rm -rf "$INSTALL_ROOT/plugins/$PLUGIN_NAME"
9615
9683
  cp -R "$BUNDLE_DIR" "$INSTALL_ROOT/plugins/$PLUGIN_NAME"
9616
9684
  ${renderInstallerUserConfigSnippet(config, "claude-code", "$INSTALL_ROOT/plugins/$PLUGIN_NAME")}
9685
+ ${renderInstallerMcpPathMaterializationSnippet("claude-code", "$INSTALL_ROOT/plugins/$PLUGIN_NAME")}
9686
+ ${renderInstallerRuntimeBootstrapSnippet("$INSTALL_ROOT/plugins/$PLUGIN_NAME")}
9617
9687
 
9618
9688
  cat > "$INSTALL_ROOT/.claude-plugin/marketplace.json" <<JSON
9619
9689
  {
@@ -9707,6 +9777,8 @@ mkdir -p "$(dirname "$INSTALL_DIR")"
9707
9777
  rm -rf "$INSTALL_DIR"
9708
9778
  cp -R "$BUNDLE_DIR" "$INSTALL_DIR"
9709
9779
  ${renderInstallerUserConfigSnippet(config, "cursor", "$INSTALL_DIR")}
9780
+ ${renderInstallerMcpPathMaterializationSnippet("cursor", "$INSTALL_DIR")}
9781
+ ${renderInstallerRuntimeBootstrapSnippet("$INSTALL_DIR")}
9710
9782
 
9711
9783
  echo "Installed $PLUGIN_NAME to $INSTALL_DIR"
9712
9784
  echo "If Cursor is already open, use Developer: Reload Window or restart Cursor so the plugin is picked up."
@@ -9765,6 +9837,8 @@ mkdir -p "$(dirname "$INSTALL_DIR")"
9765
9837
  rm -rf "$INSTALL_DIR"
9766
9838
  cp -R "$BUNDLE_DIR" "$INSTALL_DIR"
9767
9839
  ${renderInstallerUserConfigSnippet(config, "codex", "$INSTALL_DIR")}
9840
+ ${renderInstallerMcpPathMaterializationSnippet("codex", "$INSTALL_DIR")}
9841
+ ${renderInstallerRuntimeBootstrapSnippet("$INSTALL_DIR")}
9768
9842
 
9769
9843
  mkdir -p "$(dirname "$MARKETPLACE_PATH")"
9770
9844
 
@@ -9880,6 +9954,8 @@ mkdir -p "$(dirname "$INSTALL_DIR")" "$SKILLS_ROOT"
9880
9954
  rm -rf "$INSTALL_DIR"
9881
9955
  cp -R "$BUNDLE_DIR" "$INSTALL_DIR"
9882
9956
  ${renderInstallerUserConfigSnippet(config, "opencode", "$INSTALL_DIR")}
9957
+ ${renderInstallerMcpPathMaterializationSnippet("opencode", "$INSTALL_DIR")}
9958
+ ${renderInstallerRuntimeBootstrapSnippet("$INSTALL_DIR")}
9883
9959
 
9884
9960
  export ENTRY_PATH
9885
9961
  export PLUGIN_NAME
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchid-labs/pluxx",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Build AI agent plugins once. Prime-time on Claude Code, Cursor, Codex, and OpenCode, with beta generators for additional hosts.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",