@xingular/harness 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +28 -25
  3. package/dist/cli.js +6675 -2501
  4. package/dist/sdk/accounts/accounts.d.ts +27 -3
  5. package/dist/sdk/accounts/accounts.js +78 -24
  6. package/dist/sdk/accounts/secrets.d.ts +12 -0
  7. package/dist/sdk/accounts/secrets.js +114 -7
  8. package/dist/sdk/accounts/store.d.ts +26 -1
  9. package/dist/sdk/accounts/store.js +1 -1
  10. package/dist/sdk/agents/builtin.js +15 -1
  11. package/dist/sdk/agents/planResearch.d.ts +5 -0
  12. package/dist/sdk/agents/planResearch.js +19 -0
  13. package/dist/sdk/agents/profiles.d.ts +2 -1
  14. package/dist/sdk/agents/profiles.js +9 -4
  15. package/dist/sdk/annotations/pageScript.js +349 -48
  16. package/dist/sdk/annotations/part.js +34 -23
  17. package/dist/sdk/annotations/store.d.ts +7 -0
  18. package/dist/sdk/annotations/store.js +13 -5
  19. package/dist/sdk/browser/backend.d.ts +16 -0
  20. package/dist/sdk/browser/backend.js +17 -0
  21. package/dist/sdk/browser/contracts.d.ts +19 -0
  22. package/dist/sdk/browser/contracts.js +116 -0
  23. package/dist/sdk/browser/tools.d.ts +1 -4
  24. package/dist/sdk/browser/tools.js +14 -91
  25. package/dist/sdk/cli.js +5 -4
  26. package/dist/sdk/commands/list.d.ts +3 -0
  27. package/dist/sdk/commands/list.js +75 -0
  28. package/dist/sdk/commands/registry.d.ts +250 -0
  29. package/dist/sdk/commands/registry.js +47 -0
  30. package/dist/sdk/commands/routes.d.ts +16 -0
  31. package/dist/sdk/commands/routes.js +33 -0
  32. package/dist/sdk/core/commandBudget.d.ts +23 -0
  33. package/dist/sdk/core/commandBudget.js +57 -0
  34. package/dist/sdk/core/index.js +17 -1
  35. package/dist/sdk/core/interactiveProfile.d.ts +46 -0
  36. package/dist/sdk/core/interactiveProfile.js +143 -0
  37. package/dist/sdk/core/workspace.d.ts +13 -0
  38. package/dist/sdk/core/workspace.js +88 -0
  39. package/dist/sdk/core/workspaceBashTool.d.ts +4 -0
  40. package/dist/sdk/core/workspaceBashTool.js +36 -0
  41. package/dist/sdk/core/workspaceSandbox.d.ts +31 -0
  42. package/dist/sdk/core/workspaceSandbox.js +320 -0
  43. package/dist/sdk/core/workspaceWriteOperations.d.ts +22 -0
  44. package/dist/sdk/core/workspaceWriteOperations.js +206 -0
  45. package/dist/sdk/doctor/types.d.ts +2 -2
  46. package/dist/sdk/harness.d.ts +7 -0
  47. package/dist/sdk/harness.js +42 -2
  48. package/dist/sdk/index.d.ts +6 -1
  49. package/dist/sdk/index.js +3 -0
  50. package/dist/sdk/pi/runtime.d.ts +2 -1
  51. package/dist/sdk/pi/runtime.js +2 -2
  52. package/dist/sdk/plugins/builtin.js +29 -12
  53. package/dist/sdk/plugins/builtinRegistry.d.ts +10 -3
  54. package/dist/sdk/plugins/builtinRegistry.js +30 -8
  55. package/dist/sdk/plugins/catalogue.js +2 -1
  56. package/dist/sdk/plugins/commandPrefix.d.ts +8 -0
  57. package/dist/sdk/plugins/commandPrefix.js +21 -0
  58. package/dist/sdk/plugins/firstParty.d.ts +1 -1
  59. package/dist/sdk/plugins/firstParty.js +8 -2
  60. package/dist/sdk/plugins/inventory.js +4 -3
  61. package/dist/sdk/plugins/manifest.d.ts +2 -0
  62. package/dist/sdk/plugins/manifest.js +2 -1
  63. package/dist/sdk/plugins/surfaces.d.ts +5 -0
  64. package/dist/sdk/plugins/surfaces.js +11 -0
  65. package/dist/sdk/plugins/types.d.ts +15 -0
  66. package/dist/sdk/prompt/compile.d.ts +14 -0
  67. package/dist/sdk/prompt/compile.js +65 -29
  68. package/dist/sdk/prompt/standard.d.ts +17 -0
  69. package/dist/sdk/prompt/standard.js +21 -0
  70. package/dist/sdk/server/methods.js +18 -0
  71. package/dist/sdk/server/remote.js +36 -11
  72. package/dist/sdk/sessions/compactionCheckpoint.d.ts +11 -0
  73. package/dist/sdk/sessions/compactionCheckpoint.js +79 -0
  74. package/dist/sdk/sessions/continuation.d.ts +3 -0
  75. package/dist/sdk/sessions/continuation.js +5 -1
  76. package/dist/sdk/sessions/contracts.d.ts +168 -0
  77. package/dist/sdk/sessions/contracts.js +59 -1
  78. package/dist/sdk/sessions/control.d.ts +72 -0
  79. package/dist/sdk/sessions/control.js +158 -0
  80. package/dist/sdk/sessions/initialBash.d.ts +7 -0
  81. package/dist/sdk/sessions/initialBash.js +7 -0
  82. package/dist/sdk/sessions/planMode.d.ts +14 -3
  83. package/dist/sdk/sessions/planMode.js +73 -16
  84. package/dist/sdk/sessions/registry.d.ts +1 -1
  85. package/dist/sdk/sessions/registry.js +2 -2
  86. package/dist/sdk/sessions/runStore.d.ts +14 -0
  87. package/dist/sdk/sessions/runStore.js +35 -0
  88. package/dist/sdk/sessions/runner.d.ts +40 -2
  89. package/dist/sdk/sessions/runner.js +161 -13
  90. package/dist/sdk/sessions/sessions.d.ts +23 -3
  91. package/dist/sdk/sessions/sessions.js +202 -17
  92. package/dist/sdk/sessions/subagentService.d.ts +9 -0
  93. package/dist/sdk/sessions/subagentService.js +63 -4
  94. package/dist/sdk/sessions/workSlice.d.ts +103 -0
  95. package/dist/sdk/sessions/workSlice.js +297 -0
  96. package/dist/sdk/sessions/workspaceBoundary.d.ts +15 -0
  97. package/dist/sdk/sessions/workspaceBoundary.js +46 -0
  98. package/dist/sdk/terminal/browserControl.js +2 -1
  99. package/dist/sdk/terminal/controller.d.ts +11 -3
  100. package/dist/sdk/terminal/controller.js +40 -13
  101. package/dist/sdk/terminal/opentui/theme.d.ts +43 -0
  102. package/dist/sdk/terminal/opentui/theme.js +87 -0
  103. package/dist/sdk/terminal/piExtension.d.ts +6 -1
  104. package/dist/sdk/terminal/piExtension.js +154 -54
  105. package/dist/sdk/terminal/standalone.d.ts +7 -0
  106. package/dist/sdk/terminal/standalone.js +72 -13
  107. package/dist/sdk/terminal/subagentMonitor.d.ts +11 -2
  108. package/dist/sdk/terminal/subagentMonitor.js +32 -1
  109. package/dist/sdk/terminal/terminals.d.ts +19 -2
  110. package/dist/sdk/terminal/terminals.js +245 -35
  111. package/dist/sdk/terminal/tui/annotateCommand.d.ts +1 -1
  112. package/dist/sdk/terminal/tui/annotateCommand.js +3 -3
  113. package/dist/sdk/terminal/tui/commandPages.d.ts +3 -1
  114. package/dist/sdk/terminal/tui/commandPages.js +3 -0
  115. package/dist/sdk/terminal/tui/commands.d.ts +2 -0
  116. package/dist/sdk/terminal/tui/commands.js +205 -124
  117. package/dist/sdk/terminal/tui/list.d.ts +14 -1
  118. package/dist/sdk/terminal/tui/list.js +96 -14
  119. package/dist/sdk/terminal/tui/pageOverlay.js +13 -4
  120. package/dist/sdk/terminal/tui/pages/annotatePage.d.ts +1 -1
  121. package/dist/sdk/terminal/tui/pages/notesPage.d.ts +5 -5
  122. package/dist/sdk/terminal/tui/pages/notesPage.js +18 -18
  123. package/dist/sdk/terminal/tui/pages/pluginsPage.d.ts +0 -5
  124. package/dist/sdk/terminal/tui/pages/pluginsPage.js +9 -3
  125. package/dist/sdk/terminal/tui/pages/subagentsPage.d.ts +1 -0
  126. package/dist/sdk/terminal/tui/pages/subagentsPage.js +98 -16
  127. package/dist/sdk/terminal/tui/pages/usagePage.d.ts +43 -0
  128. package/dist/sdk/terminal/tui/pages/usagePage.js +370 -0
  129. package/dist/sdk/terminal/tui/piAdapter.d.ts +1 -2
  130. package/dist/sdk/terminal/tui/piAdapter.js +3 -5
  131. package/dist/sdk/terminal/tui/pluginCommands.d.ts +2 -0
  132. package/dist/sdk/terminal/tui/pluginCommands.js +13 -9
  133. package/dist/sdk/terminal/tui/runtime.js +23 -3
  134. package/dist/sdk/terminal/tui/sessionPicker.d.ts +40 -0
  135. package/dist/sdk/terminal/tui/sessionPicker.js +141 -0
  136. package/dist/sdk/tools/checklist.js +1 -0
  137. package/dist/sdk/tools/checkpoint.d.ts +27 -0
  138. package/dist/sdk/tools/checkpoint.js +154 -0
  139. package/dist/sdk/tools/getCapabilities.d.ts +31 -0
  140. package/dist/sdk/tools/getCapabilities.js +34 -0
  141. package/dist/sdk/tools/spawnSubagent.js +4 -3
  142. package/dist/sdk/usage/analytics.d.ts +20 -0
  143. package/dist/sdk/usage/analytics.js +151 -0
  144. package/dist/sdk/usage/ledger.d.ts +38 -0
  145. package/dist/sdk/usage/ledger.js +142 -0
  146. package/dist/sdk/usage/limits/adapters.d.ts +11 -0
  147. package/dist/sdk/usage/limits/adapters.js +349 -0
  148. package/dist/sdk/usage/limits/capture.d.ts +8 -0
  149. package/dist/sdk/usage/limits/capture.js +47 -0
  150. package/dist/sdk/usage/limits/http.d.ts +12 -0
  151. package/dist/sdk/usage/limits/http.js +51 -0
  152. package/dist/sdk/usage/limits/normalize.d.ts +15 -0
  153. package/dist/sdk/usage/limits/normalize.js +211 -0
  154. package/dist/sdk/usage/limits/service.d.ts +30 -0
  155. package/dist/sdk/usage/limits/service.js +176 -0
  156. package/dist/sdk/usage/limits/types.d.ts +65 -0
  157. package/dist/sdk/usage/limits/types.js +1 -0
  158. package/dist/sdk/usage/serverMethods.d.ts +3 -0
  159. package/dist/sdk/usage/serverMethods.js +22 -0
  160. package/dist/sdk/usage/service.d.ts +32 -0
  161. package/dist/sdk/usage/service.js +66 -0
  162. package/dist/sdk/usage/settings.d.ts +7 -0
  163. package/dist/sdk/usage/settings.js +28 -0
  164. package/dist/sdk/usage/types.d.ts +60 -0
  165. package/dist/sdk/usage/types.js +4 -0
  166. package/dist/terminal-opentui.js +5207 -1883
  167. package/dist/terminal-pi.js +1658 -271
  168. package/docs/architecture/02-sessions-and-runs.md +128 -26
  169. package/docs/architecture/04-prompt.md +50 -12
  170. package/docs/architecture/06-plugins-and-capabilities.md +24 -7
  171. package/docs/architecture/07-tools-and-gate.md +104 -24
  172. package/docs/architecture/08-memory-and-history.md +4 -2
  173. package/docs/architecture/09-accounts-and-connectors.md +31 -1
  174. package/docs/architecture/10-server-protocol.md +58 -3
  175. package/docs/architecture/11-terminal.md +105 -42
  176. package/docs/architecture/12-storage.md +30 -2
  177. package/docs/architecture/13-world-tools.md +22 -1
  178. package/docs/architecture/14-surfaces-and-parity.md +54 -7
  179. package/docs/architecture/README.md +3 -1
  180. package/docs/architecture/proposals/PROP-0017-page-annotations.md +6 -2
  181. package/docs/architecture/proposals/PROP-0018-annotation-queue-and-app-targets.md +1 -1
  182. package/docs/architecture/proposals/PROP-0031-plugin-command-owner-namespaces.md +54 -0
  183. package/docs/architecture/proposals/PROP-0032-planning-quality.md +196 -0
  184. package/docs/architecture/proposals/PROP-0033-compaction-plan-checkpoints.md +75 -0
  185. package/docs/architecture/proposals/PROP-0034-conversation-fast-mode.md +120 -0
  186. package/docs/architecture/proposals/PROP-0035-retain-subagent-status.md +47 -0
  187. package/docs/architecture/proposals/PROP-0036-first-class-harness-commands.md +59 -0
  188. package/docs/architecture/proposals/PROP-0037-workspace-write-boundary.md +63 -0
  189. package/docs/architecture/proposals/PROP-0038-annotate-open-shadow-roots.md +73 -0
  190. package/docs/architecture/proposals/PROP-0039-workspace-boundary-hardening.md +139 -0
  191. package/docs/architecture/proposals/PROP-0040-one-launch-path.md +87 -0
  192. package/docs/architecture/proposals/PROP-0041-bounded-work-slices.md +247 -0
  193. package/docs/architecture/proposals/PROP-0042-usage-and-provider-limits.md +127 -0
  194. package/docs/architecture/proposals/PROP-0043-read-only-plan-bash.md +74 -0
  195. package/docs/architecture/proposals/README.md +14 -0
  196. package/docs/decisions/ADR-0001-owned-terminal.md +1 -1
  197. package/docs/decisions/ADR-0021-required-command-namespaces.md +1 -1
  198. package/docs/decisions/ADR-0031-plugin-command-owner-namespaces.md +37 -0
  199. package/docs/decisions/ADR-0032-compaction-run-checkpoints.md +33 -0
  200. package/docs/decisions/ADR-0033-plan-mode-research-delegation.md +47 -0
  201. package/docs/decisions/ADR-0034-first-class-harness-terminal-commands.md +25 -0
  202. package/docs/decisions/ADR-0035-one-launch-path.md +40 -0
  203. package/docs/decisions/ADR-0036-workspace-write-operation-boundary.md +54 -0
  204. package/docs/decisions/ADR-0037-usage-ledger-and-provider-limits.md +44 -0
  205. package/docs/decisions/ADR-0038-plan-bash-os-read-only.md +29 -0
  206. package/docs/experiments/EXP-0003-performance-audit/data/session-runtime-replication.json +420 -0
  207. package/docs/experiments/EXP-0003-performance-audit/data/session-runtime.json +420 -0
  208. package/docs/experiments/EXP-0003-performance-audit/data/terminal-compact.json +376 -0
  209. package/docs/experiments/EXP-0003-performance-audit/data/terminal-history.json +422 -0
  210. package/docs/experiments/EXP-0003-performance-audit/data/terminal-question.json +95 -0
  211. package/docs/experiments/EXP-0003-performance-audit/data/terminal-wide.json +1036 -0
  212. package/docs/experiments/EXP-0003-performance-audit/plan.md +109 -0
  213. package/docs/experiments/EXP-0003-performance-audit/results.md +151 -0
  214. package/docs/handoff-2026-10-25-app-parity-and-solo-tabs.md +202 -0
  215. package/docs/parity.md +80 -24
  216. package/docs/releases/1.1.1.md +28 -0
  217. package/docs/releases/1.2.0.md +49 -0
  218. package/docs/releases/4.0.0.md +10 -9
  219. package/docs/releases/README.md +35 -30
  220. package/docs/study/00-index.md +3 -0
  221. package/docs/study/STUDY-0003-long-horizon-runs.md +210 -0
  222. package/docs/terminal-tui.md +100 -59
  223. package/package.json +4 -3
