akm-cli 0.10.261012-beta → 0.10.261013-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 +216 -0
- package/SECURITY.md +2 -2
- package/STABILITY.md +2 -2
- package/dist/assets/hints/cli-hints-full.md +6 -7
- package/dist/assets/hints/cli-hints-short.md +3 -4
- package/dist/commands/command/execution-source-loader.js +10 -14
- package/dist/commands/env/env-binding.js +47 -58
- package/dist/commands/env/env-cli.js +20 -22
- package/dist/commands/env/env.js +10 -58
- package/dist/commands/env/secret-cli.js +9 -27
- package/dist/commands/env/secret.js +3 -10
- package/dist/commands/health/scheduler-binary.js +1 -1
- package/dist/commands/improve/distill.js +0 -2
- package/dist/commands/improve/eligibility.js +0 -2
- package/dist/commands/lint/env-key-rules.js +7 -6
- package/dist/commands/lint/index.js +1 -1
- package/dist/commands/proposal/validators/proposal-validators.js +1 -4
- package/dist/commands/read/show.js +4 -25
- package/dist/commands/sources/add-cli.js +8 -63
- package/dist/commands/sources/bundle-cli.js +8 -9
- package/dist/commands/sources/installed-stashes.js +117 -61
- package/dist/commands/sources/schema-repair.js +0 -2
- package/dist/commands/sources/source-clone.js +31 -7
- package/dist/commands/tasks/explain.js +1 -1
- package/dist/commands/tasks/tasks.js +38 -56
- package/dist/commands/ui/redact.js +4 -4
- package/dist/commands/ui/workspace-actions.js +1 -1
- package/dist/commands/workflow/plan.js +47 -8
- package/dist/commands/workflow-cli.js +37 -41
- package/dist/core/adapter/adapters/akm-adapter.js +3 -3
- package/dist/core/adapter/adapters/akm-lint.js +3 -4
- package/dist/core/adapter/adapters/akm-metadata.js +2 -2
- package/dist/core/adapter/adapters/akm-task-adapter.js +5 -6
- package/dist/core/adapter/adapters/dotenv-adapter.js +4 -3
- package/dist/core/asset/resolve-ref.js +5 -0
- package/dist/core/bundle-rename.js +12 -4
- package/dist/core/common.js +4 -52
- package/dist/core/config/config-walker.js +1 -1
- package/dist/core/config/config.js +55 -18
- package/dist/core/config/schema/primitives.js +12 -6
- package/dist/core/config/schema/sources-bundles.js +2 -2
- package/dist/core/env-secret-ref.js +84 -73
- package/dist/core/errors.js +1 -1
- package/dist/core/paths.js +1 -6
- package/dist/core/redaction.js +16 -3
- package/dist/core/ref-token.js +82 -0
- package/dist/core/secret-value.js +14 -0
- package/dist/core/write-source.js +20 -4
- package/dist/indexer/indexer.js +27 -36
- package/dist/indexer/installations.js +1 -8
- package/dist/indexer/lookup/adapter-concept-owner.js +40 -14
- package/dist/indexer/materialize-embeddings.js +1 -1
- package/dist/indexer/scan/drain-dir.js +3 -3
- package/dist/indexer/search/search-source.js +4 -2
- package/dist/indexer/walk/path-resolver.js +13 -68
- package/dist/indexer/walk/walker.js +18 -22
- package/dist/integrations/agent/engine-resolution.js +9 -7
- package/dist/integrations/agent/runner-dispatch.js +4 -5
- package/dist/integrations/agent/runner.js +2 -0
- package/dist/llm/client.js +1 -1
- package/dist/llm/embedders/remote.js +4 -3
- package/dist/output/renderers.js +3 -4
- package/dist/output/shapes/helpers.js +0 -2
- package/dist/output/text/command-format.js +12 -2
- package/dist/output/text/show-directives.js +16 -28
- package/dist/output/text/workflow-format.js +37 -7
- package/dist/scripts/akm-migrate-node.js +45865 -44692
- package/dist/scripts/akm-migrate.js +45804 -44630
- package/dist/setup/steps/tasks.js +1 -2
- package/dist/sources/providers/provider-utils.js +12 -0
- package/dist/sources/resolve.js +12 -16
- package/dist/sources/snapshot-fetchers/secret-seam.js +2 -4
- package/dist/sources/snapshot-fetchers/x.js +1 -1
- package/dist/storage/repositories/proposals-repository.js +2 -2
- package/dist/storage/repositories/task-history-repository.js +2 -2
- package/dist/storage/repositories/workflow-runs-repository.js +38 -116
- package/dist/tasks/embedded.js +1 -1
- package/dist/tasks/prepare/prepare-support.js +3 -2
- package/dist/tasks/prepare/prepare.js +3 -4
- package/dist/tasks/prepare/script-capture.js +8 -22
- package/dist/tasks/run/load-task.js +46 -14
- package/dist/tasks/run/run-native-task.js +0 -8
- package/dist/tasks/run/run-workflow-task.js +2 -2
- package/dist/tasks/scheduler-sync.js +0 -1
- package/dist/tasks/source/bounded-document.js +0 -41
- package/dist/tasks/source/parse-task-source.js +0 -1
- package/dist/tasks/source/task-source-v4.js +1 -4
- package/dist/workflows/compile.js +1 -15
- package/dist/workflows/exec/child-workflow.js +1 -2
- package/dist/workflows/exec/dispatch-redaction.js +24 -6
- package/dist/workflows/exec/environment.js +11 -74
- package/dist/workflows/exec/exec-unit.js +31 -23
- package/dist/workflows/exec/frozen-judge.js +17 -3
- package/dist/workflows/exec/native-executor.js +70 -26
- package/dist/workflows/exec/run-workflow.js +31 -18
- package/dist/workflows/exec/step-work.js +4 -3
- package/dist/workflows/exec/unit-dispatch.js +1 -8
- package/dist/workflows/freeze/environment.js +14 -119
- package/dist/workflows/freeze/freeze.js +0 -1
- package/dist/workflows/freeze/step-values.js +1 -2
- package/dist/workflows/freeze/targets/child-workflow.js +3 -5
- package/dist/workflows/freeze/targets/command.js +6 -9
- package/dist/workflows/freeze/targets/shell.js +0 -3
- package/dist/workflows/parser.js +6 -25
- package/dist/workflows/plan.js +6 -2
- package/dist/workflows/renderer.js +77 -4
- package/dist/workflows/runtime/run-plan.js +37 -23
- package/dist/workflows/runtime/runs.js +41 -84
- package/dist/workflows/runtime/workflow-asset-loader.js +55 -86
- package/dist/workflows/source-files.js +7 -19
- package/docs/architecture/0.10-process-rules.md +6 -6
- package/docs/architecture/architecture.md +6 -6
- package/docs/architecture/comparisons/claude-code-vs-akm-workflows-full.md +12 -18
- package/docs/architecture/decisions/0003-child-env-allowlist-and-provenance.md +6 -8
- package/docs/architecture/internals/storage-locations.md +4 -4
- package/docs/architecture/persisted-data-compat.md +3 -2
- package/docs/architecture/specs/0.9.0-public-api-issue-backlog.md +1 -1
- package/docs/architecture/specs/akm-format-neutral-bundle-workspace-spec.md +3 -3
- package/docs/architecture/testing/manual-testing-checklist.md +46 -78
- package/docs/architecture/testing/task-workflow-manual-tests.md +22 -40
- package/docs/architecture/testing/testing-workflow.md +9 -11
- package/docs/architecture/workflow-engine.md +41 -27
- package/docs/guides/author-bundles.md +14 -17
- package/docs/guides/author-workflows.md +43 -9
- package/docs/guides/bundles.md +16 -11
- package/docs/guides/claude-code-vs-akm-workflows.md +1 -1
- package/docs/guides/run-workflows.md +25 -13
- package/docs/guides/scheduling.md +1 -1
- package/docs/maintainers/README.md +2 -3
- package/docs/maintainers/release-checklist.md +73 -126
- package/docs/migration/v0.9-to-v0.10.md +5 -1
- package/docs/reference/cli.md +124 -112
- package/docs/reference/configuration.md +16 -9
- package/docs/reference/data-and-telemetry.md +1 -1
- package/docs/reference/env-and-secrets.md +66 -15
- package/docs/reference/registry.md +6 -11
- package/docs/reference/tasks.md +11 -3
- package/docs/reference/ui-api.md +3 -3
- package/docs/reference/workflow-schema.md +109 -36
- package/package.json +1 -1
- package/schemas/akm-task.json +2 -4
- package/dist/commands/sources/dangerous-env-audit.js +0 -134
- package/dist/core/activation-policy.js +0 -67
- package/dist/execution/directory-identity.js +0 -78
- package/dist/workflows/authoring/scope-key.js +0 -79
- package/dist/workflows/source-semantics.js +0 -110
package/docs/reference/cli.md
CHANGED
|
@@ -898,17 +898,15 @@ Author, inspect, and execute structured workflow assets.
|
|
|
898
898
|
akm workflow create ship-release --print
|
|
899
899
|
akm workflow create ship-release
|
|
900
900
|
akm workflow create ship-release --from ./ship-release.md
|
|
901
|
-
akm workflow run workflows/ship-release --version 1.2.3
|
|
901
|
+
akm workflow run workflows/ship-release --version 1.2.3 # always starts a new run
|
|
902
902
|
akm workflow run <run-id> # continue an active partial run
|
|
903
|
-
akm workflow run workflows/ship-release --new # start a fresh run even if one is already active
|
|
904
903
|
akm workflow status <run-id>
|
|
905
904
|
akm workflow status workflows/ship-release
|
|
906
905
|
akm workflow status 7c115132 # 8+ char run-id prefix also works
|
|
907
|
-
akm workflow resume <run-id>
|
|
906
|
+
akm workflow resume <run-id> # re-activate a blocked or failed run, then run <run-id>
|
|
908
907
|
akm workflow abandon <run-id>
|
|
909
908
|
akm workflow list --active
|
|
910
909
|
akm workflow list --children # also list child workflow runs (Experimental)
|
|
911
|
-
akm workflow list --all-scopes # include runs started from a different working directory
|
|
912
910
|
akm workflow plan workflows/ship-release # compile+freeze preview, zero writes
|
|
913
911
|
```
|
|
914
912
|
|
|
@@ -920,10 +918,10 @@ Subcommands:
|
|
|
920
918
|
| Subcommand | Description |
|
|
921
919
|
| --- | --- |
|
|
922
920
|
| `create <name>` | Validate and write a Markdown workflow under `workflows/`. `--path <dir>` places it in a subdirectory; `--from <file>` imports content; `--force` overwrites; `--print` prints the template that would be written instead of writing it |
|
|
923
|
-
| `run <run-id\|ref>` | Canonical start/
|
|
924
|
-
| `status <run-id\|ref>` | Show the full run state, including all step statuses. `--units` also lists per-unit rows from the run journal (diagnostics only). Renders a `children:` tree when the run composes child workflows.
|
|
925
|
-
| `list` | List workflow runs (optionally filtered by `--ref`; `--active` shows only `status=active` runs, excluding `blocked`/`failed`/`completed`). Child workflow runs (the Experimental `unit: { workflow: … }` step) are excluded unless `--children` is passed.
|
|
926
|
-
| `resume <run-id>` | Flip a `blocked` or `failed` run back to `active
|
|
921
|
+
| `run <run-id\|ref>` | Canonical start/execute command. A ref always starts a new run (other active runs of the ref produce one warning, see below); a run id continues that exact active run. Executes until completion, failure, verification rejection, interruption, or an explicit limit |
|
|
922
|
+
| `status <run-id\|ref>` | Show the full run state, including all step statuses. `--units` also lists per-unit rows from the run journal (diagnostics only). Renders a `children:` tree when the run composes child workflows. A ref shows its most recently updated run. `--all-scopes` is a deprecated no-op |
|
|
923
|
+
| `list` | List workflow runs (optionally filtered by `--ref`; `--active` shows only `status=active` runs, excluding `blocked`/`failed`/`completed`). Child workflow runs (the Experimental `unit: { workflow: … }` step) are excluded unless `--children` is passed. Lists every run on the host, most recently updated first, from any working directory. `--all-scopes` is a deprecated no-op |
|
|
924
|
+
| `resume <run-id>` | Flip a `blocked` or `failed` run back to `active` so `run <run-id>` can continue it; it executes nothing. Completed runs cannot be resumed |
|
|
927
925
|
| `abandon <run-id>` | Mark a run failed so it stops counting as active (`resume` can reopen it) |
|
|
928
926
|
| `plan <ref>` | **Evolving.** Compile and freeze a workflow WITHOUT publishing a run: the canonical step graph, per-step frozen target kinds, task/child expansion, input bindings, source read set, and lowering notices — zero durable writes. Returns the full JSON envelope by default, like every other command; pass `--format text` for a human-readable summary |
|
|
929
927
|
|
|
@@ -968,8 +966,9 @@ Schema before persisting the run:
|
|
|
968
966
|
|
|
969
967
|
A bare boolean flag means `true`. Hyphen/underscore aliases are not inferred:
|
|
970
968
|
declared `include_processes` requires `--include_processes`, not
|
|
971
|
-
`--include-processes`. Parameters
|
|
972
|
-
|
|
969
|
+
`--include-processes`. Parameters are accepted on every ref start (a ref
|
|
970
|
+
always starts a new run); passing them with a run id is rejected, because that
|
|
971
|
+
run already has its parameters.
|
|
973
972
|
The old `--params <json>` bag is removed.
|
|
974
973
|
|
|
975
974
|
| Flag | Description |
|
|
@@ -977,15 +976,16 @@ The old `--params <json>` bag is removed.
|
|
|
977
976
|
| `--max-steps <n>` | Stop once this many steps have finished, leaving a partial run active. Must be at least 1. |
|
|
978
977
|
| `--max-retries <n>` | When a step fails, reopen the same run and retry the failed step up to this many additional times. Range: 0 through 100; default 0. Gate rejection and interruption are not retried. |
|
|
979
978
|
| `--timeout <duration>` | Abort the whole invocation after `N`, `Nms`, `Ns`, or `Nm`; bare `N` is milliseconds. The active step remains resumable. |
|
|
980
|
-
| `--new` |
|
|
981
|
-
| `--skip-if-locked` | If another akm process is already driving this run (it holds the run's lock file: `RUN_LEASE_HELD`), or `state.db` is busy with another writer (`STATE_DB_CONTENDED`), skip gracefully (exit 0) instead of failing (exit 75, `TransientError`). The envelope reports `{ skipped: { reason: "lock-held" \| "state-db-contended", message } }`. Every other failure (a bad flag, an unresolvable target) still fails loudly regardless of this flag. Use for high-frequency scheduled runs so they don't pile up failures while a longer-running invocation is in progress — same family as `improve --skip-if-locked`. |
|
|
979
|
+
| `--new` | Deprecated, no effect (accepted through 0.10): a workflow ref always starts a new run. |
|
|
980
|
+
| `--skip-if-locked` | If another akm process is already driving this run (it holds the run's lock file: `RUN_LEASE_HELD`), when starting a ref an active run of that ref is held by a live process, or `state.db` is busy with another writer (`STATE_DB_CONTENDED`), skip gracefully (exit 0) instead of failing (exit 75, `TransientError`). The envelope reports `{ skipped: { reason: "lock-held" \| "state-db-contended", message } }`. Every other failure (a bad flag, an unresolvable target) still fails loudly regardless of this flag. Use for high-frequency scheduled runs so they don't pile up failures while a longer-running invocation is in progress — same family as `improve --skip-if-locked`. |
|
|
982
981
|
|
|
983
|
-
**
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
982
|
+
**A ref always starts a new run.** `workflow run <ref>` never resumes: use
|
|
983
|
+
`workflow run <run-id>` to continue a run and `workflow resume <run-id>` to
|
|
984
|
+
reopen a blocked or failed one so `run <run-id>` can continue it. When other
|
|
985
|
+
runs of the same ref are still active, the start prints one warning naming
|
|
986
|
+
their ids and the `akm workflow run <id>` / `akm workflow abandon <id>`
|
|
987
|
+
commands, and starts anyway. `--skip-if-locked` is the guard for scheduled callers: it skips (exit
|
|
988
|
+
0) instead of starting when an active run of the ref is held by a live process.
|
|
989
989
|
|
|
990
990
|
The result includes the current `run`, an `executed` step report list, a
|
|
991
991
|
`stepsProcessed` count of the steps that finished, and optional `done`,
|
|
@@ -1015,17 +1015,11 @@ from the unit journal so they hold across resumes.
|
|
|
1015
1015
|
non-empty `### gate` requires `workflow.judgeEngine` to name a configured LLM
|
|
1016
1016
|
or agent engine before a new run can be frozen. Gate evaluation is fail-closed.
|
|
1017
1017
|
|
|
1018
|
-
Workflow runs are
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
- `workflow run workflows/<name>` resumes the active run for the current project/worktree/directory (announced with `resumed: true`), or starts one when none is active. `--new` always starts a fresh run.
|
|
1024
|
-
- `workflow status workflows/<name>` resolves the most-recently-updated run in the current scope only, unless `--all-scopes` is passed.
|
|
1025
|
-
- `workflow list` shows runs for the current scope only, unless `--all-scopes` is passed. Its envelope always carries a top-level `scopeKey` naming the scope that was searched (`null` under `--all-scopes`), so an empty `runs: []` is never indistinguishable from "nothing anywhere".
|
|
1026
|
-
- Direct run-id commands like `workflow status <run-id>`, `workflow resume <run-id>`, and `workflow abandon <run-id>` still work even if the run was started from another directory.
|
|
1027
|
-
- A scheduled task runs from the scheduler's cwd, so its runs sit in a different scope from your shell's: find the run id with `akm task history <task-id> --limit 1` (`detail.runId`), then run `akm workflow status <run-id>` from any directory, or use `workflow list --all-scopes`.
|
|
1028
|
-
- Starting a ref by name (`workflow run workflows/<name>`) never collides across scopes — each scope can hold its own active run of the same ref — but if an active run of that ref exists in a *different* scope, the started run's envelope carries a `warnings[]` entry naming that run's id, scope, and start time, with the `akm workflow run <id>` / `akm workflow abandon <id>` remedy, so a stray run in another scope does not go unnoticed (#942).
|
|
1018
|
+
Workflow runs are identified by run id, and workflows by ref; neither depends
|
|
1019
|
+
on the working directory. `workflow list` and `workflow status workflows/<name>`
|
|
1020
|
+
see every run on the host, from any directory, so the runs of a scheduled task
|
|
1021
|
+
(which runs from the scheduler's cwd) appear exactly as runs started from your
|
|
1022
|
+
shell do. `akm show` reports no run state; it belongs under `akm workflow`.
|
|
1029
1023
|
|
|
1030
1024
|
#### workflow create
|
|
1031
1025
|
|
|
@@ -1061,17 +1055,18 @@ affect the in-flight run.
|
|
|
1061
1055
|
akm workflow status <run-id>
|
|
1062
1056
|
akm workflow status workflows/ship-release
|
|
1063
1057
|
akm workflow status <run-id> --units # also list per-unit rows from the run journal
|
|
1064
|
-
akm workflow status workflows/ship-release --all-scopes # resolve across every scope, not just the current one
|
|
1065
1058
|
```
|
|
1066
1059
|
|
|
1067
1060
|
Accepts a run id, a unique 8+ character run-id prefix, or a workflow ref.
|
|
1068
1061
|
When given a workflow ref, resolves to the most-recently-updated run for that
|
|
1069
|
-
ref
|
|
1070
|
-
relevant when the target does not resolve to a run id; a run id is always
|
|
1071
|
-
scope-agnostic, `--all-scopes` or not, #942). `--units` adds per-unit rows
|
|
1062
|
+
ref on this host. `--all-scopes` is a deprecated no-op. `--units` adds per-unit rows
|
|
1072
1063
|
(unit id, status, failure reason, and any result/error diagnostic text) from
|
|
1073
1064
|
the run journal — diagnostics only; step evidence stays deterministic and is
|
|
1074
|
-
unaffected.
|
|
1065
|
+
unaffected. A failed unit's row also carries an `orchestration` object (in
|
|
1066
|
+
text, `argv:`, `cwd:`, `env:` and `ref:` lines): the step's argv, cwd and env
|
|
1067
|
+
refs from the frozen plan, and the bundle-qualified ref each `${ref}` token,
|
|
1068
|
+
env ref and child workflow resolves to right now (`not found` when no bundle
|
|
1069
|
+
owns it).
|
|
1075
1070
|
|
|
1076
1071
|
#### workflow plan
|
|
1077
1072
|
|
|
@@ -1093,8 +1088,7 @@ a run, or to inspect a workflow's shape without side effects.
|
|
|
1093
1088
|
|
|
1094
1089
|
Two output modes:
|
|
1095
1090
|
|
|
1096
|
-
-
|
|
1097
|
-
defaults to JSON): a human-readable text summary.
|
|
1091
|
+
- **`--format text`**: a human-readable text summary.
|
|
1098
1092
|
- **`--format json`**: the full envelope — `ok`, `ref`, `title`,
|
|
1099
1093
|
`sourceFormat`, `sourcePath`, `irVersion`, `planHash`, `published` (always
|
|
1100
1094
|
`false`, so a consumer can never mistake this for a run envelope),
|
|
@@ -1110,7 +1104,7 @@ Text-mode example:
|
|
|
1110
1104
|
```
|
|
1111
1105
|
workflow: team//workflows/release (markdown)
|
|
1112
1106
|
source: workflows/release.md
|
|
1113
|
-
plan: irVersion
|
|
1107
|
+
plan: irVersion 7, hash 4f2ba91c3d0e… (not published)
|
|
1114
1108
|
limits: maxConcurrency 4; budget max_units 50, max_tokens 100000
|
|
1115
1109
|
params: channel, version
|
|
1116
1110
|
steps:
|
|
@@ -1126,13 +1120,22 @@ read set:
|
|
|
1126
1120
|
workflows/release-checklist.md
|
|
1127
1121
|
```
|
|
1128
1122
|
|
|
1123
|
+
Each step also lists what it will run and what that names, from the same
|
|
1124
|
+
projection `akm show` prints: `argv:` (JSON, so word boundaries survive),
|
|
1125
|
+
`cwd:`, `env:` and one `ref:` line per `${ref}` token in the argv or cwd, per
|
|
1126
|
+
`env:` entry and per child `workflow:`, in the form `ref: ${team//scripts/x.ts}
|
|
1127
|
+
-> team//scripts/x.ts (argv)`. In JSON this is each step's `orchestration`
|
|
1128
|
+
object, with `refs[]` (`ref`, `resolved`, `in`). A ref no bundle owns fails the
|
|
1129
|
+
plan with an error that names it. The resolved ref is a name, never a value or
|
|
1130
|
+
a path.
|
|
1131
|
+
|
|
1129
1132
|
**Secret-free by construction.** Neither mode ever prints a resolved
|
|
1130
1133
|
reference value (references resolve at pre-attempt, not here), request
|
|
1131
1134
|
content (`request.command.content`, `request.persona`, `request.conversation`,
|
|
1132
1135
|
`request.runtime.environment`), a script's `bytesBase64`, or any credential —
|
|
1133
1136
|
only binding *shapes* (`inputBindings[].name`/`.kind`, a literal's `.value`,
|
|
1134
1137
|
a reference's `.from`), environment binding *names* (`environment[].kind`/
|
|
1135
|
-
`.name`, an `env-ref`'s `.ref
|
|
1138
|
+
`.name`, an `env-ref`'s `.ref`), and engine *names*
|
|
1136
1139
|
(`gate.judgeEngine`).
|
|
1137
1140
|
|
|
1138
1141
|
#### workflow resume
|
|
@@ -1141,8 +1144,9 @@ a reference's `.from`), environment binding *names* (`environment[].kind`/
|
|
|
1141
1144
|
akm workflow resume <run-id>
|
|
1142
1145
|
```
|
|
1143
1146
|
|
|
1144
|
-
Flips a `blocked` or `failed` run back to `active
|
|
1145
|
-
|
|
1147
|
+
Flips a `blocked` or `failed` run back to `active`; it does not execute
|
|
1148
|
+
anything. Run `akm workflow run <run-id>` afterwards to continue it. Completed
|
|
1149
|
+
runs cannot be resumed. Use `workflow list` to find runs by status.
|
|
1146
1150
|
|
|
1147
1151
|
Workflow markdown contract:
|
|
1148
1152
|
|
|
@@ -1198,9 +1202,10 @@ akm bundle add https://docs.example.com --max-pages 100 --max-depth 5
|
|
|
1198
1202
|
| `--writable` | Mark a git source as writable so `akm sync` also pushes (default: false) |
|
|
1199
1203
|
| `--options` | Provider options as JSON (e.g. `'{"ref":"main"}'`) |
|
|
1200
1204
|
| `--allow-insecure-transport` | Allow a plain-HTTP source URL after explicitly accepting transport substitution risk |
|
|
1201
|
-
| `--allow-dangerous-env-keys` |
|
|
1205
|
+
| `--allow-dangerous-env-keys` | Deprecated, no effect. `bundle add` no longer scans env files for process-hijacking keys. Accepted through 0.10 so existing scripts keep working. |
|
|
1202
1206
|
| `--max-pages` | Maximum pages to crawl for website sources (default: 50) |
|
|
1203
1207
|
| `--max-depth` | Maximum crawl depth for website sources (default: 3) |
|
|
1208
|
+
| `--credential` | Git HTTPS bearer credential, stored as a reference and never a literal token: `$VAR`, `${VAR}`, or an akm ref such as `${secrets/gitea_token}` (`${team//secrets/gitea_token}` for a secret in another bundle). Resolved only when git runs |
|
|
1204
1209
|
|
|
1205
1210
|
To index only a subdirectory of a git bundle, set the component `root` after
|
|
1206
1211
|
adding it:
|
|
@@ -1214,16 +1219,18 @@ akm bundle update <name>
|
|
|
1214
1219
|
`root` is relative to the detected stash root of the checkout, not always the
|
|
1215
1220
|
repo root, and takes effect on the next `bundle update` or `akm index`.
|
|
1216
1221
|
|
|
1217
|
-
####
|
|
1222
|
+
#### Env files and process-hijacking keys
|
|
1218
1223
|
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1224
|
+
Installing a bundle is the trust decision. `akm bundle add` and `akm bundle
|
|
1225
|
+
update` do not scan a bundle's `env/` files, never prompt, and never roll an
|
|
1226
|
+
install back over the keys an env file sets, so a bundle whose `env/*.env` sets
|
|
1227
|
+
`PATH` installs and refreshes unattended with no flag. `akm env run`, `akm
|
|
1228
|
+
secret run` and workflow `env:` bindings inject what the bundle defines.
|
|
1229
|
+
|
|
1230
|
+
`akm lint` still reports env keys that can hijack a process
|
|
1231
|
+
(`dangerous-env-key`, non-blocking), for bundle authors who want to review their
|
|
1232
|
+
own files. The flagged key set is 41 literal names plus 2 regex pattern families
|
|
1233
|
+
(`src/commands/lint/env-key-rules.ts`):
|
|
1227
1234
|
`LD_PRELOAD`, `LD_LIBRARY_PATH`, `LD_AUDIT`, `LD_DEBUG`, `LD_BIND_NOW`,
|
|
1228
1235
|
`LD_PROFILE`, `LD_ASSUME_KERNEL`, `LD_TRACE_LOADED_OBJECTS`,
|
|
1229
1236
|
`DYLD_INSERT_LIBRARIES`, `DYLD_LIBRARY_PATH`, `DYLD_FRAMEWORK_PATH`, `PATH`,
|
|
@@ -1233,21 +1240,7 @@ set is 41 literal names plus 2 regex pattern families (`src/commands/lint/env-ke
|
|
|
1233
1240
|
`RUBYOPT`, `PERL5LIB`, `PERL5OPT`, `JAVA_TOOL_OPTIONS`, `JDK_JAVA_OPTIONS`,
|
|
1234
1241
|
`_JAVA_OPTIONS`, `GIT_SSH_COMMAND`, `GIT_EXTERNAL_DIFF`, `GIT_PAGER`,
|
|
1235
1242
|
`GIT_EDITOR`, `EDITOR`, `VISUAL`, and `PAGER` (41 literals), plus any key
|
|
1236
|
-
matching `^BASH_FUNC_`
|
|
1237
|
-
config override injection).
|
|
1238
|
-
|
|
1239
|
-
When dangerous keys are found, `akm bundle add` pauses and prompts for
|
|
1240
|
-
confirmation (default: No). In non-interactive mode (CI, scripts) the
|
|
1241
|
-
install fails with **exit 1** unless `--allow-dangerous-env-keys` is passed, and the
|
|
1242
|
-
freshly-installed bundle is rolled back before the process exits.
|
|
1243
|
-
|
|
1244
|
-
```sh
|
|
1245
|
-
# Interactive: prompts before continuing
|
|
1246
|
-
akm bundle add github:owner/repo-with-sensitive-env
|
|
1247
|
-
|
|
1248
|
-
# Non-interactive: fails unless bypassed
|
|
1249
|
-
akm bundle add github:owner/repo-with-sensitive-env --allow-dangerous-env-keys
|
|
1250
|
-
```
|
|
1243
|
+
matching `^BASH_FUNC_` or `^GIT_CONFIG_`.
|
|
1251
1244
|
|
|
1252
1245
|
Bundle publishers: see the [Author Bundles guide](https://github.com/itlackey/akm/blob/main/docs/guides/author-bundles.md#env-security)
|
|
1253
1246
|
for guidance on env files that legitimately need these keys.
|
|
@@ -1314,7 +1307,7 @@ akm bundle remove my-provider --yes # Skip the confirmation prompt
|
|
|
1314
1307
|
### bundle update
|
|
1315
1308
|
|
|
1316
1309
|
Update one bundle, or refresh every configured bundle with `--all`. Git, npm,
|
|
1317
|
-
and website candidates are staged
|
|
1310
|
+
and website candidates are staged before they replace the active
|
|
1318
1311
|
generation. Filesystem bundles require no hydration; update reconciles their
|
|
1319
1312
|
current files into the index immediately.
|
|
1320
1313
|
|
|
@@ -1322,32 +1315,34 @@ current files into the index immediately.
|
|
|
1322
1315
|
akm bundle update npm:@scope/pkg
|
|
1323
1316
|
akm bundle update --all
|
|
1324
1317
|
akm bundle update --all --force # Force fresh download even if version is unchanged
|
|
1325
|
-
akm bundle update npm:@scope/pkg --allow-dangerous-env-keys # Explicitly approve reviewed dangerous env keys
|
|
1326
1318
|
```
|
|
1327
1319
|
|
|
1328
1320
|
| Flag | Description |
|
|
1329
1321
|
| --- | --- |
|
|
1330
1322
|
| `--all` | Update all managed sources |
|
|
1331
|
-
| `--force` |
|
|
1332
|
-
| `--allow-dangerous-env-keys` |
|
|
1333
|
-
| `-y`, `--yes` | Deprecated, no effect. An update
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1323
|
+
| `--force` | Fetch again even when the upstream revision is unchanged |
|
|
1324
|
+
| `--allow-dangerous-env-keys` | Deprecated, no effect. An update no longer scans env files for process-hijacking keys. Accepted through 0.10 so existing scripts keep working. |
|
|
1325
|
+
| `-y`, `--yes` | Deprecated, no effect. An update never asks before pruning old install directories of a read-only bundle; they are a re-fetchable cache. Accepted through 0.10 so existing scripts keep working. |
|
|
1326
|
+
|
|
1327
|
+
A read-only git or npm bundle whose upstream revision still matches its lock
|
|
1328
|
+
is left exactly as it is: nothing is fetched or replaced, and the update
|
|
1329
|
+
reports it as unchanged. A real revision change installs the new revision
|
|
1330
|
+
beside the old one, keeps the immediately previous revision directory (a task
|
|
1331
|
+
or workflow may still be running from it) and removes older ones. A revision
|
|
1332
|
+
directory another bundle still references is kept.
|
|
1333
|
+
|
|
1334
|
+
A publication or index failure preserves the prior active bytes, lock/config
|
|
1338
1335
|
generation, and searchable index for that bundle.
|
|
1339
1336
|
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
and a write during compensation can be overwritten. Do not edit a writable
|
|
1350
|
-
checkout from another process while its update is running.
|
|
1337
|
+
A writable Git update is fetched into a staged copy of the checkout beside the
|
|
1338
|
+
live one, so a failed fetch leaves the live checkout, the lock and the index
|
|
1339
|
+
untouched. The live checkout is then fast-forwarded to exactly the staged
|
|
1340
|
+
commit (`git merge --ff-only`), which refuses, and changes nothing, when local
|
|
1341
|
+
commits have diverged or the merge would overwrite local work. AKM holds its
|
|
1342
|
+
source/index writer lease through that fast-forward and the index pass; all AKM
|
|
1343
|
+
writers cooperate with this lease, but a non-cooperating local process is not
|
|
1344
|
+
excluded. Do not edit a writable checkout from another process while its update
|
|
1345
|
+
is running.
|
|
1351
1346
|
|
|
1352
1347
|
The index and its update-owned state maintenance share one deferred SQLite
|
|
1353
1348
|
transaction. WAL readers continue to see the last committed generation while a
|
|
@@ -1371,9 +1366,9 @@ durable usage state.
|
|
|
1371
1366
|
|
|
1372
1367
|
Reports per-entry change flags: `changed.version`, `changed.revision`, and
|
|
1373
1368
|
`changed.any`. With `--all`, each bundle is isolated: successful entries appear
|
|
1374
|
-
in `processed`/`plainSynced`;
|
|
1375
|
-
|
|
1376
|
-
|
|
1369
|
+
in `processed`/`plainSynced`; provider or transaction errors report
|
|
1370
|
+
`status: "failed"` and a code. The command continues with later bundles without
|
|
1371
|
+
half-publishing a failed one.
|
|
1377
1372
|
|
|
1378
1373
|
### bundle rename
|
|
1379
1374
|
|
|
@@ -1397,7 +1392,11 @@ config `bundles` key; `defaultBundle`/`defaultWriteTarget` when they name the
|
|
|
1397
1392
|
old id; every `scheduler.enabled[].ref` with the old `<old>//` prefix; the
|
|
1398
1393
|
lockfile entry id; every indexed entry's `bundle_id`/ref; and this tool's own
|
|
1399
1394
|
state rows that name the old bundle (`proposals.ref`, a pending proposal's
|
|
1400
|
-
write target,
|
|
1395
|
+
write target, workflow `task_history.target_ref`, and `workflow_runs.workflow_ref`). The result's
|
|
1396
|
+
`activeWorkflowRuns` lists the active and blocked runs of the renamed bundle,
|
|
1397
|
+
each with its `status`: their frozen plans keep the old qualified refs, so
|
|
1398
|
+
continue them with `akm workflow run <id>` (after `akm workflow resume <id>` for
|
|
1399
|
+
a blocked one) or give up with `akm workflow abandon <id>`. Reported, never
|
|
1401
1400
|
rewritten: refs inside the bundle's own CONTENT (cross-references, `uses:` in
|
|
1402
1401
|
a task, `supersededBy`) — the result's `contentRefs` lists the indexed files
|
|
1403
1402
|
that still spell the old `<old>//` prefix so you can fix them by hand. A real
|
|
@@ -2276,9 +2275,9 @@ names only; `run` and `export` are the supported value-use paths.
|
|
|
2276
2275
|
|
|
2277
2276
|
```sh
|
|
2278
2277
|
akm env list
|
|
2279
|
-
akm env create prod
|
|
2280
|
-
akm env create prod --from-file ./.env
|
|
2281
|
-
akm env create prod --path staging
|
|
2278
|
+
akm env create env/prod # creates env/prod.env (mode 0600)
|
|
2279
|
+
akm env create env/prod --from-file ./.env # ingest an existing .env
|
|
2280
|
+
akm env create env/prod --path staging # creates env/staging/prod.env
|
|
2282
2281
|
$EDITOR "$(akm env path env/prod --quiet)" # edit the file directly
|
|
2283
2282
|
akm env run env/prod -- npm test # run a command with the whole file injected
|
|
2284
2283
|
akm env run env/prod -- $SHELL # interactive shell with the env loaded
|
|
@@ -2289,6 +2288,14 @@ akm env remove env/prod --yes # remove the whole env file
|
|
|
2289
2288
|
akm does not manage individual keys — edit the `.env` file directly (`$EDITOR
|
|
2290
2289
|
"$(akm env path <ref>)"`). `env remove <ref>` removes the whole file.
|
|
2291
2290
|
|
|
2291
|
+
Every `<ref>` is a full akm ref, `[bundle//]env/<name>`; there is no bare-name
|
|
2292
|
+
form (`akm env run prod` is a usage error naming `env/<name>`). A value in the
|
|
2293
|
+
file can embed a `${ref}` token: `${secrets/name}` (or `${bundle//secrets/name}`)
|
|
2294
|
+
is replaced with the secret's value when the env is injected, and any other
|
|
2295
|
+
asset ref with its absolute path. A `${...}` body that is not an akm ref, such
|
|
2296
|
+
as `${HOME}`, is left as text. A ref no bundle owns fails the run and nothing
|
|
2297
|
+
is injected. See [Environment & Secrets](env-and-secrets.md#the-ref-token).
|
|
2298
|
+
|
|
2292
2299
|
Env mutations (`create`, `remove`) pick their write destination the same way
|
|
2293
2300
|
every other write command does: an explicit `--bundle <source>` wins, else
|
|
2294
2301
|
`defaultWriteTarget`, else the working bundle. The chosen source must be
|
|
@@ -2305,7 +2312,7 @@ Subcommands:
|
|
|
2305
2312
|
| --- | --- |
|
|
2306
2313
|
| `list` | List all env files across all bundles with key names only |
|
|
2307
2314
|
| `run <ref> -- <command>` | Run a command with the env injected. `--only` / `--except` filter which keys are injected; `--clean` starts from a minimal inherited environment |
|
|
2308
|
-
| `create <
|
|
2315
|
+
| `create <ref>` | Create an env file (a full ref such as `env/prod`). Empty by default; seed with `--from-file <path>` or `--from-stdin` |
|
|
2309
2316
|
| `path <ref>` | Print the absolute env file path (Docker `_FILE` / `--env-file` / direct editing). `--quiet` suppresses the warning |
|
|
2310
2317
|
| `export <ref> --out <file>` | Write a safe sourceable `export` script to a file (never to stdout) |
|
|
2311
2318
|
| `remove <ref>` | Delete an env file (and its `.sensitive` marker) |
|
|
@@ -2322,7 +2329,7 @@ akm env run env/prod --only A,B -- cmd # inject only A and B
|
|
|
2322
2329
|
akm env run env/prod --except DEBUG -- cmd
|
|
2323
2330
|
akm env run env/prod --clean -- cmd
|
|
2324
2331
|
akm env run env/prod --clean --inherit SSH_AUTH_SOCK -- cmd
|
|
2325
|
-
akm env run
|
|
2332
|
+
akm env run team//env/prod -- cmd # an env in an installed bundle
|
|
2326
2333
|
```
|
|
2327
2334
|
|
|
2328
2335
|
Runs the command with the env file's values injected **directly into the child
|
|
@@ -2333,10 +2340,10 @@ environment, those values will appear in your terminal or agent transcript.
|
|
|
2333
2340
|
which env-file keys are injected. `--clean` starts from a minimal inherited
|
|
2334
2341
|
environment (PATH/HOME/locale/terminal basics) instead of inheriting the full
|
|
2335
2342
|
parent environment; use `--inherit KEY1,KEY2` to pass specific parent vars
|
|
2336
|
-
through in clean mode.
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2343
|
+
through in clean mode. Installing a bundle is the trust decision, so `env run`
|
|
2344
|
+
injects what the env file defines whichever bundle it comes from, including keys
|
|
2345
|
+
such as `PATH` or `LD_PRELOAD`; it does not warn or block. `--allow-dangerous-env-keys`
|
|
2346
|
+
is a deprecated no-op, accepted through 0.10 so existing scripts keep working.
|
|
2340
2347
|
|
|
2341
2348
|
> The single-key `run <ref>/KEY` form was removed. To inject one value, store it
|
|
2342
2349
|
> as a [secret](#secret) and use `akm secret run secrets/<name> <VAR> -- …`, or
|
|
@@ -2351,12 +2358,12 @@ unless the reviewed run explicitly passes `--allow-dangerous-env-keys`.
|
|
|
2351
2358
|
#### env create
|
|
2352
2359
|
|
|
2353
2360
|
```sh
|
|
2354
|
-
akm env create prod
|
|
2355
|
-
akm env create prod --from-file ./.env
|
|
2356
|
-
printf 'A=1\nB=2\n' | akm env create prod --from-stdin
|
|
2357
|
-
akm env create prod --path staging
|
|
2358
|
-
akm env create prod --sensitive
|
|
2359
|
-
akm env create prod --bundle team
|
|
2361
|
+
akm env create env/prod # empty
|
|
2362
|
+
akm env create env/prod --from-file ./.env # seed from an existing .env (byte-for-byte)
|
|
2363
|
+
printf 'A=1\nB=2\n' | akm env create env/prod --from-stdin
|
|
2364
|
+
akm env create env/prod --path staging # creates env/staging/prod.env
|
|
2365
|
+
akm env create env/prod --sensitive # hidden from `env list` and the search index
|
|
2366
|
+
akm env create env/prod --bundle team # write to the `team` source
|
|
2360
2367
|
```
|
|
2361
2368
|
|
|
2362
2369
|
| Flag | Description |
|
|
@@ -2445,6 +2452,10 @@ AKM_VALUE="$TOKEN" akm secret set secrets/api --from-env AKM_VALUE
|
|
|
2445
2452
|
akm secret run secrets/deploy-token GITHUB_TOKEN -- gh release create v1.0.0
|
|
2446
2453
|
```
|
|
2447
2454
|
|
|
2455
|
+
Every `<ref>` is a full akm ref, `[bundle//]secrets/<name>`; a bare name
|
|
2456
|
+
(`akm secret run deploy-token ...`) is a usage error naming `secrets/<name>`. The
|
|
2457
|
+
value is read with surrounding whitespace trimmed.
|
|
2458
|
+
|
|
2448
2459
|
Subcommands:
|
|
2449
2460
|
|
|
2450
2461
|
| Subcommand | Description |
|
|
@@ -2496,8 +2507,9 @@ akm secret run secrets/deploy-token GITHUB_TOKEN --clean -- gh auth status
|
|
|
2496
2507
|
|
|
2497
2508
|
Runs one subprocess with the secret's value set as `$VAR` in the child's
|
|
2498
2509
|
environment. **The value never appears in akm's structured output** — it is
|
|
2499
|
-
passed directly to the child process. The target variable name is validated
|
|
2500
|
-
|
|
2510
|
+
passed directly to the child process. The target variable name is validated as
|
|
2511
|
+
an environment variable name; process-hijacking names such as `LD_PRELOAD` or
|
|
2512
|
+
`PATH` are injected like any other.
|
|
2501
2513
|
`--clean` starts from a minimal inherited environment instead of inheriting the
|
|
2502
2514
|
full parent environment; use `--inherit KEY1,KEY2` to pass specific parent vars
|
|
2503
2515
|
through in clean mode.
|
|
@@ -2713,9 +2725,9 @@ stale paths, and broken refs — in body text and in
|
|
|
2713
2725
|
`refs`/`xrefs`/`supersededBy`/`contradictedBy` frontmatter. A belief edge
|
|
2714
2726
|
pointing at a memory that `akm improve` pruned resolves through the archive
|
|
2715
2727
|
tombstone under `.akm/memory-cleanup/archive/` and is not reported (#884). Also reports
|
|
2716
|
-
`dangerous-env-key` findings for env files (the
|
|
2717
|
-
|
|
2718
|
-
|
|
2728
|
+
`dangerous-env-key` findings for env files (the key set described under
|
|
2729
|
+
[Env files and process-hijacking keys](#env-files-and-process-hijacking-keys);
|
|
2730
|
+
`lint` only warns). `--type workflows` structurally parses
|
|
2719
2731
|
and compiles Markdown workflows; errors surface as
|
|
2720
2732
|
`invalid-workflow-structure` findings (0.9.0: this is the only
|
|
2721
2733
|
structural-validation surface now that `akm workflow validate` is gone).
|
|
@@ -2888,7 +2900,7 @@ itself. `ok` and the exit code are unchanged either way, matching `extract`'s
|
|
|
2888
2900
|
`skipReasons` contract: consumers that need to know branch on
|
|
2889
2901
|
`skippedProcesses` (or pass `--require-engines` to abort instead of
|
|
2890
2902
|
degrading). `reason` names which engine and which credential reference (an env
|
|
2891
|
-
var, `apiKeyFile` path, or `
|
|
2903
|
+
var, `apiKeyFile` path, or `${ref}` reference — never its value) is
|
|
2892
2904
|
missing. A `--dry-run` preview never dispatches, so it never aborts
|
|
2893
2905
|
on an unavailable credential either — even a strategy left with every process
|
|
2894
2906
|
disabled this way still returns its plan, with the affected processes in
|
|
@@ -3626,7 +3638,7 @@ different bundle is a hard error.
|
|
|
3626
3638
|
document (`version: 4`). In the file, exactly one of `uses` or `run` is
|
|
3627
3639
|
allowed. `uses` accepts command, workflow, and script refs plus `akm/command`;
|
|
3628
3640
|
agents and task refs are not executable. `run` accepts a shell string with the
|
|
3629
|
-
closed shell and
|
|
3641
|
+
closed shell and working-directory contract. Task source v4 has no
|
|
3630
3642
|
`akm:` options bag or `on:` trigger block — scheduling, resolver overrides,
|
|
3631
3643
|
`timeout`, `maxSteps`, `maxRetries`, and redaction names are all top-level
|
|
3632
3644
|
keys on the document itself. Normal execution rejects v2 and v3 and points to
|
|
@@ -3678,7 +3690,7 @@ unattended run, so without one a single wedged unit hangs the task forever. An
|
|
|
3678
3690
|
explicit `timeout` always wins, and `timeout: null` opts out entirely. On
|
|
3679
3691
|
expiry the runner aborts the run's signal, which the engine treats as a
|
|
3680
3692
|
graceful break at the next step boundary — the journal is kept and the run
|
|
3681
|
-
stays
|
|
3693
|
+
stays active, and `akm workflow run <run-id>` continues it (the run id is in the task
|
|
3682
3694
|
run's `detail.error` and log). The attempt itself is recorded as `failed`, so
|
|
3683
3695
|
the OS scheduler sees a non-zero exit.
|
|
3684
3696
|
|
|
@@ -383,7 +383,7 @@ layers still win. The resulting request carries the exact model ID and merged
|
|
|
383
383
|
inference object. Engine lowerers consume that exact selection and never run
|
|
384
384
|
alias resolution again. New workflow starts persist the exact request and
|
|
385
385
|
symbolic runner selection in the durable plan v4 family's executable
|
|
386
|
-
`irVersion:
|
|
386
|
+
`irVersion: 7`; resume consumes that frozen material without resolving aliases
|
|
387
387
|
again.
|
|
388
388
|
|
|
389
389
|
Copy the complete installed starter into the user configuration directory when
|
|
@@ -829,7 +829,7 @@ or malformed response keeps the fused order.
|
|
|
829
829
|
| `search.curateRerank.enabled` | Turn the rerank pass on (default `false`) |
|
|
830
830
|
| `search.curateRerank.endpoint` | Full URL of the reranker's rerank endpoint |
|
|
831
831
|
| `search.curateRerank.model` | Model name sent to the endpoint (optional) |
|
|
832
|
-
| `search.curateRerank.apiKey` | `$VAR
|
|
832
|
+
| `search.curateRerank.apiKey` | `$VAR`/`${secrets/<name>}` credential reference (optional) |
|
|
833
833
|
| `search.curateRerank.timeoutMs` | Request timeout (default `10000`) |
|
|
834
834
|
| `search.curateRerank.topN` | How many of the top fused candidates to rerank (default `30`, max `50`) |
|
|
835
835
|
|
|
@@ -1081,8 +1081,9 @@ not itself a secret. Setting both `apiKey` and `apiKeyFile` on the same
|
|
|
1081
1081
|
engine is rejected. A missing, unreadable, or empty file fails the call
|
|
1082
1082
|
closed, naming the engine and path but never the file's content.
|
|
1083
1083
|
|
|
1084
|
-
`engines.<name>.apiKey` also accepts
|
|
1085
|
-
AKM's own secret store (`akm secret set
|
|
1084
|
+
`engines.<name>.apiKey` also accepts `${secrets/<name>}`, an akm ref into
|
|
1085
|
+
AKM's own secret store (`akm secret set secrets/<name> --from-file <file>`;
|
|
1086
|
+
`${team//secrets/<name>}` names a secret in another bundle), for a
|
|
1086
1087
|
launch context where the credential's environment variable is deliberately
|
|
1087
1088
|
not sourced into the process — a scheduled task's crontab preamble, or a
|
|
1088
1089
|
container entrypoint that keeps the user's env out on purpose — and a
|
|
@@ -1090,19 +1091,25 @@ file-backed credential is not an option. Like `apiKeyFile`, only the
|
|
|
1090
1091
|
reference is kept in `config.json`; the store lookup happens at dispatch
|
|
1091
1092
|
time, and an unresolved reference fails the call closed, naming the
|
|
1092
1093
|
reference but never the value. `akm improve`, workflow LLM steps, and `akm
|
|
1093
|
-
health`'s engine probes all resolve `
|
|
1094
|
+
health`'s engine probes all resolve `${ref}` the same way direct LLM and
|
|
1094
1095
|
embedding calls have since 0.9.13 (#917); resolution order for a single
|
|
1095
1096
|
`apiKey` field is: an env reference (`$VAR`/`${VAR}`) first, then
|
|
1096
|
-
`apiKeyFile`, then `
|
|
1097
|
-
|
|
1097
|
+
`apiKeyFile`, then `${ref}` — though in practice a config sets only one of the
|
|
1098
|
+
three per engine. The secret is read trimmed of surrounding whitespace. The ref must name a `secrets/` asset;
|
|
1099
|
+
a `${...}` naming any other kind of asset is rejected when the config loads.
|
|
1098
1100
|
|
|
1099
|
-
`
|
|
1101
|
+
`secret://<name>` was the previous spelling of the `${ref}` form and is
|
|
1102
|
+
retired. A config that still holds it loads as if it said `${secrets/<name>}`
|
|
1103
|
+
(or `${<name>}` when `<name>` is already a full ref), with one warning naming
|
|
1104
|
+
the key; `akm migrate apply` rewrites `config.json` to the new form.
|
|
1105
|
+
|
|
1106
|
+
`embedding.apiKey` accepts the same three forms and resolves `${ref}` the
|
|
1100
1107
|
same way, on every path that sends an embedding request: `akm index`
|
|
1101
1108
|
(including the reindex `akm bundle update` runs and the targeted re-embed a
|
|
1102
1109
|
write command like `akm remember` triggers), `akm improve`'s
|
|
1103
1110
|
consolidate pass (memory dedup and similarity clustering). All of them build the
|
|
1104
1111
|
provider request through the same `RemoteEmbedder`/`resolveSecret` boundary,
|
|
1105
|
-
so a `
|
|
1112
|
+
so a `${ref}` reference resolves identically regardless of which command
|
|
1106
1113
|
triggered the request (#953).
|
|
1107
1114
|
|
|
1108
1115
|
Use `AKM_SQLITE_JOURNAL_MODE=DELETE` or `TRUNCATE` when WAL is unavailable,
|
|
@@ -170,7 +170,7 @@ the set of types the code actually emits at HEAD (verified against every
|
|
|
170
170
|
| `index_db_vacuumed` | `akm index` VACUUMed index.db, after an index layout migration or because more than half its pages were free | `pagesBefore`, `pagesAfter`, `freelistRatioBefore` |
|
|
171
171
|
| `index_completed` | `akm index`, once when a run finishes | `mode`, `totalMs`, `walkMs`, `llmMs`, `embedMs`, `ftsMs`, `finalizeMs` (phase timings in milliseconds) |
|
|
172
172
|
| `stash_synced` | `akm improve`'s internal sync passes (the `sync.push` feature), before the run and at its end, **distinct from** the `akm sync` command above | `phase` (`pre-run` or `end-of-run`), `committed`, `pushed`, `skipped`, `reason`, `attributed` (paths the run wrote and staged), `unattributed` (in-scope paths that went dirty during the run without the run writing them — left for their author) |
|
|
173
|
-
| `env_access` | `akm env run <
|
|
173
|
+
| `env_access` | `akm env run <ref> -- <command>`, and a workflow unit's `env:` binding at each dispatch (audit trail: key **names** only, values never recorded) | `ref`, `keys` |
|
|
174
174
|
| `secret_access` | `akm secret run <ref> <VAR> -- <command>` (audit trail: var **name** only, value never recorded) | `ref`, `var` |
|
|
175
175
|
|
|
176
176
|
*Proposals*
|