wyrd/tools
esc

    ↑↓ Move ↵ Open t3c results first Search by Pagefind
    Releases

    Thread lifecycle API

    Thread lifecycle API

    threadsApi.create()

    Create a thread with a generated id unless the caller supplies one.

    async create(
        input: ThreadCreateInput,
        signal?: AbortSignal,
      ): Promise<OrchestrationV2ThreadShell>;

    Kind: instance method of ThreadsApi

    threadsApi.ensure()

    Returns the existing thread for threadId untouched, or creates it.

    async ensure(
        input: ThreadCreateInput & { readonly threadId: ThreadId },
        signal?: AbortSignal,
      ): Promise<OrchestrationV2ThreadShell>;

    Kind: instance method of ThreadsApi

    threadsApi.launch()

    Creates the thread, prepares its workspace, and starts the first run when a message is given.

    launch(
        input: ThreadLaunchInput,
        signal?: AbortSignal,
      ): Promise<OrchestrationV2ThreadLaunchResult>;

    Kind: instance method of ThreadsApi

    threadsApi.update()

    Update thread metadata.

    async update(threadId: ThreadId, patch: ThreadMetaUpdate, signal?: AbortSignal): Promise<void>;

    Kind: instance method of ThreadsApi

    threadsApi.archive()

    Resolves when the thread is archived, including when it is missing or already archived.

    async archive(threadId: ThreadId, signal?: AbortSignal): Promise<void>;

    Kind: instance method of ThreadsApi

    threadsApi.unarchive()

    Restore an archived thread.

    async unarchive(threadId: ThreadId, signal?: AbortSignal): Promise<void>;

    Kind: instance method of ThreadsApi

    threadsApi.settle()

    Mark a thread settled.

    async settle(threadId: ThreadId, signal?: AbortSignal): Promise<void>;

    Kind: instance method of ThreadsApi

    threadsApi.unsettle()

    Mark a thread unsettled.

    async unsettle(threadId: ThreadId, signal?: AbortSignal): Promise<void>;

    Kind: instance method of ThreadsApi

    threadsApi.setTag()

    Add (tagged: true) or remove one tag, then return the thread’s tags read back from the shell. Adding a present tag or removing an absent one changes nothing. Clients can hide tagged threads (hiddenThreadTags).

    async setTag(
        threadId: ThreadId,
        tag: string,
        tagged: boolean,
        signal?: AbortSignal,
      ): Promise<string[]>;

    Kind: instance method of ThreadsApi

    threadsApi.delete()

    Resolves when the thread is gone, including when it never existed.

    async delete(threadId: ThreadId, signal?: AbortSignal): Promise<void>;

    Kind: instance method of ThreadsApi

    threadsApi.setRuntimeMode()

    Set the thread runtime mode.

    async setRuntimeMode(
        threadId: ThreadId,
        runtimeMode: RuntimeMode,
        signal?: AbortSignal,
      ): Promise<void>;

    Kind: instance method of ThreadsApi

    threadsApi.setInteractionMode()

    Set the thread interaction mode.

    async setInteractionMode(
        threadId: ThreadId,
        interactionMode: ProviderInteractionMode,
        signal?: AbortSignal,
      ): Promise<void>;

    Kind: instance method of ThreadsApi

    threadsApi.setModelSelection()

    Set the provider instance and model for a thread.

    async setModelSelection(
        threadId: ThreadId,
        modelSelection: ModelSelection,
        signal?: AbortSignal,
      ): Promise<void>;

    Kind: instance method of ThreadsApi