ai-agentmanager 1.62.0 → 1.63.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/CHANGELOG.md +21 -0
- package/README.md +92 -0
- package/package.json +1 -1
- package/public/acceptance.js +194 -0
- package/public/app.js +61 -2
- package/public/attach.js +4 -0
- package/public/autonomy.js +140 -0
- package/public/boardcols.js +1 -0
- package/public/dropzone.js +203 -0
- package/public/index.html +56 -0
- package/public/menu.js +20 -0
- package/public/scorecard.js +1 -1
- package/public/standup.js +1 -0
- package/public/style.css +47 -1
- package/src/acceptance.js +123 -0
- package/src/advisor.js +30 -8
- package/src/autonomy.js +624 -0
- package/src/autopilot.js +7 -1
- package/src/backlog.js +16 -3
- package/src/brief.js +21 -3
- package/src/bughunt.js +1 -0
- package/src/cli.js +132 -0
- package/src/config.js +3 -0
- package/src/decisions.js +5 -1
- package/src/groundrules.js +97 -0
- package/src/judge.js +1 -1
- package/src/manager.js +174 -5
- package/src/notify.js +16 -0
- package/src/prereview.js +7 -2
- package/src/scorecard.js +26 -9
- package/src/server.js +53 -3
- package/src/standup.js +1 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// Autonomy on the page: how far an agent goes without you, and what was done for you meanwhile
|
|
2
|
+
// (questions answered from what is already decided, nudges sent, a merge made or held). An answer
|
|
3
|
+
// given for you shows in the inbox until you say OK or give your own.
|
|
4
|
+
|
|
5
|
+
export const LEVELS = ['ask', 'run', 'pr', 'merge'];
|
|
6
|
+
export const LEVEL_LABEL = { ask: 'Ask me', run: 'Agree, then run', pr: 'Run to pull request', merge: 'Run to merge' };
|
|
7
|
+
export const LEVEL_HINT = {
|
|
8
|
+
ask: 'Questions, stuck findings and follow-ups wait for you in the inbox.',
|
|
9
|
+
run: 'You agree on what done means. After that, its questions and its plan are decided for you when the answer is sure and easy to undo, a nudge the judge is sure of is sent, and a quiet agent is told to carry on.',
|
|
10
|
+
pr: 'The same, and its pull request is opened when the review approves the work.',
|
|
11
|
+
merge: 'The same, and the pull request is merged when its checks pass, the scorecard says ready and no high-risk path is touched.',
|
|
12
|
+
};
|
|
13
|
+
const KIND = { answer: 'Answered', left: 'Left for you', nudge: 'Nudged', followup: 'Told to carry on', plan: 'Plan decided', merge: 'Merged' };
|
|
14
|
+
|
|
15
|
+
export const levelOf = (a) => (LEVELS.includes(a.autonomy?.level) ? a.autonomy.level : 'ask');
|
|
16
|
+
|
|
17
|
+
/** "2 answered, 1 nudge, 1 left for you". */
|
|
18
|
+
export function logLine(log = []) {
|
|
19
|
+
const n = (k) => log.filter((e) => e.kind === k).length;
|
|
20
|
+
return [n('answer') ? `${n('answer')} answered` : '', n('nudge') ? `${n('nudge')} nudge${n('nudge') === 1 ? '' : 's'}` : '', n('followup') ? `${n('followup')} follow-up${n('followup') === 1 ? '' : 's'}` : '', n('merge') ? 'merged' : '', n('left') ? `${n('left')} left for you` : '']
|
|
21
|
+
.filter(Boolean)
|
|
22
|
+
.join(', ');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** What was decided for you on an agent and you have not seen: inbox items. */
|
|
26
|
+
export function autonomyNeeds(a) {
|
|
27
|
+
const st = a.autonomy;
|
|
28
|
+
if (!st) return [];
|
|
29
|
+
const items = (st.log ?? []).filter((e) => e.kind === 'answer' && !e.ack).map((e) => ({ a, kind: 'auto', key: `auto:${a.id}:${e.id}`, e }));
|
|
30
|
+
if (st.hold && !st.hold.ack && st.level === 'merge') items.push({ a, kind: 'auto', key: `auto:${a.id}:hold`, e: { id: 'hold', kind: 'hold', ...st.hold } });
|
|
31
|
+
return items;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The inbox card of one such item. */
|
|
35
|
+
export function autoNeedHtml(it, { esc, ago }) {
|
|
36
|
+
const e = it.e;
|
|
37
|
+
if (e.kind === 'hold') {
|
|
38
|
+
return `<p class="need-title">Not merged: ${esc(e.note)}</p>
|
|
39
|
+
<p class="hint">Held ${ago(e.at)}. Its pull request stays open; merging it is yours.</p>
|
|
40
|
+
<div class="need-actions"><button class="small primary" data-ib="ap-review">Review changes</button><button class="small" data-ib="auto-ok" data-entry="hold">OK</button></div>`;
|
|
41
|
+
}
|
|
42
|
+
return `<p class="need-title">${esc(e.question)}</p>
|
|
43
|
+
<p class="auto-answer"><b>Answered for you:</b> ${esc(e.answer)}</p>
|
|
44
|
+
<p class="hint">${e.basis ? `From: ${esc(e.basis)} · ` : ''}${esc(e.model ?? (e.via === 'decide' ? 'Decide' : 'a model'))}, ${Math.round((e.confidence ?? 0) * 100)}% sure · ${ago(e.at)}.</p>
|
|
45
|
+
<div class="need-actions"><button class="small primary" data-ib="auto-ok" data-entry="${esc(e.id)}">OK</button><button class="small" data-ib="auto-change" data-entry="${esc(e.id)}" title="Give your own answer; the agent is told to apply it and undo what differs">Change answer…</button></div>`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** The row in the brief card: the level, what was done, and the way in. */
|
|
49
|
+
export function autonomyRow(a, esc) {
|
|
50
|
+
const st = a.autonomy;
|
|
51
|
+
if (a.team || a.reviewing || a.hunting || a.fixing || a.builds || a.raceId) return '';
|
|
52
|
+
if (!st || levelOf(a) === 'ask') {
|
|
53
|
+
return `<div class="plan-row"><button class="small ghost" data-act="auto-open" title="Let it go on without you: routine questions answered from what is already decided, nudges sent, and if you choose, its pull request opened or merged">${st?.log?.length ? 'Without you: off' : 'Run without me…'}</button></div>`;
|
|
54
|
+
}
|
|
55
|
+
const line = logLine(st.log);
|
|
56
|
+
const held = st.hold && !st.hold.ack && st.level === 'merge';
|
|
57
|
+
return `<div class="plan-row auto-row"><b>Without you</b> <span class="tag auto-on">${esc(LEVEL_LABEL[st.level])}</span>${line ? ` <span class="hint">${esc(line)}</span>` : ''}${held ? ' <span class="tag acc-bad">merge held</span>' : ''}
|
|
58
|
+
<button class="small" data-act="auto-open">Open</button></div>`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function initAutonomy({ dialog, api, esc, toast, ago, agentOf, upsert }) {
|
|
62
|
+
let id = null;
|
|
63
|
+
|
|
64
|
+
function render() {
|
|
65
|
+
const a = id && agentOf(id);
|
|
66
|
+
if (!a) return;
|
|
67
|
+
const st = a.autonomy ?? { level: 'ask', log: [] };
|
|
68
|
+
const level = levelOf(a);
|
|
69
|
+
dialog.querySelector('#auto-title').textContent = `Without you: ${a.name}`;
|
|
70
|
+
const log = (st.log ?? []).slice().reverse();
|
|
71
|
+
const entry = (e) => {
|
|
72
|
+
const head = `<b>${KIND[e.kind] ?? esc(e.kind)}</b> <span class="hint">${ago(e.at)}</span>`;
|
|
73
|
+
if (e.kind === 'answer') {
|
|
74
|
+
return `<li>${head}<div>${esc(e.question)}</div>
|
|
75
|
+
<div class="auto-answer">→ ${e.corrected ? `<s>${esc(e.answer)}</s> yours: ${esc(e.corrected)}` : esc(e.answer)}</div>
|
|
76
|
+
<div class="hint">${e.basis ? `From: ${esc(e.basis)} · ` : ''}${esc(e.model ?? (e.via === 'decide' ? 'Decide' : 'a model'))}, ${Math.round((e.confidence ?? 0) * 100)}% sure</div>
|
|
77
|
+
${e.corrected ? '' : `<div class="need-actions">${e.ack ? '' : `<button type="button" class="small" data-auto="ok" data-entry="${esc(e.id)}">OK</button>`}<button type="button" class="small ghost" data-auto="change" data-entry="${esc(e.id)}">Change answer…</button></div>`}</li>`;
|
|
78
|
+
}
|
|
79
|
+
if (e.kind === 'left') return `<li>${head}<div>${esc(e.question)}</div>${e.why ? `<div class="hint">${esc(e.why)}</div>` : ''}</li>`;
|
|
80
|
+
return `<li>${head}<div>${esc(e.title ?? '')}</div>${e.text ? `<div class="hint">${esc(e.text)}</div>` : ''}</li>`;
|
|
81
|
+
};
|
|
82
|
+
dialog.querySelector('#auto-body').innerHTML = `
|
|
83
|
+
<label>How far it goes
|
|
84
|
+
<select data-auto="level">${LEVELS.map((l) => `<option value="${l}" ${l === level ? 'selected' : ''}>${LEVEL_LABEL[l]}</option>`).join('')}</select>
|
|
85
|
+
</label>
|
|
86
|
+
<p class="hint">${LEVEL_HINT[level]}</p>
|
|
87
|
+
<p class="hint">Never done for you: answering a permission prompt, or a question about deleting, publishing, money, credentials or the scope of the task.</p>
|
|
88
|
+
${st.hold && !st.hold.ack && level === 'merge' ? `<p class="auto-hold"><b>Not merged:</b> ${esc(st.hold.note)} <button type="button" class="small" data-auto="ok" data-entry="hold">OK</button></p>` : ''}
|
|
89
|
+
${log.length ? `<h4>Done for you</h4><ul class="auto-log">${log.map(entry).join('')}</ul>` : level === 'ask' ? '' : '<p class="hint">Nothing was done for you yet.</p>'}`;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const run = async (fn, ok) => {
|
|
93
|
+
try {
|
|
94
|
+
const a = await fn();
|
|
95
|
+
if (a?.id) upsert(a);
|
|
96
|
+
if (ok) toast(ok);
|
|
97
|
+
} catch (e) {
|
|
98
|
+
toast(`Error: ${e.message}`, 5000);
|
|
99
|
+
}
|
|
100
|
+
render();
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** Your own answer to a question that was answered for you. */
|
|
104
|
+
function change(agentId, entryId) {
|
|
105
|
+
const e = agentOf(agentId)?.autonomy?.log?.find((x) => x.id === entryId);
|
|
106
|
+
if (!e) return;
|
|
107
|
+
const text = prompt(`${e.question}\n\nAnswered for you: ${e.answer}\n\nYour answer:`, '');
|
|
108
|
+
if (!text?.trim()) return;
|
|
109
|
+
return run(() => api('POST', `/agents/${agentId}/autonomy/correct`, { entry: entryId, text: text.trim() }), 'Your answer was sent; the agent applies it');
|
|
110
|
+
}
|
|
111
|
+
const ok = (agentId, entryId) => run(() => api('POST', `/agents/${agentId}/autonomy/ack`, { entry: entryId }));
|
|
112
|
+
|
|
113
|
+
dialog.addEventListener('change', (e) => {
|
|
114
|
+
if (e.target.dataset.auto !== 'level' || !id) return;
|
|
115
|
+
const level = e.target.value;
|
|
116
|
+
run(() => api('POST', `/agents/${id}/autonomy`, { level }), level === 'ask' ? 'It asks you again' : `${LEVEL_LABEL[level]}: it goes on without you`);
|
|
117
|
+
});
|
|
118
|
+
dialog.addEventListener('click', (e) => {
|
|
119
|
+
const el = e.target.closest('[data-auto]');
|
|
120
|
+
if (!el || !id) return;
|
|
121
|
+
if (el.dataset.auto === 'close') return dialog.close();
|
|
122
|
+
if (el.dataset.auto === 'ok') return ok(id, el.dataset.entry);
|
|
123
|
+
if (el.dataset.auto === 'change') return change(id, el.dataset.entry);
|
|
124
|
+
});
|
|
125
|
+
dialog.addEventListener('close', () => (id = null));
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
open(agentId) {
|
|
129
|
+
id = agentId;
|
|
130
|
+
render();
|
|
131
|
+
if (!dialog.open) dialog.showModal();
|
|
132
|
+
},
|
|
133
|
+
ok,
|
|
134
|
+
change,
|
|
135
|
+
/** The agent changed (a new answer, a new level): show it, unless the level menu is open. */
|
|
136
|
+
agentChanged(a) {
|
|
137
|
+
if (id === a.id && document.activeElement?.dataset?.auto !== 'level') render();
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
}
|
package/public/boardcols.js
CHANGED
|
@@ -20,6 +20,7 @@ export function needOf(a) {
|
|
|
20
20
|
if (a.status === 'error') return 'an error';
|
|
21
21
|
if (rt.limited) return 'stopped at a limit';
|
|
22
22
|
if (a.planReview?.status === 'review') return 'a plan to approve';
|
|
23
|
+
if (a.acceptance?.status === 'review' && a.acceptance.wait) return 'what done means, to agree';
|
|
23
24
|
const q = (a.questions ?? []).filter((x) => !x.answer).length;
|
|
24
25
|
if (q) return q === 1 ? 'a question' : `${q} questions`;
|
|
25
26
|
if (rt.waiting) return rt.waiting.kind === 'error' ? 'an error on its screen' : 'a question on its screen';
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// Drop to start: tickets, requirements, designs and files dragged onto the page (or onto the New
|
|
2
|
+
// agents form) fill the form in. A ticket link becomes the request (the agent is named after the
|
|
3
|
+
// issue and tracks it), a repository link fills the repository, requirement and design links are
|
|
4
|
+
// listed as context, text becomes the request, and files are attached. Nothing starts until you
|
|
5
|
+
// press the button: what was understood is shown first.
|
|
6
|
+
|
|
7
|
+
const IMAGE = /\.(png|jpe?g|gif|webp|svg|fig|sketch|xd|psd)(\?|#|$)/i;
|
|
8
|
+
const DOCUMENT = /\.(pdf|md|markdown|docx?|txt|rtf|pptx?|xlsx?|csv)(\?|#|$)/i;
|
|
9
|
+
|
|
10
|
+
/** What a link is: { kind: 'ticket' | 'repo' | 'design' | 'doc' | 'link', url, label, repo? }. */
|
|
11
|
+
export function classifyUrl(raw) {
|
|
12
|
+
let u;
|
|
13
|
+
try {
|
|
14
|
+
u = new URL(String(raw).trim());
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if (!/^https?:$/.test(u.protocol)) return null;
|
|
19
|
+
const url = u.href;
|
|
20
|
+
const host = u.hostname.replace(/^www\./, '').toLowerCase();
|
|
21
|
+
const parts = u.pathname.split('/').filter(Boolean);
|
|
22
|
+
const jira = u.pathname.match(/\/browse\/([A-Z][A-Z0-9_]+-\d+)/i)?.[1] ?? u.searchParams.get('selectedIssue');
|
|
23
|
+
if (jira && /^[A-Z][A-Z0-9_]+-\d+$/i.test(jira)) return { kind: 'ticket', url, label: jira.toUpperCase() };
|
|
24
|
+
if (['github.com', 'gitlab.com', 'bitbucket.org'].includes(host) && parts.length >= 2) {
|
|
25
|
+
const repo = `https://${host}/${parts[0]}/${parts[1].replace(/\.git$/, '')}.git`;
|
|
26
|
+
const issue = u.pathname.match(/\/(?:-\/)?issues\/(\d+)/);
|
|
27
|
+
if (issue) return { kind: 'ticket', url, label: `${parts[1]}#${issue[1]}`, repo };
|
|
28
|
+
if (parts.length === 2) return { kind: 'repo', url: repo, label: `${parts[0]}/${parts[1].replace(/\.git$/, '')}` };
|
|
29
|
+
}
|
|
30
|
+
if (/\.git$/.test(u.pathname)) return { kind: 'repo', url, label: parts.slice(-2).join('/').replace(/\.git$/, '') };
|
|
31
|
+
if (host === 'linear.app' && /\/issue\//.test(u.pathname)) return { kind: 'ticket', url, label: u.pathname.match(/\/issue\/([^/]+)/)?.[1] ?? 'issue' };
|
|
32
|
+
if (/(^|\.)(figma\.com|sketch\.com|zeplin\.io|miro\.com|whimsical\.com|excalidraw\.com|invisionapp\.com|framer\.com|canva\.com)$/.test(host) || IMAGE.test(u.pathname)) return { kind: 'design', url, label: host };
|
|
33
|
+
if (/(^|\.)(docs\.google\.com|drive\.google\.com|notion\.so|notion\.site|paper\.dropbox\.com|coda\.io|sharepoint\.com|quip\.com)$/.test(host) || /(^|\.)atlassian\.net$/.test(host) || /\/(wiki|confluence)\//.test(u.pathname) || DOCUMENT.test(u.pathname)) return { kind: 'doc', url, label: host };
|
|
34
|
+
return { kind: 'link', url, label: host };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* What was dropped or pasted, sorted: `uris` (the text/uri-list of a drag) and `text` (its
|
|
39
|
+
* text/plain). Text that is only links counts as links; any other text is kept as the request.
|
|
40
|
+
* Returns { tickets, repo, designs, docs, links, text }.
|
|
41
|
+
*/
|
|
42
|
+
export function readDrop({ uris = '', text = '' } = {}) {
|
|
43
|
+
const out = { tickets: [], repo: null, designs: [], docs: [], links: [], text: '' };
|
|
44
|
+
const seen = new Set();
|
|
45
|
+
const take = (raw) => {
|
|
46
|
+
const c = classifyUrl(raw);
|
|
47
|
+
if (!c || seen.has(c.url)) return Boolean(c);
|
|
48
|
+
seen.add(c.url);
|
|
49
|
+
if (c.kind === 'ticket') out.tickets.push(c);
|
|
50
|
+
else if (c.kind === 'repo') out.repo ??= c;
|
|
51
|
+
else out[`${c.kind}s`].push(c);
|
|
52
|
+
if (c.repo && !out.repo) out.repo = { kind: 'repo', url: c.repo, label: c.repo.replace(/^https:\/\/[^/]+\//, '').replace(/\.git$/, ''), implied: true };
|
|
53
|
+
return true;
|
|
54
|
+
};
|
|
55
|
+
for (const line of String(uris).split(/\r?\n/)) if (line.trim() && !line.startsWith('#')) take(line);
|
|
56
|
+
const words = String(text).trim().split(/\s+/).filter(Boolean);
|
|
57
|
+
if (words.length && words.every((w) => classifyUrl(w))) words.forEach(take);
|
|
58
|
+
else if (String(text).trim() && !seen.has(classifyUrl(String(text).trim())?.url)) out.text = String(text).trim();
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const isEmptyDrop = (d) => !d.tickets.length && !d.repo && !d.designs.length && !d.docs.length && !d.links.length && !d.text;
|
|
63
|
+
|
|
64
|
+
const contextLines = (d) => [...d.docs.map((x) => `- Requirements: ${x.url}`), ...d.designs.map((x) => `- Design: ${x.url}`), ...d.links.map((x) => `- Link: ${x.url}`)];
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The request text after a drop. `current` is what the form holds and `split` its mode ("lines":
|
|
68
|
+
* one agent per line; "one": the whole text is one request). Several tickets become one line each;
|
|
69
|
+
* one ticket (or none) with context becomes one request with the context listed under it.
|
|
70
|
+
* Returns { text, split }.
|
|
71
|
+
*/
|
|
72
|
+
export function composeIntents(current, d, split = 'lines') {
|
|
73
|
+
const cur = String(current ?? '').replace(/\s+$/, '');
|
|
74
|
+
const ctx = contextLines(d);
|
|
75
|
+
const flat = [...d.docs, ...d.designs, ...d.links].map((x) => x.url).join(' ');
|
|
76
|
+
// Lines that are each their own agent stay that way: context rides on the ticket's line.
|
|
77
|
+
if (d.tickets.length > 1 || (cur && split === 'lines')) {
|
|
78
|
+
const lines = d.tickets.map((t) => `${t.url}${flat ? ` (context: ${flat})` : ''}`);
|
|
79
|
+
if (!lines.length && (flat || d.text)) lines.push([d.text.replace(/\s*\n\s*/g, ' '), flat ? `(context: ${flat})` : ''].filter(Boolean).join(' '));
|
|
80
|
+
else if (d.text) lines.push(d.text.replace(/\s*\n\s*/g, ' '));
|
|
81
|
+
return { text: [cur, ...lines].filter(Boolean).join('\n'), split: 'lines' };
|
|
82
|
+
}
|
|
83
|
+
const whole = Boolean(ctx.length || /\n/.test(d.text) || (d.tickets.length && d.text) || split === 'one');
|
|
84
|
+
const body = [d.tickets[0]?.url, d.text, ctx.length ? `Context:\n${ctx.join('\n')}` : ''].filter(Boolean).join('\n\n');
|
|
85
|
+
return { text: [cur, body].filter(Boolean).join('\n\n'), split: whole ? 'one' : split };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** "2 tickets, 1 requirements link, 1 design, the repository, 2 files". */
|
|
89
|
+
export function dropSummary(d, files = 0) {
|
|
90
|
+
const n = (k, one, many) => (k ? `${k} ${k === 1 ? one : many}` : '');
|
|
91
|
+
return [n(d.tickets.length, 'ticket', 'tickets'), n(d.docs.length, 'requirements link', 'requirements links'), n(d.designs.length, 'design', 'designs'), n(d.links.length, 'link', 'links'), d.repo ? 'the repository' : '', d.text ? 'the text' : '', n(files, 'file', 'files')].filter(Boolean).join(', ');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const has = (e, type) => [...(e.dataTransfer?.types ?? [])].includes(type);
|
|
95
|
+
const droppable = (e) => has(e, 'Files') || has(e, 'text/uri-list') || has(e, 'text/plain');
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* `form`: the New agents form (fields intents, split, repo, dir). `zone`: the box inside it.
|
|
99
|
+
* `overlay`: the page-wide "drop to start" frame. `attach.add(files)` attaches files. `open()`
|
|
100
|
+
* opens the form; `isOpen()` says whether it is. `sync()` after the text or the mode changed.
|
|
101
|
+
*/
|
|
102
|
+
export function initDropZone({ form, zone, overlay, attach, open, isOpen, sync, toast }) {
|
|
103
|
+
const added = zone.querySelector('.drop-added');
|
|
104
|
+
let internal = false; // a drag that started on this page (reordering agents, moving text) is not ours
|
|
105
|
+
|
|
106
|
+
function apply(d, files = []) {
|
|
107
|
+
if (isEmptyDrop(d) && !files.length) return false;
|
|
108
|
+
if (!isEmptyDrop(d)) {
|
|
109
|
+
const next = composeIntents(form.intents.value, d, form.split.value);
|
|
110
|
+
form.intents.value = next.text;
|
|
111
|
+
if (next.split !== form.split.value) form.split.value = next.split;
|
|
112
|
+
if (d.repo && !form.repo.value.trim() && !form.dir.value.trim() && !form.project?.value.trim()) form.repo.value = d.repo.url;
|
|
113
|
+
}
|
|
114
|
+
if (files.length) attach.add(files);
|
|
115
|
+
sync();
|
|
116
|
+
const what = dropSummary(d, files.length);
|
|
117
|
+
added.textContent = what ? `Added: ${what}. Check the request below, then start.` : '';
|
|
118
|
+
zone.classList.toggle('filled', Boolean(what));
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const take = (e) => {
|
|
123
|
+
const files = [...(e.dataTransfer?.files ?? [])];
|
|
124
|
+
// A picture dragged from a web page comes as a file and as its link: the file is enough.
|
|
125
|
+
const d = files.length ? readDrop({}) : readDrop({ uris: e.dataTransfer?.getData('text/uri-list') ?? '', text: e.dataTransfer?.getData('text/plain') ?? '' });
|
|
126
|
+
return { d, files };
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
document.addEventListener('dragstart', () => (internal = true));
|
|
130
|
+
document.addEventListener('dragend', () => (internal = false));
|
|
131
|
+
// A drag whose element was redrawn under it ends without "dragend": the next press starts clean.
|
|
132
|
+
document.addEventListener('pointerdown', () => (internal = false), true);
|
|
133
|
+
|
|
134
|
+
// On the form: links and text (files are taken by the attachments box, which listens there too).
|
|
135
|
+
form.addEventListener('dragover', (e) => {
|
|
136
|
+
if (internal || !droppable(e)) return;
|
|
137
|
+
e.preventDefault();
|
|
138
|
+
zone.classList.add('over');
|
|
139
|
+
});
|
|
140
|
+
form.addEventListener('dragleave', (e) => {
|
|
141
|
+
if (!form.contains(e.relatedTarget)) zone.classList.remove('over');
|
|
142
|
+
});
|
|
143
|
+
form.addEventListener('drop', (e) => {
|
|
144
|
+
zone.classList.remove('over');
|
|
145
|
+
if (internal) return;
|
|
146
|
+
const { d, files } = take(e);
|
|
147
|
+
if (files.length) {
|
|
148
|
+
// The attachments box adds them; here only the summary.
|
|
149
|
+
added.textContent = `Added: ${dropSummary(d, files.length)}. Check the request below, then start.`;
|
|
150
|
+
zone.classList.add('filled');
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (isEmptyDrop(d)) return;
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
apply(d);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// Anywhere on the page, when nothing else takes the drop and no dialog is open: start a new agent.
|
|
159
|
+
const busy = () => internal || Boolean(document.querySelector('dialog[open]'));
|
|
160
|
+
const hide = () => (overlay.hidden = true);
|
|
161
|
+
document.addEventListener('dragover', (e) => {
|
|
162
|
+
if (busy() || e.defaultPrevented || !droppable(e)) return hide();
|
|
163
|
+
e.preventDefault();
|
|
164
|
+
e.dataTransfer.dropEffect = 'copy';
|
|
165
|
+
overlay.hidden = false;
|
|
166
|
+
});
|
|
167
|
+
document.addEventListener('dragleave', (e) => {
|
|
168
|
+
if (!e.relatedTarget) hide();
|
|
169
|
+
});
|
|
170
|
+
document.addEventListener('drop', (e) => {
|
|
171
|
+
const shown = !overlay.hidden;
|
|
172
|
+
hide();
|
|
173
|
+
if (!shown || busy() || e.defaultPrevented) return;
|
|
174
|
+
const { d, files } = take(e);
|
|
175
|
+
if (isEmptyDrop(d) && !files.length) return;
|
|
176
|
+
e.preventDefault();
|
|
177
|
+
if (!isOpen()) open();
|
|
178
|
+
apply(d, files);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// Without a mouse (a phone): paste what was copied, or pick files.
|
|
182
|
+
zone.addEventListener('click', async (e) => {
|
|
183
|
+
const act = e.target.closest('[data-drop-act]')?.dataset.dropAct;
|
|
184
|
+
if (act === 'pick') return attach.pick();
|
|
185
|
+
if (act !== 'paste') return;
|
|
186
|
+
try {
|
|
187
|
+
const text = await navigator.clipboard.readText();
|
|
188
|
+
if (!apply(readDrop({ text }))) toast('Nothing to paste: copy a ticket or document link first', 4000);
|
|
189
|
+
} catch {
|
|
190
|
+
toast('The browser did not allow reading the clipboard: paste into the text box instead', 5000);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
if (!navigator.clipboard?.readText) zone.querySelector('[data-drop-act="paste"]')?.remove();
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
apply,
|
|
197
|
+
/** A new form: nothing added yet. */
|
|
198
|
+
reset() {
|
|
199
|
+
added.textContent = '';
|
|
200
|
+
zone.classList.remove('filled', 'over');
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
}
|
package/public/index.html
CHANGED
|
@@ -257,6 +257,13 @@
|
|
|
257
257
|
<label class="check" title="The whole text goes to one agent: a long description, a spec, pasted notes"><input type="radio" name="split" value="one" /> One agent for all of it</label>
|
|
258
258
|
<span class="spacer"></span><span class="hint" id="intent-count"></span>
|
|
259
259
|
</div>
|
|
260
|
+
<div id="new-drop" class="drop-zone">
|
|
261
|
+
<span class="drop-icon" aria-hidden="true">⤓</span>
|
|
262
|
+
<span class="drop-text"><b>Drop tickets, requirements and designs here</b>
|
|
263
|
+
<span class="hint">Jira or GitHub issue links, a PRD or design link, screenshots, documents: the form is filled in for you. <button type="button" class="link" data-drop-act="paste">Paste what you copied</button> · <button type="button" class="link" data-drop-act="pick">Choose files</button></span>
|
|
264
|
+
<span class="drop-added" role="status"></span>
|
|
265
|
+
</span>
|
|
266
|
+
</div>
|
|
260
267
|
<label>
|
|
261
268
|
<span class="sr-only">Intents</span>
|
|
262
269
|
<textarea name="intents" rows="6" required placeholder="Add a dark mode toggle that remembers the user's choice Make search results show up as you type Find out why the dashboard takes 5 seconds to load and speed it up Add a one-click CSV export to the reports page"></textarea>
|
|
@@ -314,6 +321,20 @@
|
|
|
314
321
|
<input type="checkbox" name="plan" checked />
|
|
315
322
|
Plan with Claude while the repo clones <span class="hint">(repo URLs only; the session moves into the repo when it's ready)</span>
|
|
316
323
|
</label>
|
|
324
|
+
<label class="check">
|
|
325
|
+
<input type="checkbox" name="acceptance" />
|
|
326
|
+
Agree on what done means first <span class="hint">(the agent writes three to six points you can check and waits; you change them and agree, and its work is checked against them)</span>
|
|
327
|
+
</label>
|
|
328
|
+
<label>
|
|
329
|
+
Without you <span class="hint">how far each agent goes before it needs you; routine questions are answered from what is already decided, and each answer shows in your inbox</span>
|
|
330
|
+
<select name="autonomy" id="new-autonomy">
|
|
331
|
+
<option value="">The default</option>
|
|
332
|
+
<option value="ask">Ask me</option>
|
|
333
|
+
<option value="run">Agree, then run</option>
|
|
334
|
+
<option value="pr">Run to pull request</option>
|
|
335
|
+
<option value="merge">Run to merge</option>
|
|
336
|
+
</select>
|
|
337
|
+
</label>
|
|
317
338
|
<label class="check">
|
|
318
339
|
<input type="checkbox" name="planReview" />
|
|
319
340
|
Review the implementation plan first <span class="hint">(the agent writes a plan and waits for your approval before changing anything)</span>
|
|
@@ -913,6 +934,22 @@
|
|
|
913
934
|
</div>
|
|
914
935
|
</dialog>
|
|
915
936
|
|
|
937
|
+
<dialog id="accept-dialog" class="update-dialog accept-dialog" aria-label="What done means">
|
|
938
|
+
<h2 id="acc-title">What done means</h2>
|
|
939
|
+
<div id="acc-body"></div>
|
|
940
|
+
<div class="dialog-actions" id="acc-actions"></div>
|
|
941
|
+
</dialog>
|
|
942
|
+
|
|
943
|
+
<div id="drop-overlay" class="drop-overlay" hidden aria-hidden="true">
|
|
944
|
+
<div class="drop-frame"><span class="drop-icon">⤓</span><b>Drop to start a new agent</b><span>Tickets, requirements, designs, screenshots or files: the form is filled in, and you start it.</span></div>
|
|
945
|
+
</div>
|
|
946
|
+
|
|
947
|
+
<dialog id="auto-dialog" class="update-dialog auto-dialog" aria-label="Without you">
|
|
948
|
+
<h2 id="auto-title">Without you</h2>
|
|
949
|
+
<div id="auto-body"></div>
|
|
950
|
+
<div class="dialog-actions"><button type="button" class="small primary" data-auto="close">Close</button></div>
|
|
951
|
+
</dialog>
|
|
952
|
+
|
|
916
953
|
<dialog id="update-dialog" class="update-dialog" aria-label="Update">
|
|
917
954
|
<h2 id="update-title">Update</h2>
|
|
918
955
|
<div id="update-body"></div>
|
|
@@ -978,6 +1015,25 @@
|
|
|
978
1015
|
<label class="check"><input type="checkbox" name="judgeOn" /> AI judge: checks stuck agents, idle screens, finished work, overlaps, backlog order and alerts</label>
|
|
979
1016
|
<p class="hint">On your own Claude or Codex plan; without it, fixed rules only. <span id="settings-judge-state"></span></p>
|
|
980
1017
|
</fieldset>
|
|
1018
|
+
<fieldset id="settings-ground">
|
|
1019
|
+
<legend>Ground rules</legend>
|
|
1020
|
+
<p class="hint">Your own rules for every agent, in every repository, one per line. Agents get them with their instructions, next to what is in the repository's memory and its standards, and are told to stop and say so when a task cannot be done without breaking one.</p>
|
|
1021
|
+
<textarea name="groundRules" rows="5" placeholder="Ask before adding a dependency Never force-push or rewrite history Say how sure you are of anything you build, and why" aria-label="Ground rules, one per line"></textarea>
|
|
1022
|
+
<label class="check"><input type="checkbox" name="groundTell" /> Also tell the agents running now <span class="hint">(others get them when they start)</span></label>
|
|
1023
|
+
</fieldset>
|
|
1024
|
+
<fieldset id="settings-autonomy">
|
|
1025
|
+
<legend>Without you</legend>
|
|
1026
|
+
<label>New agents
|
|
1027
|
+
<select name="autoLevel">
|
|
1028
|
+
<option value="ask">Ask me</option>
|
|
1029
|
+
<option value="run">Agree, then run</option>
|
|
1030
|
+
<option value="pr">Run to pull request</option>
|
|
1031
|
+
<option value="merge">Run to merge</option>
|
|
1032
|
+
</select>
|
|
1033
|
+
</label>
|
|
1034
|
+
<label>Models, best first <input name="autoModels" placeholder="fable, opus, sonnet" autocomplete="off" autocapitalize="off" spellcheck="false" /></label>
|
|
1035
|
+
<p class="hint">How far an agent goes when you name no level. Past "Ask me", routine questions are answered from what is already decided (your request, the agreed points, your ground rules, the repository's lessons), nudges are sent and quiet agents told to carry on. The first model answers; the next one is used when a call fails. Never answered for you: permission prompts, and questions about deleting, publishing, money, credentials or scope. <span id="settings-autonomy-state"></span></p>
|
|
1036
|
+
</fieldset>
|
|
981
1037
|
<fieldset class="local-only" id="settings-service">
|
|
982
1038
|
<legend>Start at login</legend>
|
|
983
1039
|
<label class="check"><input type="checkbox" name="startAtLogin" /> Start AI Agent Manager when I log in</label>
|
package/public/menu.js
CHANGED
|
@@ -61,6 +61,9 @@ export function initMenu({ api, esc, toast, $ }) {
|
|
|
61
61
|
let features = null; // what you use, and who you are, as the dialog opened
|
|
62
62
|
let rounds = null; // review rounds as the dialog opened
|
|
63
63
|
let judge = null; // the AI judge as the dialog opened
|
|
64
|
+
let ground = null; // your ground rules as the dialog opened
|
|
65
|
+
let autonomy = null; // the autonomy settings as the dialog opened
|
|
66
|
+
const modelList = (a) => (a?.models ?? []).map((m) => (typeof m === 'string' ? m : m.model)).join(', ');
|
|
64
67
|
const FEATURE_KEYS = ['jira', 'slack', 'gemini'];
|
|
65
68
|
function showContainers() {
|
|
66
69
|
const c = containers;
|
|
@@ -118,6 +121,15 @@ export function initMenu({ api, esc, toast, $ }) {
|
|
|
118
121
|
form.judgeOn.closest('label').hidden = !judge;
|
|
119
122
|
form.judgeOn.checked = Boolean(judge?.enabled);
|
|
120
123
|
$('#settings-judge-state').textContent = judge?.enabled ? `${judge.calls} of ${judge.cap} calls today.` : '';
|
|
124
|
+
ground = await api('GET', '/ground-rules').catch(() => null);
|
|
125
|
+
$('#settings-ground').hidden = !ground;
|
|
126
|
+
form.groundRules.value = ground?.text ?? '';
|
|
127
|
+
form.groundTell.checked = false;
|
|
128
|
+
autonomy = await api('GET', '/autonomy').catch(() => null);
|
|
129
|
+
$('#settings-autonomy').hidden = !autonomy;
|
|
130
|
+
form.autoLevel.value = autonomy?.level ?? 'ask';
|
|
131
|
+
form.autoModels.value = modelList(autonomy);
|
|
132
|
+
$('#settings-autonomy-state').textContent = autonomy ? `${autonomy.agents} agent${autonomy.agents === 1 ? '' : 's'} running without you now; ${autonomy.calls} of ${autonomy.dailyCalls} calls today${autonomy.lastModel ? `, last answered by ${autonomy.lastModel}` : ''}.` : '';
|
|
121
133
|
const u = await api('GET', '/update').catch(() => null);
|
|
122
134
|
form.updateCheck.checked = u?.check !== false;
|
|
123
135
|
if (!remote()) {
|
|
@@ -209,6 +221,14 @@ export function initMenu({ api, esc, toast, $ }) {
|
|
|
209
221
|
if (Object.keys(changed).length) rounds = await api('PUT', '/prereview', changed);
|
|
210
222
|
}
|
|
211
223
|
if (judge && form.judgeOn.checked !== Boolean(judge.enabled)) judge = await api('PUT', '/judge', { enabled: form.judgeOn.checked });
|
|
224
|
+
if (ground && form.groundRules.value.trim() !== ground.text.trim()) {
|
|
225
|
+
const g = await api('PUT', '/ground-rules', { text: form.groundRules.value, tell: form.groundTell.checked });
|
|
226
|
+
toast(`${g.rules.length} ground rule${g.rules.length === 1 ? '' : 's'}: agents get them when they start${g.told ? `, and ${g.told} running now ${g.told === 1 ? 'was' : 'were'} told` : ''}`, 5000);
|
|
227
|
+
}
|
|
228
|
+
if (autonomy) {
|
|
229
|
+
const want = { ...(form.autoLevel.value !== autonomy.level ? { level: form.autoLevel.value } : {}), ...(form.autoModels.value.trim() && form.autoModels.value.trim() !== modelList(autonomy) ? { models: form.autoModels.value } : {}) };
|
|
230
|
+
if (Object.keys(want).length) autonomy = await api('PUT', '/autonomy', want);
|
|
231
|
+
}
|
|
212
232
|
document.dispatchEvent(new CustomEvent('agentmgr:review-settings'));
|
|
213
233
|
if (!remote() && jira && (form.jiraSite.value.trim() !== (jira.site ?? '') || form.jiraEmail.value.trim() !== (jira.email ?? '') || form.jiraToken.value.trim())) {
|
|
214
234
|
const j = await api('PUT', '/jira', { site: form.jiraSite.value.trim(), email: form.jiraEmail.value.trim(), token: form.jiraToken.value.trim() || undefined });
|
package/public/scorecard.js
CHANGED
|
@@ -64,7 +64,7 @@ export function scorecardHtml(doc, esc, { stale = false, actions = '' } = {}) {
|
|
|
64
64
|
return `<div class="sc-row"><span class="sc-label">${label}</span><span class="sc-bar"><span class="${tone(d.score)}" style="width:${d.score}%"></span></span><span class="sc-n">${d.score}</span><span class="sc-why">${esc(d.why)}${d.notes.length ? ` <span class="sc-note">${esc(d.notes.join('; '))}</span>` : ''}</span></div>`;
|
|
65
65
|
}).join('');
|
|
66
66
|
const crit = sc.criteria.length
|
|
67
|
-
? `<details class="sc-crit" ${sc.criteria.some((c) => c.status !== 'met') ? 'open' : ''}><summary
|
|
67
|
+
? `<details class="sc-crit" ${sc.criteria.some((c) => c.status !== 'met') ? 'open' : ''}><summary>${sc.criteria.some((c) => c.agreed) ? 'What done means, as agreed' : 'Acceptance criteria'}: ${sc.criteria.filter((c) => c.status === 'met').length} of ${sc.criteria.length} met</summary><ul>${sc.criteria.map((c) => `<li class="${c.status}"><span class="sc-mark">${c.status === 'met' ? '✓' : c.status === 'not_met' ? '✗' : '?'}</span>${esc(c.criterion)}${c.evidence ? ` <span class="hint">${esc(c.evidence)}</span>` : ''}</li>`).join('')}</ul></details>`
|
|
68
68
|
: '';
|
|
69
69
|
const look = sc.look.length
|
|
70
70
|
? `<div class="sc-look"><b>Where to look</b><ol>${sc.look.map((l) => `<li><button type="button" class="link" data-sc-look="${esc(`${l.file}\t${l.head}`)}"><code>${esc(l.file)}</code></button> ${esc(l.reason)}</li>`).join('')}</ol></div>`
|
package/public/standup.js
CHANGED
|
@@ -165,6 +165,7 @@ export function initStandup({ api, $, esc, agents, needsFor, needCard, onNeed, t
|
|
|
165
165
|
}
|
|
166
166
|
if (need.kind === 'question') return { label: `answer “${t}”`, run: () => api('POST', `/agents/${a.id}/answer`, { question: need.q.id, text: t }) };
|
|
167
167
|
if (need.kind === 'waiting') return { label: `reply “${t}”`, run: () => api('POST', `/agents/${a.id}/waiting/answer`, { text: t }) };
|
|
168
|
+
if (need.kind === 'acceptance' && /\b(agree|agreed|approve|looks good|go ahead)\b/i.test(t)) return { label: 'agree on its points as written', run: () => api('POST', `/agents/${a.id}/acceptance/agree`, {}) };
|
|
168
169
|
if (need.kind === 'plan' && /\b(approve|looks good|go ahead|ship it)\b/i.test(t)) return { label: 'approve its plan', run: () => api('POST', `/agents/${a.id}/plan/approve`, {}) };
|
|
169
170
|
return { label: `tell it “${t}”`, run: () => api('POST', `/agents/${a.id}/tell`, { text: t }) };
|
|
170
171
|
}
|
package/public/style.css
CHANGED
|
@@ -516,7 +516,7 @@ dialog::backdrop { background: rgba(0, 0, 0, .45); }
|
|
|
516
516
|
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
|
|
517
517
|
.row.three { grid-template-columns: 1fr 1fr 1fr; }
|
|
518
518
|
.team-gaps { max-height: 220px; overflow: auto; margin: 6px 0; font-size: 13px; }
|
|
519
|
-
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
|
|
519
|
+
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
|
|
520
520
|
.error { color: var(--red); margin: 0; font-size: 13px; }
|
|
521
521
|
|
|
522
522
|
.update-dialog { width: min(520px, calc(100vw - 32px)); padding: 20px; }
|
|
@@ -676,6 +676,22 @@ pre.diff .meta { color: var(--muted); font-weight: 600; }
|
|
|
676
676
|
.doc-foot-actions { display: flex; gap: 8px; justify-content: flex-end; }
|
|
677
677
|
.plan-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
|
|
678
678
|
.tag.plan-review { color: var(--accent); font-weight: 600; }
|
|
679
|
+
.tag.acc-review { color: var(--accent); font-weight: 600; }
|
|
680
|
+
.tag.acc-agreed { color: var(--green); }
|
|
681
|
+
.tag.acc-agreed.acc-bad { color: var(--red); font-weight: 600; }
|
|
682
|
+
.accept-dialog { width: min(620px, calc(100vw - 32px)); }
|
|
683
|
+
.acc-edit, .acc-list, .acc-need { margin: 8px 0; padding-left: 22px; }
|
|
684
|
+
.acc-need { font-size: 13px; }
|
|
685
|
+
.acc-edit li { margin: 6px 0; }
|
|
686
|
+
.acc-edit li::marker, .acc-list li::marker { color: var(--muted); }
|
|
687
|
+
.acc-edit textarea { width: calc(100% - 34px); vertical-align: top; font: inherit; font-size: 14px; padding: 6px 8px; resize: vertical; }
|
|
688
|
+
.acc-edit [data-acc-remove] { font-size: 18px; padding: 4px 8px; vertical-align: top; }
|
|
689
|
+
.acc-list li { margin: 8px 0; font-size: 13px; overflow-wrap: anywhere; }
|
|
690
|
+
.acc-chip.acc-met { border-color: var(--green); color: var(--green); }
|
|
691
|
+
.acc-chip.acc-not_met { border-color: var(--red); color: var(--red); font-weight: 600; }
|
|
692
|
+
.acc-chip.acc-unverified { border-color: var(--yellow); color: var(--yellow); }
|
|
693
|
+
.acc-evidence { margin-top: 2px; }
|
|
694
|
+
@media (max-width: 800px) { .acc-edit textarea { font-size: 16px; } }
|
|
679
695
|
.tag.plan-approved { color: #2f9e55; }
|
|
680
696
|
.tag.plan-changes { color: #c08a1e; }
|
|
681
697
|
.need-kind.plan { background: var(--accent); color: #fff; }
|
|
@@ -1904,3 +1920,33 @@ table.eval-items tr.eval-na td { color: var(--muted); }
|
|
|
1904
1920
|
.cl-quote { margin-top: 2px; }
|
|
1905
1921
|
.cl-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
|
|
1906
1922
|
.cl-note.cl-doubt { border: 1px solid var(--yellow); border-radius: 8px; padding: 6px 10px; }
|
|
1923
|
+
|
|
1924
|
+
/* The agent's own confidence in what it built (Results). */
|
|
1925
|
+
.own-conf { margin: 6px 0; font-size: 13px; overflow-wrap: anywhere; }
|
|
1926
|
+
.own-conf .tag { font-weight: 600; margin-right: 4px; }
|
|
1927
|
+
|
|
1928
|
+
/* Without you (autonomy): the row in the brief card, the inbox card and the dialog. */
|
|
1929
|
+
.tag.auto-on { border-color: var(--accent, #4c8dff); color: var(--accent, #4c8dff); }
|
|
1930
|
+
.auto-answer { margin: 4px 0; font-size: 14px; overflow-wrap: anywhere; }
|
|
1931
|
+
.auto-hold { margin: 8px 0; font-size: 13px; }
|
|
1932
|
+
.auto-log { list-style: none; margin: 8px 0; padding: 0; }
|
|
1933
|
+
.auto-log li { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
|
|
1934
|
+
.auto-dialog select, #settings-autonomy select, #settings-autonomy input, #settings-ground textarea, #new-autonomy { width: 100%; font: inherit; font-size: 16px; }
|
|
1935
|
+
#settings-ground textarea { padding: 6px 8px; resize: vertical; }
|
|
1936
|
+
|
|
1937
|
+
/* Drop to start (dropzone.js): the box in the New agents form, and the frame over the page while dragging. */
|
|
1938
|
+
.drop-zone { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 12px 14px; border: 2px dashed var(--border); border-radius: 12px; background: var(--panel-2); transition: border-color 0.12s, background 0.12s; }
|
|
1939
|
+
.drop-zone .drop-icon { font-size: 26px; line-height: 1; color: var(--muted); }
|
|
1940
|
+
.drop-zone .drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
|
|
1941
|
+
.drop-zone .hint { font-size: 12px; }
|
|
1942
|
+
.drop-zone .link { font-size: 12px; padding: 0; color: var(--accent); text-decoration: underline; }
|
|
1943
|
+
.drop-zone.over, form.dropping .drop-zone { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); }
|
|
1944
|
+
.drop-zone.over .drop-icon, form.dropping .drop-zone .drop-icon { color: var(--accent); }
|
|
1945
|
+
.drop-zone.filled { border-style: solid; border-color: var(--green); }
|
|
1946
|
+
.drop-added { font-size: 12px; color: var(--green); overflow-wrap: anywhere; }
|
|
1947
|
+
.drop-added:empty { display: none; }
|
|
1948
|
+
.drop-overlay { position: fixed; inset: 0; z-index: 1000; pointer-events: none; display: flex; padding: 16px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
|
|
1949
|
+
.drop-overlay[hidden] { display: none; }
|
|
1950
|
+
.drop-frame { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 3px dashed var(--accent); border-radius: 18px; background: color-mix(in srgb, var(--bg, #fff) 82%, transparent); text-align: center; padding: 20px; font-size: 15px; }
|
|
1951
|
+
.drop-frame b { font-size: 22px; }
|
|
1952
|
+
.drop-frame .drop-icon { font-size: 44px; color: var(--accent); }
|