opencode-python-sdk 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opencode/__init__.py +4 -0
- opencode/_exceptions.py +22 -0
- opencode/_pty.py +586 -0
- opencode/_server.py +8 -0
- opencode/resources/agent.py +14 -14
- opencode/resources/command.py +6 -6
- opencode/resources/config.py +18 -18
- opencode/resources/credential.py +22 -22
- opencode/resources/debug.py +10 -8
- opencode/resources/event.py +4 -4
- opencode/resources/experimental.py +77 -74
- opencode/resources/file.py +28 -28
- opencode/resources/form.py +6 -6
- opencode/resources/generate.py +8 -8
- opencode/resources/integration.py +102 -94
- opencode/resources/location.py +12 -12
- opencode/resources/mcp.py +44 -42
- opencode/resources/message.py +10 -10
- opencode/resources/migration.py +6 -4
- opencode/resources/model.py +16 -16
- opencode/resources/permission.py +68 -64
- opencode/resources/plugin.py +20 -20
- opencode/resources/project.py +14 -14
- opencode/resources/provider.py +18 -18
- opencode/resources/pty.py +51 -48
- opencode/resources/reference.py +6 -6
- opencode/resources/rpc.py +10 -10
- opencode/resources/server.py +12 -12
- opencode/resources/session.py +378 -366
- opencode/resources/shell.py +34 -34
- opencode/resources/skill.py +6 -6
- opencode/resources/vcs.py +48 -46
- opencode/resources/voice.py +8 -8
- opencode/resources/websearch.py +16 -16
- opencode/resources/worktree.py +30 -30
- {opencode_python_sdk-0.1.0.dist-info → opencode_python_sdk-0.1.2.dist-info}/METADATA +28 -2
- opencode_python_sdk-0.1.2.dist-info/RECORD +56 -0
- opencode_python_sdk-0.1.0.dist-info/RECORD +0 -55
- {opencode_python_sdk-0.1.0.dist-info → opencode_python_sdk-0.1.2.dist-info}/WHEEL +0 -0
- {opencode_python_sdk-0.1.0.dist-info → opencode_python_sdk-0.1.2.dist-info}/licenses/LICENSE +0 -0
opencode/resources/migration.py
CHANGED
|
@@ -38,8 +38,8 @@ class MigrationV1Resource(SyncAPIResource):
|
|
|
38
38
|
This endpoint is experimental in OpenCode and may change without notice.
|
|
39
39
|
|
|
40
40
|
Raises:
|
|
41
|
-
InvalidRequestError
|
|
42
|
-
UnauthorizedError
|
|
41
|
+
InvalidRequestError: The server answered 400.
|
|
42
|
+
UnauthorizedError: The server answered 401.
|
|
43
43
|
|
|
44
44
|
``GET /api/experimental/migration/v1``
|
|
45
45
|
"""
|
|
@@ -66,6 +66,7 @@ class MigrationResource(SyncAPIResource):
|
|
|
66
66
|
|
|
67
67
|
@cached_property
|
|
68
68
|
def v1(self) -> MigrationV1Resource:
|
|
69
|
+
"""Operations under ``client.migration.v1``."""
|
|
69
70
|
return MigrationV1Resource(self._client)
|
|
70
71
|
|
|
71
72
|
|
|
@@ -87,8 +88,8 @@ class AsyncMigrationV1Resource(AsyncAPIResource):
|
|
|
87
88
|
This endpoint is experimental in OpenCode and may change without notice.
|
|
88
89
|
|
|
89
90
|
Raises:
|
|
90
|
-
InvalidRequestError
|
|
91
|
-
UnauthorizedError
|
|
91
|
+
InvalidRequestError: The server answered 400.
|
|
92
|
+
UnauthorizedError: The server answered 401.
|
|
92
93
|
|
|
93
94
|
``GET /api/experimental/migration/v1``
|
|
94
95
|
"""
|
|
@@ -115,4 +116,5 @@ class AsyncMigrationResource(AsyncAPIResource):
|
|
|
115
116
|
|
|
116
117
|
@cached_property
|
|
117
118
|
def v1(self) -> AsyncMigrationV1Resource:
|
|
119
|
+
"""Operations under ``client.migration.v1``."""
|
|
118
120
|
return AsyncMigrationV1Resource(self._client)
|
opencode/resources/model.py
CHANGED
|
@@ -36,10 +36,10 @@ class ModelResource(SyncAPIResource):
|
|
|
36
36
|
Retrieve the current snapshot of available models ordered by release date. The snapshot may precede initial plugin settlement.
|
|
37
37
|
|
|
38
38
|
Raises:
|
|
39
|
-
InvalidRequestError
|
|
40
|
-
UnauthorizedError
|
|
41
|
-
LocationNotFoundError
|
|
42
|
-
ServiceUnavailableError
|
|
39
|
+
InvalidRequestError: The server answered 400.
|
|
40
|
+
UnauthorizedError: The server answered 401.
|
|
41
|
+
LocationNotFoundError: The server answered 404.
|
|
42
|
+
ServiceUnavailableError: The server answered 503.
|
|
43
43
|
|
|
44
44
|
``GET /api/model``
|
|
45
45
|
"""
|
|
@@ -73,10 +73,10 @@ class ModelResource(SyncAPIResource):
|
|
|
73
73
|
Retrieve the model used when a session has no explicit model selection.
|
|
74
74
|
|
|
75
75
|
Raises:
|
|
76
|
-
InvalidRequestError
|
|
77
|
-
UnauthorizedError
|
|
78
|
-
LocationNotFoundError
|
|
79
|
-
ServiceUnavailableError
|
|
76
|
+
InvalidRequestError: The server answered 400.
|
|
77
|
+
UnauthorizedError: The server answered 401.
|
|
78
|
+
LocationNotFoundError: The server answered 404.
|
|
79
|
+
ServiceUnavailableError: The server answered 503.
|
|
80
80
|
|
|
81
81
|
``GET /api/model/default``
|
|
82
82
|
"""
|
|
@@ -114,10 +114,10 @@ class AsyncModelResource(AsyncAPIResource):
|
|
|
114
114
|
Retrieve the current snapshot of available models ordered by release date. The snapshot may precede initial plugin settlement.
|
|
115
115
|
|
|
116
116
|
Raises:
|
|
117
|
-
InvalidRequestError
|
|
118
|
-
UnauthorizedError
|
|
119
|
-
LocationNotFoundError
|
|
120
|
-
ServiceUnavailableError
|
|
117
|
+
InvalidRequestError: The server answered 400.
|
|
118
|
+
UnauthorizedError: The server answered 401.
|
|
119
|
+
LocationNotFoundError: The server answered 404.
|
|
120
|
+
ServiceUnavailableError: The server answered 503.
|
|
121
121
|
|
|
122
122
|
``GET /api/model``
|
|
123
123
|
"""
|
|
@@ -151,10 +151,10 @@ class AsyncModelResource(AsyncAPIResource):
|
|
|
151
151
|
Retrieve the model used when a session has no explicit model selection.
|
|
152
152
|
|
|
153
153
|
Raises:
|
|
154
|
-
InvalidRequestError
|
|
155
|
-
UnauthorizedError
|
|
156
|
-
LocationNotFoundError
|
|
157
|
-
ServiceUnavailableError
|
|
154
|
+
InvalidRequestError: The server answered 400.
|
|
155
|
+
UnauthorizedError: The server answered 401.
|
|
156
|
+
LocationNotFoundError: The server answered 404.
|
|
157
|
+
ServiceUnavailableError: The server answered 503.
|
|
158
158
|
|
|
159
159
|
``GET /api/model/default``
|
|
160
160
|
"""
|
opencode/resources/permission.py
CHANGED
|
@@ -49,9 +49,9 @@ class PermissionRequestResource(SyncAPIResource):
|
|
|
49
49
|
Retrieve pending permission requests for a location.
|
|
50
50
|
|
|
51
51
|
Raises:
|
|
52
|
-
InvalidRequestError
|
|
53
|
-
UnauthorizedError
|
|
54
|
-
LocationNotFoundError
|
|
52
|
+
InvalidRequestError: The server answered 400.
|
|
53
|
+
UnauthorizedError: The server answered 401.
|
|
54
|
+
LocationNotFoundError: The server answered 404.
|
|
55
55
|
|
|
56
56
|
``GET /api/permission/request``
|
|
57
57
|
"""
|
|
@@ -89,9 +89,9 @@ class PermissionSavedResource(SyncAPIResource):
|
|
|
89
89
|
Retrieve saved permissions, optionally filtered by project.
|
|
90
90
|
|
|
91
91
|
Raises:
|
|
92
|
-
InvalidRequestError
|
|
93
|
-
UnauthorizedError
|
|
94
|
-
LocationNotFoundError
|
|
92
|
+
InvalidRequestError: The server answered 400.
|
|
93
|
+
UnauthorizedError: The server answered 401.
|
|
94
|
+
LocationNotFoundError: The server answered 404.
|
|
95
95
|
|
|
96
96
|
``GET /api/permission/saved``
|
|
97
97
|
"""
|
|
@@ -128,11 +128,11 @@ class PermissionSavedResource(SyncAPIResource):
|
|
|
128
128
|
Change the action or resource of a saved permission. Fails with a conflict when the project already has a saved permission with the same action and resource.
|
|
129
129
|
|
|
130
130
|
Raises:
|
|
131
|
-
InvalidRequestError
|
|
132
|
-
UnauthorizedError
|
|
133
|
-
PermissionSavedNotFoundError
|
|
134
|
-
LocationNotFoundError
|
|
135
|
-
ConflictError
|
|
131
|
+
InvalidRequestError: The server answered 400.
|
|
132
|
+
UnauthorizedError: The server answered 401.
|
|
133
|
+
PermissionSavedNotFoundError: The server answered 404.
|
|
134
|
+
LocationNotFoundError: The server answered 404.
|
|
135
|
+
ConflictError: The server answered 409.
|
|
136
136
|
|
|
137
137
|
``PATCH /api/permission/saved/:id``
|
|
138
138
|
"""
|
|
@@ -167,9 +167,9 @@ class PermissionSavedResource(SyncAPIResource):
|
|
|
167
167
|
Remove a saved permission by ID.
|
|
168
168
|
|
|
169
169
|
Raises:
|
|
170
|
-
InvalidRequestError
|
|
171
|
-
UnauthorizedError
|
|
172
|
-
LocationNotFoundError
|
|
170
|
+
InvalidRequestError: The server answered 400.
|
|
171
|
+
UnauthorizedError: The server answered 401.
|
|
172
|
+
LocationNotFoundError: The server answered 404.
|
|
173
173
|
|
|
174
174
|
``DELETE /api/permission/saved/:id``
|
|
175
175
|
"""
|
|
@@ -191,10 +191,12 @@ class PermissionResource(SyncAPIResource):
|
|
|
191
191
|
|
|
192
192
|
@cached_property
|
|
193
193
|
def request_(self) -> PermissionRequestResource:
|
|
194
|
+
"""Operations under ``client.permission.request``."""
|
|
194
195
|
return PermissionRequestResource(self._client)
|
|
195
196
|
|
|
196
197
|
@cached_property
|
|
197
198
|
def saved(self) -> PermissionSavedResource:
|
|
199
|
+
"""Operations under ``client.permission.saved``."""
|
|
198
200
|
return PermissionSavedResource(self._client)
|
|
199
201
|
|
|
200
202
|
def create(
|
|
@@ -218,10 +220,10 @@ class PermissionResource(SyncAPIResource):
|
|
|
218
220
|
Evaluate and, when approval is required, create a permission request for a session.
|
|
219
221
|
|
|
220
222
|
Raises:
|
|
221
|
-
InvalidRequestError
|
|
222
|
-
UnauthorizedError
|
|
223
|
-
SessionNotFoundError
|
|
224
|
-
LocationNotFoundError
|
|
223
|
+
InvalidRequestError: The server answered 400.
|
|
224
|
+
UnauthorizedError: The server answered 401.
|
|
225
|
+
SessionNotFoundError: The server answered 404.
|
|
226
|
+
LocationNotFoundError: The server answered 404.
|
|
225
227
|
|
|
226
228
|
``POST /api/session/:sessionID/permission``
|
|
227
229
|
"""
|
|
@@ -264,10 +266,10 @@ class PermissionResource(SyncAPIResource):
|
|
|
264
266
|
Retrieve pending permission requests owned by a session.
|
|
265
267
|
|
|
266
268
|
Raises:
|
|
267
|
-
InvalidRequestError
|
|
268
|
-
UnauthorizedError
|
|
269
|
-
SessionNotFoundError
|
|
270
|
-
LocationNotFoundError
|
|
269
|
+
InvalidRequestError: The server answered 400.
|
|
270
|
+
UnauthorizedError: The server answered 401.
|
|
271
|
+
SessionNotFoundError: The server answered 404.
|
|
272
|
+
LocationNotFoundError: The server answered 404.
|
|
271
273
|
|
|
272
274
|
``GET /api/session/:sessionID/permission``
|
|
273
275
|
"""
|
|
@@ -302,11 +304,11 @@ class PermissionResource(SyncAPIResource):
|
|
|
302
304
|
Retrieve a pending permission request owned by a session.
|
|
303
305
|
|
|
304
306
|
Raises:
|
|
305
|
-
InvalidRequestError
|
|
306
|
-
UnauthorizedError
|
|
307
|
-
SessionNotFoundError
|
|
308
|
-
PermissionNotFoundError
|
|
309
|
-
LocationNotFoundError
|
|
307
|
+
InvalidRequestError: The server answered 400.
|
|
308
|
+
UnauthorizedError: The server answered 401.
|
|
309
|
+
SessionNotFoundError: The server answered 404.
|
|
310
|
+
PermissionNotFoundError: The server answered 404.
|
|
311
|
+
LocationNotFoundError: The server answered 404.
|
|
310
312
|
|
|
311
313
|
``GET /api/session/:sessionID/permission/:requestID``
|
|
312
314
|
"""
|
|
@@ -343,11 +345,11 @@ class PermissionResource(SyncAPIResource):
|
|
|
343
345
|
Respond to a pending permission request owned by a session.
|
|
344
346
|
|
|
345
347
|
Raises:
|
|
346
|
-
InvalidRequestError
|
|
347
|
-
UnauthorizedError
|
|
348
|
-
SessionNotFoundError
|
|
349
|
-
PermissionNotFoundError
|
|
350
|
-
LocationNotFoundError
|
|
348
|
+
InvalidRequestError: The server answered 400.
|
|
349
|
+
UnauthorizedError: The server answered 401.
|
|
350
|
+
SessionNotFoundError: The server answered 404.
|
|
351
|
+
PermissionNotFoundError: The server answered 404.
|
|
352
|
+
LocationNotFoundError: The server answered 404.
|
|
351
353
|
|
|
352
354
|
``POST /api/session/:sessionID/permission/:requestID/reply``
|
|
353
355
|
"""
|
|
@@ -382,9 +384,9 @@ class AsyncPermissionRequestResource(AsyncAPIResource):
|
|
|
382
384
|
Retrieve pending permission requests for a location.
|
|
383
385
|
|
|
384
386
|
Raises:
|
|
385
|
-
InvalidRequestError
|
|
386
|
-
UnauthorizedError
|
|
387
|
-
LocationNotFoundError
|
|
387
|
+
InvalidRequestError: The server answered 400.
|
|
388
|
+
UnauthorizedError: The server answered 401.
|
|
389
|
+
LocationNotFoundError: The server answered 404.
|
|
388
390
|
|
|
389
391
|
``GET /api/permission/request``
|
|
390
392
|
"""
|
|
@@ -422,9 +424,9 @@ class AsyncPermissionSavedResource(AsyncAPIResource):
|
|
|
422
424
|
Retrieve saved permissions, optionally filtered by project.
|
|
423
425
|
|
|
424
426
|
Raises:
|
|
425
|
-
InvalidRequestError
|
|
426
|
-
UnauthorizedError
|
|
427
|
-
LocationNotFoundError
|
|
427
|
+
InvalidRequestError: The server answered 400.
|
|
428
|
+
UnauthorizedError: The server answered 401.
|
|
429
|
+
LocationNotFoundError: The server answered 404.
|
|
428
430
|
|
|
429
431
|
``GET /api/permission/saved``
|
|
430
432
|
"""
|
|
@@ -461,11 +463,11 @@ class AsyncPermissionSavedResource(AsyncAPIResource):
|
|
|
461
463
|
Change the action or resource of a saved permission. Fails with a conflict when the project already has a saved permission with the same action and resource.
|
|
462
464
|
|
|
463
465
|
Raises:
|
|
464
|
-
InvalidRequestError
|
|
465
|
-
UnauthorizedError
|
|
466
|
-
PermissionSavedNotFoundError
|
|
467
|
-
LocationNotFoundError
|
|
468
|
-
ConflictError
|
|
466
|
+
InvalidRequestError: The server answered 400.
|
|
467
|
+
UnauthorizedError: The server answered 401.
|
|
468
|
+
PermissionSavedNotFoundError: The server answered 404.
|
|
469
|
+
LocationNotFoundError: The server answered 404.
|
|
470
|
+
ConflictError: The server answered 409.
|
|
469
471
|
|
|
470
472
|
``PATCH /api/permission/saved/:id``
|
|
471
473
|
"""
|
|
@@ -500,9 +502,9 @@ class AsyncPermissionSavedResource(AsyncAPIResource):
|
|
|
500
502
|
Remove a saved permission by ID.
|
|
501
503
|
|
|
502
504
|
Raises:
|
|
503
|
-
InvalidRequestError
|
|
504
|
-
UnauthorizedError
|
|
505
|
-
LocationNotFoundError
|
|
505
|
+
InvalidRequestError: The server answered 400.
|
|
506
|
+
UnauthorizedError: The server answered 401.
|
|
507
|
+
LocationNotFoundError: The server answered 404.
|
|
506
508
|
|
|
507
509
|
``DELETE /api/permission/saved/:id``
|
|
508
510
|
"""
|
|
@@ -524,10 +526,12 @@ class AsyncPermissionResource(AsyncAPIResource):
|
|
|
524
526
|
|
|
525
527
|
@cached_property
|
|
526
528
|
def request_(self) -> AsyncPermissionRequestResource:
|
|
529
|
+
"""Operations under ``client.permission.request``."""
|
|
527
530
|
return AsyncPermissionRequestResource(self._client)
|
|
528
531
|
|
|
529
532
|
@cached_property
|
|
530
533
|
def saved(self) -> AsyncPermissionSavedResource:
|
|
534
|
+
"""Operations under ``client.permission.saved``."""
|
|
531
535
|
return AsyncPermissionSavedResource(self._client)
|
|
532
536
|
|
|
533
537
|
async def create(
|
|
@@ -551,10 +555,10 @@ class AsyncPermissionResource(AsyncAPIResource):
|
|
|
551
555
|
Evaluate and, when approval is required, create a permission request for a session.
|
|
552
556
|
|
|
553
557
|
Raises:
|
|
554
|
-
InvalidRequestError
|
|
555
|
-
UnauthorizedError
|
|
556
|
-
SessionNotFoundError
|
|
557
|
-
LocationNotFoundError
|
|
558
|
+
InvalidRequestError: The server answered 400.
|
|
559
|
+
UnauthorizedError: The server answered 401.
|
|
560
|
+
SessionNotFoundError: The server answered 404.
|
|
561
|
+
LocationNotFoundError: The server answered 404.
|
|
558
562
|
|
|
559
563
|
``POST /api/session/:sessionID/permission``
|
|
560
564
|
"""
|
|
@@ -597,10 +601,10 @@ class AsyncPermissionResource(AsyncAPIResource):
|
|
|
597
601
|
Retrieve pending permission requests owned by a session.
|
|
598
602
|
|
|
599
603
|
Raises:
|
|
600
|
-
InvalidRequestError
|
|
601
|
-
UnauthorizedError
|
|
602
|
-
SessionNotFoundError
|
|
603
|
-
LocationNotFoundError
|
|
604
|
+
InvalidRequestError: The server answered 400.
|
|
605
|
+
UnauthorizedError: The server answered 401.
|
|
606
|
+
SessionNotFoundError: The server answered 404.
|
|
607
|
+
LocationNotFoundError: The server answered 404.
|
|
604
608
|
|
|
605
609
|
``GET /api/session/:sessionID/permission``
|
|
606
610
|
"""
|
|
@@ -635,11 +639,11 @@ class AsyncPermissionResource(AsyncAPIResource):
|
|
|
635
639
|
Retrieve a pending permission request owned by a session.
|
|
636
640
|
|
|
637
641
|
Raises:
|
|
638
|
-
InvalidRequestError
|
|
639
|
-
UnauthorizedError
|
|
640
|
-
SessionNotFoundError
|
|
641
|
-
PermissionNotFoundError
|
|
642
|
-
LocationNotFoundError
|
|
642
|
+
InvalidRequestError: The server answered 400.
|
|
643
|
+
UnauthorizedError: The server answered 401.
|
|
644
|
+
SessionNotFoundError: The server answered 404.
|
|
645
|
+
PermissionNotFoundError: The server answered 404.
|
|
646
|
+
LocationNotFoundError: The server answered 404.
|
|
643
647
|
|
|
644
648
|
``GET /api/session/:sessionID/permission/:requestID``
|
|
645
649
|
"""
|
|
@@ -676,11 +680,11 @@ class AsyncPermissionResource(AsyncAPIResource):
|
|
|
676
680
|
Respond to a pending permission request owned by a session.
|
|
677
681
|
|
|
678
682
|
Raises:
|
|
679
|
-
InvalidRequestError
|
|
680
|
-
UnauthorizedError
|
|
681
|
-
SessionNotFoundError
|
|
682
|
-
PermissionNotFoundError
|
|
683
|
-
LocationNotFoundError
|
|
683
|
+
InvalidRequestError: The server answered 400.
|
|
684
|
+
UnauthorizedError: The server answered 401.
|
|
685
|
+
SessionNotFoundError: The server answered 404.
|
|
686
|
+
PermissionNotFoundError: The server answered 404.
|
|
687
|
+
LocationNotFoundError: The server answered 404.
|
|
684
688
|
|
|
685
689
|
``POST /api/session/:sessionID/permission/:requestID/reply``
|
|
686
690
|
"""
|
opencode/resources/plugin.py
CHANGED
|
@@ -37,9 +37,9 @@ class PluginResource(SyncAPIResource):
|
|
|
37
37
|
Retrieve enabled server plugins and their current status.
|
|
38
38
|
|
|
39
39
|
Raises:
|
|
40
|
-
InvalidRequestError
|
|
41
|
-
UnauthorizedError
|
|
42
|
-
LocationNotFoundError
|
|
40
|
+
InvalidRequestError: The server answered 400.
|
|
41
|
+
UnauthorizedError: The server answered 401.
|
|
42
|
+
LocationNotFoundError: The server answered 404.
|
|
43
43
|
|
|
44
44
|
``GET /api/plugin``
|
|
45
45
|
"""
|
|
@@ -74,9 +74,9 @@ class PluginResource(SyncAPIResource):
|
|
|
74
74
|
Check one or all package plugins for available updates.
|
|
75
75
|
|
|
76
76
|
Raises:
|
|
77
|
-
InvalidRequestError
|
|
78
|
-
UnauthorizedError
|
|
79
|
-
LocationNotFoundError
|
|
77
|
+
InvalidRequestError: The server answered 400.
|
|
78
|
+
UnauthorizedError: The server answered 401.
|
|
79
|
+
LocationNotFoundError: The server answered 404.
|
|
80
80
|
|
|
81
81
|
``POST /api/plugin/check``
|
|
82
82
|
"""
|
|
@@ -112,10 +112,10 @@ class PluginResource(SyncAPIResource):
|
|
|
112
112
|
Update package plugins concurrently and notify active locations to reload them. Responds once every update has finished; fails when any update fails.
|
|
113
113
|
|
|
114
114
|
Raises:
|
|
115
|
-
InvalidRequestError
|
|
116
|
-
UnauthorizedError
|
|
117
|
-
LocationNotFoundError
|
|
118
|
-
ServiceUnavailableError
|
|
115
|
+
InvalidRequestError: The server answered 400.
|
|
116
|
+
UnauthorizedError: The server answered 401.
|
|
117
|
+
LocationNotFoundError: The server answered 404.
|
|
118
|
+
ServiceUnavailableError: The server answered 503.
|
|
119
119
|
|
|
120
120
|
``POST /api/plugin/update``
|
|
121
121
|
"""
|
|
@@ -151,9 +151,9 @@ class AsyncPluginResource(AsyncAPIResource):
|
|
|
151
151
|
Retrieve enabled server plugins and their current status.
|
|
152
152
|
|
|
153
153
|
Raises:
|
|
154
|
-
InvalidRequestError
|
|
155
|
-
UnauthorizedError
|
|
156
|
-
LocationNotFoundError
|
|
154
|
+
InvalidRequestError: The server answered 400.
|
|
155
|
+
UnauthorizedError: The server answered 401.
|
|
156
|
+
LocationNotFoundError: The server answered 404.
|
|
157
157
|
|
|
158
158
|
``GET /api/plugin``
|
|
159
159
|
"""
|
|
@@ -188,9 +188,9 @@ class AsyncPluginResource(AsyncAPIResource):
|
|
|
188
188
|
Check one or all package plugins for available updates.
|
|
189
189
|
|
|
190
190
|
Raises:
|
|
191
|
-
InvalidRequestError
|
|
192
|
-
UnauthorizedError
|
|
193
|
-
LocationNotFoundError
|
|
191
|
+
InvalidRequestError: The server answered 400.
|
|
192
|
+
UnauthorizedError: The server answered 401.
|
|
193
|
+
LocationNotFoundError: The server answered 404.
|
|
194
194
|
|
|
195
195
|
``POST /api/plugin/check``
|
|
196
196
|
"""
|
|
@@ -226,10 +226,10 @@ class AsyncPluginResource(AsyncAPIResource):
|
|
|
226
226
|
Update package plugins concurrently and notify active locations to reload them. Responds once every update has finished; fails when any update fails.
|
|
227
227
|
|
|
228
228
|
Raises:
|
|
229
|
-
InvalidRequestError
|
|
230
|
-
UnauthorizedError
|
|
231
|
-
LocationNotFoundError
|
|
232
|
-
ServiceUnavailableError
|
|
229
|
+
InvalidRequestError: The server answered 400.
|
|
230
|
+
UnauthorizedError: The server answered 401.
|
|
231
|
+
LocationNotFoundError: The server answered 404.
|
|
232
|
+
ServiceUnavailableError: The server answered 503.
|
|
233
233
|
|
|
234
234
|
``POST /api/plugin/update``
|
|
235
235
|
"""
|
opencode/resources/project.py
CHANGED
|
@@ -40,9 +40,9 @@ class ProjectResource(SyncAPIResource):
|
|
|
40
40
|
List known projects. Archived projects are excluded unless archived=true.
|
|
41
41
|
|
|
42
42
|
Raises:
|
|
43
|
-
InvalidRequestError
|
|
44
|
-
UnauthorizedError
|
|
45
|
-
LocationNotFoundError
|
|
43
|
+
InvalidRequestError: The server answered 400.
|
|
44
|
+
UnauthorizedError: The server answered 401.
|
|
45
|
+
LocationNotFoundError: The server answered 404.
|
|
46
46
|
|
|
47
47
|
``GET /api/project``
|
|
48
48
|
"""
|
|
@@ -80,10 +80,10 @@ class ProjectResource(SyncAPIResource):
|
|
|
80
80
|
Update the project canonical directory, display metadata, and workspace commands.
|
|
81
81
|
|
|
82
82
|
Raises:
|
|
83
|
-
InvalidRequestError
|
|
84
|
-
UnauthorizedError
|
|
85
|
-
ProjectNotFoundError
|
|
86
|
-
LocationNotFoundError
|
|
83
|
+
InvalidRequestError: The server answered 400.
|
|
84
|
+
UnauthorizedError: The server answered 401.
|
|
85
|
+
ProjectNotFoundError: The server answered 404.
|
|
86
|
+
LocationNotFoundError: The server answered 404.
|
|
87
87
|
|
|
88
88
|
``PATCH /api/project/:projectID``
|
|
89
89
|
"""
|
|
@@ -121,9 +121,9 @@ class AsyncProjectResource(AsyncAPIResource):
|
|
|
121
121
|
List known projects. Archived projects are excluded unless archived=true.
|
|
122
122
|
|
|
123
123
|
Raises:
|
|
124
|
-
InvalidRequestError
|
|
125
|
-
UnauthorizedError
|
|
126
|
-
LocationNotFoundError
|
|
124
|
+
InvalidRequestError: The server answered 400.
|
|
125
|
+
UnauthorizedError: The server answered 401.
|
|
126
|
+
LocationNotFoundError: The server answered 404.
|
|
127
127
|
|
|
128
128
|
``GET /api/project``
|
|
129
129
|
"""
|
|
@@ -161,10 +161,10 @@ class AsyncProjectResource(AsyncAPIResource):
|
|
|
161
161
|
Update the project canonical directory, display metadata, and workspace commands.
|
|
162
162
|
|
|
163
163
|
Raises:
|
|
164
|
-
InvalidRequestError
|
|
165
|
-
UnauthorizedError
|
|
166
|
-
ProjectNotFoundError
|
|
167
|
-
LocationNotFoundError
|
|
164
|
+
InvalidRequestError: The server answered 400.
|
|
165
|
+
UnauthorizedError: The server answered 401.
|
|
166
|
+
ProjectNotFoundError: The server answered 404.
|
|
167
|
+
LocationNotFoundError: The server answered 404.
|
|
168
168
|
|
|
169
169
|
``PATCH /api/project/:projectID``
|
|
170
170
|
"""
|
opencode/resources/provider.py
CHANGED
|
@@ -38,10 +38,10 @@ class ProviderResource(SyncAPIResource):
|
|
|
38
38
|
Retrieve active AI providers so clients can show provider availability and configuration.
|
|
39
39
|
|
|
40
40
|
Raises:
|
|
41
|
-
InvalidRequestError
|
|
42
|
-
UnauthorizedError
|
|
43
|
-
LocationNotFoundError
|
|
44
|
-
ServiceUnavailableError
|
|
41
|
+
InvalidRequestError: The server answered 400.
|
|
42
|
+
UnauthorizedError: The server answered 401.
|
|
43
|
+
LocationNotFoundError: The server answered 404.
|
|
44
|
+
ServiceUnavailableError: The server answered 503.
|
|
45
45
|
|
|
46
46
|
``GET /api/provider``
|
|
47
47
|
"""
|
|
@@ -76,11 +76,11 @@ class ProviderResource(SyncAPIResource):
|
|
|
76
76
|
Retrieve a single AI provider so clients can inspect its availability and endpoint settings.
|
|
77
77
|
|
|
78
78
|
Raises:
|
|
79
|
-
InvalidRequestError
|
|
80
|
-
UnauthorizedError
|
|
81
|
-
ProviderNotFoundError
|
|
82
|
-
LocationNotFoundError
|
|
83
|
-
ServiceUnavailableError
|
|
79
|
+
InvalidRequestError: The server answered 400.
|
|
80
|
+
UnauthorizedError: The server answered 401.
|
|
81
|
+
ProviderNotFoundError: The server answered 404.
|
|
82
|
+
LocationNotFoundError: The server answered 404.
|
|
83
|
+
ServiceUnavailableError: The server answered 503.
|
|
84
84
|
|
|
85
85
|
``GET /api/provider/:providerID``
|
|
86
86
|
"""
|
|
@@ -118,10 +118,10 @@ class AsyncProviderResource(AsyncAPIResource):
|
|
|
118
118
|
Retrieve active AI providers so clients can show provider availability and configuration.
|
|
119
119
|
|
|
120
120
|
Raises:
|
|
121
|
-
InvalidRequestError
|
|
122
|
-
UnauthorizedError
|
|
123
|
-
LocationNotFoundError
|
|
124
|
-
ServiceUnavailableError
|
|
121
|
+
InvalidRequestError: The server answered 400.
|
|
122
|
+
UnauthorizedError: The server answered 401.
|
|
123
|
+
LocationNotFoundError: The server answered 404.
|
|
124
|
+
ServiceUnavailableError: The server answered 503.
|
|
125
125
|
|
|
126
126
|
``GET /api/provider``
|
|
127
127
|
"""
|
|
@@ -156,11 +156,11 @@ class AsyncProviderResource(AsyncAPIResource):
|
|
|
156
156
|
Retrieve a single AI provider so clients can inspect its availability and endpoint settings.
|
|
157
157
|
|
|
158
158
|
Raises:
|
|
159
|
-
InvalidRequestError
|
|
160
|
-
UnauthorizedError
|
|
161
|
-
ProviderNotFoundError
|
|
162
|
-
LocationNotFoundError
|
|
163
|
-
ServiceUnavailableError
|
|
159
|
+
InvalidRequestError: The server answered 400.
|
|
160
|
+
UnauthorizedError: The server answered 401.
|
|
161
|
+
ProviderNotFoundError: The server answered 404.
|
|
162
|
+
LocationNotFoundError: The server answered 404.
|
|
163
|
+
ServiceUnavailableError: The server answered 503.
|
|
164
164
|
|
|
165
165
|
``GET /api/provider/:providerID``
|
|
166
166
|
"""
|