@floless/app 0.149.1 → 0.150.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.
Files changed (48) hide show
  1. package/dist/floless-server.cjs +101814 -88311
  2. package/dist/schemas/drawing-check.profile.v1.schema.json +45 -2
  3. package/dist/schemas/steel.model.v2.schema.json +9 -0
  4. package/dist/skills/floless-app-approval/SKILL.md +79 -4
  5. package/dist/skills/floless-app-onboarding/SKILL.md +4 -4
  6. package/dist/skills/floless-app-onboarding/references/aware-runtime.md +1 -1
  7. package/dist/skills/floless-app-onboarding/references/floless-app-tour.md +15 -13
  8. package/dist/skills/floless-app-routines/SKILL.md +4 -1
  9. package/dist/skills/floless-app-routines/references/routines-api.md +14 -2
  10. package/dist/skills/floless-app-steel-model/SKILL.md +4 -2
  11. package/dist/skills/floless-app-steel-takeoff/SKILL.md +14 -9
  12. package/dist/skills/floless-app-workflows/SKILL.md +2 -2
  13. package/dist/templates/tekla-parser.flo +13 -3
  14. package/dist/web/agents.js +887 -0
  15. package/dist/web/app.css +458 -23
  16. package/dist/web/app.js +20 -5
  17. package/dist/web/aware.js +1339 -134
  18. package/dist/web/chat.css +50 -1
  19. package/dist/web/chat.js +1582 -52
  20. package/dist/web/commands-drawing-check.js +15 -0
  21. package/dist/web/commands-revit.js +5 -0
  22. package/dist/web/commands-shell.js +761 -47
  23. package/dist/web/commands-tekla-parser.js +8 -1
  24. package/dist/web/connections.js +57 -14
  25. package/dist/web/drawing-check-editor.html +10 -2
  26. package/dist/web/drawing-check-editor.js +569 -40
  27. package/dist/web/drawing-check-overlay.js +45 -2
  28. package/dist/web/index.html +98 -27
  29. package/dist/web/instructor.js +85 -8
  30. package/dist/web/leave-guard.js +1 -0
  31. package/dist/web/left-pane.js +20 -1
  32. package/dist/web/local-discovery.js +12 -2
  33. package/dist/web/model-editor.css +32 -32
  34. package/dist/web/model-panel-bridge.js +11 -3
  35. package/dist/web/model-viewport-lighting.js +4 -2
  36. package/dist/web/model-viewport-revit-adapter.js +3 -0
  37. package/dist/web/model-viewport-toolbar.js +6 -3
  38. package/dist/web/model-viewport.js +11 -1
  39. package/dist/web/revit-editor.css +14 -14
  40. package/dist/web/revit-editor.js +64 -12
  41. package/dist/web/steel-3d-core.js +133 -0
  42. package/dist/web/steel-3d-view.js +10 -0
  43. package/dist/web/steel-editor.html +171 -39
  44. package/dist/web/steel-model-v2-client-validation.js +11 -0
  45. package/dist/web/steel-model-v2-commands.js +80 -5
  46. package/dist/web/tool-updates.js +367 -0
  47. package/dist/web/workspaces.js +679 -59
  48. package/package.json +1 -1
