From 0e4f1485c87a234b33cad6c197625d414bfd070c Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sun, 22 Feb 2026 11:07:16 -0800 Subject: [PATCH] effect v4 --- apps/server/package.json | 12 +-- apps/server/src/orchestration/Errors.ts | 22 ++--- apps/server/src/orchestration/Layer.test.ts | 24 ++--- apps/server/src/orchestration/Layer.ts | 20 ++-- apps/server/src/orchestration/Service.ts | 10 +- apps/server/src/orchestration/reducer.test.ts | 2 +- apps/server/src/orchestration/reducer.ts | 8 +- apps/server/src/persistence/Errors.ts | 18 ++-- .../Layers/OrchestrationEvents.test.ts | 26 ++--- .../persistence/Layers/OrchestrationEvents.ts | 14 +-- .../src/persistence/Layers/Projects.test.ts | 14 +-- .../server/src/persistence/Layers/Projects.ts | 20 ++-- apps/server/src/persistence/Layers/Sqlite.ts | 21 +++-- apps/server/src/persistence/Migrations.ts | 8 +- .../Migrations/001_OrchestrationEvents.ts | 2 +- .../persistence/Migrations/002_Projects.ts | 2 +- .../Services/OrchestrationEvents.ts | 8 +- .../src/persistence/Services/Projects.ts | 8 +- apps/server/src/wsServer.test.ts | 4 +- apps/server/src/wsServer.ts | 6 +- bun.lock | 94 ++++++++----------- packages/contracts/package.json | 2 +- packages/contracts/src/orchestration.ts | 14 +-- 23 files changed, 172 insertions(+), 187 deletions(-) diff --git a/apps/server/package.json b/apps/server/package.json index d92adb10ee6737b9b412b57d9f15127a5ec3d3c7..5b0ee327fc4ff0487ce73a12fd08963d53a18490 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -17,21 +17,21 @@ "test": "vitest run" }, "dependencies": { - "@effect/platform": "^0.94.5", - "@effect/platform-node": "^0.104.1", - "@effect/sql": "^0.49.0", - "@effect/sql-sqlite-node": "^0.50.1", - "effect": "^3.19.19", + "@effect/platform-node": "4.0.0-beta.10", + "@effect/sql-sqlite-node": "4.0.0-beta.10", + "effect": "4.0.0-beta.10", "node-pty": "^1.1.0", "open": "^10.1.0", "ws": "^8.18.0" }, "devDependencies": { + "@effect/vitest": "4.0.0-beta.10", "@t3tools/contracts": "workspace:*", "@t3tools/web": "workspace:*", "@types/node": "^22.10.2", "@types/ws": "^8.5.13", "tsdown": "^0.20.3", - "typescript": "^5.7.3" + "typescript": "^5.7.3", + "vitest": "^4.0.0" } } diff --git a/apps/server/src/orchestration/Errors.ts b/apps/server/src/orchestration/Errors.ts index 0f199e2baf45ea632e195fee0abf5bceb403500c..e7b4d8c0dd7b63ac9fd3e3a87b02ebf23c0359af 100644 --- a/apps/server/src/orchestration/Errors.ts +++ b/apps/server/src/orchestration/Errors.ts @@ -1,8 +1,8 @@ -import { ParseResult, Schema } from "effect"; +import { SchemaIssue, Schema } from "effect"; -import type { OrchestrationEventRepositoryError } from "../persistence/Errors"; +import type { OrchestrationEventRepositoryError } from "../persistence/Errors.ts"; -export class OrchestrationCommandJsonParseError extends Schema.TaggedError()( +export class OrchestrationCommandJsonParseError extends Schema.TaggedErrorClass()( "OrchestrationCommandJsonParseError", { detail: Schema.String, @@ -14,7 +14,7 @@ export class OrchestrationCommandJsonParseError extends Schema.TaggedError()( +export class OrchestrationCommandDecodeError extends Schema.TaggedErrorClass()( "OrchestrationCommandDecodeError", { issue: Schema.String, @@ -26,7 +26,7 @@ export class OrchestrationCommandDecodeError extends Schema.TaggedError()( +export class OrchestrationReducerDecodeError extends Schema.TaggedErrorClass()( "OrchestrationReducerDecodeError", { eventType: Schema.String, @@ -39,10 +39,10 @@ export class OrchestrationReducerDecodeError extends Schema.TaggedError()( +export class OrchestrationListenerCallbackError extends Schema.TaggedErrorClass()( "OrchestrationListenerCallbackError", { - listener: Schema.Literal("read-model", "domain-event"), + listener: Schema.Literals(["read-model", "domain-event"]), detail: Schema.String, cause: Schema.optional(Schema.Defect), }, @@ -62,18 +62,18 @@ export type OrchestrationEngineError = | OrchestrationCommandJsonParseError | OrchestrationCommandDecodeError; -export function toOrchestrationCommandDecodeError(error: ParseResult.ParseError) { +export function toOrchestrationCommandDecodeError(error: Schema.SchemaError) { return new OrchestrationCommandDecodeError({ - issue: ParseResult.TreeFormatter.formatErrorSync(error), + issue: SchemaIssue.makeFormatterDefault()(error.issue), cause: error, }); } export function toReducerDecodeError(eventType: string) { - return (error: ParseResult.ParseError): OrchestrationReducerDecodeError => + return (error: Schema.SchemaError): OrchestrationReducerDecodeError => new OrchestrationReducerDecodeError({ eventType, - issue: ParseResult.TreeFormatter.formatErrorSync(error), + issue: SchemaIssue.makeFormatterDefault()(error.issue), cause: error, }); } diff --git a/apps/server/src/orchestration/Layer.test.ts b/apps/server/src/orchestration/Layer.test.ts index 76a028567a8bada6d6c8f286770858676184064b..fb383ab32253f6d9db06bb357096766d54cccfcb 100644 --- a/apps/server/src/orchestration/Layer.test.ts +++ b/apps/server/src/orchestration/Layer.test.ts @@ -3,22 +3,18 @@ import os from "node:os"; import path from "node:path"; import type { OrchestrationEvent } from "@t3tools/contracts"; -import { Effect } from "effect"; +import { Effect, Layer, ManagedRuntime } from "effect"; import { afterEach, describe, expect, it } from "vitest"; import { OrchestrationEventRepository, type OrchestrationEventRepositoryShape, -} from "../persistence/Services/OrchestrationEvents"; -import { PersistenceSqlError } from "../persistence/Errors"; - -import { Layer, ManagedRuntime } from "effect"; - -import { makeSqlitePersistenceLive } from "../persistence/Layers/Sqlite"; - -import { OrchestrationEngineLive } from "./Layer"; -import { OrchestrationEngineService } from "./Service"; -import { OrchestrationEventRepositoryLive } from "../persistence/Layers/OrchestrationEvents"; +} from "../persistence/Services/OrchestrationEvents.ts"; +import { PersistenceSqlError } from "../persistence/Errors.ts"; +import { makeSqlitePersistenceLive } from "../persistence/Layers/Sqlite.ts"; +import { OrchestrationEngineLive } from "./Layer.ts"; +import { OrchestrationEngineService } from "./Service.ts"; +import { OrchestrationEventRepositoryLive } from "../persistence/Layers/OrchestrationEvents.ts"; const tempDirs: string[] = []; @@ -41,7 +37,7 @@ export async function createOrchestrationSystem(stateDir: string) { Layer.provide(makeSqlitePersistenceLive(dbPath)), ); const runtime = ManagedRuntime.make(orchestrationLayer); - const engine = await runtime.runPromise(OrchestrationEngineService); + const engine = await runtime.runPromise(Effect.service(OrchestrationEngineService)); return { engine, run: (effect: Effect.Effect) => runtime.runPromise(effect), @@ -362,7 +358,7 @@ describe("OrchestrationEngine", () => { Layer.provide(Layer.succeed(OrchestrationEventRepository, inMemoryStore)), ), ); - await runtime.runPromise(OrchestrationEngineService); + await runtime.runPromise(Effect.service(OrchestrationEngineService)); await runtime.dispose(); await expect(runtime.dispose()).resolves.toBeUndefined(); }); @@ -404,7 +400,7 @@ describe("OrchestrationEngine", () => { Layer.provide(Layer.succeed(OrchestrationEventRepository, flakyStore)), ), ); - const engine = await runtime.runPromise(OrchestrationEngineService); + const engine = await runtime.runPromise(Effect.service(OrchestrationEngineService)); const createdAt = new Date().toISOString(); await expect( diff --git a/apps/server/src/orchestration/Layer.ts b/apps/server/src/orchestration/Layer.ts index 3c9590501c7eb32b699c8fcbd5efbd07e97898fe..5c08697cc2c7cccd0bd8360c54eb5dcb7371856d 100644 --- a/apps/server/src/orchestration/Layer.ts +++ b/apps/server/src/orchestration/Layer.ts @@ -6,16 +6,16 @@ import type { import { OrchestrationCommandSchema } from "@t3tools/contracts"; import { Deferred, Effect, Layer, PubSub, Queue, Schema } from "effect"; -import { createLogger } from "../logger"; -import { OrchestrationEventRepository } from "../persistence/Services/OrchestrationEvents"; +import { createLogger } from "../logger.ts"; +import { OrchestrationEventRepository } from "../persistence/Services/OrchestrationEvents.ts"; import { toListenerCallbackError, toOrchestrationCommandDecodeError, toOrchestrationJsonParseError, type OrchestrationDispatchError, -} from "./Errors"; -import { createEmptyReadModel, reduceEvent } from "./reducer"; -import { OrchestrationEngineService, type OrchestrationEngineShape } from "./Service"; +} from "./Errors.ts"; +import { createEmptyReadModel, reduceEvent } from "./reducer.ts"; +import { OrchestrationEngineService, type OrchestrationEngineShape } from "./Service.ts"; type CommandEnvelope = { command: OrchestrationCommand; @@ -160,9 +160,9 @@ function mapCommandToEvent(command: OrchestrationCommand): Omit +const makeOrchestrationEngine = Effect.gen(function* () { const logger = createLogger("orchestration"); const eventStore = yield* OrchestrationEventRepository; @@ -209,7 +209,7 @@ const makeOrchestrationEngine = () => yield* Deferred.succeed(envelope.result, { sequence: savedEvent.sequence }); }).pipe( - Effect.catchAll((error) => Deferred.fail(envelope.result, error).pipe(Effect.asVoid)), + Effect.catch((error) => Deferred.fail(envelope.result, error).pipe(Effect.asVoid)), ); const bootstrapReadModel: Effect.Effect = Effect.gen( @@ -287,7 +287,7 @@ const makeOrchestrationEngine = () => } satisfies OrchestrationEngineShape; }); -export const OrchestrationEngineLive = Layer.scoped( +export const OrchestrationEngineLive = Layer.effect( OrchestrationEngineService, - makeOrchestrationEngine(), + makeOrchestrationEngine, ); diff --git a/apps/server/src/orchestration/Service.ts b/apps/server/src/orchestration/Service.ts index 57eee9dabff917b28a6ab5a8d9a98372b68cbb77..1dadacce97b56db17a02e5a59d1b72567a7ad112 100644 --- a/apps/server/src/orchestration/Service.ts +++ b/apps/server/src/orchestration/Service.ts @@ -11,11 +11,11 @@ import type { OrchestrationEvent, OrchestrationReadModel, } from "@t3tools/contracts"; -import { Context } from "effect"; +import { ServiceMap } from "effect"; import type { Effect } from "effect"; -import type { OrchestrationDispatchError, OrchestrationEngineError } from "./Errors"; -import type { OrchestrationEventRepositoryError } from "../persistence/Errors"; +import type { OrchestrationDispatchError, OrchestrationEngineError } from "./Errors.ts"; +import type { OrchestrationEventRepositoryError } from "../persistence/Errors.ts"; export interface OrchestrationEngineShape { /** @@ -89,7 +89,7 @@ export interface OrchestrationEngineShape { * }) * ``` */ -export class OrchestrationEngineService extends Context.Tag("orchestration/Engine")< +export class OrchestrationEngineService extends ServiceMap.Service< OrchestrationEngineService, OrchestrationEngineShape ->() {} +>()("orchestration/Engine") {} diff --git a/apps/server/src/orchestration/reducer.test.ts b/apps/server/src/orchestration/reducer.test.ts index 6ea2a6c81352297792950e60623fb6a3377dc78c..ac887e8dd925dbb6798e9446e5ebce0ddbbdf260 100644 --- a/apps/server/src/orchestration/reducer.test.ts +++ b/apps/server/src/orchestration/reducer.test.ts @@ -2,7 +2,7 @@ import type { OrchestrationEvent } from "@t3tools/contracts"; import { Effect } from "effect"; import { describe, expect, it } from "vitest"; -import { createEmptyReadModel, reduceEvent } from "./reducer"; +import { createEmptyReadModel, reduceEvent } from "./reducer.ts"; describe("orchestration reducer", () => { it("applies thread.created events using runtime schema decoding", async () => { diff --git a/apps/server/src/orchestration/reducer.ts b/apps/server/src/orchestration/reducer.ts index 01f9e8c09755bf9cb5bf3b57ea81a35d4b8fb7c3..8fa8187af3bd7d31ee600b79f6bce863b1a1de80 100644 --- a/apps/server/src/orchestration/reducer.ts +++ b/apps/server/src/orchestration/reducer.ts @@ -16,7 +16,7 @@ import { } from "@t3tools/contracts"; import { Effect, Schema } from "effect"; -import { toReducerDecodeError, type OrchestrationReducerDecodeError } from "./Errors"; +import { toReducerDecodeError, type OrchestrationReducerDecodeError } from "./Errors.ts"; type ThreadPatch = Partial>; @@ -34,9 +34,9 @@ function decodeForEvent( eventType: string, field: string, ): Effect.Effect { - return Schema.decodeUnknown(schema)(value).pipe( + return Schema.decodeUnknownEffect(schema)(value).pipe( Effect.mapError(toReducerDecodeError(`${eventType}:${field}`)), - ); + ) as Effect.Effect } const ThreadCreatedPayloadSchema = Schema.Struct({ @@ -61,7 +61,7 @@ const ThreadMetaUpdatedPayloadSchema = Schema.Struct({ const MessageSentPayloadSchema = Schema.Struct({ id: Schema.String, - role: Schema.Literal("user", "assistant"), + role: Schema.Literals(["user", "assistant"]), text: Schema.String, threadId: Schema.String, createdAt: Schema.String, diff --git a/apps/server/src/persistence/Errors.ts b/apps/server/src/persistence/Errors.ts index 940357abe34a19f350bcdd64eec8ed6e9cc974d1..d6363f6abeb7f6b64eca519a70c862ce8a809f81 100644 --- a/apps/server/src/persistence/Errors.ts +++ b/apps/server/src/persistence/Errors.ts @@ -1,6 +1,6 @@ -import { ParseResult, Schema } from "effect"; +import { Schema, SchemaIssue } from "effect"; -export class PersistenceSqlError extends Schema.TaggedError()( +export class PersistenceSqlError extends Schema.TaggedErrorClass()( "PersistenceSqlError", { operation: Schema.String, @@ -13,7 +13,7 @@ export class PersistenceSqlError extends Schema.TaggedError } } -export class PersistenceDecodeError extends Schema.TaggedError()( +export class PersistenceDecodeError extends Schema.TaggedErrorClass()( "PersistenceDecodeError", { operation: Schema.String, @@ -26,7 +26,7 @@ export class PersistenceDecodeError extends Schema.TaggedError()( +export class PersistenceSerializationError extends Schema.TaggedErrorClass()( "PersistenceSerializationError", { operation: Schema.String, @@ -39,7 +39,7 @@ export class PersistenceSerializationError extends Schema.TaggedError()( +export class ProjectValidationError extends Schema.TaggedErrorClass()( "ProjectValidationError", { operation: Schema.String, @@ -52,7 +52,7 @@ export class ProjectValidationError extends Schema.TaggedError()( +export class ProjectPathMissingError extends Schema.TaggedErrorClass()( "ProjectPathMissingError", { cwd: Schema.String, @@ -64,7 +64,7 @@ export class ProjectPathMissingError extends Schema.TaggedError()( +export class ProjectNotFoundError extends Schema.TaggedErrorClass()( "ProjectNotFoundError", { projectId: Schema.String, @@ -99,10 +99,10 @@ export function toPersistenceSqlError(operation: string) { } export function toPersistenceDecodeError(operation: string) { - return (error: ParseResult.ParseError): PersistenceDecodeError => + return (error: Schema.SchemaError): PersistenceDecodeError => new PersistenceDecodeError({ operation, - issue: ParseResult.TreeFormatter.formatErrorSync(error), + issue: SchemaIssue.makeFormatterDefault()(error.issue), cause: error, }); } diff --git a/apps/server/src/persistence/Layers/OrchestrationEvents.test.ts b/apps/server/src/persistence/Layers/OrchestrationEvents.test.ts index e9ca28dff0426c196f9b7dba869fa61e1df7b391..0959c691e39b95bc337a4cc3481bfcae1fa8ff36 100644 --- a/apps/server/src/persistence/Layers/OrchestrationEvents.test.ts +++ b/apps/server/src/persistence/Layers/OrchestrationEvents.test.ts @@ -3,11 +3,11 @@ import os from "node:os"; import path from "node:path"; import { DatabaseSync } from "node:sqlite"; -import { Runtime, ManagedRuntime } from "effect"; +import { ManagedRuntime, Effect } from "effect"; import { afterEach, describe, expect, it } from "vitest"; -import { OrchestrationEventRepository } from "../Services/OrchestrationEvents"; -import { makeSqliteOrchestrationEventRepositoryLive } from "./OrchestrationEvents"; +import { OrchestrationEventRepository } from "../Services/OrchestrationEvents.ts"; +import { makeSqliteOrchestrationEventRepositoryLive } from "./OrchestrationEvents.ts"; const tempDirs: string[] = []; @@ -27,12 +27,12 @@ describe("OrchestrationEventRepository", () => { it("persists and replays events across restarts", async () => { const stateDir = makeTempDir("t3code-event-store-"); const dbPath = path.join(stateDir, "orchestration.sqlite"); - const runtime = Runtime.defaultRuntime; + const createdAt = new Date().toISOString(); const firstRuntime = ManagedRuntime.make(makeSqliteOrchestrationEventRepositoryLive(dbPath)); - const first = await firstRuntime.runPromise(OrchestrationEventRepository); - const saved = await Runtime.runPromise(runtime)( + const first = await firstRuntime.runPromise(Effect.service(OrchestrationEventRepository)); + const saved = await firstRuntime.runPromise( first.append({ eventId: "event-1", type: "thread.created", @@ -47,8 +47,8 @@ describe("OrchestrationEventRepository", () => { await firstRuntime.dispose(); const secondRuntime = ManagedRuntime.make(makeSqliteOrchestrationEventRepositoryLive(dbPath)); - const second = await secondRuntime.runPromise(OrchestrationEventRepository); - const replayed = await Runtime.runPromise(runtime)(second.readFromSequence(0)); + const second = await secondRuntime.runPromise(Effect.service(OrchestrationEventRepository)); + const replayed = await secondRuntime.runPromise(second.readFromSequence(0)); expect(replayed).toEqual([saved]); await secondRuntime.dispose(); }); @@ -56,16 +56,16 @@ describe("OrchestrationEventRepository", () => { it("creates and reuses the migrator tracking table", async () => { const stateDir = makeTempDir("t3code-event-store-migrations-"); const dbPath = path.join(stateDir, "orchestration.sqlite"); - const runtime = Runtime.defaultRuntime; + const firstRuntime = ManagedRuntime.make(makeSqliteOrchestrationEventRepositoryLive(dbPath)); - const first = await firstRuntime.runPromise(OrchestrationEventRepository); - await Runtime.runPromise(runtime)(first.readAll()); + const first = await firstRuntime.runPromise(Effect.service(OrchestrationEventRepository)); + await firstRuntime.runPromise(first.readAll()); await firstRuntime.dispose(); const secondRuntime = ManagedRuntime.make(makeSqliteOrchestrationEventRepositoryLive(dbPath)); - const second = await secondRuntime.runPromise(OrchestrationEventRepository); - await Runtime.runPromise(runtime)(second.readAll()); + const second = await secondRuntime.runPromise(Effect.service(OrchestrationEventRepository)); + await secondRuntime.runPromise(second.readAll()); await secondRuntime.dispose(); const db = new DatabaseSync(dbPath, { readOnly: true }); diff --git a/apps/server/src/persistence/Layers/OrchestrationEvents.ts b/apps/server/src/persistence/Layers/OrchestrationEvents.ts index d3a6841105907dd5d9bbd79b970330bcb195c455..bbbc26c84237f430fd99d6bf9c4e2cc727105fb1 100644 --- a/apps/server/src/persistence/Layers/OrchestrationEvents.ts +++ b/apps/server/src/persistence/Layers/OrchestrationEvents.ts @@ -1,7 +1,7 @@ import type { OrchestrationEvent } from "@t3tools/contracts"; import { OrchestrationEventSchema } from "@t3tools/contracts"; -import * as SqlClient from "@effect/sql/SqlClient"; -import * as SqlSchema from "@effect/sql/SqlSchema"; +import * as SqlClient from "effect/unstable/sql/SqlClient"; +import * as SqlSchema from "effect/unstable/sql/SqlSchema"; import { Effect, Layer, Schema } from "effect"; import { @@ -10,14 +10,14 @@ import { toPersistenceSerializationError, toPersistenceSqlError, type OrchestrationEventRepositoryError, -} from "../Errors"; -import { makeSqlitePersistenceLive } from "./Sqlite"; +} from "../Errors.ts"; +import { makeSqlitePersistenceLive } from "./Sqlite.ts"; import { OrchestrationEventRepository, type OrchestrationEventRepositoryShape, -} from "../Services/OrchestrationEvents"; +} from "../Services/OrchestrationEvents.ts"; -const decodeEvent = Schema.decodeUnknown(OrchestrationEventSchema); +const decodeEvent = Schema.decodeUnknownEffect(OrchestrationEventSchema); const EventRowSchema = Schema.Struct({ sequence: Schema.Number, @@ -73,7 +73,7 @@ function eventRowToOrchestrationEvent( const makeRepository = Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; - const appendEventRow = SqlSchema.single({ + const appendEventRow = SqlSchema.findOne({ Request: AppendEventRequestSchema, Result: EventRowSchema, execute: (request) => diff --git a/apps/server/src/persistence/Layers/Projects.test.ts b/apps/server/src/persistence/Layers/Projects.test.ts index a53ca6b221063ee12eda225dd02165b8f44facde..c8ee6215c92f26121a623908bfe37963979f99f0 100644 --- a/apps/server/src/persistence/Layers/Projects.test.ts +++ b/apps/server/src/persistence/Layers/Projects.test.ts @@ -2,12 +2,12 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import { Layer, ManagedRuntime } from "effect"; +import { Effect, Layer, ManagedRuntime } from "effect"; import { afterEach, describe, expect, it } from "vitest"; -import { ProjectRepository } from "../Services/Projects"; -import { ProjectRepositoryLive } from "./Projects"; -import { makeSqlitePersistenceLive } from "./Sqlite"; +import { ProjectRepository } from "../Services/Projects.ts"; +import { ProjectRepositoryLive } from "./Projects.ts"; +import { makeSqlitePersistenceLive } from "./Sqlite.ts"; function makeProjectRepositoryTest(dbPath: string) { return ProjectRepositoryLive.pipe(Layer.provide(makeSqlitePersistenceLive(dbPath))); @@ -34,7 +34,7 @@ describe("ProjectRepository", () => { const dbPath = path.join(stateDir, "orchestration.sqlite"); const firstRuntime = ManagedRuntime.make(makeProjectRepositoryTest(dbPath)); - const first = await firstRuntime.runPromise(ProjectRepository); + const first = await firstRuntime.runPromise(Effect.service(ProjectRepository)); const created = await firstRuntime.runPromise(first.add({ cwd: projectDir })); expect(created.created).toBe(true); @@ -46,7 +46,7 @@ describe("ProjectRepository", () => { await firstRuntime.dispose(); const secondRuntime = ManagedRuntime.make(makeProjectRepositoryTest(dbPath)); - const second = await secondRuntime.runPromise(ProjectRepository); + const second = await secondRuntime.runPromise(Effect.service(ProjectRepository)); const listed = await secondRuntime.runPromise(second.list()); expect(listed).toHaveLength(1); @@ -62,7 +62,7 @@ describe("ProjectRepository", () => { const dbPath = path.join(stateDir, "orchestration.sqlite"); const runtime = ManagedRuntime.make(makeProjectRepositoryTest(dbPath)); - const repository = await runtime.runPromise(ProjectRepository); + const repository = await runtime.runPromise(Effect.service(ProjectRepository)); const existingProject = await runtime.runPromise(repository.add({ cwd: existing })); const missingProject = await runtime.runPromise(repository.add({ cwd: missing })); diff --git a/apps/server/src/persistence/Layers/Projects.ts b/apps/server/src/persistence/Layers/Projects.ts index 1504545def06626d4f1f4fbb1fa328a016baa5a4..bbda8fa644a7cad6ed147105c5a4195a13e99475 100644 --- a/apps/server/src/persistence/Layers/Projects.ts +++ b/apps/server/src/persistence/Layers/Projects.ts @@ -19,8 +19,8 @@ import { projectScriptsSchema, projectUpdateScriptsInputSchema, } from "@t3tools/contracts"; -import * as SqlClient from "@effect/sql/SqlClient"; -import * as SqlSchema from "@effect/sql/SqlSchema"; +import * as SqlClient from "effect/unstable/sql/SqlClient"; +import * as SqlSchema from "effect/unstable/sql/SqlSchema"; import { Effect, Layer, Option, Schema } from "effect"; import { @@ -32,8 +32,8 @@ import { toPersistenceSerializationError, toPersistenceSqlError, type ProjectRepositoryError, -} from "../Errors"; -import { ProjectRepository, type ProjectRepositoryShape } from "../Services/Projects"; +} from "../Errors.ts"; +import { ProjectRepository, type ProjectRepositoryShape } from "../Services/Projects.ts"; const ProjectRowSchema = Schema.Struct({ id: Schema.String, @@ -226,7 +226,7 @@ const makeRepository = Effect.gen(function* () { `, }); - const findProjectById = SqlSchema.findOne({ + const findProjectById = SqlSchema.findOneOption({ Request: FindByIdRequestSchema, Result: ProjectRowSchema, execute: ({ id }) => @@ -243,7 +243,7 @@ const makeRepository = Effect.gen(function* () { `, }); - const findProjectByCwd = SqlSchema.findOne({ + const findProjectByCwd = SqlSchema.findOneOption({ Request: FindByCwdRequestSchema, Result: ProjectRowSchema, execute: ({ cwd }) => @@ -260,7 +260,7 @@ const makeRepository = Effect.gen(function* () { `, }); - const insertProject = SqlSchema.single({ + const insertProject = SqlSchema.findOne({ Request: InsertProjectRequestSchema, Result: ProjectRowSchema, execute: (request) => @@ -291,7 +291,7 @@ const makeRepository = Effect.gen(function* () { `, }); - const updateProjectScripts = SqlSchema.single({ + const updateProjectScripts = SqlSchema.findOne({ Request: UpdateScriptsRequestSchema, Result: ProjectRowSchema, execute: (request) => @@ -381,7 +381,7 @@ const makeRepository = Effect.gen(function* () { Effect.mapError(toPersistenceSqlError("ProjectRepository.remove:findById")), ); if (Option.isNone(existing)) { - return yield* Effect.fail(new ProjectNotFoundError({ projectId: input.id })); + return yield* (new ProjectNotFoundError({ projectId: input.id })); } yield* deleteProject({ id: input.id }).pipe( @@ -396,7 +396,7 @@ const makeRepository = Effect.gen(function* () { Effect.mapError(toPersistenceSqlError("ProjectRepository.updateScripts:findById")), ); if (Option.isNone(existing)) { - return yield* Effect.fail(new ProjectNotFoundError({ projectId: input.id })); + return yield* (new ProjectNotFoundError({ projectId: input.id })); } const nextScripts = yield* parseProjectScripts( diff --git a/apps/server/src/persistence/Layers/Sqlite.ts b/apps/server/src/persistence/Layers/Sqlite.ts index 735a4252215400d5dd99d6738855189abd46c96b..c8ea33b12ebb6bc1ee6c3c659112cf57b1b196bf 100644 --- a/apps/server/src/persistence/Layers/Sqlite.ts +++ b/apps/server/src/persistence/Layers/Sqlite.ts @@ -1,30 +1,32 @@ import fs from "node:fs"; import path from "node:path"; -import * as SqlClient from "@effect/sql/SqlClient"; +import * as SqlClient from "effect/unstable/sql/SqlClient"; import * as SqliteClient from "@effect/sql-sqlite-node/SqliteClient"; -import { Context, Effect, Layer } from "effect"; +import { Effect, Layer, ServiceMap } from "effect"; -import { runMigrations } from "../Migrations"; + + +import { runMigrations } from "../Migrations.ts"; export interface PersistenceConfigShape { readonly dbPath: string; } -export class PersistenceConfig extends Context.Tag("persistence/Config")< +export class PersistenceConfig extends ServiceMap.Service< PersistenceConfig, PersistenceConfigShape ->() {} +>()("persistence/Config") {} export function makeSqlitePersistenceLive(dbPath: string) { - const SqliteClientLive = Layer.unwrapEffect( + const SqliteClientLive = Layer.unwrap( Effect.sync(() => { fs.mkdirSync(path.dirname(dbPath), { recursive: true }); return SqliteClient.layer({ filename: dbPath }); }), ); - return Layer.scoped( + return Layer.effect( SqlClient.SqlClient, Effect.gen(function* () { const sql = yield* SqliteClient.SqliteClient; @@ -36,6 +38,7 @@ export function makeSqlitePersistenceLive(dbPath: string) { ).pipe(Layer.provide(SqliteClientLive)); } -export const SqlitePersistenceLive = Layer.unwrapEffect( - Effect.map(PersistenceConfig, ({ dbPath }) => makeSqlitePersistenceLive(dbPath)), + +export const SqlitePersistenceLive = Layer.unwrap( + Effect.map(Effect.service(PersistenceConfig), ({ dbPath }) => makeSqlitePersistenceLive(dbPath)), ); diff --git a/apps/server/src/persistence/Migrations.ts b/apps/server/src/persistence/Migrations.ts index 628fecf88a560ea4d68bf1cd596cbe6f7994652b..d289361f913252c4d849690f265e39847f8443cf 100644 --- a/apps/server/src/persistence/Migrations.ts +++ b/apps/server/src/persistence/Migrations.ts @@ -8,7 +8,7 @@ * ensuring the database schema is always up-to-date before the application starts. */ -import * as Migrator from "@effect/sql/Migrator"; +import * as Migrator from "effect/unstable/sql/Migrator"; import * as Layer from "effect/Layer"; // Import all migrations statically @@ -57,11 +57,11 @@ export const runMigrations = run({ loader }); * @example * ```typescript * import { MigrationsLive } from "@acme/db/Migrations" - * import { PgClient } from "@effect/sql-pg" + * import { SqliteClient } from "@effect/sql-sqlite-node" * - * // Migrations run automatically when PgClient is provided + * // Migrations run automatically when SqliteClient is provided * const AppLayer = MigrationsLive.pipe( - * Layer.provideMerge(PgClient.layer({ url: Redacted.make("postgresql://...") })) + * Layer.provideMerge(SqliteClient.layer({ filename: "database.sqlite" })) * ) * ``` */ diff --git a/apps/server/src/persistence/Migrations/001_OrchestrationEvents.ts b/apps/server/src/persistence/Migrations/001_OrchestrationEvents.ts index dac64e9e282f0f9bca7ad2b0a4d158af158d3dd2..5e2ac44ee7d84be9775b8094b5fb36db4928fc4f 100644 --- a/apps/server/src/persistence/Migrations/001_OrchestrationEvents.ts +++ b/apps/server/src/persistence/Migrations/001_OrchestrationEvents.ts @@ -1,4 +1,4 @@ -import { SqlClient } from "@effect/sql"; +import * as SqlClient from "effect/unstable/sql/SqlClient"; import * as Effect from "effect/Effect"; export default Effect.gen(function* () { diff --git a/apps/server/src/persistence/Migrations/002_Projects.ts b/apps/server/src/persistence/Migrations/002_Projects.ts index 7ec9785f699fb3e9bc87fb6eac3e5af5cdbddb04..f061da2c9a48efca8b6430607bc8335d4d752fe9 100644 --- a/apps/server/src/persistence/Migrations/002_Projects.ts +++ b/apps/server/src/persistence/Migrations/002_Projects.ts @@ -1,4 +1,4 @@ -import { SqlClient } from "@effect/sql"; +import * as SqlClient from "effect/unstable/sql/SqlClient"; import * as Effect from "effect/Effect"; export default Effect.gen(function* () { diff --git a/apps/server/src/persistence/Services/OrchestrationEvents.ts b/apps/server/src/persistence/Services/OrchestrationEvents.ts index 745b54902daa6f3b64ecbbecbb0b4c67ade6317c..6761bf9823659769f354e0275e617f0e96965b25 100644 --- a/apps/server/src/persistence/Services/OrchestrationEvents.ts +++ b/apps/server/src/persistence/Services/OrchestrationEvents.ts @@ -7,10 +7,10 @@ * @module OrchestrationEventRepository */ import type { OrchestrationEvent } from "@t3tools/contracts"; -import { Context } from "effect"; +import { ServiceMap } from "effect"; import type { Effect } from "effect"; -import type { OrchestrationEventRepositoryError } from "../Errors"; +import type { OrchestrationEventRepositoryError } from "../Errors.ts"; export interface OrchestrationEventRepositoryShape { /** @@ -54,7 +54,7 @@ export interface OrchestrationEventRepositoryShape { * }) * ``` */ -export class OrchestrationEventRepository extends Context.Tag("orchestration/EventRepository")< +export class OrchestrationEventRepository extends ServiceMap.Service< OrchestrationEventRepository, OrchestrationEventRepositoryShape ->() {} +>()("orchestration/EventRepository") {} diff --git a/apps/server/src/persistence/Services/Projects.ts b/apps/server/src/persistence/Services/Projects.ts index f16e5c49cdddb59262d1b11176c0a465820525c0..5f8a67c7840593a963a06355d71a9c1097942021 100644 --- a/apps/server/src/persistence/Services/Projects.ts +++ b/apps/server/src/persistence/Services/Projects.ts @@ -14,10 +14,10 @@ import type { ProjectUpdateScriptsInput, ProjectUpdateScriptsResult, } from "@t3tools/contracts"; -import { Context } from "effect"; +import { ServiceMap } from "effect"; import type { Effect } from "effect"; -import type { ProjectRepositoryError } from "../Errors"; +import type { ProjectRepositoryError } from "../Errors.ts"; export interface ProjectRepositoryShape { /** @@ -72,7 +72,7 @@ export interface ProjectRepositoryShape { * }) * ``` */ -export class ProjectRepository extends Context.Tag("persistence/ProjectRepository")< +export class ProjectRepository extends ServiceMap.Service< ProjectRepository, ProjectRepositoryShape ->() {} +>()("persistence/ProjectRepository") {} diff --git a/apps/server/src/wsServer.test.ts b/apps/server/src/wsServer.test.ts index c977418f05d69acd3bef5c52c031892196c4e0c3..ade1641154361524f438dbbba18d5d1e8e1f42eb 100644 --- a/apps/server/src/wsServer.test.ts +++ b/apps/server/src/wsServer.test.ts @@ -3,7 +3,7 @@ import os from "node:os"; import path from "node:path"; import { EventEmitter } from "node:events"; -import { Layer, ManagedRuntime } from "effect"; +import { Effect, Layer, ManagedRuntime } from "effect"; import { describe, expect, it, afterEach, vi } from "vitest"; import { createServer } from "./wsServer"; import WebSocket from "ws"; @@ -1039,7 +1039,7 @@ describe("WebSocket Server", () => { Layer.provide(makeSqlitePersistenceLive(path.join(stateDir, "orchestration.sqlite"))), ), ); - const projectRepository = await projectRuntime.runPromise(ProjectRepository); + const projectRepository = await projectRuntime.runPromise(Effect.service(ProjectRepository)); await projectRuntime.runPromise(projectRepository.add({ cwd: existing })); await projectRuntime.runPromise(projectRepository.add({ cwd: missing })); await projectRuntime.dispose(); diff --git a/apps/server/src/wsServer.ts b/apps/server/src/wsServer.ts index 42fb00d352692958f6d4f8165cb502fea86e21ee..d9fde1cb735800b75e1a6985cba447c0d8c6f422 100644 --- a/apps/server/src/wsServer.ts +++ b/apps/server/src/wsServer.ts @@ -18,7 +18,7 @@ import { type WsResponse, wsRequestSchema, } from "@t3tools/contracts"; -import { Layer, ManagedRuntime } from "effect"; +import { Effect, Layer, ManagedRuntime } from "effect"; import { WebSocketServer, type WebSocket } from "ws"; import { createLogger } from "./logger"; @@ -747,8 +747,8 @@ export function createServer(options: ServerOptions) { try { const [nextOrchestrationEngine, repository] = await Promise.all([ - runtime.runPromise(OrchestrationEngineService), - runtime.runPromise(ProjectRepository), + runtime.runPromise(Effect.service(OrchestrationEngineService)), + runtime.runPromise(Effect.service(ProjectRepository)), ]); orchestrationEngine = nextOrchestrationEngine; projectRepository = repository; diff --git a/bun.lock b/bun.lock index 2528167f3753aa4332a60612df2b423f7395d3c5..0292e127a49bf96fb40650bf8a0ee3e23daef546 100644 --- a/bun.lock +++ b/bun.lock @@ -34,22 +34,22 @@ "t3": "./dist/index.mjs", }, "dependencies": { - "@effect/platform": "^0.94.5", - "@effect/platform-node": "^0.104.1", - "@effect/sql": "^0.49.0", - "@effect/sql-sqlite-node": "^0.50.1", - "effect": "^3.19.19", + "@effect/platform-node": "4.0.0-beta.10", + "@effect/sql-sqlite-node": "4.0.0-beta.10", + "effect": "4.0.0-beta.10", "node-pty": "^1.1.0", "open": "^10.1.0", "ws": "^8.18.0", }, "devDependencies": { + "@effect/vitest": "4.0.0-beta.10", "@t3tools/contracts": "workspace:*", "@t3tools/web": "workspace:*", "@types/node": "^22.10.2", "@types/ws": "^8.5.13", "tsdown": "^0.20.3", "typescript": "^5.7.3", + "vitest": "^4.0.0", }, }, "apps/web": { @@ -92,7 +92,7 @@ "name": "@t3tools/contracts", "version": "0.0.0", "dependencies": { - "effect": "^3.19.19", + "effect": "4.0.0-beta.10", "zod": "^3.24.1", }, "devDependencies": { @@ -150,23 +150,13 @@ "@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=="], - "@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=="], + "@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=="], - "@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=="], + "@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=="], - "@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=="], + "@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=="], - "@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=="], - - "@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=="], - - "@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=="], - - "@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=="], - - "@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=="], - - "@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=="], + "@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=="], "@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=="], @@ -258,6 +248,8 @@ "@inquirer/type": ["@inquirer/type@3.0.10", "", { "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA=="], + "@ioredis/commands": ["@ioredis/commands@1.5.0", "", {}, "sha512-eUgLqrMf8nJkZxT24JvVRrQya1vZkQh8BBeYNwGDqa5I0VUi8ACx7uFvAaLxintokpTenkK6DASvo/bvNbBGow=="], + "@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=="], "@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 @@ "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.46.0", "", { "os": "win32", "cpu": "x64" }, "sha512-DJbQsSJUr4KSi9uU0QqOgI7PX2C+fKGZX+YDprt3vM2sC0dWZsgVTLoN2vtkNyEWJSY2mnvRFUshWXT3bmo0Ug=="], - "@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=="], - - "@parcel/watcher-android-arm64": ["@parcel/watcher-android-arm64@2.5.6", "", { "os": "android", "cpu": "arm64" }, "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A=="], - - "@parcel/watcher-darwin-arm64": ["@parcel/watcher-darwin-arm64@2.5.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA=="], - - "@parcel/watcher-darwin-x64": ["@parcel/watcher-darwin-x64@2.5.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg=="], - - "@parcel/watcher-freebsd-x64": ["@parcel/watcher-freebsd-x64@2.5.6", "", { "os": "freebsd", "cpu": "x64" }, "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng=="], - - "@parcel/watcher-linux-arm-glibc": ["@parcel/watcher-linux-arm-glibc@2.5.6", "", { "os": "linux", "cpu": "arm" }, "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ=="], - - "@parcel/watcher-linux-arm-musl": ["@parcel/watcher-linux-arm-musl@2.5.6", "", { "os": "linux", "cpu": "arm" }, "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg=="], - - "@parcel/watcher-linux-arm64-glibc": ["@parcel/watcher-linux-arm64-glibc@2.5.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA=="], - - "@parcel/watcher-linux-arm64-musl": ["@parcel/watcher-linux-arm64-musl@2.5.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA=="], - - "@parcel/watcher-linux-x64-glibc": ["@parcel/watcher-linux-x64-glibc@2.5.6", "", { "os": "linux", "cpu": "x64" }, "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ=="], - - "@parcel/watcher-linux-x64-musl": ["@parcel/watcher-linux-x64-musl@2.5.6", "", { "os": "linux", "cpu": "x64" }, "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg=="], - - "@parcel/watcher-win32-arm64": ["@parcel/watcher-win32-arm64@2.5.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q=="], - - "@parcel/watcher-win32-ia32": ["@parcel/watcher-win32-ia32@2.5.6", "", { "os": "win32", "cpu": "ia32" }, "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g=="], - - "@parcel/watcher-win32-x64": ["@parcel/watcher-win32-x64@2.5.6", "", { "os": "win32", "cpu": "x64" }, "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw=="], - "@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=="], "@quansync/fs": ["@quansync/fs@1.0.0", "", { "dependencies": { "quansync": "^1.0.0" } }, "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ=="], @@ -710,6 +674,8 @@ "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], + "cluster-key-slot": ["cluster-key-slot@1.1.2", "", {}, "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA=="], + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], @@ -750,6 +716,8 @@ "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="], + "denque": ["denque@2.1.0", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="], + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], @@ -764,7 +732,7 @@ "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=="], - "effect": ["effect@3.19.19", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "fast-check": "^3.23.1" } }, "sha512-Yc8U/SVXo2dHnaP7zNBlAo83h/nzSJpi7vph6Hzyl4ulgMBIgPmz3UzOjb9sBgpFE00gC0iETR244sfXDNLHRg=="], + "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=="], "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=="], @@ -814,7 +782,7 @@ "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=="], - "fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="], + "fast-check": ["fast-check@4.5.3", "", { "dependencies": { "pure-rand": "^7.0.0" } }, "sha512-IE9csY7lnhxBnA8g/WI5eg/hygA6MGWJMSNfFRrBlXUciADEhS1EDB0SIsMSvzubzIlOBbVITSsypCsW717poA=="], "fd-slicer": ["fd-slicer@1.1.0", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="], @@ -908,10 +876,12 @@ "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], - "ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="], + "ini": ["ini@6.0.0", "", {}, "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ=="], "inline-style-parser": ["inline-style-parser@0.2.7", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="], + "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=="], + "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="], "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 @@ "lodash": ["lodash@4.17.23", "", {}, "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w=="], + "lodash.defaults": ["lodash.defaults@4.2.0", "", {}, "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="], + "lodash.difference": ["lodash.difference@4.5.0", "", {}, "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA=="], + "lodash.isarguments": ["lodash.isarguments@3.1.0", "", {}, "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg=="], + "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="], "lowercase-keys": ["lowercase-keys@2.0.0", "", {}, "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="], @@ -1098,7 +1072,7 @@ "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], - "mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="], + "mime": ["mime@4.1.0", "", { "bin": { "mime": "bin/cli.js" } }, "sha512-X5ju04+cAzsojXKes0B/S4tcYtFAJ6tTMuSPBEn9CPGlrWr8Fiw7qYeLT0XyH80HSoAoqWCaz+MWKh22P7G1cw=="], "mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="], @@ -1188,7 +1162,7 @@ "pump": ["pump@3.0.3", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA=="], - "pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="], + "pure-rand": ["pure-rand@7.0.1", "", {}, "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ=="], "quansync": ["quansync@1.0.0", "", {}, "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA=="], @@ -1210,6 +1184,10 @@ "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=="], + "redis-errors": ["redis-errors@1.2.0", "", {}, "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w=="], + + "redis-parser": ["redis-parser@3.0.0", "", { "dependencies": { "redis-errors": "^1.0.0" } }, "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A=="], + "regex": ["regex@6.1.0", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="], "regex-recursion": ["regex-recursion@6.0.2", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="], @@ -1290,6 +1268,8 @@ "stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="], + "standard-as-callback": ["standard-as-callback@2.1.0", "", {}, "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A=="], + "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], "std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="], @@ -1350,6 +1330,8 @@ "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + "toml": ["toml@3.0.0", "", {}, "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w=="], + "tough-cookie": ["tough-cookie@6.0.0", "", { "dependencies": { "tldts": "^7.0.5" } }, "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w=="], "tree-kill": ["tree-kill@1.2.2", "", { "bin": { "tree-kill": "cli.js" } }, "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="], @@ -1420,7 +1402,7 @@ "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], - "uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="], + "uuid": ["uuid@13.0.0", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w=="], "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], @@ -1450,6 +1432,8 @@ "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + "yaml": ["yaml@2.8.2", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A=="], + "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=="], "yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="], @@ -1530,6 +1514,8 @@ "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], + "rc/ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="], + "readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], "recast/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 87ccb84cef60a9cca28065908676774a5cd76777..c4843f4d79d6c841117479569d397ee48c4feceb 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -23,7 +23,7 @@ "test": "vitest run" }, "dependencies": { - "effect": "^3.19.19", + "effect": "4.0.0-beta.10", "zod": "^3.24.1" }, "devDependencies": { diff --git a/packages/contracts/src/orchestration.ts b/packages/contracts/src/orchestration.ts index 22f1c6411f185bd5c1a97183eca375c3bea9ec1f..ce12299721b7c6f6d872b2781c86dcf57d24ad6f 100644 --- a/packages/contracts/src/orchestration.ts +++ b/packages/contracts/src/orchestration.ts @@ -16,7 +16,7 @@ const IdSchema = Schema.String; export const OrchestrationMessageSchema = Schema.Struct({ id: IdSchema, - role: Schema.Literal("user", "assistant"), + role: Schema.Literals(["user", "assistant"]), text: Schema.String, createdAt: IsoDateTimeSchema, streaming: Schema.Boolean, @@ -26,8 +26,8 @@ export type OrchestrationMessage = Schema.Schema.Type; -- 2.54.0