akm-cli 0.10.261014-beta → 0.10.261016-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 +118 -0
- package/README.md +7 -8
- package/SECURITY.md +3 -3
- package/STABILITY.md +2 -1
- package/dist/assets/hints/cli-hints-full.md +6 -4
- package/dist/assets/hints/cli-hints-short.md +4 -2
- package/dist/assets/opencode/akm-plugin.js +16 -8
- package/dist/assets/prompts/workflow-unit-preamble.md +3 -1
- package/dist/cli.js +2 -2
- package/dist/commands/health/plugin-staleness.js +86 -22
- package/dist/commands/health/semantic-search-check.js +2 -2
- package/dist/commands/read/search-cli.js +2 -2
- package/dist/commands/read/show.js +15 -3
- package/dist/core/asset/markdown.js +9 -0
- package/dist/core/config/config-walker.js +35 -32
- package/dist/core/config/schema/connections.js +6 -3
- package/dist/core/config/schema/harnesses.js +8 -1
- package/dist/core/config/schema/primitives.js +12 -1
- package/dist/core/config/schema/sources-bundles.js +2 -2
- package/dist/core/npm-package.js +124 -0
- package/dist/{integrations/harnesses/opencode/runtime → core}/tar.js +25 -16
- package/dist/integrations/harnesses/opencode/runtime/binary.js +8 -75
- package/dist/integrations/harnesses/opencode/runtime/index.js +5 -1
- package/dist/llm/embedders/local.js +23 -58
- package/dist/llm/embedders/onnx-runtime.js +121 -0
- package/dist/output/renderers.js +2 -2
- package/dist/output/shapes/helpers.js +2 -0
- package/dist/output/text/show-format.js +7 -0
- package/dist/registry/semver.js +12 -0
- package/dist/scripts/akm-migrate-node.js +21638 -5760
- package/dist/scripts/akm-migrate.js +21645 -5767
- package/dist/setup/semantic-assets.js +9 -6
- package/dist/setup/setup.js +56 -2
- package/dist/setup/steps/embeddings.js +21 -4
- package/dist/storage/database.js +17 -57
- package/dist/tasks/backends/cron.js +19 -0
- package/docs/architecture/akm-core-principles.md +3 -2
- package/docs/architecture/internals/health-advisories.md +2 -2
- package/docs/architecture/internals/storage-locations.md +1 -0
- package/docs/architecture/specs/ref.md +4 -3
- package/docs/architecture/testing/testing-workflow.md +28 -20
- package/docs/guides/discover-and-load.md +12 -4
- package/docs/guides/getting-started.md +23 -20
- package/docs/guides/recipes/headless-install.md +13 -8
- package/docs/guides/use-with-any-agent.md +4 -1
- package/docs/maintainers/release-checklist.md +15 -8
- package/docs/migration/v0.9-to-v0.10.md +17 -0
- package/docs/reference/cli.md +42 -12
- package/docs/reference/configuration.md +37 -15
- package/package.json +6 -9
- package/schemas/akm-config.json +535 -302
- package/dist/standalone/onnxruntime-library.js +0 -52
|
@@ -34,23 +34,24 @@ Or download a standalone binary directly from the
|
|
|
34
34
|
Hitting a PowerShell execution-policy error on Windows? See
|
|
35
35
|
[Troubleshooting](#troubleshooting) at the end of this guide.
|
|
36
36
|
|
|
37
|
-
###
|
|
38
|
-
|
|
39
|
-
Local semantic search
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
37
|
+
### Local semantic search
|
|
38
|
+
|
|
39
|
+
Local semantic search runs its embedding model on ONNX Runtime, and akm offers
|
|
40
|
+
it on Linux x64 (glibc) and Apple-silicon macOS; on every other
|
|
41
|
+
platform search is keyword-only or uses an embedding endpoint you configure. Choosing the built-in embedder in
|
|
42
|
+
`akm setup` (or `akm setup --yes --embedding local`) downloads what it needs once
|
|
43
|
+
into akm's cache directory (`akm info` prints it): ONNX Runtime for your platform,
|
|
44
|
+
under `onnxruntime/<version>-<platform>-<arch>/` (about 86 MB downloaded,
|
|
45
|
+
about 36 MB kept), and the model (about 127 MB). Nothing is installed with the npm
|
|
46
|
+
package or carried in a standalone binary, and the first `akm index` downloads
|
|
47
|
+
what setup did not. Two notes:
|
|
48
|
+
|
|
49
|
+
- The cache directory must be on a mount that allows executing files: the
|
|
50
|
+
runtime is loaded from there, and on a `noexec` mount `akm index` reports
|
|
51
|
+
semantic search `blocked` (keyword search works).
|
|
52
|
+
- On a platform without local embeddings, `akm setup` offers an embedding
|
|
53
|
+
endpoint or keyword search only, and `akm setup --embedding local` warns and
|
|
54
|
+
keeps keyword search.
|
|
54
55
|
|
|
55
56
|
### akm's own agent runtime
|
|
56
57
|
|
|
@@ -60,7 +61,8 @@ is the same for the npm package and the standalone binary: nothing of OpenCode
|
|
|
60
61
|
is installed with akm, and the first time the runtime runs, akm downloads the
|
|
61
62
|
OpenCode binary for your platform from the npm registry (one package, about
|
|
62
63
|
114 MB, 240 MB on disk), checks it against the registry's integrity hash and
|
|
63
|
-
keeps it in the cache directory under `opencode/<version>/`. It is fetched once
|
|
64
|
+
keeps it in the cache directory under `opencode/<version>/`. It is fetched once;
|
|
65
|
+
the `akm setup` wizard offers to fetch it then, when agent work runs there.
|
|
64
66
|
Three limits follow:
|
|
65
67
|
|
|
66
68
|
- That step needs the npm registry. Without network access for it, enable the
|
|
@@ -196,8 +198,9 @@ akm show <ref> # e.g. akm show workflows/deploy
|
|
|
196
198
|
|
|
197
199
|
**Success check:** structured JSON with everything an agent needs to use the
|
|
198
200
|
asset — a `run` command plus optional `cwd` and `setup` for scripts, a
|
|
199
|
-
`prompt` payload for agents, or the document `content` for knowledge (
|
|
200
|
-
`#<
|
|
201
|
+
`prompt` payload for agents, or the document `content` for knowledge (with
|
|
202
|
+
`--detail brief`, just its outline `toc`; append `#<slug>` to a ref for one
|
|
203
|
+
section).
|
|
201
204
|
|
|
202
205
|
AKM retrieves every supported capability type. It directly orchestrates
|
|
203
206
|
defined execution surfaces such as workflows, agent dispatch, tasks, and
|
|
@@ -54,19 +54,24 @@ it and never appears on the command line:
|
|
|
54
54
|
akm setup --yes --endpoint https://api.example.com/v1 --api-key-env EXAMPLE_API_KEY
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
`--no-probe` keeps the run offline
|
|
58
|
-
new connection has no model until
|
|
57
|
+
`--no-probe` keeps the run offline: nothing is contacted or downloaded (the
|
|
58
|
+
endpoint's model list is not fetched, so a new connection has no model until
|
|
59
|
+
`akm models set` names one).
|
|
59
60
|
For the full set of flags, see `akm setup --help`; for the config they write,
|
|
60
61
|
see [configuration.md](../../reference/configuration.md).
|
|
61
62
|
|
|
62
|
-
**Semantic search.**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
**Semantic search.** `--embedding local` chooses the built-in embedder, offered
|
|
64
|
+
on Linux x64 (glibc) and Apple-silicon macOS; elsewhere it warns and
|
|
65
|
+
keeps keyword search. Once the config is saved, a headless setup (`--yes` or
|
|
66
|
+
`--from`) downloads the embedder's runtime and model into akm's cache and
|
|
67
|
+
reports `semanticAssets` in its result (`ready`, `blocked: <reason>`, or
|
|
68
|
+
`skipped` with `--no-probe`, which leaves the download to the first
|
|
69
|
+
`akm index`). Without the flag, semantic search stays as the config has it
|
|
70
|
+
(`off` by default):
|
|
66
71
|
|
|
67
72
|
```sh
|
|
68
|
-
akm
|
|
69
|
-
akm config set semanticSearchMode off
|
|
73
|
+
akm setup --yes --embedding local # local embeddings, downloaded now
|
|
74
|
+
akm config set semanticSearchMode off # skip embeddings entirely
|
|
70
75
|
```
|
|
71
76
|
|
|
72
77
|
For resource requirements and remote-embedding alternatives, see
|
|
@@ -52,7 +52,10 @@ akm feedback workflows/deploy-to-prod --positive --reason "Completed without iss
|
|
|
52
52
|
|
|
53
53
|
**Get refs from search.** Agents should call `akm search --detail agent` or
|
|
54
54
|
`akm curate` to discover refs — not guess them. The `ref` field in search
|
|
55
|
-
results is the stable token to pass to `akm show`.
|
|
55
|
+
results is the stable token to pass to `akm show`. For a long document,
|
|
56
|
+
`akm show <ref> --detail brief` returns its outline (`toc`, no body), and
|
|
57
|
+
`akm show <ref>#<slug>` then loads only the sections the task needs. Feedback
|
|
58
|
+
closes the loop.
|
|
56
59
|
Record `--negative` only when the asset's content is wrong or stale; a note that
|
|
57
60
|
simply did not fit the task is not negative feedback, so record nothing for it.
|
|
58
61
|
`akm feedback <ref> --negative --reason "<what is wrong and what should change>"`
|
|
@@ -19,7 +19,8 @@ next):
|
|
|
19
19
|
the `package.json` version (`tests/workflow-release.test.ts`).
|
|
20
20
|
3. Add a migration note if the release needs one (see
|
|
21
21
|
[CONTRIBUTING](https://github.com/itlackey/akm/blob/main/.github/CONTRIBUTING.md#shipping-a-release--migration-notes)).
|
|
22
|
-
4. Commit `release: <version>`, push it to the branch
|
|
22
|
+
4. Commit `release: <version>`, push it to the branch and dispatch the release
|
|
23
|
+
(next section); the workflow waits for CI on that commit.
|
|
23
24
|
|
|
24
25
|
## 2. Release akm
|
|
25
26
|
|
|
@@ -31,13 +32,19 @@ The Release workflow, on the pushed commit:
|
|
|
31
32
|
|
|
32
33
|
1. runs Gated CI: semantic search with real embeddings, the Docker install
|
|
33
34
|
matrix, and the native schedulers on Linux, macOS and Windows;
|
|
34
|
-
2.
|
|
35
|
-
|
|
36
|
-
3.
|
|
37
|
-
|
|
38
|
-
the
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
2. runs `tests/release-check.sh --skip-docker`: the packaged artifact's bin
|
|
36
|
+
targets and migrator, and package acceptance;
|
|
37
|
+
3. builds the package and standalone binaries;
|
|
38
|
+
4. requires CI to pass on the same commit, waiting up to 25 minutes for the run
|
|
39
|
+
to finish: the newest push or manual run counts, a pull request's does not
|
|
40
|
+
(it does not run lint, the typecheck, the test suites or the upgrade
|
|
41
|
+
rehearsal again);
|
|
42
|
+
5. publishes to npm (`latest` for a stable version, `next` for a prerelease)
|
|
43
|
+
and creates the GitHub release.
|
|
44
|
+
|
|
45
|
+
Push nothing else to the branch until the Release finishes: a push cancels the
|
|
46
|
+
release commit's CI run (`ci.yml` cancels an in-progress run on the same ref),
|
|
47
|
+
and the Release then fails.
|
|
41
48
|
|
|
42
49
|
If a job fails on a flake, rerun the failed jobs. If the fix needs a code
|
|
43
50
|
change, commit it and release that commit. npm can take several minutes to show
|
|
@@ -609,6 +609,23 @@ yours to run it, and its runs are in your OpenCode history, which improve reads.
|
|
|
609
609
|
- **A transient reflect failure** (transport error, timeout, crash) no longer
|
|
610
610
|
uses up the feedback that planned it; the ref is retried next run.
|
|
611
611
|
|
|
612
|
+
### Local semantic search and installs
|
|
613
|
+
|
|
614
|
+
- **akm no longer installs ONNX Runtime through npm.** `akm setup` with the
|
|
615
|
+
built-in embedder (`--embedding local`), or the first `akm index` after the
|
|
616
|
+
upgrade, downloads ONNX Runtime 1.24.3 once (about 86 MB) into akm's cache.
|
|
617
|
+
The vectors are unchanged, so no re-index is needed.
|
|
618
|
+
- **Local embeddings are offered on Linux x64 (glibc) and
|
|
619
|
+
Apple-silicon macOS.** Every other platform uses keyword search or an
|
|
620
|
+
embedding endpoint, and `akm setup` offers only those there.
|
|
621
|
+
- **Standalone binaries are up to 36 MB smaller**, and a `noexec` temp directory
|
|
622
|
+
no longer matters; akm's cache directory must still allow executing files.
|
|
623
|
+
- **On Node, the SQLite driver ships prebuilt for every supported Node
|
|
624
|
+
version**, so `npm install -g akm-cli` works where npm skips install scripts
|
|
625
|
+
(npm 12 does by default), and a Node upgrade no longer needs `npm rebuild`.
|
|
626
|
+
Nothing in the package runs an install script, the Node.js version check
|
|
627
|
+
included: akm checks the version when it starts.
|
|
628
|
+
|
|
612
629
|
### The environment programs run in
|
|
613
630
|
|
|
614
631
|
A harness (agent tasks and workflow agent steps included) and an `exec` unit's
|
package/docs/reference/cli.md
CHANGED
|
@@ -218,9 +218,16 @@ The wizard asks, in order:
|
|
|
218
218
|
the config as this run will save it: a further `--name` connection does not
|
|
219
219
|
serve embeddings, its models are not offered, and with several connections
|
|
220
220
|
none called `default`, `--embedding <model>` refuses and asks you to name one
|
|
221
|
-
default or pass `--embedding-endpoint`.
|
|
221
|
+
default or pass `--embedding-endpoint`. The built-in embedder is offered on
|
|
222
|
+
Linux x64 (glibc) and Apple-silicon macOS only; elsewhere the step
|
|
223
|
+
says so in one sentence and offers an endpoint or off, and `--embedding local`
|
|
224
|
+
warns and saves off.
|
|
222
225
|
5. **Save.** The config is written, the bundle directory initialized, and a
|
|
223
|
-
summary says what runs where.
|
|
226
|
+
summary says what runs where. With the built-in embedder chosen, setup then
|
|
227
|
+
downloads its runtime (ONNX Runtime, about 86 MB) and model (about 127 MB)
|
|
228
|
+
into akm's cache and loads them; the wizard asks first. When agent work runs
|
|
229
|
+
on akm's own runtime, the wizard also offers to download its OpenCode binary
|
|
230
|
+
(about 114 MB) now rather than on the first agent run.
|
|
224
231
|
|
|
225
232
|
Flags answer one question each; `--yes` takes the detected default for every
|
|
226
233
|
question left, so nothing is prompted. Without a terminal, `akm setup` refuses
|
|
@@ -236,7 +243,7 @@ unless `--yes` or `--from` is given.
|
|
|
236
243
|
| `--embedding-endpoint <url>`, `--embedding-api-key-env <NAME>` | Another endpoint serving the embedding model |
|
|
237
244
|
| `--from <file>` | A config file (JSON or YAML) to merge |
|
|
238
245
|
| `--dir <path>`, `--no-init` | The bundle directory; skip scaffolding it |
|
|
239
|
-
| `--no-probe` | Offline:
|
|
246
|
+
| `--no-probe` | Offline: nothing is contacted or downloaded. The endpoint's models are not listed, so a connection added this way has no model until `akm models set` names one, and the built-in embedder's runtime and model are downloaded by the first `akm index` |
|
|
240
247
|
|
|
241
248
|
The detected defaults are: when no agent program is configured yet, every one
|
|
242
249
|
found on `PATH` is enabled and the first found is the default. If no connection
|
|
@@ -249,7 +256,11 @@ whose endpoint lists an embedding model.
|
|
|
249
256
|
|
|
250
257
|
The wizard also lets you review registries and add bundle sources. A scripted run
|
|
251
258
|
prints its result with a `runs` object saying what runs where: `modelCalls`,
|
|
252
|
-
`agentWork` and `embeddings`.
|
|
259
|
+
`agentWork` and `embeddings`. When the saved config uses the built-in embedder,
|
|
260
|
+
the result also has `semanticAssets`: `ready` once its runtime and model are
|
|
261
|
+
downloaded and load, `blocked: <reason>` when they do not (the config is saved
|
|
262
|
+
all the same), or `skipped` with `--no-probe`. A scripted run does not download
|
|
263
|
+
akm's own agent runtime; its first agent run does.
|
|
253
264
|
|
|
254
265
|
### index
|
|
255
266
|
|
|
@@ -424,6 +435,10 @@ to each connection's endpoint, one probe per distinct endpoint, checks the
|
|
|
424
435
|
installed akm-cli version against the latest GitHub release (`cli-version`),
|
|
425
436
|
runs the scheduler's recorded akm binary with `--version` to check it
|
|
426
437
|
against the running CLI (`scheduler-binary`).
|
|
438
|
+
The `plugin-version` advisory compares the installed Claude Code plugin with the
|
|
439
|
+
channel its marketplace clone follows: the newest stable tag on the remote's
|
|
440
|
+
default branch, the release tag on the branch head for another branch such as
|
|
441
|
+
`next`, and the pinned tag for a marketplace added at a tag.
|
|
427
442
|
|
|
428
443
|
Primary result fields:
|
|
429
444
|
|
|
@@ -464,13 +479,13 @@ search, with the index's entry and vector counts read now. It loads no model and
|
|
|
464
479
|
sends no request. It `pass`es when every entry has a vector (and a local model
|
|
465
480
|
embedded on `onnxruntime-node`) or `semanticSearchMode` is `off`; `warn`s when
|
|
466
481
|
vectors lag the entries (`akm index` embeds the rest), local embeddings ran on
|
|
467
|
-
another runtime, or
|
|
468
|
-
|
|
469
|
-
|
|
482
|
+
another runtime, or akm offers no local embeddings on this platform (keyword
|
|
483
|
+
search or an endpoint is the default there, so the message names
|
|
484
|
+
`akm setup --embedding off` and `akm setup --embedding <model> --embedding-endpoint <url>`);
|
|
470
485
|
`fail`s, with the recorded reason, when the last index found semantic search
|
|
471
486
|
`blocked` (an embedding endpoint or model download failed) or `unavailable` for
|
|
472
|
-
a cause that can be fixed (the
|
|
473
|
-
|
|
487
|
+
a cause that can be fixed (the runtime could not be downloaded or did not load,
|
|
488
|
+
for example from a `noexec` cache directory); and is `unknown` before
|
|
474
489
|
the first index. Search never reads this record: a query still
|
|
475
490
|
tries semantic search and falls back to keyword search on its own. A fix shows
|
|
476
491
|
here after the next `akm index`. `evidence` carries the recorded `status`,
|
|
@@ -811,7 +826,10 @@ contends with a full `akm index` rebuild in progress.
|
|
|
811
826
|
|
|
812
827
|
Display an asset by ref. On a markdown document `#fragment` selects one
|
|
813
828
|
section by heading slug (falling back to case-insensitive heading text); an
|
|
814
|
-
unmatched fragment lists the available slugs.
|
|
829
|
+
unmatched fragment lists the available slugs. For a large document, read the
|
|
830
|
+
outline first and then only the sections you need: `akm show <ref> --detail
|
|
831
|
+
brief` returns the document's `toc` without the body, and `akm show
|
|
832
|
+
<ref>#<slug>` returns one section.
|
|
815
833
|
|
|
816
834
|
```sh
|
|
817
835
|
akm show scripts/deploy.sh
|
|
@@ -819,7 +837,8 @@ akm show skills/code-review
|
|
|
819
837
|
akm show agents/architect
|
|
820
838
|
akm show commands/release
|
|
821
839
|
akm show workflows/ship-release
|
|
822
|
-
akm show knowledge/guide # the whole document
|
|
840
|
+
akm show knowledge/guide # the whole document, plus its toc
|
|
841
|
+
akm show knowledge/guide --detail brief # the outline (toc), no body
|
|
823
842
|
akm show knowledge/guide#authentication # just that section
|
|
824
843
|
akm show '<search-result-ref>' --context lead --max-tokens 800
|
|
825
844
|
akm show knowledge/guide#nope # lists the available fragment slugs
|
|
@@ -868,6 +887,17 @@ reduced metadata-first view without `content`/`template`/`prompt`;
|
|
|
868
887
|
including `ref`/`path`/`editable`, plus the optional fragment metadata
|
|
869
888
|
described below.
|
|
870
889
|
|
|
890
|
+
`toc` is the outline of a whole Markdown document (knowledge, and every other
|
|
891
|
+
Markdown asset whose `#fragment` selects a section): one
|
|
892
|
+
`{ "level", "text", "slug", "startLine" }` entry per heading, in order, at every
|
|
893
|
+
`--detail` level, `brief` and `agent` included. `slug` is exactly what
|
|
894
|
+
`<ref>#<slug>` selects, duplicate headings included (`notes`, `notes-1`, ...),
|
|
895
|
+
and `startLine` is the heading's 1-based line in the file. It is read from the
|
|
896
|
+
same file the section is cut from, so it never lists a slug the show cannot
|
|
897
|
+
resolve. It is omitted for non-Markdown assets, for documents with no headings,
|
|
898
|
+
and for a fragment show (`<ref>#<slug>`). `--format text` prints it as a
|
|
899
|
+
`toc:` block.
|
|
900
|
+
|
|
871
901
|
`links` lists the asset's declared links, grouped by kind: `outgoing` (the
|
|
872
902
|
assets its own `xrefs:`, `supersededBy:`, `contradictedBy:`,
|
|
873
903
|
`currentBeliefRefs:`, wiki `sources:`, `.derived` parent, page links, or
|
|
@@ -933,7 +963,7 @@ Returns type-specific payloads:
|
|
|
933
963
|
| skill | `content` (full SKILL.md) |
|
|
934
964
|
| command | `template`, `description` |
|
|
935
965
|
| agent | `prompt`, `description`, `modelHint` |
|
|
936
|
-
| knowledge | `content` — the whole document, or one section via `#fragment` |
|
|
966
|
+
| knowledge | `content` — the whole document, or one section via `#fragment`; `toc` on a whole document |
|
|
937
967
|
| workflow | `workflowTitle`, `workflowParameters`, `steps` (each step's `orchestration` summary names its `engine` (the connection or harness it runs on) and model, or — for an [exec step](https://github.com/itlackey/akm/blob/main/docs/reference/workflow-schema.md#what-akm-show-reports-for-an-exec-step) — its `exec.command` and no engine at all) |
|
|
938
968
|
| memory | `content` |
|
|
939
969
|
| env | `keys` (key names only — values and comment text never returned) |
|
|
@@ -690,21 +690,43 @@ semantic search is disabled or has not been built. A read-only sandbox that
|
|
|
690
690
|
cannot record best-effort usage telemetry does not by itself mark search as
|
|
691
691
|
degraded.
|
|
692
692
|
The local embedder runs its model (`Xenova/bge-small-en-v1.5` unless
|
|
693
|
-
`embedding.localModel` names another) on
|
|
694
|
-
`@huggingface/tokenizers` for the token
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
`
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
693
|
+
`embedding.localModel` names another) on ONNX Runtime, through
|
|
694
|
+
`onnxruntime-node`'s native binding, with `@huggingface/tokenizers` for the token
|
|
695
|
+
ids. akm offers local embeddings on Linux x64 (glibc) and Apple-silicon
|
|
696
|
+
macOS; on every other platform semantic search uses an embedding endpoint or
|
|
697
|
+
stays keyword-only. akm does not install `onnxruntime-node`:
|
|
698
|
+
`akm setup --embedding local` (or the wizard's built-in embedder) downloads that
|
|
699
|
+
package's binding and library for this platform once from the npm registry
|
|
700
|
+
(about 86 MB; the registry's sha512 integrity is checked before anything is
|
|
701
|
+
extracted) into `<cache dir>/onnxruntime/<version>-<platform>-<arch>/`, and the
|
|
702
|
+
first local embedding downloads them when setup did not. The model's four files
|
|
703
|
+
(about 127 MB) come from the Hugging Face Hub the same way, into
|
|
704
|
+
`$HF_HOME/<repo>/` (default `<cache dir>/models`); `HF_HUB_OFFLINE=1` forbids
|
|
705
|
+
that download. `akm index --format json` reports the runtime it embedded with as
|
|
706
|
+
`verification.embeddingRuntime`. If the runtime cannot be downloaded or does not
|
|
707
|
+
load (the cache directory is mounted `noexec`), the index reports semantic search
|
|
708
|
+
`blocked` with the reason and search stays keyword-only. On a platform without
|
|
709
|
+
local embeddings, `akm setup` offers an endpoint or keyword search,
|
|
710
|
+
`--embedding local` warns and saves keyword search, and a config that turns
|
|
711
|
+
semantic search on anyway gets it reported unavailable for the platform by the
|
|
712
|
+
index and a warning from `akm health`.
|
|
713
|
+
|
|
714
|
+
**Without network access**, fill akm's cache directory (`akm info` prints
|
|
715
|
+
`cacheDir`; `AKM_CACHE_DIR` moves it) before the first `akm index`:
|
|
716
|
+
|
|
717
|
+
- `onnxruntime/<version>-<platform>-<arch>/` (for example
|
|
718
|
+
`onnxruntime/1.24.3-linux-x64/`) holding `onnxruntime_binding.node` and the
|
|
719
|
+
library it links (`libonnxruntime.so.1` on Linux,
|
|
720
|
+
`libonnxruntime.1.24.3.dylib` on macOS). Take both from
|
|
721
|
+
`package/bin/napi-v6/<platform>/<arch>/` in the `onnxruntime-node@1.24.3`
|
|
722
|
+
tarball (`npm pack onnxruntime-node@1.24.3`), or copy the folder from a
|
|
723
|
+
connected machine of the same platform after
|
|
724
|
+
`akm setup --yes --embedding local`.
|
|
725
|
+
- `models/Xenova/bge-small-en-v1.5/` holding `tokenizer.json`,
|
|
726
|
+
`tokenizer_config.json`, `config.json` and `onnx/model.onnx`, or set `HF_HOME`
|
|
727
|
+
to a directory that holds them and `HF_HUB_OFFLINE=1`.
|
|
728
|
+
- `opencode/2.1.4/opencode` (`opencode.exe` on Windows) for akm's own agent
|
|
729
|
+
runtime.
|
|
708
730
|
The default is `"off"` so a bare or headless install (`akm bundle create`, `--yes`,
|
|
709
731
|
`--config`) never silently downloads the local embedding model on first
|
|
710
732
|
index. A config that has an `embedding` block and sets no `semanticSearchMode`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.261016-beta",
|
|
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": [
|
|
@@ -34,9 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"license": "MPL-2.0",
|
|
36
36
|
"pinNotes": {
|
|
37
|
-
"better-sqlite3@
|
|
37
|
+
"better-sqlite3@13.0.3": "Exact pin. The SQLite driver akm loads on Node (src/storage/database.ts); Bun uses bun:sqlite and never loads it. 13.x is built on N-API (node-addon-api), so one binding per platform serves every Node version, and the npm tarball carries those bindings prebuilt in prebuilds/ for Linux (glibc and musl) and macOS on x64 and arm64 and for Windows on x64 and arm64. It declares no install script and sets gypfile: false, so it installs the same where npm runs install scripts and where it does not (npm 12 blocks dependency scripts by default). Not covered: 32-bit ARM Linux (linux-arm, linuxmusl-arm), which 12.x served only through its install script; akm under Node has no SQLite driver there. `bun install` tries to build it anyway (Bun ignores gypfile: false for a trusted package) and, as an optional dependency, drops it silently when that fails, which is why CI installs it with npm. This replaced 12.11.1, whose binding came per Node ABI from its install script (`prebuild-install || node-gyp rebuild`, #790); the earlier note asked for a soak before 13.x, and 13.0.3 soaks through the 0.10 betas instead. Before bumping: the tarball must still carry prebuilds/ for every platform above and declare no install script, and the CI node-smoke job, which installs this exact string read back out of this file (.github/workflows/ci.yml), must pass on every Node major in engines.",
|
|
38
38
|
"@huggingface/tokenizers@0.1.3": "Exact pin: the tokenizer of the local embedding model (src/llm/embedders/local.ts). Pure JS with no dependencies. A different release can change the token ids and with them every stored vector, so re-run the real-model semantic gate (tests/integration/semantic-search-e2e.test.ts, which compares the vectors with tests/fixtures/embedder-reference-vectors.json) before changing it.",
|
|
39
|
-
"onnxruntime-node@1.24.3": "Exact pin: the local embedding runtime. The standalone binary embeds this version's native library from node_modules/onnxruntime-node/bin/napi-v6/ (src/standalone/native/) and its addon is bound to exactly that library, so a bump moves this pin, the library file names in src/standalone/native/ (the macOS one carries the version), the list of platforms it ships a library for in src/llm/embedders/local.ts and the real-model semantic gate together.",
|
|
40
39
|
"ajv@8.20.0": "Exact pin (devDependency, used only by tests: tests/tasks-schema.test.ts validates task sources against schemas/akm-task.json, tests/contracts/config-schema-drift.test.ts checks schemas/akm-config.json). Pinned in 4d7d77992 without a recorded reason; keep exact until the pin is next reviewed.",
|
|
41
40
|
"cmd-shim@9.0.2": "Exact pin (devDependency), from cd5a3be12 \"pin cmd-shim for launcher tests\": tests/integration/install/package-launcher.test.ts writes the Windows shims npm would write with this package, where it used to load the copy inside the installed npm's own node_modules. That commit records no reason for an exact version over a range; keep exact until the pin is next reviewed."
|
|
42
41
|
},
|
|
@@ -72,11 +71,11 @@
|
|
|
72
71
|
"akm-migrate": "dist/akm-migrate"
|
|
73
72
|
},
|
|
74
73
|
"scripts": {
|
|
75
|
-
"preinstall": "node -e \"var v=(process.versions.node||'0').split('.').map(function(n){return parseInt(n,10)||0});var ok=v[0]>=22;if(ok){process.exit(0)}console.error('\\n ERROR: the akm-cli npm package requires Node.js >= 22.\\n A working Bun >= 1.0 on PATH is optional and preferred for akm and akm-migrate.\\n Upgrade Node.js (https://nodejs.org), or install the runtime-free standalone binary:\\n curl -fsSL https://github.com/itlackey/akm/releases/latest/download/install.sh | bash\\n');process.exit(1)\"",
|
|
76
74
|
"build": "rm -rf dist && bun scripts/gen-config-schema.ts &&bun run tsc --project ./tsconfig.build.json && bun scripts/copy-assets.ts && bun scripts/fix-esm-extensions.ts",
|
|
77
75
|
"check": "bun run lint && bunx tsc --noEmit && bun run test:unit && bun run test:integration",
|
|
78
76
|
"check:fast": "bun run lint && bunx tsc --noEmit && bun run test:unit",
|
|
79
77
|
"check:changed": "bun run lint && bunx tsc --noEmit && bun test tests/integration/output-baseline.test.ts tests/integration/registry/registry-search.test.ts tests/integration/show-argv-entrypoint.test.ts tests/output-shapes-unit.test.ts",
|
|
78
|
+
"check:ci": "bash scripts/check-like-ci.sh",
|
|
80
79
|
"sweep:tmp": "bun scripts/sweep-test-tmp.ts",
|
|
81
80
|
"test": "bash scripts/test-unit.sh",
|
|
82
81
|
"test:unit": "bash scripts/test-unit.sh",
|
|
@@ -105,11 +104,10 @@
|
|
|
105
104
|
"ajv": "8.20.0",
|
|
106
105
|
"bun-types": "^1.3.13",
|
|
107
106
|
"cmd-shim": "9.0.2",
|
|
108
|
-
"typescript": "^5.9.3"
|
|
109
|
-
"zod-to-json-schema": "^3.23.0"
|
|
107
|
+
"typescript": "^5.9.3"
|
|
110
108
|
},
|
|
111
109
|
"optionalDependencies": {
|
|
112
|
-
"better-sqlite3": "
|
|
110
|
+
"better-sqlite3": "13.0.3",
|
|
113
111
|
"sqlite-vec": "^0.1.9"
|
|
114
112
|
},
|
|
115
113
|
"engines": {
|
|
@@ -123,10 +121,9 @@
|
|
|
123
121
|
"fast-xml-parser": "^5.10.1",
|
|
124
122
|
"marked": "^18.1.1",
|
|
125
123
|
"node-html-parser": "^9.0.1",
|
|
126
|
-
"onnxruntime-node": "1.24.3",
|
|
127
124
|
"semver": "^7.6.0",
|
|
128
125
|
"turndown": "^7.2.4",
|
|
129
126
|
"yaml": "^2.8.4",
|
|
130
|
-
"zod": "^
|
|
127
|
+
"zod": "^4.6.6"
|
|
131
128
|
}
|
|
132
129
|
}
|