Types
InstanceModeOption = enum modeGit = "git", modeBranch = "branch"
PostVcsApplyResponse = object
- VCS patch applied
Procs
proc getAgent(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[seq[types.Agent]] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Get a list of all available AI agents in the OpenCode system.
proc getCommand(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[seq[types.Command]] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Get a list of all available commands in the OpenCode system.
proc getFormatter(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[ seq[types.FormatterStatus]] {....stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Get formatter status
proc getLsp(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[seq[types.LSPStatus]] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Get LSP server status
proc getPath(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[Path] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Retrieve the current working directory and related path information for the OpenCode instance.
proc getSkill(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[seq[JsonNode]] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Get a list of all available skills in the OpenCode system.
proc getVcs(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[VcsInfo] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Retrieve version control system (VCS) information for the current project, such as git branch.
proc getVcsDiff(client: OpencodeClient; directory: string = default(string); workspace: string = default(string); mode: set[InstanceModeOption] = {}; context: int64 = default(int64)): Future[seq[types.VcsFileDiff]] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Retrieve the current git diff for the working tree or against the default branch.
proc getVcsDiffRaw(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[AsyncResponse] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Retrieve a raw patch for current uncommitted changes.
proc getVcsStatus(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[ seq[types.VcsFileStatus]] {....stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Retrieve changed files in the current working tree without patches.
proc postInstanceDispose(client: OpencodeClient; directory: string = default(string); workspace: string = default(string)): Future[bool] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Clean up and dispose the current OpenCode instance, releasing all resources.
proc postVcsApply(client: OpencodeClient; directory: string = default(string); workspace: string = default(string); body: PostVcsApplyRequest): Future[ PostVcsApplyResponse] {....stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Apply a raw patch to the current working tree.