Skip to content

Commit 46fa190

Browse files
author
Shaw
committed
fix(release): restore desktop release inputs
1 parent c10c78b commit 46fa190

9 files changed

Lines changed: 179 additions & 22 deletions

File tree

bun.lock

Lines changed: 17 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Desktop Release Regression Inventory
2+
3+
This inventory records desktop regression coverage that is intentionally outside
4+
the deterministic PR gate. The release matrix validator keeps these entries
5+
visible so they are reviewed before a production desktop release.
6+
7+
## Packaged and E2E Coverage
8+
9+
- gameOpenWindow — full round-trip with openGameWindow mock (needs canvas mock update)
10+
- Abnormal window position (off-screen) is corrected to safe defaults (e2e)
11+
- Deep link received while app is closed causes app to launch (e2e)
12+
- Deep link received while app is open does not launch second instance (e2e)
13+
- Shortcuts survive window focus changes (e2e)
14+
- App launches automatically after system restart (e2e)
15+
- Auto-launch survives app updates (e2e)
16+
- Keyboard shortcut Cmd+Q triggers quit (e2e)
17+
- Keyboard shortcut Cmd+R triggers reload (e2e)
18+
- Keyboard shortcut Cmd+Option+I opens devtools (e2e)
19+
- Gateway discovery sends gatewayDiscovery push event to renderer (integration)
20+
- Canvas window is sandboxed — cannot access main app origin (integration)
21+
- Canvas navigate blocks external URLs (integration)
22+
- Agent port is reachable via HTTP after status reaches 'running' (integration)
23+
- Agent crash triggers automatic restart (integration)
24+
- Stopping agent while starting does not leave zombie process (integration)
25+
- Check for updates contacts the release server (network)
26+
- Applying update relaunches the app (e2e)
27+
- Update check works on both canary and stable channels (network)
28+
- Tray icon persists after main window is closed (e2e)
29+
- Main window has native vibrancy effect on macOS (e2e)
30+
- Context menu closes when clicking elsewhere (e2e)
31+
32+
## Hardware and Manual Coverage
33+
34+
- Microphone input works after permission is granted (hardware)
35+
- Swabble fires 'wakeWordDetected' event when wake word is spoken (hardware)
36+
- Audio transcription produces non-empty text for clear speech (hardware)
37+
- Camera preview renders in the UI when stream is started (hardware)
38+
- Switching between front/rear camera works (hardware)
39+
- takeScreenshot returns a non-empty base64 PNG (hardware)
40+
- Frame capture mode streams frames at configured interval (hardware)
41+
- Left-clicking the tray icon opens the companion window (visual)
42+
- Right-clicking the tray icon shows the tray context menu (visual)
43+
- Window can be dragged by clicking the header region (visual)
44+
- Photo quality is acceptable at default settings (hardware)
45+
- Requesting accessibility opens System Preferences (OS interaction)
46+
- Permission status reflects actual system state (OS interaction)
47+
- Context menu appears at cursor position (visual)
48+
- Power state reflects actual battery status (hardware)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Desktop Release Regression Checklist
2+
3+
Complete these manual checks for desktop release candidates after packaged smoke
4+
tests pass on the target platform.
5+
6+
- [ ] Left-clicking the tray icon opens the companion window (visual)
7+
- [ ] Right-clicking the tray icon shows the tray context menu (visual)
8+
- [ ] Window can be dragged by clicking the header region (visual)
9+
- [ ] Photo quality is acceptable at default settings (hardware)
10+
- [ ] Requesting accessibility opens System Preferences (OS interaction)
11+
- [ ] Permission status reflects actual system state (OS interaction)
12+
- [ ] Context menu appears at cursor position (visual)
13+
- [ ] Power state reflects actual battery status (hardware)

