akm-cli 0.9.0-beta.51 → 0.9.0-beta.53
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/assets/hints/cli-hints-full.md +6 -5
- package/dist/assets/wiki/ingest-workflow-template.md +7 -6
- package/dist/assets/wiki/schema-template.md +4 -4
- package/dist/cli.js +0 -7
- package/dist/commands/env/env-cli.js +3 -2
- package/dist/commands/env/env.js +14 -67
- package/dist/commands/health/checks.js +28 -15
- package/dist/commands/health.js +68 -1
- package/dist/commands/improve/collapse-detector.js +419 -0
- package/dist/commands/improve/consolidate.js +72 -54
- package/dist/commands/improve/distill.js +79 -13
- package/dist/commands/improve/extract.js +13 -6
- package/dist/commands/improve/homeostatic.js +109 -79
- package/dist/commands/improve/improve-cli.js +67 -1
- package/dist/commands/improve/improve.js +10 -0
- package/dist/commands/improve/loop-stages.js +39 -1
- package/dist/commands/improve/outcome-loop.js +15 -3
- package/dist/commands/improve/preparation.js +27 -10
- package/dist/commands/improve/salience.js +49 -32
- package/dist/commands/read/curate.js +5 -9
- package/dist/commands/read/knowledge.js +4 -0
- package/dist/commands/read/search.js +5 -2
- package/dist/commands/read/show.js +3 -3
- package/dist/core/asset/asset-spec.js +3 -2
- package/dist/core/config/config-schema.js +39 -17
- package/dist/core/eval/rank-metrics.js +113 -0
- package/dist/core/state/migrations.js +56 -0
- package/dist/core/state-db.js +146 -19
- package/dist/indexer/ensure-index.js +33 -90
- package/dist/indexer/index-writer-lock.js +0 -11
- package/dist/indexer/index-written-assets.js +105 -0
- package/dist/indexer/passes/metadata.js +20 -0
- package/dist/indexer/search/db-search.js +29 -1
- package/dist/indexer/search/ranking-contributors.js +33 -1
- package/dist/indexer/search/ranking.js +66 -0
- package/dist/indexer/search/search-fields.js +6 -0
- package/dist/llm/feature-gate.js +6 -2
- package/dist/output/renderers.js +8 -13
- package/dist/output/shapes/helpers.js +0 -3
- package/dist/output/shapes/passthrough.js +1 -0
- package/dist/scripts/migrate-storage.js +152 -33
- package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +41 -18
- package/dist/storage/repositories/index-db.js +10 -1
- package/dist/wiki/wiki.js +15 -11
- package/package.json +2 -4
package/dist/wiki/wiki.js
CHANGED
|
@@ -58,6 +58,8 @@ export const SCHEMA_MD = "schema.md";
|
|
|
58
58
|
export const INDEX_MD = "index.md";
|
|
59
59
|
export const LOG_MD = "log.md";
|
|
60
60
|
export const RAW_SUBDIR = "raw";
|
|
61
|
+
/** Canonical location for agent-authored pages, mirroring RAW_SUBDIR. */
|
|
62
|
+
export const PAGES_SUBDIR = "pages";
|
|
61
63
|
/** Files at a wiki root that are not pages. */
|
|
62
64
|
const WIKI_SPECIAL_FILES = new Set([SCHEMA_MD, INDEX_MD, LOG_MD]);
|
|
63
65
|
const WIKI_NAME_RE = /^[a-z0-9][a-z0-9-]*$/;
|
|
@@ -406,18 +408,20 @@ export function createWiki(stashDir, name) {
|
|
|
406
408
|
fs.writeFileSync(absPath, content, "utf8");
|
|
407
409
|
created.push(absPath);
|
|
408
410
|
}
|
|
409
|
-
// Ensure raw/
|
|
410
|
-
// Handle the dir-exists-but-no-.gitkeep case too (partial scaffolds,
|
|
411
|
+
// Ensure raw/ and pages/ exist with a .gitkeep so empty wikis survive clean
|
|
412
|
+
// clones. Handle the dir-exists-but-no-.gitkeep case too (partial scaffolds,
|
|
411
413
|
// user-created directories) so the invariant always holds after `create`.
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
414
|
+
for (const subdir of [RAW_SUBDIR, PAGES_SUBDIR]) {
|
|
415
|
+
const dir = path.join(wikiDir, subdir);
|
|
416
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
417
|
+
const gitkeepPath = path.join(dir, ".gitkeep");
|
|
418
|
+
if (fs.existsSync(gitkeepPath)) {
|
|
419
|
+
skipped.push(gitkeepPath);
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
fs.writeFileSync(gitkeepPath, "", "utf8");
|
|
423
|
+
created.push(gitkeepPath);
|
|
424
|
+
}
|
|
421
425
|
}
|
|
422
426
|
return { name, ref: `wiki:${name}`, path: wikiDir, created, skipped };
|
|
423
427
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-beta.53",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Knowledge Management) — A package manager for AI agent skills, commands, tools, and knowledge. Works with Claude Code, OpenCode, Cursor, and any AI coding assistant.",
|
|
6
6
|
"keywords": [
|
|
@@ -58,9 +58,7 @@
|
|
|
58
58
|
"sweep:tmp": "bun scripts/sweep-test-tmp.ts",
|
|
59
59
|
"test": "bash scripts/test-unit.sh",
|
|
60
60
|
"test:unit": "bash scripts/test-unit.sh",
|
|
61
|
-
"test:integration": "bun run sweep:tmp && bun test --isolate --timeout=30000 ./tests/integration
|
|
62
|
-
"test:unit:shard": "bun run sweep:tmp && bun test --isolate --timeout=30000 ./tests --path-ignore-patterns=tests/integration --shard=${SHARD:?set SHARD=k/N}",
|
|
63
|
-
"test:integration:shard": "bun run sweep:tmp && bun test --isolate --timeout=30000 ./tests/integration ./tests/commands ./tests/workflows --shard=${SHARD:?set SHARD=k/N}",
|
|
61
|
+
"test:integration": "bun run sweep:tmp && bun test --isolate --timeout=30000 ./tests/integration",
|
|
64
62
|
"test:node-smoke": "bun scripts/node-smoke.ts",
|
|
65
63
|
"test:node-compat": "AKM_NODE_COMPAT_TESTS=1 bun test --timeout=120000 tests/integration/node-compat.test.ts",
|
|
66
64
|
"test:time": "bun scripts/test-timing-report.ts",
|