> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Socket messages

> Every message on a socket session's connection, in both directions, and its payload.

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

This connection delivers live updates of the AI chat for the apps a white-label session can watch. It uses Socket.IO, not a raw WebSocket. Connect with `io(socket_url, { path: socket_path, transports: ["websocket"], auth: { session_token } })`, using the values your server received from `POST /api/v1/socket-sessions`. Then send `join` for each app to receive the app's snapshot, followed by live events.

Available only to white-label workspaces on the Builder plan or higher, with live AI chat updates turned on. Ask your onboarding contact to turn them on for your workspace.

Send the session token in the Socket.IO CONNECT `auth` as `session_token`. A refused connection is a `connect_error` with `message: "connection_denied"` and `data: { retryable }`. If `retryable` is true, retry with backoff. Otherwise, ask your server for a new session.

One connection per session carries the events of every app it joins. In an event's `data`, a missing field is unchanged and an explicit `null` clears it. The `app.snapshot` event is the exception, since it replaces the app's state.

## Event format

Every event the server sends is an object with two fields:

<ResponseField name="room" type="string | null" required>
  The app the event belongs to, as `/apps/{app_id}`. It is `null` for `session.ended`, which concerns the whole session.
</ResponseField>

<ResponseField name="data" type="object" required>
  The event's payload. Its fields depend on the event.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "path": "/sign-in",
    "force": false,
    "branch_id": null
  }
}
```

## Events from the server

### `message.updated`

A chat message was added or replaced. Replace the message with the same `id`.

**`data` fields**

<ResponseField name="message" type="object" required>
  The message in full, as it now reads.

  <Expandable title="child attributes">
    <ResponseField name="id" type="string | null">
      ID of the message. An update carries the whole message again under the same ID.
    </ResponseField>

    <ResponseField name="role" type="'user' | 'assistant' | 'system' | null">
      Who sent the message. The value is `user` for a message a person sent and `assistant` for the AI's reply. Messages with the `system` role are never sent.
    </ResponseField>

    <ResponseField name="content" type="string | null">
      Text of the message. Attachments and structured content are left out.
    </ResponseField>

    <ResponseField name="tool_calls" type="object[] | null">
      The tool calls the AI made in this message, in order. Each is updated in place as it progresses.

      Every shape has these fields:

      <Expandable title="child attributes">
        <ResponseField name="id" type="string | null">
          ID of the call. Every update to the call carries the same ID.
        </ResponseField>

        <ResponseField name="requires_user_input" type="boolean | null">
          Whether the call has paused for the user's answer or approval. The value becomes `true` once it pauses and stays `true` after the user answers, so read `status` to know whether it's still waiting.
        </ResponseField>

        <ResponseField name="auto_approved" type="boolean | null">
          Whether the call skipped its approval because the app has Auto approve on. The value is `true` when the call needed approval but ran at once. It never paused, and its result is real.
        </ResponseField>

        <ResponseField name="status" type="'running' | 'success' | 'error' | 'stopped' | 'waiting_for_user_input' | null">
          State of the call. The value is `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, or `waiting_for_user_input` while it waits for the user's answer or approval.
        </ResponseField>

        <ResponseField name="mutation_applied" type="boolean | null">
          Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
        </ResponseField>

        <ResponseField name="waiting_on" type="object | null">
          What kind of answer the call waits for, while `status` is `waiting_for_user_input`.

          <Expandable title="child attributes">
            <ResponseField name="kind" type="'choice' | 'input' | 'approval'">
              What the call needs from the user. The value is `choice` to pick among options, `input` to supply values, or `approval` to approve or reject.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="approval" type="object | null">
          Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.

          One of these shapes, told apart by `guard`:

          <Expandable title="backend_function_entity_delete">
            Waiting for approval because testing a backend function would delete records from an entity.

            <ResponseField name="guard" type="'backend_function_entity_delete'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="function_name" type="string">
                  Backend function under test.
                </ResponseField>

                <ResponseField name="method" type="string">
                  Entity method the function calls.
                </ResponseField>

                <ResponseField name="inspection_failed" type="boolean">
                  The check could not verify the function's source.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="bash_approval">
            Waiting for approval because the AI wants to run a shell command that needs a review first. The command itself is not published.

            <ResponseField name="guard" type="'bash_approval'" required>
              The check that paused the call.
            </ResponseField>
          </Expandable>

          <Expandable title="entity_rls_guard">
            Waiting for approval because the AI wants to change who can read or write an entity's records.

            <ResponseField name="guard" type="'entity_rls_guard'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="entity_name" type="string">
                  Entity whose access rules change.
                </ResponseField>

                <ResponseField name="change_type" type="string">
                  How the access rules change.
                </ResponseField>

                <ResponseField name="changed_ops" type="string[]">
                  Access operations whose rules change.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_entity_mutation">
            Waiting for approval because the AI's code would update or delete records in an entity.

            <ResponseField name="guard" type="'exec_tool_entity_mutation'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="method" type="string">
                  Entity method the code calls, such as `delete`.
                </ResponseField>

                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_github_repo_write">
            Waiting for approval because the AI's code would write to a GitHub repository.

            <ResponseField name="guard" type="'exec_tool_github_repo_write'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_invite_user">
            Waiting for approval because the AI's code would invite someone to the app by email.

            <ResponseField name="guard" type="'exec_tool_invite_user'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_send_email">
            Waiting for approval because the AI's code would send an email.

            <ResponseField name="guard" type="'exec_tool_send_email'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_send_sms">
            Waiting for approval because the AI's code would send a text message.

            <ResponseField name="guard" type="'exec_tool_send_sms'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="any other approval">
            Waiting for approval from a check that publishes only its name.

            <ResponseField name="guard" type="string" required>
              The check that paused the call.

              Any value not matched by the other shapes.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      Each shape adds its own fields, told apart by `name`:

      <Expandable title="ask_clarifying_questions">
        The AI asks the user questions before it goes on. The call waits until the user answers.

        <ResponseField name="name" type="'ask_clarifying_questions'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="questions" type="object[]">
              Questions presented to the user.

              <Expandable title="child attributes">
                <ResponseField name="question" type="string">
                  Visible question text.
                </ResponseField>

                <ResponseField name="type" type="string">
                  Question category, such as `text`.
                </ResponseField>

                <ResponseField name="description" type="string">
                  Supporting text.
                </ResponseField>

                <ResponseField name="multi_select" type="boolean">
                  More than one answer may be selected.
                </ResponseField>

                <ResponseField name="covers" type="string">
                  Plan section the question covers.
                </ResponseField>

                <ResponseField name="options" type="(string | object)[]">
                  Selectable options. A bare string is its label.

                  <Expandable title="child attributes">
                    <ResponseField name="label" type="string">
                      Visible option label.
                    </ResponseField>
                  </Expandable>
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="user_input" type="object | null">
          The user's answer to the call, once given, for tools that take one.

          <Expandable title="child attributes">
            <ResponseField name="answers" type="object[]">
              Answers supplied to the question card.

              <Expandable title="child attributes">
                <ResponseField name="question_index" type="integer">
                  Zero-based question index.
                </ResponseField>

                <ResponseField name="selected_label" type="string">
                  Label selected for a single-select question.
                </ResponseField>

                <ResponseField name="selected_labels" type="string[]">
                  Labels selected for a multi-select question.
                </ResponseField>

                <ResponseField name="custom_text" type="string">
                  Free-text answer. Structural filtering does not redact prose.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="ask_plan_questions">
        The AI asks the user questions that shape the plan, in plan mode. The call waits until the user answers.

        <ResponseField name="name" type="'ask_plan_questions'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="questions" type="object[]">
              Questions presented to the user.

              <Expandable title="child attributes">
                <ResponseField name="question" type="string">
                  Visible question text.
                </ResponseField>

                <ResponseField name="type" type="string">
                  Question category, such as `text`.
                </ResponseField>

                <ResponseField name="description" type="string">
                  Supporting text.
                </ResponseField>

                <ResponseField name="multi_select" type="boolean">
                  More than one answer may be selected.
                </ResponseField>

                <ResponseField name="covers" type="string">
                  Plan section the question covers.
                </ResponseField>

                <ResponseField name="options" type="(string | object)[]">
                  Selectable options. A bare string is its label.

                  <Expandable title="child attributes">
                    <ResponseField name="label" type="string">
                      Visible option label.
                    </ResponseField>
                  </Expandable>
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="user_input" type="object | null">
          The user's answer to the call, once given, for tools that take one.

          <Expandable title="child attributes">
            <ResponseField name="answers" type="object[]">
              Answers supplied to the question card.

              <Expandable title="child attributes">
                <ResponseField name="question_index" type="integer">
                  Zero-based question index.
                </ResponseField>

                <ResponseField name="selected_label" type="string">
                  Label selected for a single-select question.
                </ResponseField>

                <ResponseField name="selected_labels" type="string[]">
                  Labels selected for a multi-select question.
                </ResponseField>

                <ResponseField name="custom_text" type="string">
                  Free-text answer. Structural filtering does not redact prose.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="bash">
        The AI runs a shell command in the app's sandbox.

        <ResponseField name="name" type="'bash'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Commands and output are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="create_entity_records">
        The AI adds records to one of the app's entities.

        <ResponseField name="name" type="'create_entity_records'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="entity_name" type="string">
              Entity type. Records and query values are never included.
            </ResponseField>

            <ResponseField name="record_count" type="integer">
              Number of records created.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="delete_entities">
        The AI deletes records from one of the app's entities.

        <ResponseField name="name" type="'delete_entities'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              The agent's summary of the change. Queries and record values are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="entity_name" type="string">
              Entity type. Records and query values are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="delete_file">
        The AI deletes a file from the app.

        <ResponseField name="name" type="'delete_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="edit_repo_file">
        The AI edits a file in the imported repository.

        <ResponseField name="name" type="'edit_repo_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="exec_tool">
        The AI runs code against the app's data and integrations.

        <ResponseField name="name" type="'exec_tool'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Code and output are never included.
            </ResponseField>

            <ResponseField name="writes_entities" type="boolean">
              The code changed entity data, so refresh the preview.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="find_replace">
        The AI edits files by replacing text in them.

        <ResponseField name="name" type="'find_replace'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="generate_game_background">
        The AI generates a background image for a game. An `image.resolved` event follows when it is ready.

        <ResponseField name="name" type="'generate_game_background'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="results" type="string | null">
          The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
        </ResponseField>
      </Expandable>

      <Expandable title="generate_game_image">
        The AI generates an image asset for a game. An `image.resolved` event follows when it is ready.

        <ResponseField name="name" type="'generate_game_image'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="aspect_ratio" type="string">
              Requested aspect ratio, such as `1:1`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="results" type="string | null">
          The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
        </ResponseField>
      </Expandable>

      <Expandable title="generate_image">
        The AI generates an image for the app. An `image.resolved` event follows when it is ready.

        <ResponseField name="name" type="'generate_image'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="label" type="string">
              Visible media label.
            </ResponseField>

            <ResponseField name="aspect_ratio" type="string">
              Requested aspect ratio, such as `16:9`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="results" type="object | null">
          The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.

          <Expandable title="child attributes">
            <ResponseField name="placeholder_url" type="string">
              Placeholder URL, used to associate an `image.resolved` event with this tool.
            </ResponseField>

            <ResponseField name="status" type="'pending' | 'completed' | 'failed'">
              Current generation status.
            </ResponseField>

            <ResponseField name="image_url" type="string | null">
              Generated image URL, once available.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="generate_prd">
        The AI writes down the plan it settled with the user. In plan mode this call carries the plan itself.

        <ResponseField name="name" type="'generate_prd'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="app_name" type="string">
              App or feature name.
            </ResponseField>

            <ResponseField name="intent_and_goal" type="string">
              What is being built and why.
            </ResponseField>

            <ResponseField name="audience_and_roles" type="string">
              Who uses it and their roles.
            </ResponseField>

            <ResponseField name="core_flows" type="string[]">
              End-to-end user flows.
            </ResponseField>

            <ResponseField name="technical_requirements" type="string">
              Specific technical requirements.
            </ResponseField>

            <ResponseField name="design_preferences" type="string">
              Design preferences.
            </ResponseField>

            <ResponseField name="prd_type" type="string">
              Build or plan declaration, when the AI asks for one.
            </ResponseField>

            <ResponseField name="store_platform" type="string">
              Store platform settled in planning, for e-commerce plans.
            </ResponseField>

            <ResponseField name="game_engine" type="string">
              Engine settled in planning, for game plans.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="generate_video">
        The AI generates a video for the app.

        <ResponseField name="name" type="'generate_video'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="label" type="string">
              Visible media label.
            </ResponseField>

            <ResponseField name="aspect_ratio" type="string">
              Requested aspect ratio, such as `16:9`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="results" type="string | null">
          The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
        </ResponseField>
      </Expandable>

      <Expandable title="install_npm_package">
        The AI installs or removes npm packages in the app.

        <ResponseField name="name" type="'install_npm_package'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="packages" type="object[]">
              Requested package operations.

              <Expandable title="child attributes">
                <ResponseField name="name" type="string">
                  Package name.
                </ResponseField>

                <ResponseField name="action" type="string">
                  Requested operation, such as `install`.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="preview_execute_code">
        The AI runs code inside the app preview to inspect it.

        <ResponseField name="name" type="'preview_execute_code'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Code and output are never included.
            </ResponseField>

            <ResponseField name="writes_entities" type="boolean">
              The code changed entity data, so refresh the preview.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="preview_screenshot">
        The AI takes a screenshot of the app preview to check its work.

        <ResponseField name="name" type="'preview_screenshot'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Commands and output are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="read_only_exec_tool">
        The AI runs code that only reads the app's data.

        <ResponseField name="name" type="'read_only_exec_tool'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Code and output are never included.
            </ResponseField>

            <ResponseField name="writes_entities" type="boolean">
              The code changed entity data, so refresh the preview.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="read_repo_file">
        The AI reads a file in the imported repository.

        <ResponseField name="name" type="'read_repo_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="run_shell_command">
        The AI runs a shell command in the imported repository's sandbox.

        <ResponseField name="name" type="'run_shell_command'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Commands and output are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="set_secrets">
        The AI asks the user for secret values, such as API keys. The call waits until the user supplies them.

        <ResponseField name="name" type="'set_secrets'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="secrets_schema" type="object[]">
              Requested secrets.

              <Expandable title="child attributes">
                <ResponseField name="secretName" type="string">
                  Requested secret name.
                </ResponseField>

                <ResponseField name="description" type="string">
                  Where to obtain it.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="update_entities">
        The AI updates records in one of the app's entities.

        <ResponseField name="name" type="'update_entities'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              The agent's summary of the change. Queries and record values are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="entity_name" type="string">
              Entity type. Records and query values are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="update_plan">
        The AI adds settled points to the plan.

        <ResponseField name="name" type="'update_plan'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="updates" type="object[]">
              Plan updates in their emitted order.

              <Expandable title="child attributes">
                <ResponseField name="action" type="string">
                  Update action.
                </ResponseField>

                <ResponseField name="section" type="string">
                  Plan section key.
                </ResponseField>

                <ResponseField name="section_label" type="string">
                  User-facing section label.
                </ResponseField>

                <ResponseField name="text" type="string">
                  Plan point.
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="sections_with_enough" type="string[]">
              Base plan sections the AI considers sufficiently specified.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="write_file">
        The AI writes a file in the app.

        <ResponseField name="name" type="'write_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="write_repo_file">
        The AI writes a file in the imported repository.

        <ResponseField name="name" type="'write_repo_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="any other tool call">
        A call to any other tool. Only its name and progress are published.

        <ResponseField name="name" type="string" required>
          The tool that was called.

          Any value not matched by the other shapes.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="checkpoint_id" type="string | null">
      ID of the checkpoint tied to the message. On a message a person sent it holds the app before the turn, on the AI's final reply the app after it. Absent when the turn made no checkpoint.
    </ResponseField>

    <ResponseField name="metadata" type="object | null">
      When the message was created.

      <Expandable title="child attributes">
        <ResponseField name="created_date" type="string<date-time> | null">
          Time the message was created, as a UTC timestamp in ISO 8601 format.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="additional_message_params" type="object | null">
      Flags on the message, such as plan mode. Only the flags listed here are published.

      <Expandable title="child attributes">
        <ResponseField name="client_creation_id" type="string">
          Identifier the sending client attached, to match its optimistic message.
        </ResponseField>

        <ResponseField name="plan_mode" type="boolean">
          The message was sent in plan mode.
        </ResponseField>

        <ResponseField name="plan_approved" type="boolean">
          The message approves a plan.
        </ResponseField>

        <ResponseField name="skip_ai_response" type="boolean">
          The message expects no AI reply.
        </ResponseField>

        <ResponseField name="system_message_type" type="string">
          System message category.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="conversation_id" type="string | null">
  ID of the conversation the message belongs to. Each branch has its own conversation, so a viewer showing one branch can drop another branch's messages.
