release: v0.10.0

This commit is contained in:
opencode
2025-09-18 20:51:03 +00:00
parent f277512938
commit 5a7a725787
14 changed files with 22 additions and 88 deletions

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/sdk",
"version": "0.9.11",
"version": "0.10.0",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit"

View File

@@ -8,9 +8,6 @@ import type {
ProjectCurrentResponses,
ConfigGetData,
ConfigGetResponses,
ToolRegisterData,
ToolRegisterResponses,
ToolRegisterErrors,
ToolIdsData,
ToolIdsResponses,
ToolIdsErrors,
@@ -176,20 +173,6 @@ class Config extends _HeyApiClient {
}
class Tool extends _HeyApiClient {
/**
* Register a new HTTP callback tool
*/
public register<ThrowOnError extends boolean = false>(options?: Options<ToolRegisterData, ThrowOnError>) {
return (options?.client ?? this._client).post<ToolRegisterResponses, ToolRegisterErrors, ThrowOnError>({
url: "/experimental/tool/register",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
})
}
/**
* List all tool IDs (including built-in and dynamically registered)
*/

View File

@@ -504,36 +504,14 @@ export type Config = {
}
}
export type ToolIds = Array<string>
export type _Error = {
data: {
[key: string]: unknown
}
}
export type HttpParamSpec = {
type: "string" | "number" | "boolean" | "array"
description?: string
optional?: boolean
items?: "string" | "number" | "boolean"
}
export type HttpToolRegistration = {
id: string
description: string
parameters: {
type: "object"
properties: {
[key: string]: HttpParamSpec
}
}
callbackUrl: string
headers?: {
[key: string]: string
}
}
export type ToolIds = Array<string>
export type ToolListItem = {
id: string
description: string
@@ -1222,33 +1200,6 @@ export type ConfigGetResponses = {
export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses]
export type ToolRegisterData = {
body?: HttpToolRegistration
path?: never
query?: {
directory?: string
}
url: "/experimental/tool/register"
}
export type ToolRegisterErrors = {
/**
* Bad request
*/
400: _Error
}
export type ToolRegisterError = ToolRegisterErrors[keyof ToolRegisterErrors]
export type ToolRegisterResponses = {
/**
* Tool registered successfully
*/
200: boolean
}
export type ToolRegisterResponse = ToolRegisterResponses[keyof ToolRegisterResponses]
export type ToolIdsData = {
body?: never
path?: never