mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-19 16:54:22 +01:00
release: v0.4.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@opencode/function",
|
"name": "@opencode/function",
|
||||||
"version": "0.3.133",
|
"version": "0.4.1",
|
||||||
"$schema": "https://json.schemastore.org/package.json",
|
"$schema": "https://json.schemastore.org/package.json",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/package.json",
|
"$schema": "https://json.schemastore.org/package.json",
|
||||||
"version": "0.3.133",
|
"version": "0.4.1",
|
||||||
"name": "opencode",
|
"name": "opencode",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/package.json",
|
"$schema": "https://json.schemastore.org/package.json",
|
||||||
"name": "@opencode-ai/plugin",
|
"name": "@opencode-ai/plugin",
|
||||||
"version": "0.3.133",
|
"version": "0.4.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/package.json",
|
"$schema": "https://json.schemastore.org/package.json",
|
||||||
"name": "@opencode-ai/sdk",
|
"name": "@opencode-ai/sdk",
|
||||||
"version": "0.3.133",
|
"version": "0.4.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import type {
|
|||||||
SessionCreateData,
|
SessionCreateData,
|
||||||
SessionCreateResponses,
|
SessionCreateResponses,
|
||||||
SessionCreateErrors,
|
SessionCreateErrors,
|
||||||
SessionGetData,
|
|
||||||
SessionGetResponses,
|
|
||||||
SessionDeleteData,
|
SessionDeleteData,
|
||||||
SessionDeleteResponses,
|
SessionDeleteResponses,
|
||||||
|
SessionGetData,
|
||||||
|
SessionGetResponses,
|
||||||
SessionInitData,
|
SessionInitData,
|
||||||
SessionInitResponses,
|
SessionInitResponses,
|
||||||
SessionAbortData,
|
SessionAbortData,
|
||||||
@@ -55,8 +55,8 @@ import type {
|
|||||||
FileStatusResponses,
|
FileStatusResponses,
|
||||||
AppLogData,
|
AppLogData,
|
||||||
AppLogResponses,
|
AppLogResponses,
|
||||||
AppModesData,
|
AppAgentsData,
|
||||||
AppModesResponses,
|
AppAgentsResponses,
|
||||||
TuiAppendPromptData,
|
TuiAppendPromptData,
|
||||||
TuiAppendPromptResponses,
|
TuiAppendPromptResponses,
|
||||||
TuiOpenHelpData,
|
TuiOpenHelpData,
|
||||||
@@ -151,11 +151,11 @@ class App extends _HeyApiClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List all modes
|
* List all agents
|
||||||
*/
|
*/
|
||||||
public modes<ThrowOnError extends boolean = false>(options?: Options<AppModesData, ThrowOnError>) {
|
public agents<ThrowOnError extends boolean = false>(options?: Options<AppAgentsData, ThrowOnError>) {
|
||||||
return (options?.client ?? this._client).get<AppModesResponses, unknown, ThrowOnError>({
|
return (options?.client ?? this._client).get<AppAgentsResponses, unknown, ThrowOnError>({
|
||||||
url: "/mode",
|
url: "/agent",
|
||||||
...options,
|
...options,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -205,20 +205,20 @@ class Session extends _HeyApiClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get session
|
* Delete a session and all its data
|
||||||
*/
|
*/
|
||||||
public get<ThrowOnError extends boolean = false>(options: Options<SessionGetData, ThrowOnError>) {
|
public delete<ThrowOnError extends boolean = false>(options: Options<SessionDeleteData, ThrowOnError>) {
|
||||||
return (options.client ?? this._client).get<SessionGetResponses, unknown, ThrowOnError>({
|
return (options.client ?? this._client).delete<SessionDeleteResponses, unknown, ThrowOnError>({
|
||||||
url: "/session/{sessionID}",
|
url: "/session/{id}",
|
||||||
...options,
|
...options,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a session and all its data
|
* Get session
|
||||||
*/
|
*/
|
||||||
public delete<ThrowOnError extends boolean = false>(options: Options<SessionDeleteData, ThrowOnError>) {
|
public get<ThrowOnError extends boolean = false>(options: Options<SessionGetData, ThrowOnError>) {
|
||||||
return (options.client ?? this._client).delete<SessionDeleteResponses, unknown, ThrowOnError>({
|
return (options.client ?? this._client).get<SessionGetResponses, unknown, ThrowOnError>({
|
||||||
url: "/session/{id}",
|
url: "/session/{id}",
|
||||||
...options,
|
...options,
|
||||||
})
|
})
|
||||||
@@ -471,7 +471,7 @@ class Tui extends _HeyApiClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute a TUI command (e.g. switch_mode)
|
* Execute a TUI command (e.g. switch_agent)
|
||||||
*/
|
*/
|
||||||
public executeCommand<ThrowOnError extends boolean = false>(options?: Options<TuiExecuteCommandData, ThrowOnError>) {
|
public executeCommand<ThrowOnError extends boolean = false>(options?: Options<TuiExecuteCommandData, ThrowOnError>) {
|
||||||
return (options?.client ?? this._client).post<TuiExecuteCommandResponses, unknown, ThrowOnError>({
|
return (options?.client ?? this._client).post<TuiExecuteCommandResponses, unknown, ThrowOnError>({
|
||||||
|
|||||||
@@ -200,6 +200,9 @@ export type Part =
|
|||||||
| ({
|
| ({
|
||||||
type: "patch"
|
type: "patch"
|
||||||
} & PatchPart)
|
} & PatchPart)
|
||||||
|
| ({
|
||||||
|
type: "agent"
|
||||||
|
} & AgentPart)
|
||||||
|
|
||||||
export type TextPart = {
|
export type TextPart = {
|
||||||
id: string
|
id: string
|
||||||
@@ -374,6 +377,19 @@ export type PatchPart = {
|
|||||||
files: Array<string>
|
files: Array<string>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type AgentPart = {
|
||||||
|
id: string
|
||||||
|
sessionID: string
|
||||||
|
messageID: string
|
||||||
|
type: string
|
||||||
|
name: string
|
||||||
|
source?: {
|
||||||
|
value: string
|
||||||
|
start: number
|
||||||
|
end: number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export type EventMessagePartRemoved = {
|
export type EventMessagePartRemoved = {
|
||||||
type: string
|
type: string
|
||||||
properties: {
|
properties: {
|
||||||
@@ -567,17 +583,19 @@ export type Config = {
|
|||||||
*/
|
*/
|
||||||
username?: string
|
username?: string
|
||||||
/**
|
/**
|
||||||
* Modes configuration, see https://opencode.ai/docs/modes
|
* @deprecated Use `agent` field instead.
|
||||||
*/
|
*/
|
||||||
mode?: {
|
mode?: {
|
||||||
build?: ModeConfig
|
build?: AgentConfig
|
||||||
plan?: ModeConfig
|
plan?: AgentConfig
|
||||||
[key: string]: ModeConfig | undefined
|
[key: string]: AgentConfig | undefined
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Modes configuration, see https://opencode.ai/docs/modes
|
* Agent configuration, see https://opencode.ai/docs/agent
|
||||||
*/
|
*/
|
||||||
agent?: {
|
agent?: {
|
||||||
|
plan?: AgentConfig
|
||||||
|
build?: AgentConfig
|
||||||
general?: AgentConfig
|
general?: AgentConfig
|
||||||
[key: string]: AgentConfig | undefined
|
[key: string]: AgentConfig | undefined
|
||||||
}
|
}
|
||||||
@@ -704,13 +722,21 @@ export type KeybindsConfig = {
|
|||||||
*/
|
*/
|
||||||
app_help: string
|
app_help: string
|
||||||
/**
|
/**
|
||||||
* Next mode
|
* @deprecated use switch_agent. Next mode
|
||||||
*/
|
*/
|
||||||
switch_mode: string
|
switch_mode: string
|
||||||
/**
|
/**
|
||||||
* Previous Mode
|
* @deprecated use switch_agent_reverse. Previous mode
|
||||||
*/
|
*/
|
||||||
switch_mode_reverse: string
|
switch_mode_reverse: string
|
||||||
|
/**
|
||||||
|
* Next agent
|
||||||
|
*/
|
||||||
|
switch_agent: string
|
||||||
|
/**
|
||||||
|
* Previous agent
|
||||||
|
*/
|
||||||
|
switch_agent_reverse: string
|
||||||
/**
|
/**
|
||||||
* Open external editor
|
* Open external editor
|
||||||
*/
|
*/
|
||||||
@@ -849,7 +875,7 @@ export type KeybindsConfig = {
|
|||||||
app_exit: string
|
app_exit: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ModeConfig = {
|
export type AgentConfig = {
|
||||||
model?: string
|
model?: string
|
||||||
temperature?: number
|
temperature?: number
|
||||||
top_p?: number
|
top_p?: number
|
||||||
@@ -858,10 +884,11 @@ export type ModeConfig = {
|
|||||||
[key: string]: boolean
|
[key: string]: boolean
|
||||||
}
|
}
|
||||||
disable?: boolean
|
disable?: boolean
|
||||||
}
|
/**
|
||||||
|
* Description of when to use the agent
|
||||||
export type AgentConfig = ModeConfig & {
|
*/
|
||||||
description: string
|
description?: string
|
||||||
|
mode?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Provider = {
|
export type Provider = {
|
||||||
@@ -968,6 +995,17 @@ export type FilePartInput = {
|
|||||||
source?: FilePartSource
|
source?: FilePartSource
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type AgentPartInput = {
|
||||||
|
id?: string
|
||||||
|
type: string
|
||||||
|
name: string
|
||||||
|
source?: {
|
||||||
|
value: string
|
||||||
|
start: number
|
||||||
|
end: number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export type Symbol = {
|
export type Symbol = {
|
||||||
name: string
|
name: string
|
||||||
kind: number
|
kind: number
|
||||||
@@ -984,10 +1022,12 @@ export type File = {
|
|||||||
status: "added" | "deleted" | "modified"
|
status: "added" | "deleted" | "modified"
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Mode = {
|
export type Agent = {
|
||||||
name: string
|
name: string
|
||||||
temperature?: number
|
description?: string
|
||||||
|
mode: string
|
||||||
topP?: number
|
topP?: number
|
||||||
|
temperature?: number
|
||||||
model?: {
|
model?: {
|
||||||
modelID: string
|
modelID: string
|
||||||
providerID: string
|
providerID: string
|
||||||
@@ -1103,24 +1143,6 @@ export type SessionCreateResponses = {
|
|||||||
|
|
||||||
export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses]
|
export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses]
|
||||||
|
|
||||||
export type SessionGetData = {
|
|
||||||
body?: never
|
|
||||||
path: {
|
|
||||||
sessionID: string
|
|
||||||
}
|
|
||||||
query?: never
|
|
||||||
url: "/session/{sessionID}"
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SessionGetResponses = {
|
|
||||||
/**
|
|
||||||
* Get session
|
|
||||||
*/
|
|
||||||
200: Session
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses]
|
|
||||||
|
|
||||||
export type SessionDeleteData = {
|
export type SessionDeleteData = {
|
||||||
body?: never
|
body?: never
|
||||||
path: {
|
path: {
|
||||||
@@ -1139,6 +1161,24 @@ export type SessionDeleteResponses = {
|
|||||||
|
|
||||||
export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses]
|
export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses]
|
||||||
|
|
||||||
|
export type SessionGetData = {
|
||||||
|
body?: never
|
||||||
|
path: {
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
query?: never
|
||||||
|
url: "/session/{id}"
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SessionGetResponses = {
|
||||||
|
/**
|
||||||
|
* Get session
|
||||||
|
*/
|
||||||
|
200: Session
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses]
|
||||||
|
|
||||||
export type SessionInitData = {
|
export type SessionInitData = {
|
||||||
body?: {
|
body?: {
|
||||||
messageID: string
|
messageID: string
|
||||||
@@ -1271,7 +1311,7 @@ export type SessionChatData = {
|
|||||||
messageID?: string
|
messageID?: string
|
||||||
providerID: string
|
providerID: string
|
||||||
modelID: string
|
modelID: string
|
||||||
mode?: string
|
agent?: string
|
||||||
system?: string
|
system?: string
|
||||||
tools?: {
|
tools?: {
|
||||||
[key: string]: boolean
|
[key: string]: boolean
|
||||||
@@ -1283,6 +1323,9 @@ export type SessionChatData = {
|
|||||||
| ({
|
| ({
|
||||||
type: "file"
|
type: "file"
|
||||||
} & FilePartInput)
|
} & FilePartInput)
|
||||||
|
| ({
|
||||||
|
type: "agent"
|
||||||
|
} & AgentPartInput)
|
||||||
>
|
>
|
||||||
}
|
}
|
||||||
path: {
|
path: {
|
||||||
@@ -1556,21 +1599,21 @@ export type AppLogResponses = {
|
|||||||
|
|
||||||
export type AppLogResponse = AppLogResponses[keyof AppLogResponses]
|
export type AppLogResponse = AppLogResponses[keyof AppLogResponses]
|
||||||
|
|
||||||
export type AppModesData = {
|
export type AppAgentsData = {
|
||||||
body?: never
|
body?: never
|
||||||
path?: never
|
path?: never
|
||||||
query?: never
|
query?: never
|
||||||
url: "/mode"
|
url: "/agent"
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AppModesResponses = {
|
export type AppAgentsResponses = {
|
||||||
/**
|
/**
|
||||||
* List of modes
|
* List of agents
|
||||||
*/
|
*/
|
||||||
200: Array<Mode>
|
200: Array<Agent>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AppModesResponse = AppModesResponses[keyof AppModesResponses]
|
export type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses]
|
||||||
|
|
||||||
export type TuiAppendPromptData = {
|
export type TuiAppendPromptData = {
|
||||||
body?: {
|
body?: {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@opencode/web",
|
"name": "@opencode/web",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.3.133",
|
"version": "0.4.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"dev:remote": "sst shell --stage=dev --target=Web astro dev",
|
"dev:remote": "sst shell --stage=dev --target=Web astro dev",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "opencode",
|
"name": "opencode",
|
||||||
"displayName": "opencode",
|
"displayName": "opencode",
|
||||||
"description": "opencode for VS Code",
|
"description": "opencode for VS Code",
|
||||||
"version": "0.3.133",
|
"version": "0.4.1",
|
||||||
"publisher": "sst-dev",
|
"publisher": "sst-dev",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user