@@ -1,6 +1,6 @@
1
1
  # Harness terminal frontend
2
2
 
3
- Status: release candidate `@xingular/harness` 4.0.0; npm publication blocked by registry authorization. Last updated: 2026-10-24.
3
+ Status: current terminal behavior, checked against `@xingular/harness` 1.2.0. Last updated: 2026-11-19.
4
4
  Decision: [ADR-0001](decisions/ADR-0001-owned-terminal.md),
5
5
  [ADR-0006](decisions/ADR-0006-opentui-only-terminal.md),
6
6
  [ADR-0009](decisions/ADR-0009-xharness-command.md),
@@ -29,12 +29,19 @@ overrides the Bun executable.
29
29
  `TerminalRuntime`, session replacement, commands, decisions, account pinning and run records. It
30
30
  projects the runtime's snapshot and transcript into an OpenCode-inspired view, with a native
31
31
  OpenTUI textarea for the prompt, `Ctrl+K` for the command palette, `Return` to send (or to queue behind a running reply),
32
- `Cmd+Return` (or `Alt+Return`) to steer a running reply, and `Shift+Return` for a newline. With an
33
- empty composer, unmodified Up recalls the latest non-empty user message from the active session.
34
- After recall, unmodified Up/Down are available for normal editor movement and do not browse history
35
- while the draft is non-empty. Ctrl+Up/Down remain explicit history shortcuts; Down past the newest
36
- entry restores a blank draft. History comes from the active Pi session's saved messages, so `/new`
37
- and `/session` (also `/resume`) switch to that session's history. Steering needs a terminal that reports Cmd with the
32
+ `Cmd+Return` (or `Alt+Return`) to steer a running reply, and `Shift+Return` for a newline. Typing `/` or `$` filters
33
+ matching commands or skills; `Tab` inserts the selected entry and leaves the cursor at the end of the inserted text.
34
+ With an empty composer, unmodified Up recalls the latest non-empty user message from the active session.
35
+ With a draft, unmodified Up browses older history and Down browses newer history when the caret is at
36
+ either absolute draft endpoint (start or end). Down past the newest entry restores the draft, cursor
37
+ and attachments that were present when history browsing began. At non-endpoint positions, Up on the
38
+ first visual line moves the cursor to the first character and Down on the last visual line moves it
39
+ to the final character; elsewhere, Up/Down move the caret normally. Ctrl+Up/Down remain explicit
40
+ history shortcuts from anywhere. History includes
41
+ user messages and Bash commands from the active Pi session; recalled Bash commands return to `!`
42
+ mode. Executed slash commands from this terminal instance are included too, across session switches.
43
+ `/new` and `/session` (also `/resume`) switch the saved-message and Bash history to that session.
44
+ Steering needs a terminal that reports Cmd with the
38
45
  kitty keyboard protocol; elsewhere `Alt+Return` steers. In the composer, `Tab` opens up to eight matching filesystem entries for the path token at the cursor, or current-folder entries when the token is empty. The list has no heading or hint row. Up/Down select; Enter or Tab inserts the selection; Escape closes the list. Directories end in `/`, and Bash mode escapes shell-special characters. Use `/effort` or Shift+Up/Down to change effort. The command palette opens above the composer under a muted (`dim`) top rule, and has no other border. Its rows align slash commands and descriptions in two columns: the command column sizes to the widest visible name, bounded to preserve description space, and both columns wrap instead of truncating. The plan-choice rule, question block's top-only divider, and `/btw` block's top rule use the same muted color as the normal composer divider. The console has no background of its own: the renderer, root surface
