akm-cli 0.10.261015-beta → 0.10.261017-beta

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.
Files changed (124) hide show
  1. package/CHANGELOG.md +173 -0
  2. package/README.md +8 -10
  3. package/SECURITY.md +7 -99
  4. package/STABILITY.md +58 -98
  5. package/dist/assets/hints/cli-hints-full.md +6 -4
  6. package/dist/assets/hints/cli-hints-short.md +4 -2
  7. package/dist/assets/opencode/akm-plugin.js +16 -8
  8. package/dist/assets/prompts/workflow-unit-preamble.md +3 -1
  9. package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +2 -2
  10. package/dist/assets/stash-skeleton/facts/conventions/organization.md +11 -17
  11. package/dist/cli.js +32 -41
  12. package/dist/commands/feedback-cli.js +5 -4
  13. package/dist/commands/health/plugin-staleness.js +86 -22
  14. package/dist/commands/health.js +15 -16
  15. package/dist/commands/proposal/proposal-cli.js +1 -1
  16. package/dist/commands/read/registry-search.js +4 -1
  17. package/dist/commands/read/search-cli.js +2 -2
  18. package/dist/commands/read/search.js +6 -6
  19. package/dist/commands/read/show.js +15 -3
  20. package/dist/commands/sources/self-update.js +9 -5
  21. package/dist/commands/tasks/tasks.js +12 -13
  22. package/dist/core/adapter/adapters/agent-skills-adapter.js +7 -7
  23. package/dist/core/adapter/adapters/akm-task-adapter.js +1 -1
  24. package/dist/core/adapter/adapters/akm-workflow-adapter.js +1 -1
  25. package/dist/core/adapter/adapters/claude-adapter.js +1 -1
  26. package/dist/core/adapter/adapters/dotenv-adapter.js +1 -1
  27. package/dist/core/adapter/adapters/generic-files-adapter.js +1 -1
  28. package/dist/core/adapter/adapters/llm-wiki-adapter.js +1 -1
  29. package/dist/core/adapter/adapters/opencode-adapter.js +1 -1
  30. package/dist/core/adapter/adapters/website-snapshot-adapter.js +1 -1
  31. package/dist/core/asset/markdown.js +9 -0
  32. package/dist/core/bundle-rename.js +17 -7
  33. package/dist/core/config/config-walker.js +35 -32
  34. package/dist/core/config/schema/connections.js +6 -3
  35. package/dist/core/config/schema/harnesses.js +8 -1
  36. package/dist/core/config/schema/primitives.js +12 -1
  37. package/dist/core/config/schema/sources-bundles.js +2 -2
  38. package/dist/core/npm-package.js +48 -13
  39. package/dist/indexer/bundle-identity-guard.js +6 -6
  40. package/dist/indexer/index-written-assets.js +3 -3
  41. package/dist/indexer/indexer.js +12 -8
  42. package/dist/indexer/materialize-embeddings.js +12 -2
  43. package/dist/indexer/passes/metadata.js +103 -46
  44. package/dist/indexer/search/ranking.js +7 -3
  45. package/dist/indexer/search/search-fields.js +1 -1
  46. package/dist/indexer/usage/usage-events.js +30 -8
  47. package/dist/indexer/walk/walker.js +1 -1
  48. package/dist/output/renderers.js +2 -2
  49. package/dist/output/shapes/helpers.js +5 -3
  50. package/dist/output/text/command-format.js +5 -6
  51. package/dist/output/text/show-format.js +7 -0
  52. package/dist/registry/semver.js +12 -0
  53. package/dist/scripts/akm-migrate-node.js +21653 -5734
  54. package/dist/scripts/akm-migrate.js +21661 -5742
  55. package/dist/sources/providers/git-provider.js +2 -4
  56. package/dist/sources/providers/provider-utils.js +8 -13
  57. package/dist/sources/snapshot-fetchers/website-ingest.js +6 -7
  58. package/dist/storage/repositories/events-repository.js +15 -0
  59. package/dist/storage/repositories/improve-ledger-repository.js +13 -0
  60. package/dist/storage/repositories/index-entries-repository.js +43 -5
  61. package/dist/storage/repositories/outcome-repository.js +12 -0
  62. package/dist/storage/repositories/proposals-repository.js +5 -5
  63. package/dist/storage/repositories/salience-repository.js +13 -0
  64. package/dist/storage/repositories/task-history-repository.js +8 -7
  65. package/dist/storage/repositories/workflow-runs-repository.js +10 -8
  66. package/dist/tasks/backends/cron.js +19 -0
  67. package/docs/README.md +24 -60
  68. package/docs/agents/README.md +3 -8
  69. package/docs/architecture/README.md +18 -20
  70. package/docs/architecture/adapters.md +40 -43
  71. package/docs/architecture/architecture.md +171 -151
  72. package/docs/architecture/improvement.md +95 -91
  73. package/docs/architecture/internals/classification.md +101 -119
  74. package/docs/architecture/internals/fresh-host-rebuild-runbook.md +33 -35
  75. package/docs/architecture/internals/health-advisories.md +59 -46
  76. package/docs/architecture/internals/improve-workflow.md +166 -693
  77. package/docs/architecture/internals/indexing.md +65 -465
  78. package/docs/architecture/internals/storage-locations.md +301 -848
  79. package/docs/architecture/persisted-data-compat.md +6 -6
  80. package/docs/architecture/specs/okf-support.md +67 -95
  81. package/docs/architecture/specs/ref.md +67 -124
  82. package/docs/architecture/testing/testing-workflow.md +114 -175
  83. package/docs/architecture/workflow-engine.md +34 -33
  84. package/docs/guides/README.md +5 -5
  85. package/docs/guides/author-bundles.md +72 -98
  86. package/docs/guides/author-workflows.md +11 -18
  87. package/docs/guides/bundles.md +91 -123
  88. package/docs/guides/capture-knowledge.md +10 -9
  89. package/docs/guides/concepts.md +45 -30
  90. package/docs/guides/discover-and-load.md +51 -36
  91. package/docs/guides/getting-started.md +27 -26
  92. package/docs/guides/improve-the-library.md +98 -80
  93. package/docs/guides/recipes/headless-install.md +4 -4
  94. package/docs/guides/recipes/website-source.md +9 -5
  95. package/docs/guides/run-workflows.md +10 -11
  96. package/docs/guides/scheduling.md +11 -17
  97. package/docs/guides/use-with-any-agent.md +15 -11
  98. package/docs/guides/wikis.md +6 -9
  99. package/docs/integration/bundling-akm.md +21 -26
  100. package/docs/maintainers/README.md +2 -2
  101. package/docs/maintainers/local-development.md +3 -16
  102. package/docs/maintainers/release-checklist.md +15 -8
  103. package/docs/migration/README.md +2 -1
  104. package/docs/migration/release-notes/0.10.0.md +167 -22
  105. package/docs/migration/release-notes/README.md +2 -2
  106. package/docs/migration/v0.9-to-v0.10.md +47 -7
  107. package/docs/product-surface.md +10 -8
  108. package/docs/reference/README.md +26 -15
  109. package/docs/reference/asset-types.md +11 -12
  110. package/docs/reference/bundle-types.md +6 -5
  111. package/docs/reference/cli.md +74 -31
  112. package/docs/reference/configuration.md +46 -60
  113. package/docs/reference/data-and-telemetry.md +204 -421
  114. package/docs/reference/env-and-secrets.md +80 -83
  115. package/docs/reference/memory.md +1 -1
  116. package/docs/reference/refs.md +23 -36
  117. package/docs/reference/registry.md +138 -348
  118. package/docs/reference/supported-formats.md +8 -8
  119. package/docs/reference/tasks.md +13 -19
  120. package/docs/reference/website-sources.md +23 -15
  121. package/docs/reference/workflow-schema.md +28 -47
  122. package/docs/reference/workflows.md +33 -37
  123. package/package.json +4 -4
  124. package/schemas/akm-config.json +535 -302
