@floless/app 0.148.0 → 0.149.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/bin/floless.mjs +1 -1
- package/dist/floless-server.cjs +29419 -19062
- package/dist/schemas/drawing-check.profile.v1.schema.json +156 -0
- package/dist/schemas/steel.model.v2.schema.json +43 -1
- package/dist/schemas/tekla.model.v2.schema.json +6 -2
- package/dist/skills/floless-app-steel-model/SKILL.md +54 -11
- package/dist/skills/floless-app-steel-model/references/detail-from-a-screenshot.md +9 -5
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +128 -15
- package/dist/skills/floless-app-vectorize/SKILL.md +7 -4
- package/dist/templates/check-drawings.flo +46 -0
- package/dist/templates/drawing-check.flo +55 -0
- package/dist/templates/tekla-parser.flo +6 -2
- package/dist/web/app.css +143 -8
- package/dist/web/aware.js +512 -42
- package/dist/web/chat.css +171 -9
- package/dist/web/chat.js +2005 -759
- package/dist/web/commands-drawing-check.js +53 -0
- package/dist/web/commands-shell.js +275 -3
- package/dist/web/commands-steel.js +1 -0
- package/dist/web/commands-tekla-parser.js +3 -0
- package/dist/web/commands.js +1 -1
- package/dist/web/connections.js +382 -0
- package/dist/web/display-units.js +15 -1
- package/dist/web/drawing-check-editor.html +289 -0
- package/dist/web/drawing-check-editor.js +1242 -0
- package/dist/web/drawing-check-overlay.js +36 -0
- package/dist/web/filter-ai-proposal.js +32 -13
- package/dist/web/index.html +25 -3
- package/dist/web/instructor.js +2 -2
- package/dist/web/local-discovery.js +144 -2
- package/dist/web/model-display-units.js +23 -9
- package/dist/web/model-viewport-revit-adapter.js +12 -2
- package/dist/web/revit-editor.css +5 -0
- package/dist/web/revit-editor.js +141 -21
- package/dist/web/steel-editor.html +166 -27
- package/dist/web/steel-filter.html +60 -166
- package/dist/web/steel-model-v2-commands.js +13 -3
- package/dist/web/steel-model-v2-projection.js +20 -0
- package/dist/web/steel-units.js +3 -1
- package/dist/web/workspaces.js +323 -26
- package/distribution-resource-inventory.mjs +8 -1
- package/launch.mjs +5 -5
- package/package.json +3 -1
- package/dist/web/filter-ai-context.js +0 -92
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floless/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.149.0",
|
|
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": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"test": "node build/run-tests.mjs",
|
|
25
25
|
"test:steel-inspector": "tsx --test steel-filter-inspector.required.ts",
|
|
26
26
|
"test:drawing-identify": "tsx --test drawing-identify.required.ts",
|
|
27
|
+
"test:drawing-check": "tsx --test drawing-check.required.ts",
|
|
27
28
|
"test:project-import-pdf": "node build/run-required-tests.mjs projects-store.test.ts rfi-import.test.ts",
|
|
28
29
|
"test:platform": "node build/run-tests.mjs --platform-only",
|
|
29
30
|
"build": "node build/bundle.mjs",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"verify:flo-naming": "node build/verify-flo-naming.mjs",
|
|
41
42
|
"verify:forward-merge": "node build/verify-forward-merge.mjs",
|
|
42
43
|
"verify:no-title": "node build/verify-no-title.mjs",
|
|
44
|
+
"verify:windows-hide": "node build/verify-windows-hide.mjs",
|
|
43
45
|
"verify:css-vars": "node build/verify-css-vars.mjs",
|
|
44
46
|
"verify:runtime-pins": "node build/verify-runtime-pins.mjs",
|
|
45
47
|
"verify:rvt-registry-pins": "node build/verify-rvt-registry-pins.mjs",
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/** A bounded, explicitly partial view for read-only Drawing Filter questions. */
|
|
2
|
-
export function rankFilterControls(controls, instruction, focusedControl) {
|
|
3
|
-
const upper = String(instruction || '').toUpperCase();
|
|
4
|
-
const words = upper.match(/[A-Z0-9]{3,}/g) || [];
|
|
5
|
-
const score = row => {
|
|
6
|
-
const label = String(row.label || '').toUpperCase();
|
|
7
|
-
const focused = focusedControl?.dimension === row.dimension
|
|
8
|
-
&& (focusedControl.key !== undefined && (row.key !== undefined || row.value !== undefined)
|
|
9
|
-
? focusedControl.key === (row.key ?? row.value)
|
|
10
|
-
: String(focusedControl.label).toUpperCase() === label);
|
|
11
|
-
return (focused ? 100 : 0)
|
|
12
|
-
+ (label && upper.includes(label) ? 80 : 0)
|
|
13
|
-
+ (words.some(word => label.includes(word)) ? 40 : 0)
|
|
14
|
-
+ (/GRID|BEAM|STEL|STEEL|DIM|SECT|PROFILE|MARK/.test(label) ? 10 : 0)
|
|
15
|
-
+ (row.checked ? 2 : 0);
|
|
16
|
-
};
|
|
17
|
-
return [...controls].sort((a, b) => score(b) - score(a));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* How much of the view the answering AI is told about.
|
|
22
|
-
*
|
|
23
|
-
* These were 10 facts and a 500-character text budget — a few dozen short strings out of a sheet
|
|
24
|
-
* with thousands of elements — and the answer then carried a line telling the model not to claim a
|
|
25
|
-
* complete audit, which was true and unhelpful in equal measure. The numbers were never measured
|
|
26
|
-
* against a model's capacity; they were a cautious guess made when this path had no other evidence
|
|
27
|
-
* and could not afford to be wrong.
|
|
28
|
-
*
|
|
29
|
-
* It has other evidence now: the sheet itself is attached as a picture, so these facts are the
|
|
30
|
-
* CONTROLS and the drawing carries the rest. That makes a wider fact list cheap and a narrow one
|
|
31
|
-
* pointlessly lossy, so the budgets are raised to where a real sheet fits.
|
|
32
|
-
*/
|
|
33
|
-
const MAX_FACTS = 200;
|
|
34
|
-
const MAX_FACT_CHARS = 1_000;
|
|
35
|
-
// Under the server's MAX_FACT_CHARS (20,000), not equal to it: a fact of exactly the limit passes
|
|
36
|
-
// by one character, and the next word added to the prefix would tip every message into a refusal
|
|
37
|
-
// nobody can see. Margin on purpose.
|
|
38
|
-
const MAX_SAMPLE_CHARS = 18_000;
|
|
39
|
-
|
|
40
|
-
export function readOnlyFilterContext(snapshot, instruction, scope) {
|
|
41
|
-
const facts = [
|
|
42
|
-
scope,
|
|
43
|
-
('Current sheet: '+(snapshot.sheet || 'not loaded')+'; mode: '+(snapshot.mode || 'not loaded')+'. Checked properties must all match.').slice(0,500),
|
|
44
|
-
];
|
|
45
|
-
// Two facts are ALWAYS appended after the control loop -- the sheet's text sample and the
|
|
46
|
-
// "Controls listed" count -- and those two are the honest ones. Reserve their slots here: filling
|
|
47
|
-
// the budget with controls used to push the message to 201 or 202 facts, over the server's limit,
|
|
48
|
-
// and the whole question was then refused. To the person that reads as the AI failing rather than
|
|
49
|
-
// as a control list that was too long to send.
|
|
50
|
-
const CONTROL_FACT_LIMIT = MAX_FACTS - 2;
|
|
51
|
-
const controls = snapshot.controls || [];
|
|
52
|
-
let represented = 0, part = '';
|
|
53
|
-
for (const row of controls) {
|
|
54
|
-
const entry = row.dimension+':'+JSON.stringify(row.label)+' '+(row.checked?'on':'off')+' ('+row.count+')'
|
|
55
|
-
+(row.notRead ? ' not read by FloLess and cannot be changed here' : '');
|
|
56
|
-
if (part && part.length + entry.length + 2 > MAX_FACT_CHARS) {
|
|
57
|
-
facts.push(part); part = '';
|
|
58
|
-
}
|
|
59
|
-
if (facts.length >= CONTROL_FACT_LIMIT) break;
|
|
60
|
-
part += (part ? '; ' : '') + entry;
|
|
61
|
-
represented++;
|
|
62
|
-
}
|
|
63
|
-
if (part && facts.length < CONTROL_FACT_LIMIT) facts.push(part);
|
|
64
|
-
const samples = snapshot.sheetTextSamples || [];
|
|
65
|
-
let sampleCount = 0, sampleFact = 'Text on this sheet: ';
|
|
66
|
-
for (const row of samples) {
|
|
67
|
-
const entry = JSON.stringify(row.text)+' on '+JSON.stringify(row.layer)+' '+(row.selected?'selected':'excluded');
|
|
68
|
-
if (sampleFact.length + entry.length + 2 > MAX_SAMPLE_CHARS) break;
|
|
69
|
-
sampleFact += (sampleCount ? '; ' : '') + entry;
|
|
70
|
-
sampleCount++;
|
|
71
|
-
}
|
|
72
|
-
if (sampleCount) facts.push(sampleFact);
|
|
73
|
-
const allControls = represented >= (snapshot.controlTotal ?? controls.length);
|
|
74
|
-
const allText = sampleCount >= (snapshot.textTotal ?? samples.length);
|
|
75
|
-
// Still honest about what is listed, but no longer an instruction to hedge: when the sheet itself
|
|
76
|
-
// is attached, the drawing is the evidence and these facts are the controls beside it. Telling the
|
|
77
|
-
// model to distrust a complete list is how a question with a real answer got a cautious non-answer.
|
|
78
|
-
facts.push('Controls listed: '+represented+' of '+(snapshot.controlTotal ?? controls.length)
|
|
79
|
-
+'. Text items listed: '+sampleCount+' of '+(snapshot.textTotal ?? samples.length)+'.'
|
|
80
|
-
+ (allControls && allText
|
|
81
|
-
? ' That is everything this view holds.'
|
|
82
|
-
: ' Some of this view is not listed here; if the answer depends on what is missing, say so and say what to open.'));
|
|
83
|
-
return { subject:instruction, commandId:'filter.ask-ai-question', surface:'steel-filter', tone:'idle', facts };
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/** Unsaved ticks and the current sheet are part of the Question's answer identity. */
|
|
87
|
-
export function filterViewFingerprint(sheet, selection) {
|
|
88
|
-
return JSON.stringify({ sheet, mode:selection.mode,
|
|
89
|
-
layers:[...selection.layers].sort(),
|
|
90
|
-
thicknesses:[...selection.thicknesses].sort((a,b)=>a-b),
|
|
91
|
-
colors:[...selection.colors].sort() });
|
|
92
|
-
}
|