opencode/session

Search:
Group by:

Procs

proc deleteSessionSessionID(client: OpencodeClient; sessionID: string;
                            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: [].}
Delete a session and permanently remove all associated data, including messages and history.
proc deleteSessionSessionIDMessageMessageID(client: OpencodeClient;
    sessionID: string; messageID: string; 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: [].}
Permanently delete a specific message and all of its parts from a session without reverting file changes.
proc deleteSessionSessionIDMessageMessageIDPartPartID(client: OpencodeClient;
    sessionID: string; messageID: string; partID: string;
    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: [].}
Delete a part from a message.
proc deleteSessionSessionIDShare(client: OpencodeClient; sessionID: string;
                                 directory: string = default(string);
                                 workspace: string = default(string)): Future[
    Session] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    OpenParserJsonError, OpencodeClientError],
               tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Remove the shareable link for a session, making it private again.
proc getSession(client: OpencodeClient; directory: string = default(string);
                workspace: string = default(string);
                scope: set[SessionScopeOption] = {};
                path: string = default(string);
                roots: JsonNode = default(JsonNode);
                start: float64 = default(float64);
                search: string = default(string);
                limit: float64 = default(float64)): Future[seq[types.Session]] {.
    ...stackTrace: false, raises: [Exception, ValueError, KeyError,
                                HttpRequestError, LibraryError, SslError,
                                OSError, IOError, ProtocolError,
                                OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Get a list of all OpenCode sessions, sorted by most recently updated.
proc getSessionSessionID(client: OpencodeClient; sessionID: string;
                         directory: string = default(string);
                         workspace: string = default(string)): Future[Session] {.
    ...stackTrace: false, raises: [Exception, ValueError, KeyError,
                                HttpRequestError, LibraryError, SslError,
                                OSError, IOError, ProtocolError,
                                OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Retrieve detailed information about a specific OpenCode session.
proc getSessionSessionIDChildren(client: OpencodeClient; sessionID: string;
                                 directory: string = default(string);
                                 workspace: string = default(string)): Future[
    seq[types.Session]] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, OpenParserJsonError, OpencodeClientError],
                          tags: [RootEffect, ReadIOEffect, TimeEffect],
                          forbids: [].}
Retrieve all child sessions that were forked from the specified parent session.
proc getSessionSessionIDDiff(client: OpencodeClient; sessionID: string;
                             directory: string = default(string);
                             workspace: string = default(string);
                             messageID: string = default(string)): Future[
    seq[types.SnapshotFileDiff]] {....stackTrace: false, raises: [Exception,
    ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError,
    IOError, ProtocolError, OpenParserJsonError, OpencodeClientError], tags: [
    RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Get the file changes (diff) that resulted from a specific user message in the session.
proc getSessionSessionIDMessage(client: OpencodeClient; sessionID: string;
                                directory: string = default(string);
                                workspace: string = default(string);
                                limit: int64 = default(int64);
                                before: 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: [].}
Retrieve all messages in a session, including user prompts and AI responses.
proc getSessionSessionIDMessageMessageID(client: OpencodeClient;
    sessionID: string; messageID: string; directory: string = default(string);
    workspace: string = default(string)): Future[
    GetSessionSessionIDMessageMessageIDResponse] {....stackTrace: false, raises: [
    Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError,
    OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Retrieve a specific message from a session by its message ID.
proc getSessionSessionIDTodo(client: OpencodeClient; sessionID: string;
                             directory: string = default(string);
                             workspace: string = default(string)): Future[
    seq[types.Todo]] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, OpenParserJsonError, OpencodeClientError],
                       tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Retrieve the todo list associated with a specific session, showing tasks and action items.
proc getSessionStatus(client: OpencodeClient;
                      directory: string = default(string);
                      workspace: string = default(string)): Future[JsonNode] {.
    ...stackTrace: false, raises: [Exception, ValueError, KeyError,
                                HttpRequestError, LibraryError, SslError,
                                OSError, IOError, ProtocolError,
                                OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Retrieve the current status of all sessions, including active, idle, and completed states.
proc patchSessionSessionID(client: OpencodeClient; sessionID: string;
                           directory: string = default(string);
                           workspace: string = default(string);
                           body: PatchSessionSessionIDRequest): Future[Session] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError, OpenParserJsonError,
                                OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Update properties of an existing session, such as title or other metadata.
proc patchSessionSessionIDMessageMessageIDPartPartID(client: OpencodeClient;
    sessionID: string; messageID: string; partID: string;
    directory: string = default(string); workspace: string = default(string);
    body: types.Part): Future[Part] {....stackTrace: false, raises: [Exception,
    ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, KeyError, OpenParserJsonError, OpencodeClientError], tags: [
    RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Update a part in a message.
proc postSession(client: OpencodeClient; directory: string = default(string);
                 workspace: string = default(string); body: PostSessionRequest): Future[
    Session] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    OpenParserJsonError, OpencodeClientError],
               tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Create a new OpenCode session for interacting with AI assistants and managing conversations.
proc postSessionSessionIDAbort(client: OpencodeClient; sessionID: string;
                               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: [].}
Abort an active session and stop any ongoing AI processing or command execution.
proc postSessionSessionIDCommand(client: OpencodeClient; sessionID: string;
                                 directory: string = default(string);
                                 workspace: string = default(string);
                                 body: PostSessionSessionIDCommandRequest): Future[
    PostSessionSessionIDCommandResponse] {....stackTrace: false, raises: [
    Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError,
    OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Send a new command to a session for execution by the AI assistant.
proc postSessionSessionIDFork(client: OpencodeClient; sessionID: string;
                              directory: string = default(string);
                              workspace: string = default(string);
                              body: PostSessionSessionIDForkRequest): Future[
    Session] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    OpenParserJsonError, OpencodeClientError],
               tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Create a new session by forking an existing session at a specific message point.
proc postSessionSessionIDInit(client: OpencodeClient; sessionID: string;
                              directory: string = default(string);
                              workspace: string = default(string);
                              body: PostSessionSessionIDInitRequest): Future[
    bool] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
                                        HttpRequestError, LibraryError,
                                        SslError, OSError, IOError,
                                        ProtocolError, OpenParserJsonError,
                                        OpencodeClientError],
            tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
proc postSessionSessionIDMessage(client: OpencodeClient; sessionID: string;
                                 directory: string = default(string);
                                 workspace: string = default(string);
                                 body: PostSessionSessionIDMessageRequest): Future[
    PostSessionSessionIDMessageResponse] {....stackTrace: false, raises: [
    Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError,
    OSError, IOError, ProtocolError, OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Create and send a new message to a session, streaming the AI response.
proc postSessionSessionIDPermissionsPermissionID(client: OpencodeClient;
    sessionID: string; permissionID: string;
    directory: string = default(string); workspace: string = default(string);
    body: PostSessionSessionIDPermissionsPermissionIDRequest): Future[bool] {.
    ...stackTrace: false, raises: [Exception, ValueError, KeyError,
                                HttpRequestError, LibraryError, SslError,
                                OSError, IOError, ProtocolError,
                                OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Approve or deny a permission request from the AI assistant.
proc postSessionSessionIDPromptAsync(client: OpencodeClient; sessionID: string;
                                     directory: string = default(string);
                                     workspace: string = default(string); body: PostSessionSessionIDPromptAsyncRequest): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
proc postSessionSessionIDRevert(client: OpencodeClient; sessionID: string;
                                directory: string = default(string);
                                workspace: string = default(string);
                                body: PostSessionSessionIDRevertRequest): Future[
    Session] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    OpenParserJsonError, OpencodeClientError],
               tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Revert a specific message in a session, undoing its effects and restoring the previous state.
proc postSessionSessionIDShare(client: OpencodeClient; sessionID: string;
                               directory: string = default(string);
                               workspace: string = default(string)): Future[
    Session] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    OpenParserJsonError, OpencodeClientError],
               tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Create a shareable link for a session, allowing others to view the conversation.
proc postSessionSessionIDShell(client: OpencodeClient; sessionID: string;
                               directory: string = default(string);
                               workspace: string = default(string);
                               body: PostSessionSessionIDShellRequest): Future[
    PostSessionSessionIDShellResponse] {....stackTrace: false, raises: [Exception,
    ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError,
    IOError, ProtocolError, OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Execute a shell command within the session context and return the AI's response.
proc postSessionSessionIDSummarize(client: OpencodeClient; sessionID: string;
                                   directory: string = default(string);
                                   workspace: string = default(string);
                                   body: PostSessionSessionIDSummarizeRequest): Future[
    bool] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
                                        HttpRequestError, LibraryError,
                                        SslError, OSError, IOError,
                                        ProtocolError, OpenParserJsonError,
                                        OpencodeClientError],
            tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Generate a concise summary of the session using AI compaction to preserve key information.
proc postSessionSessionIDUnrevert(client: OpencodeClient; sessionID: string;
                                  directory: string = default(string);
                                  workspace: string = default(string)): Future[
    Session] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    OpenParserJsonError, OpencodeClientError],
               tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Restore all previously reverted messages in a session.