Skip to content

feat(integrations): add standalone ACP preflight - #845

Closed
bandzalkin wants to merge 69 commits into
band-ai:mainfrom
bandzalkin:feat/host-preflight-acp-refresh
Closed

bandzalkin wants to merge 69 commits into
band-ai:mainfrom
bandzalkin:feat/host-preflight-acp-refresh

Conversation

@bandzalkin

@bandzalkin bandzalkin commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This lets a host check its configured ACP backend before connecting to Band or assigning a room. await adapter.preflight(timeout_s=...) supports the generic ACP, Cursor ACP, and Copilot ACP adapters.

  • Launch a throwaway process with the configured command, environment, working directory, client capabilities, and protocol options, then initialize it without creating an ACP session, room workspace, or model turn.
  • Run authenticate only when auth_method is configured. This can start an interactive login or change stored credentials; leave it unset when the host must not request login.
  • Return a safe PreflightResult for ordinary handshake failures. Cancellation propagates, while incomplete cleanup raises CleanupIncompleteError and stays owned for cleanup_all() to retry.
  • Keep room shutdown in the requesting task, close rooms before their MCP resources, and attempt probe cleanup even when room cleanup fails or is cancelled.
  • Require confirmed physical exit of retained Windows Job members as well as empty Job accounting before releasing process-tree ownership.

A successful initialize/authenticate does not establish inference entitlement, session creation, MCP connectivity, or model readiness. Band's probe diagnostics omit raw child output; third-party protocol libraries may emit their own diagnostics.

Prerequisite

Depends on the shared probe contracts in #844.

Validation

Tests cover all three adapters, configured authentication, no-room operation, real protocol peers, cancellation, late startup, cleanup retry, and diagnostic privacy.

@bandzalkin bandzalkin changed the title feat(acp): add owned standalone initialize preflight feat(integrations): add standalone ACP preflight Oct 18, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 19, 2026
@bandzalkin
bandzalkin force-pushed the feat/host-preflight-acp-refresh branch from 3ab029d to eaad6b3 Compare October 20, 2026 06:36
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
AlexanderZ-Band and others added 5 commits October 20, 2026 13:08
…t-activity-detail-to-the-platform-INT-1744

Keep main's BackendTurns ownership of OpenCode cancellation and register the
watcher as a turn worker so activity reporting outlives the handler. Reporter
unit tests move to tests/runtime/workingreporter; main's workingstate package
keeps the execution-level tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgnNR4uiqD787Bg3yKdZpL
…detail-to-the-platform-INT-1744' into feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744

Port the startup-backlog claim-failure test edit to the split
tests/runtime/execution package.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgnNR4uiqD787Bg3yKdZpL
…detail-to-the-platform-delivery-INT-1744' into feat/python-sdk-report-activity-detail-to-the-platform-producers-INT-1744

Adopt main's agno and tool test layouts and carry the producer edits into
them; keep the split CrewAI/Parlant coverage guards with main's new paths.
Letta streams provider events through main's BackendTurns run, and the
CrewAI flow tool activity wraps main's turn-owned tool execution.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgnNR4uiqD787Bg3yKdZpL
It runs three collect-only subprocesses, which exceeded the default
per-test timeout on Windows runners.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgnNR4uiqD787Bg3yKdZpL
Room Sim and others added 21 commits October 20, 2026 22:19
…them

A name longer than 1024 characters is a 422 on the activity endpoint,
and the compatibility path reads a detail-bearing 422 as an old
platform: one oversized tool name would latch activity detail off for
the whole process. Clip at the serialization chokepoint instead, one
constant, so a long name costs characters and nothing else. Guarded by
tests/platform/activity/test_truncation.py (over-limit clipped,
exact-limit untouched).
The lifecycle peer rejects narration posts with the stopped-execution
answer, so the first reported tool call read as a platform stop and tore
down the turn machinery around a parked approval. A running room echoes
201 like the posting peer before it; stopped peers keep rejecting.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin and others added 4 commits October 21, 2026 08:12
The mask wrapper was attached only when the flag was already off, so an
adapter that binds its observer before the emit sync (codex's item/started
path) kept reporting named tool_calls after the choice was turned off. The
observer now always wraps and reads the live flag on every report; the hook
site gates on the OMP branch remain as the second guard. Red-first test:
observer bound with names on, choice flipped off mid-turn, tool report must
arrive nameless.

Co-Authored-By: Claude <noreply@anthropic.com>
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
@bandzalkin

Copy link
Copy Markdown
Contributor Author

Closing: band-agent does not consume this; may be re-proposed per feature.

@bandzalkin bandzalkin closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants