akm-cli 0.10.261016-beta → 0.10.261018-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.
- package/CHANGELOG.md +144 -0
- package/README.md +8 -10
- package/SECURITY.md +7 -99
- package/STABILITY.md +57 -98
- package/dist/assets/opencode/akm-plugin.js +103 -1
- package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +2 -2
- package/dist/assets/stash-skeleton/facts/conventions/organization.md +11 -17
- package/dist/cli.js +32 -41
- package/dist/commands/feedback-cli.js +5 -4
- package/dist/commands/health.js +15 -16
- package/dist/commands/proposal/proposal-cli.js +1 -1
- package/dist/commands/read/registry-search.js +4 -1
- package/dist/commands/read/search.js +6 -6
- package/dist/commands/sources/self-update.js +9 -5
- package/dist/commands/tasks/tasks.js +12 -13
- package/dist/core/adapter/adapters/agent-skills-adapter.js +7 -7
- package/dist/core/adapter/adapters/akm-task-adapter.js +1 -1
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +1 -1
- package/dist/core/adapter/adapters/claude-adapter.js +1 -1
- package/dist/core/adapter/adapters/dotenv-adapter.js +1 -1
- package/dist/core/adapter/adapters/generic-files-adapter.js +1 -1
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +1 -1
- package/dist/core/adapter/adapters/opencode-adapter.js +1 -1
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +1 -1
- package/dist/core/bundle-rename.js +17 -7
- package/dist/core/config/convert-engine-references.js +23 -7
- package/dist/core/config/convert-engines.js +94 -28
- package/dist/core/config/convert-models-overlay.js +14 -2
- package/dist/indexer/bundle-identity-guard.js +6 -6
- package/dist/indexer/index-written-assets.js +3 -3
- package/dist/indexer/indexer.js +12 -8
- package/dist/indexer/materialize-embeddings.js +12 -2
- package/dist/indexer/passes/metadata.js +103 -46
- package/dist/indexer/search/ranking.js +7 -3
- package/dist/indexer/search/search-fields.js +1 -1
- package/dist/indexer/usage/usage-events.js +30 -8
- package/dist/indexer/walk/walker.js +1 -1
- package/dist/integrations/agent/spawn.js +7 -2
- package/dist/integrations/harnesses/opencode/agent-builder.js +10 -1
- package/dist/integrations/harnesses/opencode/runtime/binary.js +6 -3
- package/dist/integrations/harnesses/opencode/runtime/index.js +18 -9
- package/dist/integrations/harnesses/opencode/session-log-v2.js +11 -1
- package/dist/output/shapes/helpers.js +3 -3
- package/dist/output/text/command-format.js +5 -6
- package/dist/scripts/akm-migrate-node.js +122 -36
- package/dist/scripts/akm-migrate.js +122 -36
- package/dist/sources/providers/git-provider.js +2 -4
- package/dist/sources/providers/provider-utils.js +8 -13
- package/dist/sources/snapshot-fetchers/website-ingest.js +6 -7
- package/dist/storage/repositories/events-repository.js +15 -0
- package/dist/storage/repositories/improve-ledger-repository.js +13 -0
- package/dist/storage/repositories/index-entries-repository.js +43 -5
- package/dist/storage/repositories/outcome-repository.js +12 -0
- package/dist/storage/repositories/proposals-repository.js +5 -5
- package/dist/storage/repositories/salience-repository.js +13 -0
- package/dist/storage/repositories/task-history-repository.js +8 -7
- package/dist/storage/repositories/workflow-runs-repository.js +10 -8
- package/docs/README.md +24 -60
- package/docs/agents/README.md +3 -8
- package/docs/architecture/README.md +18 -20
- package/docs/architecture/adapters.md +40 -43
- package/docs/architecture/architecture.md +180 -154
- package/docs/architecture/improvement.md +95 -91
- package/docs/architecture/internals/classification.md +101 -119
- package/docs/architecture/internals/fresh-host-rebuild-runbook.md +33 -35
- package/docs/architecture/internals/health-advisories.md +59 -46
- package/docs/architecture/internals/improve-workflow.md +166 -693
- package/docs/architecture/internals/indexing.md +65 -465
- package/docs/architecture/internals/storage-locations.md +301 -848
- package/docs/architecture/persisted-data-compat.md +6 -6
- package/docs/architecture/specs/okf-support.md +67 -95
- package/docs/architecture/specs/ref.md +67 -125
- package/docs/architecture/testing/testing-workflow.md +108 -168
- package/docs/architecture/workflow-engine.md +34 -33
- package/docs/guides/README.md +5 -5
- package/docs/guides/author-bundles.md +72 -98
- package/docs/guides/author-workflows.md +11 -18
- package/docs/guides/bundles.md +91 -123
- package/docs/guides/capture-knowledge.md +10 -9
- package/docs/guides/concepts.md +45 -30
- package/docs/guides/discover-and-load.md +39 -32
- package/docs/guides/getting-started.md +24 -24
- package/docs/guides/improve-the-library.md +98 -80
- package/docs/guides/recipes/headless-install.md +4 -4
- package/docs/guides/recipes/website-source.md +9 -5
- package/docs/guides/run-workflows.md +10 -11
- package/docs/guides/scheduling.md +11 -17
- package/docs/guides/use-with-any-agent.md +15 -14
- package/docs/guides/wikis.md +6 -9
- package/docs/integration/bundling-akm.md +21 -26
- package/docs/maintainers/README.md +2 -2
- package/docs/maintainers/local-development.md +3 -16
- package/docs/migration/README.md +2 -1
- package/docs/migration/release-notes/0.10.0.md +196 -23
- package/docs/migration/release-notes/README.md +2 -2
- package/docs/migration/v0.9-to-v0.10.md +103 -12
- package/docs/product-surface.md +10 -8
- package/docs/reference/README.md +26 -15
- package/docs/reference/asset-types.md +11 -12
- package/docs/reference/bundle-types.md +6 -5
- package/docs/reference/cli.md +52 -28
- package/docs/reference/configuration.md +91 -73
- package/docs/reference/data-and-telemetry.md +204 -421
- package/docs/reference/env-and-secrets.md +80 -83
- package/docs/reference/memory.md +1 -1
- package/docs/reference/refs.md +23 -36
- package/docs/reference/registry.md +138 -348
- package/docs/reference/supported-formats.md +8 -8
- package/docs/reference/tasks.md +13 -19
- package/docs/reference/website-sources.md +23 -15
- package/docs/reference/workflow-schema.md +28 -47
- package/docs/reference/workflows.md +33 -37
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,139 @@ 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.261018] - 2026-10-29
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- A run on akm's own runtime whose model makes the same tool call and gets the
|
|
14
|
+
same result three turns in a row now tells the model so, in a message that
|
|
15
|
+
names the tool and asks it to use the result it has or take a different
|
|
16
|
+
approach, in a request that raises a connection's temperature below 0.7 to
|
|
17
|
+
0.7 (that one request only; every other keeps the connection's settings, and
|
|
18
|
+
a connection that sets no temperature sends none), and fails with a message
|
|
19
|
+
that names the tool only if the model makes the call again, instead of
|
|
20
|
+
running to its deadline or, with no `timeoutMs`, for ever. Each session of a
|
|
21
|
+
run, a subagent's too, is told for itself. OpenCode has no check of its own
|
|
22
|
+
for this. The runtime
|
|
23
|
+
moves from OpenCode 2.1.4 to 2.2.0 with it: the next agent run fetches the
|
|
24
|
+
binary again, into `<akm cache dir>/opencode/2.2.0/`.
|
|
25
|
+
- Agent work on akm's own runtime runs in the directory it is given: the one
|
|
26
|
+
`akm agent --cwd` names, and the bundle root for a workflow's agent units.
|
|
27
|
+
It ran in the directory akm was started from, because OpenCode takes its
|
|
28
|
+
directory from `PWD`, which akm now sets for the run.
|
|
29
|
+
- A harness run in a directory (`akm agent --cwd`, a harness's `workspace`, the
|
|
30
|
+
scratch directory of model work) now has `PWD` naming that directory, as it
|
|
31
|
+
does for a program started after `cd`. OpenCode takes its directory from
|
|
32
|
+
`PWD`, not the working directory, so an `opencode` harness ran its shell and
|
|
33
|
+
file tools in the directory akm was started in. The spawn every harness
|
|
34
|
+
shares sets it, so any program that reads `PWD` gets the directory it runs in.
|
|
35
|
+
- OpenCode model work leaves out OpenCode's built-in browser plugin. From
|
|
36
|
+
OpenCode 2.2.0 its rules kept the `skill` tool listed for the read-only
|
|
37
|
+
`akm-model-work` agent (a call to it was refused).
|
|
38
|
+
- `akm migrate apply` keeps agent engines. 0.10.261014 to 0.10.261017 dropped
|
|
39
|
+
every `opencode-sdk` engine, so agent work moved from the user's own OpenCode
|
|
40
|
+
and model to akm's own runtime, and `harness:` selectors naming them failed.
|
|
41
|
+
An `opencode-sdk` engine with no `llmEngine` now becomes an `opencode` harness
|
|
42
|
+
with its `model`, `bin`, `workspace`, `agent` and `timeoutMs`; one over an
|
|
43
|
+
`llmEngine` stays akm's own runtime. A harness engine's own `model` stands
|
|
44
|
+
over `models.json`, and the notes say where agent work ran with no
|
|
45
|
+
`defaults.engine`, where a gate's judge ran and runs now, and, with no
|
|
46
|
+
`defaults.llmEngine` and no connection, that model work (improve, index
|
|
47
|
+
passes, extraction, judges) now runs on the default harness where 0.9 ran
|
|
48
|
+
none, and how to turn that off with `modelWork: false`. An `opencode-sdk`
|
|
49
|
+
engine's `args`, which 0.9 did not pass, are dropped with a note. A
|
|
50
|
+
config a beta already migrated is repaired from its pre-migration copy in
|
|
51
|
+
`<cache dir>/config-backups/` (migration guide, step 5).
|
|
52
|
+
|
|
53
|
+
## [0.10.261017] - 2026-10-27
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- `akm search` finds knowledge whose answer sits in fenced code (#1260). The
|
|
58
|
+
`content` search projection now keeps the identifiers of fenced code (names,
|
|
59
|
+
CLI flags, config keys, paths, dotted references such as `process.env.CI`)
|
|
60
|
+
and still drops their literal values (quoted strings, assignment values, URLs,
|
|
61
|
+
long token-like strings). On akm-eval's code-lookup set nDCG@10 rose from
|
|
62
|
+
0.530 to 0.764 (keyword) and 0.494 to 0.614 (semantic); the library set
|
|
63
|
+
improved slightly and the prose-only books set is unchanged. Search results
|
|
64
|
+
carry no `content`, so what search hands an agent is the same size. Fragments,
|
|
65
|
+
fragment ids and `akm show` are unchanged. The next `akm index` (including the
|
|
66
|
+
one `akm upgrade` runs) re-projects every directory once and re-embeds only
|
|
67
|
+
the entries whose embedded text changed; no `--full` needed.
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
|
|
71
|
+
- The first `akm index` after upgrading re-embeds only the entries whose
|
|
72
|
+
embedded text changed (follow-up to #1260). The fenced-code identifiers now in
|
|
73
|
+
the search text come after the prose, past the first `embedding.maxInputTokens`
|
|
74
|
+
(default 512, about 2,048 characters) that are embedded, so a longer document
|
|
75
|
+
keeps its vector and only its keyword row is rewritten. The index prints how
|
|
76
|
+
many entries it is embedding (`Embedding 3,712 changed entries (15,050
|
|
77
|
+
unchanged)`), and `akm upgrade` shows that line and the rest of the index's
|
|
78
|
+
progress instead of waiting silently.
|
|
79
|
+
- Documentation sentences that were false on 0.10 are corrected (review of
|
|
80
|
+
#1273, #1251 follow-up). `asset-types.md` lists every way an env or secret
|
|
81
|
+
value reaches a process. `classification.md` says that `akm`, `okf`, `claude`,
|
|
82
|
+
`opencode` and `generic-files` reserve `index.md` and `log.md` at every depth
|
|
83
|
+
and `llm-wiki` reserves `schema.md`, `index.md` and `log.md` only at the wiki
|
|
84
|
+
root (`adapters.md` agrees), and that a `.yml` under `workflows/` is typed
|
|
85
|
+
`workflow`, then skipped at index time. `ref.md`, `workflow-engine.md` (no
|
|
86
|
+
isolated units; a plan from a newer akm is refused unread) and `workflows.md`
|
|
87
|
+
say 0.10. `configuration.md` and the stash skeleton's `backlinks.md` no longer
|
|
88
|
+
call `content` the lowest-weight search field: BM25 weighs the five fields
|
|
89
|
+
equally. The skeleton's `organization.md` no longer calls the name the
|
|
90
|
+
highest-weighted field or promises repo-match, tag-match or per-project
|
|
91
|
+
ranking boosts, which search does not have. `persisted-data-compat.md` has its
|
|
92
|
+
downgrade warning for retire proposals back. A bare `akm proposal drain`
|
|
93
|
+
follows the apply mode of `improve.strategy` (`default`, which promotes,
|
|
94
|
+
unless set); the `--promote` help text, `cli.md` and the improve guide said it
|
|
95
|
+
queues (whether it should is #1274). The feedback pages and
|
|
96
|
+
`akm feedback --help` say that in keyword-only search one vote moves a hit
|
|
97
|
+
one place whatever the keyword margin, and that with embeddings it breaks
|
|
98
|
+
only near-ties, where they said feedback does not override relevance. The
|
|
99
|
+
`AKM_REGISTRY_URL` rows say it replaces the configured registries in every
|
|
100
|
+
registry search. The migration guide and the 0.10.0 release notes name the
|
|
101
|
+
full refs `akm env` and `akm secret` now require, the removed
|
|
102
|
+
`akm search --assets`, the end of the index's bundle refresh, the retired
|
|
103
|
+
`secret://` and `${secret:NAME}`, the `--belief current` default, the
|
|
104
|
+
Codex and Aider flags akm no longer passes, 0.9 retire proposals, the
|
|
105
|
+
`akm health` warning where local embeddings are not offered, the dropped JSON
|
|
106
|
+
fields, the workflow redaction scope, and (in the notes) the frontmatter date
|
|
107
|
+
keys, symlinked and trimmed secrets, the SIGINT-first stop and the Claude Code
|
|
108
|
+
and Codex plugin branches, and no longer list `GET /api/config` as a breaking
|
|
109
|
+
change (`akm ui` is new in 0.10). The fixture READMEs match the code.
|
|
110
|
+
- **`akm bundle rename` keeps the bundle's recorded feedback** (#1250). It rewrote
|
|
111
|
+
proposals, task history and workflow refs but left `usage_events` under the old
|
|
112
|
+
prefix, so after a rename no feedback counted in search ranking for any asset
|
|
113
|
+
in the bundle, improve stopped reading its feedback, and the next `akm index`
|
|
114
|
+
cut the events off from their entries. It now moves the bundle's
|
|
115
|
+
`usage_events`, `events`, `improve_ledger`, `asset_salience` and
|
|
116
|
+
`asset_outcome` rows to the new name too, and matches the old name
|
|
117
|
+
case-sensitively, so renaming `team` no longer moves or overwrites the rows of
|
|
118
|
+
a bundle named `Team`.
|
|
119
|
+
- A negative whose exact fix was applied no longer keeps demoting the corrected
|
|
120
|
+
asset in `akm search` and `akm curate` (#1249). A negative recorded with
|
|
121
|
+
`--replace`/`--with`, `--superseded-by` or `--outdated` stops counting against
|
|
122
|
+
the asset once its fix is accepted, the same "already acted on" rule
|
|
123
|
+
`akm improve` uses; reverting the fix with `akm proposal revert` makes the
|
|
124
|
+
negative count again. A fix the accept refused, and every negative without a
|
|
125
|
+
fix, still lower the asset's ranking.
|
|
126
|
+
- **The architecture and CLI reference pages now say that feedback reorders search hits
|
|
127
|
+
(#1251).** They said a hit's `score` was its fused score and that nothing else changed the
|
|
128
|
+
order. They now say that after fusion the score is multiplied by
|
|
129
|
+
`1 + 0.03 × (ln(1 + positives) − ln(1 + negatives))` over the user's recorded feedback for
|
|
130
|
+
the asset, the list is re-sorted (equal scores by fully qualified ref), and
|
|
131
|
+
one-hit-per-file and identical-content deduplication then drop entries without reordering
|
|
132
|
+
it. They also say filters drop ineligible entries from each candidate list before its 100
|
|
133
|
+
candidates are taken, not from the fused list afterwards. The storage, indexing, registry
|
|
134
|
+
and improve-guide pages no longer say that search ranking reads the utility score: improve
|
|
135
|
+
and `akm metrics` read it, search does not.
|
|
136
|
+
- `AKM_REGISTRY_URL` now takes effect in `akm search` and `akm curate` with
|
|
137
|
+
`--from registry` or `--from all` (#1275). The variable is meant to replace the
|
|
138
|
+
configured registries, but search always passed the configured list, which
|
|
139
|
+
won, so a mirror or CI override was never read and your `registries` were
|
|
140
|
+
queried instead. When it is set, only its comma-separated URLs are searched.
|
|
141
|
+
|
|
9
142
|
## [0.10.261016] - 2026-10-27
|
|
10
143
|
|
|
11
144
|
### Added
|
|
@@ -1558,6 +1691,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
1558
1691
|
schema rejection: one retry without the schema, remembered for the connection. `gpt-oss:120b` through the lab
|
|
1559
1692
|
gateway needed `supportsJsonSchema: false` set by hand. Other 5xx answers keep the transient-retry path. (#1150)
|
|
1560
1693
|
|
|
1694
|
+
## [0.9.32] - 2026-10-13
|
|
1695
|
+
|
|
1696
|
+
A patch release: `akm feedback` no longer reports success for feedback it could not store.
|
|
1697
|
+
|
|
1698
|
+
### Fixed
|
|
1699
|
+
|
|
1700
|
+
- **`akm feedback` fails when it cannot record the feedback.** When `state.db` was read-only to the process, as it is
|
|
1701
|
+
inside an agent sandbox that only allows writes in the workspace, the feedback row was silently dropped and the
|
|
1702
|
+
command still printed `"ok": true`. It now fails with a `DATA_DIR_NOT_WRITABLE` config error (exit 78) and records
|
|
1703
|
+
nothing, so an agent knows its feedback was lost. Add akm's data directory to the sandbox's writable paths.
|
|
1704
|
+
|
|
1561
1705
|
## [0.9.31] - 2026-10-09
|
|
1562
1706
|
|
|
1563
1707
|
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
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
|
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
|
-
- [
|
|
103
|
-
- [
|
|
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.
|
|
11
|
-
|
|
|
12
|
-
| < 0.8 | ❌ no longer maintained |
|
|
7
|
+
| 0.10.x | Yes |
|
|
8
|
+
| Older | No |
|
|
13
9
|
|
|
14
10
|
## Reporting a vulnerability
|
|
15
11
|
|
|
16
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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.
|