39
46
  and transcript are transparent, so the terminal's own background shows through, while panels,
40
47
  dialogs and the scrim stay opaque. The composer has no panel background: it is bounded by a top and
@@ -63,7 +70,9 @@ colour. A full-screen scrim dims the console behind the panel so the transcript
63
70
  visible. Centered Harness dialogs fit their rendered content, capped by the available dialog
64
71
  height, with four columns of horizontal padding and two rows of vertical padding to account for
65
72
  the terminal's taller-than-wide cells. They use a plain title with a muted `Esc` hint and
66
- omit divider rules and footer hints. Shortcut behavior remains available. Searchable lists share
73
+ omit divider rules and footer hints. Shortcut behavior remains available. Bracketed paste and the
74
+ clipboard-paste shortcut insert text into the active dialog input or search field, using that
75
+ component's input semantics; images and file attachments remain composer-only. Searchable lists share
67
76
  the same glyph, placeholder, spacing, and muted result note, with search context included on that
68
77
  row. A terminal too small for a 30-column by
69
78
  12-row dialog falls back to the full-screen page chrome. A plugin's full-screen surface stays full
@@ -86,8 +95,9 @@ welcome, product label, accent colors and `/help` transition. Run
86
95
  `python3 scripts/verify-terminal.py --composer-only` for recognized slash-command colors in the composer
