Skip to content

Fixes and packaging - #9

Open
vinniefalco wants to merge 8 commits into
cppalliance:masterfrom
vinniefalco:master
Open

Fixes and packaging#9
vinniefalco wants to merge 8 commits into
cppalliance:masterfrom
vinniefalco:master

Conversation

@vinniefalco

Copy link
Copy Markdown
Member

Odds and ends

Refine the `promptforge-core-support` public API before the agentic harness lands. `GuardNonce` gains a `wrap` method, a `Display` impl, and equality derives; `detail` gains three model-catalog validation constants; `CancelHandle` moves onto `tokio_util::sync::CancellationToken` and grows `child()`. Both production call sites of the free `wrap` migrate to the method.

- `CancelHandle` replaces its hand-rolled `Arc<AtomicBool>` and `Arc<Notify>` pair with a single `CancellationToken`, which deletes the enable-check-await lost-wakeup machinery; `child()` delegates to `child_token()` so an orchestrator can cancel one subagent while a run-level cancel reaches every subagent.
- The free `wrap` stays as a deprecated one-line alias instead of a breaking delete, because the crate carries crates.io publish metadata.
- `GuardNonce` derives `PartialEq`, `Eq`, and `Hash`, and its `Display` renders the 32 lowercase hex digits so logs can correlate envelopes to runs.
- `detail` adds `MODEL_CATALOG_VALIDATION_STARTED`, `MODEL_CATALOG_VALIDATION_SUCCEEDED`, and `MODEL_CATALOG_VALIDATION_FAILED`, aliasing `Observation::ModelCatalogValidationStarted` and its siblings.
- No in-tree caller of the deprecated free `wrap` remains; the alias serves downstream users only.
A same-origin check replaces the any-loopback rule, so no other local server can load in the webview and inherit the IPC bridge, folder picker, or desktop flag. Also dispatch the maximized event only on state transitions instead of every resize event, and share one event-loop proxy via clones instead of three independent handles.
promptforge-workshop is now the Tauri app crate and promptforge-desktop-shell is deleted. The app builds on tauri::Builder with single-instance, dialog, opener, and window-state plugins; the setup hook boots the gateway, waits for health, and opens a programmatic WebviewUrl::External window (hidden while built, undecorated on Windows after construction, then shown); RunEvent::Exit shuts the gateway down exactly once. The same-origin navigation policy moves to navigation.rs, with denied URLs opened from Rust through tauri-plugin-opener. bridge.rs carries the Windows WebView2 web-message file-drop bridge (same workspace-drop contract, promptforge:file-drop dispatch) and a PermissionRequested handler granting the microphone only, with per-block SAFETY comments and the COM tests; off Windows, Tauri's DragDrop event feeds the same dispatch, Linux gets the WebKitGTK media-permission handler, and macOS gets the Info.plist usage string plus audio-input entitlement through a tauri.macos.conf.json overlay. The UI switches to @tauri-apps/api window controls and plugin-dialog's folder picker, with the Tauri modules mocked through esbuild aliases in tests. tauri.conf.json plus capabilities/default.json wire the loopback remote origin, and cargo tauri build produces the NSIS installer.

Field-report fixes ride along: downloads resume from a kept .part through a Range request guarded by a provenance marker (the ART-007 tests change meaning: a failed publication keeps the partial); the STT stop path names the dropped leading audio when a take exceeds the interim window with no final pass; the mic stays visible and names its blocker on click (no GPU, no provisioned speech models via the capability endpoint's new engine flag, chat not ready); the two tilde expansions are unified on one pure tested core; and a joining session's status line is recomputed from the current probe rather than replaying a stale heartbeat transition. The heartbeat.rs ceiling rises to 969 for the join_status helper and its tests.

Note: cargo tauri build force-enables tauri/custom-protocol, which pulls the WebView2 loader's C++ objects into the link; on a machine whose release-mode MSVC CRT libs are mismatched (the field report's VS 2026/CUDA 13.2 class) that link fails. The installer above was produced by building the exe with plain cargo and running cargo tauri bundle.
The repo mixed CRTs - whisper.cpp and the WebView2 loader compile /MT while Rust links /MD - and suppressed the conflict warning with /NODEFAULTLIB:LIBCMT. That held only while the dynamic import libs carried every symbol the /MT objects needed; CUDA 13.2's cudart.lib (built with /guard:cf) and the WebView2 loader's nothrow-new reference broke the release link on the current VS 2026 toolchain (LNK1120), and cargo tauri build with it. Now the Windows target builds with +crt-static, and two CMAKE_* env vars ride whisper-rs-sys's own build-script passthrough so cmake compiles the whisper core and the NVCC kernels /MT to match (CMP0091 NEW because whisper.cpp's cmake_minimum_required predates the runtime-library abstraction). Verified: cargo tauri build with CUDA produces the NSIS installer; clippy -D warnings and the full workspace test suite pass under the new config. Also folds in the formatting pass over the Phase 7 clippy fixes.
Add the standard windows_subsystem attribute: release builds are a GUI app (no console window when launched from the installer), debug builds keep the console for eprintln diagnostics.
…dow flicker

The Gateway Config panel loaded its iframe from the gateway's own port (a cross-origin iframe), which made Chromium spawn renderer processes that flashed a console window on Windows. Now the workshop server proxies the config SPA's assets at /gateway/config/, so the iframe loads same-origin. The async gateway-origin probe is gone from the panel; the iframe mounts synchronously.
llama-server and icacls are console-subsystem executables; spawning them from a GUI-subsystem parent (the workshop desktop app) without CREATE_NO_WINDOW makes Windows briefly flash a console for each one. Add the flag to every Command::new in the gateway-local crate's spawn and DACL paths, through a crate-level constant matching Unsloth's pattern.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant