Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.
JavaScript agent-collaborationagent-harnessagent-orchestrationagent-teamagent-workflowai-assistantai-automationai-employeeai-productivityai-teamai-workflowautonomous-agentsclaude-code-guiclaude-coworkdesktop-agentlocal-firstmulti-agentmulti-agent-systemself-evolving-agentstask-automation
Fix officecli fetch for Linux + Whisper degradation
Dmitry V. Luciv74e1e9675678
diff --git a/scripts/ensure-dev-dependencies.cjs b/scripts/ensure-dev-dependencies.cjsindex 48a92183..367b6aaf 100644--- a/scripts/ensure-dev-dependencies.cjs+++ b/scripts/ensure-dev-dependencies.cjs@@ -4,6 +4,8 @@const path = require('node:path');const { spawnSync } = require('node:child_process');+const { WHISPER_RUNTIME_CONTRACT } = require('../bin/runtime-gate.cjs');+const pcRoot = path.resolve(__dirname, '..');function run(label, script, args = []) {@@ -37,10 +39,18 @@ function main() {'--arch', process.arch,]);}- run('Whisper', 'scripts/fetch-whisper.cjs', [- '--platform', process.platform,- '--arch', process.arch,- ]);+ // Whisper ships pinned prebuilt CLIs for a fixed target list only. On hosts+ // without a contract target the fetch script must keep failing (packaging+ // gates rely on that strictness); here it is simply not required — speech+ // transcription degrades to an actionable error at runtime instead.+ if (WHISPER_RUNTIME_CONTRACT.targets[`${process.platform}-${process.arch}`]) {+ run('Whisper', 'scripts/fetch-whisper.cjs', [+ '--platform', process.platform,+ '--arch', process.arch,+ ]);+ } else {+ console.log(`[dev-deps] Whisper not provisioned for ${process.platform}-${process.arch}; skipping (local speech transcription unavailable)`);+ }console.log('[dev-deps] built-in dependencies ready');}diff --git a/scripts/fetch-officecli.cjs b/scripts/fetch-officecli.cjsindex 78e85c0d..daa64922 100644--- a/scripts/fetch-officecli.cjs+++ b/scripts/fetch-officecli.cjs@@ -19,7 +19,7 @@** Selection: by default fetches the CURRENT platform/arch. Multi-arch release* builds pass explicit --platform targets, just like ensure-runtime. Flags:- * --all every shippable target (mac + win, both arches)+ * --all every shippable target (linux + mac + win, both arches)* --root=<dir> destination root (default: PC/resources/officecli)* --platform=<key> a specific `${platform}-${arch}` (repeatable)* --force re-download even if a valid copy exists@@ -53,9 +53,11 @@ const STALL_TIMEOUT_MS = Number(process.env.OFFICECLI_FETCH_STALL_MS || 120_000)const pcRoot = path.resolve(__dirname, '..');let destDir = path.join(pcRoot, 'resources', 'officecli');-// `${process.platform}-${process.arch}` -> release asset name. Desktop targets-// only (mac + win); linux assets exist upstream but we do not ship them.+// `${process.platform}-${process.arch}` -> release asset name. Linux assets are+// the upstream glibc builds (the *-alpine-* musl variants are not shipped).const ASSETS = {+ 'linux-x64': 'officecli-linux-x64',+ 'linux-arm64': 'officecli-linux-arm64','darwin-arm64': 'officecli-mac-arm64','darwin-x64': 'officecli-mac-x64','win32-x64': 'officecli-win-x64.exe',@@ -64,6 +66,8 @@ const ASSETS = {// Pinned sha256 for VERSION (from the release SHA256SUMS). Update with VERSION.const SHA256 = {+ 'officecli-linux-x64': 'da07d4f787d7c85724104294ac023c89971ddfaee93ebb183b289282b8f869cc',+ 'officecli-linux-arm64': '39008c7f76d202858637810553ef14e2cd3e7f61485fdcf2011f26967a7babd1','officecli-mac-arm64': '393874f79db58222bdbede7f4f942f2536580386923857d1b5ad9754efe80c19','officecli-mac-x64': '6a931d424975dded6ae413c8c1f63d00dfb30a4bd4bd50352964782d13299f5c','officecli-win-x64.exe': '864e0580c8e8c91a6aa4a4c1e8900551c8d4aa648ff10136ceed3a6ba5310888',diff --git a/src/main/paths.ts b/src/main/paths.tsindex d0014f9a..d85fce58 100644--- a/src/main/paths.ts+++ b/src/main/paths.ts@@ -689,8 +689,11 @@ export function runtimeResourcesDir(): string {}/** `${process.platform}-${process.arch}` → vendored OfficeCLI asset name.- * Mirrors `scripts/fetch-officecli.cjs`. Desktop targets only (mac + win). */+ * Mirrors `scripts/fetch-officecli.cjs` (linux assets are the upstream glibc+ * builds; the *-alpine-* musl variants are not shipped). */const OFFICECLI_ASSETS: Readonly<Record<string, string>> = {+ 'linux-x64': 'officecli-linux-x64',+ 'linux-arm64': 'officecli-linux-arm64','darwin-arm64': 'officecli-mac-arm64','darwin-x64': 'officecli-mac-x64','win32-x64': 'officecli-win-x64.exe',@@ -702,7 +705,7 @@ const OFFICECLI_ASSETS: Readonly<Record<string, string>> = {* `extraResources`:* dev: PC/resources/officecli/* packed: <app>/Contents/Resources/officecli/ (darwin)- * <app>/resources/officecli/ (win)+ * <app>/resources/officecli/ (win/linux)*/export function officeCliBinaryPath(): string | null {const asset = OFFICECLI_ASSETS[`${process.platform}-${process.arch}`];diff --git a/test/main/util/officecli-fetch.test.ts b/test/main/util/officecli-fetch.test.tsindex 01b41073..2b174684 100644--- a/test/main/util/officecli-fetch.test.ts+++ b/test/main/util/officecli-fetch.test.ts@@ -50,6 +50,21 @@ describe('fetch-officecli.cjs', () => {expect(`${r.stdout}\n${r.stderr}`).toContain('officecli-mac-arm64 missing');});+ it('resolves the linux platform keys to pinned upstream assets', () => {+ const r = spawnSync(TEST_NODE, [+ path.join(process.cwd(), 'scripts', 'fetch-officecli.cjs'),+ `--root=${tmpDir}`,+ '--platform=linux-x64',+ '--check',+ ], {+ cwd: process.cwd(),+ encoding: 'utf8',+ });++ expect(r.status).toBe(1);+ expect(`${r.stdout}\n${r.stderr}`).toContain('officecli-linux-x64 missing');+ });+it('resumes an existing partial download with a Range request', async () => {const ranges: Array<string | undefined> = [];fs.writeFileSync(path.join(tmpDir, 'LICENSE'), 'Apache-2.0');