</ResponseField>

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "message": {
      "id": "c4f2a8e1-6b3d-4f9a-8e2c-1d7b5a9f3e60",
      "role": "assistant",
      "content": "I added a sign-in page with email and Google.",
      "tool_calls": [
        {
          "id": "toolu_01HXq8",
          "name": "write_file",
          "requires_user_input": false,
          "auto_approved": false,
          "status": "success",
          "mutation_applied": null,
          "display": {
            "file_paths": [
              "src/pages/SignIn.jsx"
            ]
          }
        }
      ],
      "checkpoint_id": "68f1c2d4e7b91d003c45a1f9",
      "metadata": {
        "created_date": "2026-10-10T09:23:41"
      }
    },
    "conversation_id": "68f1c2d4e7b91d003c45a1f2",
    "branch_id": null
  }
}
```

### `message.removed`

A chat message was removed or hidden. An `id` the viewer never saw is a no-op.

**`data` fields**

<ResponseField name="message_id" type="string" required>
  ID of the removed message.
</ResponseField>

<ResponseField name="conversation_id" type="string | null">
  ID of the conversation the message belongs to. Each branch has its own conversation, so a viewer showing one branch can drop another branch's messages.
</ResponseField>

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "message_id": "c4f2a8e1-6b3d-4f9a-8e2c-1d7b5a9f3e60",
    "conversation_id": "68f1c2d4e7b91d003c45a1f2",
    "branch_id": null
  }
}
```

