Commit Graph

245 Commits

Author SHA1 Message Date
Harsh aa2bda2e32 fix: harden Linear integration helper against transient non-JSON errors 2026-03-06 15:22:50 +05:30
Harsh a0f16b161e test: add timeout cleanup coverage for session enrichment 2026-03-06 15:22:50 +05:30
Harsh ed4d10c597 fix: harden opencode cleanup and ignore local sisyphus state 2026-03-06 15:22:49 +05:30
Harsh 271f4d49b1 docs: align OpenCode remap selection with title-based behavior 2026-03-06 15:22:49 +05:30
Harsh 48ff6f348b fix: clean archived metadata only after purge 2026-03-06 15:22:49 +05:30
Harsh 80c2c592c0 fix: validate remap session ids before reuse 2026-03-06 15:22:48 +05:30
Harsh ae4821cf5a fix: remap OpenCode session fresh on each restart 2026-03-06 15:22:48 +05:30
Harsh 54bdc9f2ea ux: clarify OpenCode terminal restart action 2026-03-06 15:22:48 +05:30
Harsh 77b54953da fix: harden OpenCode discovery and prompt option flow 2026-03-06 15:22:48 +05:30
Harsh 6f01ea6a4c fix: stabilize Linear comment integration check 2026-03-06 15:22:47 +05:30
Harsh 2ecc9b79b8 fix: guard OpenCode discovery parse with array check 2026-03-06 15:22:47 +05:30
Harsh 92a5585e14 fix: avoid enrichment race fallout in session listing 2026-03-06 15:22:47 +05:30
Harsh dc2606f687 fix: keep OpenCode discovery title-based without timestamp sorting 2026-03-06 15:22:46 +05:30
Harsh c8f55e712c fix: resolve remaining PR315 Bugbot findings 2026-03-06 15:22:46 +05:30
Harsh 11ea174a81 fix: preserve title-only OpenCode reuse with fallback mapping persistence 2026-03-06 15:22:46 +05:30
Harsh 80e96db16c fix: show OpenCode reload control and remap before restart 2026-03-06 15:22:45 +05:30
Harsh 6255df4db6 fix: harden OpenCode session id handling and title reuse selection 2026-03-06 15:22:45 +05:30
Harsh 0057cdda1c fix: preserve fullscreen alignment without reload action 2026-03-06 15:22:45 +05:30
Harsh 8776ca278f fix: protect project path from session kill cleanup 2026-03-06 15:22:44 +05:30
Harsh cf2b165b46 feat: replace force remap with terminal reload control 2026-03-06 15:22:06 +05:30
Harsh 820cbab00c fix: return 404 for missing session in message route 2026-03-06 15:22:05 +05:30
Harsh 292737801c refactor: centralize OpenCode reuse resolution flow 2026-03-06 15:22:05 +05:30
Harsh 2cdf3f0066 fix: harden OpenCode session selection and lint errors 2026-03-06 15:22:05 +05:30
Harsh d0822fb57e feat: refine OpenCode session reuse strategy and cleanup 2026-03-06 15:22:05 +05:30
Harsh Batheja 8a655e7625
Merge pull request #322 from ComposioHQ/fix/worktree-cleanup-safety-v2
fix: restrict cleanup to AO-managed worktree roots
2026-03-06 15:12:02 +05:30
Harsh bcc08cd229 fix: gate workspace cleanup to AO-managed worktree roots 2026-03-06 15:08:45 +05:30
Harsh Batheja 454931483f
Merge pull request #321 from ComposioHQ/fix/opencode-prune-worktree-safety-main
revert: undo PR #320 workspace cleanup changes
2026-03-06 14:58:44 +05:30
Harsh 71adbbfac1 Revert "fix: restrict cleanup to AO-managed worktrees"
This reverts commit 86b34c8923.
2026-03-06 14:52:58 +05:30
Harsh 51749d7e0a Revert "fix: preserve spawn cleanup while hardening kill path checks"
This reverts commit 1c9adba947.
2026-03-06 14:52:58 +05:30
Harsh 3f5707f079 Revert "fix: canonicalize missing worktree paths using real ancestor"
This reverts commit 79d97547c0.
2026-03-06 14:52:58 +05:30
Harsh Batheja a5b58aec46
Merge pull request #320 from ComposioHQ/fix/opencode-prune-worktree-safety-main
fix: restrict cleanup to AO-managed worktrees
2026-03-06 14:50:05 +05:30
Harsh 79d97547c0 fix: canonicalize missing worktree paths using real ancestor 2026-03-06 14:45:42 +05:30
Harsh 1c9adba947 fix: preserve spawn cleanup while hardening kill path checks 2026-03-06 14:37:38 +05:30
Harsh 86b34c8923 fix: restrict cleanup to AO-managed worktrees 2026-03-06 14:19:16 +05:30
Harsh Batheja 32fdbdb03a
Merge pull request #312 from ComposioHQ/chore/untrack-local-yaml
chore: untrack local agent-orchestrator config
2026-03-06 11:40:47 +05:30
Harsh 456ef3e951 chore: untrack local agent-orchestrator config 2026-03-05 22:21:21 +05:30
sujayjayjay 690bd9ee3a
Merge pull request #278 from ComposioHQ/preview-banner
Add Composio banner to README
2026-03-03 22:48:20 +05:30
Sujay Choubey 17c79b21a0 Add Composio banner to README 2026-03-03 22:43:23 +05:30
prateek a4a1a32e96
fix: auto-detect free port in ao start <url> config generation (#275)
* fix: auto-detect free port in ao start <url> config generation

When generating a new config via `ao start <url>`, auto-detect a free
port instead of hardcoding 3000. Reuses `findFreePort` (extracted to
shared web-dir.ts from init.ts). When port was auto-selected, skip the
strict preflight port check and silently find another free port if
needed (race condition).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add polling to listIssues integration test for Linear API consistency

The listIssues test was failing because Linear's API has eventual
consistency — a just-created issue may not appear in list queries
immediately. Other tests in this file already use pollUntilEqual for
the same reason. Use pollUntil to retry until the issue appears.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: restore coupling between MAX_PORT_SCAN and findFreePort

MAX_PORT_SCAN was decoupled from findFreePort after extraction to
web-dir.ts — init.ts kept a local constant only used in messages while
findFreePort had its own default, and start.ts hardcoded 99. Export
MAX_PORT_SCAN from web-dir.ts as the single source of truth, use it as
findFreePort's default parameter, and import it in both callers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 15:03:20 +05:30
prateek e503caeaa3
fix: don't show 'Ready to merge' badge on merged/closed PRs (#274)
Extract isPRMergeReady() helper that checks pr.state === "open" before
evaluating merge criteria, preventing the badge from appearing alongside
the 'Merged' chip on already-merged PRs.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:46:54 +05:30
prateek b5128cf69f
fix: use gh repo clone for private repo auth in ao start <url> (#273)
HTTPS clone fails on private repos without credentials. Now tries
three strategies in order:
1. gh repo clone (handles GitHub auth via gh auth token)
2. git clone with SSH URL (works with SSH keys)
3. git clone with HTTPS URL (public repos fallback)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:42:35 +05:30
prateek e72593d4f8
fix: URL start multi-project resolution and cross-platform browser open (#272)
* fix: URL start handles multi-project configs and cross-platform browser open

When `ao start <url>` loads an existing config with multiple projects,
resolve the correct project by matching the URL's owner/repo against
each project's `repo` field instead of failing with "Multiple projects".

Also fix browser open to use platform-appropriate command (open/xdg-open/start)
instead of hardcoded macOS `open`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use shallow clone (--depth 1) for faster repo onboarding

Full clones of large repos can take minutes. Shallow clone with
depth 1 fetches only the latest commit, making `ao start <url>`
near-instant for any repo size.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use cmd.exe /c start for Windows browser open

`start` is a cmd.exe builtin, not a standalone executable — spawn
would fail with ENOENT. Run via cmd.exe /c with empty title arg.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:26:41 +05:30
prateek 80a1d59999
feat: add `ao start <url>` one-command project onboarding (#267)
* feat: add `ao start <url>` one-command project onboarding

When `ao start` receives a repo URL instead of a project ID, it now:
1. Parses the URL (supports GitHub, GitLab, Bitbucket — HTTPS and SSH)
2. Clones the repo (or reuses if already present with matching remote)
3. Auto-generates agent-orchestrator.yaml with sensible defaults:
   - SCM/tracker plugins inferred from URL host
   - Default branch detected from local refs
   - Project type detected (language, package manager)
   - Post-create install commands set based on package manager
4. Starts the orchestrator + dashboard as usual

New core module `config-generator.ts` handles URL parsing, SCM detection,
project info detection, and config generation. All logic is in core (not
CLI) for reusability. 36 unit tests cover URL parsing, SCM detection,
default branch detection, project info, config generation, and clone
target resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address bugbot review feedback

1. Non-JS postCreate fix: Only set postCreate install commands for JS
   package managers (pnpm/yarn/bun/npm). Rust/Go/Python projects no
   longer get an incorrect "npm install" command.

2. Deduplicate startup logic: Extract shared `runStartup()` helper used
   by both URL-mode and normal-mode start flows. Eliminates ~100 lines
   of duplicated dashboard+orchestrator startup code.

3. SSH URL matching: Normalize SSH URLs to HTTPS format in
   `isRepoAlreadyCloned()` so repos cloned via SSH
   (git@github.com:owner/repo) are correctly detected as matching.

4. SCM/tracker always explicit: Always set scm and tracker fields in
   generated config so `applyProjectDefaults()` doesn't silently
   override with github defaults for non-GitHub repos.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: sanitize repo names for project IDs and session prefixes

Address remaining bugbot comments:
- Add sanitizeProjectId() to handle dots/special chars in repo names
  (e.g. "my.app" → "my-app" instead of failing Zod validation)
- Preserve original case for generateSessionPrefix() so CamelCase
  detection works (e.g. "DevOS" → prefix "dos", not "dev")
- Strip invalid chars before prefix generation to prevent dots
  leaking into sessionPrefix

Also update README and SETUP docs with `ao start <url>` quick
onboarding flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: auto-open browser to orchestrator page on `ao start`

Opens the orchestrator session page (/sessions/{id}) instead of the
root dashboard, since the Kanban board is empty on first startup
with no worker sessions yet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: replace fixed 3s delay with port polling for browser open

Poll the dashboard port via TCP connection attempts (300ms intervals,
30s timeout) instead of a hardcoded setTimeout. Opens the browser only
once the server is actually accepting connections — deterministic
regardless of how long Next.js takes to compile.

Applied to both `ao start` and `ao dashboard` commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add CLI tests for start/stop commands

12 new tests covering:
- Project resolution: single project, explicit arg, missing project,
  multi-project ambiguity, empty config
- URL argument: reuse existing clone, git clone flow, existing config
  detection, clone failure error handling
- Port polling: waitForPortAndOpen polls isPortAvailable before opening
  browser (proves deterministic behavior vs fixed delay)
- Stop command: session kill + dashboard stop, graceful missing session

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: deduplicate waitForPortAndOpen into shared utility

Move waitForPortAndOpen to lib/web-dir.ts (alongside isPortAvailable)
so both start.ts and dashboard.ts share a single cancellation-aware
implementation. start.ts now uses AbortSignal like dashboard.ts —
polling stops immediately if the dashboard process exits early.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:52:49 +05:30
suraj_markup d1bf5a5b03
Merge pull request #266 from suraj-markup/feat/issue-265
feat(mobile): React Native app for monitoring AO sessions
2026-03-03 05:21:20 +05:30
suraj-markup c9bf351481 fix: enable cleartext traffic on Android for local/Tailscale HTTP
Android blocks plain HTTP by default. Enable usesCleartextTraffic
so the app can connect to http://100.x.x.x:3000 (Tailscale) and
http://192.168.x.x:3000 (LAN) backends.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 05:17:03 +05:30
suraj-markup d6d5dd6642 fix: skip polling with empty session ID, use correct XDA parser API
- Add `enabled` option to useSession hook; OrchestratorScreen passes
  enabled: !!orchestratorId to avoid polling /api/sessions/ with an
  empty string when no orchestrator is running
- Replace term.onData XDA handler with term.parser.registerCsiHandler
  matching the web dashboard implementation — onData only fires for
  outgoing user input, not incoming WebSocket data where the CSI > q
  query actually arrives

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 05:07:27 +05:30
suraj-markup 0773137a65 feat: embed orchestrator session details inline, remove overview
Show orchestrator session details (status, activity, summary, timing,
terminal button, send message) directly on the Orchestrator page
instead of requiring navigation to a separate SessionDetail page.
Remove the Overview stats section. Commands remain in header button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 04:53:32 +05:30
suraj-markup b5e486ffd2 fix: robot button goes to Orchestrator page with Commands in header
Revert 🤖 to navigate to Orchestrator overview (zones, stats,
orchestrator status card). The "Commands" header button on that
page opens the CLI commands reference. Tapping the orchestrator
card navigates to its session detail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 04:50:54 +05:30
suraj-markup 185dc97ede fix: add Commands button (📋) to HomeScreen header
The Commands button was on the Orchestrator page header which is
no longer visited when the orchestrator is running. Move it to the
HomeScreen header so it's always accessible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 04:49:43 +05:30
suraj-markup d733f107c3 feat: robot button opens orchestrator session, commands in header
- Robot button (🤖) on HomeScreen now navigates directly to the
  orchestrator's session detail when running, or to the Orchestrator
  overview when not running
- Move CLI commands to a new CommandsScreen, accessible via a
  "Commands" header button on the Orchestrator page
- Remove inline CLI commands from OrchestratorScreen body

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 04:47:12 +05:30