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