mirror of
https://github.com/lahfir/agent-desktop.git
synced 2026-07-26 17:12:15 +00:00
Lands the full agent-desktop FFI layer with every PR #22 review finding resolved, modular refactor applied, todo-resolve batches (011 + 006) closed, and a production release pipeline that bundles the prebuilt cdylib for 5 target triples alongside the CLI on every GitHub Release. **FFI surface** - Panic-unwind cdylib boundary via `trap_panic` / `trap_panic_ptr` / `trap_panic_const_ptr` / `trap_panic_void` - Runtime main-thread enforcement on every macOS-sensitive entrypoint; TLS errno-style last-error lifetime - Every `#[repr(i32)]` field validated at the C boundary via `try_from_c_enum!` — arbitrary bit patterns return `ErrInvalidArgs` without UB - BFS flat-tree layout with `child_start` / `child_count`; iterative traversal - Opaque list handles (`AdAppList`, `AdWindowList`, `AdSurfaceList`, `AdNotificationList`); opaque `AdImageBuffer` with `_data` / `_size` / `_width` / `_height` / `_format` accessors - `AdNativeHandle` single-owner single-thread contract; zero-on-free makes double-call deterministic - Fail-closed UTF-8 for optional filter pointers (`try_c_to_string` tri-state) - `AdTreeOptions` fully honored in `ad_get_tree` (include_bounds / interactive_only / compact) - Verified notification action identity (`NotificationIdentity` fingerprint) — refuses to press if NC reordered between list and act **Release pipeline** - New `build-ffi` matrix in `.github/workflows/release.yml` producing `libagent_desktop_ffi.{dylib,so,dll}` tarballs for aarch64/x86_64-apple-darwin, x86_64/aarch64-unknown-linux-gnu, x86_64-pc-windows-msvc - macOS `install_name = @rpath/libagent_desktop_ffi.dylib` baked in by `build.rs` and CI-verified via `otool -D` - `actions/attest-build-provenance@v4.1.0` — keyless Sigstore provenance over every release artifact; `gh attestation verify` - `checksums.txt` covers both CLI and FFI assets; asset-count assertion bumped 3 → 8 - npm package stays CLI-only; Python/Swift/Go/Ruby/Node/C hosts pull dylib tarball directly from the Release - README gains a "Language bindings (FFI)" section with platform→artifact table **Docs** - `skills/agent-desktop-ffi/` — SKILL.md + build-and-link.md + ownership.md + threading.md + error-handling.md - `docs/solutions/best-practices/` — two new solution docs (deterministic build-artifact marker, identity fingerprint against OS reorder) **Verification** - `cargo clippy --all-targets -- -D warnings` — clean - `cargo test --lib --workspace` — 139 passed (5 suites) - `cargo test -p agent-desktop-ffi --tests` — 87 passed (4 suites, including new `c_header_compile` C-ABI harness) - macOS PR CI green on multiple runs; latest: 24561160455 - Python `ctypes.CDLL` round-trip from a freshly extracted FFI tarball confirmed; adapter lifecycle + `ad_list_apps` enumeration clean; `install_name` survives the tarball Closes #22 (superseded).
81 lines
No EOL
807 B
Text
81 lines
No EOL
807 B
Text
# Build
|
|
/target/
|
|
**/*.rs.bk
|
|
|
|
# Cargo
|
|
Cargo.lock
|
|
!crates/*/Cargo.lock
|
|
|
|
# macOS
|
|
.DS_Store
|
|
.AppleDouble
|
|
.LSOverride
|
|
._*
|
|
|
|
# IDE
|
|
.idea/
|
|
.vscode/
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
.vim/
|
|
|
|
# Claude Code
|
|
.claude/
|
|
.agents/
|
|
AGENTS.md
|
|
|
|
# Environment
|
|
.env
|
|
.env.*
|
|
|
|
# Logs
|
|
*.log
|
|
logs/
|
|
|
|
# Runtime
|
|
*.pid
|
|
*.sock
|
|
|
|
# RefMap (generated at runtime)
|
|
.agent-desktop/
|
|
|
|
# Coverage
|
|
*.profraw
|
|
*.profdata
|
|
lcov.info
|
|
tarpaulin-report.html
|
|
coverage/
|
|
|
|
# Binary artifacts
|
|
*.dylib
|
|
*.so
|
|
*.dll
|
|
*.exe
|
|
|
|
# Package distribution
|
|
dist/
|
|
*.tar.gz
|
|
*.zip
|
|
*.dmg
|
|
*.msi
|
|
*.deb
|
|
*.rpm
|
|
*.snap
|
|
|
|
# npm (platform binaries downloaded by postinstall)
|
|
npm/bin/agent-desktop-*
|
|
npm/node_modules/
|
|
node_modules/
|
|
|
|
# Compound Engineering
|
|
skills-lock.json
|
|
docs/*
|
|
!docs/architecture.excalidraw
|
|
!docs/architecture.png
|
|
!docs/phases.md
|
|
!docs/solutions/
|
|
!docs/solutions/**
|
|
todos/
|
|
.cursor/
|
|
.context/ |