Commit Graph

132 Commits

Author SHA1 Message Date
Dhruv Sharma 39396d4534 add cli error formatter and plugin store 2026-03-31 04:02:25 +05:30
Gautam Tayal 79938be822 refactor(cli): replace clack prompts with custom promptSelect function 2026-03-30 15:32:15 +05:30
Gautam Tayal fbf177300e refactor(cli): simplify agent selection prompt by removing unnecessary confirmation step 2026-03-30 15:32:15 +05:30
Gautam Tayal da8aabe0f2 feat(cli): add interactive option for agent configuration prompt before starting 2026-03-30 15:32:15 +05:30
Gautam Tayal 2282e0e9c9 fix: update jsdocs 2026-03-30 15:32:15 +05:30
Gautam Tayal 7d42dd7672 fix(cli): reload project configuration after saving changes 2026-03-30 15:32:15 +05:30
Gautam Tayal 56b36613f6 refactor(cli): streamline agent handling in spawn command 2026-03-30 15:32:15 +05:30
Gautam Tayal 7ca7632e73 refactor(cli): remove save to config option 2026-03-30 15:32:15 +05:30
Gautam Tayal 8c23903fa2 feat: add agent selection prompt 2026-03-30 15:32:15 +05:30
Dhruv Sharma d65d72e5c1
Merge pull request #797 from gautamtayal1/refactor/migrate-to-clack-prompts
refactor(cli): replace readline prompts with clack prompts
2026-03-29 22:17:49 +05:30
Harshit Singh Bhandari 8f271c4da5
Merge pull request #795 from harshitsinghbhandari/main
Fix: Resolved OpenCode discovery flakiness via extended timeouts, enabled integration test suite, and parallelized CLI session/status I/O for 80% faster response times.
2026-03-29 19:01:07 +05:30
harshitsinghbhandari 844c97cb63 minor fix 2026-03-29 18:52:34 +05:30
Gautam Tayal 5ba73016e0 fix: update promptSelect to handle undefined initialValue 2026-03-29 18:39:32 +05:30
harshitsinghbhandari e858cef29b perf(cli): parallelize tmux activity and agent introspection in fallback 'ao status' 2026-03-29 18:28:16 +05:30
harshitsinghbhandari 124cc33745 perf(cli): parallelize I/O calls in 'ao session ls' for faster listing 2026-03-29 18:28:04 +05:30
Gautam Tayal a180520575 refactor(cli): replace readline prompts with clack prompts 2026-03-29 18:06:27 +05:30
github-actions[bot] d1e937b855 chore: version packages 2026-03-29 09:21:26 +00:00
Gautam Tayal b010e322e0 fix 2026-03-28 21:47:31 +05:30
Gautam Tayal e03d22871e fix 2026-03-28 21:46:16 +05:30
Gautam Tayal db7a7039e9 fix 2026-03-28 21:41:51 +05:30
Gautam Tayal 3860a42424 fix 2026-03-28 21:40:21 +05:30
Gautam Tayal b83347402b fix 2026-03-28 13:58:41 +05:30
Gautam Tayal 8da1c2e54f fix 2026-03-28 13:18:10 +05:30
Gautam Tayal 71d7411ada refactor(cli): update project resolution to prompt user for selection in multi-project scenarios 2026-03-28 13:10:10 +05:30
Dhruv Sharma 5933991252
Merge pull request #631 from illegalcall/feat/openclaw-integration
feat: OpenClaw plugin, AO skill, Discord notifier, and setup wizard
2026-03-27 09:48:25 +05:30
Ashish Huddar af6c4c5add
Merge pull request #634 from ComposioHQ/feat/issue-633
chore(web): mobile-responsive layout for dashboard and session views
2026-03-27 01:44:07 +05:30
Dhruv Sharma 373654f4e1 fix yaml test 2026-03-27 01:41:08 +05:30
Ashish Huddar 24a293d811 Handle send errors and stabilize script tests 2026-03-27 00:25:10 +05:30
Dhruv Sharma 62ecad06b1 fix: address final CodeRabbit PR review findings
- openclaw-probe.ts: fix trailing ": " when response body is empty —
  use conditional interpolation instead of .trim() on the full string
- doctor.ts: split connectivity check and test-notify into separate
  try-catch blocks with distinct error messages so failures are
  attributed correctly ("Notifier connectivity check failed" vs
  "Sending test notifications failed")

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 23:17:42 +05:30
Dhruv Sharma 8896187b76 fix: preserve existing notifiers when creating default notificationRouting
When notificationRouting didn't exist, the setup wizard created a default
that included desktop only for urgent/action and dropped it for warning/info.
Users with defaults.notifiers: [desktop] would silently lose desktop
notifications for lower-priority events since notificationRouting takes
precedence over defaults.notifiers.

