@floless/app 0.33.1 → 0.34.0
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/floless-server.cjs +392 -161
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +38 -15
- package/dist/web/aware.js +3 -23
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -4533,11 +4533,11 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
4533
4533
|
var ss = opts && opts.stringify || tryStringify;
|
|
4534
4534
|
var offset = 1;
|
|
4535
4535
|
if (typeof f === "object" && f !== null) {
|
|
4536
|
-
var
|
|
4537
|
-
if (
|
|
4538
|
-
var objects = new Array(
|
|
4536
|
+
var len2 = args.length + offset;
|
|
4537
|
+
if (len2 === 1) return f;
|
|
4538
|
+
var objects = new Array(len2);
|
|
4539
4539
|
objects[0] = ss(f);
|
|
4540
|
-
for (var index = 1; index <
|
|
4540
|
+
for (var index = 1; index < len2; index++) {
|
|
4541
4541
|
objects[index] = ss(args[index]);
|
|
4542
4542
|
}
|
|
4543
4543
|
return objects.join(" ");
|
|
@@ -4863,15 +4863,15 @@ var require_sonic_boom = __commonJS({
|
|
|
4863
4863
|
if (this._fsync) {
|
|
4864
4864
|
fs.fsyncSync(this.fd);
|
|
4865
4865
|
}
|
|
4866
|
-
const
|
|
4866
|
+
const len2 = this._len;
|
|
4867
4867
|
if (this._reopening) {
|
|
4868
4868
|
this._writing = false;
|
|
4869
4869
|
this._reopening = false;
|
|
4870
4870
|
this.reopen();
|
|
4871
|
-
} else if (
|
|
4871
|
+
} else if (len2 > this.minLength) {
|
|
4872
4872
|
this._actualWrite();
|
|
4873
4873
|
} else if (this._ending) {
|
|
4874
|
-
if (
|
|
4874
|
+
if (len2 > 0) {
|
|
4875
4875
|
this._actualWrite();
|
|
4876
4876
|
} else {
|
|
4877
4877
|
this._writing = false;
|
|
@@ -4899,13 +4899,13 @@ var require_sonic_boom = __commonJS({
|
|
|
4899
4899
|
this._periodicFlushTimer.unref();
|
|
4900
4900
|
}
|
|
4901
4901
|
}
|
|
4902
|
-
function releaseWritingBuf(writingBuf,
|
|
4902
|
+
function releaseWritingBuf(writingBuf, len2, n) {
|
|
4903
4903
|
if (typeof writingBuf === "string") {
|
|
4904
4904
|
writingBuf = Buffer.from(writingBuf);
|
|
4905
4905
|
}
|
|
4906
|
-
|
|
4906
|
+
len2 = Math.max(len2 - n, 0);
|
|
4907
4907
|
writingBuf = writingBuf.subarray(n);
|
|
4908
|
-
return { writingBuf, len };
|
|
4908
|
+
return { writingBuf, len: len2 };
|
|
4909
4909
|
}
|
|
4910
4910
|
function emitDrain(sonic) {
|
|
4911
4911
|
const hasListeners = sonic.listenerCount("drain") > 0;
|
|
@@ -4914,14 +4914,14 @@ var require_sonic_boom = __commonJS({
|
|
|
4914
4914
|
sonic.emit("drain");
|
|
4915
4915
|
}
|
|
4916
4916
|
inherits(SonicBoom, EventEmitter2);
|
|
4917
|
-
function mergeBuf(bufs,
|
|
4917
|
+
function mergeBuf(bufs, len2) {
|
|
4918
4918
|
if (bufs.length === 0) {
|
|
4919
4919
|
return kEmptyBuffer;
|
|
4920
4920
|
}
|
|
4921
4921
|
if (bufs.length === 1) {
|
|
4922
4922
|
return bufs[0];
|
|
4923
4923
|
}
|
|
4924
|
-
return Buffer.concat(bufs,
|
|
4924
|
+
return Buffer.concat(bufs, len2);
|
|
4925
4925
|
}
|
|
4926
4926
|
function write(data) {
|
|
4927
4927
|
if (this.destroyed) {
|
|
@@ -4929,9 +4929,9 @@ var require_sonic_boom = __commonJS({
|
|
|
4929
4929
|
}
|
|
4930
4930
|
data = "" + data;
|
|
4931
4931
|
const dataLen = Buffer.byteLength(data);
|
|
4932
|
-
const
|
|
4932
|
+
const len2 = this._len + dataLen;
|
|
4933
4933
|
const bufs = this._bufs;
|
|
4934
|
-
if (this.maxLength &&
|
|
4934
|
+
if (this.maxLength && len2 > this.maxLength) {
|
|
4935
4935
|
this.emit("drop", data);
|
|
4936
4936
|
return this._len < this._hwm;
|
|
4937
4937
|
}
|
|
@@ -4940,7 +4940,7 @@ var require_sonic_boom = __commonJS({
|
|
|
4940
4940
|
} else {
|
|
4941
4941
|
bufs[bufs.length - 1] += data;
|
|
4942
4942
|
}
|
|
4943
|
-
this._len =
|
|
4943
|
+
this._len = len2;
|
|
4944
4944
|
if (!this._writing && this._len >= this.minLength) {
|
|
4945
4945
|
this._actualWrite();
|
|
4946
4946
|
}
|
|
@@ -4950,10 +4950,10 @@ var require_sonic_boom = __commonJS({
|
|
|
4950
4950
|
if (this.destroyed) {
|
|
4951
4951
|
throw new Error("SonicBoom destroyed");
|
|
4952
4952
|
}
|
|
4953
|
-
const
|
|
4953
|
+
const len2 = this._len + data.length;
|
|
4954
4954
|
const bufs = this._bufs;
|
|
4955
4955
|
const lens = this._lens;
|
|
4956
|
-
if (this.maxLength &&
|
|
4956
|
+
if (this.maxLength && len2 > this.maxLength) {
|
|
4957
4957
|
this.emit("drop", data);
|
|
4958
4958
|
return this._len < this._hwm;
|
|
4959
4959
|
}
|
|
@@ -4964,7 +4964,7 @@ var require_sonic_boom = __commonJS({
|
|
|
4964
4964
|
bufs[bufs.length - 1].push(data);
|
|
4965
4965
|
lens[lens.length - 1] += data.length;
|
|
4966
4966
|
}
|
|
4967
|
-
this._len =
|
|
4967
|
+
this._len = len2;
|
|
4968
4968
|
if (!this._writing && this._len >= this.minLength) {
|
|
4969
4969
|
this._actualWrite();
|
|
4970
4970
|
}
|
|
@@ -8556,14 +8556,14 @@ var require_serializer = __commonJS({
|
|
|
8556
8556
|
throw new Error(`The value "${date}" cannot be converted to a time.`);
|
|
8557
8557
|
}
|
|
8558
8558
|
asString(str) {
|
|
8559
|
-
const
|
|
8560
|
-
if (
|
|
8559
|
+
const len2 = str.length;
|
|
8560
|
+
if (len2 === 0) {
|
|
8561
8561
|
return '""';
|
|
8562
|
-
} else if (
|
|
8562
|
+
} else if (len2 < 42) {
|
|
8563
8563
|
let result = "";
|
|
8564
8564
|
let last = -1;
|
|
8565
8565
|
let point = 255;
|
|
8566
|
-
for (let i = 0; i <
|
|
8566
|
+
for (let i = 0; i < len2; i++) {
|
|
8567
8567
|
point = str.charCodeAt(i);
|
|
8568
8568
|
if (point === 34 || // '"'
|
|
8569
8569
|
point === 92) {
|
|
@@ -8575,7 +8575,7 @@ var require_serializer = __commonJS({
|
|
|
8575
8575
|
}
|
|
8576
8576
|
}
|
|
8577
8577
|
return last === -1 && '"' + str + '"' || '"' + result + str.slice(last) + '"';
|
|
8578
|
-
} else if (
|
|
8578
|
+
} else if (len2 < 5e3 && STR_ESCAPE.test(str) === false) {
|
|
8579
8579
|
return '"' + str + '"';
|
|
8580
8580
|
} else {
|
|
8581
8581
|
return JSON.stringify(str);
|
|
@@ -10707,8 +10707,8 @@ var require_proxy_addr = __commonJS({
|
|
|
10707
10707
|
return rangeSubnets;
|
|
10708
10708
|
}
|
|
10709
10709
|
function compileTrust(rangeSubnets) {
|
|
10710
|
-
const
|
|
10711
|
-
return
|
|
10710
|
+
const len2 = rangeSubnets.length;
|
|
10711
|
+
return len2 === 0 ? trustNone : len2 === 1 ? trustSingle(rangeSubnets[0]) : trustMulti(rangeSubnets);
|
|
10712
10712
|
}
|
|
10713
10713
|
function parseipNotation(note) {
|
|
10714
10714
|
const pos = note.lastIndexOf("/");
|
|
@@ -13253,14 +13253,14 @@ var require_codegen = __commonJS({
|
|
|
13253
13253
|
}
|
|
13254
13254
|
// end the current self-balancing block
|
|
13255
13255
|
endBlock(nodeCount) {
|
|
13256
|
-
const
|
|
13257
|
-
if (
|
|
13256
|
+
const len2 = this._blockStarts.pop();
|
|
13257
|
+
if (len2 === void 0)
|
|
13258
13258
|
throw new Error("CodeGen: not in self-balancing block");
|
|
13259
|
-
const toClose = this._nodes.length -
|
|
13259
|
+
const toClose = this._nodes.length - len2;
|
|
13260
13260
|
if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) {
|
|
13261
13261
|
throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
|
|
13262
13262
|
}
|
|
13263
|
-
this._nodes.length =
|
|
13263
|
+
this._nodes.length = len2;
|
|
13264
13264
|
return this;
|
|
13265
13265
|
}
|
|
13266
13266
|
// `function` heading (or definition if funcBody is passed)
|
|
@@ -14126,8 +14126,8 @@ var require_code2 = __commonJS({
|
|
|
14126
14126
|
validateItems(() => gen.break());
|
|
14127
14127
|
return valid;
|
|
14128
14128
|
function validateItems(notValid) {
|
|
14129
|
-
const
|
|
14130
|
-
gen.forRange("i", 0,
|
|
14129
|
+
const len2 = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
14130
|
+
gen.forRange("i", 0, len2, (i) => {
|
|
14131
14131
|
cxt.subschema({
|
|
14132
14132
|
keyword,
|
|
14133
14133
|
dataProp: i,
|
|
@@ -15558,9 +15558,9 @@ var require_utils = __commonJS({
|
|
|
15558
15558
|
let input = path;
|
|
15559
15559
|
const output = [];
|
|
15560
15560
|
let nextSlash = -1;
|
|
15561
|
-
let
|
|
15562
|
-
while (
|
|
15563
|
-
if (
|
|
15561
|
+
let len2 = 0;
|
|
15562
|
+
while (len2 = input.length) {
|
|
15563
|
+
if (len2 === 1) {
|
|
15564
15564
|
if (input === ".") {
|
|
15565
15565
|
break;
|
|
15566
15566
|
} else if (input === "/") {
|
|
@@ -15570,7 +15570,7 @@ var require_utils = __commonJS({
|
|
|
15570
15570
|
output.push(input);
|
|
15571
15571
|
break;
|
|
15572
15572
|
}
|
|
15573
|
-
} else if (
|
|
15573
|
+
} else if (len2 === 2) {
|
|
15574
15574
|
if (input[0] === ".") {
|
|
15575
15575
|
if (input[1] === ".") {
|
|
15576
15576
|
break;
|
|
@@ -15584,7 +15584,7 @@ var require_utils = __commonJS({
|
|
|
15584
15584
|
break;
|
|
15585
15585
|
}
|
|
15586
15586
|
}
|
|
15587
|
-
} else if (
|
|
15587
|
+
} else if (len2 === 3) {
|
|
15588
15588
|
if (input === "/..") {
|
|
15589
15589
|
if (output.length !== 0) {
|
|
15590
15590
|
output.pop();
|
|
@@ -17083,14 +17083,14 @@ var require_ucs2length = __commonJS({
|
|
|
17083
17083
|
"use strict";
|
|
17084
17084
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
17085
17085
|
function ucs2length(str) {
|
|
17086
|
-
const
|
|
17086
|
+
const len2 = str.length;
|
|
17087
17087
|
let length = 0;
|
|
17088
17088
|
let pos = 0;
|
|
17089
17089
|
let value;
|
|
17090
|
-
while (pos <
|
|
17090
|
+
while (pos < len2) {
|
|
17091
17091
|
length++;
|
|
17092
17092
|
value = str.charCodeAt(pos++);
|
|
17093
|
-
if (value >= 55296 && value <= 56319 && pos <
|
|
17093
|
+
if (value >= 55296 && value <= 56319 && pos < len2) {
|
|
17094
17094
|
value = str.charCodeAt(pos);
|
|
17095
17095
|
if ((value & 64512) === 56320)
|
|
17096
17096
|
pos++;
|
|
@@ -17127,8 +17127,8 @@ var require_limitLength = __commonJS({
|
|
|
17127
17127
|
code(cxt) {
|
|
17128
17128
|
const { keyword, data, schemaCode, it } = cxt;
|
|
17129
17129
|
const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
17130
|
-
const
|
|
17131
|
-
cxt.fail$data((0, codegen_1._)`${
|
|
17130
|
+
const len2 = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
|
|
17131
|
+
cxt.fail$data((0, codegen_1._)`${len2} ${op} ${schemaCode}`);
|
|
17132
17132
|
}
|
|
17133
17133
|
};
|
|
17134
17134
|
exports2.default = def;
|
|
@@ -17515,8 +17515,8 @@ var require_additionalItems = __commonJS({
|
|
|
17515
17515
|
var codegen_1 = require_codegen();
|
|
17516
17516
|
var util_1 = require_util();
|
|
17517
17517
|
var error = {
|
|
17518
|
-
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${
|
|
17519
|
-
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${
|
|
17518
|
+
message: ({ params: { len: len2 } }) => (0, codegen_1.str)`must NOT have more than ${len2} items`,
|
|
17519
|
+
params: ({ params: { len: len2 } }) => (0, codegen_1._)`{limit: ${len2}}`
|
|
17520
17520
|
};
|
|
17521
17521
|
var def = {
|
|
17522
17522
|
keyword: "additionalItems",
|
|
@@ -17537,17 +17537,17 @@ var require_additionalItems = __commonJS({
|
|
|
17537
17537
|
function validateAdditionalItems(cxt, items) {
|
|
17538
17538
|
const { gen, schema, data, keyword, it } = cxt;
|
|
17539
17539
|
it.items = true;
|
|
17540
|
-
const
|
|
17540
|
+
const len2 = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
17541
17541
|
if (schema === false) {
|
|
17542
17542
|
cxt.setParams({ len: items.length });
|
|
17543
|
-
cxt.pass((0, codegen_1._)`${
|
|
17543
|
+
cxt.pass((0, codegen_1._)`${len2} <= ${items.length}`);
|
|
17544
17544
|
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
17545
|
-
const valid = gen.var("valid", (0, codegen_1._)`${
|
|
17545
|
+
const valid = gen.var("valid", (0, codegen_1._)`${len2} <= ${items.length}`);
|
|
17546
17546
|
gen.if((0, codegen_1.not)(valid), () => validateItems(valid));
|
|
17547
17547
|
cxt.ok(valid);
|
|
17548
17548
|
}
|
|
17549
17549
|
function validateItems(valid) {
|
|
17550
|
-
gen.forRange("i", items.length,
|
|
17550
|
+
gen.forRange("i", items.length, len2, (i) => {
|
|
17551
17551
|
cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);
|
|
17552
17552
|
if (!it.allErrors)
|
|
17553
17553
|
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
@@ -17590,11 +17590,11 @@ var require_items = __commonJS({
|
|
|
17590
17590
|
it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
|
|
17591
17591
|
}
|
|
17592
17592
|
const valid = gen.name("valid");
|
|
17593
|
-
const
|
|
17593
|
+
const len2 = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
17594
17594
|
schArr.forEach((sch, i) => {
|
|
17595
17595
|
if ((0, util_1.alwaysValidSchema)(it, sch))
|
|
17596
17596
|
return;
|
|
17597
|
-
gen.if((0, codegen_1._)`${
|
|
17597
|
+
gen.if((0, codegen_1._)`${len2} > ${i}`, () => cxt.subschema({
|
|
17598
17598
|
keyword,
|
|
17599
17599
|
schemaProp: i,
|
|
17600
17600
|
dataProp: i
|
|
@@ -17643,8 +17643,8 @@ var require_items2020 = __commonJS({
|
|
|
17643
17643
|
var code_1 = require_code2();
|
|
17644
17644
|
var additionalItems_1 = require_additionalItems();
|
|
17645
17645
|
var error = {
|
|
17646
|
-
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${
|
|
17647
|
-
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${
|
|
17646
|
+
message: ({ params: { len: len2 } }) => (0, codegen_1.str)`must NOT have more than ${len2} items`,
|
|
17647
|
+
params: ({ params: { len: len2 } }) => (0, codegen_1._)`{limit: ${len2}}`
|
|
17648
17648
|
};
|
|
17649
17649
|
var def = {
|
|
17650
17650
|
keyword: "items",
|
|
@@ -17697,7 +17697,7 @@ var require_contains = __commonJS({
|
|
|
17697
17697
|
} else {
|
|
17698
17698
|
min = 1;
|
|
17699
17699
|
}
|
|
17700
|
-
const
|
|
17700
|
+
const len2 = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
17701
17701
|
cxt.setParams({ min, max });
|
|
17702
17702
|
if (max === void 0 && min === 0) {
|
|
17703
17703
|
(0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
|
|
@@ -17709,9 +17709,9 @@ var require_contains = __commonJS({
|
|
|
17709
17709
|
return;
|
|
17710
17710
|
}
|
|
17711
17711
|
if ((0, util_1.alwaysValidSchema)(it, schema)) {
|
|
17712
|
-
let cond = (0, codegen_1._)`${
|
|
17712
|
+
let cond = (0, codegen_1._)`${len2} >= ${min}`;
|
|
17713
17713
|
if (max !== void 0)
|
|
17714
|
-
cond = (0, codegen_1._)`${cond} && ${
|
|
17714
|
+
cond = (0, codegen_1._)`${cond} && ${len2} <= ${max}`;
|
|
17715
17715
|
cxt.pass(cond);
|
|
17716
17716
|
return;
|
|
17717
17717
|
}
|
|
@@ -17734,7 +17734,7 @@ var require_contains = __commonJS({
|
|
|
17734
17734
|
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
|
|
17735
17735
|
}
|
|
17736
17736
|
function validateItems(_valid, block) {
|
|
17737
|
-
gen.forRange("i", 0,
|
|
17737
|
+
gen.forRange("i", 0, len2, (i) => {
|
|
17738
17738
|
cxt.subschema({
|
|
17739
17739
|
keyword: "contains",
|
|
17740
17740
|
dataProp: i,
|
|
@@ -20486,8 +20486,8 @@ var require_parse = __commonJS({
|
|
|
20486
20486
|
function skipWhitespace({ gen, char: c }) {
|
|
20487
20487
|
gen.code((0, codegen_1._)`while((${c}=${names_1.default.json}[${names_1.default.jsonPos}],${c}===" "||${c}==="\\n"||${c}==="\\r"||${c}==="\\t"))${names_1.default.jsonPos}++;`);
|
|
20488
20488
|
}
|
|
20489
|
-
function jsonSlice(
|
|
20490
|
-
return
|
|
20489
|
+
function jsonSlice(len2) {
|
|
20490
|
+
return len2 === 1 ? (0, codegen_1._)`${names_1.default.json}[${names_1.default.jsonPos}]` : (0, codegen_1._)`${names_1.default.json}.slice(${names_1.default.jsonPos}, ${names_1.default.jsonPos}+${len2})`;
|
|
20491
20491
|
}
|
|
20492
20492
|
function jsonSyntaxError(cxt) {
|
|
20493
20493
|
parsingError(cxt, (0, codegen_1._)`"unexpected token " + ${names_1.default.json}[${names_1.default.jsonPos}]`);
|
|
@@ -21184,23 +21184,23 @@ var require_dist2 = __commonJS({
|
|
|
21184
21184
|
}
|
|
21185
21185
|
}
|
|
21186
21186
|
function dequal(foo, bar) {
|
|
21187
|
-
var ctor,
|
|
21187
|
+
var ctor, len2, tmp;
|
|
21188
21188
|
if (foo === bar) return true;
|
|
21189
21189
|
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
|
21190
21190
|
if (ctor === Date) return foo.getTime() === bar.getTime();
|
|
21191
21191
|
if (ctor === RegExp) return foo.toString() === bar.toString();
|
|
21192
21192
|
if (ctor === Array) {
|
|
21193
|
-
if ((
|
|
21194
|
-
while (
|
|
21193
|
+
if ((len2 = foo.length) === bar.length) {
|
|
21194
|
+
while (len2-- && dequal(foo[len2], bar[len2])) ;
|
|
21195
21195
|
}
|
|
21196
|
-
return
|
|
21196
|
+
return len2 === -1;
|
|
21197
21197
|
}
|
|
21198
21198
|
if (ctor === Set) {
|
|
21199
21199
|
if (foo.size !== bar.size) {
|
|
21200
21200
|
return false;
|
|
21201
21201
|
}
|
|
21202
|
-
for (
|
|
21203
|
-
tmp =
|
|
21202
|
+
for (len2 of foo) {
|
|
21203
|
+
tmp = len2;
|
|
21204
21204
|
if (tmp && typeof tmp === "object") {
|
|
21205
21205
|
tmp = find(bar, tmp);
|
|
21206
21206
|
if (!tmp) return false;
|
|
@@ -21213,13 +21213,13 @@ var require_dist2 = __commonJS({
|
|
|
21213
21213
|
if (foo.size !== bar.size) {
|
|
21214
21214
|
return false;
|
|
21215
21215
|
}
|
|
21216
|
-
for (
|
|
21217
|
-
tmp =
|
|
21216
|
+
for (len2 of foo) {
|
|
21217
|
+
tmp = len2[0];
|
|
21218
21218
|
if (tmp && typeof tmp === "object") {
|
|
21219
21219
|
tmp = find(bar, tmp);
|
|
21220
21220
|
if (!tmp) return false;
|
|
21221
21221
|
}
|
|
21222
|
-
if (!dequal(
|
|
21222
|
+
if (!dequal(len2[1], bar.get(tmp))) {
|
|
21223
21223
|
return false;
|
|
21224
21224
|
}
|
|
21225
21225
|
}
|
|
@@ -21229,24 +21229,24 @@ var require_dist2 = __commonJS({
|
|
|
21229
21229
|
foo = new Uint8Array(foo);
|
|
21230
21230
|
bar = new Uint8Array(bar);
|
|
21231
21231
|
} else if (ctor === DataView) {
|
|
21232
|
-
if ((
|
|
21233
|
-
while (
|
|
21232
|
+
if ((len2 = foo.byteLength) === bar.byteLength) {
|
|
21233
|
+
while (len2-- && foo.getInt8(len2) === bar.getInt8(len2)) ;
|
|
21234
21234
|
}
|
|
21235
|
-
return
|
|
21235
|
+
return len2 === -1;
|
|
21236
21236
|
}
|
|
21237
21237
|
if (ArrayBuffer.isView(foo)) {
|
|
21238
|
-
if ((
|
|
21239
|
-
while (
|
|
21238
|
+
if ((len2 = foo.byteLength) === bar.byteLength) {
|
|
21239
|
+
while (len2-- && foo[len2] === bar[len2]) ;
|
|
21240
21240
|
}
|
|
21241
|
-
return
|
|
21241
|
+
return len2 === -1;
|
|
21242
21242
|
}
|
|
21243
21243
|
if (!ctor || typeof foo === "object") {
|
|
21244
|
-
|
|
21244
|
+
len2 = 0;
|
|
21245
21245
|
for (ctor in foo) {
|
|
21246
|
-
if (has.call(foo, ctor) && ++
|
|
21246
|
+
if (has.call(foo, ctor) && ++len2 && !has.call(bar, ctor)) return false;
|
|
21247
21247
|
if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
|
|
21248
21248
|
}
|
|
21249
|
-
return Object.keys(bar).length ===
|
|
21249
|
+
return Object.keys(bar).length === len2;
|
|
21250
21250
|
}
|
|
21251
21251
|
}
|
|
21252
21252
|
return foo !== foo && bar !== bar;
|
|
@@ -27283,12 +27283,12 @@ var require_querystring = __commonJS({
|
|
|
27283
27283
|
// 112 - 127
|
|
27284
27284
|
]);
|
|
27285
27285
|
function encodeString(str) {
|
|
27286
|
-
const
|
|
27287
|
-
if (
|
|
27286
|
+
const len2 = str.length;
|
|
27287
|
+
if (len2 === 0) return "";
|
|
27288
27288
|
let out = "";
|
|
27289
27289
|
let lastPos = 0;
|
|
27290
27290
|
let i = 0;
|
|
27291
|
-
outer: for (; i <
|
|
27291
|
+
outer: for (; i < len2; i++) {
|
|
27292
27292
|
let c = str.charCodeAt(i);
|
|
27293
27293
|
while (c < 128) {
|
|
27294
27294
|
if (noEscape[c] !== 1) {
|
|
@@ -27296,7 +27296,7 @@ var require_querystring = __commonJS({
|
|
|
27296
27296
|
lastPos = i + 1;
|
|
27297
27297
|
out += hexTable[c];
|
|
27298
27298
|
}
|
|
27299
|
-
if (++i ===
|
|
27299
|
+
if (++i === len2) break outer;
|
|
27300
27300
|
c = str.charCodeAt(i);
|
|
27301
27301
|
}
|
|
27302
27302
|
if (lastPos < i) out += str.slice(lastPos, i);
|
|
@@ -27311,7 +27311,7 @@ var require_querystring = __commonJS({
|
|
|
27311
27311
|
continue;
|
|
27312
27312
|
}
|
|
27313
27313
|
++i;
|
|
27314
|
-
if (i >=
|
|
27314
|
+
if (i >= len2) {
|
|
27315
27315
|
throw new Error("URI malformed");
|
|
27316
27316
|
}
|
|
27317
27317
|
const c2 = str.charCodeAt(i) & 1023;
|
|
@@ -27320,7 +27320,7 @@ var require_querystring = __commonJS({
|
|
|
27320
27320
|
out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
27321
27321
|
}
|
|
27322
27322
|
if (lastPos === 0) return str;
|
|
27323
|
-
if (lastPos <
|
|
27323
|
+
if (lastPos < len2) return out + str.slice(lastPos);
|
|
27324
27324
|
return out;
|
|
27325
27325
|
}
|
|
27326
27326
|
module2.exports = { encodeString };
|
|
@@ -27909,7 +27909,7 @@ var require_sets_lookup = __commonJS({
|
|
|
27909
27909
|
var types_1 = require_types4();
|
|
27910
27910
|
function setToLookup(tokens) {
|
|
27911
27911
|
let lookup = {};
|
|
27912
|
-
let
|
|
27912
|
+
let len2 = 0;
|
|
27913
27913
|
for (const token of tokens) {
|
|
27914
27914
|
if (token.type === types_1.types.CHAR) {
|
|
27915
27915
|
lookup[token.value] = true;
|
|
@@ -27917,11 +27917,11 @@ var require_sets_lookup = __commonJS({
|
|
|
27917
27917
|
if (token.type === types_1.types.RANGE) {
|
|
27918
27918
|
lookup[`${token.from}-${token.to}`] = true;
|
|
27919
27919
|
}
|
|
27920
|
-
|
|
27920
|
+
len2 += 1;
|
|
27921
27921
|
}
|
|
27922
27922
|
return {
|
|
27923
27923
|
lookup: () => Object.assign({}, lookup),
|
|
27924
|
-
len
|
|
27924
|
+
len: len2
|
|
27925
27925
|
};
|
|
27926
27926
|
}
|
|
27927
27927
|
exports2.INTS = setToLookup(Sets.ints().set);
|
|
@@ -27966,8 +27966,8 @@ var require_write_set_tokens = __commonJS({
|
|
|
27966
27966
|
return charCode === 94 ? "\\^" : charCode === 92 ? "\\\\" : charCode === 93 ? "\\]" : charCode === 45 ? "\\-" : String.fromCharCode(charCode);
|
|
27967
27967
|
}
|
|
27968
27968
|
exports2.setChar = setChar;
|
|
27969
|
-
function isSameSet(set2, { lookup, len }) {
|
|
27970
|
-
if (
|
|
27969
|
+
function isSameSet(set2, { lookup, len: len2 }) {
|
|
27970
|
+
if (len2 !== set2.length) {
|
|
27971
27971
|
return false;
|
|
27972
27972
|
}
|
|
27973
27973
|
const map = lookup();
|
|
@@ -28127,7 +28127,7 @@ var require_safe_regex2 = __commonJS({
|
|
|
28127
28127
|
function walk2(node, opts, starHeight) {
|
|
28128
28128
|
let i;
|
|
28129
28129
|
let ok;
|
|
28130
|
-
let
|
|
28130
|
+
let len2;
|
|
28131
28131
|
if (node.type === types.REPETITION) {
|
|
28132
28132
|
starHeight++;
|
|
28133
28133
|
opts.reps++;
|
|
@@ -28136,14 +28136,14 @@ var require_safe_regex2 = __commonJS({
|
|
|
28136
28136
|
}
|
|
28137
28137
|
const options = node.options || node.value?.options;
|
|
28138
28138
|
if (options) {
|
|
28139
|
-
for (i = 0,
|
|
28139
|
+
for (i = 0, len2 = options.length; i < len2; i++) {
|
|
28140
28140
|
ok = walk2({ stack: options[i] }, opts, starHeight);
|
|
28141
28141
|
if (!ok) return false;
|
|
28142
28142
|
}
|
|
28143
28143
|
}
|
|
28144
28144
|
const stack = node.stack || node.value?.stack;
|
|
28145
28145
|
if (!stack) return true;
|
|
28146
|
-
for (i = 0,
|
|
28146
|
+
for (i = 0, len2 = stack.length; i < len2; i++) {
|
|
28147
28147
|
ok = walk2(stack[i], opts, starHeight);
|
|
28148
28148
|
if (!ok) return false;
|
|
28149
28149
|
}
|
|
@@ -31739,16 +31739,16 @@ var require_dist4 = __commonJS({
|
|
|
31739
31739
|
})();
|
|
31740
31740
|
function parseCookie(str, options) {
|
|
31741
31741
|
const obj = new NullObject();
|
|
31742
|
-
const
|
|
31743
|
-
if (
|
|
31742
|
+
const len2 = str.length;
|
|
31743
|
+
if (len2 < 2)
|
|
31744
31744
|
return obj;
|
|
31745
31745
|
const dec = options?.decode || decode;
|
|
31746
31746
|
let index = 0;
|
|
31747
31747
|
do {
|
|
31748
|
-
const eqIdx = eqIndex(str, index,
|
|
31748
|
+
const eqIdx = eqIndex(str, index, len2);
|
|
31749
31749
|
if (eqIdx === -1)
|
|
31750
31750
|
break;
|
|
31751
|
-
const endIdx = endIndex(str, index,
|
|
31751
|
+
const endIdx = endIndex(str, index, len2);
|
|
31752
31752
|
if (eqIdx > endIdx) {
|
|
31753
31753
|
index = str.lastIndexOf(";", eqIdx - 1) + 1;
|
|
31754
31754
|
continue;
|
|
@@ -31758,7 +31758,7 @@ var require_dist4 = __commonJS({
|
|
|
31758
31758
|
obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));
|
|
31759
31759
|
}
|
|
31760
31760
|
index = endIdx + 1;
|
|
31761
|
-
} while (index <
|
|
31761
|
+
} while (index < len2);
|
|
31762
31762
|
return obj;
|
|
31763
31763
|
}
|
|
31764
31764
|
function stringifyCookie(cookie, options) {
|
|
@@ -31861,16 +31861,16 @@ var require_dist4 = __commonJS({
|
|
|
31861
31861
|
}
|
|
31862
31862
|
function parseSetCookie(str, options) {
|
|
31863
31863
|
const dec = options?.decode || decode;
|
|
31864
|
-
const
|
|
31865
|
-
const endIdx = endIndex(str, 0,
|
|
31864
|
+
const len2 = str.length;
|
|
31865
|
+
const endIdx = endIndex(str, 0, len2);
|
|
31866
31866
|
const eqIdx = eqIndex(str, 0, endIdx);
|
|
31867
31867
|
const setCookie = eqIdx === -1 ? { name: "", value: dec(valueSlice(str, 0, endIdx)) } : {
|
|
31868
31868
|
name: valueSlice(str, 0, eqIdx),
|
|
31869
31869
|
value: dec(valueSlice(str, eqIdx + 1, endIdx))
|
|
31870
31870
|
};
|
|
31871
31871
|
let index = endIdx + 1;
|
|
31872
|
-
while (index <
|
|
31873
|
-
const endIdx2 = endIndex(str, index,
|
|
31872
|
+
while (index < len2) {
|
|
31873
|
+
const endIdx2 = endIndex(str, index, len2);
|
|
31874
31874
|
const eqIdx2 = eqIndex(str, index, endIdx2);
|
|
31875
31875
|
const attr = eqIdx2 === -1 ? valueSlice(str, index, endIdx2) : valueSlice(str, index, eqIdx2);
|
|
31876
31876
|
const val = eqIdx2 === -1 ? void 0 : valueSlice(str, eqIdx2 + 1, endIdx2);
|
|
@@ -31922,9 +31922,9 @@ var require_dist4 = __commonJS({
|
|
|
31922
31922
|
}
|
|
31923
31923
|
return setCookie;
|
|
31924
31924
|
}
|
|
31925
|
-
function endIndex(str, min,
|
|
31925
|
+
function endIndex(str, min, len2) {
|
|
31926
31926
|
const index = str.indexOf(";", min);
|
|
31927
|
-
return index === -1 ?
|
|
31927
|
+
return index === -1 ? len2 : index;
|
|
31928
31928
|
}
|
|
31929
31929
|
function eqIndex(str, min, max) {
|
|
31930
31930
|
const index = str.indexOf("=", min);
|
|
@@ -35585,12 +35585,12 @@ var require_commonjs3 = __commonJS({
|
|
|
35585
35585
|
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
35586
35586
|
};
|
|
35587
35587
|
var qmarksTestNoExt = ([$0]) => {
|
|
35588
|
-
const
|
|
35589
|
-
return (f) => f.length ===
|
|
35588
|
+
const len2 = $0.length;
|
|
35589
|
+
return (f) => f.length === len2 && !f.startsWith(".");
|
|
35590
35590
|
};
|
|
35591
35591
|
var qmarksTestNoExtDot = ([$0]) => {
|
|
35592
|
-
const
|
|
35593
|
-
return (f) => f.length ===
|
|
35592
|
+
const len2 = $0.length;
|
|
35593
|
+
return (f) => f.length === len2 && f !== "." && f !== "..";
|
|
35594
35594
|
};
|
|
35595
35595
|
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
35596
35596
|
var path = {
|
|
@@ -39049,12 +39049,12 @@ var require_commonjs5 = __commonJS({
|
|
|
39049
39049
|
this.root = this.newRoot(this.#fs);
|
|
39050
39050
|
this.roots[this.rootPath] = this.root;
|
|
39051
39051
|
let prev = this.root;
|
|
39052
|
-
let
|
|
39052
|
+
let len2 = split.length - 1;
|
|
39053
39053
|
const joinSep = pathImpl.sep;
|
|
39054
39054
|
let abs = this.rootPath;
|
|
39055
39055
|
let sawFirst = false;
|
|
39056
39056
|
for (const part of split) {
|
|
39057
|
-
const l =
|
|
39057
|
+
const l = len2--;
|
|
39058
39058
|
prev = prev.child(part, {
|
|
39059
39059
|
relative: new Array(l).fill("..").join(joinSep),
|
|
39060
39060
|
relativePosix: new Array(l).fill("..").join("/"),
|
|
@@ -39309,11 +39309,11 @@ var require_commonjs5 = __commonJS({
|
|
|
39309
39309
|
if (er) {
|
|
39310
39310
|
return cb(er);
|
|
39311
39311
|
}
|
|
39312
|
-
let
|
|
39313
|
-
if (!
|
|
39312
|
+
let len2 = entries.length;
|
|
39313
|
+
if (!len2)
|
|
39314
39314
|
return cb();
|
|
39315
39315
|
const next = () => {
|
|
39316
|
-
if (--
|
|
39316
|
+
if (--len2 === 0) {
|
|
39317
39317
|
cb();
|
|
39318
39318
|
}
|
|
39319
39319
|
};
|
|
@@ -40895,8 +40895,8 @@ var require_isUtf8MimeType = __commonJS({
|
|
|
40895
40895
|
"node_modules/@fastify/send/lib/isUtf8MimeType.js"(exports2, module2) {
|
|
40896
40896
|
"use strict";
|
|
40897
40897
|
function isUtf8MimeType(value) {
|
|
40898
|
-
const
|
|
40899
|
-
return
|
|
40898
|
+
const len2 = value.length;
|
|
40899
|
+
return len2 > 21 && value.indexOf("application/javascript") === 0 || len2 > 14 && value.indexOf("application/json") === 0 || len2 > 5 && value.indexOf("text/") === 0;
|
|
40900
40900
|
}
|
|
40901
40901
|
module2.exports.isUtf8MimeType = isUtf8MimeType;
|
|
40902
40902
|
}
|
|
@@ -41153,7 +41153,7 @@ var require_parseBytesRange = __commonJS({
|
|
|
41153
41153
|
function parseBytesRange(size, str) {
|
|
41154
41154
|
const values = str.slice(str.indexOf("=") + 1);
|
|
41155
41155
|
const ranges = [];
|
|
41156
|
-
const
|
|
41156
|
+
const len2 = values.length;
|
|
41157
41157
|
let i = 0;
|
|
41158
41158
|
let il = 0;
|
|
41159
41159
|
let j = 0;
|
|
@@ -41163,7 +41163,7 @@ var require_parseBytesRange = __commonJS({
|
|
|
41163
41163
|
let dashIdx = values.indexOf("-");
|
|
41164
41164
|
let prevIdx = -1;
|
|
41165
41165
|
while (true) {
|
|
41166
|
-
commaIdx === -1 && (commaIdx =
|
|
41166
|
+
commaIdx === -1 && (commaIdx = len2);
|
|
41167
41167
|
start = parseInt(values.slice(prevIdx + 1, dashIdx), 10);
|
|
41168
41168
|
end = parseInt(values.slice(dashIdx + 1, commaIdx), 10);
|
|
41169
41169
|
if (start !== start) {
|
|
@@ -41187,7 +41187,7 @@ var require_parseBytesRange = __commonJS({
|
|
|
41187
41187
|
index: j++
|
|
41188
41188
|
});
|
|
41189
41189
|
}
|
|
41190
|
-
if (commaIdx ===
|
|
41190
|
+
if (commaIdx === len2) {
|
|
41191
41191
|
break;
|
|
41192
41192
|
}
|
|
41193
41193
|
prevIdx = commaIdx++;
|
|
@@ -41234,7 +41234,7 @@ var require_parseTokenList = __commonJS({
|
|
|
41234
41234
|
let end = 0;
|
|
41235
41235
|
let start = 0;
|
|
41236
41236
|
let result;
|
|
41237
|
-
for (let i = 0,
|
|
41237
|
+
for (let i = 0, len2 = str.length; i < len2; i++) {
|
|
41238
41238
|
switch (str.charCodeAt(i)) {
|
|
41239
41239
|
case 32:
|
|
41240
41240
|
if (start === end) {
|
|
@@ -42235,7 +42235,7 @@ var require_send = __commonJS({
|
|
|
42235
42235
|
};
|
|
42236
42236
|
}
|
|
42237
42237
|
function sendFileDirectly(request, path2, stat4, options) {
|
|
42238
|
-
let
|
|
42238
|
+
let len2 = stat4.size;
|
|
42239
42239
|
let offset = options.start ?? 0;
|
|
42240
42240
|
let statusCode = 200;
|
|
42241
42241
|
const headers = {};
|
|
@@ -42280,19 +42280,19 @@ var require_send = __commonJS({
|
|
|
42280
42280
|
return sendNotModified(headers, path2, stat4);
|
|
42281
42281
|
}
|
|
42282
42282
|
}
|
|
42283
|
-
|
|
42283
|
+
len2 = Math.max(0, len2 - offset);
|
|
42284
42284
|
if (options.end !== void 0) {
|
|
42285
42285
|
const bytes = options.end - offset + 1;
|
|
42286
|
-
if (
|
|
42286
|
+
if (len2 > bytes) len2 = bytes;
|
|
42287
42287
|
}
|
|
42288
42288
|
if (options.acceptRanges) {
|
|
42289
42289
|
const rangeHeader = request.headers.range;
|
|
42290
42290
|
if (rangeHeader !== void 0 && BYTES_RANGE_REGEXP.test(rangeHeader)) {
|
|
42291
42291
|
if (isRangeFresh(request, headers)) {
|
|
42292
|
-
const ranges = parseBytesRange(
|
|
42292
|
+
const ranges = parseBytesRange(len2, rangeHeader);
|
|
42293
42293
|
if (ranges.length === 0) {
|
|
42294
42294
|
debug("range unsatisfiable");
|
|
42295
|
-
headers["Content-Range"] = contentRange("bytes",
|
|
42295
|
+
headers["Content-Range"] = contentRange("bytes", len2);
|
|
42296
42296
|
return sendError(416, {
|
|
42297
42297
|
headers: { "Content-Range": headers["Content-Range"] }
|
|
42298
42298
|
});
|
|
@@ -42302,16 +42302,16 @@ var require_send = __commonJS({
|
|
|
42302
42302
|
if (options.maxContentRangeChunkSize) {
|
|
42303
42303
|
ranges[0].end = Math.min(ranges[0].end, ranges[0].start + options.maxContentRangeChunkSize - 1);
|
|
42304
42304
|
}
|
|
42305
|
-
headers["Content-Range"] = contentRange("bytes",
|
|
42305
|
+
headers["Content-Range"] = contentRange("bytes", len2, ranges[0]);
|
|
42306
42306
|
offset += ranges[0].start;
|
|
42307
|
-
|
|
42307
|
+
len2 = ranges[0].end - ranges[0].start + 1;
|
|
42308
42308
|
}
|
|
42309
42309
|
} else {
|
|
42310
42310
|
debug("range stale");
|
|
42311
42311
|
}
|
|
42312
42312
|
}
|
|
42313
42313
|
}
|
|
42314
|
-
headers["Content-Length"] =
|
|
42314
|
+
headers["Content-Length"] = len2;
|
|
42315
42315
|
if (request.method === "HEAD") {
|
|
42316
42316
|
return {
|
|
42317
42317
|
statusCode,
|
|
@@ -42325,7 +42325,7 @@ var require_send = __commonJS({
|
|
|
42325
42325
|
const stream2 = fs.createReadStream(path2, {
|
|
42326
42326
|
highWaterMark: options.highWaterMark,
|
|
42327
42327
|
start: offset,
|
|
42328
|
-
end: Math.max(offset, offset +
|
|
42328
|
+
end: Math.max(offset, offset + len2 - 1)
|
|
42329
42329
|
});
|
|
42330
42330
|
return {
|
|
42331
42331
|
statusCode,
|
|
@@ -43904,7 +43904,7 @@ var require_applyReviver = __commonJS({
|
|
|
43904
43904
|
function applyReviver(reviver, obj, key, val) {
|
|
43905
43905
|
if (val && typeof val === "object") {
|
|
43906
43906
|
if (Array.isArray(val)) {
|
|
43907
|
-
for (let i = 0,
|
|
43907
|
+
for (let i = 0, len2 = val.length; i < len2; ++i) {
|
|
43908
43908
|
const v0 = val[i];
|
|
43909
43909
|
const v1 = applyReviver(reviver, val, String(i), v0);
|
|
43910
43910
|
if (v1 === void 0)
|
|
@@ -45385,8 +45385,8 @@ ${indent}${line}` : "\n";
|
|
|
45385
45385
|
return start + end;
|
|
45386
45386
|
} else {
|
|
45387
45387
|
if (!reqNewline) {
|
|
45388
|
-
const
|
|
45389
|
-
reqNewline = ctx.options.lineWidth > 0 &&
|
|
45388
|
+
const len2 = lines.reduce((sum, line) => sum + line.length + 2, 2);
|
|
45389
|
+
reqNewline = ctx.options.lineWidth > 0 && len2 > ctx.options.lineWidth;
|
|
45390
45390
|
}
|
|
45391
45391
|
if (reqNewline) {
|
|
45392
45392
|
let str = start;
|
|
@@ -52345,8 +52345,8 @@ function cmpVersions(a, b) {
|
|
|
52345
52345
|
const parse = (v) => (v.split("-")[0] ?? "").split(".").map((n) => parseInt(n, 10) || 0);
|
|
52346
52346
|
const pa = parse(a);
|
|
52347
52347
|
const pb = parse(b);
|
|
52348
|
-
const
|
|
52349
|
-
for (let i = 0; i <
|
|
52348
|
+
const len2 = Math.max(pa.length, pb.length);
|
|
52349
|
+
for (let i = 0; i < len2; i++) {
|
|
52350
52350
|
const x = pa[i] ?? 0;
|
|
52351
52351
|
const y = pb[i] ?? 0;
|
|
52352
52352
|
if (x !== y) return x < y ? -1 : 1;
|
|
@@ -52454,24 +52454,6 @@ function isTrustedFlolessHost(url) {
|
|
|
52454
52454
|
var OFFLINE_GRACE_MS = 24 * 60 * 60 * 1e3;
|
|
52455
52455
|
var MEM_CACHE_MS = 60 * 1e3;
|
|
52456
52456
|
var REFRESH_SKEW_MS = 60 * 1e3;
|
|
52457
|
-
function normalizeSeatReason(raw) {
|
|
52458
|
-
switch ((raw ?? "").toLowerCase().replace(/-/g, "_")) {
|
|
52459
|
-
case "self_takeover":
|
|
52460
|
-
case "takeover":
|
|
52461
|
-
return "takeover";
|
|
52462
|
-
case "inactivity":
|
|
52463
|
-
case "inactive":
|
|
52464
|
-
case "timeout":
|
|
52465
|
-
return "inactivity";
|
|
52466
|
-
case "admin_revoke":
|
|
52467
|
-
case "admin_revoked":
|
|
52468
|
-
case "revoked":
|
|
52469
|
-
case "revoke":
|
|
52470
|
-
return "revoked";
|
|
52471
|
-
default:
|
|
52472
|
-
return "unknown";
|
|
52473
|
-
}
|
|
52474
|
-
}
|
|
52475
52457
|
function isSea() {
|
|
52476
52458
|
try {
|
|
52477
52459
|
return (0, import_node_module2.createRequire)(__import_meta_url)("node:sea").isSea();
|
|
@@ -52602,12 +52584,11 @@ async function accessToken() {
|
|
|
52602
52584
|
}
|
|
52603
52585
|
var mem = null;
|
|
52604
52586
|
var seatLost = false;
|
|
52605
|
-
var seatLostReason;
|
|
52606
52587
|
async function getLicenseStatus(opts = {}) {
|
|
52607
52588
|
const url = signInUrl();
|
|
52608
52589
|
if (seatLost) {
|
|
52609
52590
|
mem = null;
|
|
52610
|
-
return { state: "unlicensed", reason: "seat-taken",
|
|
52591
|
+
return { state: "unlicensed", reason: "seat-taken", signInUrl: url };
|
|
52611
52592
|
}
|
|
52612
52593
|
if (!opts.force && mem && Date.now() - mem.at < MEM_CACHE_MS) return mem.status;
|
|
52613
52594
|
const finish = (s) => {
|
|
@@ -52690,7 +52671,7 @@ async function seatHeartbeat() {
|
|
|
52690
52671
|
return;
|
|
52691
52672
|
}
|
|
52692
52673
|
if (res.status === 401) {
|
|
52693
|
-
let reason = "
|
|
52674
|
+
let reason = "self_takeover";
|
|
52694
52675
|
try {
|
|
52695
52676
|
const b = await res.json();
|
|
52696
52677
|
reason = b.details?.reason ?? b.reason ?? reason;
|
|
@@ -52720,18 +52701,16 @@ async function seatHeartbeat() {
|
|
|
52720
52701
|
}
|
|
52721
52702
|
function loseSeat(reason) {
|
|
52722
52703
|
seatLost = true;
|
|
52723
|
-
seatLostReason = normalizeSeatReason(reason);
|
|
52724
52704
|
seat = null;
|
|
52725
52705
|
mem = null;
|
|
52726
52706
|
if (hbTimer) {
|
|
52727
52707
|
clearInterval(hbTimer);
|
|
52728
52708
|
hbTimer = null;
|
|
52729
52709
|
}
|
|
52730
|
-
onSeatLostCb?.(
|
|
52710
|
+
onSeatLostCb?.(reason);
|
|
52731
52711
|
}
|
|
52732
52712
|
function resetSeat() {
|
|
52733
52713
|
seatLost = false;
|
|
52734
|
-
seatLostReason = void 0;
|
|
52735
52714
|
seat = null;
|
|
52736
52715
|
if (hbTimer) {
|
|
52737
52716
|
clearInterval(hbTimer);
|
|
@@ -52856,7 +52835,7 @@ function appVersion() {
|
|
|
52856
52835
|
return resolveVersion({
|
|
52857
52836
|
isSea: isSea2(),
|
|
52858
52837
|
sqVersionXml: readSqVersionXml(),
|
|
52859
|
-
define: true ? "0.
|
|
52838
|
+
define: true ? "0.34.0" : void 0,
|
|
52860
52839
|
pkgVersion: readPkgVersion()
|
|
52861
52840
|
});
|
|
52862
52841
|
}
|
|
@@ -52866,7 +52845,7 @@ function resolveChannel(s) {
|
|
|
52866
52845
|
return "dev";
|
|
52867
52846
|
}
|
|
52868
52847
|
function appChannel() {
|
|
52869
|
-
return resolveChannel({ isSea: isSea2(), define: true ? "0.
|
|
52848
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.34.0" : void 0 });
|
|
52870
52849
|
}
|
|
52871
52850
|
|
|
52872
52851
|
// oauth-presets.ts
|
|
@@ -54029,6 +54008,239 @@ function bakeDownstream(sourcePath, contract) {
|
|
|
54029
54008
|
return { sceneElements, bomRows };
|
|
54030
54009
|
}
|
|
54031
54010
|
|
|
54011
|
+
// steel-confidence.ts
|
|
54012
|
+
var BAND_WEIGHT = { verified: 1, high: 0.9, med: 0.65, low: 0.35, rfi: 0 };
|
|
54013
|
+
var emptyCounts = () => ({ verified: 0, high: 0, med: 0, low: 0, rfi: 0 });
|
|
54014
|
+
function weightOf(contract, profile) {
|
|
54015
|
+
const w = contract.weights;
|
|
54016
|
+
if (!w || !profile) return null;
|
|
54017
|
+
if (profile in w) return w[profile] ?? null;
|
|
54018
|
+
const hit = Object.entries(w).find(([k]) => k.toUpperCase() === profile.toUpperCase());
|
|
54019
|
+
return hit ? hit[1] ?? null : null;
|
|
54020
|
+
}
|
|
54021
|
+
var isMfMark = (p) => !!p && /(^|[^A-Z])MF($|[^A-Z])/i.test(p);
|
|
54022
|
+
var len = (a, b) => Math.hypot(a[0] - b[0], a[1] - b[1]);
|
|
54023
|
+
function redundantDupIds(members) {
|
|
54024
|
+
const key = (m) => {
|
|
54025
|
+
if (!m.wp || m.wp.length < 2) return null;
|
|
54026
|
+
const r = (p) => `${Math.round(p[0] / 3)},${Math.round(p[1] / 3)}`;
|
|
54027
|
+
const a = r(m.wp[0]), b = r(m.wp[1]);
|
|
54028
|
+
return a < b ? `${a}|${b}` : `${b}|${a}`;
|
|
54029
|
+
};
|
|
54030
|
+
const groups = /* @__PURE__ */ new Map();
|
|
54031
|
+
for (const m of members) {
|
|
54032
|
+
const k = key(m);
|
|
54033
|
+
if (!k) continue;
|
|
54034
|
+
(groups.get(k) ?? groups.set(k, []).get(k)).push(m);
|
|
54035
|
+
}
|
|
54036
|
+
const out = /* @__PURE__ */ new Set();
|
|
54037
|
+
for (const grp of groups.values()) {
|
|
54038
|
+
if (grp.length < 2) continue;
|
|
54039
|
+
grp.sort((a, b) => dupRank(b) - dupRank(a));
|
|
54040
|
+
for (let i = 1; i < grp.length; i++) out.add(grp[i].id);
|
|
54041
|
+
}
|
|
54042
|
+
return out;
|
|
54043
|
+
}
|
|
54044
|
+
function dupRank(m) {
|
|
54045
|
+
let s = 0;
|
|
54046
|
+
if (m.profile && !isMfMark(m.profile)) s += 1;
|
|
54047
|
+
if (m.profile && m.profile.trim() !== "") s += 1;
|
|
54048
|
+
return s;
|
|
54049
|
+
}
|
|
54050
|
+
function elevationAssumed(m) {
|
|
54051
|
+
if (m.role === "column") return m.col?.tosDef !== false;
|
|
54052
|
+
const ends = m.ends ?? [];
|
|
54053
|
+
if (ends.length === 0) return true;
|
|
54054
|
+
return ends.some((e) => e.tosDef !== false);
|
|
54055
|
+
}
|
|
54056
|
+
function scoreMember(contract, m, dupIds) {
|
|
54057
|
+
const plf = weightOf(contract, m.profile);
|
|
54058
|
+
const factors = [];
|
|
54059
|
+
if (plf == null) {
|
|
54060
|
+
factors.push({
|
|
54061
|
+
key: "profile",
|
|
54062
|
+
label: "Profile",
|
|
54063
|
+
state: "fail",
|
|
54064
|
+
detail: !m.profile || m.profile.trim() === "" ? "no profile assigned" : isMfMark(m.profile) ? `unresolved mark "${m.profile}" \u2014 not an AISC size` : `"${m.profile}" not in the AISC weight table`
|
|
54065
|
+
});
|
|
54066
|
+
return { band: "rfi", factors };
|
|
54067
|
+
}
|
|
54068
|
+
const scheduleResolved = m.mf === true;
|
|
54069
|
+
factors.push({
|
|
54070
|
+
key: "profile",
|
|
54071
|
+
label: "Profile",
|
|
54072
|
+
state: scheduleResolved ? "assumed" : "ok",
|
|
54073
|
+
detail: scheduleResolved ? `${m.profile} \u2014 resolved from the frame schedule (${plf} plf)` : `${m.profile} (${plf} plf, AISC)`
|
|
54074
|
+
});
|
|
54075
|
+
const assumedElev = elevationAssumed(m);
|
|
54076
|
+
factors.push({
|
|
54077
|
+
key: "elevation",
|
|
54078
|
+
label: "Elevation",
|
|
54079
|
+
state: assumedElev ? "assumed" : "ok",
|
|
54080
|
+
detail: assumedElev ? "plan default (UNO) \u2014 no local callout" : "from a drawing callout"
|
|
54081
|
+
});
|
|
54082
|
+
const isDup = dupIds.has(m.id);
|
|
54083
|
+
if (isDup) factors.push({ key: "dup", label: "Duplicate", state: "fail", detail: "coincident with a kept member \u2014 deleting dedupes the BOM" });
|
|
54084
|
+
if (m.verified === true) factors.push({ key: "verified", label: "Verified", state: "ok", detail: "human-confirmed" });
|
|
54085
|
+
let band;
|
|
54086
|
+
if (m.verified === true) band = "verified";
|
|
54087
|
+
else if (isDup) band = "low";
|
|
54088
|
+
else if (scheduleResolved || assumedElev) band = "med";
|
|
54089
|
+
else band = "high";
|
|
54090
|
+
return { band, factors };
|
|
54091
|
+
}
|
|
54092
|
+
function memberTons(contract, m) {
|
|
54093
|
+
const plf = weightOf(contract, m.profile);
|
|
54094
|
+
if (plf == null) return 0;
|
|
54095
|
+
let ft;
|
|
54096
|
+
if (m.role === "column") {
|
|
54097
|
+
const { tos, bos } = m.col ?? {};
|
|
54098
|
+
if (tos == null || bos == null) return 0;
|
|
54099
|
+
ft = Math.abs(tos - bos) / 12;
|
|
54100
|
+
} else {
|
|
54101
|
+
if (!m.wp || m.wp.length < 2) return 0;
|
|
54102
|
+
const plan = (contract.plans ?? []).find((p) => (p.members ?? []).includes(m));
|
|
54103
|
+
const ptPerFt = plan && plan.pt_per_ft && plan.pt_per_ft > 0 ? plan.pt_per_ft : 1;
|
|
54104
|
+
ft = len(m.wp[0], m.wp[1]) / ptPerFt;
|
|
54105
|
+
}
|
|
54106
|
+
return ft * plf / 2e3;
|
|
54107
|
+
}
|
|
54108
|
+
function rollup(members, countWeighted = false) {
|
|
54109
|
+
const counts = emptyCounts();
|
|
54110
|
+
let num2 = 0, den = 0, tons = 0;
|
|
54111
|
+
for (const m of members) {
|
|
54112
|
+
counts[m.band]++;
|
|
54113
|
+
if (m.band === "rfi") continue;
|
|
54114
|
+
const w = countWeighted ? 1 : m.tons;
|
|
54115
|
+
num2 += w * BAND_WEIGHT[m.band];
|
|
54116
|
+
den += w;
|
|
54117
|
+
tons += m.tons;
|
|
54118
|
+
}
|
|
54119
|
+
return { score: den > 0 ? Math.round(num2 / den * 100) : null, tons, counts };
|
|
54120
|
+
}
|
|
54121
|
+
function scoreContract(contractInput) {
|
|
54122
|
+
const contract = contractInput ?? {};
|
|
54123
|
+
const plans = contract.plans ?? [];
|
|
54124
|
+
const byMember = [];
|
|
54125
|
+
const byDetail = [];
|
|
54126
|
+
let totalSegments = 0;
|
|
54127
|
+
const knownSheets = /* @__PURE__ */ new Set();
|
|
54128
|
+
for (const p of plans) if (p.sheet) knownSheets.add(p.sheet.toUpperCase());
|
|
54129
|
+
for (const s of Object.keys(contract.detail_bubbles ?? {})) knownSheets.add(s.toUpperCase());
|
|
54130
|
+
plans.forEach((plan, planIdx) => {
|
|
54131
|
+
totalSegments += (plan.segments ?? []).length;
|
|
54132
|
+
const members = plan.members ?? [];
|
|
54133
|
+
const dupIds = redundantDupIds(members);
|
|
54134
|
+
for (const m of members) {
|
|
54135
|
+
const { band, factors } = scoreMember(contract, m, dupIds);
|
|
54136
|
+
byMember.push({
|
|
54137
|
+
id: m.id,
|
|
54138
|
+
planIdx,
|
|
54139
|
+
sheet: plan.sheet ?? "",
|
|
54140
|
+
role: m.role === "column" ? "column" : "beam",
|
|
54141
|
+
profile: m.profile ?? "",
|
|
54142
|
+
band,
|
|
54143
|
+
tons: band === "rfi" ? 0 : memberTons(contract, m),
|
|
54144
|
+
factors
|
|
54145
|
+
});
|
|
54146
|
+
}
|
|
54147
|
+
for (const d of plan.details ?? []) {
|
|
54148
|
+
const text = d.text ?? "";
|
|
54149
|
+
const sheet = detailSheet(text);
|
|
54150
|
+
const resolved = sheet != null && knownSheets.has(sheet.toUpperCase());
|
|
54151
|
+
byDetail.push({
|
|
54152
|
+
text,
|
|
54153
|
+
planIdx,
|
|
54154
|
+
sheet: plan.sheet ?? "",
|
|
54155
|
+
band: resolved ? "high" : "low",
|
|
54156
|
+
reason: resolved ? `references ${sheet} (in the set)` : sheet ? `references ${sheet} \u2014 not found in the set` : "no sheet reference parsed"
|
|
54157
|
+
});
|
|
54158
|
+
}
|
|
54159
|
+
});
|
|
54160
|
+
const beams = rollup(byMember.filter((m) => m.role === "beam"));
|
|
54161
|
+
const columns = rollup(byMember.filter((m) => m.role === "column"));
|
|
54162
|
+
const details = rollupDetails(byDetail);
|
|
54163
|
+
const scored = byMember.filter((m) => m.band !== "rfi");
|
|
54164
|
+
const num2 = scored.reduce((s, m) => s + m.tons * BAND_WEIGHT[m.band], 0);
|
|
54165
|
+
const den = scored.reduce((s, m) => s + m.tons, 0);
|
|
54166
|
+
return {
|
|
54167
|
+
byMember,
|
|
54168
|
+
byDetail,
|
|
54169
|
+
byCategory: {
|
|
54170
|
+
beams,
|
|
54171
|
+
columns,
|
|
54172
|
+
details,
|
|
54173
|
+
connections: { score: null, note: "Not scored yet (reserved slot)" }
|
|
54174
|
+
},
|
|
54175
|
+
coverage: {
|
|
54176
|
+
members: byMember.length,
|
|
54177
|
+
segments: totalSegments,
|
|
54178
|
+
note: "Approximate in v1 \u2014 precise per-segment binding is Slice 2."
|
|
54179
|
+
},
|
|
54180
|
+
overall: {
|
|
54181
|
+
score: den > 0 ? Math.round(num2 / den * 100) : null,
|
|
54182
|
+
tons: den,
|
|
54183
|
+
rfiCount: byMember.filter((m) => m.band === "rfi").length
|
|
54184
|
+
}
|
|
54185
|
+
};
|
|
54186
|
+
}
|
|
54187
|
+
function detailSheet(text) {
|
|
54188
|
+
const m = text.toUpperCase().match(/S-?\s?\d{2,3}/);
|
|
54189
|
+
return m ? m[0].replace(/\s/g, "") : null;
|
|
54190
|
+
}
|
|
54191
|
+
function rollupDetails(details) {
|
|
54192
|
+
const counts = emptyCounts();
|
|
54193
|
+
let num2 = 0, den = 0;
|
|
54194
|
+
for (const d of details) {
|
|
54195
|
+
counts[d.band]++;
|
|
54196
|
+
num2 += BAND_WEIGHT[d.band];
|
|
54197
|
+
den += 1;
|
|
54198
|
+
}
|
|
54199
|
+
return { score: den > 0 ? Math.round(num2 / den * 100) : null, tons: 0, counts };
|
|
54200
|
+
}
|
|
54201
|
+
|
|
54202
|
+
// contract-score.ts
|
|
54203
|
+
var ORDER = { rfi: 0, low: 1, med: 2, high: 3, verified: 4 };
|
|
54204
|
+
var factor = (factors, key, state2) => factors.find((f) => f.key === key && (state2 === void 0 || f.state === state2));
|
|
54205
|
+
function reasonFor(m) {
|
|
54206
|
+
if (m.band === "rfi") {
|
|
54207
|
+
const fail2 = factor(m.factors, "profile", "fail");
|
|
54208
|
+
const base = fail2?.detail ?? "no resolvable AISC size";
|
|
54209
|
+
return /unresolved mark/.test(base) ? `${base} \u2014 resolve from the frame schedule` : base;
|
|
54210
|
+
}
|
|
54211
|
+
if (m.band === "low") {
|
|
54212
|
+
return factor(m.factors, "dup")?.detail ?? "coincident with a kept member \u2014 delete it";
|
|
54213
|
+
}
|
|
54214
|
+
const profAssumed = factor(m.factors, "profile", "assumed");
|
|
54215
|
+
if (profAssumed) return `${profAssumed.detail} \u2014 confirm against the schedule`;
|
|
54216
|
+
const elevAssumed = factor(m.factors, "elevation", "assumed");
|
|
54217
|
+
if (elevAssumed) return `${elevAssumed.detail} \u2014 set a local T.O.S callout to confirm`;
|
|
54218
|
+
return "";
|
|
54219
|
+
}
|
|
54220
|
+
function scoreContract2(contractInput) {
|
|
54221
|
+
const s = scoreContract(contractInput);
|
|
54222
|
+
const counts = { verified: 0, high: 0, med: 0, low: 0, rfi: 0 };
|
|
54223
|
+
for (const m of s.byMember) counts[m.band] += 1;
|
|
54224
|
+
const worklist = s.byMember.filter((m) => m.band === "rfi" || m.band === "low" || m.band === "med").sort((a, b) => ORDER[a.band] - ORDER[b.band] || b.tons - a.tons).map((m) => ({
|
|
54225
|
+
id: m.id,
|
|
54226
|
+
planIdx: m.planIdx,
|
|
54227
|
+
sheet: m.sheet,
|
|
54228
|
+
role: m.role,
|
|
54229
|
+
profile: m.profile,
|
|
54230
|
+
band: m.band,
|
|
54231
|
+
tons: m.tons,
|
|
54232
|
+
reason: reasonFor(m)
|
|
54233
|
+
}));
|
|
54234
|
+
return {
|
|
54235
|
+
score: s.overall.score,
|
|
54236
|
+
tons: s.overall.tons,
|
|
54237
|
+
members: s.byMember.length,
|
|
54238
|
+
rfiCount: s.overall.rfiCount,
|
|
54239
|
+
counts,
|
|
54240
|
+
worklist
|
|
54241
|
+
};
|
|
54242
|
+
}
|
|
54243
|
+
|
|
54032
54244
|
// app-lifecycle.ts
|
|
54033
54245
|
var import_node_fs21 = require("node:fs");
|
|
54034
54246
|
var import_node_os13 = require("node:os");
|
|
@@ -56360,8 +56572,8 @@ var ReaddirpStream = class extends import_node_stream2.Readable {
|
|
|
56360
56572
|
return "file";
|
|
56361
56573
|
}
|
|
56362
56574
|
if (entryRealPathStats.isDirectory()) {
|
|
56363
|
-
const
|
|
56364
|
-
if (full.startsWith(entryRealPath) && full.substr(
|
|
56575
|
+
const len2 = entryRealPath.length;
|
|
56576
|
+
if (full.startsWith(entryRealPath) && full.substr(len2, 1) === import_node_path24.sep) {
|
|
56365
56577
|
const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
|
|
56366
56578
|
recursiveError.code = RECURSIVE_ERROR_CODE;
|
|
56367
56579
|
return this._onError(recursiveError);
|
|
@@ -58213,10 +58425,7 @@ async function startServer() {
|
|
|
58213
58425
|
}
|
|
58214
58426
|
return { ok: true, bootstrap: getBootstrapState().status };
|
|
58215
58427
|
});
|
|
58216
|
-
onSeatLost((reason) => {
|
|
58217
|
-
app.log.warn({ reason }, "license seat lost \u2014 gating this session until re-login");
|
|
58218
|
-
broadcast({ type: "seat-taken", reason });
|
|
58219
|
-
});
|
|
58428
|
+
onSeatLost((reason) => broadcast({ type: "seat-taken", reason }));
|
|
58220
58429
|
app.get("/api/apps", async () => {
|
|
58221
58430
|
const apps = await aware.list();
|
|
58222
58431
|
return { ok: true, apps: apps.map((a) => ({ ...a, provider: appProvider(a.id), baked: appBaked(a.id) })) };
|
|
@@ -58380,6 +58589,28 @@ async function startServer() {
|
|
|
58380
58589
|
broadcast({ type: "compiled", id: req.params.appId, lockPath: result.lockPath });
|
|
58381
58590
|
return { ok: true, result };
|
|
58382
58591
|
});
|
|
58592
|
+
app.post(
|
|
58593
|
+
"/api/contract/:appId/score",
|
|
58594
|
+
async (req, reply) => {
|
|
58595
|
+
const doc2 = req.body && "contract" in req.body ? req.body.contract : readContract(req.params.appId);
|
|
58596
|
+
if (doc2 == null) return reply.status(404).send({ ok: false, error: "no contract to score" });
|
|
58597
|
+
const v = validateSteelTakeoff(doc2);
|
|
58598
|
+
if (!v.valid) {
|
|
58599
|
+
const first = v.errors[0];
|
|
58600
|
+
return reply.status(400).send({ ok: false, error: `contract failed schema validation \u2014 ${first ? `${first.path}: ${first.message}` : "invalid"}` });
|
|
58601
|
+
}
|
|
58602
|
+
const target = typeof req.body?.target === "number" ? req.body.target : 70;
|
|
58603
|
+
const result = scoreContract2(doc2);
|
|
58604
|
+
const meetsTarget = result.score != null && result.score >= target;
|
|
58605
|
+
return {
|
|
58606
|
+
ok: true,
|
|
58607
|
+
...result,
|
|
58608
|
+
target,
|
|
58609
|
+
meetsTarget,
|
|
58610
|
+
gap: result.score == null ? target : Math.max(0, target - result.score)
|
|
58611
|
+
};
|
|
58612
|
+
}
|
|
58613
|
+
);
|
|
58383
58614
|
function awareStderr(e) {
|
|
58384
58615
|
if (e instanceof AwareError && e.detail && typeof e.detail === "object") {
|
|
58385
58616
|
const s = e.detail.stderr;
|
|
@@ -115,23 +115,46 @@ Follow the methodology condensed here (full detail + every gotcha in
|
|
|
115
115
|
- **`(N)` = new, `(E)` = existing (often out of scope).** Read the full set for context before
|
|
116
116
|
deciding.
|
|
117
117
|
|
|
118
|
-
### 3. Honor `target_confidence`
|
|
118
|
+
### 3. Honor `target_confidence` — score, then LOOP to the goal
|
|
119
119
|
|
|
120
120
|
Read the app's `target_confidence` input (default 70). The confidence score is a **deterministic
|
|
121
|
-
function of observable evidence** — not model self-report
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
- **High (
|
|
126
|
-
- **Medium (
|
|
127
|
-
- **Low (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
121
|
+
function of observable evidence** — not a model self-report — so you measure it with the server,
|
|
122
|
+
never by eyeballing. Per-member bands (full method in
|
|
123
|
+
`docs/superpowers/specs/2026-06-20-steel-takeoff-confidence-report.md`):
|
|
124
|
+
|
|
125
|
+
- **Verified (1.0)** — human-confirmed. **High (0.9)** — resolved from drawing evidence, no contradiction.
|
|
126
|
+
- **Medium (0.65)** — one indirection (`MF`→frame schedule) or a plan-default (assumed) elevation.
|
|
127
|
+
- **Low (0.35)** — coincident duplicate. **RFI (0)** — no AISC size resolved.
|
|
128
|
+
|
|
129
|
+
Aggregate = the **tons-weighted** average of those band weights over the non-RFI members (RFI are
|
|
130
|
+
excluded from the average and counted separately as the headline drag).
|
|
131
|
+
|
|
132
|
+
**The score endpoint is your gauge — call it, don't guess:**
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
POST http://localhost:<port>/api/contract/steel-takeoff/score
|
|
136
|
+
Content-Type: application/json
|
|
137
|
+
{ "contract": <your draft contract>, "target": <target_confidence, e.g. 70> }
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Returns `{ score, target, meetsTarget, gap, rfiCount, counts, worklist }` — the SAME aggregate the
|
|
141
|
+
editor's Confidence chip shows. `worklist` is the rfi/low/med members dragging the score, worst-first
|
|
142
|
+
(heaviest first within a band), each with a `reason`. (Omit `contract` to score the stored one.)
|
|
143
|
+
|
|
144
|
+
**The loop** — iterate at COMPOSE time until the goal is met:
|
|
145
|
+
|
|
146
|
+
1. Build the draft (steps 1–2), `POST …/score`.
|
|
147
|
+
2. While `meetsTarget` is false AND the last round improved the score:
|
|
148
|
+
- Take the top of `worklist` and fix by `band`/`reason`:
|
|
149
|
+
- **rfi — "no profile assigned" / "<x> not in the AISC table":** re-read that member's label region at
|
|
150
|
+
higher zoom; re-run the `steel-detailer-us` lookup. **rfi — "unresolved mark MF…":** resolve it from the
|
|
151
|
+
Frame Elevation schedule (grid + level) → set the real profile, keep `mf: true`.
|
|
152
|
+
- **med — "resolved from the frame schedule (assumed)":** confirm the MF resolution against the schedule.
|
|
153
|
+
**med — "plan-default elevation":** find a local T.O.S callout for that member; set `ends[].tos` with `tosDef:false`.
|
|
154
|
+
- **low — "duplicate":** delete the coincident member (or merge).
|
|
155
|
+
- Re-`POST …/score`. Stop when `meetsTarget`, or after **2 rounds with no score gain** (diminishing returns).
|
|
156
|
+
3. PUT the final contract (step 5). **Be honest if you stop below target** — report the score, the gap,
|
|
157
|
+
and what's left on the worklist (it's a triage guide, not a hard gate; the user decides whether to Approve).
|
|
135
158
|
|
|
136
159
|
### 4. Assemble the `steel.takeoff/v1` contract
|
|
137
160
|
|
package/dist/web/aware.js
CHANGED
|
@@ -3742,14 +3742,8 @@
|
|
|
3742
3742
|
loadApp(currentId).catch(reportErr);
|
|
3743
3743
|
}, 250);
|
|
3744
3744
|
} else if (m.type === 'seat-taken') {
|
|
3745
|
-
// This session's seat was
|
|
3746
|
-
|
|
3747
|
-
const SEAT_TOAST = {
|
|
3748
|
-
takeover: 'Signed in on another device — sign in here to continue.',
|
|
3749
|
-
inactivity: 'Your session timed out — sign in here to continue.',
|
|
3750
|
-
revoked: 'Your session was ended by an administrator — sign in here to continue.',
|
|
3751
|
-
};
|
|
3752
|
-
showToast(SEAT_TOAST[m.reason] || 'Your session ended — sign in here to continue.', 'err');
|
|
3745
|
+
// This session's seat was claimed by another device (newest-login-wins).
|
|
3746
|
+
showToast('Signed in on another device — sign in here to continue.', 'err');
|
|
3753
3747
|
recheckLicenseAndGate();
|
|
3754
3748
|
}
|
|
3755
3749
|
};
|
|
@@ -5579,21 +5573,7 @@
|
|
|
5579
5573
|
body: 'Sign in with your FloLess account to use floless.app.',
|
|
5580
5574
|
secondary: { label: 'No subscription yet? Subscribe →', href: subUrl } },
|
|
5581
5575
|
};
|
|
5582
|
-
|
|
5583
|
-
// A lost seat carries a sub-reason; only a genuine takeover should claim "another device".
|
|
5584
|
-
// Inactivity/revoke/unknown read neutrally so the gate stops misattributing the cause (#142).
|
|
5585
|
-
if (reason === 'seat-taken') {
|
|
5586
|
-
const SEAT_COPY = {
|
|
5587
|
-
inactivity: { headline: 'Session timed out',
|
|
5588
|
-
body: 'Your session ended after a period of inactivity. Sign in to continue.' },
|
|
5589
|
-
revoked: { headline: 'Session ended by an administrator',
|
|
5590
|
-
body: 'Your session was ended by an administrator. Sign in again to continue.' },
|
|
5591
|
-
unknown: { headline: 'Session ended',
|
|
5592
|
-
body: 'Your session has ended. Sign in to continue using floless.app.' },
|
|
5593
|
-
};
|
|
5594
|
-
const sc = SEAT_COPY[status.seatReason]; // 'takeover'/absent → keep the default takeover copy
|
|
5595
|
-
if (sc) copy = { ...copy, ...sc };
|
|
5596
|
-
}
|
|
5576
|
+
const copy = COPY[reason] || COPY['signed-out']; // neutral fallback for an unknown/absent reason
|
|
5597
5577
|
const style = document.createElement('style');
|
|
5598
5578
|
style.textContent = `
|
|
5599
5579
|
#license-gate{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;
|