GeezerVison is showing github.com — chore: generate · cavanaug/opencode@9f708e7
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/opencode/src/pty/ticket.ts +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -28,7 +28,9 @@ export interface Interface { | 28 | 28 | export class Service extends Context.Service<Service, Interface>()("@opencode/PtyTicket") {} | 29 | 29 |
| 30 | 30 | function matches(record: Scope, input: Scope) { | 31 | | - return record.ptyID === input.ptyID && record.directory === input.directory && record.workspaceID === input.workspaceID | | 31 | + return ( | | 32 | + record.ptyID === input.ptyID && record.directory === input.directory && record.workspaceID === input.workspaceID | | 33 | + ) | 32 | 34 | } | 33 | 35 |
| 34 | 36 | // Tickets are inserted via Cache.set and removed atomically via invalidateWhen. The lookup is | |
Collapse file Copy file name to clipboardExpand all lines: packages/opencode/test/pty/ticket.test.ts +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,9 +26,7 @@ describe("PTY websocket tickets", () => { | 26 | 26 | const ptyID = PtyID.ascending() | 27 | 27 | const issued = yield* tickets.issue({ ptyID, directory: "/tmp/a" }) | 28 | 28 |
| 29 | | - expect( | 30 | | - yield* tickets.consume({ ptyID, directory: "/tmp/b", ticket: issued.ticket }), | 31 | | - ).toBe(false) | | 29 | + expect(yield* tickets.consume({ ptyID, directory: "/tmp/b", ticket: issued.ticket })).toBe(false) | 32 | 30 | expect(yield* tickets.consume({ ptyID, directory: "/tmp/a", ticket: issued.ticket })).toBe(true) | 33 | 31 | }), | 34 | 32 | ) | |
Collapse file Copy file name to clipboardExpand all lines: packages/sdk/openapi.json +106Lines changed: 106 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 3414 | 3414 | ] | 3415 | 3415 | } | 3416 | 3416 | }, | | 3417 | + "/pty/{ptyID}/connect-token": { | | 3418 | + "post": { | | 3419 | + "tags": ["pty"], | | 3420 | + "operationId": "pty.connectToken", | | 3421 | + "parameters": [ | | 3422 | + { | | 3423 | + "name": "directory", | | 3424 | + "in": "query", | | 3425 | + "required": false, | | 3426 | + "schema": { | | 3427 | + "type": "string" | | 3428 | + } | | 3429 | + }, | | 3430 | + { | | 3431 | + "name": "workspace", | | 3432 | + "in": "query", | | 3433 | + "required": false, | | 3434 | + "schema": { | | 3435 | + "type": "string" | | 3436 | + } | | 3437 | + }, | | 3438 | + { | | 3439 | + "name": "ptyID", | | 3440 | + "in": "path", | | 3441 | + "schema": { | | 3442 | + "type": "string", | | 3443 | + "pattern": "^pty.*" | | 3444 | + }, | | 3445 | + "required": true | | 3446 | + } | | 3447 | + ], | | 3448 | + "responses": { | | 3449 | + "200": { | | 3450 | + "description": "WebSocket connect token", | | 3451 | + "content": { | | 3452 | + "application/json": { | | 3453 | + "schema": { | | 3454 | + "type": "object", | | 3455 | + "properties": { | | 3456 | + "ticket": { | | 3457 | + "type": "string" | | 3458 | + }, | | 3459 | + "expires_in": { | | 3460 | + "type": "integer", | | 3461 | + "exclusiveMinimum": 0 | | 3462 | + } | | 3463 | + }, | | 3464 | + "required": ["ticket", "expires_in"], | | 3465 | + "additionalProperties": false, | | 3466 | + "description": "WebSocket connect token" | | 3467 | + } | | 3468 | + } | | 3469 | + } | | 3470 | + }, | | 3471 | + "403": { | | 3472 | + "description": "Forbidden", | | 3473 | + "content": { | | 3474 | + "application/json": { | | 3475 | + "schema": { | | 3476 | + "$ref": "#/components/schemas/effect_HttpApiError_Forbidden" | | 3477 | + } | | 3478 | + } | | 3479 | + } | | 3480 | + }, | | 3481 | + "404": { | | 3482 | + "description": "Not found", | | 3483 | + "content": { | | 3484 | + "application/json": { | | 3485 | + "schema": { | | 3486 | + "$ref": "#/components/schemas/NotFoundError" | | 3487 | + } | | 3488 | + } | | 3489 | + } | | 3490 | + } | | 3491 | + }, | | 3492 | + "description": "Create a short-lived ticket for opening a PTY WebSocket connection.", | | 3493 | + "summary": "Create PTY WebSocket token", | | 3494 | + "x-codeSamples": [ | | 3495 | + { | | 3496 | + "lang": "js", | | 3497 | + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})" | | 3498 | + } | | 3499 | + ] | | 3500 | + } | | 3501 | + }, | 3417 | 3502 | "/question": { | 3418 | 3503 | "get": { | 3419 | 3504 | "tags": ["question"], | | 8327 | 8412 | } | 8328 | 8413 | } | 8329 | 8414 | }, | | 8415 | + "403": { | | 8416 | + "description": "Forbidden", | | 8417 | + "content": { | | 8418 | + "application/json": { | | 8419 | + "schema": { | | 8420 | + "$ref": "#/components/schemas/effect_HttpApiError_Forbidden" | | 8421 | + } | | 8422 | + } | | 8423 | + } | | 8424 | + }, | 8330 | 8425 | "404": { | 8331 | 8426 | "description": "Not found", | 8332 | 8427 | "content": { | | 12752 | 12847 | "required": ["error"], | 12753 | 12848 | "additionalProperties": false | 12754 | 12849 | }, | | 12850 | + "effect_HttpApiError_Forbidden": { | | 12851 | + "type": "object", | | 12852 | + "properties": { | | 12853 | + "_tag": { | | 12854 | + "type": "string", | | 12855 | + "enum": ["Forbidden"] | | 12856 | + } | | 12857 | + }, | | 12858 | + "required": ["_tag"], | | 12859 | + "additionalProperties": false | | 12860 | + }, | 12755 | 12861 | "ProviderAuthMethod": { | 12756 | 12862 | "type": "object", | 12757 | 12863 | "properties": { | |
|