package/CHANGELOG.md CHANGED
@@ -6,6 +6,168 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.10.261017] - 2026-10-27
10
+
11
+ ### Changed
12
+
13
+ - `akm search` finds knowledge whose answer sits in fenced code (#1260). The
14
+ `content` search projection now keeps the identifiers of fenced code (names,
15
+ CLI flags, config keys, paths, dotted references such as `process.env.CI`)
16
+ and still drops their literal values (quoted strings, assignment values, URLs,
17
+ long token-like strings). On akm-eval's code-lookup set nDCG@10 rose from
18
+ 0.530 to 0.764 (keyword) and 0.494 to 0.614 (semantic); the library set
19
+ improved slightly and the prose-only books set is unchanged. Search results
20
+ carry no `content`, so what search hands an agent is the same size. Fragments,
21
+ fragment ids and `akm show` are unchanged. The next `akm index` (including the
22
+ one `akm upgrade` runs) re-projects every directory once and re-embeds only
23
+ the entries whose embedded text changed; no `--full` needed.
24
+
25
+ ### Fixed
26
+
27
+ - The first `akm index` after upgrading re-embeds only the entries whose
28
+ embedded text changed (follow-up to #1260). The fenced-code identifiers now in
29
+ the search text come after the prose, past the first `embedding.maxInputTokens`
30
+ (default 512, about 2,048 characters) that are embedded, so a longer document
31
+ keeps its vector and only its keyword row is rewritten. The index prints how
32
+ many entries it is embedding (`Embedding 3,712 changed entries (15,050
33
+ unchanged)`), and `akm upgrade` shows that line and the rest of the index's
34
+ progress instead of waiting silently.
35
+ - Documentation sentences that were false on 0.10 are corrected (review of
36
+ #1273, #1251 follow-up). `asset-types.md` lists every way an env or secret
37
+ value reaches a process. `classification.md` says that `akm`, `okf`, `claude`,
38
+ `opencode` and `generic-files` reserve `index.md` and `log.md` at every depth
39
+ and `llm-wiki` reserves `schema.md`, `index.md` and `log.md` only at the wiki
40
+ root (`adapters.md` agrees), and that a `.yml` under `workflows/` is typed
41
+ `workflow`, then skipped at index time. `ref.md`, `workflow-engine.md` (no
42
+ isolated units; a plan from a newer akm is refused unread) and `workflows.md`
43
+ say 0.10. `configuration.md` and the stash skeleton's `backlinks.md` no longer
44
+ call `content` the lowest-weight search field: BM25 weighs the five fields
45
+ equally. The skeleton's `organization.md` no longer calls the name the
46
+ highest-weighted field or promises repo-match, tag-match or per-project
47
+ ranking boosts, which search does not have. `persisted-data-compat.md` has its
48
+ downgrade warning for retire proposals back. A bare `akm proposal drain`
49
+ follows the apply mode of `improve.strategy` (`default`, which promotes,
50
+ unless set); the `--promote` help text, `cli.md` and the improve guide said it
51
+ queues (whether it should is #1274). The feedback pages and
52
+ `akm feedback --help` say that in keyword-only search one vote moves a hit
53
+ one place whatever the keyword margin, and that with embeddings it breaks
54
+ only near-ties, where they said feedback does not override relevance. The
55
+ `AKM_REGISTRY_URL` rows say it replaces the configured registries in every
56
+ registry search. The migration guide and the 0.10.0 release notes name the
57
+ full refs `akm env` and `akm secret` now require, the removed
58
+ `akm search --assets`, the end of the index's bundle refresh, the retired
59
+ `secret://` and `${secret:NAME}`, the `--belief current` default, the
60
+ Codex and Aider flags akm no longer passes, 0.9 retire proposals, the
61
+ `akm health` warning where local embeddings are not offered, the dropped JSON
62
+ fields, the workflow redaction scope, and (in the notes) the frontmatter date
63
+ keys, symlinked and trimmed secrets, the SIGINT-first stop and the Claude Code
64
+ and Codex plugin branches, and no longer list `GET /api/config` as a breaking
65
+ change (`akm ui` is new in 0.10). The fixture READMEs match the code.
66
+ - **`akm bundle rename` keeps the bundle's recorded feedback** (#1250). It rewrote
67
+ proposals, task history and workflow refs but left `usage_events` under the old
68
+ prefix, so after a rename no feedback counted in search ranking for any asset
69
+ in the bundle, improve stopped reading its feedback, and the next `akm index`
70
+ cut the events off from their entries. It now moves the bundle's
71
+ `usage_events`, `events`, `improve_ledger`, `asset_salience` and
72
+ `asset_outcome` rows to the new name too, and matches the old name
73
+ case-sensitively, so renaming `team` no longer moves or overwrites the rows of
74
+ a bundle named `Team`.
75
+ - A negative whose exact fix was applied no longer keeps demoting the corrected
76
+ asset in `akm search` and `akm curate` (#1249). A negative recorded with
77
+ `--replace`/`--with`, `--superseded-by` or `--outdated` stops counting against
78
+ the asset once its fix is accepted, the same "already acted on" rule
79
+ `akm improve` uses; reverting the fix with `akm proposal revert` makes the
80
+ negative count again. A fix the accept refused, and every negative without a
81
+ fix, still lower the asset's ranking.
82
+ - **The architecture and CLI reference pages now say that feedback reorders search hits
83
+ (#1251).** They said a hit's `score` was its fused score and that nothing else changed the
84
+ order. They now say that after fusion the score is multiplied by
85
+ `1 + 0.03 × (ln(1 + positives) − ln(1 + negatives))` over the user's recorded feedback for
86
+ the asset, the list is re-sorted (equal scores by fully qualified ref), and
87
+ one-hit-per-file and identical-content deduplication then drop entries without reordering
88
+ it. They also say filters drop ineligible entries from each candidate list before its 100
89
+ candidates are taken, not from the fused list afterwards. The storage, indexing, registry
90
+ and improve-guide pages no longer say that search ranking reads the utility score: improve
91
+ and `akm metrics` read it, search does not.
92
+ - `AKM_REGISTRY_URL` now takes effect in `akm search` and `akm curate` with
93
+ `--from registry` or `--from all` (#1275). The variable is meant to replace the
94
+ configured registries, but search always passed the configured list, which
95
+ won, so a mirror or CI override was never read and your `registries` were
96
+ queried instead. When it is set, only its comma-separated URLs are searched.
97
+
98
+ ## [0.10.261016] - 2026-10-27
99
+
100
+ ### Added
101
+
102
+ - `akm show` returns a Markdown document's outline as `toc` (#1259): one
103
+ `{ level, text, slug, startLine }` entry per heading, at every `--detail`
104
+ level. `akm show <ref> --detail brief` is the outline without the body, and
105
+ every `slug` selects its section with `akm show <ref>#<slug>`, repeated
106
+ headings included. The outline is read from the file the section is cut
107
+ from. Fragment shows, non-Markdown assets and documents with no headings
108
+ carry no `toc`. The knowledge `action`, `akm show --help`, the unmatched
109
+ fragment error, `akm hints` and the OpenCode runtime's `akm_show` tool (which
110
+ takes `detail: "brief"`) now point agents at the outline first, then the
111
+ sections they need.
112
+
113
+ ### Changed
114
+
115
+ - The Release workflow waits for CI on the commit it publishes, up to 25 minutes,
116
+ instead of failing when that run has not finished, so Release can be dispatched
117
+ right after the release commit is pushed. It still fails when CI failed or was
118
+ cancelled, and only the newest push or manual CI run counts: a pull request's
119
+ run tests a merge and, on a draft, skips the upgrade rehearsal.
120
+ `tests/release-check.sh` no longer repeats the upgrade rehearsal that CI runs on
121
+ the same commit.
122
+ - `bun run check:ci` runs the pre-push check the way CI does (in a Docker
123
+ container with the Bun and Node versions `ci.yml` pins, a clean frozen install,
124
+ `CI=true` and four test shards); `.github/CONTRIBUTING.md` says when to run it.
125
+
126
+ ### Fixed
127
+
128
+ - Two processes fetching the OpenCode binary akm's own runtime runs (or the local
129
+ embedder's ONNX Runtime files) into an empty cache at once no longer rename
130
+ their copies over each other (#1266). Each downloaded the package and renamed
131
+ its file into place, which unlinks a binary the other process is already
132
+ running (it then fails to start it again). One fetch now runs per cache
133
+ directory at a time, under a `fetch.lock` file in it (a dead holder's lock is
134
+ reclaimed); a process that finds the files in place once it holds the lock
135
+ downloads nothing, and a rename never replaces a file that is already whole.
136
+ - `akm health`'s `plugin-version` advisory no longer reports a Claude Code
137
+ plugin on the `next` channel as stale against the 0.9 stable release. It read
138
+ the newest version with a semver rule that skips every prerelease. It now reads
139
+ the channel the marketplace clone follows: on `next`, the release tag on that
140
+ branch's head; on the default branch, the newest stable tag; on a marketplace
141
+ added at a tag, that tag.
142
+ - When `crontab -l` cannot read the crontab spool (permission denied) in a
143
+ process started with no-new-privileges (an agent sandbox, a container, systemd
144
+ `NoNewPrivileges=`), akm says why: `crontab` reads the spool through its setgid
145
+ (or setuid) bit, which such a process does not grant. `akm health` and
146
+ `akm task` commands run from such a process used to repeat a bare
147
+ `fopen: Permission denied`. A refusal without no-new-privileges is reported as
148
+ before.
149
+ - `akm health`'s `opencode-plugin-version` advisory reads the OpenCode 1 plugin
150
+ cache of the spec the global OpenCode config names (#1265). It read only
151
+ `packages/akm-opencode`, but OpenCode 1 caches each spec in its own folder, so
152
+ a host with `"plugin": ["akm-opencode@next"]` (cached in
153
+ `packages/akm-opencode@next`) showed no row at all. It now reads the one folder
154
+ of the spec under `plugin`: a bare name is `akm-opencode@latest`, as
155
+ `akm upgrade` reads it, and `akm-opencode@next` is its own folder. A version
156
+ pin (`akm-opencode@<version>`) is reported as pinned, with no staleness
157
+ verdict. With no entry, or no folder for it, the check reads
158
+ `packages/akm-opencode` as before; other cached specs are not scanned.
159
+
160
+ ### Security
161
+
162
+ - Zod moves from 3.25.76 to 4.6.7 (`zod` `^4.6.6`), closing GHSA-mrhx-c7xc-m3w5 /
163
+ CVE-2023-54404 (high): Zod before 4.6.6 can exhaust memory validating a large array,
164
+ and no Zod 3 release has the fix. akm validates its config files with Zod. Visible
165
+ changes: an integer above 2^53 - 1 in a config file is now rejected; validation
166
+ messages are Zod 4's (an unknown enum value reads `Invalid option: expected one of ...`);
167
+ `schemas/akm-config.json` is generated with `z.toJSONSchema` (the `zod-to-json-schema`
168
+ dev dependency is gone): `additionalProperties: true` is written `{}` (the same), integers
169
+ state the new `maximum: 9007199254740991`, and every map states its `propertyNames`.
170
+
9
171
  ## [0.10.261015] - 2026-10-27
10
172
 
11
173
  ### Changed
@@ -1485,6 +1647,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1485
1647
  schema rejection: one retry without the schema, remembered for the connection. `gpt-oss:120b` through the lab
1486
1648
  gateway needed `supportsJsonSchema: false` set by hand. Other 5xx answers keep the transient-retry path. (#1150)
1487
1649
 
1650
+ ## [0.9.32] - 2026-10-13
1651
+
1652
+ A patch release: `akm feedback` no longer reports success for feedback it could not store.
1653
+
1654
+ ### Fixed
1655
+
1656
+ - **`akm feedback` fails when it cannot record the feedback.** When `state.db` was read-only to the process, as it is
1657
+ inside an agent sandbox that only allows writes in the workspace, the feedback row was silently dropped and the
1658
+ command still printed `"ok": true`. It now fails with a `DATA_DIR_NOT_WRITABLE` config error (exit 78) and records
1659
+ nothing, so an agent knows its feedback was lost. Add akm's data directory to the sandbox's writable paths.
1660
+
1488
1661
  ## [0.9.31] - 2026-10-09
1489
1662
 
1490
1663
  A patch release: concurrent config writes no longer lose a change, OpenAI's reasoning models work as `llm`
package/README.md CHANGED
@@ -69,14 +69,12 @@ akm show scripts/deploy.sh # View details and run command
69
69
  - **One library for every agent** -- Use the same capability library from Claude Code, OpenCode, Cursor, Aider, Windsurf, or any assistant that can run shell commands.
70
70
  - **Load only what the task needs** -- Search or curate a shortlist, then load full content by ref. No giant startup prompt is required.
71
71
  - **Package complete capabilities** -- Install and share bundles containing skills, scripts, workflows, agents, instructions, memories, and knowledge -- not just prompt snippets.
72
- - **Improve through evidence, with review** -- Feedback re-ranks assets right away. A negative report can carry an exact text fix, and `akm improve` repairs metadata; every edit lands as a diffable proposal you accept, reject or revert, and only writable bundles are changed.
73
- - **Turn knowledge into repeatable work** -- Run persisted workflows with dispatch, gates, retries, budgets, and resume instead of reconstructing a process from prose every session.
72
+ - **Improve through evidence, with review** -- Feedback re-ranks assets right away. A negative report can carry an exact text fix, and `akm improve` repairs metadata. Edits land as diffable proposals: the default improve strategy accepts the ones its quality judge passed, the rest wait for you to accept or reject, and any accept can be reverted. Only writable bundles are changed.
73
+ - **Turn knowledge into repeatable work** -- Run persisted workflows with dispatch, gates, retries, budgets, and resume instead of reconstructing a process from prose every session. Workflows are Experimental.
74
74
 
75
- akm retrieves every supported capability type. It directly orchestrates
76
- defined execution surfaces such as workflows, agent dispatch, tasks, and
77
- guarded subprocess injection -- it does not blindly execute arbitrary indexed
78
- content merely because that content appears in search results. It
79
- complements MCP and assistant-native skills rather than replacing them.
75
+ Search and show only return content; running a workflow, task, script, or
76
+ agent is a separate command. akm complements MCP and assistant-native skills
77
+ rather than replacing them.
80
78
 
81
79
  ## Agent Integration
82
80
 
@@ -90,7 +88,7 @@ knowledge, instructions, memories, workflows, env files, secrets, lessons, tasks
90
88
  sessions, and facts via the `akm` CLI. Use `akm -h` for details.
91
89
  ```
92
90
 
93
- Or generate it directly: `akm help agents >> AGENTS.md`
91
+ Or generate it directly: `akm hints --detail brief >> AGENTS.md`
94
92
 
95
93
  ## Documentation
96
94
 
@@ -99,8 +97,8 @@ Full docs, CLI reference, and guides are at **[akm.fwdslsh.dev](https://akm.fwds
99
97
  - [Getting Started](https://akm.fwdslsh.dev/docs/guides/getting-started/)
100
98
  - [Supported Formats](https://akm.fwdslsh.dev/docs/reference/supported-formats/)
101
99
  - [CLI Reference](https://akm.fwdslsh.dev/docs/reference/cli/)
102
- - [Task v3 Reference](https://akm.fwdslsh.dev/docs/reference/tasks/)
103
- - [0.9.2 Migration Guide](https://akm.fwdslsh.dev/docs/migration/v0.9.1-to-v0.9.2/)
100
+ - [Tasks Reference](https://akm.fwdslsh.dev/docs/reference/tasks/)
101
+ - [Migration guides](https://akm.fwdslsh.dev/docs/migration/README/)
104
102
  - [Configuration](https://akm.fwdslsh.dev/docs/reference/configuration/)
105
103
  - [Bundle Authoring Guide](https://akm.fwdslsh.dev/docs/guides/author-bundles/)
106
104
  - [Registry](https://akm.fwdslsh.dev/docs/reference/registry/)
package/SECURITY.md CHANGED
@@ -2,108 +2,16 @@
2
2
 
3
3
  ## Supported versions
4
4
 
5
- Security fixes are made on the latest minor release line of `akm-cli`. The
6
- 0.x line is pre-1.0 — please upgrade promptly when a fix lands.
7
-
8
5
  | Version | Supported |
9
6
  | --- | --- |
10
- | 0.9.x | ✅ active |
11
- | 0.8.x | ❌ no longer maintained |
12
- | < 0.8 | ❌ no longer maintained |
7
+ | 0.10.x | Yes |
8
+ | Older | No |
13
9
 
14
10
  ## Reporting a vulnerability
15
11
 
16
- Please report security issues **privately** via GitHub Security Advisories:
17
-
18
- - https://github.com/itlackey/akm/security/advisories/new
19
-
20
- If GitHub Security Advisories is unavailable, email `itlackey@gmail.com`
21
- with the word `SECURITY` in the subject. Please include reproduction steps,
22
- the impacted akm version, and your operating environment.
23
-
24
- We will acknowledge receipt within 72 hours and aim to ship a fix or a
25
- mitigation guidance within two weeks, depending on severity.
26
-
27
- ## Threat model
28
-
29
- `akm` is a local CLI that reads and writes user files, executes user-authored
30
- shell commands (via scripts, workflows, and agent dispatch), and talks to
31
- explicitly configured external services (LLM endpoints, git remotes, npm,
32
- HTTP sources). It does **not** ship telemetry, send data to anyone by
33
- default, or open network listeners. See
34
- [`docs/reference/data-and-telemetry.md`](docs/reference/data-and-telemetry.md) for the on-disk
35
- inventory.
36
-
37
- Several akm surfaces execute user-controlled code or data with the full
38
- permissions of the akm process. These are documented design decisions, not
39
- bugs, but you should be aware of them:
40
-
41
- ### Workflows execute shell commands with full environment access
42
-
43
- Workflow steps run in your shell with your PATH and your environment
44
- variables — including any secrets you have exported or loaded via
45
- `akm env run` / `akm secret run`. **Only add workflow sources you trust.** See
46
- [`docs/guides/run-workflows.md` — "Security: workflow sources are executed
47
- code"](docs/guides/run-workflows.md#security-workflow-sources-are-executed-code)
48
- for the full discussion.
49
-
50
- ### Scripts execute shell commands
51
-
52
- `akm show scripts/<name>` returns a `run:` command line the user (or an
53
- integrating agent) then executes. The same trust model applies: scripts you
54
- install from third-party stashes are third-party code.
55
-
56
- ### Agents and commands embed user-authored prompts
57
-
58
- `akm show agents/<name>` and `akm show commands/<name>` return prompt
59
- templates and system prompts that an LLM will execute. A malicious stash
60
- maintainer could write a system prompt that instructs the LLM to read
61
- sensitive files in your working tree and exfiltrate them via the LLM
62
- response. Audit the prompt body the same way you'd audit a script.
63
-
64
- ### Installing a stash means trusting its code
65
-
66
- Installing a stash is not a data-only operation: **`<stashDir>/scripts/wiki-fetchers/*.{ts,js,mjs}` is imported and EXECUTED during `akm index`** (when a website-snapshot source in that stash is synced), with no gate, no prompt, and no allowlist. Every file in that directory is dynamically `import()`ed, and only *after* the module has fully evaluated does akm check that its default export looks like a fetcher (`{ name, matches, fetch }`) — module-level code (anything outside the exported functions) runs unconditionally before that check ever happens, and a file that fails the check still ran. There is no sandboxing: a wiki-fetcher script executes with the full permissions of the akm process, exactly like the scripts and workflow steps documented above.
67
-
68
- This is a deliberate design decision (owner ruling), not an oversight, and it will not change without a separate decision to add a gate. **If you install a stash from a source you do not trust, you are trusting its code to run on your machine at index time** — audit `scripts/wiki-fetchers/` the same way you would audit any other executable you're about to run, before installing.
69
-
70
- The built-in YouTube snapshot fetcher (`src/sources/snapshot-fetchers/youtube.ts`) deliberately **impersonates the YouTube Android app's InnerTube client** (`clientName: "ANDROID"`, a spoofed `clientVersion`) when calling YouTube's private `youtubei/v1/player` endpoint, because the public web client's caption URLs are Proof-of-Origin-Token gated and return empty bodies. This is known, intentional behavior needed to fetch captions at all, not a bug — documented here so it isn't mistaken for one.
71
-
72
- ### Environment and secret assets are plaintext on disk
73
-
74
- `env` and `secret` assets are owner-permissioned plaintext under `<stash>/env/`
75
- and `<stash>/secrets/`. They are protected against other local users by
76
- filesystem permissions but are not encrypted at rest. Do not commit these
77
- files to source control. Normal `akm env` and `akm secret` output never echoes
78
- values; materialize values only at the command boundary with `akm env run`
79
- or `akm secret run`.
80
-
81
- The knowledge graph extracted from your assets (entities/relations) lives
82
- only in `$DATA/index.db` and is surfaced as aggregate counts via `akm health`
83
- (`--report` for the full breakdown) — there is no export command that writes
84
- graph content to an arbitrary path.
85
-
86
- ### Improve / propose send asset content to the configured LLM
87
-
88
- `akm improve` (whose strategies run processes such as reflect, distill, and
89
- consolidate) and `akm proposal new` can send asset frontmatter and body to the
90
- connection (or harness) selected by the command, strategy, or current defaults.
91
- Connections live under `connections.<name>` in `~/.config/akm/config.json`,
92
- with their keys in the environment or in `~/.config/akm/credentials.json`. If you
93
- configure a third-party LLM, your asset content goes to that third party, and a
94
- harness you enable (Claude Code, Codex, ...) sends it wherever it is configured
95
- to. Use a local endpoint (for example, `http://localhost:11434/v1` via Ollama)
96
- for assets containing secrets or private notes.
97
-
98
- ## Known non-issues
12
+ Report security issues privately through GitHub Security Advisories:
13
+ <https://github.com/itlackey/akm/security/advisories/new>
99
14
 
100
- - **The `akm-cli` npm package requires Node.js >= 22 as its bootstrap.** A
101
- working Bun >= 1.0 is preferred for execution when it is also on `PATH`; old,
102
- unusable, or absent Bun installations fall back to Node.js. Bun does not
103
- remove the package's Node.js requirement. Standalone binaries are
104
- runtime-free. This is a compatibility limitation, not a security risk.
105
- - **Workflows can read any file the akm process can read.** This is not a
106
- bug — see "Threat model" above.
107
- - **Installing `akm-cli` runs no install script.** Neither `akm-cli` nor any
108
- package it depends on declares one. The Node.js version is checked when akm
109
- starts, not when it installs.
15
+ If that is unavailable, email `itlackey@gmail.com` with `SECURITY` in the
16
+ subject. Include reproduction steps, the akm version, and your operating
17
+ environment.