### `app.status_changed`

The AI started, finished, or failed a turn. Null status clears it.

**`data` fields**

<ResponseField name="status" type="object | null" required>
  The new status, or `null` when the status was cleared.

  <Expandable title="child attributes">
    <ResponseField name="state" type="'ready' | 'processing' | 'error' | null">
      Where the app is in its build lifecycle. Ready means idle with no build in progress, processing means the app is being generated or modified, and error means the last build failed. This tracks building, not publishing.
    </ResponseField>

    <ResponseField name="turn_id" type="string | null">
      ID of the user message whose turn the status belongs to.
    </ResponseField>

    <ResponseField name="last_updated_date" type="string<date-time> | null">
      Time the status was last updated, as a UTC timestamp in ISO 8601 format.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "status": {
      "state": "processing",
      "turn_id": "c4f2a8e1-6b3d-4f9a-8e2c-1d7b5a9f3e60",
      "last_updated_date": "2026-10-10T09:23:41Z"
    },
    "branch_id": null
  }
}
```

### `preview.reload_requested`

Reload the app preview.

**`data` fields**

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "branch_id": null
  }
}
```

### `preview.navigation_requested`

Show this page of the app in the preview.

**`data` fields**

<ResponseField name="path" type="string" required>
  Path of the page to show, relative to the app's root, such as `/settings`.
