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
6 changes: 3 additions & 3 deletions apps/ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
"@maple/query-model": "workspace:*",
"@maple/security-audit": "workspace:*",
"@maple/widgets": "workspace:*",
"@yielded/agent": "0.1.0-beta.190",
"@yielded/agent-platform-cloudflare": "0.1.0-beta.190",
"@yielded/agent": "0.1.0-beta.191",
"@yielded/agent-platform-cloudflare": "0.1.0-beta.191",
"effect": "catalog:effect"
},
"devDependencies": {
"@cloudflare/workers-types": "catalog:alchemy",
"@effect/vitest": "catalog:effect",
"@types/node": "catalog:tooling",
"@yielded/agent-testing": "0.1.0-beta.190",
"@yielded/agent-testing": "0.1.0-beta.191",
"gpt-tokenizer": "^4.1.0",
"typescript": "catalog:tooling",
"vitest": "catalog:"
Expand Down
2 changes: 1 addition & 1 deletion apps/ai/src/platform/Llm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ const sseBody = (
* The one tool the streaming fixtures declare. A `tool-call` part is decoded against the toolkit
* the call declared, so a stream that returns one is only readable with the tool in hand.
*/
const listServices = Tool.make("list_services", { parameters: Schema.Struct({}) })
const listServices = Tool.make("list_services")

/**
* How one streaming fixture is shaped: the wire, plus whether the call declares a tool. Only a
Expand Down
6 changes: 3 additions & 3 deletions apps/local-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@alchemy.run/cloudflare": "catalog:alchemy",
"@floating-ui/dom": "1.8.0",
"@foldkit/ui": "0.169.0",
"@foldkit/ui": "0.170.0",
"@fontsource-variable/geist": "^5.3.0",
"@fontsource-variable/geist-mono": "^5.3.0",
"@maple/domain": "workspace:*",
Expand All @@ -22,10 +22,10 @@
"@tanstack/charts": "catalog:charts",
"@tanstack/charts-scales": "catalog:charts",
"effect": "catalog:effect",
"foldkit": "0.169.0"
"foldkit": "0.170.0"
},
"devDependencies": {
"@foldkit/vite-plugin": "0.28.0",
"@foldkit/vite-plugin": "0.29.0",
"@tailwindcss/vite": "catalog:tailwind",
"@types/node": "catalog:tooling",
"tailwindcss": "catalog:tailwind",
Expand Down
21 changes: 10 additions & 11 deletions apps/scraper/src/OtlpIngest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ const TestLayer = OtlpIngest.layer.pipe(
Layer.provide(Layer.mergeAll(FetchHttpClient.layer, Layer.succeed(ScraperEnv, testEnv))),
)

/** Lets the stubbed fetch settle on the real event loop, then moves the test clock past a backoff. */
const settleAndAdvance = (steps: number, by: Duration.Input = "2 seconds") =>
Effect.forEach(
Array.from({ length: steps }),
() =>
Effect.promise(() => new Promise<void>((resolve) => setTimeout(resolve, 0))).pipe(
Effect.andThen(TestClock.adjust(by)),
),
{ discard: true },
/**
* Lets the stubbed fetch settle on the real event loop and moves the test clock past a backoff,
* until `fiber` exits. A fixed tick count races the libuv gzip when the machine is loaded.
*/
const advanceUntilDone = (fiber: Fiber.Fiber<unknown, unknown>, by: Duration.Input = "2 seconds") =>
Effect.promise(() => new Promise<void>((resolve) => setTimeout(resolve, 0))).pipe(
Effect.andThen(TestClock.adjust(by)),
Effect.repeat({ until: () => fiber.pollUnsafe() !== undefined, times: 100 }),
)

const SAMPLE_REQUEST: OtlpExportRequest = {
Expand Down Expand Up @@ -172,7 +171,7 @@ describe("OtlpIngest", () => {
),
),
)
yield* settleAndAdvance(2)
yield* advanceUntilDone(fiber)
yield* Fiber.join(fiber)
assert.lengthOf(recorded, 2)
}).pipe(Effect.provide(TestLayer)),
Expand Down Expand Up @@ -218,7 +217,7 @@ describe("OtlpIngest", () => {
{ startImmediately: true },
)
// Each of the three attempts times out at 30s, with a backoff between them.
yield* settleAndAdvance(3, "35 seconds")
yield* advanceUntilDone(fiber, "35 seconds")
const error = yield* Fiber.join(fiber)
assert.strictEqual(error.reason, "scrape_failed")
assert.strictEqual(error.statusCode, null)
Expand Down
10 changes: 5 additions & 5 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"dependencies": {
"@alchemy.run/cloudflare": "catalog:alchemy",
"@clerk/themes": "^2.4.57",
"@effect/platform-browser": "4.0.6",
"@effect/platform-browser": "4.1.0",
"@floating-ui/dom": "1.8.0",
"@foldkit/markdown": "0.14.4",
"@foldkit/ui": "0.169.0",
"@foldkit/markdown": "0.15.0",
"@foldkit/ui": "0.170.0",
"@fontsource-variable/geist": "^5.3.0",
"@fontsource-variable/geist-mono": "^5.3.0",
"@maple-dev/effect-sdk": "workspace:*",
Expand Down Expand Up @@ -46,14 +46,14 @@
"d3-scale": "^4.0.2",
"d3-shape": "^3.2.0",
"effect": "catalog:effect",
"foldkit": "0.169.0",
"foldkit": "0.170.0",
"fuse.js": "7.5.0",
"three": "^0.186.1",
"uqr": "^0.1.3"
},
"devDependencies": {
"@e2e-dev/web": "0.15.3",
"@foldkit/vite-plugin": "0.28.0",
"@foldkit/vite-plugin": "0.29.0",
"@tailwindcss/vite": "catalog:tailwind",
"@types/d3-scale": "^4.0.9",
"@types/d3-shape": "^3.2.0",
Expand Down
109 changes: 51 additions & 58 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/effect-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"typecheck": "tsrs -p tsconfig.json && tsrs -p web/tsconfig.json"
},
"dependencies": {
"@effect/atom-react": "4.0.6",
"@effect/atom-react": "4.1.0",
"@effect/platform-bun": "catalog:effect",
"@maple-dev/effect-sdk": "workspace:*",
"effect": "catalog:effect",
Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@changesets/cli": "3.0.3",
"@cloudflare/workers-types": "catalog:alchemy",
"@effect/platform-node": "catalog:effect",
"@effect/sql-pg": "4.0.6",
"@effect/sql-pg": "4.1.0",
"@effect/tsgo": "0.57.0",
"@effect/vitest": "catalog:effect",
"@maple-dev/effect-orm": "0.8.0",
Expand All @@ -94,9 +94,9 @@
"vitest": "catalog:"
},
"overrides": {
"@effect/platform-browser": "4.0.6",
"@effect/sql-d1": "4.0.6",
"@effect/sql-sqlite-do": "4.0.6",
"@effect/platform-browser": "4.1.0",
"@effect/sql-d1": "4.1.0",
"@effect/sql-sqlite-do": "4.1.0",
"workerd": "1.20261002.1"
},
"packageManager": "bun@1.4.0",
Expand All @@ -122,12 +122,12 @@
"@tanstack/charts-scales": "1.0.0"
},
"effect": {
"@effect/ai-openai-compat": "4.0.6",
"@effect/ai-openrouter": "4.0.6",
"@effect/platform-bun": "4.0.6",
"@effect/platform-node": "4.0.6",
"@effect/vitest": "4.0.6",
"effect": "4.0.6"
"@effect/ai-openai-compat": "4.1.0",
"@effect/ai-openrouter": "4.1.0",
"@effect/platform-bun": "4.1.0",
"@effect/platform-node": "4.1.0",
"@effect/vitest": "4.1.0",
"effect": "4.1.0"
},
"react": {
"@types/react": "^19.3.0",
Expand All @@ -153,11 +153,12 @@
}
},
"patchedDependencies": {
"@effect/ai-openrouter@4.0.6": "patches/@effect%2Fai-openrouter@4.0.6.patch",
"@effect/vitest@4.0.6": "patches/@effect%2Fvitest@4.0.6.patch",
"effect@4.0.6": "patches/effect@4.0.6.patch",
"@effect/ai-openrouter@4.1.0": "patches/@effect%2Fai-openrouter@4.1.0.patch",
"@effect/vitest@4.1.0": "patches/@effect%2Fvitest@4.1.0.patch",
"effect@4.1.0": "patches/effect@4.1.0.patch",
"@cloudflare/workers-types@5.20261005.1": "patches/@cloudflare%2Fworkers-types@5.20261005.1.patch",
"@alchemy.run/aws@2.0.0-beta.84": "patches/@alchemy.run%2Faws@2.0.0-beta.84.patch",
"alchemy@2.0.0-beta.84": "patches/alchemy@2.0.0-beta.84.patch",
"@alchemy.run/cloudflare@2.0.0-beta.84": "patches/@alchemy.run%2Fcloudflare@2.0.0-beta.84.patch"
}
}
4 changes: 2 additions & 2 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"db:restore-test": "bun scripts/restore-test.ts"
},
"dependencies": {
"@effect/sql-pg": "4.0.6",
"@effect/sql-pglite": "4.0.6",
"@effect/sql-pg": "4.1.0",
"@effect/sql-pglite": "4.1.0",
"@electric-sql/pglite": "^0.5.12",
"@maple-dev/effect-orm": "0.8.0",
"@maple/domain": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/dist/OpenRouterLanguageModel.js b/dist/OpenRouterLanguageModel.js
index b4ea95b..59ae99f 100644
index 591840c..49f33eb 100644
--- a/dist/OpenRouterLanguageModel.js
+++ b/dist/OpenRouterLanguageModel.js
@@ -745,7 +745,22 @@ const makeStreamResponse = /*#__PURE__*/Effect.fnUntraced(function* ({
@@ -737,7 +737,22 @@ const makeStreamResponse = /*#__PURE__*/Effect.fnUntraced(function* ({
reasoning: undefined
}
};
Expand All @@ -26,7 +26,7 @@ index b4ea95b..59ae99f 100644
const parts = [];
if (Predicate.isNotUndefined(event.error)) {
finishReason = "error";
@@ -1021,7 +1036,16 @@ const makeStreamResponse = /*#__PURE__*/Effect.fnUntraced(function* ({
@@ -1012,7 +1027,16 @@ const makeStreamResponse = /*#__PURE__*/Effect.fnUntraced(function* ({
}
// Usage is only emitted by the last part of the stream, so we need to
// handle flushing any remaining text / reasoning / tool calls
Expand All @@ -44,7 +44,7 @@ index b4ea95b..59ae99f 100644
// Fix for Gemini 3 thoughtSignature: when there are tool calls with encrypted
// reasoning (thoughtSignature), the model returns 'stop' but expects continuation.
// Override to 'tool-calls' so the SDK knows to continue the conversation.
@@ -1099,6 +1123,8 @@ const makeStreamResponse = /*#__PURE__*/Effect.fnUntraced(function* ({
@@ -1090,6 +1114,8 @@ const makeStreamResponse = /*#__PURE__*/Effect.fnUntraced(function* ({
response: buildHttpResponseDetails(response),
metadata
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/internal/internal.js b/dist/internal/internal.js
index ba15b51..04c40f3 100644
index 6c1b1c1..5c4c861 100644
--- a/dist/internal/internal.js
+++ b/dist/internal/internal.js
@@ -14,7 +14,8 @@ import * as Scope from "effect/Scope";
Expand All @@ -9,19 +9,19 @@ index ba15b51..04c40f3 100644
-const getCurrentSuite = V.TestRunner.getCurrentSuite;
+// Patched (maple): Bun aliases vitest but does not expose TestRunner. Resolve only for layer tests.
+const getCurrentSuite = () => V.TestRunner.getCurrentSuite();
const runPromise = /*#__PURE__*/Effect.fnUntraced(function* (effect, _ctx) {
const exit = yield* Effect.exit(effect);
if (Exit.isFailure(exit)) {
@@ -28,6 +29,8 @@ const runPromise = /*#__PURE__*/Effect.fnUntraced(function* (effect, _ctx) {
const runPromise = (effect, ctx) => Effect.runPromise(
// Only the test is interruptible: once the signal aborts, the fiber stops
// at its next interruptible step, which would skip reporting the defects
@@ -32,6 +33,8 @@ Effect.uninterruptibleMask(restore => Effect.gen(function* () {
signal: ctx?.signal
}));
});
const settleOnAbort = (ctx, promise) => {
+ // Patched (maple): Bun's `bun test` context has no `signal`.
+ if (!ctx?.signal) return promise;
// Vitest stops awaiting the promise once the signal aborts (timeout or
// cancellation), so only then add a hook that waits for the finalizers.
// Registering it unconditionally would change the teardown of every test.
@@ -141,15 +144,19 @@ const makeTester = (mapEffect, it) => {
@@ -149,15 +152,19 @@ const makeTester = (mapEffect, it) => {
const register = test => (name, self, timeout) => test(name, testOptions(timeout), withFixturesOf(self, ctx => run(ctx, [ctx], self)));
const each = cases => (name, self, timeout) => it.for(cases)(name, testOptions(timeout), withFixturesOf(self, (args, ctx) => run(ctx, [args, ctx], self).then(constVoid)));
const prop = (name, arbitraries, self, timeout) => registerProp(it, name, arbitraries, (values, ctx) => Effect.mapEager(mapEffect(Effect.suspend(() => self(values, ctx))), value => value !== false), timeout);
Expand All @@ -44,7 +44,7 @@ index ba15b51..04c40f3 100644
const makeProp = it => (name, arbitraries, self, timeout) => registerProp(it, name, arbitraries, (values, ctx) => {
const result = self(values, ctx);
diff --git a/src/internal/internal.ts b/src/internal/internal.ts
index 356c99e..5252b63 100644
index e6ab75a..8089779 100644
--- a/src/internal/internal.ts
+++ b/src/internal/internal.ts
@@ -18,7 +18,8 @@ import * as TestConsole from "effect/testing/TestConsole"
Expand All @@ -55,18 +55,18 @@ index 356c99e..5252b63 100644
+// Patched (maple): Bun aliases vitest but does not expose TestRunner. Resolve only for layer tests.
+const getCurrentSuite = () => V.TestRunner.getCurrentSuite()

const runPromise: <E, A>(
_: Effect.Effect<A, E, never>,
@@ -38,6 +39,8 @@ const runPromise: <E, A>(
}, (effect, _, ctx) => Effect.runPromise(effect, { signal: ctx?.signal }))
const runPromise = <E, A>(
effect: Effect.Effect<A, E>,
@@ -44,6 +45,8 @@ const runPromise = <E, A>(
)

const settleOnAbort = <A>(ctx: Vitest.TestContext, promise: Promise<A>) => {
+ // Patched (maple): Bun's `bun test` context has no `signal`.
+ if (!ctx?.signal) return promise
// Vitest stops awaiting the promise once the signal aborts (timeout or
// cancellation), so only then add a hook that waits for the finalizers.
// Registering it unconditionally would change the teardown of every test.
@@ -279,15 +282,19 @@ const makeTester = <R, ExtraContext>(
@@ -290,15 +293,19 @@ const makeTester = <R, ExtraContext>(
timeout
)

Expand Down
Loading
Loading