feat: project plugin host actions to Touch Bar - #211
Merged
Conversation
IchenDEV
marked this pull request as ready for review
September 1, 2026 00:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uicontribution path through a target-neutralhost.actionsslotNSTouchBardetails inside the macOS adapteragent-session-monitorRuntime using onlysessions.summaryanddesktop.reveal_sessionArchitecture
flowchart LR subgraph Plugin["Plugin — target neutral"] Manifest["plugin.json<br/>ui · host.actions"] Runtime["Plugin Runtime<br/>agent-monitor.actions"] Manifest --> Runtime end subgraph Existing["Existing plugin infrastructure"] Hub["Plugin Hub<br/>list · catalog · invoke_ui"] Controller["HostActionController<br/>validate · cache · route"] Hub --> Controller end subgraph Platform["Platform adapter"] Port["HostActionAdapter<br/>render · dispose"] Mac["macOS adapter"] TouchBar["NSTouchBar"] Port --> Mac --> TouchBar end Runtime <-->|render / invoke| Hub Controller --> Port TouchBar -->|contributionKey + itemId| Controller Sessions["Session state"] -->|sessions.summary| Runtime Runtime -->|desktop.reveal_session| Desktop["C2 Desktop<br/>select session"] Events["engine-event<br/>plugins-changed"] -->|refresh| ControllerThe plugin knows only
host.actions. Core exposes session data, the existing Plugin Hub owns lifecycle and invocation, andNSTouchBarexists only in the outer macOS adapter.Ponytail scope
The earlier parallel
surfacescontribution family, C2 1.3 version, dedicated Hub commands, and dedicated invalidation event were removed. This PR intentionally does not add a universal UI DSL or adapter registry.Verification
bun run lint:codebunx tsc --noEmitbun test— 815 passedcargo test -p codetwo-plugins --lib— 38 passedcargo check -p codetwo-plugins -p codetwo-desktop-hostpacks/agent-session-monitorKnown baseline
The unchanged full
codetwo-pluginsintegration suite contains one stale assertion that expects trusted declared Runtimes to fail during graph load, while the current implementation activates them lazily on first command use. This PR does not modify that test or activation behavior.