@dombaras/agent-harness 0.1.8 → 0.1.9

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
@@ -98,6 +98,14 @@ warns but does not block; the guarantee only applies to registered flows.
98
98
  - `npm run test:dispatch` mechanically verifies model pins against
99
99
  `scripts/qa/models.allowlist.txt` and that `model-routing.md` does not name a
100
100
  stale model no longer pinned anywhere (doc↔config drift).
101
+ - **`/switch-model` command** — every deploy ships an opencode command
102
+ (`.opencode/command/switch-model.md`) plus `scripts/switch-reasoning-model.ps1`
103
+ that rewrites the main `opencode.json` `model` and the six reasoning-tier
104
+ agents (planner, system-architect, security-engineer, diagnostics-expert,
105
+ product-manager, qa-architect) in one step. Aliases: `deepseek`/`direct` →
106
+ `deepseek/deepseek-v4-pro` (default, direct API key), `zen`/`opencode` →
107
+ `opencode/deepseek-v4-pro` (gateway), `pickle` → `opencode/big-pickle`, or any
108
+ explicit `provider/model`. Restart opencode after switching (config reads once).
101
109
 
102
110
  ## QA gates
103
111
 
@@ -473,7 +473,9 @@ function printSummary(result, isUpdate) {
473
473
 
474
474
  /* Best-effort warning: when this CLI's version is not the latest published on
475
475
  * the registry, flag it. This catches the "bumped + ran update from a local
476
- * checkout, but never published" silent gap. */
476
+ * checkout, but never published" silent gap. Publish guidance stays inline so a
477
+ * failed `npm publish` (401/404 auth/permission) never leaves the developer
478
+ * staring at a raw npm error — it points them at `npm login`. */
477
479
  function printUnpublishedWarning() {
478
480
  const published = publishedLatestVersion();
479
481
  if (published == null || published === "" || published === PKG.version) return;
@@ -485,6 +487,12 @@ function printUnpublishedWarning() {
485
487
  `NOT published — Publish first, then \`update\` other projects, or they will ` +
486
488
  `branch off an older harness.`
487
489
  );
490
+ console.log(
491
+ ` To publish: run \`npm publish\` from the harness repo. If it fails with ` +
492
+ `E401/E404 (auth or permission), you are not logged in as the package owner ` +
493
+ `(\`npm owner ls ${PKG.name}\` shows who owns it) — run \`npm login\` first, ` +
494
+ `then publish again. Login: https://www.npmjs.com/login`
495
+ );
488
496
  }
489
497
 
490
498
  function printNextSteps() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dombaras/agent-harness",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Reusable multi-agent harness for AI-assisted development: personas, skills, operating rules, model routing, and QA gates. Deploy into any project with `npx @dombaras/agent-harness init`.",
5
5
  "bin": {
6
6
  "agent-harness": "bin/agent-harness.js"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Use when debugging errors, performance regressions, or API anomalies — log-first investigation, ExternalServiceLog, cold-start profiling, authentic reproduction.
3
3
  mode: subagent
4
- model: opencode/deepseek-v4-pro
4
+ model: deepseek/deepseek-v4-pro
5
5
  temperature: 0.1
6
6
  steps: 30
7
7
  permission:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Use to plan/decompose a task and emit the Step Zero subagent dispatch plan (personas, models, order, parallel batches) before any file is touched.
3
3
  mode: subagent
4
- model: opencode/deepseek-v4-pro
4
+ model: deepseek/deepseek-v4-pro
5
5
  temperature: 0.1
6
6
  steps: 15
7
7
  hidden: true
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Use when designing features, gamification, or user journeys — maps DB logic to UX with the 5 UI states.
3
3
  mode: subagent
4
- model: opencode/deepseek-v4-pro
4
+ model: deepseek/deepseek-v4-pro
5
5
  steps: 20
6
6
  permission:
7
7
  edit: deny
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Use to design the QA plan for a change — inspects the diff, assesses risk, selects the minimal tier, and authors progression tests (thinker only; does not run suites).
3
3
  mode: subagent
4
- model: opencode/deepseek-v4-pro
4
+ model: deepseek/deepseek-v4-pro
5
5
  temperature: 0.1
6
6
  steps: 20
7
7
  permission:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Use when a change touches auth, secrets, input validation, external services, or dependencies — security review + audit.
3
3
  mode: subagent
4
- model: opencode/deepseek-v4-pro
4
+ model: deepseek/deepseek-v4-pro
5
5
  steps: 30
6
6
  permission:
7
7
  edit:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Use when changing the Prisma schema, data model, multi-tenant boundaries, privacy tiers, or sync protocol.
3
3
  mode: subagent
4
- model: opencode/deepseek-v4-pro
4
+ model: deepseek/deepseek-v4-pro
5
5
  steps: 40
6
6
  permission:
7
7
  edit:
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Switch the reasoning-tier model (default deepseek/deepseek-v4-pro direct).
3
+ ---
4
+
5
+ Change the reasoning-tier model to `$ARGUMENTS`.
6
+
7
+ Valid values:
8
+ - `deepseek` / `direct` (default) -> `deepseek/deepseek-v4-pro` (direct API key)
9
+ - `zen` / `opencode` -> `opencode/deepseek-v4-pro` (Zen gateway)
10
+ - `pickle` / `big-pickle` -> `opencode/big-pickle`
11
+ - any other explicit model id (e.g. `opencode/gpt-5.6-luna`)
12
+
13
+ Run:
14
+
15
+ ```
16
+ powershell -ExecutionPolicy Bypass -File scripts/switch-reasoning-model.ps1 -Target $ARGUMENTS
17
+ ```
18
+
19
+ This rewrites the `model` field in `opencode.json` and the `model:` frontmatter
20
+ of the six reasoning-tier agents (planner, system-architect, security-engineer,
21
+ diagnostics-expert, product-manager, qa-architect).
22
+
23
+ Report the old model -> new model delta, and remind the user that opencode
24
+ does not hot-reload config, so they must quit and restart for it to take
25
+ effect.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://opencode.ai/config.json",
3
- "model": "opencode/deepseek-v4-pro",
3
+ "model": "deepseek/deepseek-v4-pro",
4
4
  "small_model": "opencode/gpt-5-nano",
5
5
  "instructions": [".agents/rules/00-operating.md"]
6
6
  }
@@ -0,0 +1,70 @@
1
+ param(
2
+ [Parameter(Mandatory = $true)][string]$Target
3
+ )
4
+
5
+ $ErrorActionPreference = "Stop"
6
+
7
+ $root = Split-Path -Parent $PSScriptRoot
8
+
9
+ $aliases = @{
10
+ "deepseek" = "deepseek/deepseek-v4-pro"
11
+ "deepseek-v4-pro" = "deepseek/deepseek-v4-pro"
12
+ "direct" = "deepseek/deepseek-v4-pro"
13
+ "zen" = "opencode/deepseek-v4-pro"
14
+ "opencode" = "opencode/deepseek-v4-pro"
15
+ "big-pickle" = "opencode/big-pickle"
16
+ "pickle" = "opencode/big-pickle"
17
+ "bigpickle" = "opencode/big-pickle"
18
+ }
19
+
20
+ $targetModel = $Target
21
+ if ($aliases.ContainsKey($Target.ToLowerInvariant())) {
22
+ $targetModel = $aliases[$Target.ToLowerInvariant()]
23
+ }
24
+ elseif (-not ($targetModel -match "^[a-zA-Z0-9._-]+/")) {
25
+ $targetModel = "deepseek/$targetModel"
26
+ }
27
+
28
+ $reasoningModels = @(
29
+ "deepseek/deepseek-v4-pro",
30
+ "opencode/deepseek-v4-pro",
31
+ "opencode/big-pickle"
32
+ )
33
+
34
+ $files = @(
35
+ "opencode.json",
36
+ ".opencode/agents/planner.md",
37
+ ".opencode/agents/system-architect.md",
38
+ ".opencode/agents/security-engineer.md",
39
+ ".opencode/agents/diagnostics-expert.md",
40
+ ".opencode/agents/product-manager.md",
41
+ ".opencode/agents/qa-architect.md"
42
+ )
43
+
44
+ $changed = @()
45
+ foreach ($rel in $files) {
46
+ $path = Join-Path $root $rel
47
+ if (-not (Test-Path -LiteralPath $path)) {
48
+ Write-Warning "missing: $rel"
49
+ continue
50
+ }
51
+ $content = Get-Content -LiteralPath $path -Raw
52
+ $new = $content
53
+ foreach ($m in $reasoningModels) {
54
+ $new = $new -replace [regex]::Escape($m), $targetModel
55
+ }
56
+ if ($new -ne $content) {
57
+ Set-Content -LiteralPath $path -Value $new -NoNewline
58
+ $changed += $rel
59
+ }
60
+ }
61
+
62
+ Write-Output ("Switched reasoning-tier model -> {0}" -f $targetModel)
63
+ if ($changed.Count -gt 0) {
64
+ Write-Output "Updated:"
65
+ $changed | ForEach-Object { Write-Output " - $_" }
66
+ }
67
+ else {
68
+ Write-Output "No files changed (already set)."
69
+ }
70
+ Write-Output "Restart opencode for the change to take effect."