opencode-immune 1.0.53 → 1.0.54

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/dist/plugin.js +10 -1
  2. package/package.json +1 -1
package/dist/plugin.js CHANGED
@@ -11,9 +11,17 @@ import { execFile } from "child_process";
11
11
  // ═══════════════════════════════════════════════════════════════════════════════
12
12
  // PLUGIN VERSION CHECK
13
13
  // ═══════════════════════════════════════════════════════════════════════════════
14
- const PLUGIN_VERSION = "1.0.53";
14
+ const PLUGIN_VERSION = "1.0.54";
15
15
  const PLUGIN_PACKAGE_NAME = "opencode-immune";
16
16
  const PLUGIN_DIRNAME = dirname(fileURLToPath(import.meta.url));
17
+ function getServerAuthHeaders() {
18
+ const password = process.env.OPENCODE_SERVER_PASSWORD;
19
+ if (!password)
20
+ return undefined;
21
+ return {
22
+ Authorization: `Basic ${Buffer.from(`opencode:${password}`).toString("base64")}`,
23
+ };
24
+ }
17
25
  /**
18
26
  * Read plugin version from package.json at runtime.
19
27
  * Falls back to PLUGIN_VERSION constant if read fails.
@@ -80,6 +88,7 @@ function createState(input) {
80
88
  client: createOpencodeClientV2({
81
89
  baseUrl: input.serverUrl.toString(),
82
90
  directory: input.directory,
91
+ headers: getServerAuthHeaders(),
83
92
  }),
84
93
  recoveryContext: null,
85
94
  managedUltraworkSessions: new Map(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-immune",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin: session recovery, auto-retry, multi-cycle automation, context monitoring",
6
6
  "exports": {