@starlink-awaken/agentmesh 1.2.4 → 1.2.5

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.
@@ -446,28 +446,15 @@ export async function interactiveConnect() {
446
446
  }
447
447
  }
448
448
  function readStdinLine() {
449
- const decoder = new TextDecoder();
450
449
  return new Promise((resolve) => {
451
- const chunks = [];
452
- const stream = Bun.stdin.stream();
453
- const reader = stream.getReader();
454
- function pump() {
455
- reader.read().then(({ done, value }) => {
456
- if (done || !value) {
457
- resolve(decoder.decode(Bun.concatArrayBuffers(chunks.map(c => c.buffer))).trim());
458
- return;
459
- }
460
- const text = decoder.decode(value);
461
- if (text.includes('\n')) {
462
- chunks.push(value);
463
- resolve(decoder.decode(Bun.concatArrayBuffers(chunks.map(c => c.buffer))).trim());
464
- return;
465
- }
466
- chunks.push(value);
467
- pump();
468
- });
469
- }
470
- pump();
450
+ // 使用 process.stdin 的 data 事件,每次重新监听(支持多次调用)
451
+ const onData = (chunk) => {
452
+ process.stdin.removeListener('data', onData);
453
+ process.stdin.pause();
454
+ resolve(chunk.toString().trim());
455
+ };
456
+ process.stdin.resume();
457
+ process.stdin.once('data', onData);
471
458
  });
472
459
  }
473
460
  // ============================================================================
package/dist/src/cli.js CHANGED
@@ -7,7 +7,7 @@ import { existsSync, readFileSync } from 'node:fs';
7
7
  import { resolve, dirname, join } from 'node:path';
8
8
  import { initLogger } from './core/logger.js';
9
9
  const PROJECT_ROOT = resolve(dirname(import.meta.dir), '..');
10
- const VERSION = '1.2.4';
10
+ const VERSION = '1.2.5';
11
11
  const BANNER = `
12
12
  █████╗ ██████╗ ███████╗███╗ ██╗████████╗
13
13
  ██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starlink-awaken/agentmesh",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Unified Agent Gateway - Multi-Agent Scheduler and Router",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",