Repository navigation
fix(integrations): preserve native OMP lifecycle and prompt authority - #763
bandzalkin wants to merge 62 commits into
Conversation
Squashed from band-ai#763 at 1e71e40. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 1e71e40. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 1e71e40. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 1e71e40. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 89b1e88. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 89b1e88. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 89b1e88. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 89b1e88. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 89b1e88. Upstream-PR: band-ai#763
Squashed from band-ai#763 at 89b1e88. Upstream-PR: band-ai#763
Refresh the native OMP prerequisite onto upstream 497868e. Port every band-ai#772 permission-policy case to native select requests and preserve correlated denial narration without a chat or turn-completion effect. Keep the published 5.1.0 changelog unchanged below Unreleased. Source prerequisite: 3d939244411931b973e1bfd3b6bc65c0d15defd5 Upstream-PR: band-ai#763
9b133be to
3352c62
Compare
Source-Base: 97f8330 Source-Head: 4184abb Applied-Over: bcf422f Conflict-Notes: None; exact source delta, excluding CHANGELOG.md and FORK-CHANGES.md Upstream-PR: band-ai#763
Source-Base: 97f8330 Source-Head: 4184abb Applied-Over: bcf422f Conflict-Notes: None; exact source delta, excluding CHANGELOG.md and FORK-CHANGES.md Upstream-PR: band-ai#763
Source-Base: 97f8330 Source-Head: 4184abb Applied-Over: 3643b7c Conflict-Notes: Resolved band-ai#709 modify/delete conflicts by replacing OMP ACP with native RPC; retained the workspace flag and current form-policy test class, removed obsolete ACP profile fixtures, migrated the new room-rejoin test and matrix row, and preserved band-ai#804 owner-module imports. No behavioral source hunks dropped; CHANGELOG.md and FORK-CHANGES.md excluded. Upstream-PR: band-ai#763
Source-Base: c18df71 Source-Head: 56a679d Applied-Over: 850b0c3 Conflict-Notes: Reimplemented resolver and shared initializer on band-ai#709 ACPRoom/RetainedRoom custody; dropped superseded parallel retirement/shutdown/respawn APIs and restartable cleanup flags; retained narrow child-reaping and closing-connection guards; moved legacy coverage to clientadapter/ and roomownership/ without restoring deleted files. Stacked after band-ai#763: docs/acp.md keeps band-ai#763's removal of OmpACPAdapterConfig beside resolve_mcp_servers. The room records the initializer its last waiter abandoned, so a callback that uncancel()s cannot publish a session or hand its late result to a successor (the original's SessionInitializer.invalidated). A setup already settling its own cancellation is recorded as abandoned too, without a second cancel. A successor joining a setup that was only settling its own cancellation reuses the live session it published. Upstream-PR: band-ai#799
Source-Base: 97f8330 Source-Head: 4184abb Applied-Over: 1cd5845 Conflict-Notes: Resolved band-ai#709 modify/delete conflicts by replacing OMP ACP with native RPC; retained the workspace flag and current form-policy test class, removed obsolete ACP profile fixtures, migrated the new room-rejoin test and matrix row, and preserved band-ai#804 owner-module imports. No behavioral source hunks dropped; CHANGELOG.md and FORK-CHANGES.md excluded. Over band-ai#802: OMP image and turn-outcome probes move into its imageprobes.py/outcomeprobes.py registries; uv.lock regenerated over band-ai#796. Upstream-PR: band-ai#763
Source-Base: c18df71 Source-Head: 56a679d Applied-Over: 27431ce Conflict-Notes: Reimplemented resolver and shared initializer on band-ai#709 ACPRoom/RetainedRoom custody; dropped superseded parallel retirement/shutdown/respawn APIs and restartable cleanup flags; retained narrow child-reaping and closing-connection guards; moved legacy coverage to clientadapter/ and roomownership/ without restoring deleted files. Stacked after band-ai#763: docs/acp.md keeps band-ai#763's removal of OmpACPAdapterConfig beside resolve_mcp_servers. The room records the initializer its last waiter abandoned, so a callback that uncancel()s cannot publish a session or hand its late result to a successor (the original's SessionInitializer.invalidated). A setup already settling its own cancellation is recorded as abandoned too, without a second cancel. A successor joining a setup that was only settling its own cancellation reuses the live session it published. Upstream-PR: band-ai#799
Source-Base: 97f8330 Source-Head: 4184abb Applied-Over: 1cd5845 Conflict-Notes: Resolved band-ai#709 modify/delete conflicts by replacing OMP ACP with native RPC; retained the workspace flag and current form-policy test class, removed obsolete ACP profile fixtures, migrated the new room-rejoin test and matrix row, and preserved band-ai#804 owner-module imports. No behavioral source hunks dropped; CHANGELOG.md and FORK-CHANGES.md excluded. Over band-ai#802: OMP image and turn-outcome probes move into its imageprobes.py/outcomeprobes.py registries; uv.lock regenerated over band-ai#796. Upstream-PR: band-ai#763
Source-Base: c18df71 Source-Head: 56a679d Applied-Over: 27431ce Conflict-Notes: Reimplemented resolver and shared initializer on band-ai#709 ACPRoom/RetainedRoom custody; dropped superseded parallel retirement/shutdown/respawn APIs and restartable cleanup flags; retained narrow child-reaping and closing-connection guards; moved legacy coverage to clientadapter/ and roomownership/ without restoring deleted files. Stacked after band-ai#763: docs/acp.md keeps band-ai#763's removal of OmpACPAdapterConfig beside resolve_mcp_servers. The room records the initializer its last waiter abandoned, so a callback that uncancel()s cannot publish a session or hand its late result to a successor (the original's SessionInitializer.invalidated). A setup already settling its own cancellation is recorded as abandoned too, without a second cancel. A successor joining a setup that was only settling its own cancellation reuses the live session it published. Upstream-PR: band-ai#799
4184abb to
242a3c9
Compare
|
Rebased onto current main ( |
The restack merge resolved src/band/runtime/tools/agent.py to this branch's older lineage and dropped the activity observation the producer stack added: the class decorator reporting method calls and the model-tool wrapper around execute_tool_call. Native OMP work does not touch that surface; restore it from the prerequisite.
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.
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.
Source-Base: 89dab59 Source-Head: 2dc539a Upstream-PR: band-ai#763
Live capture on the platform showed the OMP hooks posting tool_call activity details even when Emit.TOOL_CALLS was off: the activity channel is separate from event narration, so the hook sites need the same gate the narration already had. I-01/I-02: with tool reporting off, no tool kind or name may reach the reporter. Tests now pin the gate directly (activity follows the switch) instead of the incorrect independence premise. Co-Authored-By: Claude <noreply@anthropic.com>
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>
|
Provenance note (this branch outgrew its title): besides the background-yield fix it started with,
One anomaly to flag rather than hide: commit |
F-8 closure evidence: an observer bound at turn start now reads the gate flag at report time (d764959, covered by the flip-after-binding test), and a stale continuation report after the next turn takes activity ownership is fenced before it can name anything. The two guards seal R-02 for OMP background-yield continuations; no production change is required.
|
F-8 follow-up (board task 4, part 1): this branch gains a test guard, no code change. The question whether an OMP continuation's band-tool labels can outlive a Tool-calls-&-results flip is now answered at the tree, two ways:
Commit |
Summary
This adds a room-owned native RPC adapter for OMP so a Band turn stays attached to its background work instead of ending at the first yield. Prompt acceptance, an initial result, or
agent_endis not enough: the adapter waits for both the matching prompt outcome and native session settlement, and reports failures from resumed work on the same turn.Requires
band-sdk[omp]and OMP 18.8.9 or later. A room workspace is not an OS sandbox, and native approval settings do not grant Band platform permissions.Validation
Regression coverage includes background settlement ordering, resumed errors, cancellation/restart, process custody, startup readiness, permission-record identity and privacy failures.