Open History to see the last commit
1import { ORCHESTRATION_WS_METHODS } from "@t3tools/contracts";
2import { Atom } from "effect/unstable/reactivity";
3
4import { createEnvironmentRpcQueryAtomFamily } from "./runtime.ts";
5import type { EnvironmentRegistry } from "../connection/registry.ts";
6
7export function createOrchestrationEnvironmentAtoms<R, E>(
8 runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>,
9) {
10 return {
11 turnDiff: createEnvironmentRpcQueryAtomFamily(runtime, {
12 label: "environment-data:orchestration:turn-diff",
13 tag: ORCHESTRATION_WS_METHODS.getTurnDiff,
14 }),
15 fullThreadDiff: createEnvironmentRpcQueryAtomFamily(runtime, {
16 label: "environment-data:orchestration:full-thread-diff",
17 tag: ORCHESTRATION_WS_METHODS.getFullThreadDiff,
18 }),
19 archivedShellSnapshot: createEnvironmentRpcQueryAtomFamily(runtime, {
20 label: "environment-data:orchestration:archived-shell-snapshot",
21 tag: ORCHESTRATION_WS_METHODS.getArchivedShellSnapshot,
22 }),
23 };
24}