|
1897 | 1897 | ] |
1898 | 1898 | } |
1899 | 1899 | }, |
| 1900 | + "/vcs/status": { |
| 1901 | + "get": { |
| 1902 | + "tags": ["instance"], |
| 1903 | + "operationId": "vcs.status", |
| 1904 | + "parameters": [ |
| 1905 | + { |
| 1906 | + "name": "directory", |
| 1907 | + "in": "query", |
| 1908 | + "required": false, |
| 1909 | + "schema": { |
| 1910 | + "type": "string" |
| 1911 | + } |
| 1912 | + }, |
| 1913 | + { |
| 1914 | + "name": "workspace", |
| 1915 | + "in": "query", |
| 1916 | + "required": false, |
| 1917 | + "schema": { |
| 1918 | + "type": "string" |
| 1919 | + } |
| 1920 | + } |
| 1921 | + ], |
| 1922 | + "responses": { |
| 1923 | + "200": { |
| 1924 | + "description": "VCS status", |
| 1925 | + "content": { |
| 1926 | + "application/json": { |
| 1927 | + "schema": { |
| 1928 | + "type": "array", |
| 1929 | + "items": { |
| 1930 | + "$ref": "#/components/schemas/VcsFileStatus" |
| 1931 | + }, |
| 1932 | + "description": "VCS status" |
| 1933 | + } |
| 1934 | + } |
| 1935 | + } |
| 1936 | + } |
| 1937 | + }, |
| 1938 | + "description": "Retrieve changed files in the current working tree without patches.", |
| 1939 | + "summary": "Get VCS status", |
| 1940 | + "x-codeSamples": [ |
| 1941 | + { |
| 1942 | + "lang": "js", |
| 1943 | + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})" |
| 1944 | + } |
| 1945 | + ] |
| 1946 | + } |
| 1947 | + }, |
1900 | 1948 | "/vcs/diff": { |
1901 | 1949 | "get": { |
1902 | 1950 | "tags": ["instance"], |
|
1954 | 2002 | ] |
1955 | 2003 | } |
1956 | 2004 | }, |
| 2005 | + "/vcs/diff/raw": { |
| 2006 | + "get": { |
| 2007 | + "tags": ["instance"], |
| 2008 | + "operationId": "vcs.diff.raw", |
| 2009 | + "parameters": [ |
| 2010 | + { |
| 2011 | + "name": "directory", |
| 2012 | + "in": "query", |
| 2013 | + "required": false, |
| 2014 | + "schema": { |
| 2015 | + "type": "string" |
| 2016 | + } |
| 2017 | + }, |
| 2018 | + { |
| 2019 | + "name": "workspace", |
| 2020 | + "in": "query", |
| 2021 | + "required": false, |
| 2022 | + "schema": { |
| 2023 | + "type": "string" |
| 2024 | + } |
| 2025 | + } |
| 2026 | + ], |
| 2027 | + "responses": { |
| 2028 | + "200": { |
| 2029 | + "description": "Raw VCS diff", |
| 2030 | + "content": { |
| 2031 | + "text/x-diff; charset=utf-8": { |
| 2032 | + "schema": { |
| 2033 | + "type": "string" |
| 2034 | + } |
| 2035 | + } |
| 2036 | + } |
| 2037 | + } |
| 2038 | + }, |
| 2039 | + "description": "Retrieve a raw patch for current uncommitted changes.", |
| 2040 | + "summary": "Get raw VCS diff", |
| 2041 | + "x-codeSamples": [ |
| 2042 | + { |
| 2043 | + "lang": "js", |
| 2044 | + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})" |
| 2045 | + } |
| 2046 | + ] |
| 2047 | + } |
| 2048 | + }, |
| 2049 | + "/vcs/apply": { |
| 2050 | + "post": { |
| 2051 | + "tags": ["instance"], |
| 2052 | + "operationId": "vcs.apply", |
| 2053 | + "parameters": [ |
| 2054 | + { |
| 2055 | + "name": "directory", |
| 2056 | + "in": "query", |
| 2057 | + "required": false, |
| 2058 | + "schema": { |
| 2059 | + "type": "string" |
| 2060 | + } |
| 2061 | + }, |
| 2062 | + { |
| 2063 | + "name": "workspace", |
| 2064 | + "in": "query", |
| 2065 | + "required": false, |
| 2066 | + "schema": { |
| 2067 | + "type": "string" |
| 2068 | + } |
| 2069 | + } |
| 2070 | + ], |
| 2071 | + "responses": { |
| 2072 | + "200": { |
| 2073 | + "description": "VCS patch applied", |
| 2074 | + "content": { |
| 2075 | + "application/json": { |
| 2076 | + "schema": { |
| 2077 | + "type": "object", |
| 2078 | + "properties": { |
| 2079 | + "applied": { |
| 2080 | + "type": "boolean" |
| 2081 | + } |
| 2082 | + }, |
| 2083 | + "required": ["applied"], |
| 2084 | + "additionalProperties": false, |
| 2085 | + "description": "VCS patch applied" |
| 2086 | + } |
| 2087 | + } |
| 2088 | + } |
| 2089 | + }, |
| 2090 | + "400": { |
| 2091 | + "description": "VcsApplyError", |
| 2092 | + "content": { |
| 2093 | + "application/json": { |
| 2094 | + "schema": { |
| 2095 | + "$ref": "#/components/schemas/VcsApplyError" |
| 2096 | + } |
| 2097 | + } |
| 2098 | + } |
| 2099 | + } |
| 2100 | + }, |
| 2101 | + "description": "Apply a raw patch to the current working tree.", |
| 2102 | + "summary": "Apply VCS patch", |
| 2103 | + "requestBody": { |
| 2104 | + "content": { |
| 2105 | + "application/json": { |
| 2106 | + "schema": { |
| 2107 | + "type": "object", |
| 2108 | + "properties": { |
| 2109 | + "patch": { |
| 2110 | + "type": "string" |
| 2111 | + } |
| 2112 | + }, |
| 2113 | + "required": ["patch"], |
| 2114 | + "additionalProperties": false |
| 2115 | + } |
| 2116 | + } |
| 2117 | + } |
| 2118 | + }, |
| 2119 | + "x-codeSamples": [ |
| 2120 | + { |
| 2121 | + "lang": "js", |
| 2122 | + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})" |
| 2123 | + } |
| 2124 | + ] |
| 2125 | + } |
| 2126 | + }, |
1957 | 2127 | "/command": { |
1958 | 2128 | "get": { |
1959 | 2129 | "tags": ["instance"], |
|
8396 | 8566 | "description": "Session warped" |
8397 | 8567 | }, |
8398 | 8568 | "400": { |
8399 | | - "description": "Bad request", |
| 8569 | + "description": "WorkspaceWarpError | VcsApplyError", |
8400 | 8570 | "content": { |
8401 | 8571 | "application/json": { |
8402 | 8572 | "schema": { |
8403 | | - "$ref": "#/components/schemas/BadRequestError" |
| 8573 | + "anyOf": [ |
| 8574 | + { |
| 8575 | + "$ref": "#/components/schemas/WorkspaceWarpError" |
| 8576 | + }, |
| 8577 | + { |
| 8578 | + "$ref": "#/components/schemas/VcsApplyError" |
| 8579 | + } |
| 8580 | + ] |
8404 | 8581 | } |
8405 | 8582 | } |
8406 | 8583 | } |
|
8426 | 8603 | }, |
8427 | 8604 | "sessionID": { |
8428 | 8605 | "type": "string" |
| 8606 | + }, |
| 8607 | + "copyChanges": { |
| 8608 | + "type": "boolean" |
8429 | 8609 | } |
8430 | 8610 | }, |
8431 | 8611 | "required": ["id", "sessionID"], |
|
12665 | 12845 | }, |
12666 | 12846 | "additionalProperties": false |
12667 | 12847 | }, |
| 12848 | + "VcsFileStatus": { |
| 12849 | + "type": "object", |
| 12850 | + "properties": { |
| 12851 | + "file": { |
| 12852 | + "type": "string" |
| 12853 | + }, |
| 12854 | + "additions": { |
| 12855 | + "type": "integer", |
| 12856 | + "minimum": 0 |
| 12857 | + }, |
| 12858 | + "deletions": { |
| 12859 | + "type": "integer", |
| 12860 | + "minimum": 0 |
| 12861 | + }, |
| 12862 | + "status": { |
| 12863 | + "type": "string", |
| 12864 | + "enum": ["added", "deleted", "modified"] |
| 12865 | + } |
| 12866 | + }, |
| 12867 | + "required": ["file", "additions", "deletions", "status"], |
| 12868 | + "additionalProperties": false |
| 12869 | + }, |
12668 | 12870 | "VcsFileDiff": { |
12669 | 12871 | "type": "object", |
12670 | 12872 | "properties": { |
|
12690 | 12892 | "required": ["file", "patch", "additions", "deletions"], |
12691 | 12893 | "additionalProperties": false |
12692 | 12894 | }, |
| 12895 | + "VcsApplyError": { |
| 12896 | + "type": "object", |
| 12897 | + "properties": { |
| 12898 | + "name": { |
| 12899 | + "type": "string", |
| 12900 | + "enum": ["VcsApplyError"] |
| 12901 | + }, |
| 12902 | + "data": { |
| 12903 | + "type": "object", |
| 12904 | + "properties": { |
| 12905 | + "message": { |
| 12906 | + "type": "string" |
| 12907 | + }, |
| 12908 | + "reason": { |
| 12909 | + "type": "string", |
| 12910 | + "enum": ["non-git", "not-clean"] |
| 12911 | + } |
| 12912 | + }, |
| 12913 | + "required": ["message", "reason"], |
| 12914 | + "additionalProperties": false |
| 12915 | + } |
| 12916 | + }, |
| 12917 | + "required": ["name", "data"], |
| 12918 | + "additionalProperties": false |
| 12919 | + }, |
12693 | 12920 | "Command": { |
12694 | 12921 | "type": "object", |
12695 | 12922 | "properties": { |
|
13431 | 13658 | "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"], |
13432 | 13659 | "additionalProperties": false |
13433 | 13660 | }, |
| 13661 | + "WorkspaceWarpError": { |
| 13662 | + "type": "object", |
| 13663 | + "properties": { |
| 13664 | + "name": { |
| 13665 | + "type": "string", |
| 13666 | + "enum": ["WorkspaceWarpError"] |
| 13667 | + }, |
| 13668 | + "data": { |
| 13669 | + "type": "object", |
| 13670 | + "properties": { |
| 13671 | + "message": { |
| 13672 | + "type": "string" |
| 13673 | + } |
| 13674 | + }, |
| 13675 | + "required": ["message"], |
| 13676 | + "additionalProperties": false |
| 13677 | + } |
| 13678 | + }, |
| 13679 | + "required": ["name", "data"], |
| 13680 | + "additionalProperties": false |
| 13681 | + }, |
13434 | 13682 | "SyncEventMessageUpdated": { |
13435 | 13683 | "type": "object", |
13436 | 13684 | "properties": { |
|
0 commit comments