akm-cli 0.10.261127 → 0.10.261128-beta.1
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/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `akm migrate` no longer rewrites legacy asset refs in any file of a bundle read with the `generic-files`, `code-project` or `website-snapshot` adapter, so frozen Markdown prompts and YAML cases there stay byte-for-byte; those bundles' refs still count as live.
|
|
12
|
+
- `akm health` and `akm upgrade` report when the akm-cli bundled in the Codex plugin differs from the running CLI, as they already did for the Claude and OpenCode plugins.
|
|
13
|
+
|
|
9
14
|
## [0.10.261127] - 2026-11-15
|
|
10
15
|
|
|
11
16
|
### Added
|
|
@@ -318,7 +318,7 @@ function readCodexPlugin() {
|
|
|
318
318
|
return { ref: codexMarketplaceRef(), listed: codexPluginVersion() };
|
|
319
319
|
}
|
|
320
320
|
/** One `codex-plugin-version` advisory, or none when the marketplace is registered but the plugin is not installed. */
|
|
321
|
-
function buildCodexAdvisory(codex, probe, listRemoteTagsAt) {
|
|
321
|
+
function buildCodexAdvisory(codex, cliVersion, probe, listRemoteTagsAt) {
|
|
322
322
|
const base = { name: "codex-plugin-version", kind: "deterministic", confidence: "high" };
|
|
323
323
|
if ("error" in codex.listed) {
|
|
324
324
|
return {
|
|
@@ -347,6 +347,9 @@ function buildCodexAdvisory(codex, probe, listRemoteTagsAt) {
|
|
|
347
347
|
const stale = availableVersion !== undefined &&
|
|
348
348
|
installed !== availableVersion &&
|
|
349
349
|
highestVersion([installed, availableVersion]) === availableVersion;
|
|
350
|
+
// The akm-cli Codex's plugin cache holds for the installed plugin version: read, never executed.
|
|
351
|
+
const bundledCli = readPackageVersion(path.join(path.dirname(codexConfigFile()), "plugins", "cache", "akm-plugins", "akm", installed, "node_modules", "akm-cli", "package.json"));
|
|
352
|
+
const cliMatches = bundledCli === undefined ? undefined : bundledCli === cliVersion;
|
|
350
353
|
const messageParts = [`akm@akm-plugins (Codex): installed ${installed} (${channel} channel)`];
|
|
351
354
|
if (!probe)
|
|
352
355
|
messageParts.push("newest tag was not probed");
|
|
@@ -357,9 +360,11 @@ function buildCodexAdvisory(codex, probe, listRemoteTagsAt) {
|
|
|
357
360
|
}
|
|
358
361
|
if (stale)
|
|
359
362
|
messageParts.push("-> codex plugin marketplace upgrade akm-plugins");
|
|
363
|
+
if (bundledCli !== undefined && cliMatches === false)
|
|
364
|
+
messageParts.push(bundledCliNote(bundledCli, cliVersion));
|
|
360
365
|
return {
|
|
361
366
|
...base,
|
|
362
|
-
status: stale ? "warn" : probe && availableVersion !== undefined ? "pass" : "unknown",
|
|
367
|
+
status: stale || cliMatches === false ? "warn" : probe && availableVersion !== undefined ? "pass" : "unknown",
|
|
363
368
|
message: messageParts.join(" — "),
|
|
364
369
|
evidence: {
|
|
365
370
|
harness: "codex",
|
|
@@ -369,6 +374,9 @@ function buildCodexAdvisory(codex, probe, listRemoteTagsAt) {
|
|
|
369
374
|
...(probe ? {} : { probed: false }),
|
|
370
375
|
...(remoteUnavailable ? { remoteUnavailable: true } : {}),
|
|
371
376
|
stale,
|
|
377
|
+
bundledCliVersion: bundledCli ?? null,
|
|
378
|
+
cliVersion,
|
|
379
|
+
cliMatches: cliMatches ?? null,
|
|
372
380
|
},
|
|
373
381
|
};
|
|
374
382
|
}
|
|
@@ -399,7 +407,7 @@ export function collectPluginStalenessAdvisories(options) {
|
|
|
399
407
|
}
|
|
400
408
|
const codex = (options.readCodex ?? readCodexPlugin)();
|
|
401
409
|
if (codex) {
|
|
402
|
-
const advisory = buildCodexAdvisory(codex, probe, options.listRemoteTagsAt ?? realListRemoteTagsAt);
|
|
410
|
+
const advisory = buildCodexAdvisory(codex, options.cliVersion, probe, options.listRemoteTagsAt ?? realListRemoteTagsAt);
|
|
403
411
|
if (advisory)
|
|
404
412
|
results.push(advisory);
|
|
405
413
|
}
|
|
@@ -411,6 +419,12 @@ export function collectPluginStalenessAdvisories(options) {
|
|
|
411
419
|
}
|
|
412
420
|
return results;
|
|
413
421
|
}
|
|
422
|
+
/** Which side of a plugin's bundled akm-cli and the running CLI is behind, with the remedy when the plugin is ahead. */
|
|
423
|
+
function bundledCliNote(bundled, cliVersion, olderSuffix = "") {
|
|
424
|
+
return highestVersion([bundled, cliVersion]) === bundled
|
|
425
|
+
? `bundles akm-cli ${bundled}, newer than the running CLI ${cliVersion}; both share the same databases -> akm upgrade`
|
|
426
|
+
: `bundles akm-cli ${bundled}, older than the running CLI ${cliVersion}; both share the same databases${olderSuffix}`;
|
|
427
|
+
}
|
|
414
428
|
function buildAdvisory(plugin, cliVersion, pluginsRoot, listRemoteTags, probe) {
|
|
415
429
|
const pluginRef = `${plugin.pluginName}@${plugin.marketplace}`;
|
|
416
430
|
// Point 2: newest available vs. installed, via the marketplace clone's remote.
|
|
@@ -433,9 +447,6 @@ function buildAdvisory(plugin, cliVersion, pluginsRoot, listRemoteTags, probe) {
|
|
|
433
447
|
// Point 3: does the akm-cli the plugin runs match the running CLI? Both read and write the same databases.
|
|
434
448
|
const pinnedCliVersion = readPinnedCli(plugin.pluginDir);
|
|
435
449
|
const cliMatches = pinnedCliVersion === undefined ? undefined : pinnedCliVersion === cliVersion;
|
|
436
|
-
const pinNewer = pinnedCliVersion !== undefined &&
|
|
437
|
-
cliMatches === false &&
|
|
438
|
-
highestVersion([pinnedCliVersion, cliVersion]) === pinnedCliVersion;
|
|
439
450
|
const messageParts = [
|
|
440
451
|
`${pluginRef}: installed ${plugin.version} (${plugin.scope}${plugin.projectPath ? `: ${plugin.projectPath}` : ""})`,
|
|
441
452
|
];
|
|
@@ -459,9 +470,7 @@ function buildAdvisory(plugin, cliVersion, pluginsRoot, listRemoteTags, probe) {
|
|
|
459
470
|
if (stale)
|
|
460
471
|
messageParts.push(`-> claude plugin update ${pluginRef}`);
|
|
461
472
|
if (plugin.selectionKnown && plugin.enabled === true && cliMatches === false) {
|
|
462
|
-
messageParts.push(
|
|
463
|
-
? `bundles akm-cli ${pinnedCliVersion}, newer than the running CLI ${cliVersion}; both share the same databases -> akm upgrade`
|
|
464
|
-
: `bundles akm-cli ${pinnedCliVersion}, older than the running CLI ${cliVersion}; both share the same databases${!stale && availableVersion === plugin.version ? " and no newer plugin is published on its channel" : ""}`);
|
|
473
|
+
messageParts.push(bundledCliNote(pinnedCliVersion, cliVersion, !stale && availableVersion === plugin.version ? " and no newer plugin is published on its channel" : ""));
|
|
465
474
|
}
|
|
466
475
|
return {
|
|
467
476
|
name: "plugin-version",
|
|
@@ -539,14 +539,15 @@ export function upgradePlugins(opts) {
|
|
|
539
539
|
}
|
|
540
540
|
const SKEW_ADVISORY_HARNESS = {
|
|
541
541
|
"plugin-version": "claude-code",
|
|
542
|
+
"codex-plugin-version": "codex",
|
|
542
543
|
"opencode-plugin-version": "opencode",
|
|
543
544
|
"opencode-v2-plugin-version": "opencode-v2",
|
|
544
545
|
};
|
|
545
546
|
/** Adds the `akm health` verdict to a plugin whose bundled akm-cli differs from the CLI, so the upgrade names the skew it leaves. */
|
|
546
547
|
function withEngineSkew(entries, cliVersion) {
|
|
547
548
|
const skew = new Map();
|
|
548
|
-
// Codex
|
|
549
|
-
for (const advisory of collectPluginStalenessAdvisories({ cliVersion, probe: false
|
|
549
|
+
// Codex is read only when its config registers the akm-plugins marketplace: one `codex plugin list` spawn.
|
|
550
|
+
for (const advisory of collectPluginStalenessAdvisories({ cliVersion, probe: false })) {
|
|
550
551
|
const harness = SKEW_ADVISORY_HARNESS[advisory.name];
|
|
551
552
|
if (advisory.status === "warn" && harness && !skew.has(harness))
|
|
552
553
|
skew.set(harness, advisory.message);
|
|
@@ -74858,6 +74858,7 @@ function contentRefRewriter(bundles) {
|
|
|
74858
74858
|
|
|
74859
74859
|
// scripts/akm-migrate/content-ref-migrate.ts
|
|
74860
74860
|
var TEXT_EXTENSIONS = new Set([".md", ".yml", ".yaml"]);
|
|
74861
|
+
var UNOWNED_ADAPTERS = new Set(["generic-files", "code-project", "website-snapshot"]);
|
|
74861
74862
|
function textFiles(root) {
|
|
74862
74863
|
return walkStashFlat(root).filter((file2) => TEXT_EXTENSIONS.has(file2.ext) && fs52.lstatSync(file2.absPath).isFile()).map((file2) => file2.absPath);
|
|
74863
74864
|
}
|
|
@@ -74920,6 +74921,8 @@ function plan2() {
|
|
|
74920
74921
|
const assetDirs = new Set([...documents.files].map((file2) => path61.dirname(file2)));
|
|
74921
74922
|
for (const root of roots.filter((candidate) => candidate.writable)) {
|
|
74922
74923
|
const adapterId = root.adapter ?? detectAdapterId(root.root);
|
|
74924
|
+
if (UNOWNED_ADAPTERS.has(adapterId))
|
|
74925
|
+
continue;
|
|
74923
74926
|
for (const filePath of textFiles(root.root)) {
|
|
74924
74927
|
if (seen.has(filePath) || !(documents.files.has(filePath) || isStructuralFile(root.root, adapterId, filePath, assetDirs)))
|
|
74925
74928
|
continue;
|
|
@@ -74843,6 +74843,7 @@ function contentRefRewriter(bundles) {
|
|
|
74843
74843
|
|
|
74844
74844
|
// scripts/akm-migrate/content-ref-migrate.ts
|
|
74845
74845
|
var TEXT_EXTENSIONS = new Set([".md", ".yml", ".yaml"]);
|
|
74846
|
+
var UNOWNED_ADAPTERS = new Set(["generic-files", "code-project", "website-snapshot"]);
|
|
74846
74847
|
function textFiles(root2) {
|
|
74847
74848
|
return walkStashFlat(root2).filter((file2) => TEXT_EXTENSIONS.has(file2.ext) && fs52.lstatSync(file2.absPath).isFile()).map((file2) => file2.absPath);
|
|
74848
74849
|
}
|
|
@@ -74905,6 +74906,8 @@ function plan2() {
|
|
|
74905
74906
|
const assetDirs = new Set([...documents.files].map((file2) => path61.dirname(file2)));
|
|
74906
74907
|
for (const root2 of roots.filter((candidate) => candidate.writable)) {
|
|
74907
74908
|
const adapterId = root2.adapter ?? detectAdapterId(root2.root);
|
|
74909
|
+
if (UNOWNED_ADAPTERS.has(adapterId))
|
|
74910
|
+
continue;
|
|
74908
74911
|
for (const filePath of textFiles(root2.root)) {
|
|
74909
74912
|
if (seen.has(filePath) || !(documents.files.has(filePath) || isStructuralFile(root2.root, adapterId, filePath, assetDirs)))
|
|
74910
74913
|
continue;
|
package/docs/reference/cli.md
CHANGED
|
@@ -644,7 +644,9 @@ the `akm-cli` the plugin's `package.json` pins (the copy its hooks run, which
|
|
|
644
644
|
shares the host's databases) with the running CLI, and says which side is older.
|
|
645
645
|
`codex-plugin-version` does the same for a Codex install from the `akm-plugins`
|
|
646
646
|
marketplace (the version from `codex plugin list`, the newest release on the
|
|
647
|
-
`ref` its marketplace entry follows
|
|
647
|
+
`ref` its marketplace entry follows, and the `akm-cli` in that version's plugin
|
|
648
|
+
cache under `$CODEX_HOME/plugins/cache/akm-plugins/akm/`, compared with the
|
|
649
|
+
running CLI), and `opencode-plugin-version` /
|
|
648
650
|
`opencode-v2-plugin-version` compare the `akm-cli` bundled in the OpenCode plugin
|
|
649
651
|
the config loads with the running CLI. A plugin ahead of the CLI is fixed by
|
|
650
652
|
`akm upgrade`, one behind it by updating the plugin once its channel has a
|
|
@@ -2611,7 +2613,8 @@ in order:
|
|
|
2611
2613
|
rewritten every such key it can reach forgets the old engine names and adds one
|
|
2612
2614
|
note to `assetEngineKeys.notes` listing each renamed engine and the flag that
|
|
2613
2615
|
replaces it (see [The `engines` form](configuration.md#the-engines-form));
|
|
2614
|
-
5. refs in the markdown and YAML files akm indexes in writable bundles
|
|
2616
|
+
5. refs in the markdown and YAML files akm indexes in writable bundles (not those read with the `generic-files`,
|
|
2617
|
+
`code-project` or `website-snapshot` adapters) that still use the spelling from
|
|
2615
2618
|
before refs became bundle paths (`knowledge/WORK/x`, now `WORK/x`; #1432),
|
|
2616
2619
|
in frontmatter and body: `[bundle//]<folder>/<path>[.md]`, `<type>:<path>`
|
|
2617
2620
|
and `wiki:<path>`, rewritten (`assetContentRefs`) under one backup directory
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.261128-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cursor.",
|
|
6
6
|
"keywords": [
|