Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ provider lifecycle, while WorldVM owns execution within an operational world.
Schema Reflection's sequential workflow prototype is a separate library;
WorldVM uses its own Program kernel for new execution.

Schematics and Triplex share Effect `4.0.0-rc.112`, but no Triplex persistence
adapter is shipped here. Schema Reflection's newer source APIs need a tested
Effect pairing before adoption. Independently deployed services exchange
Schematics tests Effect `4.0.3`; verify the selected Triplex or Schema Reflection
release's Effect pairing before an in-process integration. No Triplex persistence
adapter is shipped here. Independently deployed services exchange
serialized contracts. See the [architecture guide](docs/architecture-constellation.md)
for ownership boundaries and the migration sequence.

Expand Down Expand Up @@ -396,7 +396,15 @@ The public homepage is generated by Astro. Its existing JSX prose and diagrams
render at build time without React hydration. Interactive package simulations
load Foldkit and Foldworks (`@foldworks/ui`) as they approach the viewport; they
illustrate the documented APIs rather than executing Schema Reflection packages.
Foldkit 0.156.0 and Foldworks 0.2.0 match the workspace's Effect 4 RC.112 pin.
The workspace tests Foldkit 0.168.0, `@foldkit/ui` 0.168.0,
`@foldkit/vite-plugin` 0.27.1, and Foldworks 0.2.0 against Effect 4.0.3.
Version-scoped exceptions in `pnpm-workspace.yaml` allow Foldkit's exact Effect
4.0.0 peers to use 4.0.3 and Foldworks' older Foldkit/UI peers to use 0.168.0.
The plugin's two exact 4.0.0 platform dependencies are overridden only for that
plugin to keep one tested Effect runtime. The existing algebra 0.1.0 beta peer
exception is also scoped to Effect 4.0.3. These are repository compatibility
decisions, not widened upstream support guarantees: run the strict frozen
install, `pnpm check`, and the homepage/package browser tests when changing them.
The React IDE has a separate browser entry for `/playground` and `/w/{id}`.
Static hosts retain the `index.html` fallback for hosted workspace URLs.

