A desktop coding agent with free access to frontier models.
TypeScript
Merge remote-tracking branch 'origin/main' into review/gui-112
Task Builder19069dfb5585
diff --cc apps/server/package.jsonindex 92bda9e1,003f648d..ae04a0de--- a/apps/server/package.json+++ b/apps/server/package.json@@@ -12,7 -12,7 +12,7 @@@"test:coverage": "bun --conditions=development test --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage","test:artifacts": "bun --conditions=development test src/artifact-files.e2e.test.ts src/workspace-init.test.ts src/server.normalizeWorkspaceRelativePath.test.ts","build:enterprise-mcp-client": "pnpm --filter @omnirush/enterprise-mcp-client build",- "build": "pnpm --filter @omnirush/types build && pnpm build:enterprise-mcp-client && tsc -p tsconfig.json && bun build src/opencode-plugins/managed-policy-next.ts src/opencode-plugins/managed-policy.ts src/opencode-plugins/omnirush-chrome-devtools.ts src/opencode-plugins/omnirush-extensions-preview.ts src/opencode-plugins/omnirush-capabilities-knowledge.ts src/opencode-plugins/omnirush-office-attachments.ts src/opencode-plugins/omnirush-spreadsheets.ts src/opencode-plugins/omnirush-pdf-attachments.ts src/opencode-plugins/omnirush-anthropic-adaptive-thinking.ts src/opencode-plugins/omnirush-anthropic-tool-schema.ts src/opencode-plugins/omnirush-title-recovery.ts src/opencode-plugins/omnirush-reasoning-effort.ts src/opencode-plugins/omnirush-swarm.ts src/opencode-plugins/omnirush-mcp-policy.ts src/opencode-plugins/omnirush-engine2.ts --root src/opencode-plugins --outdir dist/opencode-plugins --target node --format esm && node scripts/copy-pdfium-wasm.mjs dist/opencode-plugins",- "build": "pnpm --filter @omnirush/types build && pnpm build:enterprise-mcp-client && tsc -p tsconfig.json && bun build src/opencode-plugins/managed-policy-next.ts src/opencode-plugins/managed-policy.ts src/opencode-plugins/omnirush-chrome-devtools.ts src/opencode-plugins/omnirush-extensions-preview.ts src/opencode-plugins/omnirush-capabilities-knowledge.ts src/opencode-plugins/omnirush-office-attachments.ts src/opencode-plugins/omnirush-spreadsheets.ts src/opencode-plugins/omnirush-pdf-attachments.ts src/opencode-plugins/omnirush-anthropic-adaptive-thinking.ts src/opencode-plugins/omnirush-anthropic-tool-schema.ts src/opencode-plugins/omnirush-title-recovery.ts src/opencode-plugins/omnirush-reasoning-effort.ts src/opencode-plugins/omnirush-swarm.ts src/opencode-plugins/omnirush-budget-wrap.ts --root src/opencode-plugins --outdir dist/opencode-plugins --target node --format esm && node scripts/copy-pdfium-wasm.mjs dist/opencode-plugins",++ "build": "pnpm --filter @omnirush/types build && pnpm build:enterprise-mcp-client && tsc -p tsconfig.json && bun build src/opencode-plugins/managed-policy-next.ts src/opencode-plugins/managed-policy.ts src/opencode-plugins/omnirush-chrome-devtools.ts src/opencode-plugins/omnirush-extensions-preview.ts src/opencode-plugins/omnirush-capabilities-knowledge.ts src/opencode-plugins/omnirush-office-attachments.ts src/opencode-plugins/omnirush-spreadsheets.ts src/opencode-plugins/omnirush-pdf-attachments.ts src/opencode-plugins/omnirush-anthropic-adaptive-thinking.ts src/opencode-plugins/omnirush-anthropic-tool-schema.ts src/opencode-plugins/omnirush-title-recovery.ts src/opencode-plugins/omnirush-reasoning-effort.ts src/opencode-plugins/omnirush-swarm.ts src/opencode-plugins/omnirush-budget-wrap.ts src/opencode-plugins/omnirush-mcp-policy.ts --root src/opencode-plugins --outdir dist/opencode-plugins --target node --format esm && node scripts/copy-pdfium-wasm.mjs dist/opencode-plugins","build:bin": "pnpm --filter @omnirush/types build && pnpm build:enterprise-mcp-client && bun build --compile src/cli.ts --outfile dist/bin/omnirush-server","build:bin:all": "pnpm --filter @omnirush/types build && pnpm build:enterprise-mcp-client && bun ./script/build.ts --outdir dist/bin --target bun-darwin-arm64 --target bun-darwin-x64 --target bun-linux-x64 --target bun-linux-arm64 --target bun-windows-x64 --target bun-windows-arm64","prepare:npm": "pnpm build:bin && node scripts/publish-npm.mjs --prepare-only",diff --cc apps/server/src/engine-pool.test.tsindex 494b7025,ec5532a1..ee3f81b1--- a/apps/server/src/engine-pool.test.ts+++ b/apps/server/src/engine-pool.test.ts@@@ -41,7 -41,7 +41,6 @@@ afterEach(async () =>}savedEnv.clear();});--function setEnv(name: string, value: string): void {if (!savedEnv.has(name)) savedEnv.set(name, process.env[name]);process.env[name] = value;@@@ -1236,73 -1236,4 +1235,3 @@@ describe("engine event stream bounds",}, 10_000)).toBe(true);});});-- /** A pool whose primary re-reads its config while running, as the 2.x engine does. */- async function createLivePool(fixture: Fixture): Promise<{ pool: EnginePool; refreshes: () => number }> {- const primary = await fixture.spawnPrimary();- let refreshes = 0;- const pool = new EnginePool({ config: fixture.config, template: fixture.template, hooks: fixture.hooks });- setEnginePoolForConfig(fixture.config, pool);- cleanups.push(async () => {- clearEnginePoolForConfig(fixture.config);- await pool.disposeAll().catch(() => undefined);- });- pool.adoptPrimary({- handle: { ...primary, refreshConfig: async () => { refreshes += 1; } },- fingerprint: await computeEngineConfigFingerprint(fixture.template),- registryId: null,- trustedIdentity: null,- });- fixture.config.opencodeBaseUrl = primary.url;- fixture.config.workspaces[0]!.baseUrl = primary.url;- return { pool, refreshes: () => refreshes };- }-- describe("engine pool: config applied live", () => {- test("an engine that re-reads its config gets the change with no restart while a turn runs, and a later reload does not redo it", async () => {- const fixture = await createFixture();- const { pool, refreshes } = await createLivePool(fixture);- const primaryUrl = pool.primaryUrl();- await fixture.setBusy(portOf(primaryUrl ?? "http://127.0.0.1:0"), ["ses_live"]);-- const applied = await pool.applyConfigLive(() => fixture.setRuntimeConfig(JSON.stringify({ catalog: 2 })));-- expect(applied).toBe(true);- expect(refreshes()).toBe(1);- expect(fixture.hookCalls.reloadInPlace).toBe(0);- expect(pool.snapshot().generations).toHaveLength(1);- expect(pool.primaryUrl()).toBe(primaryUrl);- // The engine already runs the new config: even a forced standby request has nothing to do.- expect(await pool.requestRollover({ reason: "omnirush_model_catalog", workspace: fixture.workspace, forceStandby: true }))- .toEqual({ action: "skipped", reason: "unchanged" });- expect(pool.snapshot().generations).toHaveLength(1);- });-- test("a change that was already pending is not marked applied by a live apply", async () => {- const fixture = await createFixture();- const { pool } = await createLivePool(fixture);- // Something the engine has not been brought onto yet.- await fixture.setRuntimeConfig(JSON.stringify({ plugin: ["other"] }));-- expect(await pool.applyConfigLive(() => fixture.setRuntimeConfig(JSON.stringify({ plugin: ["other"], catalog: 2 })))).toBe(true);-- expect(await pool.requestRollover({ reason: "config_changed", workspace: fixture.workspace }))- .toEqual({ action: "reloaded_in_place" });- });-- test("an engine that only reads its config at build time (1.x) still gets the write, and the caller reloads", async () => {- const fixture = await createFixture();- const { pool } = await createPool(fixture);- let writes = 0;-- const applied = await pool.applyConfigLive(async () => {- writes += 1;- await fixture.setRuntimeConfig(JSON.stringify({ catalog: 2 }));- });--- expect(applied).toBe(false);- expect(writes).toBe(1);- expect(await pool.requestRollover({ reason: "omnirush_model_catalog", workspace: fixture.workspace }))- .toEqual({ action: "reloaded_in_place" });- });- });diff --cc apps/server/src/omnirush-extensions-plugin-path.tsindex 300f26af,aa043725..f81d4622--- a/apps/server/src/omnirush-extensions-plugin-path.ts+++ b/apps/server/src/omnirush-extensions-plugin-path.ts@@@ -42,4 -42,4 +42,5 @@@ export const omnirushPdfAttachmentsPlugexport const omnirushTitleRecoveryPluginPath = () => omnirushPluginPath("omnirush-title-recovery");export const omnirushReasoningEffortPluginPath = () => omnirushPluginPath("omnirush-reasoning-effort");export const omnirushSwarmPluginPath = () => omnirushPluginPath("omnirush-swarm");+export const omnirushMcpPolicyPluginPath = () => omnirushPluginPath("omnirush-mcp-policy");+ export const omnirushBudgetWrapPluginPath = () => omnirushPluginPath("omnirush-budget-wrap");diff --cc apps/server/src/omnirush-runtime-config.tsindex 86c73807,ac059085..3dbfaa6d--- a/apps/server/src/omnirush-runtime-config.ts+++ b/apps/server/src/omnirush-runtime-config.ts@@@ -25,7 -25,7 +25,8 @@@ importomnirushTitleRecoveryPluginPath,omnirushReasoningEffortPluginPath,omnirushSwarmPluginPath,+ omnirushMcpPolicyPluginPath,+ omnirushBudgetWrapPluginPath,omnirushOfficeAttachmentsPluginPath,omnirushSpreadsheetsPluginPath,omnirushChromeDevtoolsPluginPath,