agent-desktop/crates
Lahfir f1f5a93e48 docs(ffi): sync skill references + crate rustdoc with shipped ABI (todo 011)
Closes P2 todo 011. Reference docs and the crate-level rustdoc had
drifted against shipped APIs:

- ownership.md table still listed the removed raw-array list
  surface (`ad_list_apps(... &apps, &count)`, `ad_free_apps`,
  `ad_free_window`, `ad_free_windows`, `ad_free_surfaces`) that Unit 5
  replaced with opaque list handles.
- build-and-link.md's minimal C example used the same stale API.
- error-handling.md still called `ad_free_window` (renamed to
  `ad_release_window_fields` in Unit 5).
- threading.md described debug-only `debug_assert!` with release-build
  UB, but todo 002 made the check runtime-enforced in every profile.
- lib.rs crate-level rustdoc repeated the same debug/release phrasing.

Rewrite all four reference pages and the lib.rs rustdoc against
what actually ships:

ownership.md:
- Full opaque-list entry per type (Apps/Windows/Surfaces/Notifications).
- AdImageBuffer accessor pattern documented.
- ad_free_handle: *mut AdNativeHandle, zero-on-success double-free safety.
- Out-param zeroing happens before guards, not after (todo 006 contract).

threading.md:
- "Runtime, every build profile" — no debug/release split.
- Full exempt list: lists accessors, image-buffer accessors,
  release_window_fields, free_handle, free_tree, free_action_result,
  free_string.

build-and-link.md:
- C example now uses `ad_list_apps(adapter, &list)` +
  `ad_app_list_count/_get/_free`.

error-handling.md:
- `ad_free_window` → `ad_release_window_fields`.
- Comment clarified to reflect out-param zero-init.

lib.rs //! rustdoc:
- Matches threading.md's runtime-enforced phrasing and exempt list.
- cbindgen propagates to agent_desktop.h so header consumers see the
  right contract.

85 FFI tests pass, clippy clean.
2026-04-16 06:20:35 -07:00
..
core merge: resolve conflicts with origin/main 2026-04-16 04:43:36 -07:00
ffi docs(ffi): sync skill references + crate rustdoc with shipped ABI (todo 011) 2026-04-16 06:20:35 -07:00
linux feat: Phase 1 foundation — workspace scaffold, core engine, macOS adapter, 31 commands 2026-02-19 10:44:38 -08:00
macos merge: resolve conflicts with origin/main 2026-04-16 04:43:36 -07:00
windows feat: Phase 1 foundation — workspace scaffold, core engine, macOS adapter, 31 commands 2026-02-19 10:44:38 -08:00