Skip to content

feat(tui): select plugins with durable identity mentions - #334

Merged
hetaoBackend merged 6 commits into
mainfrom
feat/plugin-mentions
Sep 23, 2026
Merged

hetaoBackend merged 6 commits into
mainfrom
feat/plugin-mentions

Conversation

@hetaoBackend

@hetaoBackend hetaoBackend commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Change

Add explicit plugin selection to the Composer's @ completion menu, alongside files.

  • Candidates come from Runtime's installed, enabled plugins and identify their source. The editor shows the display name and binds the stable name@source identity.
  • Preserve bindings through editing, atomic deletion/undo, prompt history/search, saved drafts, failed sends, queued-message reload/edit/restore, attachments, and hidden context.
  • Encode bindings in the existing durable user-text transport as [@Name](plugin://name%40local), keeping the visible message readable. Exec and ACP can submit the same linked syntax.
  • Resolve exact identities against the effective turn inventory. Include Skills, direct MCP tools, and deferred MCP/App discovery instructions; report unavailable IDs without substituting another source or installing/enabling plugins.
  • Keep legacy @package-name selection only when it is unambiguous. Bound the capability reminder. Record the generic editor history hook in the Pi engine ledger.

Labels: enhancement, cli, tui, perf:full.

Validation

  • PASS: VITEST_MAX_WORKERS=4 pnpm verify on clean committed head 54426081b748ee3549f622a022014865c16e6d52, full macOS profile: all 14 applicable gates.
  • Capability suite: 171 files, 4,566 passed, 14 skipped. Includes 28 new regression cases covering editor/controller persistence and the final Runtime tool catalog.
  • PASS: git diff --check; both commit author and committer identities inspected before push.
  • PASS: built dist/cli.js in a real PTY with a temporary local plugin and synthetic local OpenAI-compatible service: type @Fixture, select with Tab, submit, inspect the canonical plugin ID and selected-plugin reminder in the outgoing request, execute the real skill tool, and receive the fixture response. Also passed Ctrl+C clearing/restoration and /edit regeneration with the original plugin ID. External network access blocked by the repository test fixture.
  • Performance: perf:full requested because prompt history serialization changes. Latest-head remote verification passed on Linux, macOS, and Windows. Full performance run 35848361507 passed with Suite: full (startup, upstream-100, history-300), candidate 5442608 against base 76262af.
  • NOT RUN locally: Windows/Linux acceptance, release-package archive validation, real-model or production connector behavior. Capability selection is checked at turn assembly; this does not introduce active-turn capability hot reload.

Independent review fixes

  • Clear plugin bindings in the empty Ctrl+C snapshot while retaining them in the restore snapshot.
  • Preserve canonical edit content alongside readable display messages when plugin IDs are hidden. Cover ordinary delivery, queued batches, steering, persistence codec, message projection, and the real /edit flow.
  • Preserve unchanged plugin labels across external-editor suffix and multiple-range edits, including expanded pastes and undo. Avoid guessing identity after ambiguous duplicate-label edits.
  • Independent reviewer reran all four original/supplementary reproductions at head 15d9f91: 4/4 passed; all reported P2 findings closed. This was a focused re-review, not another full review.

Visual acceptance follow-up

  • Forward readable display content through the controller, run coordinator, Runtime admission, and direct-send delivery while preserving canonical execution content and durable edit content.
  • Decode legacy plugin links for live/history display so canonical echoes reconcile with the pending user row. Keep intentional repeats in separate turns.
  • Group completion candidates as Plugins / Files, cap long descriptions by terminal display width, retain source labels, and make all matching plugins selectable.
  • PASS: 82 focused controller/plugin tests; independent reviewer additionally checked 5 normal/paused-queue/steer admission branches.
  • PASS: built TUI in real PTYs at 110 and 180 columns, with terminal emulation assertions for one visible user message, no underline, grouped bounded completion, persistent edit content, and /edit regeneration. Synthetic local model service only; no real-model acceptance claimed.

CI failure follow-up

  • Fixed the macOS native filesystem watcher startup race by scheduling one debounced reconciliation after watcher registration. An immediate edit no longer depends on receiving a native event.
  • Added deterministic missed-event and disposal coverage. The unchanged-theme test still requires a subsequent real native event; controllers are disposed even when assertions fail.
  • PASS: new regression failed before the fix; all 49 theme tests pass after it. The native-watcher reproduction missed 40/40 immediate edits before reconciliation; the fixed theme watcher picked up 40/40.
  • PASS: all 14 applicable local macOS gates on clean committed head 5442608. Remote Linux, macOS, Windows verification and installation matrix passed.
  • Previous head's full performance run was INCONCLUSIVE due to startup duration noise. Latest-head full performance run returned PASS for all three scenarios.
  • Final PR checks: 21 passed, zero failed or pending, three intentionally skipped.

Publication and contribution checks

  • Permission to contribute under the existing applicable licenses; existing notices preserved. Implementation uses the repository's own contracts; no upstream code imported.
  • No credentials, account data, real user content, internal source history, or private review material included. Tests use synthetic fixtures.
  • Added source files reviewed; source inventory regenerated; new Vitest files registered.
  • User documentation and engine capability ledger updated. Offline evidence is distinguished from live-service acceptance.

Maintainer handoff

Publication scope: one shared mention codec, a TUI completion provider/editor binding helper, and two regression test files. No license changes.

Shared-source port: pending. No merge or release performed.


View with [code]smith

@hetaoBackend hetaoBackend added enhancement New feature or request tui Interactive terminal UI (TUI) cli Standalone mcode: TUI, headless, ACP and source builds/tooling perf:full Run the full performance suite; required for performance-sensitive changes labels Sep 23, 2026
@hetaoBackend
hetaoBackend merged commit 67afb61 into main Sep 23, 2026
24 checks passed
@hetaoBackend
hetaoBackend deleted the feat/plugin-mentions branch September 23, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Standalone mcode: TUI, headless, ACP and source builds/tooling enhancement New feature or request perf:full Run the full performance suite; required for performance-sensitive changes tui Interactive terminal UI (TUI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant