vibeostheog 0.15.23 → 0.16.0

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.
Files changed (4) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +121 -232
  3. package/package.json +1 -1
  4. package/src/index.js +926 -860
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 0.16.0
2
+ - feat: dopamine-style footer + natural language system directives
3
+ - feat: dopamine-style footer + natural language system directives
4
+ - feat: turn-aware compaction directive at turn 7+
5
+ - feat: add forensic/web-research modes + 1084-datapoint benchmark
6
+ - fix: flash icon only when API connected, unified [VIBE→MODE⚡] format
7
+ - docs: Security section + Context7 cost optimization docs
8
+ - docs: add Security section with API token emphasis and Context7 cost optimization docs
9
+ - docs: persist all benchmark data + compaction research
10
+ - docs: reformat README as user-facing PM doc, move internals to AGENTS.md, cleanup .gitignore
11
+ Merge pull request #35 from DrunkkToys/refactor/simplify-chat-transform
12
+ readme: center VIBE autoswitching as the core value proposition
13
+ Revert "fix: add system prompt cache savings tracking"
14
+
15
+
1
16
  ## 0.15.23
2
17
  - feat: add trinity api-token command to inject VIBEOS_API_TOKEN
3
18
 
package/README.md CHANGED
@@ -1,286 +1,175 @@
1
1
  # vibeOS for OpenCode
2
2
 
3
- Cost-aware delegation and policy plugin for OpenCode Desktop.
3
+ VIBE is a smart model router for OpenCode Desktop. It automatically selects and switches between brain, medium, and cheap model tiers based on the task at hand — expensive models handle orchestration while cost-effective models execute implementation work. No manual slot-picking needed.
4
4
 
5
- vibeOS helps keep expensive model usage under control by enforcing delegation behavior, tracking savings, and exposing runtime controls through the `trinity` tool.
5
+ The core is the VIBE autoswitcher: a decision engine that routes each request to the right tier based on context, enforcement policy, and session state. You stay in control via the `trinity` tool set, but the default workflow is zero-config.
6
6
 
7
- ## Version
7
+ Beyond routing, vibeOS tracks savings from tier-switching, enforces delegation policies, and provides real-time visibility through a live status footer and web dashboard.
8
8
 
9
- Current package version: `0.14.1`
9
+ ## Savings Categories
10
10
 
