@dadado/agent-kit-cli 6.2.0 → 6.3.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-Y2426TGU.js → add-VA2W7I6P.js} +2 -2
- package/dist/{chunk-X45O2AIE.js → chunk-25J2SMJQ.js} +1 -1
- package/dist/{chunk-TW4BF5OE.js → chunk-6GYKOHIL.js} +2 -2
- package/dist/{chunk-NSSXSZLL.js → chunk-6KUSG7BJ.js} +3 -1
- package/dist/{chunk-SPYIP76F.js → chunk-NNKOWUWM.js} +1 -1
- package/dist/{chunk-CER2APV2.js → chunk-OVOXRH5W.js} +1 -1
- package/dist/{chunk-VO73OL5V.js → chunk-OWWFKGKS.js} +2 -2
- package/dist/{chunk-IR7FFPUU.js → chunk-SV2BR2LZ.js} +43 -8
- package/dist/{chunk-C2SJDYAM.js → chunk-U26MRIWN.js} +1 -1
- package/dist/{chunk-CWDXNBEU.js → chunk-VQBI3JVS.js} +2 -2
- package/dist/{chunk-BEKQ6PVD.js → chunk-WMVMBPCR.js} +1 -1
- package/dist/{chunk-TGNFGMPV.js → chunk-Z7RYIHHX.js} +90 -5
- package/dist/{contribute-TVST3CJO.js → contribute-NLM2BN6Z.js} +3 -3
- package/dist/{diff-MECE5RZB.js → diff-HHG4JEDE.js} +4 -4
- package/dist/{doctor-VLZNXJNA.js → doctor-TWF2M3S3.js} +7 -7
- package/dist/{hook-XCZWX462.js → hook-VP7FHRSZ.js} +4 -4
- package/dist/index.js +10 -10
- package/dist/{init-HKMRU2V4.js → init-UOTV4ASJ.js} +10 -10
- package/dist/{install-X2J6KWZ5.js → install-VCHPXQV3.js} +10 -10
- package/dist/{setup-global-ADJFMOZX.js → setup-global-M6LKGJHQ.js} +5 -5
- package/dist/{status-UB6NL3Q3.js → status-5UKVIKOI.js} +6 -6
- package/dist/{update-PFBFY7GT.js → update-VQBGEUWS.js} +32 -42
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
REGISTRY_CLI_ARGS,
|
|
7
7
|
resolveRegistryFromCli
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-U26MRIWN.js";
|
|
9
9
|
import {
|
|
10
10
|
logger
|
|
11
11
|
} from "./chunk-ZB43YMHW.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveProtectedGlobs,
|
|
23
23
|
saveManifest,
|
|
24
24
|
upsertIdList
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
26
26
|
import {
|
|
27
27
|
KIT_VERSION
|
|
28
28
|
} from "./chunk-7HDQEK6T.js";
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
diffAgainstRegistry,
|
|
8
8
|
summarizeDiff
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VQBI3JVS.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_REGISTRY_URL,
|
|
12
12
|
assertSafeRegistrySource,
|
|
13
13
|
loadAgentKitManifest,
|
|
14
14
|
resolveRegistryRoot
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
16
16
|
import {
|
|
17
17
|
KIT_PACKAGE_SPEC,
|
|
18
18
|
KIT_VERSION
|
|
@@ -693,7 +693,9 @@ var KNOWN_SHIPPED_OVERLAY_HASHES = /* @__PURE__ */ new Set([
|
|
|
693
693
|
"aef5e06c10d1166e1a3efc3cc1f1deda28430334aa7d3fc1e3fe04de478d4bc3",
|
|
694
694
|
"2b7978c318169d00c7274e27e5082bd6bfe47168c36407c66c828a4e56dab4c1",
|
|
695
695
|
"d92297c4675bf9b91d7aaa39fdfafcf2568c9b8b867c80e8121e6225bcf9d5a3",
|
|
696
|
-
"5656ec26963f4d43f9c440f4cae65ad7aa3a33a603de13d81400d3cb5acd1b40"
|
|
696
|
+
"5656ec26963f4d43f9c440f4cae65ad7aa3a33a603de13d81400d3cb5acd1b40",
|
|
697
|
+
"64cfb0dba5d6bcdcd919eaa73fe32e9e34689323d65c70c9ee8aa107bf228677",
|
|
698
|
+
"267537b445490788f4c146e0f5e9276b77a6cc4be77abca8f5696d758bbddaf9"
|
|
697
699
|
]);
|
|
698
700
|
|
|
699
701
|
// src/lifecycle/paths.ts
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
compareSemver,
|
|
6
6
|
normalizeSemver
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6GYKOHIL.js";
|
|
8
8
|
import {
|
|
9
9
|
MANIFEST_RELATIVE_PATH
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
11
11
|
import {
|
|
12
12
|
KIT_VERSION,
|
|
13
13
|
pinnedCliSpec
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NON_INTERACTIVE_ROOT_ARGS,
|
|
3
|
+
StaleCliError,
|
|
4
|
+
detectStaleCli,
|
|
5
|
+
formatRerunFlags,
|
|
6
|
+
formatStaleCliRefusal,
|
|
3
7
|
installL0,
|
|
4
8
|
syncFromManifest
|
|
5
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Z7RYIHHX.js";
|
|
6
10
|
import {
|
|
7
11
|
SkippedSymlinkError,
|
|
8
12
|
formatPersonalizationSkippedSymlinks,
|
|
@@ -11,11 +15,11 @@ import {
|
|
|
11
15
|
import {
|
|
12
16
|
REGISTRY_CLI_ARGS,
|
|
13
17
|
resolveRegistryFromCli
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-U26MRIWN.js";
|
|
15
19
|
import {
|
|
16
20
|
assessClaudeCommandAdapters,
|
|
17
21
|
executeSafeReadinessFixes
|
|
18
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WMVMBPCR.js";
|
|
19
23
|
import {
|
|
20
24
|
writeReadinessSnapshot
|
|
21
25
|
} from "./chunk-HAFRAXGV.js";
|
|
@@ -23,7 +27,7 @@ import {
|
|
|
23
27
|
CLAUDE_HITL_FALLBACK,
|
|
24
28
|
generateClaudeCommandAdapters,
|
|
25
29
|
writeClaudeSessionStartHook
|
|
26
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NNKOWUWM.js";
|
|
27
31
|
import {
|
|
28
32
|
shouldUseWelcomeColor,
|
|
29
33
|
withCliProgress
|
|
@@ -50,13 +54,13 @@ import {
|
|
|
50
54
|
npxPinned,
|
|
51
55
|
pathCliStatus,
|
|
52
56
|
syncPathCliToRuntime
|
|
53
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-OWWFKGKS.js";
|
|
54
58
|
import {
|
|
55
59
|
assessEnvironment
|
|
56
60
|
} from "./chunk-B3VR5YBQ.js";
|
|
57
61
|
import {
|
|
58
62
|
warnIfRunningCliBehindNpm
|
|
59
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-6GYKOHIL.js";
|
|
60
64
|
import {
|
|
61
65
|
DOMAIN_PACK_IDS,
|
|
62
66
|
allPacks,
|
|
@@ -73,7 +77,7 @@ import {
|
|
|
73
77
|
resolveProtectedGlobs,
|
|
74
78
|
saveManifest,
|
|
75
79
|
skillTargetDir
|
|
76
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
77
81
|
import {
|
|
78
82
|
KIT_VERSION,
|
|
79
83
|
pinnedCliSpec
|
|
@@ -791,6 +795,8 @@ async function performInstall(options) {
|
|
|
791
795
|
manifest: existing
|
|
792
796
|
});
|
|
793
797
|
try {
|
|
798
|
+
const stale = await detectStaleCli(registry.root, { warn: logger.warn });
|
|
799
|
+
if (stale && !options.allowStaleCli) throw new StaleCliError(stale);
|
|
794
800
|
const draft = buildManifest({
|
|
795
801
|
version: KIT_VERSION,
|
|
796
802
|
profile: options.profile ?? existing?.profile ?? "default",
|
|
@@ -856,6 +862,17 @@ async function performInstall(options) {
|
|
|
856
862
|
await registry.unlock?.();
|
|
857
863
|
}
|
|
858
864
|
}
|
|
865
|
+
var INSTALL_RERUN_FLAGS = [
|
|
866
|
+
"pack",
|
|
867
|
+
"claude",
|
|
868
|
+
"yes",
|
|
869
|
+
"force-root",
|
|
870
|
+
"cwd",
|
|
871
|
+
"registry",
|
|
872
|
+
"url",
|
|
873
|
+
"ref",
|
|
874
|
+
"refresh"
|
|
875
|
+
];
|
|
859
876
|
var installCommand = defineCommand({
|
|
860
877
|
meta: {
|
|
861
878
|
name: "install",
|
|
@@ -872,6 +889,11 @@ var installCommand = defineCommand({
|
|
|
872
889
|
description: `Comma-separated L1 pack ids (e.g. cybersec,devops). Known: ${DOMAIN_PACK_IDS.join(", ")}`
|
|
873
890
|
},
|
|
874
891
|
...NON_INTERACTIVE_ROOT_ARGS,
|
|
892
|
+
"allow-stale-cli": {
|
|
893
|
+
type: "boolean",
|
|
894
|
+
description: "Install 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)",
|
|
895
|
+
default: false
|
|
896
|
+
},
|
|
875
897
|
claude: {
|
|
876
898
|
type: "boolean",
|
|
877
899
|
description: "Opt-in: generate .claude/commands/*.md thin pointer adapters for the installed .cursor/commands set, and merge a SessionStart context hook into .claude/settings.json (default install behavior is unchanged without this flag)",
|
|
@@ -926,7 +948,8 @@ ${err.recovery}
|
|
|
926
948
|
url: args.url,
|
|
927
949
|
ref: args.ref,
|
|
928
950
|
refresh: args.refresh,
|
|
929
|
-
claudeAdapters: args.claude
|
|
951
|
+
claudeAdapters: args.claude,
|
|
952
|
+
allowStaleCli: args["allow-stale-cli"]
|
|
930
953
|
})
|
|
931
954
|
);
|
|
932
955
|
logApplyStats(result.stats);
|
|
@@ -941,6 +964,18 @@ ${result.claudeSessionStartInstructions}
|
|
|
941
964
|
}
|
|
942
965
|
if (result.claudeAdapterHint) logger.info(result.claudeAdapterHint);
|
|
943
966
|
} catch (err) {
|
|
967
|
+
if (err instanceof StaleCliError) {
|
|
968
|
+
const profile = typeof args.profile === "string" && args.profile ? `${args.profile} ` : "";
|
|
969
|
+
const refusal = formatStaleCliRefusal({
|
|
970
|
+
command: "install",
|
|
971
|
+
stale: err.stale,
|
|
972
|
+
rerun: `${profile}${formatRerunFlags(args, INSTALL_RERUN_FLAGS)}`.trim()
|
|
973
|
+
});
|
|
974
|
+
logger.error(refusal.error);
|
|
975
|
+
console.error(refusal.recovery);
|
|
976
|
+
process.exitCode = 1;
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
944
979
|
if (err instanceof SkippedSymlinkError) {
|
|
945
980
|
logApplyStats(err.stats);
|
|
946
981
|
logger.error(err.message);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
managedPairs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-25J2SMJQ.js";
|
|
4
4
|
import {
|
|
5
5
|
isProtectedPath,
|
|
6
6
|
resolveContained,
|
|
7
7
|
resolveProtectedGlobs
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
9
9
|
|
|
10
10
|
// src/lifecycle/diff.ts
|
|
11
11
|
import { readFile } from "fs/promises";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compareSemver,
|
|
3
|
+
normalizeSemver,
|
|
4
|
+
readLocalKitVersion
|
|
5
|
+
} from "./chunk-6GYKOHIL.js";
|
|
1
6
|
import {
|
|
2
7
|
L0_ARTIFACTS
|
|
3
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-25J2SMJQ.js";
|
|
4
9
|
import {
|
|
5
10
|
copyRegistryFile,
|
|
6
11
|
emptyStats,
|
|
@@ -12,24 +17,100 @@ import {
|
|
|
12
17
|
recordOutcome,
|
|
13
18
|
resolveProtectedGlobs,
|
|
14
19
|
saveManagedHashLedger
|
|
15
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
21
|
+
import {
|
|
22
|
+
KIT_PACKAGE_SPEC,
|
|
23
|
+
KIT_VERSION
|
|
24
|
+
} from "./chunk-7HDQEK6T.js";
|
|
16
25
|
import {
|
|
17
26
|
fileExists
|
|
18
27
|
} from "./chunk-5B4DVO6C.js";
|
|
19
28
|
|
|
29
|
+
// src/lifecycle/stale-cli.ts
|
|
30
|
+
import path from "path";
|
|
31
|
+
async function detectStaleCli(registryRoot, options) {
|
|
32
|
+
const registryVersionRaw = await readLocalKitVersion(registryRoot);
|
|
33
|
+
const registryVersion = registryVersionRaw ? normalizeSemver(registryVersionRaw) : null;
|
|
34
|
+
const cliVersion = normalizeSemver(options.cliVersion ?? KIT_VERSION);
|
|
35
|
+
if (!registryVersion) {
|
|
36
|
+
options.warn(
|
|
37
|
+
"Could not read a version from the registry checkout - skipping the CLI freshness check."
|
|
38
|
+
);
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
if (cliVersion && compareSemver(cliVersion, registryVersion) < 0) {
|
|
42
|
+
return { cliVersion, registryVersion };
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
var SHELL_SAFE = /^[A-Za-z0-9_./:@=+,-]+$/;
|
|
47
|
+
function shellQuote(value) {
|
|
48
|
+
return SHELL_SAFE.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`;
|
|
49
|
+
}
|
|
50
|
+
function formatRerunFlags(args, flags, currentDir = process.cwd()) {
|
|
51
|
+
const out = [];
|
|
52
|
+
for (const flag of flags) {
|
|
53
|
+
const value = args[flag];
|
|
54
|
+
if (value === true) {
|
|
55
|
+
out.push(flag === "yes" ? "-y" : `--${flag}`);
|
|
56
|
+
} else if (typeof value === "string" && value.length > 0) {
|
|
57
|
+
if (flag === "cwd" && path.resolve(value) === path.resolve(currentDir)) continue;
|
|
58
|
+
out.push(`--${flag}`, shellQuote(value));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return out.join(" ");
|
|
62
|
+
}
|
|
63
|
+
function formatStaleCliRefusal(input) {
|
|
64
|
+
const { command, stale, rerun } = input;
|
|
65
|
+
const { cliVersion, registryVersion } = stale;
|
|
66
|
+
const tail = rerun ? ` ${rerun}` : "";
|
|
67
|
+
return {
|
|
68
|
+
error: `This CLI is v${cliVersion}, older than the registry it would apply (v${registryVersion}).`,
|
|
69
|
+
recovery: [
|
|
70
|
+
"",
|
|
71
|
+
`\`agent-kit ${command}\` syncs registry content but stamps .cursor/agent-kit.json with the`,
|
|
72
|
+
`version of the CLI running it, so applying now would write v${cliVersion} again, not v${registryVersion}.`,
|
|
73
|
+
"",
|
|
74
|
+
"Upgrade the binary first, then re-run:",
|
|
75
|
+
` npm i -g ${KIT_PACKAGE_SPEC}@${registryVersion}`,
|
|
76
|
+
` agent-kit ${command}${tail}`,
|
|
77
|
+
"",
|
|
78
|
+
"Or run that version once without a global install:",
|
|
79
|
+
` npx -y ${KIT_PACKAGE_SPEC}@${registryVersion} ${command}${tail}`,
|
|
80
|
+
"",
|
|
81
|
+
`If npm has no ${registryVersion} yet, the release is still mid-publish`,
|
|
82
|
+
"(content sync and npm publish run in parallel) - retry shortly.",
|
|
83
|
+
"",
|
|
84
|
+
"Factory/dev checkouts that intend to apply newer content with an older",
|
|
85
|
+
"binary can pass --allow-stale-cli.",
|
|
86
|
+
""
|
|
87
|
+
].join("\n")
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
var StaleCliError = class extends Error {
|
|
91
|
+
constructor(stale) {
|
|
92
|
+
super(
|
|
93
|
+
`This CLI is v${stale.cliVersion}, older than the registry it would apply (v${stale.registryVersion}).`
|
|
94
|
+
);
|
|
95
|
+
this.stale = stale;
|
|
96
|
+
this.name = "StaleCliError";
|
|
97
|
+
}
|
|
98
|
+
stale;
|
|
99
|
+
};
|
|
100
|
+
|
|
20
101
|
// src/lifecycle/onboard-migration.ts
|
|
21
102
|
import { createHash } from "crypto";
|
|
22
103
|
import { readFile, unlink } from "fs/promises";
|
|
23
|
-
import
|
|
104
|
+
import path2 from "path";
|
|
24
105
|
var LEGACY_ONBOARD_PATH = ".cursor/commands/onboard.md";
|
|
25
106
|
var NAMESPACED_ONBOARD_PATH = ".cursor/commands/agent-kit-onboard.md";
|
|
26
107
|
var MANAGED_LEGACY_HASHES = /* @__PURE__ */ new Set([
|
|
27
108
|
"b274a68941813f19b185893cb7c5561dff027f53270890029992f208e24992fe"
|
|
28
109
|
]);
|
|
29
110
|
async function migrateLegacyOnboardCommand(projectRoot, managedHashes = MANAGED_LEGACY_HASHES) {
|
|
30
|
-
const legacyPath =
|
|
111
|
+
const legacyPath = path2.join(projectRoot, LEGACY_ONBOARD_PATH);
|
|
31
112
|
if (!await fileExists(legacyPath)) return "absent";
|
|
32
|
-
const namespacedPath =
|
|
113
|
+
const namespacedPath = path2.join(projectRoot, NAMESPACED_ONBOARD_PATH);
|
|
33
114
|
if (!await fileExists(namespacedPath)) return "preserved-customized";
|
|
34
115
|
const content = await readFile(legacyPath);
|
|
35
116
|
const hash = createHash("sha256").update(content).digest("hex");
|
|
@@ -100,6 +181,10 @@ var NON_INTERACTIVE_ROOT_ARGS = {
|
|
|
100
181
|
};
|
|
101
182
|
|
|
102
183
|
export {
|
|
184
|
+
detectStaleCli,
|
|
185
|
+
formatRerunFlags,
|
|
186
|
+
formatStaleCliRefusal,
|
|
187
|
+
StaleCliError,
|
|
103
188
|
installL0,
|
|
104
189
|
syncFromManifest,
|
|
105
190
|
NON_INTERACTIVE_ROOT_ARGS
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
REGISTRY_CLI_ARGS,
|
|
3
3
|
resolveRegistryFromCli
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U26MRIWN.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-ZB43YMHW.js";
|
|
8
8
|
import {
|
|
9
9
|
managedPairs
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-25J2SMJQ.js";
|
|
11
11
|
import {
|
|
12
12
|
loadAgentKitManifest,
|
|
13
13
|
normalizeRelPath,
|
|
14
14
|
resolveContained
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
16
16
|
import "./chunk-C4Q77GGJ.js";
|
|
17
17
|
import "./chunk-5B4DVO6C.js";
|
|
18
18
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
REGISTRY_CLI_ARGS,
|
|
3
3
|
resolveRegistryFromCli
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U26MRIWN.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-ZB43YMHW.js";
|
|
8
8
|
import {
|
|
9
9
|
diffAgainstRegistry,
|
|
10
10
|
summarizeDiff
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-VQBI3JVS.js";
|
|
12
|
+
import "./chunk-25J2SMJQ.js";
|
|
13
13
|
import {
|
|
14
14
|
loadAgentKitManifest
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
16
16
|
import "./chunk-C4Q77GGJ.js";
|
|
17
17
|
import "./chunk-5B4DVO6C.js";
|
|
18
18
|
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
assessHooksHealth,
|
|
3
3
|
executeSafeReadinessFixes,
|
|
4
4
|
refreshRepositoryProfile
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WMVMBPCR.js";
|
|
6
6
|
import {
|
|
7
7
|
writeReadinessSnapshot
|
|
8
8
|
} from "./chunk-HAFRAXGV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NNKOWUWM.js";
|
|
10
10
|
import "./chunk-WGLPZXNU.js";
|
|
11
11
|
import "./chunk-MAPOQEA2.js";
|
|
12
12
|
import {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
detectWorkspaceParent,
|
|
17
17
|
workspaceParentAdvisoryLines
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OVOXRH5W.js";
|
|
19
19
|
import {
|
|
20
20
|
createReadinessReport
|
|
21
21
|
} from "./chunk-PNFF6OU3.js";
|
|
@@ -32,11 +32,11 @@ import {
|
|
|
32
32
|
} from "./chunk-B3VR5YBQ.js";
|
|
33
33
|
import {
|
|
34
34
|
warnIfRunningCliBehindNpm
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-6GYKOHIL.js";
|
|
36
36
|
import "./chunk-PFEUZXVT.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-VQBI3JVS.js";
|
|
38
|
+
import "./chunk-25J2SMJQ.js";
|
|
39
|
+
import "./chunk-6KUSG7BJ.js";
|
|
40
40
|
import {
|
|
41
41
|
KIT_VERSION
|
|
42
42
|
} from "./chunk-7HDQEK6T.js";
|
|
@@ -23,15 +23,15 @@ import {
|
|
|
23
23
|
} from "./chunk-HAFRAXGV.js";
|
|
24
24
|
import {
|
|
25
25
|
stampLastCheckedAt
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6GYKOHIL.js";
|
|
27
27
|
import {
|
|
28
28
|
loadContextConfig
|
|
29
29
|
} from "./chunk-PFEUZXVT.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-VQBI3JVS.js";
|
|
31
|
+
import "./chunk-25J2SMJQ.js";
|
|
32
32
|
import {
|
|
33
33
|
MANIFEST_RELATIVE_PATH
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
35
35
|
import "./chunk-7HDQEK6T.js";
|
|
36
36
|
import {
|
|
37
37
|
HANDOFF_REL
|
package/dist/index.js
CHANGED
|
@@ -221,20 +221,20 @@ var main = defineCommand({
|
|
|
221
221
|
version: KIT_VERSION
|
|
222
222
|
},
|
|
223
223
|
subCommands: {
|
|
224
|
-
init: () => import("./init-
|
|
225
|
-
install: () => import("./install-
|
|
224
|
+
init: () => import("./init-UOTV4ASJ.js").then((m) => m.initCommand),
|
|
225
|
+
install: () => import("./install-VCHPXQV3.js").then((m) => m.installCommand),
|
|
226
226
|
scan: () => import("./scan-UX4HARMJ.js").then((m) => m.scanCommand),
|
|
227
|
-
add: () => import("./add-
|
|
228
|
-
doctor: () => import("./doctor-
|
|
229
|
-
"setup-global": () => import("./setup-global-
|
|
230
|
-
status: () => import("./status-
|
|
231
|
-
update: () => import("./update-
|
|
227
|
+
add: () => import("./add-VA2W7I6P.js").then((m) => m.addCommand),
|
|
228
|
+
doctor: () => import("./doctor-TWF2M3S3.js").then((m) => m.doctorCommand),
|
|
229
|
+
"setup-global": () => import("./setup-global-M6LKGJHQ.js").then((m) => m.setupGlobalCommand),
|
|
230
|
+
status: () => import("./status-5UKVIKOI.js").then((m) => m.statusCommand),
|
|
231
|
+
update: () => import("./update-VQBGEUWS.js").then((m) => m.updateCommand),
|
|
232
232
|
"cursor-awareness": () => import("./cursor-awareness-TN5JXD2C.js").then((m) => m.cursorAwarenessCommand),
|
|
233
233
|
"public-inbound-radar": () => import("./public-inbound-radar-5U4JMBRU.js").then((m) => m.publicInboundRadarCommand),
|
|
234
234
|
"remote-issues": () => import("./remote-issues-APYOMIJC.js").then((m) => m.remoteIssuesCommand),
|
|
235
235
|
dogfood: () => import("./dogfood-2JAHSYQA.js").then((m) => m.dogfoodCommand),
|
|
236
|
-
diff: () => import("./diff-
|
|
237
|
-
contribute: () => import("./contribute-
|
|
236
|
+
diff: () => import("./diff-HHG4JEDE.js").then((m) => m.diffCommand),
|
|
237
|
+
contribute: () => import("./contribute-NLM2BN6Z.js").then((m) => m.contributeCommand),
|
|
238
238
|
handoff: () => import("./handoff-5AGE2D3T.js").then((m) => m.handoffCommand),
|
|
239
239
|
"plan-index": () => import("./plan-index-BNLUU6T5.js").then((m) => m.planIndexCommand),
|
|
240
240
|
run: () => import("./run-R66G276Q.js").then((m) => m.runCommand),
|
|
@@ -245,7 +245,7 @@ var main = defineCommand({
|
|
|
245
245
|
dashboard: () => import("./dashboard-YNCFISNO.js").then((m) => m.dashboardCommand),
|
|
246
246
|
"dashboard-broadcast": () => import("./dashboard-broadcast-NK7PU72L.js").then((m) => m.dashboardBroadcastCommand),
|
|
247
247
|
"mission-control": () => import("./mission-control-MHQU73XC.js").then((m) => m.missionControlCommand),
|
|
248
|
-
hook: () => import("./hook-
|
|
248
|
+
hook: () => import("./hook-VP7FHRSZ.js").then((m) => m.hookCommand),
|
|
249
249
|
guard: () => import("./guard-EHXF76ID.js").then((m) => m.guardCommand),
|
|
250
250
|
monitors: () => import("./monitors-PDXBLB3U.js").then((m) => m.monitorsCommand),
|
|
251
251
|
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-SV2BR2LZ.js";
|
|
6
6
|
import {
|
|
7
7
|
NON_INTERACTIVE_ROOT_ARGS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Z7RYIHHX.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-U26MRIWN.js";
|
|
14
|
+
import "./chunk-WMVMBPCR.js";
|
|
15
15
|
import "./chunk-HAFRAXGV.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-NNKOWUWM.js";
|
|
17
17
|
import "./chunk-WGLPZXNU.js";
|
|
18
18
|
import "./chunk-MAPOQEA2.js";
|
|
19
19
|
import {
|
|
@@ -31,15 +31,15 @@ import {
|
|
|
31
31
|
confirmProjectRoot,
|
|
32
32
|
isNonInteractive,
|
|
33
33
|
syncPathCliToRuntime
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-OWWFKGKS.js";
|
|
35
35
|
import {
|
|
36
36
|
assessEnvironment
|
|
37
37
|
} from "./chunk-B3VR5YBQ.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-6GYKOHIL.js";
|
|
39
39
|
import "./chunk-PFEUZXVT.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-VQBI3JVS.js";
|
|
41
|
+
import "./chunk-25J2SMJQ.js";
|
|
42
|
+
import "./chunk-6KUSG7BJ.js";
|
|
43
43
|
import {
|
|
44
44
|
KIT_VERSION
|
|
45
45
|
} from "./chunk-7HDQEK6T.js";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
nextStepAfterInstall,
|
|
4
4
|
performInstall,
|
|
5
5
|
printInstallEpilogue
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-SV2BR2LZ.js";
|
|
7
|
+
import "./chunk-Z7RYIHHX.js";
|
|
8
8
|
import "./chunk-HS7LVVLO.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-U26MRIWN.js";
|
|
10
|
+
import "./chunk-WMVMBPCR.js";
|
|
11
11
|
import "./chunk-HAFRAXGV.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NNKOWUWM.js";
|
|
13
13
|
import "./chunk-WGLPZXNU.js";
|
|
14
14
|
import "./chunk-MAPOQEA2.js";
|
|
15
15
|
import "./chunk-QTON2GQX.js";
|
|
@@ -17,13 +17,13 @@ import "./chunk-PNFF6OU3.js";
|
|
|
17
17
|
import "./chunk-GO3K752H.js";
|
|
18
18
|
import "./chunk-F6C3GFKV.js";
|
|
19
19
|
import "./chunk-ZB43YMHW.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-OWWFKGKS.js";
|
|
21
21
|
import "./chunk-B3VR5YBQ.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-6GYKOHIL.js";
|
|
23
23
|
import "./chunk-PFEUZXVT.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-VQBI3JVS.js";
|
|
25
|
+
import "./chunk-25J2SMJQ.js";
|
|
26
|
+
import "./chunk-6KUSG7BJ.js";
|
|
27
27
|
import "./chunk-7HDQEK6T.js";
|
|
28
28
|
import "./chunk-C4Q77GGJ.js";
|
|
29
29
|
import "./chunk-5B4DVO6C.js";
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
classifyInstallError,
|
|
3
3
|
isNonInteractive,
|
|
4
4
|
pathCliStatus
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OWWFKGKS.js";
|
|
6
6
|
import {
|
|
7
7
|
assessEnvironment
|
|
8
8
|
} from "./chunk-B3VR5YBQ.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-6GYKOHIL.js";
|
|
10
10
|
import "./chunk-PFEUZXVT.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-VQBI3JVS.js";
|
|
12
|
+
import "./chunk-25J2SMJQ.js";
|
|
13
|
+
import "./chunk-6KUSG7BJ.js";
|
|
14
14
|
import {
|
|
15
15
|
KIT_VERSION,
|
|
16
16
|
pinnedCliSpec
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectWorkspaceParent,
|
|
3
3
|
workspaceParentAdvisoryLines
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OVOXRH5W.js";
|
|
5
5
|
import {
|
|
6
6
|
createReadinessReport
|
|
7
7
|
} from "./chunk-PNFF6OU3.js";
|
|
@@ -15,19 +15,19 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
npxPinned,
|
|
17
17
|
pathCliStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OWWFKGKS.js";
|
|
19
19
|
import {
|
|
20
20
|
assessEnvironment
|
|
21
21
|
} from "./chunk-B3VR5YBQ.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-6GYKOHIL.js";
|
|
23
23
|
import "./chunk-PFEUZXVT.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-VQBI3JVS.js";
|
|
25
|
+
import "./chunk-25J2SMJQ.js";
|
|
26
26
|
import {
|
|
27
27
|
MANIFEST_RELATIVE_PATH,
|
|
28
28
|
loadAgentKitManifest,
|
|
29
29
|
resolveProtectedGlobs
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
31
31
|
import {
|
|
32
32
|
KIT_VERSION
|
|
33
33
|
} from "./chunk-7HDQEK6T.js";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NON_INTERACTIVE_ROOT_ARGS,
|
|
3
|
+
detectStaleCli,
|
|
4
|
+
formatRerunFlags,
|
|
5
|
+
formatStaleCliRefusal,
|
|
3
6
|
syncFromManifest
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Z7RYIHHX.js";
|
|
5
8
|
import {
|
|
6
9
|
formatSkippedSymlinks,
|
|
7
10
|
logApplyStats
|
|
@@ -9,14 +12,14 @@ import {
|
|
|
9
12
|
import {
|
|
10
13
|
REGISTRY_CLI_ARGS,
|
|
11
14
|
resolveRegistryFromCli
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-U26MRIWN.js";
|
|
13
16
|
import {
|
|
14
17
|
CLAUDE_SETTINGS_REL,
|
|
15
18
|
formatClaudeSettingsDrift,
|
|
16
19
|
generateClaudeCommandAdapters,
|
|
17
20
|
planClaudeSettingsDrift,
|
|
18
21
|
writeClaudeSessionStartHook
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NNKOWUWM.js";
|
|
20
23
|
import "./chunk-MAPOQEA2.js";
|
|
21
24
|
import {
|
|
22
25
|
withCliProgress
|
|
@@ -29,17 +32,14 @@ import {
|
|
|
29
32
|
confirmProjectRoot,
|
|
30
33
|
isNonInteractive,
|
|
31
34
|
syncPathCliToRuntime
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OWWFKGKS.js";
|
|
33
36
|
import "./chunk-B3VR5YBQ.js";
|
|
34
37
|
import {
|
|
35
|
-
checkForUpdates
|
|
36
|
-
|
|
37
|
-
normalizeSemver,
|
|
38
|
-
readLocalKitVersion
|
|
39
|
-
} from "./chunk-TW4BF5OE.js";
|
|
38
|
+
checkForUpdates
|
|
39
|
+
} from "./chunk-6GYKOHIL.js";
|
|
40
40
|
import "./chunk-PFEUZXVT.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-VQBI3JVS.js";
|
|
42
|
+
import "./chunk-25J2SMJQ.js";
|
|
43
43
|
import {
|
|
44
44
|
buildManifest,
|
|
45
45
|
isProtectedPath,
|
|
@@ -47,9 +47,8 @@ import {
|
|
|
47
47
|
resolveProtectedGlobs,
|
|
48
48
|
saveManifest,
|
|
49
49
|
seedManagedHashLedger
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-6KUSG7BJ.js";
|
|
51
51
|
import {
|
|
52
|
-
KIT_PACKAGE_SPEC,
|
|
53
52
|
KIT_VERSION
|
|
54
53
|
} from "./chunk-7HDQEK6T.js";
|
|
55
54
|
import "./chunk-C4Q77GGJ.js";
|
|
@@ -57,6 +56,17 @@ import "./chunk-5B4DVO6C.js";
|
|
|
57
56
|
|
|
58
57
|
// src/commands/update.ts
|
|
59
58
|
import { defineCommand } from "citty";
|
|
59
|
+
var UPDATE_RERUN_FLAGS = [
|
|
60
|
+
"claude",
|
|
61
|
+
"yes",
|
|
62
|
+
"force-root",
|
|
63
|
+
"seed-overlay",
|
|
64
|
+
"cwd",
|
|
65
|
+
"registry",
|
|
66
|
+
"url",
|
|
67
|
+
"ref",
|
|
68
|
+
"refresh"
|
|
69
|
+
];
|
|
60
70
|
var updateCommand = defineCommand({
|
|
61
71
|
meta: {
|
|
62
72
|
name: "update",
|
|
@@ -159,35 +169,15 @@ ${err.recovery}
|
|
|
159
169
|
});
|
|
160
170
|
try {
|
|
161
171
|
logger.info(`Registry: ${registry.root} (${registry.source})`);
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
`This CLI is v${cliVersion}, older than the registry it would apply (v${registryVersion}).`
|
|
172
|
-
);
|
|
173
|
-
console.error(
|
|
174
|
-
[
|
|
175
|
-
"",
|
|
176
|
-
"`agent-kit update` syncs registry content but stamps .cursor/agent-kit.json with the",
|
|
177
|
-
`version of the CLI running it, so applying now would write v${cliVersion} again, not v${registryVersion}.`,
|
|
178
|
-
"",
|
|
179
|
-
"Upgrade the binary first, then re-run:",
|
|
180
|
-
` npm i -g ${KIT_PACKAGE_SPEC}@${registryVersion}`,
|
|
181
|
-
" agent-kit update",
|
|
182
|
-
"",
|
|
183
|
-
`If npm has no ${registryVersion} yet, the release is still mid-publish`,
|
|
184
|
-
"(content sync and npm publish run in parallel) - retry shortly.",
|
|
185
|
-
"",
|
|
186
|
-
"Factory/dev checkouts that intend to apply newer content with an older",
|
|
187
|
-
"binary can pass --allow-stale-cli.",
|
|
188
|
-
""
|
|
189
|
-
].join("\n")
|
|
190
|
-
);
|
|
172
|
+
const stale = await detectStaleCli(registry.root, { warn: logger.warn });
|
|
173
|
+
if (stale && !args["allow-stale-cli"]) {
|
|
174
|
+
const refusal = formatStaleCliRefusal({
|
|
175
|
+
command: "update",
|
|
176
|
+
stale,
|
|
177
|
+
rerun: formatRerunFlags(args, UPDATE_RERUN_FLAGS)
|
|
178
|
+
});
|
|
179
|
+
logger.error(refusal.error);
|
|
180
|
+
console.error(refusal.recovery);
|
|
191
181
|
process.exitCode = 1;
|
|
192
182
|
return;
|
|
193
183
|
}
|
package/package.json
CHANGED