effect v4
This commit is contained in:
1 parent
2c8e35ceb8
commit
b0c9c2a56e
23 files changed
+172
-187
No files matched your search
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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<OrchestrationCommandJsonParseError>()(
|
||||
export class OrchestrationCommandJsonParseError extends Schema.TaggedErrorClass<OrchestrationCommandJsonParseError>()(
|
||||
"OrchestrationCommandJsonParseError",
|
||||
{
|
||||
detail: Schema.String,
|
||||
@@ -14,7 +14,7 @@ export class OrchestrationCommandJsonParseError extends Schema.TaggedError<Orche
|
||||
}
|
||||
}
|
||||
|
||||
export class OrchestrationCommandDecodeError extends Schema.TaggedError<OrchestrationCommandDecodeError>()(
|
||||
export class OrchestrationCommandDecodeError extends Schema.TaggedErrorClass<OrchestrationCommandDecodeError>()(
|
||||
"OrchestrationCommandDecodeError",
|
||||
{
|
||||
issue: Schema.String,
|
||||
@@ -26,7 +26,7 @@ export class OrchestrationCommandDecodeError extends Schema.TaggedError<Orchestr
|
||||
}
|
||||
}
|
||||
|
||||
export class OrchestrationReducerDecodeError extends Schema.TaggedError<OrchestrationReducerDecodeError>()(
|
||||
export class OrchestrationReducerDecodeError extends Schema.TaggedErrorClass<OrchestrationReducerDecodeError>()(
|
||||
"OrchestrationReducerDecodeError",
|
||||
{
|
||||
eventType: Schema.String,
|
||||
@@ -39,10 +39,10 @@ export class OrchestrationReducerDecodeError extends Schema.TaggedError<Orchestr
|
||||
}
|
||||
}
|
||||
|
||||
export class OrchestrationListenerCallbackError extends Schema.TaggedError<OrchestrationListenerCallbackError>()(
|
||||
export class OrchestrationListenerCallbackError extends Schema.TaggedErrorClass<OrchestrationListenerCallbackError>()(
|
||||
"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,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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: <A, E>(effect: Effect.Effect<A, E>) => 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(
|
||||
|
||||
@@ -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<OrchestrationEve
|
||||
}
|
||||
}
|
||||
|
||||
const decodeUnknownCommand = Schema.decodeUnknown(OrchestrationCommandSchema);
|
||||
const decodeUnknownCommand = Schema.decodeUnknownEffect(OrchestrationCommandSchema);
|
||||
|
||||
const makeOrchestrationEngine = () =>
|
||||
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<void, OrchestrationDispatchError> = Effect.gen(
|
||||
@@ -287,7 +287,7 @@ const makeOrchestrationEngine = () =>
|
||||
} satisfies OrchestrationEngineShape;
|
||||
});
|
||||
|
||||
export const OrchestrationEngineLive = Layer.scoped(
|
||||
export const OrchestrationEngineLive = Layer.effect(
|
||||
OrchestrationEngineService,
|
||||
makeOrchestrationEngine(),
|
||||
makeOrchestrationEngine,
|
||||
);
|
||||
@@ -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") {}
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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<Omit<OrchestrationThread, "id" | "projectId">>;
|
||||
|
||||
@@ -34,9 +34,9 @@ function decodeForEvent<A>(
|
||||
eventType: string,
|
||||
field: string,
|
||||
): Effect.Effect<A, OrchestrationReducerDecodeError> {
|
||||
return Schema.decodeUnknown(schema)(value).pipe(
|
||||
return Schema.decodeUnknownEffect(schema)(value).pipe(
|
||||
Effect.mapError(toReducerDecodeError(`${eventType}:${field}`)),
|
||||
);
|
||||
) as Effect.Effect<A, OrchestrationReducerDecodeError>
|
||||
}
|
||||
|
||||
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,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ParseResult, Schema } from "effect";
|
||||
import { Schema, SchemaIssue } from "effect";
|
||||
|
||||
export class PersistenceSqlError extends Schema.TaggedError<PersistenceSqlError>()(
|
||||
export class PersistenceSqlError extends Schema.TaggedErrorClass<PersistenceSqlError>()(
|
||||
"PersistenceSqlError",
|
||||
{
|
||||
operation: Schema.String,
|
||||
@@ -13,7 +13,7 @@ export class PersistenceSqlError extends Schema.TaggedError<PersistenceSqlError>
|
||||
}
|
||||
}
|
||||
|
||||
export class PersistenceDecodeError extends Schema.TaggedError<PersistenceDecodeError>()(
|
||||
export class PersistenceDecodeError extends Schema.TaggedErrorClass<PersistenceDecodeError>()(
|
||||
"PersistenceDecodeError",
|
||||
{
|
||||
operation: Schema.String,
|
||||
@@ -26,7 +26,7 @@ export class PersistenceDecodeError extends Schema.TaggedError<PersistenceDecode
|
||||
}
|
||||
}
|
||||
|
||||
export class PersistenceSerializationError extends Schema.TaggedError<PersistenceSerializationError>()(
|
||||
export class PersistenceSerializationError extends Schema.TaggedErrorClass<PersistenceSerializationError>()(
|
||||
"PersistenceSerializationError",
|
||||
{
|
||||
operation: Schema.String,
|
||||
@@ -39,7 +39,7 @@ export class PersistenceSerializationError extends Schema.TaggedError<Persistenc
|
||||
}
|
||||
}
|
||||
|
||||
export class ProjectValidationError extends Schema.TaggedError<ProjectValidationError>()(
|
||||
export class ProjectValidationError extends Schema.TaggedErrorClass<ProjectValidationError>()(
|
||||
"ProjectValidationError",
|
||||
{
|
||||
operation: Schema.String,
|
||||
@@ -52,7 +52,7 @@ export class ProjectValidationError extends Schema.TaggedError<ProjectValidation
|
||||
}
|
||||
}
|
||||
|
||||
export class ProjectPathMissingError extends Schema.TaggedError<ProjectPathMissingError>()(
|
||||
export class ProjectPathMissingError extends Schema.TaggedErrorClass<ProjectPathMissingError>()(
|
||||
"ProjectPathMissingError",
|
||||
{
|
||||
cwd: Schema.String,
|
||||
@@ -64,7 +64,7 @@ export class ProjectPathMissingError extends Schema.TaggedError<ProjectPathMissi
|
||||
}
|
||||
}
|
||||
|
||||
export class ProjectNotFoundError extends Schema.TaggedError<ProjectNotFoundError>()(
|
||||
export class ProjectNotFoundError extends Schema.TaggedErrorClass<ProjectNotFoundError>()(
|
||||
"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,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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 });
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
@@ -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 }));
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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)),
|
||||
);
|
||||
@@ -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" }))
|
||||
* )
|
||||
* ```
|
||||
*/
|
||||
|
||||
@@ -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* () {
|
||||
|
||||
@@ -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* () {
|
||||
|
||||
@@ -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") {}
|
||||
@@ -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") {}
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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/[email protected]", "", { "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/[email protected]", "", { "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/[email protected]", "", { "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/[email protected]", "", { "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/[email protected]", "", { "dependencies": { "@types/ws": "^8.18.1", "ws": "^8.19.0" }, "peerDependencies": { "effect": "^4.0.0-beta.10" } }, "sha512-gBSeOG2bfchXFdgdi5oipHKynOzSd7BlzTy5QcjFOoCUTtLP9igqohPB9hTkV3a6seWE2JJqsgsQ79VuLb7fAg=="],
|
||||
|
||||
"@effect/platform": ["@effect/[email protected]", "", { "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/[email protected]", "", { "dependencies": { "better-sqlite3": "^12.6.2" }, "peerDependencies": { "effect": "^4.0.0-beta.10" } }, "sha512-oQl+gF31HaVM9R8YEpf96CIJypP1Roa5z1VPj8s7ZP+3aCtRVor1K+eMxYNAb8ph7R68Tz0LpmVkefq0mEI3CA=="],
|
||||
|
||||
"@effect/platform-node": ["@effect/[email protected]", "", { "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/[email protected]", "", { "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/[email protected]", "", { "dependencies": { "msgpackr": "^1.11.4" }, "peerDependencies": { "@effect/platform": "^0.94.5", "effect": "^3.19.18" } }, "sha512-td7LHDgBOYKg+VgGWEelD8rSAmvjXz7am17vfxZROX5qIYuvH7drL/z4p5xQFadhHZ7DYdlFpqdO9ggc77OCIw=="],
|
||||
|
||||
"@effect/sql": ["@effect/[email protected]", "", { "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/[email protected]", "", { "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/[email protected]", "", { "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/[email protected]", "", { "peerDependencies": { "effect": "^4.0.0-beta.10", "vitest": "^3.0.0" } }, "sha512-WmE8vCNw+eDoAq9CwwymrAdIBw1f+8hDP3AUF7jyC7/Cj/kyAYOFwkbtKmDXIFaTlf7G/2fmulEXeCO5W8j0kQ=="],
|
||||
|
||||
"@electron/get": ["@electron/[email protected]", "", { "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/[email protected]", "", { "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA=="],
|
||||
|
||||
"@ioredis/commands": ["@ioredis/[email protected]", "", {}, "sha512-eUgLqrMf8nJkZxT24JvVRrQya1vZkQh8BBeYNwGDqa5I0VUi8ACx7uFvAaLxintokpTenkK6DASvo/bvNbBGow=="],
|
||||
|
||||
"@jridgewell/gen-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
|
||||
|
||||
"@jridgewell/remapping": ["@jridgewell/[email protected]", "", { "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/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-DJbQsSJUr4KSi9uU0QqOgI7PX2C+fKGZX+YDprt3vM2sC0dWZsgVTLoN2vtkNyEWJSY2mnvRFUshWXT3bmo0Ug=="],
|
||||
|
||||
"@parcel/watcher": ["@parcel/[email protected]", "", { "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/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A=="],
|
||||
|
||||
"@parcel/watcher-darwin-arm64": ["@parcel/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA=="],
|
||||
|
||||
"@parcel/watcher-darwin-x64": ["@parcel/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg=="],
|
||||
|
||||
"@parcel/watcher-freebsd-x64": ["@parcel/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng=="],
|
||||
|
||||
"@parcel/watcher-linux-arm-glibc": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ=="],
|
||||
|
||||
"@parcel/watcher-linux-arm-musl": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg=="],
|
||||
|
||||
"@parcel/watcher-linux-arm64-glibc": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA=="],
|
||||
|
||||
"@parcel/watcher-linux-arm64-musl": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA=="],
|
||||
|
||||
"@parcel/watcher-linux-x64-glibc": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ=="],
|
||||
|
||||
"@parcel/watcher-linux-x64-musl": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg=="],
|
||||
|
||||
"@parcel/watcher-win32-arm64": ["@parcel/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q=="],
|
||||
|
||||
"@parcel/watcher-win32-ia32": ["@parcel/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g=="],
|
||||
|
||||
"@parcel/watcher-win32-x64": ["@parcel/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw=="],
|
||||
|
||||
"@pierre/diffs": ["@pierre/[email protected]", "", { "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/[email protected]", "", { "dependencies": { "quansync": "^1.0.0" } }, "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ=="],
|
||||
@@ -710,6 +674,8 @@
|
||||
|
||||
"clsx": ["[email protected]", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="],
|
||||
|
||||
"cluster-key-slot": ["[email protected]", "", {}, "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA=="],
|
||||
|
||||
"color-convert": ["[email protected]", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
|
||||
|
||||
"color-name": ["[email protected]", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
||||
@@ -750,6 +716,8 @@
|
||||
|
||||
"delayed-stream": ["[email protected]", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
|
||||
|
||||
"denque": ["[email protected]", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="],
|
||||
|
||||
"dequal": ["[email protected]", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="],
|
||||
|
||||
"detect-libc": ["[email protected]", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
|
||||
@@ -764,7 +732,7 @@
|
||||
|
||||
"dunder-proto": ["[email protected]", "", { "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": ["[email protected]", "", { "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": ["[email protected]", "", { "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": ["[email protected]", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
|
||||
|
||||
@@ -908,10 +876,12 @@
|
||||
|
||||
"inherits": ["[email protected]", "", {}, "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": ["[email protected]", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="],
|
||||
|
||||
"ioredis": ["[email protected]", "", { "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": ["[email protected]", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="],
|
||||
|
||||
"is-alphanumerical": ["[email protected]", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="],
|
||||
@@ -988,8 +958,12 @@
|
||||
|
||||
"lodash": ["[email protected]", "", {}, "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w=="],
|
||||
|
||||
"lodash.defaults": ["[email protected]", "", {}, "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="],
|
||||
|
||||
"lodash.difference": ["[email protected]", "", {}, "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA=="],
|
||||
|
||||
"lodash.isarguments": ["[email protected]", "", {}, "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg=="],
|
||||
|
||||
"longest-streak": ["[email protected]", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="],
|
||||
|
||||
"lowercase-keys": ["[email protected]", "", {}, "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="],
|
||||
@@ -1098,7 +1072,7 @@
|
||||
|
||||
"micromatch": ["[email protected]", "", { "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": ["[email protected]", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
|
||||
|
||||
@@ -1188,7 +1162,7 @@
|
||||
|
||||
"pump": ["[email protected]", "", { "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": ["[email protected]", "", {}, "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA=="],
|
||||
|
||||
@@ -1210,6 +1184,10 @@
|
||||
|
||||
"recast": ["[email protected]", "", { "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": ["[email protected]", "", {}, "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w=="],
|
||||
|
||||
"redis-parser": ["[email protected]", "", { "dependencies": { "redis-errors": "^1.0.0" } }, "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A=="],
|
||||
|
||||
"regex": ["[email protected]", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="],
|
||||
|
||||
"regex-recursion": ["[email protected]", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="],
|
||||
@@ -1290,6 +1268,8 @@
|
||||
|
||||
"stackback": ["[email protected]", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="],
|
||||
|
||||
"standard-as-callback": ["[email protected]", "", {}, "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A=="],
|
||||
|
||||
"statuses": ["[email protected]", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="],
|
||||
|
||||
"std-env": ["[email protected]", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],
|
||||
@@ -1350,6 +1330,8 @@
|
||||
|
||||
"to-regex-range": ["[email protected]", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],
|
||||
|
||||
"toml": ["[email protected]", "", {}, "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w=="],
|
||||
|
||||
"tough-cookie": ["[email protected]", "", { "dependencies": { "tldts": "^7.0.5" } }, "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w=="],
|
||||
|
||||
"tree-kill": ["[email protected]", "", { "bin": { "tree-kill": "cli.js" } }, "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="],
|
||||
@@ -1420,7 +1402,7 @@
|
||||
|
||||
"util-deprecate": ["[email protected]", "", {}, "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": ["[email protected]", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="],
|
||||
|
||||
@@ -1450,6 +1432,8 @@
|
||||
|
||||
"yallist": ["[email protected]", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="],
|
||||
|
||||
"yaml": ["[email protected]", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A=="],
|
||||
|
||||
"yargs": ["[email protected]", "", { "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": ["[email protected]", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
|
||||
@@ -1530,6 +1514,8 @@
|
||||
|
||||
"parse-entities/@types/unist": ["@types/[email protected]", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
|
||||
|
||||
"rc/ini": ["[email protected]", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="],
|
||||
|
||||
"readdirp/picomatch": ["[email protected]", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
||||
|
||||
"recast/source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"test": "vitest run"
|
||||
},
|
||||
"dependencies": {
|
||||
"effect": "^3.19.19",
|
||||
"effect": "4.0.0-beta.10",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -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<typeof OrchestrationMessag
|
||||
|
||||
export const OrchestrationSessionSchema = Schema.Struct({
|
||||
sessionId: IdSchema,
|
||||
status: Schema.Literal("connecting", "ready", "running", "error", "closed"),
|
||||
provider: Schema.Literal("codex", "claudeCode"),
|
||||
status: Schema.Literals(["connecting", "ready", "running", "error", "closed"]),
|
||||
provider: Schema.Literals(["codex", "claudeCode"]),
|
||||
threadId: IdSchema,
|
||||
activeTurnId: Schema.NullOr(Schema.String),
|
||||
createdAt: IsoDateTimeSchema,
|
||||
@@ -94,7 +94,7 @@ export type OrchestrationGitReadModel = Schema.Schema.Type<typeof OrchestrationG
|
||||
export const OrchestrationReadModelSchema = Schema.Struct({
|
||||
sequence: Schema.Number,
|
||||
threads: Schema.Array(OrchestrationThreadSchema),
|
||||
gitByProjectId: Schema.Record({ key: Schema.String, value: OrchestrationGitReadModelSchema }),
|
||||
gitByProjectId: Schema.Record( Schema.String, OrchestrationGitReadModelSchema),
|
||||
updatedAt: IsoDateTimeSchema,
|
||||
});
|
||||
|
||||
@@ -135,7 +135,7 @@ export const SendMessageCommandSchema = Schema.Struct({
|
||||
commandId: IdSchema,
|
||||
threadId: IdSchema,
|
||||
messageId: IdSchema,
|
||||
role: Schema.Literal("user", "assistant"),
|
||||
role: Schema.Literals(["user", "assistant"]),
|
||||
text: Schema.String,
|
||||
streaming: Schema.optional(Schema.Boolean),
|
||||
createdAt: IsoDateTimeSchema,
|
||||
@@ -182,7 +182,7 @@ export const RevertThreadCommandSchema = Schema.Struct({
|
||||
createdAt: IsoDateTimeSchema,
|
||||
});
|
||||
|
||||
export const OrchestrationCommandSchema = Schema.Union(
|
||||
export const OrchestrationCommandSchema = Schema.Union([
|
||||
CreateThreadCommandSchema,
|
||||
DeleteThreadCommandSchema,
|
||||
UpdateThreadMetaCommandSchema,
|
||||
@@ -190,7 +190,7 @@ export const OrchestrationCommandSchema = Schema.Union(
|
||||
SetThreadSessionSchema,
|
||||
UpsertGitReadModelCommandSchema,
|
||||
CompleteThreadTurnDiffCommandSchema,
|
||||
RevertThreadCommandSchema,
|
||||
RevertThreadCommandSchema,]
|
||||
);
|
||||
|
||||
export type OrchestrationCommand = Schema.Schema.Type<typeof OrchestrationCommandSchema>;
|
||||
|
||||
Reference in new issue
Block a user