package/dist/web/app.js CHANGED
@@ -538,7 +538,7 @@ function selectAgent(id, { reveal = false } = {}) {
538
538
  function renderInspect() {
539
539
  const a = AGENTS[state.selectedAgentId];
540
540
  if (!a) {
541
- $inspectBd.innerHTML = '<div class="empty-state">Click an agent in the canvas to inspect.</div>';
541
+ $inspectBd.innerHTML = '<div class="empty-state">Click a tool in the canvas to inspect.</div>';
542
542
  return;
543
543
  }
544
544
  // Stale find-highlights reference text nodes from a now-discarded <pre>; clear
@@ -876,7 +876,7 @@ function renderLibrary() {
876
876
  <button class="lib-fav ${faved ? 'faved' : ''}" data-lib-fav="${id}" data-tip="${faved ? 'In favorites' : 'Add to favorites'}">★</button>
877
877
  </div>
878
878
  `;
879
- }).join('') || '<div class="empty-state">No agents match.</div>';
879
+ }).join('') || '<div class="empty-state">No tools match.</div>';
880
880
  $libList.querySelectorAll('.lib-fav').forEach(btn => {
881
881
  btn.onclick = () => toggleFav(btn.dataset.libFav);
882
882
  });
@@ -1237,7 +1237,7 @@ $runBtn.onclick = async () => {
1237
1237
  state.currentTab = 'execution';
1238
1238
  document.querySelectorAll('.tabs button').forEach(b => b.classList.toggle('active', b.dataset.tab === 'execution'));
1239
1239
  renderInspect();
1240
- appendNarration(`Execution complete · ${nodeIds(p).length} steps fired · check the <strong>Execution</strong> tab on each agent for the full trace.`);
1240
+ appendNarration(`Execution complete · ${nodeIds(p).length} steps fired · check the <strong>Execution</strong> tab on each tool for the full trace.`);
1241
1241
  };
1242
1242
 
1243
1243
  document.querySelectorAll('.panel-toggle').forEach(btn => {
@@ -1386,6 +1386,7 @@ function handleMenuAction(action) {
1386
1386
  case 'workspace-folder': openWorkspaceRoot(); break;
1387
1387
  case 'agents': openLibrary(); break;
1388
1388
  case 'routines': openRoutines(); break;
1389
+ case 'tool-update-policy': if (typeof window.openToolUpdatePolicy === 'function') window.openToolUpdatePolicy(); break;
1389
1390
  case 'report-issue': openReportIssue(); break;
1390
1391
  case 'fullscreen': toggleFullscreen(); break;
1391
1392
  // Asks first (unsaved work, a running workflow) — see web/leave-guard.js.
@@ -1435,7 +1436,7 @@ function openFind() {
1435
1436
  const ws = window.flolessWorkspaces && window.flolessWorkspaces.findActive();
1436
1437
  // In Workspaces mode there's nothing to find off the Model step — don't pop a dead overlay.
1437
1438
  if (document.getElementById('app').classList.contains('mode-workspaces') && !ws) return;
1438
- $findInput.placeholder = ws ? 'Find in model…' : 'Find agent…';
1439
+ $findInput.placeholder = ws ? 'Find in model…' : 'Find tool…';
1439
1440
  $findOverlay.classList.add('show');
1440
1441
  $findInput.value = '';
1441
1442
  $findCount.textContent = '';
@@ -1648,7 +1649,12 @@ if (!fullscreenSupported()) {
1648
1649
 
1649
1650
  // A server, browser, or command error describes the software's internals, not what a person needs
1650
1651
  // to do. Keep it in the console for diagnosis and give the person a clear recovery path instead.
1652
+ // The one exception is a sentence the server WROTE for the person (`authoredToastCopy`): a setup remedy
1653
+ // names their own folders and projects, and a project called "Null Street Bridge" or a folder called
1654
+ // "Exception tower" is not a diagnostic — replacing that sentence with "lost contact" would be untrue.
1651
1655
  function userSafeToastMessage(msg, type) {
1656
+ const authored = msg && typeof msg === 'object' ? msg[Symbol.for('floless.authored-toast-copy')] : undefined;
1657
+ if (typeof authored === 'string') return authored.trim() || 'We couldn’t finish that. Your work is still here. Try again.';
1652
1658
  const text = String(msg ?? '').trim();
1653
1659
  if ((type === 'warn' || type === 'err')
1654
1660
  && /\b(?:http\s*\d+|error:|exception|stack trace|server log|status code|undefined|null|subscription required|unauthori[sz]ed|forbidden)\b/i.test(text)) {
@@ -1657,6 +1663,15 @@ function userSafeToastMessage(msg, type) {
1657
1663
  return text || 'We couldn’t finish that. Your work is still here. Try again.';
1658
1664
  }
1659
1665
 
1666
+ /**
1667
+ * Marks a sentence the SERVER wrote for people — a setup remedy, never an error's text — so the toast shows
1668
+ * it as written. Only for copy authored as user copy on the server; anything else goes to showToast as a
1669
+ * plain string and keeps the safety filter.
1670
+ */
1671
+ function authoredToastCopy(text) {
1672
+ return { [Symbol.for('floless.authored-toast-copy')]: String(text ?? '') };
1673
+ }
1674
+
1660
1675
  function showToast(msg, type, options) {
1661
1676
  const c = document.getElementById('toast-container');
1662
1677
  const t = document.createElement('div');
@@ -2111,7 +2126,7 @@ async function confirmWorkspaceRoot() {
2111
2126
  ? [...new Set(error.body.blockers.map((blocker) => blocker && blocker.label).filter(Boolean))]
2112
2127
  : [];
2113
2128
  setWorkspaceRootError(busy
2114
- ? `FloLess cannot change this Workspace directory while work is still running${activities.length ? ` (${activities.join(', ')})` : ''}. Stop or let that work finish, then choose the folder again.`
2129
+ ? `FloLess is still finishing a change${activities.length ? ` (${activities.join(', ')})` : ''}, so it can't switch Workspace directory yet. Nothing is wrong with this folder. Let that work finish, or stop it, then click Use folder again.`
2115
2130
  : workspaceRootErrorMessage(error));
2116
2131
  } finally {
2117
2132
  setWorkspaceRootBusy(false);