@floless/app 0.156.0 → 0.157.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 (53) hide show
  1. package/cli-actions.mjs +21 -5
  2. package/dist/floless-server.cjs +70965 -43326
  3. package/dist/schemas/drawing-check.profile.v1.schema.json +15 -2
  4. package/dist/schemas/steel.model.v2.schema.json +25 -1
  5. package/dist/skills/floless-app-actions/SKILL.md +79 -17
  6. package/dist/skills/floless-app-knowledge/SKILL.md +21 -2
  7. package/dist/skills/floless-app-new-workflow/SKILL.md +23 -7
  8. package/dist/skills/floless-app-onboarding/SKILL.md +31 -1
  9. package/dist/skills/floless-app-report-issue/SKILL.md +3 -3
  10. package/dist/skills/floless-app-rfi/SKILL.md +40 -6
  11. package/dist/skills/floless-app-routines/SKILL.md +9 -2
  12. package/dist/skills/floless-app-steel-model/SKILL.md +1 -1
  13. package/dist/skills/floless-app-steel-model/references/detail-from-a-screenshot.md +4 -2
  14. package/dist/skills/floless-app-tweak-contract/SKILL.md +25 -5
  15. package/dist/skills/floless-app-workflows/SKILL.md +46 -10
  16. package/dist/skills/floless-app-workflows/references/agent-steps.md +119 -0
  17. package/dist/web/agent-steps.js +864 -47
  18. package/dist/web/agents.js +28 -8
  19. package/dist/web/app.css +478 -3
  20. package/dist/web/app.js +110 -11
  21. package/dist/web/aware-update-client.js +1 -0
  22. package/dist/web/aware.js +685 -170
  23. package/dist/web/chat-landing-scene.js +372 -0
  24. package/dist/web/chat.css +245 -1
  25. package/dist/web/chat.js +2466 -78
  26. package/dist/web/commands-drawing-check.js +17 -0
  27. package/dist/web/commands-shell.js +820 -3
  28. package/dist/web/commands-steel.js +6 -0
  29. package/dist/web/connections.js +1 -0
  30. package/dist/web/drawing-check-editor.html +33 -5
  31. package/dist/web/drawing-check-editor.js +538 -22
  32. package/dist/web/drawing-check-overlay.js +13 -0
  33. package/dist/web/flo-avatar.js +28 -3
  34. package/dist/web/guide.js +7 -2
  35. package/dist/web/index.html +119 -6
  36. package/dist/web/instructor.js +3 -3
  37. package/dist/web/model-view-query.js +12 -2
  38. package/dist/web/pages.js +865 -34
  39. package/dist/web/panels.js +5 -2
  40. package/dist/web/parser-setup-recovery.js +12 -4
  41. package/dist/web/project-access.js +549 -0
  42. package/dist/web/report-files.js +50 -0
  43. package/dist/web/startup-admission.js +132 -0
  44. package/dist/web/steel-3d-core.js +9 -0
  45. package/dist/web/steel-editor.html +642 -22
  46. package/dist/web/steel-model-v2-commands.js +63 -5
  47. package/dist/web/step-rename.js +287 -0
  48. package/dist/web/terminal-requests.js +59 -10
  49. package/dist/web/tool-updates.js +1 -0
  50. package/dist/web/workspace-root-management.js +39 -0
  51. package/dist/web/workspaces.js +1667 -63
  52. package/launch.mjs +9 -7
  53. package/package.json +3 -1
package/cli-actions.mjs CHANGED
@@ -157,8 +157,13 @@ export async function runActionsCli(argv, deps) {
157
157
  input = read.input;
158
158
  }
159
159
 
