@igorjpimenta/brayer-opencode 2026.10.29-beta.1 → 2026.11.3-beta.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.
Files changed (2) hide show
  1. package/identity.js +8 -2
  2. package/package.json +1 -1
package/identity.js CHANGED
@@ -1,3 +1,9 @@
1
+ // identity.js — opencode can mutate tool args but not request _meta, so the
2
+ // brayer server accepts a whole agent+session pair as brayer_agent/
3
+ // brayer_session args (src/identity.js, args channel). The hook overwrites
4
+ // both unconditionally: a model-supplied pair must never survive. The harness
5
+ // is not an argument — the MCP connection declares it via X-Brayer-Harness.
6
+
1
7
  export function isBrayerTool(name) {
2
8
  return typeof name === "string" && name.includes("brayer");
3
9
  }
@@ -5,7 +11,7 @@ export function isBrayerTool(name) {
5
11
  export function stampBrayerIdentity(input, output, { agent = null } = {}) {
6
12
  if (!isBrayerTool(input?.tool)) return false;
7
13
  output.args = output.args ?? {};
8
- if (!output.args.brayer_agent && agent) output.args.brayer_agent = agent;
9
- if (!output.args.brayer_session) output.args.brayer_session = input.sessionID;
14
+ if (agent) output.args.brayer_agent = agent;
15
+ if (input?.sessionID) output.args.brayer_session = input.sessionID;
10
16
  return true;
11
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igorjpimenta/brayer-opencode",
3
- "version": "2026.10.29-beta.1",
3
+ "version": "2026.11.3-beta.1",
4
4
  "description": "OpenCode companion for Brayer: stamps identity and runs the optional claim wake bridge.",
5
5
  "license": "MIT",
6
6
  "type": "module",