diff --git a/.dockerignore b/.dockerignore index a2b5c9a7a..a84fb88f1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,7 +15,6 @@ docs/ README* *.md !README.md -LICENSE CLAUDE.md *.log sonarcloud_issues.txt diff --git a/.github/workflows/android-helper.yml b/.github/workflows/android-helper.yml index 46103a99a..613ca4b2b 100644 --- a/.github/workflows/android-helper.yml +++ b/.github/workflows/android-helper.yml @@ -1,8 +1,8 @@ name: Android device-side helper -# Builds and tests native/android_helper. Stage 1 is the fence ledger, a pure Kotlin -# state machine tested on the JVM; later stages add the instrumentation app and an -# emulator run. Nothing here holds a secret or publishes anything. +# Builds and tests native/android_helper: the fence ledger on the JVM, the instrumentation +# APK, and (stage 4) an emulator run that drives the helper through the package's host +# provider stack. Nothing here holds a secret or publishes anything. on: push: @@ -10,11 +10,13 @@ on: paths: - "native/android_helper/**" - ".github/workflows/android-helper.yml" + - "je_auto_control/utils/agent_runtime/android_*.py" pull_request: branches: ["main"] paths: - "native/android_helper/**" - ".github/workflows/android-helper.yml" + - "je_auto_control/utils/agent_runtime/android_*.py" workflow_dispatch: permissions: @@ -79,3 +81,44 @@ jobs: name: android-helper-debug-apk path: native/android_helper/app/build/outputs/apk/debug/app-debug.apk retention-days: 7 + + emulator: + # Stage 4: the debug APK on an x86_64 emulator, driven by native/android_helper/emulator_check.py + # through ManagedAdbServer, AndroidHelperClient and GeteventSource. Emulator evidence only; + # real-device acceptance stays deferred. + needs: instrumentation-app + runs-on: ubuntu-22.04 + timeout-minutes: 45 + steps: + - uses: actions/checkout@v5 + with: + persist-credentials: false + + - uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Install the package + run: python -m pip install -e . # NOSONAR githubactions:S8544 # reason: installs the checked-out project itself + + - uses: actions/download-artifact@v5 + with: + name: android-helper-debug-apk + path: apk + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - name: Drive the helper on an emulator + # nosemgrep: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha + uses: reactivecircus/android-emulator-runner@v2 # NOSONAR githubactions:S7637 + with: + api-level: 30 + arch: x86_64 + target: default + disable-animations: true + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim + script: sh native/android_helper/emulator_run.sh apk/app-debug.apk diff --git a/.github/workflows/driver.yml b/.github/workflows/driver.yml new file mode 100644 index 000000000..b97d4a8f0 --- /dev/null +++ b/.github/workflows/driver.yml @@ -0,0 +1,91 @@ +name: Driver + +# Builds the AutoControl socket driver (autocontrol_driver/generate_autocontrol_driver.py) with +# Nuitka: one windowless executable on Windows, one binary on Linux. The binaries are not kept in +# the repository, so a driver can never ship an older socket server than the source. Each build is +# started once and must refuse a command sent without the token, answer one sent with it, and exit +# on quit_server. Builds are uploaded as artifacts, and attached to a published GitHub release. + +on: + push: + branches: ["dev", "main"] + paths: + - "autocontrol_driver/**" + - "je_auto_control/utils/socket_server/**" + - ".github/workflows/driver.yml" + release: + types: [published] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: driver-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - os: windows-2022 + binary: AutoControlDriver.exe + artifact: AutoControlDriver-windows + - os: ubuntu-22.04 + binary: AutoControlDriver + artifact: AutoControlDriver-linux + runs-on: ${{ matrix.os }} + timeout-minutes: 90 + steps: + - uses: actions/checkout@v5 + with: + persist-credentials: false + + - uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Install the build's Linux tools and a display + if: runner.os == 'Linux' + # patchelf for Nuitka's one-file build; the X11 backend opens a display at import time. + run: sudo apt-get update && sudo apt-get install -y patchelf xvfb + + - name: Install the package and Nuitka + run: python -m pip install -e . nuitka==4.3.5 zstandard==0.25.0 # NOSONAR githubactions:S8544 # reason: installs the checked-out project itself; build tools pinned + + - name: Build the driver + run: python autocontrol_driver/build_driver.py --output-dir dist + + - name: Smoke-test the driver (Windows) + if: runner.os == 'Windows' + run: python autocontrol_driver/smoke_driver.py dist/${{ matrix.binary }} + + - name: Smoke-test the driver (Linux) + if: runner.os == 'Linux' + run: xvfb-run -a python autocontrol_driver/smoke_driver.py dist/${{ matrix.binary }} + + - uses: actions/upload-artifact@v6 + with: + name: ${{ matrix.artifact }} + path: dist/${{ matrix.binary }} + if-no-files-found: error + + attach: + if: github.event_name == 'release' + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/download-artifact@v7 + with: + path: drivers + merge-multiple: true + + - name: Attach the drivers to the release + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ github.event.release.tag_name }} + run: gh release upload "$TAG" drivers/* --repo "$GITHUB_REPOSITORY" --clobber diff --git a/.github/workflows/platform-smoke.yml b/.github/workflows/platform-smoke.yml index 7744112c6..23139e6f6 100644 --- a/.github/workflows/platform-smoke.yml +++ b/.github/workflows/platform-smoke.yml @@ -19,29 +19,28 @@ jobs: # ubuntu-22.04-arm adds Linux, and windows-11-arm is back. # # windows-11-arm installs a smaller dependency set than every other - # square, and that is deliberate rather than accidental. Two packages - # publish no win_arm64 wheel, so pyproject.toml marks them off this - # one platform: + # square, and that is deliberate rather than accidental. cryptography + # publishes no win_arm64 wheel at our floor, so pyproject.toml marks + # it off this one platform: wheels stop at 46.0.3, and >=50.0.0 is a + # security floor (GHSA-537c-gmf6-5ccf, GHSA-g6cj-pr64-35w5) that + # cannot be lowered. # - # opencv-python — no win_arm64 wheel in any version, so pip fell - # back to building from source and CMake could not - # configure for ARM64. Twelve minutes, then failure. - # cryptography — wheels stop at 46.0.3; 46.0.4 onwards ship none. - # Our floor is >=50.0.0 and that is a security floor - # (GHSA-537c-gmf6-5ccf, GHSA-g6cj-pr64-35w5), so it - # cannot be lowered. + # opencv-python carried the same marker (no win_arm64 wheel, so pip + # built from source and CMake could not configure for ARM64) until + # 5.1.0.95 shipped a cp37-abi3 win_arm64 wheel. It is installed here + # again, and the "Run the image stack" step below proves cv2 and + # template matching work on every square. # - # Nothing in the package imports either one at import time, so what + # Nothing in the package imports cryptography at import time, so what # this square proves is real: the install succeeds and the stable API - # works. Image matching, action signing, ACME and encrypted recording - # do not work there, and Progress.md says so. Re-check upstream in - # about ten seconds, no runner required: + # works. Action signing, ACME and encrypted recording do not work + # there, and Progress.md says so. Re-check upstream in about ten + # seconds, no runner required: # # pip install --dry-run --only-binary=:all: --platform win_arm64 \ - # --python-version 3.12 --target /tmp/probe \ - # 'opencv-python>=4.8,<6' 'cryptography>=50.0.0' + # --python-version 3.12 --target /tmp/probe 'cryptography>=50.0.0' # - # When both resolve, drop the markers from pyproject.toml. + # When it resolves, drop the marker from pyproject.toml. os: [windows-2022, ubuntu-22.04, macos-15, ubuntu-22.04-arm, windows-11-arm] python-version: ["3.14"] runs-on: ${{ matrix.os }} @@ -63,6 +62,17 @@ jobs: python -c "import je_auto_control.api as ac; compile(ac.generate_code([['AC_screen_size']], style='actions'), '', 'exec')" + - name: Run the image stack + shell: bash + run: >- + python -c "import numpy as np; + from je_auto_control.utils.cv2_utils.optional import require_cv2, require_je_open_cv; + cv2 = require_cv2(); require_je_open_cv(); + frame = np.zeros((40, 40), np.uint8); frame[10:20, 22:32] = 255; + result = cv2.matchTemplate(frame, frame[8:22, 20:34].copy(), cv2.TM_CCOEFF_NORMED); + location = cv2.minMaxLoc(result)[3]; + assert location == (20, 8), location; + print('cv2', cv2.__version__, 'match at', location)" - name: Create headless diagnostic bundle shell: bash run: >- diff --git a/.github/workflows/windows-uia.yml b/.github/workflows/windows-uia.yml new file mode 100644 index 000000000..0f1c132c9 --- /dev/null +++ b/.github/workflows/windows-uia.yml @@ -0,0 +1,52 @@ +name: Windows UI Automation over real COM + +# The headless suite exercises the UIA backend against a fake comtypes. This job installs the +# accessibility extra (real comtypes) on a Windows runner and runs the read-only real-COM tests: +# element reads on the caller's thread and on the accessibility walker, a focus wait that ends by +# its timeout, and a stop that wakes a focus wait. Nothing is clicked, typed or focused. If the +# runner's session has no usable UI Automation the tests skip and say why. + +on: + push: + branches: ["dev", "main"] + paths: + - "je_auto_control/utils/accessibility/**" + - "je_auto_control/utils/ax_events/**" + - "je_auto_control/utils/system_volume/**" + - "test/unit_test/headless/test_accessibility_windows_real_com.py" + - ".github/workflows/windows-uia.yml" + pull_request: + branches: ["main"] + paths: + - "je_auto_control/utils/accessibility/**" + - "je_auto_control/utils/ax_events/**" + - "je_auto_control/utils/system_volume/**" + - "test/unit_test/headless/test_accessibility_windows_real_com.py" + - ".github/workflows/windows-uia.yml" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: windows-uia-${{ github.ref }} + cancel-in-progress: true + +jobs: + real-com: + runs-on: windows-2022 + timeout-minutes: 20 + steps: + - uses: actions/checkout@v5 + with: + persist-credentials: false + + - uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Install the package with the accessibility extra + run: python -m pip install -e ".[accessibility]" pytest==9.1.1 pytest-timeout==2.4.0 # NOSONAR githubactions:S8544 # reason: installs the checked-out project itself; test tools pinned as in dev_requirements.txt + + - name: Run the real-COM UI Automation tests + run: python -m pytest test/unit_test/headless/test_accessibility_windows_real_com.py -v -rs --timeout 120 diff --git a/AutoControl/executor/executor_bad_file.py b/AutoControl/executor/executor_bad_file.py index 669b1abc1..f38299606 100644 --- a/AutoControl/executor/executor_bad_file.py +++ b/AutoControl/executor/executor_bad_file.py @@ -1,9 +1,14 @@ # This example is primarily intended to remind users of the importance of verifying input. -from je_auto_control import execute_action, read_action_json - +from pathlib import Path + +from je_auto_control import execute_action, read_executable_action_json + +# Resolved from this script's location, so the project still runs after it is moved. +KEYWORD_DIR = Path(__file__).resolve().parent.parent / "keyword" + execute_action( - read_action_json( - r"D:\Codes\AutoControlGUI\AutoControl\keyword\bad_keyword_1.json" + read_executable_action_json( + str(KEYWORD_DIR / "bad_keyword_1.json") ) ) diff --git a/AutoControl/executor/executor_folder.py b/AutoControl/executor/executor_folder.py index dde81b1ae..b8c6f467a 100644 --- a/AutoControl/executor/executor_folder.py +++ b/AutoControl/executor/executor_folder.py @@ -1,7 +1,12 @@ +from pathlib import Path + from je_auto_control import execute_files, get_dir_files_as_list +# Resolved from this script's location, so the project still runs after it is moved. +KEYWORD_DIR = Path(__file__).resolve().parent.parent / "keyword" + execute_files( get_dir_files_as_list( - r"D:\Codes\AutoControlGUI\AutoControl\keyword" + str(KEYWORD_DIR) ) ) diff --git a/AutoControl/executor/executor_one_file.py b/AutoControl/executor/executor_one_file.py index 6c3d28c4e..67d78aa8b 100644 --- a/AutoControl/executor/executor_one_file.py +++ b/AutoControl/executor/executor_one_file.py @@ -1,7 +1,12 @@ -from je_auto_control import execute_action, read_action_json +from pathlib import Path + +from je_auto_control import execute_action, read_executable_action_json + +# Resolved from this script's location, so the project still runs after it is moved. +KEYWORD_DIR = Path(__file__).resolve().parent.parent / "keyword" execute_action( - read_action_json( - r"D:\Codes\AutoControlGUI\AutoControl\keyword\keyword1.json" + read_executable_action_json( + str(KEYWORD_DIR / "keyword1.json") ) ) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e483531e..5a802f4a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,235 @@ ## [Unreleased] +- `record` / `record_to_json` exit 1 and leave the target file unchanged when the recorder cannot stop, + instead of writing `[]`. With mandatory signing, the Record tab's load and the generated + `executor_one_file.py` / `executor_bad_file.py` refuse unsigned or tampered files. Shell output that + arrives after its run ended is logged with that run's secrets masked. On Windows, record start and stop + raise `AutoControlRecordException` when the hook thread does not start or does not exit. + +- A device timeout of 0, a negative number, NaN or infinity raises `DeviceError` (`DeviceContext`, the + matrix spec's `timeout_s`, `device_timeout_s`, `invoke(timeout_s=...)`); an explicit 0 no longer means + 30 s. Generated and example executor scripts find `keyword/` relative to themselves, so projects created + earlier need regenerating. `window_message` passes 64-bit WPARAM / LPARAM and returns the full LRESULT. + +- Docker: `remote-host` refuses to start without a non-blank `AC_TOKEN` (the `change-me` fallback is + gone); `signaling` mode works (the images install the extra, and the entrypoints pass `--bind`, which + the server accepts); `AC_PORT` sets the port in every mode, and Helm `rest.port` / `signaling.port` + now change it; the image's wheel contains the pytest plugin module and LICENSE. + +- VS Code / LSP: only files matching `autocontrolLsp.actionFiles` (default `**/*.ac.json`, + `**/actions/**/*.json`) are diagnosed, so `package.json` and commented settings files are left + alone; flow commands and positional argument lists are no longer flagged; the screenshot command + uses `GET /screenshot` and opens the image; hover and edits are right on lines with emoji. + +- Browser extension: password and other sensitive fields are recorded as `${secrets.NAME}`, never as + their value; recording follows only the tab where Start was pressed (refused without one) and ends + when it closes; commands are applied one at a time so quick events are not lost; the declared icons + ship, so the extension loads unpacked from a clean checkout. + +- Web viewer: mouse and keyboard input now reaches the host (the host rejected every web event before); + only the `ctrl` channel carries control, so a usb channel arriving later no longer takes auth and input; + a microphone or screen share granted after a disconnect is stopped at once. New asset `viewer-session.js`. + +- Native: the Linux guardian refuses to recover from its journal when a slot cannot be read + (`GJ_ERROR_IO`) instead of falling back to an older record. The Android helper fails a swipe on its + first refused event and always releases the pointer, keeps serving after one client disconnects, + and no longer revives a command when a fence returns to a retired epoch value. + +- Inside a run, accessibility set-value / invoke / toggle run on the accessibility walker thread: a + stop before the write acts prevents it, and one during the act waits up to 5 s, then returns the + result or raises `AccessibilityWriteOutcomeUnknown` (exported from the facade). Outside a run + nothing changes. Backends gain a `gates_writes` attribute; only Windows is gated today. + +- `SlackBot` polls every `run_poll_interval_s` (new, 1 s by default; finite, > 0 and at most + `poll_interval_s`) while a `/run` is going, so a `/stop` lands within about a second; idle it keeps + `poll_interval_s` (5 s). A Slack `429` with `Retry-After` now holds every poll back until it passes. + +- A stop now also ends adb commands, the USB and Wayland capture tools, mobile device calls and + find-element waits, `AC_wait_for_port`, `AC_send_email`, `AC_feature_match`, each agent model call, + `AC_assert_audio` / `AC_assert_video` and admin poll / broadcast. A device session stopped mid-call is + closed; a stopped email may or may not have been delivered. `run_captured(kill_tree=False)` is new. + +- GUI: Script Builder offers the secret arguments of an action list returned in a result as one-time + values; Quick Connect says when its session or host was taken over instead of just closing. + +- The prebuilt `autocontrol_driver/AutoControlDriverWindows.exe` and `generate_autocontrol_driver_linux` + are removed: they shipped the old unauthenticated socket server. The `Driver` workflow builds the + driver with Nuitka (a windowless `AutoControlDriver.exe`, a Linux `AutoControlDriver`), smoke-tests + its authentication, and attaches both to each GitHub release; `autocontrol_driver/build_driver.py` + builds it locally. + +- **Breaking:** the TCP socket server (`start-server`, `start_autocontrol_socket_server`) requires + authentication. A client that sends a command (or `quit_server`) without it gets + `authentication required` and the command does not run. To migrate, send `AUTH ` as the + first line of each connection and read the `AUTH_OK` line before the reply, or use + `send_socket_command()`. The token is read from `~/.je_auto_control/socket_server_.token` + (owner-only, deleted on close), set with `--token` / `JE_AUTOCONTROL_SOCKET_TOKEN`, or under RBAC + is a user's token (the server token is then refused; actions need `drive_input`, `quit_server` + needs `manage_hosts`). To keep the old protocol, start the server with `--no-auth` + (`require_auth=False`), which logs a warning at start. `TCPServer.close_flag` was already gone; + wait on `server.socket.fileno() == -1` instead. +- Agent runtime: a desktop task can be verified by a permanent read-only completion reader; the + read-only helper takes no presence binding and refuses one. +- Image search: unusable input now raises `ImageSearchInputException` (exported from the facade) instead of + `ImageNotFoundException`: a missing or unreadable template, a single-colour template, a threshold outside + 0-1, NaN or not a number, or an image OpenCV cannot match; `DeviceFrame.locate_image` follows. The two are + siblings under `AutoControlException`, so code that caught `ImageNotFoundException` for a typo in the + template path must also catch `ImageSearchInputException`. `AC_assert_image` with `present: false`, + `AC_wait_image_gone`, `ac_wait_for_image` and the `else` branch of `AC_if_image_found` now fail on such + input instead of passing; image triggers with it are disabled, and observer rules, state-machine + `if_image_found` guards and anchor locators raise. + +- Executor: an error from outside the framework family (`cv2.error`, `sqlite3.Error`, a plugin's own + exception) no longer aborts the action list; it is recorded as that action's failure, wrapped in + `AutoControlForeignException` (exported; `original` and `__cause__` hold the original). With + `raise_on_error=True` the wrapper is raised, so code that caught `cv2.error` or `sqlite3.Error` from + `execute_action` should catch `AutoControlForeignException` and read `original`. `AC_try` now catches + these errors and `AC_retry` retries them. Assertion failures (including a plugin's `AssertionError`), + loop signals, stops, cancellation, `KeyboardInterrupt` and `SystemExit` are still never contained. + +- MCP HTTP: `resources/subscribe` belongs to the session that sent it and `notifications/resources/updated` + is delivered on that session's `GET` stream (dropped while none is open); ending the session releases its + subscriptions. A request without a session is refused with `-32600` instead of answered `{}`. +- Voice commands and macros now run each step only if both the principal who registered them and + the current caller may run it. A flow that relied on dispatching someone else's voice command or + macro with the dispatcher's own rights (an admin speaking an operator's phrase, or the GUI or + Python calling a restricted user's macro) now records an `AuthorizationError` for every step the + registrant may not run; register or define the list as a principal with those rights. + `AC_define_macro` refuses to redefine a macro another principal owns; only the owner or trusted + local code may. Anonymous MCP sessions act as an `mcp:` operator, so even with RBAC off + their macros and voice commands keep operator limits, and a reconnected MCP session can no longer + redefine a macro an earlier session defined (redefine it from trusted local code, or use a new name). + +- The named registries behind `AC_cas_put`, `AC_dedup_check`, `AC_idempotency_begin`, + `AC_bulkhead_run`, `AC_sequence_observe` and `AC_outbox_enqueue` hold at most 1,024 names each + (`MAX_REGISTRY_NAMES`); a new name past that raises `RegistryFullError`. Existing names keep + working and are released only when the process ends. Both names are exported from the facade. + +- `AC_generate_sop` and `AC_generate_code` no longer expand `${secrets.NAME}` into the generated + file and result, and a name not yet bound (a loop variable) is kept as written instead of failing + with "Unknown variable". Generated documents that used to contain the expanded secret value now + contain the `${secrets.NAME}` reference; known `${var}` placeholders are still substituted. + +- `env://` values returned by `AC_resolve_ref` / `AC_resolve_refs` are masked for the rest of the run + in logs, the journal and the MCP audit, and `value` / `resolved` are masked in the logged result and + the Script Builder result pane; the executor record and the MCP result still carry the value. +- Remote desktop: a TCP / WebSocket connection still authenticating no longer takes a `max_clients` + slot. At most `max_pending_handshakes` (default 8) may be authenticating at once (more are closed + at accept), and each has `auth_timeout` (default 10 s, at most 60; it was 60 s per read) for TLS, + the WebSocket upgrade and the challenge-response together, so a silent connection is dropped after + 10 s. A viewer whose host filled up while it authenticated receives `AUTH_FAIL "host full"`. Both + settings are accepted by `RemoteDesktopHost`, `registry.start_host` / `start_ws_host`, + `AC_start_remote_host`, `AC_start_ws_host`, `ac_remote_host_start` and the host tab; a boolean, + string, fractional cap or deadline outside (0, 60] raises `ValueError`. Over H.264 a viewer that + falls behind skips ahead to a fresh keyframe instead of decoding broken P-frames, and a new viewer + starts at a keyframe; the host forces one at most once a second (`CodecProvider.request_keyframe`, + honoured by `H264CodecProvider`). JPEG streams are unchanged. + +- GUI: translated table and list cells follow a language switch, and 58 message-box titles, + validation messages and result lines that were hard-coded English are translated. + +- GUI: status lines, results, hints, window titles and the tray menu follow a language switch; + Presence, Variables, Run History and WebRunner no longer re-run their query on a switch. + +- Executor flags spelled `"false"` are honoured by `AC_usb_passthrough_enable`, `AC_usb_acl_add`, + `AC_usb_acl_import`, `AC_assert_visual`, `AC_soft_assert`, the fuzzy commands and `AC_execute_action` + (`dry_run`). List arguments given as a JSON string must decode to a list. `AC_wait_color`, + `AC_assert_audio`, `AC_assert_video_changes` and `AC_perceptual_diff` refuse NaN or infinite thresholds. + `AC_expect_poll` rejects unknown ops. `AC_usb_watch_start` reports the interval in use. + +- GUI: remote-desktop frames and result images decode off the GUI thread; a CA-store load failure + is reported as the connect error; audit-log query errors and template-crop errors show in place. + +- The config-sync outbox database moves to schema v4 (migrated in place); peer-control receipts are + pruned by the outbox bounds but kept at least a day. USB passthrough refuses new claims with + "usb host busy" while `WorkerLimits.max_abandoned` (16) closed-session threads are still in the + backend. One WebRTC drop uses one auto-reconnect attempt. + +- Secrets passed as positional arguments are masked in logs, record keys, the MCP audit file and + the action journal, so record keys change for those actions. The Prometheus exporter and the + ACME HTTP-01 server drop a silent client after 30 s. `AC_expect_poll` no longer matches + `expected: null` on a failing attempt. + +- GUI: file and store operations of the editors, Run History, Test Suites, Self-Healing, REST users, + USB ACL, the admin console and the remote-desktop trust list, address book and known hosts run + off the GUI thread; the REST one-time token field is masked; Diagnostics' capability probe is + refused for roles without `read_data`. + +- `${...}` in `AC_agent_task_submit` / `_lookup` / `_act`, `AC_agent_dag`, `_trigger`, `_skill` and + `_task_recovery` payloads is no longer expanded at dispatch; the runtime expands it against the + task's `inputs`, so pass caller values through `spec.inputs`. `ClaimsPolicy` refuses a NaN, + infinite or negative `leeway`; `ac_jwt_decode` accepts `leeway` (0-3600 s). The MCP audit log + records admission refusals (`refused`, `invalid_arguments`, `rate_limited`, `unconfirmed`). + +- Remote desktop: chat, clipboard and file sends queue per viewer (a stalled viewer's overflow + is dropped); `RelayServer(max_handshakes=64)` caps handshakes; `generate-systemd` / + `generate-launchd` escape paths and refuse unrepresentable ones (`ServiceUnitError`, exit 2); + the TURN bundle is written owner-only; `SyncOutbox` skips conflict rows and prunes receipts. + +- Agent runtime: `stop_all` returns without waiting for a busy DAG batch (it is fenced in the + background and listed in `batch_fence_pending`); a pinned image directly under a default + drive root is refused; a recovery successor may only add resume conditions. + +- `create_project_dir` / `AC_create_project` keep existing files unless `overwrite=True` and + return `{"written": [...], "skipped": [...]}`; `apply_unified` refuses a hunk past the end + of the text; `lock_session` commands stop after 10 s and raise `LockSessionTimeout`; + `ResourceProfiler` keeps the newest `max_samples` samples (default 7,200). + +- GUI: under RBAC the older tabs (secrets, webhooks, plugins, REST, admin console, + audit log, USB, remote-desktop host panels, agent tasks) check the role before a + privileged command and show a refusal in the tab. Token and secret fields are masked + with a Show toggle; the Quick Connect approval dialog denies on Enter or Escape. + Vault, plugin, config bundle, audit log, Data Source and Trace Replay work runs off + the GUI thread. + +- USB passthrough serves each session on its own worker threads, one ordered lane per + claim, instead of on the shared WebRTC event loop: a slow transfer no longer stalls + other sessions. A session's queue is bounded (`frame_budget`); a frame over it is + refused with the protocol's ERROR frame. + +- `SlackBot` never runs commands already in the channel history: a first start + records the newest message and runs nothing, and the position is saved + (`state_path`, default `~/.je_auto_control/chatops/`) before each command + runs. Tests or callers that relied on the first poll running old messages + must pass `last_seen_ts`. +- `Outbox` keeps at most 1,000 sent entries and none older than 7 days + (`max_sent`, `max_sent_age_s`); sent entries gain an optional `sent_at`. + Files stay readable in both directions. +- A damaged asset store file is moved aside as `.corrupt-