Skip to content

feat: gate activity tool names on the tool-call emit choice - #874

Closed
bandzalkin wants to merge 47 commits into
band-ai:mainfrom
bandzalkin:feat/gate-activity-tool-names
Closed

bandzalkin wants to merge 47 commits into
band-ai:mainfrom
bandzalkin:feat/gate-activity-tool-names

Conversation

@bandzalkin

Copy link
Copy Markdown
Contributor

Part of the INT-1744 producer stack, stacked on #841.

Adapters already gate tool-call narration on Emit.TOOL_CALLS. #841 reports tool names in the live activity detail regardless of that choice, so an agent configured without tool narration still leaks names into the room through the indicator. This PR aligns the two: the choice is read once per turn in SimpleAdapter.on_event and enforced at the activity observer every reporter funnels through, so no adapter can bypass it. permission and memory activity name no content and report either way.

If the producers stack should instead grow the gate inside #841, happy to fold these commits there and close this — the tests in tests/runtime/activity/test_namegate.py carry over unchanged.

Tests: tool_call frames carry the name with Emit.TOOL_CALLS and degrade to nameless reasoning without it; wrapper removal fails the guard.

AlexanderZ-Band and others added 23 commits October 18, 2026 13:33
Give the repeated tool-completion and privacy checks one helper, and name the ACP call record so activity identity is not a bare tuple.

Co-authored-by: Cursor <cursoragent@cursor.com>
…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
…detail-to-the-platform-INT-1744' into feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744
…detail-to-the-platform-delivery-INT-1744' into feat/python-sdk-report-activity-detail-to-the-platform-producers-INT-1744
Adapters that do not report tool calls must not leak tool names through the
live room indicator. The decision is taken once per turn in SimpleAdapter
from the negotiated emit set and enforced at the single observer every
activity reporter funnels through, so no adapter can bypass it. Permission
and memory detail name no content and always report.

Guards: tests/runtime/activity/test_namegate.py pins that a tool_call frame
reaches the wire with Emit.TOOL_CALLS and degrades to nameless reasoning
without it; fails if the wrapper is removed.
AlexanderZ-Band and others added 3 commits October 20, 2026 15:12
…t-activity-detail-to-the-platform-delivery-INT-1744

# Conflicts:
#	docs/turn-outcome.md
#	src/band/platform/message_lifecycle.py
#	src/band/runtime/execution.py
#	src/band/runtime/working_state.py
#	tests/runtime/activityownership/conftest.py
#	tests/runtime/activityownership/kit.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
The SaaS default rest_url (app.band.ai) serves the frontend at /api/version,
so discovery latched every default process to boolean reporting. Every agent
API response already carries X-API-Version, so the activity POST itself now
teaches the process whether detail is supported. This removes the discovery
GET, its rest_url plumbing, the half-budget split and the cross-loop
owner/waiter coordination. The 422 downgrade now logs the room and body, and
an unadvertised version is logged at debug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
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
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
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
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
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>
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin added 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
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
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: superseded by in-repo PR(s) #901 with the same content, one concern each and a clean single-author history.

@bandzalkin bandzalkin closed this Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 22, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
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