</ResponseField>

<ResponseField name="force" type="boolean" required>
  Navigate even when the user has moved away from the page.
</ResponseField>

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "path": "/sign-in",
    "force": false,
    "branch_id": null
  }
}
```

### `queue.updated`

The whole prompt queue, after any change.

**`data` fields**

<ResponseField name="items" type="object[] | null">
  Queued prompts, in the order they will run.

  <Expandable title="child attributes">
    <ResponseField name="id" type="string | null">
      ID of the queued prompt.
    </ResponseField>

    <ResponseField name="content" type="string | null">
      Text of the prompt.
    </ResponseField>

    <ResponseField name="branch_id" type="string | null">
      ID of the branch the prompt runs on, or `null` for the main branch.
    </ResponseField>

    <ResponseField name="created_at" type="string | null">
      Time the prompt was queued, as a UTC timestamp in ISO 8601 format.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="is_paused" type="boolean | null">
  Whether the queue is paused, so queued prompts wait. A person can pause it, and Base44 pauses it while the AI waits for an answer.
</ResponseField>

<ResponseField name="processed_item_id" type="string | null">
  ID of the queued prompt the AI just picked up to run. Absent when a prompt was added, removed, or cleared.
</ResponseField>

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "items": [
      {
        "id": "q_7d1e9c",
        "content": "Add a dark mode toggle to the header.",
        "branch_id": null,
        "created_at": "2026-10-10T09:24:05+00:00"
      }
    ],
    "is_paused": false,
    "branch_id": null
  }
}
```

### `task.progressed`

Progress of a long-running tool, by `tool_call_id`.

**`data` fields**

<ResponseField name="tool_call_id" type="string | null">
  ID of the tool call that started the task.
</ResponseField>

<ResponseField name="message_id" type="string | null">
  ID of the message that holds that tool call.
</ResponseField>

<ResponseField name="event_type" type="'task_started' | 'task_progress' | 'task_completed' | 'task_failed' | 'task_cancelled' | null">
  Kind of progress update. The value is `task_started`, `task_progress`, `task_completed`, `task_failed`, or `task_cancelled`.
</ResponseField>

<ResponseField name="progress" type="object | null">
  Progress so far.

  <Expandable title="child attributes">
    <ResponseField name="current" type="integer | null">
      Items processed so far.
    </ResponseField>

    <ResponseField name="total" type="integer | null">
      Items to process in all.
    </ResponseField>

    <ResponseField name="percentage" type="number | null">
      Share of the work done, from 0 to 100.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "tool_call_id": "toolu_01HXq8",
    "message_id": "c4f2a8e1-6b3d-4f9a-8e2c-1d7b5a9f3e60",
    "event_type": "task_progress",
    "progress": {
      "current": 250,
      "total": 1000,
      "percentage": 25
    },
    "branch_id": null
  }
}
```

### `image.resolved`

A generated image finished or failed. Replace its `placeholder_url` wherever it appears.

**`data` fields**

<ResponseField name="status" type="'pending' | 'completed' | 'failed' | null">
  State of the image. The value is `pending` while the image generates, `completed` once `image_url` is ready, or `failed` when generation failed.
</ResponseField>

<ResponseField name="placeholder_url" type="string | null">
  Placeholder URL the app shows while the image generates. Match it to find where the image appears.
</ResponseField>

<ResponseField name="image_url" type="string | null">
  URL of the finished image, or `null` while it is pending or after it failed.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "status": "completed",
    "placeholder_url": "/__generating__/5e8b2f4a-1c3d-4e6f-9a7b-2d4c6e8f0a1b.png",
    "image_url": "https://media.base44.com/images/public/6a2024af837c7a06c83021c1/hero.png"
  }
}
```