87
96
  and a user bubble, unknown-command and argument colors, explicit-newline and soft-wrap checks of both
88
97
  prompt gutters, and normal/plan/Bash mode exclusivity. Run it with `--sizes 40x20,80x24,120x40` for
89
- compact through wide layouts. Use `--file-completion-only` for filesystem completion and insertion,
90
- `--history-only` for active-session history across `/new` and `/session`, `--help-only` for `/help` replacing the welcome screen with grouped two-column output that wraps without per-command gaps, `--questions-only` for recommended choices,
98
+ compact through wide layouts. Use `--dialog-paste-only` to verify bracketed paste into a centered
99
+ input dialog, `--file-completion-only` for filesystem completion and insertion,
100
+ `--history-only` for active-session history across `/new` and `/session`, `--resume-only` for the full-screen searchable, unnumbered two-line saved-session picker, `--help-only` for `/help` replacing the welcome screen with grouped two-column output that wraps without per-command gaps, `--questions-only` for multi-select marker glyphs, recommended choices,
91
101
  selected-row and Continue/Submit colors, `--jump-latest-only` for scroll-away badge visibility and click-to-latest (screen-level click assertions use optional `pyte`), and choice-backed “Something else” answers, or `--thinking-only` for `/thinking` visibility toggles. The full suite covers a complete turn, `read`, `bash` approval, `ask_user_question` approval and picker, plugin overlay/widget/status
