@dadado/agent-kit-cli 5.16.0 → 5.17.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/dist/{add-7UMSGVWC.js → add-HTYIFKMN.js} +2 -2
- package/dist/{chunk-YGBBHKBE.js → chunk-2RDRMGD3.js} +2 -2
- package/dist/{chunk-VS2JD2XC.js → chunk-AW74INUW.js} +4 -1
- package/dist/{chunk-OZ4QV6LM.js → chunk-B73KQ5KX.js} +42 -148
- package/dist/{chunk-5OXPNVCF.js → chunk-DQA434Y4.js} +2 -2
- package/dist/{chunk-VGZBARQC.js → chunk-F4VMYR7U.js} +2 -2
- package/dist/{chunk-6QV2BFGA.js → chunk-N3HTJVBR.js} +1 -1
- package/dist/{chunk-XWPO3VYQ.js → chunk-PNG7LO2F.js} +1 -1
- package/dist/chunk-S6GMFDKV.js +50 -0
- package/dist/{chunk-XZZAVHH4.js → chunk-SMGFN3Z4.js} +2 -2
- package/dist/{chunk-KI6ZHBPV.js → chunk-STGFBAYT.js} +320 -11
- package/dist/{chunk-CGTE7DHN.js → chunk-W24CMQ32.js} +135 -20
- package/dist/{contribute-YKK6YCSI.js → contribute-C6AW2P6J.js} +3 -3
- package/dist/{diff-YTR7VOAN.js → diff-VHNR62SI.js} +4 -4
- package/dist/doctor-PET2HRRJ.js +236 -0
- package/dist/{hook-MUV6Y7UW.js → hook-DYIMKJYL.js} +4 -4
- package/dist/index.js +10 -10
- package/dist/{init-TTTKGC4C.js → init-Q4LBM6KT.js} +10 -10
- package/dist/{install-ZMFJBPOI.js → install-RHOS3OYZ.js} +10 -10
- package/dist/{setup-global-JUVMJXJ5.js → setup-global-M42GEODI.js} +5 -5
- package/dist/{status-MVCUNCWX.js → status-XPVQVQMX.js} +18 -6
- package/dist/{update-Q4EBIRUB.js → update-FJ2EBZVO.js} +32 -9
- package/package.json +3 -3
- package/dist/doctor-TA2FWREU.js +0 -497
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assessHooksHealth,
|
|
3
|
+
executeSafeReadinessFixes,
|
|
4
|
+
refreshRepositoryProfile
|
|
5
|
+
} from "./chunk-STGFBAYT.js";
|
|
6
|
+
import {
|
|
7
|
+
writeReadinessSnapshot
|
|
8
|
+
} from "./chunk-ZXKZBTXE.js";
|
|
9
|
+
import "./chunk-W24CMQ32.js";
|
|
10
|
+
import "./chunk-MAPOQEA2.js";
|
|
11
|
+
import {
|
|
12
|
+
withCliProgress
|
|
13
|
+
} from "./chunk-QTON2GQX.js";
|
|
14
|
+
import {
|
|
15
|
+
detectWorkspaceParent,
|
|
16
|
+
workspaceParentAdvisoryLines
|
|
17
|
+
} from "./chunk-S6GMFDKV.js";
|
|
18
|
+
import {
|
|
19
|
+
createReadinessReport
|
|
20
|
+
} from "./chunk-PNFF6OU3.js";
|
|
21
|
+
import {
|
|
22
|
+
runScanner
|
|
23
|
+
} from "./chunk-ZCTSUQRR.js";
|
|
24
|
+
import "./chunk-F6C3GFKV.js";
|
|
25
|
+
import {
|
|
26
|
+
logger
|
|
27
|
+
} from "./chunk-ZB43YMHW.js";
|
|
28
|
+
import {
|
|
29
|
+
assessEnvironment
|
|
30
|
+
} from "./chunk-4IWG5CVE.js";
|
|
31
|
+
import {
|
|
32
|
+
warnIfRunningCliBehindNpm
|
|
33
|
+
} from "./chunk-SMGFN3Z4.js";
|
|
34
|
+
import "./chunk-NQ7IQ5XT.js";
|
|
35
|
+
import "./chunk-2RDRMGD3.js";
|
|
36
|
+
import "./chunk-N3HTJVBR.js";
|
|
37
|
+
import "./chunk-AW74INUW.js";
|
|
38
|
+
import "./chunk-5VCOWTTP.js";
|
|
39
|
+
import {
|
|
40
|
+
KIT_VERSION
|
|
41
|
+
} from "./chunk-7HDQEK6T.js";
|
|
42
|
+
import {
|
|
43
|
+
readJson
|
|
44
|
+
} from "./chunk-77V75A7O.js";
|
|
45
|
+
|
|
46
|
+
// src/commands/doctor.ts
|
|
47
|
+
import path from "path";
|
|
48
|
+
import { defineCommand } from "citty";
|
|
49
|
+
async function readDeferredEssentials(rootDir, report) {
|
|
50
|
+
const config = await readJson(
|
|
51
|
+
path.join(rootDir, ".cursor", "context", "config.json")
|
|
52
|
+
);
|
|
53
|
+
const deferredItems = config?.onboarding?.deferredItems;
|
|
54
|
+
if (!Array.isArray(deferredItems)) return [];
|
|
55
|
+
const essentialIds = new Set(
|
|
56
|
+
report.pillars.flatMap((pillar) => pillar.checks).filter((check) => check.essential).map((check) => check.id)
|
|
57
|
+
);
|
|
58
|
+
return deferredItems.filter(
|
|
59
|
+
(item) => typeof item?.checkId === "string" && typeof item?.reason === "string" && essentialIds.has(item.checkId)
|
|
60
|
+
).map((item) => ({ checkId: item.checkId, reason: item.reason }));
|
|
61
|
+
}
|
|
62
|
+
async function runDoctor(cwd, options = {}) {
|
|
63
|
+
const rootDir = path.resolve(cwd);
|
|
64
|
+
const hooks = await assessHooksHealth(rootDir);
|
|
65
|
+
const workspaceParent = await detectWorkspaceParent(rootDir);
|
|
66
|
+
if (workspaceParent) {
|
|
67
|
+
const scan2 = await runScanner(rootDir);
|
|
68
|
+
const report2 = createReadinessReport(scan2, {
|
|
69
|
+
generatorVersion: KIT_VERSION,
|
|
70
|
+
generatedAt: options.generatedAt
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
report: report2,
|
|
74
|
+
safeChanges: [],
|
|
75
|
+
hooks,
|
|
76
|
+
env: await assessEnvironment(),
|
|
77
|
+
deferredEssentials: [],
|
|
78
|
+
workspaceParent
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const env = await assessEnvironment();
|
|
82
|
+
if (options.fixSafe) {
|
|
83
|
+
const execution = await executeSafeReadinessFixes(rootDir, {
|
|
84
|
+
generatorVersion: KIT_VERSION,
|
|
85
|
+
generatedAt: options.generatedAt
|
|
86
|
+
});
|
|
87
|
+
await writeReadinessSnapshot(rootDir, execution.after);
|
|
88
|
+
return {
|
|
89
|
+
report: execution.after,
|
|
90
|
+
safeChanges: execution.changes,
|
|
91
|
+
hooks,
|
|
92
|
+
env,
|
|
93
|
+
deferredEssentials: await readDeferredEssentials(rootDir, execution.after)
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if (options.refreshProfile) {
|
|
97
|
+
const refresh = await refreshRepositoryProfile(rootDir, {
|
|
98
|
+
generatorVersion: KIT_VERSION,
|
|
99
|
+
generatedAt: options.generatedAt
|
|
100
|
+
});
|
|
101
|
+
const scan2 = await runScanner(rootDir);
|
|
102
|
+
const report2 = createReadinessReport(scan2, {
|
|
103
|
+
generatorVersion: KIT_VERSION,
|
|
104
|
+
generatedAt: options.generatedAt
|
|
105
|
+
});
|
|
106
|
+
await writeReadinessSnapshot(rootDir, report2);
|
|
107
|
+
return {
|
|
108
|
+
report: report2,
|
|
109
|
+
safeChanges: [],
|
|
110
|
+
hooks,
|
|
111
|
+
env,
|
|
112
|
+
profileRefreshed: refresh.changed,
|
|
113
|
+
deferredEssentials: await readDeferredEssentials(rootDir, report2)
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const scan = await runScanner(rootDir);
|
|
117
|
+
const report = createReadinessReport(scan, {
|
|
118
|
+
generatorVersion: KIT_VERSION,
|
|
119
|
+
generatedAt: options.generatedAt
|
|
120
|
+
});
|
|
121
|
+
await writeReadinessSnapshot(rootDir, report);
|
|
122
|
+
return {
|
|
123
|
+
report,
|
|
124
|
+
safeChanges: [],
|
|
125
|
+
hooks,
|
|
126
|
+
env,
|
|
127
|
+
deferredEssentials: await readDeferredEssentials(rootDir, report)
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function printDoctorSummary(result, rootDir) {
|
|
131
|
+
if (result.workspaceParent) {
|
|
132
|
+
for (const line of workspaceParentAdvisoryLines(rootDir, result.workspaceParent, "doctor")) {
|
|
133
|
+
console.log(line);
|
|
134
|
+
}
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const { summary, pendingActions } = result.report;
|
|
138
|
+
const fixed = result.safeChanges.filter((change) => change.status === "applied").length;
|
|
139
|
+
const nextAction = pendingActions[0];
|
|
140
|
+
console.log("Repository readiness");
|
|
141
|
+
console.log(
|
|
142
|
+
` ready: ${summary.ready}, choices: ${summary.needs_choice}, manual: ${summary.manual}, blocked: ${summary.blocked}`
|
|
143
|
+
);
|
|
144
|
+
console.log(` safe fixes applied: ${fixed}`);
|
|
145
|
+
console.log(` pending actions: ${pendingActions.length}`);
|
|
146
|
+
if (result.profileRefreshed !== void 0) {
|
|
147
|
+
console.log(
|
|
148
|
+
` profile refreshed: ${result.profileRefreshed ? "yes (facts changed)" : "no (already current)"}`
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
for (const item of result.deferredEssentials) {
|
|
152
|
+
console.log(` Deferred essential: ${item.checkId} \u2014 ${item.reason}`);
|
|
153
|
+
}
|
|
154
|
+
console.log(`hooks: ${result.hooks.status}`);
|
|
155
|
+
if (result.hooks.reasons.length > 0) {
|
|
156
|
+
for (const reason of result.hooks.reasons.slice(0, 5)) {
|
|
157
|
+
console.log(` - ${reason}`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (result.hooks.advisories.length > 0) {
|
|
161
|
+
console.log("hooks advisories (soft; install via cp, see git-hooks/README.md):");
|
|
162
|
+
for (const tip of result.hooks.advisories.slice(0, 5)) {
|
|
163
|
+
console.log(` - ${tip}`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
console.log("environment:");
|
|
167
|
+
const pathLabel = result.env.binOnPath ? `ok (v${result.env.binVersion ?? "unknown"} at ${result.env.binPath})` : "MISSING";
|
|
168
|
+
console.log(` - bin on PATH (agent-kit): ${pathLabel}`);
|
|
169
|
+
console.log(
|
|
170
|
+
` - npm prefix writable: ${result.env.npmPrefixWritable ? "ok" : "BLOCKED"}${result.env.npmPrefix.prefix ? ` (${result.env.npmPrefix.prefix})` : ""}`
|
|
171
|
+
);
|
|
172
|
+
if (!result.env.npmPrefixWritable && result.env.npmPrefix.reason) {
|
|
173
|
+
console.log(` - ${result.env.npmPrefix.reason}`);
|
|
174
|
+
}
|
|
175
|
+
console.log(
|
|
176
|
+
` - node version >= 20: ${result.env.nodeVersionOk ? "ok" : "TOO OLD"} (${result.env.nodeVersion})`
|
|
177
|
+
);
|
|
178
|
+
console.log(
|
|
179
|
+
` - shell profile: ${result.env.shellProfile ?? "not detected (zsh/bash only)"}${result.env.shell ? ` (shell: ${result.env.shell})` : ""}`
|
|
180
|
+
);
|
|
181
|
+
if (process.env.ALLOW_MAIN_PUSH === "1") {
|
|
182
|
+
console.log("\u26A0\uFE0F WARNING: ALLOW_MAIN_PUSH=1 is set in environment");
|
|
183
|
+
console.log(" This disables main-push protection for agent Shell commands.");
|
|
184
|
+
console.log(" Consider unsetting it: unset ALLOW_MAIN_PUSH");
|
|
185
|
+
}
|
|
186
|
+
console.log(
|
|
187
|
+
nextAction ? `Next: ${nextAction.recommendation}` : "Next: repository readiness checks are complete"
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
var doctorCommand = defineCommand({
|
|
191
|
+
meta: {
|
|
192
|
+
name: "doctor",
|
|
193
|
+
description: "Diagnose repository readiness; optional --fix-safe local repairs."
|
|
194
|
+
},
|
|
195
|
+
args: {
|
|
196
|
+
cwd: {
|
|
197
|
+
type: "string",
|
|
198
|
+
default: process.cwd()
|
|
199
|
+
},
|
|
200
|
+
json: {
|
|
201
|
+
type: "boolean",
|
|
202
|
+
description: "Print deterministic machine-readable JSON without status messages",
|
|
203
|
+
default: false
|
|
204
|
+
},
|
|
205
|
+
"fix-safe": {
|
|
206
|
+
type: "boolean",
|
|
207
|
+
description: "Apply only local, reversible, merge-safe readiness fixes",
|
|
208
|
+
default: false
|
|
209
|
+
},
|
|
210
|
+
"refresh-profile": {
|
|
211
|
+
type: "boolean",
|
|
212
|
+
description: "Reconcile .cursor/agent-kit.config.json with current scanner facts: fresh values win on shared keys, unrecognized existing keys are preserved",
|
|
213
|
+
default: false
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
async run({ args }) {
|
|
217
|
+
if (!args.json) {
|
|
218
|
+
await warnIfRunningCliBehindNpm(args.cwd, { warn: (message) => logger.warn(message) });
|
|
219
|
+
}
|
|
220
|
+
const run = () => runDoctor(args.cwd, {
|
|
221
|
+
fixSafe: args["fix-safe"],
|
|
222
|
+
refreshProfile: args["refresh-profile"]
|
|
223
|
+
});
|
|
224
|
+
const result = args.json ? await run() : await withCliProgress("doctor", run);
|
|
225
|
+
if (args.json) {
|
|
226
|
+
console.log(JSON.stringify(result, null, 2));
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
printDoctorSummary(result, path.resolve(args.cwd));
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
export {
|
|
233
|
+
doctorCommand,
|
|
234
|
+
printDoctorSummary,
|
|
235
|
+
runDoctor
|
|
236
|
+
};
|
|
@@ -22,15 +22,15 @@ import {
|
|
|
22
22
|
} from "./chunk-ZXKZBTXE.js";
|
|
23
23
|
import {
|
|
24
24
|
stampLastCheckedAt
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SMGFN3Z4.js";
|
|
26
26
|
import {
|
|
27
27
|
loadContextConfig
|
|
28
28
|
} from "./chunk-NQ7IQ5XT.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-2RDRMGD3.js";
|
|
30
|
+
import "./chunk-N3HTJVBR.js";
|
|
31
31
|
import {
|
|
32
32
|
MANIFEST_RELATIVE_PATH
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AW74INUW.js";
|
|
34
34
|
import {
|
|
35
35
|
HANDOFF_REL
|
|
36
36
|
} from "./chunk-5VCOWTTP.js";
|
package/dist/index.js
CHANGED
|
@@ -211,20 +211,20 @@ var main = defineCommand({
|
|
|
211
211
|
version: KIT_VERSION
|
|
212
212
|
},
|
|
213
213
|
subCommands: {
|
|
214
|
-
init: () => import("./init-
|
|
215
|
-
install: () => import("./install-
|
|
214
|
+
init: () => import("./init-Q4LBM6KT.js").then((m) => m.initCommand),
|
|
215
|
+
install: () => import("./install-RHOS3OYZ.js").then((m) => m.installCommand),
|
|
216
216
|
scan: () => import("./scan-NI2SWJ2E.js").then((m) => m.scanCommand),
|
|
217
|
-
add: () => import("./add-
|
|
218
|
-
doctor: () => import("./doctor-
|
|
219
|
-
"setup-global": () => import("./setup-global-
|
|
220
|
-
status: () => import("./status-
|
|
221
|
-
update: () => import("./update-
|
|
217
|
+
add: () => import("./add-HTYIFKMN.js").then((m) => m.addCommand),
|
|
218
|
+
doctor: () => import("./doctor-PET2HRRJ.js").then((m) => m.doctorCommand),
|
|
219
|
+
"setup-global": () => import("./setup-global-M42GEODI.js").then((m) => m.setupGlobalCommand),
|
|
220
|
+
status: () => import("./status-XPVQVQMX.js").then((m) => m.statusCommand),
|
|
221
|
+
update: () => import("./update-FJ2EBZVO.js").then((m) => m.updateCommand),
|
|
222
222
|
"cursor-awareness": () => import("./cursor-awareness-KTL2RGKD.js").then((m) => m.cursorAwarenessCommand),
|
|
223
223
|
"public-inbound-radar": () => import("./public-inbound-radar-WP3XF7GS.js").then((m) => m.publicInboundRadarCommand),
|
|
224
224
|
"remote-issues": () => import("./remote-issues-SZ4HDQL5.js").then((m) => m.remoteIssuesCommand),
|
|
225
225
|
dogfood: () => import("./dogfood-KKFVRWT6.js").then((m) => m.dogfoodCommand),
|
|
226
|
-
diff: () => import("./diff-
|
|
227
|
-
contribute: () => import("./contribute-
|
|
226
|
+
diff: () => import("./diff-VHNR62SI.js").then((m) => m.diffCommand),
|
|
227
|
+
contribute: () => import("./contribute-C6AW2P6J.js").then((m) => m.contributeCommand),
|
|
228
228
|
handoff: () => import("./handoff-3UI6VKVG.js").then((m) => m.handoffCommand),
|
|
229
229
|
"plan-index": () => import("./plan-index-JMC7Z4DW.js").then((m) => m.planIndexCommand),
|
|
230
230
|
run: () => import("./run-I3BFGULT.js").then((m) => m.runCommand),
|
|
@@ -233,7 +233,7 @@ var main = defineCommand({
|
|
|
233
233
|
dashboard: () => import("./dashboard-YSNUGBFY.js").then((m) => m.dashboardCommand),
|
|
234
234
|
"dashboard-broadcast": () => import("./dashboard-broadcast-M4CMW7RX.js").then((m) => m.dashboardBroadcastCommand),
|
|
235
235
|
"mission-control": () => import("./mission-control-LJACEVVN.js").then((m) => m.missionControlCommand),
|
|
236
|
-
hook: () => import("./hook-
|
|
236
|
+
hook: () => import("./hook-DYIMKJYL.js").then((m) => m.hookCommand),
|
|
237
237
|
guard: () => import("./guard-EHXF76ID.js").then((m) => m.guardCommand),
|
|
238
238
|
monitors: () => import("./monitors-QV2IS3MP.js").then((m) => m.monitorsCommand),
|
|
239
239
|
validate: () => import("./validate-V2CW7J4B.js").then((m) => m.validateCommand)
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
nextStepAfterInstall,
|
|
3
3
|
performInstall,
|
|
4
4
|
printInstallEpilogue
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-B73KQ5KX.js";
|
|
6
6
|
import {
|
|
7
7
|
NON_INTERACTIVE_ROOT_ARGS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DQA434Y4.js";
|
|
9
9
|
import {
|
|
10
10
|
SkippedSymlinkError,
|
|
11
11
|
logApplyStats
|
|
12
12
|
} from "./chunk-HS7LVVLO.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-PNG7LO2F.js";
|
|
14
|
+
import "./chunk-STGFBAYT.js";
|
|
15
15
|
import "./chunk-ZXKZBTXE.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-W24CMQ32.js";
|
|
17
17
|
import "./chunk-MAPOQEA2.js";
|
|
18
18
|
import {
|
|
19
19
|
withCliProgress
|
|
@@ -30,15 +30,15 @@ import {
|
|
|
30
30
|
confirmProjectRoot,
|
|
31
31
|
isNonInteractive,
|
|
32
32
|
syncPathCliToRuntime
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-F4VMYR7U.js";
|
|
34
34
|
import {
|
|
35
35
|
assessEnvironment
|
|
36
36
|
} from "./chunk-4IWG5CVE.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-SMGFN3Z4.js";
|
|
38
38
|
import "./chunk-NQ7IQ5XT.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-2RDRMGD3.js";
|
|
40
|
+
import "./chunk-N3HTJVBR.js";
|
|
41
|
+
import "./chunk-AW74INUW.js";
|
|
42
42
|
import "./chunk-5VCOWTTP.js";
|
|
43
43
|
import {
|
|
44
44
|
KIT_VERSION
|
|
@@ -3,26 +3,26 @@ import {
|
|
|
3
3
|
nextStepAfterInstall,
|
|
4
4
|
performInstall,
|
|
5
5
|
printInstallEpilogue
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-B73KQ5KX.js";
|
|
7
|
+
import "./chunk-DQA434Y4.js";
|
|
8
8
|
import "./chunk-HS7LVVLO.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-PNG7LO2F.js";
|
|
10
|
+
import "./chunk-STGFBAYT.js";
|
|
11
11
|
import "./chunk-ZXKZBTXE.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-W24CMQ32.js";
|
|
13
13
|
import "./chunk-MAPOQEA2.js";
|
|
14
14
|
import "./chunk-QTON2GQX.js";
|
|
15
15
|
import "./chunk-PNFF6OU3.js";
|
|
16
16
|
import "./chunk-ZCTSUQRR.js";
|
|
17
17
|
import "./chunk-F6C3GFKV.js";
|
|
18
18
|
import "./chunk-ZB43YMHW.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-F4VMYR7U.js";
|
|
20
20
|
import "./chunk-4IWG5CVE.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-SMGFN3Z4.js";
|
|
22
22
|
import "./chunk-NQ7IQ5XT.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-2RDRMGD3.js";
|
|
24
|
+
import "./chunk-N3HTJVBR.js";
|
|
25
|
+
import "./chunk-AW74INUW.js";
|
|
26
26
|
import "./chunk-5VCOWTTP.js";
|
|
27
27
|
import "./chunk-7HDQEK6T.js";
|
|
28
28
|
import "./chunk-77V75A7O.js";
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
classifyInstallError,
|
|
3
3
|
isNonInteractive,
|
|
4
4
|
pathCliStatus
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-F4VMYR7U.js";
|
|
6
6
|
import {
|
|
7
7
|
assessEnvironment
|
|
8
8
|
} from "./chunk-4IWG5CVE.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-SMGFN3Z4.js";
|
|
10
10
|
import "./chunk-NQ7IQ5XT.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-2RDRMGD3.js";
|
|
12
|
+
import "./chunk-N3HTJVBR.js";
|
|
13
|
+
import "./chunk-AW74INUW.js";
|
|
14
14
|
import "./chunk-5VCOWTTP.js";
|
|
15
15
|
import {
|
|
16
16
|
KIT_VERSION,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
detectWorkspaceParent,
|
|
3
|
+
workspaceParentAdvisoryLines
|
|
4
|
+
} from "./chunk-S6GMFDKV.js";
|
|
1
5
|
import {
|
|
2
6
|
createReadinessReport
|
|
3
7
|
} from "./chunk-PNFF6OU3.js";
|
|
@@ -11,19 +15,19 @@ import {
|
|
|
11
15
|
import {
|
|
12
16
|
npxPinned,
|
|
13
17
|
pathCliStatus
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-F4VMYR7U.js";
|
|
15
19
|
import {
|
|
16
20
|
assessEnvironment
|
|
17
21
|
} from "./chunk-4IWG5CVE.js";
|
|
18
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-SMGFN3Z4.js";
|
|
19
23
|
import "./chunk-NQ7IQ5XT.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-2RDRMGD3.js";
|
|
25
|
+
import "./chunk-N3HTJVBR.js";
|
|
22
26
|
import {
|
|
23
27
|
MANIFEST_RELATIVE_PATH,
|
|
24
28
|
loadAgentKitManifest,
|
|
25
29
|
resolveProtectedGlobs
|
|
26
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-AW74INUW.js";
|
|
27
31
|
import "./chunk-5VCOWTTP.js";
|
|
28
32
|
import {
|
|
29
33
|
KIT_VERSION
|
|
@@ -65,6 +69,13 @@ var statusCommand = defineCommand({
|
|
|
65
69
|
},
|
|
66
70
|
async run({ args }) {
|
|
67
71
|
const rootDir = path.resolve(args.cwd);
|
|
72
|
+
const workspaceParent = await detectWorkspaceParent(rootDir);
|
|
73
|
+
if (workspaceParent && !args.json) {
|
|
74
|
+
for (const line of workspaceParentAdvisoryLines(rootDir, workspaceParent, "status")) {
|
|
75
|
+
console.log(line);
|
|
76
|
+
}
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
68
79
|
const [manifest, rawProfile, scan, env] = await Promise.all([
|
|
69
80
|
loadAgentKitManifest(rootDir, args.json ? {} : { onWarning: logger.warn }),
|
|
70
81
|
readJson(
|
|
@@ -84,7 +95,8 @@ var statusCommand = defineCommand({
|
|
|
84
95
|
manifest: manifest ?? null,
|
|
85
96
|
readiness,
|
|
86
97
|
pendingActions: readiness.pendingActions,
|
|
87
|
-
profile
|
|
98
|
+
profile,
|
|
99
|
+
...workspaceParent ? { workspaceParent } : {}
|
|
88
100
|
},
|
|
89
101
|
null,
|
|
90
102
|
2
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NON_INTERACTIVE_ROOT_ARGS,
|
|
3
3
|
syncFromManifest
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DQA434Y4.js";
|
|
5
5
|
import {
|
|
6
6
|
formatSkippedSymlinks,
|
|
7
7
|
logApplyStats
|
|
@@ -9,13 +9,14 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
REGISTRY_CLI_ARGS,
|
|
11
11
|
resolveRegistryFromCli
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PNG7LO2F.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_SETTINGS_REL,
|
|
15
15
|
formatClaudeSettingsDrift,
|
|
16
|
+
generateClaudeCommandAdapters,
|
|
16
17
|
planClaudeSettingsDrift,
|
|
17
18
|
writeClaudeSessionStartHook
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-W24CMQ32.js";
|
|
19
20
|
import "./chunk-MAPOQEA2.js";
|
|
20
21
|
import {
|
|
21
22
|
withCliProgress
|
|
@@ -28,17 +29,17 @@ import {
|
|
|
28
29
|
confirmProjectRoot,
|
|
29
30
|
isNonInteractive,
|
|
30
31
|
syncPathCliToRuntime
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-F4VMYR7U.js";
|
|
32
33
|
import "./chunk-4IWG5CVE.js";
|
|
33
34
|
import {
|
|
34
35
|
checkForUpdates,
|
|
35
36
|
compareSemver,
|
|
36
37
|
normalizeSemver,
|
|
37
38
|
readLocalKitVersion
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SMGFN3Z4.js";
|
|
39
40
|
import "./chunk-NQ7IQ5XT.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-2RDRMGD3.js";
|
|
42
|
+
import "./chunk-N3HTJVBR.js";
|
|
42
43
|
import {
|
|
43
44
|
buildManifest,
|
|
44
45
|
isProtectedPath,
|
|
@@ -46,7 +47,7 @@ import {
|
|
|
46
47
|
resolveProtectedGlobs,
|
|
47
48
|
saveManifest,
|
|
48
49
|
seedManagedHashLedger
|
|
49
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-AW74INUW.js";
|
|
50
51
|
import "./chunk-5VCOWTTP.js";
|
|
51
52
|
import {
|
|
52
53
|
KIT_PACKAGE_SPEC,
|
|
@@ -98,7 +99,7 @@ var updateCommand = defineCommand({
|
|
|
98
99
|
},
|
|
99
100
|
claude: {
|
|
100
101
|
type: "boolean",
|
|
101
|
-
description: "Also apply the ledger-aware Claude settings merge (.claude/settings.json + ledger) with install --claude authority; operator opt-in, never from hooks or plan-loop",
|
|
102
|
+
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",
|
|
102
103
|
default: false
|
|
103
104
|
},
|
|
104
105
|
...NON_INTERACTIVE_ROOT_ARGS,
|
|
@@ -237,6 +238,17 @@ ${err.recovery}
|
|
|
237
238
|
} else {
|
|
238
239
|
console.log(`Claude settings ${claude.status}: ${claude.relativePath}`);
|
|
239
240
|
}
|
|
241
|
+
const adapters = await generateClaudeCommandAdapters(projectRoot);
|
|
242
|
+
const skipped = adapters.filter((a) => a.status === "skipped-symlink");
|
|
243
|
+
if (skipped.length > 0) {
|
|
244
|
+
logApplyStats(stats);
|
|
245
|
+
logger.error(
|
|
246
|
+
`Claude command adapters not written for: ${skipped.map((a) => a.relativePath).join(", ")} (symlink outside the project). Nothing was changed there.`
|
|
247
|
+
);
|
|
248
|
+
process.exitCode = 1;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (adapters.length > 0) console.log(formatClaudeAdapterSummary(adapters));
|
|
240
252
|
} else {
|
|
241
253
|
const drift = await planClaudeSettingsDrift(projectRoot);
|
|
242
254
|
if (drift) {
|
|
@@ -255,6 +267,17 @@ ${err.recovery}
|
|
|
255
267
|
}
|
|
256
268
|
}
|
|
257
269
|
});
|
|
270
|
+
function formatClaudeAdapterSummary(results) {
|
|
271
|
+
const count = (status) => results.filter((r) => r.status === status).length;
|
|
272
|
+
const parts = [
|
|
273
|
+
`${count("applied")} written`,
|
|
274
|
+
`${count("refreshed")} refreshed`,
|
|
275
|
+
`${count("unchanged")} unchanged`
|
|
276
|
+
];
|
|
277
|
+
const customized = count("preserved-customized");
|
|
278
|
+
if (customized > 0) parts.push(`${customized} preserved (customized)`);
|
|
279
|
+
return `Claude command adapters: ${parts.join(", ")} (.claude/commands/)`;
|
|
280
|
+
}
|
|
258
281
|
export {
|
|
259
282
|
updateCommand
|
|
260
283
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dadado/agent-kit-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.0",
|
|
4
4
|
"description": "Agent Kit CLI: HITL framework install and tooling for AI-assisted IDEs (rules, skills, plan/handoff, context).",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"type": "module",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"LICENSE"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@clack/prompts": "^
|
|
19
|
-
"citty": "^0.
|
|
18
|
+
"@clack/prompts": "^1.8.1",
|
|
19
|
+
"citty": "^0.2.2",
|
|
20
20
|
"kolorist": "^1.8.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|