### `conversation.changed`

The conversation was rewritten by an undo, restore, or sync. Rejoin the room for a fresh snapshot.

**`data` fields**

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "branch_id": null
  }
}
```

### `files.changed`

The app's files changed outside a chat turn.

**`data` fields**

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "branch_id": null
  }
}
```

### `branch.deleted`

A branch was deleted.

**`data` fields**

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "branch_id": "68f1c2d4e7b91d003c45a1fa"
  }
}
```

### `repository.changed`

The imported app's repository changed.

**`data` fields**

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "branch_id": null
  }
}
```

### `pull_request.changed`

The imported app's pull request changed.

**`data` fields**

<ResponseField name="branch_id" type="string | null">
  ID of the branch the change belongs to. Omitted or `null` means the main branch.
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "branch_id": "68f1c2d4e7b91d003c45a1fa"
  }
}
```

### `session.ended`

The session ended because it expired, was revoked, or was taken by a newer socket. The socket disconnects next.

**`data` fields**

<ResponseField name="reason" type="'expired' | 'revoked' | 'replaced'" required>
  Why the session ended. When it's `expired`, ask your server for a new session. When it's `revoked`, your server or an admin ended it, so don't reconnect. When it's `replaced`, a newer socket took the session, so stop.
</ResponseField>

```json Example theme={null}
{
  "room": null,
  "data": {
    "reason": "revoked"
  }
}
```

### `room.access_denied`

A join was refused because the app is not on the session's allowlist, or the socket joins too often.

**`data` fields**

The `data` object is empty.

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {}
}
```

### `room.access_revoked`

The app left the session's allowlist, or its workspace. Events for it stop. Do not rejoin.

**`data` fields**

The `data` object is empty.

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {}
}
```

### `room.snapshot_unavailable`

The join held but its snapshot failed. Live events still arrive. Rejoin later for a snapshot.

**`data` fields**

The `data` object is empty.

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {}
}
```

### `app.snapshot`

The app's current status and its last 50 public messages, after every join. Replace the app's state with it.

**`data` fields**

