@nuucognition/flint-cli 0.6.0-dev.19 → 0.6.0-dev.20

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
@@ -70030,11 +70030,11 @@ var init_dist4 = __esm({
70030
70030
  if (value === 0) {
70031
70031
  return 30;
70032
70032
  }
70033
- let ansi = 30 + (Math.round(b22 / 255) << 2 | Math.round(g22 / 255) << 1 | Math.round(r / 255));
70033
+ let ansi2 = 30 + (Math.round(b22 / 255) << 2 | Math.round(g22 / 255) << 1 | Math.round(r / 255));
70034
70034
  if (value === 2) {
70035
- ansi += 60;
70035
+ ansi2 += 60;
70036
70036
  }
70037
- return ansi;
70037
+ return ansi2;
70038
70038
  };
70039
70039
  convert.hsv.ansi16 = function(args) {
70040
70040
  return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
@@ -70052,8 +70052,8 @@ var init_dist4 = __esm({
70052
70052
  }
70053
70053
  return Math.round((r - 8) / 247 * 24) + 232;
70054
70054
  }
70055
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g22 / 255 * 5) + Math.round(b22 / 255 * 5);
70056
- return ansi;
70055
+ const ansi2 = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g22 / 255 * 5) + Math.round(b22 / 255 * 5);
70056
+ return ansi2;
70057
70057
  };