92
102
  disposal, a completed run record with usage and decision events, `/help`, `/permissions`,
93
103
  `/settings`, `/model`, palette selection, confirm cancel, and Ctrl+D exit. `--questions-only` checks
@@ -109,16 +119,21 @@ The terminal joins outstanding children before its final reply, projects child a
109
119
  with their original run IDs, and stops descendants when interrupted or disposed. Connected apps
110
120
  need not be enabled. `TerminalPrepareInput.subagents: null` disables the capability.
111
121
 
112
- The terminal also projects the active parent's subagent descendants into live rows under the
113
- status line and a searchable `/subagents` page. The rows poll a private monitor route once per
114
- second during a turn. They sit one blank row below the status line, with no heading, and each
115
- reads: the status mark, the agent profile name in its colour (`subagent` for a copy of the
116
- parent), the title the parent gave the child (PROP-0030), and `n of m tasks` from the child's own
117
- checklist. At most three show, active first, then `+N more · /subagents`. The `/subagents` page
118
- adds status, elapsed time and the latest tool name. The projection is read-only, flat across nested
119
- descendants, and scoped to the current parent run; it keeps finished child rows until that parent
120
- settles. It never includes tool arguments (beyond the title), output or
121
- checklist item text.
122
+ The terminal also projects the latest parent's subagent descendants into rows under the status line
123
+ and a searchable `/subagents` page. The rows poll a private monitor route once per second
124
+ during a turn and make a final read at settlement. They sit one blank row below the status line, with
125
+ no heading, and each reads: the status mark, the agent profile name in its colour (`subagent` for a
126
+ copy of the parent), the title the parent gave the child (PROP-0030), and `n of m tasks` from the
127
+ child's own checklist. At most three show, active first, then `+N more · /subagents`. The
128
+ `/subagents` page uses a colored profile and normal-color title on the first line, then muted account,
129
+ effective model, effort and cumulative usage metadata on the second. One blank row separates each
130
+ two-line entry. The page also shows status, elapsed time and the latest tool name. Runtime metadata
131
+ stays in the private terminal projection.
132
+ Usage contains safe token/cache/cost/context totals, not per-request payloads or reasoning summaries.
133
+ The projection is read-only, flat across nested descendants, and scoped to the latest parent run in
134
+ this terminal session; finished rows remain visible until the next parent run starts. It is cleared
135
+ on session replacement or terminal disposal. It never includes tool arguments (beyond the title),
136
+ output or checklist item text.
122
137
 
123
138
  `/agents` opens the Agents page (PROP-0029): built-in, global, project and variant profiles with
124
139
  their tools, plugins, variant, model and instructions. Enter on a row edits a person's own profile
@@ -136,7 +151,7 @@ Harness owns its interactive terminal application in
136
151
  [`src/terminal/opentui/`](../src/terminal/opentui/). [`app.ts`](../src/terminal/opentui/app.ts)
137
152
  owns terminal lifecycle, submission, commands, decisions and run records;
138
153
  [`root.tsx`](../src/terminal/opentui/root.tsx) owns composition, the transcript, the composer,
139
- palette and dialogs. It does not construct Pi's `InteractiveMode`. Pi 1.2.0 supplies the
154
+ palette and dialogs. It does not construct Pi's `InteractiveMode`. Pi 1.4.0 supplies the
140
155
  persistent agent session, model and auth runtime, native JSONL history, tool execution and rich
141
156
  content components.
142
157
 
