opencode-agent-harness 0.3.15 → 0.3.16
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,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.16 — 2026-11-21
|
|
4
|
+
|
|
5
|
+
- A harness-provisioned repo now shows its deployed harness version as a
|
|
6
|
+
constant TUI badge (`harness v0.3.16`): in the home footer beside opencode's
|
|
7
|
+
own version, and in the session prompt footer beside the model indicator. It
|
|
8
|
+
reads the version from `.harness.json`, so it tracks `agent-harness update`,
|
|
9
|
+
and renders nothing in repos that are not harness-provisioned. (F-012)
|
|
10
|
+
|
|
3
11
|
## 0.3.15 — 2026-11-21
|
|
4
12
|
|
|
5
13
|
- The Release workflow pins npm 11 instead of `npm@latest`: npm 12 changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-agent-harness",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"description": "Reusable multi-agent harness for OpenCode: personas, skills, operating rules, model routing, and QA gates. Deploy into any project with `npx opencode-agent-harness init`.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agent-harness": "bin/agent-harness.js"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"prepublishOnly": "npm run lint && npm test && npm run test:pack",
|
|
30
30
|
"test:pack": "node --test tests/pack.e2e.js",
|
|
31
|
-
"test": "node --test tests/agent-harness.test.js tests/plugin-loader.e2e.js tests/ci-usage.test.js tests/ci-triage.test.js tests/init-safety.test.js tests/release-bundle.e2e.js tests/worktree-hygiene.test.js",
|
|
31
|
+
"test": "node --test tests/agent-harness.test.js tests/plugin-loader.e2e.js tests/harness-version-badge.test.js tests/ci-usage.test.js tests/ci-triage.test.js tests/init-safety.test.js tests/release-bundle.e2e.js tests/worktree-hygiene.test.js",
|
|
32
32
|
"bundle": "node tools/make-release-bundle.mjs",
|
|
33
33
|
"test:plugin-loader": "node --test tests/plugin-loader.e2e.js",
|
|
34
34
|
"lint": "node --check bin/agent-harness.js && node --check templates/scripts/backlog.js && node --check templates/scripts/nightly.js && node --check templates/scripts/ship.js && node --check templates/scripts/finalize.js && node --check templates/scripts/checkpoint.js && node --check templates/scripts/orient.js && node --check templates/scripts/wait-for.js && node --check templates/scripts/agent-report.js && node --check templates/scripts/serve.js && node --check templates/scripts/qa/check-dispatch-config.js && node --check templates/scripts/qa/governance.js && node --check templates/scripts/qa/check-qa-plan.js && node --check templates/scripts/qa/check-qa-scripts.js && node --check templates/scripts/qa/check-backlog.js && node --check templates/scripts/qa/board-lib.js && node --check templates/scripts/qa/board-sync.js && node --check templates/scripts/qa/board-client.js && node --check templates/scripts/qa/tool-lib.js && node --check templates/scripts/qa/lease-lib.js && node --check templates/scripts/qa/ci-wait-lib.js && node --check templates/scripts/qa/ci-triage.js && node --check templates/scripts/qa/check-ci-policy.js && node --check templates/scripts/qa/check-quality.js && node --check templates/scripts/qa/check-product.js && node --check templates/scripts/qa/check-docs.js && node --check templates/scripts/qa/check-concurrency.js && node --check templates/scripts/qa/check-integrate.js && node --check templates/scripts/qa/merge-backlog.js && node --check templates/scripts/qa/run-clean.js && node --check templates/scripts/qa/check-test-wiring.js && node --check templates/scripts/qa/check-linger.js && node --check templates/scripts/qa/check-prefix-stability.js && node --check templates/scripts/qa/command-classifier.js && node --check templates/scripts/qa/capacity-lib.js && node --check templates/scripts/qa/check-capacity.js && node --check templates/scripts/qa/wslconfig-merge.js && node --check templates/scripts/qa/hash-file.js && node --check templates/scripts/qa/context-guard-core.js && node --check templates/scripts/qa/run-loop.js && node --check templates/scripts/qa/provider-stats.js && node --check templates/scripts/qa/store-lib.js && node --check templates/scripts/qa/diff.js && node --check templates/scripts/qa/session-recon.js && node --check templates/scripts/qa/run-gates.js && node --check templates/scripts/qa/where.js && node --check templates/scripts/qa/feature-scaffold.js && node --check templates/scripts/qa/mobile-e2e/run-maestro.js && node --check templates/scripts/qa/mobile-e2e/job-events.js && node --check templates/scripts/qa/mobile-e2e/check-flows.js && node --check templates/scripts/qa/mobile-e2e/apk-cache.js && node --check templates/scripts/qa/mobile-e2e/backend-build-cache.js && node --check templates/scripts/qa/mobile-e2e/ui-dump.js && node --check templates/scripts/qa/mobile-e2e/analyze-timings.js && node --check templates/scripts/qa/ci-usage-lib.js && node --check tests/ci-usage.test.js && node --check tools/make-release-bundle.mjs",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// The directory plugin's server entrypoint: a no-op. The badge lives in
|
|
2
|
+
// `tui.tsx`, which opencode's CLI loads beside this entry. Keeping an explicit
|
|
3
|
+
// server entrypoint makes the directory discoverable by the plugin loader.
|
|
4
|
+
export default {
|
|
5
|
+
id: "harness-version-server",
|
|
6
|
+
setup() {},
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Plugin } from "@opencode/plugin/tui"
|
|
2
|
+
import { readHarnessVersion } from "./version.mjs"
|
|
3
|
+
|
|
4
|
+
// A constant "harness vX.Y.Z" badge in the two footer rows that already carry
|
|
5
|
+
// version/model indicators:
|
|
6
|
+
// * home.footer.status — after opencode's health indicators, before its own
|
|
7
|
+
// version, so the two read side by side;
|
|
8
|
+
// * prompt.footer.status — the session composer footer, beside the model.
|
|
9
|
+
// The version comes from the checkout's `.harness.json`, so it tracks what
|
|
10
|
+
// `agent-harness update` deployed. A repo without that file gets no badge.
|
|
11
|
+
export default Plugin.define({
|
|
12
|
+
id: "harness-version-badge",
|
|
13
|
+
setup(context) {
|
|
14
|
+
// `context.location` is set in a session; on the home screen fall back to
|
|
15
|
+
// the active location so the badge also sits beside opencode's version.
|
|
16
|
+
let directory = context.location?.directory
|
|
17
|
+
if (!directory) {
|
|
18
|
+
try {
|
|
19
|
+
directory = context.data.location.default()?.directory
|
|
20
|
+
} catch {
|
|
21
|
+
directory = undefined
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const version = readHarnessVersion(directory)
|
|
25
|
+
if (!version) return
|
|
26
|
+
|
|
27
|
+
const badge = () => <text fg={context.theme.text.muted}>harness v{version}</text>
|
|
28
|
+
const home = context.ui.slot({ append: "home.footer.status", render: badge })
|
|
29
|
+
const prompt = context.ui.slot({ append: "prompt.footer.status", render: badge })
|
|
30
|
+
|
|
31
|
+
return () => {
|
|
32
|
+
if (typeof home === "function") home()
|
|
33
|
+
if (typeof prompt === "function") prompt()
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import fs from "node:fs"
|
|
2
|
+
import path from "node:path"
|
|
3
|
+
|
|
4
|
+
// Read the harness version a repo was deployed with. `.harness.json` is written
|
|
5
|
+
// by `agent-harness init`/`update`; it is the source of truth for the badge
|
|
6
|
+
// (package.json in a project belongs to the project, not the harness).
|
|
7
|
+
//
|
|
8
|
+
// Never throws: a missing, unreadable, malformed, or version-less file means
|
|
9
|
+
// "this is not a harness-provisioned checkout", and the badge renders nothing.
|
|
10
|
+
export function readHarnessVersion(directory) {
|
|
11
|
+
if (typeof directory !== "string" || directory.length === 0) return null
|
|
12
|
+
try {
|
|
13
|
+
const raw = fs.readFileSync(path.join(directory, ".harness.json"), "utf8")
|
|
14
|
+
const version = JSON.parse(raw)?.version
|
|
15
|
+
return typeof version === "string" && version.trim().length > 0 ? version.trim() : null
|
|
16
|
+
} catch {
|
|
17
|
+
return null
|
|
18
|
+
}
|
|
19
|
+
}
|