@volter/supercode-teams 0.3.109 → 0.3.111

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/codex-startup.mjs CHANGED
@@ -137,6 +137,10 @@ export async function settleCodexHookReview(host, sessionId, { signal, deadlineM
137
137
  * into one composer entry. */
138
138
  export const CODEX_WINDOWS_PASTE_CHARS = 8000;
139
139
 
140
+ /** The most written characters one Windows Codex paste is given, line breaks pulled in included: below the measured
141
+ * edge (8180 characters inside the 12 paste-marker characters arrived, 8200 did not), with room to spare. */
142
+ const CODEX_WINDOWS_PASTE_MAX = 8100;
143
+
140
144
  /** One character as a Windows Codex reads it from its console. Codex drops some BMP characters that arrive as plain
141
145
  * text through ConPTY (measured: `—`, `…`, `✓` vanish while `é`, `日`, and astral `🙂` arrive), so every BMP
142
146
  * character past ASCII goes as a win32-input-mode key event carrying its UTF-16 unit (VK_PACKET, 231), which ConPTY
@@ -165,10 +169,11 @@ export function codexWindowsPastes(text) {
165
169
  end += 1;
166
170
  }
167
171
  // Cut after the piece's last line break when the text goes on; else keep any line breaks that follow the cut
168
- // with this piece, so the next one does not open with one.
172
+ // with this piece, so the next one does not open with one — but never past CODEX_WINDOWS_PASTE_MAX, beyond which
173
+ // Codex drops the whole paste. Only a run of more blank lines than that margin still opens the next piece.
169
174
  if (end < encoded.length) {
170
175
  if (lastBreak >= start && lastBreak + 1 < end) end = lastBreak + 1;
171
- else while (end < encoded.length && encoded[end] === '\n') end += 1;
176
+ else while (end < encoded.length && encoded[end] === '\n' && written < CODEX_WINDOWS_PASTE_MAX) { written += 1; end += 1; }
172
177
  }
173
178
  pastes.push(`\u001b[200~${encoded.slice(start, end).join('')}\u001b[201~`);
174
179
  start = end;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-teams",
3
- "version": "0.3.109",
3
+ "version": "0.3.111",
4
4
  "type": "module",
5
5
  "description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
6
6
  "license": "MIT",