akm-cli 0.9.0-rc.0 → 0.9.0-rc.2
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 +339 -2
- package/SECURITY.md +23 -24
- package/dist/assets/help/help-improve.md +10 -10
- package/dist/assets/hints/cli-hints-full.md +44 -10
- package/dist/assets/hints/cli-hints-short.md +6 -2
- package/dist/assets/{profiles → improve-strategies}/default.json +1 -0
- package/dist/assets/{profiles → improve-strategies}/graph-refresh.json +1 -1
- package/dist/assets/{profiles → improve-strategies}/proactive-maintenance.json +2 -3
- package/dist/assets/{profiles → improve-strategies}/reflect-distill.json +3 -4
- package/dist/assets/prompts/workflow-unit-preamble.md +26 -0
- package/dist/assets/stash-skeleton/README.md +28 -0
- package/dist/assets/stash-skeleton/facts/conventions/assets/agent.md +6 -0
- package/dist/assets/stash-skeleton/facts/conventions/assets/command.md +6 -0
- package/dist/assets/stash-skeleton/facts/conventions/assets/fact.md +12 -1
- package/dist/assets/stash-skeleton/facts/conventions/assets/knowledge.md +11 -1
- package/dist/assets/stash-skeleton/facts/conventions/assets/lesson.md +6 -0
- package/dist/assets/stash-skeleton/facts/conventions/assets/memory.md +9 -0
- package/dist/assets/stash-skeleton/facts/conventions/assets/script.md +7 -0
- package/dist/assets/stash-skeleton/facts/conventions/assets/skill.md +7 -0
- package/dist/assets/stash-skeleton/facts/conventions/assets/workflow.md +6 -0
- package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +98 -0
- package/dist/assets/stash-skeleton/facts/conventions/domains.md +63 -0
- package/dist/assets/stash-skeleton/facts/conventions/organization.md +127 -0
- package/dist/assets/tasks/core/backup.yml +1 -0
- package/dist/assets/tasks/core/extract.yml +1 -0
- package/dist/assets/tasks/core/improve.yml +1 -0
- package/dist/assets/tasks/core/index-refresh.yml +1 -0
- package/dist/assets/tasks/core/sync.yml +1 -0
- package/dist/assets/tasks/core/version-check.yml +1 -0
- package/dist/assets/tasks/graph-refresh-weekly.yml +4 -4
- package/dist/assets/templates/html/health.html +5 -1
- package/dist/cli/config-migrate.js +31 -138
- package/dist/cli/config-validate.js +10 -8
- package/dist/cli.js +48 -14
- package/dist/commands/agent/agent-dispatch.js +17 -16
- package/dist/commands/agent/agent-support.js +0 -24
- package/dist/commands/agent/contribute-cli.js +5 -15
- package/dist/commands/backup-cli.js +54 -0
- package/dist/commands/config-cli.js +45 -159
- package/dist/commands/env/env-binding.js +95 -0
- package/dist/commands/env/env-cli.js +8 -65
- package/dist/commands/env/secret.js +8 -5
- package/dist/commands/health/checks.js +130 -83
- package/dist/commands/health/html-report.js +4 -0
- package/dist/commands/health/improve-metrics.js +30 -32
- package/dist/commands/health/llm-usage.js +19 -19
- package/dist/commands/health/md-report.js +4 -0
- package/dist/commands/health/metrics.js +2 -1
- package/dist/commands/health/surfaces.js +5 -4
- package/dist/commands/health.js +1 -1
- package/dist/commands/improve/consolidate/chunking.js +2 -2
- package/dist/commands/improve/consolidate.js +28 -25
- package/dist/commands/improve/distill/promote-memory.js +5 -12
- package/dist/commands/improve/distill/quality-gate.js +5 -7
- package/dist/commands/improve/distill.js +16 -5
- package/dist/commands/improve/eligibility.js +22 -12
- package/dist/commands/improve/extract-cli.js +47 -19
- package/dist/commands/improve/extract.js +110 -62
- package/dist/commands/improve/improve-cli.js +38 -16
- package/dist/commands/improve/improve-result-file.js +30 -24
- package/dist/commands/improve/improve-strategies.js +137 -0
- package/dist/commands/improve/improve.js +60 -30
- package/dist/commands/improve/locks.js +66 -45
- package/dist/commands/improve/loop-stages.js +75 -33
- package/dist/commands/improve/memory/memory-belief.js +79 -7
- package/dist/commands/improve/memory/memory-contradiction-detect.js +12 -4
- package/dist/commands/improve/preparation.js +71 -73
- package/dist/commands/improve/procedural.js +3 -2
- package/dist/commands/improve/recombine.js +2 -1
- package/dist/commands/improve/reflect.js +119 -214
- package/dist/commands/improve/shared.js +11 -5
- package/dist/commands/lint/base-linter.js +152 -42
- package/dist/commands/mv-cli.js +809 -0
- package/dist/commands/proposal/proposal-cli.js +18 -8
- package/dist/commands/proposal/propose.js +64 -69
- package/dist/commands/read/knowledge.js +436 -4
- package/dist/commands/read/remember-cli.js +39 -2
- package/dist/commands/read/search-cli.js +6 -1
- package/dist/commands/registry-cli.js +29 -14
- package/dist/commands/remember.js +2 -0
- package/dist/commands/sources/init.js +13 -14
- package/dist/commands/sources/migration-help.js +7 -4
- package/dist/commands/sources/schema-repair.js +2 -4
- package/dist/commands/sources/source-add.js +62 -73
- package/dist/commands/sources/source-manage.js +50 -46
- package/dist/commands/sources/stash-cli.js +41 -4
- package/dist/commands/tasks/default-tasks.js +12 -12
- package/dist/commands/tasks/tasks-cli.js +7 -3
- package/dist/commands/tasks/tasks.js +113 -18
- package/dist/commands/wiki-cli.js +9 -10
- package/dist/commands/workflow-cli.js +276 -12
- package/dist/core/asset/asset-spec.js +58 -1
- package/dist/core/asset/frontmatter.js +12 -2
- package/dist/core/common.js +5 -3
- package/dist/core/config/config-io.js +28 -17
- package/dist/core/config/config-schema.js +379 -66
- package/dist/core/config/config-types.js +3 -3
- package/dist/core/config/config-version.js +29 -0
- package/dist/core/config/config-walker.js +98 -27
- package/dist/core/config/config.js +132 -266
- package/dist/core/config/deep-merge.js +41 -0
- package/dist/core/config/engine-semantics.js +32 -0
- package/dist/core/errors.js +2 -2
- package/dist/core/extra-params.js +61 -0
- package/dist/core/file-lock.js +201 -56
- package/dist/core/improve-result.js +178 -0
- package/dist/core/json-schema.js +142 -0
- package/dist/core/maintenance-barrier.js +119 -0
- package/dist/core/migration-backup.js +416 -0
- package/dist/core/paths.js +3 -0
- package/dist/core/redaction.js +358 -0
- package/dist/core/state/migrations.js +17 -2
- package/dist/core/state-db.js +44 -1
- package/dist/indexer/db/db.js +118 -2
- package/dist/indexer/graph/graph-extraction.js +28 -16
- package/dist/indexer/index-writer-lock.js +31 -24
- package/dist/indexer/index-written-assets.js +15 -6
- package/dist/indexer/indexer.js +47 -2
- package/dist/indexer/passes/memory-inference.js +10 -6
- package/dist/indexer/passes/metadata.js +250 -0
- package/dist/indexer/search/db-search.js +111 -44
- package/dist/indexer/search/fts-query.js +41 -0
- package/dist/indexer/search/ranking-contributors.js +48 -0
- package/dist/indexer/search/ranking.js +36 -23
- package/dist/indexer/search/search-fields.js +11 -1
- package/dist/indexer/walk/matchers.js +39 -0
- package/dist/integrations/agent/builder-shared.js +7 -0
- package/dist/integrations/agent/builders.js +5 -50
- package/dist/integrations/agent/config.js +3 -143
- package/dist/integrations/agent/detect.js +17 -2
- package/dist/integrations/agent/engine-resolution.js +202 -0
- package/dist/integrations/agent/index.js +1 -2
- package/dist/integrations/agent/model-aliases.js +16 -2
- package/dist/integrations/agent/profiles.js +36 -62
- package/dist/integrations/agent/runner-dispatch.js +91 -4
- package/dist/integrations/agent/runner.js +76 -207
- package/dist/integrations/agent/spawn.js +141 -20
- package/dist/integrations/harnesses/aider/agent-builder.js +112 -0
- package/dist/integrations/harnesses/aider/index.js +57 -0
- package/dist/integrations/harnesses/aider/result-extractor.js +53 -0
- package/dist/integrations/harnesses/amazonq/agent-builder.js +152 -0
- package/dist/integrations/harnesses/amazonq/index.js +58 -0
- package/dist/integrations/harnesses/amazonq/result-extractor.js +48 -0
- package/dist/integrations/harnesses/claude/agent-builder.js +46 -8
- package/dist/integrations/harnesses/claude/index.js +25 -25
- package/dist/integrations/harnesses/claude/result-extractor.js +52 -0
- package/dist/integrations/harnesses/codex/agent-builder.js +136 -0
- package/dist/integrations/harnesses/codex/index.js +62 -0
- package/dist/integrations/harnesses/codex/result-extractor.js +73 -0
- package/dist/integrations/harnesses/copilot/agent-builder.js +121 -0
- package/dist/integrations/harnesses/copilot/index.js +59 -0
- package/dist/integrations/harnesses/copilot/result-extractor.js +151 -0
- package/dist/integrations/harnesses/gemini/agent-builder.js +120 -0
- package/dist/integrations/harnesses/gemini/index.js +59 -0
- package/dist/integrations/harnesses/gemini/result-extractor.js +121 -0
- package/dist/integrations/harnesses/index.js +27 -28
- package/dist/integrations/harnesses/opencode/agent-builder.js +2 -3
- package/dist/integrations/harnesses/opencode/index.js +15 -22
- package/dist/integrations/harnesses/opencode-sdk/harness.js +60 -0
- package/dist/integrations/harnesses/opencode-sdk/index.js +8 -32
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +681 -108
- package/dist/integrations/harnesses/openhands/agent-builder.js +125 -0
- package/dist/integrations/harnesses/openhands/index.js +57 -0
- package/dist/integrations/harnesses/openhands/result-extractor.js +103 -0
- package/dist/integrations/harnesses/pi/agent-builder.js +103 -0
- package/dist/integrations/harnesses/pi/index.js +57 -0
- package/dist/integrations/harnesses/pi/result-extractor.js +135 -0
- package/dist/integrations/harnesses/types.js +8 -32
- package/dist/integrations/lockfile.js +32 -21
- package/dist/integrations/session-logs/index.js +24 -11
- package/dist/llm/client.js +48 -14
- package/dist/llm/feature-gate.js +15 -47
- package/dist/llm/graph-extract.js +1 -1
- package/dist/llm/index-passes.js +8 -42
- package/dist/llm/memory-infer-impl.js +1 -1
- package/dist/llm/usage-persist.js +4 -0
- package/dist/llm/usage-telemetry.js +35 -5
- package/dist/output/renderers.js +3 -2
- package/dist/output/shapes/helpers.js +2 -1
- package/dist/output/shapes/passthrough.js +6 -0
- package/dist/output/text/helpers.js +215 -2
- package/dist/output/text/workflow.js +3 -1
- package/dist/schemas/akm-config.json +16638 -0
- package/dist/schemas/akm-task.json +87 -0
- package/dist/schemas/akm-workflow.json +372 -0
- package/dist/scripts/migrate-storage.js +10944 -8801
- package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +9247 -350
- package/dist/setup/detected-engines.js +142 -0
- package/dist/setup/engine-config.js +89 -0
- package/dist/setup/setup.js +236 -132
- package/dist/setup/steps/connection.js +61 -32
- package/dist/setup/steps/platforms.js +4 -4
- package/dist/setup/steps.js +3 -2
- package/dist/storage/database.js +13 -1
- package/dist/storage/engines/sqlite-migrations.js +1 -0
- package/dist/storage/repositories/improve-runs-repository.js +5 -5
- package/dist/storage/repositories/task-history-repository.js +78 -0
- package/dist/storage/repositories/workflow-runs-repository.js +190 -1
- package/dist/tasks/parser.js +138 -52
- package/dist/tasks/runner.js +71 -75
- package/dist/tasks/schema.js +1 -1
- package/dist/tasks/validator.js +11 -6
- package/dist/text-import-hook.mjs +1 -1
- package/dist/wiki/wiki.js +9 -8
- package/dist/workflows/authoring/authoring.js +123 -10
- package/dist/workflows/authoring/workflow-program-template.yaml +31 -0
- package/dist/workflows/cli.js +4 -0
- package/dist/workflows/concurrency-policy.js +15 -0
- package/dist/workflows/db.js +200 -13
- package/dist/workflows/exec/brief.js +478 -0
- package/dist/workflows/exec/frozen-judge.js +47 -0
- package/dist/workflows/exec/native-executor.js +1034 -0
- package/dist/workflows/exec/param-secrets.js +115 -0
- package/dist/workflows/exec/report.js +1355 -0
- package/dist/workflows/exec/run-workflow.js +609 -0
- package/dist/workflows/exec/scheduler.js +71 -0
- package/dist/workflows/exec/step-work.js +1212 -0
- package/dist/workflows/exec/unit-writer.js +23 -0
- package/dist/workflows/exec/watch.js +116 -0
- package/dist/workflows/exec/worktree.js +171 -0
- package/dist/workflows/ir/compile.js +375 -0
- package/dist/workflows/ir/freeze.js +243 -0
- package/dist/workflows/ir/params.js +54 -0
- package/dist/workflows/ir/plan-hash.js +68 -0
- package/dist/workflows/ir/schema.js +545 -0
- package/dist/workflows/parser.js +10 -1
- package/dist/workflows/program/expressions.js +369 -0
- package/dist/workflows/program/parser.js +869 -0
- package/dist/workflows/program/project.js +104 -0
- package/dist/workflows/program/schema.js +54 -0
- package/dist/workflows/renderer.js +82 -5
- package/dist/workflows/resource-limits.js +20 -0
- package/dist/workflows/runtime/agent-identity.js +59 -14
- package/dist/workflows/runtime/plan-classifier.js +187 -0
- package/dist/workflows/runtime/runs.js +246 -69
- package/dist/workflows/runtime/unit-checkin.js +45 -0
- package/dist/workflows/runtime/workflow-asset-loader.js +42 -1
- package/dist/workflows/validate-summary.js +24 -3
- package/dist/workflows/validator.js +26 -1
- package/docs/data-and-telemetry.md +4 -3
- package/docs/migration/release-notes/0.6.0.md +1 -1
- package/docs/migration/release-notes/0.7.0.md +5 -4
- package/docs/migration/release-notes/0.9.0-beta.60.md +19 -0
- package/docs/migration/v0.8-to-v0.9.md +401 -0
- package/package.json +4 -2
- package/schemas/akm-config.json +16638 -0
- package/schemas/akm-task.json +87 -0
- package/schemas/akm-workflow.json +372 -0
- package/dist/commands/improve/improve-profiles.js +0 -168
- package/dist/core/config/config-migration.js +0 -602
- package/dist/core/deep-merge.js +0 -38
- package/dist/llm/call-ai.js +0 -62
- package/dist/setup/legacy-config.js +0 -106
- package/docs/README.md +0 -104
- /package/dist/assets/{profiles → improve-strategies}/catchup.json +0 -0
- /package/dist/assets/{profiles → improve-strategies}/consolidate.json +0 -0
- /package/dist/assets/{profiles → improve-strategies}/frequent.json +0 -0
- /package/dist/assets/{profiles → improve-strategies}/memory-focus.json +0 -0
- /package/dist/assets/{profiles → improve-strategies}/quick.json +0 -0
- /package/dist/assets/{profiles → improve-strategies}/recombine-only.json +0 -0
- /package/dist/assets/{profiles → improve-strategies}/synthesize.json +0 -0
- /package/dist/assets/{profiles → improve-strategies}/thorough.json +0 -0
|
@@ -1,12 +1,37 @@
|
|
|
1
1
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
2
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
+
/**
|
|
5
|
+
* Cross-cutting semantic checks over an assembled WorkflowDocument draft.
|
|
6
|
+
*
|
|
7
|
+
* The parser handles per-line shape checks; this module runs rules that need
|
|
8
|
+
* the whole document or the raw frontmatter at once: duplicate step IDs,
|
|
9
|
+
* step-id format, and the frontmatter key whitelist.
|
|
10
|
+
*/
|
|
11
|
+
import { utf8Bytes, WORKFLOW_MAX_INSTRUCTION_BYTES, WORKFLOW_MAX_PARAMS, WORKFLOW_MAX_STEPS } from "./resource-limits.js";
|
|
4
12
|
const STEP_ID_REGEX = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
5
13
|
const ALLOWED_FRONTMATTER_KEYS = new Set(["description", "tags", "params", "name", "updated", "when_to_use"]);
|
|
6
14
|
export function runSemanticChecks(draft, frontmatterData, frontmatterEndLine, errors) {
|
|
7
15
|
checkFrontmatterKeys(frontmatterData, frontmatterEndLine, errors);
|
|
8
16
|
checkStepIdFormat(draft, errors);
|
|
9
17
|
checkDuplicateStepIds(draft, errors);
|
|
18
|
+
checkResourceLimits(draft, errors);
|
|
19
|
+
}
|
|
20
|
+
function checkResourceLimits(draft, errors) {
|
|
21
|
+
if (draft.steps.length > WORKFLOW_MAX_STEPS) {
|
|
22
|
+
errors.push({ line: 1, message: `Workflow must contain at most ${WORKFLOW_MAX_STEPS} steps.` });
|
|
23
|
+
}
|
|
24
|
+
if ((draft.parameters?.length ?? 0) > WORKFLOW_MAX_PARAMS) {
|
|
25
|
+
errors.push({ line: 1, message: `Workflow must contain at most ${WORKFLOW_MAX_PARAMS} parameters.` });
|
|
26
|
+
}
|
|
27
|
+
for (const step of draft.steps) {
|
|
28
|
+
if (utf8Bytes(step.instructions.text) > WORKFLOW_MAX_INSTRUCTION_BYTES) {
|
|
29
|
+
errors.push({
|
|
30
|
+
line: step.instructions.source.start,
|
|
31
|
+
message: `Step "${step.id}" instructions exceed the 256 KiB resource limit.`,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
10
35
|
}
|
|
11
36
|
function checkFrontmatterKeys(data, fmEndLine, errors) {
|
|
12
37
|
for (const key of Object.keys(data)) {
|
|
@@ -14,7 +39,7 @@ function checkFrontmatterKeys(data, fmEndLine, errors) {
|
|
|
14
39
|
continue;
|
|
15
40
|
errors.push({
|
|
16
41
|
line: fmEndLine,
|
|
17
|
-
message: `Workflow frontmatter "${key}" is not supported. Use only: description, tags, params, when_to_use.`,
|
|
42
|
+
message: `Workflow frontmatter "${key}" is not supported. Use only: description, tags, params, name, updated, when_to_use.`,
|
|
18
43
|
});
|
|
19
44
|
}
|
|
20
45
|
}
|
|
@@ -26,7 +26,7 @@ AKM writes to these locations on your machine. All paths follow [XDG Base Direct
|
|
|
26
26
|
|
|
27
27
|
| Path | Contents | Safe to delete? |
|
|
28
28
|
|---|---|---|
|
|
29
|
-
| `config.json` | Your AKM configuration:
|
|
29
|
+
| `config.json` | Your AKM configuration: engines, strategies, stash paths, and feature settings | **No** — deleting resets all settings |
|
|
30
30
|
|
|
31
31
|
Override: set `AKM_CONFIG_DIR` or `XDG_CONFIG_HOME`.
|
|
32
32
|
|
|
@@ -109,7 +109,7 @@ An append-only log of every mutating action you perform with AKM. Events are sto
|
|
|
109
109
|
| `select` | `akm show` after a search returning the same ref | `ref`, `entryId` |
|
|
110
110
|
| `promoted` | `akm proposal accept <id>` | `ref` |
|
|
111
111
|
| `rejected` | `akm proposal reject <id>` | `ref` |
|
|
112
|
-
| `reflect_invoked` | Start of reflect phase in `akm improve` | `ref`,
|
|
112
|
+
| `reflect_invoked` | Start of reflect phase in `akm improve` | `ref`, engine |
|
|
113
113
|
| `reflect_completed` | Reflect phase produced a proposal | `ref` |
|
|
114
114
|
| `improve_reflect_outcome` | Per-asset reflect result | `ref`, `ok`, `durationMs`, `reason` |
|
|
115
115
|
| `propose_invoked` | `akm propose` | `ref` |
|
|
@@ -123,7 +123,8 @@ An append-only log of every mutating action you perform with AKM. Events are sto
|
|
|
123
123
|
| `proposal_expired` | Proposal expired | `ref` |
|
|
124
124
|
| `events_purged` | Old events deleted by maintenance | `purgedCount`, `retentionDays` |
|
|
125
125
|
| `workflow_started` | `akm workflow start <ref>` | `ref`, `runId` |
|
|
126
|
-
| `workflow_step_completed` | `akm workflow next` | `ref`, `runId`, `stepId` |
|
|
126
|
+
| `workflow_step_completed` | `akm workflow next` (genuine `completed` transition only) | `ref`, `runId`, `stepId`, `status` |
|
|
127
|
+
| `workflow_step_updated` | `akm workflow next` (non-`completed` transitions: `failed`/`skipped`/`blocked`) | `ref`, `runId`, `stepId`, `status` |
|
|
127
128
|
| `workflow_finished` | `akm workflow complete` | `ref`, `runId` |
|
|
128
129
|
| `schema_repair_invoked` | `akm lint --repair` triggered schema repair | `ref` |
|
|
129
130
|
| `archive_cleanup` | Archive cleanup during consolidation | |
|
|
@@ -90,7 +90,7 @@ vault | wiki | enable | disable | completions | upgrade | save | help |
|
|
|
90
90
|
hints
|
|
91
91
|
|
|
92
92
|
Full migration guides:
|
|
93
|
-
- https://github.com/itlackey/akm/blob/main/docs/
|
|
93
|
+
- https://github.com/itlackey/akm/blob/main/docs/archive/pre-1.0-migration.md (pre-1.0
|
|
94
94
|
architecture refactor — read this first if you are coming from 0.5.x or
|
|
95
95
|
an earlier 0.6 pre-release)
|
|
96
96
|
- https://github.com/itlackey/akm/blob/main/docs/migration/v0.5-to-v0.6.md
|
|
@@ -13,7 +13,7 @@ grammar continue to match the v1 architecture spec
|
|
|
13
13
|
pre-releases — the formal freeze itself happens at 1.0 GA.
|
|
14
14
|
|
|
15
15
|
If you are coming from 0.6.x, the
|
|
16
|
-
[
|
|
16
|
+
[archived pre-1.0 migration plan](../../archive/pre-1.0-migration.md) covers the historical per-surface delta and is the
|
|
17
17
|
canonical upgrade reference. This file is the executive summary of
|
|
18
18
|
what's new in 0.7.0.
|
|
19
19
|
|
|
@@ -47,7 +47,8 @@ akm proposal reject <id> --reason "…" # archive with reason
|
|
|
47
47
|
Multiple proposals for the same `ref` coexist without filesystem
|
|
48
48
|
collisions. Auto-accept is gated per-source via the source config
|
|
49
49
|
(`autoAcceptProposals: true`); the default is off and requires a
|
|
50
|
-
writable source. See
|
|
50
|
+
writable source. See the archived pre-1.0 migration spec §11 at
|
|
51
|
+
`docs/archive/pre-1.0-migration.md`.
|
|
51
52
|
|
|
52
53
|
### `akm reflect`, `akm propose`, `akm distill` — new CLI surfaces (#225, #226, #227)
|
|
53
54
|
|
|
@@ -141,7 +142,7 @@ The bench technical reference lives in
|
|
|
141
142
|
- Earlier 0.7.x pre-release work (#220–#223) finalised the registry
|
|
142
143
|
curation surface removal, classification pipeline rewrites, and
|
|
143
144
|
error envelope shape that 0.7.0 ships. Operators upgrading from a
|
|
144
|
-
0.6.x baseline should read [
|
|
145
|
+
0.6.x baseline should read the [archived pre-1.0 plan](../../archive/pre-1.0-migration.md) for
|
|
145
146
|
the per-surface migration recipe.
|
|
146
147
|
|
|
147
148
|
### CLI surface as of 0.7.0
|
|
@@ -257,7 +258,7 @@ akm proposal accept <id>
|
|
|
257
258
|
|
|
258
259
|
## Full migration guides
|
|
259
260
|
|
|
260
|
-
- [
|
|
261
|
+
- [Archived pre-1.0 migration plan](../../archive/pre-1.0-migration.md) — per-surface delta from any 0.6.x
|
|
261
262
|
baseline. The canonical reference for upgrading.
|
|
262
263
|
- [v0.5 → v0.6](../v0.5-to-v0.6.md) — the older terminology cut and
|
|
263
264
|
registry schema v3.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Migration notes for akm v0.9.0-beta.60
|
|
2
|
+
|
|
3
|
+
This beta brings command-surface alignment updates. The functional storage and API shape remain stable for existing 0.9.0-compatible stashes, but old command naming and docs references are now considered deprecated in this cycle.
|
|
4
|
+
|
|
5
|
+
Key operator-facing changes:
|
|
6
|
+
|
|
7
|
+
- `akm vault` is replaced by `akm env`/`akm secret` as the preferred secure runtime surface.
|
|
8
|
+
- `akm save` is replaced by `akm sync` for writable-stash persistence and pushes.
|
|
9
|
+
- `akm events` is replaced by `akm log`.
|
|
10
|
+
- Proposal workflow is consolidated on `akm improve`, `akm propose`, and `akm proposal ...`.
|
|
11
|
+
- Legacy migration notes references (`reflect`, `distill`, flat `proposals/accept/reject` aliases) are deferred to final 0.9 cleanup.
|
|
12
|
+
|
|
13
|
+
Recommended checks:
|
|
14
|
+
|
|
15
|
+
- Run `akm help migrate 0.9.0-beta.60` on each machine after upgrade.
|
|
16
|
+
- Run `akm-migrate-storage --yes` if older stashes still use `vaults/` only.
|
|
17
|
+
- Rebuild search with `akm index` after any migration step.
|
|
18
|
+
|
|
19
|
+
No additional storage migration is required for existing 0.9.0 betas that already use `env/`.
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
# Migrating from akm 0.8.x to 0.9.0
|
|
2
|
+
|
|
3
|
+
0.9.0 is a strict engine and strategy cutover. It removes the CLI deprecation
|
|
4
|
+
aliases introduced during the 0.8 stabilization window and the deprecated
|
|
5
|
+
`vault` asset type. It does not translate profile-based configuration, workflow,
|
|
6
|
+
or task files automatically. Create the recovery backup before changing a live
|
|
7
|
+
installation, then migrate the affected assets deliberately.
|
|
8
|
+
|
|
9
|
+
## Engine And Task Assets
|
|
10
|
+
|
|
11
|
+
Before editing a 0.8 configuration, create a recovery bundle:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
akm backup create --for 0.9.0
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The immutable bundle is stored under `$CACHE/migration-backups/0.9.0`
|
|
18
|
+
(`$XDG_CACHE_HOME/akm` by default on Linux). It records both present and absent files for
|
|
19
|
+
`config.json`, `state.db`, and `workflow.db`, verifies every captured file by
|
|
20
|
+
SHA-256, and is created automatically before AKM first opens either canonical
|
|
21
|
+
durable database for the 0.9 engine migrations. Do not move individual files
|
|
22
|
+
into or out of the bundle; verification fails closed on any mismatch.
|
|
23
|
+
|
|
24
|
+
Replace `profiles.llm.<name>` and `profiles.agent.<name>` with one
|
|
25
|
+
`engines.<name>` map. Replace `defaults.llm`, `defaults.agent`, and
|
|
26
|
+
`defaults.improve` with `defaults.llmEngine`, `defaults.engine`, and
|
|
27
|
+
`defaults.improveStrategy`. Replace `profiles.improve.<name>` with
|
|
28
|
+
`improve.strategies.<name>`, process `mode`/`profile` with `engine`, and CLI
|
|
29
|
+
`--profile` with `--strategy` for improve or `--engine` for execution.
|
|
30
|
+
|
|
31
|
+
Do not reuse a colliding LLM and agent profile name without deciding which new
|
|
32
|
+
engine names make the distinction clear. AKM cannot safely infer that choice.
|
|
33
|
+
|
|
34
|
+
Task files are strict YAML v2. Add `version: 2`, replace prompt `profile:` with
|
|
35
|
+
`engine:`, and retain only fields valid for the target:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
version: 2
|
|
39
|
+
schedule: "@daily"
|
|
40
|
+
prompt: Review the previous day's changes.
|
|
41
|
+
engine: reviewer
|
|
42
|
+
model: claude-sonnet-4-6
|
|
43
|
+
timeoutMs: 600000
|
|
44
|
+
enabled: true
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Prompt tasks may use `engine`, `model`, `timeoutMs`, and `llm`; command tasks
|
|
48
|
+
may use `timeoutMs`; workflow tasks may use `params`. Unknown and wrong-target
|
|
49
|
+
keys are errors. `akm tasks list`, `sync`, and `doctor` report stale v1 files;
|
|
50
|
+
`show`, `run`, `enable`, and `disable` reject them without mutation. Regenerate
|
|
51
|
+
the known default improve tasks or replace `akm improve --profile <name>` with
|
|
52
|
+
`akm improve --strategy <name>` yourself. AKM never rewrites arbitrary shell
|
|
53
|
+
commands.
|
|
54
|
+
|
|
55
|
+
## CLI rename table (old → new, removed 0.9.0)
|
|
56
|
+
|
|
57
|
+
Every old spelling prints a stderr deprecation warning in 0.8.x (suppressed
|
|
58
|
+
under `--quiet`) and delegates to the canonical form. JSON stdout is unaffected.
|
|
59
|
+
|
|
60
|
+
| Old spelling (0.8, deprecated) | Canonical (use this) | Notes |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| `akm proposals` | `akm proposal list` | bare `akm proposal` also lists |
|
|
63
|
+
| `akm show proposal <id>` | `akm proposal show <id>` | |
|
|
64
|
+
| `akm diff <id>` | `akm proposal diff <id>` | |
|
|
65
|
+
| `akm accept <id>` | `akm proposal accept <id>` | |
|
|
66
|
+
| `akm reject <id>` | `akm proposal reject <id>` | |
|
|
67
|
+
| `akm revert <id>` | `akm proposal revert <id>` | |
|
|
68
|
+
| `--detail summary` | `--shape summary` | `--detail` is now verbosity only (`brief\|normal\|full`) |
|
|
69
|
+
| `--detail agent` | `--shape agent` | |
|
|
70
|
+
| `--for-agent` | `--shape agent` | |
|
|
71
|
+
| `--source` (on `accept`/`reject`/`history`) | `--generator` | unchanged on `search`/`curate`/`graph`/`remember` |
|
|
72
|
+
| `akm save` | `akm sync` | `sync` = commit + optional push; adds `--no-push` |
|
|
73
|
+
| `akm enable <component>` | `akm config enable <component>` | |
|
|
74
|
+
| `akm disable <component>` | `akm config disable <component>` | |
|
|
75
|
+
| `akm events` | `akm log` | `log` is primary in 0.9.0; `history` is a different (asset-scoped) surface |
|
|
76
|
+
| `akm wiki remove --force` | `akm wiki remove -y` | `--force` skips the new confirmation prompt; use `-y`/`--yes` |
|
|
77
|
+
| `akm feedback --note <text>` | `akm feedback --reason <text>` | |
|
|
78
|
+
| `akm workflow next --dry-run` | (removed) | the flag is gone; `next` never supported a dry run |
|
|
79
|
+
|
|
80
|
+
Additive (non-breaking) singular aliases also shipped in 0.8: `akm task`
|
|
81
|
+
(= `akm tasks`) and `akm lesson` (= `akm lessons`).
|
|
82
|
+
|
|
83
|
+
## Safety guards added in 0.8 (behavior change for non-interactive callers)
|
|
84
|
+
|
|
85
|
+
Two previously-unguarded destructive paths now confirm before acting. **Scripts
|
|
86
|
+
that invoked these non-interactively must add `-y` / `--yes`:**
|
|
87
|
+
|
|
88
|
+
- `akm registry remove <name>` — prompts before removing the registry; pass `-y`
|
|
89
|
+
to skip. Non-interactive use without `-y` aborts.
|
|
90
|
+
- `akm proposal accept --generator <g>` (the **bulk** form) — prompts before
|
|
91
|
+
promoting every matching proposal. Single-id accept is unchanged (revertable).
|
|
92
|
+
|
|
93
|
+
## Proposal triage replaces the `process-proposals` prompt task
|
|
94
|
+
|
|
95
|
+
Move a 0.8 triage process into the selected 0.9 improve strategy. The folded
|
|
96
|
+
pre-pass remains the recommended shape:
|
|
97
|
+
|
|
98
|
+
```jsonc
|
|
99
|
+
{
|
|
100
|
+
"improve": {
|
|
101
|
+
"strategies": {
|
|
102
|
+
"default": {
|
|
103
|
+
"processes": {
|
|
104
|
+
"triage": {
|
|
105
|
+
"enabled": true,
|
|
106
|
+
"applyMode": "queue",
|
|
107
|
+
"policy": "personal-stash"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If a separate schedule is required, replace the old agent prompt task with a
|
|
117
|
+
strict task YAML v2 command:
|
|
118
|
+
|
|
119
|
+
```yaml
|
|
120
|
+
version: 2
|
|
121
|
+
schedule: "20 * * * *"
|
|
122
|
+
command: akm proposal drain --policy personal-stash --yes
|
|
123
|
+
enabled: true
|
|
124
|
+
name: Drain AKM proposal queue
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Task files live in your stash and AKM does not rewrite them. The deterministic
|
|
128
|
+
`akm proposal drain` verb, or the folded strategy pre-pass, is the supported
|
|
129
|
+
0.9 path.
|
|
130
|
+
|
|
131
|
+
## Single batch-at-boundary git commit (`options.pushOnCommit` deprecated)
|
|
132
|
+
|
|
133
|
+
0.9.0 unifies the two commit models for git-backed sources onto a single
|
|
134
|
+
**batch-at-boundary** model (issue #507). Previously, writing an asset to a
|
|
135
|
+
writable git `--target` committed (and optionally pushed) **per asset**, gated
|
|
136
|
+
on `options.pushOnCommit`. That staged only the single asset file (leaving
|
|
137
|
+
`.akm/` state dirty) and produced one noisy commit per asset.
|
|
138
|
+
|
|
139
|
+
Now every write/delete to a source is a plain filesystem operation with **no**
|
|
140
|
+
per-asset commit. Git-backed targets are committed **once** at the end of the
|
|
141
|
+
operation (e.g. `akm remember --target <git-source>`, proposal accept/revert,
|
|
142
|
+
consolidate) as a single complete commit (`git add -A` staging `.akm/` + assets
|
|
143
|
+
together), pushed under the same `writable + remote` gate as `akm save`/`akm sync`.
|
|
144
|
+
|
|
145
|
+
**Migration:** `options.pushOnCommit` is **deprecated**. Existing configs still
|
|
146
|
+
parse — its push intent is honored via the batch push gate, and akm prints a
|
|
147
|
+
one-time deprecation warning when it encounters the option. Remove
|
|
148
|
+
`pushOnCommit` from your source config and rely on `writable: true` (plus a
|
|
149
|
+
configured remote) to push. No behavior is lost: a writable git target with a
|
|
150
|
+
remote is still pushed; a target without a remote (or with push disabled)
|
|
151
|
+
commits only.
|
|
152
|
+
|
|
153
|
+
## `vault` → `env` / `secret`
|
|
154
|
+
|
|
155
|
+
0.9.0 also removes the deprecated `vault` asset type. Its replacement, the `env`
|
|
156
|
+
asset type, shipped in 0.8.0 alongside a deprecation shim and an automatic
|
|
157
|
+
`vaults/` → `env/` migration. This guide explains what changed, how to migrate,
|
|
158
|
+
and what 0.9.0 removes.
|
|
159
|
+
|
|
160
|
+
> **TL;DR:** In 0.8.0, run the migration (`akm-migrate-storage --yes`) to copy
|
|
161
|
+
> `vaults/` → `env/`, then switch your scripts from `akm vault …` to
|
|
162
|
+
> `akm env …` and from `source "$(akm vault path …)"` to
|
|
163
|
+
> `akm env run env:<name> -- <command>` (or `-- $SHELL` for an interactive
|
|
164
|
+
> session). Everything keeps working through 0.8.x; the `vault` verb and
|
|
165
|
+
> `vault:` refs are removed in 0.9.0.
|
|
166
|
+
|
|
167
|
+
## Table of contents
|
|
168
|
+
|
|
169
|
+
- [Why `vault` → `env`](#why-vault--env)
|
|
170
|
+
- [What changed in 0.8.0](#what-changed-in-080)
|
|
171
|
+
- [Running the migration](#running-the-migration)
|
|
172
|
+
- [Command mapping](#command-mapping)
|
|
173
|
+
- [The safe shell-load path](#the-safe-shell-load-path)
|
|
174
|
+
- [Single values are now secrets](#single-values-are-now-secrets)
|
|
175
|
+
- [What 0.9.0 removes](#what-090-removes)
|
|
176
|
+
- [Verifying the migration](#verifying-the-migration)
|
|
177
|
+
- [Rolling back](#rolling-back)
|
|
178
|
+
|
|
179
|
+
## Why `vault` → `env`
|
|
180
|
+
|
|
181
|
+
The old `vault` type managed individual `KEY=value` entries: `vault set`,
|
|
182
|
+
`vault unset`, comment management, and bespoke value quoting. That hand-rolled
|
|
183
|
+
write surface was the riskiest part of the feature. 0.8.0 simplifies the model
|
|
184
|
+
and splits it by **purpose**:
|
|
185
|
+
|
|
186
|
+
- **`env`** — a group of related **configuration** for an app/service (URLs,
|
|
187
|
+
flags, and any credentials it needs) in one `.env` file, sourced or injected
|
|
188
|
+
**wholesale**. Values may or may not be sensitive — all are protected. akm no
|
|
189
|
+
longer edits entries; you edit the file with your own editor and akm loads it.
|
|
190
|
+
- **`secret`** — a single **sensitive value** used on its own for authentication
|
|
191
|
+
(one file = one value: a token, key, or cert), for the cases where
|
|
192
|
+
`vault set <ref> <KEY>` was used to store one credential.
|
|
193
|
+
|
|
194
|
+
Both protect values identically (never written to stdout, the index, or any
|
|
195
|
+
structured output); env additionally surfaces key names for discoverability
|
|
196
|
+
(comment text is never surfaced — comments can contain commented-out
|
|
197
|
+
credentials). Pick `env` for configuration, `secret` for a standalone
|
|
198
|
+
authentication credential.
|
|
199
|
+
|
|
200
|
+
## What changed in 0.8.0
|
|
201
|
+
|
|
202
|
+
| Area | 0.7.x / early 0.8 | 0.8.0+ |
|
|
203
|
+
| --- | --- | --- |
|
|
204
|
+
| Asset type | `vault` | `env` (`vault` is a deprecated alias) |
|
|
205
|
+
| Directory | `vaults/` | `env/` (`vaults/` frozen after migration) |
|
|
206
|
+
| Ref prefix | `vault:prod` | `env:prod` (also accepts `environment:`; `vault:` still resolves) |
|
|
207
|
+
| Shell load | `source "$(akm vault path …)"` | `akm env run env:prod -- $SHELL` (or `export --out <file>` then source) |
|
|
208
|
+
| Run | `akm vault run vault:prod[/KEY] -- …` | `akm env run env:prod [--only K] -- …` |
|
|
209
|
+
| Set one value | `akm vault set vault:prod KEY` | `akm secret set secret:key` (or edit the `.env`) |
|
|
210
|
+
| Ingest a `.env` | (hand-copy into `vaults/`) | `akm env create prod --from-file ./.env` |
|
|
211
|
+
| Delete | (hand-delete the file) | `akm env remove env:prod` |
|
|
212
|
+
| Renderer | `vault-env` | `env-file` |
|
|
213
|
+
| Audit event | `vault_access` | `env_access` (`metadata.deprecatedAlias` when reached via the `vault` shim) |
|
|
214
|
+
|
|
215
|
+
The `akm vault` verb still works in 0.8.x: it prints a stderr deprecation
|
|
216
|
+
warning and delegates `list` / `path` / `export` / `run` / `create` to the
|
|
217
|
+
`env` handlers. `vault set` / `vault unset` and the single-key
|
|
218
|
+
`vault run <ref>/KEY` form are **hard-errors** with a signpost — silent changes
|
|
219
|
+
to secret-handling behaviour are unacceptable.
|
|
220
|
+
|
|
221
|
+
## Running the migration
|
|
222
|
+
|
|
223
|
+
The migration copies `<stash>/vaults/` → `<stash>/env/`. It is **copy, never
|
|
224
|
+
move**: the legacy `vaults/` tree is left intact as a frozen copy and a
|
|
225
|
+
`vaults/.migrated` marker is written so re-runs are no-ops.
|
|
226
|
+
|
|
227
|
+
```sh
|
|
228
|
+
# Preview (no changes written)
|
|
229
|
+
akm-migrate-storage --dry-run
|
|
230
|
+
|
|
231
|
+
# Apply
|
|
232
|
+
akm-migrate-storage --yes
|
|
233
|
+
|
|
234
|
+
# From a source clone:
|
|
235
|
+
bun scripts/migrate-storage.ts --yes
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
What the `vaults/ → env/` step does:
|
|
239
|
+
|
|
240
|
+
1. Skips entirely if there is no `vaults/` directory, if the `.migrated` marker
|
|
241
|
+
already exists, or if `vaults/` contains no `.env` files (e.g. a fresh
|
|
242
|
+
install).
|
|
243
|
+
2. Copies every file under `vaults/` into `env/` as **opaque bytes** (`.env`,
|
|
244
|
+
`.sensitive`, and `.lock` sidecars alike) — contents are never read or
|
|
245
|
+
re-serialised.
|
|
246
|
+
3. **Never overwrites** an `env/` file you already authored (those are skipped
|
|
247
|
+
and preserved).
|
|
248
|
+
4. Tightens permissions on the copied tree: `0600` files, `0700` directories,
|
|
249
|
+
then verifies the mode. (The generic copy helper checks size only, so this
|
|
250
|
+
pass guarantees migrated secret material does not land at the umask default.)
|
|
251
|
+
5. Verifies the post-copy `.env` count is at least the source count, then writes
|
|
252
|
+
the `vaults/.migrated` marker.
|
|
253
|
+
|
|
254
|
+
After migrating, run `akm index` to refresh search so entries surface under
|
|
255
|
+
`env:` rather than `vault:`.
|
|
256
|
+
|
|
257
|
+
## Command mapping
|
|
258
|
+
|
|
259
|
+
```sh
|
|
260
|
+
# List
|
|
261
|
+
akm vault list → akm env list
|
|
262
|
+
|
|
263
|
+
# Inspect keys (values never shown)
|
|
264
|
+
akm show vault:prod → akm show env:prod
|
|
265
|
+
|
|
266
|
+
# Load values into a shell (use a subshell — safe, nothing on disk)
|
|
267
|
+
source "$(akm vault path vault:prod)" → akm env run env:prod -- $SHELL
|
|
268
|
+
|
|
269
|
+
# Run a command with the env injected
|
|
270
|
+
akm vault run vault:prod -- ./deploy.sh → akm env run env:prod -- ./deploy.sh
|
|
271
|
+
|
|
272
|
+
# Create / ingest an existing .env
|
|
273
|
+
akm vault create prod → akm env create prod
|
|
274
|
+
# or: akm env create prod --from-file ./.env
|
|
275
|
+
|
|
276
|
+
# Edit (akm no longer manages entries)
|
|
277
|
+
akm vault set vault:prod DB_URL → $EDITOR "$(akm env path env:prod --quiet)"
|
|
278
|
+
# or: akm secret set secret:db-url
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Existing `vault:` refs embedded in your own assets are **not** rewritten (akm
|
|
282
|
+
never mutates your content). They keep resolving through 0.8.x: the resolver
|
|
283
|
+
prefers `env/` and falls back to the frozen `vaults/` copy.
|
|
284
|
+
|
|
285
|
+
## The safe load paths
|
|
286
|
+
|
|
287
|
+
`env path` prints the **raw** file path. Do **not** `source` it: a hand-edited
|
|
288
|
+
or migrated `.env` containing `X=$(rm -rf ~)` would execute on `source`.
|
|
289
|
+
|
|
290
|
+
- **Processes / agents / interactive** — `akm env run env:prod -- <cmd>` (or
|
|
291
|
+
`-- $SHELL`). Values go straight into the child process, never through a shell
|
|
292
|
+
and never onto stdout. **This is the only path safe for AI agents** —
|
|
293
|
+
`env export`/`env path` put value-bearing data where a captured context would
|
|
294
|
+
ingest it.
|
|
295
|
+
- **A sourceable file** (a tool that must `source` a script) — `akm env export
|
|
296
|
+
env:prod --out <file>` writes single-quote-escaped `export KEY='value'` lines
|
|
297
|
+
to a file (mode 0600); the values are re-serialised so sourcing it can never
|
|
298
|
+
execute a substitution. `export` never prints values to stdout, so it requires
|
|
299
|
+
`--out`.
|
|
300
|
+
- **Docker `_FILE` / `--env-file`** — `akm env path env:prod --quiet` prints the
|
|
301
|
+
raw file path for tools that read it themselves.
|
|
302
|
+
|
|
303
|
+
## Single values are now secrets
|
|
304
|
+
|
|
305
|
+
If you used `vault set <ref> <KEY>` to store a single credential, store it as a
|
|
306
|
+
[secret](../cli.md#secret) instead:
|
|
307
|
+
|
|
308
|
+
```sh
|
|
309
|
+
printf '%s' "$TOKEN" | akm secret set secret:deploy-token
|
|
310
|
+
akm secret run secret:deploy-token GITHUB_TOKEN -- gh release create v1.0.0
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
`akm env run` injects the **whole** file; the single-key `vault run <ref>/KEY`
|
|
314
|
+
form was removed because silently changing which variables a child process sees
|
|
315
|
+
is a security-relevant behaviour change.
|
|
316
|
+
|
|
317
|
+
## What 0.9.0 removes
|
|
318
|
+
|
|
319
|
+
- The entire `akm vault` verb and its subcommands.
|
|
320
|
+
- The `vault:` ref alias (parsing a `vault:` ref becomes an unknown-type error
|
|
321
|
+
pointing at `env:`).
|
|
322
|
+
- The `vault` asset-spec entry, renderer (`vault-env`), and the `vault_access`
|
|
323
|
+
audit-event alias.
|
|
324
|
+
- The frozen `vaults/` directory is deleted **only** after explicit per-path
|
|
325
|
+
confirmation — the migration never auto-removes it.
|
|
326
|
+
|
|
327
|
+
Switch to `akm env` / `akm secret` and the `akm env run env:<name> -- <cmd>`
|
|
328
|
+
idiom before upgrading to 0.9.0.
|
|
329
|
+
|
|
330
|
+
### If you upgraded straight to 0.9.0 without migrating
|
|
331
|
+
|
|
332
|
+
Because 0.9.0 removed the `vault` asset type, the indexer **no longer scans
|
|
333
|
+
`vaults/` at all**. If you jumped from 0.7/0.8 to 0.9.0 and never ran
|
|
334
|
+
`akm-migrate-storage`, the `.env` data still sitting in `vaults/` was never
|
|
335
|
+
copied to `env/` and will **not** appear under `env:` — it is silently
|
|
336
|
+
un-indexed (the files themselves are untouched on disk).
|
|
337
|
+
|
|
338
|
+
To make this non-silent, 0.9.0 adds a **one-time, read-only guard**: whenever
|
|
339
|
+
`akm index` (or any auto-index path) runs against a stash whose `vaults/`
|
|
340
|
+
directory holds `.env` files but has no `vaults/.migrated` marker, akm prints a
|
|
341
|
+
single warning pointing here and at `akm-migrate-storage`. The guard never
|
|
342
|
+
reads secret contents, and never writes, moves, or deletes anything — it only
|
|
343
|
+
detects the un-migrated state. The fix is the same idempotent, non-destructive
|
|
344
|
+
command as on 0.8:
|
|
345
|
+
|
|
346
|
+
```sh
|
|
347
|
+
akm-migrate-storage --yes # copies vaults/ -> env/, leaving vaults/ intact
|
|
348
|
+
akm index # refresh search so entries surface under env:
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
The `vaults/ → env/` migration step still ships in 0.9.0's
|
|
352
|
+
`akm-migrate-storage` (it is part of the `0.8 → 0.9` migration) precisely so a
|
|
353
|
+
late migration on a 0.9.0 install still works.
|
|
354
|
+
|
|
355
|
+
## Verifying the migration
|
|
356
|
+
|
|
357
|
+
```sh
|
|
358
|
+
# env/ now contains your former vault files
|
|
359
|
+
akm env list
|
|
360
|
+
|
|
361
|
+
# The frozen copy + marker are present
|
|
362
|
+
ls -la "$(akm config get stashDir)/vaults/.migrated"
|
|
363
|
+
|
|
364
|
+
# Values still never leak
|
|
365
|
+
akm show env:prod # key names only
|
|
366
|
+
akm search <a-secret-value> # no hits
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
## Restoring or downgrading the engine cutover
|
|
370
|
+
|
|
371
|
+
Stop scheduled AKM jobs and all running `akm improve`, `akm extract`, and
|
|
372
|
+
workflow engine processes first. Restore refuses while a live process lock or
|
|
373
|
+
workflow lease exists. Then, while still running the 0.9 binary, restore the
|
|
374
|
+
complete pre-cutover snapshot:
|
|
375
|
+
|
|
376
|
+
```sh
|
|
377
|
+
akm backup restore --for 0.9.0 --confirm
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
Restore verifies the manifest, permissions, sizes, and checksums before
|
|
381
|
+
replacing anything. It restores each original file and removes a canonical DB
|
|
382
|
+
that the manifest recorded as originally absent, including its WAL/SHM
|
|
383
|
+
sidecars. Restore also holds the global maintenance barrier from its last
|
|
384
|
+
lock/lease check through replacement, so a new index writer, improve/extract
|
|
385
|
+
lock, lockfile writer, or workflow engine lease cannot start in that window.
|
|
386
|
+
The recovery bundle itself remains in `$CACHE` for repeatable recovery. If
|
|
387
|
+
verification reports corruption, preserve the bundle and recover
|
|
388
|
+
from an independent backup; do not delete the manifest or regenerate it from a
|
|
389
|
+
post-cutover config.
|
|
390
|
+
|
|
391
|
+
Only after restore succeeds should you install the older AKM binary. A 0.8
|
|
392
|
+
binary must not run against a 0.9 config or against `state.db` migration 017 /
|
|
393
|
+
`workflow.db` migration 010. If no valid pre-cutover bundle exists, do not
|
|
394
|
+
downgrade in place: preserve the current config and databases, create a separate
|
|
395
|
+
0.8 data/config root, and manually reconstruct the profile-based configuration.
|
|
396
|
+
|
|
397
|
+
## Rolling back the vault copy
|
|
398
|
+
|
|
399
|
+
The migration is non-destructive — `vaults/` is untouched. To roll back, delete
|
|
400
|
+
the generated `env/` directory and remove the `vaults/.migrated` marker, then
|
|
401
|
+
downgrade akm. Because `env/` is a copy, no data is lost either way.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.9.0-rc.
|
|
3
|
+
"version": "0.9.0-rc.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Knowledge Management) — A package manager for AI agent skills, commands, tools, and knowledge. Works with Claude Code, OpenCode, Cursor, and any AI coding assistant.",
|
|
6
6
|
"keywords": [
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"LICENSE",
|
|
44
44
|
"docs/migration/release-notes",
|
|
45
45
|
"docs/migration/v0.7-to-v0.8.md",
|
|
46
|
-
"docs/
|
|
46
|
+
"docs/migration/v0.8-to-v0.9.md",
|
|
47
|
+
"docs/data-and-telemetry.md",
|
|
48
|
+
"schemas"
|
|
47
49
|
],
|
|
48
50
|
"bin": {
|
|
49
51
|
"akm": "dist/akm",
|