@volter/supercode-teams 0.3.109 → 0.3.110

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,9 @@ 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 a Windows Codex paste was measured to take whole (8180 arrived, 8200 did not). */
141
+ const CODEX_WINDOWS_PASTE_MAX = 8180;
142
+
140
143
  /** One character as a Windows Codex reads it from its console. Codex drops some BMP characters that arrive as plain
141
144
  * text through ConPTY (measured: `—`, `…`, `✓` vanish while `é`, `日`, and astral `🙂` arrive), so every BMP
142
145
  * character past ASCII goes as a win32-input-mode key event carrying its UTF-16 unit (VK_PACKET, 231), which ConPTY
@@ -165,10 +168,11 @@ export function codexWindowsPastes(text) {
165
168
  end += 1;
166
169
  }
167
170
  // 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.
171
+ // with this piece, so the next one does not open with one — but never past CODEX_WINDOWS_PASTE_MAX, beyond which
172
+ // Codex drops the whole paste. Only a run of more blank lines than that margin still opens the next piece.
169
173
  if (end < encoded.length) {
170
174
  if (lastBreak >= start && lastBreak + 1 < end) end = lastBreak + 1;
171
- else while (end < encoded.length && encoded[end] === '\n') end += 1;
175
+ else while (end < encoded.length && encoded[end] === '\n' && written < CODEX_WINDOWS_PASTE_MAX) { written += 1; end += 1; }
172
176
  }
173
177
  pastes.push(`\u001b[200~${encoded.slice(start, end).join('')}\u001b[201~`);
174
178
  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.110",
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",