Skip to content

Terminal-extension domain spec (pre-execution, user-grilled) #191

Closed

Description

@omridevk

Question

Terminal extension spec under the #192 reframe (sessions are just files; no adopt/presence/mirror machinery). Scope to spec and grill: (1) what of the extension's existing surface stays (pty/xterm panes, existing terminal UI); (2) connect launch — widget opens a terminal running the harness CLI on a session (connect.plan() argv work salvaged?); (3) claude native plugin surface (hooks, session MCP bridge, approvals) and how it rides the conciv-init CLI-first design; (4) exhaustive DELETE delta vs the salvage inventory (#181): session-observer package, presence pill, observer wiring, hook-endpoint-for-presence, attach RPC surface — plus the frozen tests that spec'd them (extends the test-disposition ruling). Deliverable: short spec + delete-delta list + user approval.

Activity

  1. omridevk commented on Aug 3, 2026

    @omridevk
    ContributorAuthor

    Spec #191 — terminal extension under the reframe (fills design v2.6's named deferrals)

    RPC surface (extension-scoped router, moved from core)

    • terminal.launch {sessionId, model?} → {ok} — build argv via the harness's connect.plan()
      (kept, packages/harness), open via terminal-opener (moved here from core). Launches; never
      tracks. For a row with no nativeId yet, launch starts a fresh CLI session; the native id lands
      in the row the same way a widget turn's would (recorded from the harness store on next open —
      NOT via the deleted launch-premint side channel).
    • terminal.connectCommand {sessionId} → {command} — the copyable command string (kept UX).
    • Existing pty pane routes (open/write/resize/close) keep their shapes, MINUS the chat
      couplings: no chat-lock check on open, no pty teardown on chat turn (those cases die with
      their tests per the bucket list).

    claude plugin — final scope

    • KEEP: skills + the session MCP bridge (session identity rides CONCIV_CLAUDE_SESSION_HEADER
      on MCP requests — how page tools know their session; per conciv-init's claude recipe).
    • DELETE: hooks-plugin.ts and the server /hook endpoint. Their only consumers were presence
      reporting and adopt-era token repointing — both dead under Widget sending into terminal sessions: needed at all? #192. This dissolves A13: with the
      hooks generator gone, HookEventName has no importer and session-observer's deletion leaves
      no dangling type. (If a future feature needs lifecycle hooks, it re-adds them with a live
      consumer; nothing speculative survives.)
    • conciv-init claude recipe wording updates from "skills, session MCP bridge, hooks" to
      "skills, session MCP bridge" — one-line amendment to the init spec at import time.

    Import-cleanup delta (exhaustive, extends the salvage inventory)

    DO NOT IMPORT / DELETE:

    • packages/session-observer/** (whole package) + its PUBLIC_PACKAGES/workspace references
    • packages/extensions/terminal/src/client/presence-pill.tsx, mirror-rail.tsx
    • packages/extensions/terminal/src/client/terminal-context.ts — rewrite minus observe
      context + its 404-retry guard (dead consumer)
    • packages/extensions/terminal/src/server/observer-wiring.ts, osc-busy.ts, the /hook
      endpoint + hookUrl/stateDir plumbing in server.ts (server.ts reworked)
    • packages/harness/src/claude/hooks-plugin.ts; harness package.json dep on session-observer
    • core: terminal-opener.ts + launch RPCs (move here), launch-premint path
    • app: transcript-tail-preview.tsx (fed only by deleted attachCandidates tail)

    Connect-flow app UI (apps/conciv/src/composer/connect/**, launch-menu.tsx): candidate-list /
    candidate-row / reload-card / connect-machine die (candidates are dead — sessions just appear in
    the list); launch-menu + copy-command survive wired to terminal.launch/terminal.connectCommand.

    Test buckets (extension-related; plan copies these verbatim)

    • Whole-file with feature: observer.it.test.ts, osc-busy.test.ts,
      hook-session-start.it.test.ts, hook-session-id.it.test.ts, reload-replay.browser.test.tsx,
      session-observer's entire suite, connect-machine.test.ts, connect-steps.test.ts,
      connect-dialog.browser.test.tsx, connect-a11y.browser.test.tsx,
      connect-focus-ring.browser.test.tsx, transcript-tail-preview.browser.test.tsx,
      core attach-adopt/attach-candidates/adopt-transaction/candidate-facts, launch-premint.it,
      connect-gate.it.test.ts
    • Assertion surgery: routes.it.test.ts (drop chat-lock + pty-teardown + token-record cases;
      pty mechanics stay), connect-flow.browser.test.tsx (keep launch/copy coverage, drop
      candidate/adopt/force)
    • Rename-only: none here (launch RPC path changes are covered by kept launch-menu tests
      retargeted at the extension route — mechanical).

    Acceptance

    Extension suite green per buckets; widget mount-externals test green; no import of any deleted
    module anywhere (fallow + tsc prove it); vocabulary gate clean.

  2. omridevk commented on Aug 3, 2026

    @omridevk
    ContributorAuthor

    Spec approved (user, 2026-08-03), including the two flagged deletions: (1) claude hooks-plugin + /hook endpoint die (init claude recipe = skills + session MCP bridge); (2) connect candidate UI dies (candidate-list/row, reload-card, connect-machine); launch-menu + copy-command survive on terminal.launch/connectCommand. Closing; the plan copies the import-cleanup delta and test buckets verbatim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions