@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/dist/chunk-4MR4QXMF.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
L0_ARTIFACTS
|
|
3
|
-
} from "./chunk-CGXLR77R.js";
|
|
4
|
-
import {
|
|
5
|
-
allSkills,
|
|
6
|
-
loadPackManifest,
|
|
7
|
-
loadRegistry,
|
|
8
|
-
packMemberFileTargets,
|
|
9
|
-
skillFileTargets
|
|
10
|
-
} from "./chunk-V2H57TFD.js";
|
|
11
|
-
|
|
12
|
-
// src/lifecycle/targets.ts
|
|
13
|
-
import path from "path";
|
|
14
|
-
var toPosix = (rel) => rel.split(path.sep).join("/");
|
|
15
|
-
async function managedPairs(registryRoot, manifest, index) {
|
|
16
|
-
const pairs = [];
|
|
17
|
-
const missingSkills = [];
|
|
18
|
-
const push = (sourceRel, targetRel, origin) => {
|
|
19
|
-
pairs.push({ sourceRel: toPosix(sourceRel), targetRel: toPosix(targetRel), origin });
|
|
20
|
-
};
|
|
21
|
-
for (const a of L0_ARTIFACTS) push(a.source, a.target, "l0");
|
|
22
|
-
for (const packId of manifest.packs ?? []) {
|
|
23
|
-
const pack = await loadPackManifest(registryRoot, packId);
|
|
24
|
-
for (const member of pack.members) {
|
|
25
|
-
for (const { sourceRel, targetRel } of await packMemberFileTargets(registryRoot, member)) {
|
|
26
|
-
push(sourceRel, targetRel, "pack");
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
if ((manifest.skills ?? []).length > 0) {
|
|
31
|
-
const pool = allSkills(index ?? await loadRegistry(registryRoot));
|
|
32
|
-
for (const id of manifest.skills ?? []) {
|
|
33
|
-
const skill = pool.find((s) => s.id === id);
|
|
34
|
-
if (!skill) {
|
|
35
|
-
missingSkills.push(id);
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
for (const { sourceRel, targetRel } of await skillFileTargets(
|
|
39
|
-
registryRoot,
|
|
40
|
-
skill.path,
|
|
41
|
-
skill.id
|
|
42
|
-
)) {
|
|
43
|
-
push(sourceRel, targetRel, "skill");
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return { pairs, missingSkills };
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export {
|
|
51
|
-
managedPairs
|
|
52
|
-
};
|
package/dist/chunk-HAFRAXGV.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
writeJson
|
|
3
|
-
} from "./chunk-5B4DVO6C.js";
|
|
4
|
-
|
|
5
|
-
// src/scanner/snapshot.ts
|
|
6
|
-
import path from "path";
|
|
7
|
-
var READINESS_SNAPSHOT_RELATIVE_PATH = ".cursor/context/readiness.json";
|
|
8
|
-
async function writeReadinessSnapshot(rootDir, report) {
|
|
9
|
-
const snapshotPath = path.join(rootDir, READINESS_SNAPSHOT_RELATIVE_PATH);
|
|
10
|
-
await writeJson(snapshotPath, report);
|
|
11
|
-
return snapshotPath;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
READINESS_SNAPSHOT_RELATIVE_PATH,
|
|
16
|
-
writeReadinessSnapshot
|
|
17
|
-
};
|
package/dist/update-RMAWXMCV.js
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatQueueLeaseRefusal,
|
|
3
|
-
inspectQueueLease
|
|
4
|
-
} from "./chunk-MFKHIWEL.js";
|
|
5
|
-
import {
|
|
6
|
-
NON_INTERACTIVE_ROOT_ARGS,
|
|
7
|
-
detectStaleCli,
|
|
8
|
-
formatRerunFlags,
|
|
9
|
-
formatStaleCliRefusal,
|
|
10
|
-
syncFromManifest
|
|
11
|
-
} from "./chunk-5PSV76CQ.js";
|
|
12
|
-
import {
|
|
13
|
-
formatSkippedSymlinks,
|
|
14
|
-
logApplyStats
|
|
15
|
-
} from "./chunk-HS7LVVLO.js";
|
|
16
|
-
import {
|
|
17
|
-
REGISTRY_CLI_ARGS,
|
|
18
|
-
resolveRegistryFromCli
|
|
19
|
-
} from "./chunk-DRZFWIBN.js";
|
|
20
|
-
import {
|
|
21
|
-
CLAUDE_SETTINGS_REL,
|
|
22
|
-
formatClaudeSettingsDrift,
|
|
23
|
-
formatPermissionsChanged,
|
|
24
|
-
planClaudeSettingsDrift,
|
|
25
|
-
writeClaudeSessionStartHook
|
|
26
|
-
} from "./chunk-AWQ6KRFV.js";
|
|
27
|
-
import {
|
|
28
|
-
generateClaudeCommandAdapters
|
|
29
|
-
} from "./chunk-6BEFGKCU.js";
|
|
30
|
-
import "./chunk-Q35TWISF.js";
|
|
31
|
-
import {
|
|
32
|
-
withCliProgress
|
|
33
|
-
} from "./chunk-QTON2GQX.js";
|
|
34
|
-
import {
|
|
35
|
-
logger
|
|
36
|
-
} from "./chunk-ZB43YMHW.js";
|
|
37
|
-
import {
|
|
38
|
-
RootRefusedError,
|
|
39
|
-
confirmProjectRoot,
|
|
40
|
-
isNonInteractive,
|
|
41
|
-
syncPathCliToRuntime
|
|
42
|
-
} from "./chunk-KDJ4ML7I.js";
|
|
43
|
-
import "./chunk-B3VR5YBQ.js";
|
|
44
|
-
import {
|
|
45
|
-
checkForUpdates
|
|
46
|
-
} from "./chunk-CVZNSRXV.js";
|
|
47
|
-
import "./chunk-PFEUZXVT.js";
|
|
48
|
-
import "./chunk-7TYA3GMI.js";
|
|
49
|
-
import "./chunk-4MR4QXMF.js";
|
|
50
|
-
import "./chunk-CGXLR77R.js";
|
|
51
|
-
import {
|
|
52
|
-
buildManifest,
|
|
53
|
-
isProtectedPath,
|
|
54
|
-
loadAgentKitManifest,
|
|
55
|
-
resolveProtectedGlobs,
|
|
56
|
-
saveManifest
|
|
57
|
-
} from "./chunk-V2H57TFD.js";
|
|
58
|
-
import {
|
|
59
|
-
seedManagedHashLedger
|
|
60
|
-
} from "./chunk-OYFCBYMP.js";
|
|
61
|
-
import {
|
|
62
|
-
KIT_VERSION
|
|
63
|
-
} from "./chunk-7HDQEK6T.js";
|
|
64
|
-
import "./chunk-C4Q77GGJ.js";
|
|
65
|
-
import "./chunk-5B4DVO6C.js";
|
|
66
|
-
|
|
67
|
-
// src/commands/update.ts
|
|
68
|
-
import { defineCommand } from "citty";
|
|
69
|
-
var UPDATE_RERUN_FLAGS = [
|
|
70
|
-
"claude",
|
|
71
|
-
"yes",
|
|
72
|
-
"force-root",
|
|
73
|
-
"force",
|
|
74
|
-
"seed-overlay",
|
|
75
|
-
"cwd",
|
|
76
|
-
"registry",
|
|
77
|
-
"url",
|
|
78
|
-
"ref",
|
|
79
|
-
"refresh"
|
|
80
|
-
];
|
|
81
|
-
var updateCommand = defineCommand({
|
|
82
|
-
meta: {
|
|
83
|
-
name: "update",
|
|
84
|
-
description: "Re-apply L0/packs/skills from the registry (never overwrites L3). --check = notify-only."
|
|
85
|
-
},
|
|
86
|
-
args: {
|
|
87
|
-
cwd: {
|
|
88
|
-
type: "string",
|
|
89
|
-
default: process.cwd()
|
|
90
|
-
},
|
|
91
|
-
check: {
|
|
92
|
-
type: "boolean",
|
|
93
|
-
description: "Check-only: compare installed version to the resolved registry (public tags, or --registry local checkout); never apply L0 writes",
|
|
94
|
-
default: false
|
|
95
|
-
},
|
|
96
|
-
json: {
|
|
97
|
-
type: "boolean",
|
|
98
|
-
description: "Print machine-readable JSON (with --check)",
|
|
99
|
-
default: false
|
|
100
|
-
},
|
|
101
|
-
"respect-prefs": {
|
|
102
|
-
type: "boolean",
|
|
103
|
-
description: "Honor updateCheck.enabled and intervalDays from .cursor/context/config.json (hooks)",
|
|
104
|
-
default: false
|
|
105
|
-
},
|
|
106
|
-
stamp: {
|
|
107
|
-
type: "boolean",
|
|
108
|
-
description: "Persist updateCheck.lastCheckedAt after a network check",
|
|
109
|
-
default: false
|
|
110
|
-
},
|
|
111
|
-
"seed-overlay": {
|
|
112
|
-
type: "boolean",
|
|
113
|
-
description: "Seed the managed-hash ledger from current local overlay files before applying (factory/dogfood only; consumers should not use this)",
|
|
114
|
-
default: false
|
|
115
|
-
},
|
|
116
|
-
"allow-stale-cli": {
|
|
117
|
-
type: "boolean",
|
|
118
|
-
description: "Apply even when this CLI is older than the registry it is syncing from; the manifest is then stamped with this CLI's version, not the registry's (factory/dev only)",
|
|
119
|
-
default: false
|
|
120
|
-
},
|
|
121
|
-
force: {
|
|
122
|
-
type: "boolean",
|
|
123
|
-
description: "Apply even while another live writer holds the queue lease (.cursor/context/run-plan-all.lock); an operator choice, never a default",
|
|
124
|
-
default: false
|
|
125
|
-
},
|
|
126
|
-
claude: {
|
|
127
|
-
type: "boolean",
|
|
128
|
-
description: "Also apply the ledger-aware Claude settings merge (.claude/settings.json + ledger) and generate the .claude/commands/* pointer adapters with install --claude authority; operator opt-in, never from hooks or plan-loop",
|
|
129
|
-
default: false
|
|
130
|
-
},
|
|
131
|
-
...NON_INTERACTIVE_ROOT_ARGS,
|
|
132
|
-
...REGISTRY_CLI_ARGS
|
|
133
|
-
},
|
|
134
|
-
async run({ args }) {
|
|
135
|
-
if (args.check) {
|
|
136
|
-
const result = await checkForUpdates(args.cwd, {
|
|
137
|
-
respectPrefs: Boolean(args["respect-prefs"]),
|
|
138
|
-
stamp: Boolean(args.stamp),
|
|
139
|
-
publicRegistryUrl: typeof args.url === "string" && args.url ? args.url : void 0,
|
|
140
|
-
registryPath: typeof args.registry === "string" && args.registry ? args.registry : void 0
|
|
141
|
-
});
|
|
142
|
-
if (args.json) {
|
|
143
|
-
console.log(JSON.stringify(result, null, 2));
|
|
144
|
-
} else {
|
|
145
|
-
const line = `[${result.status}] ${result.message}`;
|
|
146
|
-
if (result.status === "error") logger.error(line);
|
|
147
|
-
else if (result.status === "update-available") logger.warn(line);
|
|
148
|
-
else if (result.status.startsWith("skipped-")) logger.warn(line);
|
|
149
|
-
else logger.info(line);
|
|
150
|
-
}
|
|
151
|
-
if (result.status === "error") process.exitCode = 2;
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
const nonInteractive = args.yes || isNonInteractive();
|
|
155
|
-
let projectRoot;
|
|
156
|
-
try {
|
|
157
|
-
projectRoot = await confirmProjectRoot(args.cwd, {
|
|
158
|
-
nonInteractive,
|
|
159
|
-
command: "update",
|
|
160
|
-
forceRoot: args["force-root"]
|
|
161
|
-
});
|
|
162
|
-
} catch (err) {
|
|
163
|
-
if (err instanceof RootRefusedError) {
|
|
164
|
-
logger.error(err.message);
|
|
165
|
-
if (err.recovery) console.error(`
|
|
166
|
-
${err.recovery}
|
|
167
|
-
`);
|
|
168
|
-
process.exitCode = 1;
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
throw err;
|
|
172
|
-
}
|
|
173
|
-
const existing = await loadAgentKitManifest(projectRoot, { onWarning: logger.warn });
|
|
174
|
-
if (!existing) {
|
|
175
|
-
logger.warn("No .cursor/agent-kit.json \u2014 run agent-kit install first.");
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
const lease = inspectQueueLease(projectRoot);
|
|
179
|
-
if (lease.kind === "held" && !args.force) {
|
|
180
|
-
logger.error(
|
|
181
|
-
formatQueueLeaseRefusal(lease, {
|
|
182
|
-
what: "another live session writes this workspace, so update will not rewrite L0",
|
|
183
|
-
next: "run agent-kit update again (--force applies anyway; operator choice)"
|
|
184
|
-
})
|
|
185
|
-
);
|
|
186
|
-
process.exitCode = 1;
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
const registry = await resolveRegistryFromCli({
|
|
190
|
-
cwd: projectRoot,
|
|
191
|
-
registry: args.registry,
|
|
192
|
-
url: args.url,
|
|
193
|
-
ref: args.ref,
|
|
194
|
-
refresh: args.refresh,
|
|
195
|
-
manifest: existing
|
|
196
|
-
});
|
|
197
|
-
try {
|
|
198
|
-
logger.info(`Registry: ${registry.root} (${registry.source})`);
|
|
199
|
-
const stale = await detectStaleCli(registry.root, { warn: logger.warn });
|
|
200
|
-
if (stale && !args["allow-stale-cli"]) {
|
|
201
|
-
const refusal = formatStaleCliRefusal({
|
|
202
|
-
command: "update",
|
|
203
|
-
stale,
|
|
204
|
-
rerun: formatRerunFlags(args, UPDATE_RERUN_FLAGS)
|
|
205
|
-
});
|
|
206
|
-
logger.error(refusal.error);
|
|
207
|
-
console.error(refusal.recovery);
|
|
208
|
-
process.exitCode = 1;
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
const next = buildManifest({
|
|
212
|
-
version: KIT_VERSION,
|
|
213
|
-
profile: existing.profile,
|
|
214
|
-
packs: existing.packs,
|
|
215
|
-
skills: existing.skills,
|
|
216
|
-
protected: existing.protected,
|
|
217
|
-
// Restamp generatorVersion with the CLI that ran this apply so the two
|
|
218
|
-
// version fields in the manifest stop disagreeing after an update. The
|
|
219
|
-
// personalization result file itself is not regenerated here.
|
|
220
|
-
personalization: existing.personalization ? { ...existing.personalization, generatorVersion: KIT_VERSION } : void 0,
|
|
221
|
-
registryUrl: registry.url ?? existing.registry?.url,
|
|
222
|
-
registryRef: registry.ref ?? existing.registry?.ref
|
|
223
|
-
});
|
|
224
|
-
if (existing.overrides?.length) next.overrides = existing.overrides;
|
|
225
|
-
if (existing.unknownFields) next.unknownFields = existing.unknownFields;
|
|
226
|
-
if (next.version === existing.version && existing.installedAt) {
|
|
227
|
-
next.installedAt = existing.installedAt;
|
|
228
|
-
}
|
|
229
|
-
if (args["seed-overlay"]) {
|
|
230
|
-
await seedManagedHashLedger(projectRoot);
|
|
231
|
-
logger.info("Seeded managed-hash ledger from current local overlay files.");
|
|
232
|
-
}
|
|
233
|
-
const stats = await withCliProgress(
|
|
234
|
-
"update",
|
|
235
|
-
() => syncFromManifest(registry.root, projectRoot, next)
|
|
236
|
-
);
|
|
237
|
-
if (stats.skippedSymlink.length > 0) {
|
|
238
|
-
logApplyStats(stats);
|
|
239
|
-
logger.error(formatSkippedSymlinks(stats.skippedSymlink));
|
|
240
|
-
process.exitCode = 1;
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
if (args.claude) {
|
|
244
|
-
const claude = await writeClaudeSessionStartHook(projectRoot, { authorized: true });
|
|
245
|
-
if (claude.status === "skipped-symlink") {
|
|
246
|
-
logApplyStats(stats);
|
|
247
|
-
logger.error(
|
|
248
|
-
`Claude settings not written: ${CLAUDE_SETTINGS_REL}, .claude/ or the ledger resolves outside the project (symlink). Nothing was changed there.`
|
|
249
|
-
);
|
|
250
|
-
process.exitCode = 1;
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
if (claude.status === "unavailable") {
|
|
254
|
-
logger.warn(claude.instructions ?? `${CLAUDE_SETTINGS_REL} could not be merged.`);
|
|
255
|
-
} else {
|
|
256
|
-
console.log(`Claude settings ${claude.status}: ${claude.relativePath}`);
|
|
257
|
-
const changed = formatPermissionsChanged(claude.permissionChanges ?? [], {
|
|
258
|
-
mergeAllowWithoutGuard: claude.mergeAllowWithoutGuard ?? []
|
|
259
|
-
});
|
|
260
|
-
for (const line of changed) console.log(line);
|
|
261
|
-
}
|
|
262
|
-
const adapters = await generateClaudeCommandAdapters(projectRoot);
|
|
263
|
-
const skipped = adapters.filter((a) => a.status === "skipped-symlink");
|
|
264
|
-
if (skipped.length > 0) {
|
|
265
|
-
logApplyStats(stats);
|
|
266
|
-
logger.error(
|
|
267
|
-
`Claude command adapters not written for: ${skipped.map((a) => a.relativePath).join(", ")} (symlink outside the project). Nothing was changed there.`
|
|
268
|
-
);
|
|
269
|
-
process.exitCode = 1;
|
|
270
|
-
return;
|
|
271
|
-
}
|
|
272
|
-
if (adapters.length > 0) console.log(formatClaudeAdapterSummary(adapters));
|
|
273
|
-
} else {
|
|
274
|
-
const drift = await planClaudeSettingsDrift(projectRoot);
|
|
275
|
-
if (drift) {
|
|
276
|
-
const protectedPath = isProtectedPath(CLAUDE_SETTINGS_REL, resolveProtectedGlobs(next));
|
|
277
|
-
for (const line of formatClaudeSettingsDrift(drift, { protectedPath })) console.log(line);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
await saveManifest(projectRoot, next);
|
|
281
|
-
logApplyStats(stats);
|
|
282
|
-
const transition = next.version === existing.version ? `unchanged at v${next.version}` : `v${existing.version} \u2192 v${next.version}`;
|
|
283
|
-
logger.success(`Update complete: ${transition} (L3 protected paths left untouched).`);
|
|
284
|
-
const sync = await syncPathCliToRuntime({ runtimeVersion: KIT_VERSION });
|
|
285
|
-
for (const line of sync.lines) console.log(line);
|
|
286
|
-
} finally {
|
|
287
|
-
await registry.unlock?.();
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
function formatClaudeAdapterSummary(results) {
|
|
292
|
-
const count = (status) => results.filter((r) => r.status === status).length;
|
|
293
|
-
const parts = [
|
|
294
|
-
`${count("applied")} written`,
|
|
295
|
-
`${count("refreshed")} refreshed`,
|
|
296
|
-
`${count("unchanged")} unchanged`
|
|
297
|
-
];
|
|
298
|
-
const customized = count("preserved-customized");
|
|
299
|
-
if (customized > 0) parts.push(`${customized} preserved (customized)`);
|
|
300
|
-
return `Claude command adapters: ${parts.join(", ")} (.claude/commands/)`;
|
|
301
|
-
}
|
|
302
|
-
export {
|
|
303
|
-
updateCommand
|
|
304
|
-
};
|