opencode-apex 0.5.0 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to `opencode-apex`. Format based on
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.5.1] — 2026-11-26
9
+
10
+ ### Fixed
11
+
12
+ - **Redaction froze OpenCode on long sessions.** The `k8s-secret-data-value` pattern (from
13
+ warden) had an unbounded, ambiguous lookbehind (`\s+` crossing lines, unlimited repetition):
14
+ one pass over a ~500 KB context took ~80 s of CPU in Bun/JSC. Since the `context` hook
15
+ re-redacts the whole history on every request, the server stopped answering `/health`, the
16
+ desktop app killed it, and the busy session resumed into the same freeze on every restart.
17
+ The lookbehind is now bounded (`[ \t]` indentation, up to 16 keys between `data:` and the
18
+ value, lines up to 512 chars): ~80 ms on the same text. It also matches keys with `.` and `-`.
19
+
8
20
  ## [0.5.0] — 2026-11-25
9
21
 
10
22
  ### Removed
package/core/patterns.ts CHANGED
@@ -296,7 +296,10 @@ const BUNDLES: Record<string, PatternDefinition[]> = {
296
296
 
297
297
  // ------------------------------------------------------------ Kubernetes
298
298
  kubernetes: [
299
- { name: "k8s-secret-data-value", regex: /(?<=data:\s*\n(?:\s+\w+:\s*[^\n]*\n)*\s+\w+:\s*)[A-Za-z0-9+/=]{20,}/g, confidence: "medium", source: "warden" },
299
+ // Lookbehind acotado y sin ambigüedad (2026-11-26): el original de warden, con `\s+` que cruza
300
+ // líneas y repetición sin límite, costaba ~80 s sobre un contexto de 500 KB (JSC) y congelaba
301
+ // OpenCode. Ahora: sangría [ \t], hasta 16 claves entre `data:` y el valor, líneas ≤ 512.
302
+ { name: "k8s-secret-data-value", regex: /(?<=\bdata:[ \t]*(?:\r?\n[ \t]{1,16}[\w.-]{1,253}:[^\n]{0,512}){0,16}\r?\n[ \t]{1,16}[\w.-]{1,253}:[ \t]{0,8})[A-Za-z0-9+/=]{20,}/g, confidence: "medium", source: "warden" },
300
303
  { name: "kubeconfig-token", regex: /(?<=token:\s*)[A-Za-z0-9_.-]{20,}/g, confidence: "medium", source: "warden" },
301
304
  { name: "kubeconfig-client-key-data", regex: /(?<=client-key-data:\s*)[A-Za-z0-9+/=\n]{50,}/g, confidence: "high", source: "warden" },
302
305
  { name: "kubeconfig-client-cert-data", regex: /(?<=client-certificate-data:\s*)[A-Za-z0-9+/=\n]{50,}/g, confidence: "high", source: "warden" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-apex",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Modular plugin for OpenCode V2 (>= 2.1): secret redaction, RPC callbacks/webhooks/watchers that wake agents, OpenTunnel endpoints + verified webhooks (cross-platform daemon), tools.run, AI permission advisor, guard meta-permissions, temp-directory access",
5
5
  "license": "MIT",
6
6
  "author": "Antonio Orizondo Leyva",