vibeostheog 0.25.36 → 0.25.38

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,12 @@
1
+ ## 0.25.38
2
+ - fix: update usage line to recommend npx -y (#252) (#252)
3
+ - fix: add permission prompt to setup.js + contract tests for install flow (#251) (#251)
4
+
5
+
6
+ ## 0.25.37
7
+ - fix: add permission prompt to setup.js + contract tests for install flow (#251) (#251)
8
+
9
+
1
10
  ## 0.25.34
2
11
  - feat: holistic semantic observer replacing pattern learner (#245)
3
12
  - fix: re-establish npm link after publish + contract test for bin symlink (#248) (#249)
package/bin/setup.js CHANGED
@@ -4,20 +4,42 @@ import { execSync } from "node:child_process";
4
4
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs";
5
5
  import { dirname, resolve } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
- import { resolveOpenCodeHome } from "../scripts/lib/opencode-homes.mjs";
7
+ import { createInterface } from "node:readline";
8
+ import { resolveOpenCodeHome, resolveOpenCodeHomes } from "../scripts/lib/opencode-homes.mjs";
8
9
 
9
10
  const __dirname = dirname(fileURLToPath(import.meta.url));
10
11
  const root = resolve(__dirname, "..");
11
12
  const args = process.argv.slice(2);
12
- const command = args[0] ?? "setup";
13
+ const command = args.find(a => !a.startsWith("-")) ?? "setup";
13
14
  const isInstallCommand = command === "setup" || command === "set";
14
15
  const isProject = args.includes("--project");
16
+ const isYes = args.includes("--yes") || args.includes("-y");
15
17
 
16
- if (!isInstallCommand) {
17
- console.error("Usage: vibeostheog set [--project] | vibeostheog setup [--project]");
18
+ if (!isInstallCommand || args.includes("--help") || args.includes("-h")) {
19
+ console.error("Usage: npx -y vibeostheog set [--yes] [--project]");
20
+ console.error(" npx -y vibeostheog setup [--yes] [--project]");
18
21
  process.exit(1);
19
22
  }
20
23
 
24
+ // Permission prompt
25
+ const homes = resolveOpenCodeHomes({ cwd: process.cwd() });
26
+ console.log("");
27
+ console.log("vibeOS — cost-aware delegation enforcer for OpenCode");
28
+ console.log("");
29
+ console.log("This will install vibeOS plugin to the following directories:");
30
+ for (const h of homes) console.log(" " + h);
31
+ console.log("");
32
+
33
+ if (!isYes && process.stdin.isTTY && process.stderr.isTTY) {
34
+ const rl = createInterface({ input: process.stdin, output: process.stderr });
35
+ const answer = await new Promise((resolve) => rl.question("Install vibeOS into OpenCode? [y/N] ", resolve));
36
+ rl.close();
37
+ if (answer.toLowerCase() !== "y" && answer.toLowerCase() !== "yes") {
38
+ console.log("Installation cancelled.");
39
+ process.exit(0);
40
+ }
41
+ }
42
+
21
43
  // Deploy plugin files to ~/.config/opencode/plugins/ and register globally
22
44
  const deployScript = resolve(root, "scripts", "deploy.mjs");
23
45
  if (!existsSync(deployScript)) {
@@ -51,4 +73,5 @@ if (isProject) {
51
73
  console.log(`vibeOS registered in ${configPath}`);
52
74
  }
53
75
 
76
+ console.log("");
54
77
  console.log("Done. Restart OpenCode to activate the plugin.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeostheog",
3
- "version": "0.25.36",
3
+ "version": "0.25.38",
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",