opencode/packages/sdk/api.md
2025-07-22 11:50:51 -05:00

6.8 KiB

Shared

Types:

Event

Types:

Methods:

  • client.event.list() -> EventListResponse

App

Types:

Methods:

  • client.app.get() -> App
  • client.app.init() -> AppInitResponse
  • client.app.log({ ...params }) -> AppLogResponse
  • client.app.modes() -> AppModesResponse
  • client.app.providers() -> AppProvidersResponse

Find

Types:

Methods:

  • client.find.files({ ...params }) -> FindFilesResponse
  • client.find.symbols({ ...params }) -> FindSymbolsResponse
  • client.find.text({ ...params }) -> FindTextResponse

File

Types:

Methods:

  • client.file.read({ ...params }) -> FileReadResponse
  • client.file.status() -> FileStatusResponse

Config

Types:

Methods:

  • client.config.get() -> Config

Session

Types:

Methods:

  • client.session.create() -> Session
  • client.session.list() -> SessionListResponse
  • client.session.delete(id) -> SessionDeleteResponse
  • client.session.abort(id) -> SessionAbortResponse
  • client.session.chat(id, { ...params }) -> AssistantMessage
  • client.session.init(id, { ...params }) -> SessionInitResponse
  • client.session.messages(id) -> SessionMessagesResponse
  • client.session.share(id) -> Session
  • client.session.summarize(id, { ...params }) -> SessionSummarizeResponse
  • client.session.unshare(id) -> Session

Tui

Types:

Methods:

  • client.tui.appendPrompt({ ...params }) -> TuiAppendPromptResponse
  • client.tui.openHelp() -> TuiOpenHelpResponse