@opencode-ai/ai 0.0.0-dev-17635 → 0.0.0-dev-17636
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/dist/testing.d.ts +2 -1
- package/dist/testing.js +7 -2
- package/package.json +3 -3
package/dist/testing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as TestLLM from "./testing.js";
|
|
2
2
|
import { type Interface as LLMClientShape } from "./route/client.js";
|
|
3
|
-
import { LLMEvent, type FinishReasonDetails, type AIError, type LLMRequest, type UsageInput } from "./schema/index.js";
|
|
3
|
+
import { LLMEvent, type FinishReasonDetails, type AIError, type LLMRequest, type ProviderMetadata, type UsageInput } from "./schema/index.js";
|
|
4
4
|
import { Context, Effect, Layer, Scope, Stream } from "effect";
|
|
5
5
|
export type Response = readonly LLMEvent[] | Stream.Stream<LLMEvent, AIError>;
|
|
6
6
|
export type Gate = Readonly<{
|
|
@@ -26,6 +26,7 @@ export declare class Service extends Service_base {
|
|
|
26
26
|
export declare const complete: (options: {
|
|
27
27
|
readonly reason: FinishReasonDetails;
|
|
28
28
|
readonly usage?: UsageInput;
|
|
29
|
+
readonly providerMetadata?: ProviderMetadata;
|
|
29
30
|
}, ...events: readonly LLMEvent[]) => ({
|
|
30
31
|
readonly type: "step-start";
|
|
31
32
|
readonly index: number;
|
package/dist/testing.js
CHANGED
|
@@ -7,8 +7,13 @@ export class Service extends Context.Service()("@opencode/ai/TestLLM") {
|
|
|
7
7
|
export const complete = (options, ...events) => [
|
|
8
8
|
LLMEvent.stepStart({ index: 0 }),
|
|
9
9
|
...events,
|
|
10
|
-
LLMEvent.stepFinish({
|
|
11
|
-
|
|
10
|
+
LLMEvent.stepFinish({
|
|
11
|
+
index: 0,
|
|
12
|
+
reason: options.reason,
|
|
13
|
+
usage: options.usage,
|
|
14
|
+
providerMetadata: options.providerMetadata,
|
|
15
|
+
}),
|
|
16
|
+
LLMEvent.finish({ reason: options.reason, providerMetadata: options.providerMetadata }),
|
|
12
17
|
];
|
|
13
18
|
export const stop = (...events) => complete({ reason: { normalized: "stop" } }, ...events);
|
|
14
19
|
export const toolCalls = (...events) => complete({ reason: { normalized: "tool-calls" } }, ...events);
|
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-
|
|
3
|
+
"version": "0.0.0-dev-17636",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
32
|
"@effect/platform-node": "4.0.0-beta.107",
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-dev-
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-dev-17636",
|
|
34
34
|
"@tsconfig/bun": "1.0.9",
|
|
35
35
|
"@types/bun": "1.3.13",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@smithy/eventstream-codec": "4.2.14",
|
|
41
41
|
"@smithy/util-utf8": "4.2.2",
|
|
42
|
-
"@opencode-ai/schema": "0.0.0-dev-
|
|
42
|
+
"@opencode-ai/schema": "0.0.0-dev-17636",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-beta.107",
|
|
45
45
|
"google-auth-library": "10.5.0"
|