akm-cli 0.9.0-rc.4 → 0.9.0-rc.5
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 +6 -0
- package/dist/assets/help/help-improve.md +3 -0
- package/dist/commands/improve/distill/promote-memory.js +6 -2
- package/dist/commands/improve/distill/quality-gate.js +94 -31
- package/dist/commands/improve/distill.js +7 -2
- package/dist/commands/improve/extract.js +5 -2
- package/dist/commands/improve/improve-auto-accept.js +2 -2
- package/dist/commands/improve/improve.js +158 -176
- package/dist/commands/improve/locks.js +22 -94
- package/dist/commands/improve/loop-stages.js +15 -10
- package/dist/commands/improve/preparation.js +21 -17
- package/dist/commands/improve/proactive-maintenance.js +4 -6
- package/dist/commands/improve/reflect.js +40 -67
- package/dist/core/extra-params.js +1 -0
- package/dist/core/maintenance-barrier.js +16 -0
- package/dist/core/write-source.js +1 -0
- package/dist/indexer/ensure-index.js +6 -4
- package/dist/llm/client.js +7 -5
- package/dist/schemas/akm-task.json +2 -2
- package/dist/schemas/akm-workflow.json +2 -2
- package/dist/scripts/migrate-storage.js +2 -1
- package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +2 -1
- package/package.json +1 -1
- package/schemas/akm-task.json +2 -2
- package/schemas/akm-workflow.json +2 -2
- package/docs/README.md +0 -103
|
@@ -177,13 +177,15 @@ function indexCanServeStash(stashDir) {
|
|
|
177
177
|
closeDatabase(db);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
async function runInlineReindex(stashDir) {
|
|
180
|
+
async function runInlineReindex(stashDir, signal) {
|
|
181
181
|
try {
|
|
182
182
|
const { akmIndex } = await import("./indexer.js");
|
|
183
|
-
await akmIndex({ stashDir });
|
|
183
|
+
await akmIndex({ stashDir, signal });
|
|
184
184
|
return true;
|
|
185
185
|
}
|
|
186
186
|
catch (error) {
|
|
187
|
+
if (signal?.aborted)
|
|
188
|
+
throw error;
|
|
187
189
|
warn("Auto-index failed, proceeding with existing index:", error instanceof Error ? error.message : String(error));
|
|
188
190
|
return false;
|
|
189
191
|
}
|
|
@@ -207,9 +209,9 @@ export async function ensureIndex(stashDir, options = {}) {
|
|
|
207
209
|
if (options.mode === "blocking") {
|
|
208
210
|
if (!isIndexStale(stashDir))
|
|
209
211
|
return false;
|
|
210
|
-
return runInlineReindex(stashDir);
|
|
212
|
+
return runInlineReindex(stashDir, options.signal);
|
|
211
213
|
}
|
|
212
214
|
if (indexCanServeStash(stashDir))
|
|
213
215
|
return false;
|
|
214
|
-
return runInlineReindex(stashDir);
|
|
216
|
+
return runInlineReindex(stashDir, options.signal);
|
|
215
217
|
}
|
package/dist/llm/client.js
CHANGED
|
@@ -242,6 +242,12 @@ async function chatCompletionAttempt(config, messages, options, timeoutMs) {
|
|
|
242
242
|
},
|
|
243
243
|
}
|
|
244
244
|
: {};
|
|
245
|
+
const resolvedEnableThinking = options?.enableThinking ?? config.enableThinking;
|
|
246
|
+
const thinkingParams = resolvedEnableThinking === undefined
|
|
247
|
+
? {}
|
|
248
|
+
: config.provider === "vllm"
|
|
249
|
+
? { chat_template_kwargs: { enable_thinking: resolvedEnableThinking } }
|
|
250
|
+
: { enable_thinking: resolvedEnableThinking };
|
|
245
251
|
// Wall-clock start for per-call usage telemetry (#576). Captured here so the
|
|
246
252
|
// emitted duration covers the full request/response/parse cycle of a single
|
|
247
253
|
// attempt, not the retry-wrapping `chatCompletion`.
|
|
@@ -257,11 +263,7 @@ async function chatCompletionAttempt(config, messages, options, timeoutMs) {
|
|
|
257
263
|
temperature: options?.temperature ?? config.temperature ?? 0.3,
|
|
258
264
|
...(resolvedMaxTokens !== undefined ? { max_tokens: resolvedMaxTokens } : {}),
|
|
259
265
|
...responseFormat,
|
|
260
|
-
...
|
|
261
|
-
? { enable_thinking: options.enableThinking }
|
|
262
|
-
: config.enableThinking !== undefined
|
|
263
|
-
? { enable_thinking: config.enableThinking }
|
|
264
|
-
: {}),
|
|
266
|
+
...thinkingParams,
|
|
265
267
|
...config.extraParams,
|
|
266
268
|
}),
|
|
267
269
|
}, timeoutMs, options?.signal);
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"description": "Provider-specific request fields. Top-level AKM-owned fields are forbidden; credential-shaped keys are forbidden recursively after lowercase/non-alphanumeric normalization.",
|
|
61
61
|
"propertyNames": {
|
|
62
62
|
"not": {
|
|
63
|
-
"enum": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
63
|
+
"enum": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "chattemplatekwargs", "authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"additionalProperties": { "$ref": "#/definitions/extraParamValue" },
|
|
67
|
-
"x-akm-protectedTopLevelNormalizedKeys": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking"],
|
|
67
|
+
"x-akm-protectedTopLevelNormalizedKeys": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "chattemplatekwargs"],
|
|
68
68
|
"x-akm-recursivelyForbiddenNormalizedKeys": ["authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
69
69
|
},
|
|
70
70
|
"extraParamValue": {
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
"description": "Provider-specific request fields. Top-level AKM-owned fields are forbidden; credential-shaped keys are forbidden recursively after lowercase/non-alphanumeric normalization.",
|
|
87
87
|
"propertyNames": {
|
|
88
88
|
"not": {
|
|
89
|
-
"enum": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
89
|
+
"enum": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "chattemplatekwargs", "authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
"additionalProperties": { "$ref": "#/definitions/extraParamValue" },
|
|
93
|
-
"x-akm-protectedTopLevelNormalizedKeys": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking"],
|
|
93
|
+
"x-akm-protectedTopLevelNormalizedKeys": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "chattemplatekwargs"],
|
|
94
94
|
"x-akm-recursivelyForbiddenNormalizedKeys": ["authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
95
95
|
},
|
|
96
96
|
"extraParamValue": {
|
|
@@ -12010,7 +12010,8 @@ var init_extra_params = __esm(() => {
|
|
|
12010
12010
|
"responseformat",
|
|
12011
12011
|
"stream",
|
|
12012
12012
|
"streamoptions",
|
|
12013
|
-
"enablethinking"
|
|
12013
|
+
"enablethinking",
|
|
12014
|
+
"chattemplatekwargs"
|
|
12014
12015
|
];
|
|
12015
12016
|
EXTRA_PARAMS_CREDENTIAL_KEYS = [
|
|
12016
12017
|
"authorization",
|
|
@@ -11825,7 +11825,8 @@ var init_extra_params = __esm(() => {
|
|
|
11825
11825
|
"responseformat",
|
|
11826
11826
|
"stream",
|
|
11827
11827
|
"streamoptions",
|
|
11828
|
-
"enablethinking"
|
|
11828
|
+
"enablethinking",
|
|
11829
|
+
"chattemplatekwargs"
|
|
11829
11830
|
];
|
|
11830
11831
|
EXTRA_PARAMS_CREDENTIAL_KEYS = [
|
|
11831
11832
|
"authorization",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.9.0-rc.
|
|
3
|
+
"version": "0.9.0-rc.5",
|
|
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": [
|
package/schemas/akm-task.json
CHANGED
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"description": "Provider-specific request fields. Top-level AKM-owned fields are forbidden; credential-shaped keys are forbidden recursively after lowercase/non-alphanumeric normalization.",
|
|
61
61
|
"propertyNames": {
|
|
62
62
|
"not": {
|
|
63
|
-
"enum": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
63
|
+
"enum": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "chattemplatekwargs", "authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"additionalProperties": { "$ref": "#/definitions/extraParamValue" },
|
|
67
|
-
"x-akm-protectedTopLevelNormalizedKeys": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking"],
|
|
67
|
+
"x-akm-protectedTopLevelNormalizedKeys": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "chattemplatekwargs"],
|
|
68
68
|
"x-akm-recursivelyForbiddenNormalizedKeys": ["authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
69
69
|
},
|
|
70
70
|
"extraParamValue": {
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
"description": "Provider-specific request fields. Top-level AKM-owned fields are forbidden; credential-shaped keys are forbidden recursively after lowercase/non-alphanumeric normalization.",
|
|
87
87
|
"propertyNames": {
|
|
88
88
|
"not": {
|
|
89
|
-
"enum": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
89
|
+
"enum": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "chattemplatekwargs", "authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
"additionalProperties": { "$ref": "#/definitions/extraParamValue" },
|
|
93
|
-
"x-akm-protectedTopLevelNormalizedKeys": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking"],
|
|
93
|
+
"x-akm-protectedTopLevelNormalizedKeys": ["model", "messages", "temperature", "maxtokens", "responseformat", "stream", "streamoptions", "enablethinking", "chattemplatekwargs"],
|
|
94
94
|
"x-akm-recursivelyForbiddenNormalizedKeys": ["authorization", "headers", "apikey", "token", "password", "secret", "cookie", "setcookie"]
|
|
95
95
|
},
|
|
96
96
|
"extraParamValue": {
|
package/docs/README.md
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# Documentation
|
|
2
|
-
|
|
3
|
-
## Getting Started
|
|
4
|
-
|
|
5
|
-
- [Concepts](concepts.md) -- Stashes, registries, asset types, and refs
|
|
6
|
-
- [Getting Started](getting-started.md) -- Quick setup guide
|
|
7
|
-
- [Local Development](local-development.md) -- Dogfooding akm while editing its own source
|
|
8
|
-
- [Agent Install Guide](agents/agent-install.md) -- Step-by-step automated install for agents
|
|
9
|
-
- [Stash Maker's Guide](stash-makers.md) -- Build and share a stash on GitHub, npm, or a network directory
|
|
10
|
-
- [Wikis](wikis.md) -- Multi-wiki knowledge bases (Karpathy-style)
|
|
11
|
-
|
|
12
|
-
## Configuration & Data
|
|
13
|
-
|
|
14
|
-
- [Configuration](configuration.md) -- Providers, settings, and Ollama setup
|
|
15
|
-
- [Configuration](configuration.md#engines) -- Named LLM and agent engines
|
|
16
|
-
- [Data & Telemetry](data-and-telemetry.md) -- Exactly what akm reads and writes on your machine (no remote telemetry)
|
|
17
|
-
|
|
18
|
-
## Features
|
|
19
|
-
|
|
20
|
-
- [Workflows](features/workflows.md) -- Structured, resumable multi-step procedures
|
|
21
|
-
- [Search & Discovery](features/search-discovery.md) -- Finding assets without knowing their exact name
|
|
22
|
-
- [Knowledge Management](features/knowledge-management.md) -- Lessons, incidents, and research as first-class assets
|
|
23
|
-
- [Sources & Registries](features/sources-registries.md) -- Where assets come from and how to find more
|
|
24
|
-
- [Wiki Snapshot Fetchers](features/wiki-snapshot-fetchers.md) -- Pluggable fetchers for URL-based knowledge reads
|
|
25
|
-
- [Agent Integration](features/agent-integration.md) -- Wiring akm into any shell-capable coding agent
|
|
26
|
-
- [The Improvement Loop](features/improvement-loop.md) -- How the stash adapts from usage and feedback
|
|
27
|
-
|
|
28
|
-
## Upgrading
|
|
29
|
-
|
|
30
|
-
- [Roadmap](roadmap.md) -- High-level focus for the 0.9 and 1.0 releases
|
|
31
|
-
- [v0.8 -> v0.9 migration guide](migration/v0.8-to-v0.9.md) -- Current-cycle breaking changes
|
|
32
|
-
- [Release notes (latest: 0.9.0)](migration/release-notes/0.9.0.md) -- Per-release notes; see the [release-notes index](migration/release-notes/README.md) for every version
|
|
33
|
-
- [v0.5 -> v0.6 migration guide](migration/v0.5-to-v0.6.md) -- Every breaking change with before/after code, publisher checklist, and troubleshooting
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [CLI](cli.md) -- All `akm` commands and flags
|
|
38
|
-
- [Registry](registry.md) -- Registries, search, hosting, and managing sources
|
|
39
|
-
- [akm-eval](akm-eval.md) -- Standalone toolkit for measuring whether `akm improve` is working
|
|
40
|
-
|
|
41
|
-
## Agents
|
|
42
|
-
|
|
43
|
-
- [AGENTS.md](agents/AGENTS.md) -- The system-prompt reference agents load to use akm
|
|
44
|
-
- [Curate Workmap](agents/curate-workmap.md) -- Read before changing `akm curate` ranking or output
|
|
45
|
-
|
|
46
|
-
## Architecture
|
|
47
|
-
|
|
48
|
-
- [Architecture](technical/architecture.md) -- How akm's sources, cache, index, and registries fit together
|
|
49
|
-
- [Runtime Boundary Design](architecture/runtime-boundary-design.md) -- Isolating `bun:sqlite`/`Bun.*` from the core
|
|
50
|
-
- [Brain Workflow (diagram)](architecture/brain-workflow.html) -- Visual map of the improve/self-learning loop
|
|
51
|
-
|
|
52
|
-
## Example Stash
|
|
53
|
-
|
|
54
|
-
- [Example Stash](example-stash/README.md) -- A documentation-backed example stash showing how asset types fit together
|
|
55
|
-
|
|
56
|
-
## Analysis
|
|
57
|
-
|
|
58
|
-
- [Indexer Vertical Slice Refactor Plan](analysis/indexer-vertical-slice-refactor-plan.md)
|
|
59
|
-
- [Indexer Refactor Review (Expert Options)](analysis/indexer-refactor-expert-options.md)
|
|
60
|
-
|
|
61
|
-
## Design (unshipped work)
|
|
62
|
-
|
|
63
|
-
- [Self-Improvement, Self-Learning & Memory Reference Index](design/self-improvement-learning-memory-reference-index.md) -- Master index for every unshipped improve/self-learning/memory design doc, with a subsystem-to-doc status table
|
|
64
|
-
|
|
65
|
-
Every doc under `docs/design/` must carry a `Status` / `Supersedes` / `Date` header (pre-existing docs are grandfathered until next touched). When a design ships, the shipping PR moves it to `docs/archive/` in the same PR.
|
|
66
|
-
|
|
67
|
-
## Archive
|
|
68
|
-
|
|
69
|
-
- [Archive](archive/README.md) -- Design and implementation plans whose work has already shipped, retained as ADR-style records
|
|
70
|
-
|
|
71
|
-
## Internals (technical/)
|
|
72
|
-
|
|
73
|
-
- [Filesystem](technical/filesystem.md) -- Directory layout plus `.stash.json` deprecation and migration notes
|
|
74
|
-
- [Search](technical/search.md) -- Hybrid search architecture and scoring
|
|
75
|
-
- [Indexing](technical/indexing.md) -- How the search index is built
|
|
76
|
-
- [Classification](technical/classification.md) -- Matcher and renderer behavior
|
|
77
|
-
- [Storage Locations](technical/storage-locations.md) -- Authoritative inventory of every on-disk read/write path
|
|
78
|
-
- [Improve Workflow](technical/improve-workflow.md) -- `akm improve` command surface and pipeline reference
|
|
79
|
-
- [Health Advisories](technical/health-advisories.md) -- `akm health` advisory-to-action map for operators
|
|
80
|
-
- [Fresh-Host Rebuild Runbook](technical/fresh-host-rebuild-runbook.md) -- Rebuild an akm install on a new machine
|
|
81
|
-
- [Ranking Ablation & Saturation Analysis](technical/ranking-ablation-and-saturation-analysis.md) -- Reproducible contributor-ablation measurement and the score-saturation trap
|
|
82
|
-
- [Functional Contract Patterns](technical/functional-contract-patterns.md) -- Quick reference for contributor pipelines and small process contracts
|
|
83
|
-
- [Test Coverage Guide](technical/test-coverage-guide.md) -- High-value testing areas
|
|
84
|
-
- [Testing Workflow](technical/testing-workflow.md) -- End-to-end, Docker, deployment, and upgrade validation
|
|
85
|
-
- [Ref Format](technical/ref.md) -- Wire format for asset references
|
|
86
|
-
- [Core Principles](technical/akm-core-principles.md) -- Design principles and constraints
|
|
87
|
-
- [Claude Code workflows vs. akm workflows](technical/claude-code-vs-akm-workflows.md) -- Comparing the two things that share a name
|
|
88
|
-
- [Workflow source and IR](features/workflows.md) -- Current workflow execution model
|
|
89
|
-
|
|
90
|
-
## Official Ecosystem Repositories
|
|
91
|
-
|
|
92
|
-
- [itlackey/akm-stash](https://github.com/itlackey/akm-stash) -- the official onboarding stash with ready-made assets you can install with `akm add`
|
|
93
|
-
- [itlackey/akm-registry](https://github.com/itlackey/akm-registry) -- the official registry index that powers built-in discovery
|
|
94
|
-
- [itlackey/akm-plugins](https://github.com/itlackey/akm-plugins) -- optional integrations for tools like OpenCode
|
|
95
|
-
- [itlackey/akm-bench](https://github.com/itlackey/akm-bench) -- the standalone benchmark and evaluation repo for akm
|
|
96
|
-
|
|
97
|
-
## Posts
|
|
98
|
-
|
|
99
|
-
- [Blog posts](posts/) -- Articles and posts about akm
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
New docs, in five lines: keep one current-truth doc per subsystem, don't fork a second one. Unshipped designs live in `docs/design/` with a mandatory `Status` / `Supersedes` / `Date` header. The PR that ships the design moves its doc to `docs/archive/` in that same PR. Cite code by symbol and memories by search-terms -- not line numbers or exact refs, both rot. Nothing in `docs/` may reference `.plans/` (it's scratch -- promote the content or drop the link); no new improve-analysis docs until the 30-clean-day gate.
|