From 8a7f8a07a96b317d2891736c5fa8230ed6906f29 Mon Sep 17 00:00:00 2001 From: zhichao-poper Date: Sun, 8 Nov 2026 11:15:45 +0800 Subject: [PATCH 1/5] fix(cli): preserve newlines in generated Compose values Signed-off-by: zhichao-poper --- src/cli/compose-project.ts | 1 + test/compose-project.test.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/cli/compose-project.ts b/src/cli/compose-project.ts index 289828f117..494fbc46f6 100644 --- a/src/cli/compose-project.ts +++ b/src/cli/compose-project.ts @@ -170,6 +170,7 @@ function yamlString(value: string): string { if (/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/.test(value)) { throw new Error("A Compose path or configuration value contains an unsupported control character."); } + if (value.includes("\n") || value.includes("\r")) return JSON.stringify(value); return `'${value.replace(/'/g, "''")}'`; } diff --git a/test/compose-project.test.ts b/test/compose-project.test.ts index 621a246667..639fa8f468 100644 --- a/test/compose-project.test.ts +++ b/test/compose-project.test.ts @@ -24,6 +24,13 @@ const options = (overrides: Record = {}) => ({ }); describe("Worker Compose project", () => { + it.each(["first\nsecond", "first\rsecond", "first\r\nsecond", "\nleading\n\ntrailing\n", "quote'\"\\\nnext\tline"])( + "preserves multiline configuration values through YAML parsing: %j", (value) => { + const text = renderWorkerCompose(options({ workerEnvironment: { OPENAI_BASE_URL: value } })); + expect(parse(text).containers.agentmemory.environment.OPENAI_BASE_URL).toBe(value); + }, + ); + it("pins registry workers and configures the isolated engine, state and HTTP", () => { const text = renderWorkerCompose(options()); expect(text).toContain("namespace: agentmemory-3511"); From 764c015650c8e5292d87bd4c1717fc656b24666e Mon Sep 17 00:00:00 2001 From: zhichao-poper Date: Sun, 8 Nov 2026 21:04:38 +0800 Subject: [PATCH 2/5] test(cli): verify Compose C1 values with the pinned engine Add an optional isolated integration test that delivers an unchanged generated C1 scalar through iii 0.25.1 into a real worker. Clarify that hook timeout settings belong in the hook process environment rather than the server file. Signed-off-by: zhichao-poper --- README.md | 4 +- test/compose-c1-integration.test.ts | 88 +++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 test/compose-c1-integration.test.ts diff --git a/README.md b/README.md index 31ad6a5546..935cc8057f 100644 --- a/README.md +++ b/README.md @@ -1200,8 +1200,8 @@ EMBEDDING_PROVIDER=local # Optional automatic context injection through the shared hooks # AGENTMEMORY_INJECT_CONTEXT=true -# How long the PreToolUse hook waits for that context, in ms (default 2000) -# AGENTMEMORY_ENRICH_TIMEOUT_MS=2000 +# Set the PreToolUse timeout in the hook process environment, not this server file: +# AGENTMEMORY_ENRICH_TIMEOUT_MS=2000 (default 2000 ms) # Optional outside LLM for summaries and consolidation. A key alone does nothing; # this line selects the provider whose key agentmemory may use. diff --git a/test/compose-c1-integration.test.ts b/test/compose-c1-integration.test.ts new file mode 100644 index 0000000000..47885b8e98 --- /dev/null +++ b/test/compose-c1-integration.test.ts @@ -0,0 +1,88 @@ +import { spawn, spawnSync, type ChildProcess } from "node:child_process"; +import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { createServer } from "node:net"; +import { tmpdir } from "node:os"; +import { join, resolve } from "node:path"; +import { pathToFileURL } from "node:url"; +import { setTimeout as sleep } from "node:timers/promises"; +import { describe, expect, it } from "vitest"; +import { composeNamespace, writeWorkerCompose } from "../src/cli/compose-project.js"; +import { III_PINNED_VERSION } from "../src/version.js"; + +const engine = process.env.AGENTMEMORY_TEST_III; +const version = engine ? spawnSync(engine, ["--version"], { encoding: "utf8", timeout: 3000 }) : null; +const available = version?.status === 0 && version.stdout.trim() === III_PINNED_VERSION; + +async function freePort(): Promise { + const server = createServer(); + await new Promise((accept, reject) => { + server.once("error", reject); + server.listen(0, "127.0.0.1", accept); + }); + const port = (server.address() as { port: number }).port; + await new Promise((accept) => server.close(() => accept())); + return port; +} + +async function stop(child: ChildProcess): Promise { + if (child.exitCode !== null || child.signalCode !== null) return; + const exited = new Promise((accept) => child.once("exit", () => accept())); + child.kill("SIGINT"); + const result = await Promise.race([exited.then(() => true), sleep(5000).then(() => false)]); + if (!result && child.pid) { + try { process.kill(-child.pid, "SIGKILL"); } catch {} + await exited; + } +} + +describe.skipIf(!available || process.platform === "win32")("pinned Compose C1 environment round trip", () => { + it("delivers all C1 characters and line breaks unchanged to a real worker", async () => { + const root = mkdtempSync(join(tmpdir(), "agentmemory-compose-c1-")); + const pkg = join(root, "worker"); + const snapshot = join(root, "received.json"); + mkdirSync(join(pkg, "dist"), { recursive: true }); + const value = `first\n${String.fromCharCode(...Array.from({ length: 32 }, (_, i) => 0x80 + i))}\r\nquote'\"\\\tend\n`; + const sdk = pathToFileURL(resolve("node_modules/iii-sdk/dist/index.mjs")).href; + writeFileSync(join(pkg, "dist/index.mjs"), ` + import { registerWorker } from ${JSON.stringify(sdk)}; + import { writeFileSync } from "node:fs"; + const worker = registerWorker(process.env.III_URL, { workerName: "agentmemory" }); + worker.registerFunction("test::env", async () => process.env.OPENAI_BASE_URL); + writeFileSync(${JSON.stringify(snapshot)}, JSON.stringify(process.env.OPENAI_BASE_URL)); + `); + const ports = { restPort: await freePort(), viewerPort: await freePort(), enginePort: await freePort() }; + const project = writeWorkerCompose({ + ports, projectRoot: pkg, dataDir: join(root, "data"), homeDir: join(root, "home"), + nodeBin: process.execPath, workerEnvironment: { OPENAI_BASE_URL: value }, + }); + // Keep the generated scalar untouched while replacing registry workers with one local probe. + const header = project.text.slice(0, project.text.indexOf("containers:\n")); + const app = project.text.slice(project.text.indexOf(" agentmemory:\n")) + .replace(" start_after: [state, http]", " start_after: []"); + writeFileSync(project.file, `${header}containers:\n${app}`); + const child = spawn(engine!, ["compose", "--namespace", composeNamespace(ports.restPort), "--up", "--file", project.file], { + env: { PATH: process.env.PATH, HOME: join(root, "home"), USERPROFILE: join(root, "home"), + III_COMPOSE_STATE_DIR: project.stateDir, III_TELEMETRY_ENABLED: "false", III_BUNDLE_WORKERS_DISABLED: "1", RUST_LOG: "error" }, + detached: true, stdio: ["ignore", "ignore", "pipe"], + }); + let logs = ""; + child.stderr?.on("data", (chunk) => { logs = `${logs}${chunk}`.slice(-16000); }); + try { + const deadline = Date.now() + 20000; + while (Date.now() < deadline) { + try { + expect(JSON.parse(readFileSync(snapshot, "utf8"))).toBe(value); + return; + } catch (error) { + if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error; + } + if (child.exitCode !== null || child.signalCode !== null) throw new Error(`Compose exited before the worker received its value: ${logs}`); + await sleep(50); + } + throw new Error(`Worker environment snapshot timed out: ${logs}`); + } finally { + await stop(child); + rmSync(root, { recursive: true, force: true }); + } + }, 30000); +}); From b443f762e23fa981e4df6d9a97d853822dd1fb15 Mon Sep 17 00:00:00 2001 From: zhichao-poper Date: Sun, 8 Nov 2026 21:17:38 +0800 Subject: [PATCH 3/5] ci: run the Compose C1 regression in the release gate Add the C1 worker round-trip suite to the existing Linux live-test command. Require a pinned engine when live tests are mandatory, and fail clearly if it is unavailable or live tests are explicitly disabled. Validation includes an actual pinned-engine run and a missing-engine negative control, plus the full build, generation, documentation and unit checks. Signed-off-by: zhichao-poper --- .github/workflows/release-gate.yml | 2 +- test/compose-c1-integration.test.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-gate.yml b/.github/workflows/release-gate.yml index 7998c1ff56..a60e7e7824 100644 --- a/.github/workflows/release-gate.yml +++ b/.github/workflows/release-gate.yml @@ -51,7 +51,7 @@ jobs: engine_pin=$(node --import tsx --input-type=module -e 'import { III_PINNED_VERSION } from "./src/version.ts"; console.log(III_PINNED_VERSION)') engine_bin="$HOME/.cache/agentmemory-release-gate/iii-${engine_pin}-linux-x64" test -x "$engine_bin" - AGENTMEMORY_TEST_III="$engine_bin" AGENTMEMORY_REQUIRE_LIVE_TESTS=1 npx vitest run test/compose-supervision-integration.test.ts test/codex-live-daemon.test.ts + AGENTMEMORY_TEST_III="$engine_bin" AGENTMEMORY_REQUIRE_LIVE_TESTS=1 npx vitest run test/compose-supervision-integration.test.ts test/codex-live-daemon.test.ts test/compose-c1-integration.test.ts - run: npm run test:startup:packaged -- --skip-build --out "${{ runner.temp }}/startup-gate" - name: Test packaged vector recovery shell: bash diff --git a/test/compose-c1-integration.test.ts b/test/compose-c1-integration.test.ts index 47885b8e98..c9944f5d43 100644 --- a/test/compose-c1-integration.test.ts +++ b/test/compose-c1-integration.test.ts @@ -12,6 +12,10 @@ import { III_PINNED_VERSION } from "../src/version.js"; const engine = process.env.AGENTMEMORY_TEST_III; const version = engine ? spawnSync(engine, ["--version"], { encoding: "utf8", timeout: 3000 }) : null; const available = version?.status === 0 && version.stdout.trim() === III_PINNED_VERSION; +const skipped = !available || process.platform === "win32" || process.env.AGENTMEMORY_SKIP_LIVE_TESTS === "1"; +if (process.env.AGENTMEMORY_REQUIRE_LIVE_TESTS === "1" && skipped) { + throw new Error(`Required Compose C1 test needs iii ${III_PINNED_VERSION} and live tests enabled on macOS or Linux`); +} async function freePort(): Promise { const server = createServer(); @@ -35,7 +39,7 @@ async function stop(child: ChildProcess): Promise { } } -describe.skipIf(!available || process.platform === "win32")("pinned Compose C1 environment round trip", () => { +describe.skipIf(skipped)("pinned Compose C1 environment round trip", () => { it("delivers all C1 characters and line breaks unchanged to a real worker", async () => { const root = mkdtempSync(join(tmpdir(), "agentmemory-compose-c1-")); const pkg = join(root, "worker"); From acc85aa4e6fe5173df8a31555e46e0cd85458368 Mon Sep 17 00:00:00 2001 From: zhichao-poper Date: Sun, 8 Nov 2026 21:37:07 +0800 Subject: [PATCH 4/5] test(cli): harden Compose probe setup and dependency resolution Resolve the public SDK package entrypoint instead of a checkout-local path. Clean the temporary root even when setup fails before the child is spawned. Clarify the hook timeout restriction in the env example as well as README. Signed-off-by: zhichao-poper --- .env.example | 2 +- test/compose-c1-integration.test.ts | 65 +++++++++++++++-------------- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/.env.example b/.env.example index fd65b49424..b5106deb07 100644 --- a/.env.example +++ b/.env.example @@ -138,7 +138,7 @@ # AGENTMEMORY_AUTO_COMPRESS=true # Run LLM-written compression on every observation batch. Requires BOTH this flag and a configured provider; a provider alone leaves synthetic compression active. # AGENTMEMORY_INJECT_CONTEXT=true # Opt in to Claude-style hook context injection. Pi/OMP use 1 in their launch environment for file enrichment; native prompt recall is independent. -# AGENTMEMORY_ENRICH_TIMEOUT_MS=2000 # How long the PreToolUse hook waits for /agentmemory/enrich before it gives up and adds no context. Default 2000 ms. Raise it when enrich replies arrive after the hook has given up. +# AGENTMEMORY_ENRICH_TIMEOUT_MS=2000 # PreToolUse hook wait (default 2000 ms). Set this in the hook process environment; setting it only in this server env file does not change the hook timeout. # CONSOLIDATION_ENABLED=false # Disable the consolidation pipeline. Otherwise enabled when an LLM provider is configured, unless AGENTMEMORY_PROVIDER=noop. # CONSOLIDATION_DECAY_DAYS=30 # Age (days) after which non-reinforced memories decay during consolidation # GRAPH_EXTRACTION_ENABLED=true # Extract concept-graph edges on remember; powers the graph-traversal recall path diff --git a/test/compose-c1-integration.test.ts b/test/compose-c1-integration.test.ts index c9944f5d43..b28947f5b7 100644 --- a/test/compose-c1-integration.test.ts +++ b/test/compose-c1-integration.test.ts @@ -1,8 +1,9 @@ import { spawn, spawnSync, type ChildProcess } from "node:child_process"; import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; import { createServer } from "node:net"; +import { createRequire } from "node:module"; import { tmpdir } from "node:os"; -import { join, resolve } from "node:path"; +import { join } from "node:path"; import { pathToFileURL } from "node:url"; import { setTimeout as sleep } from "node:timers/promises"; import { describe, expect, it } from "vitest"; @@ -42,36 +43,38 @@ async function stop(child: ChildProcess): Promise { describe.skipIf(skipped)("pinned Compose C1 environment round trip", () => { it("delivers all C1 characters and line breaks unchanged to a real worker", async () => { const root = mkdtempSync(join(tmpdir(), "agentmemory-compose-c1-")); - const pkg = join(root, "worker"); - const snapshot = join(root, "received.json"); - mkdirSync(join(pkg, "dist"), { recursive: true }); - const value = `first\n${String.fromCharCode(...Array.from({ length: 32 }, (_, i) => 0x80 + i))}\r\nquote'\"\\\tend\n`; - const sdk = pathToFileURL(resolve("node_modules/iii-sdk/dist/index.mjs")).href; - writeFileSync(join(pkg, "dist/index.mjs"), ` - import { registerWorker } from ${JSON.stringify(sdk)}; - import { writeFileSync } from "node:fs"; - const worker = registerWorker(process.env.III_URL, { workerName: "agentmemory" }); - worker.registerFunction("test::env", async () => process.env.OPENAI_BASE_URL); - writeFileSync(${JSON.stringify(snapshot)}, JSON.stringify(process.env.OPENAI_BASE_URL)); - `); - const ports = { restPort: await freePort(), viewerPort: await freePort(), enginePort: await freePort() }; - const project = writeWorkerCompose({ - ports, projectRoot: pkg, dataDir: join(root, "data"), homeDir: join(root, "home"), - nodeBin: process.execPath, workerEnvironment: { OPENAI_BASE_URL: value }, - }); - // Keep the generated scalar untouched while replacing registry workers with one local probe. - const header = project.text.slice(0, project.text.indexOf("containers:\n")); - const app = project.text.slice(project.text.indexOf(" agentmemory:\n")) - .replace(" start_after: [state, http]", " start_after: []"); - writeFileSync(project.file, `${header}containers:\n${app}`); - const child = spawn(engine!, ["compose", "--namespace", composeNamespace(ports.restPort), "--up", "--file", project.file], { - env: { PATH: process.env.PATH, HOME: join(root, "home"), USERPROFILE: join(root, "home"), - III_COMPOSE_STATE_DIR: project.stateDir, III_TELEMETRY_ENABLED: "false", III_BUNDLE_WORKERS_DISABLED: "1", RUST_LOG: "error" }, - detached: true, stdio: ["ignore", "ignore", "pipe"], - }); - let logs = ""; - child.stderr?.on("data", (chunk) => { logs = `${logs}${chunk}`.slice(-16000); }); + let child: ChildProcess | undefined; try { + const pkg = join(root, "worker"); + const snapshot = join(root, "received.json"); + mkdirSync(join(pkg, "dist"), { recursive: true }); + const value = `first\n${String.fromCharCode(...Array.from({ length: 32 }, (_, i) => 0x80 + i))}\r\nquote'\"\\\tend\n`; + const sdk = pathToFileURL(createRequire(import.meta.url).resolve("iii-sdk")).href; + writeFileSync(join(pkg, "dist/index.mjs"), ` + import sdkModule from ${JSON.stringify(sdk)}; + import { writeFileSync } from "node:fs"; + const { registerWorker } = sdkModule; + const worker = registerWorker(process.env.III_URL, { workerName: "agentmemory" }); + worker.registerFunction("test::env", async () => process.env.OPENAI_BASE_URL); + writeFileSync(${JSON.stringify(snapshot)}, JSON.stringify(process.env.OPENAI_BASE_URL)); + `); + const ports = { restPort: await freePort(), viewerPort: await freePort(), enginePort: await freePort() }; + const project = writeWorkerCompose({ + ports, projectRoot: pkg, dataDir: join(root, "data"), homeDir: join(root, "home"), + nodeBin: process.execPath, workerEnvironment: { OPENAI_BASE_URL: value }, + }); + // Keep the generated scalar untouched while replacing registry workers with one local probe. + const header = project.text.slice(0, project.text.indexOf("containers:\n")); + const app = project.text.slice(project.text.indexOf(" agentmemory:\n")) + .replace(" start_after: [state, http]", " start_after: []"); + writeFileSync(project.file, `${header}containers:\n${app}`); + child = spawn(engine!, ["compose", "--namespace", composeNamespace(ports.restPort), "--up", "--file", project.file], { + env: { PATH: process.env.PATH, HOME: join(root, "home"), USERPROFILE: join(root, "home"), + III_COMPOSE_STATE_DIR: project.stateDir, III_TELEMETRY_ENABLED: "false", III_BUNDLE_WORKERS_DISABLED: "1", RUST_LOG: "error" }, + detached: true, stdio: ["ignore", "ignore", "pipe"], + }); + let logs = ""; + child.stderr?.on("data", (chunk) => { logs = `${logs}${chunk}`.slice(-16000); }); const deadline = Date.now() + 20000; while (Date.now() < deadline) { try { @@ -85,7 +88,7 @@ describe.skipIf(skipped)("pinned Compose C1 environment round trip", () => { } throw new Error(`Worker environment snapshot timed out: ${logs}`); } finally { - await stop(child); + if (child) await stop(child); rmSync(root, { recursive: true, force: true }); } }, 30000); From 066736bb3a9a2128182e0c3a787a6e5c269e7890 Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Sun, 8 Nov 2026 21:55:30 +0530 Subject: [PATCH 5/5] fix(cli): escape line separators and publish the Compose probe snapshot atomically Route U+2028 and U+2029 through the double-quoted Compose scalar path with explicit escapes, so YAML 1.1 parsers cannot fold them into line breaks. The live probe now writes its snapshot to a temporary file and renames it, so the poll loop never reads a partially written JSON file. Remove the code comments added in the yamlString helper and the live test. --- src/cli/compose-project.ts | 5 ++--- test/compose-c1-integration.test.ts | 8 ++++---- test/compose-project.test.ts | 8 ++++++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/cli/compose-project.ts b/src/cli/compose-project.ts index 3ae131b40d..cd684ae8d2 100644 --- a/src/cli/compose-project.ts +++ b/src/cli/compose-project.ts @@ -167,13 +167,12 @@ function windowsWorkerPath(nodeBin: string, inherited: string | undefined): stri }).join(";"); } -/** Compose reparses YAML; literal C1 characters can be rejected or silently folded. */ function yamlString(value: string): string { if (/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/.test(value)) { throw new Error("A Compose path or configuration value contains an unsupported control character."); } - if (/[\r\n\u0080-\u009f]/.test(value)) { - return JSON.stringify(value).replace(/[\u0080-\u009f]/g, (char) => `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}`); + if (/[\r\n\u0080-\u009f\u2028\u2029]/.test(value)) { + return JSON.stringify(value).replace(/[\u0080-\u009f\u2028\u2029]/g, (char) => `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}`); } return `'${value.replace(/'/g, "''")}'`; } diff --git a/test/compose-c1-integration.test.ts b/test/compose-c1-integration.test.ts index b28947f5b7..0cfd24e619 100644 --- a/test/compose-c1-integration.test.ts +++ b/test/compose-c1-integration.test.ts @@ -48,22 +48,22 @@ describe.skipIf(skipped)("pinned Compose C1 environment round trip", () => { const pkg = join(root, "worker"); const snapshot = join(root, "received.json"); mkdirSync(join(pkg, "dist"), { recursive: true }); - const value = `first\n${String.fromCharCode(...Array.from({ length: 32 }, (_, i) => 0x80 + i))}\r\nquote'\"\\\tend\n`; + const value = `first\n${String.fromCharCode(...Array.from({ length: 32 }, (_, i) => 0x80 + i))}\u2028\u2029\r\nquote'\"\\\tend\n`; const sdk = pathToFileURL(createRequire(import.meta.url).resolve("iii-sdk")).href; writeFileSync(join(pkg, "dist/index.mjs"), ` import sdkModule from ${JSON.stringify(sdk)}; - import { writeFileSync } from "node:fs"; + import { renameSync, writeFileSync } from "node:fs"; const { registerWorker } = sdkModule; const worker = registerWorker(process.env.III_URL, { workerName: "agentmemory" }); worker.registerFunction("test::env", async () => process.env.OPENAI_BASE_URL); - writeFileSync(${JSON.stringify(snapshot)}, JSON.stringify(process.env.OPENAI_BASE_URL)); + writeFileSync(${JSON.stringify(`${snapshot}.tmp`)}, JSON.stringify(process.env.OPENAI_BASE_URL)); + renameSync(${JSON.stringify(`${snapshot}.tmp`)}, ${JSON.stringify(snapshot)}); `); const ports = { restPort: await freePort(), viewerPort: await freePort(), enginePort: await freePort() }; const project = writeWorkerCompose({ ports, projectRoot: pkg, dataDir: join(root, "data"), homeDir: join(root, "home"), nodeBin: process.execPath, workerEnvironment: { OPENAI_BASE_URL: value }, }); - // Keep the generated scalar untouched while replacing registry workers with one local probe. const header = project.text.slice(0, project.text.indexOf("containers:\n")); const app = project.text.slice(project.text.indexOf(" agentmemory:\n")) .replace(" start_after: [state, http]", " start_after: []"); diff --git a/test/compose-project.test.ts b/test/compose-project.test.ts index 7382476ddd..0a7047eddf 100644 --- a/test/compose-project.test.ts +++ b/test/compose-project.test.ts @@ -33,6 +33,14 @@ describe("Worker Compose project", () => { } }, ); + it.each(["first\u2028second", "first\u2029second", "first\n\u2028\u2029second"])( + "escapes Unicode line and paragraph separators: %j", (value) => { + const text = renderWorkerCompose(options({ workerEnvironment: { OPENAI_BASE_URL: value } })); + expect(text).not.toMatch(/[\u2028\u2029]/); + expect(text).toContain(`OPENAI_BASE_URL: ${JSON.stringify(value).replace(/[\u2028\u2029]/g, (char) => `\\u${char.charCodeAt(0).toString(16)}`)}`); + expect(parse(text).containers.agentmemory.environment.OPENAI_BASE_URL).toBe(value); + }, + ); it.each(["first\nsecond", "first\rsecond", "first\r\nsecond", "\nleading\n\ntrailing\n", "quote'\"\\\nnext\tline"])( "preserves multiline configuration values through YAML parsing: %j", (value) => { const text = renderWorkerCompose(options({ workerEnvironment: { OPENAI_BASE_URL: value } }));