Open History to see the last commit
1import type {
2 EnvironmentId,
3 OrchestrationMessage,
4 OrchestrationProjectShell,
5 OrchestrationThread,
6 OrchestrationThreadShell,
7} from "@t3tools/contracts";
8
9export interface EnvironmentProject extends OrchestrationProjectShell {
10 readonly environmentId: EnvironmentId;
11}
12
13export interface EnvironmentThreadShell extends OrchestrationThreadShell {
14 readonly environmentId: EnvironmentId;
15}
16
17export type EnvironmentMessage = OrchestrationMessage;
18
19export interface EnvironmentThread extends OrchestrationThread {
20 readonly environmentId: EnvironmentId;
21}
22
23export function scopeProject(
24 environmentId: EnvironmentId,
25 project: OrchestrationProjectShell,
26): EnvironmentProject {
27 return { ...project, environmentId };
28}
29
30export function scopeThreadShell(
31 environmentId: EnvironmentId,
32 thread: OrchestrationThreadShell,
33): EnvironmentThreadShell {
34 return { ...thread, environmentId };
35}
36
37export function scopeThread(
38 environmentId: EnvironmentId,
39 thread: OrchestrationThread,
40): EnvironmentThread {
41 return { ...thread, environmentId };
42}