Expand Down
2 changes: 1 addition & 1 deletion alchemy/schematics-api-worker-runtime.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Etag, HttpRouter, HttpServer, HttpServerResponse } from "effect/unstable/http";
import { Etag, HttpRouter, HttpServer, HttpServerResponse } from "effect/http";
import { Layer } from "effect";
import {
handleHostedWorkspaceRequest,
Expand Down
10 changes: 5 additions & 5 deletions alchemy/schematics-api-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ const DEFAULT_REFERER = "https://schematics.pages.dev";
const DEFAULT_TITLE = "Schematics Playground";
const buildSha = process.env["GITHUB_SHA"] ?? "";

const optionalRedacted = (name: string) => Config.option(Config.redacted(name));
const optionalRedacted = (name: string) => Config.option(Config.Redacted(name));

const SchematicsWorkerConfig = Config.all({
openRouterApiKey: optionalRedacted("OPENROUTER_API_KEY"),
apiUrl: Config.withDefault(Config.string("OPENROUTER_API_URL"), OPENROUTER_API_URL),
referer: Config.withDefault(Config.string("SCHEMATICS_REFERER"), DEFAULT_REFERER),
title: Config.withDefault(Config.string("SCHEMATICS_TITLE"), DEFAULT_TITLE),
apiUrl: Config.withDefault(Config.String("OPENROUTER_API_URL"), OPENROUTER_API_URL),
referer: Config.withDefault(Config.String("SCHEMATICS_REFERER"), DEFAULT_REFERER),
title: Config.withDefault(Config.String("SCHEMATICS_TITLE"), DEFAULT_TITLE),
// Optional override for the Cloudflare Artifacts namespace name. Left unset,
// Alchemy derives a unique per-stage name (like `…-pr-20`, `…-prod`), so each
// stage gets its own isolated set of workspace Git repos — matching how the
// Api/Playground workers are named per stage.
artifactsNamespace: Config.option(Config.string("SCHEMATICS_ARTIFACTS_NAMESPACE")),
artifactsNamespace: Config.option(Config.String("SCHEMATICS_ARTIFACTS_NAMESPACE")),
});

export default Cloudflare.Worker(
Expand Down
1 change: 1 addition & 0 deletions apps/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"typecheck": "tsc --noEmit -p tsconfig.homepage.json"
},
"dependencies": {
"@effect/platform-browser": "catalog:",
"@emotion/react": "catalog:",
"@emotion/styled": "catalog:",
"@foldkit/ui": "catalog:",
Expand Down
8 changes: 4 additions & 4 deletions docs/architecture-constellation.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ that lifecycle.

Triplex is the intended durable substrate for definition revisions, immutable
releases, environment channels, observations, transaction history, and
provenance. Schematics and Triplex now share Effect `4.0.0-rc.112`, so their
integration can use shared Effect runtime types. Serialized contracts remain the
provenance. Schematics tests Effect `4.0.3`; verify the selected Triplex release's
Effect compatibility before sharing runtime types. Serialized contracts remain the
boundary for independently deployed services. No Triplex persistence adapter is
shipped in Schematics yet.

Expand Down Expand Up @@ -93,11 +93,11 @@ compatibility aliases can remain while existing examples migrate.

Schematics consumes `@schema-reflection/algebra@0.1.0` directly from npm. It
replaces the incubating `packages/algebra` copy. Its peer metadata still pins
Effect `4.0.0-beta.68`; the workspace allows the tested `4.0.0-rc.112` pairing
Effect `4.0.0-beta.68`; the workspace allows the tested `4.0.3` pairing
explicitly while that package's peer metadata catches up.

The Schema Reflection source workspace has moved to Effect `4.0.0-rc.115`,
while Schematics remains on `4.0.0-rc.112`. Source APIs and published `0.1.0`
while Schematics tests `4.0.3`. Source APIs and published `0.1.0`
packages are separate adoption targets; a source manifest does not establish
the API or peer metadata of an npm release. Test the selected package versions
and their full dependency closure against a compatible Effect release before
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"devDependencies": {
"@types/node": "catalog:",
"alchemy": "2.0.0-beta.77",
"alchemy": "2.0.0-beta.81",
"effect": "catalog:",
"oxfmt": "0.44.0",
"turbo": "2.8.20",
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/artifact-toolkit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Effect, Schema } from "effect";
import { Tool, Toolkit } from "effect/unstable/ai";
import { Tool, Toolkit } from "effect/ai";
import { ToolFailure, ValidationSummary } from "./common-toolkit-schemas";
import { MutationResult } from "./workspace-schemas";
import { SchematicsWorkspace } from "./schematics-workspace";
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/json-toolkit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { codecForPath } from "@schematics/core";
import { Effect, Predicate } from "effect";
import { Tool, Toolkit } from "effect/unstable/ai";
import { Tool, Toolkit } from "effect/ai";
import { ToolFailure } from "./common-toolkit-schemas";
import {
JsonPatchParameters,
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/openrouter-language-model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Effect, Layer, Schema, Stream } from "effect";
import { AiError, IdGenerator, LanguageModel, Response } from "effect/unstable/ai";
import { AiError, IdGenerator, LanguageModel, Response } from "effect/ai";
import {
OpenRouterChatCompletionResponseSchema,
SCHEMATICS_DEFAULT_OPENROUTER_MODEL,
Expand Down
4 changes: 2 additions & 2 deletions packages/agent/src/openrouter-proxy-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type {
SchematicsChatTurnInput,
} from "./types";
import { Effect, Schema } from "effect";
import { FetchHttpClient } from "effect/unstable/http";
import { HttpApiClient } from "effect/unstable/httpapi";
import { FetchHttpClient } from "effect/http";
import { HttpApiClient } from "effect/http-api";
import {
OpenRouterChatCompletionResponseSchema,
SCHEMATICS_DEFAULT_OPENROUTER_MODEL,
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/pdf-toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
type PDFField,
} from "pdf-lib";
import { Effect, Schema } from "effect";
import { Tool, Toolkit } from "effect/unstable/ai";
import { Tool, Toolkit } from "effect/ai";
import { stringifyDocument, type SchematicsDocumentFormat } from "@schematics/core";
import { ToolFailure } from "./common-toolkit-schemas";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/schematics-toolkit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Effect, Layer, Predicate, Schema, Stream } from "effect";
import { Tool, Toolkit } from "effect/unstable/ai";
import { Tool, Toolkit } from "effect/ai";
import type { OpenRouterToolDefinition } from "@schematics/protocol";
import {
BaseWorkspaceToolkit,
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/workspace-toolkit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Effect, Schema } from "effect";
import { Tool, Toolkit } from "effect/unstable/ai";
import { Tool, Toolkit } from "effect/ai";
import type { SchematicsReflection } from "@schematics/core";
import type { ArtifactRef } from "@schematics/protocol";
import { ToolFailure, ValidationSummary } from "./common-toolkit-schemas";
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/test/agent.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { afterEach, describe, expect, it, vi } from "@effect/vitest";
import { PDFDocument } from "pdf-lib";
import { Effect, Layer, Schema, Stream } from "effect";
import { LanguageModel } from "effect/unstable/ai";
import { LanguageModel } from "effect/ai";
import {
createOpenRouterProxyChatAdapter,
createSchematicsChatAdapter,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NodeFileSystem, NodePath } from "@effect/platform-node";
import { Effect, FileSystem, Layer, Path, Schema, Stream } from "effect";
import { LanguageModel } from "effect/unstable/ai";
import { LanguageModel } from "effect/ai";
import { existsSync } from "node:fs";
import {
mkdir,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { NodeHttpClient } from "@effect/platform-node";
import { Effect, Fiber, Schema, Stream } from "effect";
import { RpcClient, RpcSerialization } from "effect/unstable/rpc";
import { RpcClient, RpcSerialization } from "effect/rpc";
import { describe, expect, it, layer } from "@effect/vitest";
import {
createLocalFilesystemArtifactProjectClient,
Expand Down
4 changes: 2 additions & 2 deletions packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
"effect": "catalog:"
},
"devDependencies": {
"alchemy": "2.0.0-beta.77",
"alchemy": "2.0.0-beta.81",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
},
"peerDependencies": {
"alchemy": "^2.0.0-beta.77"
"alchemy": "^2.0.0-beta.81"
}
}
4 changes: 2 additions & 2 deletions packages/cloudflare/src/workspace-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import {
} from "@schematics/protocol";
import { makeSchematicsArtifactProjectRpcLayer } from "@schematics/server/artifact-project-rpc";
import { Effect, Layer, Stream } from "effect";
import { Etag, HttpRouter, HttpServer } from "effect/unstable/http";
import { RpcSerialization, RpcServer } from "effect/unstable/rpc";
import { Etag, HttpRouter, HttpServer } from "effect/http";
import { RpcSerialization, RpcServer } from "effect/rpc";

export interface HostedWorkspaceMetadata {
readonly workspaceId: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/ide/src/SchematicsChatPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useMemo, useState, useSyncExternalStore } from "react";
import { AtomRef } from "effect/unstable/reactivity";
import { AtomRef } from "effect/reactivity";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import MuiCheckbox from "@mui/material/Checkbox";
Expand Down
4 changes: 2 additions & 2 deletions packages/ide/src/artifact-project-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import {
type LoadedArtifactStoreEntry,
} from "@schematics/artifacts";
import { Effect, Queue, Stream } from "effect";
import { FetchHttpClient } from "effect/unstable/http";
import { RpcClient, RpcSerialization } from "effect/unstable/rpc";
import { FetchHttpClient } from "effect/http";
import { RpcClient, RpcSerialization } from "effect/rpc";

interface CreateArtifactRuntimeWorkspaceClientOptions {
readonly title?: string | undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/ide/src/artifact-project-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import type {
ReadArtifactViewsResponse,
} from "@schematics/protocol";
import { Effect, Equal, Fiber, Stream } from "effect";
import { AtomRef } from "effect/unstable/reactivity";
import { AtomRef } from "effect/reactivity";
import { combineRefs, type RefEquality } from "./reactive-ref";

export interface SchematicsArtifactProjectState {
Expand Down
4 changes: 2 additions & 2 deletions packages/ide/src/artifact-workflow-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
type SchematicsArtifactWorkflowService,
} from "@schematics/protocol";
import { Effect, Stream } from "effect";
import { FetchHttpClient } from "effect/unstable/http";
import { RpcClient, RpcSerialization } from "effect/unstable/rpc";
import { FetchHttpClient } from "effect/http";
import { RpcClient, RpcSerialization } from "effect/rpc";

export function createRpcArtifactWorkflowClient(
baseUrl = "",
Expand Down
4 changes: 2 additions & 2 deletions packages/ide/src/deploy-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
type SchematicsDeployService,
} from "@schematics/protocol";
import { Effect, Stream } from "effect";
import { FetchHttpClient } from "effect/unstable/http";
import { RpcClient, RpcSerialization } from "effect/unstable/rpc";
import { FetchHttpClient } from "effect/http";
import { RpcClient, RpcSerialization } from "effect/rpc";

/**
* HTTP RPC client for the server-side deploy engine (`/v1/deploy/rpc`),
Expand Down
2 changes: 1 addition & 1 deletion packages/ide/src/reactive-ref.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Equal, Hash } from "effect";
import { AtomRef } from "effect/unstable/reactivity";
import { AtomRef } from "effect/reactivity";

export type RefEquality<A> = (left: A, right: A) => boolean;

Expand Down
2 changes: 1 addition & 1 deletion packages/ide/src/useSchematicsDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
SchematicsDeployService,
} from "@schematics/protocol";
import { Effect, Fiber, Stream } from "effect";
import { AtomRef } from "effect/unstable/reactivity";
import { AtomRef } from "effect/reactivity";
import { useEffect, useMemo, useSyncExternalStore } from "react";
import { combineRefs } from "./reactive-ref";

Expand Down
8 changes: 4 additions & 4 deletions packages/ingest/src/model-capabilities.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Effect, Schema } from "effect";
import { LanguageModel } from "effect/unstable/ai";
import { LanguageModel } from "effect/ai";
import {
defineArtifactAction,
defineCapability,
Expand Down Expand Up @@ -30,7 +30,7 @@ export const AiLanguageCapability = defineCapability<
});

export interface CreateLanguageModelCapabilityOptions {
readonly service: LanguageModel.Service;
readonly service: LanguageModel.LanguageModel;
readonly modelId?: string | undefined;
readonly inputTokenCostUsdPerMillion?: number | undefined;
readonly outputTokenCostUsdPerMillion?: number | undefined;
Expand Down Expand Up @@ -72,7 +72,7 @@ export const AiGenerateStructuredCapability = defineCapability<
});

export function createGenerateStructuredCapability(
languageModel: LanguageModel.Service,
languageModel: LanguageModel.LanguageModel,
): ArtifactCapabilityImplementation<GenerateStructuredCapabilityInput<unknown>, unknown> {
return {
capability: AiGenerateStructuredCapability,
Expand Down Expand Up @@ -102,7 +102,7 @@ export const AiJudgeCapability = defineCapability<JudgeCapabilityInput, JudgeCap
});

export function createJudgeCapability(
languageModel: LanguageModel.Service,
languageModel: LanguageModel.LanguageModel,
): ArtifactCapabilityImplementation<JudgeCapabilityInput, JudgeCapabilityOutput> {
return {
capability: AiJudgeCapability,
Expand Down
4 changes: 2 additions & 2 deletions packages/ingest/src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { execFile } from "node:child_process";
import { mkdir, readFile, writeFile } from "node:fs/promises";
import * as nodePath from "node:path";
import { Effect } from "effect";
import { LanguageModel } from "effect/unstable/ai";
import { LanguageModel } from "effect/ai";
import { PDFDocument } from "pdf-lib";
import {
bytesToBase64,
Expand Down Expand Up @@ -338,7 +338,7 @@ export function createAiImageToMarkdownCapability({
prompt = "Transcribe the provided image to Markdown. Return only Markdown.",
}: {
readonly workspaceDirectory?: string | undefined;
readonly model: LanguageModel.Service;
readonly model: LanguageModel.LanguageModel;
readonly prompt?: string | undefined;
}): ArtifactCapabilityImplementation<OcrMarkdownFromImageInput, OcrMarkdownFromImageOutput> {
return {
Expand Down
Loading
Loading