@dadado/agent-kit-cli 6.7.2 → 6.9.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/dashboard/README.md +16 -6
- package/dashboard/dashboard-data.mjs +237 -3
- package/dashboard/dashboard.html +398 -74
- package/dashboard/lib/ship-lane.mjs +690 -0
- package/dashboard/serve.mjs +19 -0
- package/dist/{chunk-5WDFOFL4.js → chunk-3Z4PGEEJ.js} +8 -15
- package/dist/{chunk-R6WH5P7R.js → chunk-CXDAT76O.js} +15 -1
- package/dist/{engine-info-UQNVNOA2.js → engine-info-3MQML5I2.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/run-VOVR5O7S.js +600 -0
- package/dist/{run-plan-P7VTOWYI.js → run-plan-KWGS2SOZ.js} +2 -2
- package/package.json +1 -1
- package/dist/run-QG7XQ3XF.js +0 -335
package/dashboard/dashboard.html
CHANGED
|
@@ -1271,6 +1271,131 @@ body.mc-fullscreen .top-tabs-row {
|
|
|
1271
1271
|
word-break: break-all;
|
|
1272
1272
|
}
|
|
1273
1273
|
|
|
1274
|
+
/* ===== Git e CI/CD bento ===== */
|
|
1275
|
+
/* One section for the former Git and DevOps tabs (ADR 2026-10-23
|
|
1276
|
+
* git-cicd-tab-read-in-mc-act-in-colony point 1): tiles on a 6-column grid
|
|
1277
|
+
* built from the skin tokens; the Ship lane tile leads and spans two rows. */
|
|
1278
|
+
.bento {
|
|
1279
|
+
display: grid;
|
|
1280
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
1281
|
+
grid-auto-flow: row dense;
|
|
1282
|
+
gap: var(--mc-space-xl);
|
|
1283
|
+
}
|
|
1284
|
+
.bento-tile { min-width: 0; }
|
|
1285
|
+
.bento-tile[hidden] { display: none; }
|
|
1286
|
+
.bento-ship { grid-column: span 3; grid-row: span 2; }
|
|
1287
|
+
.bento-flow,
|
|
1288
|
+
.bento-prs,
|
|
1289
|
+
.bento-pipeline,
|
|
1290
|
+
.bento-deploy { grid-column: span 3; }
|
|
1291
|
+
.bento-graph {
|
|
1292
|
+
grid-column: span 6;
|
|
1293
|
+
display: grid;
|
|
1294
|
+
grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
|
|
1295
|
+
column-gap: var(--mc-space-xl);
|
|
1296
|
+
align-items: start;
|
|
1297
|
+
}
|
|
1298
|
+
.bento-pane { min-width: 0; }
|
|
1299
|
+
.bento-pane:empty { display: none; }
|
|
1300
|
+
.bento-files { grid-column: span 6; }
|
|
1301
|
+
@media (min-width: 1600px) {
|
|
1302
|
+
.bento-ship,
|
|
1303
|
+
.bento-flow,
|
|
1304
|
+
.bento-prs,
|
|
1305
|
+
.bento-pipeline,
|
|
1306
|
+
.bento-deploy { grid-column: span 2; }
|
|
1307
|
+
}
|
|
1308
|
+
@media (max-width: 1100px) {
|
|
1309
|
+
.bento-graph { grid-template-columns: minmax(0, 1fr); }
|
|
1310
|
+
}
|
|
1311
|
+
@media (max-width: 900px) {
|
|
1312
|
+
.bento { grid-template-columns: minmax(0, 1fr); }
|
|
1313
|
+
.bento-tile { grid-column: auto; grid-row: auto; }
|
|
1314
|
+
}
|
|
1315
|
+
.ship-lane-summary {
|
|
1316
|
+
font-size: 12px;
|
|
1317
|
+
color: var(--text-secondary);
|
|
1318
|
+
margin: 0 0 8px;
|
|
1319
|
+
}
|
|
1320
|
+
.ship-lane,
|
|
1321
|
+
.ship-prs {
|
|
1322
|
+
list-style: none;
|
|
1323
|
+
display: flex;
|
|
1324
|
+
flex-direction: column;
|
|
1325
|
+
gap: 6px;
|
|
1326
|
+
}
|
|
1327
|
+
.ship-row,
|
|
1328
|
+
.ship-pr {
|
|
1329
|
+
display: flex;
|
|
1330
|
+
flex-wrap: wrap;
|
|
1331
|
+
align-items: center;
|
|
1332
|
+
gap: 4px 10px;
|
|
1333
|
+
font-size: 12px;
|
|
1334
|
+
padding: 8px 10px;
|
|
1335
|
+
border: 1px solid var(--border);
|
|
1336
|
+
border-radius: var(--mc-radius);
|
|
1337
|
+
background: var(--bg-card);
|
|
1338
|
+
}
|
|
1339
|
+
.ship-row.is-red { box-shadow: inset 2px 0 0 var(--red); }
|
|
1340
|
+
.ship-row.is-yellow { box-shadow: inset 2px 0 0 var(--yellow); }
|
|
1341
|
+
.ship-row-label {
|
|
1342
|
+
font-weight: 600;
|
|
1343
|
+
color: var(--text-primary);
|
|
1344
|
+
min-width: 128px;
|
|
1345
|
+
}
|
|
1346
|
+
.ship-row-state {
|
|
1347
|
+
font-size: var(--mc-chrome-meta-size);
|
|
1348
|
+
padding: 1px 8px;
|
|
1349
|
+
border-radius: var(--mc-radius-pill);
|
|
1350
|
+
color: var(--text-muted);
|
|
1351
|
+
background: var(--bg-card-hover);
|
|
1352
|
+
}
|
|
1353
|
+
.ship-row.is-green .ship-row-state { color: var(--green); background: var(--green-bg); }
|
|
1354
|
+
.ship-row.is-yellow .ship-row-state { color: var(--yellow); background: var(--yellow-bg); }
|
|
1355
|
+
.ship-row.is-red .ship-row-state { color: var(--red); background: var(--red-bg); }
|
|
1356
|
+
.ship-row-detail {
|
|
1357
|
+
color: var(--text-secondary);
|
|
1358
|
+
flex: 1 1 180px;
|
|
1359
|
+
min-width: 0;
|
|
1360
|
+
overflow-wrap: anywhere;
|
|
1361
|
+
}
|
|
1362
|
+
.ship-row-next {
|
|
1363
|
+
display: inline-flex;
|
|
1364
|
+
align-items: center;
|
|
1365
|
+
gap: 6px;
|
|
1366
|
+
margin-left: auto;
|
|
1367
|
+
min-width: 0;
|
|
1368
|
+
}
|
|
1369
|
+
.ship-row-next:empty { display: none; }
|
|
1370
|
+
.ship-row-cmd {
|
|
1371
|
+
font-family: var(--mc-font-mono);
|
|
1372
|
+
font-size: var(--mc-chrome-meta-size);
|
|
1373
|
+
color: var(--text-secondary);
|
|
1374
|
+
background: var(--bg-secondary);
|
|
1375
|
+
border: 1px solid var(--border);
|
|
1376
|
+
border-radius: var(--mc-radius-sm);
|
|
1377
|
+
padding: 1px 6px;
|
|
1378
|
+
overflow-wrap: anywhere;
|
|
1379
|
+
}
|
|
1380
|
+
.ship-pr-num {
|
|
1381
|
+
font-family: var(--mc-font-mono);
|
|
1382
|
+
color: var(--text-secondary);
|
|
1383
|
+
}
|
|
1384
|
+
.ship-pr-title {
|
|
1385
|
+
font-weight: 600;
|
|
1386
|
+
color: var(--text-primary);
|
|
1387
|
+
flex: 1 1 160px;
|
|
1388
|
+
min-width: 0;
|
|
1389
|
+
overflow-wrap: anywhere;
|
|
1390
|
+
}
|
|
1391
|
+
.ship-pr .ship-copy { order: 2; }
|
|
1392
|
+
.ship-pr-meta {
|
|
1393
|
+
order: 3;
|
|
1394
|
+
flex-basis: 100%;
|
|
1395
|
+
color: var(--text-secondary);
|
|
1396
|
+
overflow-wrap: anywhere;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1274
1399
|
/* ===== Memory ===== */
|
|
1275
1400
|
.memory-list {
|
|
1276
1401
|
display: flex;
|
|
@@ -3604,6 +3729,13 @@ html[data-monitor-density="comfortable"] .live-activity-feed .monitor-row .monit
|
|
|
3604
3729
|
word-break: break-word;
|
|
3605
3730
|
white-space: pre-wrap;
|
|
3606
3731
|
}
|
|
3732
|
+
.flight-log-card-text code {
|
|
3733
|
+
font-family: var(--mc-font-mono);
|
|
3734
|
+
font-size: 0.92em;
|
|
3735
|
+
}
|
|
3736
|
+
.flight-log-card-text strong {
|
|
3737
|
+
font-weight: 600;
|
|
3738
|
+
}
|
|
3607
3739
|
.flight-log-card-past .flight-log-card-text {
|
|
3608
3740
|
color: var(--text-secondary);
|
|
3609
3741
|
display: -webkit-box;
|
|
@@ -3732,14 +3864,10 @@ html[data-monitor-density="comfortable"] .live-activity-feed .monitor-row .monit
|
|
|
3732
3864
|
Health
|
|
3733
3865
|
<span class="dot dot-green" id="navHealthDot" aria-hidden="true"></span>
|
|
3734
3866
|
</a>
|
|
3735
|
-
<a class="top-tab nav-more-item" role="menuitem" href="#" data-section="git" tabindex="0" onclick="return showSection('git')" aria-label="Git section">
|
|
3736
|
-
Git
|
|
3867
|
+
<a class="top-tab nav-more-item" role="menuitem" href="#" data-section="git" tabindex="0" onclick="return showSection('git')" aria-label="Git e CI/CD section">
|
|
3868
|
+
Git e CI/CD
|
|
3737
3869
|
<span class="dot dot-gray" id="navGitDot" aria-hidden="true"></span>
|
|
3738
3870
|
</a>
|
|
3739
|
-
<a class="top-tab nav-more-item" role="menuitem" href="#" data-section="devops" tabindex="0" onclick="return showSection('devops')" aria-label="DevOps section">
|
|
3740
|
-
DevOps
|
|
3741
|
-
<span class="dot dot-gray" id="navDevopsDot" aria-hidden="true"></span>
|
|
3742
|
-
</a>
|
|
3743
3871
|
<a class="top-tab nav-more-item" role="menuitem" href="#" data-section="memory" tabindex="0" onclick="return showSection('memory')" aria-label="Memory section">
|
|
3744
3872
|
Memory
|
|
3745
3873
|
</a>
|
|
@@ -3898,6 +4026,25 @@ function escapeAttr(value) {
|
|
|
3898
4026
|
return escapeHtml(value);
|
|
3899
4027
|
}
|
|
3900
4028
|
|
|
4029
|
+
/**
|
|
4030
|
+
* HANDOFF prose keeps its inline markdown (`**bold**`, `` `code` ``). Escape first, then turn
|
|
4031
|
+
* only those two marks into <strong> / <code>, so no raw `**` reaches the card and no input
|
|
4032
|
+
* markup survives. Never call on already-escaped text.
|
|
4033
|
+
* @param {unknown} value
|
|
4034
|
+
*/
|
|
4035
|
+
function inlineMarkdownHtml(value) {
|
|
4036
|
+
return escapeHtml(value).replace(/`([^`\n]+)`|\*\*([^*\n]+?)\*\*/g, (_m, code, bold) =>
|
|
4037
|
+
code !== undefined ? `<code>${code}</code>` : `<strong>${bold}</strong>`,
|
|
4038
|
+
);
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
/** Same text without the inline marks (aria-label, title). @param {unknown} value */
|
|
4042
|
+
function stripInlineMarkdown(value) {
|
|
4043
|
+
return String(value ?? '').replace(/`([^`\n]+)`|\*\*([^*\n]+?)\*\*/g, (_m, code, bold) =>
|
|
4044
|
+
code !== undefined ? code : bold,
|
|
4045
|
+
);
|
|
4046
|
+
}
|
|
4047
|
+
|
|
3901
4048
|
function escapeJsString(value) {
|
|
3902
4049
|
return String(value ?? '')
|
|
3903
4050
|
.replace(/\\/g, '\\\\')
|
|
@@ -3919,7 +4066,6 @@ const SECTION_IDS = [
|
|
|
3919
4066
|
'commands',
|
|
3920
4067
|
'health',
|
|
3921
4068
|
'git',
|
|
3922
|
-
'devops',
|
|
3923
4069
|
'memory',
|
|
3924
4070
|
'terminals',
|
|
3925
4071
|
'chats',
|
|
@@ -3927,10 +4073,23 @@ const SECTION_IDS = [
|
|
|
3927
4073
|
'config',
|
|
3928
4074
|
];
|
|
3929
4075
|
|
|
4076
|
+
/**
|
|
4077
|
+
* Retired or alternate section ids that still deep-link. Git and DevOps merged
|
|
4078
|
+
* into one Git e CI/CD section (id `git`; ADR 2026-10-23
|
|
4079
|
+
* git-cicd-tab-read-in-mc-act-in-colony point 1), so `#devops` and
|
|
4080
|
+
* `#git-cicd` land there too.
|
|
4081
|
+
*/
|
|
4082
|
+
const SECTION_ALIASES = Object.freeze({ devops: 'git', 'git-cicd': 'git' });
|
|
4083
|
+
|
|
4084
|
+
/** Canonical section id for a raw id or alias (unknown ids stay as given). */
|
|
4085
|
+
function canonicalSectionId(raw) {
|
|
4086
|
+
return Object.prototype.hasOwnProperty.call(SECTION_ALIASES, raw) ? SECTION_ALIASES[raw] : raw;
|
|
4087
|
+
}
|
|
4088
|
+
|
|
3930
4089
|
/** Read the active section from the URL hash (`#health` -> `health`). */
|
|
3931
4090
|
function sectionFromHash() {
|
|
3932
4091
|
try {
|
|
3933
|
-
const raw = (location.hash || '').replace(/^#\/?/, '').split('/')[0];
|
|
4092
|
+
const raw = canonicalSectionId((location.hash || '').replace(/^#\/?/, '').split('/')[0]);
|
|
3934
4093
|
return SECTION_IDS.includes(raw) ? raw : 'overview';
|
|
3935
4094
|
} catch {
|
|
3936
4095
|
return 'overview';
|
|
@@ -4030,7 +4189,7 @@ function updateHeaderHomeChrome() {
|
|
|
4030
4189
|
}
|
|
4031
4190
|
|
|
4032
4191
|
function showSection(id) {
|
|
4033
|
-
activeSectionId = id || 'overview';
|
|
4192
|
+
activeSectionId = canonicalSectionId(id) || 'overview';
|
|
4034
4193
|
const menuWasOpen = isNavMoreOpen();
|
|
4035
4194
|
closeNavMore({ restoreFocus: menuWasOpen });
|
|
4036
4195
|
|
|
@@ -5374,8 +5533,13 @@ function renderNowModeHint(modeLabel) {
|
|
|
5374
5533
|
}
|
|
5375
5534
|
|
|
5376
5535
|
// ===== Git file helpers (Phase 2) =====
|
|
5536
|
+
/**
|
|
5537
|
+
* POSIX single quotes: nothing inside expands. Double quotes (the previous
|
|
5538
|
+
* form) still ran `$(...)` and backticks from a crafted tracked file name when
|
|
5539
|
+
* the copied diff command was pasted (security pass p4, 2026-10-23).
|
|
5540
|
+
*/
|
|
5377
5541
|
function shellQuotePath(path) {
|
|
5378
|
-
return `
|
|
5542
|
+
return `'${String(path ?? '').replace(/'/g, "'\\''")}'`;
|
|
5379
5543
|
}
|
|
5380
5544
|
|
|
5381
5545
|
function gitFileStatusLabel(f) {
|
|
@@ -5757,6 +5921,176 @@ function renderGitHygieneHint(git) {
|
|
|
5757
5921
|
`;
|
|
5758
5922
|
}
|
|
5759
5923
|
|
|
5924
|
+
// ===== Git e CI/CD: ship lane (snapshot 1.8.0 `shipLane`) =====
|
|
5925
|
+
// ADR 2026-10-23 git-cicd-tab-read-in-mc-act-in-colony: read-only rows that
|
|
5926
|
+
// mirror the /kit-prod Done rows, each with one copy-only next command. Forge
|
|
5927
|
+
// text (PR titles, branch and check names) is untrusted: every value goes
|
|
5928
|
+
// through escapeHtml / escapeAttr, and the copy buttons carry their command in
|
|
5929
|
+
// data-* attributes read by one delegated listener, so this section adds no
|
|
5930
|
+
// inline event handler and no innerHTML sink (CSP readiness, p4).
|
|
5931
|
+
|
|
5932
|
+
/** Ship lane row state -> existing dot tone. */
|
|
5933
|
+
const SHIP_LANE_TONES = Object.freeze({ green: 'green', red: 'red', pending: 'yellow', unknown: 'gray' });
|
|
5934
|
+
const SHIP_LANE_STATE_LABELS = Object.freeze({
|
|
5935
|
+
green: 'Done',
|
|
5936
|
+
red: 'Blocked',
|
|
5937
|
+
pending: 'Pending',
|
|
5938
|
+
unknown: 'Unknown',
|
|
5939
|
+
});
|
|
5940
|
+
|
|
5941
|
+
function shipLaneTone(state) {
|
|
5942
|
+
return Object.prototype.hasOwnProperty.call(SHIP_LANE_TONES, state) ? SHIP_LANE_TONES[state] : 'gray';
|
|
5943
|
+
}
|
|
5944
|
+
|
|
5945
|
+
/** The snapshot names destinations in words; the copy seam takes PASTE_DESTINATIONS keys. */
|
|
5946
|
+
function shipLaneDestination(destination) {
|
|
5947
|
+
return destination === 'terminal' ? 'terminal' : 'chatInput';
|
|
5948
|
+
}
|
|
5949
|
+
|
|
5950
|
+
/** Copy button for one next command (delegated listener below; no inline handler). */
|
|
5951
|
+
function shipLaneCopyButton(next) {
|
|
5952
|
+
if (!next || typeof next.text !== 'string' || !next.text) return '';
|
|
5953
|
+
const dest = shipLaneDestination(next.destination);
|
|
5954
|
+
return `<button type="button" class="git-action-btn ship-copy" data-ship-copy="${escapeAttr(next.text)}" data-ship-dest="${dest}" title="${escapeAttr(copyActionTitle(next.text, dest))}">Copy</button>`;
|
|
5955
|
+
}
|
|
5956
|
+
|
|
5957
|
+
/** Ship lane card: one row per /kit-prod Done row (or the /git-prod subset in a consumer repo). */
|
|
5958
|
+
function renderShipLaneCard(shipLane) {
|
|
5959
|
+
if (!shipLane || !Array.isArray(shipLane.rows)) {
|
|
5960
|
+
return renderEmptyStateCta({
|
|
5961
|
+
headline: 'No ship lane signal',
|
|
5962
|
+
support: 'This snapshot has no shipLane field (Mission Control snapshot 1.8.0 or later). Update the kit engine to see the release rows here.',
|
|
5963
|
+
compact: true,
|
|
5964
|
+
className: 'ship-lane-empty',
|
|
5965
|
+
});
|
|
5966
|
+
}
|
|
5967
|
+
const rows = shipLane.rows;
|
|
5968
|
+
if (!rows.length) {
|
|
5969
|
+
return renderEmptyStateCta({
|
|
5970
|
+
headline: 'No ship lane rows',
|
|
5971
|
+
support: shipLane.note || 'No origin remote or release data for this repository.',
|
|
5972
|
+
compact: true,
|
|
5973
|
+
className: 'ship-lane-empty',
|
|
5974
|
+
});
|
|
5975
|
+
}
|
|
5976
|
+
const counts = { green: 0, red: 0, pending: 0, unknown: 0 };
|
|
5977
|
+
for (const r of rows) {
|
|
5978
|
+
if (Object.prototype.hasOwnProperty.call(counts, r.state)) counts[r.state] += 1;
|
|
5979
|
+
}
|
|
5980
|
+
const summary = [
|
|
5981
|
+
counts.green ? `${counts.green} done` : '',
|
|
5982
|
+
counts.red ? `${counts.red} blocked` : '',
|
|
5983
|
+
counts.pending ? `${counts.pending} pending` : '',
|
|
5984
|
+
counts.unknown ? `${counts.unknown} unknown` : '',
|
|
5985
|
+
].filter(Boolean).join(' · ');
|
|
5986
|
+
const fetched = shipLane.remote?.fetchedAt ? ` · forge read ${fmtDate(shipLane.remote.fetchedAt)}` : '';
|
|
5987
|
+
const items = rows
|
|
5988
|
+
.map((r) => {
|
|
5989
|
+
const tone = shipLaneTone(r.state);
|
|
5990
|
+
const next = r.next && typeof r.next.text === 'string' && r.next.text
|
|
5991
|
+
? `<code class="ship-row-cmd">${escapeHtml(r.next.text)}</code>${shipLaneCopyButton(r.next)}`
|
|
5992
|
+
: '';
|
|
5993
|
+
return `
|
|
5994
|
+
<li class="ship-row is-${tone}">
|
|
5995
|
+
<span class="dot dot-${tone}" aria-hidden="true"></span>
|
|
5996
|
+
<span class="ship-row-label">${escapeHtml(r.label || r.id || '')}</span>
|
|
5997
|
+
<span class="ship-row-state">${escapeHtml(SHIP_LANE_STATE_LABELS[r.state] || 'Unknown')}</span>
|
|
5998
|
+
<span class="ship-row-detail">${escapeHtml(r.detail || '')}</span>
|
|
5999
|
+
<span class="ship-row-next">${next}</span>
|
|
6000
|
+
</li>
|
|
6001
|
+
`;
|
|
6002
|
+
})
|
|
6003
|
+
.join('');
|
|
6004
|
+
const note = shipLane.note ? `<div class="devops-note">${escapeHtml(shipLane.note)}</div>` : '';
|
|
6005
|
+
return `
|
|
6006
|
+
<div class="ship-lane-summary">${escapeHtml(summary)}${escapeHtml(fetched)}</div>
|
|
6007
|
+
${note}
|
|
6008
|
+
<ol class="ship-lane" aria-label="Ship lane rows">${items}</ol>
|
|
6009
|
+
`;
|
|
6010
|
+
}
|
|
6011
|
+
|
|
6012
|
+
/** Tone of one open PR: failing checks or conflicts red, running or behind yellow, clean green. */
|
|
6013
|
+
function shipPrTone(pr) {
|
|
6014
|
+
const checks = pr?.checks || {};
|
|
6015
|
+
if ((checks.failing || []).length || pr?.mergeable === 'conflicting') return 'red';
|
|
6016
|
+
if (checks.pending > 0 || ['behind', 'blocked', 'unstable', 'draft'].includes(pr?.mergeState)) return 'yellow';
|
|
6017
|
+
if (pr?.mergeState === 'clean') return 'green';
|
|
6018
|
+
return 'gray';
|
|
6019
|
+
}
|
|
6020
|
+
|
|
6021
|
+
/** Open PRs card (base, head, stacking, mergeable state, failing checks, signature-scan). */
|
|
6022
|
+
function renderShipLanePrsCard(shipLane) {
|
|
6023
|
+
const remote = shipLane?.remote || null;
|
|
6024
|
+
if (!remote?.available) {
|
|
6025
|
+
return renderEmptyStateCta({
|
|
6026
|
+
headline: 'No pull request signal',
|
|
6027
|
+
support: shipLane?.note || 'Open pull requests are read with gh when the snapshot carries shipLane (1.8.0).',
|
|
6028
|
+
compact: true,
|
|
6029
|
+
className: 'ship-prs-empty',
|
|
6030
|
+
});
|
|
6031
|
+
}
|
|
6032
|
+
const prs = Array.isArray(remote.prs) ? remote.prs : [];
|
|
6033
|
+
if (!prs.length) {
|
|
6034
|
+
return renderEmptyStateCta({
|
|
6035
|
+
headline: 'No open pull requests',
|
|
6036
|
+
support: 'Nothing is waiting for review or merge on the forge.',
|
|
6037
|
+
compact: true,
|
|
6038
|
+
className: 'ship-prs-empty',
|
|
6039
|
+
});
|
|
6040
|
+
}
|
|
6041
|
+
const items = prs
|
|
6042
|
+
.map((pr) => {
|
|
6043
|
+
const tone = shipPrTone(pr);
|
|
6044
|
+
const n = Number(pr.number) || 0;
|
|
6045
|
+
const checks = pr.checks || {};
|
|
6046
|
+
const meta = [
|
|
6047
|
+
String(pr.head || '?') + ' → ' + String(pr.base || '?'),
|
|
6048
|
+
pr.stackedOn ? `stacked on #${Number(pr.stackedOn) || 0}` : '',
|
|
6049
|
+
pr.mergeable === 'conflicting' ? 'conflicts' : (pr.mergeState || ''),
|
|
6050
|
+
(checks.failing || []).length ? `failing: ${checks.failing.join(', ')}` : '',
|
|
6051
|
+
checks.pending ? `${checks.pending} running` : '',
|
|
6052
|
+
checks.signatureScan && checks.signatureScan !== 'missing' ? `signature-scan ${checks.signatureScan}` : '',
|
|
6053
|
+
pr.draft ? 'draft' : '',
|
|
6054
|
+
].filter(Boolean).join(' · ');
|
|
6055
|
+
return `
|
|
6056
|
+
<li class="ship-pr">
|
|
6057
|
+
<span class="dot dot-${tone}" aria-hidden="true"></span>
|
|
6058
|
+
<span class="ship-pr-num">#${n}</span>
|
|
6059
|
+
<span class="ship-pr-title">${escapeHtml(pr.title || '')}</span>
|
|
6060
|
+
<span class="ship-pr-meta">${escapeHtml(meta)}</span>
|
|
6061
|
+
${shipLaneCopyButton({ text: `gh pr checks ${n}`, destination: 'terminal' })}
|
|
6062
|
+
</li>
|
|
6063
|
+
`;
|
|
6064
|
+
})
|
|
6065
|
+
.join('');
|
|
6066
|
+
const total = Number(remote.prsTotal) || prs.length;
|
|
6067
|
+
const more = total > prs.length ? `<div class="devops-note">${escapeHtml(`${total - prs.length} more open, not shown`)}</div>` : '';
|
|
6068
|
+
return `<ul class="ship-prs" aria-label="Unmerged pull requests">${items}</ul>${more}`;
|
|
6069
|
+
}
|
|
6070
|
+
|
|
6071
|
+
/** Nav dot for the merged Git e CI/CD section (see the render call site). */
|
|
6072
|
+
function gitCicdNavTone(d) {
|
|
6073
|
+
const latestRun = (d?.devops?.pipeline?.runs || [])[0] || null;
|
|
6074
|
+
const runFailed = !!latestRun && latestRun.status === 'completed'
|
|
6075
|
+
&& ['failure', 'cancelled', 'timed_out'].includes(latestRun.conclusion);
|
|
6076
|
+
const shipRed = (d?.shipLane?.rows || []).some((r) => r && r.state === 'red');
|
|
6077
|
+
if (runFailed || shipRed) return 'red';
|
|
6078
|
+
const runOpen = !!latestRun && (latestRun.status !== 'completed' || latestRun.conclusion !== 'success');
|
|
6079
|
+
if (d?.git?.dirty || runOpen) return 'yellow';
|
|
6080
|
+
return d?.git?.branch ? 'green' : 'gray';
|
|
6081
|
+
}
|
|
6082
|
+
|
|
6083
|
+
/** One delegated listener for every ship lane copy button (data-only; goes through the copy seam). */
|
|
6084
|
+
document.addEventListener('click', (event) => {
|
|
6085
|
+
const target = event.target;
|
|
6086
|
+
const btn = target && typeof target.closest === 'function' ? target.closest('[data-ship-copy]') : null;
|
|
6087
|
+
if (!btn) return;
|
|
6088
|
+
event.preventDefault();
|
|
6089
|
+
const text = btn.getAttribute('data-ship-copy') || '';
|
|
6090
|
+
if (!text) return;
|
|
6091
|
+
copyForPaste(text, text, btn.getAttribute('data-ship-dest') === 'terminal' ? 'terminal' : 'chatInput');
|
|
6092
|
+
});
|
|
6093
|
+
|
|
5760
6094
|
// ===== Action seam (contract: docs/mission-control-embedding.md) =====
|
|
5761
6095
|
/**
|
|
5762
6096
|
* One action interface, two implementations. Every dashboard action is a typed
|
|
@@ -7514,11 +7848,11 @@ function renderFlightLogCard(entry, idx) {
|
|
|
7514
7848
|
variant === 'current'
|
|
7515
7849
|
? `flight-log-card flight-log-card-current ${kindClass}`
|
|
7516
7850
|
: `flight-log-card flight-log-card-past ${kindClass}`;
|
|
7517
|
-
const aria = `${label}: ${text}`;
|
|
7851
|
+
const aria = `${label}: ${stripInlineMarkdown(text)}`;
|
|
7518
7852
|
return `
|
|
7519
7853
|
<div class="${cardClass}" role="listitem" tabindex="0" data-focus-key="flight-log-${variant}-${idx}" data-flight-log-kind="${escapeAttr(kind)}" aria-label="${escapeAttr(aria)}">
|
|
7520
7854
|
<span class="flight-log-card-label">${escapeHtml(label)}</span>
|
|
7521
|
-
<div class="flight-log-card-text">${
|
|
7855
|
+
<div class="flight-log-card-text">${inlineMarkdownHtml(text)}</div>
|
|
7522
7856
|
<div class="flight-log-card-meta">${metaBits.join(' · ')}</div>
|
|
7523
7857
|
<div class="flight-log-card-actions">
|
|
7524
7858
|
<button type="button" class="status-bar-btn" data-focus-key="flight-log-action-${variant}-${idx}" onclick="${copyActionHandler}" style="font-size:11px;padding:3px 10px" title="${escapeAttr(copyActionTitle('fix prompt', 'chatInput'))}">${escapeHtml(actionLabel)}</button>
|
|
@@ -7557,11 +7891,11 @@ function renderFlightLogWarningCard(warning, idx) {
|
|
|
7557
7891
|
? action.command
|
|
7558
7892
|
: `${kind === 'api_limit' ? 'Resume after this quota pause:' : 'Act on this heads-up:'}\n${text}\n${sourcePath}`;
|
|
7559
7893
|
const copyActionHandler = copyForPasteHandler(actionCommand, actionSubject, 'chatInput');
|
|
7560
|
-
const aria = `${title}: ${text}`;
|
|
7894
|
+
const aria = `${title}: ${stripInlineMarkdown(text)}`;
|
|
7561
7895
|
return `
|
|
7562
7896
|
<div class="flight-log-card flight-log-card-warning" role="listitem" tabindex="0" data-focus-key="flight-log-warning-${idx}" data-warning-kind="${escapeAttr(kind)}" aria-label="${escapeAttr(aria)}">
|
|
7563
7897
|
<span class="flight-log-card-label">${escapeHtml(title)}</span>
|
|
7564
|
-
<div class="flight-log-card-text">${
|
|
7898
|
+
<div class="flight-log-card-text">${inlineMarkdownHtml(text)}</div>
|
|
7565
7899
|
<div class="flight-log-card-meta">${escapeHtml(sourcePath)}</div>
|
|
7566
7900
|
<div class="flight-log-card-actions">
|
|
7567
7901
|
<button type="button" class="status-bar-btn" data-focus-key="flight-log-warning-action-${idx}" onclick="${copyActionHandler}" style="font-size:11px;padding:3px 10px" title="${escapeAttr(copyActionTitle(actionSubject, 'chatInput'))}">${escapeHtml(actionLabel)}</button>
|
|
@@ -7644,12 +7978,12 @@ function renderFlightLogTicketCard(ticket, idx) {
|
|
|
7644
7978
|
);
|
|
7645
7979
|
if (typeof ticket?.url === 'string' && /^https?:\/\//.test(ticket.url)) metaBits.push(escapeHtml(ticket.url));
|
|
7646
7980
|
const triage = typeof ticket?.triage === 'string' && ticket.triage.trim() ? ticket.triage.trim() : '';
|
|
7647
|
-
const aria = `${title} ${stamp}: ${text}`;
|
|
7981
|
+
const aria = `${title} ${stamp}: ${stripInlineMarkdown(text)}`;
|
|
7648
7982
|
const kindClass = flightLogKindClassName('prompt');
|
|
7649
7983
|
return `
|
|
7650
7984
|
<div class="flight-log-card flight-log-card-current flight-log-card-ticket ${kindClass}" role="listitem" tabindex="0" data-focus-key="flight-log-ticket-${idx}" data-flight-log-kind="prompt" data-ticket-stamp="${escapeAttr(stamp)}" aria-label="${escapeAttr(aria)}">
|
|
7651
7985
|
<span class="flight-log-card-label">${escapeHtml(title)} · ${escapeHtml(stamp)}</span>
|
|
7652
|
-
<div class="flight-log-card-text">${
|
|
7986
|
+
<div class="flight-log-card-text">${inlineMarkdownHtml(text)}</div>
|
|
7653
7987
|
<div class="flight-log-card-meta">${metaBits.join(' · ')}</div>
|
|
7654
7988
|
${triage ? `<div class="flight-log-card-code">${escapeHtml(triage)}</div>` : ''}
|
|
7655
7989
|
</div>
|
|
@@ -8320,31 +8654,12 @@ function renderUnsafe() {
|
|
|
8320
8654
|
const healthDot = document.getElementById('navHealthDot');
|
|
8321
8655
|
healthDot.className = `dot dot-${health.status === 'ok' ? 'green' : health.status === 'warning' ? 'yellow' : 'red'}`;
|
|
8322
8656
|
|
|
8323
|
-
// Git nav dot
|
|
8657
|
+
// Git e CI/CD nav dot (Git and DevOps merged): red when the latest pipeline
|
|
8658
|
+
// run failed/cancelled/timed out or a ship lane row is red; yellow when the
|
|
8659
|
+
// tree is dirty or the latest run is in progress / non-success; green on a
|
|
8660
|
+
// clean branch; gray without a Git signal.
|
|
8324
8661
|
const gitDot = document.getElementById('navGitDot');
|
|
8325
|
-
if (
|
|
8326
|
-
gitDot.className = 'dot dot-yellow';
|
|
8327
|
-
} else if (d.git?.branch) {
|
|
8328
|
-
gitDot.className = 'dot dot-green';
|
|
8329
|
-
}
|
|
8330
|
-
|
|
8331
|
-
// DevOps nav dot: state of the most recent pipeline run only (gray = no
|
|
8332
|
-
// signal / gh unavailable, green = latest run succeeded, yellow = latest
|
|
8333
|
-
// run in progress or non-success conclusion other than a hard failure,
|
|
8334
|
-
// red = latest run failed/cancelled/timed out).
|
|
8335
|
-
const devopsDot = document.getElementById('navDevopsDot');
|
|
8336
|
-
const latestRun = (d.devops?.pipeline?.runs || [])[0] || null;
|
|
8337
|
-
if (!latestRun) {
|
|
8338
|
-
devopsDot.className = 'dot dot-gray';
|
|
8339
|
-
} else if (latestRun.status !== 'completed') {
|
|
8340
|
-
devopsDot.className = 'dot dot-yellow';
|
|
8341
|
-
} else if (latestRun.conclusion === 'success') {
|
|
8342
|
-
devopsDot.className = 'dot dot-green';
|
|
8343
|
-
} else if (['failure', 'cancelled', 'timed_out'].includes(latestRun.conclusion)) {
|
|
8344
|
-
devopsDot.className = 'dot dot-red';
|
|
8345
|
-
} else {
|
|
8346
|
-
devopsDot.className = 'dot dot-yellow';
|
|
8347
|
-
}
|
|
8662
|
+
if (gitDot) gitDot.className = `dot dot-${gitCicdNavTone(d)}`;
|
|
8348
8663
|
|
|
8349
8664
|
// Terminals / processes nav items carry count badges only (no decorative dots).
|
|
8350
8665
|
|
|
@@ -8714,11 +9029,20 @@ function renderUnsafe() {
|
|
|
8714
9029
|
`);
|
|
8715
9030
|
|
|
8716
9031
|
// ===== Git =====
|
|
9032
|
+
// Git e CI/CD (ADR 2026-10-23 git-cicd-tab-read-in-mc-act-in-colony): the
|
|
9033
|
+
// former Git and DevOps tabs on one bento grid, led by the Ship lane card.
|
|
9034
|
+
// Read-only and copy-only; `#devops` and `#git-cicd` alias here
|
|
9035
|
+
// (SECTION_ALIASES). DevOps stays distinct from Processes (local ps only):
|
|
9036
|
+
// CI/CD runs + an honestly-scoped deploy-activity proxy, no fabricated
|
|
9037
|
+
// service-health widgets for infra this dashboard does not poll.
|
|
9038
|
+
const devopsPipelineRuns = d.devops?.pipeline?.runs || [];
|
|
9039
|
+
const devopsRunCount = devopsPipelineRuns.length;
|
|
9040
|
+
const gitBranchHidden = d.git?.branch ? '' : ' hidden';
|
|
8717
9041
|
parts.push(`
|
|
8718
9042
|
<div class="content-section" id="section-git">
|
|
8719
9043
|
<div class="section-title">
|
|
8720
|
-
Git
|
|
8721
|
-
<span class="section-subtitle">${escapeHtml(d.git?.branch || '\u2014')}${d.git?.branch ? (d.git?.dirty ? ` · ${d.git.dirtyCount} changed` : ' · clean') : ''}</span>
|
|
9044
|
+
Git e CI/CD
|
|
9045
|
+
<span class="section-subtitle">${escapeHtml(d.git?.branch || '\u2014')}${d.git?.branch ? (d.git?.dirty ? ` · ${d.git.dirtyCount} changed` : ' · clean') : ''} · ${devopsRunCount} pipeline run${devopsRunCount !== 1 ? 's' : ''}</span>
|
|
8722
9046
|
</div>
|
|
8723
9047
|
${!d.git?.branch
|
|
8724
9048
|
? renderEmptyStateCta({
|
|
@@ -8726,39 +9050,39 @@ function renderUnsafe() {
|
|
|
8726
9050
|
support: 'No Git data available.',
|
|
8727
9051
|
})
|
|
8728
9052
|
: ''}
|
|
8729
|
-
<div class="
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
9053
|
+
<div class="bento" aria-label="Git e CI/CD">
|
|
9054
|
+
<section class="card bento-tile bento-ship" aria-label="Ship lane">
|
|
9055
|
+
<div class="git-graph-title">Ship lane</div>
|
|
9056
|
+
${renderShipLaneCard(d.shipLane)}
|
|
9057
|
+
</section>
|
|
9058
|
+
<section class="card bento-tile bento-flow" aria-label="Promotion flow"${gitBranchHidden}>
|
|
9059
|
+
${renderGitHygieneHint(d.git)}
|
|
9060
|
+
<div class="git-graph-title">Promotion flow</div>
|
|
9061
|
+
${renderGitFlowCard(d.git)}
|
|
9062
|
+
<div class="git-info">
|
|
9063
|
+
<div class="git-row">
|
|
9064
|
+
<span class="git-label">Last commit</span>
|
|
9065
|
+
<span class="git-value">${escapeHtml(d.git?.lastCommit || '\u2014')}</span>
|
|
9066
|
+
</div>
|
|
8736
9067
|
</div>
|
|
8737
|
-
</
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
<span class="section-subtitle">${devopsRunCount} pipeline run${devopsRunCount !== 1 ? 's' : ''}</span>
|
|
8756
|
-
</div>
|
|
8757
|
-
<div class="card">
|
|
8758
|
-
<div class="git-graph-title">CI/CD pipeline</div>
|
|
8759
|
-
${renderDevopsPipelineCard(d.devops)}
|
|
8760
|
-
<div class="git-graph-title">Deploy activity</div>
|
|
8761
|
-
${renderDevopsDeployCard(d.devops)}
|
|
9068
|
+
</section>
|
|
9069
|
+
<section class="card bento-tile bento-prs" aria-label="Unmerged pull requests">
|
|
9070
|
+
<div class="git-graph-title">Open pull requests</div>
|
|
9071
|
+
${renderShipLanePrsCard(d.shipLane)}
|
|
9072
|
+
</section>
|
|
9073
|
+
<section class="card bento-tile bento-pipeline" aria-label="CI/CD pipeline">
|
|
9074
|
+
<div class="git-graph-title">CI/CD pipeline</div>
|
|
9075
|
+
${renderDevopsPipelineCard(d.devops)}
|
|
9076
|
+
</section>
|
|
9077
|
+
<section class="card bento-tile bento-deploy" aria-label="Deploy activity">
|
|
9078
|
+
<div class="git-graph-title">Deploy activity</div>
|
|
9079
|
+
${renderDevopsDeployCard(d.devops)}
|
|
9080
|
+
</section>
|
|
9081
|
+
<section class="card bento-tile bento-graph" aria-label="Branch graph"${gitBranchHidden}>
|
|
9082
|
+
<div class="bento-pane">${renderGitGraphCard(d.git)}</div>
|
|
9083
|
+
<div class="bento-pane">${renderGitVisualTree(d.git)}</div>
|
|
9084
|
+
</section>
|
|
9085
|
+
${d.git?.dirty ? `<section class="card bento-tile bento-files" aria-label="Changed files">${renderGitFileList(d.git)}</section>` : ''}
|
|
8762
9086
|
</div>
|
|
8763
9087
|
</div>
|
|
8764
9088
|
`);
|