opencode-usage-coach 0.10.0 → 0.10.1

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/README.md CHANGED
@@ -49,6 +49,18 @@ For local dev without npm: `bun install && bun run build`, then point both confi
49
49
 
50
50
  Four config surfaces; only the first two (install config + codexbar) are required to run. The **harness config** (`harness.config.json`) maps roles to models so per-model quota is tracked — set `generator` (required) and optionally `grader`, `lighterModel`, and `provider`. Thresholds and tuning live in env vars (`UC_STOP_5H`, `UC_THROTTLE_5H`, …).
51
51
 
52
+ ### Changing models at runtime
53
+
54
+ Type `/coach-config` in the TUI to view or update harness models interactively. The AI calls the `coach_config` tool, which reads/writes `harness.config.json` with merge semantics — no manual JSON editing required:
55
+
56
+ ```
57
+ /coach-config # view current config
58
+ "change generator to anthropic/claude-sonnet-4-20250514"
59
+ "set grader and lighterModel to opencode/mimo-v2.5-free"
60
+ ```
61
+
62
+ Changes take effect immediately for new `generate` / `grade` calls.
63
+
52
64
  See **[docs/configuration.md](docs/configuration.md)** for the full reference (env var table, harness config fields, agent-mode scoping, local dev setup).
53
65
 
54
66
  ## Harness Loop
package/dist/index.js CHANGED
@@ -1264,6 +1264,7 @@ function isHarnessAgent(agent) {
1264
1264
  }
1265
1265
  var LOADING = { decision: "GO", advice: "quota loading\u2026", weekly: -1, monthly: -1, fiveHour: -1 };
1266
1266
  async function UsageCoachPlugin(input) {
1267
+ pipeLog(`UsageCoachPlugin CALLED | dir=${input.directory} | worktree=${input.worktree}`);
1267
1268
  try {
1268
1269
  setStateDir(input.directory);
1269
1270
  initDomain(STATE_DIR);
@@ -2218,6 +2219,7 @@ Note: Changes take effect immediately for new generate/grade calls.`,
2218
2219
  }
2219
2220
  };
2220
2221
  } catch (e) {
2222
+ pipeLog(`PLUGIN INIT FAILED (no-op): ${String(e)}`);
2221
2223
  log(`PLUGIN INIT FAILED (no-op): ${String(e)}`);
2222
2224
  return NOOP_HOOKS;
2223
2225
  }
@@ -2245,6 +2247,7 @@ export {
2245
2247
  readHarness,
2246
2248
  readHarnessCfg,
2247
2249
  readRules,
2250
+ UsageCoachPlugin as server,
2248
2251
  setStateDir,
2249
2252
  updateSubSession,
2250
2253
  writeHarness,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-usage-coach",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "opencode closed-loop usage coach — quota SENSE -> coaching DECIDE -> loop ACT + TUI integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",