Skip to content

feat: project plugin host actions to Touch Bar - #211

Merged
IchenDEV merged 3 commits into
mainfrom
codex/plugin-host-actions
Sep 1, 2026
Merged

feat: project plugin host actions to Touch Bar#211
IchenDEV merged 3 commits into
mainfrom
codex/plugin-host-actions

Conversation

@IchenDEV

@IchenDEV IchenDEV commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • reuse the existing C2 1.2 ui contribution path through a target-neutral host.actions slot
  • validate compact action documents in a generic desktop controller and keep all NSTouchBar details inside the macOS adapter
  • add the installable agent-session-monitor Runtime using only sessions.summary and desktop.reveal_session

Architecture

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| Controller
Loading

The plugin knows only host.actions. Core exposes session data, the existing Plugin Hub owns lifecycle and invocation, and NSTouchBar exists only in the outer macOS adapter.

Ponytail scope

The earlier parallel surfaces contribution 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:code
  • bunx tsc --noEmit
  • bun test — 815 passed
  • cargo test -p codetwo-plugins --lib — 38 passed
  • cargo check -p codetwo-plugins -p codetwo-desktop-host
  • Bun and Rust validation of packs/agent-session-monitor
  • production AppKit Touch Bar harness
  • docs, SDLC, worktree, and whitespace Gates

Known baseline

The unchanged full codetwo-plugins integration 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.

@IchenDEV
IchenDEV marked this pull request as ready for review September 1, 2026 00:47
@IchenDEV
IchenDEV merged commit cc79289 into main Sep 1, 2026
4 checks passed
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.

1 participant