harness-everything 0.57.2 → 0.57.3

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.
@@ -10,7 +10,7 @@
10
10
  "name": "harness-everything",
11
11
  "source": "./",
12
12
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
13
- "version": "0.57.2",
13
+ "version": "0.57.3",
14
14
  "author": {
15
15
  "name": "Miya Daniel"
16
16
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-everything",
3
3
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
4
- "version": "0.57.2",
4
+ "version": "0.57.3",
5
5
  "author": {
6
6
  "name": "Miya Daniel"
7
7
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.57.3](https://github.com/dyphn1/Harness-everything/compare/v0.57.2...v0.57.3) (2026-11-22)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **opencode:** deliver ledger lessons for the live v2 shell tool ([d74ca22](https://github.com/dyphn1/Harness-everything/commit/d74ca22021ccb41b6877d6eaa6673f6af61cfe65)), closes [#509](https://github.com/dyphn1/Harness-everything/issues/509)
10
+
5
11
  ## [0.57.2](https://github.com/dyphn1/Harness-everything/compare/v0.57.1...v0.57.2) (2026-11-22)
6
12
 
7
13
  ### Bug Fixes
@@ -184,6 +190,8 @@ All notable changes to this project are documented in this file.
184
190
 
185
191
  ## [Unreleased]
186
192
 
193
+ - OpenCode V2: accept the live `shell` tool name alongside `bash` for ledger lesson injection and turn observations, with live-shape mechanism rows (#509).
194
+
187
195
  - Error-ledger lesson injection (#394): ledger records gain optional `match` rules; a shared matcher carries matched Cue/Lesson text into Claude Code, Codex and OpenCode V2 context at a `git commit` action and its commitlint failure (mechanism evidence; OpenCode V1 delivery unchecked). ROUTE-001 is superseded.
188
196
 
189
197
  - Retired the Rule-of-3 failure-count breaker on Claude Code, Codex and OpenCode (#394). Hooks no longer count same-signature failures, block tools, demand a reflection report or offer `harness:reset`; legacy breaker state is ignored. Zoom-out is agent-initiated: an agent may reassess on a first meaningful failure and may keep iterating while attempts produce new evidence. Error-ledger lesson injection remains planned under #394.
@@ -156,6 +156,8 @@ test('OpenCode V2 carries real ledger matches through the source and packaged co
156
156
  same: workspace,
157
157
  other: workspace,
158
158
  separateWorkspace: otherWorkspace,
159
+ shellAction: workspace,
160
+ shellFailure: workspace,
159
161
  noLedger: emptyWorkspace,
160
162
  masked: workspace,
161
163
  unknownExit: workspace,
@@ -211,6 +213,38 @@ test('OpenCode V2 carries real ledger matches through the source and packaged co
211
213
  assert.equal((await context(harness, 'separateWorkspace')).match(/Cue:\n/g)?.length, 2,
212
214
  'a completed tool result with nonzero metadata.exit and captured diagnostics selects failure too');
213
215
 
216
+ // Live OpenCode 2.1.4 shape (E-0006/E-0008): tool "shell", input carries workdir,
217
+ // after-result carries metadata.exit and commitlint output.
218
+ const shellCommand = 'git -C x commit -m "docs(errors): Bad Case"';
219
+ const shellBase = { tool: 'shell', agent: 'build', messageID: 'message-shell', input: { command: shellCommand, workdir: workspace } };
220
+
221
+ const shellActionEvent = { ...shellBase, sessionID: 'shellAction', id: 'shell-action' };
222
+ const shellActionSnapshot = structuredClone(shellActionEvent);
223
+ assert.equal(await harness.toolHooks.get('execute.before')(shellActionEvent), undefined);
224
+ assert.deepEqual(shellActionEvent, shellActionSnapshot, 'execute.before does not change a live shell tool request');
225
+ assert.equal((await context(harness, 'shellAction')).match(/Cue:\n/g)?.length, 1,
226
+ 'a live shell action event delivers the action lesson');
227
+
228
+ const shellFailureBefore = { ...shellBase, sessionID: 'shellFailure', id: 'shell-failure-before' };
229
+ assert.equal(await harness.toolHooks.get('execute.before')(shellFailureBefore), undefined);
230
+ const shellFailureAfter = {
231
+ ...shellFailureBefore,
232
+ id: 'shell-failure-after',
233
+ status: 'completed',
234
+ result: {
235
+ output: { exit: 1, truncated: false, output: COMMITLINT, status: 'completed' },
236
+ content: [{ type: 'text', text: COMMITLINT }],
237
+ metadata: { status: 'completed', truncated: false, exit: 1 },
238
+ },
239
+ };
240
+ const shellFailureSnapshot = structuredClone(shellFailureAfter);
241
+ assert.equal(await harness.toolHooks.get('execute.after')(shellFailureAfter), undefined);
242
+ assert.deepEqual(shellFailureAfter, shellFailureSnapshot, 'execute.after does not change a live shell tool result');
243
+ const shellDelivered = await context(harness, 'shellFailure');
244
+ assert.equal((shellDelivered.match(/Cue:\n/g) || []).length, 2,
245
+ 'live shell action and failure events deliver both lessons');
246
+ assert.match(shellDelivered, /subject-case/, 'the failure lesson carries the commitlint diagnostic');
247
+
214
248
  await toolCall(harness, 'noLedger', 'no-ledger-action');
215
249
  assert.equal(await context(harness, 'noLedger'), 'base system', 'an unrelated workspace without a ledger is silent');
216
250
 
@@ -211,7 +211,7 @@ function observeOpenCodeTool(event, workspace) {
211
211
  const observations = systemOneObservations()
212
212
  if (!observations || !observations.enabled() || !event?.sessionID) return
213
213
  const args = isRecord(event.input) ? event.input : {}
214
- const names = { edit: "Edit", write: "Write", apply_patch: "apply_patch", bash: "shell", skill: "Skill", read: "Read", task: "Task" }
214
+ const names = { edit: "Edit", write: "Write", apply_patch: "apply_patch", bash: "shell", shell: "shell", skill: "Skill", read: "Read", task: "Task" }
215
215
  const toolInput = {
216
216
  ...args,
217
217
  file_path: args.filePath || args.file_path || args.path,
@@ -1259,7 +1259,7 @@ export default {
1259
1259
  const binding = await bindingForSession(event?.sessionID)
1260
1260
  if (events.signal.aborted || !binding?.workspace) return
1261
1261
  retryLedgerReleases()
1262
- if (event.tool === "bash" && typeof event.input?.command === "string") {
1262
+ if ((event.tool === "bash" || event.tool === "shell") && typeof event.input?.command === "string") {
1263
1263
  queueLedgerLesson(pendingLedgerLessons, binding.workspace, event.sessionID, {
1264
1264
  phase: "action", tool: "shell", command: event.input.command, outcome: { failed: "unknown" },
1265
1265
  })
@@ -1283,9 +1283,10 @@ export default {
1283
1283
  const resultExit = event.status === "completed" && Number.isFinite(event.result?.metadata?.exit)
1284
1284
  ? event.result.metadata.exit : null
1285
1285
  const resultFailed = resultExit !== null && resultExit !== 0
1286
- const resultOutput = typeof event.result?.output === "string" ? event.result.output : undefined
1286
+ const resultOutput = typeof event.result?.output === "string" ? event.result.output
1287
+ : typeof event.result?.output?.output === "string" ? event.result.output.output : undefined
1287
1288
  const failureOutput = errorOutput ?? resultOutput
1288
- if (event.tool === "bash" && failureOutput !== undefined && typeof event.input?.command === "string") {
1289
+ if ((event.tool === "bash" || event.tool === "shell") && failureOutput !== undefined && typeof event.input?.command === "string") {
1289
1290
  queueLedgerLesson(pendingLedgerLessons, binding.workspace, event.sessionID, {
1290
1291
  phase: "failure", tool: "shell", command: event.input.command,
1291
1292
  outcome: { failed: event.status === "error" || resultFailed ? true : resultExit === null ? "unknown" : false,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-enforcement",
3
3
  "description": "Repository inventory for the opencode enforcement plugin and its standalone helper",
4
- "version": "0.57.2",
4
+ "version": "0.57.3",
5
5
  "runtime": "index.mjs",
6
6
  "hooks": {
7
7
  "verify": "hooks/verify.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.57.2",
3
+ "version": "0.57.3",
4
4
  "description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
5
5
  "main": "harness-everything/scripts/bootstrap.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.57.2",
3
+ "version": "0.57.3",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "harness-everything",
4
- "version": "0.57.2",
4
+ "version": "0.57.3",
5
5
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
6
6
  "author": {
7
7
  "name": "Miya Daniel",
package/sbom.cdx.json CHANGED
@@ -2,23 +2,23 @@
2
2
  "$schema": "https://cyclonedx.org/schema/bom-1.7.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.7",
5
- "serialNumber": "urn:uuid:2f7a7614-ee66-5c86-af90-b40f26ceb805",
5
+ "serialNumber": "urn:uuid:cadf10de-ed81-59f9-b32f-b78c544ccd16",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-11-22T09:17:44.283Z",
8
+ "timestamp": "2026-11-22T16:47:26.168Z",
9
9
  "tools": [
10
10
  {
11
11
  "vendor": "Harness Everything",
12
12
  "name": "generate-sbom.js",
13
- "version": "0.57.2"
13
+ "version": "0.57.3"
14
14
  }
15
15
  ],
16
16
  "component": {
17
17
  "type": "application",
18
- "bom-ref": "pkg:npm/harness-everything@0.57.2",
18
+ "bom-ref": "pkg:npm/harness-everything@0.57.3",
19
19
  "name": "harness-everything",
20
- "version": "0.57.2",
21
- "purl": "pkg:npm/harness-everything@0.57.2"
20
+ "version": "0.57.3",
21
+ "purl": "pkg:npm/harness-everything@0.57.3"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -2033,7 +2033,7 @@
2033
2033
  ]
2034
2034
  },
2035
2035
  {
2036
- "ref": "pkg:npm/harness-everything@0.57.2",
2036
+ "ref": "pkg:npm/harness-everything@0.57.3",
2037
2037
  "dependsOn": [
2038
2038
  "pkg:npm/%40commitlint/cli@19.8.1",
2039
2039
  "pkg:npm/%40commitlint/config-conventional@19.8.1",