opencode/sync

Types

PostSyncReplayResponse = object
Replayed sync events
PostSyncStealResponse = object
Session stolen into workspace

Procs

proc postSyncHistory(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: [].}
List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.
proc postSyncReplay(client: OpencodeClient; directory: string = default(string);
                    workspace: string = default(string);
                    body: PostSyncReplayRequest): Future[PostSyncReplayResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, KeyError,
                                HttpRequestError, LibraryError, SslError,
                                OSError, IOError, ProtocolError,
                                OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Validate and replay a complete sync event history.
proc postSyncStart(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: [].}
Start sync loops for workspaces in the current project that have active sessions.
proc postSyncSteal(client: OpencodeClient; directory: string = default(string);
                   workspace: string = default(string);
                   body: PostSyncStealRequest): Future[PostSyncStealResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, KeyError,
                                HttpRequestError, LibraryError, SslError,
                                OSError, IOError, ProtocolError,
                                OpenParserJsonError, OpencodeClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Update a session to belong to the current workspace through the sync event system.