akm-cli 0.9.21 → 0.9.22

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
@@ -4,6 +4,34 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [0.9.22] - 2026-10-01
8
+
9
+ ### Fixed
10
+
11
+ - **Accepting a proposal no longer rewrites a long description at its first line
12
+ break.** `yaml.stringify`, which reflect and the other writers serialize
13
+ frontmatter with, wraps a description past about 80 columns over indented
14
+ lines. The truncation repair that `akm proposal accept` runs before it
15
+ promotes read only the first of those lines. When that line ended in a
16
+ connector word (`the`, `and`) or a comma it took the wrap for a truncation,
17
+ dropped the tail words, added a period and left the continuation lines
18
+ behind: `...the cooldowns that drive the` followed by `rest of the pipeline`
19
+ was written as `...the cooldowns that drive.` followed by `rest of the
20
+ pipeline`. Plain, single-quoted and double-quoted descriptions were all
21
+ damaged this way, and the repair has behaved so since it shipped in
22
+ 0.9.0-beta.36 (#645). It now runs only on a single-line description and
23
+ leaves a wrapped one exactly as proposed. Assets already promoted with a
24
+ damaged description are not repaired by this change (the dropped words and the
25
+ stray period stay in them), so they need a separate repair.
26
+ - **The same repair no longer rewrites a body line or another key.** It looked
27
+ for `description:` in the whole file, and its `\s*` ran past the end of the
28
+ line. A file whose frontmatter had no description had a body line starting
29
+ with `description:` completed instead, and an empty `description:` had the
30
+ next key's line rewritten (`title: Notes about how we configure the` became
31
+ `title: Notes about how we configure.`). It now reads only the `description:`
32
+ line of the frontmatter block. Content already promoted that way is not
33
+ repaired by this change.
34
+
7
35
  ## [0.9.21] - 2026-10-01
8
36
 
9
37
  ### Changed
@@ -25,7 +25,9 @@ export function validateProposal(proposal) {
25
25
  * Normalize line endings and complete a truncated frontmatter `description`
26
26
  * (`repairTruncatedDescription`, with the body as context). Nothing else: an
27
27
  * earlier repair that deleted body lines gutted any asset documenting
28
- * frontmatter. Callers re-validate the result.
28
+ * frontmatter. Only a single-line description is repaired: one YAML wrapped
29
+ * over indented lines (`yaml.stringify` does that past ~80 columns) has a
30
+ * first line that merely looks truncated. Callers re-validate the result.
29
31
  */
30
32
  export function repairProposalContent(content) {
31
33
  if (typeof content !== "string" || content.trim() === "")
@@ -34,5 +36,9 @@ export function repairProposalContent(content) {
34
36
  const { fmText, body } = splitFrontmatter(repaired);
35
37
  if (fmText === null)
36
38
  return repaired;
37
- return repaired.replace(/^(description:\s*)(.*?)(\r?\n)/m, (_match, prefix, rawDesc, nl) => `${prefix}${repairTruncatedDescription(rawDesc.trim(), body)}${nl}`);
39
+ if (/^description:.*\n[ \t]/m.test(fmText))
40
+ return repaired;
41
+ // The frontmatter block only: a body line starting with `description:` is not the description.
42
+ const frontmatter = repaired.slice(0, repaired.length - body.length);
43
+ return (frontmatter.replace(/^(description:[ \t]*)(.*?)(\r?\n)/m, (_match, prefix, rawDesc, nl) => `${prefix}${repairTruncatedDescription(rawDesc.trim(), body)}${nl}`) + body);
38
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akm-cli",
3
- "version": "0.9.21",
3
+ "version": "0.9.22",
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": [