packages/agent/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,7 @@
260260
"dependencies": {
261261
"@ai-sdk/anthropic": "^3.0.13",
262262
"@clack/prompts": "^1.0.0",
263-
"@elizaos/plugin-contacts": "workspace:*",
264263
"@elizaos/app-core": "workspace:*",
265-
"@elizaos/plugin-phone": "workspace:*",
266-
"@elizaos/plugin-wifi": "workspace:*",
267264
"@elizaos/core": "workspace:*",
268265
"@elizaos/plugin-agent-orchestrator": "workspace:*",
269266
"@elizaos/plugin-agent-skills": "workspace:*",
@@ -276,14 +273,16 @@
276273
"@elizaos/plugin-coding-tools": "workspace:*",
277274
"@elizaos/plugin-commands": "workspace:*",
278275
"@elizaos/plugin-computeruse": "workspace:*",
276+
"@elizaos/plugin-contacts": "workspace:*",
279277
"@elizaos/plugin-discord": "workspace:*",
280278
"@elizaos/plugin-elizacloud": "workspace:*",
281279
"@elizaos/plugin-imessage": "workspace:*",
282280
"@elizaos/plugin-local-inference": "workspace:*",
283281
"@elizaos/plugin-mcp": "workspace:*",
284282
"@elizaos/plugin-mlx": "workspace:*",
285-
"@elizaos/plugin-openai": "workspace:*",
286283
"@elizaos/plugin-ollama": "workspace:*",
284+
"@elizaos/plugin-openai": "workspace:*",
285+
"@elizaos/plugin-phone": "workspace:*",
287286
"@elizaos/plugin-registry": "workspace:*",
288287
"@elizaos/plugin-shell": "workspace:*",
289288
"@elizaos/plugin-signal": "workspace:*",
@@ -292,6 +291,7 @@
292291
"@elizaos/plugin-video": "workspace:*",
293292
"@elizaos/plugin-wallet": "workspace:*",
294293
"@elizaos/plugin-whatsapp": "workspace:*",
294+
"@elizaos/plugin-wifi": "workspace:*",
295295
"@elizaos/plugin-workflow": "workspace:*",
296296
"@elizaos/plugin-x402": "workspace:*",
297297
"@elizaos/shared": "workspace:*",
@@ -315,6 +315,7 @@
315315
"jsdom": "^29.0.0",
316316
"json5": "^2.2.3",
317317
"minimisted": "^2.0.0",
318+
"onnxruntime-web": "1.26.0",
318319
"pako": "^1.0.10",
319320
"pg": "^8.16.3",
320321
"pify": "^4.0.1",

packages/agent/scripts/build-mobile-bundle.mjs

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,33 @@ const nativeStubs = {
292292
"@types/react": path.join(stubsDir, "null-plugin.cjs"),
293293
"@types/react/jsx-runtime": path.join(stubsDir, "null-plugin.cjs"),
294294
"@types/react/jsx-dev-runtime": path.join(stubsDir, "null-plugin.cjs"),
295-
// node-llama-cpp and its @node-llama-cpp/<platform> prebuilds were
296-
// removed when plugin-local-inference migrated to llama-cpp-capacitor +
297-
// bun:ffi (the desktop FFI shim path). The mobile bundle no longer
298-
// needs the stubs because no source file imports them.
295+
// node-llama-cpp and its @node-llama-cpp/<platform> prebuilds stay stubbed
296+
// for mobile. plugin-local-inference resolves local inference through
297+
// llama-cpp-capacitor + bun:ffi on device, but node-llama-cpp's helper code
298+
// still contains dynamic imports for every desktop prebuild package.
299+
"node-llama-cpp": path.join(stubsDir, "null-plugin.cjs"),
300+
"@node-llama-cpp/linux-arm64": path.join(stubsDir, "null-plugin.cjs"),
301+
"@node-llama-cpp/linux-armv7l": path.join(stubsDir, "null-plugin.cjs"),
302+
"@node-llama-cpp/linux-x64": path.join(stubsDir, "null-plugin.cjs"),
303+
"@node-llama-cpp/linux-x64-cuda": path.join(stubsDir, "null-plugin.cjs"),
304+
"@node-llama-cpp/linux-x64-cuda-ext": path.join(
305+
stubsDir,
306+
"null-plugin.cjs",
307+
),
308+
"@node-llama-cpp/linux-x64-vulkan": path.join(
309+
stubsDir,
310+
"null-plugin.cjs",
311+
),
312+
"@node-llama-cpp/mac-arm64-metal": path.join(stubsDir, "null-plugin.cjs"),
313+
"@node-llama-cpp/mac-x64": path.join(stubsDir, "null-plugin.cjs"),
314+
"@node-llama-cpp/win-arm64": path.join(stubsDir, "null-plugin.cjs"),
315+
"@node-llama-cpp/win-x64": path.join(stubsDir, "null-plugin.cjs"),
316+
"@node-llama-cpp/win-x64-cuda": path.join(stubsDir, "null-plugin.cjs"),
317+
"@node-llama-cpp/win-x64-cuda-ext": path.join(
318+
stubsDir,
319+
"null-plugin.cjs",
320+
),
321+
"@node-llama-cpp/win-x64-vulkan": path.join(stubsDir, "null-plugin.cjs"),
299322
// llama-cpp-capacitor is the WebView-side JNI binding for the Capacitor
300323
// mobile build. The bun-side AOSP agent uses bun:ffi against libllama.so
301324
// directly via aosp-llama-adapter.ts, never this package — but Bun.build

packages/app-core/scripts/desktop-build.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const CORE_PACKAGE_DIR = resolveWorkspacePackageDir("core");
6363
const ELECTROBUN_CARROTS_PACKAGE_DIR =
6464
resolveWorkspacePackageDir("electrobun-carrots");
6565
const SHARED_PACKAGE_DIR = resolveWorkspacePackageDir("shared");
66+
const UI_PACKAGE_DIR = resolveWorkspacePackageDir("ui");
6667
const VAULT_PACKAGE_DIR = resolveWorkspacePackageDir("vault");
6768

6869
const argv = process.argv.slice(2);
@@ -598,6 +599,13 @@ function ensureWorkspaceRuntimePackagesBuilt() {
598599
ensureWorkspaceRuntimePackageBuilt("@elizaos/app-core", APP_CORE_PACKAGE_DIR);
599600
}
600601

602+
function ensureUiGeneratedAssets() {
603+
runBun(["run", "generate:css-strings"], {
604+
cwd: UI_PACKAGE_DIR,
605+
label: "Generating @elizaos/ui CSS string modules",
606+
});
607+
}
608+
601609
function stageDesktopBuild() {
602610
ensureAppDirs();
603611

@@ -648,6 +656,8 @@ function stageDesktopBuild() {
648656
allowFailure: true,
649657
});
650658

659+
ensureUiGeneratedAssets();
660+
651661
runPackageBinary("vite", ["build"], {
652662
cwd: APP_DIR,
653663
env: {

packages/app-core/scripts/run-mobile-build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {
5252
findForbiddenRuntimeImportGroups,
5353
findForbiddenRuntimeStrings,
5454
formatForbiddenRuntimeFindings,
55-
} from "../../bun-ios-runtime/scripts/ios-app-store-runtime-policy.mjs";
55+
} from "../../native/bun-runtime/scripts/ios-app-store-runtime-policy.mjs";
5656
import {
5757
loadAospVariantConfig,
5858
resolveAppConfigPath,

packages/scripts/patch-llama-cpp-capacitor.mjs

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
* when already applied, which is treated as success.
2020
*/
2121

22-
import { execFileSync, spawnSync } from "node:child_process";
23-
import { existsSync, readFileSync, readdirSync } from "node:fs";
22+
import { spawnSync } from "node:child_process";
23+
import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
2424
import { dirname, join, resolve } from "node:path";
2525
import { fileURLToPath } from "node:url";
2626

@@ -84,6 +84,7 @@ for (const { label, dir: pkgDir } of candidates) {
8484
try {
8585
const contents = readFileSync(buildGradle, "utf8");
8686
if (contents.includes("'arm64-v8a', 'riscv64'")) {
87+
ensureAndroidSkipPatch(pkgDir);
8788
skipped++;
8889
continue;
8990
}
@@ -102,6 +103,7 @@ for (const { label, dir: pkgDir } of candidates) {
102103
);
103104

104105
if (result.status === 0 || result.status === 1) {
106+
ensureAndroidSkipPatch(pkgDir);
105107
patched++;
106108
} else {
107109
failed++;
@@ -116,3 +118,30 @@ if (patched > 0 || skipped > 0 || failed > 0) {
116118
`[patch-llama-cpp-capacitor] patched=${patched} already-applied=${skipped} failed=${failed}`,
117119
);
118120
}
121+
122+
function ensureAndroidSkipPatch(pkgDir) {
123+
const cmakeLists = join(pkgDir, "android", "src", "main", "CMakeLists.txt");
124+
if (!existsSync(cmakeLists)) return;
125+
const current = readFileSync(cmakeLists, "utf8");
126+
if (current.includes("ELIZA_ANDROID_SKIP_FORK_LLAMA_LIB")) return;
127+
const marker =
128+
'if(NOT DEFINED ELIZA_REPO_ROOT)\n message(FATAL_ERROR "ELIZA_REPO_ROOT is required for the Eliza DFlash Android JNI bridge")\nendif()\n';
129+
if (!current.includes(marker)) return;
130+
const skipBlock =
131+
'if(DEFINED ENV{ELIZA_ANDROID_SKIP_FORK_LLAMA_LIB} AND "$ENV{ELIZA_ANDROID_SKIP_FORK_LLAMA_LIB}" STREQUAL "1")\n' +
132+
' file(WRITE "${CMAKE_BINARY_DIR}/eliza-dflash-smoke-stub.cpp" "extern \\"C\\" int eliza_dflash_smoke_stub() { return 0; }\\n")\n' +
133+
' set(ELIZA_SMOKE_OUTPUT_NAME "llama-cpp-arm64")\n' +
134+
' if(ANDROID_ABI STREQUAL "riscv64")\n' +
135+
' set(ELIZA_SMOKE_OUTPUT_NAME "llama-cpp-riscv64")\n' +
136+
' endif()\n' +
137+
' add_library(${ELIZA_SMOKE_OUTPUT_NAME} SHARED "${CMAKE_BINARY_DIR}/eliza-dflash-smoke-stub.cpp")\n' +
138+
' set_target_properties(\n' +
139+
' ${ELIZA_SMOKE_OUTPUT_NAME}\n' +
140+
' PROPERTIES\n' +
141+
' OUTPUT_NAME "${ELIZA_SMOKE_OUTPUT_NAME}"\n' +
142+
' )\n' +
143+
' message(STATUS "Skipping Eliza DFlash JNI bridge for Android smoke build")\n' +
144+
' return()\n' +
145+
'endif()\n\n';
146+
writeFileSync(cmakeLists, current.replace(marker, skipBlock + marker));
147+
}

0 commit comments

Comments
 (0)