authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-22 11:07:16-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-26 13:20:36-08:00
log0e4f1485c87a234b33cad6c197625d414bfd070c
tree18289275142aafeca690c7072258ffcc0755fc8d
parentb152462b2cd5f26f40ae174765ede2c62381d282

effect v4


23 files changed, 172 insertions(+), 187 deletions(-)

apps/server/package.json+6-6
......@@ -17,21 +17,21 @@
1717 "test": "vitest run"
1818 },
1919 "dependencies": {
20 "@effect/platform": "^0.94.5",
21 "@effect/platform-node": "^0.104.1",
22 "@effect/sql": "^0.49.0",
23 "@effect/sql-sqlite-node": "^0.50.1",
24 "effect": "^3.19.19",
20 "@effect/platform-node": "4.0.0-beta.10",
21 "@effect/sql-sqlite-node": "4.0.0-beta.10",
22 "effect": "4.0.0-beta.10",
2523 "node-pty": "^1.1.0",
2624 "open": "^10.1.0",
2725 "ws": "^8.18.0"
2826 },
2927 "devDependencies": {
28 "@effect/vitest": "4.0.0-beta.10",
3029 "@t3tools/contracts": "workspace:*",
3130 "@t3tools/web": "workspace:*",
3231 "@types/node": "^22.10.2",
3332 "@types/ws": "^8.5.13",
3433 "tsdown": "^0.20.3",
35 "typescript": "^5.7.3"
34 "typescript": "^5.7.3",
35 "vitest": "^4.0.0"
3636 }
3737}
apps/server/src/orchestration/Errors.ts+11-11
......@@ -1,8 +1,8 @@
1import { ParseResult, Schema } from "effect";
1import { SchemaIssue, Schema } from "effect";
22
3import type { OrchestrationEventRepositoryError } from "../persistence/Errors";
3import type { OrchestrationEventRepositoryError } from "../persistence/Errors.ts";
44
5export class OrchestrationCommandJsonParseError extends Schema.TaggedError<OrchestrationCommandJsonParseError>()(
5export class OrchestrationCommandJsonParseError extends Schema.TaggedErrorClass<OrchestrationCommandJsonParseError>()(
66 "OrchestrationCommandJsonParseError",
77 {
88 detail: Schema.String,
......@@ -14,7 +14,7 @@ export class OrchestrationCommandJsonParseError extends Schema.TaggedError<Orche
1414 }
1515}
1616
17export class OrchestrationCommandDecodeError extends Schema.TaggedError<OrchestrationCommandDecodeError>()(
17export class OrchestrationCommandDecodeError extends Schema.TaggedErrorClass<OrchestrationCommandDecodeError>()(
1818 "OrchestrationCommandDecodeError",
1919 {
2020 issue: Schema.String,
......@@ -26,7 +26,7 @@ export class OrchestrationCommandDecodeError extends Schema.TaggedError<Orchestr
2626 }
2727}
2828
29export class OrchestrationReducerDecodeError extends Schema.TaggedError<OrchestrationReducerDecodeError>()(
29export class OrchestrationReducerDecodeError extends Schema.TaggedErrorClass<OrchestrationReducerDecodeError>()(
3030 "OrchestrationReducerDecodeError",
3131 {
3232 eventType: Schema.String,
......@@ -39,10 +39,10 @@ export class OrchestrationReducerDecodeError extends Schema.TaggedError<Orchestr
3939 }
4040}
4141
42export class OrchestrationListenerCallbackError extends Schema.TaggedError<OrchestrationListenerCallbackError>()(
42export class OrchestrationListenerCallbackError extends Schema.TaggedErrorClass<OrchestrationListenerCallbackError>()(
4343 "OrchestrationListenerCallbackError",
4444 {
45 listener: Schema.Literal("read-model", "domain-event"),
45 listener: Schema.Literals(["read-model", "domain-event"]),
4646 detail: Schema.String,
4747 cause: Schema.optional(Schema.Defect),
4848 },
......@@ -62,18 +62,18 @@ export type OrchestrationEngineError =
6262 | OrchestrationCommandJsonParseError
6363 | OrchestrationCommandDecodeError;
6464
65export function toOrchestrationCommandDecodeError(error: ParseResult.ParseError) {
65export function toOrchestrationCommandDecodeError(error: Schema.SchemaError) {
6666 return new OrchestrationCommandDecodeError({
67 issue: ParseResult.TreeFormatter.formatErrorSync(error),
67 issue: SchemaIssue.makeFormatterDefault()(error.issue),
6868 cause: error,
6969 });
7070}
7171
7272export function toReducerDecodeError(eventType: string) {
73 return (error: ParseResult.ParseError): OrchestrationReducerDecodeError =>
73 return (error: Schema.SchemaError): OrchestrationReducerDecodeError =>
7474 new OrchestrationReducerDecodeError({
7575 eventType,
76 issue: ParseResult.TreeFormatter.formatErrorSync(error),
76 issue: SchemaIssue.makeFormatterDefault()(error.issue),
7777 cause: error,
7878 });
7979}
apps/server/src/orchestration/Layer.test.ts+10-14
......@@ -3,22 +3,18 @@ import os from "node:os";
33import path from "node:path";
44
55import type { OrchestrationEvent } from "@t3tools/contracts";
6import { Effect } from "effect";
6import { Effect, Layer, ManagedRuntime } from "effect";
77import { afterEach, describe, expect, it } from "vitest";
88
99import {
1010 OrchestrationEventRepository,
1111 type OrchestrationEventRepositoryShape,
12} from "../persistence/Services/OrchestrationEvents";
13import { PersistenceSqlError } from "../persistence/Errors";
14
15import { Layer, ManagedRuntime } from "effect";
16
17import { makeSqlitePersistenceLive } from "../persistence/Layers/Sqlite";
18
19import { OrchestrationEngineLive } from "./Layer";
20import { OrchestrationEngineService } from "./Service";
21import { OrchestrationEventRepositoryLive } from "../persistence/Layers/OrchestrationEvents";
12} from "../persistence/Services/OrchestrationEvents.ts";
13import { PersistenceSqlError } from "../persistence/Errors.ts";
14import { makeSqlitePersistenceLive } from "../persistence/Layers/Sqlite.ts";
15import { OrchestrationEngineLive } from "./Layer.ts";
16import { OrchestrationEngineService } from "./Service.ts";
17import { OrchestrationEventRepositoryLive } from "../persistence/Layers/OrchestrationEvents.ts";
2218
2319const tempDirs: string[] = [];
2420
......@@ -41,7 +37,7 @@ export async function createOrchestrationSystem(stateDir: string) {
4137 Layer.provide(makeSqlitePersistenceLive(dbPath)),
4238 );
4339 const runtime = ManagedRuntime.make(orchestrationLayer);
44 const engine = await runtime.runPromise(OrchestrationEngineService);
40 const engine = await runtime.runPromise(Effect.service(OrchestrationEngineService));
4541 return {
4642 engine,
4743 run: <A, E>(effect: Effect.Effect<A, E>) => runtime.runPromise(effect),
......@@ -362,7 +358,7 @@ describe("OrchestrationEngine", () => {
362358 Layer.provide(Layer.succeed(OrchestrationEventRepository, inMemoryStore)),
363359 ),
364360 );
365 await runtime.runPromise(OrchestrationEngineService);
361 await runtime.runPromise(Effect.service(OrchestrationEngineService));
366362 await runtime.dispose();
367363 await expect(runtime.dispose()).resolves.toBeUndefined();
368364 });
......@@ -404,7 +400,7 @@ describe("OrchestrationEngine", () => {
404400 Layer.provide(Layer.succeed(OrchestrationEventRepository, flakyStore)),
405401 ),
406402 );
407 const engine = await runtime.runPromise(OrchestrationEngineService);
403 const engine = await runtime.runPromise(Effect.service(OrchestrationEngineService));
408404 const createdAt = new Date().toISOString();
409405
410406 await expect(
apps/server/src/orchestration/Layer.ts+10-10
......@@ -6,16 +6,16 @@ import type {
66import { OrchestrationCommandSchema } from "@t3tools/contracts";
77import { Deferred, Effect, Layer, PubSub, Queue, Schema } from "effect";
88
9import { createLogger } from "../logger";
10import { OrchestrationEventRepository } from "../persistence/Services/OrchestrationEvents";
9import { createLogger } from "../logger.ts";
10import { OrchestrationEventRepository } from "../persistence/Services/OrchestrationEvents.ts";
1111import {
1212 toListenerCallbackError,
1313 toOrchestrationCommandDecodeError,
1414 toOrchestrationJsonParseError,
1515 type OrchestrationDispatchError,
16} from "./Errors";
17import { createEmptyReadModel, reduceEvent } from "./reducer";
18import { OrchestrationEngineService, type OrchestrationEngineShape } from "./Service";
16} from "./Errors.ts";
17import { createEmptyReadModel, reduceEvent } from "./reducer.ts";
18import { OrchestrationEngineService, type OrchestrationEngineShape } from "./Service.ts";
1919
2020type CommandEnvelope = {
2121 command: OrchestrationCommand;
......@@ -160,9 +160,9 @@ function mapCommandToEvent(command: OrchestrationCommand): Omit<OrchestrationEve
160160 }
161161}
162162
163const decodeUnknownCommand = Schema.decodeUnknown(OrchestrationCommandSchema);
163const decodeUnknownCommand = Schema.decodeUnknownEffect(OrchestrationCommandSchema);
164164
165const makeOrchestrationEngine = () =>
165const makeOrchestrationEngine =
166166 Effect.gen(function* () {
167167 const logger = createLogger("orchestration");
168168 const eventStore = yield* OrchestrationEventRepository;
......@@ -209,7 +209,7 @@ const makeOrchestrationEngine = () =>
209209
210210 yield* Deferred.succeed(envelope.result, { sequence: savedEvent.sequence });
211211 }).pipe(
212 Effect.catchAll((error) => Deferred.fail(envelope.result, error).pipe(Effect.asVoid)),
212 Effect.catch((error) => Deferred.fail(envelope.result, error).pipe(Effect.asVoid)),
213213 );
214214
215215 const bootstrapReadModel: Effect.Effect<void, OrchestrationDispatchError> = Effect.gen(
......@@ -287,7 +287,7 @@ const makeOrchestrationEngine = () =>
287287 } satisfies OrchestrationEngineShape;
288288 });
289289
290export const OrchestrationEngineLive = Layer.scoped(
290export const OrchestrationEngineLive = Layer.effect(
291291 OrchestrationEngineService,
292 makeOrchestrationEngine(),
292 makeOrchestrationEngine,
293293);
apps/server/src/orchestration/Service.ts+5-5
......@@ -11,11 +11,11 @@ import type {
1111 OrchestrationEvent,
1212 OrchestrationReadModel,
1313} from "@t3tools/contracts";
14import { Context } from "effect";
14import { ServiceMap } from "effect";
1515import type { Effect } from "effect";
1616
17import type { OrchestrationDispatchError, OrchestrationEngineError } from "./Errors";
18import type { OrchestrationEventRepositoryError } from "../persistence/Errors";
17import type { OrchestrationDispatchError, OrchestrationEngineError } from "./Errors.ts";
18import type { OrchestrationEventRepositoryError } from "../persistence/Errors.ts";
1919
2020export interface OrchestrationEngineShape {
2121 /**
......@@ -89,7 +89,7 @@ export interface OrchestrationEngineShape {
8989 * })
9090 * ```
9191 */
92export class OrchestrationEngineService extends Context.Tag("orchestration/Engine")<
92export class OrchestrationEngineService extends ServiceMap.Service<
9393 OrchestrationEngineService,
9494 OrchestrationEngineShape
95>() {}
95>()("orchestration/Engine") {}
apps/server/src/orchestration/reducer.test.ts+1-1
......@@ -2,7 +2,7 @@ import type { OrchestrationEvent } from "@t3tools/contracts";
22import { Effect } from "effect";
33import { describe, expect, it } from "vitest";
44
5import { createEmptyReadModel, reduceEvent } from "./reducer";
5import { createEmptyReadModel, reduceEvent } from "./reducer.ts";
66
77describe("orchestration reducer", () => {
88 it("applies thread.created events using runtime schema decoding", async () => {
apps/server/src/orchestration/reducer.ts+4-4
......@@ -16,7 +16,7 @@ import {
1616} from "@t3tools/contracts";
1717import { Effect, Schema } from "effect";
1818
19import { toReducerDecodeError, type OrchestrationReducerDecodeError } from "./Errors";
19import { toReducerDecodeError, type OrchestrationReducerDecodeError } from "./Errors.ts";
2020
2121type ThreadPatch = Partial<Omit<OrchestrationThread, "id" | "projectId">>;
2222
......@@ -34,9 +34,9 @@ function decodeForEvent<A>(
3434 eventType: string,
3535 field: string,
3636): Effect.Effect<A, OrchestrationReducerDecodeError> {
37 return Schema.decodeUnknown(schema)(value).pipe(
37 return Schema.decodeUnknownEffect(schema)(value).pipe(
3838 Effect.mapError(toReducerDecodeError(`${eventType}:${field}`)),
39 );
39 ) as Effect.Effect<A, OrchestrationReducerDecodeError>
4040}
4141
4242const ThreadCreatedPayloadSchema = Schema.Struct({
......@@ -61,7 +61,7 @@ const ThreadMetaUpdatedPayloadSchema = Schema.Struct({
6161
6262const MessageSentPayloadSchema = Schema.Struct({
6363 id: Schema.String,
64 role: Schema.Literal("user", "assistant"),
64 role: Schema.Literals(["user", "assistant"]),
6565 text: Schema.String,
6666 threadId: Schema.String,
6767 createdAt: Schema.String,
apps/server/src/persistence/Errors.ts+9-9
......@@ -1,6 +1,6 @@
1import { ParseResult, Schema } from "effect";
1import { Schema, SchemaIssue } from "effect";
22
3export class PersistenceSqlError extends Schema.TaggedError<PersistenceSqlError>()(
3export class PersistenceSqlError extends Schema.TaggedErrorClass<PersistenceSqlError>()(
44 "PersistenceSqlError",
55 {
66 operation: Schema.String,
......@@ -13,7 +13,7 @@ export class PersistenceSqlError extends Schema.TaggedError<PersistenceSqlError>
1313 }
1414}
1515
16export class PersistenceDecodeError extends Schema.TaggedError<PersistenceDecodeError>()(
16export class PersistenceDecodeError extends Schema.TaggedErrorClass<PersistenceDecodeError>()(
1717 "PersistenceDecodeError",
1818 {
1919 operation: Schema.String,
......@@ -26,7 +26,7 @@ export class PersistenceDecodeError extends Schema.TaggedError<PersistenceDecode
2626 }
2727}
2828
29export class PersistenceSerializationError extends Schema.TaggedError<PersistenceSerializationError>()(
29export class PersistenceSerializationError extends Schema.TaggedErrorClass<PersistenceSerializationError>()(
3030 "PersistenceSerializationError",
3131 {
3232 operation: Schema.String,
......@@ -39,7 +39,7 @@ export class PersistenceSerializationError extends Schema.TaggedError<Persistenc
3939 }
4040}
4141
42export class ProjectValidationError extends Schema.TaggedError<ProjectValidationError>()(
42export class ProjectValidationError extends Schema.TaggedErrorClass<ProjectValidationError>()(
4343 "ProjectValidationError",
4444 {
4545 operation: Schema.String,
......@@ -52,7 +52,7 @@ export class ProjectValidationError extends Schema.TaggedError<ProjectValidation
5252 }
5353}
5454
55export class ProjectPathMissingError extends Schema.TaggedError<ProjectPathMissingError>()(
55export class ProjectPathMissingError extends Schema.TaggedErrorClass<ProjectPathMissingError>()(
5656 "ProjectPathMissingError",
5757 {
5858 cwd: Schema.String,
......@@ -64,7 +64,7 @@ export class ProjectPathMissingError extends Schema.TaggedError<ProjectPathMissi
6464 }
6565}
6666
67export class ProjectNotFoundError extends Schema.TaggedError<ProjectNotFoundError>()(
67export class ProjectNotFoundError extends Schema.TaggedErrorClass<ProjectNotFoundError>()(
6868 "ProjectNotFoundError",
6969 {
7070 projectId: Schema.String,
......@@ -99,10 +99,10 @@ export function toPersistenceSqlError(operation: string) {
9999}
100100
101101export function toPersistenceDecodeError(operation: string) {
102 return (error: ParseResult.ParseError): PersistenceDecodeError =>
102 return (error: Schema.SchemaError): PersistenceDecodeError =>
103103 new PersistenceDecodeError({
104104 operation,
105 issue: ParseResult.TreeFormatter.formatErrorSync(error),
105 issue: SchemaIssue.makeFormatterDefault()(error.issue),
106106 cause: error,
107107 });
108108}
apps/server/src/persistence/Layers/OrchestrationEvents.test.ts+13-13
......@@ -3,11 +3,11 @@ import os from "node:os";
33import path from "node:path";
44import { DatabaseSync } from "node:sqlite";
55
6import { Runtime, ManagedRuntime } from "effect";
6import { ManagedRuntime, Effect } from "effect";
77import { afterEach, describe, expect, it } from "vitest";
88
9import { OrchestrationEventRepository } from "../Services/OrchestrationEvents";
10import { makeSqliteOrchestrationEventRepositoryLive } from "./OrchestrationEvents";
9import { OrchestrationEventRepository } from "../Services/OrchestrationEvents.ts";
10import { makeSqliteOrchestrationEventRepositoryLive } from "./OrchestrationEvents.ts";
1111
1212const tempDirs: string[] = [];
1313
......@@ -27,12 +27,12 @@ describe("OrchestrationEventRepository", () => {
2727 it("persists and replays events across restarts", async () => {
2828 const stateDir = makeTempDir("t3code-event-store-");
2929 const dbPath = path.join(stateDir, "orchestration.sqlite");
30 const runtime = Runtime.defaultRuntime;
30
3131 const createdAt = new Date().toISOString();
3232
3333 const firstRuntime = ManagedRuntime.make(makeSqliteOrchestrationEventRepositoryLive(dbPath));
34 const first = await firstRuntime.runPromise(OrchestrationEventRepository);
35 const saved = await Runtime.runPromise(runtime)(
34 const first = await firstRuntime.runPromise(Effect.service(OrchestrationEventRepository));
35 const saved = await firstRuntime.runPromise(
3636 first.append({
3737 eventId: "event-1",
3838 type: "thread.created",
......@@ -47,8 +47,8 @@ describe("OrchestrationEventRepository", () => {
4747 await firstRuntime.dispose();
4848
4949 const secondRuntime = ManagedRuntime.make(makeSqliteOrchestrationEventRepositoryLive(dbPath));
50 const second = await secondRuntime.runPromise(OrchestrationEventRepository);
51 const replayed = await Runtime.runPromise(runtime)(second.readFromSequence(0));
50 const second = await secondRuntime.runPromise(Effect.service(OrchestrationEventRepository));
51 const replayed = await secondRuntime.runPromise(second.readFromSequence(0));
5252 expect(replayed).toEqual([saved]);
5353 await secondRuntime.dispose();
5454 });
......@@ -56,16 +56,16 @@ describe("OrchestrationEventRepository", () => {
5656 it("creates and reuses the migrator tracking table", async () => {
5757 const stateDir = makeTempDir("t3code-event-store-migrations-");
5858 const dbPath = path.join(stateDir, "orchestration.sqlite");
59 const runtime = Runtime.defaultRuntime;
59
6060
6161 const firstRuntime = ManagedRuntime.make(makeSqliteOrchestrationEventRepositoryLive(dbPath));
62 const first = await firstRuntime.runPromise(OrchestrationEventRepository);
63 await Runtime.runPromise(runtime)(first.readAll());
62 const first = await firstRuntime.runPromise(Effect.service(OrchestrationEventRepository));
63 await firstRuntime.runPromise(first.readAll());
6464 await firstRuntime.dispose();
6565
6666 const secondRuntime = ManagedRuntime.make(makeSqliteOrchestrationEventRepositoryLive(dbPath));
67 const second = await secondRuntime.runPromise(OrchestrationEventRepository);
68 await Runtime.runPromise(runtime)(second.readAll());
67 const second = await secondRuntime.runPromise(Effect.service(OrchestrationEventRepository));
68 await secondRuntime.runPromise(second.readAll());
6969 await secondRuntime.dispose();
7070
7171 const db = new DatabaseSync(dbPath, { readOnly: true });
apps/server/src/persistence/Layers/OrchestrationEvents.ts+7-7
......@@ -1,7 +1,7 @@
11import type { OrchestrationEvent } from "@t3tools/contracts";
22import { OrchestrationEventSchema } from "@t3tools/contracts";
3import * as SqlClient from "@effect/sql/SqlClient";
4import * as SqlSchema from "@effect/sql/SqlSchema";
3import * as SqlClient from "effect/unstable/sql/SqlClient";
4import * as SqlSchema from "effect/unstable/sql/SqlSchema";
55import { Effect, Layer, Schema } from "effect";
66
77import {
......@@ -10,14 +10,14 @@ import {
1010 toPersistenceSerializationError,
1111 toPersistenceSqlError,
1212 type OrchestrationEventRepositoryError,
13} from "../Errors";
14import { makeSqlitePersistenceLive } from "./Sqlite";
13} from "../Errors.ts";
14import { makeSqlitePersistenceLive } from "./Sqlite.ts";
1515import {
1616 OrchestrationEventRepository,
1717 type OrchestrationEventRepositoryShape,
18} from "../Services/OrchestrationEvents";
18} from "../Services/OrchestrationEvents.ts";
1919
20const decodeEvent = Schema.decodeUnknown(OrchestrationEventSchema);
20const decodeEvent = Schema.decodeUnknownEffect(OrchestrationEventSchema);
2121
2222const EventRowSchema = Schema.Struct({
2323 sequence: Schema.Number,
......@@ -73,7 +73,7 @@ function eventRowToOrchestrationEvent(
7373const makeRepository = Effect.gen(function* () {
7474 const sql = yield* SqlClient.SqlClient;
7575
76 const appendEventRow = SqlSchema.single({
76 const appendEventRow = SqlSchema.findOne({
7777 Request: AppendEventRequestSchema,
7878 Result: EventRowSchema,
7979 execute: (request) =>
apps/server/src/persistence/Layers/Projects.test.ts+7-7
......@@ -2,12 +2,12 @@ import fs from "node:fs";
22import os from "node:os";
33import path from "node:path";
44
5import { Layer, ManagedRuntime } from "effect";
5import { Effect, Layer, ManagedRuntime } from "effect";
66import { afterEach, describe, expect, it } from "vitest";
77
8import { ProjectRepository } from "../Services/Projects";
9import { ProjectRepositoryLive } from "./Projects";
10import { makeSqlitePersistenceLive } from "./Sqlite";
8import { ProjectRepository } from "../Services/Projects.ts";
9import { ProjectRepositoryLive } from "./Projects.ts";
10import { makeSqlitePersistenceLive } from "./Sqlite.ts";
1111
1212function makeProjectRepositoryTest(dbPath: string) {
1313 return ProjectRepositoryLive.pipe(Layer.provide(makeSqlitePersistenceLive(dbPath)));
......@@ -34,7 +34,7 @@ describe("ProjectRepository", () => {
3434 const dbPath = path.join(stateDir, "orchestration.sqlite");
3535
3636 const firstRuntime = ManagedRuntime.make(makeProjectRepositoryTest(dbPath));
37 const first = await firstRuntime.runPromise(ProjectRepository);
37 const first = await firstRuntime.runPromise(Effect.service(ProjectRepository));
3838
3939 const created = await firstRuntime.runPromise(first.add({ cwd: projectDir }));
4040 expect(created.created).toBe(true);
......@@ -46,7 +46,7 @@ describe("ProjectRepository", () => {
4646 await firstRuntime.dispose();
4747
4848 const secondRuntime = ManagedRuntime.make(makeProjectRepositoryTest(dbPath));
49 const second = await secondRuntime.runPromise(ProjectRepository);
49 const second = await secondRuntime.runPromise(Effect.service(ProjectRepository));
5050 const listed = await secondRuntime.runPromise(second.list());
5151
5252 expect(listed).toHaveLength(1);
......@@ -62,7 +62,7 @@ describe("ProjectRepository", () => {
6262 const dbPath = path.join(stateDir, "orchestration.sqlite");
6363
6464 const runtime = ManagedRuntime.make(makeProjectRepositoryTest(dbPath));
65 const repository = await runtime.runPromise(ProjectRepository);
65 const repository = await runtime.runPromise(Effect.service(ProjectRepository));
6666
6767 const existingProject = await runtime.runPromise(repository.add({ cwd: existing }));
6868 const missingProject = await runtime.runPromise(repository.add({ cwd: missing }));
apps/server/src/persistence/Layers/Projects.ts+10-10
......@@ -19,8 +19,8 @@ import {
1919 projectScriptsSchema,
2020 projectUpdateScriptsInputSchema,
2121} from "@t3tools/contracts";
22import * as SqlClient from "@effect/sql/SqlClient";
23import * as SqlSchema from "@effect/sql/SqlSchema";
22import * as SqlClient from "effect/unstable/sql/SqlClient";
23import * as SqlSchema from "effect/unstable/sql/SqlSchema";
2424import { Effect, Layer, Option, Schema } from "effect";
2525
2626import {
......@@ -32,8 +32,8 @@ import {
3232 toPersistenceSerializationError,
3333 toPersistenceSqlError,
3434 type ProjectRepositoryError,
35} from "../Errors";
36import { ProjectRepository, type ProjectRepositoryShape } from "../Services/Projects";
35} from "../Errors.ts";
36import { ProjectRepository, type ProjectRepositoryShape } from "../Services/Projects.ts";
3737
3838const ProjectRowSchema = Schema.Struct({
3939 id: Schema.String,
......@@ -226,7 +226,7 @@ const makeRepository = Effect.gen(function* () {
226226 `,
227227 });
228228
229 const findProjectById = SqlSchema.findOne({
229 const findProjectById = SqlSchema.findOneOption({
230230 Request: FindByIdRequestSchema,
231231 Result: ProjectRowSchema,
232232 execute: ({ id }) =>
......@@ -243,7 +243,7 @@ const makeRepository = Effect.gen(function* () {
243243 `,
244244 });
245245
246 const findProjectByCwd = SqlSchema.findOne({
246 const findProjectByCwd = SqlSchema.findOneOption({
247247 Request: FindByCwdRequestSchema,
248248 Result: ProjectRowSchema,
249249 execute: ({ cwd }) =>
......@@ -260,7 +260,7 @@ const makeRepository = Effect.gen(function* () {
260260 `,
261261 });
262262
263 const insertProject = SqlSchema.single({
263 const insertProject = SqlSchema.findOne({
264264 Request: InsertProjectRequestSchema,
265265 Result: ProjectRowSchema,
266266 execute: (request) =>
......@@ -291,7 +291,7 @@ const makeRepository = Effect.gen(function* () {
291291 `,
292292 });
293293
294 const updateProjectScripts = SqlSchema.single({
294 const updateProjectScripts = SqlSchema.findOne({
295295 Request: UpdateScriptsRequestSchema,
296296 Result: ProjectRowSchema,
297297 execute: (request) =>
......@@ -381,7 +381,7 @@ const makeRepository = Effect.gen(function* () {
381381 Effect.mapError(toPersistenceSqlError("ProjectRepository.remove:findById")),
382382 );
383383 if (Option.isNone(existing)) {
384 return yield* Effect.fail(new ProjectNotFoundError({ projectId: input.id }));
384 return yield* (new ProjectNotFoundError({ projectId: input.id }));
385385 }
386386
387387 yield* deleteProject({ id: input.id }).pipe(
......@@ -396,7 +396,7 @@ const makeRepository = Effect.gen(function* () {
396396 Effect.mapError(toPersistenceSqlError("ProjectRepository.updateScripts:findById")),
397397 );
398398 if (Option.isNone(existing)) {
399 return yield* Effect.fail(new ProjectNotFoundError({ projectId: input.id }));
399 return yield* (new ProjectNotFoundError({ projectId: input.id }));
400400 }
401401
402402 const nextScripts = yield* parseProjectScripts(
apps/server/src/persistence/Layers/Sqlite.ts+12-9
......@@ -1,30 +1,32 @@
11import fs from "node:fs";
22import path from "node:path";
33
4import * as SqlClient from "@effect/sql/SqlClient";
4import * as SqlClient from "effect/unstable/sql/SqlClient";
55import * as SqliteClient from "@effect/sql-sqlite-node/SqliteClient";
6import { Context, Effect, Layer } from "effect";
6import { Effect, Layer, ServiceMap } from "effect";
77
8import { runMigrations } from "../Migrations";
8
9
10import { runMigrations } from "../Migrations.ts";
911
1012export interface PersistenceConfigShape {
1113 readonly dbPath: string;
1214}
1315
14export class PersistenceConfig extends Context.Tag("persistence/Config")<
16export class PersistenceConfig extends ServiceMap.Service<
1517 PersistenceConfig,
1618 PersistenceConfigShape
17>() {}
19>()("persistence/Config") {}
1820
1921export function makeSqlitePersistenceLive(dbPath: string) {
20 const SqliteClientLive = Layer.unwrapEffect(
22 const SqliteClientLive = Layer.unwrap(
2123 Effect.sync(() => {
2224 fs.mkdirSync(path.dirname(dbPath), { recursive: true });
2325 return SqliteClient.layer({ filename: dbPath });
2426 }),
2527 );
2628
27 return Layer.scoped(
29 return Layer.effect(
2830 SqlClient.SqlClient,
2931 Effect.gen(function* () {
3032 const sql = yield* SqliteClient.SqliteClient;
......@@ -36,6 +38,7 @@ export function makeSqlitePersistenceLive(dbPath: string) {
3638 ).pipe(Layer.provide(SqliteClientLive));
3739}
3840
39export const SqlitePersistenceLive = Layer.unwrapEffect(
40 Effect.map(PersistenceConfig, ({ dbPath }) => makeSqlitePersistenceLive(dbPath)),
41
42export const SqlitePersistenceLive = Layer.unwrap(
43 Effect.map(Effect.service(PersistenceConfig), ({ dbPath }) => makeSqlitePersistenceLive(dbPath)),
4144);
apps/server/src/persistence/Migrations.ts+4-4
......@@ -8,7 +8,7 @@
88 * ensuring the database schema is always up-to-date before the application starts.
99 */
1010
11import * as Migrator from "@effect/sql/Migrator";
11import * as Migrator from "effect/unstable/sql/Migrator";
1212import * as Layer from "effect/Layer";
1313
1414// Import all migrations statically
......@@ -57,11 +57,11 @@ export const runMigrations = run({ loader });
5757 * @example
5858 * ```typescript
5959 * import { MigrationsLive } from "@acme/db/Migrations"
60 * import { PgClient } from "@effect/sql-pg"
60 * import { SqliteClient } from "@effect/sql-sqlite-node"
6161 *
62 * // Migrations run automatically when PgClient is provided
62 * // Migrations run automatically when SqliteClient is provided
6363 * const AppLayer = MigrationsLive.pipe(
64 * Layer.provideMerge(PgClient.layer({ url: Redacted.make("postgresql://...") }))
64 * Layer.provideMerge(SqliteClient.layer({ filename: "database.sqlite" }))
6565 * )
6666 * ```
6767 */
apps/server/src/persistence/Migrations/001_OrchestrationEvents.ts+1-1
......@@ -1,4 +1,4 @@
1import { SqlClient } from "@effect/sql";
1import * as SqlClient from "effect/unstable/sql/SqlClient";
22import * as Effect from "effect/Effect";
33
44export default Effect.gen(function* () {
apps/server/src/persistence/Migrations/002_Projects.ts+1-1
......@@ -1,4 +1,4 @@
1import { SqlClient } from "@effect/sql";
1import * as SqlClient from "effect/unstable/sql/SqlClient";
22import * as Effect from "effect/Effect";
33
44export default Effect.gen(function* () {
apps/server/src/persistence/Services/OrchestrationEvents.ts+4-4
......@@ -7,10 +7,10 @@
77 * @module OrchestrationEventRepository
88 */
99import type { OrchestrationEvent } from "@t3tools/contracts";
10import { Context } from "effect";
10import { ServiceMap } from "effect";
1111import type { Effect } from "effect";
1212
13import type { OrchestrationEventRepositoryError } from "../Errors";
13import type { OrchestrationEventRepositoryError } from "../Errors.ts";
1414
1515export interface OrchestrationEventRepositoryShape {
1616 /**
......@@ -54,7 +54,7 @@ export interface OrchestrationEventRepositoryShape {
5454 * })
5555 * ```
5656 */
57export class OrchestrationEventRepository extends Context.Tag("orchestration/EventRepository")<
57export class OrchestrationEventRepository extends ServiceMap.Service<
5858 OrchestrationEventRepository,
5959 OrchestrationEventRepositoryShape
60>() {}
60>()("orchestration/EventRepository") {}
apps/server/src/persistence/Services/Projects.ts+4-4
......@@ -14,10 +14,10 @@ import type {
1414 ProjectUpdateScriptsInput,
1515 ProjectUpdateScriptsResult,
1616} from "@t3tools/contracts";
17import { Context } from "effect";
17import { ServiceMap } from "effect";
1818import type { Effect } from "effect";
1919
20import type { ProjectRepositoryError } from "../Errors";
20import type { ProjectRepositoryError } from "../Errors.ts";
2121
2222export interface ProjectRepositoryShape {
2323 /**
......@@ -72,7 +72,7 @@ export interface ProjectRepositoryShape {
7272 * })
7373 * ```
7474 */
75export class ProjectRepository extends Context.Tag("persistence/ProjectRepository")<
75export class ProjectRepository extends ServiceMap.Service<
7676 ProjectRepository,
7777 ProjectRepositoryShape
78>() {}
78>()("persistence/ProjectRepository") {}
apps/server/src/wsServer.test.ts+2-2
......@@ -3,7 +3,7 @@ import os from "node:os";
33import path from "node:path";
44import { EventEmitter } from "node:events";
55
6import { Layer, ManagedRuntime } from "effect";
6import { Effect, Layer, ManagedRuntime } from "effect";
77import { describe, expect, it, afterEach, vi } from "vitest";
88import { createServer } from "./wsServer";
99import WebSocket from "ws";
......@@ -1039,7 +1039,7 @@ describe("WebSocket Server", () => {
10391039 Layer.provide(makeSqlitePersistenceLive(path.join(stateDir, "orchestration.sqlite"))),
10401040 ),
10411041 );
1042 const projectRepository = await projectRuntime.runPromise(ProjectRepository);
1042 const projectRepository = await projectRuntime.runPromise(Effect.service(ProjectRepository));
10431043 await projectRuntime.runPromise(projectRepository.add({ cwd: existing }));
10441044 await projectRuntime.runPromise(projectRepository.add({ cwd: missing }));
10451045 await projectRuntime.dispose();
apps/server/src/wsServer.ts+3-3
......@@ -18,7 +18,7 @@ import {
1818 type WsResponse,
1919 wsRequestSchema,
2020} from "@t3tools/contracts";
21import { Layer, ManagedRuntime } from "effect";
21import { Effect, Layer, ManagedRuntime } from "effect";
2222import { WebSocketServer, type WebSocket } from "ws";
2323
2424import { createLogger } from "./logger";
......@@ -747,8 +747,8 @@ export function createServer(options: ServerOptions) {
747747
748748 try {
749749 const [nextOrchestrationEngine, repository] = await Promise.all([
750 runtime.runPromise(OrchestrationEngineService),
751 runtime.runPromise(ProjectRepository),
750 runtime.runPromise(Effect.service(OrchestrationEngineService)),
751 runtime.runPromise(Effect.service(ProjectRepository)),
752752 ]);
753753 orchestrationEngine = nextOrchestrationEngine;
754754 projectRepository = repository;
bun.lock+40-54
......@@ -34,22 +34,22 @@
3434 "t3": "./dist/index.mjs",
3535 },
3636 "dependencies": {
37 "@effect/platform": "^0.94.5",
38 "@effect/platform-node": "^0.104.1",
39 "@effect/sql": "^0.49.0",
40 "@effect/sql-sqlite-node": "^0.50.1",
41 "effect": "^3.19.19",
37 "@effect/platform-node": "4.0.0-beta.10",
38 "@effect/sql-sqlite-node": "4.0.0-beta.10",
39 "effect": "4.0.0-beta.10",
4240 "node-pty": "^1.1.0",
4341 "open": "^10.1.0",
4442 "ws": "^8.18.0",
4543 },
4644 "devDependencies": {
45 "@effect/vitest": "4.0.0-beta.10",
4746 "@t3tools/contracts": "workspace:*",
4847 "@t3tools/web": "workspace:*",
4948 "@types/node": "^22.10.2",
5049 "@types/ws": "^8.5.13",
5150 "tsdown": "^0.20.3",
5251 "typescript": "^5.7.3",
52 "vitest": "^4.0.0",
5353 },
5454 },
5555 "apps/web": {
......@@ -92,7 +92,7 @@
9292 "name": "@t3tools/contracts",
9393 "version": "0.0.0",
9494 "dependencies": {
95 "effect": "^3.19.19",
95 "effect": "4.0.0-beta.10",
9696 "zod": "^3.24.1",
9797 },
9898 "devDependencies": {
......@@ -150,23 +150,13 @@
150150
151151 "@base-ui/utils": ["@base-ui/utils@0.2.5", "", { "dependencies": { "@babel/runtime": "^7.28.6", "@floating-ui/utils": "^0.2.10", "reselect": "^5.1.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@types/react": "^17 || ^18 || ^19", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-oYC7w0gp76RI5MxprlGLV0wze0SErZaRl3AAkeP3OnNB/UBMb6RqNf6ZSIlxOc9Qp68Ab3C2VOcJQyRs7Xc7Vw=="],
152152
153 "@effect/cluster": ["@effect/cluster@0.56.4", "", { "dependencies": { "kubernetes-types": "^1.30.0" }, "peerDependencies": { "@effect/platform": "^0.94.5", "@effect/rpc": "^0.73.1", "@effect/sql": "^0.49.0", "@effect/workflow": "^0.16.0", "effect": "^3.19.17" } }, "sha512-7Je5/JlbZOlsSxsbKjr97dJed2cNGWsb+TLNgMcr5mRDbcWlFOTUGvsrisEJV6waosYLIg+2omPdvnvRoYKdhA=="],
154
155 "@effect/experimental": ["@effect/experimental@0.58.0", "", { "dependencies": { "uuid": "^11.0.3" }, "peerDependencies": { "@effect/platform": "^0.94.0", "effect": "^3.19.13", "ioredis": "^5", "lmdb": "^3" }, "optionalPeers": ["ioredis", "lmdb"] }, "sha512-IEP9sapjF6rFy5TkoqDPc86st/fnqUfjT7Xa3pWJrFGr1hzaMXHo+mWsYOZS9LAOVKnpHuVziDK97EP5qsCHVA=="],
156
157 "@effect/platform": ["@effect/platform@0.94.5", "", { "dependencies": { "find-my-way-ts": "^0.1.6", "msgpackr": "^1.11.4", "multipasta": "^0.2.7" }, "peerDependencies": { "effect": "^3.19.17" } }, "sha512-z05APUiDDPbodhTkH/RJqOLoCU11bU2IZLfcwLFrld03+ob1VeqRnELQlmueLIYm6NZifHAtjl32V+GRt34y4A=="],
158
159 "@effect/platform-node": ["@effect/platform-node@0.104.1", "", { "dependencies": { "@effect/platform-node-shared": "^0.57.1", "mime": "^3.0.0", "undici": "^7.10.0", "ws": "^8.18.2" }, "peerDependencies": { "@effect/cluster": "^0.56.1", "@effect/platform": "^0.94.2", "@effect/rpc": "^0.73.0", "@effect/sql": "^0.49.0", "effect": "^3.19.15" } }, "sha512-jT1a/z98niK6fnEU8pWHPPCdJMVDRCIdB65lolcOjse5rsTwVbczMjvKkhVQpF63mNWoOnol7OTRNkw5L54llg=="],
153 "@effect/platform-node": ["@effect/platform-node@4.0.0-beta.10", "", { "dependencies": { "@effect/platform-node-shared": "^4.0.0-beta.10", "mime": "^4.1.0", "undici": "^7.20.0" }, "peerDependencies": { "effect": "^4.0.0-beta.10", "ioredis": "^5.7.0" } }, "sha512-ikZ/uyos5okYAHE+wWOwZkHgriFUTY3aY8Kdqbj/ro8xw0z9YXWN4fbyQAZUWkBcieDKS36N+QfHRMPG4fEWRA=="],
160154
161 "@effect/platform-node-shared": ["@effect/platform-node-shared@0.57.1", "", { "dependencies": { "@parcel/watcher": "^2.5.1", "multipasta": "^0.2.7", "ws": "^8.18.2" }, "peerDependencies": { "@effect/cluster": "^0.56.1", "@effect/platform": "^0.94.2", "@effect/rpc": "^0.73.0", "@effect/sql": "^0.49.0", "effect": "^3.19.15" } }, "sha512-oX/bApMdoKsyrDiNdJxo7U9Rz1RXsjRv+ecfAPp1qGlSdGIo32wVRvJ2XCHqYj0sqaYJS0pU0/GCulRfVGuJag=="],
155 "@effect/platform-node-shared": ["@effect/platform-node-shared@4.0.0-beta.10", "", { "dependencies": { "@types/ws": "^8.18.1", "ws": "^8.19.0" }, "peerDependencies": { "effect": "^4.0.0-beta.10" } }, "sha512-gBSeOG2bfchXFdgdi5oipHKynOzSd7BlzTy5QcjFOoCUTtLP9igqohPB9hTkV3a6seWE2JJqsgsQ79VuLb7fAg=="],
162156
163 "@effect/rpc": ["@effect/rpc@0.73.2", "", { "dependencies": { "msgpackr": "^1.11.4" }, "peerDependencies": { "@effect/platform": "^0.94.5", "effect": "^3.19.18" } }, "sha512-td7LHDgBOYKg+VgGWEelD8rSAmvjXz7am17vfxZROX5qIYuvH7drL/z4p5xQFadhHZ7DYdlFpqdO9ggc77OCIw=="],
157 "@effect/sql-sqlite-node": ["@effect/sql-sqlite-node@4.0.0-beta.10", "", { "dependencies": { "better-sqlite3": "^12.6.2" }, "peerDependencies": { "effect": "^4.0.0-beta.10" } }, "sha512-oQl+gF31HaVM9R8YEpf96CIJypP1Roa5z1VPj8s7ZP+3aCtRVor1K+eMxYNAb8ph7R68Tz0LpmVkefq0mEI3CA=="],
164158
165 "@effect/sql": ["@effect/sql@0.49.0", "", { "dependencies": { "uuid": "^11.0.3" }, "peerDependencies": { "@effect/experimental": "^0.58.0", "@effect/platform": "^0.94.0", "effect": "^3.19.13" } }, "sha512-9UEKR+z+MrI/qMAmSvb/RiD9KlgIazjZUCDSpwNgm0lEK9/Q6ExEyfziiYFVCPiptp52cBw8uBHRic8hHnwqXA=="],
166
167 "@effect/sql-sqlite-node": ["@effect/sql-sqlite-node@0.50.1", "", { "dependencies": { "better-sqlite3": "^12.6.2" }, "peerDependencies": { "@effect/experimental": "^0.58.0", "@effect/platform": "^0.94.4", "@effect/sql": "^0.49.0", "effect": "^3.19.16" } }, "sha512-L7DlHcOVl9/9V5stttFyv9wjvA9PBbaXwsp9pU+KN8KqokWgAVBNBEDf/dVfboUrynbDpDWwMU9SJmRJ1LXASQ=="],
168
169 "@effect/workflow": ["@effect/workflow@0.16.0", "", { "peerDependencies": { "@effect/experimental": "^0.58.0", "@effect/platform": "^0.94.0", "@effect/rpc": "^0.73.0", "effect": "^3.19.13" } }, "sha512-MiAdlxx3TixkgHdbw+Yf1Z3tHAAE0rOQga12kIydJqj05Fnod+W/I+kQGRMY/XWRg+QUsVxhmh1qTr7Ype6lrw=="],
159 "@effect/vitest": ["@effect/vitest@4.0.0-beta.10", "", { "peerDependencies": { "effect": "^4.0.0-beta.10", "vitest": "^3.0.0" } }, "sha512-WmE8vCNw+eDoAq9CwwymrAdIBw1f+8hDP3AUF7jyC7/Cj/kyAYOFwkbtKmDXIFaTlf7G/2fmulEXeCO5W8j0kQ=="],
170160
171161 "@electron/get": ["@electron/get@2.0.3", "", { "dependencies": { "debug": "^4.1.1", "env-paths": "^2.2.0", "fs-extra": "^8.1.0", "got": "^11.8.5", "progress": "^2.0.3", "semver": "^6.2.0", "sumchecker": "^3.0.1" }, "optionalDependencies": { "global-agent": "^3.0.0" } }, "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ=="],
172162
......@@ -258,6 +248,8 @@
258248
259249 "@inquirer/type": ["@inquirer/type@3.0.10", "", { "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA=="],
260250
251 "@ioredis/commands": ["@ioredis/commands@1.5.0", "", {}, "sha512-eUgLqrMf8nJkZxT24JvVRrQya1vZkQh8BBeYNwGDqa5I0VUi8ACx7uFvAaLxintokpTenkK6DASvo/bvNbBGow=="],
252
261253 "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
262254
263255 "@jridgewell/remapping": ["@jridgewell/remapping@2.3.5", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="],
......@@ -348,34 +340,6 @@
348340
349341 "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.46.0", "", { "os": "win32", "cpu": "x64" }, "sha512-DJbQsSJUr4KSi9uU0QqOgI7PX2C+fKGZX+YDprt3vM2sC0dWZsgVTLoN2vtkNyEWJSY2mnvRFUshWXT3bmo0Ug=="],
350342
351 "@parcel/watcher": ["@parcel/watcher@2.5.6", "", { "dependencies": { "detect-libc": "^2.0.3", "is-glob": "^4.0.3", "node-addon-api": "^7.0.0", "picomatch": "^4.0.3" }, "optionalDependencies": { "@parcel/watcher-android-arm64": "2.5.6", "@parcel/watcher-darwin-arm64": "2.5.6", "@parcel/watcher-darwin-x64": "2.5.6", "@parcel/watcher-freebsd-x64": "2.5.6", "@parcel/watcher-linux-arm-glibc": "2.5.6", "@parcel/watcher-linux-arm-musl": "2.5.6", "@parcel/watcher-linux-arm64-glibc": "2.5.6", "@parcel/watcher-linux-arm64-musl": "2.5.6", "@parcel/watcher-linux-x64-glibc": "2.5.6", "@parcel/watcher-linux-x64-musl": "2.5.6", "@parcel/watcher-win32-arm64": "2.5.6", "@parcel/watcher-win32-ia32": "2.5.6", "@parcel/watcher-win32-x64": "2.5.6" } }, "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ=="],
352
353 "@parcel/watcher-android-arm64": ["@parcel/watcher-android-arm64@2.5.6", "", { "os": "android", "cpu": "arm64" }, "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A=="],
354
355 "@parcel/watcher-darwin-arm64": ["@parcel/watcher-darwin-arm64@2.5.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA=="],
356
357 "@parcel/watcher-darwin-x64": ["@parcel/watcher-darwin-x64@2.5.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg=="],
358
359 "@parcel/watcher-freebsd-x64": ["@parcel/watcher-freebsd-x64@2.5.6", "", { "os": "freebsd", "cpu": "x64" }, "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng=="],
360
361 "@parcel/watcher-linux-arm-glibc": ["@parcel/watcher-linux-arm-glibc@2.5.6", "", { "os": "linux", "cpu": "arm" }, "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ=="],
362
363 "@parcel/watcher-linux-arm-musl": ["@parcel/watcher-linux-arm-musl@2.5.6", "", { "os": "linux", "cpu": "arm" }, "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg=="],
364
365 "@parcel/watcher-linux-arm64-glibc": ["@parcel/watcher-linux-arm64-glibc@2.5.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA=="],
366
367 "@parcel/watcher-linux-arm64-musl": ["@parcel/watcher-linux-arm64-musl@2.5.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA=="],
368
369 "@parcel/watcher-linux-x64-glibc": ["@parcel/watcher-linux-x64-glibc@2.5.6", "", { "os": "linux", "cpu": "x64" }, "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ=="],
370
371 "@parcel/watcher-linux-x64-musl": ["@parcel/watcher-linux-x64-musl@2.5.6", "", { "os": "linux", "cpu": "x64" }, "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg=="],
372
373 "@parcel/watcher-win32-arm64": ["@parcel/watcher-win32-arm64@2.5.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q=="],
374
375 "@parcel/watcher-win32-ia32": ["@parcel/watcher-win32-ia32@2.5.6", "", { "os": "win32", "cpu": "ia32" }, "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g=="],
376
377 "@parcel/watcher-win32-x64": ["@parcel/watcher-win32-x64@2.5.6", "", { "os": "win32", "cpu": "x64" }, "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw=="],
378
379343 "@pierre/diffs": ["@pierre/diffs@1.1.0-beta.16", "", { "dependencies": { "@shikijs/transformers": "^3.0.0", "diff": "8.0.3", "hast-util-to-html": "9.0.5", "lru_map": "0.4.1", "shiki": "^3.0.0" }, "peerDependencies": { "react": "^18.3.1 || ^19.0.0", "react-dom": "^18.3.1 || ^19.0.0" } }, "sha512-McjTuEPuacSIcXdoI2O9W6VSHIOs9ApEHnEUwONKZnKqIo2GGv1vNg9Pr8tgBOL7lgBWNEHX5ROJ5z1X74sENQ=="],
380344
381345 "@quansync/fs": ["@quansync/fs@1.0.0", "", { "dependencies": { "quansync": "^1.0.0" } }, "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ=="],
......@@ -710,6 +674,8 @@
710674
711675 "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="],
712676
677 "cluster-key-slot": ["cluster-key-slot@1.1.2", "", {}, "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA=="],
678
713679 "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
714680
715681 "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
......@@ -750,6 +716,8 @@
750716
751717 "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
752718
719 "denque": ["denque@2.1.0", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="],
720
753721 "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="],
754722
755723 "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
......@@ -764,7 +732,7 @@
764732
765733 "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
766734
767 "effect": ["effect@3.19.19", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "fast-check": "^3.23.1" } }, "sha512-Yc8U/SVXo2dHnaP7zNBlAo83h/nzSJpi7vph6Hzyl4ulgMBIgPmz3UzOjb9sBgpFE00gC0iETR244sfXDNLHRg=="],
735 "effect": ["effect@4.0.0-beta.10", "", { "dependencies": { "@standard-schema/spec": "^1.1.0", "fast-check": "^4.5.3", "find-my-way-ts": "^0.1.6", "ini": "^6.0.0", "kubernetes-types": "^1.30.0", "msgpackr": "^1.11.8", "multipasta": "^0.2.7", "toml": "^3.0.0", "uuid": "^13.0.0", "yaml": "^2.8.2" } }, "sha512-UvxWmT0uzWZqNmQODfW7y1zb0LMlH3xtSn/UESpck2Wvv6SogxibYPWKKNcUsRMm5wwprOoW2IwItYLQyZpe8Q=="],
768736
769737 "electron": ["electron@40.6.0", "", { "dependencies": { "@electron/get": "^2.0.0", "@types/node": "^24.9.0", "extract-zip": "^2.0.1" }, "bin": { "electron": "cli.js" } }, "sha512-ett8W+yOFGDuM0vhJMamYSkrbV3LoaffzJd9GfjI96zRAxyrNqUSKqBpf/WGbQCweDxX2pkUCUfrv4wwKpsFZA=="],
770738
......@@ -814,7 +782,7 @@
814782
815783 "extract-zip": ["extract-zip@2.0.1", "", { "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", "yauzl": "^2.10.0" }, "optionalDependencies": { "@types/yauzl": "^2.9.1" }, "bin": { "extract-zip": "cli.js" } }, "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg=="],
816784
817 "fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="],
785 "fast-check": ["fast-check@4.5.3", "", { "dependencies": { "pure-rand": "^7.0.0" } }, "sha512-IE9csY7lnhxBnA8g/WI5eg/hygA6MGWJMSNfFRrBlXUciADEhS1EDB0SIsMSvzubzIlOBbVITSsypCsW717poA=="],
818786
819787 "fd-slicer": ["fd-slicer@1.1.0", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
820788
......@@ -908,10 +876,12 @@
908876
909877 "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
910878
911 "ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="],
879 "ini": ["ini@6.0.0", "", {}, "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ=="],
912880
913881 "inline-style-parser": ["inline-style-parser@0.2.7", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="],
914882
883 "ioredis": ["ioredis@5.9.3", "", { "dependencies": { "@ioredis/commands": "1.5.0", "cluster-key-slot": "^1.1.0", "debug": "^4.3.4", "denque": "^2.1.0", "lodash.defaults": "^4.2.0", "lodash.isarguments": "^3.1.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.1.0" } }, "sha512-VI5tMCdeoxZWU5vjHWsiE/Su76JGhBvWF1MJnV9ZtGltHk9BmD48oDq8Tj8haZ85aceXZMxLNDQZRVo5QKNgXA=="],
884
915885 "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="],
916886
917887 "is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="],
......@@ -988,8 +958,12 @@
988958
989959 "lodash": ["lodash@4.17.23", "", {}, "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w=="],
990960
961 "lodash.defaults": ["lodash.defaults@4.2.0", "", {}, "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="],
962
991963 "lodash.difference": ["lodash.difference@4.5.0", "", {}, "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA=="],
992964
965 "lodash.isarguments": ["lodash.isarguments@3.1.0", "", {}, "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg=="],
966
993967 "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="],
994968
995969 "lowercase-keys": ["lowercase-keys@2.0.0", "", {}, "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="],
......@@ -1098,7 +1072,7 @@
10981072
10991073 "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],
11001074
1101 "mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="],
1075 "mime": ["mime@4.1.0", "", { "bin": { "mime": "bin/cli.js" } }, "sha512-X5ju04+cAzsojXKes0B/S4tcYtFAJ6tTMuSPBEn9CPGlrWr8Fiw7qYeLT0XyH80HSoAoqWCaz+MWKh22P7G1cw=="],
11021076
11031077 "mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
11041078
......@@ -1188,7 +1162,7 @@
11881162
11891163 "pump": ["pump@3.0.3", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA=="],
11901164
1191 "pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="],
1165 "pure-rand": ["pure-rand@7.0.1", "", {}, "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ=="],
11921166
11931167 "quansync": ["quansync@1.0.0", "", {}, "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA=="],
11941168
......@@ -1210,6 +1184,10 @@
12101184
12111185 "recast": ["recast@0.23.11", "", { "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", "source-map": "~0.6.1", "tiny-invariant": "^1.3.3", "tslib": "^2.0.1" } }, "sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA=="],
12121186
1187 "redis-errors": ["redis-errors@1.2.0", "", {}, "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w=="],
1188
1189 "redis-parser": ["redis-parser@3.0.0", "", { "dependencies": { "redis-errors": "^1.0.0" } }, "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A=="],
1190
12131191 "regex": ["regex@6.1.0", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="],
12141192
12151193 "regex-recursion": ["regex-recursion@6.0.2", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="],
......@@ -1290,6 +1268,8 @@
12901268
12911269 "stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="],
12921270
1271 "standard-as-callback": ["standard-as-callback@2.1.0", "", {}, "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A=="],
1272
12931273 "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="],
12941274
12951275 "std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],
......@@ -1350,6 +1330,8 @@
13501330
13511331 "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],
13521332
1333 "toml": ["toml@3.0.0", "", {}, "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w=="],
1334
13531335 "tough-cookie": ["tough-cookie@6.0.0", "", { "dependencies": { "tldts": "^7.0.5" } }, "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w=="],
13541336
13551337 "tree-kill": ["tree-kill@1.2.2", "", { "bin": { "tree-kill": "cli.js" } }, "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="],
......@@ -1420,7 +1402,7 @@
14201402
14211403 "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
14221404
1423 "uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="],
1405 "uuid": ["uuid@13.0.0", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w=="],
14241406
14251407 "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="],
14261408
......@@ -1450,6 +1432,8 @@
14501432
14511433 "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="],
14521434
1435 "yaml": ["yaml@2.8.2", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A=="],
1436
14531437 "yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="],
14541438
14551439 "yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
......@@ -1530,6 +1514,8 @@
15301514
15311515 "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
15321516
1517 "rc/ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="],
1518
15331519 "readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
15341520
15351521 "recast/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
packages/contracts/package.json+1-1
......@@ -23,7 +23,7 @@
2323 "test": "vitest run"
2424 },
2525 "dependencies": {
26 "effect": "^3.19.19",
26 "effect": "4.0.0-beta.10",
2727 "zod": "^3.24.1"
2828 },
2929 "devDependencies": {
packages/contracts/src/orchestration.ts+7-7
......@@ -16,7 +16,7 @@ const IdSchema = Schema.String;
1616
1717export const OrchestrationMessageSchema = Schema.Struct({
1818 id: IdSchema,
19 role: Schema.Literal("user", "assistant"),
19 role: Schema.Literals(["user", "assistant"]),
2020 text: Schema.String,
2121 createdAt: IsoDateTimeSchema,
2222 streaming: Schema.Boolean,
......@@ -26,8 +26,8 @@ export type OrchestrationMessage = Schema.Schema.Type<typeof OrchestrationMessag
2626
2727export const OrchestrationSessionSchema = Schema.Struct({
2828 sessionId: IdSchema,
29 status: Schema.Literal("connecting", "ready", "running", "error", "closed"),
30 provider: Schema.Literal("codex", "claudeCode"),
29 status: Schema.Literals(["connecting", "ready", "running", "error", "closed"]),
30 provider: Schema.Literals(["codex", "claudeCode"]),
3131 threadId: IdSchema,
3232 activeTurnId: Schema.NullOr(Schema.String),
3333 createdAt: IsoDateTimeSchema,
......@@ -94,7 +94,7 @@ export type OrchestrationGitReadModel = Schema.Schema.Type<typeof OrchestrationG
9494export const OrchestrationReadModelSchema = Schema.Struct({
9595 sequence: Schema.Number,
9696 threads: Schema.Array(OrchestrationThreadSchema),
97 gitByProjectId: Schema.Record({ key: Schema.String, value: OrchestrationGitReadModelSchema }),
97 gitByProjectId: Schema.Record( Schema.String, OrchestrationGitReadModelSchema),
9898 updatedAt: IsoDateTimeSchema,
9999});
100100
......@@ -135,7 +135,7 @@ export const SendMessageCommandSchema = Schema.Struct({
135135 commandId: IdSchema,
136136 threadId: IdSchema,
137137 messageId: IdSchema,
138 role: Schema.Literal("user", "assistant"),
138 role: Schema.Literals(["user", "assistant"]),
139139 text: Schema.String,
140140 streaming: Schema.optional(Schema.Boolean),
141141 createdAt: IsoDateTimeSchema,
......@@ -182,7 +182,7 @@ export const RevertThreadCommandSchema = Schema.Struct({
182182 createdAt: IsoDateTimeSchema,
183183});
184184
185export const OrchestrationCommandSchema = Schema.Union(
185export const OrchestrationCommandSchema = Schema.Union([
186186 CreateThreadCommandSchema,
187187 DeleteThreadCommandSchema,
188188 UpdateThreadMetaCommandSchema,
......@@ -190,7 +190,7 @@ export const OrchestrationCommandSchema = Schema.Union(
190190 SetThreadSessionSchema,
191191 UpsertGitReadModelCommandSchema,
192192 CompleteThreadTurnDiffCommandSchema,
193 RevertThreadCommandSchema,
193 RevertThreadCommandSchema,]
194194);
195195
196196export type OrchestrationCommand = Schema.Schema.Type<typeof OrchestrationCommandSchema>;