@runloop/remote-agents-sdk
    Preparing search index...

    Type Alias ThreadItem

    ThreadItem:
        | {
            clientId: string
            | null;
            content: UserInput[];
            id: string;
            type: "userMessage";
        }
        | { fragments: HookPromptFragment[]; id: string; type: "hookPrompt" }
        | {
            id: string;
            memoryCitation: MemoryCitation | null;
            phase: MessagePhase | null;
            text: string;
            type: "agentMessage";
        }
        | { id: string; text: string; type: "plan" }
        | { content: string[]; id: string; summary: string[]; type: "reasoning" }
        | {
            aggregatedOutput: string | null;
            command: string;
            commandActions: CommandAction[];
            cwd: LegacyAppPathString;
            durationMs: number | null;
            exitCode: number | null;
            id: string;
            processId: string | null;
            source: CommandExecutionSource;
            status: CommandExecutionStatus;
            type: "commandExecution";
        }
        | {
            changes: FileUpdateChange[];
            id: string;
            status: PatchApplyStatus;
            type: "fileChange";
        }
        | {
            appContext: McpToolCallAppContext
            | null;
            arguments: JsonValue;
            durationMs: number | null;
            error: McpToolCallError | null;
            id: string;
            mcpAppResourceUri?: string;
            pluginId: string | null;
            result: McpToolCallResult | null;
            server: string;
            status: McpToolCallStatus;
            tool: string;
            type: "mcpToolCall";
        }
        | {
            arguments: JsonValue;
            contentItems: DynamicToolCallOutputContentItem[]
            | null;
            durationMs: number | null;
            id: string;
            namespace: string | null;
            status: DynamicToolCallStatus;
            success: boolean | null;
            tool: string;
            type: "dynamicToolCall";
        }
        | {
            agentsStates: { [key in string]?: CollabAgentState };
            id: string;
            model: string | null;
            prompt: string | null;
            reasoningEffort: ReasoningEffort | null;
            receiverThreadIds: string[];
            senderThreadId: string;
            status: CollabAgentToolCallStatus;
            tool: CollabAgentTool;
            type: "collabAgentToolCall";
        }
        | {
            agentPath: string;
            agentThreadId: string;
            id: string;
            kind: SubAgentActivityKind;
            type: "subAgentActivity";
        }
        | { type: "webSearch" } & WebSearchItem
        | { id: string; path: LegacyAppPathString; type: "imageView" }
        | { durationMs: number; id: string; type: "sleep" }
        | { type: "imageGeneration" } & ImageGenerationItem
        | { id: string; review: string; type: "enteredReviewMode" }
        | { id: string; review: string; type: "exitedReviewMode" }
        | { id: string; type: "contextCompaction" }

    Type Declaration

    • {
          clientId: string | null;
          content: UserInput[];
          id: string;
          type: "userMessage";
      }
    • { fragments: HookPromptFragment[]; id: string; type: "hookPrompt" }
    • {
          id: string;
          memoryCitation: MemoryCitation | null;
          phase: MessagePhase | null;
          text: string;
          type: "agentMessage";
      }
    • { id: string; text: string; type: "plan" }
    • { content: string[]; id: string; summary: string[]; type: "reasoning" }
    • {
          aggregatedOutput: string | null;
          command: string;
          commandActions: CommandAction[];
          cwd: LegacyAppPathString;
          durationMs: number | null;
          exitCode: number | null;
          id: string;
          processId: string | null;
          source: CommandExecutionSource;
          status: CommandExecutionStatus;
          type: "commandExecution";
      }
      • aggregatedOutput: string | null

        The command's output, aggregated from stdout and stderr.

      • command: string

        The command to be executed.

      • commandActions: CommandAction[]

        A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.

      • cwd: LegacyAppPathString

        The command's working directory.

      • durationMs: number | null

        The duration of the command execution in milliseconds.

      • exitCode: number | null

        The command's exit code.

      • id: string
      • processId: string | null

        Identifier for the underlying PTY process (when available).

      • source: CommandExecutionSource
      • status: CommandExecutionStatus
      • type: "commandExecution"
    • {
          changes: FileUpdateChange[];
          id: string;
          status: PatchApplyStatus;
          type: "fileChange";
      }
    • {
          appContext: McpToolCallAppContext | null;
          arguments: JsonValue;
          durationMs: number | null;
          error: McpToolCallError | null;
          id: string;
          mcpAppResourceUri?: string;
          pluginId: string | null;
          result: McpToolCallResult | null;
          server: string;
          status: McpToolCallStatus;
          tool: string;
          type: "mcpToolCall";
      }
      • appContext: McpToolCallAppContext | null
      • arguments: JsonValue
      • durationMs: number | null

        The duration of the MCP tool call in milliseconds.

      • error: McpToolCallError | null
      • id: string
      • OptionalmcpAppResourceUri?: string

        Deprecated: use appContext.resourceUri instead.

      • pluginId: string | null
      • result: McpToolCallResult | null
      • server: string
      • status: McpToolCallStatus
      • tool: string
      • type: "mcpToolCall"
    • {
          arguments: JsonValue;
          contentItems: DynamicToolCallOutputContentItem[] | null;
          durationMs: number | null;
          id: string;
          namespace: string | null;
          status: DynamicToolCallStatus;
          success: boolean | null;
          tool: string;
          type: "dynamicToolCall";
      }
      • arguments: JsonValue
      • contentItems: DynamicToolCallOutputContentItem[] | null
      • durationMs: number | null

        The duration of the dynamic tool call in milliseconds.

      • id: string
      • namespace: string | null
      • status: DynamicToolCallStatus
      • success: boolean | null
      • tool: string
      • type: "dynamicToolCall"
    • {
          agentsStates: { [key in string]?: CollabAgentState };
          id: string;
          model: string | null;
          prompt: string | null;
          reasoningEffort: ReasoningEffort | null;
          receiverThreadIds: string[];
          senderThreadId: string;
          status: CollabAgentToolCallStatus;
          tool: CollabAgentTool;
          type: "collabAgentToolCall";
      }
      • agentsStates: { [key in string]?: CollabAgentState }

        Last known status of the target agents, when available.

      • id: string

        Unique identifier for this collab tool call.

      • model: string | null

        Model requested for the spawned agent, when applicable.

      • prompt: string | null

        Prompt text sent as part of the collab tool call, when available.

      • reasoningEffort: ReasoningEffort | null

        Reasoning effort requested for the spawned agent, when applicable.

      • receiverThreadIds: string[]

        Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.

      • senderThreadId: string

        Thread ID of the agent issuing the collab request.

      • status: CollabAgentToolCallStatus

        Current status of the collab tool call.

      • tool: CollabAgentTool

        Name of the collab tool that was invoked.

      • type: "collabAgentToolCall"
    • {
          agentPath: string;
          agentThreadId: string;
          id: string;
          kind: SubAgentActivityKind;
          type: "subAgentActivity";
      }
    • { type: "webSearch" } & WebSearchItem
    • { id: string; path: LegacyAppPathString; type: "imageView" }
    • { durationMs: number; id: string; type: "sleep" }
    • { type: "imageGeneration" } & ImageGenerationItem
    • { id: string; review: string; type: "enteredReviewMode" }
    • { id: string; review: string; type: "exitedReviewMode" }
    • { id: string; type: "contextCompaction" }