Commit graph

12 commits

Author SHA1 Message Date
Lahfir
29f8df0ba6 merge: resolve conflicts with origin/main
Integrate main-branch changes that landed in parallel with this PR:

- Cargo.toml: keep both [profile.ci] (fast CI builds, from main) and
  [profile.release-ffi] (panic=unwind for the cdylib, this branch).
  Workspace version tracks main at 0.1.12.
- .github/workflows/ci.yml: keep main's concurrency block, pinned
  action SHAs, permissions hardening, and the new ci profile used for
  binary size checks; re-add this branch's FFI cdylib build and header
  drift check as trailing steps.
- crates/ffi/src/tree/get.rs, observation/{find,is}.rs: TreeOptions
  gained a `skeleton: bool` field on main — pass `false` since the FFI
  snapshots are already full trees.
- crates/ffi/src/actions/resolve.rs, observation/find.rs: RefEntry
  gained a `root_ref: Option<String>` field (progressive skeleton
  traversal) — pass `None` from the FFI layer.
- crates/ffi/src/tree/flatten.rs test helper: AccessibilityNode gained
  a `children_count: Option<usize>` field — initialize to None.

Verified: 111 workspace lib tests pass, 62 FFI tests pass (52 lib + 10
integration), clippy --all-targets -D warnings clean.
2026-04-16 04:43:36 -07:00
Lahfir
94bfefa9a2 ci: broaden pull_request trigger, add workflow_dispatch
Previous pull_request: branches: [main, master] only fired when the PR
targeted main or master; a pull_request block without 'branches' fires
on any target and keeps this PR (and future stacked PRs) under CI.

Adds workflow_dispatch so the workflow can be kicked manually from the
Actions UI or 'gh workflow run'.
2026-04-16 04:14:13 -07:00
Lahfir
ee2374e565 feat(ffi): build hygiene — pinned cbindgen, drift check, variant parity (Unit 12)
Closes R14, R19, R20, R23 from PR #22 review.

Build pipeline:
- crates/ffi/Cargo.toml: pin cbindgen = "= 0.27.0" exactly. No more
  silent formatting drift from patch-version bumps of cbindgen; any
  future bump is a deliberate PR that also commits the regenerated
  header.
- crates/ffi/build.rs: replace .expect()/.ok() swallowing with explicit
  panics on every failure path. Missing CARGO_MANIFEST_DIR or OUT_DIR
  now emits a cargo:warning rather than crashing rustc. cbindgen errors
  now panic loudly with the diagnostic; previously an .ok() on fs::copy
  silently emitted a stale header.

CI:
- .github/workflows/ci.yml: new "FFI cdylib build" step under the
  release-ffi profile and a "FFI header drift" step that runs
  `git diff --exit-code crates/ffi/include/agent_desktop.h` immediately
  after. Any uncommitted change to the generated header fails the build
  with a clear message telling the developer to run the local rebuild
  and commit.

Variant parity:
- crates/ffi/src/error.rs: compile-time assertion
  `const _: () = assert!(error_code_variant_count() ==
  ad_result_error_variant_count())` guards against core adding an
  ErrorCode variant without a matching AdResult entry (which would
  silently drop information at the FFI boundary). Uses stable const fn
  + explicit variant arrays, no nightly variant_count feature.

50 lib tests, 1 integration test — all passing. Clippy clean.
2026-04-16 03:58:30 -07:00
Lahfir
c0ab58978c
ci: upgrade actions to latest, pin SHAs, add ci profile and speed optimisations (#25) 2026-04-16 01:59:42 -07:00
Lahfir
fba493e31e Revert "ci: upgrade all actions to latest, pin to SHAs, add concurrency and timeouts"
This reverts commit 1acb154dbd.
2026-04-16 01:53:38 -07:00
Lahfir
1acb154dbd ci: upgrade all actions to latest, pin to SHAs, add concurrency and timeouts 2026-04-16 01:51:20 -07:00
Lahfir
208af12459 fix: add clawhub login step before sync in CI
clawhub CLI requires explicit login, env var alone is not enough.
2026-03-03 06:22:06 -08:00
Lahfir
97665203a4
feat: scalable skill architecture with ClawHub auto-publishing (#14)
* feat: restructure skills for ClawHub publishing with CI auto-publish

- Sync core skill to 54 commands (add notification commands)
- Move macOS skill from .claude/skills/ to git-tracked skills/
- Extract Notification Center section to references/notifications.md
- Add ClawHub metadata (version, tags, requirements) to all SKILL.md
- Remove macos.md from core skill (moved to platform skill)
- Create scripts/link-skills.sh for local dev symlinks
- Add publish-skills CI job to release.yml (ClawHub auto-publish)
- Add skill install prompt to npm postinstall

* refactor: consolidate macOS into single agent-desktop skill

Merge agent-desktop-macos back into agent-desktop/references/macos.md
as a single publishable skill. Includes Notification Center content
inline rather than as a separate reference file.
2026-03-03 06:16:15 -08:00
Lahfir
084fc8c960 fix: include README and CHANGELOG in npm package 2026-02-23 01:16:15 -08:00
Lahfir
91c76777cb fix: use macos-latest for both build targets
macos-13 Intel runners are no longer available. Cross-compile x86_64
on ARM runners instead, which Rust handles natively via --target.
2026-02-23 01:03:24 -08:00
Lahfir
18fc50cca5
feat: add release automation with GitHub Releases and npm distribution
Automated release pipeline using release-please for gated Release PRs,
conventional commits for SemVer version bumps, and npm distribution
with postinstall binary download from GitHub Releases.
2026-02-23 00:55:45 -08:00
Lahfir
a346f242c2 feat: Phase 1 foundation — workspace scaffold, core engine, macOS adapter, 31 commands
Implements the complete agent-desktop Phase 1 specification:

- Workspace: 5-crate layout (core, macos, windows/linux stubs, binary)
- Core: AccessibilityNode, Action, ErrorCode, PlatformAdapter trait, RefMap
  with atomic writes, SnapshotEngine with depth-first ref allocation
- macOS adapter: AXUIElement tree traversal, action execution, input
  synthesis via CGEvent, screenshot via CGWindowListCreateImage, clipboard
  via pbpaste/pbcopy, window listing and app management via osascript
- 31 CLI subcommands via clap derive: snapshot, find, screenshot, get, is,
  click, double-click, right-click, type, set-value, focus, select, toggle,
  expand, collapse, scroll, press, launch, close-app, list-windows,
  list-apps, focus-window, clipboard-get/set, wait, status, permissions,
  version, batch
- Windows/Linux: not-supported stubs ready for Phase 2 implementation
- JSON output contract: {version,ok,command,data} envelope with structured
  error payloads including SCREAMING_SNAKE_CASE error codes
- Ref system: @e{N} sequential refs for interactive elements, stored at
  ~/.agent-desktop/last_refmap.json with 0o600/0o700 permissions
- CI: GitHub Actions macOS runner with dependency isolation check, clippy,
  unit tests, release build, and 15MB binary size gate
2026-02-19 10:44:38 -08:00