Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

chore: auto-save WIP via Claude stop-hook safety net (2026-07-01 20:02)

Ruben Lütke7b88ac079a2a
diff --git a/.githooks/pre-push b/.githooks/pre-push
index 23ed936712..33527f850c 100755
--- a/.githooks/pre-push
+++ b/.githooks/pre-push
@@ -197,6 +197,11 @@ if [ "$status" -ne 0 ]; then
echo " See the diff above. Fix requirements.in, then regenerate the lockfile:"
echo " uv pip compile --universal --generate-hashes --python-version 3.11 --output-file=requirements.txt requirements.in"
fi
+ if [ "${lockfile_hit:-0}" -ne 0 ]; then
+ echo "pre-push BLOCKED: LOCKFILE gate (requirements.txt not universal or has GPU/CUDA/torch wheels)."
+ echo " See the findings above. Regenerate the platform-universal lockfile with:"
+ echo " uv pip compile --universal --generate-hashes --python-version 3.11 --output-file=requirements.txt requirements.in"
+ fi
echo "Bypass once with: git push --no-verify (layer-3 CI is the backstop)."
fi
exit "$status"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bd0787ee0b..c1838e3e03 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -242,6 +242,13 @@ jobs:
python -m pip install --upgrade packaging
python scripts/ci/check_requirements_sync.py
+ # Companion gate: the compiled requirements.txt itself must stay
+ # `--universal` and free of nvidia-*/torch/CUDA wheels, so a lockfile
+ # regenerated the wrong way cannot silently re-brick non-maintainer
+ # installs (AP-23). Stdlib only — no extra install needed.
+ - name: Lockfile universal + GPU-free gate (BLOCKING)
+ run: python scripts/ci/check_lockfile_universal.py
+
# Output Language Policy enforcement (CLAUDE.md, HIGHEST PRIORITY): block any
# NEWLY ADDED German text from reaching GitHub. Diff-based, so the in-flight
# DE->EN translation backlog (pre-existing German) does NOT turn this red - only
diff --git a/jarvis/ui/web/frontend/src/lib/nativeDrag.ts b/jarvis/ui/web/frontend/src/lib/nativeDrag.ts
new file mode 100644
index 0000000000..42a1bdabe6
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/lib/nativeDrag.ts
@@ -0,0 +1,43 @@
+/**
+ * Native OS file drag-out from the desktop WebView2 shell.
+ *
+ * A WebView cannot drag a real file out via HTML5 drag-and-drop, so we hand the
+ * drag to the native side: on `mousedown` (button still down) we post a raw
+ * WebView2 message. pywebview delivers it to `EdgeChrome.on_script_notify` ON THE
+ * UI THREAD, where `jarvis/ui/native_drag.py` starts an OLE `DoDragDrop` that
+ * takes over the in-progress mouse press. From there the OS carries a real file
+ * to any target — Explorer, a browser upload zone, a chat. See native_drag.py.
+ *
+ * Only available inside the desktop WebView2 shell; `canNativeDrag()` is false in
+ * a plain browser / on the VPS, where the UI falls back to the "Show in folder"
+ * action instead.
+ */
+
+/** Discriminator — MUST match `MESSAGE_TAG` in jarvis/ui/native_drag.py. */
+const DRAG_MESSAGE_TAG = "jarvis-file-drag";
+
+interface WebView2Bridge {
+ postMessage: (message: unknown) => void;
+}
+
+function bridge(): WebView2Bridge | undefined {
+ const chrome = (window as { chrome?: { webview?: WebView2Bridge } }).chrome;
+ const wv = chrome?.webview;
+ return wv && typeof wv.postMessage === "function" ? wv : undefined;
+}
+
+/** True in the desktop WebView2 shell, where a native file drag is possible. */
+export function canNativeDrag(): boolean {
+ return bridge() !== undefined;
+}
+
+/**
+ * Begin a native OS file drag of `path`. Call from a `mousedown` handler while
+ * the button is held. No-op (returns false) outside the desktop shell.
+ */
+export function startNativeFileDrag(path: string): boolean {
+ const wv = bridge();
+ if (!wv || !path) return false;
+ wv.postMessage([DRAG_MESSAGE_TAG, { files: [path] }]);
+ return true;
+}