vibora 9.4.0 → 9.5.1

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/README.md CHANGED
@@ -147,10 +147,10 @@ Configure your default agent globally in settings, override per-repository, or s
147
147
  The Vibora plugin for Claude Code enables seamless integration:
148
148
 
149
149
  - **Automatic Status Sync** — Task moves to "In Review" when Claude stops, "In Progress" when you respond
150
- - **Vibora Skill** — CLI documentation for task management (see `plugins/vibora/skills/`)
151
- - **Slash Commands** — `/review`, `/pr`, `/notify`, `/linear`, `/task-info`
152
150
  - **Session Continuity** — Claude sessions are tied to task IDs
153
151
  - **MCP Server** — Task management tools available directly to Claude
152
+ - **Vibora Skill** — CLI documentation for task management (see `plugins/vibora/skills/`)
153
+ - **Slash Commands** — `/review`, `/pr`, `/notify`, `/linear`, `/task-info`
154
154
 
155
155
  The plugin is automatically installed when Vibora starts. To install manually:
156
156
 
@@ -159,23 +159,22 @@ claude plugin marketplace add knowsuchagency/vibora
159
159
  claude plugin install vibora@vibora --scope user
160
160
  ```
161
161
 
162
- ## OpenCode Plugin
162
+ ## OpenCode Integration
163
163
 
164
164
  The Vibora plugin for OpenCode enables seamless integration:
165
165
 
166
166
  - **Automatic Status Sync** — Task moves to "In Review" when OpenCode stops, "In Progress" when you respond
167
167
  - **Session Continuity** — OpenCode sessions are tied to task IDs
168
- - **Smart Context** — Automatically detects if you are in a Vibora task
169
-
170
- To install manually:
168
+ - **MCP Server** — Task management tools available directly to OpenCode
171
169
 
172
170
  ```bash
173
- vibora opencode install
171
+ vibora opencode install # Install plugin + MCP server
172
+ vibora opencode uninstall # Remove both
174
173
  ```
175
174
 
176
- ### MCP Tools
175
+ ## MCP Tools
177
176
 
178
- The plugin includes an MCP server that exposes task management and remote execution tools:
177
+ Both Claude Code and OpenCode plugins include an MCP server that exposes task management and remote execution tools:
179
178
 
180
179
  **Task Management:**
181
180
  - `list_tasks` — List all tasks with optional status/repo filter
package/bin/vibora.js CHANGED
@@ -45126,7 +45126,7 @@ function installUv() {
45126
45126
  var package_default = {
45127
45127
  name: "vibora",
45128
45128
  private: true,
45129
- version: "9.4.0",
45129
+ version: "9.5.1",
45130
45130
  description: "Harness Attention. Orchestrate Agents. Ship.",
45131
45131
  license: "PolyForm-Perimeter-1.0.0",
45132
45132
  type: "module",
@@ -45644,7 +45644,15 @@ async function handleConfigCommand(action, positional, flags) {
45644
45644
 
45645
45645
  // cli/src/commands/opencode.ts
45646
45646
  init_errors();
45647
- import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync3 } from "fs";
45647
+ import {
45648
+ mkdirSync as mkdirSync3,
45649
+ writeFileSync as writeFileSync3,
45650
+ existsSync as existsSync4,
45651
+ readFileSync as readFileSync3,
45652
+ unlinkSync as unlinkSync2,
45653
+ copyFileSync,
45654
+ renameSync
45655
+ } from "fs";
45648
45656
  import { homedir as homedir2 } from "os";
45649
45657
  import { join as join4 } from "path";
45650
45658
 
@@ -45652,10 +45660,12 @@ import { join as join4 } from "path";
45652
45660
  var vibora_opencode_default = `import type { Plugin } from "@opencode-ai/plugin"
45653
45661
  import { appendFileSync } from "node:fs"
45654
45662
  import { execFile } from "node:child_process"
45663
+ import { tmpdir } from "node:os"
45664
+ import { join } from "node:path"
45655
45665
 
45656
45666
  declare const process: { env: Record<string, string | undefined> }
45657
45667
 
