akm-cli 0.10.261016-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.
- package/CHANGELOG.md +100 -0
- package/README.md +8 -10
- package/SECURITY.md +7 -99
- package/STABILITY.md +57 -98
- 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/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/output/shapes/helpers.js +3 -3
- package/dist/output/text/command-format.js +5 -6
- package/dist/scripts/akm-migrate-node.js +31 -3
- package/dist/scripts/akm-migrate.js +31 -3
- 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 +171 -151
- 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 +107 -167
- 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 +167 -22
- package/docs/migration/release-notes/README.md +2 -2
- package/docs/migration/v0.9-to-v0.10.md +47 -7
- 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 +46 -60
- 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
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
# Fresh-Host Rebuild Runbook
|
|
2
2
|
|
|
3
|
-
Rebuild a working akm install on a new machine.
|
|
4
|
-
git remote and that a
|
|
5
|
-
|
|
3
|
+
Rebuild a working akm install on a new machine. It assumes your bundle lives in
|
|
4
|
+
a git remote and that you kept a copy of `config.json` somewhere you can
|
|
5
|
+
restore it from.
|
|
6
6
|
|
|
7
7
|
1. **Install the CLI.** Prebuilt binary (no runtime needed):
|
|
8
8
|
`curl -fsSL https://github.com/itlackey/akm/releases/latest/download/install.sh | bash`
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
The standalone binary is runtime-free.
|
|
13
|
-
(Windows: `irm https://github.com/itlackey/akm/releases/latest/download/install.ps1 | iex`.)
|
|
9
|
+
(Windows: `irm https://github.com/itlackey/akm/releases/latest/download/install.ps1 | iex`).
|
|
10
|
+
Or the npm package, which needs Node.js 22 or later: `npm install -g akm-cli`.
|
|
11
|
+
A working Bun 1.0 or later on `PATH` is optional and preferred over Node.
|
|
14
12
|
2. **Confirm the binary resolves:** `akm --version`.
|
|
15
|
-
3. **Restore `config.json`.** akm reads
|
|
16
|
-
`~/.config/akm/config.json` (`%APPDATA%\akm\config.json` on Windows;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
3. **Restore `config.json`.** akm reads one user config at
|
|
14
|
+
`~/.config/akm/config.json` (`%APPDATA%\akm\config.json` on Windows; set
|
|
15
|
+
`AKM_CONFIG_DIR` to move it). It holds your `connections`, `harnesses`, and
|
|
16
|
+
your improve strategies.
|
|
17
|
+
4. **Provide secrets.** `config.json` refers to API keys as `$VAR` or
|
|
18
|
+
`${VAR}`. Export those environment variables, or restore `credentials.json`
|
|
19
|
+
from your own backup (it is never part of `config.json`), so the
|
|
20
|
+
connections and the embedding endpoint resolve.
|
|
21
|
+
5. **Restore the working bundle.** Clone your bundle's git remote to the path
|
|
22
|
+
of the working bundle's entry under `bundles` in the restored config
|
|
23
|
+
(`defaultBundle` selects which one; the default path is `~/akm`). To start
|
|
24
|
+
clean instead, run `akm setup --yes`, which scaffolds the bundle.
|
|
25
|
+
6. **Check the other bundles.** `akm bundle list` shows the bundles the
|
|
26
|
+
restored config defines. Re-add any that are missing with
|
|
27
|
+
`akm bundle add <ref>`.
|
|
28
|
+
7. **Rebuild the index:** `akm index --full`. `index.db` is derived from your
|
|
29
|
+
bundles and is rebuilt from scratch.
|
|
30
|
+
8. **Verify health:** `akm health`, then `akm info` for index stats and the
|
|
31
|
+
effective config. `akm health` creates `state.db` if it is missing and
|
|
32
|
+
applies its migrations. It exits 0 when every check passes, 4 on warnings,
|
|
33
|
+
and 1 when a hard check fails. See [Health Checks](health-advisories.md) for
|
|
34
|
+
what each check means.
|
|
35
|
+
9. **Smoke-test discovery:** `akm search <term>` returns results.
|
|
36
|
+
|
|
37
|
+
`$DATA/state.db` holds proposals, events, and task history, and is not rebuilt
|
|
38
|
+
from your bundles. Copy it from the old host before step 8 if you want that
|
|
39
|
+
history.
|
|
@@ -1,43 +1,70 @@
|
|
|
1
|
-
# `akm health`
|
|
1
|
+
# `akm health` checks
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
`akm health` prints JSON by default (`--format text` for the table view) and
|
|
4
|
+
emits the checks below. Each result has a `name`, and lands in `hardChecks` (the
|
|
5
|
+
state.db, `task-history-read`, `active-runs`, connection and harness, and
|
|
6
|
+
semantic-search checks) or `advisories` (the rest). The list comes from
|
|
7
|
+
`HEALTH_CHECKS` in `src/commands/health/checks.ts`, `akmHealth` in
|
|
8
|
+
`src/commands/health.ts`, and the collectors in `src/commands/health/`. The
|
|
9
|
+
checks from `index-state-generation` down to `opencode-plugin-version` appear
|
|
10
|
+
only when they have something to report, and `state-db-readable` only in place
|
|
11
|
+
of every other check; the others are always present.
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
- A hard check `fail` sets the overall status to `fail` and exit code 1.
|
|
9
|
-
- A heuristic (non-deterministic) advisory `warn` does not change or gate the overall status.
|
|
10
|
-
- A heuristic (non-deterministic) advisory `warn` does not change or gate the exit code.
|
|
13
|
+
## Status and exit code
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
expected* states — treat them as "no action" until the referenced condition
|
|
15
|
-
changes.
|
|
15
|
+
Each check is `pass`, `warn`, `fail`, or `unknown`, and `deterministic` or
|
|
16
|
+
`heuristic`.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
- Any `fail` in `hardChecks` makes the overall status `fail` and the exit code 1.
|
|
19
|
+
- Otherwise, any `warn` from a `deterministic` check (hard or advisory) makes it `warn` and the exit code 4.
|
|
20
|
+
- `heuristic` warns (`session-extraction`, `auto-accept-validation`) and `unknown` results do not change the overall status.
|
|
21
|
+
|
|
22
|
+
`--since` sets the window the task and improve checks read. The default is 24 hours.
|
|
23
|
+
|
|
24
|
+
## Network and processes
|
|
25
|
+
|
|
26
|
+
Probing is on by default; `--no-probe` turns it off. With probing on, health sends a
|
|
27
|
+
`GET` to `<endpoint>/models` of each configured connection (3 second timeout; any HTTP
|
|
28
|
+
response counts as reachable, so a cold local server is never asked to load a model; one
|
|
29
|
+
request per distinct endpoint per invocation, with no cross-run cache), runs each configured
|
|
30
|
+
harness's `--version`, looks up the latest akm release on GitHub for `cli-version`
|
|
31
|
+
(5 second timeout, no retries), and runs the akm binary recorded by the scheduler with
|
|
32
|
+
`--version` for `scheduler-binary`. `plugin-version` runs `git ls-remote --symref origin`
|
|
33
|
+
(it lists refs and fetches nothing) against the Claude plugin marketplace clone whenever a
|
|
34
|
+
Claude plugin is installed. With
|
|
35
|
+
`--no-probe` none of these runs: the connection rows carry no `reachable` field and the
|
|
36
|
+
message says reachability was not probed, and `plugin-version` reports `unknown` (its
|
|
37
|
+
`AKM_VERSION_RANGE` check is local and still runs). The `plugin-version` and `cli-version`
|
|
38
|
+
lookups are best-effort and silent on failure; see `src/commands/health/plugin-staleness.ts`
|
|
39
|
+
and `src/commands/health/version-drift.ts`.
|
|
40
|
+
|
|
41
|
+
## Checks
|
|
42
|
+
|
|
43
|
+
| Check | Fires when | Remedy |
|
|
18
44
|
|---|---|---|
|
|
19
|
-
| `state-db-schema` | state.db is missing
|
|
20
|
-
| `state-db-round-trip` |
|
|
21
|
-
| `state-db-integrity` |
|
|
22
|
-
| `state-db-
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `active-runs` | A task run has exceeded the stale threshold (>15 min). | Inspect with `akm task history`; a lane is likely wedged — kill/re-run it. |
|
|
45
|
+
| `state-db-schema` | `fail`: state.db is missing one of `events`, `proposals`, `schema_migrations`, `task_history`. | The message lists the missing tables. |
|
|
46
|
+
| `state-db-round-trip` | `fail`: appending and reading back a probe event failed. The probe row is deleted again. | The message gives the error. |
|
|
47
|
+
| `state-db-integrity` | `fail`: `PRAGMA integrity_check` failed, or reading the freelist failed. `warn`: more than 50% of the pages are free. | For a failed check, follow the repair in the message: back up state.db, run `sqlite3 -readonly state.db ".recover" \| sqlite3 state.new.db`, confirm `state.new.db` passes `integrity_check`, stop every akm process, delete `state.db-wal` and `state.db-shm`, then swap `state.new.db` in as state.db. The free-page warning clears when `akm improve`'s retention purge VACUUMs state.db. |
|
|
48
|
+
| `state-db-migrations` | Always `pass` in a normal run; the message lists the migrations this open applied and the pre-migration copy (`evidence.applied`, `evidence.backupPath`). `fail` when the open could not apply a pending migration, or a read-only run (the `akm ui` health view) finds one pending, which it must not apply; this row is then the whole report. | Run `akm migrate apply`. |
|
|
49
|
+
| `task-history-read` | Always `pass`; reports the number of `task_history` rows read in the window. | None. |
|
|
50
|
+
| `active-runs` | `warn`: a task run has been active for more than 15 minutes. The message names the tasks and their age. | Inspect with `akm task history`. |
|
|
26
51
|
| `connections-and-harnesses` | One table of every configured connection (endpoint, whether its key is held — a `$VAR` set in this shell, a `credentials.json` entry, or none — and whether the endpoint answers) and harness (platform, whether its binary is on `PATH`, and with a probe its `--version`), then the work that runs on them: improve, judges, agents, extract, enrich, index, embedding and curate rerank, each naming the connection or harness and the model it resolves to through the same resolver the calls use (`evidence.rows`, typed `connection`, `harness` or `process`). `warn` when a key variable is unset, an endpoint does not answer, a harness is not installed, several connections (or harnesses) are configured and none is called `default` (said once, with the fix: name one `default`), or a work row cannot resolve because of the config; `unknown` when neither a connection nor a harness is configured; otherwise `pass`. Endpoint reachability is one bounded `GET /models` and the version is the harness's own `--version`; with `--no-probe` neither runs and the message says so. | Correct the named connection, key or harness; run `akm setup` when nothing is configured. A work row whose parts run somewhere other than the row's own target lists them in `overrides`, each with the kind (connection or harness), name and model it runs on: that is a per-process pin, working as set. |
|
|
27
|
-
| `task-fail-rate` | ≥5% of scheduled task runs failed in the window (exit 143/70 recurring), or a single task_id fails at/above the same threshold. (#943) For `command`-kind (agent/LLM dispatch) failures specifically, `evidence.agentFailureReasonCounts` always carries a `detail.reason` breakdown (`timeout`, `non_zero_exit`, `spawn_failed`, …), and the warn message names the dominant reason — e.g. `(timeout-dominant: 9/12 command-task failures)` — when one reason is at least half of the counted command-task failures. | Triage as a bug: `akm task doctor`, inspect failing lane logs. For a native shell/script task, exit-143 = killed/timeout, exit-70 = internal error. For a `command`-kind (agent/LLM) task, read `detail.reason` from `akm task history` instead of the exit code — `timeout` means the dispatch's own deadline (not an outer process kill) expired; `non_zero_exit`/`spawn_failed`/`aborted`/etc. name the other failure shapes. |
|
|
28
|
-
| `data-dir-usage` | The data directory is more than 3× the live databases (`state.db` + `index.db` + `logs.db`), or one top-level subdirectory holds more than half of it; the message names that subdirectory with its size and share. | Look at the named subdirectory. `backups/tasks/` holds one snapshot per `akm migrate apply` run that rewrote a task file; everything under `backups/` is yours to prune. |
|
|
29
52
|
| `semantic-search` | What the last `akm index` recorded about semantic search, with the index's entry and vector counts read now; no model load, no request. `pass` when every entry has a vector (local: on `onnxruntime-node`) or `semanticSearchMode` is `off`; `warn` when vectors lag entries, local embeddings ran on another runtime, or akm offers no local embeddings on this platform (`unavailable: platform`, where keyword search or an endpoint is the default); `fail` when the last index found it `blocked` (endpoint or model download failed) or `unavailable: load` (the runtime could not be downloaded or did not load, for example from a `noexec` cache directory), with the reason; `unknown` before the first index. A hard check, so a `fail` fails `akm health`. | `fail`: fix the reason named, then run `akm index`; the check reads the next index's record. `warn` for the platform: `akm setup --embedding off` for keyword search, or `akm setup --embedding <model> --embedding-endpoint <url>` for a remote endpoint. |
|
|
30
|
-
| `
|
|
31
|
-
| `session-extraction` |
|
|
32
|
-
| `auto-accept-validation` |
|
|
53
|
+
| `task-fail-rate` | `warn`: at least 5% of task runs in the window failed, or one task with at least 5 runs fails at that rate. The message names the dominant `detail.reason` (`timeout`, `non_zero_exit`, `spawn_failed`, ...) when one reason is at least half of the command-task failures. | Inspect failed runs with `akm task history` and `akm task doctor`. `evidence.agentFailureReasonCounts` breaks command-task failures down by reason. |
|
|
54
|
+
| `session-extraction` | `heuristic`. Reads the last 7 days of the extract ledger. `unknown`: nothing recorded. `warn`: every session was skipped or failed for an infrastructure reason (`llm_unavailable`, `read_failed`, `exception`, `locked_concurrent`); the message names the reason and the connection or harness that ran extraction. | Fix the named connection or harness. `unknown` is normal on a machine that does not extract sessions. |
|
|
55
|
+
| `auto-accept-validation` | `heuristic`. Reads `triage.promoted` and `gateAutoAcceptFailedCount` (only rows an older release wrote carry it) from the improve runs in the window. `warn`: proposals passed the confidence gate but failed validation (truncated description, invalid frontmatter); they stay pending. | Review them with `akm proposal list`. |
|
|
56
|
+
| `cli-version` | `warn`: a newer akm release exists on GitHub. `unknown`: `--no-probe`, or the release lookup failed. | Run `akm upgrade`. |
|
|
57
|
+
| `scheduler-binary` | `warn`: the akm binary recorded in the scheduler reports a different version than the running CLI. `unknown`: `--no-probe`, no scheduled task installed, or the recorded binary cannot be run. | Run `akm task sync` to rebind the schedule. |
|
|
58
|
+
| `index-state-generation` | `warn`: usage links in state.db point at index entries that no longer match (an index and state.db from different generations). | Stop concurrent writers and run `akm index --full`. |
|
|
59
|
+
| `stash-git-exposure` | `warn`: `env/` or `secrets/` files are tracked by git in the working bundle and the bundle has a remote. Skipped when the bundle has no `.git`. | Run `git rm --cached` on the listed files and add `env/` and `secrets/` to `.gitignore`. A `.gitignore` rule alone does not untrack files. |
|
|
60
|
+
| `binary-config-skew` | `warn`: `config.json` has a `configVersion` newer than this binary knows. | Upgrade this install. |
|
|
33
61
|
| `egress-endpoints` | Every remote destination in the effective config, as one informational entry: enabled registries, git and website bundles, each connection's endpoint and the embedding endpoint (credentials in a URL are masked). Silent when nothing remote is configured. | Eyeball it against what you expect; a destination you did not configure came from an `extends` base or a shared bundle. |
|
|
34
|
-
| `
|
|
35
|
-
| `memory-cleanup-archive` |
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `plugin-version` / `opencode-plugin-version` | (itlackey/akm#832,) `plugin-version` reports each installed Claude Code harness plugin's version and its declared `AKM_VERSION_RANGE` admission of the running CLI. `opencode-plugin-version` does the same for the OpenCode plugin's own bundled `akm-cli` (read from its `package.json`, never executed) — it runs in-process and shares the host's databases, so its lag matters the same way. OpenCode 1 caches each spec in its own folder, so `opencode-plugin-version` reads the one folder of the spec the global OpenCode config names under `plugin` (`akm-opencode`, read as `akm-opencode@latest`, or `akm-opencode@next`), and for `akm-opencode@<version>` reports the plugin as pinned with no staleness verdict; with no entry, or no folder for it, it reads `packages/akm-opencode`, and it never scans the other cached specs. The newest version is read on the channel the marketplace clone follows: on the remote's default branch the newest stable tag, on any other branch (such as `next`) the release tag on that branch's head, and on a clone pinned to a tag that tag. `plugin-version`'s newest-tag lookup is `--probe`-gated: with `--no-probe` its row is `unknown` ("not probed") and only the local range check still runs. `opencode-plugin-version` reads local files only and is never gated. | A `warn` names the stale/out-of-range plugin and the update command (`claude plugin update <ref>` for the Claude plugin; update the OpenCode plugin for the bundled copy). |
|
|
62
|
+
| `type-directory-disagreement` | `warn`: an indexed asset's resolved type differs from the type its directory declares. Each line gives the file, both types, and the classifier signal that won (`winner`). | Review the listed files. Intended overrides (for example a `knowledge/` file containing `$ARGUMENTS`) are marked `known-good override`. |
|
|
63
|
+
| `memory-cleanup-archive` | `pass` with size and file count when the working bundle has `.akm/memory-cleanup/archive` content and no git history (the purge does not run there). `warn` when a git-backed bundle has archived files the purge cannot remove (untracked, modified, or unverifiable in git). | Commit the archived files so the purge can remove them once they age out. |
|
|
64
|
+
| `data-dir-usage` | `warn`: the data directory is over 1 GB and either more than 3 times the size of `state.db`, `index.db`, and `logs.db` (with their WAL and SHM files), or one top-level subdirectory holds more than half of it. The message names that subdirectory and its size. | Inspect the named subdirectory. `backups/tasks/` holds task-file snapshots written by `akm migrate apply`. |
|
|
65
|
+
| `plugin-version` | One row per installed Claude Code harness plugin: its version and whether its declared `AKM_VERSION_RANGE` admits the running CLI. The newest version is read on the channel the marketplace clone follows: on the remote's default branch the newest stable tag, on any other branch (such as `next`) the release tag on that branch's head, and on a clone pinned to a tag that tag. The newest-tag lookup is `--probe`-gated: with `--no-probe` the row is `unknown` ("not probed") and only the local range check still runs. `warn`: the plugin is stale, or its range does not admit the running CLI. | Run the `claude plugin update <ref>` command in the message. |
|
|
66
|
+
| `opencode-plugin-version` | The same check for the OpenCode plugin's own bundled `akm-cli` (read from its `package.json`, never executed): it runs in-process and shares the host's databases, so its lag matters the same way. OpenCode 1 caches each spec in its own folder, so it reads the one folder of the spec the global OpenCode config names under `plugin` (`akm-opencode`, read as `akm-opencode@latest`, or `akm-opencode@next`), and for `akm-opencode@<version>` reports the plugin as pinned with no staleness verdict; with no entry, or no folder for it, it reads `packages/akm-opencode`, and it never scans the other cached specs. It reads local files only and is never `--probe`-gated. `warn`: the bundled version differs from the running CLI. Omitted when the OpenCode plugin is not installed. | Update the OpenCode plugin. |
|
|
67
|
+
| `state-db-readable` | `fail`: `state.db` cannot be read, or is missing in a read-only run (which does not create it). Every other check is skipped, because none of them can read it. | Check the owner and mode of the data directory (or point `AKM_DATA_DIR` / `XDG_DATA_HOME` at one you own); run any akm command that records state, such as `akm health`, to create it. |
|
|
41
68
|
|
|
42
69
|
## Connections, harnesses and the work on them
|
|
43
70
|
|
|
@@ -52,20 +79,6 @@ The work rows are resolved by the resolvers the calls themselves use, so the
|
|
|
52
79
|
table never disagrees with a call. An unreachable endpoint is a `warn` like
|
|
53
80
|
every other finding here, never a `fail`.
|
|
54
81
|
|
|
55
|
-
Reachability is a real, bounded (3 s) probe (#914) — one `GET` against the
|
|
56
|
-
endpoint's `/models` route; any HTTP response counts, so a cold local server is
|
|
57
|
-
never asked to load a model — made once per distinct endpoint per invocation
|
|
58
|
-
(no cross-run cache, so a stale "reachable" verdict never lingers). Pass
|
|
59
|
-
`--no-probe` to skip it (offline or air-gapped hosts): the rows then carry no
|
|
60
|
-
`reachable` field and the message notes that reachability was not probed.
|
|
61
|
-
|
|
62
82
|
The table's evidence names endpoints so an operator can tell which connection
|
|
63
83
|
was checked; it never includes credential values or the names of the variables
|
|
64
84
|
that hold them, and an endpoint's embedded credentials are masked.
|
|
65
|
-
|
|
66
|
-
`akm health` makes at most two network calls besides the endpoint probe, both
|
|
67
|
-
best-effort and silent on failure and both gated behind `--probe`/`--no-probe`,
|
|
68
|
-
the same flag as endpoint reachability: `plugin-version`'s `git ls-remote` and `cli-version`'s
|
|
69
|
-
GitHub-release lookup. See
|
|
70
|
-
`src/commands/health/plugin-staleness.ts` and
|
|
71
|
-
`src/commands/health/version-drift.ts` for the discipline each follows.
|