chore: include pre-built dist for github install

This commit is contained in:
Robin Mordasiewicz
2026-03-14 04:56:50 +00:00
parent a7f0a4cf46
commit bce8ff3a75
1011 changed files with 150081 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
/**
* Proactive Thinking Block Validator Hook
*
* Prevents "Expected thinking/redacted_thinking but found tool_use" errors
* by validating and fixing message structure BEFORE sending to Anthropic API.
*
* This hook runs on the "experimental.chat.messages.transform" hook point,
* which is called before messages are converted to ModelMessage format and
* sent to the API.
*
* Key differences from session-recovery hook:
* - PROACTIVE (prevents error) vs REACTIVE (fixes after error)
* - Runs BEFORE API call vs AFTER API error
* - User never sees the error vs User sees error then recovery
*/
import type { Message, Part } from "@opencode-ai/sdk";
interface MessageWithParts {
info: Message;
parts: Part[];
}
type MessagesTransformHook = {
"experimental.chat.messages.transform"?: (input: Record<string, never>, output: {
messages: MessageWithParts[];
}) => Promise<void>;
};
/**
* Validate and fix assistant messages that have tool_use but no thinking block
*/
export declare function createThinkingBlockValidatorHook(): MessagesTransformHook;
export {};
+1
View File
@@ -0,0 +1 @@
export { createThinkingBlockValidatorHook } from "./hook";