<ResponseField name="status" type="object | null" required>
  The app's build status, or `null` when none is recorded.

  <Expandable title="child attributes">
    <ResponseField name="state" type="'ready' | 'processing' | 'error' | null">
      Where the app is in its build lifecycle. Ready means idle with no build in progress, processing means the app is being generated or modified, and error means the last build failed. This tracks building, not publishing.
    </ResponseField>

    <ResponseField name="turn_id" type="string | null">
      ID of the user message whose turn the status belongs to.
    </ResponseField>

    <ResponseField name="last_updated_date" type="string<date-time> | null">
      Time the status was last updated, as a UTC timestamp in ISO 8601 format.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="messages" type="object[]" required>
  The last 50 messages, oldest first.

  <Expandable title="child attributes">
    <ResponseField name="id" type="string | null">
      ID of the message. An update carries the whole message again under the same ID.
    </ResponseField>

    <ResponseField name="role" type="'user' | 'assistant' | 'system' | null">
      Who sent the message. The value is `user` for a message a person sent and `assistant` for the AI's reply. Messages with the `system` role are never sent.
    </ResponseField>

    <ResponseField name="content" type="string | null">
      Text of the message. Attachments and structured content are left out.
    </ResponseField>

    <ResponseField name="tool_calls" type="object[] | null">
      The tool calls the AI made in this message, in order. Each is updated in place as it progresses.

      Every shape has these fields:

      <Expandable title="child attributes">
        <ResponseField name="id" type="string | null">
          ID of the call. Every update to the call carries the same ID.
        </ResponseField>

        <ResponseField name="requires_user_input" type="boolean | null">
          Whether the call has paused for the user's answer or approval. The value becomes `true` once it pauses and stays `true` after the user answers, so read `status` to know whether it's still waiting.
        </ResponseField>

        <ResponseField name="auto_approved" type="boolean | null">
          Whether the call skipped its approval because the app has Auto approve on. The value is `true` when the call needed approval but ran at once. It never paused, and its result is real.
        </ResponseField>

        <ResponseField name="status" type="'running' | 'success' | 'error' | 'stopped' | 'waiting_for_user_input' | null">
          State of the call. The value is `running` while the tool works, `success` or `error` once it finished, `stopped` when the user stopped the turn, or `waiting_for_user_input` while it waits for the user's answer or approval.
        </ResponseField>

        <ResponseField name="mutation_applied" type="boolean | null">
          Whether the call changed the app or its data. `false` means it finished without changing anything. `null` means the tool did not report it, so whether it changed anything is unknown.
        </ResponseField>

        <ResponseField name="waiting_on" type="object | null">
          What kind of answer the call waits for, while `status` is `waiting_for_user_input`.

          <Expandable title="child attributes">
            <ResponseField name="kind" type="'choice' | 'input' | 'approval'">
              What the call needs from the user. The value is `choice` to pick among options, `input` to supply values, or `approval` to approve or reject.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="approval" type="object | null">
          Why the call waits for approval, from the check that paused it. Present only while `status` is `waiting_for_user_input`.

          One of these shapes, told apart by `guard`:

          <Expandable title="backend_function_entity_delete">
            Waiting for approval because testing a backend function would delete records from an entity.

            <ResponseField name="guard" type="'backend_function_entity_delete'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="function_name" type="string">
                  Backend function under test.
                </ResponseField>

                <ResponseField name="method" type="string">
                  Entity method the function calls.
                </ResponseField>

                <ResponseField name="inspection_failed" type="boolean">
                  The check could not verify the function's source.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="bash_approval">
            Waiting for approval because the AI wants to run a shell command that needs a review first. The command itself is not published.

            <ResponseField name="guard" type="'bash_approval'" required>
              The check that paused the call.
            </ResponseField>
          </Expandable>

          <Expandable title="entity_rls_guard">
            Waiting for approval because the AI wants to change who can read or write an entity's records.

            <ResponseField name="guard" type="'entity_rls_guard'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="entity_name" type="string">
                  Entity whose access rules change.
                </ResponseField>

                <ResponseField name="change_type" type="string">
                  How the access rules change.
                </ResponseField>

                <ResponseField name="changed_ops" type="string[]">
                  Access operations whose rules change.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_entity_mutation">
            Waiting for approval because the AI's code would update or delete records in an entity.

            <ResponseField name="guard" type="'exec_tool_entity_mutation'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="method" type="string">
                  Entity method the code calls, such as `delete`.
                </ResponseField>

                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_github_repo_write">
            Waiting for approval because the AI's code would write to a GitHub repository.

            <ResponseField name="guard" type="'exec_tool_github_repo_write'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_invite_user">
            Waiting for approval because the AI's code would invite someone to the app by email.

            <ResponseField name="guard" type="'exec_tool_invite_user'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_send_email">
            Waiting for approval because the AI's code would send an email.

            <ResponseField name="guard" type="'exec_tool_send_email'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="exec_tool_send_sms">
            Waiting for approval because the AI's code would send a text message.

            <ResponseField name="guard" type="'exec_tool_send_sms'" required>
              The check that paused the call.
            </ResponseField>

            <ResponseField name="reason" type="string | null">
              Why the call needs approval, as the check explained it.
            </ResponseField>

            <ResponseField name="details" type="object | null">
              What the check found.

              <Expandable title="child attributes">
                <ResponseField name="summary" type="string">
                  The agent's summary of what the code does.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>

          <Expandable title="any other approval">
            Waiting for approval from a check that publishes only its name.

            <ResponseField name="guard" type="string" required>
              The check that paused the call.

              Any value not matched by the other shapes.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      Each shape adds its own fields, told apart by `name`:

      <Expandable title="ask_clarifying_questions">
        The AI asks the user questions before it goes on. The call waits until the user answers.

        <ResponseField name="name" type="'ask_clarifying_questions'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="questions" type="object[]">
              Questions presented to the user.

              <Expandable title="child attributes">
                <ResponseField name="question" type="string">
                  Visible question text.
                </ResponseField>

                <ResponseField name="type" type="string">
                  Question category, such as `text`.
                </ResponseField>

                <ResponseField name="description" type="string">
                  Supporting text.
                </ResponseField>

                <ResponseField name="multi_select" type="boolean">
                  More than one answer may be selected.
                </ResponseField>

                <ResponseField name="covers" type="string">
                  Plan section the question covers.
                </ResponseField>

                <ResponseField name="options" type="(string | object)[]">
                  Selectable options. A bare string is its label.

                  <Expandable title="child attributes">
                    <ResponseField name="label" type="string">
                      Visible option label.
                    </ResponseField>
                  </Expandable>
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="user_input" type="object | null">
          The user's answer to the call, once given, for tools that take one.

          <Expandable title="child attributes">
            <ResponseField name="answers" type="object[]">
              Answers supplied to the question card.

              <Expandable title="child attributes">
                <ResponseField name="question_index" type="integer">
                  Zero-based question index.
                </ResponseField>

                <ResponseField name="selected_label" type="string">
                  Label selected for a single-select question.
                </ResponseField>

                <ResponseField name="selected_labels" type="string[]">
                  Labels selected for a multi-select question.
                </ResponseField>

                <ResponseField name="custom_text" type="string">
                  Free-text answer. Structural filtering does not redact prose.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="ask_plan_questions">
        The AI asks the user questions that shape the plan, in plan mode. The call waits until the user answers.

        <ResponseField name="name" type="'ask_plan_questions'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="questions" type="object[]">
              Questions presented to the user.

              <Expandable title="child attributes">
                <ResponseField name="question" type="string">
                  Visible question text.
                </ResponseField>

                <ResponseField name="type" type="string">
                  Question category, such as `text`.
                </ResponseField>

                <ResponseField name="description" type="string">
                  Supporting text.
                </ResponseField>

                <ResponseField name="multi_select" type="boolean">
                  More than one answer may be selected.
                </ResponseField>

                <ResponseField name="covers" type="string">
                  Plan section the question covers.
                </ResponseField>

                <ResponseField name="options" type="(string | object)[]">
                  Selectable options. A bare string is its label.

                  <Expandable title="child attributes">
                    <ResponseField name="label" type="string">
                      Visible option label.
                    </ResponseField>
                  </Expandable>
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="user_input" type="object | null">
          The user's answer to the call, once given, for tools that take one.

          <Expandable title="child attributes">
            <ResponseField name="answers" type="object[]">
              Answers supplied to the question card.

              <Expandable title="child attributes">
                <ResponseField name="question_index" type="integer">
                  Zero-based question index.
                </ResponseField>

                <ResponseField name="selected_label" type="string">
                  Label selected for a single-select question.
                </ResponseField>

                <ResponseField name="selected_labels" type="string[]">
                  Labels selected for a multi-select question.
                </ResponseField>

                <ResponseField name="custom_text" type="string">
                  Free-text answer. Structural filtering does not redact prose.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="bash">
        The AI runs a shell command in the app's sandbox.

        <ResponseField name="name" type="'bash'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Commands and output are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="create_entity_records">
        The AI adds records to one of the app's entities.

        <ResponseField name="name" type="'create_entity_records'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="entity_name" type="string">
              Entity type. Records and query values are never included.
            </ResponseField>

            <ResponseField name="record_count" type="integer">
              Number of records created.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="delete_entities">
        The AI deletes records from one of the app's entities.

        <ResponseField name="name" type="'delete_entities'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              The agent's summary of the change. Queries and record values are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="entity_name" type="string">
              Entity type. Records and query values are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="delete_file">
        The AI deletes a file from the app.

        <ResponseField name="name" type="'delete_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="edit_repo_file">
        The AI edits a file in the imported repository.

        <ResponseField name="name" type="'edit_repo_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="exec_tool">
        The AI runs code against the app's data and integrations.

        <ResponseField name="name" type="'exec_tool'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Code and output are never included.
            </ResponseField>

            <ResponseField name="writes_entities" type="boolean">
              The code changed entity data, so refresh the preview.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="find_replace">
        The AI edits files by replacing text in them.

        <ResponseField name="name" type="'find_replace'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="generate_game_background">
        The AI generates a background image for a game. An `image.resolved` event follows when it is ready.

        <ResponseField name="name" type="'generate_game_background'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="results" type="string | null">
          The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
        </ResponseField>
      </Expandable>

      <Expandable title="generate_game_image">
        The AI generates an image asset for a game. An `image.resolved` event follows when it is ready.

        <ResponseField name="name" type="'generate_game_image'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="aspect_ratio" type="string">
              Requested aspect ratio, such as `1:1`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="results" type="string | null">
          The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
        </ResponseField>
      </Expandable>

      <Expandable title="generate_image">
        The AI generates an image for the app. An `image.resolved` event follows when it is ready.

        <ResponseField name="name" type="'generate_image'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="label" type="string">
              Visible media label.
            </ResponseField>

            <ResponseField name="aspect_ratio" type="string">
              Requested aspect ratio, such as `16:9`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="results" type="object | null">
          The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.

          <Expandable title="child attributes">
            <ResponseField name="placeholder_url" type="string">
              Placeholder URL, used to associate an `image.resolved` event with this tool.
            </ResponseField>

            <ResponseField name="status" type="'pending' | 'completed' | 'failed'">
              Current generation status.
            </ResponseField>

            <ResponseField name="image_url" type="string | null">
              Generated image URL, once available.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="generate_prd">
        The AI writes down the plan it settled with the user. In plan mode this call carries the plan itself.

        <ResponseField name="name" type="'generate_prd'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="app_name" type="string">
              App or feature name.
            </ResponseField>

            <ResponseField name="intent_and_goal" type="string">
              What is being built and why.
            </ResponseField>

            <ResponseField name="audience_and_roles" type="string">
              Who uses it and their roles.
            </ResponseField>

            <ResponseField name="core_flows" type="string[]">
              End-to-end user flows.
            </ResponseField>

            <ResponseField name="technical_requirements" type="string">
              Specific technical requirements.
            </ResponseField>

            <ResponseField name="design_preferences" type="string">
              Design preferences.
            </ResponseField>

            <ResponseField name="prd_type" type="string">
              Build or plan declaration, when the AI asks for one.
            </ResponseField>

            <ResponseField name="store_platform" type="string">
              Store platform settled in planning, for e-commerce plans.
            </ResponseField>

            <ResponseField name="game_engine" type="string">
              Engine settled in planning, for game plans.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="generate_video">
        The AI generates a video for the app.

        <ResponseField name="name" type="'generate_video'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="label" type="string">
              Visible media label.
            </ResponseField>

            <ResponseField name="aspect_ratio" type="string">
              Requested aspect ratio, such as `16:9`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="results" type="string | null">
          The tool's result, narrowed to what this tool publishes. Absent while the call waits for approval.
        </ResponseField>
      </Expandable>

      <Expandable title="install_npm_package">
        The AI installs or removes npm packages in the app.

        <ResponseField name="name" type="'install_npm_package'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="packages" type="object[]">
              Requested package operations.

              <Expandable title="child attributes">
                <ResponseField name="name" type="string">
                  Package name.
                </ResponseField>

                <ResponseField name="action" type="string">
                  Requested operation, such as `install`.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="preview_execute_code">
        The AI runs code inside the app preview to inspect it.

        <ResponseField name="name" type="'preview_execute_code'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Code and output are never included.
            </ResponseField>

            <ResponseField name="writes_entities" type="boolean">
              The code changed entity data, so refresh the preview.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="preview_screenshot">
        The AI takes a screenshot of the app preview to check its work.

        <ResponseField name="name" type="'preview_screenshot'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Commands and output are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="read_only_exec_tool">
        The AI runs code that only reads the app's data.

        <ResponseField name="name" type="'read_only_exec_tool'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Code and output are never included.
            </ResponseField>

            <ResponseField name="writes_entities" type="boolean">
              The code changed entity data, so refresh the preview.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="read_repo_file">
        The AI reads a file in the imported repository.

        <ResponseField name="name" type="'read_repo_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="run_shell_command">
        The AI runs a shell command in the imported repository's sandbox.

        <ResponseField name="name" type="'run_shell_command'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              Reviewed activity summary. Commands and output are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="set_secrets">
        The AI asks the user for secret values, such as API keys. The call waits until the user supplies them.

        <ResponseField name="name" type="'set_secrets'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="secrets_schema" type="object[]">
              Requested secrets.

              <Expandable title="child attributes">
                <ResponseField name="secretName" type="string">
                  Requested secret name.
                </ResponseField>

                <ResponseField name="description" type="string">
                  Where to obtain it.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="update_entities">
        The AI updates records in one of the app's entities.

        <ResponseField name="name" type="'update_entities'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="summary" type="string">
              The agent's summary of the change. Queries and record values are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="entity_name" type="string">
              Entity type. Records and query values are never included.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="update_plan">
        The AI adds settled points to the plan.

        <ResponseField name="name" type="'update_plan'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="arguments" type="object | null">
          What the AI asked the tool to do, narrowed to what this tool publishes.

          <Expandable title="child attributes">
            <ResponseField name="updates" type="object[]">
              Plan updates in their emitted order.

              <Expandable title="child attributes">
                <ResponseField name="action" type="string">
                  Update action.
                </ResponseField>

                <ResponseField name="section" type="string">
                  Plan section key.
                </ResponseField>

                <ResponseField name="section_label" type="string">
                  User-facing section label.
                </ResponseField>

                <ResponseField name="text" type="string">
                  Plan point.
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="sections_with_enough" type="string[]">
              Base plan sections the AI considers sufficiently specified.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="write_file">
        The AI writes a file in the app.

        <ResponseField name="name" type="'write_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="write_repo_file">
        The AI writes a file in the imported repository.

        <ResponseField name="name" type="'write_repo_file'" required>
          The tool that was called.
        </ResponseField>

        <ResponseField name="display" type="object | null">
          What the tool touched, for showing its progress. Never file contents or commands.

          <Expandable title="child attributes">
            <ResponseField name="file_paths" type="string[]">
              Changed file paths. Source bodies and diffs are never included.
            </ResponseField>

            <ResponseField name="content_empty" type="boolean">
              A write intentionally used empty content.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>

      <Expandable title="any other tool call">
        A call to any other tool. Only its name and progress are published.

        <ResponseField name="name" type="string" required>
          The tool that was called.

          Any value not matched by the other shapes.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="checkpoint_id" type="string | null">
      ID of the checkpoint tied to the message. On a message a person sent it holds the app before the turn, on the AI's final reply the app after it. Absent when the turn made no checkpoint.
    </ResponseField>

    <ResponseField name="metadata" type="object | null">
      When the message was created.

      <Expandable title="child attributes">
        <ResponseField name="created_date" type="string<date-time> | null">
          Time the message was created, as a UTC timestamp in ISO 8601 format.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="additional_message_params" type="object | null">
      Flags on the message, such as plan mode. Only the flags listed here are published.

      <Expandable title="child attributes">
        <ResponseField name="client_creation_id" type="string">
          Identifier the sending client attached, to match its optimistic message.
        </ResponseField>

        <ResponseField name="plan_mode" type="boolean">
          The message was sent in plan mode.
        </ResponseField>

        <ResponseField name="plan_approved" type="boolean">
          The message approves a plan.
        </ResponseField>

        <ResponseField name="skip_ai_response" type="boolean">
          The message expects no AI reply.
        </ResponseField>

        <ResponseField name="system_message_type" type="string">
          System message category.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="queue" type="object" required>
  The main branch's prompt queue.

  <Expandable title="child attributes">
    <ResponseField name="items" type="object[] | null">
      Queued prompts, in the order they will run.

      <Expandable title="child attributes">
        <ResponseField name="id" type="string | null">
          ID of the queued prompt.
        </ResponseField>

        <ResponseField name="content" type="string | null">
          Text of the prompt.
        </ResponseField>

        <ResponseField name="branch_id" type="string | null">
          ID of the branch the prompt runs on, or `null` for the main branch.
        </ResponseField>

        <ResponseField name="created_at" type="string | null">
          Time the prompt was queued, as a UTC timestamp in ISO 8601 format.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="is_paused" type="boolean | null">
      Whether the queue is paused, so queued prompts wait. A person can pause it, and Base44 pauses it while the AI waits for an answer.
    </ResponseField>
  </Expandable>
