@floless/app 0.159.0 → 0.160.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 +29576 -23804
- package/dist/schemas/steel.model.v2.schema.json +1 -0
- package/dist/skills/floless-app-onboarding/SKILL.md +4 -3
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +1 -2
- package/dist/skills/floless-app-rfi/SKILL.md +29 -1
- package/dist/skills/floless-app-steel-model/SKILL.md +2 -2
- package/dist/web/app.css +184 -151
- package/dist/web/app.js +17 -51
- package/dist/web/aware.js +504 -542
- package/dist/web/chat-question-card.js +24 -1
- package/dist/web/chat.css +131 -29
- package/dist/web/chat.js +1225 -178
- package/dist/web/commands-shell.js +676 -50
- package/dist/web/commands-steel.js +1 -0
- package/dist/web/guide.js +8 -0
- package/dist/web/index.html +23 -41
- package/dist/web/instructor.js +14 -5
- package/dist/web/pages.js +115 -18
- package/dist/web/panels.js +19 -1
- package/dist/web/project-rfis.js +715 -0
- package/dist/web/project-workflows.js +236 -4
- package/dist/web/run-history.js +198 -0
- package/dist/web/run-page-view.js +12 -2
- package/dist/web/steel-3d-core.js +29 -1
- package/dist/web/steel-editor.html +71 -10
- package/dist/web/steel-model-v2-projection.js +7 -0
- package/dist/web/workspaces.js +136 -48
- package/package.json +2 -1
package/dist/web/app.js
CHANGED
|
@@ -79,10 +79,16 @@ let dagResizeObserver = null;
|
|
|
79
79
|
function currentPrompt() { return (state.promptKey != null && PROMPTS[state.promptKey]) || null; }
|
|
80
80
|
function isDag() { const p = currentPrompt(); return !!p && p.layout === 'dag'; }
|
|
81
81
|
|
|
82
|
+
// A padlock in currentColor (no emoji: those render in the OS's own colours in both themes). Shared with the picker's
|
|
83
|
+
// Locked badge (web/aware.js), so the two always match.
|
|
84
|
+
const LOCK_ICON_SVG = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="3" y="7" width="10" height="7" rx="1.5"/><path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2"/></svg>';
|
|
85
|
+
globalThis.FLOLESS_LOCK_ICON_SVG = LOCK_ICON_SVG;
|
|
86
|
+
|
|
82
87
|
// Honest canvas state when there's no workflow to draw. `kind` is one of
|
|
83
88
|
// 'offline' (server unreachable), 'empty' (no workflow open / none installed),
|
|
84
|
-
// or '
|
|
85
|
-
|
|
89
|
+
// 'loading', or 'locked' (#2644: a module workflow this account's plan does not include; `body` is the server's
|
|
90
|
+
// own sentence). NEVER renders fake nodes — that bleed-through is the bug this fixes.
|
|
91
|
+
function renderCanvasPlaceholder(kind, body) {
|
|
86
92
|
if (dagResizeObserver) { dagResizeObserver.disconnect(); dagResizeObserver = null; }
|
|
87
93
|
$topology.className = 'topology placeholder';
|
|
88
94
|
$topology.style.cssText = '';
|
|
@@ -93,13 +99,15 @@ function renderCanvasPlaceholder(kind) {
|
|
|
93
99
|
const views = {
|
|
94
100
|
offline: { icon: '⚠', title: 'Server offline', body: 'The local FloLess server isn’t responding. Start it to load your workflows.' },
|
|
95
101
|
loading: { icon: '…', title: 'Loading…', body: 'Reading your installed workflows.' },
|
|
102
|
+
locked: { icon: LOCK_ICON_SVG, title: 'This workflow is locked', body: 'This workflow is part of a module this account’s plan does not include.' },
|
|
96
103
|
};
|
|
97
104
|
const v = views[kind] || views.offline;
|
|
105
|
+
const text = kind === 'locked' && typeof body === 'string' && body.trim() ? escapeHtml(body.trim()) : v.body;
|
|
98
106
|
$topology.innerHTML =
|
|
99
|
-
`<div class="canvas-empty" data-kind="${kind}">` +
|
|
107
|
+
`<div class="canvas-empty" data-kind="${kind}"${kind === 'locked' ? ' role="status"' : ''}>` +
|
|
100
108
|
`<div class="canvas-empty-icon">${v.icon}</div>` +
|
|
101
109
|
`<div class="canvas-empty-title">${v.title}</div>` +
|
|
102
|
-
`<div class="canvas-empty-body">${
|
|
110
|
+
`<div class="canvas-empty-body">${text}</div>` +
|
|
103
111
|
`<div class="canvas-empty-actions" id="canvas-empty-actions"></div>` +
|
|
104
112
|
`</div>`;
|
|
105
113
|
}
|
|
@@ -188,44 +196,6 @@ function msgEl(cls, who, html, timestamp = new Date()) {
|
|
|
188
196
|
div.innerHTML = `<div class="who"><span class="who-name">${who}</span><span class="who-time">${nowStamp(Number.isFinite(when.getTime()) ? when : new Date())}</span></div><div class="body">${html}</div>`;
|
|
189
197
|
return div;
|
|
190
198
|
}
|
|
191
|
-
function mdInline(s) {
|
|
192
|
-
// CODE SPANS COME OUT FIRST and go back last. Emphasis used to run over them, rewriting the inside
|
|
193
|
-
// of a <code>: `demos/*/*.flo` came out as `demos/<em>/</em>.flo` — the asterisks GONE from a path
|
|
194
|
-
// a reader copies, and the same for globs (`**/*.ts`), flags, regexes and pointer code, which is a
|
|
195
|
-
// large share of what an Instructor answer is made of. Markdown never processes emphasis inside a
|
|
196
|
-
// code span. Lifting them out also keeps emphasis able to WRAP one (`*see `foo` now*`), which
|
|
197
|
-
// per-segment processing would have broken instead.
|
|
198
|
-
//
|
|
199
|
-
// Bold FIRST among what remains, so the single-asterisk pass that follows sees only real italics.
|
|
200
|
-
// That pass may span the <strong> markup the earlier one produced — `*"the **first** point"*` is
|
|
201
|
-
// ordinary prose, and a guard against `<` left its asterisks on screen.
|
|
202
|
-
//
|
|
203
|
-
// WHAT MAKES THAT SAFE HAS TWO SHAPES, and only one of them is a call-site rule. `answerProse`
|
|
204
|
-
// (aware.js) and the guide description escape the WHOLE string before calling in. The narration
|
|
205
|
-
// lines cannot: they carry authored `**`/`` ` `` on purpose, so their producer escapes each
|
|
206
|
-
// INTERPOLATED VALUE where the line is assembled (see transform() in aware.js) and hands the line
|
|
207
|
-
// over already safe. Adding a narration line means escaping every interpolation there — nothing at
|
|
208
|
-
// this end will catch it for you. Either way no `<` here came from a user, so no pass can build a
|
|
209
|
-
// tag or an attribute out of one.
|
|
210
|
-
//
|
|
211
|
-
// Crossing tags CAN misnest (`<strong>a <em>b</strong> c</em>` from overlapping markers); the
|
|
212
|
-
// parser reparents it into valid-but-different DOM. Acceptable for prose, and the reason this is a
|
|
213
|
-
// pass chain rather than a parser.
|
|
214
|
-
const NUL = String.fromCharCode(0);
|
|
215
|
-
const code = [];
|
|
216
|
-
// NUL is stripped from the input BEFORE any placeholder is minted, so the sentinel cannot collide
|
|
217
|
-
// with text that happened to contain one — the single hazard a mask-and-restore carries. Restored
|
|
218
|
-
// by split parity rather than a regex: placeholders are then the only NULs present, so every odd
|
|
219
|
-
// segment is one, and neither emphasis pass adds or removes a NUL.
|
|
220
|
-
const masked = String(s).split(NUL).join('')
|
|
221
|
-
.replace(/`([^`]+)`/g, (_, body) => NUL + (code.push(body) - 1) + NUL);
|
|
222
|
-
return masked
|
|
223
|
-
.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
|
|
224
|
-
.replace(/\*(?!\s)([^*]+?)\*/g, '<em>$1</em>')
|
|
225
|
-
.split(NUL)
|
|
226
|
-
.map((part, i) => (i % 2 ? `<code>${code[Number(part)]}</code>` : part))
|
|
227
|
-
.join('');
|
|
228
|
-
}
|
|
229
199
|
|
|
230
200
|
function renderTopology() {
|
|
231
201
|
const p = currentPrompt();
|
|
@@ -682,7 +652,7 @@ function renderFavBar() {
|
|
|
682
652
|
} else {
|
|
683
653
|
chip.style.borderColor = 'var(--warn)';
|
|
684
654
|
setTimeout(() => chip.style.borderColor = '', 600);
|
|
685
|
-
|
|
655
|
+
showToast(`${AGENTS[id].title} is favorited but isn't in the current app. Switch prompts or compose a new app to use it.`, 'warn');
|
|
686
656
|
}
|
|
687
657
|
};
|
|
688
658
|
chip.querySelector('.del').onclick = (e) => {
|
|
@@ -1227,7 +1197,6 @@ $runBtn.onclick = async () => {
|
|
|
1227
1197
|
state.currentTab = 'execution';
|
|
1228
1198
|
document.querySelectorAll('.tabs button').forEach(b => b.classList.toggle('active', b.dataset.tab === 'execution'));
|
|
1229
1199
|
renderInspect();
|
|
1230
|
-
appendNarration(`Execution complete · ${nodeIds(p).length} steps fired · check the <strong>Execution</strong> tab on each tool for the full trace.`);
|
|
1231
1200
|
};
|
|
1232
1201
|
|
|
1233
1202
|
document.querySelectorAll('.panel-toggle').forEach(btn => {
|
|
@@ -1257,10 +1226,6 @@ window.addEventListener('resize', () => {
|
|
|
1257
1226
|
}
|
|
1258
1227
|
});
|
|
1259
1228
|
|
|
1260
|
-
function appendNarration(html) {
|
|
1261
|
-
$messages.appendChild(msgEl('aware', 'claude', html));
|
|
1262
|
-
$messages.scrollTop = $messages.scrollHeight;
|
|
1263
|
-
}
|
|
1264
1229
|
function sleep(ms) { return new Promise(r => setTimeout(r, ms)); }
|
|
1265
1230
|
function escapeHtml(s) {
|
|
1266
1231
|
return String(s).replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
|
@@ -1740,10 +1705,11 @@ function showToast(msg, type, options) {
|
|
|
1740
1705
|
setTimeout(() => t.remove(), 300);
|
|
1741
1706
|
};
|
|
1742
1707
|
// Errors stay until dismissed; most warnings linger longer than confirmations.
|
|
1743
|
-
// A
|
|
1744
|
-
//
|
|
1708
|
+
// A toast carrying the only record of what happened may opt into persistence while
|
|
1709
|
+
// keeping its styling. warn/err and every persistent toast get an × so they can
|
|
1710
|
+
// always be closed.
|
|
1745
1711
|
const ms = options?.persistent ? 0 : ({ ok: 2500, info: 2500, warn: 5000, err: 0, progress: 0 }[type] ?? 2500);
|
|
1746
|
-
if (type === 'warn' || type === 'err') {
|
|
1712
|
+
if (type === 'warn' || type === 'err' || options?.persistent) {
|
|
1747
1713
|
const x = document.createElement('button');
|
|
1748
1714
|
x.className = 'toast-close';
|
|
1749
1715
|
x.type = 'button';
|