11
- ## What It Does
12
-
13
- - Tracks estimated savings from delegation warnings and enforcement events.
14
- - Tracks cache savings as a separate persisted category when scratchpad cache hits are observed.
15
- - Adds a live footer to assistant outputs with model split, cumulative savings, and trend arrow.
16
- - Provides `trinity` runtime controls for slot switching, enforcement toggles, audits, and diagnostics.
17
- - Adds per-session model locking: prevents the plugin from auto-switching models when the user changes the model in the OpenCode GUI (`trinity lock on|off`).
18
- - Adds optional flow checks and TDD skeleton enforcement.
19
- - Adds project guard: ensures AGENTS.md and README.md exist and stay protected in every project.
20
- - Adds report and research-audit tooling.
21
- - Learns recurring struggle and routine patterns per project, with `trinity patterns` inspection and `trinity patterns clear`.
22
- - Stress mitigation pipeline: detects user stress signals, shows live stress gauge in footer, injects protective system prompts, and upgrades Task tier when user is stressed.
23
- - vibeOS MCP server with HTTP API for extended tool capabilities (trinity, reports, session metrics, diagnostics).
24
- - TUI dashboard sidebar plugin for real-time plugin status and controls.
25
- - **Web dashboard** — SolidJS SPA served via standalone server (`npm run dashboard`) or embedded in the MCP server. Real-time SSE push updates at `http://127.0.0.1:3333`.
26
- - Worker-to-Brain (WBP) protocol synthesizes delegated task output directly in assistant chat.
27
- - **Remote API protection**: Core algorithms run on a self-hosted API server (`api.vibetheog.com`) with token-based authentication. Non-paying seats can be deactivated, immediately revoking all API tokens and falling back to local degraded mode.
28
-
29
- ## Remote API Protection
30
-
31
- vibeOS protects its core algorithms by serving them from a self-hosted API server rather than bundling them entirely in the plugin:
32
-
33
- | Algorithm | Endpoint | Description |
34
- |---|---|---|---|
35
- | Delegation enforcement | `POST /api/v1/delegate/check` | Model cost calculation, block/warn routing |
36
- | Model tier routing | `POST /api/v1/route/model` | Tier classification, stress-aware routing |
37
- | Stress scoring | `POST /api/v1/stress/score` | NLP stress signal detection |
38
- | Blackbox engine | `POST /api/v1/blackbox/analyze` | Dialogue trajectory, loop detection, pivot/switch, outcome tracking |
39
- | Blackbox calibration | `POST /api/v1/blackbox/calibrate` | Auto-tune thresholds from session outcomes |
40
- | Blackbox calibration state | `GET /api/v1/blackbox/calibration` | Read calibrated weights per project |
41
- | Blackbox outcome | `POST /api/v1/blackbox/outcome` | Record session satisfaction outcome |
42
- | Blackbox project sessions | `GET /api/v1/blackbox/project-sessions` | List cross-session history per project |
43
- | TDD skeleton gen | `POST /api/v1/tdd/skeleton` | Multi-language test generation |
44
- | Pattern learner | `POST /api/v1/patterns/observe` | Friction/routine detection |
45
- | Model pricing | `POST /api/v1/pricing/fetch` | Dynamic OpenRouter pricing cache |
46
- | Context compression | `POST /api/v1/compress/context` | Bullet-point extraction |
47
-
48
- ### Environment Variables
49
-
50
- ```
51
- VIBEOS_API_URL=https://api.vibetheog.com # API server URL (default: https://api.vibetheog.com)
52
- VIBEOS_API_TOKEN=vos_... # Your API token (required for remote mode)
53
- VIBEOS_API_ENABLED=true # Set to "false" to use local-only mode
54
- CLAUDE_CREDIT_PERCENT=150 # Override credit percentage (default: 100)
55
- CLAUDE_CONTEXT7_AVAILABLE=true # Set to enable context7 cost optimization
56
- CLAUDE_SCRATCHPAD_MAX_AGE_SEC=86400 # Scratchpad cache lifetime in seconds
57
- VIBEOS_MCP_PORT=3001 # MCP server port (default: 3001)
58
- ```
11
+ - **Delegation savings** — Estimated cost avoided by routing tasks to cheaper models.
12
+ - **Cache savings** — Cost avoided from scratchpad cache hits.
59
13
 
