@shipers-dev/multi 0.6.1 → 0.6.2

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/dist/index.js CHANGED
@@ -5399,6 +5399,27 @@ async function runAcpx(opts) {
5399
5399
  args.push(opts.prompt);
5400
5400
  const proc = Bun.spawn(args, { stdout: "pipe", stderr: "pipe", stdin: "ignore" });
5401
5401
  let stopReason = "end_turn";
5402
+ (async () => {
5403
+ try {
5404
+ const r = proc.stderr.getReader();
5405
+ const d = new TextDecoder;
5406
+ let sb = "";
5407
+ while (true) {
5408
+ const { value, done } = await r.read();
5409
+ if (done)
5410
+ break;
5411
+ sb += d.decode(value, { stream: true });
5412
+ let nl;
5413
+ while ((nl = sb.indexOf(`
5414
+ `)) !== -1) {
5415
+ const ln = sb.slice(0, nl).trim();
5416
+ sb = sb.slice(nl + 1);
5417
+ if (ln)
5418
+ await opts.onEvent({ event_type: "progress", payload: { message: `[acpx] ${ln.slice(0, 500)}` } });
5419
+ }
5420
+ }
5421
+ } catch {}
5422
+ })();
5402
5423
  const reader = proc.stdout.getReader();
5403
5424
  const dec = new TextDecoder;
5404
5425
  let buf = "";
@@ -5460,6 +5481,7 @@ function handleSessionUpdate(params) {
5460
5481
  const u = params.update || {};
5461
5482
  const kind = u.sessionUpdate;
5462
5483
  const out = [];
5484
+ out.push({ event_type: "progress", payload: { message: `[acpx upd] ${kind} keys=${Object.keys(u).join(",")}` } });
5463
5485
  switch (kind) {
5464
5486
  case "agent_message_chunk":
5465
5487
  case "agent_thought_chunk": {
@@ -5531,7 +5553,7 @@ var LOG_PATH = join(MULTI_DIR, "logs", "agent.log");
5531
5553
  var SKILLS_DIR = join(MULTI_DIR, "skills");
5532
5554
  var STOP_PATH = join(MULTI_DIR, "stop.flag");
5533
5555
  var TASKS_DB_PATH = join(MULTI_DIR, "tasks.db");
5534
- var VERSION = "0.6.1";
5556
+ var VERSION = "0.6.2";
5535
5557
  var COMMANDS = {
5536
5558
  setup: "Register this device with a workspace",
5537
5559
  connect: "Connect device to realtime hub and execute assigned tasks",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipers-dev/multi",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "multi-agent": "./dist/index.js"
@@ -36,6 +36,26 @@ export async function runAcpx(opts: AcpxRunOpts): Promise<{ stopReason: string }
36
36
  const proc = Bun.spawn(args, { stdout: 'pipe', stderr: 'pipe', stdin: 'ignore' });
37
37
  let stopReason = 'end_turn';
38
38
 
39
+ // Forward stderr to our progress stream so we can debug in the UI/logs
40
+ (async () => {
41
+ try {
42
+ const r = (proc.stderr as ReadableStream<Uint8Array>).getReader();
43
+ const d = new TextDecoder();
44
+ let sb = '';
45
+ while (true) {
46
+ const { value, done } = await r.read();
47
+ if (done) break;
48
+ sb += d.decode(value, { stream: true });
49
+ let nl: number;
50
+ while ((nl = sb.indexOf('\n')) !== -1) {
51
+ const ln = sb.slice(0, nl).trim();
52
+ sb = sb.slice(nl + 1);
53
+ if (ln) await opts.onEvent({ event_type: 'progress', payload: { message: `[acpx] ${ln.slice(0, 500)}` } });
54
+ }
55
+ }
56
+ } catch {}
57
+ })();
58
+
39
59
  const reader = (proc.stdout as ReadableStream<Uint8Array>).getReader();
40
60
  const dec = new TextDecoder();
41
61
  let buf = '';
@@ -92,6 +112,8 @@ function handleSessionUpdate(params: any): AcpEvent[] {
92
112
  const u = params.update || {};
93
113
  const kind = u.sessionUpdate;
94
114
  const out: AcpEvent[] = [];
115
+ // Fallthrough debug: emit the update kind + keys so we can see what acpx is sending
116
+ out.push({ event_type: 'progress', payload: { message: `[acpx upd] ${kind} keys=${Object.keys(u).join(',')}` } });
95
117
  switch (kind) {
96
118
  case 'agent_message_chunk':
97
119
  case 'agent_thought_chunk': {
package/src/index.ts CHANGED
@@ -17,7 +17,7 @@ const LOG_PATH = join(MULTI_DIR, 'logs', 'agent.log');
17
17
  const SKILLS_DIR = join(MULTI_DIR, 'skills');
18
18
  const STOP_PATH = join(MULTI_DIR, 'stop.flag');
19
19
  const TASKS_DB_PATH = join(MULTI_DIR, 'tasks.db');
20
- const VERSION = '0.6.1';
20
+ const VERSION = '0.6.2';
21
21
 
22
22
  const COMMANDS = {
23
23
  setup: 'Register this device with a workspace',