45658
- const LOG_FILE = "/tmp/vibora-opencode.log"
45668
+ const LOG_FILE = join(tmpdir(), "vibora-opencode.log")
45659
45669
  const NOISY_EVENTS = new Set([
45660
45670
  "message.part.updated",
45661
45671
  "file.watcher.updated",
@@ -45864,22 +45874,154 @@ export const ViboraPlugin: Plugin = async ({ $, directory }) => {
45864
45874
  `;
45865
45875
 
45866
45876
  // cli/src/commands/opencode.ts
45877
+ var OPENCODE_DIR = join4(homedir2(), ".opencode");
45878
+ var OPENCODE_CONFIG_PATH = join4(OPENCODE_DIR, "opencode.json");
45879
+ var PLUGIN_DIR = join4(homedir2(), ".config", "opencode", "plugin");
45880
+ var PLUGIN_PATH = join4(PLUGIN_DIR, "vibora.ts");
45881
+ var VIBORA_MCP_CONFIG = {
45882
+ type: "local",
45883
+ command: ["vibora", "mcp"],
45884
+ enabled: true
45885
+ };
45867
45886
  async function handleOpenCodeCommand(action) {
45868
45887
  if (action === "install") {
45888
+ await installOpenCodeIntegration();
45889
+ return;
45890
+ }
45891
+ if (action === "uninstall") {
45892
+ await uninstallOpenCodeIntegration();
45893
+ return;
45894
+ }
45895
+ throw new CliError("INVALID_ACTION", "Unknown action. Usage: vibora opencode install | vibora opencode uninstall", ExitCodes.INVALID_ARGS);
45896
+ }
45897
+ async function installOpenCodeIntegration() {
45898
+ try {
45899
+ console.log("Installing OpenCode plugin...");
45900
+ mkdirSync3(PLUGIN_DIR, { recursive: true });
45901
+ writeFileSync3(PLUGIN_PATH, vibora_opencode_default, "utf-8");
45902
+ console.log("\u2713 Installed plugin at " + PLUGIN_PATH);
45903
+ console.log("Configuring MCP server...");
45904
+ const mcpConfigured = addMcpServer();
45905
+ console.log("");
45906
+ if (mcpConfigured) {
45907
+ console.log("Installation complete! Restart OpenCode to apply changes.");
45908
+ } else {
45909
+ console.log("Plugin installed, but MCP configuration was skipped.");
45910
+ console.log("Please add the MCP server manually (see above).");
45911
+ }
45912
+ } catch (err) {
45913
+ throw new CliError("INSTALL_FAILED", `Failed to install OpenCode integration: ${err instanceof Error ? err.message : String(err)}`, ExitCodes.ERROR);
45914
+ }
45915
+ }
45916
+ async function uninstallOpenCodeIntegration() {
45917
+ try {
45918
+ let removedPlugin = false;
45919
+ let removedMcp = false;
45920
+ if (existsSync4(PLUGIN_PATH)) {
45921
+ unlinkSync2(PLUGIN_PATH);
45922
+ console.log("\u2713 Removed plugin from " + PLUGIN_PATH);
45923
+ removedPlugin = true;
45924
+ } else {
45925
+ console.log("\u2022 Plugin not found (already removed)");
45926
+ }
45927
+ removedMcp = removeMcpServer();
45928
+ if (!removedPlugin && !removedMcp) {
45929
+ console.log("Nothing to uninstall.");
45930
+ } else {
45931
+ console.log("");
45932
+ console.log("Uninstall complete! Restart OpenCode to apply changes.");
45933
+ }
45934
+ } catch (err) {
45935
+ throw new CliError("UNINSTALL_FAILED", `Failed to uninstall OpenCode integration: ${err instanceof Error ? err.message : String(err)}`, ExitCodes.ERROR);
45936
+ }
45937
+ }
45938
+ function getMcpObject(config3) {
45939
+ const mcp = config3.mcp;
45940
+ if (mcp && typeof mcp === "object" && !Array.isArray(mcp)) {
45941
+ return mcp;
45942
+ }
45943
+ return {};
45944
+ }
45945
+ function addMcpServer() {
45946
+ mkdirSync3(OPENCODE_DIR, { recursive: true });
45947
+ let config3 = {};
45948
+ if (existsSync4(OPENCODE_CONFIG_PATH)) {
45869
45949
  try {
45870
- const pluginDir = join4(homedir2(), ".config", "opencode", "plugin");
45871
- const pluginPath = join4(pluginDir, "vibora.ts");
45872
- console.log("Installing OpenCode plugin...");
45873
- mkdirSync3(pluginDir, { recursive: true });
45874
- writeFileSync3(pluginPath, vibora_opencode_default, "utf-8");
45875
- console.log("\u2713 Installed OpenCode plugin at " + pluginPath);
45876
- console.log(" The plugin will be loaded automatically when you restart OpenCode.");
45877
- } catch (err) {
45878
- throw new CliError("INSTALL_FAILED", `Failed to install OpenCode plugin: ${err instanceof Error ? err.message : String(err)}`, ExitCodes.ERROR);
45950
+ const content = readFileSync3(OPENCODE_CONFIG_PATH, "utf-8");
45951
+ config3 = JSON.parse(content);
45952
+ } catch {
45953
+ console.log("\u26A0 Could not parse existing opencode.json, skipping MCP configuration");
45954
+ console.log(" Add manually to ~/.opencode/opencode.json:");
45955
+ console.log(' "mcp": { "vibora": { "type": "local", "command": ["vibora", "mcp"], "enabled": true } }');
45956
+ return false;
45879
45957
  }
45880
- return;
45881
45958
  }
45882
- throw new CliError("INVALID_ACTION", "Unknown action. usage: vibora opencode install", ExitCodes.INVALID_ARGS);
45959
+ const mcp = getMcpObject(config3);
45960
+ if (mcp.vibora) {
45961
+ console.log("\u2022 MCP server already configured, preserving existing configuration");
45962
+ return true;
45963
+ }
45964
+ if (existsSync4(OPENCODE_CONFIG_PATH)) {
45965
+ copyFileSync(OPENCODE_CONFIG_PATH, OPENCODE_CONFIG_PATH + ".backup");
45966
+ }
45967
+ config3.mcp = {
45968
+ ...mcp,
45969
+ vibora: VIBORA_MCP_CONFIG
45970
+ };
45971
+ const tempPath = OPENCODE_CONFIG_PATH + ".tmp";
45972
+ try {
45973
+ writeFileSync3(tempPath, JSON.stringify(config3, null, 2), "utf-8");
45974
+ renameSync(tempPath, OPENCODE_CONFIG_PATH);
45975
+ } catch (error46) {
45976
+ try {
45977
+ if (existsSync4(tempPath)) {
45978
+ unlinkSync2(tempPath);
45979
+ }
45980
+ } catch {}
45981
+ throw error46;
45982
+ }
45983
+ console.log("\u2713 Added MCP server to " + OPENCODE_CONFIG_PATH);
45984
+ return true;
45985
+ }
45986
+ function removeMcpServer() {
45987
+ if (!existsSync4(OPENCODE_CONFIG_PATH)) {
45988
+ console.log("\u2022 MCP config not found (already removed)");
45989
+ return false;
45990
+ }
45991
+ let config3;
45992
+ try {
45993
+ const content = readFileSync3(OPENCODE_CONFIG_PATH, "utf-8");
45994
+ config3 = JSON.parse(content);
45995
+ } catch {
45996
+ console.log("\u26A0 Could not parse opencode.json, skipping MCP removal");
45997
+ return false;
45998
+ }
45999
+ const mcp = getMcpObject(config3);
46000
+ if (!mcp.vibora) {
46001
+ console.log("\u2022 MCP server not configured (already removed)");
46002
+ return false;
46003
+ }
46004
+ copyFileSync(OPENCODE_CONFIG_PATH, OPENCODE_CONFIG_PATH + ".backup");
46005
+ delete mcp.vibora;
46006
+ if (Object.keys(mcp).length === 0) {
46007
+ delete config3.mcp;
46008
+ } else {
46009
+ config3.mcp = mcp;
46010
+ }
46011
+ const tempPath = OPENCODE_CONFIG_PATH + ".tmp";
46012
+ try {
46013
+ writeFileSync3(tempPath, JSON.stringify(config3, null, 2), "utf-8");
46014
+ renameSync(tempPath, OPENCODE_CONFIG_PATH);
46015
+ } catch (error46) {
46016
+ try {
46017
+ if (existsSync4(tempPath)) {
46018
+ unlinkSync2(tempPath);
46019
+ }
46020
+ } catch {}
46021
+ throw error46;
46022
+ }
46023
+ console.log("\u2713 Removed MCP server from " + OPENCODE_CONFIG_PATH);
46024
+ return true;
45883
46025
  }
45884
46026
 
45885
46027
  // cli/src/commands/notifications.ts
@@ -46580,13 +46722,26 @@ var opencodeInstallCommand = defineCommand({
46580
46722
  await handleOpenCodeCommand("install");
46581
46723
  }
46582
46724
  });
46725
+ var opencodeUninstallCommand = defineCommand({
46726
+ meta: {
46727
+ name: "uninstall",
46728
+ description: "Uninstall the OpenCode plugin"
46729
+ },
46730
+ args: globalArgs,
46731
+ async run({ args }) {
46732
+ if (args.json)
46733
+ setJsonOutput(true);
46734
+ await handleOpenCodeCommand("uninstall");
46735
+ }
46736
+ });
46583
46737
  var opencodeCommand = defineCommand({
46584
46738
  meta: {
46585
46739
  name: "opencode",
46586
46740
  description: "Manage OpenCode integration"
46587
46741
  },
46588
46742
  subCommands: {
46589
- install: opencodeInstallCommand
46743
+ install: opencodeInstallCommand,
46744
+ uninstall: opencodeUninstallCommand
46590
46745
  }
46591
46746
  });
46592
46747
  var notificationsStatusCommand = defineCommand({