60
- When `VIBEOS_API_TOKEN` is not set or `VIBEOS_API_ENABLED=false`, the plugin runs in local-only mode with all algorithms bundled. When a valid token is provided, core algorithms are offloaded to the remote API.
14
+ Both are summed in the live footer and persisted in \`~/.claude/delegation-state.json\` across sessions.
61
15
 
62
- ### Seat & Token Management
16
+ ## What It Does
63
17
 
64
- The API server manages licenses via seats:
18
+ - **Smart delegation** Blocks direct write/edit on high-tier models and routes work to cheaper subagents
19
+ - **Cost tracking** — Tracks estimated savings from delegation events and cache hits, displayed in a live footer
20
+ - **trinity commands** — Runtime controls for model switching, enforcement toggles, audits, and diagnostics
21
+ - **Flow enforcer** — Validates write/edit patterns against project rules; optionally extracts TODOs/FIXMEs
22
+ - **TDD enforcer** — Auto-creates test skeletons for changed source files; strict mode makes TODO tests fail loudly
23
+ - **Project guard** — Protects AGENTS.md and README.md in every project with auto-regeneration
24
+ - **Pattern learner** — Detects recurring friction and routine patterns per project, surfaces via `trinity patterns`
25
+ - **Stress mitigation** — Detects user stress signals, adjusts tier routing, and injects protective prompts
26
+ - **Model locking** — Prevents auto-switching when model is changed in the OpenCode GUI (`trinity lock`)
27
+ - **Report & audit** — `report-save`, `report-list`, `report-read`, and `research-audit` tools
28
+ - **Worker-to-Brain protocol** — Delegates implementation tasks to cheaper subagents, synthesizes results in-chat
29
+ - **Web dashboard** — Real-time status, savings, stress gauge, and controls via browser
30
+ - **TUI sidebar** — Plugin status and controls via OpenCode sidebar plugin
31
+ - **Blackbox decision engine** — Dialogue trajectory tracking with loop prevention, pivot detection, and outcome tracking
65
32
 
66
- - **Create a seat + token** (WordPress integration):
67
- `POST /admin/seats` with `{ "name": "...", "email": "...", "with_token": "label" }`
33
+ ## Install
68
34
 
69
- - **Suspend a seat** (non-paying customer):
70
- `PATCH /admin/seats/:id` with `{ "status": "suspended" }`
71
- This immediately revokes all API tokens for that seat. The plugin falls back to local degraded mode.
35
+ ### npm (Recommended)
72
36
 
73
- - **Reactivate a seat**:
74
- `PATCH /admin/seats/:id` with `{ "status": "active" }`
37
+ ```bash
38
+ npm install vibeOS
39
+ ```
75
40
 
76
- ## Runtime Model Slots
41
+ Register in `~/.config/opencode/opencode.json`:
77
42
 
78
- Slots are configured in `~/.claude/model-tiers.json`:
43
+ ```json
44
+ "plugins": [
45
+ { "id": "vibeOS", "path": "node_modules/vibeOS/src/index.js" }
46
+ ]
47
+ ```
79
48
 
80
- - `brain`
81
- - `medium`
82
- - `cheap`
49
+ ### Local Plugin File
83
50
 
84
- On startup, the plugin detects the active model/slot from `model-tiers.json`. No automatic slot switching occurs; use `trinity set <slot>` or `trinity rebuild` to change slots.
51
+ Copy the plugin and lib files to `~/.config/opencode/plugins/`. See the repository for the complete file list.
85
52
 
86
- ## Savings Categories (Persisted)
53
+ Register in `~/.config/opencode/opencode.json`:
87
54
 
88
- State file: `~/.claude/delegation-state.json`
55
+ ```json
56
+ "plugins": [
57
+ { "id": "vibeOS", "path": "~/.config/opencode/plugins/vibeOS.js" }
58
+ ]
59
+ ```
89
60
 
90
- - Delegation savings:
91
- - `sessions[...].warns[].est_savings_usd`
92
- - aggregated into footer totals
93
- - Cache savings:
94
- - `sessions[...].cache_savings_usd`
95
- - `lifetime.cache_savings_usd`
96
- - optional `sessions[...].cache_hits[]` audit entries
97
- - Context7 missed-savings tracker:
98
- - `lifetime.missed_context7_usd`
61
+ Restart OpenCode Desktop. The plugin auto-creates its configuration on first run.
62
+
63
+ ## trinity Commands
64
+
65
+ | Command | Description |
66
+ |---|---|
67
+ | `trinity status` | Show current plugin state |
68
+ | `trinity set brain\|medium\|cheap` | Switch model slot |
69
+ | `trinity brain\|medium\|cheap` | Shorthand slot switch |
70
+ | `trinity enable` / `trinity disable` | Toggle plugin on/off |
71
+ | `trinity thinking full\|brief\|off` | Set reasoning depth |
72
+ | `trinity enforce on\|off` | Toggle delegation enforcement |
73
+ | `trinity lock on\|off` | Toggle model locking |
74
+ | `trinity flow on\|off` | Toggle flow enforcer |
75
+ | `trinity flow enforce on\|off` | Toggle auto TODO extraction |
76
+ | `trinity tdd on\|off` | Toggle test skeleton gen |
77
+ | `trinity tdd strict on\|off` | Toggle strict mode |
78
+ | `trinity tdd quality on\|off` | Toggle quality mode |
79
+ | `trinity blackbox on\|off\|status\|reset` | Decision engine controls |
80
+ | `trinity project` | Per-project analytics |
81
+ | `trinity patterns` / `trinity patterns clear` | Inspect / clear patterns |
82
+ | `trinity guard` | Regenerate project guard files |
83
+ | `trinity diagnose` | Run diagnostics |
84
+ | `trinity rebuild` | Auto-detect available models |
85
+ | `trinity help` | Command reference |
99
86
 
100
87
  ## Footer Format
101
88
 
102
89
  Typical output footer:
103
90
 
104
- `— [model route] | VibeTheOG: <total> saved <arrow> —`
105
-
106
- Example (with savings):
107
-
108
- `— [🧠 deepseek-v4-flash → ⚙ deepseek-chat] | VibeTheOG: 0.01 saved → —`
109
-
110
- Example (no savings yet, tier label only):
111
-
112
- `— [⚙ Mid] —`
113
-
114
- ## `trinity` Tool Commands
115
-
116
- Main commands:
117
-
118
- - `trinity status`
119
- - `trinity set brain|medium|cheap`
120
- - `trinity brain|medium|cheap`
121
- - `trinity enable` / `trinity disable`
122
- - `trinity thinking full|brief|off`
123
- - `trinity enforce` / `trinity enforce on|off`
124
- - `trinity lock on|off` / `trinity lock`
125
- - `trinity flow on|off` / `trinity flow enforce on|off` / `trinity flow`
126
- - `trinity tdd on|off` / `trinity tdd strict on|off` / `trinity tdd quality on|off` / `trinity tdd`
127
- - `trinity project`
128
- - `trinity patterns`
129
- - `trinity patterns clear`
130
- - `trinity patterns suggest`
131
- - `trinity repair-state`
132
- - `trinity guard`
133
- - `trinity diagnose`
134
- - `trinity rebuild`
135
- - `trinity help`
136
-
137
- ## Optional Enforcement Modules
138
-
139
- - Delegation enforcement:
140
- - Blocks direct `write`/`edit`/`notebookedit` on high-tier brain when enabled.
141
- - Adds user-visible enforcement notes.
142
- - Flow enforcer:
143
- - Rule checks for write/edit patterns.
144
- - Optional TODO/FIXME extraction queue when flow enforcement is enabled.
145
- - TDD enforcer:
146
- - Auto-creates skeleton tests for changed source files when enabled.
147
- - Strict mode is ON by default: TODO tests fail loudly until implemented.
148
- - Project Guard:
149
- - On session init, checks if AGENTS.md and README.md exist in the project root.
150
- - Auto-creates AGENTS.md with protective rules (LLM must ask before modifying code).
151
- - Auto-creates README.md with tech stack auto-detection and feature stubs.
152
- - Flow rules warn/flag on write/edit to these protected files.
153
- - System prompt injects directive to maintain both files.
154
- - `trinity guard` command regenerates both files on demand.
155
-
156
- ## Reports and Audit Tools
157
-
158
- - `research-audit`
159
- - `report-save`
160
- - `report-list`
161
- - `report-read`
162
-
163
- These use `~/.claude/reports` and project memory in `~/.claude/project-states.json`.
164
-
165
- ## Pattern Learning
166
-
167
- - Detects repeated friction signals and recurring successful routines from session behavior.
168
- - Stores per-project pattern memory in `~/.claude/project-states.json`.
169
- - Promotes patterns after repeated confirmation across sessions and surfaces them via `trinity patterns`.
170
-
171
- ## Blackbox Decision Engine
172
-
173
- The blackbox tracks dialogue trajectory per-session and per-project, providing real-time decision state insights:
174
-
175
- **Enabled by default.**
176
-
177
- - **Resolution tracking**: Classifies each session into one of 7 sub-regimes (INIT, DIVERGENT, EXPLORING, REFINING, CONVERGING, CLOSED, LOOPING) based on entropy trends, action consistency, feature contradiction, and embedding drift.
178
- - **Real feature extraction**: Derives 11 features from each user message — message length, word count, question ratio, code blocks, urgency signals, sentiment, complexity, repetition, and instruction density.
179
- - **Loop prevention**: Detects when the conversation is going in circles and injects escalating system prompt interventions (gentle → suggestive → assertive → escalated) to break the loop.
180
- - **PIVOT/SWITCH detection**: Recognizes when the user changes context outside the current project scope and injects scope-confirmation directives.
181
- - **Outcome tracking**: Detects satisfaction signals from assistant responses (positive: "thanks/that works/perfect"; negative: "broken/still failing/wrong") and records them for calibration.
182
- - **Cross-session continuity**: State persists per project fingerprint in `~/.claude/blackbox-state.json` and remotely in SQLite, allowing resolution state to carry across terminal restarts.
183
- - **Online calibration**: The API server aggregates session outcomes and auto-tunes loop detection, momentum, and closure thresholds per project via `POST /api/v1/blackbox/calibrate`.
184
-
185
- Commands:
186
- - `trinity blackbox on` — Enable the decision engine
187
- - `trinity blackbox off` — Disable the decision engine
188
- - `trinity blackbox status` — View current resolution, sub-regime, momentum, loop state, and project history
189
- - `trinity blackbox reset` — Clear the resolution tracker for the current session
91
+ ```
92
+ — [model route] | VibeTheOG: <total> saved <arrow> —
93
+ ```
190
94
 
95
+ The footer shows model split, cumulative savings, stress gauge, and trend arrow.
191
96
 
192
- The blackbox injects a decision directive into system prompts showing current resolution state, intent volatility, and continuity. When looping or pivoting is detected, stronger intervention directives are injected to guide the model.
97
+ ## Web Dashboard
193
98
 
194
- ### Session Workflow Phases
99
+ ```bash
100
+ npm run build:dashboard # Build the SPA
101
+ npm run dashboard # Start server on http://127.0.0.1:3333
102
+ ```
195
103
 
196
- The meta-controller maps detected sub-regimes to optimization modes, which are the authority over all plugin settings. Each turn, `syncControlSettings()` writes the mode's control vector to `model-tiers.json`, auto-toggling enforcement, flow, TDD, and thinking level:
104
+ Displays model split, savings, session history, stress gauge, trinity controls, reports, and blackbox state with SSE push updates every 1.5s.
197
105
 
198
- | Regime | Mode | Enforce | Flow | TDD | Tier | Think |
199
- |---|---|---|---|---|---|---|
200
- | INIT | budget | relaxed | audit | lazy | cheap | off |
201
- | EXPLORING / DIVERGENT | budget | relaxed | audit | lazy | cheap | off |
202
- | REFINING | budget | relaxed | audit | lazy | cheap | off |
203
- | CONVERGING / CLOSED | quality | strict | strict | quality | brain | full |
204
- | LOOPING | speed | relaxed | audit | lazy | medium | off |
106
+ ## Security
205
107
 
206
- **Stress override**: When user stress exceeds 1.5, any regime escalates to `quality` mode enforcement tightens, brain tier activates. Settings are re-synced every turn; mode is the sole authority. Manual `trinity enforce on/off` still works until the next turn re-evaluates.
108
+ The API token (`VIBEOS_API_TOKEN`) acts as a **password** for your vibeOS seat. Treat it with the same care as any credential.
207
109
 
208
- When the blackbox is disabled, a lightweight `classifyTurnSimple()` fallback inspects user message patterns:
209
- - Q&A patterns (`"how"`, `"what"`, `"explain"`) EXPLORING (relaxed)
210
- - Implementation patterns (`"write"`, `"fix"`, `"implement"`) REFINING (normal)
110
+ - **Token-based seat auth** — Each token is bound to a seat. Suspending a seat immediately revokes all associated tokens.
111
+ - **Graceful degradation** If the token is revoked or the API is unreachable, the plugin falls back to local-only mode with bundled algorithms. No functionality is lost; only remote-optimized routing is disabled.
112
+ - **Never commit tokens** — `.env.production` and `PRODUCTION-CREDENTIALS.md` are gitignored. Do not share or hardcode tokens in source files.
113
+ - **Token rotation** — Generate a new token and update `VIBEOS_API_TOKEN` if you suspect a leak. Old tokens are invalidated immediately on seat suspension.
114
+ - **Local-only mode** — Without an API token, all algorithms run locally. Set `VIBEOS_API_ENABLED=false` to explicitly disable all remote calls.
211
115
 
212
- ## Install
116
+ ## Context7 Cost Optimization
213
117
 
214
- ### npm (Recommended)
118
+ [context7](https://upstash.com/docs/context7) is an MCP tool that resolves library/framework documentation queries at a fraction of the cost of WebFetch (~$0.06/turn saved).
215
119
 
216
- Published to npm as `vibeOS`:
120
+ **Install it once:**
217
121
 
218
122
  ```bash
