@giamme/forge 0.12.0 → 0.13.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 +77 -0
- package/README.md +1 -1
- package/SKILL.md +31 -12
- package/VERSION +1 -1
- package/docs/add-ons.md +11 -6
- package/docs/artifacts.md +18 -6
- package/docs/commands.md +189 -17
- package/docs/decomposed-runs.md +13 -5
- package/docs/forge-ui.md +34 -4
- package/docs/memory.md +2 -1
- package/docs/models.md +4 -2
- package/docs/reviews.md +81 -19
- package/docs/troubleshooting.md +3 -1
- package/forge +17 -1
- package/package.json +1 -1
- package/references/dataset.md +40 -14
- package/references/decision-models.md +759 -0
- package/references/decompose.md +197 -28
- package/references/harnesses.md +10 -3
- package/references/planning.md +8 -0
- package/references/solo.md +13 -3
- package/references/ui.md +11 -0
- package/scripts/forge-artifact.sh +30 -4
- package/scripts/forge-config.py +238 -29
- package/scripts/forge-contract.py +127 -58
- package/scripts/forge-control.py +40 -9
- package/scripts/forge-decide.py +6 -0
- package/scripts/forge-dispatch.sh +47 -15
- package/scripts/forge-fail-first.py +2 -2
- package/scripts/forge-gate-addressed.sh +40 -0
- package/scripts/forge-gate-message.sh +64 -0
- package/scripts/forge-issues.py +368 -36
- package/scripts/forge-jev-options.sh +269 -42
- package/scripts/forge-lib-attribute.sh +447 -0
- package/scripts/forge-lib-gates.sh +32 -0
- package/scripts/forge-lib-plans.sh +17 -6
- package/scripts/forge-lib-review.sh +24 -19
- package/scripts/forge-lib-task.sh +219 -39
- package/scripts/forge-lib-verify.sh +45 -8
- package/scripts/forge-memory.sh +3 -3
- package/scripts/forge-parallel-options.sh +44 -5
- package/scripts/forge-parallel.sh +503 -304
- package/scripts/forge-plan-check.py +35 -1
- package/scripts/forge-pre-review.py +437 -0
- package/scripts/forge-prompt.py +25 -5
- package/scripts/forge-route.py +2 -2
- package/scripts/forge-runtime.py +55 -1
- package/scripts/forge-schedule.py +70 -9
- package/scripts/forge-shadow.py +2 -2
- package/scripts/forge-solo.sh +41 -10
- package/scripts/forge-submodules.py +389 -0
- package/scripts/forge-sweep.py +542 -0
- package/scripts/forge_dataset/cli.py +12 -6
- package/scripts/forge_dataset/export.py +55 -45
- package/scripts/forge_dataset/forecast.py +4 -1
- package/scripts/forge_dataset/harvest.py +33 -5
- package/scripts/{forge_jev/outcome.py → forge_dataset/states.py} +21 -7
- package/scripts/forge_decide/__init__.py +141 -0
- package/scripts/forge_decide/budget.py +149 -0
- package/scripts/forge_decide/cache.py +66 -0
- package/scripts/forge_decide/cli.py +953 -0
- package/scripts/forge_decide/doctor.py +221 -0
- package/scripts/forge_decide/label_addressed.py +75 -0
- package/scripts/forge_decide/label_attribution.py +62 -0
- package/scripts/forge_decide/label_coverage.py +81 -0
- package/scripts/forge_decide/label_message.py +38 -0
- package/scripts/forge_decide/label_prompt.py +139 -0
- package/scripts/forge_decide/labels.py +328 -0
- package/scripts/forge_decide/metrics.py +125 -0
- package/scripts/forge_decide/migrate.py +226 -0
- package/scripts/forge_decide/providers.py +292 -0
- package/scripts/forge_decide/replay.py +350 -0
- package/scripts/forge_decide/report.py +382 -0
- package/scripts/forge_decide/resolve.py +397 -0
- package/scripts/forge_decide/sites.py +377 -0
- package/scripts/forge_jev/__init__.py +202 -104
- package/scripts/forge_jev/addressed.py +171 -0
- package/scripts/forge_jev/attribution.py +198 -0
- package/scripts/forge_jev/cli.py +460 -382
- package/scripts/forge_jev/client.py +155 -77
- package/scripts/forge_jev/coupling.py +19 -87
- package/scripts/forge_jev/coverage.py +303 -0
- package/scripts/forge_jev/findings.py +219 -0
- package/scripts/forge_jev/gates.py +225 -27
- package/scripts/forge_jev/memory.py +65 -4
- package/scripts/forge_jev/message.py +134 -0
- package/scripts/forge_jev/plan_gates.py +294 -0
- package/scripts/forge_jev/questions.py +173 -313
- package/scripts/forge_jev/verify.py +130 -104
- package/ui/README.md +41 -10
- package/ui/docs/api.md +212 -44
- package/ui/forge_ui/checks.py +331 -0
- package/ui/forge_ui/control.py +60 -11
- package/ui/forge_ui/export.py +8 -3
- package/ui/forge_ui/models.py +1 -0
- package/ui/forge_ui/reader.py +436 -26
- package/ui/forge_ui/server.py +13 -0
- package/ui/forge_ui/static/app.js +15 -8
- package/ui/forge_ui/static/checksview.js +449 -0
- package/ui/forge_ui/static/controls.js +20 -13
- package/ui/forge_ui/static/convo.js +11 -2
- package/ui/forge_ui/static/findingsview.js +6 -4
- package/ui/forge_ui/static/index.html +1 -0
- package/ui/forge_ui/static/panel.js +105 -17
- package/ui/forge_ui/static/runmodel.js +40 -2
- package/ui/forge_ui/static/scene3d.js +2 -15
- package/ui/forge_ui/static/settings.js +336 -41
- package/ui/forge_ui/static/style.css +72 -7
- package/ui/forge_ui/transcripts.py +225 -54
- package/references/jev.md +0 -865
- package/scripts/forge_jev/backtest.py +0 -322
- package/scripts/forge_jev/corpus.py +0 -156
- package/scripts/forge_jev/features.py +0 -24
- package/scripts/forge_jev/predict.py +0 -204
- package/scripts/forge_jev/review.py +0 -73
- package/scripts/forge_jev/routing.py +0 -271
- package/scripts/forge_jev/subset.py +0 -123
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/* forge-ui settings view (window.ForgeSettings, and a CommonJS module under node:test). Route #/settings: the model
|
|
2
|
-
registry (read-only),
|
|
3
|
-
The pure helpers (request bodies, value checks, the
|
|
4
|
-
ui/tests/js/settings.test.js; render(host, ctx) is thin DOM
|
|
2
|
+
registry (read-only), the decision-model gates, the three per-repo .forge files of one repository, the dataset and
|
|
3
|
+
the FORGE_* environment. The pure helpers (request bodies, value checks, the decision-model view, the repository
|
|
4
|
+
picker, the editors' unsaved-text state) are tested in ui/tests/js/settings.test.js; render(host, ctx) is thin DOM
|
|
5
|
+
over them. Every value from the server enters the page as text.
|
|
5
6
|
ctx = { key (the run whose repo to show, or null), runs() (the run list), onPick?(key) }. render returns { poll() }:
|
|
6
7
|
the page calls it on each refresh, and unsaved editor text survives it.
|
|
7
8
|
The calls are GET /api/config?run=<key> and POST /api/config, see ui/docs/api.md, "Controls (write endpoints)". A write
|
|
8
|
-
changes a file in the repository's working tree
|
|
9
|
+
changes a file in the repository's working tree, or a decision-model gate in forge's user config, and is only offered
|
|
10
|
+
with controls on. */
|
|
9
11
|
(function (root, factory) {
|
|
10
12
|
'use strict';
|
|
11
13
|
const api = factory(root);
|
|
@@ -16,6 +18,12 @@
|
|
|
16
18
|
|
|
17
19
|
const FILES = ['verify', 'setup', 'verify-subset'];
|
|
18
20
|
const VALUE_MAX = 4096;
|
|
21
|
+
const DECIDE_VALUE_MAX = 256;
|
|
22
|
+
// The same names as forge_decide.GATES. The section renders this list, not whatever keys a payload happens to carry.
|
|
23
|
+
const GATES = ['drift', 'forward', 'prompt', 'memory-curate', 'memory-slice', 'memory-stale', 'verify-discover',
|
|
24
|
+
'coverage', 'retry-addressed', 'dwarf-message', 'attribution', 'findings'];
|
|
25
|
+
const MODES = ['off', 'shadow', 'on'];
|
|
26
|
+
const ADD_COMMAND = 'forge decide provider add …';
|
|
19
27
|
const POLL_MS = 20000; // the config rarely changes, and each read starts a CLI process
|
|
20
28
|
const list = v => Array.isArray(v) ? v : [];
|
|
21
29
|
const object = v => v && typeof v === 'object' && !Array.isArray(v) ? v : {};
|
|
@@ -23,13 +31,14 @@
|
|
|
23
31
|
const basename = p => String(p || '').replace(/\/+$/, '').split('/').pop() || String(p || '');
|
|
24
32
|
|
|
25
33
|
/* ---------- pure ---------- */
|
|
26
|
-
// The POST body: a set carries `value`, an unset carries `unset: true`, never both.
|
|
27
|
-
// 'true' or 'false', as the CLI takes it.
|
|
34
|
+
// The POST body: a set carries `value`, an unset carries `unset: true`, never both.
|
|
28
35
|
function configBody(run, key, value, unset) {
|
|
29
36
|
if (unset) return { run: String(run), key: String(key), unset: true };
|
|
30
37
|
return { run: String(run), key: String(key), value: String(value) };
|
|
31
38
|
}
|
|
32
39
|
const repoKey = name => 'repo.' + name;
|
|
40
|
+
// decide.gate.<gate>, or the same with .provider or .model.
|
|
41
|
+
const gateKey = (name, field) => 'decide.gate.' + name + (field ? '.' + field : '');
|
|
33
42
|
// The file a save or remove touches, as the confirm names it.
|
|
34
43
|
const targetPath = (repo, name) => String(repo || '').replace(/\/+$/, '') + '/.forge/' + name;
|
|
35
44
|
|
|
@@ -48,6 +57,120 @@
|
|
|
48
57
|
return null;
|
|
49
58
|
}
|
|
50
59
|
|
|
60
|
+
// Why a provider or model would be refused: empty, too long, a control character (newline and tab included),
|
|
61
|
+
// leading or trailing whitespace, or a leading '-'. The same rules as the server, so a bad value is never posted.
|
|
62
|
+
function decideTextProblem(value) {
|
|
63
|
+
const v = text(value);
|
|
64
|
+
if (!v.trim()) return 'Empty.';
|
|
65
|
+
if (v !== v.trim()) return 'The text cannot start or end with a space.';
|
|
66
|
+
const chars = Array.from(v).length;
|
|
67
|
+
if (chars > DECIDE_VALUE_MAX) return `Too long: ${chars} of ${DECIDE_VALUE_MAX} characters.`;
|
|
68
|
+
if (/[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/.test(v)) return 'The text has an unpaired surrogate, which cannot be saved.';
|
|
69
|
+
if (/[\u0000-\u001f\u007f]/.test(v)) return 'Control characters are not allowed.';
|
|
70
|
+
if (v.startsWith('-')) return 'The text cannot start with "-".';
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const finite = n => typeof n === 'number' && Number.isFinite(n);
|
|
75
|
+
const capTokens = n => finite(n) ? String(n) : 'none';
|
|
76
|
+
const capMoney = n => finite(n) ? n.toFixed(4) : 'none';
|
|
77
|
+
const money = n => finite(n) ? n.toFixed(4) : '0.0000';
|
|
78
|
+
const count = n => finite(n) ? String(n) : '0';
|
|
79
|
+
// How a shadowed value is named in the note. Strings keep their JSON quotes so a mode is not a bare word.
|
|
80
|
+
function literal(value) {
|
|
81
|
+
if (value == null) return 'nothing';
|
|
82
|
+
if (typeof value === 'string') return JSON.stringify(value);
|
|
83
|
+
if (typeof value === 'number' && Number.isFinite(value)) return String(value);
|
|
84
|
+
if (typeof value === 'boolean') return String(value);
|
|
85
|
+
return 'a value';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// The replay a gate carries, or null: `forge decide replay`'s recorded result for the gate's provider and model. An older
|
|
89
|
+
// forge sends none, which reads as no replay, never as an error.
|
|
90
|
+
function describeReplay(replay) {
|
|
91
|
+
if (!replay || typeof replay !== 'object' || Array.isArray(replay)) return null;
|
|
92
|
+
return { provider: text(replay.provider), model: text(replay.model), passes: replay.passes === true, at: finite(replay.at) ? replay.at : null };
|
|
93
|
+
}
|
|
94
|
+
// The day a replay was recorded, in local time like the CLI's `replayed <date>`; '?' when the time is unusable.
|
|
95
|
+
function replayDate(at) {
|
|
96
|
+
const d = finite(at) ? new Date(at * 1000) : null;
|
|
97
|
+
if (!d || Number.isNaN(d.getTime())) return '?';
|
|
98
|
+
const two = n => String(n).padStart(2, '0');
|
|
99
|
+
return d.getFullYear() + '-' + two(d.getMonth() + 1) + '-' + two(d.getDate());
|
|
100
|
+
}
|
|
101
|
+
// The tags a gate row shows beside its source tag: [{suffix, text, title, bad}], the element id being
|
|
102
|
+
// set-gate-<name>-<suffix>. A forced gate acts on without a passing replay; a replay shows when it was recorded and
|
|
103
|
+
// whether it passed. A gate with neither has none.
|
|
104
|
+
function gateTags(gate) {
|
|
105
|
+
const tags = [];
|
|
106
|
+
const replay = gate.replay;
|
|
107
|
+
const on = replay ? replay.provider + '/' + replay.model : '';
|
|
108
|
+
if (gate.forced && gate.mode === 'on') {
|
|
109
|
+
tags.push({ suffix: 'forced', text: 'forced', bad: true,
|
|
110
|
+
title: 'This gate acts without a recorded replay for its provider and model that passes.' });
|
|
111
|
+
}
|
|
112
|
+
if (replay) {
|
|
113
|
+
tags.push(replay.passes
|
|
114
|
+
? { suffix: 'replay', text: 'replayed ' + replayDate(replay.at), title: 'Replay on ' + on + ' passed.', bad: false }
|
|
115
|
+
: { suffix: 'replay', text: 'replay failed', title: 'Replay on ' + on + ' did not pass (' + replayDate(replay.at) + ').', bad: true });
|
|
116
|
+
}
|
|
117
|
+
return tags;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// The Decision models section, as data. render() draws only this, so the page and the test share one reading of the
|
|
121
|
+
// status object. Provider key fields are dropped here and never reach a string the page shows.
|
|
122
|
+
function describeDecide(decide) {
|
|
123
|
+
const d = object(decide);
|
|
124
|
+
const gatesIn = object(d.gates);
|
|
125
|
+
const floor = object(d.privacy).floor === true;
|
|
126
|
+
const providers = Object.keys(object(d.providers)).sort().map(name => {
|
|
127
|
+
const row = object(object(d.providers)[name]);
|
|
128
|
+
return { name, type: text(row.type), local: row.local === true };
|
|
129
|
+
});
|
|
130
|
+
const gates = GATES.map(name => {
|
|
131
|
+
const g = object(gatesIn[name]);
|
|
132
|
+
const skip = floor ? 'privacy' : (typeof g.skip === 'string' ? g.skip : '');
|
|
133
|
+
const mode = MODES.includes(g.mode) ? g.mode : 'off';
|
|
134
|
+
const source = text(g.source) || 'default';
|
|
135
|
+
return {
|
|
136
|
+
name,
|
|
137
|
+
mode,
|
|
138
|
+
source,
|
|
139
|
+
// The mode the user level holds, where the status shows it: the user file set it and no override applies.
|
|
140
|
+
userMode: source === 'user' && !skip ? mode : null,
|
|
141
|
+
provider: typeof g.provider === 'string' ? g.provider : '',
|
|
142
|
+
model: typeof g.model === 'string' ? g.model : '',
|
|
143
|
+
skip,
|
|
144
|
+
ready: g.ready === true,
|
|
145
|
+
forced: g.forced === true,
|
|
146
|
+
replay: describeReplay(g.replay),
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
const caps = object(object(d.budget).caps);
|
|
150
|
+
const spend = object(object(d.budget).spend);
|
|
151
|
+
const today = object(spend.today);
|
|
152
|
+
const date = text(spend.date) || '—';
|
|
153
|
+
const line = 'run cap ' + capTokens(caps.run_tokens) + ' tokens, $' + capMoney(caps.run_usd)
|
|
154
|
+
+ '; daily cap ' + capTokens(caps.daily_tokens) + ' tokens, $' + capMoney(caps.daily_usd)
|
|
155
|
+
+ '; today (' + date + '): ' + count(today.tokens) + ' tokens of ' + capTokens(caps.daily_tokens)
|
|
156
|
+
+ ', $' + money(today.usd) + ' of $' + capMoney(caps.daily_usd);
|
|
157
|
+
const shadowed = list(d.shadowed).filter(e => e && typeof e === 'object').map(e => ({
|
|
158
|
+
key: text(e.key),
|
|
159
|
+
note: text(e.key) + ': the repo sets ' + literal(e.repo) + ', the user file\'s ' + literal(e.user) + ' wins',
|
|
160
|
+
}));
|
|
161
|
+
return {
|
|
162
|
+
gates, privacyFloor: floor,
|
|
163
|
+
banner: floor ? 'Nothing is sent. This repository is under a privacy floor.' : '',
|
|
164
|
+
budget: {
|
|
165
|
+
run: { tokens: caps.run_tokens == null ? null : caps.run_tokens, usd: caps.run_usd == null ? null : caps.run_usd },
|
|
166
|
+
daily: { tokens: caps.daily_tokens == null ? null : caps.daily_tokens, usd: caps.daily_usd == null ? null : caps.daily_usd },
|
|
167
|
+
today: { tokens: today.tokens == null ? 0 : today.tokens, usd: today.usd == null ? 0 : today.usd, date },
|
|
168
|
+
line,
|
|
169
|
+
},
|
|
170
|
+
shadowed, providers, noProviders: providers.length === 0, addCommand: ADD_COMMAND,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
51
174
|
// The runs a repository can be taken from (those that name one), newest first.
|
|
52
175
|
const withRepo = runs => list(runs).filter(r => r && r.key != null && typeof r.repo === 'string' && r.repo);
|
|
53
176
|
const newestFirst = (a, b) => (Number(b.updated) || 0) - (Number(a.updated) || 0);
|
|
@@ -103,12 +226,12 @@
|
|
|
103
226
|
function render(host, ctx) {
|
|
104
227
|
const UI = root.ForgeUI, c = ctx || {};
|
|
105
228
|
const el = (tag, t, cls) => UI.el(tag, t, cls);
|
|
106
|
-
const s = { run: null, data: null, dataText: null, error: null, writes: false, loading: true, editors: {}, moved: {}, hold: 0, redraw: false, seq: 0, gen: 0, runsSig: null, ready: false, loadedAt: 0, repo: null, gone: false, asking: 0, asks: 0, pickerLate: false };
|
|
229
|
+
const s = { run: null, data: null, dataText: null, error: null, writes: false, loading: true, editors: {}, moved: {}, models: {}, modelMoved: {}, hold: 0, redraw: false, seq: 0, gen: 0, runsSig: null, ready: false, loadedAt: 0, repo: null, gone: false, asking: 0, asks: 0, pickerLate: false };
|
|
107
230
|
const key_ = (label, cls, onclick) => { const b = el('button', label, cls); b.type = 'button'; if (onclick) b.addEventListener('click', onclick); return b; };
|
|
108
231
|
|
|
109
232
|
const head = el('header', undefined, 'set-head');
|
|
110
233
|
head.append(el('h1', 'Settings', 'module-title'),
|
|
111
|
-
el('p', 'What forge reads when it runs: its model registry
|
|
234
|
+
el('p', 'What forge reads when it runs: its model registry, the decision-model gates, and the three files a repository can keep in .forge.', 'muted set-lede'));
|
|
112
235
|
const picker = el('div', undefined, 'set-picker');
|
|
113
236
|
const body = el('div', undefined, 'set-body');
|
|
114
237
|
const note = el('p', 'This page is read-only: this server has no write token, or has controls off.', 'muted set-readonly');
|
|
@@ -178,7 +301,7 @@
|
|
|
178
301
|
// A new run: nothing of the old one stays, and confirms of the old body (now detached) no longer hold a redraw.
|
|
179
302
|
function resetRun() {
|
|
180
303
|
staleNote(null);
|
|
181
|
-
s.data = null; s.dataText = null; s.error = null; s.editors = {}; s.moved = {}; s.loading = s.run != null;
|
|
304
|
+
s.data = null; s.dataText = null; s.error = null; s.editors = {}; s.moved = {}; s.models = {}; s.modelMoved = {}; s.loading = s.run != null;
|
|
182
305
|
s.gen++; s.hold = 0; s.redraw = false;
|
|
183
306
|
}
|
|
184
307
|
function pick(key) {
|
|
@@ -210,6 +333,10 @@
|
|
|
210
333
|
const next = dirtyState(s.editors[name], object(files[name]).content);
|
|
211
334
|
s.editors[name] = next.editor; s.moved[name] = next.moved || (next.dirty && !!s.moved[name]);
|
|
212
335
|
}
|
|
336
|
+
for (const g of describeDecide(res.data.decide).gates) {
|
|
337
|
+
const next = dirtyState(s.models[g.name], g.model);
|
|
338
|
+
s.models[g.name] = next.editor; s.modelMoved[g.name] = next.moved || (next.dirty && !!s.modelMoved[g.name]);
|
|
339
|
+
}
|
|
213
340
|
const t = JSON.stringify(res.data);
|
|
214
341
|
if (t === s.dataText && !s.redraw) return;
|
|
215
342
|
s.data = res.data; s.dataText = t;
|
|
@@ -224,13 +351,14 @@
|
|
|
224
351
|
|
|
225
352
|
function drawBody() {
|
|
226
353
|
const focus = document.activeElement && body.contains(document.activeElement) ? document.activeElement : null;
|
|
227
|
-
const at = focus && focus.dataset.editor ? { name: focus.dataset.editor, a: focus.selectionStart, b: focus.selectionEnd }
|
|
354
|
+
const at = focus && focus.dataset.editor ? { kind: 'editor', name: focus.dataset.editor, a: focus.selectionStart, b: focus.selectionEnd }
|
|
355
|
+
: focus && focus.dataset.model ? { kind: 'model', name: focus.dataset.model, a: focus.selectionStart, b: focus.selectionEnd } : null;
|
|
228
356
|
if (s.loading) { body.replaceChildren(el('p', 'Reading the configuration…', 'muted')); return; }
|
|
229
357
|
if (s.error) { body.replaceChildren(el('p', 'Could not read the configuration: ' + s.error, 'warn')); return; }
|
|
230
358
|
if (!s.data) { body.replaceChildren(); return; }
|
|
231
|
-
body.replaceChildren(registrySection(),
|
|
359
|
+
body.replaceChildren(registrySection(), decideSection(), repoSection(), datasetSection(), envSection());
|
|
232
360
|
if (at) {
|
|
233
|
-
const t = body.querySelector(`textarea[data-editor="${at.name}"]`);
|
|
361
|
+
const t = at.kind === 'model' ? body.querySelector(`input[data-model="${at.name}"]`) : body.querySelector(`textarea[data-editor="${at.name}"]`);
|
|
234
362
|
if (t) { t.focus({ preventScroll: true }); try { t.setSelectionRange(at.a, at.b); } catch (_) { /* not selectable */ } }
|
|
235
363
|
}
|
|
236
364
|
}
|
|
@@ -274,37 +402,203 @@
|
|
|
274
402
|
return sec;
|
|
275
403
|
}
|
|
276
404
|
|
|
277
|
-
function
|
|
278
|
-
const
|
|
279
|
-
const sec = section('
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
if (s.writes) {
|
|
287
|
-
const sw = el('button', undefined, 'set-switch'); sw.type = 'button';
|
|
288
|
-
sw.setAttribute('role', 'switch'); sw.setAttribute('aria-checked', String(on));
|
|
289
|
-
sw.append(el('span', undefined, 'set-switch-knob'), el('span', on ? 'On' : 'Off', 'set-switch-label'));
|
|
290
|
-
sw.setAttribute('aria-label', 'Jev enabled');
|
|
291
|
-
sw.addEventListener('click', async () => {
|
|
292
|
-
const next = !on;
|
|
293
|
-
const gen = s.gen, release = grab();
|
|
294
|
-
sw.disabled = true;
|
|
295
|
-
const yes = await UI.confirmInline(result, `Turn Jev ${next ? 'on' : 'off'}? This changes forge's own config (${text(jev.path)}) for every repository.`);
|
|
296
|
-
if (!yes) { sw.disabled = false; release(); sw.focus({ preventScroll: true }); return; }
|
|
297
|
-
const res = await UI.post('/api/config', configBody(s.run, 'jev.enabled', next));
|
|
298
|
-
UI.outcome(result, res, `Jev is now ${next ? 'enabled' : 'disabled'}.`);
|
|
299
|
-
sw.disabled = false; release();
|
|
300
|
-
if (res.ok && gen === s.gen) await reload();
|
|
301
|
-
});
|
|
302
|
-
row.append(sw);
|
|
405
|
+
function decideSection() {
|
|
406
|
+
const view = describeDecide(s.data.decide);
|
|
407
|
+
const sec = section('decide', 'Decision models', 'Each gate is off, shadow or on, with a provider and a model. A change writes your forge config (the user level), so it applies to every repository. The mode shown is the one in effect for this repository, and where it came from.');
|
|
408
|
+
const where = text(object(s.data.decide).user_path);
|
|
409
|
+
if (where) sec.append(pathLine('config', where));
|
|
410
|
+
if (view.privacyFloor) {
|
|
411
|
+
const banner = el('p', view.banner, 'set-banner');
|
|
412
|
+
banner.id = 'set-decide-privacy';
|
|
413
|
+
sec.append(banner);
|
|
303
414
|
}
|
|
304
|
-
|
|
415
|
+
const budget = el('p', view.budget.line, 'muted set-budget');
|
|
416
|
+
budget.id = 'set-decide-budget';
|
|
417
|
+
sec.append(budget);
|
|
418
|
+
if (view.noProviders) {
|
|
419
|
+
const note = el('p', undefined, 'muted');
|
|
420
|
+
note.append(el('span', 'No provider is configured. Add one with '), el('span', view.addCommand, 'mono'), el('span', '.'));
|
|
421
|
+
sec.append(note);
|
|
422
|
+
}
|
|
423
|
+
for (const item of view.shadowed) sec.append(el('p', item.note, 'muted'));
|
|
424
|
+
const gates = el('div', undefined, 'set-gates');
|
|
425
|
+
for (const gate of view.gates) gates.append(gateRow(gate, view.providers));
|
|
426
|
+
sec.append(gates);
|
|
305
427
|
return sec;
|
|
306
428
|
}
|
|
307
429
|
|
|
430
|
+
const providerLabel = p => [p.name, p.type, p.local ? 'local' : ''].filter(Boolean).join(' · ');
|
|
431
|
+
|
|
432
|
+
function gateRow(gate, providers) {
|
|
433
|
+
const art = el('article', undefined, 'set-file set-gate');
|
|
434
|
+
art.id = 'set-gate-' + gate.name;
|
|
435
|
+
const h = el('h3', gate.name, 'set-file-name');
|
|
436
|
+
const status = el('p', undefined, 'set-file-status');
|
|
437
|
+
const source = el('span', gate.source, 'tag');
|
|
438
|
+
source.id = 'set-gate-' + gate.name + '-source';
|
|
439
|
+
status.append(source);
|
|
440
|
+
for (const t of gateTags(gate)) {
|
|
441
|
+
const tag = el('span', t.text, t.bad ? 'tag tag-bad' : 'tag');
|
|
442
|
+
tag.id = 'set-gate-' + gate.name + '-' + t.suffix;
|
|
443
|
+
tag.title = t.title;
|
|
444
|
+
status.append(tag);
|
|
445
|
+
}
|
|
446
|
+
if (gate.skip) status.append(el('span', 'skip: ' + gate.skip, 'set-gate-skip'));
|
|
447
|
+
const top = el('div', undefined, 'set-file-head');
|
|
448
|
+
top.append(h, status);
|
|
449
|
+
art.append(top);
|
|
450
|
+
if (!s.writes) {
|
|
451
|
+
const bits = ['mode ' + gate.mode, gate.provider ? 'provider ' + gate.provider : 'no provider', gate.model ? 'model ' + gate.model : 'no model'];
|
|
452
|
+
art.append(el('p', bits.join(', '), 'muted'));
|
|
453
|
+
return art;
|
|
454
|
+
}
|
|
455
|
+
const result = el('div', undefined, 'set-result');
|
|
456
|
+
const row = el('div', undefined, 'filters');
|
|
457
|
+
row.append(modeField(gate, result), providerField(gate, providers, result), modelField(gate, result));
|
|
458
|
+
art.append(row, result);
|
|
459
|
+
return art;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
function modeField(gate, result) {
|
|
463
|
+
const lab = el('label', undefined, 'filter');
|
|
464
|
+
const sel = el('select');
|
|
465
|
+
sel.id = 'set-gate-' + gate.name + '-mode';
|
|
466
|
+
sel.setAttribute('aria-label', 'Mode for ' + gate.name);
|
|
467
|
+
// The select shows the user level's mode when the status has it. Otherwise the mode in effect is a label that no
|
|
468
|
+
// choice matches, so every mode is a choice that writes the user level, the one in effect included.
|
|
469
|
+
const rest = gate.userMode || ''; // the value the select goes back to
|
|
470
|
+
if (!gate.userMode) {
|
|
471
|
+
const effect = el('option', 'in effect: ' + gate.mode);
|
|
472
|
+
effect.value = ''; effect.disabled = true; effect.selected = true;
|
|
473
|
+
sel.append(effect);
|
|
474
|
+
}
|
|
475
|
+
for (const mode of MODES) {
|
|
476
|
+
const o = el('option', mode);
|
|
477
|
+
o.value = mode;
|
|
478
|
+
o.selected = mode === gate.userMode;
|
|
479
|
+
sel.append(o);
|
|
480
|
+
}
|
|
481
|
+
sel.addEventListener('change', async () => {
|
|
482
|
+
const next = sel.value;
|
|
483
|
+
if (!MODES.includes(next) || next === gate.userMode) { sel.value = rest; return; }
|
|
484
|
+
const gen = s.gen, release = grab();
|
|
485
|
+
sel.disabled = true;
|
|
486
|
+
const yes = await UI.confirmInline(result, `Set ${gate.name} to ${next}? This writes your forge config (the user level) for every repository.`);
|
|
487
|
+
if (!yes || gen !== s.gen) {
|
|
488
|
+
sel.value = rest; sel.disabled = false; release();
|
|
489
|
+
if (!yes && gen === s.gen) sel.focus({ preventScroll: true });
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
const res = await UI.post('/api/config', configBody(s.run, gateKey(gate.name), next));
|
|
493
|
+
UI.outcome(result, res, `${gate.name} is set to ${next}.`);
|
|
494
|
+
if (!res.ok) sel.value = rest;
|
|
495
|
+
sel.disabled = false; release();
|
|
496
|
+
if (res.ok && gen === s.gen) await reload();
|
|
497
|
+
});
|
|
498
|
+
lab.append(el('span', 'Mode'), sel);
|
|
499
|
+
return lab;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
function providerField(gate, providers, result) {
|
|
503
|
+
const lab = el('label', undefined, 'filter');
|
|
504
|
+
const sel = el('select');
|
|
505
|
+
sel.id = 'set-gate-' + gate.name + '-provider';
|
|
506
|
+
sel.setAttribute('aria-label', 'Provider for ' + gate.name);
|
|
507
|
+
const blank = el('option', providers.length ? 'Default' : 'No provider');
|
|
508
|
+
blank.value = '';
|
|
509
|
+
if (gate.provider) blank.disabled = true;
|
|
510
|
+
sel.append(blank);
|
|
511
|
+
const known = new Set(providers.map(p => p.name));
|
|
512
|
+
for (const p of providers) {
|
|
513
|
+
const o = el('option', providerLabel(p));
|
|
514
|
+
o.value = p.name;
|
|
515
|
+
o.selected = p.name === gate.provider;
|
|
516
|
+
sel.append(o);
|
|
517
|
+
}
|
|
518
|
+
if (gate.provider && !known.has(gate.provider)) {
|
|
519
|
+
const o = el('option', gate.provider + ' · not configured');
|
|
520
|
+
o.value = gate.provider;
|
|
521
|
+
o.selected = true;
|
|
522
|
+
sel.append(o);
|
|
523
|
+
}
|
|
524
|
+
if (!providers.length) sel.disabled = true;
|
|
525
|
+
sel.addEventListener('change', async () => {
|
|
526
|
+
const next = sel.value;
|
|
527
|
+
if (!next || next === gate.provider) { sel.value = gate.provider; return; }
|
|
528
|
+
if (decideTextProblem(next)) { sel.value = gate.provider; return; }
|
|
529
|
+
const gen = s.gen, release = grab();
|
|
530
|
+
sel.disabled = true;
|
|
531
|
+
const yes = await UI.confirmInline(result, `Set the provider for ${gate.name} to ${next}? This writes your forge config (the user level) for every repository.`);
|
|
532
|
+
if (!yes || gen !== s.gen) {
|
|
533
|
+
sel.value = gate.provider;
|
|
534
|
+
sel.disabled = providers.length === 0;
|
|
535
|
+
release();
|
|
536
|
+
if (!yes && gen === s.gen) sel.focus({ preventScroll: true });
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
const res = await UI.post('/api/config', configBody(s.run, gateKey(gate.name, 'provider'), next));
|
|
540
|
+
UI.outcome(result, res, `The provider for ${gate.name} is set to ${next}.`);
|
|
541
|
+
if (!res.ok) sel.value = gate.provider;
|
|
542
|
+
sel.disabled = false; release();
|
|
543
|
+
if (res.ok && gen === s.gen) await reload();
|
|
544
|
+
});
|
|
545
|
+
lab.append(el('span', 'Provider'), sel);
|
|
546
|
+
return lab;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
function modelField(gate, result) {
|
|
550
|
+
const id = 'set-gate-' + gate.name + '-model';
|
|
551
|
+
const ed = s.models[gate.name] || (s.models[gate.name] = editorOf(gate.model));
|
|
552
|
+
const wrap = el('div', undefined, 'filter');
|
|
553
|
+
const input = el('input', undefined, 'mono');
|
|
554
|
+
input.type = 'text'; input.id = id; input.dataset.model = gate.name;
|
|
555
|
+
input.spellcheck = false; input.setAttribute('autocomplete', 'off'); input.setAttribute('autocapitalize', 'off');
|
|
556
|
+
input.setAttribute('aria-label', 'Model for ' + gate.name);
|
|
557
|
+
input.value = shown(ed);
|
|
558
|
+
let from = ed.base;
|
|
559
|
+
const movedNote = el('p', 'The model changed on disk after you began editing; saving replaces it with your text.', 'warn set-file-note');
|
|
560
|
+
movedNote.hidden = !(isDirty(ed) && s.modelMoved[gate.name]);
|
|
561
|
+
const problem = el('p', undefined, 'warn set-problem');
|
|
562
|
+
problem.hidden = true; problem.id = id + '-problem';
|
|
563
|
+
const set = key_('Set', 'primary');
|
|
564
|
+
set.setAttribute('aria-label', 'Set model for ' + gate.name);
|
|
565
|
+
const sync = () => {
|
|
566
|
+
const cur = s.models[gate.name], dirtyNow = isDirty(cur), bad = dirtyNow ? decideTextProblem(cur.draft) : null;
|
|
567
|
+
problem.hidden = !bad; problem.textContent = bad || '';
|
|
568
|
+
if (bad) { input.setAttribute('aria-invalid', 'true'); input.setAttribute('aria-describedby', problem.id); }
|
|
569
|
+
else { input.removeAttribute('aria-invalid'); input.removeAttribute('aria-describedby'); }
|
|
570
|
+
set.disabled = !dirtyNow || !!bad;
|
|
571
|
+
movedNote.hidden = !(dirtyNow && s.modelMoved[gate.name]);
|
|
572
|
+
};
|
|
573
|
+
input.addEventListener('input', () => {
|
|
574
|
+
const next = typed(s.models[gate.name], input.value, from);
|
|
575
|
+
s.models[gate.name] = next.editor;
|
|
576
|
+
s.modelMoved[gate.name] = next.moved || (next.dirty && !!s.modelMoved[gate.name]);
|
|
577
|
+
sync();
|
|
578
|
+
});
|
|
579
|
+
set.addEventListener('click', async () => {
|
|
580
|
+
const cur = s.models[gate.name], bad = decideTextProblem(shown(cur));
|
|
581
|
+
if (!isDirty(cur) || bad) { sync(); return; }
|
|
582
|
+
const draft = cur.draft;
|
|
583
|
+
const gen = s.gen, release = grab();
|
|
584
|
+
set.disabled = true; input.readOnly = true;
|
|
585
|
+
const yes = await UI.confirmInline(result, `Set the model for ${gate.name} to ${draft}? This writes your forge config (the user level) for every repository.`);
|
|
586
|
+
if (!yes || gen !== s.gen) {
|
|
587
|
+
input.readOnly = false; release(); sync();
|
|
588
|
+
if (!yes && gen === s.gen) set.focus({ preventScroll: true });
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
const res = await UI.post('/api/config', configBody(s.run, gateKey(gate.name, 'model'), draft));
|
|
592
|
+
UI.outcome(result, res, `The model for ${gate.name} is set.`);
|
|
593
|
+
if (res.ok && gen === s.gen) { s.models[gate.name] = editorOf(draft); s.modelMoved[gate.name] = false; from = draft; }
|
|
594
|
+
input.readOnly = false; release(); sync();
|
|
595
|
+
if (res.ok && gen === s.gen) await reload();
|
|
596
|
+
});
|
|
597
|
+
wrap.append(el('span', 'Model'), input, problem, movedNote, set);
|
|
598
|
+
sync();
|
|
599
|
+
return wrap;
|
|
600
|
+
}
|
|
601
|
+
|
|
308
602
|
function repoSection() {
|
|
309
603
|
const repo = object(s.data.repo), files = object(repo.files);
|
|
310
604
|
const sec = section('repo', 'This repository');
|
|
@@ -430,6 +724,7 @@
|
|
|
430
724
|
return { poll, pick };
|
|
431
725
|
}
|
|
432
726
|
|
|
433
|
-
return { render, configBody, repoKey, targetPath, subsetOk, valueProblem,
|
|
434
|
-
editorOf, isDirty, dirtyState, edited, typed, shown, readFailure,
|
|
727
|
+
return { render, configBody, repoKey, gateKey, targetPath, subsetOk, valueProblem, decideTextProblem, describeDecide, gateTags, replayDate,
|
|
728
|
+
pickDefault, groupRuns, optionLabel, editorOf, isDirty, dirtyState, edited, typed, shown, readFailure,
|
|
729
|
+
FILES, GATES, MODES, VALUE_MAX, DECIDE_VALUE_MAX, ADD_COMMAND };
|
|
435
730
|
});
|
|
@@ -42,11 +42,13 @@
|
|
|
42
42
|
--lamp-green: light-dark(#1d7a39, #5bd57d);
|
|
43
43
|
--lamp-amber: light-dark(#9c6c00, #f4c443);
|
|
44
44
|
--lamp-red: light-dark(#bf3127, #ff5f53);
|
|
45
|
+
--lamp-wait: light-dark(#0b7285, #5fd0e4); /* waiting for you (NEEDS_INPUT): stopped, not failed */
|
|
45
46
|
--lamp-edge: light-dark(rgb(0 0 0 / .18), rgb(0 0 0 / .4));
|
|
46
47
|
/* the same lamps lit on the 3D plate: on a pale panel a lit lamp is saturated, not darkened for text */
|
|
47
48
|
--lit-green: light-dark(#2fae55, #5bd57d);
|
|
48
49
|
--lit-amber: light-dark(#d8b000, #f4c443); /* blending toward the pale panel pulls amber to orange: it starts yellower */
|
|
49
50
|
--lit-red: light-dark(#e0392e, #ff5f53);
|
|
51
|
+
--lit-wait: light-dark(#1098b3, #5fd0e4);
|
|
50
52
|
/* the time an attempt spent in each phase: a grey ramp, with the model's own time lit */
|
|
51
53
|
--ph-1: light-dark(#b9c1b8, #36403a);
|
|
52
54
|
--ph-2: light-dark(#8e988f, #59645d);
|
|
@@ -90,15 +92,17 @@
|
|
|
90
92
|
:root[data-theme=light] { color-scheme: light; }
|
|
91
93
|
:root[data-theme=dark] { color-scheme: dark; }
|
|
92
94
|
|
|
93
|
-
/* status: the lamp behind each forge state.
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
/* status: the lamp behind each forge state. One meaning each (--st; --st-lit on the 3D plate): four lamps, and the
|
|
96
|
+
waiting lamp for a task that waits for the user (NEEDS_INPUT, and an integration that only waits for answers).
|
|
97
|
+
A hollow lamp is that lamp's family but not its plain case: passed without a merge, stopped, failed outside the code,
|
|
98
|
+
an outdated review, waiting for you */
|
|
96
99
|
.st-merged, .st-pass, .st-accepted, .st-nochanges { --st: var(--lamp-green); --st-lit: var(--lit-green); }
|
|
97
100
|
.st-running, .st-interrupted { --st: var(--lamp-amber); --st-lit: var(--lit-amber); }
|
|
98
101
|
.st-pending, .st-none, .st-unknown, .st-invalidated, .st-outdated { --st: var(--lamp-off); --st-lit: var(--lamp-off); }
|
|
99
|
-
.st-fail, .st-error, .st-conflict, .st-infra, .st-timeout, .st-blocked { --st: var(--lamp-red); --st-lit: var(--lit-red); }
|
|
102
|
+
.st-fail, .st-error, .st-conflict, .st-infra, .st-timeout, .st-blocked, .st-bounced, .st-incomplete { --st: var(--lamp-red); --st-lit: var(--lit-red); }
|
|
103
|
+
.st-needs_input, .st-waiting { --st: var(--lamp-wait); --st-lit: var(--lit-wait); }
|
|
100
104
|
[class^="st-"], [class*=" st-"] { --st-fill: var(--st); --st-ring: var(--lamp-edge); }
|
|
101
|
-
.st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated { --st-fill: transparent; --st-ring: var(--st); }
|
|
105
|
+
.st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-needs_input, .st-waiting { --st-fill: transparent; --st-ring: var(--st); }
|
|
102
106
|
/* verification lanes: flaky passed on a rerun (amber, hollow), known passed with only baseline failures (green, hollow) */
|
|
103
107
|
.st-flaky { --st: var(--lamp-amber); --st-lit: var(--lit-amber); --st-fill: transparent; --st-ring: var(--st); }
|
|
104
108
|
.st-known { --st: var(--lamp-green); --st-lit: var(--lit-green); --st-fill: transparent; --st-ring: var(--st); }
|
|
@@ -566,6 +570,8 @@ summary:hover { color: var(--ink-2); }
|
|
|
566
570
|
ul.plain { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 4px; font-size: var(--t-sm); }
|
|
567
571
|
ul.plain li.current { font-weight: 650; }
|
|
568
572
|
pre.cmd { max-height: none; }
|
|
573
|
+
.waiting-cmd { display: flex; align-items: flex-start; gap: var(--s-2); }
|
|
574
|
+
.waiting-cmd pre { flex: 1; min-width: 0; }
|
|
569
575
|
/* the verification inspector (verifyview.js): live state, failing tests, lanes and their logs */
|
|
570
576
|
.vfy-num { font-variant-numeric: tabular-nums; }
|
|
571
577
|
.vfy-live { margin: var(--s-3) 0 0; padding: var(--s-3); border-radius: var(--r-key); background: var(--module-2); box-shadow: inset 0 0 0 1px var(--rule); }
|
|
@@ -611,6 +617,59 @@ pre.cmd { max-height: none; }
|
|
|
611
617
|
.vfy-note { font-size: var(--t-xs); margin: var(--s-1) 0 0; }
|
|
612
618
|
.vfy-summary, .vfy-endstep, .vfy-mutated { margin: var(--s-3) 0 0; font-size: var(--t-sm); }
|
|
613
619
|
.vfy-lanes + .fields, .vfy-tail + .fields { margin-top: var(--s-4); }
|
|
620
|
+
/* where a task stands and the checks its agents ran (checksview.js) */
|
|
621
|
+
.now-cell { display: inline-flex; align-items: baseline; gap: 6px; max-width: 46ch; min-width: 0; font-size: var(--t-xs); white-space: nowrap; }
|
|
622
|
+
.now-call { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: var(--t-xs); color: var(--ink); }
|
|
623
|
+
.now-cell .now-call { max-width: 30ch; }
|
|
624
|
+
.now-time, .now-until { color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
625
|
+
.now-who, .now-why { color: var(--ink-2); }
|
|
626
|
+
.now-waiting { white-space: normal; flex-wrap: wrap; column-gap: 4px; }
|
|
627
|
+
.now-quiet { font-size: var(--t-xs); }
|
|
628
|
+
.now-live { display: grid; gap: 4px; margin-top: 0; }
|
|
629
|
+
.now-live .vfy-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
|
|
630
|
+
.now-doing .now-call { flex: 0 1 auto; max-width: 100%; white-space: nowrap; }
|
|
631
|
+
.now-role { font-weight: 650; }
|
|
632
|
+
.now-live .vfy-idle { margin: 0; }
|
|
633
|
+
.now-live .vfy-idle[hidden] { display: none; }
|
|
634
|
+
.now-split summary { cursor: pointer; font-size: var(--t-xs); color: var(--muted); }
|
|
635
|
+
.checks-of { margin: 0 0 6px 2px; padding-left: 10px; border-left: 1px solid var(--rule-2); }
|
|
636
|
+
.checks { gap: 2px; margin: 2px 0; }
|
|
637
|
+
/* a check: its lamp, kind and command on one line, what it printed under them */
|
|
638
|
+
.check-head { display: grid; grid-template-columns: 9px auto minmax(0, 1fr); align-items: center; gap: 1px 8px; min-width: 0; }
|
|
639
|
+
.check-head .tag { align-self: center; }
|
|
640
|
+
.check-cmd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-xs); }
|
|
641
|
+
a.check-cmd { color: var(--ink); text-underline-offset: 2px; }
|
|
642
|
+
.check-meta { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 0 8px; color: var(--muted); font-size: var(--t-xs); }
|
|
643
|
+
.check-meta .warn { font-weight: 600; }
|
|
644
|
+
.check-tail { border: 0; padding: 0 0 0 17px; }
|
|
645
|
+
.check-tail summary { cursor: pointer; font-size: var(--t-xs); color: var(--muted); }
|
|
646
|
+
.check-tail pre { margin: 4px 0 0; max-height: 12em; }
|
|
647
|
+
.checks-none { margin: 2px 0 4px; font-size: var(--t-xs); }
|
|
648
|
+
.check-env { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; margin: 4px 0 0; font-size: var(--t-xs); color: var(--ink-2); }
|
|
649
|
+
.check-env-what { color: var(--warn-ink); font-weight: 600; }
|
|
650
|
+
.check-env .mono { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-underline-offset: 2px; }
|
|
651
|
+
.checks-criteria { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--rule); font-size: var(--t-xs); }
|
|
652
|
+
.checks-cov { margin: 0; }
|
|
653
|
+
.checks-missing { gap: 2px; margin: 4px 0 0; font-size: var(--t-xs); }
|
|
654
|
+
.checks-missing code { overflow-wrap: anywhere; }
|
|
655
|
+
.checks-section .checks-of { border: 0; padding: 0; margin: 0; }
|
|
656
|
+
.env-banner { display: flex; align-items: flex-start; gap: var(--s-2) var(--s-3); padding: 6px 10px; border-radius: var(--r-key); background: var(--warn-wash); color: var(--ink); font-size: var(--t-sm); }
|
|
657
|
+
.env-banner > .plate { flex: none; margin-top: 1px; }
|
|
658
|
+
.env-list { flex: 1 1 auto; min-width: 0; gap: 2px; margin: 0; font-size: inherit; }
|
|
659
|
+
.env-head strong { color: var(--warn-ink); font-weight: 650; }
|
|
660
|
+
.env-head a { color: var(--ink); }
|
|
661
|
+
.env-hits { border: 0; padding: 0; font-size: var(--t-xs); }
|
|
662
|
+
.env-hits summary { cursor: pointer; color: var(--ink-2); }
|
|
663
|
+
.env-hits[open] { max-height: 30vh; overflow: auto; }
|
|
664
|
+
.env-hit-list { gap: 6px; margin: 4px 0 2px; font-size: var(--t-xs); }
|
|
665
|
+
.env-line { color: var(--ink-2); overflow-wrap: anywhere; white-space: pre-wrap; }
|
|
666
|
+
/* the finding sweep: a finding's lamp, severity and place on one line, what it says under them */
|
|
667
|
+
.sweep-list { gap: 6px; margin: 4px 0 0; }
|
|
668
|
+
.sweep-head { display: grid; grid-template-columns: 9px auto minmax(0, 1fr); align-items: center; gap: 0 8px; min-width: 0; }
|
|
669
|
+
.sweep-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-xs); }
|
|
670
|
+
.sweep-what { margin: 2px 0 0 17px; font-size: var(--t-sm); color: var(--ink); text-wrap: pretty; }
|
|
671
|
+
.sweep-meta { margin: 0 0 0 17px; font-size: var(--t-xs); color: var(--muted); }
|
|
672
|
+
.sweep-meta a { color: var(--ink-2); text-underline-offset: 2px; }
|
|
614
673
|
.phase-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 6px 0; background: var(--module-2); }
|
|
615
674
|
.phase { min-width: 2px; }
|
|
616
675
|
.phase-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--t-xs); color: var(--muted); }
|
|
@@ -1264,7 +1323,7 @@ dialog.del-dialog::backdrop { background: light-dark(rgb(17 22 19 / .35), rgb(0
|
|
|
1264
1323
|
.del-archive { margin: var(--s-2) 0 0; font-size: var(--t-xs); overflow-wrap: anywhere; }
|
|
1265
1324
|
.del-actions { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-3); }
|
|
1266
1325
|
|
|
1267
|
-
/* ---------- settings (#/settings): registry,
|
|
1326
|
+
/* ---------- settings (#/settings): registry, decision models and the repository's .forge files ---------- */
|
|
1268
1327
|
.settings-view { display: grid; gap: var(--s-4); max-width: 1100px; }
|
|
1269
1328
|
.set-head { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
|
|
1270
1329
|
.set-lede { margin: 0; font-size: var(--t-sm); }
|
|
@@ -1289,7 +1348,7 @@ button.set-switch { gap: 8px; padding: 0 10px 0 4px; }
|
|
|
1289
1348
|
.set-switch-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--key); box-shadow: 0 0 0 1px var(--lamp-edge); transition: translate var(--relay); }
|
|
1290
1349
|
button.set-switch[aria-checked=true] .set-switch-knob { background: var(--lamp-green); }
|
|
1291
1350
|
button.set-switch[aria-checked=true] .set-switch-knob::after { translate: 12px 0; }
|
|
1292
|
-
button.set-switch:focus-visible, .set-editor:focus-visible, .set-picker select:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
|
|
1351
|
+
button.set-switch:focus-visible, .set-editor:focus-visible, .set-picker select:focus-visible, .set-gate select:focus-visible, .set-gate input:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
|
|
1293
1352
|
.set-file { display: grid; gap: var(--s-2); width: 100%; padding: var(--s-3); border: 1px solid var(--rule); border-radius: var(--r-key); background: var(--module-2); }
|
|
1294
1353
|
.set-file > * { margin-block: 0; }
|
|
1295
1354
|
.set-file-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
|
|
@@ -1310,3 +1369,9 @@ button.set-remove:focus-visible { outline: 2px solid var(--lamp-red); outline-of
|
|
|
1310
1369
|
.set-env dt, .set-env dd { margin: 0; overflow-wrap: anywhere; }
|
|
1311
1370
|
.set-env dt { color: var(--ink-2); }
|
|
1312
1371
|
.set-readonly { margin: 0; }
|
|
1372
|
+
.set-banner { display: flex; align-items: flex-start; gap: 7px; width: 100%; padding: 6px var(--s-2); border: 1px solid var(--rule-2); border-radius: var(--r-key); background: var(--warn-wash); color: var(--warn-ink); font-size: var(--t-sm); font-weight: 600; overflow-wrap: anywhere; }
|
|
1373
|
+
.set-budget { max-width: 72ch; font-variant-numeric: tabular-nums; }
|
|
1374
|
+
.set-gates { display: grid; gap: var(--s-3); width: 100%; }
|
|
1375
|
+
.set-gate select { min-width: 9em; max-width: 100%; }
|
|
1376
|
+
.set-gate input[type=text] { width: 14em; max-width: 100%; }
|
|
1377
|
+
.set-gate-skip { font-family: var(--mono); font-size: var(--t-xs); color: var(--warn-ink); }
|