| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
refactor(core): call the worker module what it builds The workspace already had three other runtimes — `openlogi_agent_core::runtime` (the action runtime), the desktop's `runtime` module (its event loop), and `paths::runtime_dir` — and the agent crate imports two of them side by side. The module's own doc and guard call what it builds a worker: it is `openlogi_core::worker`, with `runtime()` for a current-thread runtime you drive yourself and `spawn(name, run)` for a named thread that owns one, behind the `worker` feature. The guard also matches the builder reached through `runtime::` or a `use`, which the fully qualified pattern missed. | 10 天前 | |
feat(agent): default mouse profiles to pointer context Co-authored-by: AprilNEA <github@sku.moe> | 5 天前 | |
feat(agent): default mouse profiles to pointer context Co-authored-by: AprilNEA <github@sku.moe> | 5 天前 | |
feat(agent): default mouse profiles to pointer context Co-authored-by: AprilNEA <github@sku.moe> | 5 天前 | |
chore(infra): prune the tree's lint suppressions and make the survivors expect (#720) * chore(infra): let clippy.toml silence unwrap/expect in tests The workspace table keeps `unwrap_used`/`expect_used` at warn so production code has to state its panics, but every test module then re-stated the same exemption by hand — 78 copies of `#[allow(…, reason = "idiomatic in tests")]`, roughly 40% of every lint suppression in the tree. Clippy has a config for exactly this; a two-line `clippy.toml` replaces all of them. Three build scripts and the `openlogi-ipc` wire-format test keep a suppression, because neither is a test in clippy's sense: a build script fails by panicking, and the golden-bytes fixtures sit in free helpers outside any `#[test]` fn — the one test shape `allow-expect-in-tests` cannot see. Those four are now `expect`, so they warn if they ever stop being needed. * chore(infra): expect, not allow, for lint suppressions that must stay `#[allow]` is silent when it stops suppressing anything, so suppressions rot in place: nothing tells you the cast it covered was deleted three refactors ago. `#[expect]` warns instead. Converting the 77 non-`cfg_attr` suppressions surfaced 20 that no longer suppress anything, all removed here: - `openlogi-assets` {index,manifest,metadata}: three module-wide `dead_code` blankets that have been inert since the modules became `pub mod` — public items are reachable, so the lint could never fire. The dangerous kind: had those modules gone private again, the blanket would have hidden real dead code forever. - `LightCapabilities` is down to three bools, under `struct_excessive_bools`. - `InstanceGuard._handle` and `CGEventTapInformation` are exempt from `dead_code` on their own (leading underscore / all fields now read). - Nine GUI `dead_code` and cast suppressions, and the surplus lint names in six multi-lint blankets that only ever needed one or two of them. Four suppressions stay `allow` on purpose, each with a comment saying why `expect` is wrong there: - `platform::os_version` — the lint only fires on the macOS arm; off macOS the expectation would go unfulfilled and redden the Linux/Windows lanes. - `function_row`'s `float_cmp` — rustc does not credit an expectation with a lint raised inside a macro expansion (`assert_eq!` here), so `expect` would suppress the warning and then report itself unfulfilled: unfixable under `-D warnings`. - The four `cfg_attr`-wrapped ones, whose fulfilment differs between the lib and test targets of the same crate. Also drops `_silence_pickfn`, a dead function that existed only to keep an unused `PickFn` import "used" — a hand-rolled lint workaround; the import goes with it. And gives the tree's one reason-less suppression a reason. Verified on the macOS and windows-gnu lanes; the Linux lane is CI's. * refactor(infra): narrow the file-wide cast blankets to their real sites Seven files silenced `cast_possible_truncation` / `cast_sign_loss` / `cast_possible_wrap` (and in the hook's Win32 backend `borrow_as_ptr` and `needless_pass_by_value`) for their entire contents. Between them they covered 50 real sites — and every future cast anyone adds to those files, unchecked. Most of the sites did not need a suppression at all: - `capture_windows` and the hook's Win32 backend now use `cast_signed()` / `cast_unsigned()`, which say "reinterpret the bits" instead of "trust me". That is the whole file-level blanket gone from `capture_windows`. - The hook's six `borrow_as_ptr` sites become `&raw mut` / `&raw const`, the edition-2024 spelling — and the better one at an FFI boundary, since it never materializes the intermediate reference. - `uvc`'s descriptor fixture builds its two bytes with `to_le_bytes`. - `camera/controls` funnelled eleven ad-hoc `i32 as f32` / `f32 as i32` conversions through `to_slider`/`from_slider`, so the UVC-range argument is made once where it belongs rather than eleven times by omission. What genuinely needs a cast keeps one, scoped to the function that does it and with a reason naming the bound that makes it safe. `capture_linux` keeps its file-level blanket: `v4l2-sys-mit` runs bindgen, so that backend cannot be cross-linted from macOS and narrowing it would be blind work. Tracked separately. Verified on all three lint lanes: macOS native, x86_64-pc-windows-gnu, and aarch64-unknown-linux-musl (everything but the GPUI crates and the v4l2 backend, neither of which cross-compiles). * docs(infra): write down the allow-vs-expect rule and the test exemption `.claude/rules/rust.md` still told agents to hand-write an `#[allow(clippy::expect_used)]` on every test module — now `clippy.toml`'s job — and still described `openlogi-hidpp` as sitting outside the workspace lint table, which its own AGENTS.md retired some time ago. Replaces both, and adds the rule the sweep produced: `expect` by default, with the three cases where it provably cannot work (cfg-conditional lints, fulfilment differing between a crate's lib and test targets, and lints raised inside a macro expansion), plus the scoping rule for cast suppressions and the mechanical recipe for re-running the sweep across all three lint lanes. Logged in `docs/DECISIONS.md` with the numbers behind it. * style(infra): trim the comments this sweep added Several of the new suppression rationales argued the case instead of stating it. A `reason` earns its keep by naming the bound; the surrounding prose was restating what the attribute already says. * chore(infra): make the suppression policy machine-checked `allow_attributes` and `allow_attributes_without_reason` turn the two rules the sweep just wrote down into build failures instead of review notes: reach for `expect`, and say why. Adopting them cost three annotated exceptions and nothing else — the sweep had already left the tree compliant, and `allow_attributes_without_reason` found zero violations on any lane. The three sites where `expect` provably cannot work keep their `allow` behind an `#[expect(clippy::allow_attributes)]`, which is a better home for the "why not expect" note than a bare comment: it fails the build if the exception ever stops being one. Two useful things fell out: - The first pass ruled that a `cfg_attr`-wrapped suppression always needs `allow`. Two of the four turned out to work fine as `expect` — the rule was too coarse, and the lint is what surfaced it. `state.rs` and the permissions page are now `expect`. - `allow_attributes` only sees outer `#[allow]`. A module-wide `#![allow(…)]` is invisible to it — precisely the shape that had rotted in `openlogi-assets`. Recorded in the lint table and in the rules so nobody reads a green build as full coverage. * fix(camera): drop unfulfilled linux cast expects * build(nix): overlay current stable rustc * fix(nix): include nfpm.yaml in the package fileset --------- Co-authored-by: David Budnick <david@budnick.ca> | 1 个月前 | |
fix(agent): divert a single-bound gesture button (#1569) * fix(agent): divert a single-bound gesture button Turning gestures off leaves the gesture button on Single(MissionControl). The capture plan compared that against the vestigial single-action default, left the button native, and the firmware gives it no host action, so the press did nothing while the GUI showed Mission Control. Gesture sources now divert for any single action except None, the same rule the haptic panel already used. * docs(core): drop the stale native-capture note from set_gesture_mode | 4 天前 | |
refactor(core): model dpi as domain type | 1 个月前 | |
refactor(agent): spell repeating durations as _PERIOD Eight constants that set how often something repeats were spelled three other ways: `SHUTDOWN_POLL_INTERVAL`, `IDLE_RECOVERY_INTERVAL`, `OBSERVER_RETRY_INTERVAL`, `RECOVERY_SCAN_INTERVAL` and `FRAME_INTERVAL` in agent-core, `IDLE_TICK` beside them, and `PAIRING_POLL_TICK` and `OBSERVE_TICK` in the mock agent. The codebase's word for a repeating duration is `_PERIOD`, which leaves `_TIMEOUT` for a duration that bounds one wait. `IDLE_TICK` becomes `IDLE_CHECK_PERIOD` and `OBSERVE_TICK` becomes `OBSERVE_POLL_PERIOD`, since neither named what repeats. `MISSING_TICKS_UNTIL_GONE` is a count, not a duration, and keeps its name. | 9 天前 | |
fix(agent): say why a background write was skipped spawn_write and the volatile reapply logged "no inventory channel" for every failed resolve, but DeviceOp::resolve also fails when the host gate refuses device I/O — a laptop asleep or locked looked, in the log, like a device that had vanished from inventory. resolve now returns Unresolved, which names the two reasons, and both background paths log it. run() still maps either to WriteError::DeviceNotFound, which is what a requester has always seen. | 9 天前 | |
refactor(agent): organize action runtime modules Co-authored-by: Xuan Zhang <xuan@arcbox.dev> | 1 个月前 | |
feat(agent): reconcile inventory from lifecycle events | 30 天前 | |
feat(agent): default mouse profiles to pointer context Co-authored-by: AprilNEA <github@sku.moe> | 5 天前 | |
perf(agent): replace capture polling with events (#1136) | 30 天前 | |
feat(agent): default mouse profiles to pointer context Co-authored-by: AprilNEA <github@sku.moe> | 5 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 天前 | ||
| 5 天前 | ||
| 5 天前 | ||
| 5 天前 | ||
| 1 个月前 | ||
| 4 天前 | ||
| 1 个月前 | ||
| 9 天前 | ||
| 9 天前 | ||
| 1 个月前 | ||
| 30 天前 | ||
| 5 天前 | ||
| 30 天前 | ||
| 5 天前 |