vibeostheog 0.19.5 → 0.19.6
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 +5 -0
- package/README.md +11 -3
- package/bin/setup.js +48 -0
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
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.
|
|
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
|
|
34
|
+
"vibeostheog"
|
|
27
35
|
]
|
|
28
36
|
}
|
|
29
37
|
```
|
|
30
38
|
|
|
31
|
-
|
|
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.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibeostheog",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.6",
|
|
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",
|