vibeostheog 0.19.5 → 0.19.7

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,18 @@
1
+ ## 0.19.7
2
+ - feat: use native opencode model lists
3
+ - fix: make OpenCode footer agnostic
4
+ - fix: make vibeOS compatibility paths dynamic
5
+ Merge pull request #56 from DrunkkToys/codex/agnostic-opencode-release
6
+ Merge pull request #55 from DrunkkToys/codex/agnostic-opencode-models
7
+ merge: origin/master into codex/agnostic-opencode-models
8
+ Bootstrap trinity tiers from OpenCode model
9
+
10
+
11
+ ## 0.19.6
12
+ - feat: add OpenCode-style setup installer
13
+ - docs: align install flow with OpenCode npm plugin pattern
14
+
15
+
1
16
  ## 0.19.4
2
17
  - feat: register trinity in OpenCode keymap
3
18
  - docs: clarify install and trinity usage
package/README.md CHANGED
@@ -18,17 +18,25 @@ It also adds guardrails: delegation enforcement, flow and TDD controls, pattern
18
18
 
19
19
  ### OpenCode plugin
20
20
 
21
- 1. Add the package to your OpenCode config. OpenCode installs npm plugins automatically at startup:
21
+ 1. Register the plugin with the bundled setup command:
22
+
23
+ ```bash
24
+ npx vibeostheog setup --project
25
+ ```
26
+
27
+ Use `npx vibeostheog setup` for a global OpenCode install under `~/.config/opencode/`.
28
+
29
+ 2. The setup command writes the package name into your OpenCode config. OpenCode installs npm plugins automatically at startup:
22
30
 
23
31
  ```json
24
32
  {
25
33
  "plugin": [
26
- "vibeostheog@0.19.5"
34
+ "vibeostheog"
27
35
  ]
28
36
  }
29
37
  ```
30
38
 
31
- 2. If you keep a local checkout of the plugin, point OpenCode at the built file instead:
39
+ 3. If you keep a local checkout of the plugin, point OpenCode at the built file instead:
32
40
 
33
41
  ```json
34
42
  {
package/bin/setup.js ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { mkdir, readFile, writeFile } from "node:fs/promises";
4
+ import { dirname, resolve } from "node:path";
5
+ import { homedir } from "node:os";
6
+
7
+ const pkgName = "vibeostheog";
8
+ const args = process.argv.slice(2);
9
+ const command = args[0] ?? "setup";
10
+ const isProject = args.includes("--project");
11
+
12
+ if (command !== "setup") {
13
+ console.error(`Usage: ${pkgName} setup [--project]`);
14
+ process.exit(1);
15
+ }
16
+
17
+ const configPath = isProject
18
+ ? resolve(process.cwd(), "opencode.json")
19
+ : resolve(homedir(), ".config", "opencode", "opencode.json");
20
+
21
+ let config = {};
22
+ try {
23
+ config = JSON.parse(await readFile(configPath, "utf8"));
24
+ } catch {
25
+ config = {};
26
+ }
27
+
28
+ if (!config || typeof config !== "object" || Array.isArray(config)) {
29
+ config = {};
30
+ }
31
+
32
+ if (!config.$schema) {
33
+ config.$schema = "https://opencode.ai/config.json";
34
+ }
35
+
36
+ if (!Array.isArray(config.plugin)) {
37
+ config.plugin = [];
38
+ }
39
+
40
+ if (!config.plugin.includes(pkgName)) {
41
+ config.plugin.push(pkgName);
42
+ }
43
+
44
+ await mkdir(dirname(configPath), { recursive: true });
45
+ await writeFile(configPath, `${JSON.stringify(config, null, 2)}\n`);
46
+
47
+ console.log(`${pkgName} registered in ${configPath}`);
48
+ console.log("Restart OpenCode to activate the plugin.");
@@ -19,6 +19,7 @@
19
19
  "selection": {
20
20
  "_comment": "Used by `trinity auto`: pick `brain` slot when credit ≥ threshold, else `fallback` slot. Dropping to mid slot at low credit is more reliable than burning what's left on flaky brain calls. `enabled` toggles all VibeTheOG logic. `active_slot` records the last slot set by `trinity`.",
21
21
  "credit_threshold_percent": 30,
22
+ "slot_order": ["brain", "medium", "cheap"],
22
23
  "brain": "brain",
23
24
  "fallback": "medium",
24
25
  "enabled": true,
@@ -47,6 +48,9 @@
47
48
  }
48
49
  },
49
50
  "pricing": {
51
+ "models": {
52
+ "provider/model-id": 0.001
53
+ },
50
54
  "high": {
51
55
  "input": 15.00,
52
56
  "output": 75.00,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeostheog",
3
- "version": "0.19.5",
3
+ "version": "0.19.7",
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",
@@ -24,6 +24,10 @@
24
24
  "migrate-ledger": "node scripts/migrate-ledger.mjs"
25
25
  },
26
26
  "type": "module",
27
+ "main": "./src/index.js",
28
+ "bin": {
29
+ "vibeostheog": "./bin/setup.js"
30
+ },
27
31
  "exports": {
28
32
  ".": "./src/index.js",
29
33
  "./server": "./src/lib/vibeos-mcp-server.js",
@@ -48,6 +52,7 @@
48
52
  "files": [
49
53
  "src/**/*.js",
50
54
  "src/**/*.json",
55
+ "bin/setup.js",
51
56
  ".opencode/plugins/vibeOS-tui.tsx",
52
57
  "scripts/deploy.mjs",
53
58
  "model-tiers.sample.json",