Skip to content

feat(sdk): add owned host probe and catalog contracts - #844

Closed
bandzalkin wants to merge 56 commits into
band-ai:mainfrom
bandzalkin:feat/host-probe-refresh-base
Closed

bandzalkin wants to merge 56 commits into
band-ai:mainfrom
bandzalkin:feat/host-probe-refresh-base

Conversation

@bandzalkin

@bandzalkin bandzalkin commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This adds shared host-facing contracts for checking an adapter and discovering its models before opening a Band room. Backend implementations can use the same result, catalog, and cleanup semantics rather than inventing their own readiness checks.

  • Add immutable PreflightResult with ok, reason, and remedy, plus explicit preflight(timeout_s=...) and probe_models(timeout_s=...) adapter entrypoints. Unsupported preflight returns a failed result; unsupported discovery raises rather than fabricating an empty catalog.
  • Reuse ModelCatalog and ModelChoice, adding provider and default metadata fields while keeping unknown reasoning-effort support distinct from an explicitly empty set.
  • Add a serialized HarnessProbe owner that registers cleanup before asynchronous startup. Operation and cleanup reporting have separate budgets; a timeout or cancellation does not abandon late startup or release a resource that has not closed.
  • Retain failed cleanup for cleanup_all() to retry, and omit raw exception details from background probe-cleanup diagnostics.

A successful preflight means the harness answered its handshake, not that inference access is available. Standalone discovery is separate from the existing room-facing list_models() hook. Backend-specific probes are outside this PR.

Validation

Contract tests cover unsupported operations, late startup, cancellation, eager task execution, retained cleanup failures, and diagnostic privacy.

AlexanderZ-Band and others added 3 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
bandzalkin and others added 8 commits October 20, 2026 23:11
…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.
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
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 2 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