@babylonjs-toolkit/agent 1.1.69 → 1.1.76
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/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Babylon Toolkit Desktop Agent (1.1.
|
|
1
|
+
# Babylon Toolkit Desktop Agent (1.1.76)
|
|
2
2
|
|
|
3
3
|
The desktop agent owns the entire pipeline end to end — frontend and UI design, gameplay code, shaders, generated art and audio, 3D models in headless Blender, whole game levels and prefabs in a terminal-driven Unity Editor, the interactive glTF export, the web build, the dev server, and visual QA by screenshotting both Unity and the running browser.
|
|
4
4
|
|
|
@@ -324,7 +324,7 @@ storyboard, plus before/after sliders and stills where those prove the point. Wh
|
|
|
324
324
|
revises an earlier result, the earlier entry is marked **Updated** with who changed it and why —
|
|
325
325
|
nothing is rewritten silently.
|
|
326
326
|
|
|
327
|
-
The top of the page follows the run. While a run is going it shows **Current run activity** — the *Now*
|
|
327
|
+
The top of the page follows the run. Before the first run it shows **Start this plan** — ready-made `bt-execute` commands with copy buttons (every task unattended, every task with you on hand, one phase, the first task, fully written up) and a builder for any task range with `--auto-pilot`, `--strict`, `--verbose` or `--no-time-limit`; a paused plan shows the same as **Continue this plan**. While a run is going it shows **Current run activity** — the *Now*
|
|
328
328
|
banner and the milestones so far. Once the run is over, that slot becomes the **After Action Report**
|
|
329
329
|
(marked *Interim* if the plan is not finished yet), and the milestone history folds into the Milestone
|
|
330
330
|
activity logs at the bottom. The After Action Report is the whole plan's execution summarized — what
|
package/package.json
CHANGED
|
@@ -651,6 +651,35 @@
|
|
|
651
651
|
font-size: 13.5px;
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
+
/* ---------- Run commands ---------- */
|
|
655
|
+
.run-card { padding: 6px 22px 20px; }
|
|
656
|
+
.run-list { display: grid; grid-template-columns: minmax(0, 1fr); }
|
|
657
|
+
.run-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
|
|
658
|
+
.run-what { display: grid; gap: 2px; min-width: 0; }
|
|
659
|
+
.run-what strong { font-size: 14.5px; }
|
|
660
|
+
.run-what span { color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
|
|
661
|
+
.run-copy { display: flex; gap: 8px; align-items: center; min-width: 0; }
|
|
662
|
+
.run-command { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--bg-sunken); font: 600 12.5px/1.45 var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
|
|
663
|
+
.copy-command { flex: none; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text-muted); font: 600 11.5px/1 var(--font-mono); cursor: pointer; }
|
|
664
|
+
.copy-command:hover { color: var(--text); border-color: var(--accent); }
|
|
665
|
+
.copy-command.is-copied { color: var(--done); border-color: var(--done); }
|
|
666
|
+
.run-builder { margin-top: 16px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
|
|
667
|
+
.run-builder-title { font: 700 11px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
|
|
668
|
+
/* The task picker and the options share one line, the options centred in the room beside it. A select is as
|
|
669
|
+
wide as its longest option (a long task title), so it gets a set width instead and can never push them down. */
|
|
670
|
+
.run-controls { display: flex; flex-wrap: nowrap; gap: 12px 20px; align-items: center; }
|
|
671
|
+
.run-field { flex: 0 1 auto; display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 13px; color: var(--text-muted); }
|
|
672
|
+
.run-field select { flex: 0 1 460px; width: 460px; min-width: 140px; max-width: 100%; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: var(--bg-sunken); color: var(--text); font: 13px/1.3 var(--font-sans, inherit); text-overflow: ellipsis; }
|
|
673
|
+
.run-flags { flex: none; margin: 0 auto; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 8px 16px; white-space: nowrap; }
|
|
674
|
+
.run-flag { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
|
|
675
|
+
.run-flag input { accent-color: var(--accent); }
|
|
676
|
+
@media (max-width: 760px) {
|
|
677
|
+
.run-row { grid-template-columns: minmax(0, 1fr); }
|
|
678
|
+
.run-controls { flex-wrap: wrap; }
|
|
679
|
+
.run-field { flex-basis: 100%; }
|
|
680
|
+
.run-flags { flex: 1 1 100%; min-width: 0; margin: 0; flex-wrap: wrap; justify-content: flex-start; white-space: normal; }
|
|
681
|
+
}
|
|
682
|
+
|
|
654
683
|
/* ---------- Verbose task details and After Action Report sections ---------- */
|
|
655
684
|
.task-details { display: grid; gap: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
|
|
656
685
|
.detail-block h4, .aar-section h4 { margin: 0 0 8px; }
|
|
@@ -823,6 +852,15 @@
|
|
|
823
852
|
const VERDICT_BADGE_MAX_LENGTH = 16;
|
|
824
853
|
// The report's task-by-task testing table starts open for a short plan and folded for a long one.
|
|
825
854
|
const TESTING_TABLE_OPEN_ROWS = 12;
|
|
855
|
+
/** The bt-execute options the page offers, in the order the command line takes them. */
|
|
856
|
+
const RUN_OPTIONS = [
|
|
857
|
+
{ key: 'autoPilot', flag: '--auto-pilot', label: 'Auto-pilot', hint: 'Unattended: never stops to ask; retries, then defers a task that keeps failing' },
|
|
858
|
+
{ key: 'strict', flag: '--strict', label: 'Strict', hint: 'An adversarial verifier on every task' },
|
|
859
|
+
{ key: 'verbose', flag: '--verbose', label: 'Verbose', hint: 'Every task and the After Action Report written up in depth' },
|
|
860
|
+
{ key: 'noTimeLimit', flag: '--no-time-limit', label: 'No time limit', hint: 'Turns off the default TIME MATTERS mode' },
|
|
861
|
+
];
|
|
862
|
+
// "Build your own" keeps its choices when the page refreshes its data.
|
|
863
|
+
const runChoice = { tasks: 'ALL', autoPilot: true, strict: false, verbose: false, noTimeLimit: false };
|
|
826
864
|
// A verifier result that names a live check: "live two-tab race in headless Chrome", "end-to-end on WebGPU".
|
|
827
865
|
const LIVE_CHECK_WORDS = /\blive\b|chrome|browser|webgl|webgpu|unity editor|play ?mode/i;
|
|
828
866
|
/** Where the Babylon Toolkit Desktop Agent, whose skills generate this dashboard, is published. */
|
|
@@ -865,6 +903,7 @@
|
|
|
865
903
|
try {
|
|
866
904
|
render();
|
|
867
905
|
wireLightbox();
|
|
906
|
+
wireRunCommands();
|
|
868
907
|
} catch (error) {
|
|
869
908
|
// A malformed field must never leave a blank page: say what broke, and keep checking for a repaired file.
|
|
870
909
|
console.error('Dashboard render failed', error);
|
|
@@ -893,6 +932,7 @@
|
|
|
893
932
|
'<main class="page">',
|
|
894
933
|
renderStats(allTasks, doneCount),
|
|
895
934
|
view === 'running' ? renderCurrentActivity(allTasks) : '',
|
|
935
|
+
showsRunCommands(view) ? renderRunCommands(allTasks, view) : '',
|
|
896
936
|
view === 'finished' ? renderAfterAction(allTasks, doneCount) : '',
|
|
897
937
|
renderPhases(),
|
|
898
938
|
renderDecisions(),
|
|
@@ -946,6 +986,7 @@
|
|
|
946
986
|
function renderNav(updateCount, view) {
|
|
947
987
|
const links = [
|
|
948
988
|
view === 'running' ? ['current-activity', 'Current run'] : null,
|
|
989
|
+
showsRunCommands(view) ? ['run-commands', view === 'planned' ? 'Start' : 'Continue'] : null,
|
|
949
990
|
view === 'finished' ? ['after-action', 'Summary'] : null,
|
|
950
991
|
['phases', 'Phases'],
|
|
951
992
|
['decisions', 'Decisions'],
|
|
@@ -1735,6 +1776,142 @@
|
|
|
1735
1776
|
|
|
1736
1777
|
/* ===================== Data helpers ===================== */
|
|
1737
1778
|
|
|
1779
|
+
/* ===================== Run commands ===================== */
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
/** The commands show while there is work to start: a plan not yet run, or one paused part way. */
|
|
1783
|
+
function showsRunCommands(view) {
|
|
1784
|
+
return view === 'planned' || effectiveStatus() === 'paused';
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
/** The plan as bt-execute takes it, from the project root: `@.agents/specs/<slug>/documents/<slug>_plan.md`. */
|
|
1788
|
+
function planReference() {
|
|
1789
|
+
const slug = (report.feature && report.feature.slug) || '';
|
|
1790
|
+
const plan = (report.documents || []).find((document) => /plan/i.test(document.label || '') && document.path);
|
|
1791
|
+
const relativePath = plan ? String(plan.path).replace(/^\.?\//, '') : `documents/${slug}_plan.md`;
|
|
1792
|
+
return `@.agents/specs/${slug}/${relativePath}`;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
function runCommand(flags, tasks) {
|
|
1796
|
+
return ['/bt-execute', ...flags, planReference(), tasks].filter(Boolean).join(' ');
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/** A phase as a task range in plan order (`T4-T7`, or `T4` alone); ticked tasks inside it are skipped by bt-execute. */
|
|
1800
|
+
function phaseRange(phase) {
|
|
1801
|
+
const ids = (phase.tasks || []).map((task) => task.id).filter(Boolean);
|
|
1802
|
+
if (!ids.length) return '';
|
|
1803
|
+
return ids.length === 1 ? ids[0] : `${ids[0]}-${ids[ids.length - 1]}`;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
function renderRunCommands(allTasks, view) {
|
|
1807
|
+
const starting = view === 'planned';
|
|
1808
|
+
const phases = (report.phases || []).filter((phase) => phaseRange(phase));
|
|
1809
|
+
const remaining = allTasks.filter((task) => task.status !== 'done' && task.status !== 'deferred');
|
|
1810
|
+
const nextTask = remaining[0];
|
|
1811
|
+
const nextPhase = phases.find((phase) => (phase.tasks || []).some((task) => task.status !== 'done' && task.status !== 'deferred'));
|
|
1812
|
+
const firstTask = allTasks[0];
|
|
1813
|
+
const phaseLabel = (phase) => `Phase ${phase.number} — ${phase.name || ''}`;
|
|
1814
|
+
|
|
1815
|
+
const presets = starting
|
|
1816
|
+
? [
|
|
1817
|
+
['Every task, unattended', 'Auto-pilot builds, verifies and commits each task in turn without stopping to ask', runCommand(['--auto-pilot'], 'ALL')],
|
|
1818
|
+
['Every task, with you on hand', 'Runs them all, and stops when it needs your decision', runCommand([], 'ALL')],
|
|
1819
|
+
nextPhase ? [`${phaseLabel(nextPhase)} only`, `Tasks ${phaseRange(nextPhase)}`, runCommand([], phaseRange(nextPhase))] : null,
|
|
1820
|
+
firstTask ? [`The first task only — ${firstTask.id}`, firstTask.title || '', runCommand([], firstTask.id)] : null,
|
|
1821
|
+
['Every task, fully written up', 'Auto-pilot with --verbose: every task and the After Action Report documented in depth', runCommand(['--auto-pilot', '--verbose'], 'ALL')],
|
|
1822
|
+
]
|
|
1823
|
+
: [
|
|
1824
|
+
['Every remaining task, unattended', `${remaining.length} task${remaining.length === 1 ? '' : 's'} left, finished without stopping to ask`, runCommand(['--auto-pilot'], 'ALL')],
|
|
1825
|
+
nextTask ? [`The next task only — ${nextTask.id}`, nextTask.title || '', runCommand([], 'NEXT')] : null,
|
|
1826
|
+
remaining.length > 2 ? ['The next three tasks', remaining.slice(0, 3).map((task) => task.id).join(', '), runCommand([], 'NEXT:3')] : null,
|
|
1827
|
+
nextPhase ? [`Finish ${phaseLabel(nextPhase)}`, `Tasks ${phaseRange(nextPhase)}; the ticked ones are skipped`, runCommand([], phaseRange(nextPhase))] : null,
|
|
1828
|
+
];
|
|
1829
|
+
|
|
1830
|
+
const taskChoices = [
|
|
1831
|
+
['ALL', 'All remaining tasks'],
|
|
1832
|
+
['NEXT', 'The next unchecked task'],
|
|
1833
|
+
['NEXT:3', 'The next three tasks'],
|
|
1834
|
+
...phases.map((phase) => [phaseRange(phase), `${phaseLabel(phase)} (${phaseRange(phase)})`]),
|
|
1835
|
+
...(starting ? allTasks : remaining).filter((task) => task.id).map((task) => [task.id, `${task.id} — ${task.title || ''}`]),
|
|
1836
|
+
];
|
|
1837
|
+
if (!taskChoices.some(([value]) => value === runChoice.tasks)) runChoice.tasks = 'ALL';
|
|
1838
|
+
|
|
1839
|
+
const rows = presets.filter(Boolean).map(([what, detail, command]) => `
|
|
1840
|
+
<div class="run-row">
|
|
1841
|
+
<div class="run-what"><strong>${escapeHtml(what)}</strong>${detail ? `<span>${formatInline(detail)}</span>` : ''}</div>
|
|
1842
|
+
${copyableCommand(command)}
|
|
1843
|
+
</div>`).join('');
|
|
1844
|
+
|
|
1845
|
+
return `
|
|
1846
|
+
<section id="run-commands">
|
|
1847
|
+
<div class="section-head"><h2>${starting ? 'Start this plan' : 'Continue this plan'}</h2><span class="section-note">Copy a command into your agent — ticked tasks are always skipped, so any of these is safe to run again</span></div>
|
|
1848
|
+
<div class="card run-card">
|
|
1849
|
+
<div class="run-list">${rows}</div>
|
|
1850
|
+
<div class="run-builder">
|
|
1851
|
+
<div class="run-builder-title">Build your own</div>
|
|
1852
|
+
<div class="run-controls">
|
|
1853
|
+
<label class="run-field"><span>Tasks</span>
|
|
1854
|
+
<select data-run-choice="tasks">${taskChoices.map(([value, label]) => `<option value="${escapeAttribute(value)}"${value === runChoice.tasks ? ' selected' : ''}>${escapeHtml(label)}</option>`).join('')}</select>
|
|
1855
|
+
</label>
|
|
1856
|
+
<div class="run-flags">${RUN_OPTIONS.map((option) => `
|
|
1857
|
+
<label class="run-flag" title="${escapeAttribute(option.hint)}"><input type="checkbox" data-run-choice="${option.key}"${runChoice[option.key] ? ' checked' : ''}> ${escapeHtml(option.label)}</label>`).join('')}
|
|
1858
|
+
</div>
|
|
1859
|
+
</div>
|
|
1860
|
+
<div class="run-built">${copyableCommand(builtCommand(), 'built-command')}</div>
|
|
1861
|
+
</div>
|
|
1862
|
+
</div>
|
|
1863
|
+
</section>`;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
function builtCommand() {
|
|
1867
|
+
return runCommand(RUN_OPTIONS.filter((option) => runChoice[option.key]).map((option) => option.flag), runChoice.tasks);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
function copyableCommand(command, id = '') {
|
|
1871
|
+
return `<div class="run-copy"><code class="run-command"${id ? ` id="${id}"` : ''}>${escapeHtml(command)}</code><button type="button" class="copy-command" data-copy="${escapeAttribute(command)}">Copy</button></div>`;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
/** Copy buttons and the command builder; delegated, so they keep working after the page redraws. */
|
|
1875
|
+
function wireRunCommands() {
|
|
1876
|
+
document.addEventListener('click', (event) => {
|
|
1877
|
+
const button = event.target.closest('.copy-command');
|
|
1878
|
+
if (!button) return;
|
|
1879
|
+
const text = button.getAttribute('data-copy') || '';
|
|
1880
|
+
const copied = () => {
|
|
1881
|
+
button.textContent = 'Copied';
|
|
1882
|
+
button.classList.add('is-copied');
|
|
1883
|
+
setTimeout(() => { button.textContent = 'Copy'; button.classList.remove('is-copied'); }, 1500);
|
|
1884
|
+
};
|
|
1885
|
+
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text).then(copied, () => { copyWithSelection(text); copied(); });
|
|
1886
|
+
else { copyWithSelection(text); copied(); }
|
|
1887
|
+
});
|
|
1888
|
+
document.addEventListener('change', (event) => {
|
|
1889
|
+
const control = event.target.closest('[data-run-choice]');
|
|
1890
|
+
if (!control) return;
|
|
1891
|
+
const key = control.getAttribute('data-run-choice');
|
|
1892
|
+
runChoice[key] = control.type === 'checkbox' ? control.checked : control.value;
|
|
1893
|
+
const command = builtCommand();
|
|
1894
|
+
const output = document.getElementById('built-command');
|
|
1895
|
+
if (output) {
|
|
1896
|
+
output.textContent = command;
|
|
1897
|
+
output.nextElementSibling.setAttribute('data-copy', command);
|
|
1898
|
+
}
|
|
1899
|
+
});
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
/** Where the clipboard API is unavailable, copy through a hidden selection; the command also stays visible to copy by hand. */
|
|
1903
|
+
function copyWithSelection(text) {
|
|
1904
|
+
const area = document.createElement('textarea');
|
|
1905
|
+
area.value = text;
|
|
1906
|
+
area.setAttribute('readonly', '');
|
|
1907
|
+
area.style.position = 'fixed';
|
|
1908
|
+
area.style.opacity = '0';
|
|
1909
|
+
document.body.appendChild(area);
|
|
1910
|
+
area.select();
|
|
1911
|
+
try { document.execCommand('copy'); } catch (error) { /* left for the user to copy by hand */ }
|
|
1912
|
+
area.remove();
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1738
1915
|
function collectTasks() {
|
|
1739
1916
|
return (report.phases || []).flatMap((phase) => phase.tasks || []);
|
|
1740
1917
|
}
|