219
- npm install vibeOS
220
- ```
221
-
222
- Then register in `~/.config/opencode/opencode.json`:
223
- ```json
224
- "plugins": [
225
- { "id": "vibeOS", "path": "node_modules/vibeOS/src/index.js" }
226
- ]
227
- ```
228
-
229
- ### Local Plugin File
230
-
231
- For OpenCode Desktop local plugin usage, copy these files to `~/.config/opencode/plugins/`:
232
-
233
- ```
234
- cp src/index.js ~/.config/opencode/plugins/vibeOS.js
235
- cp src/vibeOS-lib/flow-enforcer.js ~/.config/opencode/plugins/vibeOS-lib/flow-enforcer.js
236
- cp src/vibeOS-lib/session-metrics.js ~/.config/opencode/plugins/vibeOS-lib/session-metrics.js
237
- cp src/vibeOS-lib/flow-rules.json ~/.config/opencode/plugins/vibeOS-lib/flow-rules.json
238
- cp src/utils/cost-formatter.js ~/.config/opencode/plugins/vibeOS-lib/cost-formatter.js
239
- cp src/utils/math.js ~/.config/opencode/plugins/vibeOS-lib/math.js
240
- cp src/utils/timer.js ~/.config/opencode/plugins/vibeOS-lib/timer.js
241
- ```
242
-
243
- Then register the plugin in `~/.config/opencode/opencode.json`:
244
-
245
- ```json
246
- "plugins": [
247
- { "id": "vibeOS", "path": "~/.config/opencode/plugins/vibeOS.js" }
248
- ]
123
+ claude mcp add context7 npx @upstash/context7-mcp
249
124
  ```
250
125
 
251
- Restart OpenCode Desktop. The plugin auto-creates `~/.claude/model-tiers.json` on first run.
126
+ ### How vibeOS uses context7
252
127
 
253
- ## Web Dashboard
128
+ - **Auto-detection** — At module load, vibeOS scans `~/.claude/settings.json`, `~/.claude.json`, `opencode.json`, and `~/.config/opencode/` for a `context7` reference. No manual config needed.
129
+ - **System prompt injection** — When context7 is detected, a cost-policy directive is injected into every system prompt instructing the model to prefer `mcp__context7__resolve-library-id` and `mcp__context7__get-library-docs` over WebFetch/WebSearch for documentation URLs.
130
+ - **Urgency levels** — Controlled by the blackbox engine:
131
+ - `required` (strict/TDD-strict mode) — context7 is mandatory this turn.
132
+ - `preferred` (default) — context7 is encouraged but not forced.
133
+ - `optional` (relaxed mode) — context7 is a nice-to-have.
134
+ - **Docs nudge** — If context7 is not installed and the model uses WebFetch on a documentation URL (docs.*, readthedocs, MDN, npmjs, pypi, crates.io, pkg.go.dev, etc.), vibeOS logs a one-time install suggestion and tracks the missed savings.
135
+ - **Savings tracking** — Every docs URL fetched via WebFetch instead of context7 is recorded as `missed_context7_usd` in `~/.claude/delegation-state.json`. Accumulated misses appear in `trinity project` analytics with an installation suggestion when bypasses exceed 3.
254
136
 
255
- Open `http://127.0.0.1:3333` in your browser after starting the server.
137
+ ### Force-enable detection
256
138
 
