The best way to control Claude Code, Codex and more from any computer or phone
[codex] Inline contracts request-context service shapes (#3204)
Co-authored-by: codex <codex@users.noreply.github.com>
Julius Marminge committed
Jun 19, 2026 at 19:34 UTC
ab0baaa88614905722a6638aa56ec858caf9c563
1 file changed
+11
-15
packages/contracts/src/relay.ts
+11
-15
@@ -1,5 +1,5 @@
1
-import * as Schema from "effect/Schema";
1
import * as Context from "effect/Context";
2
+import * as Schema from "effect/Schema";
3
import * as HttpApi from "effect/unstable/httpapi/HttpApi";
4
import * as HttpApiEndpoint from "effect/unstable/httpapi/HttpApiEndpoint";
5
import * as HttpApiGroup from "effect/unstable/httpapi/HttpApiGroup";
@@ -512,26 +512,22 @@ const RelayAgentActivityPublishErrors = [
512
RelayInternalError,
513
] as const;
514
515
-export interface RelayClientPrincipalShape {
516
- readonly userId: string;
517
- readonly token: string;
518
- readonly proofKeyThumbprint?: string;
519
- readonly dpopScopes?: ReadonlyArray<RelayDpopAccessTokenScope>;
520
-}
521
-
515
export class RelayClientPrincipal extends Context.Service<
516
RelayClientPrincipal,
524
- RelayClientPrincipalShape
517
+ {
518
+ readonly userId: string;
519
+ readonly token: string;
520
+ readonly proofKeyThumbprint?: string;
521
+ readonly dpopScopes?: ReadonlyArray<RelayDpopAccessTokenScope>;
522
+ }
523
>()("@t3tools/contracts/relay/RelayClientPrincipal") {}
524
527
-export interface RelayEnvironmentPrincipalShape {
528
- readonly environmentId: string;
529
- readonly environmentPublicKey: string;
530
-}
531
-
525
export class RelayEnvironmentPrincipal extends Context.Service<
526
RelayEnvironmentPrincipal,
534
- RelayEnvironmentPrincipalShape
527
+ {
528
+ readonly environmentId: string;
529
+ readonly environmentPublicKey: string;
530
+ }
531
>()("@t3tools/contracts/relay/RelayEnvironmentPrincipal") {}
532
533
const RelayClientBearerAuthorization = HttpApiSecurity.http({ scheme: "bearer" }).pipe(