@opencode/ai 0.0.0-dev-20725 → 0.0.0-dev-20726

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.
@@ -67,7 +67,7 @@ export declare const append: <K extends StreamKey>(tools: State<K>, key: K, text
67
67
  export declare const appendExisting: <K extends StreamKey>(route: string, tools: State<K>, key: K, text: string, missingToolMessage: string) => AppendOutcome<K> | AIError;
68
68
  /**
69
69
  * Finalize one pending tool call: parse the accumulated raw JSON, remove it
70
- * from state, and recover incomplete local arguments when needed.
70
+ * from state, and reject malformed local arguments without repairing them.
71
71
  * Missing keys are a no-op because some providers emit stop events for
72
72
  * non-tool content blocks.
73
73
  */
@@ -37,16 +37,16 @@ const inputDelta = (tool, text) => {
37
37
  };
38
38
  const toolCall = (route, tool, inputOverride) => {
39
39
  const raw = inputOverride ?? tool.input;
40
- return parseToolInput(route, tool.name, raw).pipe(Effect.catch((error) => tool.providerExecuted
41
- ? Effect.fail(error)
42
- : Effect.succeed(Option.getOrElse(Option.map(parsePartialInput(raw), (input) => input ?? {}), () => ({})))), Effect.map((input) => LLMEvent.toolCall({
40
+ return parseToolInput(route, tool.name, raw).pipe(Effect.map((input) => LLMEvent.toolCall({
43
41
  id: tool.id,
44
42
  name: tool.name,
45
43
  namespace: tool.namespace,
46
44
  input,
47
45
  providerExecuted: tool.providerExecuted ? true : undefined,
48
46
  providerMetadata: tool.providerMetadata,
49
- })));
47
+ })), Effect.catch((error) => tool.providerExecuted
48
+ ? Effect.fail(error)
49
+ : Effect.succeed(LLMEvent.toolInputError({ id: tool.id, name: tool.name, namespace: tool.namespace, raw }))));
50
50
  };
51
51
  const finishEvents = (tool, event) => [
52
52
  LLMEvent.toolInputEnd({
@@ -121,7 +121,7 @@ export const append = (tools, key, text) => {
121
121
  export const appendExisting = (route, tools, key, text, missingToolMessage) => append(tools, key, text) ?? eventError(route, missingToolMessage);
122
122
  /**
123
123
  * Finalize one pending tool call: parse the accumulated raw JSON, remove it
124
- * from state, and recover incomplete local arguments when needed.
124
+ * from state, and reject malformed local arguments without repairing them.
125
125
  * Missing keys are a no-op because some providers emit stop events for
126
126
  * non-tool content blocks.
127
127
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "0.0.0-dev-20725",
3
+ "version": "0.0.0-dev-20726",
4
4
  "name": "@opencode/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@clack/prompts": "1.0.0-alpha.1",
36
36
  "@effect/platform-node": "4.0.0-rc.112",
37
- "@opencode/http-recorder": "0.0.0-dev-20725",
37
+ "@opencode/http-recorder": "0.0.0-dev-20726",
38
38
  "@tsconfig/bun": "1.0.9",
39
39
  "@types/bun": "1.4.0",
40
40
  "@typescript/native-preview": "7.0.0-dev.20251207.1",
@@ -44,7 +44,7 @@
44
44
  "@aws-sdk/credential-providers": "3.1057.0",
45
45
  "@smithy/eventstream-codec": "4.2.14",
46
46
  "@smithy/util-utf8": "4.2.2",
47
- "@opencode/schema": "0.0.0-dev-20725",
47
+ "@opencode/schema": "0.0.0-dev-20726",
48
48
  "aws4fetch": "1.0.20",
49
49
  "effect": "4.0.0-rc.112",
50
50
  "google-auth-library": "10.5.0"