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 | /** |
| 2 | * What a standalone tracker package may ask of the server it runs in: the credential the user |
| 3 | * saved in Settings. Git-host trackers never need it; their CLIs carry their own credentials. |
| 4 | */ |
| 5 | import type { IssueTrackerKind } from "@t3tools/contracts"; |
| 6 | import * as Context from "effect/Context"; |
| 7 | import type * as Effect from "effect/Effect"; |
| 8 | import type * as Option from "effect/Option"; |
| 9 | |
| 10 | import type { IssueTrackerError } from "./IssueTracker.ts"; |
| 11 | |
| 12 | export class IssueTrackerHost extends Context.Service< |
| 13 | IssueTrackerHost, |
| 14 | { |
| 15 | readonly credentials: { |
| 16 | /** Read fresh on each call, so a credential saved in Settings applies without a restart. */ |
| 17 | readonly get: ( |
| 18 | tracker: IssueTrackerKind, |
| 19 | ) => Effect.Effect<Option.Option<string>, IssueTrackerError>; |
| 20 | }; |
| 21 | } |
| 22 | >()("@t3tools/source-control-core/server/IssueTrackerHost") {} |