257
139
  ```bash
258
- npm run build:dashboard # Build the SPA (one-time)
259
- npm run dashboard # Start standalone server on :3333
260
- npm run dev:dashboard # Vite dev server on :5173 with hot-reload
140
+ export CLAUDE_CONTEXT7_AVAILABLE=true
261
141
  ```
262
142
 
263
- Features: model split, savings, sessions, stress gauge, trinity controls, reports, blackbox state. SSE push updates every 1.5s.
143
+ Use this when context7 is configured but the auto-scan misses it (unusual paths, remote configs, or runtime-loaded MCP definitions).
264
144
 
265
- ## Build
145
+ ## Environment Variables
266
146
 
267
- - `npm run build`
268
- - `npm run build:dashboard` (build the web dashboard SPA)
147
+ | Variable | Default | Description |
148
+ |---|---|---|
149
+ | `VIBEOS_API_URL` | `https://api.vibetheog.com` | API server URL |
150
+ | `VIBEOS_API_TOKEN` | — | **API token (password). Protect like a credential.** Required for remote mode. If compromised, rotate immediately via seat suspension. |
151
+ | `VIBEOS_API_ENABLED` | `true` | Set to `false` for local-only mode |
152
+ | `CLAUDE_CREDIT_PERCENT` | `100` | Credit percentage override |
153
+ | `CLAUDE_CONTEXT7_AVAILABLE` | — | Enable context7 cost optimization |
154
+ | `CLAUDE_SCRATCHPAD_MAX_AGE_SEC` | `86400` | Scratchpad cache lifetime |
155
+ | `VIBEOS_MCP_PORT` | `3001` | MCP server port |
269
156
 
