Sign In

@opencode-ai/ai

Package Overview
Dependencies
Maintainers
2
Versions
849
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/ai - npm Package Compare versions

Comparing version
0.0.0-beta-18138
to
0.0.0-beta-18148
+2
-1
dist/llm.d.ts

@@ -89,6 +89,7 @@ import { Effect, JsonSchema, Schema } from "effect";

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -95,0 +96,0 @@ readonly id: string;

@@ -722,6 +722,7 @@ import { Effect, Schema } from "effect";

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -728,0 +729,0 @@ readonly id: string;

@@ -137,6 +137,7 @@ import { Effect } from "effect";

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -331,6 +332,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -522,6 +524,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -528,0 +531,0 @@ readonly id: string;

@@ -1,4 +0,6 @@

import { Effect } from "effect";
import { Effect, Option } from "effect";
import { AIError, LLMEvent } from "../../schema/index.js";
import { eventError, parseToolInput } from "../shared.js";
import { parse } from "./partial-json.js";
const parsePartialInput = Option.liftThrowable(parse);
/** Create empty accumulator state for one provider stream. */

@@ -20,7 +22,11 @@ export const empty = () => ({});

});
const inputDelta = (tool, text) => LLMEvent.toolInputDelta({
id: tool.id,
name: tool.name,
text,
});
const inputDelta = (tool, text) => {
const input = parsePartialInput(tool.input);
return LLMEvent.toolInputDelta({
id: tool.id,
name: tool.name,
text,
...(Option.isSome(input) ? { input: input.value } : {}),
});
};
const toolCall = (route, tool, inputOverride) => {

@@ -27,0 +33,0 @@ const raw = inputOverride ?? tool.input;

@@ -216,6 +216,7 @@ import { Context, Effect, Layer, Schema, Stream } from "effect";

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -222,0 +223,0 @@ readonly id: string;

@@ -124,2 +124,4 @@ import { Schema } from "effect";

text: Schema.String,
/** Best-effort parse of all input fragments received through this delta. */
input: Schema.optional(Schema.Unknown),
}).annotate({ identifier: "LLM.Event.ToolInputDelta" });

@@ -126,0 +128,0 @@ export const ToolInputEnd = Schema.Struct({

@@ -94,6 +94,7 @@ export * as TestLLM from "./testing.js";

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -277,6 +278,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -460,6 +462,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -643,6 +646,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -826,6 +830,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -1009,6 +1014,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -1192,6 +1198,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -1375,6 +1382,7 @@ readonly id: string;

} | {
readonly id: string;
readonly type: "tool-input-delta";
readonly id: string;
readonly name: string;
readonly text: string;
readonly input?: unknown;
} | {

@@ -1381,0 +1389,0 @@ readonly id: string;

{
"$schema": "https://json.schemastore.org/package.json",
"version": "0.0.0-beta-18138",
"version": "0.0.0-beta-18148",
"name": "@opencode-ai/ai",

@@ -33,3 +33,3 @@ "type": "module",

"@effect/platform-node": "4.0.0-rc.111",
"@opencode-ai/http-recorder": "0.0.0-beta-18138",
"@opencode-ai/http-recorder": "0.0.0-beta-18148",
"@tsconfig/bun": "1.0.9",

@@ -43,3 +43,3 @@ "@types/bun": "1.3.13",

"@smithy/util-utf8": "4.2.2",
"@opencode-ai/schema": "0.0.0-beta-18138",
"@opencode-ai/schema": "0.0.0-beta-18148",
"aws4fetch": "1.0.20",

@@ -46,0 +46,0 @@ "effect": "4.0.0-rc.111",

Sorry, the diff of this file is too big to display