Now seeds all four priority levels from the existing defaults.notifiers array
(plus openclaw) so no previously-configured notifier is lost.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:50:15 +05:30
Dhruv Sharma 8b491d4441 fix: address Cursor Bugbot review comments
- Add module-level sanitizeCliArg() and apply to all AI tool execute
  handlers (ao_spawn, ao_batch_spawn, ao_send, ao_kill, ao_session_restore,
  ao_review_check, ao_session_cleanup) to prevent CLI flag injection from
  LLM-supplied params
- Clear batchSpawnFollowUpTimeouts in board scanner stop handler too —
  previously leaked when healthPollIntervalMs <= 0 (health service never starts)
- Exclude commented lines from shell profile token regex with (?!\s*#)
  negative lookahead to avoid replacing # OPENCLAW_HOOKS_TOKEN=... lines
- Resolve \${ENV_VAR} placeholders in doctor's OpenClaw token check —
  ao setup openclaw writes the literal string "\${OPENCLAW_HOOKS_TOKEN}"
  which was being sent as the Bearer token instead of the actual value

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:25:46 +05:30
Dhruv Sharma c8ba03bb8d fix: fail hard when --test-notify is set but config load fails
When `ao doctor --test-notify` is requested and config loading throws,
use fail() instead of warn() so the process exits non-zero. Consistent
with the existing behavior when no config file exists at all.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:02:52 +05:30
Dhruv Sharma 570f3b588f fix: address CodeRabbit review comments
- Use consistent regex for OPENCLAW_HOOKS_TOKEN detection and replacement
  in shell profile (prevents silent no-ops for non-exported lines)
- Broaden token detection regex to match lines with/without export prefix
  and leading whitespace
- Fix misleading --non-interactive help text (token is auto-generated)
- Fix doctor.ts catch block to say "Notifier checks failed" not "load config"
- Fix 204 mock in Discord notifier test (ok: true, not ok: false)
- Fix weak no-duplicate assertion in setup.test.ts (actually count list items)
- Add discord to notifier options comment in config-instruction.ts
- URL-encode threadId in Discord webhook URL construction
- Add aoCwd to required[] in openclaw.plugin.json configSchema
- Add HTTPS recommendation comment to agent-orchestrator.yaml.example
- Add rimraf for cross-platform clean script in notifier-discord
- Rename "Recommended Settings" to "Required: Disable Conflicting Built-in Skills"
  with explicit warning in docs
- Add /ao setup post-setup reminder to manually disable coding-agent skill
- Fix misleading README non-interactive example wording

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 21:58:19 +05:30
github-actions[bot] 09dbf806d3 chore: version packages 2026-03-26 12:18:20 +00:00
suraj-markup aa7e360898 refactor(cli): centralize agent runtime selection logic 2026-03-26 15:48:22 +05:30
suraj-markup 07028ba6df perf(cli): avoid redundant agent detection scan in start 2026-03-26 15:38:49 +05:30
suraj-markup d4ff10b5b8 fix(cli): restore interactive installs for ao start prerequisites 2026-03-26 15:13:54 +05:30
suraj-markup b976c36c5d fix(cli): remove required git/tmux auto-install attempts 2026-03-26 14:55:43 +05:30
suraj-markup c19aaf6967 fix(cli): disable non-interactive auto-install for required tools 2026-03-26 14:35:44 +05:30
suraj-markup c5cc0620e2 fix(cli): disable tmux auto-install in spawn preflight 2026-03-26 13:59:29 +05:30
suraj-markup 32591c2adc fix(cli): use pipx for aider install option 2026-03-26 02:52:49 +05:30
suraj-markup f0d634947b fix: derive skip option from AGENT_INSTALL_OPTIONS.length
The skip option number was hardcoded as 5 in the display, prompt,
bounds check, and skip check. If a fifth agent were added, selecting
it would trigger Skip instead of installing. Now derived dynamically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 00:57:25 +05:30
AO Bot 4495e11b7c fix: address Cursor Bugbot review comments on PR #631
Fixes all 12 issues identified in the Cursor Bugbot review:

#4 – Setup tests now assert non-interactive mode skips validation and
  auto-generates tokens; removed incorrect validateToken call expectations.

#5 – Replaced module-level mutable `tsFailures` in doctor.ts with a
  `makeFailCounter()` closure that is local to each command invocation,
  eliminating potential state bleed between invocations.

#6 – Both `notify`, `notifyWithActions`, and `post` in notifier-discord
  now consistently guard on `effectiveUrl` (which includes thread_id),
  not on the raw `webhookUrl`. Removes non-null assertions.

#7/#12 – setup.ts now writes `${OPENCLAW_HOOKS_TOKEN}` as the token
  value in the YAML config instead of the raw token, so credentials are
  never committed to version control. setup.test.ts already expected this
  placeholder; the test was correct, the code was not.

#8 – `ao_batch_spawn` follow-up setTimeout handles are tracked in
  `batchSpawnFollowUpTimeouts[]` and cleared when the health service stops,
  preventing timer leaks after plugin shutdown.

#11 – Discord 429 Retry-After handling no longer double-delays: a
  `skipNextBackoff` flag is set after waiting for Retry-After so the
  following iteration skips the standard exponential backoff.

Also removes the unused `yamlStringify` import from setup.ts.

Issues #1/#2/#3/#9/#10 were already correctly addressed in previous commits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 18:33:51 +00:00
suraj-markup eee9d773f4 fix: interactive tmux install with user consent, log before auto-install
- Refactor ensureTmux() to use askYesNo() + tryInstallWithAttempts()
  matching the existing ensureGit() pattern — no silent sudo
- Add log line before each auto-install attempt in preflight.checkTmux()
- Update config warning: "will prompt to install at startup"
- Update design doc to reflect interactive consent flow
- Include prior uncommitted changes: interactive install prompts for
  git/gh/agent-runtime, ensureGit(), canPromptForInstall(), askYesNo()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 17:46:56 +05:30
suraj-markup 9d15ce5d16 fix(start): enforce tmux preflight across all start paths 2026-03-24 15:24:26 +05:30
AO Bot 8bc2a5bffc fix: address PR #631 review comments
- Store board scanner initial setTimeout and clear on stop
- Fix deliver assertion in openclaw-probe test (true -> false)
- Fix Discord thread_id test to check URL query param, not body
- Use yaml Document API to preserve comments in config writes
- Fix setup tests to match actual nonInteractiveSetup behavior
  (skips validation, auto-generates missing tokens)
2026-03-24 06:40:20 +00:00
suraj-markup f54630021c fix: block with clear tmux install instructions instead of process fallback
A degraded runtime gives a bad first impression. Instead of silently
falling back to runtime: "process", ao start now:
1. Tries auto-install (brew/apt/dnf)
2. On failure, exits with clear platform-specific install command
3. User runs one command, then re-runs ao start

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 03:40:15 +05:30
suraj-markup 761173456d fix: true two-step setup — tmux auto-install, process fallback, restart bookkeeping
- checkTmux() now attempts auto-install (brew/apt/dnf) before erroring
- Config generation uses runtime: "process" when tmux unavailable
- start.ts tries auto-install during config creation, falls back gracefully
- Fix restart bookkeeping in start-all.ts: slot-based tracking prevents
  duplicate children entries that broke cleanup countdown
- Updated design doc reflecting all fixes and review feedback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 03:31:06 +05:30
suraj-markup 90ee21c3e1 fix: repair npm global install — walk-up dep resolution, spawn-helper chmod, platform-aware messages
- Replace hardcoded single-level checkBuilt() with findPackageUp() walk-up
  resolver that handles npm hoisting (fixes #619)
- Add postinstall script to chmod node-pty spawn-helper for global installs
  (fixes #624)
- Platform-aware tmux install messages (brew/apt/dnf/WSL instead of
  hardcoded brew)
- Auto-restart crashed terminal servers in start-all.ts (up to 3 retries)
- ESLint config for packages/ao/bin scripts
- Expanded preflight tests (3 → 5 checkBuilt cases)

Closes #619, closes #624

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 03:06:40 +05:30
AO Bot 3716fc751c fix: address Cursor Bugbot review comments on PR #631
- Fix shell injection in writeShellExport: use single-quoted token with
  escaped embedded single quotes instead of double-quoted interpolation
- Fix board scanner initial setTimeout not cleared on stop: store the
  timeout handle and clear it in the stop handler
- Fix openclaw-probe test asserting deliver:true when code sends false
- Fix Discord notifier thread_id test to check URL query param instead
  of body, and remove redundant thread_id from post() body payload
2026-03-23 21:01:09 +00:00