42 lines · 1.0 KB · TypeScript
RawDownload
import type {  EnvironmentId,  OrchestrationMessage,  OrchestrationProjectShell,  OrchestrationThread,  OrchestrationThreadShell,} from "@t3tools/contracts"; export interface EnvironmentProject extends OrchestrationProjectShell {  readonly environmentId: EnvironmentId;} export interface EnvironmentThreadShell extends OrchestrationThreadShell {  readonly environmentId: EnvironmentId;} export type EnvironmentMessage = OrchestrationMessage; export interface EnvironmentThread extends OrchestrationThread {  readonly environmentId: EnvironmentId;} export function scopeProject(  environmentId: EnvironmentId,  project: OrchestrationProjectShell,): EnvironmentProject {  return { ...project, environmentId };} export function scopeThreadShell(  environmentId: EnvironmentId,  thread: OrchestrationThreadShell,): EnvironmentThreadShell {  return { ...thread, environmentId };} export function scopeThread(  environmentId: EnvironmentId,  thread: OrchestrationThread,): EnvironmentThread {  return { ...thread, environmentId };}