270
- `npm run build` compiles TypeScript source-of-truth modules and syncs generated JS artifacts used by runtime.
157
+ Without an API token, the plugin runs in local-only mode with all algorithms bundled locally.
271
158
 
272
- ## CI/CD
273
-
274
- GitHub Actions workflows are in `.github/workflows/`:
159
+ ## Runtime Model Slots
275
160
 
276
- - **CI** (`.github/workflows/ci.yml`): Runs on every push/PR to `main`/`master`. Executes typecheck, syntax check, test suite, TypeScript audit, and build validation.
161
+ Tier configuration in `~/.claude/model-tiers.json`:
277
162
 
278
- - **Release** (`.github/workflows/release.yml`): Manual trigger via GitHub Actions UI (`workflow_dispatch`). Prompts for version bump type (patch/minor/major), then runs tests, builds, and executes `scripts/release.mjs --yes --ci` which bumps version, updates changelog, commits/tags/pushes, creates a GitHub Release, and publishes to npm.
163
+ | Slot | Purpose |
164
+ |---|---|
165
+ | `brain` | High-tier model for orchestration |
166
+ | `medium` | Mid-tier for moderate tasks |
167
+ | `cheap` | Low-tier for delegation subagents |
279
168
 
280
- Before using the release workflow, add an `NPM_TOKEN` secret to the repository with an npm automation token that has publish permissions for the `vibeOS` package.
169
+ Use `trinity set brain|medium|cheap` or `trinity rebuild` to configure.
281
170
 
282
171
  ## Known Limitations
283
172
 
284
- - OpenCode runtime behavior can vary by version for per-task model override handling.
285
- - Some legacy tests in this repo are older than current enforcement defaults and may fail due to changed policy semantics rather than runtime breakage.
286
- - Savings are estimates, not billing data.
173
+ - OpenCode runtime behavior can vary by version.
174
+ - Some test suite tests may fail due to policy semantic changes rather than actual breakage.
175
+ - Savings displayed are estimates, not billing data.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeostheog",
3
- "version": "0.15.23",
3
+ "version": "0.16.0",
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",