agent-orchestrator/packages/integration-tests
prateek de662dc042
fix: recognize terminated/done session states and hide terminal for dead sessions (#40)
* fix: recognize terminated/done session states and hide terminal for dead sessions

- Add "done" and "terminated" to VALID_STATUSES in session-manager so
  validateStatus() doesn't fall back to "spawning" for these states
- Hide terminal button for terminal-state sessions (no tmux to connect to)
- Hide "terminate session" button for already-terminated sessions
- Show "restore session" button for terminated/done sessions

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: restore activity=exited check for crashed sessions

Bugbot caught that the refactor dropped the activity === "exited"
condition. When an agent crashes, status stays non-terminal (e.g.
"working") but activity becomes "exited" — these need the restore
button and should not show terminal/terminate buttons.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: add terminated/done to backend RESTORABLE_STATUSES

Frontend shows restore button for terminated/done sessions but
the backend restore endpoint only accepted killed/cleanup, returning
409 "Session is not in a terminal state" for the new statuses.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: add type annotations to fix implicit any errors in integration tests

Pre-existing issue from package rename — callback parameters in
.find() lost type inference. Add explicit type annotations.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: filter orchestrator session from SSR page

The API route filtered it but the SSR path in page.tsx did not,
causing the orchestrator to appear as a session card.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: make orchestrator session name dynamic using prefix convention

Use endsWith("-orchestrator") instead of hardcoded "orchestrator" to
support project-prefixed names like "ao-orchestrator". Pass orchestratorId
from SSR to Dashboard so the terminal button links to the correct session.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: update stale @agent-orchestrator/core imports to @composio/ao-core

Package was renamed in PR #32 but these two files were missed.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15 05:15:41 +05:30
..
src fix: recognize terminated/done session states and hide terminal for dead sessions (#40) 2026-02-15 05:15:41 +05:30
package.json feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
tsconfig.json feat: agent plugins, OpenCode plugin, integration tests, CI (#5) 2026-02-14 11:28:42 +05:30
vitest.config.ts feat: notifier-composio plugin + integration tests for all plugins (#7) 2026-02-14 16:29:59 +05:30