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
2 changes: 1 addition & 1 deletion apps/server/scripts/record-grok-acp-replay-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ function normalizeEntries(input: {
});
}

const DEFAULT_GROK_SETTINGS = Schema.decodeUnknownSync(GrokSettings)({});
const DEFAULT_GROK_SETTINGS = Schema.decodeSync(GrokSettings)({});

const recordScenario = Effect.fn("recordGrokScenario")(function* (fixtureName: string) {
const fixture = ORCHESTRATOR_REPLAY_FIXTURES.find((candidate) => candidate.name === fixtureName);
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/assets/AssetAccess.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ describe("AssetAccess", () => {
]);
return Effect.gen(function* () {
// Every client and server release spells the resource this way on the wire.
const { resource } = yield* Schema.decodeUnknownEffect(AssetCreateUrlInput)({
const { resource } = yield* Schema.decodeEffect(AssetCreateUrlInput)({
resource: { _tag: "github-media", cwd: "/repo", url },
});
const issued = yield* issueAssetUrl({ resource });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
} from "@t3tools/provider-acp-registry/testing";
import * as AcpRegistrySupport from "@t3tools/provider-acp-registry/server/AcpRegistrySupport";

const REPLAY_SETTINGS = Schema.decodeUnknownSync(AcpRegistrySettings)({
const REPLAY_SETTINGS = Schema.decodeSync(AcpRegistrySettings)({
agentId: "replay-agent",
authMethodId: "replay",
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
makeGrokAdapterV2,
} from "@t3tools/provider-grok/testing";

const DEFAULT_GROK_SETTINGS = Schema.decodeUnknownSync(GrokSettings)({});
const DEFAULT_GROK_SETTINGS = Schema.decodeSync(GrokSettings)({});

function layerGrokProviderAdapterRegistryReplay(
transcript: AcpReplayTranscript,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ function makeReplayCreateHost(controller: MuseReplayController) {
};
}

const DEFAULT_MUSE_SETTINGS = Schema.decodeUnknownSync(MuseSettings)({ enabled: true });
const DEFAULT_MUSE_SETTINGS = Schema.decodeSync(MuseSettings)({ enabled: true });

export function layer(input: {
readonly scenario: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/orchestration-v2/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const decodeTranscript = Schema.decodeUnknownEffect(
const now = DateTime.makeUnsafe("2026-09-29T00:00:00.000Z");
const environmentId = EnvironmentId.make("source-بيئة");
const output = "Full tool output. ".repeat(4_000);
const thread = Schema.decodeUnknownSync(OrchestrationV2AppThread)({
const thread = Schema.decodeSync(OrchestrationV2AppThread)({
id: "source-thread",
projectId: "source-project",
title: "Source 界\nconversation",
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/CodexInstallation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export const makeCodexInstallation = Effect.fn("makeCodexInstallation")(function
"resolve",
"The managed Codex installation record is invalid. Reinstall Codex.",
);
return yield* Schema.decodeUnknownEffect(Schema.fromJsonString(schema))(
return yield* Schema.decodeEffect(Schema.fromJsonString(schema))(
yield* fs.readFileString(file),
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const boundedBody = (compact: boolean) => ({
});
const BoundedJson = Schema.toCodecJson(OrchestrationV2ThreadBoundedSnapshot);
const idTableBody = () => {
const snapshot = Schema.decodeUnknownSync(BoundedJson)(boundedBody(true));
const snapshot = Schema.decodeSync(BoundedJson)(boundedBody(true));
return Schema.encodeSync(BoundedJson)({ ...snapshot, idTable: true });
};

Expand Down
2 changes: 1 addition & 1 deletion packages/client-runtime/src/state/queryPersistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function persistQuery<A, I>(schema: Schema.Codec<A, I>): QueryPersistence
if (store === null) return Option.none<A>();
const stored = yield* store.load(environmentId, key);
if (Option.isNone(stored)) return Option.none<A>();
return yield* Schema.decodeUnknownEffect(codec)(stored.value).pipe(
return yield* Schema.decodeEffect(codec)(stored.value).pipe(
Effect.asSome,
Effect.catch(() => Effect.succeedNone),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/client-runtime/src/state/threads-sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ describe("EnvironmentThreads", () => {
let discarded = false;
const h = yield* makeHarness({
loadCached: decodeOrDiscardOrchestrationCache(
Schema.decodeUnknownEffect(schema)(stale).pipe(
Schema.decodeEffect(schema)(stale).pipe(
Effect.map((stored) => Option.some(stored.snapshot)),
),
Effect.sync(() => {
Expand Down
4 changes: 1 addition & 3 deletions packages/contracts/src/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import {

describe("authorization grants", () => {
it("decodes legacy review credentials without offering them in new grants", () => {
expect(Schema.decodeUnknownSync(AuthEnvironmentScopes)(["review:write"])).toEqual([
"review:write",
]);
expect(Schema.decodeSync(AuthEnvironmentScopes)(["review:write"])).toEqual(["review:write"]);
expect(() => Schema.decodeUnknownSync(AuthGrantScopes)(["review:write"])).toThrow();
expect(AuthStandardClientScopes).not.toContain("review:write");
});
Expand Down
6 changes: 3 additions & 3 deletions packages/effect-acp/src/protocol.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,9 @@ it.layer(NodeServices.layer)("effect-acp protocol", (it) => {
}),
);

const response = yield* Schema.decodeUnknownEffect(
Schema.fromJsonString(JsonRpcErrorResponse),
)(yield* Queue.take(output));
const response = yield* Schema.decodeEffect(Schema.fromJsonString(JsonRpcErrorResponse))(
yield* Queue.take(output),
);
assert.equal(response.id, 9);
assert.equal(response.error.code, -32603);
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-opencode/src/server/adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function asyncEventStream() {
};
}

const OPENCODE_TEST_SETTINGS = Schema.decodeUnknownSync(OpenCodeSettings)({});
const OPENCODE_TEST_SETTINGS = Schema.decodeSync(OpenCodeSettings)({});

function runtimePolicy(
runtimeMode: ProviderAdapter.ProviderAdapterV2RuntimePolicy["runtimeMode"],
Expand Down
1 change: 1 addition & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"namespaceImportPackages": ["@effect/platform-node", "effect"],
"effectFn": ["span", "inferred-span", "suggested-span"],
"diagnosticSeverity": {
"preferTypedSchemaDecoder": "error",
"catchUnfailableEffect": "error",
"raceFirstWithSleepToTimeout": "error",
"redundantMapError": "error",
Expand Down
Loading