@tylerl0706/ahpx 0.2.12 → 0.2.13

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/bin.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  createLogger,
12
12
  ensureFileUri,
13
13
  setVerbose
14
- } from "./chunk-7ZLDLPTX.js";
14
+ } from "./chunk-IDRZ54EO.js";
15
15
 
16
16
  // src/bin.ts
17
17
  import { randomUUID as randomUUID3 } from "crypto";
@@ -460,9 +460,13 @@ var SessionHandle = class extends EventEmitter2 {
460
460
  error
461
461
  });
462
462
  };
463
+ const onError = (err) => {
464
+ finish("error", err.message);
465
+ };
463
466
  const cleanup = () => {
464
467
  if (timer !== void 0) clearTimeout(timer);
465
468
  this.removeListener("action", onAction);
469
+ this.removeListener("error", onError);
466
470
  this._activeTurnId = void 0;
467
471
  };
468
472
  if (options?.timeout) {
@@ -480,6 +484,7 @@ var SessionHandle = class extends EventEmitter2 {
480
484
  }, options.timeout);
481
485
  }
482
486
  this.on("action", onAction);
487
+ this.on("error", onError);
483
488
  this.client.dispatchAction({
484
489
  type: "session/turnStarted" /* SessionTurnStarted */,
485
490
  session: this.uri,
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  fileUriToDisplayPath,
40
40
  terminalReducer,
41
41
  truncatePreview
42
- } from "./chunk-7ZLDLPTX.js";
42
+ } from "./chunk-IDRZ54EO.js";
43
43
 
44
44
  // src/client/connection-pool.ts
45
45
  var ConnectionPool = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tylerl0706/ahpx",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "type": "module",
5
5
  "description": "Agent Host Protocol client — use as a library or CLI to manage AHP server connections, sessions, and agent interactions",
6
6
  "license": "MIT",