fork of hey-api/openapi-ts because I need some additional things
at feat/skip-token 7452 lines 201 kB view raw
1openapi: 3.1.1 2info: 3 title: opencode 4 description: opencode api 5 version: 1.0.0 6paths: 7 /global/health: 8 get: 9 operationId: global.health 10 summary: Get health 11 description: Get health information about the OpenCode server. 12 responses: 13 '200': 14 description: Health information 15 content: 16 application/json: 17 schema: 18 type: object 19 properties: 20 healthy: 21 type: boolean 22 const: true 23 version: 24 type: string 25 required: 26 - healthy 27 - version 28 x-codeSamples: 29 - lang: js 30 source: |- 31 import { createOpencodeClient } from "@opencode-ai/sdk 32 33 const client = createOpencodeClient() 34 await client.global.health({ 35 ... 36 }) 37 /global/event: 38 get: 39 operationId: global.event 40 summary: Get global events 41 description: Subscribe to global events from the OpenCode system using 42 server-sent events. 43 responses: 44 '200': 45 description: Event stream 46 content: 47 text/event-stream: 48 schema: 49 $ref: '#/components/schemas/GlobalEvent' 50 x-codeSamples: 51 - lang: js 52 source: |- 53 import { createOpencodeClient } from "@opencode-ai/sdk 54 55 const client = createOpencodeClient() 56 await client.global.event({ 57 ... 58 }) 59 /global/dispose: 60 post: 61 operationId: global.dispose 62 summary: Dispose instance 63 description: Clean up and dispose all OpenCode instances, releasing all resources. 64 responses: 65 '200': 66 description: Global disposed 67 content: 68 application/json: 69 schema: 70 type: boolean 71 x-codeSamples: 72 - lang: js 73 source: |- 74 import { createOpencodeClient } from "@opencode-ai/sdk 75 76 const client = createOpencodeClient() 77 await client.global.dispose({ 78 ... 79 }) 80 /project: 81 get: 82 operationId: project.list 83 parameters: 84 - in: query 85 name: directory 86 schema: 87 type: string 88 summary: List all projects 89 description: Get a list of projects that have been opened with OpenCode. 90 responses: 91 '200': 92 description: List of projects 93 content: 94 application/json: 95 schema: 96 type: array 97 items: 98 $ref: '#/components/schemas/Project' 99 x-codeSamples: 100 - lang: js 101 source: |- 102 import { createOpencodeClient } from "@opencode-ai/sdk 103 104 const client = createOpencodeClient() 105 await client.project.list({ 106 ... 107 }) 108 /project/current: 109 get: 110 operationId: project.current 111 parameters: 112 - in: query 113 name: directory 114 schema: 115 type: string 116 summary: Get current project 117 description: Retrieve the currently active project that OpenCode is working with. 118 responses: 119 '200': 120 description: Current project information 121 content: 122 application/json: 123 schema: 124 $ref: '#/components/schemas/Project' 125 x-codeSamples: 126 - lang: js 127 source: |- 128 import { createOpencodeClient } from "@opencode-ai/sdk 129 130 const client = createOpencodeClient() 131 await client.project.current({ 132 ... 133 }) 134 /project/{projectID}: 135 patch: 136 operationId: project.update 137 parameters: 138 - in: query 139 name: directory 140 schema: 141 type: string 142 - in: path 143 name: projectID 144 schema: 145 type: string 146 required: true 147 summary: Update project 148 description: Update project properties such as name, icon and color. 149 responses: 150 '200': 151 description: Updated project information 152 content: 153 application/json: 154 schema: 155 $ref: '#/components/schemas/Project' 156 '400': 157 description: Bad request 158 content: 159 application/json: 160 schema: 161 $ref: '#/components/schemas/BadRequestError' 162 '404': 163 description: Not found 164 content: 165 application/json: 166 schema: 167 $ref: '#/components/schemas/NotFoundError' 168 requestBody: 169 content: 170 application/json: 171 schema: 172 type: object 173 properties: 174 name: 175 type: string 176 icon: 177 type: object 178 properties: 179 url: 180 type: string 181 color: 182 type: string 183 x-codeSamples: 184 - lang: js 185 source: |- 186 import { createOpencodeClient } from "@opencode-ai/sdk 187 188 const client = createOpencodeClient() 189 await client.project.update({ 190 ... 191 }) 192 /pty: 193 get: 194 operationId: pty.list 195 parameters: 196 - in: query 197 name: directory 198 schema: 199 type: string 200 summary: List PTY sessions 201 description: Get a list of all active pseudo-terminal (PTY) sessions managed by 202 OpenCode. 203 responses: 204 '200': 205 description: List of sessions 206 content: 207 application/json: 208 schema: 209 type: array 210 items: 211 $ref: '#/components/schemas/Pty' 212 x-codeSamples: 213 - lang: js 214 source: |- 215 import { createOpencodeClient } from "@opencode-ai/sdk 216 217 const client = createOpencodeClient() 218 await client.pty.list({ 219 ... 220 }) 221 post: 222 operationId: pty.create 223 parameters: 224 - in: query 225 name: directory 226 schema: 227 type: string 228 summary: Create PTY session 229 description: Create a new pseudo-terminal (PTY) session for running shell 230 commands and processes. 231 responses: 232 '200': 233 description: Created session 234 content: 235 application/json: 236 schema: 237 $ref: '#/components/schemas/Pty' 238 '400': 239 description: Bad request 240 content: 241 application/json: 242 schema: 243 $ref: '#/components/schemas/BadRequestError' 244 requestBody: 245 content: 246 application/json: 247 schema: 248 type: object 249 properties: 250 command: 251 type: string 252 args: 253 type: array 254 items: 255 type: string 256 cwd: 257 type: string 258 title: 259 type: string 260 env: 261 type: object 262 propertyNames: 263 type: string 264 additionalProperties: 265 type: string 266 x-codeSamples: 267 - lang: js 268 source: |- 269 import { createOpencodeClient } from "@opencode-ai/sdk 270 271 const client = createOpencodeClient() 272 await client.pty.create({ 273 ... 274 }) 275 /pty/{ptyID}: 276 get: 277 operationId: pty.get 278 parameters: 279 - in: query 280 name: directory 281 schema: 282 type: string 283 - in: path 284 name: ptyID 285 schema: 286 type: string 287 required: true 288 summary: Get PTY session 289 description: Retrieve detailed information about a specific pseudo-terminal 290 (PTY) session. 291 responses: 292 '200': 293 description: Session info 294 content: 295 application/json: 296 schema: 297 $ref: '#/components/schemas/Pty' 298 '404': 299 description: Not found 300 content: 301 application/json: 302 schema: 303 $ref: '#/components/schemas/NotFoundError' 304 x-codeSamples: 305 - lang: js 306 source: |- 307 import { createOpencodeClient } from "@opencode-ai/sdk 308 309 const client = createOpencodeClient() 310 await client.pty.get({ 311 ... 312 }) 313 put: 314 operationId: pty.update 315 parameters: 316 - in: query 317 name: directory 318 schema: 319 type: string 320 - in: path 321 name: ptyID 322 schema: 323 type: string 324 required: true 325 summary: Update PTY session 326 description: Update properties of an existing pseudo-terminal (PTY) session. 327 responses: 328 '200': 329 description: Updated session 330 content: 331 application/json: 332 schema: 333 $ref: '#/components/schemas/Pty' 334 '400': 335 description: Bad request 336 content: 337 application/json: 338 schema: 339 $ref: '#/components/schemas/BadRequestError' 340 requestBody: 341 content: 342 application/json: 343 schema: 344 type: object 345 properties: 346 title: 347 type: string 348 size: 349 type: object 350 properties: 351 rows: 352 type: number 353 cols: 354 type: number 355 required: 356 - rows 357 - cols 358 x-codeSamples: 359 - lang: js 360 source: |- 361 import { createOpencodeClient } from "@opencode-ai/sdk 362 363 const client = createOpencodeClient() 364 await client.pty.update({ 365 ... 366 }) 367 delete: 368 operationId: pty.remove 369 parameters: 370 - in: query 371 name: directory 372 schema: 373 type: string 374 - in: path 375 name: ptyID 376 schema: 377 type: string 378 required: true 379 summary: Remove PTY session 380 description: Remove and terminate a specific pseudo-terminal (PTY) session. 381 responses: 382 '200': 383 description: Session removed 384 content: 385 application/json: 386 schema: 387 type: boolean 388 '404': 389 description: Not found 390 content: 391 application/json: 392 schema: 393 $ref: '#/components/schemas/NotFoundError' 394 x-codeSamples: 395 - lang: js 396 source: |- 397 import { createOpencodeClient } from "@opencode-ai/sdk 398 399 const client = createOpencodeClient() 400 await client.pty.remove({ 401 ... 402 }) 403 /pty/{ptyID}/connect: 404 get: 405 operationId: pty.connect 406 parameters: 407 - in: query 408 name: directory 409 schema: 410 type: string 411 - in: path 412 name: ptyID 413 schema: 414 type: string 415 required: true 416 summary: Connect to PTY session 417 description: Establish a WebSocket connection to interact with a pseudo-terminal 418 (PTY) session in real-time. 419 responses: 420 '200': 421 description: Connected session 422 content: 423 application/json: 424 schema: 425 type: boolean 426 '404': 427 description: Not found 428 content: 429 application/json: 430 schema: 431 $ref: '#/components/schemas/NotFoundError' 432 x-codeSamples: 433 - lang: js 434 source: |- 435 import { createOpencodeClient } from "@opencode-ai/sdk 436 437 const client = createOpencodeClient() 438 await client.pty.connect({ 439 ... 440 }) 441 /config: 442 get: 443 operationId: config.get 444 parameters: 445 - in: query 446 name: directory 447 schema: 448 type: string 449 summary: Get configuration 450 description: Retrieve the current OpenCode configuration settings and preferences. 451 responses: 452 '200': 453 description: Get config info 454 content: 455 application/json: 456 schema: 457 $ref: '#/components/schemas/Config' 458 x-codeSamples: 459 - lang: js 460 source: |- 461 import { createOpencodeClient } from "@opencode-ai/sdk 462 463 const client = createOpencodeClient() 464 await client.config.get({ 465 ... 466 }) 467 patch: 468 operationId: config.update 469 parameters: 470 - in: query 471 name: directory 472 schema: 473 type: string 474 summary: Update configuration 475 description: Update OpenCode configuration settings and preferences. 476 responses: 477 '200': 478 description: Successfully updated config 479 content: 480 application/json: 481 schema: 482 $ref: '#/components/schemas/Config' 483 '400': 484 description: Bad request 485 content: 486 application/json: 487 schema: 488 $ref: '#/components/schemas/BadRequestError' 489 requestBody: 490 content: 491 application/json: 492 schema: 493 $ref: '#/components/schemas/Config' 494 x-codeSamples: 495 - lang: js 496 source: |- 497 import { createOpencodeClient } from "@opencode-ai/sdk 498 499 const client = createOpencodeClient() 500 await client.config.update({ 501 ... 502 }) 503 /experimental/tool/ids: 504 get: 505 operationId: tool.ids 506 parameters: 507 - in: query 508 name: directory 509 schema: 510 type: string 511 summary: List tool IDs 512 description: Get a list of all available tool IDs, including both built-in tools 513 and dynamically registered tools. 514 responses: 515 '200': 516 description: Tool IDs 517 content: 518 application/json: 519 schema: 520 $ref: '#/components/schemas/ToolIDs' 521 '400': 522 description: Bad request 523 content: 524 application/json: 525 schema: 526 $ref: '#/components/schemas/BadRequestError' 527 x-codeSamples: 528 - lang: js 529 source: |- 530 import { createOpencodeClient } from "@opencode-ai/sdk 531 532 const client = createOpencodeClient() 533 await client.tool.ids({ 534 ... 535 }) 536 /experimental/tool: 537 get: 538 operationId: tool.list 539 parameters: 540 - in: query 541 name: directory 542 schema: 543 type: string 544 - in: query 545 name: provider 546 schema: 547 type: string 548 required: true 549 - in: query 550 name: model 551 schema: 552 type: string 553 required: true 554 summary: List tools 555 description: Get a list of available tools with their JSON schema parameters for 556 a specific provider and model combination. 557 responses: 558 '200': 559 description: Tools 560 content: 561 application/json: 562 schema: 563 $ref: '#/components/schemas/ToolList' 564 '400': 565 description: Bad request 566 content: 567 application/json: 568 schema: 569 $ref: '#/components/schemas/BadRequestError' 570 x-codeSamples: 571 - lang: js 572 source: |- 573 import { createOpencodeClient } from "@opencode-ai/sdk 574 575 const client = createOpencodeClient() 576 await client.tool.list({ 577 ... 578 }) 579 /instance/dispose: 580 post: 581 operationId: instance.dispose 582 parameters: 583 - in: query 584 name: directory 585 schema: 586 type: string 587 summary: Dispose instance 588 description: Clean up and dispose the current OpenCode instance, releasing all 589 resources. 590 responses: 591 '200': 592 description: Instance disposed 593 content: 594 application/json: 595 schema: 596 type: boolean 597 x-codeSamples: 598 - lang: js 599 source: |- 600 import { createOpencodeClient } from "@opencode-ai/sdk 601 602 const client = createOpencodeClient() 603 await client.instance.dispose({ 604 ... 605 }) 606 /path: 607 get: 608 operationId: path.get 609 parameters: 610 - in: query 611 name: directory 612 schema: 613 type: string 614 summary: Get paths 615 description: Retrieve the current working directory and related path information 616 for the OpenCode instance. 617 responses: 618 '200': 619 description: Path 620 content: 621 application/json: 622 schema: 623 $ref: '#/components/schemas/Path' 624 x-codeSamples: 625 - lang: js 626 source: |- 627 import { createOpencodeClient } from "@opencode-ai/sdk 628 629 const client = createOpencodeClient() 630 await client.path.get({ 631 ... 632 }) 633 /vcs: 634 get: 635 operationId: vcs.get 636 parameters: 637 - in: query 638 name: directory 639 schema: 640 type: string 641 summary: Get VCS info 642 description: Retrieve version control system (VCS) information for the current 643 project, such as git branch. 644 responses: 645 '200': 646 description: VCS info 647 content: 648 application/json: 649 schema: 650 $ref: '#/components/schemas/VcsInfo' 651 x-codeSamples: 652 - lang: js 653 source: |- 654 import { createOpencodeClient } from "@opencode-ai/sdk 655 656 const client = createOpencodeClient() 657 await client.vcs.get({ 658 ... 659 }) 660 /session: 661 get: 662 operationId: session.list 663 parameters: 664 - in: query 665 name: directory 666 schema: 667 type: string 668 summary: List sessions 669 description: Get a list of all OpenCode sessions, sorted by most recently updated. 670 responses: 671 '200': 672 description: List of sessions 673 content: 674 application/json: 675 schema: 676 type: array 677 items: 678 $ref: '#/components/schemas/Session' 679 x-codeSamples: 680 - lang: js 681 source: |- 682 import { createOpencodeClient } from "@opencode-ai/sdk 683 684 const client = createOpencodeClient() 685 await client.session.list({ 686 ... 687 }) 688 post: 689 operationId: session.create 690 parameters: 691 - in: query 692 name: directory 693 schema: 694 type: string 695 summary: Create session 696 description: Create a new OpenCode session for interacting with AI assistants 697 and managing conversations. 698 responses: 699 '200': 700 description: Successfully created session 701 content: 702 application/json: 703 schema: 704 $ref: '#/components/schemas/Session' 705 '400': 706 description: Bad request 707 content: 708 application/json: 709 schema: 710 $ref: '#/components/schemas/BadRequestError' 711 requestBody: 712 content: 713 application/json: 714 schema: 715 type: object 716 properties: 717 parentID: 718 type: string 719 pattern: ^ses.* 720 title: 721 type: string 722 permission: 723 $ref: '#/components/schemas/PermissionRuleset' 724 x-codeSamples: 725 - lang: js 726 source: |- 727 import { createOpencodeClient } from "@opencode-ai/sdk 728 729 const client = createOpencodeClient() 730 await client.session.create({ 731 ... 732 }) 733 /session/status: 734 get: 735 operationId: session.status 736 parameters: 737 - in: query 738 name: directory 739 schema: 740 type: string 741 summary: Get session status 742 description: Retrieve the current status of all sessions, including active, 743 idle, and completed states. 744 responses: 745 '200': 746 description: Get session status 747 content: 748 application/json: 749 schema: 750 type: object 751 propertyNames: 752 type: string 753 additionalProperties: 754 $ref: '#/components/schemas/SessionStatus' 755 '400': 756 description: Bad request 757 content: 758 application/json: 759 schema: 760 $ref: '#/components/schemas/BadRequestError' 761 x-codeSamples: 762 - lang: js 763 source: |- 764 import { createOpencodeClient } from "@opencode-ai/sdk 765 766 const client = createOpencodeClient() 767 await client.session.status({ 768 ... 769 }) 770 /session/{sessionID}: 771 get: 772 operationId: session.get 773 parameters: 774 - in: query 775 name: directory 776 schema: 777 type: string 778 - in: path 779 name: sessionID 780 schema: 781 type: string 782 pattern: ^ses.* 783 required: true 784 summary: Get session 785 description: Retrieve detailed information about a specific OpenCode session. 786 tags: 787 - Session 788 responses: 789 '200': 790 description: Get session 791 content: 792 application/json: 793 schema: 794 $ref: '#/components/schemas/Session' 795 '400': 796 description: Bad request 797 content: 798 application/json: 799 schema: 800 $ref: '#/components/schemas/BadRequestError' 801 '404': 802 description: Not found 803 content: 804 application/json: 805 schema: 806 $ref: '#/components/schemas/NotFoundError' 807 x-codeSamples: 808 - lang: js 809 source: |- 810 import { createOpencodeClient } from "@opencode-ai/sdk 811 812 const client = createOpencodeClient() 813 await client.session.get({ 814 ... 815 }) 816 delete: 817 operationId: session.delete 818 parameters: 819 - in: query 820 name: directory 821 schema: 822 type: string 823 - in: path 824 name: sessionID 825 schema: 826 type: string 827 pattern: ^ses.* 828 required: true 829 summary: Delete session 830 description: Delete a session and permanently remove all associated data, 831 including messages and history. 832 responses: 833 '200': 834 description: Successfully deleted session 835 content: 836 application/json: 837 schema: 838 type: boolean 839 '400': 840 description: Bad request 841 content: 842 application/json: 843 schema: 844 $ref: '#/components/schemas/BadRequestError' 845 '404': 846 description: Not found 847 content: 848 application/json: 849 schema: 850 $ref: '#/components/schemas/NotFoundError' 851 x-codeSamples: 852 - lang: js 853 source: |- 854 import { createOpencodeClient } from "@opencode-ai/sdk 855 856 const client = createOpencodeClient() 857 await client.session.delete({ 858 ... 859 }) 860 patch: 861 operationId: session.update 862 parameters: 863 - in: query 864 name: directory 865 schema: 866 type: string 867 - in: path 868 name: sessionID 869 schema: 870 type: string 871 required: true 872 summary: Update session 873 description: Update properties of an existing session, such as title or other 874 metadata. 875 responses: 876 '200': 877 description: Successfully updated session 878 content: 879 application/json: 880 schema: 881 $ref: '#/components/schemas/Session' 882 '400': 883 description: Bad request 884 content: 885 application/json: 886 schema: 887 $ref: '#/components/schemas/BadRequestError' 888 '404': 889 description: Not found 890 content: 891 application/json: 892 schema: 893 $ref: '#/components/schemas/NotFoundError' 894 requestBody: 895 content: 896 application/json: 897 schema: 898 type: object 899 properties: 900 title: 901 type: string 902 time: 903 type: object 904 properties: 905 archived: 906 type: number 907 x-codeSamples: 908 - lang: js 909 source: |- 910 import { createOpencodeClient } from "@opencode-ai/sdk 911 912 const client = createOpencodeClient() 913 await client.session.update({ 914 ... 915 }) 916 /session/{sessionID}/children: 917 get: 918 operationId: session.children 919 parameters: 920 - in: query 921 name: directory 922 schema: 923 type: string 924 - in: path 925 name: sessionID 926 schema: 927 type: string 928 pattern: ^ses.* 929 required: true 930 summary: Get session children 931 tags: 932 - Session 933 description: Retrieve all child sessions that were forked from the specified 934 parent session. 935 responses: 936 '200': 937 description: List of children 938 content: 939 application/json: 940 schema: 941 type: array 942 items: 943 $ref: '#/components/schemas/Session' 944 '400': 945 description: Bad request 946 content: 947 application/json: 948 schema: 949 $ref: '#/components/schemas/BadRequestError' 950 '404': 951 description: Not found 952 content: 953 application/json: 954 schema: 955 $ref: '#/components/schemas/NotFoundError' 956 x-codeSamples: 957 - lang: js 958 source: |- 959 import { createOpencodeClient } from "@opencode-ai/sdk 960 961 const client = createOpencodeClient() 962 await client.session.children({ 963 ... 964 }) 965 /session/{sessionID}/todo: 966 get: 967 operationId: session.todo 968 parameters: 969 - in: query 970 name: directory 971 schema: 972 type: string 973 - in: path 974 name: sessionID 975 schema: 976 type: string 977 required: true 978 description: Session ID 979 summary: Get session todos 980 description: Retrieve the todo list associated with a specific session, showing 981 tasks and action items. 982 responses: 983 '200': 984 description: Todo list 985 content: 986 application/json: 987 schema: 988 type: array 989 items: 990 $ref: '#/components/schemas/Todo' 991 '400': 992 description: Bad request 993 content: 994 application/json: 995 schema: 996 $ref: '#/components/schemas/BadRequestError' 997 '404': 998 description: Not found 999 content: 1000 application/json: 1001 schema: 1002 $ref: '#/components/schemas/NotFoundError' 1003 x-codeSamples: 1004 - lang: js 1005 source: |- 1006 import { createOpencodeClient } from "@opencode-ai/sdk 1007 1008 const client = createOpencodeClient() 1009 await client.session.todo({ 1010 ... 1011 }) 1012 /session/{sessionID}/init: 1013 post: 1014 operationId: session.init 1015 parameters: 1016 - in: query 1017 name: directory 1018 schema: 1019 type: string 1020 - in: path 1021 name: sessionID 1022 schema: 1023 type: string 1024 required: true 1025 description: Session ID 1026 summary: Initialize session 1027 description: Analyze the current application and create an AGENTS.md file with 1028 project-specific agent configurations. 1029 responses: 1030 '200': 1031 description: '200' 1032 content: 1033 application/json: 1034 schema: 1035 type: boolean 1036 '400': 1037 description: Bad request 1038 content: 1039 application/json: 1040 schema: 1041 $ref: '#/components/schemas/BadRequestError' 1042 '404': 1043 description: Not found 1044 content: 1045 application/json: 1046 schema: 1047 $ref: '#/components/schemas/NotFoundError' 1048 requestBody: 1049 content: 1050 application/json: 1051 schema: 1052 type: object 1053 properties: 1054 modelID: 1055 type: string 1056 providerID: 1057 type: string 1058 messageID: 1059 type: string 1060 pattern: ^msg.* 1061 required: 1062 - modelID 1063 - providerID 1064 - messageID 1065 x-codeSamples: 1066 - lang: js 1067 source: |- 1068 import { createOpencodeClient } from "@opencode-ai/sdk 1069 1070 const client = createOpencodeClient() 1071 await client.session.init({ 1072 ... 1073 }) 1074 /session/{sessionID}/fork: 1075 post: 1076 operationId: session.fork 1077 parameters: 1078 - in: query 1079 name: directory 1080 schema: 1081 type: string 1082 - in: path 1083 name: sessionID 1084 schema: 1085 type: string 1086 pattern: ^ses.* 1087 required: true 1088 summary: Fork session 1089 description: Create a new session by forking an existing session at a specific 1090 message point. 1091 responses: 1092 '200': 1093 description: '200' 1094 content: 1095 application/json: 1096 schema: 1097 $ref: '#/components/schemas/Session' 1098 requestBody: 1099 content: 1100 application/json: 1101 schema: 1102 type: object 1103 properties: 1104 messageID: 1105 type: string 1106 pattern: ^msg.* 1107 x-codeSamples: 1108 - lang: js 1109 source: |- 1110 import { createOpencodeClient } from "@opencode-ai/sdk 1111 1112 const client = createOpencodeClient() 1113 await client.session.fork({ 1114 ... 1115 }) 1116 /session/{sessionID}/abort: 1117 post: 1118 operationId: session.abort 1119 parameters: 1120 - in: query 1121 name: directory 1122 schema: 1123 type: string 1124 - in: path 1125 name: sessionID 1126 schema: 1127 type: string 1128 required: true 1129 summary: Abort session 1130 description: Abort an active session and stop any ongoing AI processing or 1131 command execution. 1132 responses: 1133 '200': 1134 description: Aborted session 1135 content: 1136 application/json: 1137 schema: 1138 type: boolean 1139 '400': 1140 description: Bad request 1141 content: 1142 application/json: 1143 schema: 1144 $ref: '#/components/schemas/BadRequestError' 1145 '404': 1146 description: Not found 1147 content: 1148 application/json: 1149 schema: 1150 $ref: '#/components/schemas/NotFoundError' 1151 x-codeSamples: 1152 - lang: js 1153 source: |- 1154 import { createOpencodeClient } from "@opencode-ai/sdk 1155 1156 const client = createOpencodeClient() 1157 await client.session.abort({ 1158 ... 1159 }) 1160 /session/{sessionID}/share: 1161 post: 1162 operationId: session.share 1163 parameters: 1164 - in: query 1165 name: directory 1166 schema: 1167 type: string 1168 - in: path 1169 name: sessionID 1170 schema: 1171 type: string 1172 required: true 1173 summary: Share session 1174 description: Create a shareable link for a session, allowing others to view the 1175 conversation. 1176 responses: 1177 '200': 1178 description: Successfully shared session 1179 content: 1180 application/json: 1181 schema: 1182 $ref: '#/components/schemas/Session' 1183 '400': 1184 description: Bad request 1185 content: 1186 application/json: 1187 schema: 1188 $ref: '#/components/schemas/BadRequestError' 1189 '404': 1190 description: Not found 1191 content: 1192 application/json: 1193 schema: 1194 $ref: '#/components/schemas/NotFoundError' 1195 x-codeSamples: 1196 - lang: js 1197 source: |- 1198 import { createOpencodeClient } from "@opencode-ai/sdk 1199 1200 const client = createOpencodeClient() 1201 await client.session.share({ 1202 ... 1203 }) 1204 delete: 1205 operationId: session.unshare 1206 parameters: 1207 - in: query 1208 name: directory 1209 schema: 1210 type: string 1211 - in: path 1212 name: sessionID 1213 schema: 1214 type: string 1215 pattern: ^ses.* 1216 required: true 1217 summary: Unshare session 1218 description: Remove the shareable link for a session, making it private again. 1219 responses: 1220 '200': 1221 description: Successfully unshared session 1222 content: 1223 application/json: 1224 schema: 1225 $ref: '#/components/schemas/Session' 1226 '400': 1227 description: Bad request 1228 content: 1229 application/json: 1230 schema: 1231 $ref: '#/components/schemas/BadRequestError' 1232 '404': 1233 description: Not found 1234 content: 1235 application/json: 1236 schema: 1237 $ref: '#/components/schemas/NotFoundError' 1238 x-codeSamples: 1239 - lang: js 1240 source: |- 1241 import { createOpencodeClient } from "@opencode-ai/sdk 1242 1243 const client = createOpencodeClient() 1244 await client.session.unshare({ 1245 ... 1246 }) 1247 /session/{sessionID}/diff: 1248 get: 1249 operationId: session.diff 1250 parameters: 1251 - in: query 1252 name: directory 1253 schema: 1254 type: string 1255 - in: path 1256 name: sessionID 1257 schema: 1258 type: string 1259 required: true 1260 description: Session ID 1261 - in: query 1262 name: messageID 1263 schema: 1264 type: string 1265 pattern: ^msg.* 1266 summary: Get session diff 1267 description: Get all file changes (diffs) made during this session. 1268 responses: 1269 '200': 1270 description: List of diffs 1271 content: 1272 application/json: 1273 schema: 1274 type: array 1275 items: 1276 $ref: '#/components/schemas/FileDiff' 1277 '400': 1278 description: Bad request 1279 content: 1280 application/json: 1281 schema: 1282 $ref: '#/components/schemas/BadRequestError' 1283 '404': 1284 description: Not found 1285 content: 1286 application/json: 1287 schema: 1288 $ref: '#/components/schemas/NotFoundError' 1289 x-codeSamples: 1290 - lang: js 1291 source: |- 1292 import { createOpencodeClient } from "@opencode-ai/sdk 1293 1294 const client = createOpencodeClient() 1295 await client.session.diff({ 1296 ... 1297 }) 1298 /session/{sessionID}/summarize: 1299 post: 1300 operationId: session.summarize 1301 parameters: 1302 - in: query 1303 name: directory 1304 schema: 1305 type: string 1306 - in: path 1307 name: sessionID 1308 schema: 1309 type: string 1310 required: true 1311 description: Session ID 1312 summary: Summarize session 1313 description: Generate a concise summary of the session using AI compaction to 1314 preserve key information. 1315 responses: 1316 '200': 1317 description: Summarized session 1318 content: 1319 application/json: 1320 schema: 1321 type: boolean 1322 '400': 1323 description: Bad request 1324 content: 1325 application/json: 1326 schema: 1327 $ref: '#/components/schemas/BadRequestError' 1328 '404': 1329 description: Not found 1330 content: 1331 application/json: 1332 schema: 1333 $ref: '#/components/schemas/NotFoundError' 1334 requestBody: 1335 content: 1336 application/json: 1337 schema: 1338 type: object 1339 properties: 1340 providerID: 1341 type: string 1342 modelID: 1343 type: string 1344 auto: 1345 default: false 1346 type: boolean 1347 required: 1348 - providerID 1349 - modelID 1350 x-codeSamples: 1351 - lang: js 1352 source: |- 1353 import { createOpencodeClient } from "@opencode-ai/sdk 1354 1355 const client = createOpencodeClient() 1356 await client.session.summarize({ 1357 ... 1358 }) 1359 /session/{sessionID}/message: 1360 get: 1361 operationId: session.messages 1362 parameters: 1363 - in: query 1364 name: directory 1365 schema: 1366 type: string 1367 - in: path 1368 name: sessionID 1369 schema: 1370 type: string 1371 required: true 1372 description: Session ID 1373 - in: query 1374 name: limit 1375 schema: 1376 type: number 1377 summary: Get session messages 1378 description: Retrieve all messages in a session, including user prompts and AI 1379 responses. 1380 responses: 1381 '200': 1382 description: List of messages 1383 content: 1384 application/json: 1385 schema: 1386 type: array 1387 items: 1388 type: object 1389 properties: 1390 info: 1391 $ref: '#/components/schemas/Message' 1392 parts: 1393 type: array 1394 items: 1395 $ref: '#/components/schemas/Part' 1396 required: 1397 - info 1398 - parts 1399 '400': 1400 description: Bad request 1401 content: 1402 application/json: 1403 schema: 1404 $ref: '#/components/schemas/BadRequestError' 1405 '404': 1406 description: Not found 1407 content: 1408 application/json: 1409 schema: 1410 $ref: '#/components/schemas/NotFoundError' 1411 x-codeSamples: 1412 - lang: js 1413 source: |- 1414 import { createOpencodeClient } from "@opencode-ai/sdk 1415 1416 const client = createOpencodeClient() 1417 await client.session.messages({ 1418 ... 1419 }) 1420 post: 1421 operationId: session.prompt 1422 parameters: 1423 - in: query 1424 name: directory 1425 schema: 1426 type: string 1427 - in: path 1428 name: sessionID 1429 schema: 1430 type: string 1431 required: true 1432 description: Session ID 1433 summary: Send message 1434 description: Create and send a new message to a session, streaming the AI response. 1435 responses: 1436 '200': 1437 description: Created message 1438 content: 1439 application/json: 1440 schema: 1441 type: object 1442 properties: 1443 info: 1444 $ref: '#/components/schemas/AssistantMessage' 1445 parts: 1446 type: array 1447 items: 1448 $ref: '#/components/schemas/Part' 1449 required: 1450 - info 1451 - parts 1452 '400': 1453 description: Bad request 1454 content: 1455 application/json: 1456 schema: 1457 $ref: '#/components/schemas/BadRequestError' 1458 '404': 1459 description: Not found 1460 content: 1461 application/json: 1462 schema: 1463 $ref: '#/components/schemas/NotFoundError' 1464 requestBody: 1465 content: 1466 application/json: 1467 schema: 1468 type: object 1469 properties: 1470 messageID: 1471 type: string 1472 pattern: ^msg.* 1473 model: 1474 type: object 1475 properties: 1476 providerID: 1477 type: string 1478 modelID: 1479 type: string 1480 required: 1481 - providerID 1482 - modelID 1483 agent: 1484 type: string 1485 noReply: 1486 type: boolean 1487 tools: 1488 description: '@deprecated tools and permissions have been merged, you can set 1489 permissions on the session itself now' 1490 type: object 1491 propertyNames: 1492 type: string 1493 additionalProperties: 1494 type: boolean 1495 system: 1496 type: string 1497 variant: 1498 type: string 1499 parts: 1500 type: array 1501 items: 1502 anyOf: 1503 - $ref: '#/components/schemas/TextPartInput' 1504 - $ref: '#/components/schemas/FilePartInput' 1505 - $ref: '#/components/schemas/AgentPartInput' 1506 - $ref: '#/components/schemas/SubtaskPartInput' 1507 required: 1508 - parts 1509 x-codeSamples: 1510 - lang: js 1511 source: |- 1512 import { createOpencodeClient } from "@opencode-ai/sdk 1513 1514 const client = createOpencodeClient() 1515 await client.session.prompt({ 1516 ... 1517 }) 1518 /session/{sessionID}/message/{messageID}: 1519 get: 1520 operationId: session.message 1521 parameters: 1522 - in: query 1523 name: directory 1524 schema: 1525 type: string 1526 - in: path 1527 name: sessionID 1528 schema: 1529 type: string 1530 required: true 1531 description: Session ID 1532 - in: path 1533 name: messageID 1534 schema: 1535 type: string 1536 required: true 1537 description: Message ID 1538 summary: Get message 1539 description: Retrieve a specific message from a session by its message ID. 1540 responses: 1541 '200': 1542 description: Message 1543 content: 1544 application/json: 1545 schema: 1546 type: object 1547 properties: 1548 info: 1549 $ref: '#/components/schemas/Message' 1550 parts: 1551 type: array 1552 items: 1553 $ref: '#/components/schemas/Part' 1554 required: 1555 - info 1556 - parts 1557 '400': 1558 description: Bad request 1559 content: 1560 application/json: 1561 schema: 1562 $ref: '#/components/schemas/BadRequestError' 1563 '404': 1564 description: Not found 1565 content: 1566 application/json: 1567 schema: 1568 $ref: '#/components/schemas/NotFoundError' 1569 x-codeSamples: 1570 - lang: js 1571 source: |- 1572 import { createOpencodeClient } from "@opencode-ai/sdk 1573 1574 const client = createOpencodeClient() 1575 await client.session.message({ 1576 ... 1577 }) 1578 /session/{sessionID}/message/{messageID}/part/{partID}: 1579 delete: 1580 operationId: part.delete 1581 parameters: 1582 - in: query 1583 name: directory 1584 schema: 1585 type: string 1586 - in: path 1587 name: sessionID 1588 schema: 1589 type: string 1590 required: true 1591 description: Session ID 1592 - in: path 1593 name: messageID 1594 schema: 1595 type: string 1596 required: true 1597 description: Message ID 1598 - in: path 1599 name: partID 1600 schema: 1601 type: string 1602 required: true 1603 description: Part ID 1604 description: Delete a part from a message 1605 responses: 1606 '200': 1607 description: Successfully deleted part 1608 content: 1609 application/json: 1610 schema: 1611 type: boolean 1612 '400': 1613 description: Bad request 1614 content: 1615 application/json: 1616 schema: 1617 $ref: '#/components/schemas/BadRequestError' 1618 '404': 1619 description: Not found 1620 content: 1621 application/json: 1622 schema: 1623 $ref: '#/components/schemas/NotFoundError' 1624 x-codeSamples: 1625 - lang: js 1626 source: |- 1627 import { createOpencodeClient } from "@opencode-ai/sdk 1628 1629 const client = createOpencodeClient() 1630 await client.part.delete({ 1631 ... 1632 }) 1633 patch: 1634 operationId: part.update 1635 parameters: 1636 - in: query 1637 name: directory 1638 schema: 1639 type: string 1640 - in: path 1641 name: sessionID 1642 schema: 1643 type: string 1644 required: true 1645 description: Session ID 1646 - in: path 1647 name: messageID 1648 schema: 1649 type: string 1650 required: true 1651 description: Message ID 1652 - in: path 1653 name: partID 1654 schema: 1655 type: string 1656 required: true 1657 description: Part ID 1658 description: Update a part in a message 1659 responses: 1660 '200': 1661 description: Successfully updated part 1662 content: 1663 application/json: 1664 schema: 1665 $ref: '#/components/schemas/Part' 1666 '400': 1667 description: Bad request 1668 content: 1669 application/json: 1670 schema: 1671 $ref: '#/components/schemas/BadRequestError' 1672 '404': 1673 description: Not found 1674 content: 1675 application/json: 1676 schema: 1677 $ref: '#/components/schemas/NotFoundError' 1678 requestBody: 1679 content: 1680 application/json: 1681 schema: 1682 $ref: '#/components/schemas/Part' 1683 x-codeSamples: 1684 - lang: js 1685 source: |- 1686 import { createOpencodeClient } from "@opencode-ai/sdk 1687 1688 const client = createOpencodeClient() 1689 await client.part.update({ 1690 ... 1691 }) 1692 /session/{sessionID}/prompt_async: 1693 post: 1694 operationId: session.prompt_async 1695 parameters: 1696 - in: query 1697 name: directory 1698 schema: 1699 type: string 1700 - in: path 1701 name: sessionID 1702 schema: 1703 type: string 1704 required: true 1705 description: Session ID 1706 summary: Send async message 1707 description: Create and send a new message to a session asynchronously, starting 1708 the session if needed and returning immediately. 1709 responses: 1710 '204': 1711 description: Prompt accepted 1712 '400': 1713 description: Bad request 1714 content: 1715 application/json: 1716 schema: 1717 $ref: '#/components/schemas/BadRequestError' 1718 '404': 1719 description: Not found 1720 content: 1721 application/json: 1722 schema: 1723 $ref: '#/components/schemas/NotFoundError' 1724 requestBody: 1725 content: 1726 application/json: 1727 schema: 1728 type: object 1729 properties: 1730 messageID: 1731 type: string 1732 pattern: ^msg.* 1733 model: 1734 type: object 1735 properties: 1736 providerID: 1737 type: string 1738 modelID: 1739 type: string 1740 required: 1741 - providerID 1742 - modelID 1743 agent: 1744 type: string 1745 noReply: 1746 type: boolean 1747 tools: 1748 description: '@deprecated tools and permissions have been merged, you can set 1749 permissions on the session itself now' 1750 type: object 1751 propertyNames: 1752 type: string 1753 additionalProperties: 1754 type: boolean 1755 system: 1756 type: string 1757 variant: 1758 type: string 1759 parts: 1760 type: array 1761 items: 1762 anyOf: 1763 - $ref: '#/components/schemas/TextPartInput' 1764 - $ref: '#/components/schemas/FilePartInput' 1765 - $ref: '#/components/schemas/AgentPartInput' 1766 - $ref: '#/components/schemas/SubtaskPartInput' 1767 required: 1768 - parts 1769 x-codeSamples: 1770 - lang: js 1771 source: |- 1772 import { createOpencodeClient } from "@opencode-ai/sdk 1773 1774 const client = createOpencodeClient() 1775 await client.session.prompt_async({ 1776 ... 1777 }) 1778 /session/{sessionID}/command: 1779 post: 1780 operationId: session.command 1781 parameters: 1782 - in: query 1783 name: directory 1784 schema: 1785 type: string 1786 - in: path 1787 name: sessionID 1788 schema: 1789 type: string 1790 required: true 1791 description: Session ID 1792 summary: Send command 1793 description: Send a new command to a session for execution by the AI assistant. 1794 responses: 1795 '200': 1796 description: Created message 1797 content: 1798 application/json: 1799 schema: 1800 type: object 1801 properties: 1802 info: 1803 $ref: '#/components/schemas/AssistantMessage' 1804 parts: 1805 type: array 1806 items: 1807 $ref: '#/components/schemas/Part' 1808 required: 1809 - info 1810 - parts 1811 '400': 1812 description: Bad request 1813 content: 1814 application/json: 1815 schema: 1816 $ref: '#/components/schemas/BadRequestError' 1817 '404': 1818 description: Not found 1819 content: 1820 application/json: 1821 schema: 1822 $ref: '#/components/schemas/NotFoundError' 1823 requestBody: 1824 content: 1825 application/json: 1826 schema: 1827 type: object 1828 properties: 1829 messageID: 1830 type: string 1831 pattern: ^msg.* 1832 agent: 1833 type: string 1834 model: 1835 type: string 1836 arguments: 1837 type: string 1838 command: 1839 type: string 1840 variant: 1841 type: string 1842 required: 1843 - arguments 1844 - command 1845 x-codeSamples: 1846 - lang: js 1847 source: |- 1848 import { createOpencodeClient } from "@opencode-ai/sdk 1849 1850 const client = createOpencodeClient() 1851 await client.session.command({ 1852 ... 1853 }) 1854 /session/{sessionID}/shell: 1855 post: 1856 operationId: session.shell 1857 parameters: 1858 - in: query 1859 name: directory 1860 schema: 1861 type: string 1862 - in: path 1863 name: sessionID 1864 schema: 1865 type: string 1866 required: true 1867 description: Session ID 1868 summary: Run shell command 1869 description: Execute a shell command within the session context and return the 1870 AI's response. 1871 responses: 1872 '200': 1873 description: Created message 1874 content: 1875 application/json: 1876 schema: 1877 $ref: '#/components/schemas/AssistantMessage' 1878 '400': 1879 description: Bad request 1880 content: 1881 application/json: 1882 schema: 1883 $ref: '#/components/schemas/BadRequestError' 1884 '404': 1885 description: Not found 1886 content: 1887 application/json: 1888 schema: 1889 $ref: '#/components/schemas/NotFoundError' 1890 requestBody: 1891 content: 1892 application/json: 1893 schema: 1894 type: object 1895 properties: 1896 agent: 1897 type: string 1898 model: 1899 type: object 1900 properties: 1901 providerID: 1902 type: string 1903 modelID: 1904 type: string 1905 required: 1906 - providerID 1907 - modelID 1908 command: 1909 type: string 1910 required: 1911 - agent 1912 - command 1913 x-codeSamples: 1914 - lang: js 1915 source: |- 1916 import { createOpencodeClient } from "@opencode-ai/sdk 1917 1918 const client = createOpencodeClient() 1919 await client.session.shell({ 1920 ... 1921 }) 1922 /session/{sessionID}/revert: 1923 post: 1924 operationId: session.revert 1925 parameters: 1926 - in: query 1927 name: directory 1928 schema: 1929 type: string 1930 - in: path 1931 name: sessionID 1932 schema: 1933 type: string 1934 required: true 1935 summary: Revert message 1936 description: Revert a specific message in a session, undoing its effects and 1937 restoring the previous state. 1938 responses: 1939 '200': 1940 description: Updated session 1941 content: 1942 application/json: 1943 schema: 1944 $ref: '#/components/schemas/Session' 1945 '400': 1946 description: Bad request 1947 content: 1948 application/json: 1949 schema: 1950 $ref: '#/components/schemas/BadRequestError' 1951 '404': 1952 description: Not found 1953 content: 1954 application/json: 1955 schema: 1956 $ref: '#/components/schemas/NotFoundError' 1957 requestBody: 1958 content: 1959 application/json: 1960 schema: 1961 type: object 1962 properties: 1963 messageID: 1964 type: string 1965 pattern: ^msg.* 1966 partID: 1967 type: string 1968 pattern: ^prt.* 1969 required: 1970 - messageID 1971 x-codeSamples: 1972 - lang: js 1973 source: |- 1974 import { createOpencodeClient } from "@opencode-ai/sdk 1975 1976 const client = createOpencodeClient() 1977 await client.session.revert({ 1978 ... 1979 }) 1980 /session/{sessionID}/unrevert: 1981 post: 1982 operationId: session.unrevert 1983 parameters: 1984 - in: query 1985 name: directory 1986 schema: 1987 type: string 1988 - in: path 1989 name: sessionID 1990 schema: 1991 type: string 1992 required: true 1993 summary: Restore reverted messages 1994 description: Restore all previously reverted messages in a session. 1995 responses: 1996 '200': 1997 description: Updated session 1998 content: 1999 application/json: 2000 schema: 2001 $ref: '#/components/schemas/Session' 2002 '400': 2003 description: Bad request 2004 content: 2005 application/json: 2006 schema: 2007 $ref: '#/components/schemas/BadRequestError' 2008 '404': 2009 description: Not found 2010 content: 2011 application/json: 2012 schema: 2013 $ref: '#/components/schemas/NotFoundError' 2014 x-codeSamples: 2015 - lang: js 2016 source: |- 2017 import { createOpencodeClient } from "@opencode-ai/sdk 2018 2019 const client = createOpencodeClient() 2020 await client.session.unrevert({ 2021 ... 2022 }) 2023 /session/{sessionID}/permissions/{permissionID}: 2024 post: 2025 operationId: permission.respond 2026 parameters: 2027 - in: query 2028 name: directory 2029 schema: 2030 type: string 2031 - in: path 2032 name: sessionID 2033 schema: 2034 type: string 2035 required: true 2036 - in: path 2037 name: permissionID 2038 schema: 2039 type: string 2040 required: true 2041 summary: Respond to permission 2042 deprecated: true 2043 description: Approve or deny a permission request from the AI assistant. 2044 responses: 2045 '200': 2046 description: Permission processed successfully 2047 content: 2048 application/json: 2049 schema: 2050 type: boolean 2051 '400': 2052 description: Bad request 2053 content: 2054 application/json: 2055 schema: 2056 $ref: '#/components/schemas/BadRequestError' 2057 '404': 2058 description: Not found 2059 content: 2060 application/json: 2061 schema: 2062 $ref: '#/components/schemas/NotFoundError' 2063 requestBody: 2064 content: 2065 application/json: 2066 schema: 2067 type: object 2068 properties: 2069 response: 2070 type: string 2071 enum: 2072 - once 2073 - always 2074 - reject 2075 required: 2076 - response 2077 x-codeSamples: 2078 - lang: js 2079 source: |- 2080 import { createOpencodeClient } from "@opencode-ai/sdk 2081 2082 const client = createOpencodeClient() 2083 await client.permission.respond({ 2084 ... 2085 }) 2086 /permission/{requestID}/reply: 2087 post: 2088 operationId: permission.reply 2089 parameters: 2090 - in: query 2091 name: directory 2092 schema: 2093 type: string 2094 - in: path 2095 name: requestID 2096 schema: 2097 type: string 2098 required: true 2099 summary: Respond to permission request 2100 description: Approve or deny a permission request from the AI assistant. 2101 responses: 2102 '200': 2103 description: Permission processed successfully 2104 content: 2105 application/json: 2106 schema: 2107 type: boolean 2108 '400': 2109 description: Bad request 2110 content: 2111 application/json: 2112 schema: 2113 $ref: '#/components/schemas/BadRequestError' 2114 '404': 2115 description: Not found 2116 content: 2117 application/json: 2118 schema: 2119 $ref: '#/components/schemas/NotFoundError' 2120 requestBody: 2121 content: 2122 application/json: 2123 schema: 2124 type: object 2125 properties: 2126 reply: 2127 type: string 2128 enum: 2129 - once 2130 - always 2131 - reject 2132 required: 2133 - reply 2134 x-codeSamples: 2135 - lang: js 2136 source: |- 2137 import { createOpencodeClient } from "@opencode-ai/sdk 2138 2139 const client = createOpencodeClient() 2140 await client.permission.reply({ 2141 ... 2142 }) 2143 /permission: 2144 get: 2145 operationId: permission.list 2146 parameters: 2147 - in: query 2148 name: directory 2149 schema: 2150 type: string 2151 summary: List pending permissions 2152 description: Get all pending permission requests across all sessions. 2153 responses: 2154 '200': 2155 description: List of pending permissions 2156 content: 2157 application/json: 2158 schema: 2159 type: array 2160 items: 2161 $ref: '#/components/schemas/PermissionRequest' 2162 x-codeSamples: 2163 - lang: js 2164 source: |- 2165 import { createOpencodeClient } from "@opencode-ai/sdk 2166 2167 const client = createOpencodeClient() 2168 await client.permission.list({ 2169 ... 2170 }) 2171 /command: 2172 get: 2173 operationId: command.list 2174 parameters: 2175 - in: query 2176 name: directory 2177 schema: 2178 type: string 2179 summary: List commands 2180 description: Get a list of all available commands in the OpenCode system. 2181 responses: 2182 '200': 2183 description: List of commands 2184 content: 2185 application/json: 2186 schema: 2187 type: array 2188 items: 2189 $ref: '#/components/schemas/Command' 2190 x-codeSamples: 2191 - lang: js 2192 source: |- 2193 import { createOpencodeClient } from "@opencode-ai/sdk 2194 2195 const client = createOpencodeClient() 2196 await client.command.list({ 2197 ... 2198 }) 2199 /config/providers: 2200 get: 2201 operationId: config.providers 2202 parameters: 2203 - in: query 2204 name: directory 2205 schema: 2206 type: string 2207 summary: List config providers 2208 description: Get a list of all configured AI providers and their default models. 2209 responses: 2210 '200': 2211 description: List of providers 2212 content: 2213 application/json: 2214 schema: 2215 type: object 2216 properties: 2217 providers: 2218 type: array 2219 items: 2220 $ref: '#/components/schemas/Provider' 2221 default: 2222 type: object 2223 propertyNames: 2224 type: string 2225 additionalProperties: 2226 type: string 2227 required: 2228 - providers 2229 - default 2230 x-codeSamples: 2231 - lang: js 2232 source: |- 2233 import { createOpencodeClient } from "@opencode-ai/sdk 2234 2235 const client = createOpencodeClient() 2236 await client.config.providers({ 2237 ... 2238 }) 2239 /provider: 2240 get: 2241 operationId: provider.list 2242 parameters: 2243 - in: query 2244 name: directory 2245 schema: 2246 type: string 2247 summary: List providers 2248 description: Get a list of all available AI providers, including both available 2249 and connected ones. 2250 responses: 2251 '200': 2252 description: List of providers 2253 content: 2254 application/json: 2255 schema: 2256 type: object 2257 properties: 2258 all: 2259 type: array 2260 items: 2261 type: object 2262 properties: 2263 api: 2264 type: string 2265 name: 2266 type: string 2267 env: 2268 type: array 2269 items: 2270 type: string 2271 id: 2272 type: string 2273 npm: 2274 type: string 2275 models: 2276 type: object 2277 propertyNames: 2278 type: string 2279 additionalProperties: 2280 type: object 2281 properties: 2282 id: 2283 type: string 2284 name: 2285 type: string 2286 family: 2287 type: string 2288 release_date: 2289 type: string 2290 attachment: 2291 type: boolean 2292 reasoning: 2293 type: boolean 2294 temperature: 2295 type: boolean 2296 tool_call: 2297 type: boolean 2298 interleaved: 2299 anyOf: 2300 - type: boolean 2301 const: true 2302 - type: object 2303 properties: 2304 field: 2305 type: string 2306 enum: 2307 - reasoning_content 2308 - reasoning_details 2309 required: 2310 - field 2311 additionalProperties: false 2312 cost: 2313 type: object 2314 properties: 2315 input: 2316 type: number 2317 output: 2318 type: number 2319 cache_read: 2320 type: number 2321 cache_write: 2322 type: number 2323 context_over_200k: 2324 type: object 2325 properties: 2326 input: 2327 type: number 2328 output: 2329 type: number 2330 cache_read: 2331 type: number 2332 cache_write: 2333 type: number 2334 required: 2335 - input 2336 - output 2337 required: 2338 - input 2339 - output 2340 limit: 2341 type: object 2342 properties: 2343 context: 2344 type: number 2345 output: 2346 type: number 2347 required: 2348 - context 2349 - output 2350 modalities: 2351 type: object 2352 properties: 2353 input: 2354 type: array 2355 items: 2356 type: string 2357 enum: 2358 - text 2359 - audio 2360 - image 2361 - video 2362 - pdf 2363 output: 2364 type: array 2365 items: 2366 type: string 2367 enum: 2368 - text 2369 - audio 2370 - image 2371 - video 2372 - pdf 2373 required: 2374 - input 2375 - output 2376 experimental: 2377 type: boolean 2378 status: 2379 type: string 2380 enum: 2381 - alpha 2382 - beta 2383 - deprecated 2384 options: 2385 type: object 2386 propertyNames: 2387 type: string 2388 additionalProperties: {} 2389 headers: 2390 type: object 2391 propertyNames: 2392 type: string 2393 additionalProperties: 2394 type: string 2395 provider: 2396 type: object 2397 properties: 2398 npm: 2399 type: string 2400 required: 2401 - npm 2402 variants: 2403 type: object 2404 propertyNames: 2405 type: string 2406 additionalProperties: 2407 type: object 2408 propertyNames: 2409 type: string 2410 additionalProperties: {} 2411 required: 2412 - id 2413 - name 2414 - release_date 2415 - attachment 2416 - reasoning 2417 - temperature 2418 - tool_call 2419 - limit 2420 - options 2421 required: 2422 - name 2423 - env 2424 - id 2425 - models 2426 default: 2427 type: object 2428 propertyNames: 2429 type: string 2430 additionalProperties: 2431 type: string 2432 connected: 2433 type: array 2434 items: 2435 type: string 2436 required: 2437 - all 2438 - default 2439 - connected 2440 x-codeSamples: 2441 - lang: js 2442 source: |- 2443 import { createOpencodeClient } from "@opencode-ai/sdk 2444 2445 const client = createOpencodeClient() 2446 await client.provider.list({ 2447 ... 2448 }) 2449 /provider/auth: 2450 get: 2451 operationId: provider.auth 2452 parameters: 2453 - in: query 2454 name: directory 2455 schema: 2456 type: string 2457 summary: Get provider auth methods 2458 description: Retrieve available authentication methods for all AI providers. 2459 responses: 2460 '200': 2461 description: Provider auth methods 2462 content: 2463 application/json: 2464 schema: 2465 type: object 2466 propertyNames: 2467 type: string 2468 additionalProperties: 2469 type: array 2470 items: 2471 $ref: '#/components/schemas/ProviderAuthMethod' 2472 x-codeSamples: 2473 - lang: js 2474 source: |- 2475 import { createOpencodeClient } from "@opencode-ai/sdk 2476 2477 const client = createOpencodeClient() 2478 await client.provider.auth({ 2479 ... 2480 }) 2481 /provider/{providerID}/oauth/authorize: 2482 post: 2483 operationId: provider.oauth.authorize 2484 parameters: 2485 - in: query 2486 name: directory 2487 schema: 2488 type: string 2489 - in: path 2490 name: providerID 2491 schema: 2492 type: string 2493 required: true 2494 description: Provider ID 2495 summary: OAuth authorize 2496 description: Initiate OAuth authorization for a specific AI provider to get an 2497 authorization URL. 2498 responses: 2499 '200': 2500 description: Authorization URL and method 2501 content: 2502 application/json: 2503 schema: 2504 $ref: '#/components/schemas/ProviderAuthAuthorization' 2505 '400': 2506 description: Bad request 2507 content: 2508 application/json: 2509 schema: 2510 $ref: '#/components/schemas/BadRequestError' 2511 requestBody: 2512 content: 2513 application/json: 2514 schema: 2515 type: object 2516 properties: 2517 method: 2518 description: Auth method index 2519 type: number 2520 required: 2521 - method 2522 x-codeSamples: 2523 - lang: js 2524 source: |- 2525 import { createOpencodeClient } from "@opencode-ai/sdk 2526 2527 const client = createOpencodeClient() 2528 await client.provider.oauth.authorize({ 2529 ... 2530 }) 2531 /provider/{providerID}/oauth/callback: 2532 post: 2533 operationId: provider.oauth.callback 2534 parameters: 2535 - in: query 2536 name: directory 2537 schema: 2538 type: string 2539 - in: path 2540 name: providerID 2541 schema: 2542 type: string 2543 required: true 2544 description: Provider ID 2545 summary: OAuth callback 2546 description: Handle the OAuth callback from a provider after user authorization. 2547 responses: 2548 '200': 2549 description: OAuth callback processed successfully 2550 content: 2551 application/json: 2552 schema: 2553 type: boolean 2554 '400': 2555 description: Bad request 2556 content: 2557 application/json: 2558 schema: 2559 $ref: '#/components/schemas/BadRequestError' 2560 requestBody: 2561 content: 2562 application/json: 2563 schema: 2564 type: object 2565 properties: 2566 method: 2567 description: Auth method index 2568 type: number 2569 code: 2570 description: OAuth authorization code 2571 type: string 2572 required: 2573 - method 2574 x-codeSamples: 2575 - lang: js 2576 source: |- 2577 import { createOpencodeClient } from "@opencode-ai/sdk 2578 2579 const client = createOpencodeClient() 2580 await client.provider.oauth.callback({ 2581 ... 2582 }) 2583 /find: 2584 get: 2585 operationId: find.text 2586 parameters: 2587 - in: query 2588 name: directory 2589 schema: 2590 type: string 2591 - in: query 2592 name: pattern 2593 schema: 2594 type: string 2595 required: true 2596 summary: Find text 2597 description: Search for text patterns across files in the project using ripgrep. 2598 responses: 2599 '200': 2600 description: Matches 2601 content: 2602 application/json: 2603 schema: 2604 type: array 2605 items: 2606 type: object 2607 properties: 2608 path: 2609 type: object 2610 properties: 2611 text: 2612 type: string 2613 required: 2614 - text 2615 lines: 2616 type: object 2617 properties: 2618 text: 2619 type: string 2620 required: 2621 - text 2622 line_number: 2623 type: number 2624 absolute_offset: 2625 type: number 2626 submatches: 2627 type: array 2628 items: 2629 type: object 2630 properties: 2631 match: 2632 type: object 2633 properties: 2634 text: 2635 type: string 2636 required: 2637 - text 2638 start: 2639 type: number 2640 end: 2641 type: number 2642 required: 2643 - match 2644 - start 2645 - end 2646 required: 2647 - path 2648 - lines 2649 - line_number 2650 - absolute_offset 2651 - submatches 2652 x-codeSamples: 2653 - lang: js 2654 source: |- 2655 import { createOpencodeClient } from "@opencode-ai/sdk 2656 2657 const client = createOpencodeClient() 2658 await client.find.text({ 2659 ... 2660 }) 2661 /find/file: 2662 get: 2663 operationId: find.files 2664 parameters: 2665 - in: query 2666 name: directory 2667 schema: 2668 type: string 2669 - in: query 2670 name: query 2671 schema: 2672 type: string 2673 required: true 2674 - in: query 2675 name: dirs 2676 schema: 2677 type: string 2678 enum: 2679 - 'true' 2680 - 'false' 2681 - in: query 2682 name: type 2683 schema: 2684 type: string 2685 enum: 2686 - file 2687 - directory 2688 - in: query 2689 name: limit 2690 schema: 2691 type: integer 2692 minimum: 1 2693 maximum: 200 2694 summary: Find files 2695 description: Search for files or directories by name or pattern in the project 2696 directory. 2697 responses: 2698 '200': 2699 description: File paths 2700 content: 2701 application/json: 2702 schema: 2703 type: array 2704 items: 2705 type: string 2706 x-codeSamples: 2707 - lang: js 2708 source: |- 2709 import { createOpencodeClient } from "@opencode-ai/sdk 2710 2711 const client = createOpencodeClient() 2712 await client.find.files({ 2713 ... 2714 }) 2715 /find/symbol: 2716 get: 2717 operationId: find.symbols 2718 parameters: 2719 - in: query 2720 name: directory 2721 schema: 2722 type: string 2723 - in: query 2724 name: query 2725 schema: 2726 type: string 2727 required: true 2728 summary: Find symbols 2729 description: Search for workspace symbols like functions, classes, and variables 2730 using LSP. 2731 responses: 2732 '200': 2733 description: Symbols 2734 content: 2735 application/json: 2736 schema: 2737 type: array 2738 items: 2739 $ref: '#/components/schemas/Symbol' 2740 x-codeSamples: 2741 - lang: js 2742 source: |- 2743 import { createOpencodeClient } from "@opencode-ai/sdk 2744 2745 const client = createOpencodeClient() 2746 await client.find.symbols({ 2747 ... 2748 }) 2749 /file: 2750 get: 2751 operationId: file.list 2752 parameters: 2753 - in: query 2754 name: directory 2755 schema: 2756 type: string 2757 - in: query 2758 name: path 2759 schema: 2760 type: string 2761 required: true 2762 summary: List files 2763 description: List files and directories in a specified path. 2764 responses: 2765 '200': 2766 description: Files and directories 2767 content: 2768 application/json: 2769 schema: 2770 type: array 2771 items: 2772 $ref: '#/components/schemas/FileNode' 2773 x-codeSamples: 2774 - lang: js 2775 source: |- 2776 import { createOpencodeClient } from "@opencode-ai/sdk 2777 2778 const client = createOpencodeClient() 2779 await client.file.list({ 2780 ... 2781 }) 2782 /file/content: 2783 get: 2784 operationId: file.read 2785 parameters: 2786 - in: query 2787 name: directory 2788 schema: 2789 type: string 2790 - in: query 2791 name: path 2792 schema: 2793 type: string 2794 required: true 2795 summary: Read file 2796 description: Read the content of a specified file. 2797 responses: 2798 '200': 2799 description: File content 2800 content: 2801 application/json: 2802 schema: 2803 $ref: '#/components/schemas/FileContent' 2804 x-codeSamples: 2805 - lang: js 2806 source: |- 2807 import { createOpencodeClient } from "@opencode-ai/sdk 2808 2809 const client = createOpencodeClient() 2810 await client.file.read({ 2811 ... 2812 }) 2813 /file/status: 2814 get: 2815 operationId: file.status 2816 parameters: 2817 - in: query 2818 name: directory 2819 schema: 2820 type: string 2821 summary: Get file status 2822 description: Get the git status of all files in the project. 2823 responses: 2824 '200': 2825 description: File status 2826 content: 2827 application/json: 2828 schema: 2829 type: array 2830 items: 2831 $ref: '#/components/schemas/File' 2832 x-codeSamples: 2833 - lang: js 2834 source: |- 2835 import { createOpencodeClient } from "@opencode-ai/sdk 2836 2837 const client = createOpencodeClient() 2838 await client.file.status({ 2839 ... 2840 }) 2841 /log: 2842 post: 2843 operationId: app.log 2844 parameters: 2845 - in: query 2846 name: directory 2847 schema: 2848 type: string 2849 summary: Write log 2850 description: Write a log entry to the server logs with specified level and metadata. 2851 responses: 2852 '200': 2853 description: Log entry written successfully 2854 content: 2855 application/json: 2856 schema: 2857 type: boolean 2858 '400': 2859 description: Bad request 2860 content: 2861 application/json: 2862 schema: 2863 $ref: '#/components/schemas/BadRequestError' 2864 requestBody: 2865 content: 2866 application/json: 2867 schema: 2868 type: object 2869 properties: 2870 service: 2871 description: Service name for the log entry 2872 type: string 2873 level: 2874 description: Log level 2875 type: string 2876 enum: 2877 - debug 2878 - info 2879 - error 2880 - warn 2881 message: 2882 description: Log message 2883 type: string 2884 extra: 2885 description: Additional metadata for the log entry 2886 type: object 2887 propertyNames: 2888 type: string 2889 additionalProperties: {} 2890 required: 2891 - service 2892 - level 2893 - message 2894 x-codeSamples: 2895 - lang: js 2896 source: |- 2897 import { createOpencodeClient } from "@opencode-ai/sdk 2898 2899 const client = createOpencodeClient() 2900 await client.app.log({ 2901 ... 2902 }) 2903 /agent: 2904 get: 2905 operationId: app.agents 2906 parameters: 2907 - in: query 2908 name: directory 2909 schema: 2910 type: string 2911 summary: List agents 2912 description: Get a list of all available AI agents in the OpenCode system. 2913 responses: 2914 '200': 2915 description: List of agents 2916 content: 2917 application/json: 2918 schema: 2919 type: array 2920 items: 2921 $ref: '#/components/schemas/Agent' 2922 x-codeSamples: 2923 - lang: js 2924 source: |- 2925 import { createOpencodeClient } from "@opencode-ai/sdk 2926 2927 const client = createOpencodeClient() 2928 await client.app.agents({ 2929 ... 2930 }) 2931 /mcp: 2932 get: 2933 operationId: mcp.status 2934 parameters: 2935 - in: query 2936 name: directory 2937 schema: 2938 type: string 2939 summary: Get MCP status 2940 description: Get the status of all Model Context Protocol (MCP) servers. 2941 responses: 2942 '200': 2943 description: MCP server status 2944 content: 2945 application/json: 2946 schema: 2947 type: object 2948 propertyNames: 2949 type: string 2950 additionalProperties: 2951 $ref: '#/components/schemas/MCPStatus' 2952 x-codeSamples: 2953 - lang: js 2954 source: |- 2955 import { createOpencodeClient } from "@opencode-ai/sdk 2956 2957 const client = createOpencodeClient() 2958 await client.mcp.status({ 2959 ... 2960 }) 2961 post: 2962 operationId: mcp.add 2963 parameters: 2964 - in: query 2965 name: directory 2966 schema: 2967 type: string 2968 summary: Add MCP server 2969 description: Dynamically add a new Model Context Protocol (MCP) server to the system. 2970 responses: 2971 '200': 2972 description: MCP server added successfully 2973 content: 2974 application/json: 2975 schema: 2976 type: object 2977 propertyNames: 2978 type: string 2979 additionalProperties: 2980 $ref: '#/components/schemas/MCPStatus' 2981 '400': 2982 description: Bad request 2983 content: 2984 application/json: 2985 schema: 2986 $ref: '#/components/schemas/BadRequestError' 2987 requestBody: 2988 content: 2989 application/json: 2990 schema: 2991 type: object 2992 properties: 2993 name: 2994 type: string 2995 config: 2996 anyOf: 2997 - $ref: '#/components/schemas/McpLocalConfig' 2998 - $ref: '#/components/schemas/McpRemoteConfig' 2999 required: 3000 - name 3001 - config 3002 x-codeSamples: 3003 - lang: js 3004 source: |- 3005 import { createOpencodeClient } from "@opencode-ai/sdk 3006 3007 const client = createOpencodeClient() 3008 await client.mcp.add({ 3009 ... 3010 }) 3011 /mcp/{name}/auth: 3012 post: 3013 operationId: mcp.auth.start 3014 parameters: 3015 - in: query 3016 name: directory 3017 schema: 3018 type: string 3019 - schema: 3020 type: string 3021 in: path 3022 name: name 3023 required: true 3024 summary: Start MCP OAuth 3025 description: Start OAuth authentication flow for a Model Context Protocol (MCP) 3026 server. 3027 responses: 3028 '200': 3029 description: OAuth flow started 3030 content: 3031 application/json: 3032 schema: 3033 type: object 3034 properties: 3035 authorizationUrl: 3036 description: URL to open in browser for authorization 3037 type: string 3038 required: 3039 - authorizationUrl 3040 '400': 3041 description: Bad request 3042 content: 3043 application/json: 3044 schema: 3045 $ref: '#/components/schemas/BadRequestError' 3046 '404': 3047 description: Not found 3048 content: 3049 application/json: 3050 schema: 3051 $ref: '#/components/schemas/NotFoundError' 3052 x-codeSamples: 3053 - lang: js 3054 source: |- 3055 import { createOpencodeClient } from "@opencode-ai/sdk 3056 3057 const client = createOpencodeClient() 3058 await client.mcp.auth.start({ 3059 ... 3060 }) 3061 delete: 3062 operationId: mcp.auth.remove 3063 parameters: 3064 - in: query 3065 name: directory 3066 schema: 3067 type: string 3068 - schema: 3069 type: string 3070 in: path 3071 name: name 3072 required: true 3073 summary: Remove MCP OAuth 3074 description: Remove OAuth credentials for an MCP server 3075 responses: 3076 '200': 3077 description: OAuth credentials removed 3078 content: 3079 application/json: 3080 schema: 3081 type: object 3082 properties: 3083 success: 3084 type: boolean 3085 const: true 3086 required: 3087 - success 3088 '404': 3089 description: Not found 3090 content: 3091 application/json: 3092 schema: 3093 $ref: '#/components/schemas/NotFoundError' 3094 x-codeSamples: 3095 - lang: js 3096 source: |- 3097 import { createOpencodeClient } from "@opencode-ai/sdk 3098 3099 const client = createOpencodeClient() 3100 await client.mcp.auth.remove({ 3101 ... 3102 }) 3103 /mcp/{name}/auth/callback: 3104 post: 3105 operationId: mcp.auth.callback 3106 parameters: 3107 - in: query 3108 name: directory 3109 schema: 3110 type: string 3111 - schema: 3112 type: string 3113 in: path 3114 name: name 3115 required: true 3116 summary: Complete MCP OAuth 3117 description: Complete OAuth authentication for a Model Context Protocol (MCP) 3118 server using the authorization code. 3119 responses: 3120 '200': 3121 description: OAuth authentication completed 3122 content: 3123 application/json: 3124 schema: 3125 $ref: '#/components/schemas/MCPStatus' 3126 '400': 3127 description: Bad request 3128 content: 3129 application/json: 3130 schema: 3131 $ref: '#/components/schemas/BadRequestError' 3132 '404': 3133 description: Not found 3134 content: 3135 application/json: 3136 schema: 3137 $ref: '#/components/schemas/NotFoundError' 3138 requestBody: 3139 content: 3140 application/json: 3141 schema: 3142 type: object 3143 properties: 3144 code: 3145 description: Authorization code from OAuth callback 3146 type: string 3147 required: 3148 - code 3149 x-codeSamples: 3150 - lang: js 3151 source: |- 3152 import { createOpencodeClient } from "@opencode-ai/sdk 3153 3154 const client = createOpencodeClient() 3155 await client.mcp.auth.callback({ 3156 ... 3157 }) 3158 /mcp/{name}/auth/authenticate: 3159 post: 3160 operationId: mcp.auth.authenticate 3161 parameters: 3162 - in: query 3163 name: directory 3164 schema: 3165 type: string 3166 - schema: 3167 type: string 3168 in: path 3169 name: name 3170 required: true 3171 summary: Authenticate MCP OAuth 3172 description: Start OAuth flow and wait for callback (opens browser) 3173 responses: 3174 '200': 3175 description: OAuth authentication completed 3176 content: 3177 application/json: 3178 schema: 3179 $ref: '#/components/schemas/MCPStatus' 3180 '400': 3181 description: Bad request 3182 content: 3183 application/json: 3184 schema: 3185 $ref: '#/components/schemas/BadRequestError' 3186 '404': 3187 description: Not found 3188 content: 3189 application/json: 3190 schema: 3191 $ref: '#/components/schemas/NotFoundError' 3192 x-codeSamples: 3193 - lang: js 3194 source: |- 3195 import { createOpencodeClient } from "@opencode-ai/sdk 3196 3197 const client = createOpencodeClient() 3198 await client.mcp.auth.authenticate({ 3199 ... 3200 }) 3201 /mcp/{name}/connect: 3202 post: 3203 operationId: mcp.connect 3204 parameters: 3205 - in: query 3206 name: directory 3207 schema: 3208 type: string 3209 - in: path 3210 name: name 3211 schema: 3212 type: string 3213 required: true 3214 description: Connect an MCP server 3215 responses: 3216 '200': 3217 description: MCP server connected successfully 3218 content: 3219 application/json: 3220 schema: 3221 type: boolean 3222 x-codeSamples: 3223 - lang: js 3224 source: |- 3225 import { createOpencodeClient } from "@opencode-ai/sdk 3226 3227 const client = createOpencodeClient() 3228 await client.mcp.connect({ 3229 ... 3230 }) 3231 /mcp/{name}/disconnect: 3232 post: 3233 operationId: mcp.disconnect 3234 parameters: 3235 - in: query 3236 name: directory 3237 schema: 3238 type: string 3239 - in: path 3240 name: name 3241 schema: 3242 type: string 3243 required: true 3244 description: Disconnect an MCP server 3245 responses: 3246 '200': 3247 description: MCP server disconnected successfully 3248 content: 3249 application/json: 3250 schema: 3251 type: boolean 3252 x-codeSamples: 3253 - lang: js 3254 source: |- 3255 import { createOpencodeClient } from "@opencode-ai/sdk 3256 3257 const client = createOpencodeClient() 3258 await client.mcp.disconnect({ 3259 ... 3260 }) 3261 /lsp: 3262 get: 3263 operationId: lsp.status 3264 parameters: 3265 - in: query 3266 name: directory 3267 schema: 3268 type: string 3269 summary: Get LSP status 3270 description: Get LSP server status 3271 responses: 3272 '200': 3273 description: LSP server status 3274 content: 3275 application/json: 3276 schema: 3277 type: array 3278 items: 3279 $ref: '#/components/schemas/LSPStatus' 3280 x-codeSamples: 3281 - lang: js 3282 source: |- 3283 import { createOpencodeClient } from "@opencode-ai/sdk 3284 3285 const client = createOpencodeClient() 3286 await client.lsp.status({ 3287 ... 3288 }) 3289 /formatter: 3290 get: 3291 operationId: formatter.status 3292 parameters: 3293 - in: query 3294 name: directory 3295 schema: 3296 type: string 3297 summary: Get formatter status 3298 description: Get formatter status 3299 responses: 3300 '200': 3301 description: Formatter status 3302 content: 3303 application/json: 3304 schema: 3305 type: array 3306 items: 3307 $ref: '#/components/schemas/FormatterStatus' 3308 x-codeSamples: 3309 - lang: js 3310 source: |- 3311 import { createOpencodeClient } from "@opencode-ai/sdk 3312 3313 const client = createOpencodeClient() 3314 await client.formatter.status({ 3315 ... 3316 }) 3317 /tui/append-prompt: 3318 post: 3319 operationId: tui.appendPrompt 3320 parameters: 3321 - in: query 3322 name: directory 3323 schema: 3324 type: string 3325 summary: Append TUI prompt 3326 description: Append prompt to the TUI 3327 responses: 3328 '200': 3329 description: Prompt processed successfully 3330 content: 3331 application/json: 3332 schema: 3333 type: boolean 3334 '400': 3335 description: Bad request 3336 content: 3337 application/json: 3338 schema: 3339 $ref: '#/components/schemas/BadRequestError' 3340 requestBody: 3341 content: 3342 application/json: 3343 schema: 3344 type: object 3345 properties: 3346 text: 3347 type: string 3348 required: 3349 - text 3350 x-codeSamples: 3351 - lang: js 3352 source: |- 3353 import { createOpencodeClient } from "@opencode-ai/sdk 3354 3355 const client = createOpencodeClient() 3356 await client.tui.appendPrompt({ 3357 ... 3358 }) 3359 /tui/open-help: 3360 post: 3361 operationId: tui.openHelp 3362 parameters: 3363 - in: query 3364 name: directory 3365 schema: 3366 type: string 3367 summary: Open help dialog 3368 description: Open the help dialog in the TUI to display user assistance information. 3369 responses: 3370 '200': 3371 description: Help dialog opened successfully 3372 content: 3373 application/json: 3374 schema: 3375 type: boolean 3376 x-codeSamples: 3377 - lang: js 3378 source: |- 3379 import { createOpencodeClient } from "@opencode-ai/sdk 3380 3381 const client = createOpencodeClient() 3382 await client.tui.openHelp({ 3383 ... 3384 }) 3385 /tui/open-sessions: 3386 post: 3387 operationId: tui.openSessions 3388 parameters: 3389 - in: query 3390 name: directory 3391 schema: 3392 type: string 3393 summary: Open sessions dialog 3394 description: Open the session dialog 3395 responses: 3396 '200': 3397 description: Session dialog opened successfully 3398 content: 3399 application/json: 3400 schema: 3401 type: boolean 3402 x-codeSamples: 3403 - lang: js 3404 source: |- 3405 import { createOpencodeClient } from "@opencode-ai/sdk 3406 3407 const client = createOpencodeClient() 3408 await client.tui.openSessions({ 3409 ... 3410 }) 3411 /tui/open-themes: 3412 post: 3413 operationId: tui.openThemes 3414 parameters: 3415 - in: query 3416 name: directory 3417 schema: 3418 type: string 3419 summary: Open themes dialog 3420 description: Open the theme dialog 3421 responses: 3422 '200': 3423 description: Theme dialog opened successfully 3424 content: 3425 application/json: 3426 schema: 3427 type: boolean 3428 x-codeSamples: 3429 - lang: js 3430 source: |- 3431 import { createOpencodeClient } from "@opencode-ai/sdk 3432 3433 const client = createOpencodeClient() 3434 await client.tui.openThemes({ 3435 ... 3436 }) 3437 /tui/open-models: 3438 post: 3439 operationId: tui.openModels 3440 parameters: 3441 - in: query 3442 name: directory 3443 schema: 3444 type: string 3445 summary: Open models dialog 3446 description: Open the model dialog 3447 responses: 3448 '200': 3449 description: Model dialog opened successfully 3450 content: 3451 application/json: 3452 schema: 3453 type: boolean 3454 x-codeSamples: 3455 - lang: js 3456 source: |- 3457 import { createOpencodeClient } from "@opencode-ai/sdk 3458 3459 const client = createOpencodeClient() 3460 await client.tui.openModels({ 3461 ... 3462 }) 3463 /tui/submit-prompt: 3464 post: 3465 operationId: tui.submitPrompt 3466 parameters: 3467 - in: query 3468 name: directory 3469 schema: 3470 type: string 3471 summary: Submit TUI prompt 3472 description: Submit the prompt 3473 responses: 3474 '200': 3475 description: Prompt submitted successfully 3476 content: 3477 application/json: 3478 schema: 3479 type: boolean 3480 x-codeSamples: 3481 - lang: js 3482 source: |- 3483 import { createOpencodeClient } from "@opencode-ai/sdk 3484 3485 const client = createOpencodeClient() 3486 await client.tui.submitPrompt({ 3487 ... 3488 }) 3489 /tui/clear-prompt: 3490 post: 3491 operationId: tui.clearPrompt 3492 parameters: 3493 - in: query 3494 name: directory 3495 schema: 3496 type: string 3497 summary: Clear TUI prompt 3498 description: Clear the prompt 3499 responses: 3500 '200': 3501 description: Prompt cleared successfully 3502 content: 3503 application/json: 3504 schema: 3505 type: boolean 3506 x-codeSamples: 3507 - lang: js 3508 source: |- 3509 import { createOpencodeClient } from "@opencode-ai/sdk 3510 3511 const client = createOpencodeClient() 3512 await client.tui.clearPrompt({ 3513 ... 3514 }) 3515 /tui/execute-command: 3516 post: 3517 operationId: tui.executeCommand 3518 parameters: 3519 - in: query 3520 name: directory 3521 schema: 3522 type: string 3523 summary: Execute TUI command 3524 description: Execute a TUI command (e.g. agent_cycle) 3525 responses: 3526 '200': 3527 description: Command executed successfully 3528 content: 3529 application/json: 3530 schema: 3531 type: boolean 3532 '400': 3533 description: Bad request 3534 content: 3535 application/json: 3536 schema: 3537 $ref: '#/components/schemas/BadRequestError' 3538 requestBody: 3539 content: 3540 application/json: 3541 schema: 3542 type: object 3543 properties: 3544 command: 3545 type: string 3546 required: 3547 - command 3548 x-codeSamples: 3549 - lang: js 3550 source: |- 3551 import { createOpencodeClient } from "@opencode-ai/sdk 3552 3553 const client = createOpencodeClient() 3554 await client.tui.executeCommand({ 3555 ... 3556 }) 3557 /tui/show-toast: 3558 post: 3559 operationId: tui.showToast 3560 parameters: 3561 - in: query 3562 name: directory 3563 schema: 3564 type: string 3565 summary: Show TUI toast 3566 description: Show a toast notification in the TUI 3567 responses: 3568 '200': 3569 description: Toast notification shown successfully 3570 content: 3571 application/json: 3572 schema: 3573 type: boolean 3574 requestBody: 3575 content: 3576 application/json: 3577 schema: 3578 type: object 3579 properties: 3580 title: 3581 type: string 3582 message: 3583 type: string 3584 variant: 3585 type: string 3586 enum: 3587 - info 3588 - success 3589 - warning 3590 - error 3591 duration: 3592 description: Duration in milliseconds 3593 default: 5000 3594 type: number 3595 required: 3596 - message 3597 - variant 3598 x-codeSamples: 3599 - lang: js 3600 source: |- 3601 import { createOpencodeClient } from "@opencode-ai/sdk 3602 3603 const client = createOpencodeClient() 3604 await client.tui.showToast({ 3605 ... 3606 }) 3607 /tui/publish: 3608 post: 3609 operationId: tui.publish 3610 parameters: 3611 - in: query 3612 name: directory 3613 schema: 3614 type: string 3615 summary: Publish TUI event 3616 description: Publish a TUI event 3617 responses: 3618 '200': 3619 description: Event published successfully 3620 content: 3621 application/json: 3622 schema: 3623 type: boolean 3624 '400': 3625 description: Bad request 3626 content: 3627 application/json: 3628 schema: 3629 $ref: '#/components/schemas/BadRequestError' 3630 requestBody: 3631 content: 3632 application/json: 3633 schema: 3634 anyOf: 3635 - $ref: '#/components/schemas/Event.tui.prompt.append' 3636 - $ref: '#/components/schemas/Event.tui.command.execute' 3637 - $ref: '#/components/schemas/Event.tui.toast.show' 3638 x-codeSamples: 3639 - lang: js 3640 source: |- 3641 import { createOpencodeClient } from "@opencode-ai/sdk 3642 3643 const client = createOpencodeClient() 3644 await client.tui.publish({ 3645 ... 3646 }) 3647 /tui/control/next: 3648 get: 3649 operationId: tui.control.next 3650 parameters: 3651 - in: query 3652 name: directory 3653 schema: 3654 type: string 3655 summary: Get next TUI request 3656 description: Retrieve the next TUI (Terminal User Interface) request from the 3657 queue for processing. 3658 responses: 3659 '200': 3660 description: Next TUI request 3661 content: 3662 application/json: 3663 schema: 3664 type: object 3665 properties: 3666 path: 3667 type: string 3668 body: {} 3669 required: 3670 - path 3671 - body 3672 x-codeSamples: 3673 - lang: js 3674 source: |- 3675 import { createOpencodeClient } from "@opencode-ai/sdk 3676 3677 const client = createOpencodeClient() 3678 await client.tui.control.next({ 3679 ... 3680 }) 3681 /tui/control/response: 3682 post: 3683 operationId: tui.control.response 3684 parameters: 3685 - in: query 3686 name: directory 3687 schema: 3688 type: string 3689 summary: Submit TUI response 3690 description: Submit a response to the TUI request queue to complete a pending request. 3691 responses: 3692 '200': 3693 description: Response submitted successfully 3694 content: 3695 application/json: 3696 schema: 3697 type: boolean 3698 requestBody: 3699 content: 3700 application/json: 3701 schema: {} 3702 x-codeSamples: 3703 - lang: js 3704 source: |- 3705 import { createOpencodeClient } from "@opencode-ai/sdk 3706 3707 const client = createOpencodeClient() 3708 await client.tui.control.response({ 3709 ... 3710 }) 3711 /auth/{providerID}: 3712 put: 3713 operationId: auth.set 3714 parameters: 3715 - in: query 3716 name: directory 3717 schema: 3718 type: string 3719 - in: path 3720 name: providerID 3721 schema: 3722 type: string 3723 required: true 3724 summary: Set auth credentials 3725 description: Set authentication credentials 3726 responses: 3727 '200': 3728 description: Successfully set authentication credentials 3729 content: 3730 application/json: 3731 schema: 3732 type: boolean 3733 '400': 3734 description: Bad request 3735 content: 3736 application/json: 3737 schema: 3738 $ref: '#/components/schemas/BadRequestError' 3739 requestBody: 3740 content: 3741 application/json: 3742 schema: 3743 $ref: '#/components/schemas/Auth' 3744 x-codeSamples: 3745 - lang: js 3746 source: |- 3747 import { createOpencodeClient } from "@opencode-ai/sdk 3748 3749 const client = createOpencodeClient() 3750 await client.auth.set({ 3751 ... 3752 }) 3753 /event: 3754 get: 3755 operationId: event.subscribe 3756 parameters: 3757 - in: query 3758 name: directory 3759 schema: 3760 type: string 3761 summary: Subscribe to events 3762 description: Get events 3763 responses: 3764 '200': 3765 description: Event stream 3766 content: 3767 text/event-stream: 3768 schema: 3769 $ref: '#/components/schemas/Event' 3770 x-codeSamples: 3771 - lang: js 3772 source: |- 3773 import { createOpencodeClient } from "@opencode-ai/sdk 3774 3775 const client = createOpencodeClient() 3776 await client.event.subscribe({ 3777 ... 3778 }) 3779components: 3780 schemas: 3781 Event.installation.updated: 3782 type: object 3783 properties: 3784 type: 3785 type: string 3786 const: installation.updated 3787 properties: 3788 type: object 3789 properties: 3790 version: 3791 type: string 3792 required: 3793 - version 3794 required: 3795 - type 3796 - properties 3797 Event.installation.update-available: 3798 type: object 3799 properties: 3800 type: 3801 type: string 3802 const: installation.update-available 3803 properties: 3804 type: object 3805 properties: 3806 version: 3807 type: string 3808 required: 3809 - version 3810 required: 3811 - type 3812 - properties 3813 Project: 3814 type: object 3815 properties: 3816 id: 3817 type: string 3818 worktree: 3819 type: string 3820 vcs: 3821 type: string 3822 const: git 3823 name: 3824 type: string 3825 icon: 3826 type: object 3827 properties: 3828 url: 3829 type: string 3830 color: 3831 type: string 3832 time: 3833 type: object 3834 properties: 3835 created: 3836 type: number 3837 updated: 3838 type: number 3839 initialized: 3840 type: number 3841 required: 3842 - created 3843 - updated 3844 required: 3845 - id 3846 - worktree 3847 - time 3848 Event.project.updated: 3849 type: object 3850 properties: 3851 type: 3852 type: string 3853 const: project.updated 3854 properties: 3855 $ref: '#/components/schemas/Project' 3856 required: 3857 - type 3858 - properties 3859 Event.server.instance.disposed: 3860 type: object 3861 properties: 3862 type: 3863 type: string 3864 const: server.instance.disposed 3865 properties: 3866 type: object 3867 properties: 3868 directory: 3869 type: string 3870 required: 3871 - directory 3872 required: 3873 - type 3874 - properties 3875 Event.lsp.client.diagnostics: 3876 type: object 3877 properties: 3878 type: 3879 type: string 3880 const: lsp.client.diagnostics 3881 properties: 3882 type: object 3883 properties: 3884 serverID: 3885 type: string 3886 path: 3887 type: string 3888 required: 3889 - serverID 3890 - path 3891 required: 3892 - type 3893 - properties 3894 Event.lsp.updated: 3895 type: object 3896 properties: 3897 type: 3898 type: string 3899 const: lsp.updated 3900 properties: 3901 type: object 3902 properties: {} 3903 required: 3904 - type 3905 - properties 3906 FileDiff: 3907 type: object 3908 properties: 3909 file: 3910 type: string 3911 before: 3912 type: string 3913 after: 3914 type: string 3915 additions: 3916 type: number 3917 deletions: 3918 type: number 3919 required: 3920 - file 3921 - before 3922 - after 3923 - additions 3924 - deletions 3925 UserMessage: 3926 type: object 3927 properties: 3928 id: 3929 type: string 3930 sessionID: 3931 type: string 3932 role: 3933 type: string 3934 const: user 3935 time: 3936 type: object 3937 properties: 3938 created: 3939 type: number 3940 required: 3941 - created 3942 summary: 3943 type: object 3944 properties: 3945 title: 3946 type: string 3947 body: 3948 type: string 3949 diffs: 3950 type: array 3951 items: 3952 $ref: '#/components/schemas/FileDiff' 3953 required: 3954 - diffs 3955 agent: 3956 type: string 3957 model: 3958 type: object 3959 properties: 3960 providerID: 3961 type: string 3962 modelID: 3963 type: string 3964 required: 3965 - providerID 3966 - modelID 3967 system: 3968 type: string 3969 tools: 3970 type: object 3971 propertyNames: 3972 type: string 3973 additionalProperties: 3974 type: boolean 3975 variant: 3976 type: string 3977 required: 3978 - id 3979 - sessionID 3980 - role 3981 - time 3982 - agent 3983 - model 3984 ProviderAuthError: 3985 type: object 3986 properties: 3987 name: 3988 type: string 3989 const: ProviderAuthError 3990 data: 3991 type: object 3992 properties: 3993 providerID: 3994 type: string 3995 message: 3996 type: string 3997 required: 3998 - providerID 3999 - message 4000 required: 4001 - name 4002 - data 4003 UnknownError: 4004 type: object 4005 properties: 4006 name: 4007 type: string 4008 const: UnknownError 4009 data: 4010 type: object 4011 properties: 4012 message: 4013 type: string 4014 required: 4015 - message 4016 required: 4017 - name 4018 - data 4019 MessageOutputLengthError: 4020 type: object 4021 properties: 4022 name: 4023 type: string 4024 const: MessageOutputLengthError 4025 data: 4026 type: object 4027 properties: {} 4028 required: 4029 - name 4030 - data 4031 MessageAbortedError: 4032 type: object 4033 properties: 4034 name: 4035 type: string 4036 const: MessageAbortedError 4037 data: 4038 type: object 4039 properties: 4040 message: 4041 type: string 4042 required: 4043 - message 4044 required: 4045 - name 4046 - data 4047 APIError: 4048 type: object 4049 properties: 4050 name: 4051 type: string 4052 const: APIError 4053 data: 4054 type: object 4055 properties: 4056 message: 4057 type: string 4058 statusCode: 4059 type: number 4060 isRetryable: 4061 type: boolean 4062 responseHeaders: 4063 type: object 4064 propertyNames: 4065 type: string 4066 additionalProperties: 4067 type: string 4068 responseBody: 4069 type: string 4070 metadata: 4071 type: object 4072 propertyNames: 4073 type: string 4074 additionalProperties: 4075 type: string 4076 required: 4077 - message 4078 - isRetryable 4079 required: 4080 - name 4081 - data 4082 AssistantMessage: 4083 type: object 4084 properties: 4085 id: 4086 type: string 4087 sessionID: 4088 type: string 4089 role: 4090 type: string 4091 const: assistant 4092 time: 4093 type: object 4094 properties: 4095 created: 4096 type: number 4097 completed: 4098 type: number 4099 required: 4100 - created 4101 error: 4102 anyOf: 4103 - $ref: '#/components/schemas/ProviderAuthError' 4104 - $ref: '#/components/schemas/UnknownError' 4105 - $ref: '#/components/schemas/MessageOutputLengthError' 4106 - $ref: '#/components/schemas/MessageAbortedError' 4107 - $ref: '#/components/schemas/APIError' 4108 parentID: 4109 type: string 4110 modelID: 4111 type: string 4112 providerID: 4113 type: string 4114 mode: 4115 type: string 4116 agent: 4117 type: string 4118 path: 4119 type: object 4120 properties: 4121 cwd: 4122 type: string 4123 root: 4124 type: string 4125 required: 4126 - cwd 4127 - root 4128 summary: 4129 type: boolean 4130 cost: 4131 type: number 4132 tokens: 4133 type: object 4134 properties: 4135 input: 4136 type: number 4137 output: 4138 type: number 4139 reasoning: 4140 type: number 4141 cache: 4142 type: object 4143 properties: 4144 read: 4145 type: number 4146 write: 4147 type: number 4148 required: 4149 - read 4150 - write 4151 required: 4152 - input 4153 - output 4154 - reasoning 4155 - cache 4156 finish: 4157 type: string 4158 required: 4159 - id 4160 - sessionID 4161 - role 4162 - time 4163 - parentID 4164 - modelID 4165 - providerID 4166 - mode 4167 - agent 4168 - path 4169 - cost 4170 - tokens 4171 Message: 4172 anyOf: 4173 - $ref: '#/components/schemas/UserMessage' 4174 - $ref: '#/components/schemas/AssistantMessage' 4175 Event.message.updated: 4176 type: object 4177 properties: 4178 type: 4179 type: string 4180 const: message.updated 4181 properties: 4182 type: object 4183 properties: 4184 info: 4185 $ref: '#/components/schemas/Message' 4186 required: 4187 - info 4188 required: 4189 - type 4190 - properties 4191 Event.message.removed: 4192 type: object 4193 properties: 4194 type: 4195 type: string 4196 const: message.removed 4197 properties: 4198 type: object 4199 properties: 4200 sessionID: 4201 type: string 4202 messageID: 4203 type: string 4204 required: 4205 - sessionID 4206 - messageID 4207 required: 4208 - type 4209 - properties 4210 TextPart: 4211 type: object 4212 properties: 4213 id: 4214 type: string 4215 sessionID: 4216 type: string 4217 messageID: 4218 type: string 4219 type: 4220 type: string 4221 const: text 4222 text: 4223 type: string 4224 synthetic: 4225 type: boolean 4226 ignored: 4227 type: boolean 4228 time: 4229 type: object 4230 properties: 4231 start: 4232 type: number 4233 end: 4234 type: number 4235 required: 4236 - start 4237 metadata: 4238 type: object 4239 propertyNames: 4240 type: string 4241 additionalProperties: {} 4242 required: 4243 - id 4244 - sessionID 4245 - messageID 4246 - type 4247 - text 4248 ReasoningPart: 4249 type: object 4250 properties: 4251 id: 4252 type: string 4253 sessionID: 4254 type: string 4255 messageID: 4256 type: string 4257 type: 4258 type: string 4259 const: reasoning 4260 text: 4261 type: string 4262 metadata: 4263 type: object 4264 propertyNames: 4265 type: string 4266 additionalProperties: {} 4267 time: 4268 type: object 4269 properties: 4270 start: 4271 type: number 4272 end: 4273 type: number 4274 required: 4275 - start 4276 required: 4277 - id 4278 - sessionID 4279 - messageID 4280 - type 4281 - text 4282 - time 4283 FilePartSourceText: 4284 type: object 4285 properties: 4286 value: 4287 type: string 4288 start: 4289 type: integer 4290 minimum: -9007199254740991 4291 maximum: 9007199254740991 4292 end: 4293 type: integer 4294 minimum: -9007199254740991 4295 maximum: 9007199254740991 4296 required: 4297 - value 4298 - start 4299 - end 4300 FileSource: 4301 type: object 4302 properties: 4303 text: 4304 $ref: '#/components/schemas/FilePartSourceText' 4305 type: 4306 type: string 4307 const: file 4308 path: 4309 type: string 4310 required: 4311 - text 4312 - type 4313 - path 4314 Range: 4315 type: object 4316 properties: 4317 start: 4318 type: object 4319 properties: 4320 line: 4321 type: number 4322 character: 4323 type: number 4324 required: 4325 - line 4326 - character 4327 end: 4328 type: object 4329 properties: 4330 line: 4331 type: number 4332 character: 4333 type: number 4334 required: 4335 - line 4336 - character 4337 required: 4338 - start 4339 - end 4340 SymbolSource: 4341 type: object 4342 properties: 4343 text: 4344 $ref: '#/components/schemas/FilePartSourceText' 4345 type: 4346 type: string 4347 const: symbol 4348 path: 4349 type: string 4350 range: 4351 $ref: '#/components/schemas/Range' 4352 name: 4353 type: string 4354 kind: 4355 type: integer 4356 minimum: -9007199254740991 4357 maximum: 9007199254740991 4358 required: 4359 - text 4360 - type 4361 - path 4362 - range 4363 - name 4364 - kind 4365 FilePartSource: 4366 anyOf: 4367 - $ref: '#/components/schemas/FileSource' 4368 - $ref: '#/components/schemas/SymbolSource' 4369 FilePart: 4370 type: object 4371 properties: 4372 id: 4373 type: string 4374 sessionID: 4375 type: string 4376 messageID: 4377 type: string 4378 type: 4379 type: string 4380 const: file 4381 mime: 4382 type: string 4383 filename: 4384 type: string 4385 url: 4386 type: string 4387 source: 4388 $ref: '#/components/schemas/FilePartSource' 4389 required: 4390 - id 4391 - sessionID 4392 - messageID 4393 - type 4394 - mime 4395 - url 4396 ToolStatePending: 4397 type: object 4398 properties: 4399 status: 4400 type: string 4401 const: pending 4402 input: 4403 type: object 4404 propertyNames: 4405 type: string 4406 additionalProperties: {} 4407 raw: 4408 type: string 4409 required: 4410 - status 4411 - input 4412 - raw 4413 ToolStateRunning: 4414 type: object 4415 properties: 4416 status: 4417 type: string 4418 const: running 4419 input: 4420 type: object 4421 propertyNames: 4422 type: string 4423 additionalProperties: {} 4424 title: 4425 type: string 4426 metadata: 4427 type: object 4428 propertyNames: 4429 type: string 4430 additionalProperties: {} 4431 time: 4432 type: object 4433 properties: 4434 start: 4435 type: number 4436 required: 4437 - start 4438 required: 4439 - status 4440 - input 4441 - time 4442 ToolStateCompleted: 4443 type: object 4444 properties: 4445 status: 4446 type: string 4447 const: completed 4448 input: 4449 type: object 4450 propertyNames: 4451 type: string 4452 additionalProperties: {} 4453 output: 4454 type: string 4455 title: 4456 type: string 4457 metadata: 4458 type: object 4459 propertyNames: 4460 type: string 4461 additionalProperties: {} 4462 time: 4463 type: object 4464 properties: 4465 start: 4466 type: number 4467 end: 4468 type: number 4469 compacted: 4470 type: number 4471 required: 4472 - start 4473 - end 4474 attachments: 4475 type: array 4476 items: 4477 $ref: '#/components/schemas/FilePart' 4478 required: 4479 - status 4480 - input 4481 - output 4482 - title 4483 - metadata 4484 - time 4485 ToolStateError: 4486 type: object 4487 properties: 4488 status: 4489 type: string 4490 const: error 4491 input: 4492 type: object 4493 propertyNames: 4494 type: string 4495 additionalProperties: {} 4496 error: 4497 type: string 4498 metadata: 4499 type: object 4500 propertyNames: 4501 type: string 4502 additionalProperties: {} 4503 time: 4504 type: object 4505 properties: 4506 start: 4507 type: number 4508 end: 4509 type: number 4510 required: 4511 - start 4512 - end 4513 required: 4514 - status 4515 - input 4516 - error 4517 - time 4518 ToolState: 4519 anyOf: 4520 - $ref: '#/components/schemas/ToolStatePending' 4521 - $ref: '#/components/schemas/ToolStateRunning' 4522 - $ref: '#/components/schemas/ToolStateCompleted' 4523 - $ref: '#/components/schemas/ToolStateError' 4524 ToolPart: 4525 type: object 4526 properties: 4527 id: 4528 type: string 4529 sessionID: 4530 type: string 4531 messageID: 4532 type: string 4533 type: 4534 type: string 4535 const: tool 4536 callID: 4537 type: string 4538 tool: 4539 type: string 4540 state: 4541 $ref: '#/components/schemas/ToolState' 4542 metadata: 4543 type: object 4544 propertyNames: 4545 type: string 4546 additionalProperties: {} 4547 required: 4548 - id 4549 - sessionID 4550 - messageID 4551 - type 4552 - callID 4553 - tool 4554 - state 4555 StepStartPart: 4556 type: object 4557 properties: 4558 id: 4559 type: string 4560 sessionID: 4561 type: string 4562 messageID: 4563 type: string 4564 type: 4565 type: string 4566 const: step-start 4567 snapshot: 4568 type: string 4569 required: 4570 - id 4571 - sessionID 4572 - messageID 4573 - type 4574 StepFinishPart: 4575 type: object 4576 properties: 4577 id: 4578 type: string 4579 sessionID: 4580 type: string 4581 messageID: 4582 type: string 4583 type: 4584 type: string 4585 const: step-finish 4586 reason: 4587 type: string 4588 snapshot: 4589 type: string 4590 cost: 4591 type: number 4592 tokens: 4593 type: object 4594 properties: 4595 input: 4596 type: number 4597 output: 4598 type: number 4599 reasoning: 4600 type: number 4601 cache: 4602 type: object 4603 properties: 4604 read: 4605 type: number 4606 write: 4607 type: number 4608 required: 4609 - read 4610 - write 4611 required: 4612 - input 4613 - output 4614 - reasoning 4615 - cache 4616 required: 4617 - id 4618 - sessionID 4619 - messageID 4620 - type 4621 - reason 4622 - cost 4623 - tokens 4624 SnapshotPart: 4625 type: object 4626 properties: 4627 id: 4628 type: string 4629 sessionID: 4630 type: string 4631 messageID: 4632 type: string 4633 type: 4634 type: string 4635 const: snapshot 4636 snapshot: 4637 type: string 4638 required: 4639 - id 4640 - sessionID 4641 - messageID 4642 - type 4643 - snapshot 4644 PatchPart: 4645 type: object 4646 properties: 4647 id: 4648 type: string 4649 sessionID: 4650 type: string 4651 messageID: 4652 type: string 4653 type: 4654 type: string 4655 const: patch 4656 hash: 4657 type: string 4658 files: 4659 type: array 4660 items: 4661 type: string 4662 required: 4663 - id 4664 - sessionID 4665 - messageID 4666 - type 4667 - hash 4668 - files 4669 AgentPart: 4670 type: object 4671 properties: 4672 id: 4673 type: string 4674 sessionID: 4675 type: string 4676 messageID: 4677 type: string 4678 type: 4679 type: string 4680 const: agent 4681 name: 4682 type: string 4683 source: 4684 type: object 4685 properties: 4686 value: 4687 type: string 4688 start: 4689 type: integer 4690 minimum: -9007199254740991 4691 maximum: 9007199254740991 4692 end: 4693 type: integer 4694 minimum: -9007199254740991 4695 maximum: 9007199254740991 4696 required: 4697 - value 4698 - start 4699 - end 4700 required: 4701 - id 4702 - sessionID 4703 - messageID 4704 - type 4705 - name 4706 RetryPart: 4707 type: object 4708 properties: 4709 id: 4710 type: string 4711 sessionID: 4712 type: string 4713 messageID: 4714 type: string 4715 type: 4716 type: string 4717 const: retry 4718 attempt: 4719 type: number 4720 error: 4721 $ref: '#/components/schemas/APIError' 4722 time: 4723 type: object 4724 properties: 4725 created: 4726 type: number 4727 required: 4728 - created 4729 required: 4730 - id 4731 - sessionID 4732 - messageID 4733 - type 4734 - attempt 4735 - error 4736 - time 4737 CompactionPart: 4738 type: object 4739 properties: 4740 id: 4741 type: string 4742 sessionID: 4743 type: string 4744 messageID: 4745 type: string 4746 type: 4747 type: string 4748 const: compaction 4749 auto: 4750 type: boolean 4751 required: 4752 - id 4753 - sessionID 4754 - messageID 4755 - type 4756 - auto 4757 Part: 4758 anyOf: 4759 - $ref: '#/components/schemas/TextPart' 4760 - type: object 4761 properties: 4762 id: 4763 type: string 4764 sessionID: 4765 type: string 4766 messageID: 4767 type: string 4768 type: 4769 type: string 4770 const: subtask 4771 prompt: 4772 type: string 4773 description: 4774 type: string 4775 agent: 4776 type: string 4777 command: 4778 type: string 4779 required: 4780 - id 4781 - sessionID 4782 - messageID 4783 - type 4784 - prompt 4785 - description 4786 - agent 4787 - $ref: '#/components/schemas/ReasoningPart' 4788 - $ref: '#/components/schemas/FilePart' 4789 - $ref: '#/components/schemas/ToolPart' 4790 - $ref: '#/components/schemas/StepStartPart' 4791 - $ref: '#/components/schemas/StepFinishPart' 4792 - $ref: '#/components/schemas/SnapshotPart' 4793 - $ref: '#/components/schemas/PatchPart' 4794 - $ref: '#/components/schemas/AgentPart' 4795 - $ref: '#/components/schemas/RetryPart' 4796 - $ref: '#/components/schemas/CompactionPart' 4797 Event.message.part.updated: 4798 type: object 4799 properties: 4800 type: 4801 type: string 4802 const: message.part.updated 4803 properties: 4804 type: object 4805 properties: 4806 part: 4807 $ref: '#/components/schemas/Part' 4808 delta: 4809 type: string 4810 required: 4811 - part 4812 required: 4813 - type 4814 - properties 4815 Event.message.part.removed: 4816 type: object 4817 properties: 4818 type: 4819 type: string 4820 const: message.part.removed 4821 properties: 4822 type: object 4823 properties: 4824 sessionID: 4825 type: string 4826 messageID: 4827 type: string 4828 partID: 4829 type: string 4830 required: 4831 - sessionID 4832 - messageID 4833 - partID 4834 required: 4835 - type 4836 - properties 4837 PermissionRequest: 4838 type: object 4839 properties: 4840 id: 4841 type: string 4842 pattern: ^per.* 4843 sessionID: 4844 type: string 4845 pattern: ^ses.* 4846 permission: 4847 type: string 4848 patterns: 4849 type: array 4850 items: 4851 type: string 4852 metadata: 4853 type: object 4854 propertyNames: 4855 type: string 4856 additionalProperties: {} 4857 always: 4858 type: array 4859 items: 4860 type: string 4861 tool: 4862 type: object 4863 properties: 4864 messageID: 4865 type: string 4866 callID: 4867 type: string 4868 required: 4869 - messageID 4870 - callID 4871 required: 4872 - id 4873 - sessionID 4874 - permission 4875 - patterns 4876 - metadata 4877 - always 4878 Event.permission.asked: 4879 type: object 4880 properties: 4881 type: 4882 type: string 4883 const: permission.asked 4884 properties: 4885 $ref: '#/components/schemas/PermissionRequest' 4886 required: 4887 - type 4888 - properties 4889 Event.permission.replied: 4890 type: object 4891 properties: 4892 type: 4893 type: string 4894 const: permission.replied 4895 properties: 4896 type: object 4897 properties: 4898 sessionID: 4899 type: string 4900 requestID: 4901 type: string 4902 reply: 4903 type: string 4904 enum: 4905 - once 4906 - always 4907 - reject 4908 required: 4909 - sessionID 4910 - requestID 4911 - reply 4912 required: 4913 - type 4914 - properties 4915 SessionStatus: 4916 anyOf: 4917 - type: object 4918 properties: 4919 type: 4920 type: string 4921 const: idle 4922 required: 4923 - type 4924 - type: object 4925 properties: 4926 type: 4927 type: string 4928 const: retry 4929 attempt: 4930 type: number 4931 message: 4932 type: string 4933 next: 4934 type: number 4935 required: 4936 - type 4937 - attempt 4938 - message 4939 - next 4940 - type: object 4941 properties: 4942 type: 4943 type: string 4944 const: busy 4945 required: 4946 - type 4947 Event.session.status: 4948 type: object 4949 properties: 4950 type: 4951 type: string 4952 const: session.status 4953 properties: 4954 type: object 4955 properties: 4956 sessionID: 4957 type: string 4958 status: 4959 $ref: '#/components/schemas/SessionStatus' 4960 required: 4961 - sessionID 4962 - status 4963 required: 4964 - type 4965 - properties 4966 Event.session.idle: 4967 type: object 4968 properties: 4969 type: 4970 type: string 4971 const: session.idle 4972 properties: 4973 type: object 4974 properties: 4975 sessionID: 4976 type: string 4977 required: 4978 - sessionID 4979 required: 4980 - type 4981 - properties 4982 Event.session.compacted: 4983 type: object 4984 properties: 4985 type: 4986 type: string 4987 const: session.compacted 4988 properties: 4989 type: object 4990 properties: 4991 sessionID: 4992 type: string 4993 required: 4994 - sessionID 4995 required: 4996 - type 4997 - properties 4998 Event.file.edited: 4999 type: object 5000 properties: 5001 type: 5002 type: string 5003 const: file.edited 5004 properties: 5005 type: object 5006 properties: 5007 file: 5008 type: string 5009 required: 5010 - file 5011 required: 5012 - type 5013 - properties 5014 Todo: 5015 type: object 5016 properties: 5017 content: 5018 description: Brief description of the task 5019 type: string 5020 status: 5021 description: 'Current status of the task: pending, in_progress, completed, 5022 cancelled' 5023 type: string 5024 priority: 5025 description: 'Priority level of the task: high, medium, low' 5026 type: string 5027 id: 5028 description: Unique identifier for the todo item 5029 type: string 5030 required: 5031 - content 5032 - status 5033 - priority 5034 - id 5035 Event.todo.updated: 5036 type: object 5037 properties: 5038 type: 5039 type: string 5040 const: todo.updated 5041 properties: 5042 type: object 5043 properties: 5044 sessionID: 5045 type: string 5046 todos: 5047 type: array 5048 items: 5049 $ref: '#/components/schemas/Todo' 5050 required: 5051 - sessionID 5052 - todos 5053 required: 5054 - type 5055 - properties 5056 Event.tui.prompt.append: 5057 type: object 5058 properties: 5059 type: 5060 type: string 5061 const: tui.prompt.append 5062 properties: 5063 type: object 5064 properties: 5065 text: 5066 type: string 5067 required: 5068 - text 5069 required: 5070 - type 5071 - properties 5072 Event.tui.command.execute: 5073 type: object 5074 properties: 5075 type: 5076 type: string 5077 const: tui.command.execute 5078 properties: 5079 type: object 5080 properties: 5081 command: 5082 anyOf: 5083 - type: string 5084 enum: 5085 - session.list 5086 - session.new 5087 - session.share 5088 - session.interrupt 5089 - session.compact 5090 - session.page.up 5091 - session.page.down 5092 - session.half.page.up 5093 - session.half.page.down 5094 - session.first 5095 - session.last 5096 - prompt.clear 5097 - prompt.submit 5098 - agent.cycle 5099 - type: string 5100 required: 5101 - command 5102 required: 5103 - type 5104 - properties 5105 Event.tui.toast.show: 5106 type: object 5107 properties: 5108 type: 5109 type: string 5110 const: tui.toast.show 5111 properties: 5112 type: object 5113 properties: 5114 title: 5115 type: string 5116 message: 5117 type: string 5118 variant: 5119 type: string 5120 enum: 5121 - info 5122 - success 5123 - warning 5124 - error 5125 duration: 5126 description: Duration in milliseconds 5127 default: 5000 5128 type: number 5129 required: 5130 - message 5131 - variant 5132 required: 5133 - type 5134 - properties 5135 Event.mcp.tools.changed: 5136 type: object 5137 properties: 5138 type: 5139 type: string 5140 const: mcp.tools.changed 5141 properties: 5142 type: object 5143 properties: 5144 server: 5145 type: string 5146 required: 5147 - server 5148 required: 5149 - type 5150 - properties 5151 Event.command.executed: 5152 type: object 5153 properties: 5154 type: 5155 type: string 5156 const: command.executed 5157 properties: 5158 type: object 5159 properties: 5160 name: 5161 type: string 5162 sessionID: 5163 type: string 5164 pattern: ^ses.* 5165 arguments: 5166 type: string 5167 messageID: 5168 type: string 5169 pattern: ^msg.* 5170 required: 5171 - name 5172 - sessionID 5173 - arguments 5174 - messageID 5175 required: 5176 - type 5177 - properties 5178 PermissionAction: 5179 type: string 5180 enum: 5181 - allow 5182 - deny 5183 - ask 5184 PermissionRule: 5185 type: object 5186 properties: 5187 permission: 5188 type: string 5189 pattern: 5190 type: string 5191 action: 5192 $ref: '#/components/schemas/PermissionAction' 5193 required: 5194 - permission 5195 - pattern 5196 - action 5197 PermissionRuleset: 5198 type: array 5199 items: 5200 $ref: '#/components/schemas/PermissionRule' 5201 Session: 5202 type: object 5203 properties: 5204 id: 5205 type: string 5206 pattern: ^ses.* 5207 projectID: 5208 type: string 5209 directory: 5210 type: string 5211 parentID: 5212 type: string 5213 pattern: ^ses.* 5214 summary: 5215 type: object 5216 properties: 5217 additions: 5218 type: number 5219 deletions: 5220 type: number 5221 files: 5222 type: number 5223 diffs: 5224 type: array 5225 items: 5226 $ref: '#/components/schemas/FileDiff' 5227 required: 5228 - additions 5229 - deletions 5230 - files 5231 share: 5232 type: object 5233 properties: 5234 url: 5235 type: string 5236 required: 5237 - url 5238 title: 5239 type: string 5240 version: 5241 type: string 5242 time: 5243 type: object 5244 properties: 5245 created: 5246 type: number 5247 updated: 5248 type: number 5249 compacting: 5250 type: number 5251 archived: 5252 type: number 5253 required: 5254 - created 5255 - updated 5256 permission: 5257 $ref: '#/components/schemas/PermissionRuleset' 5258 revert: 5259 type: object 5260 properties: 5261 messageID: 5262 type: string 5263 partID: 5264 type: string 5265 snapshot: 5266 type: string 5267 diff: 5268 type: string 5269 required: 5270 - messageID 5271 required: 5272 - id 5273 - projectID 5274 - directory 5275 - title 5276 - version 5277 - time 5278 Event.session.created: 5279 type: object 5280 properties: 5281 type: 5282 type: string 5283 const: session.created 5284 properties: 5285 type: object 5286 properties: 5287 info: 5288 $ref: '#/components/schemas/Session' 5289 required: 5290 - info 5291 required: 5292 - type 5293 - properties 5294 Event.session.updated: 5295 type: object 5296 properties: 5297 type: 5298 type: string 5299 const: session.updated 5300 properties: 5301 type: object 5302 properties: 5303 info: 5304 $ref: '#/components/schemas/Session' 5305 required: 5306 - info 5307 required: 5308 - type 5309 - properties 5310 Event.session.deleted: 5311 type: object 5312 properties: 5313 type: 5314 type: string 5315 const: session.deleted 5316 properties: 5317 type: object 5318 properties: 5319 info: 5320 $ref: '#/components/schemas/Session' 5321 required: 5322 - info 5323 required: 5324 - type 5325 - properties 5326 Event.session.diff: 5327 type: object 5328 properties: 5329 type: 5330 type: string 5331 const: session.diff 5332 properties: 5333 type: object 5334 properties: 5335 sessionID: 5336 type: string 5337 diff: 5338 type: array 5339 items: 5340 $ref: '#/components/schemas/FileDiff' 5341 required: 5342 - sessionID 5343 - diff 5344 required: 5345 - type 5346 - properties 5347 Event.session.error: 5348 type: object 5349 properties: 5350 type: 5351 type: string 5352 const: session.error 5353 properties: 5354 type: object 5355 properties: 5356 sessionID: 5357 type: string 5358 error: 5359 anyOf: 5360 - $ref: '#/components/schemas/ProviderAuthError' 5361 - $ref: '#/components/schemas/UnknownError' 5362 - $ref: '#/components/schemas/MessageOutputLengthError' 5363 - $ref: '#/components/schemas/MessageAbortedError' 5364 - $ref: '#/components/schemas/APIError' 5365 required: 5366 - type 5367 - properties 5368 Event.file.watcher.updated: 5369 type: object 5370 properties: 5371 type: 5372 type: string 5373 const: file.watcher.updated 5374 properties: 5375 type: object 5376 properties: 5377 file: 5378 type: string 5379 event: 5380 anyOf: 5381 - type: string 5382 const: add 5383 - type: string 5384 const: change 5385 - type: string 5386 const: unlink 5387 required: 5388 - file 5389 - event 5390 required: 5391 - type 5392 - properties 5393 Event.vcs.branch.updated: 5394 type: object 5395 properties: 5396 type: 5397 type: string 5398 const: vcs.branch.updated 5399 properties: 5400 type: object 5401 properties: 5402 branch: 5403 type: string 5404 required: 5405 - type 5406 - properties 5407 Pty: 5408 type: object 5409 properties: 5410 id: 5411 type: string 5412 pattern: ^pty.* 5413 title: 5414 type: string 5415 command: 5416 type: string 5417 args: 5418 type: array 5419 items: 5420 type: string 5421 cwd: 5422 type: string 5423 status: 5424 type: string 5425 enum: 5426 - running 5427 - exited 5428 pid: 5429 type: number 5430 required: 5431 - id 5432 - title 5433 - command 5434 - args 5435 - cwd 5436 - status 5437 - pid 5438 Event.pty.created: 5439 type: object 5440 properties: 5441 type: 5442 type: string 5443 const: pty.created 5444 properties: 5445 type: object 5446 properties: 5447 info: 5448 $ref: '#/components/schemas/Pty' 5449 required: 5450 - info 5451 required: 5452 - type 5453 - properties 5454 Event.pty.updated: 5455 type: object 5456 properties: 5457 type: 5458 type: string 5459 const: pty.updated 5460 properties: 5461 type: object 5462 properties: 5463 info: 5464 $ref: '#/components/schemas/Pty' 5465 required: 5466 - info 5467 required: 5468 - type 5469 - properties 5470 Event.pty.exited: 5471 type: object 5472 properties: 5473 type: 5474 type: string 5475 const: pty.exited 5476 properties: 5477 type: object 5478 properties: 5479 id: 5480 type: string 5481 pattern: ^pty.* 5482 exitCode: 5483 type: number 5484 required: 5485 - id 5486 - exitCode 5487 required: 5488 - type 5489 - properties 5490 Event.pty.deleted: 5491 type: object 5492 properties: 5493 type: 5494 type: string 5495 const: pty.deleted 5496 properties: 5497 type: object 5498 properties: 5499 id: 5500 type: string 5501 pattern: ^pty.* 5502 required: 5503 - id 5504 required: 5505 - type 5506 - properties 5507 Event.server.connected: 5508 type: object 5509 properties: 5510 type: 5511 type: string 5512 const: server.connected 5513 properties: 5514 type: object 5515 properties: {} 5516 required: 5517 - type 5518 - properties 5519 Event.global.disposed: 5520 type: object 5521 properties: 5522 type: 5523 type: string 5524 const: global.disposed 5525 properties: 5526 type: object 5527 properties: {} 5528 required: 5529 - type 5530 - properties 5531 Event: 5532 anyOf: 5533 - $ref: '#/components/schemas/Event.installation.updated' 5534 - $ref: '#/components/schemas/Event.installation.update-available' 5535 - $ref: '#/components/schemas/Event.project.updated' 5536 - $ref: '#/components/schemas/Event.server.instance.disposed' 5537 - $ref: '#/components/schemas/Event.lsp.client.diagnostics' 5538 - $ref: '#/components/schemas/Event.lsp.updated' 5539 - $ref: '#/components/schemas/Event.message.updated' 5540 - $ref: '#/components/schemas/Event.message.removed' 5541 - $ref: '#/components/schemas/Event.message.part.updated' 5542 - $ref: '#/components/schemas/Event.message.part.removed' 5543 - $ref: '#/components/schemas/Event.permission.asked' 5544 - $ref: '#/components/schemas/Event.permission.replied' 5545 - $ref: '#/components/schemas/Event.session.status' 5546 - $ref: '#/components/schemas/Event.session.idle' 5547 - $ref: '#/components/schemas/Event.session.compacted' 5548 - $ref: '#/components/schemas/Event.file.edited' 5549 - $ref: '#/components/schemas/Event.todo.updated' 5550 - $ref: '#/components/schemas/Event.tui.prompt.append' 5551 - $ref: '#/components/schemas/Event.tui.command.execute' 5552 - $ref: '#/components/schemas/Event.tui.toast.show' 5553 - $ref: '#/components/schemas/Event.mcp.tools.changed' 5554 - $ref: '#/components/schemas/Event.command.executed' 5555 - $ref: '#/components/schemas/Event.session.created' 5556 - $ref: '#/components/schemas/Event.session.updated' 5557 - $ref: '#/components/schemas/Event.session.deleted' 5558 - $ref: '#/components/schemas/Event.session.diff' 5559 - $ref: '#/components/schemas/Event.session.error' 5560 - $ref: '#/components/schemas/Event.file.watcher.updated' 5561 - $ref: '#/components/schemas/Event.vcs.branch.updated' 5562 - $ref: '#/components/schemas/Event.pty.created' 5563 - $ref: '#/components/schemas/Event.pty.updated' 5564 - $ref: '#/components/schemas/Event.pty.exited' 5565 - $ref: '#/components/schemas/Event.pty.deleted' 5566 - $ref: '#/components/schemas/Event.server.connected' 5567 - $ref: '#/components/schemas/Event.global.disposed' 5568 GlobalEvent: 5569 type: object 5570 properties: 5571 directory: 5572 type: string 5573 payload: 5574 $ref: '#/components/schemas/Event' 5575 required: 5576 - directory 5577 - payload 5578 BadRequestError: 5579 type: object 5580 properties: 5581 data: {} 5582 errors: 5583 type: array 5584 items: 5585 type: object 5586 propertyNames: 5587 type: string 5588 additionalProperties: {} 5589 success: 5590 type: boolean 5591 const: false 5592 required: 5593 - data 5594 - errors 5595 - success 5596 NotFoundError: 5597 type: object 5598 properties: 5599 name: 5600 type: string 5601 const: NotFoundError 5602 data: 5603 type: object 5604 properties: 5605 message: 5606 type: string 5607 required: 5608 - message 5609 required: 5610 - name 5611 - data 5612 KeybindsConfig: 5613 description: Custom keybind configurations 5614 type: object 5615 properties: 5616 leader: 5617 description: Leader key for keybind combinations 5618 default: ctrl+x 5619 type: string 5620 app_exit: 5621 description: Exit the application 5622 default: ctrl+c,ctrl+d,<leader>q 5623 type: string 5624 editor_open: 5625 description: Open external editor 5626 default: <leader>e 5627 type: string 5628 theme_list: 5629 description: List available themes 5630 default: <leader>t 5631 type: string 5632 sidebar_toggle: 5633 description: Toggle sidebar 5634 default: <leader>b 5635 type: string 5636 scrollbar_toggle: 5637 description: Toggle session scrollbar 5638 default: none 5639 type: string 5640 username_toggle: 5641 description: Toggle username visibility 5642 default: none 5643 type: string 5644 status_view: 5645 description: View status 5646 default: <leader>s 5647 type: string 5648 session_export: 5649 description: Export session to editor 5650 default: <leader>x 5651 type: string 5652 session_new: 5653 description: Create a new session 5654 default: <leader>n 5655 type: string 5656 session_list: 5657 description: List all sessions 5658 default: <leader>l 5659 type: string 5660 session_timeline: 5661 description: Show session timeline 5662 default: <leader>g 5663 type: string 5664 session_fork: 5665 description: Fork session from message 5666 default: none 5667 type: string 5668 session_rename: 5669 description: Rename session 5670 default: none 5671 type: string 5672 session_share: 5673 description: Share current session 5674 default: none 5675 type: string 5676 session_unshare: 5677 description: Unshare current session 5678 default: none 5679 type: string 5680 session_interrupt: 5681 description: Interrupt current session 5682 default: escape 5683 type: string 5684 session_compact: 5685 description: Compact the session 5686 default: <leader>c 5687 type: string 5688 messages_page_up: 5689 description: Scroll messages up by one page 5690 default: pageup 5691 type: string 5692 messages_page_down: 5693 description: Scroll messages down by one page 5694 default: pagedown 5695 type: string 5696 messages_half_page_up: 5697 description: Scroll messages up by half page 5698 default: ctrl+alt+u 5699 type: string 5700 messages_half_page_down: 5701 description: Scroll messages down by half page 5702 default: ctrl+alt+d 5703 type: string 5704 messages_first: 5705 description: Navigate to first message 5706 default: ctrl+g,home 5707 type: string 5708 messages_last: 5709 description: Navigate to last message 5710 default: ctrl+alt+g,end 5711 type: string 5712 messages_next: 5713 description: Navigate to next message 5714 default: none 5715 type: string 5716 messages_previous: 5717 description: Navigate to previous message 5718 default: none 5719 type: string 5720 messages_last_user: 5721 description: Navigate to last user message 5722 default: none 5723 type: string 5724 messages_copy: 5725 description: Copy message 5726 default: <leader>y 5727 type: string 5728 messages_undo: 5729 description: Undo message 5730 default: <leader>u 5731 type: string 5732 messages_redo: 5733 description: Redo message 5734 default: <leader>r 5735 type: string 5736 messages_toggle_conceal: 5737 description: Toggle code block concealment in messages 5738 default: <leader>h 5739 type: string 5740 tool_details: 5741 description: Toggle tool details visibility 5742 default: none 5743 type: string 5744 model_list: 5745 description: List available models 5746 default: <leader>m 5747 type: string 5748 model_cycle_recent: 5749 description: Next recently used model 5750 default: f2 5751 type: string 5752 model_cycle_recent_reverse: 5753 description: Previous recently used model 5754 default: shift+f2 5755 type: string 5756 model_cycle_favorite: 5757 description: Next favorite model 5758 default: none 5759 type: string 5760 model_cycle_favorite_reverse: 5761 description: Previous favorite model 5762 default: none 5763 type: string 5764 command_list: 5765 description: List available commands 5766 default: ctrl+p 5767 type: string 5768 agent_list: 5769 description: List agents 5770 default: <leader>a 5771 type: string 5772 agent_cycle: 5773 description: Next agent 5774 default: tab 5775 type: string 5776 agent_cycle_reverse: 5777 description: Previous agent 5778 default: shift+tab 5779 type: string 5780 variant_cycle: 5781 description: Cycle model variants 5782 default: ctrl+t 5783 type: string 5784 input_clear: 5785 description: Clear input field 5786 default: ctrl+c 5787 type: string 5788 input_paste: 5789 description: Paste from clipboard 5790 default: ctrl+v 5791 type: string 5792 input_submit: 5793 description: Submit input 5794 default: return 5795 type: string 5796 input_newline: 5797 description: Insert newline in input 5798 default: shift+return,ctrl+return,alt+return,ctrl+j 5799 type: string 5800 input_move_left: 5801 description: Move cursor left in input 5802 default: left,ctrl+b 5803 type: string 5804 input_move_right: 5805 description: Move cursor right in input 5806 default: right,ctrl+f 5807 type: string 5808 input_move_up: 5809 description: Move cursor up in input 5810 default: up 5811 type: string 5812 input_move_down: 5813 description: Move cursor down in input 5814 default: down 5815 type: string 5816 input_select_left: 5817 description: Select left in input 5818 default: shift+left 5819 type: string 5820 input_select_right: 5821 description: Select right in input 5822 default: shift+right 5823 type: string 5824 input_select_up: 5825 description: Select up in input 5826 default: shift+up 5827 type: string 5828 input_select_down: 5829 description: Select down in input 5830 default: shift+down 5831 type: string 5832 input_line_home: 5833 description: Move to start of line in input 5834 default: ctrl+a 5835 type: string 5836 input_line_end: 5837 description: Move to end of line in input 5838 default: ctrl+e 5839 type: string 5840 input_select_line_home: 5841 description: Select to start of line in input 5842 default: ctrl+shift+a 5843 type: string 5844 input_select_line_end: 5845 description: Select to end of line in input 5846 default: ctrl+shift+e 5847 type: string 5848 input_visual_line_home: 5849 description: Move to start of visual line in input 5850 default: alt+a 5851 type: string 5852 input_visual_line_end: 5853 description: Move to end of visual line in input 5854 default: alt+e 5855 type: string 5856 input_select_visual_line_home: 5857 description: Select to start of visual line in input 5858 default: alt+shift+a 5859 type: string 5860 input_select_visual_line_end: 5861 description: Select to end of visual line in input 5862 default: alt+shift+e 5863 type: string 5864 input_buffer_home: 5865 description: Move to start of buffer in input 5866 default: home 5867 type: string 5868 input_buffer_end: 5869 description: Move to end of buffer in input 5870 default: end 5871 type: string 5872 input_select_buffer_home: 5873 description: Select to start of buffer in input 5874 default: shift+home 5875 type: string 5876 input_select_buffer_end: 5877 description: Select to end of buffer in input 5878 default: shift+end 5879 type: string 5880 input_delete_line: 5881 description: Delete line in input 5882 default: ctrl+shift+d 5883 type: string 5884 input_delete_to_line_end: 5885 description: Delete to end of line in input 5886 default: ctrl+k 5887 type: string 5888 input_delete_to_line_start: 5889 description: Delete to start of line in input 5890 default: ctrl+u 5891 type: string 5892 input_backspace: 5893 description: Backspace in input 5894 default: backspace,shift+backspace 5895 type: string 5896 input_delete: 5897 description: Delete character in input 5898 default: ctrl+d,delete,shift+delete 5899 type: string 5900 input_undo: 5901 description: Undo in input 5902 default: ctrl+-,super+z 5903 type: string 5904 input_redo: 5905 description: Redo in input 5906 default: ctrl+.,super+shift+z 5907 type: string 5908 input_word_forward: 5909 description: Move word forward in input 5910 default: alt+f,alt+right,ctrl+right 5911 type: string 5912 input_word_backward: 5913 description: Move word backward in input 5914 default: alt+b,alt+left,ctrl+left 5915 type: string 5916 input_select_word_forward: 5917 description: Select word forward in input 5918 default: alt+shift+f,alt+shift+right 5919 type: string 5920 input_select_word_backward: 5921 description: Select word backward in input 5922 default: alt+shift+b,alt+shift+left 5923 type: string 5924 input_delete_word_forward: 5925 description: Delete word forward in input 5926 default: alt+d,alt+delete,ctrl+delete 5927 type: string 5928 input_delete_word_backward: 5929 description: Delete word backward in input 5930 default: ctrl+w,ctrl+backspace,alt+backspace 5931 type: string 5932 history_previous: 5933 description: Previous history item 5934 default: up 5935 type: string 5936 history_next: 5937 description: Next history item 5938 default: down 5939 type: string 5940 session_child_cycle: 5941 description: Next child session 5942 default: <leader>right 5943 type: string 5944 session_child_cycle_reverse: 5945 description: Previous child session 5946 default: <leader>left 5947 type: string 5948 session_parent: 5949 description: Go to parent session 5950 default: <leader>up 5951 type: string 5952 terminal_suspend: 5953 description: Suspend terminal 5954 default: ctrl+z 5955 type: string 5956 terminal_title_toggle: 5957 description: Toggle terminal title 5958 default: none 5959 type: string 5960 tips_toggle: 5961 description: Toggle tips on home screen 5962 default: <leader>h 5963 type: string 5964 additionalProperties: false 5965 LogLevel: 5966 description: Log level 5967 type: string 5968 enum: 5969 - DEBUG 5970 - INFO 5971 - WARN 5972 - ERROR 5973 ServerConfig: 5974 description: Server configuration for opencode serve and web commands 5975 type: object 5976 properties: 5977 port: 5978 description: Port to listen on 5979 type: integer 5980 exclusiveMinimum: 0 5981 maximum: 9007199254740991 5982 hostname: 5983 description: Hostname to listen on 5984 type: string 5985 mdns: 5986 description: Enable mDNS service discovery 5987 type: boolean 5988 cors: 5989 description: Additional domains to allow for CORS 5990 type: array 5991 items: 5992 type: string 5993 additionalProperties: false 5994 PermissionActionConfig: 5995 type: string 5996 enum: 5997 - ask 5998 - allow 5999 - deny 6000 PermissionObjectConfig: 6001 type: object 6002 propertyNames: 6003 type: string 6004 additionalProperties: 6005 $ref: '#/components/schemas/PermissionActionConfig' 6006 PermissionRuleConfig: 6007 anyOf: 6008 - $ref: '#/components/schemas/PermissionActionConfig' 6009 - $ref: '#/components/schemas/PermissionObjectConfig' 6010 PermissionConfig: 6011 anyOf: 6012 - type: object 6013 properties: 6014 read: 6015 $ref: '#/components/schemas/PermissionRuleConfig' 6016 edit: 6017 $ref: '#/components/schemas/PermissionRuleConfig' 6018 glob: 6019 $ref: '#/components/schemas/PermissionRuleConfig' 6020 grep: 6021 $ref: '#/components/schemas/PermissionRuleConfig' 6022 list: 6023 $ref: '#/components/schemas/PermissionRuleConfig' 6024 bash: 6025 $ref: '#/components/schemas/PermissionRuleConfig' 6026 task: 6027 $ref: '#/components/schemas/PermissionRuleConfig' 6028 external_directory: 6029 $ref: '#/components/schemas/PermissionRuleConfig' 6030 todowrite: 6031 $ref: '#/components/schemas/PermissionActionConfig' 6032 todoread: 6033 $ref: '#/components/schemas/PermissionActionConfig' 6034 webfetch: 6035 $ref: '#/components/schemas/PermissionActionConfig' 6036 websearch: 6037 $ref: '#/components/schemas/PermissionActionConfig' 6038 codesearch: 6039 $ref: '#/components/schemas/PermissionActionConfig' 6040 lsp: 6041 $ref: '#/components/schemas/PermissionRuleConfig' 6042 doom_loop: 6043 $ref: '#/components/schemas/PermissionActionConfig' 6044 additionalProperties: 6045 $ref: '#/components/schemas/PermissionRuleConfig' 6046 - $ref: '#/components/schemas/PermissionActionConfig' 6047 AgentConfig: 6048 type: object 6049 properties: 6050 model: 6051 type: string 6052 temperature: 6053 type: number 6054 top_p: 6055 type: number 6056 prompt: 6057 type: string 6058 tools: 6059 description: "@deprecated Use 'permission' field instead" 6060 type: object 6061 propertyNames: 6062 type: string 6063 additionalProperties: 6064 type: boolean 6065 disable: 6066 type: boolean 6067 description: 6068 description: Description of when to use the agent 6069 type: string 6070 mode: 6071 type: string 6072 enum: 6073 - subagent 6074 - primary 6075 - all 6076 options: 6077 type: object 6078 propertyNames: 6079 type: string 6080 additionalProperties: {} 6081 color: 6082 description: 'Hex color code for the agent (e.g., #FF5733)' 6083 type: string 6084 pattern: ^#[0-9a-fA-F]{6}$ 6085 steps: 6086 description: Maximum number of agentic iterations before forcing text-only 6087 response 6088 type: integer 6089 exclusiveMinimum: 0 6090 maximum: 9007199254740991 6091 maxSteps: 6092 description: "@deprecated Use 'steps' field instead." 6093 type: integer 6094 exclusiveMinimum: 0 6095 maximum: 9007199254740991 6096 permission: 6097 $ref: '#/components/schemas/PermissionConfig' 6098 additionalProperties: {} 6099 ProviderConfig: 6100 type: object 6101 properties: 6102 api: 6103 type: string 6104 name: 6105 type: string 6106 env: 6107 type: array 6108 items: 6109 type: string 6110 id: 6111 type: string 6112 npm: 6113 type: string 6114 models: 6115 type: object 6116 propertyNames: 6117 type: string 6118 additionalProperties: 6119 type: object 6120 properties: 6121 id: 6122 type: string 6123 name: 6124 type: string 6125 family: 6126 type: string 6127 release_date: 6128 type: string 6129 attachment: 6130 type: boolean 6131 reasoning: 6132 type: boolean 6133 temperature: 6134 type: boolean 6135 tool_call: 6136 type: boolean 6137 interleaved: 6138 anyOf: 6139 - type: boolean 6140 const: true 6141 - type: object 6142 properties: 6143 field: 6144 type: string 6145 enum: 6146 - reasoning_content 6147 - reasoning_details 6148 required: 6149 - field 6150 additionalProperties: false 6151 cost: 6152 type: object 6153 properties: 6154 input: 6155 type: number 6156 output: 6157 type: number 6158 cache_read: 6159 type: number 6160 cache_write: 6161 type: number 6162 context_over_200k: 6163 type: object 6164 properties: 6165 input: 6166 type: number 6167 output: 6168 type: number 6169 cache_read: 6170 type: number 6171 cache_write: 6172 type: number 6173 required: 6174 - input 6175 - output 6176 required: 6177 - input 6178 - output 6179 limit: 6180 type: object 6181 properties: 6182 context: 6183 type: number 6184 output: 6185 type: number 6186 required: 6187 - context 6188 - output 6189 modalities: 6190 type: object 6191 properties: 6192 input: 6193 type: array 6194 items: 6195 type: string 6196 enum: 6197 - text 6198 - audio 6199 - image 6200 - video 6201 - pdf 6202 output: 6203 type: array 6204 items: 6205 type: string 6206 enum: 6207 - text 6208 - audio 6209 - image 6210 - video 6211 - pdf 6212 required: 6213 - input 6214 - output 6215 experimental: 6216 type: boolean 6217 status: 6218 type: string 6219 enum: 6220 - alpha 6221 - beta 6222 - deprecated 6223 options: 6224 type: object 6225 propertyNames: 6226 type: string 6227 additionalProperties: {} 6228 headers: 6229 type: object 6230 propertyNames: 6231 type: string 6232 additionalProperties: 6233 type: string 6234 provider: 6235 type: object 6236 properties: 6237 npm: 6238 type: string 6239 required: 6240 - npm 6241 variants: 6242 description: Variant-specific configuration 6243 type: object 6244 propertyNames: 6245 type: string 6246 additionalProperties: 6247 type: object 6248 properties: 6249 disabled: 6250 description: Disable this variant for the model 6251 type: boolean 6252 additionalProperties: {} 6253 whitelist: 6254 type: array 6255 items: 6256 type: string 6257 blacklist: 6258 type: array 6259 items: 6260 type: string 6261 options: 6262 type: object 6263 properties: 6264 apiKey: 6265 type: string 6266 baseURL: 6267 type: string 6268 enterpriseUrl: 6269 description: GitHub Enterprise URL for copilot authentication 6270 type: string 6271 setCacheKey: 6272 description: Enable promptCacheKey for this provider (default false) 6273 type: boolean 6274 timeout: 6275 description: Timeout in milliseconds for requests to this provider. Default is 6276 300000 (5 minutes). Set to false to disable timeout. 6277 anyOf: 6278 - description: Timeout in milliseconds for requests to this provider. Default is 6279 300000 (5 minutes). Set to false to disable timeout. 6280 type: integer 6281 exclusiveMinimum: 0 6282 maximum: 9007199254740991 6283 - description: Disable timeout for this provider entirely. 6284 type: boolean 6285 const: false 6286 additionalProperties: {} 6287 additionalProperties: false 6288 McpLocalConfig: 6289 type: object 6290 properties: 6291 type: 6292 description: Type of MCP server connection 6293 type: string 6294 const: local 6295 command: 6296 description: Command and arguments to run the MCP server 6297 type: array 6298 items: 6299 type: string 6300 environment: 6301 description: Environment variables to set when running the MCP server 6302 type: object 6303 propertyNames: 6304 type: string 6305 additionalProperties: 6306 type: string 6307 enabled: 6308 description: Enable or disable the MCP server on startup 6309 type: boolean 6310 timeout: 6311 description: Timeout in ms for fetching tools from the MCP server. Defaults to 6312 5000 (5 seconds) if not specified. 6313 type: integer 6314 exclusiveMinimum: 0 6315 maximum: 9007199254740991 6316 required: 6317 - type 6318 - command 6319 additionalProperties: false 6320 McpOAuthConfig: 6321 type: object 6322 properties: 6323 clientId: 6324 description: OAuth client ID. If not provided, dynamic client registration (RFC 6325 7591) will be attempted. 6326 type: string 6327 clientSecret: 6328 description: OAuth client secret (if required by the authorization server) 6329 type: string 6330 scope: 6331 description: OAuth scopes to request during authorization 6332 type: string 6333 additionalProperties: false 6334 McpRemoteConfig: 6335 type: object 6336 properties: 6337 type: 6338 description: Type of MCP server connection 6339 type: string 6340 const: remote 6341 url: 6342 description: URL of the remote MCP server 6343 type: string 6344 enabled: 6345 description: Enable or disable the MCP server on startup 6346 type: boolean 6347 headers: 6348 description: Headers to send with the request 6349 type: object 6350 propertyNames: 6351 type: string 6352 additionalProperties: 6353 type: string 6354 oauth: 6355 description: OAuth authentication configuration for the MCP server. Set to false 6356 to disable OAuth auto-detection. 6357 anyOf: 6358 - $ref: '#/components/schemas/McpOAuthConfig' 6359 - type: boolean 6360 const: false 6361 timeout: 6362 description: Timeout in ms for fetching tools from the MCP server. Defaults to 6363 5000 (5 seconds) if not specified. 6364 type: integer 6365 exclusiveMinimum: 0 6366 maximum: 9007199254740991 6367 required: 6368 - type 6369 - url 6370 additionalProperties: false 6371 LayoutConfig: 6372 description: '@deprecated Always uses stretch layout.' 6373 type: string 6374 enum: 6375 - auto 6376 - stretch 6377 Config: 6378 type: object 6379 properties: 6380 $schema: 6381 description: JSON schema reference for configuration validation 6382 type: string 6383 theme: 6384 description: Theme name to use for the interface 6385 type: string 6386 keybinds: 6387 $ref: '#/components/schemas/KeybindsConfig' 6388 logLevel: 6389 $ref: '#/components/schemas/LogLevel' 6390 tui: 6391 description: TUI specific settings 6392 type: object 6393 properties: 6394 scroll_speed: 6395 description: TUI scroll speed 6396 type: number 6397 minimum: 0.001 6398 scroll_acceleration: 6399 description: Scroll acceleration settings 6400 type: object 6401 properties: 6402 enabled: 6403 description: Enable scroll acceleration 6404 type: boolean 6405 required: 6406 - enabled 6407 diff_style: 6408 description: "Control diff rendering style: 'auto' adapts to terminal width, 6409 'stacked' always shows single column" 6410 type: string 6411 enum: 6412 - auto 6413 - stacked 6414 server: 6415 $ref: '#/components/schemas/ServerConfig' 6416 command: 6417 description: Command configuration, see https://opencode.ai/docs/commands 6418 type: object 6419 propertyNames: 6420 type: string 6421 additionalProperties: 6422 type: object 6423 properties: 6424 template: 6425 type: string 6426 description: 6427 type: string 6428 agent: 6429 type: string 6430 model: 6431 type: string 6432 subtask: 6433 type: boolean 6434 required: 6435 - template 6436 watcher: 6437 type: object 6438 properties: 6439 ignore: 6440 type: array 6441 items: 6442 type: string 6443 plugin: 6444 type: array 6445 items: 6446 type: string 6447 snapshot: 6448 type: boolean 6449 share: 6450 description: Control sharing behavior:'manual' allows manual sharing via 6451 commands, 'auto' enables automatic sharing, 'disabled' disables all 6452 sharing 6453 type: string 6454 enum: 6455 - manual 6456 - auto 6457 - disabled 6458 autoshare: 6459 description: "@deprecated Use 'share' field instead. Share newly created 6460 sessions automatically" 6461 type: boolean 6462 autoupdate: 6463 description: Automatically update to the latest version. Set to true to 6464 auto-update, false to disable, or 'notify' to show update 6465 notifications 6466 anyOf: 6467 - type: boolean 6468 - type: string 6469 const: notify 6470 disabled_providers: 6471 description: Disable providers that are loaded automatically 6472 type: array 6473 items: 6474 type: string 6475 enabled_providers: 6476 description: When set, ONLY these providers will be enabled. All other providers 6477 will be ignored 6478 type: array 6479 items: 6480 type: string 6481 model: 6482 description: Model to use in the format of provider/model, eg anthropic/claude-2 6483 type: string 6484 small_model: 6485 description: Small model to use for tasks like title generation in the format of 6486 provider/model 6487 type: string 6488 default_agent: 6489 description: Default agent to use when none is specified. Must be a primary 6490 agent. Falls back to 'build' if not set or if the specified agent is 6491 invalid. 6492 type: string 6493 username: 6494 description: Custom username to display in conversations instead of system 6495 username 6496 type: string 6497 mode: 6498 description: '@deprecated Use `agent` field instead.' 6499 type: object 6500 properties: 6501 build: 6502 $ref: '#/components/schemas/AgentConfig' 6503 plan: 6504 $ref: '#/components/schemas/AgentConfig' 6505 additionalProperties: 6506 $ref: '#/components/schemas/AgentConfig' 6507 agent: 6508 description: Agent configuration, see https://opencode.ai/docs/agent 6509 type: object 6510 properties: 6511 plan: 6512 $ref: '#/components/schemas/AgentConfig' 6513 build: 6514 $ref: '#/components/schemas/AgentConfig' 6515 general: 6516 $ref: '#/components/schemas/AgentConfig' 6517 explore: 6518 $ref: '#/components/schemas/AgentConfig' 6519 title: 6520 $ref: '#/components/schemas/AgentConfig' 6521 summary: 6522 $ref: '#/components/schemas/AgentConfig' 6523 compaction: 6524 $ref: '#/components/schemas/AgentConfig' 6525 additionalProperties: 6526 $ref: '#/components/schemas/AgentConfig' 6527 provider: 6528 description: Custom provider configurations and model overrides 6529 type: object 6530 propertyNames: 6531 type: string 6532 additionalProperties: 6533 $ref: '#/components/schemas/ProviderConfig' 6534 mcp: 6535 description: MCP (Model Context Protocol) server configurations 6536 type: object 6537 propertyNames: 6538 type: string 6539 additionalProperties: 6540 anyOf: 6541 - $ref: '#/components/schemas/McpLocalConfig' 6542 - $ref: '#/components/schemas/McpRemoteConfig' 6543 formatter: 6544 anyOf: 6545 - type: boolean 6546 const: false 6547 - type: object 6548 propertyNames: 6549 type: string 6550 additionalProperties: 6551 type: object 6552 properties: 6553 disabled: 6554 type: boolean 6555 command: 6556 type: array 6557 items: 6558 type: string 6559 environment: 6560 type: object 6561 propertyNames: 6562 type: string 6563 additionalProperties: 6564 type: string 6565 extensions: 6566 type: array 6567 items: 6568 type: string 6569 lsp: 6570 anyOf: 6571 - type: boolean 6572 const: false 6573 - type: object 6574 propertyNames: 6575 type: string 6576 additionalProperties: 6577 anyOf: 6578 - type: object 6579 properties: 6580 disabled: 6581 type: boolean 6582 const: true 6583 required: 6584 - disabled 6585 - type: object 6586 properties: 6587 command: 6588 type: array 6589 items: 6590 type: string 6591 extensions: 6592 type: array 6593 items: 6594 type: string 6595 disabled: 6596 type: boolean 6597 env: 6598 type: object 6599 propertyNames: 6600 type: string 6601 additionalProperties: 6602 type: string 6603 initialization: 6604 type: object 6605 propertyNames: 6606 type: string 6607 additionalProperties: {} 6608 required: 6609 - command 6610 instructions: 6611 description: Additional instruction files or patterns to include 6612 type: array 6613 items: 6614 type: string 6615 layout: 6616 $ref: '#/components/schemas/LayoutConfig' 6617 permission: 6618 $ref: '#/components/schemas/PermissionConfig' 6619 tools: 6620 type: object 6621 propertyNames: 6622 type: string 6623 additionalProperties: 6624 type: boolean 6625 enterprise: 6626 type: object 6627 properties: 6628 url: 6629 description: Enterprise URL 6630 type: string 6631 compaction: 6632 type: object 6633 properties: 6634 auto: 6635 description: 'Enable automatic compaction when context is full (default: true)' 6636 type: boolean 6637 prune: 6638 description: 'Enable pruning of old tool outputs (default: true)' 6639 type: boolean 6640 experimental: 6641 type: object 6642 properties: 6643 hook: 6644 type: object 6645 properties: 6646 file_edited: 6647 type: object 6648 propertyNames: 6649 type: string 6650 additionalProperties: 6651 type: array 6652 items: 6653 type: object 6654 properties: 6655 command: 6656 type: array 6657 items: 6658 type: string 6659 environment: 6660 type: object 6661 propertyNames: 6662 type: string 6663 additionalProperties: 6664 type: string 6665 required: 6666 - command 6667 session_completed: 6668 type: array 6669 items: 6670 type: object 6671 properties: 6672 command: 6673 type: array 6674 items: 6675 type: string 6676 environment: 6677 type: object 6678 propertyNames: 6679 type: string 6680 additionalProperties: 6681 type: string 6682 required: 6683 - command 6684 chatMaxRetries: 6685 description: Number of retries for chat completions on failure 6686 type: number 6687 disable_paste_summary: 6688 type: boolean 6689 batch_tool: 6690 description: Enable the batch tool 6691 type: boolean 6692 openTelemetry: 6693 description: Enable OpenTelemetry spans for AI SDK calls (using the 6694 'experimental_telemetry' flag) 6695 type: boolean 6696 primary_tools: 6697 description: Tools that should only be available to primary agents. 6698 type: array 6699 items: 6700 type: string 6701 continue_loop_on_deny: 6702 description: Continue the agent loop when a tool call is denied 6703 type: boolean 6704 mcp_timeout: 6705 description: Timeout in milliseconds for model context protocol (MCP) requests 6706 type: integer 6707 exclusiveMinimum: 0 6708 maximum: 9007199254740991 6709 additionalProperties: false 6710 ToolIDs: 6711 type: array 6712 items: 6713 type: string 6714 ToolListItem: 6715 type: object 6716 properties: 6717 id: 6718 type: string 6719 description: 6720 type: string 6721 parameters: {} 6722 required: 6723 - id 6724 - description 6725 - parameters 6726 ToolList: 6727 type: array 6728 items: 6729 $ref: '#/components/schemas/ToolListItem' 6730 Path: 6731 type: object 6732 properties: 6733 home: 6734 type: string 6735 state: 6736 type: string 6737 config: 6738 type: string 6739 worktree: 6740 type: string 6741 directory: 6742 type: string 6743 required: 6744 - home 6745 - state 6746 - config 6747 - worktree 6748 - directory 6749 VcsInfo: 6750 type: object 6751 properties: 6752 branch: 6753 type: string 6754 required: 6755 - branch 6756 TextPartInput: 6757 type: object 6758 properties: 6759 id: 6760 type: string 6761 type: 6762 type: string 6763 const: text 6764 text: 6765 type: string 6766 synthetic: 6767 type: boolean 6768 ignored: 6769 type: boolean 6770 time: 6771 type: object 6772 properties: 6773 start: 6774 type: number 6775 end: 6776 type: number 6777 required: 6778 - start 6779 metadata: 6780 type: object 6781 propertyNames: 6782 type: string 6783 additionalProperties: {} 6784 required: 6785 - type 6786 - text 6787 FilePartInput: 6788 type: object 6789 properties: 6790 id: 6791 type: string 6792 type: 6793 type: string 6794 const: file 6795 mime: 6796 type: string 6797 filename: 6798 type: string 6799 url: 6800 type: string 6801 source: 6802 $ref: '#/components/schemas/FilePartSource' 6803 required: 6804 - type 6805 - mime 6806 - url 6807 AgentPartInput: 6808 type: object 6809 properties: 6810 id: 6811 type: string 6812 type: 6813 type: string 6814 const: agent 6815 name: 6816 type: string 6817 source: 6818 type: object 6819 properties: 6820 value: 6821 type: string 6822 start: 6823 type: integer 6824 minimum: -9007199254740991 6825 maximum: 9007199254740991 6826 end: 6827 type: integer 6828 minimum: -9007199254740991 6829 maximum: 9007199254740991 6830 required: 6831 - value 6832 - start 6833 - end 6834 required: 6835 - type 6836 - name 6837 SubtaskPartInput: 6838 type: object 6839 properties: 6840 id: 6841 type: string 6842 type: 6843 type: string 6844 const: subtask 6845 prompt: 6846 type: string 6847 description: 6848 type: string 6849 agent: 6850 type: string 6851 command: 6852 type: string 6853 required: 6854 - type 6855 - prompt 6856 - description 6857 - agent 6858 Command: 6859 type: object 6860 properties: 6861 name: 6862 type: string 6863 description: 6864 type: string 6865 agent: 6866 type: string 6867 model: 6868 type: string 6869 mcp: 6870 type: boolean 6871 template: 6872 anyOf: 6873 - type: string 6874 - type: string 6875 subtask: 6876 type: boolean 6877 hints: 6878 type: array 6879 items: 6880 type: string 6881 required: 6882 - name 6883 - template 6884 - hints 6885 Model: 6886 type: object 6887 properties: 6888 id: 6889 type: string 6890 providerID: 6891 type: string 6892 api: 6893 type: object 6894 properties: 6895 id: 6896 type: string 6897 url: 6898 type: string 6899 npm: 6900 type: string 6901 required: 6902 - id 6903 - url 6904 - npm 6905 name: 6906 type: string 6907 family: 6908 type: string 6909 capabilities: 6910 type: object 6911 properties: 6912 temperature: 6913 type: boolean 6914 reasoning: 6915 type: boolean 6916 attachment: 6917 type: boolean 6918 toolcall: 6919 type: boolean 6920 input: 6921 type: object 6922 properties: 6923 text: 6924 type: boolean 6925 audio: 6926 type: boolean 6927 image: 6928 type: boolean 6929 video: 6930 type: boolean 6931 pdf: 6932 type: boolean 6933 required: 6934 - text 6935 - audio 6936 - image 6937 - video 6938 - pdf 6939 output: 6940 type: object 6941 properties: 6942 text: 6943 type: boolean 6944 audio: 6945 type: boolean 6946 image: 6947 type: boolean 6948 video: 6949 type: boolean 6950 pdf: 6951 type: boolean 6952 required: 6953 - text 6954 - audio 6955 - image 6956 - video 6957 - pdf 6958 interleaved: 6959 anyOf: 6960 - type: boolean 6961 - type: object 6962 properties: 6963 field: 6964 type: string 6965 enum: 6966 - reasoning_content 6967 - reasoning_details 6968 required: 6969 - field 6970 required: 6971 - temperature 6972 - reasoning 6973 - attachment 6974 - toolcall 6975 - input 6976 - output 6977 - interleaved 6978 cost: 6979 type: object 6980 properties: 6981 input: 6982 type: number 6983 output: 6984 type: number 6985 cache: 6986 type: object 6987 properties: 6988 read: 6989 type: number 6990 write: 6991 type: number 6992 required: 6993 - read 6994 - write 6995 experimentalOver200K: 6996 type: object 6997 properties: 6998 input: 6999 type: number 7000 output: 7001 type: number 7002 cache: 7003 type: object 7004 properties: 7005 read: 7006 type: number 7007 write: 7008 type: number 7009 required: 7010 - read 7011 - write 7012 required: 7013 - input 7014 - output 7015 - cache 7016 required: 7017 - input 7018 - output 7019 - cache 7020 limit: 7021 type: object 7022 properties: 7023 context: 7024 type: number 7025 output: 7026 type: number 7027 required: 7028 - context 7029 - output 7030 status: 7031 type: string 7032 enum: 7033 - alpha 7034 - beta 7035 - deprecated 7036 - active 7037 options: 7038 type: object 7039 propertyNames: 7040 type: string 7041 additionalProperties: {} 7042 headers: 7043 type: object 7044 propertyNames: 7045 type: string 7046 additionalProperties: 7047 type: string 7048 release_date: 7049 type: string 7050 variants: 7051 type: object 7052 propertyNames: 7053 type: string 7054 additionalProperties: 7055 type: object 7056 propertyNames: 7057 type: string 7058 additionalProperties: {} 7059 required: 7060 - id 7061 - providerID 7062 - api 7063 - name 7064 - capabilities 7065 - cost 7066 - limit 7067 - status 7068 - options 7069 - headers 7070 - release_date 7071 Provider: 7072 type: object 7073 properties: 7074 id: 7075 type: string 7076 name: 7077 type: string 7078 source: 7079 type: string 7080 enum: 7081 - env 7082 - config 7083 - custom 7084 - api 7085 env: 7086 type: array 7087 items: 7088 type: string 7089 key: 7090 type: string 7091 options: 7092 type: object 7093 propertyNames: 7094 type: string 7095 additionalProperties: {} 7096 models: 7097 type: object 7098 propertyNames: 7099 type: string 7100 additionalProperties: 7101 $ref: '#/components/schemas/Model' 7102 required: 7103 - id 7104 - name 7105 - source 7106 - env 7107 - options 7108 - models 7109 ProviderAuthMethod: 7110 type: object 7111 properties: 7112 type: 7113 anyOf: 7114 - type: string 7115 const: oauth 7116 - type: string 7117 const: api 7118 label: 7119 type: string 7120 required: 7121 - type 7122 - label 7123 ProviderAuthAuthorization: 7124 type: object 7125 properties: 7126 url: 7127 type: string 7128 method: 7129 anyOf: 7130 - type: string 7131 const: auto 7132 - type: string 7133 const: code 7134 instructions: 7135 type: string 7136 required: 7137 - url 7138 - method 7139 - instructions 7140 Symbol: 7141 type: object 7142 properties: 7143 name: 7144 type: string 7145 kind: 7146 type: number 7147 location: 7148 type: object 7149 properties: 7150 uri: 7151 type: string 7152 range: 7153 $ref: '#/components/schemas/Range' 7154 required: 7155 - uri 7156 - range 7157 required: 7158 - name 7159 - kind 7160 - location 7161 FileNode: 7162 type: object 7163 properties: 7164 name: 7165 type: string 7166 path: 7167 type: string 7168 absolute: 7169 type: string 7170 type: 7171 type: string 7172 enum: 7173 - file 7174 - directory 7175 ignored: 7176 type: boolean 7177 required: 7178 - name 7179 - path 7180 - absolute 7181 - type 7182 - ignored 7183 FileContent: 7184 type: object 7185 properties: 7186 type: 7187 type: string 7188 const: text 7189 content: 7190 type: string 7191 diff: 7192 type: string 7193 patch: 7194 type: object 7195 properties: 7196 oldFileName: 7197 type: string 7198 newFileName: 7199 type: string 7200 oldHeader: 7201 type: string 7202 newHeader: 7203 type: string 7204 hunks: 7205 type: array 7206 items: 7207 type: object 7208 properties: 7209 oldStart: 7210 type: number 7211 oldLines: 7212 type: number 7213 newStart: 7214 type: number 7215 newLines: 7216 type: number 7217 lines: 7218 type: array 7219 items: 7220 type: string 7221 required: 7222 - oldStart 7223 - oldLines 7224 - newStart 7225 - newLines 7226 - lines 7227 index: 7228 type: string 7229 required: 7230 - oldFileName 7231 - newFileName 7232 - hunks 7233 encoding: 7234 type: string 7235 const: base64 7236 mimeType: 7237 type: string 7238 required: 7239 - type 7240 - content 7241 File: 7242 type: object 7243 properties: 7244 path: 7245 type: string 7246 added: 7247 type: integer 7248 minimum: -9007199254740991 7249 maximum: 9007199254740991 7250 removed: 7251 type: integer 7252 minimum: -9007199254740991 7253 maximum: 9007199254740991 7254 status: 7255 type: string 7256 enum: 7257 - added 7258 - deleted 7259 - modified 7260 required: 7261 - path 7262 - added 7263 - removed 7264 - status 7265 Agent: 7266 type: object 7267 properties: 7268 name: 7269 type: string 7270 description: 7271 type: string 7272 mode: 7273 type: string 7274 enum: 7275 - subagent 7276 - primary 7277 - all 7278 native: 7279 type: boolean 7280 hidden: 7281 type: boolean 7282 topP: 7283 type: number 7284 temperature: 7285 type: number 7286 color: 7287 type: string 7288 permission: 7289 $ref: '#/components/schemas/PermissionRuleset' 7290 model: 7291 type: object 7292 properties: 7293 modelID: 7294 type: string 7295 providerID: 7296 type: string 7297 required: 7298 - modelID 7299 - providerID 7300 prompt: 7301 type: string 7302 options: 7303 type: object 7304 propertyNames: 7305 type: string 7306 additionalProperties: {} 7307 steps: 7308 type: integer 7309 exclusiveMinimum: 0 7310 maximum: 9007199254740991 7311 required: 7312 - name 7313 - mode 7314 - permission 7315 - options 7316 MCPStatusConnected: 7317 type: object 7318 properties: 7319 status: 7320 type: string 7321 const: connected 7322 required: 7323 - status 7324 MCPStatusDisabled: 7325 type: object 7326 properties: 7327 status: 7328 type: string 7329 const: disabled 7330 required: 7331 - status 7332 MCPStatusFailed: 7333 type: object 7334 properties: 7335 status: 7336 type: string 7337 const: failed 7338 error: 7339 type: string 7340 required: 7341 - status 7342 - error 7343 MCPStatusNeedsAuth: 7344 type: object 7345 properties: 7346 status: 7347 type: string 7348 const: needs_auth 7349 required: 7350 - status 7351 MCPStatusNeedsClientRegistration: 7352 type: object 7353 properties: 7354 status: 7355 type: string 7356 const: needs_client_registration 7357 error: 7358 type: string 7359 required: 7360 - status 7361 - error 7362 MCPStatus: 7363 anyOf: 7364 - $ref: '#/components/schemas/MCPStatusConnected' 7365 - $ref: '#/components/schemas/MCPStatusDisabled' 7366 - $ref: '#/components/schemas/MCPStatusFailed' 7367 - $ref: '#/components/schemas/MCPStatusNeedsAuth' 7368 - $ref: '#/components/schemas/MCPStatusNeedsClientRegistration' 7369 LSPStatus: 7370 type: object 7371 properties: 7372 id: 7373 type: string 7374 name: 7375 type: string 7376 root: 7377 type: string 7378 status: 7379 anyOf: 7380 - type: string 7381 const: connected 7382 - type: string 7383 const: error 7384 required: 7385 - id 7386 - name 7387 - root 7388 - status 7389 FormatterStatus: 7390 type: object 7391 properties: 7392 name: 7393 type: string 7394 extensions: 7395 type: array 7396 items: 7397 type: string 7398 enabled: 7399 type: boolean 7400 required: 7401 - name 7402 - extensions 7403 - enabled 7404 OAuth: 7405 type: object 7406 properties: 7407 type: 7408 type: string 7409 const: oauth 7410 refresh: 7411 type: string 7412 access: 7413 type: string 7414 expires: 7415 type: number 7416 enterpriseUrl: 7417 type: string 7418 required: 7419 - type 7420 - refresh 7421 - access 7422 - expires 7423 ApiAuth: 7424 type: object 7425 properties: 7426 type: 7427 type: string 7428 const: api 7429 key: 7430 type: string 7431 required: 7432 - type 7433 - key 7434 WellKnownAuth: 7435 type: object 7436 properties: 7437 type: 7438 type: string 7439 const: wellknown 7440 key: 7441 type: string 7442 token: 7443 type: string 7444 required: 7445 - type 7446 - key 7447 - token 7448 Auth: 7449 anyOf: 7450 - $ref: '#/components/schemas/OAuth' 7451 - $ref: '#/components/schemas/ApiAuth' 7452 - $ref: '#/components/schemas/WellKnownAuth'