@cabane/companion 0.6.100 → 0.6.101

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/cli.js CHANGED
@@ -8239,6 +8239,17 @@ function describeErrorBody(body) {
8239
8239
  if (text.length === 0) return void 0;
8240
8240
  return text.length > ERROR_BODY_LOG_CAP ? `${text.slice(0, ERROR_BODY_LOG_CAP)}\u2026` : text;
8241
8241
  }
8242
+ function apiErrorLogFields(err) {
8243
+ const fields = {
8244
+ err: err instanceof Error ? err.message : String(err)
8245
+ };
8246
+ if (err instanceof ApiError) {
8247
+ fields.status = err.status;
8248
+ const body = describeErrorBody(err.body);
8249
+ if (body !== void 0) fields.responseBody = body;
8250
+ }
8251
+ return fields;
8252
+ }
8242
8253
 
8243
8254
  // src/turn-seq-floor.ts
8244
8255
  var SeqFloorUnavailable = class extends Error {
@@ -8507,10 +8518,7 @@ var TurnCommitter = class {
8507
8518
  constructor(deps) {
8508
8519
  this.deps = deps;
8509
8520
  this.onError = (err, hook) => {
8510
- deps.log.warn(
8511
- { err: err instanceof Error ? err.message : String(err), hook },
8512
- "dispatcher: transcript callback failed"
8513
- );
8521
+ deps.log.warn({ ...apiErrorLogFields(err), hook }, "dispatcher: transcript callback failed");
8514
8522
  deps.onCommitFailed?.(err);
8515
8523
  };
8516
8524
  const commit = {
@@ -8908,7 +8916,7 @@ var TurnExecution = class {
8908
8916
  );
8909
8917
  } catch (err) {
8910
8918
  turnLog.warn(
8911
- { err: err instanceof Error ? err.message : String(err), turnId },
8919
+ { ...apiErrorLogFields(err), turnId },
8912
8920
  "dispatcher: admitted-run settle failed terminally; server age-sweep is the backstop"
8913
8921
  );
8914
8922
  }
package/dist/runtime.js CHANGED
@@ -7736,6 +7736,17 @@ function describeErrorBody(body) {
7736
7736
  if (text.length === 0) return void 0;
7737
7737
  return text.length > ERROR_BODY_LOG_CAP ? `${text.slice(0, ERROR_BODY_LOG_CAP)}\u2026` : text;
7738
7738
  }
7739
+ function apiErrorLogFields(err) {
7740
+ const fields = {
7741
+ err: err instanceof Error ? err.message : String(err)
7742
+ };
7743
+ if (err instanceof ApiError) {
7744
+ fields.status = err.status;
7745
+ const body = describeErrorBody(err.body);
7746
+ if (body !== void 0) fields.responseBody = body;
7747
+ }
7748
+ return fields;
7749
+ }
7739
7750
 
7740
7751
  // src/turn-seq-floor.ts
7741
7752
  var SeqFloorUnavailable = class extends Error {
@@ -8004,10 +8015,7 @@ var TurnCommitter = class {
8004
8015
  constructor(deps) {
8005
8016
  this.deps = deps;
8006
8017
  this.onError = (err, hook) => {
8007
- deps.log.warn(
8008
- { err: err instanceof Error ? err.message : String(err), hook },
8009
- "dispatcher: transcript callback failed"
8010
- );
8018
+ deps.log.warn({ ...apiErrorLogFields(err), hook }, "dispatcher: transcript callback failed");
8011
8019
  deps.onCommitFailed?.(err);
8012
8020
  };
8013
8021
  const commit = {
@@ -8405,7 +8413,7 @@ var TurnExecution = class {
8405
8413
  );
8406
8414
  } catch (err) {
8407
8415
  turnLog.warn(
8408
- { err: err instanceof Error ? err.message : String(err), turnId },
8416
+ { ...apiErrorLogFields(err), turnId },
8409
8417
  "dispatcher: admitted-run settle failed terminally; server age-sweep is the backstop"
8410
8418
  );
8411
8419
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabane/companion",
3
- "version": "0.6.100",
3
+ "version": "0.6.101",
4
4
  "type": "module",
5
5
  "description": "The Cabane Companion (headless): connect a coding agent on your machine to your Cabane workspace as a responder — drive work against your own codebase, files, and MCP servers without putting any of it in Cabane.",
6
6
  "license": "UNLICENSED",