@floless/app 0.109.0 → 0.109.1

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.
@@ -3887,9 +3887,9 @@ var require_caller = __commonJS({
3887
3887
  if (!Array.isArray(stack)) {
3888
3888
  return void 0;
3889
3889
  }
3890
- const entries = stack.slice(2);
3890
+ const entries2 = stack.slice(2);
3891
3891
  const fileNames = [];
3892
- for (const entry2 of entries) {
3892
+ for (const entry2 of entries2) {
3893
3893
  if (!entry2) {
3894
3894
  continue;
3895
3895
  }
@@ -11213,13 +11213,13 @@ var require_context = __commonJS({
11213
11213
  this.server = server;
11214
11214
  }
11215
11215
  function defaultSchemaErrorFormatter(errors, dataVar) {
11216
- let text2 = "";
11216
+ let text3 = "";
11217
11217
  const separator = ", ";
11218
11218
  for (let i = 0; i !== errors.length; ++i) {
11219
11219
  const e = errors[i];
11220
- text2 += dataVar + (e.instancePath || "") + " " + e.message + separator;
11220
+ text3 += dataVar + (e.instancePath || "") + " " + e.message + separator;
11221
11221
  }
11222
- return new Error(text2.slice(0, -separator.length));
11222
+ return new Error(text3.slice(0, -separator.length));
11223
11223
  }
11224
11224
  module2.exports = Context;
11225
11225
  }
@@ -11915,20 +11915,20 @@ var require_secure_json_parse = __commonJS({
11915
11915
  var hasBuffer = typeof Buffer !== "undefined";
11916
11916
  var suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
11917
11917
  var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
11918
- function _parse(text2, reviver, options) {
11918
+ function _parse(text3, reviver, options) {
11919
11919
  if (options == null) {
11920
11920
  if (reviver !== null && typeof reviver === "object") {
11921
11921
  options = reviver;
11922
11922
  reviver = void 0;
11923
11923
  }
11924
11924
  }
11925
- if (hasBuffer && Buffer.isBuffer(text2)) {
11926
- text2 = text2.toString();
11925
+ if (hasBuffer && Buffer.isBuffer(text3)) {
11926
+ text3 = text3.toString();
11927
11927
  }
11928
- if (text2 && text2.charCodeAt(0) === 65279) {
11929
- text2 = text2.slice(1);
11928
+ if (text3 && text3.charCodeAt(0) === 65279) {
11929
+ text3 = text3.slice(1);
11930
11930
  }
11931
- const obj2 = JSON.parse(text2, reviver);
11931
+ const obj2 = JSON.parse(text3, reviver);
11932
11932
  if (obj2 === null || typeof obj2 !== "object") {
11933
11933
  return obj2;
11934
11934
  }
@@ -11938,15 +11938,15 @@ var require_secure_json_parse = __commonJS({
11938
11938
  return obj2;
11939
11939
  }
11940
11940
  if (protoAction !== "ignore" && constructorAction !== "ignore") {
11941
- if (suspectProtoRx.test(text2) === false && suspectConstructorRx.test(text2) === false) {
11941
+ if (suspectProtoRx.test(text3) === false && suspectConstructorRx.test(text3) === false) {
11942
11942
  return obj2;
11943
11943
  }
11944
11944
  } else if (protoAction !== "ignore" && constructorAction === "ignore") {
11945
- if (suspectProtoRx.test(text2) === false) {
11945
+ if (suspectProtoRx.test(text3) === false) {
11946
11946
  return obj2;
11947
11947
  }
11948
11948
  } else {
11949
- if (suspectConstructorRx.test(text2) === false) {
11949
+ if (suspectConstructorRx.test(text3) === false) {
11950
11950
  return obj2;
11951
11951
  }
11952
11952
  }
@@ -11984,20 +11984,20 @@ var require_secure_json_parse = __commonJS({
11984
11984
  }
11985
11985
  return obj2;
11986
11986
  }
11987
- function parse(text2, reviver, options) {
11987
+ function parse(text3, reviver, options) {
11988
11988
  const { stackTraceLimit } = Error;
11989
11989
  Error.stackTraceLimit = 0;
11990
11990
  try {
11991
- return _parse(text2, reviver, options);
11991
+ return _parse(text3, reviver, options);
11992
11992
  } finally {
11993
11993
  Error.stackTraceLimit = stackTraceLimit;
11994
11994
  }
11995
11995
  }
11996
- function safeParse(text2, reviver) {
11996
+ function safeParse(text3, reviver) {
11997
11997
  const { stackTraceLimit } = Error;
11998
11998
  Error.stackTraceLimit = 0;
11999
11999
  try {
12000
- return _parse(text2, reviver, { safe: true });
12000
+ return _parse(text3, reviver, { safe: true });
12001
12001
  } catch {
12002
12002
  return void 0;
12003
12003
  } finally {
@@ -16640,7 +16640,7 @@ var require_core = __commonJS({
16640
16640
  errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
16641
16641
  if (!errors || errors.length === 0)
16642
16642
  return "No errors";
16643
- return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text2, msg) => text2 + separator + msg);
16643
+ return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text3, msg) => text3 + separator + msg);
16644
16644
  }
16645
16645
  $dataMetaSchema(metaSchema, keywordsJsonPointers) {
16646
16646
  const rules = this.RULES.all;
@@ -38743,12 +38743,12 @@ var require_commonjs5 = __commonJS({
38743
38743
  }
38744
38744
  this.#readdirCBInFlight = true;
38745
38745
  const fullpath = this.fullpath();
38746
- this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {
38746
+ this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries2) => {
38747
38747
  if (er) {
38748
38748
  this.#readdirFail(er.code);
38749
38749
  children.provisional = 0;
38750
38750
  } else {
38751
- for (const e of entries) {
38751
+ for (const e of entries2) {
38752
38752
  this.#readdirAddChild(e, children);
38753
38753
  }
38754
38754
  this.#readdirSuccess(children);
@@ -39305,11 +39305,11 @@ var require_commonjs5 = __commonJS({
39305
39305
  const dirs = /* @__PURE__ */ new Set();
39306
39306
  const walk2 = (dir, cb) => {
39307
39307
  dirs.add(dir);
39308
- dir.readdirCB((er, entries) => {
39308
+ dir.readdirCB((er, entries2) => {
39309
39309
  if (er) {
39310
39310
  return cb(er);
39311
39311
  }
39312
- let len = entries.length;
39312
+ let len = entries2.length;
39313
39313
  if (!len)
39314
39314
  return cb();
39315
39315
  const next = () => {
@@ -39317,7 +39317,7 @@ var require_commonjs5 = __commonJS({
39317
39317
  cb();
39318
39318
  }
39319
39319
  };
39320
- for (const e of entries) {
39320
+ for (const e of entries2) {
39321
39321
  if (!filter || filter(e)) {
39322
39322
  results.push(withFileTypes ? e : e.fullpath());
39323
39323
  }
@@ -39356,8 +39356,8 @@ var require_commonjs5 = __commonJS({
39356
39356
  }
39357
39357
  const dirs = /* @__PURE__ */ new Set([entry2]);
39358
39358
  for (const dir of dirs) {
39359
- const entries = dir.readdirSync();
39360
- for (const e of entries) {
39359
+ const entries2 = dir.readdirSync();
39360
+ for (const e of entries2) {
39361
39361
  if (!filter || filter(e)) {
39362
39362
  results.push(withFileTypes ? e : e.fullpath());
39363
39363
  }
@@ -39417,8 +39417,8 @@ var require_commonjs5 = __commonJS({
39417
39417
  }
39418
39418
  const dirs = /* @__PURE__ */ new Set([entry2]);
39419
39419
  for (const dir of dirs) {
39420
- const entries = dir.readdirSync();
39421
- for (const e of entries) {
39420
+ const entries2 = dir.readdirSync();
39421
+ for (const e of entries2) {
39422
39422
  if (!filter || filter(e)) {
39423
39423
  yield withFileTypes ? e : e.fullpath();
39424
39424
  }
@@ -39461,22 +39461,22 @@ var require_commonjs5 = __commonJS({
39461
39461
  }
39462
39462
  processing++;
39463
39463
  dirs.add(dir);
39464
- const onReaddir = (er, entries, didRealpaths = false) => {
39464
+ const onReaddir = (er, entries2, didRealpaths = false) => {
39465
39465
  if (er)
39466
39466
  return results.emit("error", er);
39467
39467
  if (follow && !didRealpaths) {
39468
39468
  const promises = [];
39469
- for (const e of entries) {
39469
+ for (const e of entries2) {
39470
39470
  if (e.isSymbolicLink()) {
39471
39471
  promises.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r));
39472
39472
  }
39473
39473
  }
39474
39474
  if (promises.length) {
39475
- Promise.all(promises).then(() => onReaddir(null, entries, true));
39475
+ Promise.all(promises).then(() => onReaddir(null, entries2, true));
39476
39476
  return;
39477
39477
  }
39478
39478
  }
39479
- for (const e of entries) {
39479
+ for (const e of entries2) {
39480
39480
  if (e && (!filter || filter(e))) {
39481
39481
  if (!results.write(withFileTypes ? e : e.fullpath())) {
39482
39482
  paused = true;
@@ -39484,7 +39484,7 @@ var require_commonjs5 = __commonJS({
39484
39484
  }
39485
39485
  }
39486
39486
  processing--;
39487
- for (const e of entries) {
39487
+ for (const e of entries2) {
39488
39488
  const r = e.realpathCached() || e;
39489
39489
  if (r.shouldWalk(dirs, walkFilter)) {
39490
39490
  queue2.push(r);
@@ -39530,8 +39530,8 @@ var require_commonjs5 = __commonJS({
39530
39530
  }
39531
39531
  processing++;
39532
39532
  dirs.add(dir);
39533
- const entries = dir.readdirSync();
39534
- for (const e of entries) {
39533
+ const entries2 = dir.readdirSync();
39534
+ for (const e of entries2) {
39535
39535
  if (!filter || filter(e)) {
39536
39536
  if (!results.write(withFileTypes ? e : e.fullpath())) {
39537
39537
  paused = true;
@@ -39539,7 +39539,7 @@ var require_commonjs5 = __commonJS({
39539
39539
  }
39540
39540
  }
39541
39541
  processing--;
39542
- for (const e of entries) {
39542
+ for (const e of entries2) {
39543
39543
  let r = e;
39544
39544
  if (e.isSymbolicLink()) {
39545
39545
  if (!(follow && (r = e.realpathSync())))
@@ -40072,10 +40072,10 @@ var require_processor = __commonJS({
40072
40072
  // child entry, and a set of matches, and
40073
40073
  // a hasWalkedCache that's a copy of this one
40074
40074
  // then we're going to call
40075
- filterEntries(parent, entries) {
40075
+ filterEntries(parent, entries2) {
40076
40076
  const patterns = this.subwalks.get(parent);
40077
40077
  const results = this.child();
40078
- for (const e of entries) {
40078
+ for (const e of entries2) {
40079
40079
  for (const pattern of patterns) {
40080
40080
  const absolute = pattern.isAbsolute();
40081
40081
  const p = pattern.pattern();
@@ -40327,13 +40327,13 @@ var require_walker = __commonJS({
40327
40327
  if (t.calledReaddir())
40328
40328
  this.walkCB3(t, childrenCached, processor, next);
40329
40329
  else {
40330
- t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true);
40330
+ t.readdirCB((_, entries2) => this.walkCB3(t, entries2, processor, next), true);
40331
40331
  }
40332
40332
  }
40333
40333
  next();
40334
40334
  }
40335
- walkCB3(target, entries, processor, cb) {
40336
- processor = processor.filterEntries(target, entries);
40335
+ walkCB3(target, entries2, processor, cb) {
40336
+ processor = processor.filterEntries(target, entries2);
40337
40337
  let tasks = 1;
40338
40338
  const next = () => {
40339
40339
  if (--tasks === 0)
@@ -40386,8 +40386,8 @@ var require_walker = __commonJS({
40386
40386
  }
40387
40387
  next();
40388
40388
  }
40389
- walkCB3Sync(target, entries, processor, cb) {
40390
- processor = processor.filterEntries(target, entries);
40389
+ walkCB3Sync(target, entries2, processor, cb) {
40390
+ processor = processor.filterEntries(target, entries2);
40391
40391
  let tasks = 1;
40392
40392
  const next = () => {
40393
40393
  if (--tasks === 0)
@@ -42874,13 +42874,13 @@ var require_dirList = __commonJS({
42874
42874
  * note: can't use glob because don't get error on non existing dir
42875
42875
  */
42876
42876
  list: async function(dir, options, dotfiles) {
42877
- const entries = { dirs: [], files: [] };
42877
+ const entries2 = { dirs: [], files: [] };
42878
42878
  let files2 = await fs2.readdir(dir);
42879
42879
  if (dotfiles === "deny" || dotfiles === "ignore") {
42880
42880
  files2 = files2.filter((file) => file.charAt(0) !== ".");
42881
42881
  }
42882
42882
  if (files2.length < 1) {
42883
- return entries;
42883
+ return entries2;
42884
42884
  }
42885
42885
  const worker = async (filename) => {
42886
42886
  let stats;
@@ -42894,16 +42894,16 @@ var require_dirList = __commonJS({
42894
42894
  if (options.extendedFolderInfo) {
42895
42895
  entry2.extendedInfo = await dirList.getExtendedInfo(path.join(dir, filename));
42896
42896
  }
42897
- entries.dirs.push(entry2);
42897
+ entries2.dirs.push(entry2);
42898
42898
  } else {
42899
- entries.files.push(entry2);
42899
+ entries2.files.push(entry2);
42900
42900
  }
42901
42901
  };
42902
42902
  const queue2 = fastq.promise(worker, fastqConcurrency);
42903
42903
  await Promise.all(files2.map((filename) => queue2.push(filename)));
42904
- entries.dirs.sort((a, b) => a.name.localeCompare(b.name));
42905
- entries.files.sort((a, b) => a.name.localeCompare(b.name));
42906
- return entries;
42904
+ entries2.dirs.sort((a, b) => a.name.localeCompare(b.name));
42905
+ entries2.files.sort((a, b) => a.name.localeCompare(b.name));
42906
+ return entries2;
42907
42907
  },
42908
42908
  /**
42909
42909
  * send dir list content, or 404 on error
@@ -42917,9 +42917,9 @@ var require_dirList = __commonJS({
42917
42917
  if (reply.request.query.format === "html" && typeof options.render !== "function") {
42918
42918
  throw new TypeError("The `list.render` option must be a function and is required with the URL parameter `format=html`");
42919
42919
  }
42920
- let entries;
42920
+ let entries2;
42921
42921
  try {
42922
- entries = await dirList.list(dir, options, dotfiles);
42922
+ entries2 = await dirList.list(dir, options, dotfiles);
42923
42923
  } catch {
42924
42924
  return reply.callNotFound();
42925
42925
  }
@@ -42927,17 +42927,17 @@ var require_dirList = __commonJS({
42927
42927
  if (format !== "html") {
42928
42928
  if (options.jsonFormat !== "extended") {
42929
42929
  const nameEntries = { dirs: [], files: [] };
42930
- entries.dirs.forEach((entry2) => nameEntries.dirs.push(entry2.name));
42931
- entries.files.forEach((entry2) => nameEntries.files.push(entry2.name));
42930
+ entries2.dirs.forEach((entry2) => nameEntries.dirs.push(entry2.name));
42931
+ entries2.files.forEach((entry2) => nameEntries.files.push(entry2.name));
42932
42932
  await reply.send(nameEntries);
42933
42933
  } else {
42934
- await reply.send(entries);
42934
+ await reply.send(entries2);
42935
42935
  }
42936
42936
  return;
42937
42937
  }
42938
42938
  const html = options.render(
42939
- entries.dirs.map((entry2) => dirList.htmlInfo(entry2, route, prefix, options)),
42940
- entries.files.map((entry2) => dirList.htmlInfo(entry2, route, prefix, options))
42939
+ entries2.dirs.map((entry2) => dirList.htmlInfo(entry2, route, prefix, options)),
42940
+ entries2.files.map((entry2) => dirList.htmlInfo(entry2, route, prefix, options))
42941
42941
  );
42942
42942
  await reply.type("text/html").send(html);
42943
42943
  },
@@ -44406,14 +44406,14 @@ var require_foldFlowLines = __commonJS({
44406
44406
  var FOLD_FLOW = "flow";
44407
44407
  var FOLD_BLOCK = "block";
44408
44408
  var FOLD_QUOTED = "quoted";
44409
- function foldFlowLines(text2, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
44409
+ function foldFlowLines(text3, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
44410
44410
  if (!lineWidth || lineWidth < 0)
44411
- return text2;
44411
+ return text3;
44412
44412
  if (lineWidth < minContentWidth)
44413
44413
  minContentWidth = 0;
44414
44414
  const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
44415
- if (text2.length <= endStep)
44416
- return text2;
44415
+ if (text3.length <= endStep)
44416
+ return text3;
44417
44417
  const folds = [];
44418
44418
  const escapedFolds = {};
44419
44419
  let end = lineWidth - indent.length;
@@ -44430,14 +44430,14 @@ var require_foldFlowLines = __commonJS({
44430
44430
  let escStart = -1;
44431
44431
  let escEnd = -1;
44432
44432
  if (mode === FOLD_BLOCK) {
44433
- i = consumeMoreIndentedLines(text2, i, indent.length);
44433
+ i = consumeMoreIndentedLines(text3, i, indent.length);
44434
44434
  if (i !== -1)
44435
44435
  end = i + endStep;
44436
44436
  }
44437
- for (let ch2; ch2 = text2[i += 1]; ) {
44437
+ for (let ch2; ch2 = text3[i += 1]; ) {
44438
44438
  if (mode === FOLD_QUOTED && ch2 === "\\") {
44439
44439
  escStart = i;
44440
- switch (text2[i + 1]) {
44440
+ switch (text3[i + 1]) {
44441
44441
  case "x":
44442
44442
  i += 3;
44443
44443
  break;
@@ -44454,12 +44454,12 @@ var require_foldFlowLines = __commonJS({
44454
44454
  }
44455
44455
  if (ch2 === "\n") {
44456
44456
  if (mode === FOLD_BLOCK)
44457
- i = consumeMoreIndentedLines(text2, i, indent.length);
44457
+ i = consumeMoreIndentedLines(text3, i, indent.length);
44458
44458
  end = i + indent.length + endStep;
44459
44459
  split = void 0;
44460
44460
  } else {
44461
44461
  if (ch2 === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
44462
- const next = text2[i + 1];
44462
+ const next = text3[i + 1];
44463
44463
  if (next && next !== " " && next !== "\n" && next !== " ")
44464
44464
  split = i;
44465
44465
  }
@@ -44471,12 +44471,12 @@ var require_foldFlowLines = __commonJS({
44471
44471
  } else if (mode === FOLD_QUOTED) {
44472
44472
  while (prev === " " || prev === " ") {
44473
44473
  prev = ch2;
44474
- ch2 = text2[i += 1];
44474
+ ch2 = text3[i += 1];
44475
44475
  overflow = true;
44476
44476
  }
44477
44477
  const j = i > escEnd + 1 ? i - 2 : escStart - 1;
44478
44478
  if (escapedFolds[j])
44479
- return text2;
44479
+ return text3;
44480
44480
  folds.push(j);
44481
44481
  escapedFolds[j] = true;
44482
44482
  end = j + endStep;
@@ -44491,39 +44491,39 @@ var require_foldFlowLines = __commonJS({
44491
44491
  if (overflow && onOverflow)
44492
44492
  onOverflow();
44493
44493
  if (folds.length === 0)
44494
- return text2;
44494
+ return text3;
44495
44495
  if (onFold)
44496
44496
  onFold();
44497
- let res = text2.slice(0, folds[0]);
44497
+ let res = text3.slice(0, folds[0]);
44498
44498
  for (let i2 = 0; i2 < folds.length; ++i2) {
44499
44499
  const fold = folds[i2];
44500
- const end2 = folds[i2 + 1] || text2.length;
44500
+ const end2 = folds[i2 + 1] || text3.length;
44501
44501
  if (fold === 0)
44502
44502
  res = `
44503
- ${indent}${text2.slice(0, end2)}`;
44503
+ ${indent}${text3.slice(0, end2)}`;
44504
44504
  else {
44505
44505
  if (mode === FOLD_QUOTED && escapedFolds[fold])
44506
- res += `${text2[fold]}\\`;
44506
+ res += `${text3[fold]}\\`;
44507
44507
  res += `
44508
- ${indent}${text2.slice(fold + 1, end2)}`;
44508
+ ${indent}${text3.slice(fold + 1, end2)}`;
44509
44509
  }
44510
44510
  }
44511
44511
  return res;
44512
44512
  }
44513
- function consumeMoreIndentedLines(text2, i, indent) {
44513
+ function consumeMoreIndentedLines(text3, i, indent) {
44514
44514
  let end = i;
44515
44515
  let start = i + 1;
44516
- let ch2 = text2[start];
44516
+ let ch2 = text3[start];
44517
44517
  while (ch2 === " " || ch2 === " ") {
44518
44518
  if (i < start + indent) {
44519
- ch2 = text2[++i];
44519
+ ch2 = text3[++i];
44520
44520
  } else {
44521
44521
  do {
44522
- ch2 = text2[++i];
44522
+ ch2 = text3[++i];
44523
44523
  } while (ch2 && ch2 !== "\n");
44524
44524
  end = i;
44525
44525
  start = i + 1;
44526
- ch2 = text2[start];
44526
+ ch2 = text3[start];
44527
44527
  }
44528
44528
  }
44529
44529
  return end;
@@ -51716,13 +51716,13 @@ var APPS_DIR = process.env.AWARE_HOME ? (0, import_node_path5.join)(process.env.
51716
51716
  function normalizeNote(n) {
51717
51717
  if (n && typeof n === "object") {
51718
51718
  const o = n;
51719
- const text3 = typeof o.text === "string" ? o.text : String(o.text ?? "");
51719
+ const text4 = typeof o.text === "string" ? o.text : String(o.text ?? "");
51720
51720
  const kind2 = o.kind === "warn" || o.kind === "error" ? o.kind : "info";
51721
- return { kind: kind2, text: text3 };
51721
+ return { kind: kind2, text: text4 };
51722
51722
  }
51723
- const text2 = String(n);
51724
- const kind = /defaulting to write-mode|not installed/i.test(text2) ? "warn" : "info";
51725
- return { kind, text: text2 };
51723
+ const text3 = String(n);
51724
+ const kind = /defaulting to write-mode|not installed/i.test(text3) ? "warn" : "info";
51725
+ return { kind, text: text3 };
51726
51726
  }
51727
51727
  function isVisualInput(i) {
51728
51728
  return i.widget === "file" || i.type === "image" || i.type === "file";
@@ -51766,8 +51766,8 @@ function firstWithExt(dir, ext) {
51766
51766
  const hit = (0, import_node_fs6.readdirSync)(dir).find((f) => f.toLowerCase().endsWith(ext));
51767
51767
  return hit ? (0, import_node_path5.join)(dir, hit) : null;
51768
51768
  }
51769
- function sha256(text2) {
51770
- return (0, import_node_crypto4.createHash)("sha256").update(text2).digest("hex");
51769
+ function sha256(text3) {
51770
+ return (0, import_node_crypto4.createHash)("sha256").update(text3).digest("hex");
51771
51771
  }
51772
51772
  function asRecord(v) {
51773
51773
  return v && typeof v === "object" && !Array.isArray(v) ? v : {};
@@ -51784,7 +51784,7 @@ function appMeta(id, bypassCache = false) {
51784
51784
  const hit = bypassCache ? void 0 : metaCache.get(sourcePath);
51785
51785
  if (hit && hit.mtimeMs === st.mtimeMs && hit.size === st.size && hit.ino === st.ino) return hit.meta;
51786
51786
  sourceParses++;
51787
- const text2 = (0, import_node_fs6.readFileSync)(sourcePath, "utf8");
51787
+ const text3 = (0, import_node_fs6.readFileSync)(sourcePath, "utf8");
51788
51788
  const after = (0, import_node_fs6.statSync)(sourcePath);
51789
51789
  const settled = after.mtimeMs === st.mtimeMs && after.size === st.size && after.ino === st.ino;
51790
51790
  const remember = (meta2) => {
@@ -51793,7 +51793,7 @@ function appMeta(id, bypassCache = false) {
51793
51793
  };
51794
51794
  let src;
51795
51795
  try {
51796
- src = asRecord((0, import_yaml.parse)(text2));
51796
+ src = asRecord((0, import_yaml.parse)(text3));
51797
51797
  } catch {
51798
51798
  return remember(META_DEFAULT);
51799
51799
  }
@@ -52114,8 +52114,8 @@ function mergeConnectables(base, live, displayName) {
52114
52114
  }
52115
52115
  return [...base, ...extra].sort((a, b) => a.name.localeCompare(b.name));
52116
52116
  }
52117
- function parseTrace(text2) {
52118
- return text2.split(/\r?\n/).filter((l) => l.trim()).map((l) => {
52117
+ function parseTrace(text3) {
52118
+ return text3.split(/\r?\n/).filter((l) => l.trim()).map((l) => {
52119
52119
  try {
52120
52120
  return JSON.parse(l);
52121
52121
  } catch {
@@ -52395,14 +52395,14 @@ function latestTracePath(id, logsRoot = LOGS_DIR) {
52395
52395
  }
52396
52396
  for (const instance of instances) {
52397
52397
  const instDir = (0, import_node_path6.join)(appDir2, instance);
52398
- let entries;
52398
+ let entries2;
52399
52399
  try {
52400
52400
  if (!(0, import_node_fs7.statSync)(instDir).isDirectory()) continue;
52401
- entries = (0, import_node_fs7.readdirSync)(instDir);
52401
+ entries2 = (0, import_node_fs7.readdirSync)(instDir);
52402
52402
  } catch {
52403
52403
  continue;
52404
52404
  }
52405
- for (const f of entries) {
52405
+ for (const f of entries2) {
52406
52406
  if (!f.endsWith(".jsonl")) continue;
52407
52407
  const p = (0, import_node_path6.join)(instDir, f);
52408
52408
  try {
@@ -52636,8 +52636,8 @@ function agentInvokeArgv(agent, command, inputsRef) {
52636
52636
  function isInvokeUnsupported(detail) {
52637
52637
  if (!detail || typeof detail !== "object") return false;
52638
52638
  const d = detail;
52639
- const text2 = [d.stdout, d.stderr].filter((s) => typeof s === "string").join("\n");
52640
- return /unrecognized subcommand|unknown subcommand/i.test(text2);
52639
+ const text3 = [d.stdout, d.stderr].filter((s) => typeof s === "string").join("\n");
52640
+ return /unrecognized subcommand|unknown subcommand/i.test(text3);
52641
52641
  }
52642
52642
  var inFlightConnects = /* @__PURE__ */ new Map();
52643
52643
  function cancelAllConnects() {
@@ -53085,10 +53085,10 @@ function readExtensionsText() {
53085
53085
  }
53086
53086
  }
53087
53087
  function readExtensions() {
53088
- const text2 = readExtensionsText();
53089
- if (text2 === null) return null;
53088
+ const text3 = readExtensionsText();
53089
+ if (text3 === null) return null;
53090
53090
  try {
53091
- const parsed = JSON.parse(text2);
53091
+ const parsed = JSON.parse(text3);
53092
53092
  return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
53093
53093
  } catch {
53094
53094
  return null;
@@ -53098,35 +53098,35 @@ function descriptorPanels(d) {
53098
53098
  if (!d || !Array.isArray(d.panels)) return [];
53099
53099
  return d.panels.filter((p) => !!p && typeof p === "object" && !Array.isArray(p));
53100
53100
  }
53101
- function panelsCountOf(text2) {
53102
- if (text2 === null) return 0;
53101
+ function panelsCountOf(text3) {
53102
+ if (text3 === null) return 0;
53103
53103
  try {
53104
- const parsed = JSON.parse(text2);
53104
+ const parsed = JSON.parse(text3);
53105
53105
  return parsed && typeof parsed === "object" && Array.isArray(parsed.panels) ? parsed.panels.length : 0;
53106
53106
  } catch {
53107
53107
  return 0;
53108
53108
  }
53109
53109
  }
53110
53110
  function loadTimeline() {
53111
- let text2;
53111
+ let text3;
53112
53112
  try {
53113
- text2 = (0, import_node_fs8.readFileSync)(TIMELINE_FILE, "utf8");
53113
+ text3 = (0, import_node_fs8.readFileSync)(TIMELINE_FILE, "utf8");
53114
53114
  } catch {
53115
53115
  return { cursor: -1, entries: [] };
53116
53116
  }
53117
53117
  try {
53118
- const parsed = JSON.parse(text2);
53118
+ const parsed = JSON.parse(text3);
53119
53119
  if (!parsed || typeof parsed !== "object") return { cursor: -1, entries: [] };
53120
53120
  const p = parsed;
53121
53121
  const rawEntries = Array.isArray(p.entries) ? p.entries : [];
53122
- const entries = rawEntries.filter((e) => !!e && typeof e === "object").map((e) => ({
53122
+ const entries2 = rawEntries.filter((e) => !!e && typeof e === "object").map((e) => ({
53123
53123
  content: typeof e.content === "string" ? e.content : null,
53124
53124
  ts: typeof e.ts === "string" ? e.ts : ""
53125
53125
  }));
53126
- let cursor = typeof p.cursor === "number" && Number.isInteger(p.cursor) ? p.cursor : entries.length - 1;
53127
- if (entries.length === 0) cursor = -1;
53128
- else cursor = Math.max(0, Math.min(cursor, entries.length - 1));
53129
- return { cursor, entries };
53126
+ let cursor = typeof p.cursor === "number" && Number.isInteger(p.cursor) ? p.cursor : entries2.length - 1;
53127
+ if (entries2.length === 0) cursor = -1;
53128
+ else cursor = Math.max(0, Math.min(cursor, entries2.length - 1));
53129
+ return { cursor, entries: entries2 };
53130
53130
  } catch {
53131
53131
  return { cursor: -1, entries: [] };
53132
53132
  }
@@ -53137,10 +53137,10 @@ function saveTimeline(t) {
53137
53137
  (0, import_node_fs8.writeFileSync)(tmp, JSON.stringify(t, null, 2));
53138
53138
  (0, import_node_fs8.renameSync)(tmp, TIMELINE_FILE);
53139
53139
  }
53140
- function writeExtensionsText(text2) {
53140
+ function writeExtensionsText(text3) {
53141
53141
  ensureUiDir();
53142
53142
  const tmp = `${extensionsFile}.${process.pid}.tmp`;
53143
- (0, import_node_fs8.writeFileSync)(tmp, text2);
53143
+ (0, import_node_fs8.writeFileSync)(tmp, text3);
53144
53144
  (0, import_node_fs8.renameSync)(tmp, extensionsFile);
53145
53145
  }
53146
53146
  function applyState(entry2) {
@@ -53161,21 +53161,21 @@ function seedTimeline() {
53161
53161
  if (t.entries.length > 0) return;
53162
53162
  saveTimeline({ cursor: 0, entries: [{ content: readExtensionsText(), ts: (/* @__PURE__ */ new Date()).toISOString() }] });
53163
53163
  }
53164
- function recordChange(text2) {
53164
+ function recordChange(text3) {
53165
53165
  const t = loadTimeline();
53166
53166
  if (t.entries.length === 0) {
53167
- saveTimeline({ cursor: 0, entries: [{ content: text2, ts: (/* @__PURE__ */ new Date()).toISOString() }] });
53167
+ saveTimeline({ cursor: 0, entries: [{ content: text3, ts: (/* @__PURE__ */ new Date()).toISOString() }] });
53168
53168
  return { recorded: true };
53169
53169
  }
53170
- if (text2 === currentContent(t)) return { recorded: false };
53171
- const entries = t.entries.slice(0, t.cursor + 1);
53172
- entries.push({ content: text2, ts: (/* @__PURE__ */ new Date()).toISOString() });
53173
- let cursor = entries.length - 1;
53174
- while (entries.length > HISTORY_KEEP) {
53175
- entries.shift();
53170
+ if (text3 === currentContent(t)) return { recorded: false };
53171
+ const entries2 = t.entries.slice(0, t.cursor + 1);
53172
+ entries2.push({ content: text3, ts: (/* @__PURE__ */ new Date()).toISOString() });
53173
+ let cursor = entries2.length - 1;
53174
+ while (entries2.length > HISTORY_KEEP) {
53175
+ entries2.shift();
53176
53176
  cursor--;
53177
53177
  }
53178
- saveTimeline({ cursor, entries });
53178
+ saveTimeline({ cursor, entries: entries2 });
53179
53179
  return { recorded: true };
53180
53180
  }
53181
53181
  function historyState() {
@@ -53223,15 +53223,15 @@ function resetExtensions() {
53223
53223
  t.entries.push({ content: readExtensionsText(), ts: (/* @__PURE__ */ new Date()).toISOString() });
53224
53224
  t.cursor = 0;
53225
53225
  }
53226
- const entries = t.entries.slice(0, t.cursor + 1);
53227
- entries.push({ content: null, ts: (/* @__PURE__ */ new Date()).toISOString() });
53228
- let cursor = entries.length - 1;
53229
- while (entries.length > HISTORY_KEEP) {
53230
- entries.shift();
53226
+ const entries2 = t.entries.slice(0, t.cursor + 1);
53227
+ entries2.push({ content: null, ts: (/* @__PURE__ */ new Date()).toISOString() });
53228
+ let cursor = entries2.length - 1;
53229
+ while (entries2.length > HISTORY_KEEP) {
53230
+ entries2.shift();
53231
53231
  cursor--;
53232
53232
  }
53233
- saveTimeline({ cursor, entries });
53234
- applyState(entries[cursor]);
53233
+ saveTimeline({ cursor, entries: entries2 });
53234
+ applyState(entries2[cursor]);
53235
53235
  return { reset: true, canUndo: cursor > 0, canRedo: false };
53236
53236
  }
53237
53237
 
@@ -53241,8 +53241,8 @@ function isUiAgentMissing(err2) {
53241
53241
  const detail = err2.detail ?? {};
53242
53242
  const stdout = typeof detail.stdout === "string" ? detail.stdout : "";
53243
53243
  const stderr = typeof detail.stderr === "string" ? detail.stderr : "";
53244
- const text2 = `${err2.message} ${stdout} ${stderr}`;
53245
- return /not installed/i.test(text2);
53244
+ const text3 = `${err2.message} ${stdout} ${stderr}`;
53245
+ return /not installed/i.test(text3);
53246
53246
  }
53247
53247
  function classifyValidateError(err2) {
53248
53248
  if (err2 instanceof AwareUnsupportedError) {
@@ -53792,7 +53792,7 @@ function appVersion() {
53792
53792
  return resolveVersion({
53793
53793
  isSea: isSea2(),
53794
53794
  sqVersionXml: readSqVersionXml(),
53795
- define: true ? "0.109.0" : void 0,
53795
+ define: true ? "0.109.1" : void 0,
53796
53796
  pkgVersion: readPkgVersion()
53797
53797
  });
53798
53798
  }
@@ -53802,7 +53802,7 @@ function resolveChannel(s) {
53802
53802
  return "dev";
53803
53803
  }
53804
53804
  function appChannel() {
53805
- return resolveChannel({ isSea: isSea2(), define: true ? "0.109.0" : void 0 });
53805
+ return resolveChannel({ isSea: isSea2(), define: true ? "0.109.1" : void 0 });
53806
53806
  }
53807
53807
 
53808
53808
  // workflow-update.ts
@@ -54586,12 +54586,12 @@ function checkModelReferences(doc) {
54586
54586
  if (declared !== parsedCount) add("$.grid.axes", "grid-axis-count", `${dir} has ${parsedCount} parsed entries but ${declared} declared axes`);
54587
54587
  };
54588
54588
  for (const dir of ["x", "y"]) {
54589
- const text2 = str(grid[dir]);
54590
- if (text2 === null) {
54589
+ const text3 = str(grid[dir]);
54590
+ if (text3 === null) {
54591
54591
  compare(dir, 0);
54592
54592
  continue;
54593
54593
  }
54594
- const parsed = parseSpacings(text2);
54594
+ const parsed = parseSpacings(text3);
54595
54595
  if (parsed.err) add(`$.grid.${dir}`, "grid-spacing-invalid", `${dir} grid string is unparseable: ${parsed.err}`);
54596
54596
  else compare(dir, parsed.offsets.length);
54597
54597
  }
@@ -54671,8 +54671,8 @@ function checkModelReferences(doc) {
54671
54671
  }
54672
54672
  const clips = isObj(v.clips) ? v.clips : null;
54673
54673
  if (clips) {
54674
- const entries = arr(clips.clips);
54675
- const clipCounts = idIndex(entries.map((c) => isObj(c) ? str(c.id) : null));
54674
+ const entries2 = arr(clips.clips);
54675
+ const clipCounts = idIndex(entries2.map((c) => isObj(c) ? str(c.id) : null));
54676
54676
  for (const [id, n] of clipCounts) if (n > 1) add(`$.views[${vi}].clips.clips`, "clip-id-duplicate", `clip id "${id}" occurs ${n} times`);
54677
54677
  arr(clips.selected).forEach((s, i) => {
54678
54678
  const id = str(s);
@@ -55433,8 +55433,8 @@ function parseStepData(input) {
55433
55433
  if (input.length > MAX_BYTES3) throw new StepParseError("IFC is larger than the supported maximum.");
55434
55434
  assertAscii((i) => input[i], input.length);
55435
55435
  }
55436
- const text2 = typeof input === "string" ? input : input.toString("utf8");
55437
- const sc = new Scanner(text2);
55436
+ const text3 = typeof input === "string" ? input : input.toString("utf8");
55437
+ const sc = new Scanner(text3);
55438
55438
  sc.expectWord("ISO-10303-21");
55439
55439
  sc.expect(";");
55440
55440
  sc.expectWord("HEADER");
@@ -56103,9 +56103,9 @@ var NEUTRAL_TEXT_PARAMS = {
56103
56103
  };
56104
56104
  function boundedNeutralText(value) {
56105
56105
  if (typeof value !== "string") return null;
56106
- const text2 = value.trim();
56107
- if (!text2 || Buffer.byteLength(text2, "utf8") > 64 || /[\u0000-\u001f\u007f]/.test(text2)) return null;
56108
- return text2;
56106
+ const text3 = value.trim();
56107
+ if (!text3 || Buffer.byteLength(text3, "utf8") > 64 || /[\u0000-\u001f\u007f]/.test(text3)) return null;
56108
+ return text3;
56109
56109
  }
56110
56110
  var gridCountsInteger = (p) => (!("boltCols" in p) || Number.isInteger(p.boltCols)) && (!("boltRows" in p) || Number.isInteger(p.boltRows));
56111
56111
  function sanitizeRecipe(raw) {
@@ -56117,8 +56117,8 @@ function sanitizeRecipe(raw) {
56117
56117
  for (const [k, v] of Object.entries(r.params)) {
56118
56118
  if (typeof v === "number" && isFinite(v)) num6[k] = v;
56119
56119
  if (NEUTRAL_TEXT_PARAMS[r.kind]?.has(k)) {
56120
- const text2 = boundedNeutralText(v);
56121
- if (text2) neutral[k] = text2;
56120
+ const text3 = boundedNeutralText(v);
56121
+ if (text3) neutral[k] = text3;
56122
56122
  else if (v != null) return void 0;
56123
56123
  }
56124
56124
  }
@@ -57869,8 +57869,8 @@ async function exportProjectZip(id) {
57869
57869
  const projectRootDir = projectDir(id);
57870
57870
  const files2 = {};
57871
57871
  const walk2 = async (abs, rel) => {
57872
- const entries = await (0, import_promises.readdir)(abs, { withFileTypes: true });
57873
- await Promise.all(entries.map(async (e) => {
57872
+ const entries2 = await (0, import_promises.readdir)(abs, { withFileTypes: true });
57873
+ await Promise.all(entries2.map(async (e) => {
57874
57874
  const childAbs = (0, import_node_path19.join)(abs, e.name);
57875
57875
  const childRel = rel ? `${rel}/${e.name}` : e.name;
57876
57876
  if (e.isDirectory()) await walk2(childAbs, childRel);
@@ -57884,10 +57884,10 @@ async function exportProjectZip(id) {
57884
57884
  var IMPORT_MAX_FILES = 1e4;
57885
57885
  var IMPORT_MAX_UNCOMPRESSED = 2 * 1024 * 1024 * 1024;
57886
57886
  function importProjectZip(data) {
57887
- let entries;
57887
+ let entries2;
57888
57888
  try {
57889
57889
  let count = 0, uncompressed = 0;
57890
- entries = unzipSync(data, {
57890
+ entries2 = unzipSync(data, {
57891
57891
  filter: (f) => {
57892
57892
  if (++count > IMPORT_MAX_FILES) throw new ProjectError("archive has too many entries");
57893
57893
  uncompressed += f.originalSize;
@@ -57899,17 +57899,17 @@ function importProjectZip(data) {
57899
57899
  if (e instanceof ProjectError) throw e;
57900
57900
  throw new ProjectError(`not a valid project archive: ${e instanceof Error ? e.message : String(e)}`);
57901
57901
  }
57902
- entries = Object.fromEntries(Object.entries(entries).map(([k, v]) => [k.replace(/\\/g, "/"), v]));
57903
- const reservedEntry = Object.keys(entries).find(isReservedProjectInternalPath);
57902
+ entries2 = Object.fromEntries(Object.entries(entries2).map(([k, v]) => [k.replace(/\\/g, "/"), v]));
57903
+ const reservedEntry = Object.keys(entries2).find(isReservedProjectInternalPath);
57904
57904
  if (reservedEntry) {
57905
57905
  throw new ProjectError(`archive contains reserved transaction state: ${reservedEntry}`);
57906
57906
  }
57907
- const metaEntry = Object.keys(entries).find((p) => /(^|\/)project\.json$/.test(p) && p.split("/").length <= 2);
57907
+ const metaEntry = Object.keys(entries2).find((p) => /(^|\/)project\.json$/.test(p) && p.split("/").length <= 2);
57908
57908
  if (!metaEntry) throw new ProjectError("archive has no project.json \u2014 not a project export");
57909
57909
  const rootPrefix = metaEntry.includes("/") ? metaEntry.slice(0, metaEntry.indexOf("/") + 1) : "";
57910
57910
  let srcMeta;
57911
57911
  try {
57912
- const parsed = JSON.parse(new TextDecoder().decode(entries[metaEntry]));
57912
+ const parsed = JSON.parse(new TextDecoder().decode(entries2[metaEntry]));
57913
57913
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("not an object");
57914
57914
  srcMeta = parsed;
57915
57915
  } catch {
@@ -57924,14 +57924,14 @@ function importProjectZip(data) {
57924
57924
  let id = `${slugify(name)}-${(0, import_node_crypto9.randomBytes)(3).toString("hex")}`;
57925
57925
  while ((0, import_node_fs21.existsSync)(projectDir(id)) || (0, import_node_fs21.existsSync)((0, import_node_path19.join)(archiveRoot(), id))) id = `${slugify(name)}-${(0, import_node_crypto9.randomBytes)(3).toString("hex")}`;
57926
57926
  const relOf = (entryPath) => rootPrefix && entryPath.startsWith(rootPrefix) ? entryPath.slice(rootPrefix.length) : entryPath;
57927
- const contractEntries = Object.keys(entries).filter((p) => relOf(p) === "contract.json");
57927
+ const contractEntries = Object.keys(entries2).filter((p) => relOf(p) === "contract.json");
57928
57928
  if (contractEntries.length > 1) {
57929
57929
  throw new ProjectError("archive contains more than one contract.json for the same project");
57930
57930
  }
57931
57931
  for (const entry2 of contractEntries) {
57932
57932
  let parsed;
57933
57933
  try {
57934
- parsed = JSON.parse(new TextDecoder().decode(entries[entry2]));
57934
+ parsed = JSON.parse(new TextDecoder().decode(entries2[entry2]));
57935
57935
  } catch {
57936
57936
  throw new ProjectError("archive contract.json is unreadable");
57937
57937
  }
@@ -57948,7 +57948,7 @@ function importProjectZip(data) {
57948
57948
  const destResolved = (0, import_node_path19.resolve)(dest);
57949
57949
  (0, import_node_fs21.mkdirSync)(dest, { recursive: true });
57950
57950
  try {
57951
- for (const [entryPath, bytes] of Object.entries(entries)) {
57951
+ for (const [entryPath, bytes] of Object.entries(entries2)) {
57952
57952
  if (entryPath === metaEntry) continue;
57953
57953
  const rel = rootPrefix && entryPath.startsWith(rootPrefix) ? entryPath.slice(rootPrefix.length) : entryPath;
57954
57954
  if (!rel || rel.endsWith("/")) continue;
@@ -57984,9 +57984,9 @@ var HASH_RE = /^[0-9a-f]{64}$/;
57984
57984
  var versionsDir = (id) => (0, import_node_path20.join)(projectDir(id), "versions");
57985
57985
  var objectsDir = (id) => (0, import_node_path20.join)(projectDir(id), "objects");
57986
57986
  var logPath = (id) => (0, import_node_path20.join)(versionsDir(id), "log.json");
57987
- function writeAtomic(path, text2) {
57987
+ function writeAtomic(path, text3) {
57988
57988
  const tmp = `${path}.${process.pid}.tmp`;
57989
- (0, import_node_fs22.writeFileSync)(tmp, text2);
57989
+ (0, import_node_fs22.writeFileSync)(tmp, text3);
57990
57990
  (0, import_node_fs22.renameSync)(tmp, path);
57991
57991
  }
57992
57992
  function isVersionMeta(v) {
@@ -58073,9 +58073,9 @@ function createVersion(id, contract, meta) {
58073
58073
  (0, import_node_fs22.mkdirSync)(objectsDir(id), { recursive: true });
58074
58074
  const blobs = /* @__PURE__ */ new Map();
58075
58075
  const skeleton = dehydrate(contract, blobs);
58076
- for (const [hash2, text2] of blobs) {
58076
+ for (const [hash2, text3] of blobs) {
58077
58077
  const p = (0, import_node_path20.join)(objectsDir(id), hash2);
58078
- if (!(0, import_node_fs22.existsSync)(p)) writeAtomic(p, text2);
58078
+ if (!(0, import_node_fs22.existsSync)(p)) writeAtomic(p, text3);
58079
58079
  }
58080
58080
  const log2 = loadLog(id);
58081
58081
  const n = (log2.versions.at(-1)?.n ?? 0) + 1;
@@ -58653,15 +58653,15 @@ function eachPage(wikiDir, io, onPage) {
58653
58653
  let limitHit = false;
58654
58654
  let found = false;
58655
58655
  const walk2 = (dir) => {
58656
- let entries;
58656
+ let entries2;
58657
58657
  try {
58658
- entries = io.readdir(dir);
58658
+ entries2 = io.readdir(dir);
58659
58659
  } catch (e) {
58660
58660
  console.warn(`knowledge-store: cannot read wiki dir ${dir}: ${e instanceof Error ? e.message : e}`);
58661
58661
  ioError = true;
58662
58662
  return "go";
58663
58663
  }
58664
- for (const ent of [...entries].sort((x, y) => x.name.localeCompare(y.name))) {
58664
+ for (const ent of [...entries2].sort((x, y) => x.name.localeCompare(y.name))) {
58665
58665
  if (++visits > KB_MAX_VISITS) {
58666
58666
  console.warn(`knowledge-store: wiki exceeds KB_MAX_VISITS=${KB_MAX_VISITS}, truncating`);
58667
58667
  limitHit = true;
@@ -59049,10 +59049,10 @@ function failOrganize(id, requestId, opts) {
59049
59049
  function gcOldGenerations(id, currentGenerationId) {
59050
59050
  const dir = generationsDir(id);
59051
59051
  if (!(0, import_node_fs23.existsSync)(dir)) return;
59052
- const entries = (0, import_node_fs23.readdirSync)(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => ({ name: e.name, mtimeMs: (0, import_node_fs23.statSync)((0, import_node_path21.join)(dir, e.name)).mtimeMs })).sort((a, b) => b.mtimeMs - a.mtimeMs);
59053
- const keep = new Set(entries.slice(0, GEN_KEEP).map((e) => e.name));
59052
+ const entries2 = (0, import_node_fs23.readdirSync)(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => ({ name: e.name, mtimeMs: (0, import_node_fs23.statSync)((0, import_node_path21.join)(dir, e.name)).mtimeMs })).sort((a, b) => b.mtimeMs - a.mtimeMs);
59053
+ const keep = new Set(entries2.slice(0, GEN_KEEP).map((e) => e.name));
59054
59054
  keep.add(currentGenerationId);
59055
- for (const e of entries) {
59055
+ for (const e of entries2) {
59056
59056
  if (keep.has(e.name)) continue;
59057
59057
  try {
59058
59058
  (0, import_node_fs23.rmSync)((0, import_node_path21.join)(dir, e.name), { recursive: true, force: true });
@@ -62004,6 +62004,41 @@ function awareSceneFromModel(contractInput, sourceId) {
62004
62004
  return { scene, skipped: legacy.skipped, producerUnsupported };
62005
62005
  }
62006
62006
 
62007
+ // ../web/steel-detail-refs.js
62008
+ var text2 = (v) => String(v == null ? "" : v).trim();
62009
+ function calloutRefText(callout) {
62010
+ if (!callout || typeof callout !== "object") return null;
62011
+ const printed = text2(callout.text);
62012
+ if (printed) return printed;
62013
+ const target = callout.target;
62014
+ if (!target || typeof target !== "object") return null;
62015
+ const number = text2(target.number), sheet = text2(target.sheet);
62016
+ return number && sheet ? number + "-" + sheet : null;
62017
+ }
62018
+ function entries(plan) {
62019
+ if (!plan || typeof plan !== "object") return [];
62020
+ const out = [];
62021
+ for (const list of [plan.details, plan.callouts]) if (Array.isArray(list)) out.push(...list);
62022
+ return out;
62023
+ }
62024
+ var NON_DETAIL_KINDS = ["section", "elevation"];
62025
+ function planScoredDetails(plan) {
62026
+ const skip = new Set(NON_DETAIL_KINDS);
62027
+ const seen = /* @__PURE__ */ new Set(), out = [];
62028
+ for (const entry2 of entries(plan)) {
62029
+ if (!entry2 || typeof entry2 !== "object") continue;
62030
+ if (skip.has(text2(entry2.kind).toLowerCase())) continue;
62031
+ const name = calloutRefText(entry2) || "";
62032
+ const t = entry2.target;
62033
+ const targetSheet = t && typeof t === "object" && text2(t.sheet) || "";
62034
+ const key = name + "\0" + targetSheet;
62035
+ if (seen.has(key)) continue;
62036
+ seen.add(key);
62037
+ out.push({ text: name, targetSheet: targetSheet || null, kind: text2(entry2.kind) || "detail" });
62038
+ }
62039
+ return out;
62040
+ }
62041
+
62007
62042
  // steel-confidence.ts
62008
62043
  var BAND_WEIGHT = { verified: 1, high: 0.9, med: 0.65, low: 0.35, rfi: 0 };
62009
62044
  var isBraceMember = (m) => typeof m.memberType === "string" && m.memberType.trim().toLowerCase() === "brace";
@@ -62209,12 +62244,12 @@ function scoreContract(contractInput) {
62209
62244
  factors
62210
62245
  });
62211
62246
  }
62212
- for (const d of plan.details ?? []) {
62213
- const text2 = d.text ?? "";
62214
- const sheet = detailSheet(text2);
62247
+ for (const d of planScoredDetails(plan)) {
62248
+ const text3 = d.text;
62249
+ const sheet = detailSheet(text3) ?? d.targetSheet;
62215
62250
  const resolved = sheet != null && knownSheets.has(sheet.toUpperCase());
62216
62251
  byDetail.push({
62217
- text: text2,
62252
+ text: text3,
62218
62253
  planIdx,
62219
62254
  sheet: plan.sheet ?? "",
62220
62255
  band: resolved ? "high" : "low",
@@ -62250,8 +62285,8 @@ function scoreContract(contractInput) {
62250
62285
  }
62251
62286
  };
62252
62287
  }
62253
- function detailSheet(text2) {
62254
- const m = text2.toUpperCase().match(/S-?\s?\d{2,3}/);
62288
+ function detailSheet(text3) {
62289
+ const m = text3.toUpperCase().match(/S-?\s?\d{2,3}/);
62255
62290
  return m ? m[0].replace(/\s/g, "") : null;
62256
62291
  }
62257
62292
  function rollupDetails(details) {
@@ -63477,9 +63512,9 @@ function remapDetailPlacements(v1) {
63477
63512
  }
63478
63513
  function remapDims3d(v1) {
63479
63514
  const issues = [];
63480
- const entries = isObj3(v1) ? arr3(v1.dims3d).filter(isObj3) : [];
63481
- if (entries.length) {
63482
- issues.push({ code: "dims3d-ownerless", severity: "block", message: `${entries.length} 3D dimension(s) carry world coordinates in the OLD scene frame and have no owner to recompute from; assign a frame, confirm keep-as-world, or discard them before migrating (epic \xA710)` });
63515
+ const entries2 = isObj3(v1) ? arr3(v1.dims3d).filter(isObj3) : [];
63516
+ if (entries2.length) {
63517
+ issues.push({ code: "dims3d-ownerless", severity: "block", message: `${entries2.length} 3D dimension(s) carry world coordinates in the OLD scene frame and have no owner to recompute from; assign a frame, confirm keep-as-world, or discard them before migrating (epic \xA710)` });
63483
63518
  }
63484
63519
  return { dims3d: [], issues };
63485
63520
  }
@@ -65428,10 +65463,10 @@ var unavailableSummary = (from, side) => ({
65428
65463
  function summarizeContractDiff(diff) {
65429
65464
  const bullets = [];
65430
65465
  let detailCount = 0;
65431
- const add = (count, text2) => {
65466
+ const add = (count, text3) => {
65432
65467
  if (!count) return;
65433
65468
  detailCount += count;
65434
- bullets.push(text2);
65469
+ bullets.push(text3);
65435
65470
  };
65436
65471
  add(diff.added.length, `Added ${countWord(diff.added.length, "member")}: ${preview(diff.added.map(refName))}.`);
65437
65472
  add(diff.removed.length, `Removed ${countWord(diff.removed.length, "member")}: ${preview(diff.removed.map(refName))}.`);
@@ -69576,10 +69611,10 @@ function loadJournal(txnDir) {
69576
69611
  const match = (0, import_node_path29.basename)(txnDir).match(ACTIVE_RE);
69577
69612
  if (!match) throw new IfcPublicationError(`unsafe IFC transaction directory "${(0, import_node_path29.basename)(txnDir)}".`);
69578
69613
  const txnId = match[1];
69579
- const entries = (0, import_node_fs33.readdirSync)(txnDir, { withFileTypes: true });
69580
- if (!entries.length) return null;
69581
- const phaseFiles = entries.filter((entry2) => entry2.isFile() && PHASE_RE.test(entry2.name)).sort((a, b) => a.name.localeCompare(b.name));
69582
- const unknown = entries.filter((entry2) => !(entry2.isFile() && (PHASE_RE.test(entry2.name) || /^\.phase-[a-f0-9-]+\.tmp$/i.test(entry2.name))));
69614
+ const entries2 = (0, import_node_fs33.readdirSync)(txnDir, { withFileTypes: true });
69615
+ if (!entries2.length) return null;
69616
+ const phaseFiles = entries2.filter((entry2) => entry2.isFile() && PHASE_RE.test(entry2.name)).sort((a, b) => a.name.localeCompare(b.name));
69617
+ const unknown = entries2.filter((entry2) => !(entry2.isFile() && (PHASE_RE.test(entry2.name) || /^\.phase-[a-f0-9-]+\.tmp$/i.test(entry2.name))));
69583
69618
  if (unknown.length) throw new IfcPublicationError("IFC transaction directory contains unexpected entries.");
69584
69619
  if (!phaseFiles.length) return null;
69585
69620
  let first = null;
@@ -69736,12 +69771,12 @@ async function recoverIfcPublicationsInDirectory(exportDir, expected) {
69736
69771
  const dir = canonicalPath(exportDir);
69737
69772
  if (!(0, import_node_fs33.existsSync)(dir)) return [];
69738
69773
  safeTransactionDirectory(dir);
69739
- const entries = (0, import_node_fs33.readdirSync)(dir, { withFileTypes: true }).filter((entry2) => ACTIVE_RE.test(entry2.name) || CLEANUP_RE.test(entry2.name));
69740
- if (entries.length > MAX_TRANSACTIONS) {
69741
- throw new IfcPublicationError(`IFC recovery refused ${entries.length} transaction directories (limit ${MAX_TRANSACTIONS}).`);
69774
+ const entries2 = (0, import_node_fs33.readdirSync)(dir, { withFileTypes: true }).filter((entry2) => ACTIVE_RE.test(entry2.name) || CLEANUP_RE.test(entry2.name));
69775
+ if (entries2.length > MAX_TRANSACTIONS) {
69776
+ throw new IfcPublicationError(`IFC recovery refused ${entries2.length} transaction directories (limit ${MAX_TRANSACTIONS}).`);
69742
69777
  }
69743
69778
  const recovered = [];
69744
- for (const entry2 of entries) {
69779
+ for (const entry2 of entries2) {
69745
69780
  const path = (0, import_node_path29.join)(dir, entry2.name);
69746
69781
  safeTransactionDirectory(path);
69747
69782
  if (CLEANUP_RE.test(entry2.name)) {
@@ -70192,13 +70227,13 @@ function windowsCandidates(env2) {
70192
70227
  }
70193
70228
  const found = [];
70194
70229
  for (const root3 of roots) {
70195
- let entries;
70230
+ let entries2;
70196
70231
  try {
70197
- entries = (0, import_node_fs35.readdirSync)(root3);
70232
+ entries2 = (0, import_node_fs35.readdirSync)(root3);
70198
70233
  } catch {
70199
70234
  continue;
70200
70235
  }
70201
- for (const name of entries) {
70236
+ for (const name of entries2) {
70202
70237
  const match = /^Blender\s+(\d+(?:\.\d+)*)$/i.exec(name);
70203
70238
  if (!match) continue;
70204
70239
  const binary = (0, import_node_path31.join)(root3, name, "blender.exe");
@@ -70690,14 +70725,14 @@ function sanitizeRoutine(raw) {
70690
70725
  }
70691
70726
  function loadFromDisk() {
70692
70727
  if (!(0, import_node_fs37.existsSync)(ROUTINES_FILE)) return [];
70693
- let text2;
70728
+ let text3;
70694
70729
  try {
70695
- text2 = (0, import_node_fs37.readFileSync)(ROUTINES_FILE, "utf8");
70730
+ text3 = (0, import_node_fs37.readFileSync)(ROUTINES_FILE, "utf8");
70696
70731
  } catch {
70697
70732
  return [];
70698
70733
  }
70699
70734
  try {
70700
- const parsed = JSON.parse(text2);
70735
+ const parsed = JSON.parse(text3);
70701
70736
  return Array.isArray(parsed) ? parsed.map(sanitizeRoutine).filter((r) => r !== null) : [];
70702
70737
  } catch {
70703
70738
  try {
@@ -71774,15 +71809,15 @@ function ccType(prefix) {
71774
71809
  }
71775
71810
  }
71776
71811
  function parseBulletChanges(body) {
71777
- const text2 = body.replace(/\r\n?/g, "\n");
71812
+ const text3 = body.replace(/\r\n?/g, "\n");
71778
71813
  const styled = [];
71779
71814
  let m;
71780
71815
  STYLED_CHANGE_RE.lastIndex = 0;
71781
- while ((m = STYLED_CHANGE_RE.exec(text2)) !== null) styled.push({ type: m[1].toLowerCase(), description: m[2].trim() });
71816
+ while ((m = STYLED_CHANGE_RE.exec(text3)) !== null) styled.push({ type: m[1].toLowerCase(), description: m[2].trim() });
71782
71817
  if (styled.length) return styled;
71783
71818
  const out = [];
71784
71819
  COMMIT_BULLET_RE.lastIndex = 0;
71785
- while ((m = COMMIT_BULLET_RE.exec(text2)) !== null) {
71820
+ while ((m = COMMIT_BULLET_RE.exec(text3)) !== null) {
71786
71821
  const raw = m[1].replace(GH_CREDIT_RE, "").trim();
71787
71822
  if (!raw) continue;
71788
71823
  if (raw.startsWith("@")) continue;
@@ -72438,8 +72473,8 @@ function targetConfigDirs() {
72438
72473
  }
72439
72474
  function skillVersion(skillMdPath) {
72440
72475
  try {
72441
- const text2 = (0, import_node_fs43.readFileSync)(skillMdPath, "utf8");
72442
- const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text2);
72476
+ const text3 = (0, import_node_fs43.readFileSync)(skillMdPath, "utf8");
72477
+ const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text3);
72443
72478
  if (!m || m[1] === void 0) return null;
72444
72479
  const fm = (0, import_yaml10.parse)(m[1]);
72445
72480
  const meta = fm?.metadata;
@@ -72476,14 +72511,14 @@ function decideAction(installed, bundled) {
72476
72511
  return "skipped-newer";
72477
72512
  }
72478
72513
  function bundledSkills(root3) {
72479
- let entries = [];
72514
+ let entries2 = [];
72480
72515
  try {
72481
- entries = selectShippedSkillNames((0, import_node_fs43.readdirSync)(root3));
72516
+ entries2 = selectShippedSkillNames((0, import_node_fs43.readdirSync)(root3));
72482
72517
  } catch {
72483
72518
  return [];
72484
72519
  }
72485
72520
  const out = [];
72486
- for (const name of entries) {
72521
+ for (const name of entries2) {
72487
72522
  const dir = (0, import_node_path39.join)(root3, name);
72488
72523
  let isDir = false;
72489
72524
  try {
@@ -75827,18 +75862,18 @@ async function startServer() {
75827
75862
  try {
75828
75863
  (0, import_node_fs45.mkdirSync)(dir, { recursive: true });
75829
75864
  if (format === "csv") {
75830
- const text2 = bomToCsv(bom);
75865
+ const text3 = bomToCsv(bom);
75831
75866
  if (project && projectSnapshot) {
75832
75867
  publishProjectExportArtifact(project, {
75833
75868
  kind: "bom-csv",
75834
75869
  filename,
75835
75870
  encoding: "utf8",
75836
- bytes: Buffer.byteLength(text2),
75871
+ bytes: Buffer.byteLength(text3),
75837
75872
  version: projectSnapshot.version.n,
75838
75873
  contractHash: projectSnapshot.contractHash
75839
- }, Buffer.from(text2, "utf8"));
75840
- } else (0, import_node_fs45.writeFileSync)(outPath, text2, "utf8");
75841
- return { ok: true, filename, encoding: "utf8", content: text2, bytes: Buffer.byteLength(text2), savedTo: outPath };
75874
+ }, Buffer.from(text3, "utf8"));
75875
+ } else (0, import_node_fs45.writeFileSync)(outPath, text3, "utf8");
75876
+ return { ok: true, filename, encoding: "utf8", content: text3, bytes: Buffer.byteLength(text3), savedTo: outPath };
75842
75877
  }
75843
75878
  const buf = await bomToXlsx(bom);
75844
75879
  if (project && projectSnapshot) {
@@ -102,6 +102,75 @@ export function planDetailRefs(plan) {
102
102
  return out;
103
103
  }
104
104
 
105
+ /**
106
+ * Callout kinds that are NOT details for scoring purposes.
107
+ *
108
+ * A section or an elevation is a more GENERAL drawing than a detail — it is a cut or a face of the
109
+ * structure, and it typically carries detail callouts of its own rather than being one. So the
110
+ * confidence report should not score it as a detail. (Product call, 2026-07-24, answering the question
111
+ * #401 was opened to ask.)
112
+ *
113
+ * Denying these two is the exact complement of `detail-ref`: the schema's callout enum is
114
+ * section | elevation | detail-ref and nothing else, and every writeback goes through validateContract,
115
+ * so no third general kind can reach here in a document that validates.
116
+ *
117
+ * It is nonetheless a DENY list rather than an allow list of `detail-ref`, because `callouts[]` is not
118
+ * the only input. The schema requires `kind` on a CALLOUT, but a `details[]` entry is a bare `{text}`
119
+ * with no kind at all — that is every detail written before callouts existed. Allow-listing would
120
+ * score ZERO of them and silently empty the report for models that score fine today. An entry that
121
+ * does not say it is a section is treated as a detail: the safe direction, since the failure it risks
122
+ * is one row too many rather than a whole model's worth missing.
123
+ */
124
+ export const NON_DETAIL_KINDS = ['section', 'elevation'];
125
+
126
+ /**
127
+ * The callouts on this plan that COUNT AS DETAILS for confidence scoring — the same `details[]` +
128
+ * `callouts[]` union every other surface reads since #397, minus NON_DETAIL_KINDS.
129
+ *
130
+ * Not deduplicated and not sorted, unlike planDetailTexts: the scorer emits one row per callout, and
131
+ * the same detail referenced twice on a sheet is two things to resolve, not one. Entries with no
132
+ * resolvable name are KEPT with an empty text — the scorer bands those `low` with "no sheet reference
133
+ * parsed", which is a real finding about the drawing, not a row to hide.
134
+ *
135
+ * Both scorers read this one function — server/steel-confidence.ts (the authority) and the editor's own
136
+ * scoreContractJS — so THIS rule cannot drift between them. The banding either side of it is still two
137
+ * hand-mirrored copies; what pins the editor's is the pair of #401 tests in steel-editor-draft.test.ts,
138
+ * which boot the real page and assert its detail row count. See the note above the loop in
139
+ * steel-confidence.ts for exactly what that does and does not cover.
140
+ */
141
+ export function planScoredDetails(plan) {
142
+ const skip = new Set(NON_DETAIL_KINDS);
143
+ const seen = new Set(), out = [];
144
+ for (const entry of entries(plan)) {
145
+ if (!entry || typeof entry !== 'object') continue;
146
+ if (skip.has(text(entry.kind).toLowerCase())) continue;
147
+ const name = calloutRefText(entry) || '';
148
+ // The sheet the callout STRUCTURALLY points at, carried alongside the printed mark. The scorer
149
+ // parses the mark first, but a mark need not contain its sheet — the schema documents "A" and
150
+ // "A-A" as legal text and makes `target` required — and on those the parse yields nothing while
151
+ // the navigation bubble, which reads target.sheet, jumps to the right sheet regardless. Without
152
+ // this the two surfaces disagree: one resolves the reference, the other calls it unparseable.
153
+ const t = entry.target;
154
+ const targetSheet = (t && typeof t === 'object' && text(t.sheet)) || '';
155
+ // One row per distinct REFERENCE, not per bubble. The band asks only whether the referenced sheet
156
+ // is in the set, which is a property of the reference — so the same detail called out five times on
157
+ // a sheet (the demo model does exactly this: 42 bubbles naming 21 distinct references, one of them
158
+ // five times) is ONE thing to resolve, repeated. Left un-deduplicated it padded the Details
159
+ // worklist with byte-identical rows and let a single dangling reference count five times against
160
+ // the category. planDetailRefs is right NOT to dedupe — it draws a hot-zone per physical bubble —
161
+ // but that is the placement question, not the resolution question this scorer asks.
162
+ // Keyed on mark AND target sheet, because two sheets can both print "7". Deduplication is PER PLAN,
163
+ // which is the scope this function has: the same detail referenced from two different plans stays
164
+ // two rows, and each row names its own plan's sheet, so the worklist still says where to look. On
165
+ // the demo model that takes 42 bubbles to 32 rows over three plans, for 21 distinct references.
166
+ const key = name + '' + targetSheet;
167
+ if (seen.has(key)) continue;
168
+ seen.add(key);
169
+ out.push({ text: name, targetSheet: targetSheet || null, kind: text(entry.kind) || 'detail' });
170
+ }
171
+ return out;
172
+ }
173
+
105
174
  /**
106
175
  * Every detail this plan can bind to, unique and sorted — the plan's own callouts plus the model's
107
176
  * custom details. Numeric-aware ordering, so detail 2 sorts before detail 10 the way a detailer reads
@@ -7582,9 +7582,12 @@ function scoreContractJS(){const plans=C.plans||[];const byMember=[],byDetail=[]
7582
7582
  const known=new Set();for(const p of plans)if(p.sheet)known.add(p.sheet.toUpperCase());for(const s of Object.keys(C.detail_bubbles||{}))known.add(s.toUpperCase());
7583
7583
  plans.forEach((plan,pi)=>{segs+=(plan.segments||[]).length;const ms=plan.members||[];const dup=_confDupIds(ms);
7584
7584
  for(const m of ms){const r=_scoreMember(m,dup);byMember.push({id:m.id,planIdx:pi,sheet:plan.sheet||'',role:m.role==='column'?'column':'beam',isBrace:isBrace(m)||undefined,profile:m.profile||'',band:r.band,tons:r.band==='rfi'?0:_mTons(m,plan.pt_per_ft,plan.default_tos),factors:r.factors});} // isBrace mirrors the server MemberScore so the report can label it Brace
7585
- // DELIBERATELY details[] only, for now — see #401 and the matching note in steel-confidence.ts, which
7586
- // this mirrors (contract-score.test.ts holds the two in parity, so they move together or not at all).
7587
- for(const d of (plan.details||[])){const sh=_detSheet(d.text);const ok=sh!=null&&known.has(sh.toUpperCase());byDetail.push({text:d.text||'',planIdx:pi,sheet:plan.sheet||'',band:ok?'high':'low',reason:ok?('references '+sh+' (in the set)'):sh?('references '+sh+' — not found in the set'):'no sheet reference parsed'});}});
7585
+ // The details[]+callouts[] union minus sections/elevations (#401). Both scorers call the SAME helper
7586
+ // in steel-detail-refs.js rather than each spelling the rule out, because a rule written twice is a
7587
+ // rule that drifts. The banding below still mirrors steel-confidence.ts BY HAND; what keeps this call
7588
+ // site honest is the pair of #401 tests in steel-editor-draft.test.ts, which boot the real page and
7589
+ // assert the row count this produces. See the note at its matching loop for what is still unpinned.
7590
+ for(const d of DetailRefs.planScoredDetails(plan)){const sh=_detSheet(d.text)??d.targetSheet;const ok=sh!=null&&known.has(sh.toUpperCase());byDetail.push({text:d.text,planIdx:pi,sheet:plan.sheet||'',band:ok?'high':'low',reason:ok?('references '+sh+' (in the set)'):sh?('references '+sh+' — not found in the set'):'no sheet reference parsed'});}});
7588
7591
  const roll=(arr,cw)=>{const c=_cnt0();let n=0,d=0,t=0;for(const m of arr){c[m.band]++;if(m.band==='rfi')continue;const w=cw?1:m.tons;n+=w*BANDW[m.band];d+=w;t+=m.tons;}return {score:d>0?Math.round(n/d*100):null,tons:t,counts:c};};
7589
7592
  const dRoll=arr=>{const c=_cnt0();let n=0,d=0;for(const x of arr){c[x.band]++;n+=BANDW[x.band];d++;}return {score:d>0?Math.round(n/d*100):null,tons:0,counts:c};};
7590
7593
  const beams=roll(byMember.filter(m=>m.role==='beam'));const columns=roll(byMember.filter(m=>m.role==='column'));const details=dRoll(byDetail);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.109.0",
3
+ "version": "0.109.1",
4
4
  "type": "module",
5
5
  "description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
6
6
  "bin": {