From ba49e2f3c4affb85aae54f3c9bfa9c99460b6a09 Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 02:53:25 -0500 Subject: [PATCH 1/9] fix: tolerate missing tools in V2 context hooks --- lib/v2/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/v2/index.ts b/lib/v2/index.ts index d1818b54..713ee0d1 100644 --- a/lib/v2/index.ts +++ b/lib/v2/index.ts @@ -178,10 +178,10 @@ export async function setup(ctx: Plugin.Context) { event.agent, ) if (state.isSubAgent && !config.experimental.allowSubAgents) { - delete event.tools.compress + delete event.tools?.compress return } - if (state.compressPermission === "deny") delete event.tools.compress + if (state.compressPermission === "deny") delete event.tools?.compress state.modelContextLimit = limits.get(`${event.model.providerID}/${event.model.id}`) state.systemPromptTokens = countTokens( event.system.map((part) => part.text).join("\n"), From 10a38cdf47a41fb16252c874e549da19084ef31c Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 02:55:10 -0500 Subject: [PATCH 2/9] fix: reuse one tokenizer instead of building one per count --- lib/token-utils.ts | 14 ++++++++++++-- tests/token-counting.test.ts | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/lib/token-utils.ts b/lib/token-utils.ts index bba07fa1..cc173b58 100644 --- a/lib/token-utils.ts +++ b/lib/token-utils.ts @@ -2,8 +2,18 @@ import { SessionState, WithParts } from "./state" import { AssistantMessage, UserMessage } from "@opencode-ai/sdk/v2" import { Logger } from "./logger" import * as _anthropicTokenizer from "@anthropic-ai/tokenizer" -const anthropicCountTokens = (_anthropicTokenizer.countTokens ?? - (_anthropicTokenizer as any).default?.countTokens) as typeof _anthropicTokenizer.countTokens +const getAnthropicTokenizer = (_anthropicTokenizer.getTokenizer ?? + (_anthropicTokenizer as any).default?.getTokenizer) as typeof _anthropicTokenizer.getTokenizer + +// The package's countTokens() builds a new tokenizer on every call, which is slow. +// Build one once and reuse it, encoding the same way countTokens() does. +let anthropicTokenizer: ReturnType | undefined +function anthropicCountTokens(text: string): number { + if (!anthropicTokenizer) { + anthropicTokenizer = getAnthropicTokenizer() + } + return anthropicTokenizer.encode(text.normalize("NFKC"), "all").length +} import { getLastUserMessage } from "./messages/query" export function getCurrentTokenUsage(state: SessionState, messages: WithParts[]): number { diff --git a/tests/token-counting.test.ts b/tests/token-counting.test.ts index 03e9439c..362d9af7 100644 --- a/tests/token-counting.test.ts +++ b/tests/token-counting.test.ts @@ -4,11 +4,13 @@ import type { WithParts } from "../lib/state" import { COMPACTED_TOOL_OUTPUT_PLACEHOLDER, countAllMessageTokens, + countTokens, countToolTokens, estimateTokensBatch, extractCompletedToolOutput, extractToolContent, } from "../lib/token-utils" +import * as anthropicTokenizer from "@anthropic-ai/tokenizer" function buildToolMessage(part: Record): WithParts { return { @@ -172,3 +174,22 @@ test("counting uses the compacted tool placeholder for completed outputs", () => assert.equal(extractCompletedToolOutput(part), COMPACTED_TOOL_OUTPUT_PLACEHOLDER) assertCounted(part, [JSON.stringify(input), COMPACTED_TOOL_OUTPUT_PLACEHOLDER]) }) + +test("countTokens matches the tokenizer package and stays fast across many calls", () => { + const samples = [ + "hello world", + "Crème brûlée, fi ligature and emoji 🚀", + JSON.stringify({ path: "src/index.ts", edits: [{ line: 1, text: "const x = 1" }] }), + "<|endoftext|> special tokens are counted", + ] + for (const sample of samples) { + assert.equal(countTokens(sample), anthropicTokenizer.countTokens(sample)) + } + + // Building a new tokenizer per call takes ~20 ms, so 200 calls took ~4.6 s. + const start = performance.now() + for (let i = 0; i < 200; i++) { + countTokens(`tool output ${i} `.repeat(50)) + } + assert.ok(performance.now() - start < 2000, "countTokens should reuse one tokenizer") +}) From 4d4ad1abcfdd3e1c3bf615844bbe100d5314897a Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 02:58:13 -0500 Subject: [PATCH 3/9] fix: stop stripping dcp-like text from tool outputs --- lib/messages/utils.ts | 8 -------- tests/message-priority.test.ts | 24 +++++++++++++++++++++++- tests/v2-ids.test.ts | 2 +- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/lib/messages/utils.ts b/lib/messages/utils.ts index 004de9a5..14f05cf6 100644 --- a/lib/messages/utils.ts +++ b/lib/messages/utils.ts @@ -183,14 +183,6 @@ export const stripHallucinations = (messages: WithParts[], format: IdFormat = "x if (part.type === "text" && typeof part.text === "string") { part.text = stripHallucinationsFromString(part.text, format) } - - if ( - part.type === "tool" && - part.state?.status === "completed" && - typeof part.state.output === "string" - ) { - part.state.output = stripHallucinationsFromString(part.state.output, format) - } } } } diff --git a/tests/message-priority.test.ts b/tests/message-priority.test.ts index d6105eae..84519092 100644 --- a/tests/message-priority.test.ts +++ b/tests/message-priority.test.ts @@ -8,7 +8,7 @@ import { injectMessageIds } from "../lib/messages/inject/inject" import { applyAnchoredNudges } from "../lib/messages/inject/utils" import { prune } from "../lib/messages/prune" import { buildPriorityMap } from "../lib/messages/priority" -import { stripHallucinationsFromString } from "../lib/messages/utils" +import { stripHallucinations, stripHallucinationsFromString } from "../lib/messages/utils" import { createSessionState, type WithParts } from "../lib/state" function buildConfig(mode: "message" | "range" = "message"): PluginConfig { @@ -845,6 +845,28 @@ test("hallucination stripping removes trailing mXXXX artifact (issue ) }) +test("hallucination stripping keeps dcp tags in tool output (issue #657)", () => { + const sessionID = "ses_tool_output_tags" + const output = "AAA\n\n\nHELLO-INSIDE\n\n\nZZZ" + const messages: WithParts[] = [ + buildMessage("msg-user-1", "user", sessionID, "cat /tmp/t.txt", 1), + { + info: { + id: "msg-assistant-1", + role: "assistant", + sessionID, + agent: "assistant", + time: { created: 2 }, + } as WithParts["info"], + parts: [toolPart("msg-assistant-1", sessionID, "call-1", "bash", output)], + }, + ] + + stripHallucinations(messages) + + assert.equal((messages[1]?.parts[0] as any).state.output, output) +}) + test("injectMessageIds skips empty assistant messages to avoid prefill (issue #463)", () => { const sessionID = "ses_empty_assistant" const messages: WithParts[] = [ diff --git a/tests/v2-ids.test.ts b/tests/v2-ids.test.ts index eb1b5a32..eac6dd71 100644 --- a/tests/v2-ids.test.ts +++ b/tests/v2-ids.test.ts @@ -126,7 +126,7 @@ test("V2 cleans echoed IDs and priorities before injecting correct protected/mes ] as WithParts["parts"] stripHallucinations(raw, state.idFormat) assert.equal((raw[1]!.parts[0] as any).text, "It’s 2026.\n") - assert.doesNotMatch(JSON.stringify(raw), /@94@|@b9@|@blocked@|\[high\]/) + assert.equal((raw[1]!.parts[1] as any).state.output, "Result @b9@ @blocked@") const settings = config("message") settings.compress.protectUserMessages = true assignMessageRefs(state, raw) From 40c49e7d4cf253245c4a10705830df79b675c300 Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 03:03:08 -0500 Subject: [PATCH 4/9] fix: support compress permission 'ask' on OpenCode V2 --- lib/v2/index.ts | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/lib/v2/index.ts b/lib/v2/index.ts index d1818b54..4ffa004a 100644 --- a/lib/v2/index.ts +++ b/lib/v2/index.ts @@ -159,10 +159,18 @@ export async function setup(ctx: Plugin.Context) { if (state.isSubAgent && !config.experimental.allowSubAgents) throw new Error("DCP compression is disabled in subagents") if (state.compressPermission === "deny") throw new Error("DCP compression is denied") - if (state.compressPermission === "ask") - throw new Error( - "DCP: compress permission 'ask' is not supported by OpenCode V2's public plugin API yet. Compression was not performed.", - ) + } + + // permission.assert exists from OpenCode 2.0.29; the plugin types used here predate it. + const permission = ctx.permission as typeof ctx.permission & { + assert?: (input: { + sessionID: string + agent?: string + action: string + resources: string[] + save?: string[] + source?: { type: "tool"; messageID: string; id: string } + }) => Promise } await ctx.model.transform((editor) => { @@ -267,7 +275,26 @@ export async function setup(ctx: Plugin.Context) { directory: ctx.location.directory, worktree: ctx.location.directory, abort: new AbortController().signal, - ask: async () => allowed(state), + ask: async () => { + allowed(state) + if (state.compressPermission !== "ask") return + if (!permission.assert) + throw new Error( + "DCP: compress permission 'ask' requires OpenCode 2.0.29 or newer. Compression was not performed.", + ) + await permission.assert({ + sessionID: context.sessionID, + agent: context.agent, + action: "compress", + resources: ["*"], + save: ["*"], + source: { + type: "tool", + messageID: context.messageID, + id: context.id, + }, + }) + }, metadata: ({ title }: { title?: string }) => { void context.progress({ title }) }, @@ -343,14 +370,8 @@ export async function setup(ctx: Plugin.Context) { return { manualMode: !!state.manualMode, canCompress: - state.compressPermission === "allow" && + state.compressPermission !== "deny" && (!state.isSubAgent || config.experimental.allowSubAgents), - ...(state.compressPermission === "ask" - ? { - blockedReason: - "Permission 'ask' is not supported by the V2 plugin API yet.", - } - : {}), context: analyzeContextTokens(state, messages), stats: await buildStatsReport(state, logger), } From 15505484086890d38a9a1ef31151bb302a46be0c Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 03:05:42 -0500 Subject: [PATCH 5/9] fix: ignore failed native compaction summaries --- lib/state/utils.ts | 7 ++++++- tests/message-ids.test.ts | 27 ++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/lib/state/utils.ts b/lib/state/utils.ts index f0caf267..5b13cdd3 100644 --- a/lib/state/utils.ts +++ b/lib/state/utils.ts @@ -66,7 +66,12 @@ export function findLastCompactionTimestamp(messages: WithParts[]): number { if (!isMessageWithInfo(msg)) { continue } - if (msg.info.role === "assistant" && msg.info.summary === true) { + if ( + msg.info.role === "assistant" && + msg.info.summary === true && + msg.info.finish && + !msg.info.error + ) { return msg.info.time.created } } diff --git a/tests/message-ids.test.ts b/tests/message-ids.test.ts index f128b766..62c8300a 100644 --- a/tests/message-ids.test.ts +++ b/tests/message-ids.test.ts @@ -14,7 +14,10 @@ function textPart(messageID: string, sessionID: string, id: string, text: string } } -function buildCompactedMessages(sessionID: string): WithParts[] { +function buildCompactedMessages( + sessionID: string, + summaryInfo: Record = { finish: "stop" }, +): WithParts[] { return [ { info: { @@ -24,6 +27,7 @@ function buildCompactedMessages(sessionID: string): WithParts[] { agent: "assistant", summary: true, time: { created: 2 }, + ...summaryInfo, } as WithParts["info"], parts: [ textPart( @@ -87,3 +91,24 @@ test("checkSession resets message id aliases after native compaction", async () assert.equal(state.messageIds.byRef.get("m0002"), "msg-user-follow-up") assert.equal(state.messageIds.nextRef, 3) }) + +test("checkSession ignores failed native compaction summaries", async () => { + const failedSummaries = [{}, { finish: "error", error: { name: "UnknownError" } }] + for (const summaryInfo of failedSummaries) { + const sessionID = `ses_message_ids_failed_compaction_${Date.now()}` + const messages = buildCompactedMessages(sessionID, summaryInfo) + const state = createSessionState() + const logger = new Logger(false) + + state.sessionId = sessionID + state.messageIds.byRawId.set("old-message", "m0001") + state.messageIds.byRef.set("m0001", "old-message") + state.messageIds.nextRef = 2 + + await checkSession({} as any, state, logger, messages, false) + + assert.equal(state.lastCompaction, 0) + assert.equal(state.messageIds.byRef.get("m0001"), "old-message") + assert.equal(state.messageIds.nextRef, 2) + } +}) From b79a78f08cff58f69485084199565a947968da03 Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 03:17:00 -0500 Subject: [PATCH 6/9] fix: mark completed V2 compactions as finished summaries --- lib/v2/messages.ts | 3 ++- tests/v2-messages.test.ts | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/v2/messages.ts b/lib/v2/messages.ts index 62f0c737..2ae93702 100644 --- a/lib/v2/messages.ts +++ b/lib/v2/messages.ts @@ -76,7 +76,8 @@ export function history(entries: History, session: Session): WithParts[] { ] } if (entry.type === "compaction" && entry.status === "completed") { - return [{ info: info(entry.id, "assistant", session, entry), parts: [] } as WithParts] + const summary = { ...info(entry.id, "assistant", session, entry), finish: "stop" } + return [{ info: summary, parts: [] } as WithParts] } return [] }) diff --git a/tests/v2-messages.test.ts b/tests/v2-messages.test.ts index 072c99f4..4455cbe7 100644 --- a/tests/v2-messages.test.ts +++ b/tests/v2-messages.test.ts @@ -1,7 +1,8 @@ import assert from "node:assert/strict" import test from "node:test" import type { Message } from "@opencode/ai/schema/messages" -import { project } from "../lib/v2/messages" +import { history, project } from "../lib/v2/messages" +import { findLastCompactionTimestamp } from "../lib/state/utils" import { createSessionState, type CompressionBlock } from "../lib/state" import { assignMessageRefs } from "../lib/message-ids" import { injectMessageIds, prune } from "../lib/messages" @@ -169,3 +170,11 @@ test("V2 inserts summaries after native checkpoints without an ordinary user mes assert.deepEqual(restored[0], native[0]) assert.deepEqual(restored[1]?.content, [{ type: "text", text: "CHECKPOINT_SUMMARY" }]) }) + +test("completed V2 compaction entries count as native compaction", () => { + const entries = [ + { id: "cmp_one", type: "compaction", status: "completed", time: { created: 5 } }, + { id: "msg_user", type: "user", text: "Continue", time: { created: 6 } }, + ] as unknown as Parameters[0] + assert.equal(findLastCompactionTimestamp(history(entries, session)), 5) +}) From 905ec134b11b21de73955805ddc575e70117a620 Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 03:36:15 -0500 Subject: [PATCH 7/9] fix: pair V2 tool results with their own call when IDs repeat --- lib/v2/messages.ts | 22 +++++++++++++++------- tests/v2-messages.test.ts | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/lib/v2/messages.ts b/lib/v2/messages.ts index 62f0c737..d6b4a683 100644 --- a/lib/v2/messages.ts +++ b/lib/v2/messages.ts @@ -90,15 +90,23 @@ function output(content: ReadonlyArray<{ type: string; text?: string }>): unknow export function project(native: Message[], entries: History, session: Session) { const byID = new Map(entries.map((entry) => [entry.id, entry])) - const results = new Map() - const owners = new Map() + // Providers can reuse tool call IDs across turns, so pair each result with the + // closest preceding call that has the same ID. + const calls = new Map() + const results = new Map() + const owners = new Map() const links = new Map() const originals = new Map() const messages: WithParts[] = [] for (const message of native) for (const part of message.content) { - if (part.type === "tool-result") results.set(part.id, part) - if (part.type === "tool-call" && message.id) owners.set(part.id, message.id) + if (part.type === "tool-call") calls.set(part.id, { part, messageId: message.id }) + if (part.type === "tool-result") { + const call = calls.get(part.id) + if (!call) continue + results.set(call.part, part) + if (call.messageId) owners.set(part, call.messageId) + } } for (const message of native) { if (!message.id || !["user", "assistant"].includes(message.role)) continue @@ -121,7 +129,7 @@ export function project(native: Message[], entries: History, session: Session) { url: typeof part.data === "string" ? part.data : "", } if (part.type === "tool-call") { - const result = results.get(part.id) + const result = results.get(part) const entry = byID.get(message.id) const durable = entry?.type === "assistant" @@ -205,8 +213,8 @@ export function project(native: Message[], entries: History, session: Session) { if (part.type === "tool-call") content.push(...added.splice(0)) if ( part.type === "tool-result" && - originals.has(owners.get(part.id)!) && - !retained.has(owners.get(part.id)!) + originals.has(owners.get(part)!) && + !retained.has(owners.get(part)!) ) continue const edit = links.get(part) diff --git a/tests/v2-messages.test.ts b/tests/v2-messages.test.ts index 072c99f4..f615a10c 100644 --- a/tests/v2-messages.test.ts +++ b/tests/v2-messages.test.ts @@ -169,3 +169,40 @@ test("V2 inserts summaries after native checkpoints without an ordinary user mes assert.deepEqual(restored[0], native[0]) assert.deepEqual(restored[1]?.content, [{ type: "text", text: "CHECKPOINT_SUMMARY" }]) }) + +test("V2 compression keeps results paired when tool call IDs are reused", () => { + const call = (input: string) => ({ + type: "tool-call", + id: "bash:0", + name: "bash", + input: { command: input }, + }) + const result = (value: string) => ({ + role: "tool", + content: [ + { type: "tool-result", id: "bash:0", name: "bash", result: { type: "text", value } }, + ], + }) + const native = [ + { id: "msg_user", role: "user", content: [{ type: "text", text: "Run both" }] }, + { id: "msg_first", role: "assistant", content: [call("echo one")] }, + result("one"), + { id: "msg_second", role: "assistant", content: [call("echo two")] }, + result("two"), + { id: "msg_latest", role: "user", content: [{ type: "text", text: "Continue" }] }, + ] as Message[] + const view = project(native, entries(native), session) + const outputs = view.messages.flatMap((message) => + message.parts.flatMap((part) => (part.type === "tool" ? [part.state.output] : [])), + ) + assert.deepEqual(outputs, ["one", "two"]) + + const state = createSessionState("compact") + state.prune.messages.byMessageId.set("msg_first", { + tokenCount: 100, + allBlockIds: [1], + activeBlockIds: [1], + }) + prune(state, logger, config, view.messages) + assert.deepEqual(view.restore(), [native[0], native[3], native[4], native[5]]) +}) From 08643d8ba8ca37a2292e90b1d7fcc7b24acfddb2 Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 14:12:19 -0500 Subject: [PATCH 8/9] chore: release v3.2.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5cc2ba42..30b8fc12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tarquinen/opencode-dcp", - "version": "3.2.0", + "version": "3.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tarquinen/opencode-dcp", - "version": "3.2.0", + "version": "3.2.1", "license": "AGPL-3.0-or-later", "workspaces": [ "tests/logger" diff --git a/package.json b/package.json index 5b8ddcde..407280d6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@tarquinen/opencode-dcp", - "version": "3.2.0", + "version": "3.2.1", "type": "module", "workspaces": [ "tests/logger" From 3e382c8be5d39691c755eadea997965e530333c1 Mon Sep 17 00:00:00 2001 From: Dan Smolsky Date: Mon, 16 Nov 2026 14:19:11 -0500 Subject: [PATCH 9/9] fix: update vulnerable dependencies --- package-lock.json | 178 ++++++++++++---------------------------------- package.json | 6 +- 2 files changed, 49 insertions(+), 135 deletions(-) diff --git a/package-lock.json b/package-lock.json index 30b8fc12..750b4229 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1773,9 +1773,9 @@ } }, "node_modules/@npmcli/arborist/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1996,9 +1996,9 @@ } }, "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2159,9 +2159,9 @@ } }, "node_modules/@npmcli/package-json/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2363,35 +2363,6 @@ } } }, - "node_modules/@opencode-ai/plugin/node_modules/effect": { - "version": "4.0.0-beta.83", - "resolved": "https://registry.npmjs.org/effect/-/effect-4.0.0-beta.83.tgz", - "integrity": "sha512-0wsak8RtgGAr9UWSbVDgJHZcUqMSvicHcvaZv1MbMM7MCGgW4Rn/137J1MHQbwYPcwYGxT/IqehFd+UbYuj78w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@standard-schema/spec": "^1.1.0", - "fast-check": "^4.8.0", - "find-my-way-ts": "^0.1.6", - "ini": "^7.0.0", - "kubernetes-types": "^1.30.0", - "msgpackr": "^2.0.1", - "multipasta": "^0.2.7", - "toml": "^4.1.1", - "uuid": "^14.0.0", - "yaml": "^2.9.0" - } - }, - "node_modules/@opencode-ai/plugin/node_modules/ini": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-7.0.0.tgz", - "integrity": "sha512-ifK0CgjALofS5bkrcTy4RaQ9Vx2Knf/eLeIO+NaswQEpH1UblrtTSCIvN71qQDMq0PeQ/SSPojvEJp9vvvfr+w==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^22.22.2 || ^24.15.0 || >=26.0.0" - } - }, "node_modules/@opencode-ai/sdk": { "version": "1.18.29", "resolved": "https://registry.npmjs.org/@opencode-ai/sdk/-/sdk-1.18.29.tgz", @@ -2693,9 +2664,9 @@ } }, "node_modules/@opencode/util/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3856,9 +3827,9 @@ } }, "node_modules/@tufjs/models/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4116,9 +4087,9 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", - "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.8.tgz", + "integrity": "sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -4233,9 +4204,9 @@ } }, "node_modules/cacache/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4755,13 +4726,6 @@ "json5": "^2.2.3" } }, - "node_modules/find-my-way-ts": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz", - "integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==", - "dev": true, - "license": "MIT" - }, "node_modules/find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -5146,9 +5110,9 @@ } }, "node_modules/ignore-walk/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5371,13 +5335,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/kubernetes-types": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/kubernetes-types/-/kubernetes-types-1.30.0.tgz", - "integrity": "sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/lilconfig": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", @@ -5775,13 +5732,6 @@ "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.4" } }, - "node_modules/multipasta": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.8.tgz", - "integrity": "sha512-ZPWuMKyv0cSO29f7hozp+k6+crZbQijV8ipMvxNxRf2SwtYGTX1ZX89Kd20VV4H9Znonx+EQn+iy1wGQsJ+b+Q==", - "dev": true, - "license": "MIT" - }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", @@ -5916,9 +5866,9 @@ } }, "node_modules/node-gyp/node_modules/undici": { - "version": "6.28.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.1.tgz", - "integrity": "sha512-zWpdTVD54H48CIybL0rWQ3ukpb9d23wM7eH5RtfdmeP70cWHNjtfo7P4vZX+5CoDcO53J4Pu5uXp7lNfjc6DRA==", + "version": "6.29.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz", + "integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==", "dev": true, "license": "MIT", "engines": { @@ -6762,18 +6712,18 @@ } }, "node_modules/seroval": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.5.4.tgz", - "integrity": "sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==", + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.6.12.tgz", + "integrity": "sha512-CqbIVfk/7GL3ITwZI55lcPbpQbjHZ2DD5cUj4iH7E9YsCfHNJV1mx7yNp86Z84w5IpmkZZS/2s5vPOWmVWSdQg==", "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/seroval-plugins": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.5.4.tgz", - "integrity": "sha512-S0xQPhUTefAhNvNWFg0c1J8qJArHt5KdtJ/cFAofo06KD1MVSeFWyl4iiu+ApDIuw0WhjpOfCdgConOfAnLgkw==", + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.6.12.tgz", + "integrity": "sha512-+reiwp/lYxiyctSrdvX7OQ1YLrcbWYgBiZrhSFL+V43b0/DGRLNVSDyZINbQe+tWplPOI2fw2dPrdv6hcc09kQ==", "license": "MIT", "engines": { "node": ">=10" @@ -6876,14 +6826,14 @@ } }, "node_modules/solid-js": { - "version": "1.9.12", - "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.12.tgz", - "integrity": "sha512-QzKaSJq2/iDrWR1As6MHZQ8fQkdOBf8GReYb7L5iKwMGceg7HxDcaOHk0at66tNgn9U2U7dXo8ZZpLIAmGMzgw==", + "version": "1.9.19", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.19.tgz", + "integrity": "sha512-NIrV/6o1FtmrA9iuAAYvnQJZaHrGcaH3LKSVj4kCiZfwqjCtJNDgIgR9XcqYl6KR/Lb3oRx1HrlyswPWR8SRvw==", "license": "MIT", "dependencies": { "csstype": "^3.1.0", - "seroval": "~1.5.0", - "seroval-plugins": "~1.5.0" + "seroval": "~1.6.11", + "seroval-plugins": "~1.6.8" } }, "node_modules/source-map": { @@ -7171,16 +7121,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/toml": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/toml/-/toml-4.3.0.tgz", - "integrity": "sha512-lVb8X9BsPVuH0M4BKeS91tXAmJvCjQ5UIyAbQFaxkKGyUFK2RPkhwaFSQH8vbpl1d23eu/IBH+dwVMHWaq9A5A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20" - } - }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -7325,9 +7265,9 @@ "license": "MIT" }, "node_modules/undici": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.10.2.tgz", - "integrity": "sha512-/y4/bH9YNU5hi9NIrpOuvGXFcxrj3CMrV+/AYpowAYTpHn8gX/XPFjNy766FPoYY0miQhdW977JFWKGNhBdwyQ==", + "version": "8.12.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.4.tgz", + "integrity": "sha512-8Mx+uNKKER2bA4AdtedkqRbwUCIJFr2nJckXRe5yrDqzePqwLP7VNcctN8/XdmDSbF7mS+jJKIszlL+vbam1VA==", "dev": true, "license": "MIT", "engines": { @@ -7378,20 +7318,6 @@ "dev": true, "license": "MIT" }, - "node_modules/uuid": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.2.tgz", - "integrity": "sha512-xZe/16rV4aa+HGSOCiY2YeLT1OybRLrrkL/Rqaq7p7GMVXjFh+6wN4oMYgjFmnSnhY8t6Xpdl2l9qmnHYuMHwQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist-node/bin/uuid" - } - }, "node_modules/validate-npm-package-name": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.2.tgz", @@ -7600,26 +7526,10 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "license": "ISC" }, - "node_modules/yaml": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", - "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==", - "dev": true, - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - }, - "funding": { - "url": "https://github.com/sponsors/eemeli" - } - }, "node_modules/zod": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.8.tgz", - "integrity": "sha512-5R1P+WwQqmmMIEACyzSvo4JXHY5WiAFHRMg+zBZKgKS+Q1viRa0C1hmUKtHltoIFKtIdki3pRxkmpP74jnNYHQ==", + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", "dev": true, "license": "MIT", "funding": { diff --git a/package.json b/package.json index 407280d6..74dfe6ee 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,11 @@ }, "overrides": { "@babel/core": "7.29.7", - "esbuild": "0.28.1" + "@opencode-ai/plugin": { + "effect": "4.0.0-rc.112" + }, + "esbuild": "0.28.1", + "zod": "4.6.7" }, "files": [ "dist/",