agent-orchestrator/packages/plugins/agent-cursor/src
i-trytoohard ea320312db
refactor(core): extract hasRecentCommits helper into @aoagents/ao-core (#1437)
* refactor(core): extract hasRecentCommits helper into @aoagents/ao-core

Deduplicate the byte-identical hasRecentCommits(workspacePath) helper
that was copy-pasted between agent-aider and agent-cursor. Exposes the
helper from core with a parameterized window so future agent plugins
using git-commit-based activity detection can share it.

Closes #1423

* test(core): make hasRecentCommits custom-window test discriminate on the parameter

The previous assertion passed the default (60) to hasRecentCommits, so a
bug where windowSeconds was silently ignored would still have passed.
Use a commit backdated ~2 minutes and assert both a 30s window excludes
it and a 600s window includes it — proving the parameter is forwarded
to `git log --since=...`.

Addresses Greptile review on #1437.

---------

Co-authored-by: Prateek <karnalprateek@gmail.com>
2026-05-05 18:58:53 +05:30
..
index.test.ts feat(core): opt-in gh CLI tracer + scm/tracker migration (Phase A1a) (#1238) 2026-04-25 18:57:04 +05:30
index.ts refactor(core): extract hasRecentCommits helper into @aoagents/ao-core (#1437) 2026-05-05 18:58:53 +05:30