Complete orchestration V2 frontend cutover

- Migrate web and mobile state, commands, and persistence to V2 projections
- Render conversations from authoritative visible turn items
- Harden runtime policy, launch handling, attachments, and cache invalidation
This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-08-15 16:49:33 +02:00
1 parent 1bbbaafb1e
commit f456ee9630
110 files changed
+7068 -10956

No files matched your search

@@ -0,0 +1,32 @@
import {
EnvironmentId,
OrchestrationV2ShellSnapshot,
OrchestrationV2ThreadProjection,
ThreadId,
} from "@t3tools/contracts";
import * as Effect from "effect/Effect";
import * as Option from "effect/Option";
import * as Schema from "effect/Schema";
export const ORCHESTRATION_CACHE_SCHEMA_VERSION = 2 as const;
export const StoredOrchestrationShellSnapshot = Schema.Struct({
schemaVersion: Schema.Literal(ORCHESTRATION_CACHE_SCHEMA_VERSION),
environmentId: EnvironmentId,
snapshot: OrchestrationV2ShellSnapshot,
});
export const StoredOrchestrationThreadSnapshot = Schema.Struct({
schemaVersion: Schema.Literal(ORCHESTRATION_CACHE_SCHEMA_VERSION),
environmentId: EnvironmentId,
threadId: ThreadId,
thread: OrchestrationV2ThreadProjection,
});
/** Invalid orchestration caches are disposable and must never block live synchronization. */
export function decodeOrDiscardOrchestrationCache<A, E, R, E2, R2>(
decode: Effect.Effect<Option.Option<A>, E, R>,
discard: Effect.Effect<void, E2, R2>,
) {
return decode.pipe(Effect.catch(() => discard.pipe(Effect.as(Option.none<A>()))));
}