Commit graph

22 commits

Author SHA1 Message Date
dependabot[bot]
8a34173eb3
chore(deps): bump cargo-deny-action to 2.0.19
Update the SHA-pinned EmbarkStudios/cargo-deny-action workflow dependency to v2.0.19.
2026-05-28 20:45:52 -07:00
Lahfir
1fb5a7d51e
fix: stabilize empty accessibility identity refs
* fix: treat empty accessibility text as missing identity

* fix: align help and skill snapshot docs

* fix: preserve accessibility descriptions in refs

* fix: resolve refs after window title drift

* fix: harden stale ref identity resolution

* ci: add explicit CodeQL workflow

* fix: fail closed when scoped refs drift
2026-05-23 06:07:32 -04:00
dependabot[bot]
7ab6f4bf3a
chore(deps): bump the github-actions group across 1 directory with 2 updates (#41)
Bumps the github-actions group with 2 updates in the / directory: [actions/setup-node](https://github.com/actions/setup-node) and [googleapis/release-please-action](https://github.com/googleapis/release-please-action).


Updates `actions/setup-node` from 6.3.0 to 6.4.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](53b83947a5...48b55a011b)

Updates `googleapis/release-please-action` from 4.4.1 to 5.0.0
- [Release notes](https://github.com/googleapis/release-please-action/releases)
- [Changelog](https://github.com/googleapis/release-please-action/blob/main/CHANGELOG.md)
- [Commits](5c625bfb5d...45996ed1f6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: googleapis/release-please-action
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-20 15:49:36 -07:00
Lahfir
a6936bb28a ci: use npm trusted publishing 2026-05-20 15:24:02 -07:00
Lahfir
cb3a0129c7 ci: validate manual release inputs 2026-05-19 18:47:12 -07:00
Lahfir
68984a6589 ci: support manual release repair 2026-05-19 18:44:44 -07:00
Lahfir
a5b2c3d912 ci: guard release metadata consistency 2026-05-19 18:41:57 -07:00
Lahfir
794d378bfc chore: sync cargo lock for release 2026-05-19 18:36:13 -07:00
Lahfir
1291a9cdbf
refactor!: unify command execution contracts
Unify CLI and batch dispatch around the typed command path, centralize command policy and ref resolution, harden macOS action verification, split command tests from implementation, and add package/release guardrails.

BREAKING CHANGE: CLI and batch execution now share the typed command path and current command argument contracts.

BREAKING CHANGE: Ref-consuming commands use snapshot-scoped refs; deterministic consumers should pass snapshot_id and handle SNAPSHOT_NOT_FOUND.

BREAKING CHANGE: permissions and status now return PermissionReport fields for accessibility, screen_recording, and automation instead of a single boolean status.

BREAKING CHANGE: PermissionState gains NotRequired; macOS automation now reports not_required instead of unknown.

BREAKING CHANGE: right-click now separates action success from menu verification; consumers should inspect menu or menu_probe instead of assuming every right-click returns an inline menu.

BREAKING CHANGE: focus-window now confirms OS focus and returns ACTION_FAILED when focus does not settle; data.focused.is_focused is true on success.

BREAKING CHANGE: PlatformAdapter::execute_action now takes ActionRequest, and permission probing uses permission_report/request_permissions.

BREAKING CHANGE: FFI ad_execute_action now defaults to headless policy. Consumers that need focus fallback or cursor-moving behavior must call ad_execute_action_with_policy with AD_POLICY_KIND_FOCUS_FALLBACK or AD_POLICY_KIND_PHYSICAL.

BREAKING CHANGE: FFI ad_check_permissions no longer treats unknown accessibility permission as success; stub-style unknown probes return ERR_PLATFORM_NOT_SUPPORTED and macOS ambiguous unknown returns ERR_INTERNAL with last-error detail.

BREAKING CHANGE: JSON response envelopes now report version 2.0; parsers pinned to 1.0 must branch or update.

BREAKING CHANGE: focus now uses accessibility focus without cursor movement; callers that need physical focus must use explicit mouse or physical-policy paths.

BREAKING CHANGE: chain execution deadlines now return TIMEOUT instead of ACTION_FAILED when the target app does not respond before the chain deadline.
2026-05-19 18:27:08 -07:00
Lahfir
41c31be146 chore: add GitHub Sponsors funding config
Some checks are pending
CI / Format (push) Waiting to run
CI / Test (push) Waiting to run
Release / Release Please (push) Waiting to run
Release / Build (aarch64-apple-darwin) (push) Blocked by required conditions
Release / Build (x86_64-apple-darwin) (push) Blocked by required conditions
Release / Build FFI (aarch64-apple-darwin) (push) Blocked by required conditions
Release / Build FFI (x86_64-apple-darwin) (push) Blocked by required conditions
Release / Build FFI (x86_64-unknown-linux-gnu) (push) Blocked by required conditions
Release / Build FFI (aarch64-unknown-linux-gnu) (push) Blocked by required conditions
Release / Build FFI (x86_64-pc-windows-msvc) (push) Blocked by required conditions
Release / Publish to GitHub Release (push) Blocked by required conditions
Release / Publish to npm (push) Blocked by required conditions
Release / Publish Skills to ClawHub (push) Blocked by required conditions
2026-04-29 20:16:21 -07:00
Lahfir
977c7fd1b4
chore(stats): drop self-hosted chart pipeline; embed star-history.com (#33)
Some checks failed
CI / Format (push) Has been cancelled
CI / Test (push) Has been cancelled
Release / Release Please (push) Has been cancelled
Release / Build (aarch64-apple-darwin) (push) Has been cancelled
Release / Build (x86_64-apple-darwin) (push) Has been cancelled
Release / Build FFI (aarch64-apple-darwin) (push) Has been cancelled
Release / Build FFI (x86_64-apple-darwin) (push) Has been cancelled
Release / Build FFI (x86_64-unknown-linux-gnu) (push) Has been cancelled
Release / Build FFI (aarch64-unknown-linux-gnu) (push) Has been cancelled
Release / Build FFI (x86_64-pc-windows-msvc) (push) Has been cancelled
Release / Publish to GitHub Release (push) Has been cancelled
Release / Publish to npm (push) Has been cancelled
Release / Publish Skills to ClawHub (push) Has been cancelled
The custom SVG chart, daily cron, history.json, peter-evans PR
pattern, and AUTOMERGE_PAT are all gone. Replaced by a one-line
star-history.com embed inside <picture> for native light/dark.

Why the rollback:
- The chart was never meant to require a workflow + protected-branch
  bypass + admin PAT to keep ticking
- ClawHub history was always linearly backfilled (the marketplace
  doesn't expose history); GitHub stars is the only metric with a
  real timeline anyway
- star-history.com renders the same chart, free, no infra, used by
  thousands of OSS repos

Removes:
- .github/workflows/stats.yml
- .github/stats/{generate,seed,update}.mjs
- .github/stats/history.json
- .github/stats/chart-{light,dark}.svg

Stays:
- README header + badges (current ClawHub/npm/release values are
  already covered by shields.io badges in the header)
2026-04-25 18:53:11 -04:00
Lahfir
bf3722503b
chore(readme): self-hosted stats chart (GitHub stars + ClawHub downloads) (#31)
Some checks are pending
CI / Format (push) Waiting to run
CI / Test (push) Waiting to run
Release / Release Please (push) Waiting to run
Release / Build (aarch64-apple-darwin) (push) Blocked by required conditions
Release / Build (x86_64-apple-darwin) (push) Blocked by required conditions
Release / Build FFI (aarch64-apple-darwin) (push) Blocked by required conditions
Release / Build FFI (x86_64-apple-darwin) (push) Blocked by required conditions
Release / Build FFI (x86_64-unknown-linux-gnu) (push) Blocked by required conditions
Release / Build FFI (aarch64-unknown-linux-gnu) (push) Blocked by required conditions
Release / Build FFI (x86_64-pc-windows-msvc) (push) Blocked by required conditions
Release / Publish to GitHub Release (push) Blocked by required conditions
Release / Publish to npm (push) Blocked by required conditions
Release / Publish Skills to ClawHub (push) Blocked by required conditions
Hand-rolled SVG (no chart library), centripetal Catmull-Rom smoothing, dual y-axis, gradient area fills, glow filter, SMIL draw-on. Daily GitHub Action fetches stats and commits regenerated SVGs.

ClawHub line is linearly backfilled from the skill's createdAt to today (the marketplace exposes only a current cumulative download count, not historical data); real points accumulate from now on.

Also: OpenClaw-style header (centered AGENT DESKTOP H1, slogan, badge row including Skills.sh) and stats chart relocated next to the architecture diagram.
2026-04-24 18:53:35 -07:00
Lahfir
3cffbd67f6
feat(ffi): ship C-ABI cdylib with review hardening and release pipeline (#26)
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).
2026-04-17 04:00:43 -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