160
- if (!(await deps.ensureServer())) {
161
- return fail('server-unavailable', 'FloLess is not running and did not start. Open FloLess (or run "floless-app open"), then try again.');
160
+ // A start that throws (#2320) is the same answer as one that never came up, with the reason kept in the details.
161
+ let up;
162
+ let startError = null;
163
+ try { up = await deps.ensureServer(); }
164
+ catch (error) { up = false; startError = String(error?.message ?? error); }
165
+ if (!up) {
166
+ return fail('server-unavailable', 'FloLess is not running and did not start. Open FloLess (or run "floless-app open"), then try again.', startError === null ? null : { reason: startError });
162
167
  }
163
168
 
164
169
  /** One request; a 402 or an unreachable server becomes a plain failure the caller returns. */
@@ -200,7 +205,10 @@ export async function runActionsCli(argv, deps) {
200
205
  return fail('unknown-action', `FloLess has no action called "${parsed.id}". Run "floless-app actions" to see the ones it has.`);
201
206
  }
202
207
  if (!body || typeof body.ok !== 'boolean' || !body.meta) {
203
- return fail('failed', "FloLess answered in a way this command does not understand; it may be a different version. Update FloLess, then try again.", { status: res.status, body });
208
+ // #2320: what came back goes in the details (the status and the start of a non-JSON answer), so it can be diagnosed.
209
+ const details = { status: res.status, body, ...(typeof res.text === 'string' ? { snippet: res.text } : {}) };
210
+ if (res.status >= 500) return fail('failed', 'FloLess ran into a problem while answering. Try again; if it keeps happening, run "floless-app restart", then try again.', details);
211
+ return fail('failed', "FloLess answered in a way this command does not understand; it may be a different version. Update FloLess, then try again.", details);
204
212
  }
205
213
  const actionMeta = { action: body.meta.action ?? parsed.id, callId: body.meta.callId ?? null, outcome: body.meta.outcome ?? null, consent: body.meta.consent ?? null, ...(body.meta.status ? { status: body.meta.status } : {}) };
206
214
  if (!body.ok) {
@@ -269,7 +277,9 @@ async function waitForAnswer(first, firstUrl, { deps, call, fail, succeed, json,
269
277
  if (proposal.state === 'superseded') return fail('proposal-gone', 'FloLess replaced the request but did not say with what. Ask again.', { proposal }, EXIT.failed, { ...actionMeta, proposalId: proposal.id });
270
278
  if (FINAL.has(proposal.state)) return finish(proposal, { fail, succeed, actionMeta });
271
279
  // FloLess only marks an unanswered request expired when someone opens it; past its expiry nobody can confirm it.
272
- if (proposal.state === 'proposed' && deps.now() > Date.parse(proposal.expiresAt) + EXPIRY_GRACE_MS) {
280
+ // An expiry that is missing or unreadable is "not known" (#2319): the wait then ends when FloLess says so.
281
+ const expiry = expiryOf(proposal);
282
+ if (proposal.state === 'proposed' && expiry !== null && deps.now() > expiry + EXPIRY_GRACE_MS) {
273
283
  return finish({ ...proposal, state: 'expired' }, { fail, succeed, actionMeta });
274
284
  }
275
285
  await deps.sleep(WAIT_POLL_MS);
@@ -371,6 +381,12 @@ function humanProposal(p, reviewUrl) {
371
381
  `FloLess needs your OK first: ${p.summary ?? p.title}.`,
372
382
  'Nothing has run yet.',
373
383
  reviewUrl ? `Answer it in FloLess: ${reviewUrl}` : 'Open FloLess to answer it.',
374
- `The request stays open until ${new Date(p.expiresAt).toLocaleTimeString()}.`,
384
+ expiryOf(p) === null ? 'FloLess did not say how long the request stays open.' : `The request stays open until ${new Date(expiryOf(p)).toLocaleTimeString()}.`,
375
385
  ];
376
386
  }
387
+
388
+ /** A request's expiry in ms, or null when FloLess did not send a readable one (#2319). */
389
+ function expiryOf(p) {
390
+ const ms = typeof p?.expiresAt === 'string' ? Date.parse(p.expiresAt) : NaN;
391
+ return Number.isFinite(ms) ? ms : null;
392
+ }