@@ -199,8 +214,10 @@ before the compaction (rebuilt from Pi's session history, kept messages included
199
214
  rule; then the work that followed. The summary is shown by default. Clicking either rule hides or
200
215
  shows it, and Ctrl+O shows every summary again. On a narrow screen the rule drops the click hint, then
201
216
  the token count. Earlier compactions in the same session keep their own rules and summary in place.
202
- Notices stay after the message they followed. The model still sees only the summary and the recent
203
- messages; this is presentation only.
217
+ Notices stay after the message they followed. The model sees the summary and recent messages plus a
218
+ bounded, hidden checkpoint of the active request, checklist and plan instructions when available;
219
+ the checkpoint is regenerated for each post-compaction request until the run settles. The visible
220
+ transcript remains a presentation of the full history, not the model context.
204
221
  Transcript entry ids follow positions in the displayed message list, so when a rebuilt list moves a
205
222
  different kind of entry onto an id, the renderer builds a new component for it instead of reusing the
206
223
  old layout, and each entry draws inside its own error boundary. A run therefore keeps updating live
@@ -255,9 +272,11 @@ display their alt text and are not fetched or rendered as image files.
255
272
 
256
273
  `checklist_write` is registered in terminal sessions (PAR-001). Each call renders in the
257
274
  transcript as a checklist block: a status mark, `Checklist · n of m done`, then one line per item
258
- with `✓` (done, success colour), `●` (in progress, warning yellow, bold) or `○` (pending, dim). A call whose
259
- arguments are not a checklist, or that failed, stays an ordinary tool row. The prompt's Progress
260
- group asks the model to keep the list current because the user follows work from it.
275
+ with `✓` (done, success colour), `●` (in progress, warning yellow, bold) or `○` (pending, dim).
276
+ Each row reserves a one-cell status column and one-cell gap; item text and wrapped lines share the
277
+ same starting column. A call whose arguments are not a checklist, or that failed, stays an ordinary
278
+ tool row. The prompt's Progress group asks the model to keep the list current and write a final
279
+ update before replying; unfinished work remains unfinished rather than being marked complete.
261
280
 
262
281
  ## Blocks and pages
263
282
 
@@ -342,7 +361,7 @@ skill import rejects symbolic links and limits bytes, files and traversal. See
342
361
 
343
362
  ## Annotate pane (PROP-0018)
344
363
 
345
- `/plugin:annotate` opens a full-screen page that works beside the window being inspected. That window is one of:
364
+ `/annotate:` opens the full-screen capture pane (equivalent to `/annotate:annotate`) beside the window being inspected. Add a page address with `/annotate:annotate [url]`. The target window is one of:
346
365
  - the visible capture browser
347
366
  - an app's own windows attached over its DevTools port (`--app`)
348
367
  - app windows that loaded the page bridge script (`--bridge`)
@@ -357,7 +376,7 @@ The header shows the target and window and whether the inspector is on. The list
357
376
  | `t` | choose a window |
358
377
  | `Enter` | the note menu |
359
378
 
360
- The page has no search row, so these letters are free for actions. `/plugin:notes` keeps the searchable list.
379
+ The page has no search row, so these letters are free for actions. `/annotate:notes` opens the searchable Web annotations list.
361
380
 
362
381
  ## Plan mode and thinking keys
363
382
 
@@ -365,12 +384,16 @@ Use `/plan <brief>` for one read-only planning request. A plan waits outside Pi'
365
384
  queue until the active response settles, then runs by itself. Later messages remain behind it, even
366
385
  when Pi's follow-up mode is `all`. During that run the session narrows to read-only inspection
367
386
  (`read`, `grep`, `find`, `ls`), web search/page reading, questions (`ask_user`, `ask_user_question`)
368
- and recall (history and Wiki reads, `memory_facts`). Normal mode omits both question tools from the
369
- active set; the plan request enables registered questions temporarily and restores the normal set
370
- when it settles, including on failure or interruption. Providers may mark individual calls as safe for
371
- research; every other call is blocked before approval. Edits, writes, shell commands, memory writes,
372
- subagents and connected-app tools remain unavailable. The plan instructions arrive as a
373
- request-scoped prompt section, which the next ordinary request withdraws.
387
+ and recall (history and Wiki reads, `memory_facts`). It may also delegate bounded research to a
388
+ named profile whose effective tool and plugin allowlists qualify for research; the child inherits
389
+ plan mode and receives only the intersection of the parent's frozen capabilities, profile and
390
+ plan-research set. Children cannot write, run commands, ask the user, use connectors or spawn more
391
+ children. Normal mode omits both question tools from the active set; the plan request enables
392
+ registered questions and research delegation temporarily and restores the normal set when it settles,
393
+ including on failure or interruption. Providers may mark individual calls as safe for research; every
394
+ other call is blocked before approval. Edits, writes, shell commands, memory writes and connected-app
395
+ tools remain unavailable to the parent and child. The plan instructions arrive as a request-scoped
396
+ prompt section, which the next ordinary request withdraws.
374
397
 
375
398
  Each mode keeps its own model and effort for the account. Every selection the person makes (the model
376
399
  picker, `/effort`, Shift+Up/Down, Ctrl+P) is saved against the mode it was made in, so Shift+Tab switches to that
@@ -382,7 +405,7 @@ and the App reads and writes them through `accounts.choices` and `accounts.choos
382
405
  A bare `/plan` toggles plan mode, and Shift+Tab cycles between normal and plan mode. Normal, plan
383
406
  and Bash are mutually exclusive composer modes. While plan mode is on, each submitted message is sent
384
407
  as a plan request through that same queue, and the composer's top and bottom rules take the plan colour.
385
- Commands still run as commands. Entering Bash with a leading `!` exits plan mode; Shift+Tab from Bash
408
+ Commands still run as commands. The model may run Bash during a plan request, only in the read-only sandbox scope (PROP-0043); your own `!` commands are not part of the plan. Entering Bash with a leading `!` exits plan mode; Shift+Tab from Bash
386
409
  switches to plan mode and keeps the draft text. Turning plan mode off returns to normal mode. The old
387
410
  on/off/toggle forms are rejected; a bare `/plan` is the switch.
388
411
 
@@ -417,13 +440,17 @@ the marker and rules blue; in the normal prompt, the marker matches the divider
417
440
  an empty Bash body returns to the normal prompt. Submitting while a reply is active queues
418
441
  the command as a standalone turn; it does not steer the current model request.
419
442
 
420
- The terminal extension checks Bash policy and requests approval before using Pi's native
421
- `executeBash`. Output streams into the transcript while the command runs, so browser-login URLs are
422
- visible before the command finishes; the running item shows that Escape stops the command. The
423
- native result is recorded in run activity and session history before the model is prompted to read
424
- and explain it. This does not attach interactive stdin to the shell. SDK callers may opt into this
425
- behavior with `SessionRunInput.initialBashCommand`; it is restricted to a new interactive user turn
426
- and the session runner applies the same Bash gate.
443
+ The terminal checks Bash policy before using Pi's native `executeBash`. Ordinary `!command` runs
444
+ workspace-scoped; `!outside <command>` explicitly requests human-only approval before the command
445
+ runs once with broader filesystem access. The complete command is shown as escaped, scrollable
446
+ approval details; if the terminal is too small to show both details and choices, the request is
447
+ denied. Shell output never triggers approval or replay. Output streams into the transcript while the
448
+ command runs, so browser-login URLs are visible before the
449
+ command finishes; the running item shows that Escape stops the command. The native result is
450
+ recorded in run activity and session history before the model is prompted to read and explain it.
451
+ This does not attach interactive stdin to the shell. SDK callers may opt into this behavior with
452
+ `SessionRunInput.initialBashCommand`; it is restricted to a new interactive user turn and the
453
+ session runner applies the same Bash gate and explicit outside-scope request.
427
454
 
428
455
  ## Reference and reproduced presentation
429
456
 
@@ -467,7 +494,7 @@ Full upstream copyright and MIT permission notices are in [NOTICE.md](../NOTICE.
467
494
  ## Runtime compatibility adapter
468
495
 
469
496
  Most integration uses public Pi exports. [`piAdapter.ts`](../src/terminal/tui/piAdapter.ts)
470
- contains the remaining presentation dependencies and requires exactly Pi **1.2.0** before
497
+ contains the remaining presentation dependencies and requires exactly Pi **1.4.0** before
471
498
  loading them. The shared [`runtime.ts`](../src/pi/runtime.ts) loader imports Pi first, then invokes
472
499
  the same HTTP dispatcher hook as Pi's CLI before any Harness Pi runtime is used. This reapplies
473
500
  the process `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` settings after Pi's bundled Undici has
@@ -477,7 +504,7 @@ concurrent initialization.
477
504
 
478
505
  | Internal dependency | Reason |
479
506
  |---|---|
480
- | `dist/bundle/chunks/chunk-TJXZSVTD.js:configureHttpDispatcher` | Restore Pi's environment-aware HTTP proxy dispatcher after the SDK import |
507
+ | `dist/bundle/chunks/chunk-MM3LKT73.js:configureHttpDispatcher` | Restore Pi's environment-aware HTTP proxy dispatcher after the SDK import |
481
508
  | `dist/extensions/index.js` builtin inventory | Preserve selected `llama.cpp`, `codemode`, `tool-search` and MCP builtins with the CLI's replacement semantics |
482
509
  | `dist/modes/interactive/theme/theme.js:setThemeInstance` | Keep public native rich components on the same active theme as the Harness screen |
483
510
  | `dist/core/tools/renderers/index.js:withBuiltInRenderers` | Preserve existing read/edit/bash/write formatting without replacing tool execution |
@@ -584,13 +611,16 @@ The bridge registers the shared `ask_user` batch tool alongside the single-quest
584
611
  `ask_user_question` contract; only plan requests activate them. Each question has a concise 1–2 word
585
612
  label, at least one choice, and at least one recommended choice; recommendations remain visual and
586
613
  never preselect. Choice-based questions also retain a free-text “Something else” answer. A pending
587
- question appears in a flat block immediately above the composer, not in a modal. It has only a muted
588
- top divider and separates its hint from the content by one blank line; below 60 terminal columns,
589
- it uses a compact hint. The body is height-bounded and vertically scrollable, with tabs and
590
- answer/action controls outside that region. While the dock is active, PageUp/PageDown scroll its
591
- body and Ctrl+Home/End jump to its beginning/end instead of the transcript. Focused choices and
592
- note fields are brought into view. A tab strip shows each
593
- question label above the active question title, with one blank row below the tabs and below the title;
614
+ question occupies the composer position in a flat block, not a modal, with the chat transcript
615
+ above it. The dock fits its content and grows to at most two-thirds of the terminal height; each
616
+ question tab is sized from its own content. When content overflows, its body scrolls while tabs and
617
+ answer/action controls stay outside that region.
618
+ The final choice sits one blank row above “Something else”. The block has only a muted top divider
619
+ and separates its hint from the content by one blank line; below 60 terminal columns, it uses a
620
+ compact hint. While the dock is active, PageUp/PageDown scroll its body and Ctrl+Home/End jump to
621
+ its beginning/end instead of the transcript. Focused choices and note fields are brought into view.
622
+ A tab strip shows each question label above the active question title, with one blank row below the tabs
623
+ and below the title;
594
624
  clicking a tab or using Left/Right changes questions without discarding staged answers. The header has
595
625
  no pager controls, and the block cannot be collapsed. Choices and descriptions appear above the numbered free-text answer and Continue or Skip
596
626
  action. Selected choices fill the whole row with subtle dark green; Continue and Submit uses a
@@ -614,6 +644,8 @@ The dock uses one shared measured layout for all choices: marker gutter, one-thi
614
644
  two-cell gap, and remaining description cell. Boundaries align across rows at every width, including
615
645
  compact terminals; both cells wrap independently, missing descriptions keep their cell, and columns
616
646
  never stack. Recommendation text becomes `(Rec.)` when the label column is fewer than 14 cells.
647
+ Multi-select choices use `✓` when selected and `○` when unselected, matching checklist glyphs;
648
+ single-choice options remain numbered.
617
649
 
618
650
  One shared border-only monospace preview below the choices follows the hovered choice, falling
619
651
  back to keyboard focus. It has no visible caption or extra left rule. Under the approved
@@ -662,6 +694,11 @@ and prompts. `/session` selects a saved session (`/resume` remains an alias), an
662
694
  branches in the current session (`/tree` remains an alias). `/btw <question>` asks a side question;
663
695
  `/side` is its alias. Help and the slash-command palette show each pair once, as `/session (resume)`,
664
696
  `/history (tree)` and `/btw (side)`; aliases still match palette searches.
697
+ With no path argument, `/session` opens a full-screen searchable page. Each unnumbered row shows a
698
+ normal-color title and a muted second line with relative activity time, `<project>:<branch>` and JSONL
699
+ file size separated by ` · `. One blank line separates each session. Enter resumes the selected
700
+ session; account and folder scope checks
701
+ remain enforced. Supplying an explicit path continues directly without opening the picker.
665
702
  The separate `$` palette completes enabled skill invocations; `/skills` always browses skills. `/help`
666
703
  renders the command list as one transcript entry, grouped under Core, Run, Model, Session, Inspect,
667
704
  Harness, Plugins and Prompts; command names and descriptions wrap in aligned columns, with no
@@ -696,14 +733,18 @@ and URL queries and omits response bodies, prompts and message contents. Embedde
696
733
 
697
734
  ## Slash command ownership
698
735
 
699
- Core commands and commands owned by required built-in plugins stay unprefixed. The required
700
- plugin commands are `/subagents`, `/agents`, `/trajectory`, `/doctor`, and `/worktree`. Optional built-in
701
- plugin commands (currently `/plugin:notes` and `/plugin:annotate`) and Pi extension commands use
702
- `/plugin:<command>`. A bare core command, alias, required built-in command, or loaded prompt owns its
703
- name; a colliding prefixed command is omitted and rejected with a hint to use the bare command.
704
- Duplicate extension names are rejected with the extension paths shown in the diagnostic. Old
705
- `/plugin:` forms of required built-in commands are not aliases. Prompt templates and
706
- `/skill:<name>` keep their existing forms.
736
+ Harness core commands are unprefixed and live in the core terminal command registry, independently
737
+ of feature-plugin command metadata: `/doctor`, `/worktree`, `/trajectory`, `/subagents`, and `/agents`.
738
+ `/history` (also `/tree`) continues to navigate session branches. `/mcp` and `/connections` open the
739
+ Connections browser. Feature descriptors and their services remain registered; only these terminal
740
+ routes move out of the plugin command registry. Other plugin-owned commands continue to use
741
+ `/<owner-prefix>:<command>`. The annotations plugin uses `/annotate:annotate` and `/annotate:notes`;
742
+ `/annotate:` opens its default capture pane. Pi package extensions use their normalized package name
743
+ as owner prefix unless `harness.commandPrefix` overrides it; loose extensions use their normalized
744
+ extension name. A plugin prefix collision or a duplicate command within one owner is rejected with
745
+ owner paths in the diagnostic. The former owner-qualified and `/plugin:<command>` routes of promoted
746
+ Harness commands remain hidden compatibility aliases for one release, omitted from help and
747
+ completion. Prompt templates and `/skill:<name>` keep their existing forms.
707
748
 
708
749
  ## Input performance profile
709
750
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingular/harness",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "description": "Xingular Harness — a Pi agent harness built on recursive harnessing (Harness²): versioned eight-component variants, refinement from evidence, multi-account sessions, a compiled prompt, project notes, tools, and MCP",
6
6
  "repository": {
@@ -35,6 +35,7 @@
35
35
  "test": "vitest run",
36
36
  "profile:terminal-input": "node scripts/profile-terminal-input.mjs",
37
37
  "profile:terminal-latency": "python3 scripts/profile-terminal-latency.py",
38
+ "profile:session-runtime": "node scripts/profile-session-runtime.mjs",
38
39
  "prove": "npm run build && node scripts/prove-standalone.mjs",
39
40
  "build:sdk": "node scripts/build-sdk.mjs",
40
41
  "release:pack": "node scripts/release-pack.mjs",
@@ -42,8 +43,8 @@
42
43
  "release:preflight": "node scripts/release-preflight.mjs"
43
44
  },
44
45
  "dependencies": {
45
- "@earendil-works/pi-coding-agent": "1.2.0",
46
- "@earendil-works/pi-tui": "1.2.0",
46
+ "@earendil-works/pi-coding-agent": "1.4.0",
47
+ "@earendil-works/pi-tui": "1.4.0",
47
48
  "@modelcontextprotocol/client": "^2.2.0",
48
49
  "@modelcontextprotocol/server": "^2.2.0",
49
50
  "@opentui/core": "^0.6.6",