@dadado/agent-kit-cli 6.23.0 → 6.25.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/README.md +1 -0
- package/dashboard/dashboard-data.mjs +126 -5
- package/dashboard/dashboard.html +45 -4
- package/dashboard/lib/live-refresh.mjs +1 -0
- package/dist/{add-RKZQX6ZK.js → add-OYLOMCM6.js} +14 -6
- package/dist/chunk-2F6NMQOA.js +519 -0
- package/dist/chunk-2QYWMSI5.js +193 -0
- package/dist/{chunk-B3VR5YBQ.js → chunk-2TW7ENWC.js} +12 -11
- package/dist/{chunk-2IP4OO6R.js → chunk-2XLI7XEY.js} +1 -1
- package/dist/chunk-6M6UKECW.js +176 -0
- package/dist/{chunk-UJCATSYO.js → chunk-7Y74KO7U.js} +45 -16
- package/dist/{chunk-DZCLMIAS.js → chunk-AQLBEEPD.js} +236 -2
- package/dist/{chunk-R4DUO5DA.js → chunk-AXQMVQ6O.js} +61 -237
- package/dist/{chunk-7TYA3GMI.js → chunk-C7SV7UP5.js} +7 -4
- package/dist/{chunk-F7YAAKYP.js → chunk-CIV42JGT.js} +7 -5
- package/dist/{chunk-CQHD6UKB.js → chunk-CXE6ASSX.js} +1 -0
- package/dist/{chunk-6BEFGKCU.js → chunk-EO5NGAYV.js} +1 -1
- package/dist/{chunk-MJJBIOSY.js → chunk-G5MQRP6M.js} +31 -13
- package/dist/chunk-GMG7ZH4E.js +357 -0
- package/dist/{chunk-5EBT3V7G.js → chunk-GQSSXDDK.js} +1 -1
- package/dist/{chunk-5LNHRL5E.js → chunk-H7RAFRRZ.js} +41 -245
- package/dist/{chunk-IESSMKOV.js → chunk-HSIHZWFF.js} +4 -4
- package/dist/{chunk-W3ZJVBNY.js → chunk-IFBIO7VT.js} +449 -418
- package/dist/{chunk-V2H57TFD.js → chunk-JG3CNGQM.js} +78 -170
- package/dist/{chunk-KDJ4ML7I.js → chunk-JGG574RK.js} +3 -3
- package/dist/{chunk-SGTTC2JP.js → chunk-KWYF7QNH.js} +1 -1
- package/dist/{chunk-CVZNSRXV.js → chunk-M4UL422I.js} +80 -15
- package/dist/{chunk-AWQ6KRFV.js → chunk-NJ2SUSWX.js} +1 -1
- package/dist/{chunk-DRZFWIBN.js → chunk-PIMGV3E5.js} +1 -1
- package/dist/{chunk-QNISTPPZ.js → chunk-QACMV46U.js} +3 -3
- package/dist/{chunk-5PSV76CQ.js → chunk-QLTGHJB3.js} +25 -6
- package/dist/{chunk-OYFCBYMP.js → chunk-QX55T4UX.js} +13 -1
- package/dist/chunk-SAQ3EE5R.js +138 -0
- package/dist/{chunk-C4LCOOL4.js → chunk-TOSAAQ5A.js} +1 -1
- package/dist/chunk-WKFE3RUC.js +433 -0
- package/dist/{chunk-BGL5DRK2.js → chunk-XGZOU4DS.js} +1 -1
- package/dist/{commands-SAQEEE6V.js → commands-UW2C2ZN4.js} +4 -4
- package/dist/{conflicts-5JOP4GX2.js → conflicts-RING6AHV.js} +6 -6
- package/dist/{contribute-BQKRT5GN.js → contribute-LSY75JZH.js} +5 -4
- package/dist/{countdown-25E5C7AR.js → countdown-SZ2P4XHB.js} +267 -23
- package/dist/{diff-6JSXBVSX.js → diff-NZVBVQSK.js} +13 -5
- package/dist/{doctor-I3MTHS7F.js → doctor-TJSXBVGV.js} +103 -17
- package/dist/{ground-control-IDCXN5FK.js → ground-control-ZJXPUIQN.js} +3 -3
- package/dist/{guard-RJZEEKSL.js → guard-ZO4Z3LLB.js} +47 -9
- package/dist/{handoff-5AGE2D3T.js → handoff-2OZSWGTE.js} +2 -0
- package/dist/{hook-WNA42CXE.js → hook-3VPKNSOO.js} +12 -10
- package/dist/index.js +27 -26
- package/dist/{init-FZ2UFPO7.js → init-UW2BJBO2.js} +21 -15
- package/dist/{install-CTLT3TSI.js → install-RQSI4CHG.js} +18 -15
- package/dist/installs-7TR4H4QH.js +222 -0
- package/dist/{mission-control-CRMCRZUU.js → mission-control-VSU6NT43.js} +1 -1
- package/dist/{queue-JW4VR33H.js → queue-JHYILLMX.js} +9 -9
- package/dist/{run-X2WOONTB.js → run-CQF5RM5X.js} +21 -21
- package/dist/{run-plan-4MOLLIES.js → run-plan-BEOCOJCF.js} +13 -13
- package/dist/{scan-K3T5RQLC.js → scan-7D3RMO34.js} +2 -1
- package/dist/{session-start-MV7A4263.js → session-start-QV7CEFRX.js} +16 -10
- package/dist/{sessions-UPFDWDMB.js → sessions-AWAAO3DU.js} +1 -1
- package/dist/{setup-global-VNADNTQ2.js → setup-global-ST4TT427.js} +8 -7
- package/dist/{status-SXA3OK5E.js → status-HUBPBGUU.js} +13 -10
- package/dist/update-DD5UZPGG.js +31 -0
- package/dist/update-all-YYUTXHGR.js +695 -0
- package/package.json +1 -1
- package/dist/chunk-4MR4QXMF.js +0 -52
- package/dist/chunk-HAFRAXGV.js +0 -17
- package/dist/update-RMAWXMCV.js +0 -304
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ On an interactive TTY, long-running commands (`init`, `install`, `doctor`, `upda
|
|
|
75
75
|
| `agent-kit doctor` | Diagnose repository readiness (`--json` includes an `env` pillar: bin-on-PATH, npm prefix writability, Node version, shell profile) |
|
|
76
76
|
| `agent-kit setup-global` | Self-heal a root-owned npm global prefix (relocate to `~/.npm-global`, fix `PATH`, reinstall) |
|
|
77
77
|
| `agent-kit update` | Re-apply L0/packs/skills from the registry |
|
|
78
|
+
| `agent-kit installs` | List the kit installs recorded on this machine (`scan [--root <dir>]...` to find them, `prune` to drop gone ones) |
|
|
78
79
|
| `agent-kit dashboard` | Start Mission Control for this workspace (browser panel) |
|
|
79
80
|
| `agent-kit mission-control` | ASCII Mission Control TUI (`--once` for one frame) |
|
|
80
81
|
| `agent-kit add <id>` | Install a skill or L1 pack |
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import { execFile, execFileSync } from "node:child_process";
|
|
8
8
|
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
9
|
-
import {
|
|
9
|
+
import { homedir } from "node:os";
|
|
10
|
+
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
10
11
|
import { collectChats } from "./lib/chat-sessions.mjs";
|
|
11
12
|
import { collectGateExitTickets } from "./lib/gate-exit-tickets.mjs";
|
|
12
13
|
import {
|
|
@@ -171,7 +172,7 @@ function redactTerminalOutput(text) {
|
|
|
171
172
|
|
|
172
173
|
const SNAPSHOT = {
|
|
173
174
|
_schema: {
|
|
174
|
-
version: "1.
|
|
175
|
+
version: "1.15.0",
|
|
175
176
|
description: "Mission Control dashboard data model",
|
|
176
177
|
fields: {
|
|
177
178
|
generatedAt: "ISO-8601 timestamp of snapshot generation",
|
|
@@ -205,12 +206,12 @@ const SNAPSHOT = {
|
|
|
205
206
|
"Running process snapshots (node, serve.mjs, git operations) with elapsed time and a generated narration per process",
|
|
206
207
|
skills: "Available skills discovered in .cursor/skills/",
|
|
207
208
|
health:
|
|
208
|
-
"Aggregated health: status ok|warning|degraded|not-initialized (error only on the serve empty-checks path) and the fixed seven checks[] ({id, label, ok, severity: ok|warning|degraded|not-initialized, detail}); ok means severity === ok; not-initialized marks a fresh workspace (no plans, no HANDOFF, no memory entries); Commands, Config and Agents also read a Mission Kit Cursor or Claude Code plugin install (1.13.0)",
|
|
209
|
+
"Aggregated health: status ok|warning|degraded|not-initialized (error only on the serve empty-checks path) and the fixed seven checks[] ({id, label, ok, severity: ok|warning|degraded|not-initialized, detail}); ok means severity === ok; not-initialized marks a fresh workspace (no plans, no HANDOFF, no memory entries); Commands, Config and Agents also read a Mission Kit Cursor or Claude Code plugin install (1.13.0); install ({generatedAt, status ok|warning, checks[] ({id: global-cli|node-manager|home-install|registry-pin, label, ok, severity: ok|warning, detail, fix|null})}|null) is the machine install health that `agent-kit doctor` last wrote to .cursor/context/install-health.json, read-only and outside checks[] and status; null when doctor has not run; broadcast keeps no paths and no fix (1.14.0); updateNotice ({generatedAt, cliVersion, npmLatest|null, cliBehind, installsBehind, oldest {kitVersion, path|null}|null, label, severity: warning, detail, fix|null}|null) is the machine update notice the sessionStart hook last wrote beside ~/.config/agent-kit/installs.json: registered repo/home installs behind the CLI and the CLI behind npm; check-only, null when current or off (CI, AGENT_KIT_NO_UPDATE_CHECK, NO_UPDATE_NOTIFIER, updateCheck.enabled false); broadcast keeps no path and no fix (1.15.0)",
|
|
209
210
|
missionControl: "Normalized now/activity/attention/plans view model (source-backed; bounded)",
|
|
210
211
|
},
|
|
211
212
|
},
|
|
212
213
|
generatedAt: new Date().toISOString(),
|
|
213
|
-
dashboardDataVersion: "1.
|
|
214
|
+
dashboardDataVersion: "1.15.0",
|
|
214
215
|
plans: [],
|
|
215
216
|
system: {
|
|
216
217
|
repoRoot: ROOT,
|
|
@@ -228,7 +229,7 @@ const SNAPSHOT = {
|
|
|
228
229
|
outcomeLedger: emptyOutcomeLedgerSummary(),
|
|
229
230
|
processes: [],
|
|
230
231
|
skills: [],
|
|
231
|
-
health: { status: "ok", checks: [] },
|
|
232
|
+
health: { status: "ok", checks: [], install: null },
|
|
232
233
|
missionControl: null,
|
|
233
234
|
};
|
|
234
235
|
|
|
@@ -1645,6 +1646,126 @@ const checks = [
|
|
|
1645
1646
|
];
|
|
1646
1647
|
|
|
1647
1648
|
SNAPSHOT.health.checks = checks;
|
|
1649
|
+
|
|
1650
|
+
// Install health (c2): written by `agent-kit doctor`, read here fail-open. A
|
|
1651
|
+
// sibling of checks[] so the fixed seven ids and the aggregate stay unchanged.
|
|
1652
|
+
const INSTALL_HEALTH_IDS = new Set(["global-cli", "node-manager", "home-install", "registry-pin"]);
|
|
1653
|
+
function readInstallHealth() {
|
|
1654
|
+
const raw = healthReadJson(join(ROOT, ".cursor", "context", "install-health.json"));
|
|
1655
|
+
if (!raw || typeof raw !== "object" || !Array.isArray(raw.checks)) return null;
|
|
1656
|
+
const items = raw.checks
|
|
1657
|
+
.filter((c) => c && typeof c === "object" && INSTALL_HEALTH_IDS.has(c.id))
|
|
1658
|
+
.map((c) => {
|
|
1659
|
+
const severity = c.severity === "warning" ? "warning" : "ok";
|
|
1660
|
+
const label = truncateStr(typeof c.label === "string" ? c.label : c.id, 80);
|
|
1661
|
+
const rawFix = typeof c.fix === "string" && c.fix ? c.fix : null;
|
|
1662
|
+
// Only a ready-to-run command becomes a terminal copy; a config line (the
|
|
1663
|
+
// mise tool entry) or a template with a placeholder rides in the detail.
|
|
1664
|
+
const fix = rawFix && c.fixKind === "command" ? rawFix : null;
|
|
1665
|
+
const baseDetail = typeof c.detail === "string" ? c.detail : "";
|
|
1666
|
+
const fullDetail =
|
|
1667
|
+
rawFix && !fix
|
|
1668
|
+
? `${baseDetail} (${c.fixKind === "config-line" ? "add" : "fix"}: ${rawFix})`
|
|
1669
|
+
: baseDetail;
|
|
1670
|
+
return {
|
|
1671
|
+
id: c.id,
|
|
1672
|
+
label,
|
|
1673
|
+
ok: severity === "ok",
|
|
1674
|
+
severity,
|
|
1675
|
+
// Paths are home-relative on disk; a broadcast snapshot carries none.
|
|
1676
|
+
detail: HEALTH_BROADCAST
|
|
1677
|
+
? severity === "ok"
|
|
1678
|
+
? "No action needed"
|
|
1679
|
+
: "Needs attention: run agent-kit doctor on this machine"
|
|
1680
|
+
: truncateStr(fullDetail, 800),
|
|
1681
|
+
fix: HEALTH_BROADCAST ? null : fix && truncateStr(fix, 300),
|
|
1682
|
+
};
|
|
1683
|
+
});
|
|
1684
|
+
return {
|
|
1685
|
+
generatedAt: typeof raw.generatedAt === "string" ? raw.generatedAt : null,
|
|
1686
|
+
status: items.some((c) => c.severity === "warning") ? "warning" : "ok",
|
|
1687
|
+
checks: items,
|
|
1688
|
+
};
|
|
1689
|
+
}
|
|
1690
|
+
SNAPSHOT.health.install = readInstallHealth();
|
|
1691
|
+
|
|
1692
|
+
// Update notice (c4): `agent-kit hook session-start` writes the computed notice
|
|
1693
|
+
// into the machine cache beside installs.json; read here fail-open, never
|
|
1694
|
+
// computed (no semver or install-kind logic in the dashboard). Same gates as the
|
|
1695
|
+
// CLI: off under CI, the env opt-out and `updateCheck.enabled: false`.
|
|
1696
|
+
function updateNoticeFile(env) {
|
|
1697
|
+
const override =
|
|
1698
|
+
typeof env.AGENT_KIT_INSTALLS_FILE === "string" ? env.AGENT_KIT_INSTALLS_FILE.trim() : "";
|
|
1699
|
+
if (override) return join(dirname(resolve(override)), "update-notice.json");
|
|
1700
|
+
const xdg = typeof env.XDG_CONFIG_HOME === "string" ? env.XDG_CONFIG_HOME.trim() : "";
|
|
1701
|
+
const configDir = xdg && isAbsolute(xdg) ? xdg : join(homedir(), ".config");
|
|
1702
|
+
return join(configDir, "agent-kit", "update-notice.json");
|
|
1703
|
+
}
|
|
1704
|
+
function envFlagOn(value) {
|
|
1705
|
+
if (typeof value !== "string") return false;
|
|
1706
|
+
const v = value.trim().toLowerCase();
|
|
1707
|
+
return v !== "" && v !== "0" && v !== "false";
|
|
1708
|
+
}
|
|
1709
|
+
function readUpdateNotice() {
|
|
1710
|
+
const env = process.env;
|
|
1711
|
+
if (
|
|
1712
|
+
envFlagOn(env.CI) ||
|
|
1713
|
+
envFlagOn(env.AGENT_KIT_NO_UPDATE_CHECK) ||
|
|
1714
|
+
envFlagOn(env.NO_UPDATE_NOTIFIER)
|
|
1715
|
+
) {
|
|
1716
|
+
return null;
|
|
1717
|
+
}
|
|
1718
|
+
const cfg = healthReadJson(join(ROOT, ".cursor", "context", "config.json"));
|
|
1719
|
+
if (cfg && typeof cfg === "object" && cfg.updateCheck && cfg.updateCheck.enabled === false)
|
|
1720
|
+
return null;
|
|
1721
|
+
const raw = healthReadJson(updateNoticeFile(env));
|
|
1722
|
+
const n = raw && typeof raw === "object" ? raw.notice : null;
|
|
1723
|
+
if (!n || typeof n !== "object" || typeof n.line !== "string" || !n.line) return null;
|
|
1724
|
+
const count = Number.isInteger(n.installsBehind) && n.installsBehind > 0 ? n.installsBehind : 0;
|
|
1725
|
+
const cliBehind = n.cliBehind === true;
|
|
1726
|
+
if (!count && !cliBehind) return null;
|
|
1727
|
+
const cliVersion = typeof n.cliVersion === "string" ? truncateStr(n.cliVersion, 32) : null;
|
|
1728
|
+
const npmVersion =
|
|
1729
|
+
n.npmLatest && typeof n.npmLatest.version === "string"
|
|
1730
|
+
? truncateStr(n.npmLatest.version, 32)
|
|
1731
|
+
: null;
|
|
1732
|
+
const oldest =
|
|
1733
|
+
count && n.oldest && typeof n.oldest === "object" && typeof n.oldest.kitVersion === "string"
|
|
1734
|
+
? {
|
|
1735
|
+
kitVersion: truncateStr(n.oldest.kitVersion, 32),
|
|
1736
|
+
// Home-relative on disk; a broadcast snapshot carries no path.
|
|
1737
|
+
path:
|
|
1738
|
+
HEALTH_BROADCAST || typeof n.oldest.path !== "string"
|
|
1739
|
+
? null
|
|
1740
|
+
: truncateStr(n.oldest.path, 300),
|
|
1741
|
+
}
|
|
1742
|
+
: null;
|
|
1743
|
+
const parts = [];
|
|
1744
|
+
if (cliBehind && npmVersion) parts.push(`CLI ${cliVersion} is behind npm ${npmVersion}`);
|
|
1745
|
+
if (count) {
|
|
1746
|
+
const where = oldest?.path ? ` at ${oldest.path}` : "";
|
|
1747
|
+
parts.push(
|
|
1748
|
+
`${count} ${count === 1 ? "install" : "installs"} behind CLI ${cliVersion}${oldest ? `, oldest v${oldest.kitVersion}${where}` : ""}`,
|
|
1749
|
+
);
|
|
1750
|
+
}
|
|
1751
|
+
const cliCommand =
|
|
1752
|
+
typeof n.cliCommand === "string" && n.cliCommand ? truncateStr(n.cliCommand, 200) : null;
|
|
1753
|
+
// The CLI first: `update --all` stamps the CLI version, so an old CLI cannot reach npm latest.
|
|
1754
|
+
const fix = cliBehind && cliCommand ? cliCommand : count ? "agent-kit update --all" : null;
|
|
1755
|
+
return {
|
|
1756
|
+
generatedAt: typeof n.generatedAt === "string" ? n.generatedAt : null,
|
|
1757
|
+
cliVersion,
|
|
1758
|
+
npmLatest: npmVersion,
|
|
1759
|
+
cliBehind,
|
|
1760
|
+
installsBehind: count,
|
|
1761
|
+
oldest,
|
|
1762
|
+
label: count ? `${count} ${count === 1 ? "install" : "installs"} behind` : "CLI behind npm",
|
|
1763
|
+
severity: "warning",
|
|
1764
|
+
detail: `${parts.join("; ")}. Check-only: nothing is applied.`,
|
|
1765
|
+
fix: HEALTH_BROADCAST ? null : fix,
|
|
1766
|
+
};
|
|
1767
|
+
}
|
|
1768
|
+
SNAPSHOT.health.updateNotice = readUpdateNotice();
|
|
1648
1769
|
SNAPSHOT.health.status = checks.some((c) => c.severity === "degraded")
|
|
1649
1770
|
? "degraded"
|
|
1650
1771
|
: workspaceFresh
|
package/dashboard/dashboard.html
CHANGED
|
@@ -6409,7 +6409,8 @@ function renderConfigSection(d) {
|
|
|
6409
6409
|
? frc.tickThreshold
|
|
6410
6410
|
: 3;
|
|
6411
6411
|
const uc = cfg.updateCheck || {};
|
|
6412
|
-
|
|
6412
|
+
// On by default (check-only); only an explicit false turns it off.
|
|
6413
|
+
const updateCheckEnabled = uc.enabled !== false;
|
|
6413
6414
|
const updateCheckInterval =
|
|
6414
6415
|
typeof uc.intervalDays === 'number' && Number.isFinite(uc.intervalDays) ? uc.intervalDays : 7;
|
|
6415
6416
|
const modeRows = CONFIG_PERSONA_MODES.map((mode) => {
|
|
@@ -6463,7 +6464,7 @@ function renderConfigSection(d) {
|
|
|
6463
6464
|
<button type="button" class="btn-config-copy" data-focus-key="config-copy-dogfood" onclick="return copyStaticConfigSnippet('dogfood')" title="Copy-only; never writable via this tab">Copy dogfood.factoryRoot snippet</button>
|
|
6464
6465
|
</fieldset>
|
|
6465
6466
|
<fieldset class="config-fieldset">
|
|
6466
|
-
<legend>Update check (
|
|
6467
|
+
<legend>Update check (on by default, notify only)</legend>
|
|
6467
6468
|
<div class="config-row config-row-inline">
|
|
6468
6469
|
<input type="checkbox" id="config-updateCheck-enabled" name="updateCheckEnabled" ${updateCheckEnabled ? 'checked' : ''} data-focus-key="config-updateCheck-enabled" />
|
|
6469
6470
|
<label for="config-updateCheck-enabled">Advise when a newer public release is available</label>
|
|
@@ -6746,6 +6747,42 @@ const HEALTH_CHECK_META = {
|
|
|
6746
6747
|
},
|
|
6747
6748
|
};
|
|
6748
6749
|
|
|
6750
|
+
/**
|
|
6751
|
+
* Machine install health (`health.install`, written by `agent-kit doctor`):
|
|
6752
|
+
* a separate group outside the fixed seven checks and the aggregate status.
|
|
6753
|
+
* Absent until doctor has run on this workspace.
|
|
6754
|
+
*/
|
|
6755
|
+
/**
|
|
6756
|
+
* Machine update notice (`health.updateNotice`): one card with the count of
|
|
6757
|
+
* registered installs behind the CLI and the oldest one, or the CLI behind
|
|
6758
|
+
* npm. Null when everything is current or the check is off.
|
|
6759
|
+
*/
|
|
6760
|
+
function renderUpdateNoticeGroup(notice, renderCard) {
|
|
6761
|
+
if (!notice || typeof notice !== 'object' || !notice.label) return '';
|
|
6762
|
+
return `
|
|
6763
|
+
<section class="health-group" aria-label="Updates">
|
|
6764
|
+
<div class="health-group-title">Updates (check-only, at most daily)</div>
|
|
6765
|
+
<div class="health-grid" role="list">
|
|
6766
|
+
${renderCard({ id: 'update-notice', label: notice.label, ok: false, severity: 'warning', detail: notice.detail, fix: notice.fix })}
|
|
6767
|
+
</div>
|
|
6768
|
+
</section>`;
|
|
6769
|
+
}
|
|
6770
|
+
|
|
6771
|
+
function renderInstallHealthGroup(install, renderCard) {
|
|
6772
|
+
const items = install && Array.isArray(install.checks) ? install.checks : [];
|
|
6773
|
+
if (items.length === 0) return '';
|
|
6774
|
+
const title = install.generatedAt
|
|
6775
|
+
? `Install (agent-kit doctor, ${install.generatedAt.slice(0, 10)})`
|
|
6776
|
+
: 'Install (agent-kit doctor)';
|
|
6777
|
+
return `
|
|
6778
|
+
<section class="health-group" aria-label="Install">
|
|
6779
|
+
<div class="health-group-title">${escapeHtml(title)}</div>
|
|
6780
|
+
<div class="health-grid" role="list">
|
|
6781
|
+
${items.map(renderCard).join('')}
|
|
6782
|
+
</div>
|
|
6783
|
+
</section>`;
|
|
6784
|
+
}
|
|
6785
|
+
|
|
6749
6786
|
/** Vitals grouping: checks grouped into vital systems for the diagnosis dashboard. */
|
|
6750
6787
|
const HEALTH_VITAL_GROUPS = [
|
|
6751
6788
|
{ label: 'Planning spine', checks: ['plans', 'handoff'] },
|
|
@@ -9507,9 +9544,13 @@ function renderUnsafe() {
|
|
|
9507
9544
|
const sev = healthCheckSeverity(c, healthStatus);
|
|
9508
9545
|
const notStarted = sev === 'not-initialized';
|
|
9509
9546
|
const detail = (typeof c.detail === 'string' && c.detail) || (c.ok ? meta.okDetail : meta.failDetail);
|
|
9547
|
+
// Install checks (health.install) carry their own terminal fix line.
|
|
9548
|
+
const ownFix = typeof c.fix === 'string' && c.fix
|
|
9549
|
+
? { text: c.fix, subject: c.fix, destination: 'terminal', label: 'Copy fix' }
|
|
9550
|
+
: null;
|
|
9510
9551
|
const autofix = c.ok || notStarted
|
|
9511
9552
|
? null
|
|
9512
|
-
: (meta.autofixBySeverity && meta.autofixBySeverity[sev]) || meta.autofix || null;
|
|
9553
|
+
: ownFix || (meta.autofixBySeverity && meta.autofixBySeverity[sev]) || meta.autofix || null;
|
|
9513
9554
|
const fixPrompt = [`Fix this failing health check: ${c.label || id}`, detail].join('\n');
|
|
9514
9555
|
const fixBtn = `<button type="button" class="health-autofix-btn" data-focus-key="health-fix-${escapeAttr(id)}" onclick="event.stopPropagation();${copyForPasteHandler(fixPrompt, 'fix prompt', 'chatInput')}" title="${escapeAttr(copyActionTitle('fix prompt', 'chatInput'))}">Copy fix prompt</button>`;
|
|
9515
9556
|
const autofixBtn = autofix
|
|
@@ -9581,7 +9622,7 @@ function renderUnsafe() {
|
|
|
9581
9622
|
<div class="health-grid" role="list">
|
|
9582
9623
|
${g.items.map(renderCheckCard).join('')}
|
|
9583
9624
|
</div>
|
|
9584
|
-
</section>`).join('')}`;
|
|
9625
|
+
</section>`).join('')}${renderUpdateNoticeGroup(health.updateNotice, renderCheckCard)}${renderInstallHealthGroup(health.install, renderCheckCard)}`;
|
|
9585
9626
|
}
|
|
9586
9627
|
|
|
9587
9628
|
parts.push(`
|
|
@@ -35,6 +35,7 @@ export const SNAPSHOT_REPO_SOURCE_RELS = Object.freeze([
|
|
|
35
35
|
".cursor/context/config.json",
|
|
36
36
|
".cursor/context/current",
|
|
37
37
|
".cursor/context/readiness.json",
|
|
38
|
+
".cursor/context/install-health.json",
|
|
38
39
|
".cursor/context/field-report-dismissals.json",
|
|
39
40
|
".cursor/context/field-report-plan-verdicts.json",
|
|
40
41
|
".cursor/context/mission-timing.json",
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
REGISTRY_CLI_ARGS,
|
|
7
7
|
resolveRegistryFromCli
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PIMGV3E5.js";
|
|
9
9
|
import {
|
|
10
10
|
logger
|
|
11
11
|
} from "./chunk-ZB43YMHW.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
13
|
+
UnknownPackError,
|
|
14
14
|
allSkills,
|
|
15
15
|
buildManifest,
|
|
16
16
|
findPack,
|
|
@@ -19,11 +19,13 @@ import {
|
|
|
19
19
|
installSkill,
|
|
20
20
|
loadAgentKitManifest,
|
|
21
21
|
loadRegistry,
|
|
22
|
+
resolvePackSummary,
|
|
22
23
|
resolveProtectedGlobs,
|
|
23
24
|
saveManifest,
|
|
24
25
|
upsertIdList
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-JG3CNGQM.js";
|
|
27
|
+
import "./chunk-QX55T4UX.js";
|
|
28
|
+
import "./chunk-6M6UKECW.js";
|
|
27
29
|
import {
|
|
28
30
|
KIT_VERSION
|
|
29
31
|
} from "./chunk-7HDQEK6T.js";
|
|
@@ -76,7 +78,7 @@ var addCommand = defineCommand({
|
|
|
76
78
|
const protectedGlobs = resolveProtectedGlobs(existing);
|
|
77
79
|
const index = await loadRegistry(registry.root);
|
|
78
80
|
const asSkill = allSkills(index).find((s) => s.id === args.id);
|
|
79
|
-
const asPack =
|
|
81
|
+
const asPack = resolvePackSummary(index, args.id);
|
|
80
82
|
const base = existing ? { ...existing } : buildManifest({
|
|
81
83
|
version: KIT_VERSION,
|
|
82
84
|
profile: "default",
|
|
@@ -111,7 +113,13 @@ var addCommand = defineCommand({
|
|
|
111
113
|
return;
|
|
112
114
|
}
|
|
113
115
|
if (args.pack) {
|
|
114
|
-
const pack = await findPack(registry.root, args.id)
|
|
116
|
+
const pack = await findPack(registry.root, args.id).catch((err) => {
|
|
117
|
+
if (!(err instanceof UnknownPackError)) throw err;
|
|
118
|
+
logger.error(err.message);
|
|
119
|
+
process.exitCode = 1;
|
|
120
|
+
return null;
|
|
121
|
+
});
|
|
122
|
+
if (!pack) return;
|
|
115
123
|
const stats = await installPack(registry.root, args.cwd, pack.id, { protectedGlobs });
|
|
116
124
|
logApplyStats(stats);
|
|
117
125
|
if (skipped(stats)) return;
|