akm-cli 0.0.16 → 0.0.18

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.
@@ -1,6 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
- import { normalizeAssetType, resolveStashDir } from "./common";
3
+ import { resolveStashDir } from "./common";
4
4
  import { loadConfig } from "./config";
5
5
  import { warn } from "./warn";
6
6
  // ── Resolution ──────────────────────────────────────────────────────────────
@@ -11,7 +11,7 @@ import { warn } from "./warn";
11
11
  * 3. Installed kit paths (cache-managed, from registry)
12
12
  *
13
13
  * The first entry is always the primary stash. Additional entries come
14
- * from `searchPaths` config and `registry.installed` entries.
14
+ * from `searchPaths` config and `installed` kit entries.
15
15
  */
16
16
  export function resolveStashSources(overrideStashDir, existingConfig) {
17
17
  const stashDir = overrideStashDir ?? resolveStashDir();
@@ -25,7 +25,7 @@ export function resolveStashSources(overrideStashDir, existingConfig) {
25
25
  sources.push({ path: dir });
26
26
  }
27
27
  }
28
- for (const entry of config.registry?.installed ?? []) {
28
+ for (const entry of config.installed ?? []) {
29
29
  if (isSuspiciousStashRoot(entry.stashRoot)) {
30
30
  warn(`Warning: stash root "${entry.stashRoot}" appears to be a system directory. This may be unintentional.`);
31
31
  }
@@ -67,7 +67,7 @@ export function getPrimarySource(sources) {
67
67
  * Determine whether a file is safe to edit in place.
68
68
  *
69
69
  * The only files that are NOT editable are those inside a cache directory
70
- * managed by the package manager (`registry.installed[].cacheDir`). These
70
+ * managed by the package manager (`installed[].cacheDir`). These
71
71
  * will be overwritten by `akm update` without warning.
72
72
  *
73
73
  * Everything else — working stash, search paths, local project dirs — is
@@ -76,7 +76,7 @@ export function getPrimarySource(sources) {
76
76
  export function isEditable(filePath, config) {
77
77
  const cfg = config ?? loadConfig();
78
78
  const resolved = path.resolve(filePath);
79
- const cacheManaged = cfg.registry?.installed ?? [];
79
+ const cacheManaged = cfg.installed ?? [];
80
80
  const isWin = process.platform === "win32";
81
81
  for (const entry of cacheManaged) {
82
82
  // Local sources reference original paths — always editable
@@ -101,8 +101,7 @@ export function isEditable(filePath, config) {
101
101
  * unconditionally returns the hint string.
102
102
  */
103
103
  export function buildEditHint(_filePath, assetType, assetName, origin) {
104
- const normalizedType = normalizeAssetType(assetType);
105
- const ref = origin ? `${origin}//${normalizedType}:${assetName}` : `${normalizedType}:${assetName}`;
104
+ const ref = origin ? `${origin}//${assetType}:${assetName}` : `${assetType}:${assetName}`;
106
105
  return `This asset is managed by akm and may be overwritten on update. To edit, run: akm clone ${ref}`;
107
106
  }
108
107
  // ── Validation ──────────────────────────────────────────────────────────────
package/dist/walker.js CHANGED
@@ -14,7 +14,7 @@ import { buildFileContext } from "./file-context";
14
14
  * Walk a type root directory and return files grouped by their parent directory.
15
15
  *
16
16
  * Only files relevant to the given `assetType` are included (e.g. `.md` for
17
- * commands, script extensions for tools, `SKILL.md` for skills).
17
+ * commands, script extensions for scripts, `SKILL.md` for skills).
18
18
  */
19
19
  export function walkStash(typeRoot, assetType) {
20
20
  if (!fs.existsSync(typeRoot))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akm-cli",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "description": "CLI tool to search, open, and run extension assets from an akm stash directory.",
6
6
  "keywords": [