@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 20 lines 850 Bytes
Raw
1 import * as Context from "effect/Context";
2 import type * as Effect from "effect/Effect";
3 import type * as Option from "effect/Option";
4
5 import type { ConnectionProfile } from "./catalog.ts";
6 import type { ConnectionAttemptError } from "./model.ts";
7
8 export class ConnectionProfileStore extends Context.Service<
9 ConnectionProfileStore,
10 {
11 readonly get: (
12 connectionId: string,
13 ) => Effect.Effect<Option.Option<ConnectionProfile>, ConnectionAttemptError>;
14 readonly put: (profile: ConnectionProfile) => Effect.Effect<void, ConnectionAttemptError>;
15 readonly remove: (connectionId: string) => Effect.Effect<void, ConnectionAttemptError>;
16 }
17 >()("@t3tools/client-runtime/connection/profileStore/ConnectionProfileStore") {}
18
19 export const make = (service: ConnectionProfileStore["Service"]) =>
20 ConnectionProfileStore.of(service);