@dxos/compute - v0.16.0
    Preparing search index...

    Class Event

    One immutable entry in an agent trajectory; every conversation state (history, queue, alarms, bindings, threads) is a reduction over the feed's events in feed order.

    Hierarchy

    • {
          created: string;
          payload:
              | {
                  _tag: "message";
                  attachments?: readonly {
                      contentId?: string;
                      name?: string;
                      ref: Ref<Unknown>;
                  }[];
                  blocks: readonly (
                      | {
                          _tag: "anchor";
                          objectId: string;
                          pending?: boolean;
                          version: unknown;
                      }
                      | { _tag: "change"; after: string; before: string; pending?: boolean }
                      | {
                          _tag: "file";
                          mediaType?: string;
                          name?: string;
                          pending?: boolean;
                          url: string;
                      }
                      | {
                          _tag: "image";
                          id?: string;
                          pending?: boolean;
                          source?: | { data: string; mediaType: string; type: "base64" }
                          | { type: "http"; url: string };
                      }
                      | {
                          _tag: "json";
                          data: string;
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          pending?: boolean;
                      }
                      | { _tag: "proposal"; pending?: boolean; text: string }
                      | {
                          _tag: "reasoning";
                          pending?: boolean;
                          reasoningText?: string;
                          redactedText?: string;
                          signature?: string;
                      }
                      | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                      | {
                          _tag: "request";
                          options: readonly {
                              id: string;
                              kind: (...) | (...) | (...) | (...);
                              label: string;
                          }[];
                          pending?: boolean;
                          preview?: { label: string; text: string };
                          requestId: string;
                          resolution?: { optionId?: (...) | (...); outcome: (...) | (...) };
                          title: string;
                          toolCallId?: string;
                      }
                      | { _tag: "select"; options: string[]; pending?: boolean }
                      | { _tag: "status"; pending?: boolean; statusText: string }
                      | { _tag: "suggestion"; pending?: boolean; text: string }
                      | {
                          _tag: "stats";
                          duration?: number;
                          errors?: number;
                          finishReason?:
                              | "length"
                              | "stop"
                              | "content-filter"
                              | "tool-calls"
                              | "error"
                              | "pause"
                              | "other"
                              | "unknown";
                          message?: string;
                          mimeType?: string;
                          model?: string;
                          pending?: boolean;
                          toolCalls?: number;
                          usage?: {
                              inputTokens?: (...)
                              | (...);
                              outputTokens?: (...) | (...);
                              totalTokens?: (...) | (...);
                          };
                      }
                      | {
                          _tag: "surface";
                          data?: { readonly [key: string]: unknown };
                          pending?: boolean;
                          role: string;
                      }
                      | {
                          _tag: "text";
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          mimeType?: string;
                          pending?: boolean;
                          text: string;
                      }
                      | { _tag: "summary"; content: string; pending?: boolean }
                      | { _tag: "toolkit"; pending?: boolean }
                      | {
                          _tag: "toolCall";
                          displayIcon?: string;
                          displayName?: string;
                          input: string;
                          name: string;
                          operationIcon?: string;
                          operationKey?: string;
                          operationName?: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          toolCallId: string;
                      }
                      | {
                          _tag: "toolResult";
                          error?: string;
                          invocations?: { error?: ...; operationKey: ... }[];
                          name: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          result?:
                              | string
                              | {
                                  _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                                  content: readonly (...)[];
                              };
                          toolCallId: string;
                      }
                      | {
                          _tag: "transcript";
                          candidates?: {
                              end: ...;
                              kind: ...;
                              start: ...;
                              suggested?: ...;
                              text: ...;
                          }[];
                          corrected?: string;
                          pending?: boolean;
                          references?: Ref<(...)>[];
                          started: string;
                          text: string;
                          translation?: string;
                      }
                  )[];
                  properties?: { readonly [key: string]: any };
              }
              | {
                  _tag: "turnBegin";
                  from?: {
                      event: string;
                      feed?: Ref<Feed & OfKind<(...)> & Unknown>;
                      thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
                  };
                  model?: DXN;
              }
              | {
                  _tag: "turnEnd";
                  error?: string;
                  finishReason: | "length"
                  | "stop"
                  | "content-filter"
                  | "tool-calls"
                  | "error"
                  | "pause"
                  | "other"
                  | "unknown";
                  usage?: {
                      cacheReadTokens?: number;
                      cacheWriteTokens?: number;
                      inputTokens?: number;
                      outputTokens?: number;
                  };
              }
              | { _tag: "promptConsume"; message: string }
              | { _tag: "promptCancel"; message: string }
              | {
                  _tag: "contextBind";
                  connections?: readonly Ref<Unknown>[];
                  objects: readonly Ref<Unknown>[];
                  skills: readonly Ref<Skill.Skill & OfKind<Object> & Unknown>[];
              }
              | {
                  _tag: "contextUnbind";
                  connections?: readonly Ref<Unknown>[];
                  objects: readonly Ref<Unknown>[];
                  skills: readonly Ref<Skill.Skill & OfKind<Object> & Unknown>[];
              }
              | { _tag: "alarmSet"; message?: string; wakeAt: number }
              | { _tag: "alarmCancel"; alarm: string }
              | { _tag: "alarmFire"; alarm: string }
              | { _tag: "toolBackground"; pid?: string; toolCallId: string }
              | {
                  _tag: "toolDeliver";
                  result: {
                      _tag: "toolResult";
                      error?: string;
                      invocations?: { error?: string; operationKey: string }[];
                      name: string;
                      pending?: boolean;
                      providerExecuted: boolean;
                      result?:
                          | string
                          | {
                              _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                              content: readonly (
                                  | {
                                      _tag: ...;
                                      disposition?: ...;
                                      mimeType?: ...;
                                      pending?: ...;
                                      text: ...;
                                  }
                                  | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                                  | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                              )[];
                          };
                      toolCallId: string;
                  };
                  toolCallId: string;
              }
              | {
                  _tag: "hookBegin";
                  hook: string;
                  kind: "inline"
                  | "background"
                  | "agentic";
                  thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
              }
              | {
                  _tag: "hookEnd";
                  begin: string;
                  blocks?: readonly (
                      | {
                          _tag: "anchor";
                          objectId: string;
                          pending?: boolean;
                          version: unknown;
                      }
                      | { _tag: "change"; after: string; before: string; pending?: boolean }
                      | {
                          _tag: "file";
                          mediaType?: string;
                          name?: string;
                          pending?: boolean;
                          url: string;
                      }
                      | {
                          _tag: "image";
                          id?: string;
                          pending?: boolean;
                          source?: | { data: ...; mediaType: ...; type: ... }
                          | { type: ...; url: ... };
                      }
                      | {
                          _tag: "json";
                          data: string;
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          pending?: boolean;
                      }
                      | { _tag: "proposal"; pending?: boolean; text: string }
                      | {
                          _tag: "reasoning";
                          pending?: boolean;
                          reasoningText?: string;
                          redactedText?: string;
                          signature?: string;
                      }
                      | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                      | {
                          _tag: "request";
                          options: readonly { id: ...; kind: ...; label: ... }[];
                          pending?: boolean;
                          preview?: { label: ...; text: ... };
                          requestId: string;
                          resolution?: { optionId?: ...; outcome: ... };
                          title: string;
                          toolCallId?: string;
                      }
                      | { _tag: "select"; options: string[]; pending?: boolean }
                      | { _tag: "status"; pending?: boolean; statusText: string }
                      | { _tag: "suggestion"; pending?: boolean; text: string }
                      | {
                          _tag: "stats";
                          duration?: number;
                          errors?: number;
                          finishReason?:
                              | "length"
                              | "stop"
                              | "content-filter"
                              | "tool-calls"
                              | "error"
                              | "pause"
                              | "other"
                              | "unknown";
                          message?: string;
                          mimeType?: string;
                          model?: string;
                          pending?: boolean;
                          toolCalls?: number;
                          usage?: { inputTokens?: ...; outputTokens?: ...; totalTokens?: ... };
                      }
                      | {
                          _tag: "surface";
                          data?: { readonly [key: ...]: ... };
                          pending?: boolean;
                          role: string;
                      }
                      | {
                          _tag: "text";
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          mimeType?: string;
                          pending?: boolean;
                          text: string;
                      }
                      | { _tag: "summary"; content: string; pending?: boolean }
                      | { _tag: "toolkit"; pending?: boolean }
                      | {
                          _tag: "toolCall";
                          displayIcon?: string;
                          displayName?: string;
                          input: string;
                          name: string;
                          operationIcon?: string;
                          operationKey?: string;
                          operationName?: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          toolCallId: string;
                      }
                      | {
                          _tag: "toolResult";
                          error?: string;
                          invocations?: (...)[];
                          name: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          result?: string | { _tag: ...; content: ... };
                          toolCallId: string;
                      }
                      | {
                          _tag: "transcript";
                          candidates?: (...)[];
                          corrected?: string;
                          pending?: boolean;
                          references?: (...)[];
                          started: string;
                          text: string;
                          translation?: string;
                      }
                  )[];
                  error?: string;
              }
              | {
                  _tag: "compact";
                  closure?: readonly (string & Brand<"@dxos/echo/Feed/BranchId">)[];
                  from: string;
                  summary: readonly (
                      | {
                          _tag: "anchor";
                          objectId: string;
                          pending?: boolean;
                          version: unknown;
                      }
                      | { _tag: "change"; after: string; before: string; pending?: boolean }
                      | {
                          _tag: "file";
                          mediaType?: string;
                          name?: string;
                          pending?: boolean;
                          url: string;
                      }
                      | {
                          _tag: "image";
                          id?: string;
                          pending?: boolean;
                          source?: | { data: string; mediaType: string; type: "base64" }
                          | { type: "http"; url: string };
                      }
                      | {
                          _tag: "json";
                          data: string;
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          pending?: boolean;
                      }
                      | { _tag: "proposal"; pending?: boolean; text: string }
                      | {
                          _tag: "reasoning";
                          pending?: boolean;
                          reasoningText?: string;
                          redactedText?: string;
                          signature?: string;
                      }
                      | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                      | {
                          _tag: "request";
                          options: readonly {
                              id: string;
                              kind: (...) | (...) | (...) | (...);
                              label: string;
                          }[];
                          pending?: boolean;
                          preview?: { label: string; text: string };
                          requestId: string;
                          resolution?: { optionId?: (...) | (...); outcome: (...) | (...) };
                          title: string;
                          toolCallId?: string;
                      }
                      | { _tag: "select"; options: string[]; pending?: boolean }
                      | { _tag: "status"; pending?: boolean; statusText: string }
                      | { _tag: "suggestion"; pending?: boolean; text: string }
                      | {
                          _tag: "stats";
                          duration?: number;
                          errors?: number;
                          finishReason?:
                              | "length"
                              | "stop"
                              | "content-filter"
                              | "tool-calls"
                              | "error"
                              | "pause"
                              | "other"
                              | "unknown";
                          message?: string;
                          mimeType?: string;
                          model?: string;
                          pending?: boolean;
                          toolCalls?: number;
                          usage?: {
                              inputTokens?: (...)
                              | (...);
                              outputTokens?: (...) | (...);
                              totalTokens?: (...) | (...);
                          };
                      }
                      | {
                          _tag: "surface";
                          data?: { readonly [key: string]: unknown };
                          pending?: boolean;
                          role: string;
                      }
                      | {
                          _tag: "text";
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          mimeType?: string;
                          pending?: boolean;
                          text: string;
                      }
                      | { _tag: "summary"; content: string; pending?: boolean }
                      | { _tag: "toolkit"; pending?: boolean }
                      | {
                          _tag: "toolCall";
                          displayIcon?: string;
                          displayName?: string;
                          input: string;
                          name: string;
                          operationIcon?: string;
                          operationKey?: string;
                          operationName?: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          toolCallId: string;
                      }
                      | {
                          _tag: "toolResult";
                          error?: string;
                          invocations?: { error?: ...; operationKey: ... }[];
                          name: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          result?:
                              | string
                              | {
                                  _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                                  content: readonly (...)[];
                              };
                          toolCallId: string;
                      }
                      | {
                          _tag: "transcript";
                          candidates?: {
                              end: ...;
                              kind: ...;
                              start: ...;
                              suggested?: ...;
                              text: ...;
                          }[];
                          corrected?: string;
                          pending?: boolean;
                          references?: Ref<(...)>[];
                          started: string;
                          text: string;
                          translation?: string;
                      }
                  )[];
                  to: string;
              }
              | {
                  _tag: "requestResolve";
                  message: string;
                  requestId: string;
                  resolution: { optionId?: string; outcome: "selected"
                  | "cancelled" };
              }
              | { _tag: "rewind"; from: string }
              | {
                  _tag: "fork";
                  from: {
                      event: string;
                      feed?: Ref<Feed & OfKind<Object> & Unknown>;
                      thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
                  };
              }
              | {
                  _tag: "threadOpen";
                  from?: {
                      event: string;
                      feed?: Ref<Feed & OfKind<(...)> & Unknown>;
                      thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
                  };
                  mode: "fork"
                  | "fresh"
                  | "light";
                  purpose?: string;
                  siblings?: readonly (string & Brand<"@dxos/echo/Feed/BranchId">)[];
              }
              | {
                  _tag: "threadMerge";
                  mode: "summary"
                  | "raw";
                  summary?: readonly (
                      | {
                          _tag: "anchor";
                          objectId: string;
                          pending?: boolean;
                          version: unknown;
                      }
                      | { _tag: "change"; after: string; before: string; pending?: boolean }
                      | {
                          _tag: "file";
                          mediaType?: string;
                          name?: string;
                          pending?: boolean;
                          url: string;
                      }
                      | {
                          _tag: "image";
                          id?: string;
                          pending?: boolean;
                          source?: | { data: ...; mediaType: ...; type: ... }
                          | { type: ...; url: ... };
                      }
                      | {
                          _tag: "json";
                          data: string;
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          pending?: boolean;
                      }
                      | { _tag: "proposal"; pending?: boolean; text: string }
                      | {
                          _tag: "reasoning";
                          pending?: boolean;
                          reasoningText?: string;
                          redactedText?: string;
                          signature?: string;
                      }
                      | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                      | {
                          _tag: "request";
                          options: readonly { id: ...; kind: ...; label: ... }[];
                          pending?: boolean;
                          preview?: { label: ...; text: ... };
                          requestId: string;
                          resolution?: { optionId?: ...; outcome: ... };
                          title: string;
                          toolCallId?: string;
                      }
                      | { _tag: "select"; options: string[]; pending?: boolean }
                      | { _tag: "status"; pending?: boolean; statusText: string }
                      | { _tag: "suggestion"; pending?: boolean; text: string }
                      | {
                          _tag: "stats";
                          duration?: number;
                          errors?: number;
                          finishReason?:
                              | "length"
                              | "stop"
                              | "content-filter"
                              | "tool-calls"
                              | "error"
                              | "pause"
                              | "other"
                              | "unknown";
                          message?: string;
                          mimeType?: string;
                          model?: string;
                          pending?: boolean;
                          toolCalls?: number;
                          usage?: { inputTokens?: ...; outputTokens?: ...; totalTokens?: ... };
                      }
                      | {
                          _tag: "surface";
                          data?: { readonly [key: ...]: ... };
                          pending?: boolean;
                          role: string;
                      }
                      | {
                          _tag: "text";
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          mimeType?: string;
                          pending?: boolean;
                          text: string;
                      }
                      | { _tag: "summary"; content: string; pending?: boolean }
                      | { _tag: "toolkit"; pending?: boolean }
                      | {
                          _tag: "toolCall";
                          displayIcon?: string;
                          displayName?: string;
                          input: string;
                          name: string;
                          operationIcon?: string;
                          operationKey?: string;
                          operationName?: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          toolCallId: string;
                      }
                      | {
                          _tag: "toolResult";
                          error?: string;
                          invocations?: (...)[];
                          name: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          result?: string | { _tag: ...; content: ... };
                          toolCallId: string;
                      }
                      | {
                          _tag: "transcript";
                          candidates?: (...)[];
                          corrected?: string;
                          pending?: boolean;
                          references?: (...)[];
                          started: string;
                          text: string;
                          translation?: string;
                      }
                  )[];
              }
              | { _tag: "threadWait"; on: string & Brand<"@dxos/echo/Feed/BranchId"> }
              | { _tag: "threadClose"; status: "cancelled" | "completed" | "failed" }
              | { _tag: "modelChange"; model: DXN }
              | {
                  _tag: "custom";
                  blocks?: readonly (
                      | {
                          _tag: "anchor";
                          objectId: string;
                          pending?: boolean;
                          version: unknown;
                      }
                      | { _tag: "change"; after: string; before: string; pending?: boolean }
                      | {
                          _tag: "file";
                          mediaType?: string;
                          name?: string;
                          pending?: boolean;
                          url: string;
                      }
                      | {
                          _tag: "image";
                          id?: string;
                          pending?: boolean;
                          source?: | { data: ...; mediaType: ...; type: ... }
                          | { type: ...; url: ... };
                      }
                      | {
                          _tag: "json";
                          data: string;
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          pending?: boolean;
                      }
                      | { _tag: "proposal"; pending?: boolean; text: string }
                      | {
                          _tag: "reasoning";
                          pending?: boolean;
                          reasoningText?: string;
                          redactedText?: string;
                          signature?: string;
                      }
                      | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                      | {
                          _tag: "request";
                          options: readonly { id: ...; kind: ...; label: ... }[];
                          pending?: boolean;
                          preview?: { label: ...; text: ... };
                          requestId: string;
                          resolution?: { optionId?: ...; outcome: ... };
                          title: string;
                          toolCallId?: string;
                      }
                      | { _tag: "select"; options: string[]; pending?: boolean }
                      | { _tag: "status"; pending?: boolean; statusText: string }
                      | { _tag: "suggestion"; pending?: boolean; text: string }
                      | {
                          _tag: "stats";
                          duration?: number;
                          errors?: number;
                          finishReason?:
                              | "length"
                              | "stop"
                              | "content-filter"
                              | "tool-calls"
                              | "error"
                              | "pause"
                              | "other"
                              | "unknown";
                          message?: string;
                          mimeType?: string;
                          model?: string;
                          pending?: boolean;
                          toolCalls?: number;
                          usage?: { inputTokens?: ...; outputTokens?: ...; totalTokens?: ... };
                      }
                      | {
                          _tag: "surface";
                          data?: { readonly [key: ...]: ... };
                          pending?: boolean;
                          role: string;
                      }
                      | {
                          _tag: "text";
                          disposition?: "user"
                          | "summary"
                          | "synthetic"
                          | "cot"
                          | "version-pin";
                          mimeType?: string;
                          pending?: boolean;
                          text: string;
                      }
                      | { _tag: "summary"; content: string; pending?: boolean }
                      | { _tag: "toolkit"; pending?: boolean }
                      | {
                          _tag: "toolCall";
                          displayIcon?: string;
                          displayName?: string;
                          input: string;
                          name: string;
                          operationIcon?: string;
                          operationKey?: string;
                          operationName?: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          toolCallId: string;
                      }
                      | {
                          _tag: "toolResult";
                          error?: string;
                          invocations?: (...)[];
                          name: string;
                          pending?: boolean;
                          providerExecuted: boolean;
                          result?: string | { _tag: ...; content: ... };
                          toolCallId: string;
                      }
                      | {
                          _tag: "transcript";
                          candidates?: (...)[];
                          corrected?: string;
                          pending?: boolean;
                          references?: (...)[];
                          started: string;
                          text: string;
                          translation?: string;
                      }
                  )[];
                  data?: unknown;
                  type: string;
                  visible: boolean;
              };
          sender: {
              identity?: IdentityDid;
              name?: string;
              role: "user"
              | "assistant"
              | "tool"
              | "event";
              subject?: Ref<Unknown>;
          };
      } & OfKind<Object, this>
      • Event
    Index

    Constructors

    • Parameters

      • _: never

      Returns Trajectory.Event

    Properties

    "~@dxos/echo/Kind": Object
    created: string = ...

    ISO timestamp; display only, ordering is by feed position.

    id: string
    payload:
        | {
            _tag: "message";
            attachments?: readonly {
                contentId?: string;
                name?: string;
                ref: Ref<Unknown>;
            }[];
            blocks: readonly (
                | {
                    _tag: "anchor";
                    objectId: string;
                    pending?: boolean;
                    version: unknown;
                }
                | { _tag: "change"; after: string; before: string; pending?: boolean }
                | {
                    _tag: "file";
                    mediaType?: string;
                    name?: string;
                    pending?: boolean;
                    url: string;
                }
                | {
                    _tag: "image";
                    id?: string;
                    pending?: boolean;
                    source?: | { data: string; mediaType: string; type: "base64" }
                    | { type: "http"; url: string };
                }
                | {
                    _tag: "json";
                    data: string;
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    pending?: boolean;
                }
                | { _tag: "proposal"; pending?: boolean; text: string }
                | {
                    _tag: "reasoning";
                    pending?: boolean;
                    reasoningText?: string;
                    redactedText?: string;
                    signature?: string;
                }
                | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                | {
                    _tag: "request";
                    options: readonly {
                        id: string;
                        kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                        label: string;
                    }[];
                    pending?: boolean;
                    preview?: { label: string; text: string };
                    requestId: string;
                    resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                    title: string;
                    toolCallId?: string;
                }
                | { _tag: "select"; options: string[]; pending?: boolean }
                | { _tag: "status"; pending?: boolean; statusText: string }
                | { _tag: "suggestion"; pending?: boolean; text: string }
                | {
                    _tag: "stats";
                    duration?: number;
                    errors?: number;
                    finishReason?:
                        | "length"
                        | "stop"
                        | "content-filter"
                        | "tool-calls"
                        | "error"
                        | "pause"
                        | "other"
                        | "unknown";
                    message?: string;
                    mimeType?: string;
                    model?: string;
                    pending?: boolean;
                    toolCalls?: number;
                    usage?: {
                        inputTokens?: number;
                        outputTokens?: number;
                        totalTokens?: number;
                    };
                }
                | {
                    _tag: "surface";
                    data?: { readonly [key: string]: unknown };
                    pending?: boolean;
                    role: string;
                }
                | {
                    _tag: "text";
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    mimeType?: string;
                    pending?: boolean;
                    text: string;
                }
                | { _tag: "summary"; content: string; pending?: boolean }
                | { _tag: "toolkit"; pending?: boolean }
                | {
                    _tag: "toolCall";
                    displayIcon?: string;
                    displayName?: string;
                    input: string;
                    name: string;
                    operationIcon?: string;
                    operationKey?: string;
                    operationName?: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    toolCallId: string;
                }
                | {
                    _tag: "toolResult";
                    error?: string;
                    invocations?: { error?: string; operationKey: string }[];
                    name: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    result?:
                        | string
                        | {
                            _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                            content: readonly (
                                | {
                                    _tag: "text";
                                    disposition?: (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...);
                                    mimeType?: (...) | (...);
                                    pending?: (...) | (...) | (...);
                                    text: string;
                                }
                                | {
                                    _tag: "image";
                                    id?: (...)
                                    | (...);
                                    pending?: (...) | (...) | (...);
                                    source?: (...) | (...) | (...);
                                }
                                | {
                                    _tag: "file";
                                    mediaType?: (...)
                                    | (...);
                                    name?: (...) | (...);
                                    pending?: (...) | (...) | (...);
                                    url: string;
                                }
                            )[];
                        };
                    toolCallId: string;
                }
                | {
                    _tag: "transcript";
                    candidates?: {
                        end: number;
                        kind: "noun"
                        | "proper-noun";
                        start: number;
                        suggested?: { typename: string };
                        text: string;
                    }[];
                    corrected?: string;
                    pending?: boolean;
                    references?: Ref<Unknown>[];
                    started: string;
                    text: string;
                    translation?: string;
                }
            )[];
            properties?: { readonly [key: string]: any };
        }
        | {
            _tag: "turnBegin";
            from?: {
                event: string;
                feed?: Ref<Feed & OfKind<Object> & Unknown>;
                thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
            };
            model?: DXN;
        }
        | {
            _tag: "turnEnd";
            error?: string;
            finishReason: | "length"
            | "stop"
            | "content-filter"
            | "tool-calls"
            | "error"
            | "pause"
            | "other"
            | "unknown";
            usage?: {
                cacheReadTokens?: number;
                cacheWriteTokens?: number;
                inputTokens?: number;
                outputTokens?: number;
            };
        }
        | { _tag: "promptConsume"; message: string }
        | { _tag: "promptCancel"; message: string }
        | {
            _tag: "contextBind";
            connections?: readonly Ref<Unknown>[];
            objects: readonly Ref<Unknown>[];
            skills: readonly Ref<Skill.Skill & OfKind<Object> & Unknown>[];
        }
        | {
            _tag: "contextUnbind";
            connections?: readonly Ref<Unknown>[];
            objects: readonly Ref<Unknown>[];
            skills: readonly Ref<Skill.Skill & OfKind<Object> & Unknown>[];
        }
        | { _tag: "alarmSet"; message?: string; wakeAt: number }
        | { _tag: "alarmCancel"; alarm: string }
        | { _tag: "alarmFire"; alarm: string }
        | { _tag: "toolBackground"; pid?: string; toolCallId: string }
        | {
            _tag: "toolDeliver";
            result: {
                _tag: "toolResult";
                error?: string;
                invocations?: { error?: string; operationKey: string }[];
                name: string;
                pending?: boolean;
                providerExecuted: boolean;
                result?:
                    | string
                    | {
                        _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                        content: readonly (
                            | {
                                _tag: "text";
                                disposition?: | "user"
                                | "summary"
                                | "synthetic"
                                | "cot"
                                | "version-pin";
                                mimeType?: string;
                                pending?: boolean;
                                text: string;
                            }
                            | {
                                _tag: "image";
                                id?: string;
                                pending?: boolean;
                                source?: | { data: string; mediaType: string; type: "base64" }
                                | { type: "http"; url: string };
                            }
                            | {
                                _tag: "file";
                                mediaType?: string;
                                name?: string;
                                pending?: boolean;
                                url: string;
                            }
                        )[];
                    };
                toolCallId: string;
            };
            toolCallId: string;
        }
        | {
            _tag: "hookBegin";
            hook: string;
            kind: "inline"
            | "background"
            | "agentic";
            thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
        }
        | {
            _tag: "hookEnd";
            begin: string;
            blocks?: readonly (
                | {
                    _tag: "anchor";
                    objectId: string;
                    pending?: boolean;
                    version: unknown;
                }
                | { _tag: "change"; after: string; before: string; pending?: boolean }
                | {
                    _tag: "file";
                    mediaType?: string;
                    name?: string;
                    pending?: boolean;
                    url: string;
                }
                | {
                    _tag: "image";
                    id?: string;
                    pending?: boolean;
                    source?: | { data: string; mediaType: string; type: "base64" }
                    | { type: "http"; url: string };
                }
                | {
                    _tag: "json";
                    data: string;
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    pending?: boolean;
                }
                | { _tag: "proposal"; pending?: boolean; text: string }
                | {
                    _tag: "reasoning";
                    pending?: boolean;
                    reasoningText?: string;
                    redactedText?: string;
                    signature?: string;
                }
                | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                | {
                    _tag: "request";
                    options: readonly {
                        id: string;
                        kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                        label: string;
                    }[];
                    pending?: boolean;
                    preview?: { label: string; text: string };
                    requestId: string;
                    resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                    title: string;
                    toolCallId?: string;
                }
                | { _tag: "select"; options: string[]; pending?: boolean }
                | { _tag: "status"; pending?: boolean; statusText: string }
                | { _tag: "suggestion"; pending?: boolean; text: string }
                | {
                    _tag: "stats";
                    duration?: number;
                    errors?: number;
                    finishReason?:
                        | "length"
                        | "stop"
                        | "content-filter"
                        | "tool-calls"
                        | "error"
                        | "pause"
                        | "other"
                        | "unknown";
                    message?: string;
                    mimeType?: string;
                    model?: string;
                    pending?: boolean;
                    toolCalls?: number;
                    usage?: {
                        inputTokens?: number;
                        outputTokens?: number;
                        totalTokens?: number;
                    };
                }
                | {
                    _tag: "surface";
                    data?: { readonly [key: string]: unknown };
                    pending?: boolean;
                    role: string;
                }
                | {
                    _tag: "text";
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    mimeType?: string;
                    pending?: boolean;
                    text: string;
                }
                | { _tag: "summary"; content: string; pending?: boolean }
                | { _tag: "toolkit"; pending?: boolean }
                | {
                    _tag: "toolCall";
                    displayIcon?: string;
                    displayName?: string;
                    input: string;
                    name: string;
                    operationIcon?: string;
                    operationKey?: string;
                    operationName?: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    toolCallId: string;
                }
                | {
                    _tag: "toolResult";
                    error?: string;
                    invocations?: { error?: string; operationKey: string }[];
                    name: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    result?:
                        | string
                        | {
                            _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                            content: readonly (
                                | {
                                    _tag: ...;
                                    disposition?: ...;
                                    mimeType?: ...;
                                    pending?: ...;
                                    text: ...;
                                }
                                | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                                | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                            )[];
                        };
                    toolCallId: string;
                }
                | {
                    _tag: "transcript";
                    candidates?: {
                        end: number;
                        kind: "noun"
                        | "proper-noun";
                        start: number;
                        suggested?: { typename: ... };
                        text: string;
                    }[];
                    corrected?: string;
                    pending?: boolean;
                    references?: Ref<Unknown>[];
                    started: string;
                    text: string;
                    translation?: string;
                }
            )[];
            error?: string;
        }
        | {
            _tag: "compact";
            closure?: readonly (string & Brand<"@dxos/echo/Feed/BranchId">)[];
            from: string;
            summary: readonly (
                | {
                    _tag: "anchor";
                    objectId: string;
                    pending?: boolean;
                    version: unknown;
                }
                | { _tag: "change"; after: string; before: string; pending?: boolean }
                | {
                    _tag: "file";
                    mediaType?: string;
                    name?: string;
                    pending?: boolean;
                    url: string;
                }
                | {
                    _tag: "image";
                    id?: string;
                    pending?: boolean;
                    source?: | { data: string; mediaType: string; type: "base64" }
                    | { type: "http"; url: string };
                }
                | {
                    _tag: "json";
                    data: string;
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    pending?: boolean;
                }
                | { _tag: "proposal"; pending?: boolean; text: string }
                | {
                    _tag: "reasoning";
                    pending?: boolean;
                    reasoningText?: string;
                    redactedText?: string;
                    signature?: string;
                }
                | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                | {
                    _tag: "request";
                    options: readonly {
                        id: string;
                        kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                        label: string;
                    }[];
                    pending?: boolean;
                    preview?: { label: string; text: string };
                    requestId: string;
                    resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                    title: string;
                    toolCallId?: string;
                }
                | { _tag: "select"; options: string[]; pending?: boolean }
                | { _tag: "status"; pending?: boolean; statusText: string }
                | { _tag: "suggestion"; pending?: boolean; text: string }
                | {
                    _tag: "stats";
                    duration?: number;
                    errors?: number;
                    finishReason?:
                        | "length"
                        | "stop"
                        | "content-filter"
                        | "tool-calls"
                        | "error"
                        | "pause"
                        | "other"
                        | "unknown";
                    message?: string;
                    mimeType?: string;
                    model?: string;
                    pending?: boolean;
                    toolCalls?: number;
                    usage?: {
                        inputTokens?: number;
                        outputTokens?: number;
                        totalTokens?: number;
                    };
                }
                | {
                    _tag: "surface";
                    data?: { readonly [key: string]: unknown };
                    pending?: boolean;
                    role: string;
                }
                | {
                    _tag: "text";
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    mimeType?: string;
                    pending?: boolean;
                    text: string;
                }
                | { _tag: "summary"; content: string; pending?: boolean }
                | { _tag: "toolkit"; pending?: boolean }
                | {
                    _tag: "toolCall";
                    displayIcon?: string;
                    displayName?: string;
                    input: string;
                    name: string;
                    operationIcon?: string;
                    operationKey?: string;
                    operationName?: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    toolCallId: string;
                }
                | {
                    _tag: "toolResult";
                    error?: string;
                    invocations?: { error?: string; operationKey: string }[];
                    name: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    result?:
                        | string
                        | {
                            _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                            content: readonly (
                                | {
                                    _tag: "text";
                                    disposition?: (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...);
                                    mimeType?: (...) | (...);
                                    pending?: (...) | (...) | (...);
                                    text: string;
                                }
                                | {
                                    _tag: "image";
                                    id?: (...)
                                    | (...);
                                    pending?: (...) | (...) | (...);
                                    source?: (...) | (...) | (...);
                                }
                                | {
                                    _tag: "file";
                                    mediaType?: (...)
                                    | (...);
                                    name?: (...) | (...);
                                    pending?: (...) | (...) | (...);
                                    url: string;
                                }
                            )[];
                        };
                    toolCallId: string;
                }
                | {
                    _tag: "transcript";
                    candidates?: {
                        end: number;
                        kind: "noun"
                        | "proper-noun";
                        start: number;
                        suggested?: { typename: string };
                        text: string;
                    }[];
                    corrected?: string;
                    pending?: boolean;
                    references?: Ref<Unknown>[];
                    started: string;
                    text: string;
                    translation?: string;
                }
            )[];
            to: string;
        }
        | {
            _tag: "requestResolve";
            message: string;
            requestId: string;
            resolution: { optionId?: string; outcome: "selected"
            | "cancelled" };
        }
        | { _tag: "rewind"; from: string }
        | {
            _tag: "fork";
            from: {
                event: string;
                feed?: Ref<Feed & OfKind<Object> & Unknown>;
                thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
            };
        }
        | {
            _tag: "threadOpen";
            from?: {
                event: string;
                feed?: Ref<Feed & OfKind<Object> & Unknown>;
                thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
            };
            mode: "fork"
            | "fresh"
            | "light";
            purpose?: string;
            siblings?: readonly (string & Brand<"@dxos/echo/Feed/BranchId">)[];
        }
        | {
            _tag: "threadMerge";
            mode: "summary"
            | "raw";
            summary?: readonly (
                | {
                    _tag: "anchor";
                    objectId: string;
                    pending?: boolean;
                    version: unknown;
                }
                | { _tag: "change"; after: string; before: string; pending?: boolean }
                | {
                    _tag: "file";
                    mediaType?: string;
                    name?: string;
                    pending?: boolean;
                    url: string;
                }
                | {
                    _tag: "image";
                    id?: string;
                    pending?: boolean;
                    source?: | { data: string; mediaType: string; type: "base64" }
                    | { type: "http"; url: string };
                }
                | {
                    _tag: "json";
                    data: string;
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    pending?: boolean;
                }
                | { _tag: "proposal"; pending?: boolean; text: string }
                | {
                    _tag: "reasoning";
                    pending?: boolean;
                    reasoningText?: string;
                    redactedText?: string;
                    signature?: string;
                }
                | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                | {
                    _tag: "request";
                    options: readonly {
                        id: string;
                        kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                        label: string;
                    }[];
                    pending?: boolean;
                    preview?: { label: string; text: string };
                    requestId: string;
                    resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                    title: string;
                    toolCallId?: string;
                }
                | { _tag: "select"; options: string[]; pending?: boolean }
                | { _tag: "status"; pending?: boolean; statusText: string }
                | { _tag: "suggestion"; pending?: boolean; text: string }
                | {
                    _tag: "stats";
                    duration?: number;
                    errors?: number;
                    finishReason?:
                        | "length"
                        | "stop"
                        | "content-filter"
                        | "tool-calls"
                        | "error"
                        | "pause"
                        | "other"
                        | "unknown";
                    message?: string;
                    mimeType?: string;
                    model?: string;
                    pending?: boolean;
                    toolCalls?: number;
                    usage?: {
                        inputTokens?: number;
                        outputTokens?: number;
                        totalTokens?: number;
                    };
                }
                | {
                    _tag: "surface";
                    data?: { readonly [key: string]: unknown };
                    pending?: boolean;
                    role: string;
                }
                | {
                    _tag: "text";
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    mimeType?: string;
                    pending?: boolean;
                    text: string;
                }
                | { _tag: "summary"; content: string; pending?: boolean }
                | { _tag: "toolkit"; pending?: boolean }
                | {
                    _tag: "toolCall";
                    displayIcon?: string;
                    displayName?: string;
                    input: string;
                    name: string;
                    operationIcon?: string;
                    operationKey?: string;
                    operationName?: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    toolCallId: string;
                }
                | {
                    _tag: "toolResult";
                    error?: string;
                    invocations?: { error?: string; operationKey: string }[];
                    name: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    result?:
                        | string
                        | {
                            _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                            content: readonly (
                                | {
                                    _tag: ...;
                                    disposition?: ...;
                                    mimeType?: ...;
                                    pending?: ...;
                                    text: ...;
                                }
                                | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                                | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                            )[];
                        };
                    toolCallId: string;
                }
                | {
                    _tag: "transcript";
                    candidates?: {
                        end: number;
                        kind: "noun"
                        | "proper-noun";
                        start: number;
                        suggested?: { typename: ... };
                        text: string;
                    }[];
                    corrected?: string;
                    pending?: boolean;
                    references?: Ref<Unknown>[];
                    started: string;
                    text: string;
                    translation?: string;
                }
            )[];
        }
        | { _tag: "threadWait"; on: string & Brand<"@dxos/echo/Feed/BranchId"> }
        | { _tag: "threadClose"; status: "cancelled" | "completed" | "failed" }
        | { _tag: "modelChange"; model: DXN }
        | {
            _tag: "custom";
            blocks?: readonly (
                | {
                    _tag: "anchor";
                    objectId: string;
                    pending?: boolean;
                    version: unknown;
                }
                | { _tag: "change"; after: string; before: string; pending?: boolean }
                | {
                    _tag: "file";
                    mediaType?: string;
                    name?: string;
                    pending?: boolean;
                    url: string;
                }
                | {
                    _tag: "image";
                    id?: string;
                    pending?: boolean;
                    source?: | { data: string; mediaType: string; type: "base64" }
                    | { type: "http"; url: string };
                }
                | {
                    _tag: "json";
                    data: string;
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    pending?: boolean;
                }
                | { _tag: "proposal"; pending?: boolean; text: string }
                | {
                    _tag: "reasoning";
                    pending?: boolean;
                    reasoningText?: string;
                    redactedText?: string;
                    signature?: string;
                }
                | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
                | {
                    _tag: "request";
                    options: readonly {
                        id: string;
                        kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                        label: string;
                    }[];
                    pending?: boolean;
                    preview?: { label: string; text: string };
                    requestId: string;
                    resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                    title: string;
                    toolCallId?: string;
                }
                | { _tag: "select"; options: string[]; pending?: boolean }
                | { _tag: "status"; pending?: boolean; statusText: string }
                | { _tag: "suggestion"; pending?: boolean; text: string }
                | {
                    _tag: "stats";
                    duration?: number;
                    errors?: number;
                    finishReason?:
                        | "length"
                        | "stop"
                        | "content-filter"
                        | "tool-calls"
                        | "error"
                        | "pause"
                        | "other"
                        | "unknown";
                    message?: string;
                    mimeType?: string;
                    model?: string;
                    pending?: boolean;
                    toolCalls?: number;
                    usage?: {
                        inputTokens?: number;
                        outputTokens?: number;
                        totalTokens?: number;
                    };
                }
                | {
                    _tag: "surface";
                    data?: { readonly [key: string]: unknown };
                    pending?: boolean;
                    role: string;
                }
                | {
                    _tag: "text";
                    disposition?: "user"
                    | "summary"
                    | "synthetic"
                    | "cot"
                    | "version-pin";
                    mimeType?: string;
                    pending?: boolean;
                    text: string;
                }
                | { _tag: "summary"; content: string; pending?: boolean }
                | { _tag: "toolkit"; pending?: boolean }
                | {
                    _tag: "toolCall";
                    displayIcon?: string;
                    displayName?: string;
                    input: string;
                    name: string;
                    operationIcon?: string;
                    operationKey?: string;
                    operationName?: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    toolCallId: string;
                }
                | {
                    _tag: "toolResult";
                    error?: string;
                    invocations?: { error?: string; operationKey: string }[];
                    name: string;
                    pending?: boolean;
                    providerExecuted: boolean;
                    result?:
                        | string
                        | {
                            _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                            content: readonly (
                                | {
                                    _tag: ...;
                                    disposition?: ...;
                                    mimeType?: ...;
                                    pending?: ...;
                                    text: ...;
                                }
                                | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                                | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                            )[];
                        };
                    toolCallId: string;
                }
                | {
                    _tag: "transcript";
                    candidates?: {
                        end: number;
                        kind: "noun"
                        | "proper-noun";
                        start: number;
                        suggested?: { typename: ... };
                        text: string;
                    }[];
                    corrected?: string;
                    pending?: boolean;
                    references?: Ref<Unknown>[];
                    started: string;
                    text: string;
                    translation?: string;
                }
            )[];
            data?: unknown;
            type: string;
            visible: boolean;
        } = Payload

    Type declaration

    • {
          _tag: "message";
          attachments?: readonly {
              contentId?: string;
              name?: string;
              ref: Ref<Unknown>;
          }[];
          blocks: readonly (
              | {
                  _tag: "anchor";
                  objectId: string;
                  pending?: boolean;
                  version: unknown;
              }
              | { _tag: "change"; after: string; before: string; pending?: boolean }
              | {
                  _tag: "file";
                  mediaType?: string;
                  name?: string;
                  pending?: boolean;
                  url: string;
              }
              | {
                  _tag: "image";
                  id?: string;
                  pending?: boolean;
                  source?: | { data: string; mediaType: string; type: "base64" }
                  | { type: "http"; url: string };
              }
              | {
                  _tag: "json";
                  data: string;
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  pending?: boolean;
              }
              | { _tag: "proposal"; pending?: boolean; text: string }
              | {
                  _tag: "reasoning";
                  pending?: boolean;
                  reasoningText?: string;
                  redactedText?: string;
                  signature?: string;
              }
              | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
              | {
                  _tag: "request";
                  options: readonly {
                      id: string;
                      kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                      label: string;
                  }[];
                  pending?: boolean;
                  preview?: { label: string; text: string };
                  requestId: string;
                  resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                  title: string;
                  toolCallId?: string;
              }
              | { _tag: "select"; options: string[]; pending?: boolean }
              | { _tag: "status"; pending?: boolean; statusText: string }
              | { _tag: "suggestion"; pending?: boolean; text: string }
              | {
                  _tag: "stats";
                  duration?: number;
                  errors?: number;
                  finishReason?:
                      | "length"
                      | "stop"
                      | "content-filter"
                      | "tool-calls"
                      | "error"
                      | "pause"
                      | "other"
                      | "unknown";
                  message?: string;
                  mimeType?: string;
                  model?: string;
                  pending?: boolean;
                  toolCalls?: number;
                  usage?: {
                      inputTokens?: number;
                      outputTokens?: number;
                      totalTokens?: number;
                  };
              }
              | {
                  _tag: "surface";
                  data?: { readonly [key: string]: unknown };
                  pending?: boolean;
                  role: string;
              }
              | {
                  _tag: "text";
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  mimeType?: string;
                  pending?: boolean;
                  text: string;
              }
              | { _tag: "summary"; content: string; pending?: boolean }
              | { _tag: "toolkit"; pending?: boolean }
              | {
                  _tag: "toolCall";
                  displayIcon?: string;
                  displayName?: string;
                  input: string;
                  name: string;
                  operationIcon?: string;
                  operationKey?: string;
                  operationName?: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  toolCallId: string;
              }
              | {
                  _tag: "toolResult";
                  error?: string;
                  invocations?: { error?: string; operationKey: string }[];
                  name: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  result?:
                      | string
                      | {
                          _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                          content: readonly (
                              | {
                                  _tag: "text";
                                  disposition?: (...)
                                  | (...)
                                  | (...)
                                  | (...)
                                  | (...)
                                  | (...);
                                  mimeType?: (...) | (...);
                                  pending?: (...) | (...) | (...);
                                  text: string;
                              }
                              | {
                                  _tag: "image";
                                  id?: (...)
                                  | (...);
                                  pending?: (...) | (...) | (...);
                                  source?: (...) | (...) | (...);
                              }
                              | {
                                  _tag: "file";
                                  mediaType?: (...)
                                  | (...);
                                  name?: (...) | (...);
                                  pending?: (...) | (...) | (...);
                                  url: string;
                              }
                          )[];
                      };
                  toolCallId: string;
              }
              | {
                  _tag: "transcript";
                  candidates?: {
                      end: number;
                      kind: "noun"
                      | "proper-noun";
                      start: number;
                      suggested?: { typename: string };
                      text: string;
                  }[];
                  corrected?: string;
                  pending?: boolean;
                  references?: Ref<Unknown>[];
                  started: string;
                  text: string;
                  translation?: string;
              }
          )[];
          properties?: { readonly [key: string]: any };
      }
      • Readonly_tag: "message"
      • Optional Readonlyattachments?: readonly { contentId?: string; name?: string; ref: Ref<Unknown> }[]

        Files or objects attached alongside the blocks, as on Message.Message.

      • Readonlyblocks: readonly (
            | {
                _tag: "anchor";
                objectId: string;
                pending?: boolean;
                version: unknown;
            }
            | { _tag: "change"; after: string; before: string; pending?: boolean }
            | {
                _tag: "file";
                mediaType?: string;
                name?: string;
                pending?: boolean;
                url: string;
            }
            | {
                _tag: "image";
                id?: string;
                pending?: boolean;
                source?: | { data: string; mediaType: string; type: "base64" }
                | { type: "http"; url: string };
            }
            | {
                _tag: "json";
                data: string;
                disposition?: "user"
                | "summary"
                | "synthetic"
                | "cot"
                | "version-pin";
                pending?: boolean;
            }
            | { _tag: "proposal"; pending?: boolean; text: string }
            | {
                _tag: "reasoning";
                pending?: boolean;
                reasoningText?: string;
                redactedText?: string;
                signature?: string;
            }
            | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
            | {
                _tag: "request";
                options: readonly {
                    id: string;
                    kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                    label: string;
                }[];
                pending?: boolean;
                preview?: { label: string; text: string };
                requestId: string;
                resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                title: string;
                toolCallId?: string;
            }
            | { _tag: "select"; options: string[]; pending?: boolean }
            | { _tag: "status"; pending?: boolean; statusText: string }
            | { _tag: "suggestion"; pending?: boolean; text: string }
            | {
                _tag: "stats";
                duration?: number;
                errors?: number;
                finishReason?:
                    | "length"
                    | "stop"
                    | "content-filter"
                    | "tool-calls"
                    | "error"
                    | "pause"
                    | "other"
                    | "unknown";
                message?: string;
                mimeType?: string;
                model?: string;
                pending?: boolean;
                toolCalls?: number;
                usage?: {
                    inputTokens?: number;
                    outputTokens?: number;
                    totalTokens?: number;
                };
            }
            | {
                _tag: "surface";
                data?: { readonly [key: string]: unknown };
                pending?: boolean;
                role: string;
            }
            | {
                _tag: "text";
                disposition?: "user"
                | "summary"
                | "synthetic"
                | "cot"
                | "version-pin";
                mimeType?: string;
                pending?: boolean;
                text: string;
            }
            | { _tag: "summary"; content: string; pending?: boolean }
            | { _tag: "toolkit"; pending?: boolean }
            | {
                _tag: "toolCall";
                displayIcon?: string;
                displayName?: string;
                input: string;
                name: string;
                operationIcon?: string;
                operationKey?: string;
                operationName?: string;
                pending?: boolean;
                providerExecuted: boolean;
                toolCallId: string;
            }
            | {
                _tag: "toolResult";
                error?: string;
                invocations?: { error?: string; operationKey: string }[];
                name: string;
                pending?: boolean;
                providerExecuted: boolean;
                result?:
                    | string
                    | {
                        _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                        content: readonly (
                            | {
                                _tag: "text";
                                disposition?: (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                                mimeType?: (...) | (...);
                                pending?: (...) | (...) | (...);
                                text: string;
                            }
                            | {
                                _tag: "image";
                                id?: (...)
                                | (...);
                                pending?: (...) | (...) | (...);
                                source?: (...) | (...) | (...);
                            }
                            | {
                                _tag: "file";
                                mediaType?: (...)
                                | (...);
                                name?: (...) | (...);
                                pending?: (...) | (...) | (...);
                                url: string;
                            }
                        )[];
                    };
                toolCallId: string;
            }
            | {
                _tag: "transcript";
                candidates?: {
                    end: number;
                    kind: "noun"
                    | "proper-noun";
                    start: number;
                    suggested?: { typename: string };
                    text: string;
                }[];
                corrected?: string;
                pending?: boolean;
                references?: Ref<Unknown>[];
                started: string;
                text: string;
                translation?: string;
            }
        )[]
      • Optional Readonlyproperties?: { readonly [key: string]: any }

        Message.Message's properties, carried so a message converts both ways; a channel backend's post receipt lives here (e.g. discord.messageId), which tells a mirror the message is already posted.

    • {
          _tag: "turnBegin";
          from?: {
              event: string;
              feed?: Ref<Feed & OfKind<Object> & Unknown>;
              thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
          };
          model?: DXN;
      }
      • Readonly_tag: "turnBegin"
      • Optional Readonlyfrom?: {
            event: string;
            feed?: Ref<Feed & OfKind<Object> & Unknown>;
            thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
        }

        What the turn saw; absent when it started on an empty log.

        • Readonlyevent: string

          Last event of the parent that was visible: the last event the writer had folded when it wrote the opener, so an event that syncs in afterwards stays out of what the thread saw.

        • Optional Readonlyfeed?: Ref<Feed & OfKind<Object> & Unknown>

          Feed of another conversation; absent for the current one.

        • Optional Readonlythread?: string & Brand<"@dxos/echo/Feed/BranchId">

          Parent thread; absent for the main thread.

      • Optional Readonlymodel?: DXN

        Model DXN, as SessionConfig.model stores it; absent when the writer does not choose the model.

    • {
          _tag: "turnEnd";
          error?: string;
          finishReason:
              | "length"
              | "stop"
              | "content-filter"
              | "tool-calls"
              | "error"
              | "pause"
              | "other"
              | "unknown";
          usage?: {
              cacheReadTokens?: number;
              cacheWriteTokens?: number;
              inputTokens?: number;
              outputTokens?: number;
          };
      }
    • { _tag: "promptConsume"; message: string }
    • { _tag: "promptCancel"; message: string }
    • {
          _tag: "contextBind";
          connections?: readonly Ref<Unknown>[];
          objects: readonly Ref<Unknown>[];
          skills: readonly Ref<Skill.Skill & OfKind<Object> & Unknown>[];
      }
      • Readonly_tag: "contextBind"
      • Optional Readonlyconnections?: readonly Ref<Unknown>[]

        Connections whose MCP server the conversation turns on (contextBind) or off (contextUnbind); one never named follows the space default.

      • Readonlyobjects: readonly Ref<Unknown>[]
      • Readonlyskills: readonly Ref<Skill.Skill & OfKind<Object> & Unknown>[]
    • {
          _tag: "contextUnbind";
          connections?: readonly Ref<Unknown>[];
          objects: readonly Ref<Unknown>[];
          skills: readonly Ref<Skill.Skill & OfKind<Object> & Unknown>[];
      }
      • Readonly_tag: "contextUnbind"
      • Optional Readonlyconnections?: readonly Ref<Unknown>[]

        Connections whose MCP server the conversation turns on (contextBind) or off (contextUnbind); one never named follows the space default.

      • Readonlyobjects: readonly Ref<Unknown>[]
      • Readonlyskills: readonly Ref<Skill.Skill & OfKind<Object> & Unknown>[]
    • { _tag: "alarmSet"; message?: string; wakeAt: number }
      • Readonly_tag: "alarmSet"
      • Optional Readonlymessage?: string
      • ReadonlywakeAt: number

        Epoch milliseconds.

    • { _tag: "alarmCancel"; alarm: string }
    • { _tag: "alarmFire"; alarm: string }
    • { _tag: "toolBackground"; pid?: string; toolCallId: string }
      • Readonly_tag: "toolBackground"
      • Optional Readonlypid?: string

        Process running the call.

      • ReadonlytoolCallId: string
    • {
          _tag: "toolDeliver";
          result: {
              _tag: "toolResult";
              error?: string;
              invocations?: { error?: string; operationKey: string }[];
              name: string;
              pending?: boolean;
              providerExecuted: boolean;
              result?:
                  | string
                  | {
                      _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                      content: readonly (
                          | {
                              _tag: "text";
                              disposition?: "user"
                              | "summary"
                              | "synthetic"
                              | "cot"
                              | "version-pin";
                              mimeType?: string;
                              pending?: boolean;
                              text: string;
                          }
                          | {
                              _tag: "image";
                              id?: string;
                              pending?: boolean;
                              source?: | { data: string; mediaType: string; type: "base64" }
                              | { type: "http"; url: string };
                          }
                          | {
                              _tag: "file";
                              mediaType?: string;
                              name?: string;
                              pending?: boolean;
                              url: string;
                          }
                      )[];
                  };
              toolCallId: string;
          };
          toolCallId: string;
      }
    • {
          _tag: "hookBegin";
          hook: string;
          kind: "inline" | "background" | "agentic";
          thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
      }
      • Readonly_tag: "hookBegin"
      • Readonlyhook: string
      • Readonlykind: "inline" | "background" | "agentic"
      • Optional Readonlythread?: string & Brand<"@dxos/echo/Feed/BranchId">

        Thread an agentic hook runs in.

    • {
          _tag: "hookEnd";
          begin: string;
          blocks?: readonly (
              | {
                  _tag: "anchor";
                  objectId: string;
                  pending?: boolean;
                  version: unknown;
              }
              | { _tag: "change"; after: string; before: string; pending?: boolean }
              | {
                  _tag: "file";
                  mediaType?: string;
                  name?: string;
                  pending?: boolean;
                  url: string;
              }
              | {
                  _tag: "image";
                  id?: string;
                  pending?: boolean;
                  source?: | { data: string; mediaType: string; type: "base64" }
                  | { type: "http"; url: string };
              }
              | {
                  _tag: "json";
                  data: string;
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  pending?: boolean;
              }
              | { _tag: "proposal"; pending?: boolean; text: string }
              | {
                  _tag: "reasoning";
                  pending?: boolean;
                  reasoningText?: string;
                  redactedText?: string;
                  signature?: string;
              }
              | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
              | {
                  _tag: "request";
                  options: readonly {
                      id: string;
                      kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                      label: string;
                  }[];
                  pending?: boolean;
                  preview?: { label: string; text: string };
                  requestId: string;
                  resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                  title: string;
                  toolCallId?: string;
              }
              | { _tag: "select"; options: string[]; pending?: boolean }
              | { _tag: "status"; pending?: boolean; statusText: string }
              | { _tag: "suggestion"; pending?: boolean; text: string }
              | {
                  _tag: "stats";
                  duration?: number;
                  errors?: number;
                  finishReason?:
                      | "length"
                      | "stop"
                      | "content-filter"
                      | "tool-calls"
                      | "error"
                      | "pause"
                      | "other"
                      | "unknown";
                  message?: string;
                  mimeType?: string;
                  model?: string;
                  pending?: boolean;
                  toolCalls?: number;
                  usage?: {
                      inputTokens?: number;
                      outputTokens?: number;
                      totalTokens?: number;
                  };
              }
              | {
                  _tag: "surface";
                  data?: { readonly [key: string]: unknown };
                  pending?: boolean;
                  role: string;
              }
              | {
                  _tag: "text";
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  mimeType?: string;
                  pending?: boolean;
                  text: string;
              }
              | { _tag: "summary"; content: string; pending?: boolean }
              | { _tag: "toolkit"; pending?: boolean }
              | {
                  _tag: "toolCall";
                  displayIcon?: string;
                  displayName?: string;
                  input: string;
                  name: string;
                  operationIcon?: string;
                  operationKey?: string;
                  operationName?: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  toolCallId: string;
              }
              | {
                  _tag: "toolResult";
                  error?: string;
                  invocations?: { error?: string; operationKey: string }[];
                  name: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  result?:
                      | string
                      | {
                          _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                          content: readonly (
                              | {
                                  _tag: ...;
                                  disposition?: ...;
                                  mimeType?: ...;
                                  pending?: ...;
                                  text: ...;
                              }
                              | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                              | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                          )[];
                      };
                  toolCallId: string;
              }
              | {
                  _tag: "transcript";
                  candidates?: {
                      end: number;
                      kind: "noun"
                      | "proper-noun";
                      start: number;
                      suggested?: { typename: ... };
                      text: string;
                  }[];
                  corrected?: string;
                  pending?: boolean;
                  references?: Ref<Unknown>[];
                  started: string;
                  text: string;
                  translation?: string;
              }
          )[];
          error?: string;
      }
      • Readonly_tag: "hookEnd"
      • Readonlybegin: string
      • Optional Readonlyblocks?: readonly (
            | {
                _tag: "anchor";
                objectId: string;
                pending?: boolean;
                version: unknown;
            }
            | { _tag: "change"; after: string; before: string; pending?: boolean }
            | {
                _tag: "file";
                mediaType?: string;
                name?: string;
                pending?: boolean;
                url: string;
            }
            | {
                _tag: "image";
                id?: string;
                pending?: boolean;
                source?: | { data: string; mediaType: string; type: "base64" }
                | { type: "http"; url: string };
            }
            | {
                _tag: "json";
                data: string;
                disposition?: "user"
                | "summary"
                | "synthetic"
                | "cot"
                | "version-pin";
                pending?: boolean;
            }
            | { _tag: "proposal"; pending?: boolean; text: string }
            | {
                _tag: "reasoning";
                pending?: boolean;
                reasoningText?: string;
                redactedText?: string;
                signature?: string;
            }
            | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
            | {
                _tag: "request";
                options: readonly {
                    id: string;
                    kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                    label: string;
                }[];
                pending?: boolean;
                preview?: { label: string; text: string };
                requestId: string;
                resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                title: string;
                toolCallId?: string;
            }
            | { _tag: "select"; options: string[]; pending?: boolean }
            | { _tag: "status"; pending?: boolean; statusText: string }
            | { _tag: "suggestion"; pending?: boolean; text: string }
            | {
                _tag: "stats";
                duration?: number;
                errors?: number;
                finishReason?:
                    | "length"
                    | "stop"
                    | "content-filter"
                    | "tool-calls"
                    | "error"
                    | "pause"
                    | "other"
                    | "unknown";
                message?: string;
                mimeType?: string;
                model?: string;
                pending?: boolean;
                toolCalls?: number;
                usage?: {
                    inputTokens?: number;
                    outputTokens?: number;
                    totalTokens?: number;
                };
            }
            | {
                _tag: "surface";
                data?: { readonly [key: string]: unknown };
                pending?: boolean;
                role: string;
            }
            | {
                _tag: "text";
                disposition?: "user"
                | "summary"
                | "synthetic"
                | "cot"
                | "version-pin";
                mimeType?: string;
                pending?: boolean;
                text: string;
            }
            | { _tag: "summary"; content: string; pending?: boolean }
            | { _tag: "toolkit"; pending?: boolean }
            | {
                _tag: "toolCall";
                displayIcon?: string;
                displayName?: string;
                input: string;
                name: string;
                operationIcon?: string;
                operationKey?: string;
                operationName?: string;
                pending?: boolean;
                providerExecuted: boolean;
                toolCallId: string;
            }
            | {
                _tag: "toolResult";
                error?: string;
                invocations?: { error?: string; operationKey: string }[];
                name: string;
                pending?: boolean;
                providerExecuted: boolean;
                result?:
                    | string
                    | {
                        _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                        content: readonly (
                            | {
                                _tag: ...;
                                disposition?: ...;
                                mimeType?: ...;
                                pending?: ...;
                                text: ...;
                            }
                            | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                            | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                        )[];
                    };
                toolCallId: string;
            }
            | {
                _tag: "transcript";
                candidates?: {
                    end: number;
                    kind: "noun"
                    | "proper-noun";
                    start: number;
                    suggested?: { typename: ... };
                    text: string;
                }[];
                corrected?: string;
                pending?: boolean;
                references?: Ref<Unknown>[];
                started: string;
                text: string;
                translation?: string;
            }
        )[]

        Output of an inline hook, which the model sees.

      • Optional Readonlyerror?: string
    • {
          _tag: "compact";
          closure?: readonly (string & Brand<"@dxos/echo/Feed/BranchId">)[];
          from: string;
          summary: readonly (
              | {
                  _tag: "anchor";
                  objectId: string;
                  pending?: boolean;
                  version: unknown;
              }
              | { _tag: "change"; after: string; before: string; pending?: boolean }
              | {
                  _tag: "file";
                  mediaType?: string;
                  name?: string;
                  pending?: boolean;
                  url: string;
              }
              | {
                  _tag: "image";
                  id?: string;
                  pending?: boolean;
                  source?: | { data: string; mediaType: string; type: "base64" }
                  | { type: "http"; url: string };
              }
              | {
                  _tag: "json";
                  data: string;
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  pending?: boolean;
              }
              | { _tag: "proposal"; pending?: boolean; text: string }
              | {
                  _tag: "reasoning";
                  pending?: boolean;
                  reasoningText?: string;
                  redactedText?: string;
                  signature?: string;
              }
              | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
              | {
                  _tag: "request";
                  options: readonly {
                      id: string;
                      kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                      label: string;
                  }[];
                  pending?: boolean;
                  preview?: { label: string; text: string };
                  requestId: string;
                  resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                  title: string;
                  toolCallId?: string;
              }
              | { _tag: "select"; options: string[]; pending?: boolean }
              | { _tag: "status"; pending?: boolean; statusText: string }
              | { _tag: "suggestion"; pending?: boolean; text: string }
              | {
                  _tag: "stats";
                  duration?: number;
                  errors?: number;
                  finishReason?:
                      | "length"
                      | "stop"
                      | "content-filter"
                      | "tool-calls"
                      | "error"
                      | "pause"
                      | "other"
                      | "unknown";
                  message?: string;
                  mimeType?: string;
                  model?: string;
                  pending?: boolean;
                  toolCalls?: number;
                  usage?: {
                      inputTokens?: number;
                      outputTokens?: number;
                      totalTokens?: number;
                  };
              }
              | {
                  _tag: "surface";
                  data?: { readonly [key: string]: unknown };
                  pending?: boolean;
                  role: string;
              }
              | {
                  _tag: "text";
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  mimeType?: string;
                  pending?: boolean;
                  text: string;
              }
              | { _tag: "summary"; content: string; pending?: boolean }
              | { _tag: "toolkit"; pending?: boolean }
              | {
                  _tag: "toolCall";
                  displayIcon?: string;
                  displayName?: string;
                  input: string;
                  name: string;
                  operationIcon?: string;
                  operationKey?: string;
                  operationName?: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  toolCallId: string;
              }
              | {
                  _tag: "toolResult";
                  error?: string;
                  invocations?: { error?: string; operationKey: string }[];
                  name: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  result?:
                      | string
                      | {
                          _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                          content: readonly (
                              | {
                                  _tag: "text";
                                  disposition?: (...)
                                  | (...)
                                  | (...)
                                  | (...)
                                  | (...)
                                  | (...);
                                  mimeType?: (...) | (...);
                                  pending?: (...) | (...) | (...);
                                  text: string;
                              }
                              | {
                                  _tag: "image";
                                  id?: (...)
                                  | (...);
                                  pending?: (...) | (...) | (...);
                                  source?: (...) | (...) | (...);
                              }
                              | {
                                  _tag: "file";
                                  mediaType?: (...)
                                  | (...);
                                  name?: (...) | (...);
                                  pending?: (...) | (...) | (...);
                                  url: string;
                              }
                          )[];
                      };
                  toolCallId: string;
              }
              | {
                  _tag: "transcript";
                  candidates?: {
                      end: number;
                      kind: "noun"
                      | "proper-noun";
                      start: number;
                      suggested?: { typename: string };
                      text: string;
                  }[];
                  corrected?: string;
                  pending?: boolean;
                  references?: Ref<Unknown>[];
                  started: string;
                  text: string;
                  translation?: string;
              }
          )[];
          to: string;
      }
      • Readonly_tag: "compact"
      • Optional Readonlyclosure?: readonly (string & Brand<"@dxos/echo/Feed/BranchId">)[]

        Threads whose merged entries the range holds; a thread still running is never in it.

      • Readonlyfrom: string
      • Readonlysummary: readonly (
            | {
                _tag: "anchor";
                objectId: string;
                pending?: boolean;
                version: unknown;
            }
            | { _tag: "change"; after: string; before: string; pending?: boolean }
            | {
                _tag: "file";
                mediaType?: string;
                name?: string;
                pending?: boolean;
                url: string;
            }
            | {
                _tag: "image";
                id?: string;
                pending?: boolean;
                source?: | { data: string; mediaType: string; type: "base64" }
                | { type: "http"; url: string };
            }
            | {
                _tag: "json";
                data: string;
                disposition?: "user"
                | "summary"
                | "synthetic"
                | "cot"
                | "version-pin";
                pending?: boolean;
            }
            | { _tag: "proposal"; pending?: boolean; text: string }
            | {
                _tag: "reasoning";
                pending?: boolean;
                reasoningText?: string;
                redactedText?: string;
                signature?: string;
            }
            | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
            | {
                _tag: "request";
                options: readonly {
                    id: string;
                    kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                    label: string;
                }[];
                pending?: boolean;
                preview?: { label: string; text: string };
                requestId: string;
                resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                title: string;
                toolCallId?: string;
            }
            | { _tag: "select"; options: string[]; pending?: boolean }
            | { _tag: "status"; pending?: boolean; statusText: string }
            | { _tag: "suggestion"; pending?: boolean; text: string }
            | {
                _tag: "stats";
                duration?: number;
                errors?: number;
                finishReason?:
                    | "length"
                    | "stop"
                    | "content-filter"
                    | "tool-calls"
                    | "error"
                    | "pause"
                    | "other"
                    | "unknown";
                message?: string;
                mimeType?: string;
                model?: string;
                pending?: boolean;
                toolCalls?: number;
                usage?: {
                    inputTokens?: number;
                    outputTokens?: number;
                    totalTokens?: number;
                };
            }
            | {
                _tag: "surface";
                data?: { readonly [key: string]: unknown };
                pending?: boolean;
                role: string;
            }
            | {
                _tag: "text";
                disposition?: "user"
                | "summary"
                | "synthetic"
                | "cot"
                | "version-pin";
                mimeType?: string;
                pending?: boolean;
                text: string;
            }
            | { _tag: "summary"; content: string; pending?: boolean }
            | { _tag: "toolkit"; pending?: boolean }
            | {
                _tag: "toolCall";
                displayIcon?: string;
                displayName?: string;
                input: string;
                name: string;
                operationIcon?: string;
                operationKey?: string;
                operationName?: string;
                pending?: boolean;
                providerExecuted: boolean;
                toolCallId: string;
            }
            | {
                _tag: "toolResult";
                error?: string;
                invocations?: { error?: string; operationKey: string }[];
                name: string;
                pending?: boolean;
                providerExecuted: boolean;
                result?:
                    | string
                    | {
                        _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                        content: readonly (
                            | {
                                _tag: "text";
                                disposition?: (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                                mimeType?: (...) | (...);
                                pending?: (...) | (...) | (...);
                                text: string;
                            }
                            | {
                                _tag: "image";
                                id?: (...)
                                | (...);
                                pending?: (...) | (...) | (...);
                                source?: (...) | (...) | (...);
                            }
                            | {
                                _tag: "file";
                                mediaType?: (...)
                                | (...);
                                name?: (...) | (...);
                                pending?: (...) | (...) | (...);
                                url: string;
                            }
                        )[];
                    };
                toolCallId: string;
            }
            | {
                _tag: "transcript";
                candidates?: {
                    end: number;
                    kind: "noun"
                    | "proper-noun";
                    start: number;
                    suggested?: { typename: string };
                    text: string;
                }[];
                corrected?: string;
                pending?: boolean;
                references?: Ref<Unknown>[];
                started: string;
                text: string;
                translation?: string;
            }
        )[]
      • Readonlyto: string
    • {
          _tag: "requestResolve";
          message: string;
          requestId: string;
          resolution: { optionId?: string; outcome: "selected" | "cancelled" };
      }
    • { _tag: "rewind"; from: string }
      • Readonly_tag: "rewind"
      • Readonlyfrom: string

        First event discarded.

    • {
          _tag: "fork";
          from: {
              event: string;
              feed?: Ref<Feed & OfKind<Object> & Unknown>;
              thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
          };
      }
    • {
          _tag: "threadOpen";
          from?: {
              event: string;
              feed?: Ref<Feed & OfKind<Object> & Unknown>;
              thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
          };
          mode: "fork"
          | "fresh"
          | "light";
          purpose?: string;
          siblings?: readonly (string & Brand<"@dxos/echo/Feed/BranchId">)[];
      }
      • Readonly_tag: "threadOpen"
      • Optional Readonlyfrom?: {
            event: string;
            feed?: Ref<Feed & OfKind<Object> & Unknown>;
            thread?: string & Brand<"@dxos/echo/Feed/BranchId">;
        }

        Where a fork or light thread branches from; a fresh thread starts with no history.

        • Readonlyevent: string

          Last event of the parent that was visible: the last event the writer had folded when it wrote the opener, so an event that syncs in afterwards stays out of what the thread saw.

        • Optional Readonlyfeed?: Ref<Feed & OfKind<Object> & Unknown>

          Feed of another conversation; absent for the current one.

        • Optional Readonlythread?: string & Brand<"@dxos/echo/Feed/BranchId">

          Parent thread; absent for the main thread.

      • Readonlymode: "fork" | "fresh" | "light"
      • Optional Readonlypurpose?: string
      • Optional Readonlysiblings?: readonly (string & Brand<"@dxos/echo/Feed/BranchId">)[]

        light only: threads (or turns on main) still running when it opened, whose work it starts with.

    • {
          _tag: "threadMerge";
          mode: "summary" | "raw";
          summary?: readonly (
              | {
                  _tag: "anchor";
                  objectId: string;
                  pending?: boolean;
                  version: unknown;
              }
              | { _tag: "change"; after: string; before: string; pending?: boolean }
              | {
                  _tag: "file";
                  mediaType?: string;
                  name?: string;
                  pending?: boolean;
                  url: string;
              }
              | {
                  _tag: "image";
                  id?: string;
                  pending?: boolean;
                  source?: | { data: string; mediaType: string; type: "base64" }
                  | { type: "http"; url: string };
              }
              | {
                  _tag: "json";
                  data: string;
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  pending?: boolean;
              }
              | { _tag: "proposal"; pending?: boolean; text: string }
              | {
                  _tag: "reasoning";
                  pending?: boolean;
                  reasoningText?: string;
                  redactedText?: string;
                  signature?: string;
              }
              | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
              | {
                  _tag: "request";
                  options: readonly {
                      id: string;
                      kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                      label: string;
                  }[];
                  pending?: boolean;
                  preview?: { label: string; text: string };
                  requestId: string;
                  resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                  title: string;
                  toolCallId?: string;
              }
              | { _tag: "select"; options: string[]; pending?: boolean }
              | { _tag: "status"; pending?: boolean; statusText: string }
              | { _tag: "suggestion"; pending?: boolean; text: string }
              | {
                  _tag: "stats";
                  duration?: number;
                  errors?: number;
                  finishReason?:
                      | "length"
                      | "stop"
                      | "content-filter"
                      | "tool-calls"
                      | "error"
                      | "pause"
                      | "other"
                      | "unknown";
                  message?: string;
                  mimeType?: string;
                  model?: string;
                  pending?: boolean;
                  toolCalls?: number;
                  usage?: {
                      inputTokens?: number;
                      outputTokens?: number;
                      totalTokens?: number;
                  };
              }
              | {
                  _tag: "surface";
                  data?: { readonly [key: string]: unknown };
                  pending?: boolean;
                  role: string;
              }
              | {
                  _tag: "text";
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  mimeType?: string;
                  pending?: boolean;
                  text: string;
              }
              | { _tag: "summary"; content: string; pending?: boolean }
              | { _tag: "toolkit"; pending?: boolean }
              | {
                  _tag: "toolCall";
                  displayIcon?: string;
                  displayName?: string;
                  input: string;
                  name: string;
                  operationIcon?: string;
                  operationKey?: string;
                  operationName?: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  toolCallId: string;
              }
              | {
                  _tag: "toolResult";
                  error?: string;
                  invocations?: { error?: string; operationKey: string }[];
                  name: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  result?:
                      | string
                      | {
                          _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                          content: readonly (
                              | {
                                  _tag: ...;
                                  disposition?: ...;
                                  mimeType?: ...;
                                  pending?: ...;
                                  text: ...;
                              }
                              | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                              | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                          )[];
                      };
                  toolCallId: string;
              }
              | {
                  _tag: "transcript";
                  candidates?: {
                      end: number;
                      kind: "noun"
                      | "proper-noun";
                      start: number;
                      suggested?: { typename: ... };
                      text: string;
                  }[];
                  corrected?: string;
                  pending?: boolean;
                  references?: Ref<Unknown>[];
                  started: string;
                  text: string;
                  translation?: string;
              }
          )[];
      }
    • { _tag: "threadWait"; on: string & Brand<"@dxos/echo/Feed/BranchId"> }
    • { _tag: "threadClose"; status: "cancelled" | "completed" | "failed" }
    • { _tag: "modelChange"; model: DXN }
    • {
          _tag: "custom";
          blocks?: readonly (
              | {
                  _tag: "anchor";
                  objectId: string;
                  pending?: boolean;
                  version: unknown;
              }
              | { _tag: "change"; after: string; before: string; pending?: boolean }
              | {
                  _tag: "file";
                  mediaType?: string;
                  name?: string;
                  pending?: boolean;
                  url: string;
              }
              | {
                  _tag: "image";
                  id?: string;
                  pending?: boolean;
                  source?: | { data: string; mediaType: string; type: "base64" }
                  | { type: "http"; url: string };
              }
              | {
                  _tag: "json";
                  data: string;
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  pending?: boolean;
              }
              | { _tag: "proposal"; pending?: boolean; text: string }
              | {
                  _tag: "reasoning";
                  pending?: boolean;
                  reasoningText?: string;
                  redactedText?: string;
                  signature?: string;
              }
              | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
              | {
                  _tag: "request";
                  options: readonly {
                      id: string;
                      kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                      label: string;
                  }[];
                  pending?: boolean;
                  preview?: { label: string; text: string };
                  requestId: string;
                  resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                  title: string;
                  toolCallId?: string;
              }
              | { _tag: "select"; options: string[]; pending?: boolean }
              | { _tag: "status"; pending?: boolean; statusText: string }
              | { _tag: "suggestion"; pending?: boolean; text: string }
              | {
                  _tag: "stats";
                  duration?: number;
                  errors?: number;
                  finishReason?:
                      | "length"
                      | "stop"
                      | "content-filter"
                      | "tool-calls"
                      | "error"
                      | "pause"
                      | "other"
                      | "unknown";
                  message?: string;
                  mimeType?: string;
                  model?: string;
                  pending?: boolean;
                  toolCalls?: number;
                  usage?: {
                      inputTokens?: number;
                      outputTokens?: number;
                      totalTokens?: number;
                  };
              }
              | {
                  _tag: "surface";
                  data?: { readonly [key: string]: unknown };
                  pending?: boolean;
                  role: string;
              }
              | {
                  _tag: "text";
                  disposition?: "user"
                  | "summary"
                  | "synthetic"
                  | "cot"
                  | "version-pin";
                  mimeType?: string;
                  pending?: boolean;
                  text: string;
              }
              | { _tag: "summary"; content: string; pending?: boolean }
              | { _tag: "toolkit"; pending?: boolean }
              | {
                  _tag: "toolCall";
                  displayIcon?: string;
                  displayName?: string;
                  input: string;
                  name: string;
                  operationIcon?: string;
                  operationKey?: string;
                  operationName?: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  toolCallId: string;
              }
              | {
                  _tag: "toolResult";
                  error?: string;
                  invocations?: { error?: string; operationKey: string }[];
                  name: string;
                  pending?: boolean;
                  providerExecuted: boolean;
                  result?:
                      | string
                      | {
                          _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                          content: readonly (
                              | {
                                  _tag: ...;
                                  disposition?: ...;
                                  mimeType?: ...;
                                  pending?: ...;
                                  text: ...;
                              }
                              | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                              | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                          )[];
                      };
                  toolCallId: string;
              }
              | {
                  _tag: "transcript";
                  candidates?: {
                      end: number;
                      kind: "noun"
                      | "proper-noun";
                      start: number;
                      suggested?: { typename: ... };
                      text: string;
                  }[];
                  corrected?: string;
                  pending?: boolean;
                  references?: Ref<Unknown>[];
                  started: string;
                  text: string;
                  translation?: string;
              }
          )[];
          data?: unknown;
          type: string;
          visible: boolean;
      }
      • Readonly_tag: "custom"
      • Optional Readonlyblocks?: readonly (
            | {
                _tag: "anchor";
                objectId: string;
                pending?: boolean;
                version: unknown;
            }
            | { _tag: "change"; after: string; before: string; pending?: boolean }
            | {
                _tag: "file";
                mediaType?: string;
                name?: string;
                pending?: boolean;
                url: string;
            }
            | {
                _tag: "image";
                id?: string;
                pending?: boolean;
                source?: | { data: string; mediaType: string; type: "base64" }
                | { type: "http"; url: string };
            }
            | {
                _tag: "json";
                data: string;
                disposition?: "user"
                | "summary"
                | "synthetic"
                | "cot"
                | "version-pin";
                pending?: boolean;
            }
            | { _tag: "proposal"; pending?: boolean; text: string }
            | {
                _tag: "reasoning";
                pending?: boolean;
                reasoningText?: string;
                redactedText?: string;
                signature?: string;
            }
            | { _tag: "reference"; pending?: boolean; reference: Ref<Unknown> }
            | {
                _tag: "request";
                options: readonly {
                    id: string;
                    kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
                    label: string;
                }[];
                pending?: boolean;
                preview?: { label: string; text: string };
                requestId: string;
                resolution?: { optionId?: string; outcome: "selected" | "cancelled" };
                title: string;
                toolCallId?: string;
            }
            | { _tag: "select"; options: string[]; pending?: boolean }
            | { _tag: "status"; pending?: boolean; statusText: string }
            | { _tag: "suggestion"; pending?: boolean; text: string }
            | {
                _tag: "stats";
                duration?: number;
                errors?: number;
                finishReason?:
                    | "length"
                    | "stop"
                    | "content-filter"
                    | "tool-calls"
                    | "error"
                    | "pause"
                    | "other"
                    | "unknown";
                message?: string;
                mimeType?: string;
                model?: string;
                pending?: boolean;
                toolCalls?: number;
                usage?: {
                    inputTokens?: number;
                    outputTokens?: number;
                    totalTokens?: number;
                };
            }
            | {
                _tag: "surface";
                data?: { readonly [key: string]: unknown };
                pending?: boolean;
                role: string;
            }
            | {
                _tag: "text";
                disposition?: "user"
                | "summary"
                | "synthetic"
                | "cot"
                | "version-pin";
                mimeType?: string;
                pending?: boolean;
                text: string;
            }
            | { _tag: "summary"; content: string; pending?: boolean }
            | { _tag: "toolkit"; pending?: boolean }
            | {
                _tag: "toolCall";
                displayIcon?: string;
                displayName?: string;
                input: string;
                name: string;
                operationIcon?: string;
                operationKey?: string;
                operationName?: string;
                pending?: boolean;
                providerExecuted: boolean;
                toolCallId: string;
            }
            | {
                _tag: "toolResult";
                error?: string;
                invocations?: { error?: string; operationKey: string }[];
                name: string;
                pending?: boolean;
                providerExecuted: boolean;
                result?:
                    | string
                    | {
                        _tag: "~@dxos/types/ContentBlock.ContentBlockResult";
                        content: readonly (
                            | {
                                _tag: ...;
                                disposition?: ...;
                                mimeType?: ...;
                                pending?: ...;
                                text: ...;
                            }
                            | { _tag: ...; id?: ...; pending?: ...; source?: ... }
                            | { _tag: ...; mediaType?: ...; name?: ...; pending?: ...; url: ... }
                        )[];
                    };
                toolCallId: string;
            }
            | {
                _tag: "transcript";
                candidates?: {
                    end: number;
                    kind: "noun"
                    | "proper-noun";
                    start: number;
                    suggested?: { typename: ... };
                    text: string;
                }[];
                corrected?: string;
                pending?: boolean;
                references?: Ref<Unknown>[];
                started: string;
                text: string;
                translation?: string;
            }
        )[]
      • Optional Readonlydata?: unknown
      • Readonlytype: string

        Namespaced extension type (e.g. org.example.checkpoint).

      • Readonlyvisible: boolean
    sender: {
        identity?: IdentityDid;
        name?: string;
        role: "user" | "assistant" | "tool" | "event";
        subject?: Ref<Unknown>;
    } = Sender

    Type declaration

    • Optional Readonlyidentity?: IdentityDid

      Writer's identity, which tells participants apart in a multi-tenant chat.

    • Optional Readonlyname?: string
    • Readonlyrole: "user" | "assistant" | "tool" | "event"
    • Optional Readonlysubject?: Ref<Unknown>

      Object the sender stands for when it is not a person (agent session, service, hook).

    "~@dxos/echo/Kind": Type

    Entity-kind brand of the type-entity value itself — always EntityKind.Type. The kind of instance the type describes lives on [SchemaKindId] (Object / Relation / Type). Lets Obj.isObject / Relation.isRelation reject type entities by a single [KindId] check.

    "~@dxos/echo/SchemaKind": Object

    Schema-kind brand (object).

    "~@dxos/echo/Type.Instance"?: Trajectory.Event & OfKind<Object>
    "~@dxos/echo/Type.StaticSchema": Codec<any, any>

    Source Effect Schema — used internally by Type.getSchema(self).

    fields: {}

    The fields defined in the original struct schema. Allows accessing field definitions for introspection.

    id: string

    Object id. Like all ECHO entities, type entities always carry an id — stamped at construction for in-memory (static) declarations and assigned by the database once persisted. The id does NOT determine the entity's URI: static types resolve to their typename DXN, persisted types to echo:///<id> (see getTypeURIFromSpecifier).

    jsonSchema: JsonSchemaType
    name?: string