</ResponseField>

```json Example theme={null}
{
  "room": "/apps/6a2024af837c7a06c83021c1",
  "data": {
    "status": {
      "state": "ready",
      "turn_id": "c4f2a8e1-6b3d-4f9a-8e2c-1d7b5a9f3e60",
      "last_updated_date": "2026-10-10T09:23:41Z"
    },
    "messages": [
      {
        "id": "c4f2a8e1-6b3d-4f9a-8e2c-1d7b5a9f3e60",
        "role": "assistant",
        "content": "I added a sign-in page with email and Google.",
        "tool_calls": [
          {
            "id": "toolu_01HXq8",
            "name": "write_file",
            "requires_user_input": false,
            "auto_approved": false,
            "status": "success",
            "mutation_applied": null,
            "display": {
              "file_paths": [
                "src/pages/SignIn.jsx"
              ]
            }
          }
        ],
        "checkpoint_id": "68f1c2d4e7b91d003c45a1f9",
        "metadata": {
          "created_date": "2026-10-10T09:23:41"
        }
      }
    ],
    "queue": {
      "items": [
        {
          "id": "q_7d1e9c",
          "content": "Add a dark mode toggle to the header.",
          "branch_id": null,
          "created_at": "2026-10-10T09:24:05+00:00"
        }
      ],
      "is_paused": false
    }
  }
}
```

## Messages from the browser

### `join`

Join an app's room, once per app after every connect. An `app.snapshot` follows, then its live events. Refused with `room.access_denied` when the app is not on the session's allowlist, or past 30 joins a minute.

The payload is a `string`, not an object. Pattern: `^/apps/[0-9a-f]{24}$`

```json Example theme={null}
"/apps/6a2024af837c7a06c83021c1"
```

### `leave`

Leave an app's room. Its events stop.

The payload is a `string`, not an object. Pattern: `^/apps/[0-9a-f]{24}$`

```json Example theme={null}
"/apps/6a2024af837c7a06c83021c1"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.