70058
70058
  convert.ansi16.rgb = function(args) {
70059
70059
  let color = args % 10;
@@ -107889,23 +107889,23 @@ function getServerRegistryPathForHome(homeDir) {
107889
107889
  return resolveServerRegistryPath(homeDir);
107890
107890
  }
107891
107891
  async function loadNodeModules() {
107892
- const [{ readFile: readFile56 }, { homedir: homedir26 }, { join: join109, resolve: resolve45 }] = await Promise.all([
107892
+ const [{ readFile: readFile56 }, { homedir: homedir27 }, { join: join110, resolve: resolve45 }] = await Promise.all([
107893
107893
  import("fs/promises"),
107894
107894
  import("os"),
107895
107895
  import("path")
107896
107896
  ]);
107897
- return { readFile: readFile56, homedir: homedir26, join: join109, resolve: resolve45 };
107897
+ return { readFile: readFile56, homedir: homedir27, join: join110, resolve: resolve45 };
107898
107898
  }
107899
107899
  async function getPrimaryServerRegistryPath(homeDir) {
107900
- const { homedir: homedir26, join: join109, resolve: resolve45 } = await loadNodeModules();
107900
+ const { homedir: homedir27, join: join110, resolve: resolve45 } = await loadNodeModules();
107901
107901
  if (homeDir) {
107902
- return join109(homeDir, ...SERVER_REGISTRY_PATH_PARTS);
107902
+ return join110(homeDir, ...SERVER_REGISTRY_PATH_PARTS);
107903
107903
  }
107904
107904
  const nuuHome = process.env.NUU_HOME?.trim();
107905
107905
  if (nuuHome) {
107906
- return join109(resolve45(nuuHome), ...SERVER_REGISTRY_PATH_PARTS.slice(1));
107906
+ return join110(resolve45(nuuHome), ...SERVER_REGISTRY_PATH_PARTS.slice(1));
107907
107907
  }
107908
- return join109(homedir26(), ...SERVER_REGISTRY_PATH_PARTS);
107908
+ return join110(homedir27(), ...SERVER_REGISTRY_PATH_PARTS);
107909
107909
  }
107910
107910
  async function readServerRegistryFile(options = {}) {
107911
107911
  const { readFile: readFile56 } = await loadNodeModules();
@@ -141350,7 +141350,7 @@ var init_prompt = __esm({
141350
141350
  return match2 && match2.index === 0;
141351
141351
  }
141352
141352
  var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
141353
- function join109(regexps, separator = "|") {
141353
+ function join110(regexps, separator = "|") {
141354
141354
  let numCaptures = 0;
141355
141355
  return regexps.map((regex3) => {
141356
141356
  numCaptures += 1;
@@ -141654,7 +141654,7 @@ var init_prompt = __esm({
141654
141654
  this.exec = () => null;
141655
141655
  }
141656
141656
  const terminators = this.regexes.map((el) => el[1]);
141657
- this.matcherRe = langRe(join109(terminators), true);
141657
+ this.matcherRe = langRe(join110(terminators), true);
141658
141658
  this.lastIndex = 0;
141659
141659
  }
141660
141660
  /** @param {string} s */
@@ -183395,11 +183395,11 @@ var init_prompt = __esm({
183395
183395
  if (value === 0) {
183396
183396
  return 30;
183397
183397
  }
183398
- let ansi = 30 + (Math.round(b22 / 255) << 2 | Math.round(g22 / 255) << 1 | Math.round(r / 255));
183398
+ let ansi2 = 30 + (Math.round(b22 / 255) << 2 | Math.round(g22 / 255) << 1 | Math.round(r / 255));
183399
183399
  if (value === 2) {
183400
- ansi += 60;
183400
+ ansi2 += 60;
183401
183401
  }
183402
- return ansi;
183402
+ return ansi2;
183403
183403
  };
183404
183404
  convert.hsv.ansi16 = function(args) {
183405
183405
  return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
@@ -183417,8 +183417,8 @@ var init_prompt = __esm({
183417
183417
  }
183418
183418
  return Math.round((r - 8) / 247 * 24) + 232;
183419
183419
  }
183420
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g22 / 255 * 5) + Math.round(b22 / 255 * 5);
183421
- return ansi;
183420
+ const ansi2 = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g22 / 255 * 5) + Math.round(b22 / 255 * 5);
183421
+ return ansi2;
183422
183422
  };
183423
183423
  convert.ansi16.rgb = function(args) {
183424
183424
  let color = args % 10;
@@ -257944,10 +257944,10 @@ var init_runtime = __esm({
257944
257944
  }
257945
257945
  });
257946
257946
 
257947
- // ../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_10aad22886f4df750d161a440ac3ab9f/node_modules/@opentui/react/chunk-2mx7fq49.js
257947
+ // ../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_8ca817b96d133ef968e03bcc19fc2823/node_modules/@opentui/react/chunk-2mx7fq49.js
257948
257948
  var __require4;
257949
257949
  var init_chunk_2mx7fq49 = __esm({
257950
- "../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_10aad22886f4df750d161a440ac3ab9f/node_modules/@opentui/react/chunk-2mx7fq49.js"() {
257950
+ "../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_8ca817b96d133ef968e03bcc19fc2823/node_modules/@opentui/react/chunk-2mx7fq49.js"() {
257951
257951
  "use strict";
257952
257952
  __require4 = import.meta.require;
257953
257953
  }
@@ -266455,9 +266455,9 @@ var require_constants3 = __commonJS({
266455
266455
  }
266456
266456
  });
266457
266457
 
266458
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/constants.js
266458
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js
266459
266459
  var require_constants4 = __commonJS({
266460
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/constants.js"(exports, module) {
266460
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js"(exports, module) {
266461
266461
  "use strict";
266462
266462
  var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
266463
266463
  var hasBlob = typeof Blob !== "undefined";
@@ -266478,9 +266478,9 @@ var require_constants4 = __commonJS({
266478
266478
  }
266479
266479
  });
266480
266480
 
266481
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/buffer-util.js
266481
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js
266482
266482
  var require_buffer_util2 = __commonJS({
266483
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/buffer-util.js"(exports, module) {
266483
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js"(exports, module) {
266484
266484
  "use strict";
266485
266485
  var { EMPTY_BUFFER } = require_constants4();
266486
266486
  var FastBuffer = Buffer[Symbol.species];
@@ -266553,9 +266553,9 @@ var require_buffer_util2 = __commonJS({
266553
266553
  }
266554
266554
  });
266555
266555
 
266556
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/limiter.js
266556
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/limiter.js
266557
266557
  var require_limiter2 = __commonJS({
266558
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/limiter.js"(exports, module) {
266558
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/limiter.js"(exports, module) {
266559
266559
  "use strict";
266560
266560
  var kDone = /* @__PURE__ */ Symbol("kDone");
266561
266561
  var kRun = /* @__PURE__ */ Symbol("kRun");
@@ -266603,9 +266603,9 @@ var require_limiter2 = __commonJS({
266603
266603
  }
266604
266604
  });
266605
266605
 
266606
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/permessage-deflate.js
266606
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js
266607
266607
  var require_permessage_deflate2 = __commonJS({
266608
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
266608
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
266609
266609
  "use strict";
266610
266610
  var zlib = __require("zlib");
266611
266611
  var bufferUtil = require_buffer_util2();
@@ -266986,9 +266986,9 @@ var require_permessage_deflate2 = __commonJS({
266986
266986
  }
266987
266987
  });
266988
266988
 
266989
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/validation.js
266989
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js
266990
266990
  var require_validation2 = __commonJS({
266991
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/validation.js"(exports, module) {
266991
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js"(exports, module) {
266992
266992
  "use strict";
266993
266993
  var { isUtf8 } = __require("buffer");
266994
266994
  var { hasBlob } = require_constants4();
@@ -267187,9 +267187,9 @@ var require_validation2 = __commonJS({
267187
267187
  }
267188
267188
  });
267189
267189
 
267190
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/receiver.js
267190
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js
267191
267191
  var require_receiver2 = __commonJS({
267192
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/receiver.js"(exports, module) {
267192
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js"(exports, module) {
267193
267193
  "use strict";
267194
267194
  var { Writable } = __require("stream");
267195
267195
  var PerMessageDeflate3 = require_permessage_deflate2();
@@ -267222,6 +267222,10 @@ var require_receiver2 = __commonJS({
267222
267222
  * extensions
267223
267223
  * @param {Boolean} [options.isServer=false] Specifies whether to operate in
267224
267224
  * client or server mode
267225
+ * @param {Number} [options.maxBufferedChunks=0] The maximum number of
267226
+ * buffered data chunks
267227
+ * @param {Number} [options.maxFragments=0] The maximum number of message
267228
+ * fragments
267225
267229
  * @param {Number} [options.maxPayload=0] The maximum allowed message length
267226
267230
  * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
267227
267231
  * not to skip UTF-8 validation for text and close messages
@@ -267232,6 +267236,8 @@ var require_receiver2 = __commonJS({
267232
267236
  this._binaryType = options.binaryType || BINARY_TYPES[0];
267233
267237
  this._extensions = options.extensions || {};
267234
267238
  this._isServer = !!options.isServer;
267239
+ this._maxBufferedChunks = options.maxBufferedChunks | 0;
267240
+ this._maxFragments = options.maxFragments | 0;
267235
267241
  this._maxPayload = options.maxPayload | 0;
267236
267242
  this._skipUTF8Validation = !!options.skipUTF8Validation;
267237
267243
  this[kWebSocket] = void 0;
@@ -267246,6 +267252,7 @@ var require_receiver2 = __commonJS({
267246
267252
  this._opcode = 0;
267247
267253
  this._totalPayloadLength = 0;
267248
267254
  this._messageLength = 0;
267255
+ this._numFragments = 0;
267249
267256
  this._fragments = [];
267250
267257
  this._errored = false;
267251
267258
  this._loop = false;
@@ -267261,6 +267268,18 @@ var require_receiver2 = __commonJS({
267261
267268
  */
267262
267269
  _write(chunk, encoding, cb) {
267263
267270
  if (this._opcode === 8 && this._state == GET_INFO) return cb();
267271
+ if (this._maxBufferedChunks > 0 && this._buffers.length >= this._maxBufferedChunks) {
267272
+ cb(
267273
+ this.createError(
267274
+ RangeError,
267275
+ "Too many buffered chunks",
267276
+ false,
267277
+ 1008,
267278
+ "WS_ERR_TOO_MANY_BUFFERED_PARTS"
267279
+ )
267280
+ );
267281
+ return;
267282
+ }
267264
267283
  this._bufferedBytes += chunk.length;
267265
267284
  this._buffers.push(chunk);
267266
267285
  this.startLoop(cb);
@@ -267584,6 +267603,17 @@ var require_receiver2 = __commonJS({
267584
267603
  this.controlMessage(data, cb);
267585
267604
  return;
267586
267605
  }
267606
+ if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
267607
+ const error3 = this.createError(
267608
+ RangeError,
267609
+ "Too many message fragments",
267610
+ false,
267611
+ 1008,
267612
+ "WS_ERR_TOO_MANY_BUFFERED_PARTS"
267613
+ );
267614
+ cb(error3);
267615
+ return;
267616
+ }
267587
267617
  if (this._compressed) {
267588
267618
  this._state = INFLATING;
267589
267619
  this.decompress(data, cb);
@@ -267641,6 +267671,7 @@ var require_receiver2 = __commonJS({
267641
267671
  this._totalPayloadLength = 0;
267642
267672
  this._messageLength = 0;
267643
267673
  this._fragmented = 0;
267674
+ this._numFragments = 0;
267644
267675
  this._fragments = [];
267645
267676
  if (this._opcode === 2) {
267646
267677
  let data;
@@ -267779,9 +267810,9 @@ var require_receiver2 = __commonJS({
267779
267810
  }
267780
267811
  });
267781
267812
 
267782
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/sender.js
267813
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js
267783
267814
  var require_sender2 = __commonJS({
267784
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/sender.js"(exports, module) {
267815
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js"(exports, module) {
267785
267816
  "use strict";
267786
267817
  var { Duplex } = __require("stream");
267787
267818
  var { randomFillSync } = __require("crypto");
@@ -268272,9 +268303,9 @@ var require_sender2 = __commonJS({
268272
268303
  }
268273
268304
  });
268274
268305
 
268275
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/event-target.js
268306
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/event-target.js
268276
268307
  var require_event_target2 = __commonJS({
268277
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/event-target.js"(exports, module) {
268308
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/event-target.js"(exports, module) {
268278
268309
  "use strict";
268279
268310
  var { kForOnEventAttribute, kListener } = require_constants4();
268280
268311
  var kCode = /* @__PURE__ */ Symbol("kCode");
@@ -268501,9 +268532,9 @@ var require_event_target2 = __commonJS({
268501
268532
  }
268502
268533
  });
268503
268534
 
268504
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/extension.js
268535
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js
268505
268536
  var require_extension2 = __commonJS({
268506
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/extension.js"(exports, module) {
268537
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js"(exports, module) {
268507
268538
  "use strict";
268508
268539
  var { tokenChars } = require_validation2();
268509
268540
  function push(dest, name, elem) {
@@ -268654,9 +268685,9 @@ var require_extension2 = __commonJS({
268654
268685
  }
268655
268686
  });
268656
268687
 
268657
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/websocket.js
268688
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js
268658
268689
  var require_websocket2 = __commonJS({
268659
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/websocket.js"(exports, module) {
268690
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js"(exports, module) {
268660
268691
  "use strict";
268661
268692
  var EventEmitter5 = __require("events");
268662
268693
  var https2 = __require("https");
@@ -268825,6 +268856,10 @@ var require_websocket2 = __commonJS({
268825
268856
  * multiple times in the same tick
268826
268857
  * @param {Function} [options.generateMask] The function used to generate the
268827
268858
  * masking key
268859
+ * @param {Number} [options.maxBufferedChunks=0] The maximum number of
268860
+ * buffered data chunks
268861
+ * @param {Number} [options.maxFragments=0] The maximum number of message
268862
+ * fragments
268828
268863
  * @param {Number} [options.maxPayload=0] The maximum allowed message size
268829
268864
  * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
268830
268865
  * not to skip UTF-8 validation for text and close messages
@@ -268836,6 +268871,8 @@ var require_websocket2 = __commonJS({
268836
268871
  binaryType: this.binaryType,
268837
268872
  extensions: this._extensions,
268838
268873
  isServer: this._isServer,
268874
+ maxBufferedChunks: options.maxBufferedChunks,
268875
+ maxFragments: options.maxFragments,
268839
268876
  maxPayload: options.maxPayload,
268840
268877
  skipUTF8Validation: options.skipUTF8Validation
268841
268878
  });
@@ -269135,6 +269172,8 @@ var require_websocket2 = __commonJS({
269135
269172
  autoPong: true,
269136
269173
  closeTimeout: CLOSE_TIMEOUT,
269137
269174
  protocolVersion: protocolVersions[1],
269175
+ maxBufferedChunks: 256 * 1024,
269176
+ maxFragments: 16 * 1024,
269138
269177
  maxPayload: 100 * 1024 * 1024,
269139
269178
  skipUTF8Validation: false,
269140
269179
  perMessageDeflate: true,
@@ -269377,6 +269416,8 @@ var require_websocket2 = __commonJS({
269377
269416
  websocket.setSocket(socket, head, {
269378
269417
  allowSynchronousEvents: opts.allowSynchronousEvents,
269379
269418
  generateMask: opts.generateMask,
269419
+ maxBufferedChunks: opts.maxBufferedChunks,
269420
+ maxFragments: opts.maxFragments,
269380
269421
  maxPayload: opts.maxPayload,
269381
269422
  skipUTF8Validation: opts.skipUTF8Validation
269382
269423
  });
@@ -269540,9 +269581,9 @@ var require_websocket2 = __commonJS({
269540
269581
  }
269541
269582
  });
269542
269583
 
269543
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/stream.js
269584
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/stream.js
269544
269585
  var require_stream2 = __commonJS({
269545
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/stream.js"(exports, module) {
269586
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/stream.js"(exports, module) {
269546
269587
  "use strict";
269547
269588
  var WebSocket3 = require_websocket2();
269548
269589
  var { Duplex } = __require("stream");
@@ -269638,9 +269679,9 @@ var require_stream2 = __commonJS({
269638
269679
  }
269639
269680
  });
269640
269681
 
269641
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/subprotocol.js
269682
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/subprotocol.js
269642
269683
  var require_subprotocol2 = __commonJS({
269643
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/subprotocol.js"(exports, module) {
269684
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/subprotocol.js"(exports, module) {
269644
269685
  "use strict";
269645
269686
  var { tokenChars } = require_validation2();
269646
269687
  function parse5(header2) {
@@ -269683,9 +269724,9 @@ var require_subprotocol2 = __commonJS({
269683
269724
  }
269684
269725
  });
269685
269726
 
269686
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/websocket-server.js
269727
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket-server.js
269687
269728
  var require_websocket_server2 = __commonJS({
269688
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/websocket-server.js"(exports, module) {
269729
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket-server.js"(exports, module) {
269689
269730
  "use strict";
269690
269731
  var EventEmitter5 = __require("events");
269691
269732
  var http2 = __require("http");
@@ -269719,6 +269760,10 @@ var require_websocket_server2 = __commonJS({
269719
269760
  * called
269720
269761
  * @param {Function} [options.handleProtocols] A hook to handle protocols
269721
269762
  * @param {String} [options.host] The hostname where to bind the server
269763
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
269764
+ * buffered data chunks
269765
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
269766
+ * fragments
269722
269767
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
269723
269768
  * size
269724
269769
  * @param {Boolean} [options.noServer=false] Enable no server mode
@@ -269740,6 +269785,8 @@ var require_websocket_server2 = __commonJS({
269740
269785
  options = {
269741
269786
  allowSynchronousEvents: true,
269742
269787
  autoPong: true,
269788
+ maxBufferedChunks: 256 * 1024,
269789
+ maxFragments: 16 * 1024,
269743
269790
  maxPayload: 100 * 1024 * 1024,
269744
269791
  skipUTF8Validation: false,
269745
269792
  perMessageDeflate: false,
@@ -270019,6 +270066,8 @@ var require_websocket_server2 = __commonJS({
270019
270066
  socket.removeListener("error", socketOnError);
270020
270067
  ws.setSocket(socket, head, {
270021
270068
  allowSynchronousEvents: this.options.allowSynchronousEvents,
270069
+ maxBufferedChunks: this.options.maxBufferedChunks,
270070
+ maxFragments: this.options.maxFragments,
270022
270071
  maxPayload: this.options.maxPayload,
270023
270072
  skipUTF8Validation: this.options.skipUTF8Validation
270024
270073
  });
@@ -270076,7 +270125,7 @@ var require_websocket_server2 = __commonJS({
270076
270125
  }
270077
270126
  });
270078
270127
 
270079
- // ../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/wrapper.mjs
270128
+ // ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/wrapper.mjs
270080
270129
  var wrapper_exports = {};
270081
270130
  __export(wrapper_exports, {
270082
270131
  PerMessageDeflate: () => import_permessage_deflate2.default,
@@ -270091,7 +270140,7 @@ __export(wrapper_exports, {
270091
270140
  });
270092
270141
  var import_stream3, import_extension2, import_permessage_deflate2, import_receiver2, import_sender2, import_subprotocol2, import_websocket2, import_websocket_server2, wrapper_default2;
270093
270142
  var init_wrapper2 = __esm({
270094
- "../../node_modules/.pnpm/ws@8.20.1/node_modules/ws/wrapper.mjs"() {
270143
+ "../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/wrapper.mjs"() {
270095
270144
  "use strict";
270096
270145
  import_stream3 = __toESM(require_stream2(), 1);
270097
270146
  import_extension2 = __toESM(require_extension2(), 1);
@@ -270105,11 +270154,11 @@ var init_wrapper2 = __esm({
270105
270154
  }
270106
270155
  });
270107
270156
 
270108
- // ../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_10aad22886f4df750d161a440ac3ab9f/node_modules/@opentui/react/chunk-bdqvmfwv.js
270157
+ // ../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_8ca817b96d133ef968e03bcc19fc2823/node_modules/@opentui/react/chunk-bdqvmfwv.js
270109
270158
  var chunk_bdqvmfwv_exports = {};
270110
270159
  var g4;
270111
270160
  var init_chunk_bdqvmfwv = __esm({
270112
- async "../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_10aad22886f4df750d161a440ac3ab9f/node_modules/@opentui/react/chunk-bdqvmfwv.js"() {
270161
+ async "../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_8ca817b96d133ef968e03bcc19fc2823/node_modules/@opentui/react/chunk-bdqvmfwv.js"() {
270113
270162
  "use strict";
270114
270163
  init_chunk_2mx7fq49();
270115
270164
  init_react_devtools_core();
@@ -270136,7 +270185,7 @@ var init_chunk_bdqvmfwv = __esm({
270136
270185
  }
270137
270186
  });
270138
270187
 
270139
- // ../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_10aad22886f4df750d161a440ac3ab9f/node_modules/@opentui/react/chunk-rm53pqj2.js
270188
+ // ../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_8ca817b96d133ef968e03bcc19fc2823/node_modules/@opentui/react/chunk-rm53pqj2.js
270140
270189
  import {
270141
270190
  ASCIIFontRenderable,
270142
270191
  BoxRenderable,
@@ -270316,7 +270365,7 @@ function createRoot(renderer2) {
270316
270365
  }
270317
270366
  var import_react_reconciler2, import_constants4, import_constants5, textNodeKeys, SpanRenderable, TextModifierRenderable, BoldSpanRenderable, ItalicSpanRenderable, UnderlineSpanRenderable, LineBreakRenderable, LinkRenderable, baseComponents, componentCatalogue, AppContext2, useAppContext, ErrorBoundary2, package_default, idCounter, currentUpdatePriority2, hostConfig, reconciler, _r, flushSync, createPortal;
270318
270367
  var init_chunk_rm53pqj2 = __esm({
270319
- async "../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_10aad22886f4df750d161a440ac3ab9f/node_modules/@opentui/react/chunk-rm53pqj2.js"() {
270368
+ async "../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_8ca817b96d133ef968e03bcc19fc2823/node_modules/@opentui/react/chunk-rm53pqj2.js"() {
270320
270369
  "use strict";
270321
270370
  init_chunk_2mx7fq49();
270322
270371
  import_react_reconciler2 = __toESM(require_react_reconciler2(), 1);
@@ -270703,7 +270752,7 @@ $ bun add react-devtools-core@7 -d
270703
270752
  }
270704
270753
  });
270705
270754
 
270706
- // ../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_10aad22886f4df750d161a440ac3ab9f/node_modules/@opentui/react/index.js
270755
+ // ../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_8ca817b96d133ef968e03bcc19fc2823/node_modules/@opentui/react/index.js
270707
270756
  import { useEffect as useEffect9 } from "react";
270708
270757
  import { useCallback as useCallback6, useLayoutEffect as useLayoutEffect3, useRef as useRef6 } from "react";
270709
270758
  import { useEffect as useEffect22 } from "react";
@@ -270750,7 +270799,7 @@ function renderPluginFailurePlaceholder(registry3, pluginFailurePlaceholder, fai
270750
270799
  }
270751
270800
  var useRenderer, useKeyboard, useOnResize, useTerminalDimensions2, PluginErrorBoundary;
270752
270801
  var init_react = __esm({
270753
- async "../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_10aad22886f4df750d161a440ac3ab9f/node_modules/@opentui/react/index.js"() {
270802
+ async "../../node_modules/.pnpm/@opentui+react@0.4.3_patch_hash=f63dec0c73a16d747507a1855c54151e5fe0fc883c807b7b847ab44_8ca817b96d133ef968e03bcc19fc2823/node_modules/@opentui/react/index.js"() {
270754
270803
  "use strict";
270755
270804
  await init_chunk_rm53pqj2();
270756
270805
  init_chunk_2mx7fq49();
@@ -276198,65 +276247,225 @@ var init_overlay_state = __esm({
276198
276247
  }
276199
276248
  });
276200
276249
 
276250
+ // ../orbh-cli/src/tui/opentui/theme.ts
276251
+ import { readFileSync as readFileSync21 } from "fs";
276252
+ import { homedir as homedir19 } from "os";
276253
+ import { join as join95 } from "path";
276254
+ import { RGBA } from "@opentui/core";
276255
+ function parseThemeColor(raw) {
276256
+ if (typeof raw !== "string") return null;
276257
+ const value = raw.trim();
276258
+ if (value.length === 0) return null;
276259
+ if (value === "default" || value === "none") return { kind: "default" };
276260
+ const indexed = /^ansi:(\d{1,3})$/.exec(value);
276261
+ if (indexed) {
276262
+ const index = Number(indexed[1]);
276263
+ return index <= 255 ? { kind: "indexed", index } : null;
276264
+ }
276265
+ if (/^#[0-9a-fA-F]{6}$/.test(value) || /^[a-zA-Z]+$/.test(value)) {
276266
+ return { kind: "literal", value };
276267
+ }
276268
+ return null;
276269
+ }
276270
+ function parseThemeFile(json, themeName) {
276271
+ const warnings = [];
276272
+ const colors = {};
276273
+ const rawColors = json?.colors;
276274
+ if (typeof rawColors !== "object" || rawColors === null) {
276275
+ warnings.push(`theme "${themeName}": no "colors" object \u2014 using terminal defaults`);
276276
+ return { colors, warnings };
276277
+ }
276278
+ for (const [slot, raw] of Object.entries(rawColors)) {
276279
+ if (!ORBH_THEME_SLOTS.includes(slot)) {
276280
+ warnings.push(`theme "${themeName}": unknown slot "${slot}" ignored`);
276281
+ continue;
276282
+ }
276283
+ const spec = parseThemeColor(raw);
276284
+ if (!spec) {
276285
+ warnings.push(`theme "${themeName}": invalid color "${String(raw)}" for "${slot}" ignored`);
276286
+ continue;
276287
+ }
276288
+ colors[slot] = spec;
276289
+ }
276290
+ return { colors, warnings };
276291
+ }
276292
+ function resolveThemeColors(partial) {
276293
+ return { ...TERMINAL_THEME, ...partial };
276294
+ }
276295
+ function themeColorInput(spec) {
276296
+ switch (spec.kind) {
276297
+ case "default":
276298
+ return void 0;
276299
+ case "indexed":
276300
+ return RGBA.fromIndex(spec.index);
276301
+ case "literal":
276302
+ return spec.value;
276303
+ }
276304
+ }
276305
+ function themeBackgroundInput(spec) {
276306
+ return themeColorInput(spec);
276307
+ }
276308
+ function orbhThemesDir(home = homedir19()) {
276309
+ return join95(home, ".nuucognition", "orbh", "themes");
276310
+ }
276311
+ function loadTheme(options = {}) {
276312
+ const env8 = options.env ?? process.env;
276313
+ const requested = env8.ORBH_THEME?.trim();
276314
+ if (!requested || requested === "terminal") {
276315
+ return { name: "terminal", colors: TERMINAL_THEME, warnings: [] };
276316
+ }
276317
+ if (!/^[\w-]+$/.test(requested)) {
276318
+ return {
276319
+ name: "terminal",
276320
+ colors: TERMINAL_THEME,
276321
+ warnings: [`ORBH_THEME "${requested}" is not a valid theme name \u2014 using terminal theme`]
276322
+ };
276323
+ }
276324
+ const path37 = join95(orbhThemesDir(options.home), `${requested}.json`);
276325
+ const read = options.readFile ?? ((target) => readFileSync21(target, "utf8"));
276326
+ let raw;
276327
+ try {
276328
+ raw = read(path37);
276329
+ } catch {
276330
+ return {
276331
+ name: "terminal",
276332
+ colors: TERMINAL_THEME,
276333
+ warnings: [`ORBH_THEME "${requested}": ${path37} not readable \u2014 using terminal theme`]
276334
+ };
276335
+ }
276336
+ let json;
276337
+ try {
276338
+ json = JSON.parse(raw);
276339
+ } catch {
276340
+ return {
276341
+ name: "terminal",
276342
+ colors: TERMINAL_THEME,
276343
+ warnings: [`ORBH_THEME "${requested}": ${path37} is not valid JSON \u2014 using terminal theme`]
276344
+ };
276345
+ }
276346
+ const parsed = parseThemeFile(json, requested);
276347
+ return { name: requested, colors: resolveThemeColors(parsed.colors), warnings: parsed.warnings };
276348
+ }
276349
+ var ORBH_THEME_SLOTS, ansi, TERMINAL_THEME;
276350
+ var init_theme = __esm({
276351
+ "../orbh-cli/src/tui/opentui/theme.ts"() {
276352
+ "use strict";
276353
+ ORBH_THEME_SLOTS = [
276354
+ "accent",
276355
+ "dim",
276356
+ "ok",
276357
+ "warn",
276358
+ "err",
276359
+ "selection",
276360
+ "border",
276361
+ "surfaceHeader",
276362
+ "surfaceRaised"
276363
+ ];
276364
+ ansi = (index) => ({ kind: "indexed", index });
276365
+ TERMINAL_THEME = {
276366
+ accent: ansi(6),
276367
+ dim: ansi(8),
276368
+ ok: ansi(2),
276369
+ warn: ansi(3),
276370
+ err: ansi(1),
276371
+ selection: ansi(6),
276372
+ border: ansi(8),
276373
+ surfaceHeader: ansi(0),
276374
+ surfaceRaised: ansi(8)
276375
+ };
276376
+ }
276377
+ });
276378
+
276201
276379
  // ../orbh-cli/src/tui/opentui/tokens.ts
276202
276380
  import { TextAttributes as TextAttributes2 } from "@opentui/core";
276203
- var palette, openTuiTokens;
276381
+ function fgToken(color, attributes) {
276382
+ return {
276383
+ ...color !== void 0 ? { fg: color } : {},
276384
+ ...attributes !== void 0 ? { attributes } : {}
276385
+ };
276386
+ }
276387
+ function buildOpenTuiTokens(colors) {
276388
+ const accent = themeColorInput(colors.accent);
276389
+ const dim3 = themeColorInput(colors.dim);
276390
+ const ok2 = themeColorInput(colors.ok);
276391
+ const warn3 = themeColorInput(colors.warn);
276392
+ const err = themeColorInput(colors.err);
276393
+ const selection = themeColorInput(colors.selection);
276394
+ const border = themeColorInput(colors.border);
276395
+ const dimText = colors.dim.kind === "default" ? { attributes: TextAttributes2.DIM } : fgToken(dim3);
276396
+ return {
276397
+ accent,
276398
+ dim: dim3,
276399
+ ok: ok2,
276400
+ warn: warn3,
276401
+ err,
276402
+ selection,
276403
+ border,
276404
+ text: {
276405
+ primary: {},
276406
+ dim: dimText
276407
+ },
276408
+ tab: {
276409
+ active: fgToken(accent, TextAttributes2.BOLD),
276410
+ activeUnfocused: fgToken(accent),
276411
+ inactive: {}
276412
+ },
276413
+ row: {
276414
+ normal: {},
276415
+ hover: fgToken(accent),
276416
+ selected: fgToken(selection, TextAttributes2.BOLD),
276417
+ selectedUnfocused: { ...dimText, attributes: (dimText.attributes ?? 0) | TextAttributes2.BOLD }
276418
+ },
276419
+ footer: {
276420
+ normal: dimText,
276421
+ help: fgToken(accent)
276422
+ },
276423
+ status: {
276424
+ ok: fgToken(ok2),
276425
+ warn: fgToken(warn3),
276426
+ err: fgToken(err)
276427
+ },
276428
+ focus: {
276429
+ border: accent,
276430
+ inactiveBorder: border
276431
+ },
276432
+ surface: {
276433
+ header: themeBackgroundInput(colors.surfaceHeader),
276434
+ raised: themeBackgroundInput(colors.surfaceRaised)
276435
+ }
276436
+ };
276437
+ }
276438
+ function statusToneColor(tone, tokens = openTuiTokens) {
276439
+ switch (tone) {
276440
+ case "green":
276441
+ return tokens.ok;
276442
+ case "yellow":
276443
+ return tokens.warn;
276444
+ case "cyan":
276445
+ return tokens.accent;
276446
+ case "red":
276447
+ return tokens.err;
276448
+ case "gray":
276449
+ default:
276450
+ return tokens.dim;
276451
+ }
276452
+ }
276453
+ var activeTheme, openTuiThemeWarnings, openTuiThemeName, openTuiTokens;
276204
276454
  var init_tokens = __esm({
276205
276455
  "../orbh-cli/src/tui/opentui/tokens.ts"() {
276206
276456
  "use strict";
276207
- palette = {
276208
- accent: "cyan",
276209
- dim: "gray",
276210
- ok: "green",
276211
- warn: "yellow",
276212
- err: "red",
276213
- selection: "cyan",
276214
- border: "gray"
276215
- };
276216
- openTuiTokens = {
276217
- accent: palette.accent,
276218
- dim: palette.dim,
276219
- ok: palette.ok,
276220
- warn: palette.warn,
276221
- err: palette.err,
276222
- selection: palette.selection,
276223
- border: palette.border,
276224
- text: {
276225
- primary: {},
276226
- dim: { fg: palette.dim, attributes: TextAttributes2.DIM }
276227
- },
276228
- tab: {
276229
- active: { fg: palette.accent, attributes: TextAttributes2.BOLD },
276230
- activeUnfocused: { fg: palette.accent },
276231
- inactive: {}
276232
- },
276233
- row: {
276234
- normal: {},
276235
- hover: { fg: palette.accent },
276236
- selected: { fg: palette.selection, attributes: TextAttributes2.BOLD },
276237
- selectedUnfocused: { fg: palette.dim, attributes: TextAttributes2.BOLD }
276238
- },
276239
- footer: {
276240
- normal: { fg: palette.dim, attributes: TextAttributes2.DIM },
276241
- help: { fg: palette.accent }
276242
- },
276243
- status: {
276244
- ok: { fg: palette.ok },
276245
- warn: { fg: palette.warn },
276246
- err: { fg: palette.err }
276247
- },
276248
- focus: {
276249
- border: palette.accent,
276250
- inactiveBorder: palette.border
276251
- }
276252
- };
276457
+ init_theme();
276458
+ activeTheme = loadTheme();
276459
+ openTuiThemeWarnings = activeTheme.warnings;
276460
+ openTuiThemeName = activeTheme.name;
276461
+ openTuiTokens = buildOpenTuiTokens(activeTheme.colors);
276253
276462
  }
276254
276463
  });
276255
276464
 
276256
276465
  // ../orbh-cli/src/tui/opentui/terminal-grid-renderable.ts
276257
276466
  import {
276258
276467
  Renderable,
276259
- RGBA,
276468
+ RGBA as RGBA2,
276260
276469
  TextAttributes as TextAttributes3
276261
276470
  } from "@opentui/core";
276262
276471
  function cellColor(terminal2, cell, foreground) {
@@ -276267,7 +276476,7 @@ function cellColor(terminal2, cell, foreground) {
276267
276476
  if (foreground ? cell.isFgRGB() : cell.isBgRGB()) {
276268
276477
  let color = RGB_COLORS.get(value);
276269
276478
  if (!color) {
276270
- color = RGBA.fromInts(value >> 16 & 255, value >> 8 & 255, value & 255);
276479
+ color = RGBA2.fromInts(value >> 16 & 255, value >> 8 & 255, value & 255);
276271
276480
  RGB_COLORS.set(value, color);
276272
276481
  }
276273
276482
  return color;
@@ -276276,7 +276485,7 @@ function cellColor(terminal2, cell, foreground) {
276276
276485
  if (override !== void 0) {
276277
276486
  let color = RGB_COLORS.get(override);
276278
276487
  if (!color) {
276279
- color = RGBA.fromInts(override >> 16 & 255, override >> 8 & 255, override & 255);
276488
+ color = RGBA2.fromInts(override >> 16 & 255, override >> 8 & 255, override & 255);
276280
276489
  RGB_COLORS.set(override, color);
276281
276490
  }
276282
276491
  return color;
@@ -276337,9 +276546,9 @@ var init_terminal_grid_renderable = __esm({
276337
276546
  "use strict";
276338
276547
  await init_react();
276339
276548
  init_terminal_palette();
276340
- DEFAULT_FG = RGBA.defaultForeground();
276341
- DEFAULT_BG = RGBA.defaultBackground();
276342
- INDEXED_COLORS = Array.from({ length: 256 }, (_unused, index) => RGBA.fromIndex(index));
276549
+ DEFAULT_FG = RGBA2.defaultForeground();
276550
+ DEFAULT_BG = RGBA2.defaultBackground();
276551
+ INDEXED_COLORS = Array.from({ length: 256 }, (_unused, index) => RGBA2.fromIndex(index));
276343
276552
  RGB_COLORS = /* @__PURE__ */ new Map();
276344
276553
  TerminalGridRenderable = class extends Renderable {
276345
276554
  _terminal;
@@ -276834,14 +277043,31 @@ function openTuiSkeletonSessions(snapshot, tab2) {
276834
277043
  }
276835
277044
  return snapshot.sessions;
276836
277045
  }
276837
- function openTuiSessionColumnWidths(availableColumns) {
277046
+ function openTuiSessionContentWidths(sessions) {
277047
+ let workState = OPEN_TUI_SESSION_WORK_STATE_HEADER.length;
277048
+ let profile = OPEN_TUI_SESSION_PROFILE_HEADER.length;
277049
+ for (const session of sessions) {
277050
+ workState = Math.max(workState, (effectiveSessionWorkState(session) ?? "unknown").length);
277051
+ profile = Math.max(profile, sessionProfileLabel(session).length);
277052
+ }
277053
+ return { workState, profile: Math.min(PROFILE_COLUMN_CAP, profile) };
277054
+ }
277055
+ function alignSessionCell(text, width) {
277056
+ return text.length >= width ? text : text.padStart(width);
277057
+ }
277058
+ function openTuiSessionColumnWidths(availableColumns, content) {
276838
277059
  const gapWidth = OPEN_TUI_SESSION_COLUMN_GAP * 3;
276839
277060
  const budget = Math.max(4, Math.trunc(availableColumns) - gapWidth);
277061
+ const workState = content?.workState ?? 11;
277062
+ const profile = content?.profile ?? 16;
276840
277063
  const widths = {
276841
277064
  attach: OPEN_TUI_SESSION_ATTACH_COLUMN_WIDTH,
276842
- title: Math.max(COLUMN_MINIMUMS.title, budget - 29),
276843
- workState: 11,
276844
- profile: 16
277065
+ title: Math.max(
277066
+ COLUMN_MINIMUMS.title,
277067
+ budget - OPEN_TUI_SESSION_ATTACH_COLUMN_WIDTH - workState - profile
277068
+ ),
277069
+ workState,
277070
+ profile
276845
277071
  };
276846
277072
  const shrinkOrder = ["title", "profile", "workState"];
276847
277073
  let overflow = Object.values(widths).reduce((sum, width) => sum + width, 0) - budget;
@@ -276892,7 +277118,7 @@ function sessionPreviewLayout(availableColumns, availableRows) {
276892
277118
  previewRows
276893
277119
  };
276894
277120
  }
276895
- var CORE_INTERFACE_KEYS, OPEN_TUI_SESSION_COLUMN_GAP, OPEN_TUI_SESSION_ATTACH_COLUMN_WIDTH, COLUMN_MINIMUMS, SESSION_PREVIEW_SIDE_BREAKPOINT_COLUMNS, SESSION_PREVIEW_STACKED_MIN_ROWS;
277121
+ var CORE_INTERFACE_KEYS, OPEN_TUI_SESSION_COLUMN_GAP, OPEN_TUI_SESSION_ATTACH_COLUMN_WIDTH, COLUMN_MINIMUMS, OPEN_TUI_SESSION_WORK_STATE_HEADER, OPEN_TUI_SESSION_PROFILE_HEADER, PROFILE_COLUMN_CAP, SESSION_PREVIEW_SIDE_BREAKPOINT_COLUMNS, SESSION_PREVIEW_STACKED_MIN_ROWS;
276896
277122
  var init_sessions_model = __esm({
276897
277123
  async "../orbh-cli/src/tui/views/sessions-model.ts"() {
276898
277124
  "use strict";
@@ -276912,6 +277138,9 @@ var init_sessions_model = __esm({
276912
277138
  workState: 8,
276913
277139
  profile: 6
276914
277140
  };
277141
+ OPEN_TUI_SESSION_WORK_STATE_HEADER = "WORK STATE";
277142
+ OPEN_TUI_SESSION_PROFILE_HEADER = "PROFILE";
277143
+ PROFILE_COLUMN_CAP = 24;
276915
277144
  SESSION_PREVIEW_SIDE_BREAKPOINT_COLUMNS = 120;
276916
277145
  SESSION_PREVIEW_STACKED_MIN_ROWS = 16;
276917
277146
  }
@@ -278629,7 +278858,7 @@ var init_session_action_modals = __esm({
278629
278858
 
278630
278859
  // ../orbh-cli/src/tui/opentui/ansi-to-styled-text.ts
278631
278860
  import {
278632
- RGBA as RGBA2,
278861
+ RGBA as RGBA3,
278633
278862
  StyledText,
278634
278863
  createTextAttributes,
278635
278864
  parseColor
@@ -278677,10 +278906,10 @@ function clampByte(value) {
278677
278906
  return Math.max(0, Math.min(255, Math.round(value)));
278678
278907
  }
278679
278908
  function colorFrom256(index) {
278680
- return RGBA2.fromIndex(clampByte(index));
278909
+ return RGBA3.fromIndex(clampByte(index));
278681
278910
  }
278682
278911
  function colorFromTruecolor(r, g5, b4) {
278683
- return RGBA2.fromInts(clampByte(r), clampByte(g5), clampByte(b4), 255);
278912
+ return RGBA3.fromInts(clampByte(r), clampByte(g5), clampByte(b4), 255);
278684
278913
  }
278685
278914
  function applySgrCodes(style, codes) {
278686
278915
  for (let i = 0; i < codes.length; i += 1) {
@@ -279040,7 +279269,7 @@ function OpenTuiSessionPreview({
279040
279269
  createElement11(
279041
279270
  Box9,
279042
279271
  { key: "status", height: 1, flexShrink: 0, flexDirection: "row", overflow: "hidden" },
279043
- createElement11(Text9, { fg: model.statusColor, attributes: TextAttributes5.BOLD }, `${model.statusGlyph} `),
279272
+ createElement11(Text9, { fg: statusToneColor(model.statusColor), attributes: TextAttributes5.BOLD }, `${model.statusGlyph} `),
279044
279273
  createElement11(Text9, { attributes: TextAttributes5.BOLD, wrapMode: "none" }, model.presentationLabel),
279045
279274
  createElement11(Text9, { ...openTuiTokens.text.dim, wrapMode: "none" }, ` ${model.profile} \xB7 ${model.duration}`),
279046
279275
  model.attachBadge ? createElement11(Text9, { fg: openTuiTokens.accent, wrapMode: "none" }, " \u21C4 attachable") : createElement11(Text9, {}, "")
@@ -280847,28 +281076,41 @@ function SessionCell({
280847
281076
  createElement13(Text11, { ...style, wrapMode: "none", truncate: true }, text)
280848
281077
  );
280849
281078
  }
280850
- function OpenTuiSessionHeaderRow({ width }) {
280851
- const widths = openTuiSessionColumnWidths(width);
281079
+ function OpenTuiSessionHeaderRow({
281080
+ width,
281081
+ content
281082
+ }) {
281083
+ const widths = openTuiSessionColumnWidths(width, content);
280852
281084
  const style = openTuiTokens.text.dim;
280853
281085
  return createElement13(
280854
281086
  Box11,
280855
281087
  { id: "opentui-session-header", height: 1, flexShrink: 0, flexDirection: "row", overflow: "hidden" },
280856
281088
  createElement13(SessionCell, { text: "", width: widths.attach, style }),
280857
281089
  createElement13(SessionCell, { text: "TITLE", width: widths.title, style }),
280858
- createElement13(SessionCell, { text: "WORK STATE", width: widths.workState, style }),
280859
- createElement13(SessionCell, { text: "PROFILE", width: widths.profile, style, trailing: true })
281090
+ createElement13(SessionCell, {
281091
+ text: alignSessionCell(OPEN_TUI_SESSION_WORK_STATE_HEADER, widths.workState),
281092
+ width: widths.workState,
281093
+ style
281094
+ }),
281095
+ createElement13(SessionCell, {
281096
+ text: alignSessionCell(OPEN_TUI_SESSION_PROFILE_HEADER, widths.profile),
281097
+ width: widths.profile,
281098
+ style,
281099
+ trailing: true
281100
+ })
280860
281101
  );
280861
281102
  }
280862
281103
  function OpenTuiSessionTableRow({
280863
281104
  row,
280864
281105
  width,
281106
+ content,
280865
281107
  selected,
280866
281108
  focused,
280867
281109
  badge,
280868
281110
  onPress
280869
281111
  }) {
280870
281112
  const columns = openTuiSessionColumns(row.session);
280871
- const widths = openTuiSessionColumnWidths(width);
281113
+ const widths = openTuiSessionColumnWidths(width, content);
280872
281114
  const style = selected ? focused ? openTuiTokens.row.selected : openTuiTokens.row.selectedUnfocused : openTuiTokens.row.normal;
280873
281115
  return createElement13(
280874
281116
  Box11,
@@ -280882,8 +281124,17 @@ function OpenTuiSessionTableRow({
280882
281124
  },
280883
281125
  createElement13(SessionCell, { text: openTuiSessionAttachCell(selected, badge), width: widths.attach, style }),
280884
281126
  createElement13(SessionCell, { text: columns.title, width: widths.title, style }),
280885
- createElement13(SessionCell, { text: columns.workState, width: widths.workState, style }),
280886
- createElement13(SessionCell, { text: columns.profile, width: widths.profile, style, trailing: true })
281127
+ createElement13(SessionCell, {
281128
+ text: alignSessionCell(columns.workState, widths.workState),
281129
+ width: widths.workState,
281130
+ style
281131
+ }),
281132
+ createElement13(SessionCell, {
281133
+ text: alignSessionCell(columns.profile, widths.profile),
281134
+ width: widths.profile,
281135
+ style,
281136
+ trailing: true
281137
+ })
280887
281138
  );
280888
281139
  }
280889
281140
  function OpenTuiSessionsView({
@@ -280933,6 +281184,12 @@ function OpenTuiSessionsView({
280933
281184
  ),
280934
281185
  [snapshot, query, status, runtime, detachedOnly, sortMode, parentId, scope]
280935
281186
  );
281187
+ const contentWidths = useMemo12(
281188
+ () => openTuiSessionContentWidths(
281189
+ rows.flatMap((row) => row.kind === "session" ? [row.session] : [])
281190
+ ),
281191
+ [rows]
281192
+ );
280936
281193
  const diagnostics = dataSource.getDiagnostics?.() ?? [];
280937
281194
  const latestDiagnostic = diagnostics.at(-1) ?? null;
280938
281195
  const diagnosticRows = latestDiagnostic ? 1 : 0;
@@ -281273,7 +281530,7 @@ function OpenTuiSessionsView({
281273
281530
  );
281274
281531
  const listChildren = [
281275
281532
  filterLine,
281276
- createElement13(OpenTuiSessionHeaderRow, { key: "header", width: listWidth })
281533
+ createElement13(OpenTuiSessionHeaderRow, { key: "header", width: listWidth, content: contentWidths })
281277
281534
  ];
281278
281535
  if (latestDiagnostic) {
281279
281536
  listChildren.push(createElement13(
@@ -281303,6 +281560,7 @@ function OpenTuiSessionsView({
281303
281560
  key: row.session.id,
281304
281561
  row,
281305
281562
  width: listWidth,
281563
+ content: contentWidths,
281306
281564
  selected,
281307
281565
  focused: listFocusBinding.focused,
281308
281566
  badge: attachBadge(snapshot, row.session.id),
@@ -281524,12 +281782,13 @@ function OpenTuiTreeRow({
281524
281782
  collapsed,
281525
281783
  snapshot,
281526
281784
  width,
281785
+ content,
281527
281786
  selected,
281528
281787
  focused,
281529
281788
  onPress
281530
281789
  }) {
281531
281790
  const columns = openTuiSessionColumns(row.session);
281532
- const widths = openTuiSessionColumnWidths(width);
281791
+ const widths = openTuiSessionColumnWidths(width, content);
281533
281792
  const hasChildren = treeRowHasChildren(treeRows, row.session.id);
281534
281793
  const manager = snapshot.managers?.[row.session.id];
281535
281794
  const model = buildSessionRowModel(row.session, {
@@ -281556,8 +281815,17 @@ function OpenTuiTreeRow({
281556
281815
  style
281557
281816
  }),
281558
281817
  createElement14(TreeCell, { text: title, width: widths.title, style }),
281559
- createElement14(TreeCell, { text: columns.workState, width: widths.workState, style }),
281560
- createElement14(TreeCell, { text: columns.profile, width: widths.profile, style, trailing: true })
281818
+ createElement14(TreeCell, {
281819
+ text: alignSessionCell(columns.workState, widths.workState),
281820
+ width: widths.workState,
281821
+ style
281822
+ }),
281823
+ createElement14(TreeCell, {
281824
+ text: alignSessionCell(columns.profile, widths.profile),
281825
+ width: widths.profile,
281826
+ style,
281827
+ trailing: true
281828
+ })
281561
281829
  );
281562
281830
  }
281563
281831
  function OpenTuiTreeView({
@@ -281601,6 +281869,10 @@ function OpenTuiTreeView({
281601
281869
  () => query.trim() ? filteredRows : visibleTreeRows(filteredRows, collapsedIds),
281602
281870
  [filteredRows, collapsedIds, query]
281603
281871
  );
281872
+ const contentWidths = useMemo13(
281873
+ () => openTuiSessionContentWidths(rows.map((row) => row.session)),
281874
+ [rows]
281875
+ );
281604
281876
  const navigationRows = useMemo13(
281605
281877
  () => rows.map((row) => ({ kind: "session", session: row.session })),
281606
281878
  [rows]
@@ -281887,7 +282159,7 @@ function OpenTuiTreeView({
281887
282159
  );
281888
282160
  const children = [
281889
282161
  filterLine,
281890
- createElement14(OpenTuiSessionHeaderRow, { key: "header", width: availableColumns })
282162
+ createElement14(OpenTuiSessionHeaderRow, { key: "header", width: availableColumns, content: contentWidths })
281891
282163
  ];
281892
282164
  if (visibleRows.length === 0) {
281893
282165
  const empty = currentView.kind === "session-children" ? "No subagents." : snapshot.treeRows.length === 0 ? "No active sessions." : "No active sessions match the search.";
@@ -281905,6 +282177,7 @@ function OpenTuiTreeView({
281905
282177
  collapsed: collapsedIds.has(row.session.id),
281906
282178
  snapshot,
281907
282179
  width: availableColumns,
282180
+ content: contentWidths,
281908
282181
  selected: row.session.id === selectedId,
281909
282182
  focused: listFocusBinding.focused,
281910
282183
  onPress: (event) => {
@@ -281993,7 +282266,7 @@ import { createCliRenderer } from "@opentui/core";
281993
282266
  function diagnosticsFor(source) {
281994
282267
  const candidate = source;
281995
282268
  return {
281996
- diagnostics: candidate.getDiagnostics?.() ?? [],
282269
+ diagnostics: [...themeWarningDiagnostics, ...candidate.getDiagnostics?.() ?? []],
281997
282270
  watcherMode: candidate.watcherMode ?? "event-driven",
281998
282271
  lastReconcileAt: candidate.getLastReconcileAt?.() ?? null,
281999
282272
  feedHealth: candidate.getChangeFeedHealth?.() ?? { mode: "live", since: 0 },
@@ -282583,7 +282856,7 @@ async function runOpenTuiApp(options) {
282583
282856
  backgroundRunner.dispose();
282584
282857
  }
282585
282858
  }
282586
- var Box13, Text13, MAIN_TABS, FOCUS_SCOPES, OPEN_TUI_KITTY_DISABLED;
282859
+ var Box13, Text13, MAIN_TABS, FOCUS_SCOPES, OPEN_TUI_KITTY_DISABLED, themeWarningDiagnostics;
282587
282860
  var init_app = __esm({
282588
282861
  async "../orbh-cli/src/tui/opentui/app.ts"() {
282589
282862
  "use strict";
@@ -282621,6 +282894,11 @@ var init_app = __esm({
282621
282894
  allKeysAsEscapes: false,
282622
282895
  reportText: false
282623
282896
  };
282897
+ themeWarningDiagnostics = openTuiThemeWarnings.map((message, index) => ({
282898
+ at: /* @__PURE__ */ new Date(),
282899
+ key: `theme-${index}`,
282900
+ message
282901
+ }));
282624
282902
  }
282625
282903
  });
282626
282904
 
@@ -284313,7 +284591,7 @@ var init_list = __esm({
284313
284591
  });
284314
284592
 
284315
284593
  // ../orbh-cli/src/commands/rebuild.ts
284316
- import { existsSync as existsSync55, readFileSync as readFileSync21, realpathSync as realpathSync9, statSync as statSync17 } from "fs";
284594
+ import { existsSync as existsSync55, readFileSync as readFileSync26, realpathSync as realpathSync9, statSync as statSync17 } from "fs";
284317
284595
  import { resolve as resolvePath6 } from "path";
284318
284596
  function resolveSessionNativeTranscript(session, fallbackCwd) {
284319
284597
  const harness = getHarness(session.runtime);
@@ -284549,7 +284827,7 @@ function discoverNativeFirstSessions(cwd2, runtimeFilter, spaceContext) {
284549
284827
  }
284550
284828
  let content;
284551
284829
  try {
284552
- content = readFileSync21(discovery.transcriptPath, "utf-8");
284830
+ content = readFileSync26(discovery.transcriptPath, "utf-8");
284553
284831
  } catch (error3) {
284554
284832
  skips.push({ id: discovery.nativeSessionId, reason: `failed to read native transcript: ${error3 instanceof Error ? error3.message : String(error3)}` });
284555
284833
  continue;
@@ -284723,7 +285001,7 @@ async function runRebuildFromNative(commandOptions, options) {
284723
285001
  }
284724
285002
  let content;
284725
285003
  try {
284726
- content = readFileSync21(transcriptPath, "utf-8");
285004
+ content = readFileSync26(transcriptPath, "utf-8");
284727
285005
  } catch (error3) {
284728
285006
  report.sessionsSkipped.push({ id: session.id, reason: `failed to read native transcript: ${error3 instanceof Error ? error3.message : String(error3)}` });
284729
285007
  continue;
@@ -284970,7 +285248,7 @@ var init_claude_interactive = __esm({
284970
285248
  });
284971
285249
 
284972
285250
  // ../orbh-cli/src/commands/claude.ts
284973
- import { readFileSync as readFileSync26, statSync as statSync18 } from "fs";
285251
+ import { readFileSync as readFileSync27, statSync as statSync18 } from "fs";
284974
285252
  function matchClaudeNativeSessions(discoveries, trackedSessions) {
284975
285253
  const byNativeId = /* @__PURE__ */ new Map();
284976
285254
  for (const session of trackedSessions) {
@@ -285012,7 +285290,7 @@ async function reimportClaudeNativeSession(context, params) {
285012
285290
  if (existingMatch?.tracked) {
285013
285291
  return { session: existingMatch.tracked, alreadyTracked: true };
285014
285292
  }
285015
- const content = readFileSync26(params.transcriptPath, "utf-8");
285293
+ const content = readFileSync27(params.transcriptPath, "utf-8");
285016
285294
  const spaceContext = resolveOrbhSpaceContext({ cwd: context.transcriptCwd, orbRootDir: context.orbRootDir, ensure: false });
285017
285295
  const facts = readNativeTranscriptFacts(harness, discovery, content, context.transcriptCwd);
285018
285296
  const session = synthesizeNativeFirstSession(harness, discovery, facts, spaceContext);
@@ -285063,7 +285341,7 @@ function buildClaudeOpenView(context) {
285063
285341
  throw new Error("Unknown runtime 'claude'.");
285064
285342
  }
285065
285343
  const discovery = { nativeSessionId: row.nativeSessionId, transcriptPath: row.transcriptPath };
285066
- const content = readFileSync26(row.transcriptPath, "utf-8");
285344
+ const content = readFileSync27(row.transcriptPath, "utf-8");
285067
285345
  const spaceContext = resolveOrbhSpaceContext({ cwd: context.transcriptCwd, orbRootDir: context.orbRootDir, ensure: false });
285068
285346
  const facts = readNativeTranscriptFacts(harness, discovery, content, context.transcriptCwd);
285069
285347
  const transient = synthesizeNativeFirstSession(harness, discovery, facts, spaceContext);
@@ -286025,7 +286303,7 @@ var init_humanchannel = __esm({
286025
286303
  // ../orbh-cli/src/finalize.ts
286026
286304
  import { mkdtempSync as mkdtempSync3, rmSync as rmSync10 } from "fs";
286027
286305
  import { tmpdir as tmpdir7 } from "os";
286028
- import { join as join95 } from "path";
286306
+ import { join as join96 } from "path";
286029
286307
  async function promoteSessionSpool(session, context, options = {}) {
286030
286308
  await ensureHarnessesRegistered();
286031
286309
  const targetSpaceId = getSessionPromotionTarget(session, context, options.targetSpaceId);
@@ -286055,14 +286333,14 @@ async function promoteSessionSpool(session, context, options = {}) {
286055
286333
  throw new Error(`Session ${shortId(session.id)} has no recorded native session id; cannot save a replayable raw bundle.`);
286056
286334
  }
286057
286335
  const store = new FileSystemOrbStore({ rootDir });
286058
- const tempRoot = mkdtempSync3(join95(tmpdir7(), "orbh-promote-"));
286336
+ const tempRoot = mkdtempSync3(join96(tmpdir7(), "orbh-promote-"));
286059
286337
  try {
286060
286338
  await saveSessionBundleWithOrb({
286061
286339
  harness,
286062
286340
  nativeSessionId,
286063
286341
  cwd: session.cwd ?? context.transcriptCwd,
286064
286342
  accountHome: session.account?.home,
286065
- outDir: join95(tempRoot, "native-bundle"),
286343
+ outDir: join96(tempRoot, "native-bundle"),
286066
286344
  orbhSessionId: session.id,
286067
286345
  title: session.title || void 0,
286068
286346
  harnessVersion: detectHarnessVersion(harness.command),
@@ -286072,7 +286350,7 @@ async function promoteSessionSpool(session, context, options = {}) {
286072
286350
  spoolId: session.spoolId,
286073
286351
  rootThreadId: session.rootThreadId
286074
286352
  });
286075
- const spoolBundleDir = join95(tempRoot, "spool-bundle");
286353
+ const spoolBundleDir = join96(tempRoot, "spool-bundle");
286076
286354
  await exportSpoolToBundleDir(store, session.spoolId, spoolBundleDir, { spaceId: sourceSpaceId });
286077
286355
  const imported = await importSpoolBundleIntoStore(store, spoolBundleDir, { targetSpaceId });
286078
286356
  if (isVersionGateError(imported)) {
@@ -288457,7 +288735,7 @@ var init_session_verbs = __esm({
288457
288735
  // ../orbh-cli/src/commands/spool-transfer.ts
288458
288736
  import { mkdtempSync as mkdtempSync4, rmSync as rmSync11 } from "fs";
288459
288737
  import { tmpdir as tmpdir8 } from "os";
288460
- import { join as join96, resolve as resolvePath7 } from "path";
288738
+ import { join as join97, resolve as resolvePath7 } from "path";
288461
288739
  function registerSpaceCommands(command, options) {
288462
288740
  const spaceCommand = command.command("space").description("Inspect and initialize Orb spaces");
288463
288741
  addOptionalPathOption(
@@ -288586,7 +288864,7 @@ function registerSpoolTransferCommands(command, options) {
288586
288864
  process.exit(1);
288587
288865
  }
288588
288866
  const store = new FileSystemOrbStore({ rootDir });
288589
- const tempRoot = mkdtempSync4(join96(tmpdir8(), "orbh-move-spool-"));
288867
+ const tempRoot = mkdtempSync4(join97(tmpdir8(), "orbh-move-spool-"));
288590
288868
  try {
288591
288869
  await exportSpoolToBundleDir(store, spoolId, tempRoot, { spaceId: fromSpaceId });
288592
288870
  const imported = await importSpoolBundleIntoStore(store, tempRoot, { targetSpaceId: toSpaceId });
@@ -288658,7 +288936,7 @@ function registerSpoolTransferCommands(command, options) {
288658
288936
  console.error(theme.error(`Error: Unknown runtime '${runtime}'.`));
288659
288937
  process.exit(1);
288660
288938
  }
288661
- const outDir = outOverride ?? join96(context.transcriptCwd, "Exports", "Orbh Bundles", defaultBundleDirName(runtime, nativeSessionId));
288939
+ const outDir = outOverride ?? join97(context.transcriptCwd, "Exports", "Orbh Bundles", defaultBundleDirName(runtime, nativeSessionId));
288662
288940
  try {
288663
288941
  const baseSaveOptions = {
288664
288942
  harness,
@@ -289328,7 +289606,7 @@ function OpenTuiChromeShell({
289328
289606
  flexShrink: 0,
289329
289607
  flexDirection: "row",
289330
289608
  justifyContent: "space-between",
289331
- backgroundColor: "#1a1a1a"
289609
+ backgroundColor: openTuiTokens.surface.header
289332
289610
  },
289333
289611
  createElement17(
289334
289612
  Box14,
@@ -289371,7 +289649,7 @@ function OpenTuiChromeShell({
289371
289649
  id: "chrome-shell-menu-button",
289372
289650
  width: CHROME_MENU_BUTTON_WIDTH,
289373
289651
  flexShrink: 0,
289374
- backgroundColor: "#2a2a2a",
289652
+ backgroundColor: openTuiTokens.surface.raised,
289375
289653
  onMouseDown: (event) => {
289376
289654
  if (event.button !== MouseButton5.LEFT) return;
289377
289655
  if (modalRef.current?.kind === "menu") closeModal();
@@ -290064,9 +290342,9 @@ var init_manager_picker = __esm({
290064
290342
  // src/index.ts
290065
290343
  await init_dist4();
290066
290344
  init_dist11();
290067
- import { readFileSync as readFileSync29 } from "fs";
290345
+ import { readFileSync as readFileSync30 } from "fs";
290068
290346
  import { fileURLToPath as fileURLToPath8 } from "url";
290069
- import { dirname as dirname40, join as join108 } from "path";
290347
+ import { dirname as dirname40, join as join109 } from "path";
290070
290348
 
290071
290349
  // src/commands/setup/mandatory.ts
290072
290350
  await init_dist4();
@@ -296516,8 +296794,8 @@ import { spawnSync as spawnSync8 } from "child_process";
296516
296794
  // ../orbh-cli/src/index.ts
296517
296795
  await init_dist4();
296518
296796
  init_dist16();
296519
- import { readFileSync as readFileSync28 } from "fs";
296520
- import { dirname as dirname38, join as join99, resolve as resolvePath8 } from "path";
296797
+ import { readFileSync as readFileSync29 } from "fs";
296798
+ import { dirname as dirname38, join as join100, resolve as resolvePath8 } from "path";
296521
296799
  import { fileURLToPath as fileURLToPath7 } from "url";
296522
296800
 
296523
296801
  // ../orbh-cli/src/commands/launch.ts
@@ -296530,7 +296808,7 @@ await init_scope_discovery();
296530
296808
  await init_manager_handoff();
296531
296809
  import { randomUUID as randomUUID41 } from "crypto";
296532
296810
  import { mkdirSync as mkdirSync12, renameSync as renameSync6, writeFileSync as writeFileSync7, existsSync as existsSync56, rmSync as rmSync12 } from "fs";
296533
- import { basename as basename30, dirname as dirname36, join as join97 } from "path";
296811
+ import { basename as basename30, dirname as dirname36, join as join98 } from "path";
296534
296812
 
296535
296813
  // ../orbh-cli/src/continuation-spec.ts
296536
296814
  import { closeSync as closeSync8, openSync as openSync9, readFileSync as readFileSync18, rmSync as rmSync8, statSync as statSync14, writeFileSync as writeFileSync6 } from "fs";
@@ -296798,7 +297076,7 @@ function exitForLaunchError(error3) {
296798
297076
  }
296799
297077
  function writeDetachedManagerPayload(readyFile, payload) {
296800
297078
  mkdirSync12(dirname36(readyFile), { recursive: true });
296801
- const tempFile = join97(dirname36(readyFile), `.${basename30(readyFile)}.${process.pid}.tmp`);
297079
+ const tempFile = join98(dirname36(readyFile), `.${basename30(readyFile)}.${process.pid}.tmp`);
296802
297080
  writeFileSync7(tempFile, `${JSON.stringify(payload, null, 2)}
296803
297081
  `, "utf-8");
296804
297082
  renameSync6(tempFile, readyFile);
@@ -298131,7 +298409,7 @@ await init_manager_socket_client();
298131
298409
  await init_terminal_format();
298132
298410
  await init_terminal_rendering();
298133
298411
  await init_pure();
298134
- import { existsSync as existsSync57, readFileSync as readFileSync27 } from "fs";
298412
+ import { existsSync as existsSync57, readFileSync as readFileSync28 } from "fs";
298135
298413
  import { basename as basename31, dirname as dirname37 } from "path";
298136
298414
  async function readSpoolSnapshotsForSessions(rootDir, sessionIds) {
298137
298415
  const store = new FileSystemOrbStore({ rootDir });
@@ -298169,7 +298447,7 @@ function registerOrchestratorCommands(command, options) {
298169
298447
  const readOrchestratorLock = () => {
298170
298448
  try {
298171
298449
  const parsed = JSON.parse(
298172
- readFileSync27(resolveOrbhOrchestratorLockPath(), "utf8")
298450
+ readFileSync28(resolveOrbhOrchestratorLockPath(), "utf8")
298173
298451
  );
298174
298452
  return {
298175
298453
  pid: typeof parsed.pid === "number" ? parsed.pid : null,
@@ -298905,8 +299183,8 @@ init_harness_registry();
298905
299183
  await init_terminal_rendering();
298906
299184
  import { spawnSync as spawnSync7 } from "child_process";
298907
299185
  import { existsSync as existsSync58 } from "fs";
298908
- import { homedir as homedir19 } from "os";
298909
- import { join as join98 } from "path";
299186
+ import { homedir as homedir20 } from "os";
299187
+ import { join as join99 } from "path";
298910
299188
  async function confirmRemoval(runtime, name) {
298911
299189
  if (!isInteractive3()) {
298912
299190
  throw new Error("Refusing to remove an account without an interactive terminal. Pass --yes to confirm.");
@@ -299203,10 +299481,10 @@ function resolveVanillaHomes(runtime) {
299203
299481
  else delete process.env[envVar];
299204
299482
  }
299205
299483
  if (homes.length === 0) {
299206
- homes.push(join98(homedir19(), `.${runtime}`));
299484
+ homes.push(join99(homedir20(), `.${runtime}`));
299207
299485
  }
299208
299486
  if (runtime === "claude") {
299209
- const configClaude = join98(homedir19(), ".config", "claude");
299487
+ const configClaude = join99(homedir20(), ".config", "claude");
299210
299488
  if (existsSync58(configClaude) && !homes.includes(configClaude)) {
299211
299489
  homes.push(configClaude);
299212
299490
  }
@@ -299405,7 +299683,7 @@ function createStandaloneOrbhCommand() {
299405
299683
  return command;
299406
299684
  }
299407
299685
  var __dirname5 = dirname38(fileURLToPath7(import.meta.url));
299408
- var pkg = JSON.parse(readFileSync28(join99(__dirname5, "..", "package.json"), "utf-8"));
299686
+ var pkg = JSON.parse(readFileSync29(join100(__dirname5, "..", "package.json"), "utf-8"));
299409
299687
  function createStandaloneOrbhProgram() {
299410
299688
  return createStandaloneOrbhCommand().version(formatVersion(pkg.version ?? "0.0.0"));
299411
299689
  }
@@ -299526,7 +299804,7 @@ await init_dist4();
299526
299804
  init_dist11();
299527
299805
  import { rm as rm21, rename as rename20 } from "fs/promises";
299528
299806
  import { spawn as spawn20 } from "child_process";
299529
- import { join as join100 } from "path";
299807
+ import { join as join101 } from "path";
299530
299808
  async function requireTinderboxRoot() {
299531
299809
  const root = await findTinderboxRoot(process.cwd());
299532
299810
  if (!root) {
@@ -300412,7 +300690,7 @@ var tinderboxCommand = new Command("tinderbox").description("Orchestrate operati
300412
300690
  if (opts.from) {
300413
300691
  const url = opts.from;
300414
300692
  const tempFolderName = createTempTinderboxCloneFolderName();
300415
- const tempDestination = join100(cwd2, tempFolderName);
300693
+ const tempDestination = join101(cwd2, tempFolderName);
300416
300694
  const sp = spinner(`Cloning ${theme.accent(url)}${symbols.ellipsis}`);
300417
300695
  const clone = await runGit(cwd2, ["clone", url, tempFolderName], {
300418
300696
  env: { GIT_TERMINAL_PROMPT: "0", GCM_INTERACTIVE: "never" }
@@ -300423,7 +300701,7 @@ var tinderboxCommand = new Command("tinderbox").description("Orchestrate operati
300423
300701
  fail(`Clone failed: ${clone.error}`);
300424
300702
  }
300425
300703
  sp.succeed("Cloned");
300426
- if (!await exists(join100(tempDestination, "tinderbox.toml"))) {
300704
+ if (!await exists(join101(tempDestination, "tinderbox.toml"))) {
300427
300705
  await rm21(tempDestination, { recursive: true, force: true });
300428
300706
  fail("Cloned repository is not a Tinderbox (missing tinderbox.toml).");
300429
300707
  }
@@ -300443,7 +300721,7 @@ var tinderboxCommand = new Command("tinderbox").description("Orchestrate operati
300443
300721
  console.log(theme.muted(`Using Tinderbox name from tinderbox.toml: ${name}`));
300444
300722
  }
300445
300723
  const folderName = getTinderboxFolderNameForRoot(name);
300446
- const destination = join100(cwd2, folderName);
300724
+ const destination = join101(cwd2, folderName);
300447
300725
  if (await exists(destination)) {
300448
300726
  await rm21(tempDestination, { recursive: true, force: true });
300449
300727
  fail(`Destination already exists: ${destination}`);
@@ -300527,7 +300805,7 @@ var tinderboxCommand = new Command("tinderbox").description("Orchestrate operati
300527
300805
  return;
300528
300806
  }
300529
300807
  if (registered2 && !opts.yes) {
300530
- const destination = join100(root, getTinderboxFolderName(name, registered2.type));
300808
+ const destination = join101(root, getTinderboxFolderName(name, registered2.type));
300531
300809
  console.log(`${symbols.warning} Import will MOVE the Flint into this Tinderbox:`);
300532
300810
  console.log(theme.muted(` ${abbreviatePath(registered2.path)} ${symbols.arrowRight} ${abbreviatePath(destination)}`));
300533
300811
  markOutput();
@@ -301212,7 +301490,7 @@ serverCommand.command("list").description("List all running Flint servers from t
301212
301490
  await init_dist4();
301213
301491
  init_dist11();
301214
301492
  import { readFile as readFile48, readdir as readdir30, rm as rm28 } from "fs/promises";
301215
- import { join as join101 } from "path";
301493
+ import { join as join104 } from "path";
301216
301494
  async function readJsonFile3(filePath) {
301217
301495
  try {
301218
301496
  const raw = await readFile48(filePath, "utf-8");
@@ -301223,7 +301501,7 @@ async function readJsonFile3(filePath) {
301223
301501
  }
301224
301502
  var steelCommand = new Command("steel").description("Manage Steel UI state (.steel/ directory)").addCommand(
301225
301503
  new Command("preferences").description("Show Steel preferences").option("-p, --path <dir>", "Path to flint (default: auto-detect)").option("--reset", "Clear all Steel preferences").action(withFlint(async (flintPath, options) => {
301226
- const prefsPath = join101(flintPath, ".steel", "preferences.json");
301504
+ const prefsPath = join104(flintPath, ".steel", "preferences.json");
301227
301505
  if (options.reset) {
301228
301506
  if (await exists(prefsPath)) {
301229
301507
  await rm28(prefsPath);
@@ -301242,7 +301520,7 @@ var steelCommand = new Command("steel").description("Manage Steel UI state (.ste
301242
301520
  }))
301243
301521
  ).addCommand(
301244
301522
  new Command("state").description("Show plate state").argument("<plate-name>", "Name of the plate").option("-p, --path <dir>", "Path to flint (default: auto-detect)").option("--reset", "Clear all state for this plate").action(withFlint(async (flintPath, plateName, options) => {
301245
- const plateDir = join101(flintPath, ".steel", "plates", plateName);
301523
+ const plateDir = join104(flintPath, ".steel", "plates", plateName);
301246
301524
  if (options.reset) {
301247
301525
  if (await exists(plateDir)) {
301248
301526
  await rm28(plateDir, { recursive: true });
@@ -301265,7 +301543,7 @@ var steelCommand = new Command("steel").description("Manage Steel UI state (.ste
301265
301543
  section3(`Plate State \u2014 ${plateName}`);
301266
301544
  for (const file of stateFiles) {
301267
301545
  const key = file.name.replace(/\.json$/, "");
301268
- const data = await readJsonFile3(join101(plateDir, file.name));
301546
+ const data = await readJsonFile3(join104(plateDir, file.name));
301269
301547
  blank();
301270
301548
  console.log(`${theme.accent(key)}:`);
301271
301549
  console.log(JSON.stringify(data, null, 2));
@@ -301274,7 +301552,7 @@ var steelCommand = new Command("steel").description("Manage Steel UI state (.ste
301274
301552
  }))
301275
301553
  ).addCommand(
301276
301554
  new Command("boards").description("List board/view configs for a plate").argument("<plate-name>", "Name of the plate").option("-p, --path <dir>", "Path to flint (default: auto-detect)").action(withFlint(async (flintPath, plateName, options) => {
301277
- const boardsDir = join101(flintPath, ".steel", "plates", plateName, "boards");
301555
+ const boardsDir = join104(flintPath, ".steel", "plates", plateName, "boards");
301278
301556
  if (!await exists(boardsDir)) {
301279
301557
  console.log(theme.muted(`No board configs found for plate: ${plateName}`));
301280
301558
  return;
@@ -301301,8 +301579,8 @@ init_prompt();
301301
301579
  init_dist11();
301302
301580
  init_prompt();
301303
301581
  import { readFile as readFile49, rename as rename21, rm as rm29, stat as stat35 } from "fs/promises";
301304
- import { homedir as homedir20 } from "os";
301305
- import { basename as basename34, join as join104, resolve as resolve40 } from "path";
301582
+ import { homedir as homedir21 } from "os";
301583
+ import { basename as basename34, join as join105, resolve as resolve40 } from "path";
301306
301584
  var BLACKSMITH_ALIASES = ["blacksmith", "your computer"];
301307
301585
  var defaultRestoreDependencies = {
301308
301586
  rename: rename21,
@@ -301320,8 +301598,8 @@ async function pathExists6(path37) {
301320
301598
  }
301321
301599
  }
301322
301600
  async function restoreBlacksmithObsidianPayload(flintPath, dependencies = defaultRestoreDependencies) {
301323
- const obsidianPath = join104(flintPath, ".obsidian");
301324
- const backupPath = join104(
301601
+ const obsidianPath = join105(flintPath, ".obsidian");
301602
+ const backupPath = join105(
301325
301603
  flintPath,
301326
301604
  `.obsidian.unverified-${dependencies.pid}-${dependencies.now()}`
301327
301605
  );
@@ -301352,22 +301630,22 @@ async function restoreBlacksmithObsidianPayload(flintPath, dependencies = defaul
301352
301630
  }
301353
301631
  function resolveNuuHome2() {
301354
301632
  const override = process.env.NUU_HOME?.trim();
301355
- return override ? resolve40(override) : join104(homedir20(), ".nuucognition");
301633
+ return override ? resolve40(override) : join105(homedir21(), ".nuucognition");
301356
301634
  }
301357
301635
  async function readBlacksmithDaemonProjectionHealth() {
301358
- const blacksmithHome = join104(resolveNuuHome2(), "blacksmith");
301636
+ const blacksmithHome = join105(resolveNuuHome2(), "blacksmith");
301359
301637
  let endpoint = null;
301360
301638
  let resources = [];
301361
301639
  try {
301362
301640
  const projection = JSON.parse(
301363
- await readFile49(join104(blacksmithHome, "blacksmith.json"), "utf8")
301641
+ await readFile49(join105(blacksmithHome, "blacksmith.json"), "utf8")
301364
301642
  );
301365
301643
  endpoint = typeof projection.endpoint === "string" ? projection.endpoint : null;
301366
301644
  } catch {
301367
301645
  }
301368
301646
  try {
301369
301647
  const projection = JSON.parse(
301370
- await readFile49(join104(blacksmithHome, "resources.json"), "utf8")
301648
+ await readFile49(join105(blacksmithHome, "resources.json"), "utf8")
301371
301649
  );
301372
301650
  if (Array.isArray(projection.resources)) {
301373
301651
  resources = projection.resources;
@@ -301418,7 +301696,7 @@ var defaultDependencies5 = {
301418
301696
  async function runBlacksmithSetup(properName, dependencies = defaultDependencies5) {
301419
301697
  section3("Blacksmith Flint");
301420
301698
  const registeredBlacksmith = (await dependencies.getRegistry()).find((entry2) => entry2.type === "blacksmith") ?? null;
301421
- const canonicalPath2 = join104(homedir20(), `(Blacksmith) ${properName.displayName}`);
301699
+ const canonicalPath2 = join105(homedir21(), `(Blacksmith) ${properName.displayName}`);
301422
301700
  const requested = await dependencies.input({
301423
301701
  message: "Blacksmith Flint path:",
301424
301702
  default: registeredBlacksmith?.path ?? canonicalPath2,
@@ -301479,7 +301757,7 @@ async function runBlacksmithSetup(properName, dependencies = defaultDependencies
301479
301757
  }
301480
301758
  let payload = await dependencies.verifyPayload(entry.path);
301481
301759
  if (!payload.verified) {
301482
- const payloadPath = join104(entry.path, ".obsidian");
301760
+ const payloadPath = join105(entry.path, ".obsidian");
301483
301761
  if (await dependencies.pathExists(payloadPath)) {
301484
301762
  dependencies.output(
301485
301763
  "UNVERIFIED OBSIDIAN PAYLOAD \u2014 replacing .obsidian with the canonical pinned payload; auto-trust remains disabled until verification passes."
@@ -301531,8 +301809,8 @@ async function runBlacksmithSetup(properName, dependencies = defaultDependencies
301531
301809
 
301532
301810
  // src/commands/setup/setup.ts
301533
301811
  import { mkdir as mkdir31, readFile as readFile50, writeFile as writeFile31 } from "fs/promises";
301534
- import { homedir as homedir21 } from "os";
301535
- import { dirname as dirname39, join as join105 } from "path";
301812
+ import { homedir as homedir26 } from "os";
301813
+ import { dirname as dirname39, join as join106 } from "path";
301536
301814
  var SUPPORTED_SHELLS = ["zsh", "bash", "fish"];
301537
301815
  var BLOCK_BEGIN = "# >>> orbh shell-integration >>>";
301538
301816
  var BLOCK_END = "# <<< orbh shell-integration <<<";
@@ -301599,15 +301877,15 @@ function detectShell(override) {
301599
301877
  return process.platform === "darwin" ? "zsh" : "bash";
301600
301878
  }
301601
301879
  function resolveRcFile(shell) {
301602
- const home = homedir21();
301880
+ const home = homedir26();
301603
301881
  switch (shell) {
301604
301882
  case "zsh":
301605
- return process.env.ZDOTDIR ? join105(process.env.ZDOTDIR, ".zshrc") : join105(home, ".zshrc");
301883
+ return process.env.ZDOTDIR ? join106(process.env.ZDOTDIR, ".zshrc") : join106(home, ".zshrc");
301606
301884
  case "bash":
301607
- return join105(home, ".bashrc");
301885
+ return join106(home, ".bashrc");
301608
301886
  case "fish": {
301609
- const base = process.env.XDG_CONFIG_HOME ?? join105(home, ".config");
301610
- return join105(base, "fish", "config.fish");
301887
+ const base = process.env.XDG_CONFIG_HOME ?? join106(home, ".config");
301888
+ return join106(base, "fish", "config.fish");
301611
301889
  }
301612
301890
  }
301613
301891
  }
@@ -302277,7 +302555,7 @@ await init_dist4();
302277
302555
 
302278
302556
  // src/commands/system/helper/_shared.ts
302279
302557
  import { readdirSync as readdirSync10, existsSync as existsSync59, statSync as statSync19 } from "fs";
302280
- import { join as join106, basename as basename35 } from "path";
302558
+ import { join as join107, basename as basename35 } from "path";
302281
302559
  function extractNumberFromFile(filename, typeName) {
302282
302560
  const regex3 = new RegExp(`^\\(${typeName}\\)\\s+(\\d+)`, "i");
302283
302561
  const match2 = filename.match(regex3);
@@ -302287,7 +302565,7 @@ function collectFilesRecursively(dirPath) {
302287
302565
  const files = [];
302288
302566
  if (!existsSync59(dirPath)) return files;
302289
302567
  for (const entry of readdirSync10(dirPath)) {
302290
- const fullPath = join106(dirPath, entry);
302568
+ const fullPath = join107(dirPath, entry);
302291
302569
  try {
302292
302570
  const stat36 = statSync19(fullPath);
302293
302571
  if (stat36.isDirectory()) files.push(...collectFilesRecursively(fullPath));
@@ -302299,7 +302577,7 @@ function collectFilesRecursively(dirPath) {
302299
302577
  return files;
302300
302578
  }
302301
302579
  function getNextNumber(flintPath, typeName) {
302302
- const meshDir = join106(flintPath, "Mesh");
302580
+ const meshDir = join107(flintPath, "Mesh");
302303
302581
  if (!existsSync59(meshDir)) return 1;
302304
302582
  const numbers = collectFilesRecursively(meshDir).map((f2) => extractNumberFromFile(f2, typeName)).filter((n) => n !== null);
302305
302583
  return numbers.length === 0 ? 1 : Math.max(...numbers) + 1;
@@ -302846,7 +303124,7 @@ import path35 from "path";
302846
303124
  // ../../packages/flint-mcp/src/type-numbers.ts
302847
303125
  init_dist11();
302848
303126
  import { readdirSync as readdirSync11, existsSync as existsSync60, statSync as statSync20 } from "fs";
302849
- import { join as join107, basename as basename37 } from "path";
303127
+ import { join as join108, basename as basename37 } from "path";
302850
303128
  function extractNumberFromFile2(filename, typeName) {
302851
303129
  const regex3 = new RegExp(`^\\(${escapeRegex(typeName)}\\)\\s+(\\d+)`, "i");
302852
303130
  const match2 = filename.match(regex3);
@@ -302856,7 +303134,7 @@ function collectFilesRecursively2(dirPath) {
302856
303134
  const files = [];
302857
303135
  if (!existsSync60(dirPath)) return files;
302858
303136
  for (const entry of readdirSync11(dirPath)) {
302859
- const fullPath = join107(dirPath, entry);
303137
+ const fullPath = join108(dirPath, entry);
302860
303138
  try {
302861
303139
  const stat36 = statSync20(fullPath);
302862
303140
  if (stat36.isDirectory()) files.push(...collectFilesRecursively2(fullPath));
@@ -302868,7 +303146,7 @@ function collectFilesRecursively2(dirPath) {
302868
303146
  return files;
302869
303147
  }
302870
303148
  function getNextNumber2(flintPath, typeName) {
302871
- const meshDir = join107(flintPath, "Mesh");
303149
+ const meshDir = join108(flintPath, "Mesh");
302872
303150
  if (!existsSync60(meshDir)) return 1;
302873
303151
  const numbers = collectFilesRecursively2(meshDir).map((f2) => extractNumberFromFile2(f2, typeName)).filter((n) => n !== null);
302874
303152
  return numbers.length === 0 ? 1 : Math.max(...numbers) + 1;
@@ -303559,7 +303837,7 @@ perfCommand.command("watch").description("Stream perf samples live (Ctrl+C to st
303559
303837
  // src/index.ts
303560
303838
  setWarningHandler(warn);
303561
303839
  var __dirname6 = dirname40(fileURLToPath8(import.meta.url));
303562
- var pkg2 = JSON.parse(readFileSync29(join108(__dirname6, "..", "package.json"), "utf-8"));
303840
+ var pkg2 = JSON.parse(readFileSync30(join109(__dirname6, "..", "package.json"), "utf-8"));
303563
303841
  var env7 = resolveEnv("flint");
303564
303842
  var authenticated = hasAuth(env7);
303565
303843
  var whoamiCommand = createIdentityWhoamiCommand(env7);