swagger.yaml

   1basePath: /v1
   2definitions:
   3  catwalk.Model:
   4    properties:
   5      can_reason:
   6        type: boolean
   7      context_window:
   8        type: integer
   9      cost_per_1m_in:
  10        type: number
  11      cost_per_1m_in_cached:
  12        type: number
  13      cost_per_1m_out:
  14        type: number
  15      cost_per_1m_out_cached:
  16        type: number
  17      default_max_tokens:
  18        type: integer
  19      default_reasoning_effort:
  20        type: string
  21      id:
  22        type: string
  23      name:
  24        type: string
  25      options:
  26        $ref: '#/definitions/catwalk.ModelOptions'
  27      reasoning_levels:
  28        items:
  29          type: string
  30        type: array
  31      supports_attachments:
  32        type: boolean
  33    type: object
  34  catwalk.ModelOptions:
  35    properties:
  36      frequency_penalty:
  37        type: number
  38      presence_penalty:
  39        type: number
  40      provider_options:
  41        additionalProperties: {}
  42        type: object
  43      temperature:
  44        type: number
  45      top_k:
  46        type: integer
  47      top_p:
  48        type: number
  49    type: object
  50  config.Attribution:
  51    properties:
  52      co_authored_by:
  53        type: boolean
  54      generated_with:
  55        type: boolean
  56      trailer_style:
  57        $ref: '#/definitions/config.TrailerStyle'
  58    type: object
  59  config.Completions:
  60    properties:
  61      max_depth:
  62        type: integer
  63      max_items:
  64        type: integer
  65    type: object
  66  config.LSPConfig:
  67    properties:
  68      args:
  69        items:
  70          type: string
  71        type: array
  72      command:
  73        type: string
  74      disabled:
  75        type: boolean
  76      env:
  77        additionalProperties:
  78          type: string
  79        type: object
  80      filetypes:
  81        items:
  82          type: string
  83        type: array
  84      init_options:
  85        additionalProperties: {}
  86        type: object
  87      options:
  88        additionalProperties: {}
  89        type: object
  90      root_markers:
  91        items:
  92          type: string
  93        type: array
  94      timeout:
  95        type: integer
  96    type: object
  97  config.LSPs:
  98    additionalProperties:
  99      $ref: '#/definitions/config.LSPConfig'
 100    type: object
 101  config.MCPConfig:
 102    properties:
 103      args:
 104        items:
 105          type: string
 106        type: array
 107      command:
 108        type: string
 109      disabled:
 110        type: boolean
 111      disabled_tools:
 112        items:
 113          type: string
 114        type: array
 115      env:
 116        additionalProperties:
 117          type: string
 118        type: object
 119      headers:
 120        additionalProperties:
 121          type: string
 122        description: 'TODO: maybe make it possible to get the value from the env'
 123        type: object
 124      timeout:
 125        type: integer
 126      type:
 127        $ref: '#/definitions/config.MCPType'
 128      url:
 129        type: string
 130    type: object
 131  config.MCPType:
 132    enum:
 133    - stdio
 134    - sse
 135    - http
 136    type: string
 137    x-enum-varnames:
 138    - MCPStdio
 139    - MCPSSE
 140    - MCPHttp
 141  config.MCPs:
 142    additionalProperties:
 143      $ref: '#/definitions/config.MCPConfig'
 144    type: object
 145  config.Permissions:
 146    properties:
 147      allowed_tools:
 148        items:
 149          type: string
 150        type: array
 151    type: object
 152  config.Scope:
 153    enum:
 154    - 0
 155    - 1
 156    type: integer
 157    x-enum-varnames:
 158    - ScopeGlobal
 159    - ScopeWorkspace
 160  config.SelectedModel:
 161    properties:
 162      frequency_penalty:
 163        type: number
 164      max_tokens:
 165        description: Overrides the default model configuration.
 166        type: integer
 167      model:
 168        description: |-
 169          The model id as used by the provider API.
 170          Required.
 171        type: string
 172      presence_penalty:
 173        type: number
 174      provider:
 175        description: |-
 176          The model provider, same as the key/id used in the providers config.
 177          Required.
 178        type: string
 179      provider_options:
 180        additionalProperties: {}
 181        description: Override provider specific options.
 182        type: object
 183      reasoning_effort:
 184        description: Only used by models that use the openai provider and need this
 185          set.
 186        type: string
 187      temperature:
 188        type: number
 189      think:
 190        description: Used by anthropic models that can reason to indicate if the model
 191          should think.
 192        type: boolean
 193      top_k:
 194        type: integer
 195      top_p:
 196        type: number
 197    type: object
 198  config.SelectedModelType:
 199    enum:
 200    - large
 201    - small
 202    type: string
 203    x-enum-varnames:
 204    - SelectedModelTypeLarge
 205    - SelectedModelTypeSmall
 206  config.TUIOptions:
 207    properties:
 208      compact_mode:
 209        type: boolean
 210      completions:
 211        $ref: '#/definitions/config.Completions'
 212      diff_mode:
 213        type: string
 214      transparent:
 215        type: boolean
 216    type: object
 217  config.ToolGrep:
 218    properties:
 219      timeout:
 220        $ref: '#/definitions/time.Duration'
 221    type: object
 222  config.ToolLs:
 223    properties:
 224      max_depth:
 225        type: integer
 226      max_items:
 227        type: integer
 228    type: object
 229  config.Tools:
 230    properties:
 231      grep:
 232        $ref: '#/definitions/config.ToolGrep'
 233      ls:
 234        $ref: '#/definitions/config.ToolLs'
 235    type: object
 236  config.TrailerStyle:
 237    enum:
 238    - none
 239    - co-authored-by
 240    - assisted-by
 241    type: string
 242    x-enum-varnames:
 243    - TrailerStyleNone
 244    - TrailerStyleCoAuthoredBy
 245    - TrailerStyleAssistedBy
 246  csync.Map-string-config_ProviderConfig:
 247    type: object
 248  github_com_charmbracelet_crush_internal_config.Config:
 249    properties:
 250      $schema:
 251        type: string
 252      lsp:
 253        $ref: '#/definitions/config.LSPs'
 254      mcp:
 255        $ref: '#/definitions/config.MCPs'
 256      models:
 257        additionalProperties:
 258          $ref: '#/definitions/config.SelectedModel'
 259        description: We currently only support large/small as values here.
 260        type: object
 261      options:
 262        $ref: '#/definitions/github_com_charmbracelet_crush_internal_config.Options'
 263      permissions:
 264        $ref: '#/definitions/config.Permissions'
 265      providers:
 266        allOf:
 267        - $ref: '#/definitions/csync.Map-string-config_ProviderConfig'
 268        description: The providers that are configured
 269      recent_models:
 270        additionalProperties:
 271          items:
 272            $ref: '#/definitions/config.SelectedModel'
 273          type: array
 274        description: Recently used models stored in the data directory config.
 275        type: object
 276      tools:
 277        $ref: '#/definitions/config.Tools'
 278    type: object
 279  github_com_charmbracelet_crush_internal_config.Options:
 280    properties:
 281      attribution:
 282        $ref: '#/definitions/config.Attribution'
 283      auto_lsp:
 284        type: boolean
 285      context_paths:
 286        items:
 287          type: string
 288        type: array
 289      data_directory:
 290        description: |-
 291          DataDirectory is where Crush keeps per-project state such as the SQLite
 292          database and workspace overrides. Relative paths are resolved against
 293          the working directory; absolute paths are used verbatim. After
 294          defaulting the stored value is always absolute.
 295        type: string
 296      debug:
 297        type: boolean
 298      debug_lsp:
 299        type: boolean
 300      disable_auto_summarize:
 301        type: boolean
 302      disable_default_providers:
 303        type: boolean
 304      disable_metrics:
 305        type: boolean
 306      disable_notifications:
 307        type: boolean
 308      disable_provider_auto_update:
 309        type: boolean
 310      disabled_tools:
 311        items:
 312          type: string
 313        type: array
 314      initialize_as:
 315        type: string
 316      progress:
 317        type: boolean
 318      skills_paths:
 319        items:
 320          type: string
 321        type: array
 322      tui:
 323        $ref: '#/definitions/config.TUIOptions'
 324    type: object
 325  github_com_charmbracelet_crush_internal_proto.Message:
 326    properties:
 327      created_at:
 328        type: integer
 329      id:
 330        type: string
 331      model:
 332        type: string
 333      parts:
 334        items: {}
 335        type: array
 336      provider:
 337        type: string
 338      role:
 339        $ref: '#/definitions/proto.MessageRole'
 340      session_id:
 341        type: string
 342      updated_at:
 343        type: integer
 344    type: object
 345  lsp.ServerState:
 346    enum:
 347    - 0
 348    - 1
 349    - 2
 350    - 3
 351    - 4
 352    - 5
 353    type: integer
 354    x-enum-varnames:
 355    - StateUnstarted
 356    - StateStarting
 357    - StateReady
 358    - StateError
 359    - StateStopped
 360    - StateDisabled
 361  proto.AgentInfo:
 362    properties:
 363      is_busy:
 364        type: boolean
 365      is_ready:
 366        type: boolean
 367      model:
 368        $ref: '#/definitions/catwalk.Model'
 369      model_cfg:
 370        $ref: '#/definitions/config.SelectedModel'
 371    type: object
 372  proto.AgentMessage:
 373    properties:
 374      attachments:
 375        items:
 376          $ref: '#/definitions/proto.Attachment'
 377        type: array
 378      prompt:
 379        type: string
 380      session_id:
 381        type: string
 382    type: object
 383  proto.AgentSession:
 384    properties:
 385      completion_tokens:
 386        type: integer
 387      cost:
 388        type: number
 389      created_at:
 390        type: integer
 391      id:
 392        type: string
 393      is_busy:
 394        type: boolean
 395      message_count:
 396        type: integer
 397      parent_session_id:
 398        type: string
 399      prompt_tokens:
 400        type: integer
 401      summary_message_id:
 402        type: string
 403      title:
 404        type: string
 405      updated_at:
 406        type: integer
 407    type: object
 408  proto.Attachment:
 409    properties:
 410      content:
 411        items:
 412          type: integer
 413        type: array
 414      file_name:
 415        type: string
 416      file_path:
 417        type: string
 418      mime_type:
 419        type: string
 420    type: object
 421  proto.ConfigCompactRequest:
 422    properties:
 423      enabled:
 424        type: boolean
 425      scope:
 426        $ref: '#/definitions/config.Scope'
 427    type: object
 428  proto.ConfigModelRequest:
 429    properties:
 430      model:
 431        $ref: '#/definitions/config.SelectedModel'
 432      model_type:
 433        $ref: '#/definitions/config.SelectedModelType'
 434      scope:
 435        $ref: '#/definitions/config.Scope'
 436    type: object
 437  proto.ConfigProviderKeyRequest:
 438    properties:
 439      api_key: {}
 440      provider_id:
 441        type: string
 442      scope:
 443        $ref: '#/definitions/config.Scope'
 444    type: object
 445  proto.ConfigRefreshOAuthRequest:
 446    properties:
 447      provider_id:
 448        type: string
 449      scope:
 450        $ref: '#/definitions/config.Scope'
 451    type: object
 452  proto.ConfigRemoveRequest:
 453    properties:
 454      key:
 455        type: string
 456      scope:
 457        $ref: '#/definitions/config.Scope'
 458    type: object
 459  proto.ConfigSetRequest:
 460    properties:
 461      key:
 462        type: string
 463      scope:
 464        $ref: '#/definitions/config.Scope'
 465      value: {}
 466    type: object
 467  proto.Error:
 468    properties:
 469      message:
 470        type: string
 471    type: object
 472  proto.File:
 473    properties:
 474      content:
 475        type: string
 476      created_at:
 477        type: integer
 478      id:
 479        type: string
 480      path:
 481        type: string
 482      session_id:
 483        type: string
 484      updated_at:
 485        type: integer
 486      version:
 487        type: integer
 488    type: object
 489  proto.FileTrackerReadRequest:
 490    properties:
 491      path:
 492        type: string
 493      session_id:
 494        type: string
 495    type: object
 496  proto.ImportCopilotResponse:
 497    properties:
 498      success:
 499        type: boolean
 500      token: {}
 501    type: object
 502  proto.LSPClientInfo:
 503    properties:
 504      connected_at:
 505        type: string
 506      diagnostic_count:
 507        type: integer
 508      error: {}
 509      name:
 510        type: string
 511      state:
 512        $ref: '#/definitions/lsp.ServerState'
 513    type: object
 514  proto.LSPStartRequest:
 515    properties:
 516      path:
 517        type: string
 518    type: object
 519  proto.MCPClientInfo:
 520    properties:
 521      connected_at:
 522        type: string
 523      error: {}
 524      name:
 525        type: string
 526      prompt_count:
 527        type: integer
 528      resource_count:
 529        type: integer
 530      state:
 531        $ref: '#/definitions/proto.MCPState'
 532      tool_count:
 533        type: integer
 534    type: object
 535  proto.MCPGetPromptRequest:
 536    properties:
 537      args:
 538        additionalProperties:
 539          type: string
 540        type: object
 541      client_id:
 542        type: string
 543      prompt_id:
 544        type: string
 545    type: object
 546  proto.MCPGetPromptResponse:
 547    properties:
 548      prompt:
 549        type: string
 550    type: object
 551  proto.MCPNameRequest:
 552    properties:
 553      name:
 554        type: string
 555    type: object
 556  proto.MCPReadResourceRequest:
 557    properties:
 558      name:
 559        type: string
 560      uri:
 561        type: string
 562    type: object
 563  proto.MCPState:
 564    enum:
 565    - 0
 566    - 1
 567    - 2
 568    - 3
 569    type: integer
 570    x-enum-varnames:
 571    - MCPStateDisabled
 572    - MCPStateStarting
 573    - MCPStateConnected
 574    - MCPStateError
 575  proto.MessageRole:
 576    enum:
 577    - assistant
 578    - user
 579    - system
 580    - tool
 581    type: string
 582    x-enum-varnames:
 583    - Assistant
 584    - User
 585    - System
 586    - Tool
 587  proto.PermissionAction:
 588    enum:
 589    - allow
 590    - allow_session
 591    - deny
 592    type: string
 593    x-enum-varnames:
 594    - PermissionAllow
 595    - PermissionAllowForSession
 596    - PermissionDeny
 597  proto.PermissionGrant:
 598    properties:
 599      action:
 600        $ref: '#/definitions/proto.PermissionAction'
 601      permission:
 602        $ref: '#/definitions/proto.PermissionRequest'
 603    type: object
 604  proto.PermissionRequest:
 605    properties:
 606      action:
 607        type: string
 608      description:
 609        type: string
 610      id:
 611        type: string
 612      params: {}
 613      path:
 614        type: string
 615      session_id:
 616        type: string
 617      tool_call_id:
 618        type: string
 619      tool_name:
 620        type: string
 621    type: object
 622  proto.PermissionSkipRequest:
 623    properties:
 624      skip:
 625        type: boolean
 626    type: object
 627  proto.ProjectInitPromptResponse:
 628    properties:
 629      prompt:
 630        type: string
 631    type: object
 632  proto.ProjectNeedsInitResponse:
 633    properties:
 634      needs_init:
 635        type: boolean
 636    type: object
 637  proto.ServerControl:
 638    properties:
 639      command:
 640        type: string
 641    type: object
 642  proto.Session:
 643    properties:
 644      completion_tokens:
 645        type: integer
 646      cost:
 647        type: number
 648      created_at:
 649        type: integer
 650      id:
 651        type: string
 652      message_count:
 653        type: integer
 654      parent_session_id:
 655        type: string
 656      prompt_tokens:
 657        type: integer
 658      summary_message_id:
 659        type: string
 660      title:
 661        type: string
 662      updated_at:
 663        type: integer
 664    type: object
 665  proto.VersionInfo:
 666    properties:
 667      commit:
 668        type: string
 669      go_version:
 670        type: string
 671      platform:
 672        type: string
 673      version:
 674        type: string
 675    type: object
 676  proto.Workspace:
 677    properties:
 678      config:
 679        $ref: '#/definitions/github_com_charmbracelet_crush_internal_config.Config'
 680      data_dir:
 681        type: string
 682      debug:
 683        type: boolean
 684      env:
 685        items:
 686          type: string
 687        type: array
 688      id:
 689        type: string
 690      path:
 691        type: string
 692      version:
 693        type: string
 694      yolo:
 695        type: boolean
 696    type: object
 697  time.Duration:
 698    enum:
 699    - -9223372036854775808
 700    - 9223372036854775807
 701    - 1
 702    - 1000
 703    - 1000000
 704    - 1000000000
 705    - 60000000000
 706    - 3600000000000
 707    format: int64
 708    type: integer
 709    x-enum-varnames:
 710    - minDuration
 711    - maxDuration
 712    - Nanosecond
 713    - Microsecond
 714    - Millisecond
 715    - Second
 716    - Minute
 717    - Hour
 718info:
 719  contact:
 720    name: Charm
 721    url: https://charm.sh
 722  description: Crush is a terminal-based AI coding assistant. This API is served over
 723    a Unix socket (or Windows named pipe) and provides programmatic access to workspaces,
 724    sessions, agents, LSP, MCP, and more.
 725  license:
 726    name: MIT
 727    url: https://github.com/charmbracelet/crush/blob/main/LICENSE
 728  title: Crush API
 729  version: "1.0"
 730paths:
 731  /config:
 732    get:
 733      produces:
 734      - application/json
 735      responses:
 736        "200":
 737          description: OK
 738          schema:
 739            type: object
 740      summary: Get server config
 741      tags:
 742      - system
 743  /control:
 744    post:
 745      consumes:
 746      - application/json
 747      parameters:
 748      - description: Control command (e.g. shutdown)
 749        in: body
 750        name: request
 751        required: true
 752        schema:
 753          $ref: '#/definitions/proto.ServerControl'
 754      responses:
 755        "200":
 756          description: OK
 757        "400":
 758          description: Bad Request
 759          schema:
 760            $ref: '#/definitions/proto.Error'
 761      summary: Send server control command
 762      tags:
 763      - system
 764  /health:
 765    get:
 766      responses:
 767        "200":
 768          description: OK
 769      summary: Health check
 770      tags:
 771      - system
 772  /version:
 773    get:
 774      produces:
 775      - application/json
 776      responses:
 777        "200":
 778          description: OK
 779          schema:
 780            $ref: '#/definitions/proto.VersionInfo'
 781      summary: Get server version
 782      tags:
 783      - system
 784  /workspaces:
 785    get:
 786      produces:
 787      - application/json
 788      responses:
 789        "200":
 790          description: OK
 791          schema:
 792            items:
 793              $ref: '#/definitions/proto.Workspace'
 794            type: array
 795      summary: List workspaces
 796      tags:
 797      - workspaces
 798    post:
 799      consumes:
 800      - application/json
 801      parameters:
 802      - description: Workspace creation params
 803        in: body
 804        name: request
 805        required: true
 806        schema:
 807          $ref: '#/definitions/proto.Workspace'
 808      produces:
 809      - application/json
 810      responses:
 811        "200":
 812          description: OK
 813          schema:
 814            $ref: '#/definitions/proto.Workspace'
 815        "400":
 816          description: Bad Request
 817          schema:
 818            $ref: '#/definitions/proto.Error'
 819        "500":
 820          description: Internal Server Error
 821          schema:
 822            $ref: '#/definitions/proto.Error'
 823      summary: Create workspace
 824      tags:
 825      - workspaces
 826  /workspaces/{id}:
 827    delete:
 828      parameters:
 829      - description: Workspace ID
 830        in: path
 831        name: id
 832        required: true
 833        type: string
 834      responses:
 835        "200":
 836          description: OK
 837        "404":
 838          description: Not Found
 839          schema:
 840            $ref: '#/definitions/proto.Error'
 841      summary: Delete workspace
 842      tags:
 843      - workspaces
 844    get:
 845      parameters:
 846      - description: Workspace ID
 847        in: path
 848        name: id
 849        required: true
 850        type: string
 851      produces:
 852      - application/json
 853      responses:
 854        "200":
 855          description: OK
 856          schema:
 857            $ref: '#/definitions/proto.Workspace'
 858        "404":
 859          description: Not Found
 860          schema:
 861            $ref: '#/definitions/proto.Error'
 862        "500":
 863          description: Internal Server Error
 864          schema:
 865            $ref: '#/definitions/proto.Error'
 866      summary: Get workspace
 867      tags:
 868      - workspaces
 869  /workspaces/{id}/agent:
 870    get:
 871      parameters:
 872      - description: Workspace ID
 873        in: path
 874        name: id
 875        required: true
 876        type: string
 877      produces:
 878      - application/json
 879      responses:
 880        "200":
 881          description: OK
 882          schema:
 883            $ref: '#/definitions/proto.AgentInfo'
 884        "404":
 885          description: Not Found
 886          schema:
 887            $ref: '#/definitions/proto.Error'
 888        "500":
 889          description: Internal Server Error
 890          schema:
 891            $ref: '#/definitions/proto.Error'
 892      summary: Get agent info
 893      tags:
 894      - agent
 895    post:
 896      consumes:
 897      - application/json
 898      parameters:
 899      - description: Workspace ID
 900        in: path
 901        name: id
 902        required: true
 903        type: string
 904      - description: Agent message
 905        in: body
 906        name: request
 907        required: true
 908        schema:
 909          $ref: '#/definitions/proto.AgentMessage'
 910      responses:
 911        "200":
 912          description: OK
 913        "400":
 914          description: Bad Request
 915          schema:
 916            $ref: '#/definitions/proto.Error'
 917        "404":
 918          description: Not Found
 919          schema:
 920            $ref: '#/definitions/proto.Error'
 921        "500":
 922          description: Internal Server Error
 923          schema:
 924            $ref: '#/definitions/proto.Error'
 925      summary: Send message to agent
 926      tags:
 927      - agent
 928  /workspaces/{id}/agent/default-small-model:
 929    get:
 930      parameters:
 931      - description: Workspace ID
 932        in: path
 933        name: id
 934        required: true
 935        type: string
 936      - description: Provider ID
 937        in: query
 938        name: provider_id
 939        type: string
 940      produces:
 941      - application/json
 942      responses:
 943        "200":
 944          description: OK
 945          schema:
 946            type: object
 947        "404":
 948          description: Not Found
 949          schema:
 950            $ref: '#/definitions/proto.Error'
 951        "500":
 952          description: Internal Server Error
 953          schema:
 954            $ref: '#/definitions/proto.Error'
 955      summary: Get default small model
 956      tags:
 957      - agent
 958  /workspaces/{id}/agent/init:
 959    post:
 960      parameters:
 961      - description: Workspace ID
 962        in: path
 963        name: id
 964        required: true
 965        type: string
 966      responses:
 967        "200":
 968          description: OK
 969        "404":
 970          description: Not Found
 971          schema:
 972            $ref: '#/definitions/proto.Error'
 973        "500":
 974          description: Internal Server Error
 975          schema:
 976            $ref: '#/definitions/proto.Error'
 977      summary: Initialize agent
 978      tags:
 979      - agent
 980  /workspaces/{id}/agent/sessions/{sid}:
 981    get:
 982      parameters:
 983      - description: Workspace ID
 984        in: path
 985        name: id
 986        required: true
 987        type: string
 988      - description: Session ID
 989        in: path
 990        name: sid
 991        required: true
 992        type: string
 993      produces:
 994      - application/json
 995      responses:
 996        "200":
 997          description: OK
 998          schema:
 999            $ref: '#/definitions/proto.AgentSession'
