mu-harness 0.16.6 → 0.16.7

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.
@@ -28,6 +28,7 @@ export const createAgentSession = (config) => {
28
28
  running = true;
29
29
  const ac = new AbortController();
30
30
  controller = ac;
31
+ let terminal = { type: 'turn_end' };
31
32
  try {
32
33
  if (!started) {
33
34
  started = true;
@@ -58,18 +59,16 @@ export const createAgentSession = (config) => {
58
59
  messages.push(event.message);
59
60
  emitter.emit(event);
60
61
  }
61
- emitter.emit({ type: 'turn_end' });
62
62
  }
63
63
  catch (error) {
64
- if (ac.signal.aborted)
65
- emitter.emit({ type: 'turn_end' });
66
- else
67
- emitter.emit({ type: 'error', error });
64
+ if (!ac.signal.aborted)
65
+ terminal = { type: 'error', error };
68
66
  }
69
67
  finally {
70
68
  running = false;
71
69
  controller = undefined;
72
70
  }
71
+ emitter.emit(terminal);
73
72
  };
74
73
  return {
75
74
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mu-harness",
3
- "version": "0.16.6",
3
+ "version": "0.16.7",
4
4
  "description": "Agent harness: createHarness wires mu-core into a host — XDG paths, model registry, plugins, disk-loaded agents & skills, sub-agents, sessions (JSONL + SQLite catalog), slash commands, permission/approval hooks, an optional scheduler, and a composable TUI chat app",
5
5
  "license": "MIT",
6
6
  "main": "./script/index.js",
@@ -16,8 +16,8 @@
16
16
  "dependencies": {
17
17
  "@swc/wasm-typescript": "^1.15.0",
18
18
  "croner": "^9.0.0",
19
- "mu-core": "^0.16.6",
20
- "mu-tui": "^0.16.6"
19
+ "mu-core": "^0.16.7",
20
+ "mu-tui": "^0.16.7"
21
21
  },
22
22
  "_generatedBy": "dnt@dev"
23
23
  }
@@ -31,6 +31,7 @@ const createAgentSession = (config) => {
31
31
  running = true;
32
32
  const ac = new AbortController();
33
33
  controller = ac;
34
+ let terminal = { type: 'turn_end' };
34
35
  try {
35
36
  if (!started) {
36
37
  started = true;
@@ -61,18 +62,16 @@ const createAgentSession = (config) => {
61
62
  messages.push(event.message);
62
63
  emitter.emit(event);
63
64
  }
64
- emitter.emit({ type: 'turn_end' });
65
65
  }
66
66
  catch (error) {
67
- if (ac.signal.aborted)
68
- emitter.emit({ type: 'turn_end' });
69
- else
70
- emitter.emit({ type: 'error', error });
67
+ if (!ac.signal.aborted)
68
+ terminal = { type: 'error', error };
71
69
  }
72
70
  finally {
73
71
  running = false;
74
72
  controller = undefined;
75
73
  }
74
+ emitter.emit(terminal);
76
75
  };
77
76
  return {
78
77
  id,