{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/omnara-com/json-schema/omnara-com-workspace-session-launch-request-schema.json",
  "title": "WorkspaceSessionLaunchRequest",
  "description": "Request body used to start a session for a workspace.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/omnara-com-openapi.json#/components/schemas/WorkspaceSessionLaunchRequest",
  "properties": {
    "machine_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Machine Id",
      "description": "Machine ID to launch the session on. If not provided, uses the workspace's default machine."
    },
    "user_session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "User Session Id",
      "description": "Existing user session to reuse"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata",
      "description": "Arbitrary metadata describing the launch"
    },
    "initial_prompt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Initial Prompt",
      "description": "Prompt delivered to the coding agent at startup"
    },
    "worktree_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Worktree Name",
      "description": "Name for the git worktree/branch to use for this session"
    },
    "session_settings": {
      "anyOf": [
        {
          "$ref": "#/$defs/SessionSettings-Input"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional session settings overrides for this launch"
    },
    "resume_session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resume Session Id",
      "description": "SDK session ID to resume from (e.g., from Claude CLI import)"
    },
    "agent_session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Session Id",
      "description": "Existing agent session ID to connect to (e.g., from import)"
    }
  },
  "type": "object",
  "$defs": {
    "ClaudeCodeSettings": {
      "properties": {
        "model": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "haiku",
                "sonnet",
                "opus",
                "opus[1m]"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Model"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "ClaudeCodeSettings",
      "description": "Claude-specific settings for the code agent."
    },
    "CodeAgentProviders": {
      "properties": {
        "claude_code": {
          "anyOf": [
            {
              "$ref": "#/$defs/ClaudeCodeSettings"
            },
            {
              "type": "null"
            }
          ]
        },
        "codex": {
          "anyOf": [
            {
              "$ref": "#/$defs/CodexSettings"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "CodeAgentProviders",
      "description": "Provider-specific code agent settings keyed by provider name."
    },
    "CodeAgentSettings-Input": {
      "properties": {
        "mode": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "agent",
                "orchestrator"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Mode"
        },
        "default_provider": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Default Provider"
        },
        "providers": {
          "$ref": "#/$defs/CodeAgentProviders"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "CodeAgentSettings",
      "description": "Settings for the code agent across providers."
    },
    "CodexSettings": {
      "properties": {
        "model": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "gpt-5.1-codex-max",
                "gpt-5.1-codex-mini",
                "gpt-5.1-codex",
                "gpt-5.2",
                "gpt-5.2-codex",
                "gpt-5.3-codex-spark",
                "gpt-5.3-codex"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Model"
        },
        "thinking": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high",
                "xhigh"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Thinking"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "CodexSettings",
      "description": "Codex-specific settings for the code agent."
    },
    "SessionSettings-Input": {
      "properties": {
        "code": {
          "anyOf": [
            {
              "$ref": "#/$defs/CodeAgentSettings-Input"
            },
            {
              "type": "null"
            }
          ]
        },
        "voice": {
          "anyOf": [
            {
              "$ref": "#/$defs/VoiceAgentSettings"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "SessionSettings",
      "description": "Per-session settings for a user session."
    },
    "VoiceAgentSettings": {
      "properties": {
        "language": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Language"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "VoiceAgentSettings",
      "description": "Settings for the voice agent."
    }
  }
}