vibeostheog 0.25.17 → 0.25.19

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.25.19
2
+ - fix: harden loop detection and behavioral stress
3
+
4
+
5
+ ## 0.25.18
6
+ - fix: install vibeOS with absolute opencode paths
7
+
8
+
1
9
  ## 0.25.17
2
10
  - chore: v0.25.16
3
11
  Revert "Remove local dashboard base stamp"
package/bin/setup.js CHANGED
@@ -6,6 +6,17 @@ import { dirname, resolve } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
7
  import { homedir } from "node:os";
8
8
 
9
+ function resolveOpenCodeHomes() {
10
+ const override = process.env.VIBEOS_OPENCODE_HOME;
11
+ if (override) return [override];
12
+ const base = homedir();
13
+ const desktopHome = process.env.VIBEOS_OPENCODE_DESKTOP_HOME
14
+ || (process.platform === "darwin" ? resolve(base, "Library", "Application Support", "ai.opencode.desktop") : null);
15
+ const configHome = resolve(base, ".config", "opencode");
16
+ const dotHome = resolve(base, ".opencode");
17
+ return [desktopHome, configHome, dotHome].filter(Boolean);
18
+ }
19
+
9
20
  const __dirname = dirname(fileURLToPath(import.meta.url));
10
21
  const root = resolve(__dirname, "..");
11
22
  const args = process.argv.slice(2);
@@ -40,7 +51,8 @@ if (isProject) {
40
51
  if (!config || typeof config !== "object" || Array.isArray(config)) config = {};
41
52
  if (!config.$schema) config.$schema = "https://opencode.ai/config.json";
42
53
  if (!Array.isArray(config.plugin)) config.plugin = [];
43
- const pluginRef = resolve(homedir(), ".config", "opencode", "plugins", "vibeOS.js");
54
+ const [installHome] = resolveOpenCodeHomes();
55
+ const pluginRef = resolve(installHome || resolve(homedir(), ".config", "opencode"), "plugins", "vibeOS.js");
44
56
  if (!config.plugin.includes(pluginRef)) {
45
57
  config.plugin.push(pluginRef);
46
58
  mkdirSync(dirname(configPath), { recursive: true });
@@ -1 +1 @@
1
- window.__VIBEOS_DASHBOARD_BASE__ = "http://127.0.0.1:58227";
1
+ window.__VIBEOS_DASHBOARD_BASE__ = "http://127.0.0.1:61719";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeostheog",
3
- "version": "0.25.17",
3
+ "version": "0.25.19",
4
4
  "description": "Cost-aware delegation enforcer for OpenCode. Tracks model usage, routes Task subagents to cheaper tiers, surfaces cumulative savings in chat. Includes research audit, reporting framework, project memory, progressive scratchpad decadence, and trinity CLI for brain/medium/cheap slot switching.",
5
5
  "scripts": {
6
6
  "release": "node scripts/release.mjs",
@@ -15,11 +15,11 @@ function resolveOpenCodeHomes() {
15
15
  const override = process.env.VIBEOS_OPENCODE_HOME
16
16
  if (override) return [override]
17
17
  const base = homedir()
18
- const configHome = join(base, ".config", "opencode")
19
- const dotHome = join(base, ".opencode")
20
18
  const desktopHome = process.env.VIBEOS_OPENCODE_DESKTOP_HOME
21
19
  || (process.platform === "darwin" ? join(base, "Library", "Application Support", "ai.opencode.desktop") : null)
22
- return [configHome, dotHome, desktopHome].filter(Boolean)
20
+ const configHome = join(base, ".config", "opencode")
21
+ const dotHome = join(base, ".opencode")
22
+ return [desktopHome, configHome, dotHome].filter(Boolean)
23
23
  }
24
24
 
25
25
  if (!existsSync(bundlePath)) {
@@ -104,6 +104,7 @@ try {
104
104
  try {
105
105
  for (const home of resolveOpenCodeHomes()) {
106
106
  const ocConfigPath = join(home, "opencode.json")
107
+ const pluginRef = join(home, "plugins", "vibeOS.js")
107
108
  mkdirSync(dirname(ocConfigPath), { recursive: true })
108
109
  let config = {}
109
110
  if (existsSync(ocConfigPath)) {
@@ -117,13 +118,12 @@ try {
117
118
  }
118
119
  if (!config || typeof config !== "object" || Array.isArray(config)) config = {}
119
120
  if (!Array.isArray(config.plugin)) config.plugin = []
120
- const hasVibeOs = config.plugin.some(p => typeof p === "string" && p.includes("vibeOS"))
121
- if (!hasVibeOs) {
122
- config.$schema ||= "https://opencode.ai/config.json"
123
- config.plugin.push("./plugins/vibeOS.js")
124
- writeFileSync(ocConfigPath, JSON.stringify(config, null, 2) + "\n")
125
- process.stderr.write(`[vibeOS deploy] Registered vibeOS in ${home}/opencode.json\n`)
126
- }
121
+ const filtered = config.plugin.filter((p) => !(typeof p === "string" && p.includes("vibeOS")))
122
+ filtered.push(pluginRef)
123
+ config.$schema ||= "https://opencode.ai/config.json"
124
+ config.plugin = filtered
125
+ writeFileSync(ocConfigPath, JSON.stringify(config, null, 2) + "\n")
126
+ process.stderr.write(`[vibeOS deploy] Registered vibeOS in ${home}/opencode.json\n`)
127
127
  }
128
128
  } catch {
129
129
  process.stderr.write("[vibeOS deploy] Could not auto-register in opencode.json (plugin may need manual config)\n")