The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import * as Effect from "effect/Effect"; |
| 2 | import * as SqlClient from "effect/sql/SqlClient"; |
| 3 | |
| 4 | export default Effect.gen(function* () { |
| 5 | const sql = yield* SqlClient.SqlClient; |
| 6 | |
| 7 | // Other environments this one signed in to as an outside MCP agent. The |
| 8 | // session token itself is kept in the server secret store under |
| 9 | // `secret_name`, which is unique to each link, so a row always names its |
| 10 | // own token even when two links to one environment race. |
| 11 | yield* sql` |
| 12 | CREATE TABLE IF NOT EXISTS peer_environment_links ( |
| 13 | environment_id TEXT PRIMARY KEY, |
| 14 | secret_name TEXT NOT NULL, |
| 15 | label TEXT NOT NULL, |
| 16 | urls_json TEXT NOT NULL, |
| 17 | access TEXT NOT NULL, |
| 18 | linked_at TEXT NOT NULL, |
| 19 | expires_at TEXT NOT NULL, |
| 20 | last_reached_at TEXT, |
| 21 | last_error TEXT |
| 22 | ) |
| 23 | `; |
| 24 | }); |