@volter/supercode-terminal 0.2.71 → 0.2.72

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.
package/CAPABILITIES.md CHANGED
@@ -23,7 +23,7 @@ means it must not be presented as supported.
23
23
  | Scrollback, selection and copy | UI/xterm | verified | Bounded scrollback and native xterm selection. |
24
24
  | Find in one terminal, next/previous match | UI | verified | Search covers the active xterm buffer. Cross-tab search is missing. |
25
25
  | URL detection | UI | partial | The stable xterm web-link provider is active; host policy and end-to-end link opening still need a dedicated proof. |
26
- | Exclusive input ownership | tmux/host | partial | `acquireInput`, `ownsInput` and `releaseInput` serialize a paste with other input and remain with the pane across a client restart. [Recorded tmux proof](../../docs/evidence/claude-input-2026-10-07.md#recorded-review-fixes) rejects a replacement while the badge is unrecorded, then confirms one native message after daemon restart. Older pane servers refuse this door; Windows ownership restart remains unmeasured. |
26
+ | Exclusive input ownership | tmux/host | partial | `acquireInput`, `ownsInput` and `releaseInput` serialize a paste with other input and remain with the pane across a client restart. [Recorded tmux proof](../../docs/evidence/claude-input-2026-10-07.md#recorded-review-fixes) rejects a replacement while the badge is unrecorded, then confirms one native message after daemon restart. `PaneServerHost.createSession` can require this ABI before creating a pane; [manual old/current server admission](../../docs/evidence/launch-input-ownership-admission-2026-10-09.md) is recorded on macOS. Older pane servers refuse this door; Windows ownership restart and admission remain unmeasured. |
27
27
  | Paste and bracketed paste | UI | verified | Multiline or large pastes require confirmation; history is memory-only. Advanced transforms and slow paste are missing. |
28
28
  | Save terminal contents | UI | partial | The normal buffer is projected to a bounded plain-text download; the browser download boundary and continuous logging still need dedicated proof. |
29
29
  | Bell and background activity | UI | verified | A controlled tmux shell proved active visual bell plus inactive activity/bell tab state. System notifications are host policy. |
package/README.md CHANGED
@@ -52,6 +52,13 @@ PTY host reads its own live catalog; an older pane server refuses this operation
52
52
  This is a host observation, not a physical window/tab reading or an existence
53
53
  lock against a subsequent launch.
54
54
 
55
+ `PaneServerHost.createSession({ ..., requireInputOwnership: true })` requires
56
+ the connected server's ownership operation before creating a pane. An older
57
+ server rejects with `input_ownership_unsupported` and starts no process; the
58
+ same connection handles admission and creation. Omitting the option preserves
59
+ ordinary creation. [Manual old/current server SDK readings](../../docs/evidence/launch-input-ownership-admission-2026-10-09.md)
60
+ do not qualify Windows or native harness first-message delivery.
61
+
55
62
  The substrate was moved from a retired package without behavioral changes.
56
63
  Its existing home paths, environment variables, and tmux ownership markers stay
57
64
  compatible. Those files retain Apache-2.0 licensing; see `NOTICE-SUBSTRATE` and
package/index.d.ts CHANGED
@@ -91,7 +91,8 @@ export class PaneServerHost {
91
91
  listSessions(): Promise<TerminalSession[]>;
92
92
  /** Requires a compatible pane server; an unsupported operation rejects. */
93
93
  hasLiveContext(contextKey: string): Promise<boolean>;
94
- createSession(input: { command: TmuxCommand; contextKey?: string; cwd?: string; env?: Record<string, string>; name?: string }): Promise<TerminalSession>;
94
+ /** Require the running pane server's ownership door before creating a pane. */
95
+ createSession(input: { command: TmuxCommand; contextKey?: string; cwd?: string; env?: Record<string, string>; name?: string; requireInputOwnership?: boolean }): Promise<TerminalSession>;
95
96
  capture(sessionId: string, options?: { lines?: number; preserveEscapes?: boolean }): Promise<string>;
96
97
  sendInput(sessionId: string, data: string, options?: { deadlineMs?: number; submitMode?: 'retry' | 'single' | 'none'; inputOwner?: string }): Promise<TerminalInputDelivery>;
97
98
  /** Exclusive input ownership, retained by the pane host across client restart. */
package/index.mjs CHANGED
@@ -1117,7 +1117,7 @@ export class PaneServerHost {
1117
1117
 
1118
1118
  listSessions() { return this.#request('listSessions', []); }
1119
1119
  hasLiveContext(contextKey) { assertContextKey(contextKey); return this.#request('hasLiveContext', [contextKey]); }
1120
- createSession(input) { return this.#request('createSession', [input]); }
1120
+ createSession(input) { return this.#request('createSession', [input], { requireInputOwnership: input.requireInputOwnership === true }); }
1121
1121
  capture(sessionId, options = {}) { return this.#request('capture', [sessionId, options]); }
1122
1122
  sendInput(sessionId, data, options = {}) { return this.#request('sendInput', [sessionId, data, options]); }
1123
1123
  acquireInput(sessionId, owner) { return this.#request('acquireInput', [sessionId, owner]); }
@@ -1175,12 +1175,27 @@ export class PaneServerHost {
1175
1175
  // A server that is leaving refuses a request unrun (`pane_server_restarting`): it is asked again of the next one.
1176
1176
  for (let attempt = 0; ; attempt += 1) {
1177
1177
  const connection = await this.#connect();
1178
- const id = this.#next++;
1179
1178
  try {
1180
- return await new Promise((resolve, reject) => {
1181
- this.#pending.set(id, { resolve, reject, connection });
1182
- connection.write(`${JSON.stringify({ id, op, args, ...extra })}\n`);
1183
- });
1179
+ if (op === 'createSession' && extra.requireInputOwnership) {
1180
+ // The installed client can be newer than the server that still holds
1181
+ // this machine's panes. Check its actual ownership door before any
1182
+ // process starts, on the same connection that will create the pane.
1183
+ // null cannot identify a PtyTerminalHost session: session_not_found
1184
+ // means the vendor's ownership operation ran without touching a pane.
1185
+ try {
1186
+ await this.#call(connection, 'ownsInput', [null, 'capability_check']);
1187
+ throw new TerminalHostError('input_ownership_unconfirmed', 'The pane server did not confirm its input ownership door; no pane was created.');
1188
+ } catch (error) {
1189
+ if (error?.code === 'unsupported') {
1190
+ throw new TerminalHostError('input_ownership_unsupported', 'The running pane server does not support input ownership required for this first message; no pane was created. Update the pane server through its owner before retrying.');
1191
+ }
1192
+ if (error?.code !== 'session_not_found') throw error;
1193
+ }
1194
+ if (connection.destroyed || this.#connection !== connection) {
1195
+ throw new TerminalHostError('pane_server_unreachable', 'The pane server connection changed during input ownership admission; no pane was created.');
1196
+ }
1197
+ }
1198
+ return await this.#call(connection, op, args, { ...extra, requireInputOwnership: undefined });
1184
1199
  } catch (error) {
1185
1200
  if (error?.code !== 'pane_server_restarting' || attempt >= 20) throw error;
1186
1201
  await sleep(250);
@@ -1188,6 +1203,15 @@ export class PaneServerHost {
1188
1203
  }
1189
1204
  }
1190
1205
 
1206
+ #call(connection, op, args, extra = {}) {
1207
+ const id = this.#next++;
1208
+ return new Promise((resolve, reject) => {
1209
+ this.#pending.set(id, { resolve, reject, connection });
1210
+ try { connection.write(`${JSON.stringify({ id, op, args, ...extra })}\n`); }
1211
+ catch (error) { this.#pending.delete(id); reject(error); }
1212
+ });
1213
+ }
1214
+
1191
1215
  #connect() {
1192
1216
  if (this.#connection && !this.#connection.destroyed) return Promise.resolve(this.#connection);
1193
1217
  return (this.#connecting ??= this.#open().finally(() => { this.#connecting = null; }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-terminal",
3
- "version": "0.2.71",
3
+ "version": "0.2.72",
4
4
  "type": "module",
5
5
  "description": "Optional leak-safe terminal and tmux host adapter for Volter Harness frontends",
6
6
  "exports": {