1000        "404":
1001          description: Not Found
1002          schema:
1003            $ref: '#/definitions/proto.Error'
1004        "500":
1005          description: Internal Server Error
1006          schema:
1007            $ref: '#/definitions/proto.Error'
1008      summary: Get agent session
1009      tags:
1010      - agent
1011  /workspaces/{id}/agent/sessions/{sid}/cancel:
1012    post:
1013      parameters:
1014      - description: Workspace ID
1015        in: path
1016        name: id
1017        required: true
1018        type: string
1019      - description: Session ID
1020        in: path
1021        name: sid
1022        required: true
1023        type: string
1024      responses:
1025        "200":
1026          description: OK
1027        "404":
1028          description: Not Found
1029          schema:
1030            $ref: '#/definitions/proto.Error'
1031        "500":
1032          description: Internal Server Error
1033          schema:
1034            $ref: '#/definitions/proto.Error'
1035      summary: Cancel agent session
1036      tags:
1037      - agent
1038  /workspaces/{id}/agent/sessions/{sid}/prompts/clear:
1039    post:
1040      parameters:
1041      - description: Workspace ID
1042        in: path
1043        name: id
1044        required: true
1045        type: string
1046      - description: Session ID
1047        in: path
1048        name: sid
1049        required: true
1050        type: string
1051      responses:
1052        "200":
1053          description: OK
1054        "404":
1055          description: Not Found
1056          schema:
1057            $ref: '#/definitions/proto.Error'
1058        "500":
1059          description: Internal Server Error
1060          schema:
1061            $ref: '#/definitions/proto.Error'
1062      summary: Clear prompt queue
1063      tags:
1064      - agent
1065  /workspaces/{id}/agent/sessions/{sid}/prompts/list:
1066    get:
1067      parameters:
1068      - description: Workspace ID
1069        in: path
1070        name: id
1071        required: true
1072        type: string
1073      - description: Session ID
1074        in: path
1075        name: sid
1076        required: true
1077        type: string
1078      produces:
1079      - application/json
1080      responses:
1081        "200":
1082          description: OK
1083          schema:
1084            items:
1085              type: string
1086            type: array
1087        "404":
1088          description: Not Found
1089          schema:
1090            $ref: '#/definitions/proto.Error'
1091        "500":
1092          description: Internal Server Error
1093          schema:
1094            $ref: '#/definitions/proto.Error'
1095      summary: List queued prompts
1096      tags:
1097      - agent
1098  /workspaces/{id}/agent/sessions/{sid}/prompts/queued:
1099    get:
1100      parameters:
1101      - description: Workspace ID
1102        in: path
1103        name: id
1104        required: true
1105        type: string
1106      - description: Session ID
1107        in: path
1108        name: sid
1109        required: true
1110        type: string
1111      produces:
1112      - application/json
1113      responses:
1114        "200":
1115          description: OK
1116          schema:
1117            type: object
1118        "404":
1119          description: Not Found
1120          schema:
1121            $ref: '#/definitions/proto.Error'
1122        "500":
1123          description: Internal Server Error
1124          schema:
1125            $ref: '#/definitions/proto.Error'
1126      summary: Get queued prompt status
1127      tags:
1128      - agent
1129  /workspaces/{id}/agent/sessions/{sid}/summarize:
1130    post:
1131      parameters:
1132      - description: Workspace ID
1133        in: path
1134        name: id
1135        required: true
1136        type: string
1137      - description: Session ID
1138        in: path
1139        name: sid
1140        required: true
1141        type: string
1142      responses:
1143        "200":
1144          description: OK
1145        "404":
1146          description: Not Found
1147          schema:
1148            $ref: '#/definitions/proto.Error'
1149        "500":
1150          description: Internal Server Error
1151          schema:
1152            $ref: '#/definitions/proto.Error'
1153      summary: Summarize session
1154      tags:
1155      - agent
1156  /workspaces/{id}/agent/update:
1157    post:
1158      parameters:
1159      - description: Workspace ID
1160        in: path
1161        name: id
1162        required: true
1163        type: string
1164      responses:
1165        "200":
1166          description: OK
1167        "404":
1168          description: Not Found
1169          schema:
1170            $ref: '#/definitions/proto.Error'
1171        "500":
1172          description: Internal Server Error
1173          schema:
1174            $ref: '#/definitions/proto.Error'
1175      summary: Update agent
1176      tags:
1177      - agent
1178  /workspaces/{id}/config:
1179    get:
1180      parameters:
1181      - description: Workspace ID
1182        in: path
1183        name: id
1184        required: true
1185        type: string
1186      produces:
1187      - application/json
1188      responses:
1189        "200":
1190          description: OK
1191          schema:
1192            type: object
1193        "404":
1194          description: Not Found
1195          schema:
1196            $ref: '#/definitions/proto.Error'
1197        "500":
1198          description: Internal Server Error
1199          schema:
1200            $ref: '#/definitions/proto.Error'
1201      summary: Get workspace config
1202      tags:
1203      - workspaces
1204  /workspaces/{id}/config/compact:
1205    post:
1206      consumes:
1207      - application/json
1208      parameters:
1209      - description: Workspace ID
1210        in: path
1211        name: id
1212        required: true
1213        type: string
1214      - description: Config compact request
1215        in: body
1216        name: request
1217        required: true
1218        schema:
1219          $ref: '#/definitions/proto.ConfigCompactRequest'
1220      responses:
1221        "200":
1222          description: OK
1223        "400":
1224          description: Bad Request
1225          schema:
1226            $ref: '#/definitions/proto.Error'
1227        "404":
1228          description: Not Found
1229          schema:
1230            $ref: '#/definitions/proto.Error'
1231        "500":
1232          description: Internal Server Error
1233          schema:
1234            $ref: '#/definitions/proto.Error'
1235      summary: Set compact mode
1236      tags:
1237      - config
1238  /workspaces/{id}/config/import-copilot:
1239    post:
1240      parameters:
1241      - description: Workspace ID
1242        in: path
1243        name: id
1244        required: true
1245        type: string
1246      produces:
1247      - application/json
1248      responses:
1249        "200":
1250          description: OK
1251          schema:
1252            $ref: '#/definitions/proto.ImportCopilotResponse'
1253        "404":
1254          description: Not Found
1255          schema:
1256            $ref: '#/definitions/proto.Error'
1257        "500":
1258          description: Internal Server Error
1259          schema:
1260            $ref: '#/definitions/proto.Error'
1261      summary: Import Copilot credentials
1262      tags:
1263      - config
1264  /workspaces/{id}/config/model:
1265    post:
1266      consumes:
1267      - application/json
1268      parameters:
1269      - description: Workspace ID
1270        in: path
1271        name: id
1272        required: true
1273        type: string
1274      - description: Config model request
1275        in: body
1276        name: request
1277        required: true
1278        schema:
1279          $ref: '#/definitions/proto.ConfigModelRequest'
1280      responses:
1281        "200":
1282          description: OK
1283        "400":
1284          description: Bad Request
1285          schema:
1286            $ref: '#/definitions/proto.Error'
1287        "404":
1288          description: Not Found
1289          schema:
1290            $ref: '#/definitions/proto.Error'
1291        "500":
1292          description: Internal Server Error
1293          schema:
1294            $ref: '#/definitions/proto.Error'
1295      summary: Set the preferred model
1296      tags:
1297      - config
1298  /workspaces/{id}/config/provider-key:
1299    post:
1300      consumes:
1301      - application/json
1302      parameters:
1303      - description: Workspace ID
1304        in: path
1305        name: id
1306        required: true
1307        type: string
1308      - description: Config provider key request
1309        in: body
1310        name: request
1311        required: true
1312        schema:
1313          $ref: '#/definitions/proto.ConfigProviderKeyRequest'
1314      responses:
1315        "200":
1316          description: OK
1317        "400":
1318          description: Bad Request
1319          schema:
1320            $ref: '#/definitions/proto.Error'
1321        "404":
1322          description: Not Found
1323          schema:
1324            $ref: '#/definitions/proto.Error'
1325        "500":
1326          description: Internal Server Error
1327          schema:
1328            $ref: '#/definitions/proto.Error'
1329      summary: Set provider API key
1330      tags:
1331      - config
1332  /workspaces/{id}/config/refresh-oauth:
1333    post:
1334      consumes:
1335      - application/json
1336      parameters:
1337      - description: Workspace ID
1338        in: path
1339        name: id
1340        required: true
1341        type: string
1342      - description: Refresh OAuth request
1343        in: body
1344        name: request
1345        required: true
1346        schema:
1347          $ref: '#/definitions/proto.ConfigRefreshOAuthRequest'
1348      responses:
1349        "200":
1350          description: OK
1351        "400":
1352          description: Bad Request
1353          schema:
1354            $ref: '#/definitions/proto.Error'
1355        "404":
1356          description: Not Found
1357          schema:
1358            $ref: '#/definitions/proto.Error'
1359        "500":
1360          description: Internal Server Error
1361          schema:
1362            $ref: '#/definitions/proto.Error'
1363      summary: Refresh OAuth token
1364      tags:
1365      - config
1366  /workspaces/{id}/config/remove:
1367    post:
1368      consumes:
1369      - application/json
1370      parameters:
1371      - description: Workspace ID
1372        in: path
1373        name: id
1374        required: true
1375        type: string
1376      - description: Config remove request
1377        in: body
1378        name: request
1379        required: true
1380        schema:
1381          $ref: '#/definitions/proto.ConfigRemoveRequest'
1382      responses:
1383        "200":
1384          description: OK
1385        "400":
1386          description: Bad Request
1387          schema:
1388            $ref: '#/definitions/proto.Error'
1389        "404":
1390          description: Not Found
1391          schema:
1392            $ref: '#/definitions/proto.Error'
1393        "500":
1394          description: Internal Server Error
1395          schema:
1396            $ref: '#/definitions/proto.Error'
1397      summary: Remove a config field
1398      tags:
1399      - config
1400  /workspaces/{id}/config/set:
1401    post:
1402      consumes:
1403      - application/json
1404      parameters:
1405      - description: Workspace ID
1406        in: path
1407        name: id
1408        required: true
1409        type: string
1410      - description: Config set request
1411        in: body
1412        name: request
1413        required: true
1414        schema:
1415          $ref: '#/definitions/proto.ConfigSetRequest'
1416      responses:
1417        "200":
1418          description: OK
1419        "400":
1420          description: Bad Request
1421          schema:
1422            $ref: '#/definitions/proto.Error'
1423        "404":
1424          description: Not Found
1425          schema:
1426            $ref: '#/definitions/proto.Error'
1427        "500":
1428          description: Internal Server Error
1429          schema:
1430            $ref: '#/definitions/proto.Error'
1431      summary: Set a config field
1432      tags:
1433      - config
1434  /workspaces/{id}/events:
1435    get:
1436      parameters:
1437      - description: Workspace ID
1438        in: path
1439        name: id
1440        required: true
1441        type: string
1442      produces:
1443      - text/event-stream
1444      responses:
1445        "200":
1446          description: OK
1447        "404":
1448          description: Not Found
1449          schema:
1450            $ref: '#/definitions/proto.Error'
1451        "500":
1452          description: Internal Server Error
1453          schema:
1454            $ref: '#/definitions/proto.Error'
1455      summary: Stream workspace events (SSE)
1456      tags:
1457      - workspaces
1458  /workspaces/{id}/filetracker/lastread:
1459    get:
1460      parameters:
1461      - description: Workspace ID
1462        in: path
1463        name: id
1464        required: true
1465        type: string
1466      - description: Session ID
1467        in: query
1468        name: session_id
1469        type: string
1470      - description: File path
1471        in: query
1472        name: path
1473        required: true
1474        type: string
1475      produces:
1476      - application/json
1477      responses:
1478        "200":
1479          description: OK
1480          schema:
1481            type: object
1482        "404":
1483          description: Not Found
1484          schema:
1485            $ref: '#/definitions/proto.Error'
1486        "500":
1487          description: Internal Server Error
1488          schema:
1489            $ref: '#/definitions/proto.Error'
1490      summary: Get last read time for file
1491      tags:
1492      - filetracker
1493  /workspaces/{id}/filetracker/read:
1494    post:
1495      consumes:
1496      - application/json
1497      parameters:
1498      - description: Workspace ID
1499        in: path
1500        name: id
1501        required: true
1502        type: string
1503      - description: File tracker read request
1504        in: body
1505        name: request
1506        required: true
1507        schema:
1508          $ref: '#/definitions/proto.FileTrackerReadRequest'
1509      responses:
1510        "200":
1511          description: OK
1512        "400":
1513          description: Bad Request
1514          schema:
1515            $ref: '#/definitions/proto.Error'
1516        "404":
1517          description: Not Found
1518          schema:
1519            $ref: '#/definitions/proto.Error'
1520        "500":
1521          description: Internal Server Error
1522          schema:
1523            $ref: '#/definitions/proto.Error'
1524      summary: Record file read
1525      tags:
1526      - filetracker
1527  /workspaces/{id}/lsps:
1528    get:
1529      parameters:
1530      - description: Workspace ID
1531        in: path
1532        name: id
1533        required: true
1534        type: string
1535      produces:
1536      - application/json
1537      responses:
1538        "200":
1539          description: OK
1540          schema:
1541            additionalProperties:
1542              $ref: '#/definitions/proto.LSPClientInfo'
1543            type: object
1544        "404":
1545          description: Not Found
1546          schema:
1547            $ref: '#/definitions/proto.Error'
1548        "500":
1549          description: Internal Server Error
1550          schema:
1551            $ref: '#/definitions/proto.Error'
1552      summary: List LSP clients
1553      tags:
1554      - lsp
1555  /workspaces/{id}/lsps/{lsp}/diagnostics:
1556    get:
1557      parameters:
1558      - description: Workspace ID
1559        in: path
1560        name: id
1561        required: true
1562        type: string
1563      - description: LSP client name
1564        in: path
1565        name: lsp
1566        required: true
1567        type: string
1568      produces:
1569      - application/json
1570      responses:
1571        "200":
1572          description: OK
1573          schema:
1574            type: object
1575        "404":
1576          description: Not Found
1577          schema:
1578            $ref: '#/definitions/proto.Error'
1579        "500":
1580          description: Internal Server Error
1581          schema:
1582            $ref: '#/definitions/proto.Error'
1583      summary: Get LSP diagnostics
1584      tags:
1585      - lsp
1586  /workspaces/{id}/lsps/start:
1587    post:
1588      consumes:
1589      - application/json
1590      parameters:
1591      - description: Workspace ID
1592        in: path
1593        name: id
1594        required: true
1595        type: string
1596      - description: LSP start request
1597        in: body
1598        name: request
1599        required: true
1600        schema:
1601          $ref: '#/definitions/proto.LSPStartRequest'
1602      responses:
1603        "200":
1604          description: OK
1605        "400":
1606          description: Bad Request
1607          schema:
1608            $ref: '#/definitions/proto.Error'
1609        "404":
1610          description: Not Found
1611          schema:
1612            $ref: '#/definitions/proto.Error'
1613        "500":
1614          description: Internal Server Error
1615          schema:
1616            $ref: '#/definitions/proto.Error'
1617      summary: Start LSP server
1618      tags:
1619      - lsp
1620  /workspaces/{id}/lsps/stop:
1621    post:
1622      parameters:
1623      - description: Workspace ID
1624        in: path
1625        name: id
1626        required: true
1627        type: string
1628      responses:
1629        "200":
1630          description: OK
1631        "404":
1632          description: Not Found
1633          schema:
1634            $ref: '#/definitions/proto.Error'
1635        "500":
1636          description: Internal Server Error
1637          schema:
1638            $ref: '#/definitions/proto.Error'
1639      summary: Stop all LSP servers
1640      tags:
1641      - lsp
1642  /workspaces/{id}/mcp/get-prompt:
1643    post:
1644      consumes:
1645      - application/json
1646      parameters:
1647      - description: Workspace ID
1648        in: path
1649        name: id
1650        required: true
1651        type: string
1652      - description: MCP get prompt request
1653        in: body
1654        name: request
1655        required: true
1656        schema:
1657          $ref: '#/definitions/proto.MCPGetPromptRequest'
1658      produces:
1659      - application/json
1660      responses:
1661        "200":
1662          description: OK
1663          schema:
1664            $ref: '#/definitions/proto.MCPGetPromptResponse'
1665        "400":
1666          description: Bad Request
1667          schema:
1668            $ref: '#/definitions/proto.Error'
1669        "404":
1670          description: Not Found
1671          schema:
1672            $ref: '#/definitions/proto.Error'
1673        "500":
1674          description: Internal Server Error
1675          schema:
1676            $ref: '#/definitions/proto.Error'
1677      summary: Get MCP prompt
1678      tags:
1679      - mcp
1680  /workspaces/{id}/mcp/read-resource:
1681    post:
1682      consumes:
1683      - application/json
1684      parameters:
1685      - description: Workspace ID
1686        in: path
1687        name: id
1688        required: true
1689        type: string
1690      - description: MCP read resource request
1691        in: body
1692        name: request
1693        required: true
1694        schema:
1695          $ref: '#/definitions/proto.MCPReadResourceRequest'
1696      produces:
1697      - application/json
1698      responses:
1699        "200":
1700          description: OK
1701          schema:
1702            type: object
1703        "400":
1704          description: Bad Request
1705          schema:
1706            $ref: '#/definitions/proto.Error'
1707        "404":
1708          description: Not Found
1709          schema:
1710            $ref: '#/definitions/proto.Error'
1711        "500":
1712          description: Internal Server Error
1713          schema:
1714            $ref: '#/definitions/proto.Error'
1715      summary: Read MCP resource
1716      tags:
1717      - mcp
1718  /workspaces/{id}/mcp/refresh-prompts:
1719    post:
1720      consumes:
1721      - application/json
1722      parameters:
1723      - description: Workspace ID
1724        in: path
1725        name: id
1726        required: true
1727        type: string
1728      - description: MCP name request
1729        in: body
1730        name: request
1731        required: true
1732        schema:
1733          $ref: '#/definitions/proto.MCPNameRequest'
1734      responses:
1735        "200":
1736          description: OK
1737        "400":
1738          description: Bad Request
1739          schema:
1740            $ref: '#/definitions/proto.Error'
1741        "404":
1742          description: Not Found
1743          schema:
1744            $ref: '#/definitions/proto.Error'
1745        "500":
1746          description: Internal Server Error
1747          schema:
1748            $ref: '#/definitions/proto.Error'
1749      summary: Refresh MCP prompts
1750      tags:
1751      - mcp
1752  /workspaces/{id}/mcp/refresh-resources:
1753    post:
1754      consumes:
1755      - application/json
1756      parameters:
1757      - description: Workspace ID
1758        in: path
1759        name: id
1760        required: true
1761        type: string
1762      - description: MCP name request
1763        in: body
1764        name: request
1765        required: true
1766        schema:
1767          $ref: '#/definitions/proto.MCPNameRequest'
1768      responses:
1769        "200":
1770          description: OK
1771        "400":
1772          description: Bad Request
1773          schema:
1774            $ref: '#/definitions/proto.Error'
1775        "404":
1776          description: Not Found
1777          schema:
1778            $ref: '#/definitions/proto.Error'
1779        "500":
1780          description: Internal Server Error
1781          schema:
1782            $ref: '#/definitions/proto.Error'
1783      summary: Refresh MCP resources
1784      tags:
1785      - mcp
1786  /workspaces/{id}/mcp/refresh-tools:
1787    post:
1788      consumes:
1789      - application/json
1790      parameters:
1791      - description: Workspace ID
1792        in: path
1793        name: id
1794        required: true
1795        type: string
1796      - description: MCP name request
1797        in: body
1798        name: request
1799        required: true
1800        schema:
1801          $ref: '#/definitions/proto.MCPNameRequest'
1802      responses:
1803        "200":
1804          description: OK
1805        "400":
1806          description: Bad Request
1807          schema:
1808            $ref: '#/definitions/proto.Error'
1809        "404":
1810          description: Not Found
1811          schema:
1812            $ref: '#/definitions/proto.Error'
1813        "500":
1814          description: Internal Server Error
1815          schema:
1816            $ref: '#/definitions/proto.Error'
1817      summary: Refresh MCP tools
1818      tags:
1819      - mcp
1820  /workspaces/{id}/mcp/states:
1821    get:
1822      parameters:
1823      - description: Workspace ID
1824        in: path
1825        name: id
1826        required: true
1827        type: string
1828      produces:
1829      - application/json
1830      responses:
1831        "200":
1832          description: OK
1833          schema:
1834            additionalProperties:
1835              $ref: '#/definitions/proto.MCPClientInfo'
1836            type: object
1837        "404":
1838          description: Not Found
1839          schema:
1840            $ref: '#/definitions/proto.Error'
1841        "500":
1842          description: Internal Server Error
1843          schema:
1844            $ref: '#/definitions/proto.Error'
1845      summary: Get MCP client states
1846      tags:
1847      - mcp
1848  /workspaces/{id}/messages/user:
1849    get:
1850      parameters:
1851      - description: Workspace ID
1852        in: path
1853        name: id
1854        required: true
1855        type: string
1856      produces:
1857      - application/json
1858      responses:
1859        "200":
1860          description: OK
1861          schema:
1862            items:
1863              $ref: '#/definitions/github_com_charmbracelet_crush_internal_proto.Message'
1864            type: array
1865        "404":
1866          description: Not Found
1867          schema:
1868            $ref: '#/definitions/proto.Error'
1869        "500":
1870          description: Internal Server Error
1871          schema:
1872            $ref: '#/definitions/proto.Error'
1873      summary: Get all user messages for workspace
1874      tags:
1875      - workspaces
1876  /workspaces/{id}/permissions/grant:
1877    post:
1878      consumes:
1879      - application/json
1880      parameters:
1881      - description: Workspace ID
1882        in: path
1883        name: id
1884        required: true
1885        type: string
1886      - description: Permission grant
1887        in: body
1888        name: request
1889        required: true
1890        schema:
1891          $ref: '#/definitions/proto.PermissionGrant'
1892      responses:
1893        "200":
1894          description: OK
1895        "400":
1896          description: Bad Request
1897          schema:
1898            $ref: '#/definitions/proto.Error'
1899        "404":
1900          description: Not Found
1901          schema:
1902            $ref: '#/definitions/proto.Error'
1903        "500":
1904          description: Internal Server Error
1905          schema:
1906            $ref: '#/definitions/proto.Error'
1907      summary: Grant permission
1908      tags:
1909      - permissions
1910  /workspaces/{id}/permissions/skip:
1911    get:
1912      parameters:
1913      - description: Workspace ID
1914        in: path
1915        name: id
1916        required: true
1917        type: string
1918      produces:
1919      - application/json
1920      responses:
1921        "200":
1922          description: OK
1923          schema:
1924            $ref: '#/definitions/proto.PermissionSkipRequest'
1925        "404":
1926          description: Not Found
1927          schema:
1928            $ref: '#/definitions/proto.Error'
1929        "500":
1930          description: Internal Server Error
1931          schema:
1932            $ref: '#/definitions/proto.Error'
1933      summary: Get skip permissions status
1934      tags:
1935      - permissions
1936    post:
1937      consumes:
1938      - application/json
1939      parameters:
1940      - description: Workspace ID
1941        in: path
1942        name: id
1943        required: true
1944        type: string
1945      - description: Permission skip request
1946        in: body
1947        name: request
1948        required: true
1949        schema:
1950          $ref: '#/definitions/proto.PermissionSkipRequest'
1951      responses:
1952        "200":
1953          description: OK
1954        "400":
1955          description: Bad Request
1956          schema:
1957            $ref: '#/definitions/proto.Error'
1958        "404":
1959          description: Not Found
1960          schema:
1961            $ref: '#/definitions/proto.Error'
1962        "500":
1963          description: Internal Server Error
1964          schema:
1965            $ref: '#/definitions/proto.Error'
1966      summary: Set skip permissions
1967      tags:
1968      - permissions
1969  /workspaces/{id}/project/init:
1970    post:
1971      parameters:
1972      - description: Workspace ID
1973        in: path
1974        name: id
1975        required: true
1976        type: string
1977      responses:
1978        "200":
1979          description: OK
1980        "404":
1981          description: Not Found
1982          schema:
1983            $ref: '#/definitions/proto.Error'
1984        "500":
1985          description: Internal Server Error
1986          schema:
1987            $ref: '#/definitions/proto.Error'
1988      summary: Mark project as initialized
1989      tags:
1990      - project
1991  /workspaces/{id}/project/init-prompt:
1992    get:
1993      parameters:
1994      - description: Workspace ID
1995        in: path
1996        name: id
1997        required: true
1998        type: string
1999      produces:
2000      - application/json
2001      responses:
2002        "200":
2003          description: OK
2004          schema:
2005            $ref: '#/definitions/proto.ProjectInitPromptResponse'
2006        "404":
2007          description: Not Found
2008          schema:
2009            $ref: '#/definitions/proto.Error'
2010        "500":
2011          description: Internal Server Error
2012          schema:
2013            $ref: '#/definitions/proto.Error'
2014      summary: Get project initialization prompt
2015      tags:
2016      - project
2017  /workspaces/{id}/project/needs-init:
2018    get:
2019      parameters:
2020      - description: Workspace ID
2021        in: path
2022        name: id
2023        required: true
2024        type: string
2025      produces:
2026      - application/json
2027      responses:
2028        "200":
2029          description: OK
2030          schema:
2031            $ref: '#/definitions/proto.ProjectNeedsInitResponse'
2032        "404":
2033          description: Not Found
2034          schema:
2035            $ref: '#/definitions/proto.Error'
2036        "500":
2037          description: Internal Server Error
2038          schema:
2039            $ref: '#/definitions/proto.Error'
2040      summary: Check if project needs initialization
2041      tags:
2042      - project
2043  /workspaces/{id}/providers:
2044    get:
2045      parameters:
2046      - description: Workspace ID
2047        in: path
2048        name: id
2049        required: true
2050        type: string
2051      produces:
2052      - application/json
2053      responses:
2054        "200":
2055          description: OK
2056          schema:
2057            type: object
2058        "404":
2059          description: Not Found
2060          schema:
2061            $ref: '#/definitions/proto.Error'
2062        "500":
2063          description: Internal Server Error
2064          schema:
2065            $ref: '#/definitions/proto.Error'
2066      summary: Get workspace providers
2067      tags:
2068      - workspaces
2069  /workspaces/{id}/sessions:
2070    get:
2071      parameters:
2072      - description: Workspace ID
2073        in: path
2074        name: id
2075        required: true
2076        type: string
2077      produces:
2078      - application/json
2079      responses:
2080        "200":
2081          description: OK
2082          schema:
2083            items:
2084              $ref: '#/definitions/proto.Session'
2085            type: array
2086        "404":
2087          description: Not Found
2088          schema:
2089            $ref: '#/definitions/proto.Error'
2090        "500":
2091          description: Internal Server Error
2092          schema:
2093            $ref: '#/definitions/proto.Error'
2094      summary: List sessions
2095      tags:
2096      - sessions
2097    post:
2098      consumes:
2099      - application/json
2100      parameters:
2101      - description: Workspace ID
2102        in: path
2103        name: id
2104        required: true
2105        type: string
2106      - description: Session creation params (title)
2107        in: body
2108        name: request
2109        required: true
2110        schema:
2111          $ref: '#/definitions/proto.Session'
2112      produces:
2113      - application/json
2114      responses:
2115        "200":
2116          description: OK
2117          schema:
2118            $ref: '#/definitions/proto.Session'
2119        "400":
2120          description: Bad Request
2121          schema:
2122            $ref: '#/definitions/proto.Error'
2123        "404":
2124          description: Not Found
2125          schema:
2126            $ref: '#/definitions/proto.Error'
2127        "500":
2128          description: Internal Server Error
2129          schema:
2130            $ref: '#/definitions/proto.Error'
2131      summary: Create session
2132      tags:
2133      - sessions
2134  /workspaces/{id}/sessions/{sid}:
2135    delete:
2136      parameters:
2137      - description: Workspace ID
2138        in: path
2139        name: id
2140        required: true
2141        type: string
2142      - description: Session ID
2143        in: path
2144        name: sid
2145        required: true
2146        type: string
2147      responses:
2148        "200":
2149          description: OK
2150        "404":
2151          description: Not Found
2152          schema:
2153            $ref: '#/definitions/proto.Error'
2154        "500":
2155          description: Internal Server Error
2156          schema:
2157            $ref: '#/definitions/proto.Error'
2158      summary: Delete session
2159      tags:
2160      - sessions
2161    get:
2162      parameters:
2163      - description: Workspace ID
2164        in: path
2165        name: id
2166        required: true
2167        type: string
2168      - description: Session ID
2169        in: path
2170        name: sid
2171        required: true
2172        type: string
2173      produces:
2174      - application/json
2175      responses:
2176        "200":
2177          description: OK
2178          schema:
2179            $ref: '#/definitions/proto.Session'
2180        "404":
2181          description: Not Found
2182          schema:
2183            $ref: '#/definitions/proto.Error'
2184        "500":
2185          description: Internal Server Error
2186          schema:
2187            $ref: '#/definitions/proto.Error'
2188      summary: Get session
2189      tags:
2190      - sessions
2191    put:
2192      consumes:
2193      - application/json
2194      parameters:
2195      - description: Workspace ID
2196        in: path
2197        name: id
2198        required: true
2199        type: string
2200      - description: Session ID
2201        in: path
2202        name: sid
2203        required: true
2204        type: string
2205      - description: Updated session
2206        in: body
2207        name: request
2208        required: true
2209        schema:
2210          $ref: '#/definitions/proto.Session'
2211      produces:
2212      - application/json
2213      responses:
2214        "200":
2215          description: OK
2216          schema:
2217            $ref: '#/definitions/proto.Session'
2218        "400":
2219          description: Bad Request
2220          schema:
2221            $ref: '#/definitions/proto.Error'
2222        "404":
2223          description: Not Found
2224          schema:
2225            $ref: '#/definitions/proto.Error'
2226        "500":
2227          description: Internal Server Error
2228          schema:
2229            $ref: '#/definitions/proto.Error'
2230      summary: Update session
2231      tags:
2232      - sessions
2233  /workspaces/{id}/sessions/{sid}/filetracker/files:
2234    get:
2235      parameters:
2236      - description: Workspace ID
2237        in: path
2238        name: id
2239        required: true
2240        type: string
2241      - description: Session ID
2242        in: path
2243        name: sid
2244        required: true
2245        type: string
2246      produces:
2247      - application/json
2248      responses:
2249        "200":
2250          description: OK
2251          schema:
2252            items:
2253              type: string
2254            type: array
2255        "404":
2256          description: Not Found
2257          schema:
2258            $ref: '#/definitions/proto.Error'
2259        "500":
2260          description: Internal Server Error
2261          schema:
2262            $ref: '#/definitions/proto.Error'
2263      summary: List tracked files for session
2264      tags:
2265      - filetracker
2266  /workspaces/{id}/sessions/{sid}/history:
2267    get:
2268      parameters:
2269      - description: Workspace ID
2270        in: path
2271        name: id
2272        required: true
2273        type: string
2274      - description: Session ID
2275        in: path
2276        name: sid
2277        required: true
2278        type: string
2279      produces:
2280      - application/json
2281      responses:
2282        "200":
2283          description: OK
2284          schema:
2285            items:
2286              $ref: '#/definitions/proto.File'
2287            type: array
2288        "404":
2289          description: Not Found
2290          schema:
2291            $ref: '#/definitions/proto.Error'
2292        "500":
2293          description: Internal Server Error
2294          schema:
2295            $ref: '#/definitions/proto.Error'
2296      summary: Get session history
2297      tags:
2298      - sessions
2299  /workspaces/{id}/sessions/{sid}/messages:
2300    get:
2301      parameters:
2302      - description: Workspace ID
2303        in: path
2304        name: id
2305        required: true
2306        type: string
2307      - description: Session ID
2308        in: path
2309        name: sid
2310        required: true
2311        type: string
2312      produces:
2313      - application/json
2314      responses:
2315        "200":
2316          description: OK
2317          schema:
2318            items:
2319              $ref: '#/definitions/github_com_charmbracelet_crush_internal_proto.Message'
2320            type: array
2321        "404":
2322          description: Not Found
2323          schema:
2324            $ref: '#/definitions/proto.Error'
2325        "500":
2326          description: Internal Server Error
2327          schema:
2328            $ref: '#/definitions/proto.Error'
2329      summary: Get session messages
2330      tags:
2331      - sessions
2332  /workspaces/{id}/sessions/{sid}/messages/user:
2333    get:
2334      parameters:
2335      - description: Workspace ID
2336        in: path
2337        name: id
2338        required: true
2339        type: string
2340      - description: Session ID
2341        in: path
2342        name: sid
2343        required: true
2344        type: string
2345      produces:
2346      - application/json
2347      responses:
2348        "200":
2349          description: OK
2350          schema:
2351            items:
2352              $ref: '#/definitions/github_com_charmbracelet_crush_internal_proto.Message'
2353            type: array
2354        "404":
2355          description: Not Found
2356          schema:
2357            $ref: '#/definitions/proto.Error'
2358        "500":
2359          description: Internal Server Error
2360          schema:
2361            $ref: '#/definitions/proto.Error'
2362      summary: Get user messages for session
2363      tags:
2364      - sessions
2365swagger: "2.0"