@volter/supercode-teams 0.3.119 → 0.3.120

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/bin/workspace.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { StringDecoder } from 'node:string_decoder';
2
3
  import { hostname } from 'node:os';
3
4
  import { agentSessionHint } from './workspace/agent-session.mjs';
4
5
  import { fileURLToPath } from 'node:url';
@@ -1471,9 +1472,13 @@ if (import.meta.url === new URL(`file://${process.argv[1]}`).href) workspaceMain
1471
1472
  function stampStderr() {
1472
1473
  if (process.stderr.__stamped) return;
1473
1474
  const write = process.stderr.write.bind(process.stderr);
1475
+ // one decoder kept across writes: a character split between two Buffers is decoded whole
1476
+ const decoder = new StringDecoder('utf8');
1474
1477
  let atStart = true;
1475
1478
  process.stderr.write = (chunk, ...rest) => {
1476
- const text = typeof chunk === 'string' ? chunk : Buffer.from(chunk).toString('utf8');
1479
+ const text = typeof chunk === 'string' ? chunk : decoder.write(Buffer.from(chunk));
1480
+ // an empty write (or a Buffer holding only part of a character) changes no line
1481
+ if (!text) return write(text, ...rest);
1477
1482
  const stamp = new Date().toISOString();
1478
1483
  const stamped = text.replace(/(^|\n)(?=[^\n])/g, (match, newline, offset) => (offset === 0 && !atStart ? match : `${newline}${stamp} `));
1479
1484
  atStart = text.endsWith('\n');
package/machine.mjs CHANGED
@@ -2592,6 +2592,8 @@ export class TeamsMachine extends MachineCore {
2592
2592
  if (named === 'claude' || named === 'claude-code') return 'claude-code';
2593
2593
  if (named) return named;
2594
2594
  const command = String(session.activeCommand ?? '').toLowerCase().replace(/\.exe$/u, '');
2595
+ // a native install runs a binary named by its version: Grok's `grok-1.0.46-mac` is Grok, as Claude's is Claude
2596
+ if (/^grok-\d[\w.-]*$/u.test(command)) return 'grok';
2595
2597
  return command === 'claude' ? 'claude-code' : command;
2596
2598
  }
2597
2599
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-teams",
3
- "version": "0.3.119",
3
+ "version": "0.3.120",
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",