From 95e410db88769f0cfdf64aeee9ec2ea3c42d11bc Mon Sep 17 00:00:00 2001 From: opencode Date: Mon, 11 Aug 2025 00:53:06 +0000 Subject: release: v0.4.3 --- packages/sdk/js/package.json | 2 +- packages/sdk/js/src/gen/types.gen.ts | 68 +++++++++++++++++++++++++----------- 2 files changed, 49 insertions(+), 21 deletions(-) (limited to 'packages/sdk') diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index 1a11d9ccd..fd4d1df80 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/sdk", - "version": "0.4.1", + "version": "0.4.3", "type": "module", "scripts": { "typecheck": "tsc --noEmit" diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index 3a97c2835..31917e4ca 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -22,18 +22,15 @@ export type Event = | ({ type: "storage.write" } & EventStorageWrite) - | ({ - type: "file.edited" - } & EventFileEdited) - | ({ - type: "server.connected" - } & EventServerConnected) | ({ type: "permission.updated" } & EventPermissionUpdated) | ({ type: "permission.replied" } & EventPermissionReplied) + | ({ + type: "file.edited" + } & EventFileEdited) | ({ type: "session.updated" } & EventSessionUpdated) @@ -46,6 +43,9 @@ export type Event = | ({ type: "session.error" } & EventSessionError) + | ({ + type: "server.connected" + } & EventServerConnected) | ({ type: "file.watcher.updated" } & EventFileWatcherUpdated) @@ -182,6 +182,9 @@ export type Part = | ({ type: "text" } & TextPart) + | ({ + type: "reasoning" + } & ReasoningPart) | ({ type: "file" } & FilePart) @@ -217,6 +220,21 @@ export type TextPart = { } } +export type ReasoningPart = { + id: string + sessionID: string + messageID: string + type: string + text: string + metadata?: { + [key: string]: unknown + } + time: { + start: number + end?: number + } +} + export type FilePart = { id: string sessionID: string @@ -407,20 +425,6 @@ export type EventStorageWrite = { } } -export type EventFileEdited = { - type: string - properties: { - file: string - } -} - -export type EventServerConnected = { - type: string - properties: { - [key: string]: unknown - } -} - export type EventPermissionUpdated = { type: string properties: Permission @@ -451,6 +455,13 @@ export type EventPermissionReplied = { } } +export type EventFileEdited = { + type: string + properties: { + file: string + } +} + export type EventSessionUpdated = { type: string properties: { @@ -512,6 +523,13 @@ export type EventSessionError = { } } +export type EventServerConnected = { + type: string + properties: { + [key: string]: unknown + } +} + export type EventFileWatcherUpdated = { type: string properties: { @@ -691,6 +709,7 @@ export type Config = { | { [key: string]: string } + webfetch?: string } experimental?: { hook?: { @@ -888,6 +907,12 @@ export type AgentConfig = { * Description of when to use the agent */ description?: string + /** + * Additional model options passed through to provider + */ + options?: { + [key: string]: unknown + } mode?: string } @@ -1028,6 +1053,9 @@ export type Agent = { mode: string topP?: number temperature?: number + options: { + [key: string]: unknown + } model?: { modelID: string providerID: string -- cgit v1.2.3