akm-cli 0.10.261013-beta → 0.10.261014-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 +494 -3
- package/README.md +15 -0
- package/SECURITY.md +9 -8
- package/STABILITY.md +45 -49
- package/dist/assets/hints/cli-hints-full.md +15 -12
- package/dist/assets/opencode/akm-plugin.js +177 -0
- package/dist/assets/stash-skeleton/README.md +1 -1
- package/dist/assets/tasks/core/improve.yml +1 -1
- package/dist/assets/tasks/improve/akm-improve-consolidate.yml +1 -1
- package/dist/assets/ui/config.js +27 -10
- package/dist/assets/workflows/workflow-template.md +2 -2
- package/dist/cli/clack.js +3 -1
- package/dist/cli/selection.js +33 -0
- package/dist/cli/shared.js +14 -1
- package/dist/cli/unknown-flags.js +6 -37
- package/dist/cli.js +69 -48
- package/dist/commands/agent/agent-dispatch.js +17 -25
- package/dist/commands/agent/contribute-cli.js +9 -8
- package/dist/commands/command/command-cli.js +4 -8
- package/dist/commands/command/command-execution.js +25 -39
- package/dist/commands/completions.js +1 -1
- package/dist/commands/config-cli.js +14 -5
- package/dist/commands/env/child-env.js +12 -14
- package/dist/commands/env/env-cli.js +2 -2
- package/dist/commands/env/secret-cli.js +2 -2
- package/dist/commands/health/checks.js +10 -849
- package/dist/commands/health/connections-and-harnesses-check.js +109 -0
- package/dist/commands/health/egress.js +3 -3
- package/dist/commands/health/html-report.js +9 -10
- package/dist/commands/health/plugin-staleness.js +18 -11
- package/dist/commands/health/report-view-model.js +16 -12
- package/dist/commands/health/semantic-search-check.js +85 -0
- package/dist/commands/health/type-directory-check.js +0 -3
- package/dist/commands/health.js +30 -42
- package/dist/commands/improve/consolidate/pair-pass.js +10 -25
- package/dist/commands/improve/consolidate.js +10 -15
- package/dist/commands/improve/distill.js +5 -15
- package/dist/commands/improve/eligibility.js +1 -1
- package/dist/commands/improve/execution.js +37 -40
- package/dist/commands/improve/extract-cli.js +6 -11
- package/dist/commands/improve/extract-prompt.js +2 -2
- package/dist/commands/improve/extract.js +67 -97
- package/dist/commands/improve/improve-cli.js +22 -128
- package/dist/commands/improve/improve-report.js +1 -1
- package/dist/commands/improve/improve-strategies.js +25 -108
- package/dist/commands/improve/improve.js +10 -14
- package/dist/commands/improve/loop-stages.js +3 -0
- package/dist/commands/improve/memory/memory-improve.js +1 -1
- package/dist/commands/improve/preparation.js +8 -13
- package/dist/commands/improve/reflect.js +203 -332
- package/dist/commands/improve/retrieval-scope.js +1 -1
- package/dist/commands/improve/session-asset.js +3 -2
- package/dist/commands/improve/stage.js +87 -115
- package/dist/commands/lint/base-linter.js +3 -3
- package/dist/commands/lint/index.js +2 -2
- package/dist/commands/models-cli.js +103 -63
- package/dist/commands/proposal/drain.js +26 -39
- package/dist/commands/proposal/proposal-cli.js +14 -18
- package/dist/commands/proposal/propose-cli.js +4 -2
- package/dist/commands/proposal/propose.js +37 -64
- package/dist/commands/proposal/repository.js +17 -17
- package/dist/commands/proposal/validators/proposal-validators.js +2 -2
- package/dist/commands/read/curate.js +10 -6
- package/dist/commands/read/registry-search.js +2 -48
- package/dist/commands/read/search-cli.js +1 -8
- package/dist/commands/read/search.js +5 -6
- package/dist/commands/read/show.js +2 -4
- package/dist/commands/remember.js +25 -40
- package/dist/commands/sources/bundle-config-ops.js +2 -2
- package/dist/commands/sources/info.js +12 -1
- package/dist/commands/sources/init.js +1 -1
- package/dist/commands/sources/installed-stashes.js +2 -2
- package/dist/commands/sources/migration-help.js +1 -1
- package/dist/commands/sources/plugin-upgrade.js +8 -15
- package/dist/commands/sources/schema-repair.js +4 -8
- package/dist/commands/sources/source-add.js +2 -2
- package/dist/commands/sources/source-manage.js +4 -4
- package/dist/commands/targets.js +175 -0
- package/dist/commands/tasks/explain.js +103 -68
- package/dist/commands/tasks/tasks-cli.js +9 -11
- package/dist/commands/tasks/tasks.js +37 -41
- package/dist/commands/ui/api.js +11 -3
- package/dist/commands/ui/redact.js +1 -27
- package/dist/commands/ui/workspace-actions.js +1 -1
- package/dist/commands/workflow/plan.js +1 -1
- package/dist/commands/workflow-cli.js +3 -4
- package/dist/core/adapter/adapters/agent-skills-adapter.js +10 -11
- package/dist/core/adapter/adapters/akm-adapter.js +33 -38
- package/dist/core/adapter/adapters/akm-lint.js +7 -8
- package/dist/core/adapter/adapters/akm-task-adapter.js +3 -3
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +5 -5
- package/dist/core/adapter/adapters/claude-adapter.js +1 -1
- package/dist/core/adapter/adapters/dotenv-adapter.js +3 -3
- package/dist/core/adapter/adapters/generic-files-adapter.js +5 -5
- package/dist/core/adapter/adapters/index.js +3 -4
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +12 -14
- package/dist/core/adapter/adapters/okf-adapter.js +8 -10
- package/dist/core/adapter/adapters/opencode-adapter.js +1 -1
- package/dist/core/adapter/adapters/shared.js +3 -3
- package/dist/core/adapter/adapters/tool-dir-shared.js +7 -25
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +3 -3
- package/dist/core/adapter/detect-adapter.js +1 -1
- package/dist/core/adapter/execution-source.js +13 -35
- package/dist/core/adapter/registry.js +1 -1
- package/dist/core/adapter/validate-context.js +2 -4
- package/dist/core/asset/asset-placement.js +1 -1
- package/dist/core/asset/asset-ref.js +3 -3
- package/dist/core/closest-match.js +37 -0
- package/dist/core/common.js +33 -5
- package/dist/core/config/config-io.js +26 -18
- package/dist/core/config/config-schema.js +19 -106
- package/dist/core/config/config-sources.js +3 -3
- package/dist/core/config/config-types.js +4 -4
- package/dist/core/config/config-walker.js +50 -77
- package/dist/core/config/config.js +385 -93
- package/dist/core/config/convert-engine-references.js +114 -0
- package/dist/core/config/convert-engines-shared.js +40 -0
- package/dist/core/config/convert-engines.js +300 -0
- package/dist/core/config/convert-models-overlay.js +137 -0
- package/dist/core/config/credentials.js +304 -0
- package/dist/core/config/engine-semantics.js +3 -3
- package/dist/core/config/migrate-keys.js +222 -0
- package/dist/core/config/model-aliases.js +37 -0
- package/dist/core/config/models-file.js +34 -0
- package/dist/core/config/retired-engines.js +53 -0
- package/dist/core/config/schema/connections.js +41 -0
- package/dist/core/config/schema/embedding.js +2 -2
- package/dist/core/config/schema/harnesses.js +41 -0
- package/dist/core/config/schema/improve-processes.js +9 -28
- package/dist/core/config/schema/improve.js +36 -1
- package/dist/core/config/schema/index-config.js +18 -20
- package/dist/core/config/schema/primitives.js +41 -22
- package/dist/core/config/schema/search.js +6 -11
- package/dist/core/config/schema/sources-bundles.js +7 -7
- package/dist/core/config/schema/workflow.js +2 -6
- package/dist/core/config/unusable-entries.js +66 -0
- package/dist/core/content-safety.js +3 -6
- package/dist/core/endpoint-url.js +47 -0
- package/dist/core/errors.js +9 -15
- package/dist/core/extra-params.js +3 -3
- package/dist/core/improve-result.js +8 -9
- package/dist/core/json-schema.js +1 -1
- package/dist/core/lesson-lint.js +1 -1
- package/dist/core/llm-inference.js +80 -0
- package/dist/core/parse.js +2 -2
- package/dist/core/paths.js +32 -4
- package/dist/core/recognition-util.js +8 -10
- package/dist/core/redaction.js +78 -52
- package/dist/core/state/migrations.js +17 -22
- package/dist/core/structured.js +2 -68
- package/dist/core/subprocess.js +63 -22
- package/dist/core/type-presentation.js +10 -14
- package/dist/execution/input-contract.js +3 -6
- package/dist/execution/notices.js +49 -0
- package/dist/execution/resolved-request.js +24 -40
- package/dist/execution/source.js +21 -45
- package/dist/execution/target-ref.js +2 -2
- package/dist/indexer/bundle-identity-guard.js +6 -5
- package/dist/indexer/ensure-index.js +1 -1
- package/dist/indexer/index-writer-lock.js +1 -1
- package/dist/indexer/indexer.js +19 -6
- package/dist/indexer/installations.js +11 -14
- package/dist/indexer/materialize-embeddings.js +20 -16
- package/dist/indexer/passes/memory-inference.js +21 -50
- package/dist/indexer/passes/metadata.js +5 -5
- package/dist/indexer/scan/doc-to-entry.js +1 -1
- package/dist/indexer/scan/drain-dir.js +6 -8
- package/dist/indexer/search/db-search.js +9 -7
- package/dist/indexer/search/search-source.js +40 -22
- package/dist/indexer/usage/usage-events.js +2 -3
- package/dist/indexer/walk/index-context.js +2 -1
- package/dist/indexer/walk/matchers.js +3 -11
- package/dist/indexer/walk/walker.js +14 -4
- package/dist/integrations/agent/akm-read-tools.js +81 -0
- package/dist/integrations/agent/config.js +1 -1
- package/dist/integrations/agent/detect.js +32 -36
- package/dist/integrations/agent/execution.js +130 -428
- package/dist/integrations/agent/index.js +1 -1
- package/dist/integrations/agent/profiles.js +24 -28
- package/dist/integrations/agent/prompts.js +17 -30
- package/dist/integrations/agent/request-lowering.js +67 -101
- package/dist/integrations/agent/resolution.js +332 -0
- package/dist/integrations/agent/runner-dispatch.js +154 -178
- package/dist/integrations/agent/runner.js +20 -72
- package/dist/integrations/agent/runtime-port.js +4 -0
- package/dist/integrations/agent/runtime.js +10 -0
- package/dist/integrations/agent/spawn.js +65 -190
- package/dist/integrations/harnesses/aider/index.js +19 -39
- package/dist/integrations/harnesses/amazonq/index.js +17 -32
- package/dist/integrations/harnesses/claude/index.js +59 -28
- package/dist/integrations/harnesses/claude/session-log.js +7 -5
- package/dist/integrations/harnesses/codex/index.js +19 -31
- package/dist/integrations/harnesses/copilot/index.js +17 -35
- package/dist/integrations/harnesses/gemini/index.js +18 -34
- package/dist/integrations/harnesses/harness.js +36 -0
- package/dist/integrations/harnesses/index.js +20 -51
- package/dist/integrations/harnesses/opencode/agent-builder.js +132 -100
- package/dist/integrations/harnesses/opencode/index.js +11 -33
- package/dist/integrations/harnesses/opencode/roots.js +50 -0
- package/dist/integrations/harnesses/opencode/runtime/binary.js +206 -0
- package/dist/integrations/harnesses/opencode/runtime/command.js +152 -0
- package/dist/integrations/harnesses/opencode/runtime/index.js +177 -0
- package/dist/integrations/harnesses/opencode/runtime/tar.js +107 -0
- package/dist/integrations/harnesses/opencode/session-log-v1.js +15 -7
- package/dist/integrations/harnesses/opencode/session-log-v2.js +72 -48
- package/dist/integrations/harnesses/opencode/session-log.js +58 -137
- package/dist/integrations/harnesses/opencode/version.js +34 -53
- package/dist/integrations/harnesses/openhands/index.js +13 -37
- package/dist/integrations/harnesses/pi/index.js +21 -32
- package/dist/integrations/lockfile.js +1 -1
- package/dist/integrations/session-logs/index.js +11 -31
- package/dist/llm/client.js +93 -111
- package/dist/llm/embedder.js +19 -34
- package/dist/llm/embedders/connection.js +31 -0
- package/dist/llm/embedders/local-model-files.js +56 -0
- package/dist/llm/embedders/local.js +146 -115
- package/dist/llm/embedders/remote.js +26 -24
- package/dist/llm/embedders/types.js +1 -1
- package/dist/llm/index-passes.js +33 -39
- package/dist/llm/memory-infer.js +67 -77
- package/dist/llm/model-list.js +35 -0
- package/dist/llm/rerank-client.js +8 -14
- package/dist/llm/structured-call.js +45 -99
- package/dist/llm/structured.js +60 -0
- package/dist/output/renderers.js +2 -7
- package/dist/output/shapes/helpers.js +18 -42
- package/dist/output/shapes/passthrough.js +1 -0
- package/dist/output/shapes.js +1 -7
- package/dist/output/text/command-format.js +29 -37
- package/dist/output/text/health-format.js +8 -2
- package/dist/output/text/helpers.js +1 -1
- package/dist/output/text/migrate.js +12 -0
- package/dist/output/text/models.js +3 -2
- package/dist/output/text/registry-commands.js +1 -2
- package/dist/output/text/show-format.js +0 -2
- package/dist/output/text/targets-table.js +70 -0
- package/dist/output/text/workflow-format.js +7 -8
- package/dist/output/text.js +1 -1
- package/dist/registry/providers/skills-sh.js +1 -28
- package/dist/registry/providers/static-index.js +1 -71
- package/dist/runtime.js +6 -2
- package/dist/scripts/akm-migrate-node.js +5280 -4263
- package/dist/scripts/akm-migrate.js +5280 -4263
- package/dist/setup/detect.js +28 -273
- package/dist/setup/endpoint.js +36 -0
- package/dist/setup/semantic-assets.js +13 -19
- package/dist/setup/setup-flags.js +77 -0
- package/dist/setup/setup-plan.js +144 -0
- package/dist/setup/setup.js +134 -358
- package/dist/setup/steps/connection-shared.js +49 -101
- package/dist/setup/steps/connection.js +121 -524
- package/dist/setup/steps/embeddings.js +151 -0
- package/dist/setup/steps/harnesses.js +118 -0
- package/dist/setup/steps/platforms.js +2 -81
- package/dist/setup/steps.js +10 -0
- package/dist/setup/summary.js +67 -0
- package/dist/sources/freshness.js +16 -21
- package/dist/sources/providers/git-provider.js +2 -9
- package/dist/sources/providers/provider-utils.js +1 -5
- package/dist/sources/snapshot-fetchers/robots.js +11 -12
- package/dist/sources/snapshot-fetchers/website-ingest.js +8 -15
- package/dist/standalone/onnxruntime-library.js +52 -0
- package/dist/storage/repositories/improve-ledger-repository.js +1 -1
- package/dist/storage/repositories/improve-runs-repository.js +0 -13
- package/dist/storage/repositories/index-entries-repository.js +2 -2
- package/dist/storage/repositories/workflow-runs-repository.js +8 -15
- package/dist/storage/sqlite-read-snapshot.js +33 -29
- package/dist/tasks/log-redaction.js +7 -119
- package/dist/tasks/prepare/prepare-support.js +5 -5
- package/dist/tasks/prepare/prepare.js +5 -5
- package/dist/tasks/prepare/script-capture.js +3 -5
- package/dist/tasks/run/attempt-lifecycle.js +17 -35
- package/dist/tasks/run/load-task.js +8 -13
- package/dist/tasks/run/run-command-task.js +15 -10
- package/dist/tasks/run/run-native-task.js +8 -13
- package/dist/tasks/run/run-task.js +5 -8
- package/dist/tasks/run/run-workflow-task.js +12 -19
- package/dist/tasks/run/task-history.js +9 -17
- package/dist/tasks/run/task-log.js +1 -5
- package/dist/tasks/scheduler-invocation.js +13 -18
- package/dist/tasks/source/bounded-document.js +31 -76
- package/dist/tasks/source/project-v4.js +5 -3
- package/dist/tasks/source/task-input-diagnostics.js +3 -4
- package/dist/tasks/source/task-source-v4.js +47 -68
- package/dist/tasks/source-v3.js +2 -5
- package/dist/tasks/task-run-reserved-flags.js +1 -2
- package/dist/workflows/authoring/authoring.js +2 -7
- package/dist/workflows/concurrency-policy.js +4 -4
- package/dist/workflows/exec/child-workflow.js +0 -2
- package/dist/workflows/exec/dispatch-redaction.js +14 -83
- package/dist/workflows/exec/environment.js +2 -3
- package/dist/workflows/exec/exec-unit.js +10 -59
- package/dist/workflows/exec/frozen-judge.js +10 -26
- package/dist/workflows/exec/native-executor.js +56 -45
- package/dist/workflows/exec/run-workflow.js +7 -24
- package/dist/workflows/exec/step-work.js +9 -14
- package/dist/workflows/exec/unit-dispatch.js +6 -13
- package/dist/workflows/freeze/freeze.js +14 -32
- package/dist/workflows/freeze/step-values.js +5 -11
- package/dist/workflows/freeze/targets/command.js +3 -6
- package/dist/workflows/freeze/task-bindings.js +0 -1
- package/dist/workflows/parser.js +44 -34
- package/dist/workflows/plan.js +3 -1
- package/dist/workflows/renderer.js +6 -5
- package/dist/workflows/resource-limits.js +2 -2
- package/dist/workflows/runtime/run-plan.js +2 -1
- package/dist/workflows/runtime/runs.js +14 -9
- package/docs/README.md +10 -16
- package/docs/architecture/README.md +2 -37
- package/docs/architecture/adapters.md +2 -2
- package/docs/architecture/akm-core-principles.md +256 -118
- package/docs/architecture/architecture.md +282 -98
- package/docs/architecture/improvement.md +8 -2
- package/docs/architecture/internals/classification.md +1 -3
- package/docs/architecture/internals/fresh-host-rebuild-runbook.md +7 -6
- package/docs/architecture/internals/health-advisories.md +35 -74
- package/docs/architecture/internals/improve-workflow.md +27 -26
- package/docs/architecture/internals/indexing.md +3 -3
- package/docs/architecture/internals/storage-locations.md +45 -12
- package/docs/architecture/persisted-data-compat.md +9 -6
- package/docs/architecture/specs/okf-support.md +9 -11
- package/docs/architecture/specs/ref.md +7 -9
- package/docs/architecture/testing/testing-workflow.md +164 -42
- package/docs/architecture/workflow-engine.md +17 -14
- package/docs/guides/README.md +0 -1
- package/docs/guides/author-bundles.md +1 -3
- package/docs/guides/author-workflows.md +61 -73
- package/docs/guides/bundles.md +4 -5
- package/docs/guides/discover-and-load.md +1 -1
- package/docs/guides/getting-started.md +49 -3
- package/docs/guides/improve-the-library.md +10 -4
- package/docs/guides/recipes/headless-install.md +11 -16
- package/docs/guides/run-workflows.md +6 -9
- package/docs/guides/scheduling.md +2 -2
- package/docs/guides/use-with-any-agent.md +20 -22
- package/docs/integration/bundling-akm.md +19 -9
- package/docs/maintainers/README.md +0 -3
- package/docs/migration/README.md +10 -3
- package/docs/migration/release-notes/0.10.0.md +81 -16
- package/docs/migration/release-notes/0.6.0.md +1 -1
- package/docs/migration/release-notes/0.7.0.md +1 -1
- package/docs/migration/release-notes/0.9.0.md +1 -1
- package/docs/migration/release-notes/README.md +1 -1
- package/docs/migration/v0.9-to-v0.10.md +295 -59
- package/docs/migration/v0.9.1-to-v0.9.2.md +6 -5
- package/docs/posts/config-v2-lessons-16.md +1 -1
- package/docs/posts/llm-mode-reflect-13.md +1 -1
- package/docs/posts/release-0.6.0.md +11 -11
- package/docs/posts/release-0.8.0.md +4 -4
- package/docs/posts/workflows-vaults-09.md +1 -1
- package/docs/reference/README.md +1 -1
- package/docs/reference/asset-types.md +2 -2
- package/docs/reference/cli.md +356 -279
- package/docs/reference/configuration.md +569 -557
- package/docs/reference/data-and-telemetry.md +8 -5
- package/docs/reference/env-and-secrets.md +11 -5
- package/docs/reference/refs.md +3 -20
- package/docs/reference/registry.md +6 -27
- package/docs/reference/supported-formats.md +1 -1
- package/docs/reference/tasks.md +11 -8
- package/docs/reference/ui-api.md +11 -6
- package/docs/reference/workflow-schema.md +106 -134
- package/docs/reference/workflows.md +4 -6
- package/package.json +9 -11
- package/schemas/akm-config.json +1696 -2922
- package/schemas/akm-task.json +2 -0
- package/schemas/akm-workflow.json +36 -9
- package/ROADMAP.md +0 -112
- package/dist/assets/models.json +0 -35
- package/dist/commands/health/engine-usage.js +0 -45
- package/dist/core/config/schema/engines.js +0 -160
- package/dist/core/config/schema/execution.js +0 -23
- package/dist/core/spawn-env.js +0 -268
- package/dist/integrations/agent/builder-shared.js +0 -33
- package/dist/integrations/agent/builders.js +0 -43
- package/dist/integrations/agent/engine-fallback.js +0 -59
- package/dist/integrations/agent/engine-resolution.js +0 -335
- package/dist/integrations/agent/model-map.js +0 -475
- package/dist/integrations/harnesses/aider/agent-builder.js +0 -107
- package/dist/integrations/harnesses/aider/result-extractor.js +0 -53
- package/dist/integrations/harnesses/amazonq/agent-builder.js +0 -138
- package/dist/integrations/harnesses/amazonq/result-extractor.js +0 -48
- package/dist/integrations/harnesses/claude/agent-builder.js +0 -106
- package/dist/integrations/harnesses/claude/config-import.js +0 -67
- package/dist/integrations/harnesses/claude/result-extractor.js +0 -67
- package/dist/integrations/harnesses/codex/agent-builder.js +0 -150
- package/dist/integrations/harnesses/codex/result-extractor.js +0 -110
- package/dist/integrations/harnesses/copilot/agent-builder.js +0 -117
- package/dist/integrations/harnesses/copilot/result-extractor.js +0 -178
- package/dist/integrations/harnesses/gemini/agent-builder.js +0 -114
- package/dist/integrations/harnesses/gemini/result-extractor.js +0 -149
- package/dist/integrations/harnesses/opencode/config-import.js +0 -149
- package/dist/integrations/harnesses/opencode/model-config.js +0 -33
- package/dist/integrations/harnesses/opencode/model-work-agent.js +0 -115
- package/dist/integrations/harnesses/opencode/session-log-types.js +0 -12
- package/dist/integrations/harnesses/opencode-sdk/index.js +0 -44
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +0 -1052
- package/dist/integrations/harnesses/opencode-sdk/v1-adapter.js +0 -199
- package/dist/integrations/harnesses/opencode-sdk/v2-adapter.js +0 -254
- package/dist/integrations/harnesses/opencode-sdk/wire.js +0 -66
- package/dist/integrations/harnesses/openhands/agent-builder.js +0 -120
- package/dist/integrations/harnesses/openhands/result-extractor.js +0 -135
- package/dist/integrations/harnesses/pi/agent-builder.js +0 -89
- package/dist/integrations/harnesses/pi/result-extractor.js +0 -168
- package/dist/integrations/harnesses/shared.js +0 -18
- package/dist/integrations/harnesses/types.js +0 -55
- package/dist/llm/feature-gate.js +0 -115
- package/dist/output/shapes/models-list.js +0 -16
- package/dist/output/shapes/registry-search.js +0 -10
- package/dist/setup/detected-engines.js +0 -136
- package/dist/setup/engine-config.js +0 -97
- package/dist/setup/harness-config-import.js +0 -47
- package/dist/setup/providers.js +0 -14
- package/dist/setup/steps/semantic.js +0 -39
- package/dist/workflows/exec/lowering-notices.js +0 -23
- package/docs/architecture/0.10-process-rules.md +0 -832
- package/docs/architecture/akm-architecture-decision-history.md +0 -2055
- package/docs/architecture/comparisons/claude-code-vs-akm-workflows-full.md +0 -544
- package/docs/architecture/decisions/0001-no-interpolation-attached-structured-context.md +0 -72
- package/docs/architecture/decisions/0002-unit-reuse-and-input-hash-scope.md +0 -142
- package/docs/architecture/decisions/0003-child-env-allowlist-and-provenance.md +0 -187
- package/docs/architecture/decisions/0004-task-input-contract-and-flag-coercion.md +0 -97
- package/docs/architecture/decisions/0005-task-result-vocabulary-and-legacy-read-mapping.md +0 -108
- package/docs/architecture/decisions/0006-task-source-version-routing.md +0 -124
- package/docs/architecture/decisions/0007-workflow-composition-bounds.md +0 -83
- package/docs/architecture/decisions/0008-task-binding-normalization.md +0 -88
- package/docs/architecture/decisions/0009-child-run-publication-column-parity.md +0 -80
- package/docs/architecture/decisions/0010-driver-protocol-cut.md +0 -36
- package/docs/architecture/decisions/0011-engine-run-loop-invariants.md +0 -125
- package/docs/architecture/decisions/README.md +0 -62
- package/docs/architecture/internals/functional-contract-patterns.md +0 -340
- package/docs/architecture/internals/registry-network-boundary.md +0 -57
- package/docs/architecture/internals/search.md +0 -248
- package/docs/architecture/reviews/env-secret-access.md +0 -319
- package/docs/architecture/runtime-boundary-design.md +0 -153
- package/docs/architecture/specs/0.9.0-close-out-plan.md +0 -361
- package/docs/architecture/specs/0.9.0-decisions.md +0 -532
- package/docs/architecture/specs/0.9.0-docs-code-drift-register.md +0 -745
- package/docs/architecture/specs/0.9.0-open-items-register.md +0 -135
- package/docs/architecture/specs/0.9.0-public-api-issue-backlog.md +0 -740
- package/docs/architecture/specs/0.9.0-release-surface-review.md +0 -636
- package/docs/architecture/specs/agent-command-engine-model-design.md +0 -513
- package/docs/architecture/specs/akm-0.9.0-bundle-adapter-spec.md +0 -501
- package/docs/architecture/specs/akm-0.9.0-ref-grammar-decision.md +0 -291
- package/docs/architecture/specs/akm-format-neutral-bundle-workspace-spec.md +0 -2059
- package/docs/architecture/specs/di-seams-plan.md +0 -539
- package/docs/architecture/specs/driver-protocol-keep-or-cut.md +0 -275
- package/docs/architecture/specs/fact-asset-type.md +0 -142
- package/docs/architecture/specs/improve-collapse-churn-detector-design.md +0 -634
- package/docs/architecture/specs/reviews/task-workflow-unification/README.md +0 -72
- package/docs/architecture/specs/reviews/task-workflow-unification/findings-consolidated.md +0 -152
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-alternatives.md +0 -352
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-bunqueue.md +0 -300
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-openworkflow.md +0 -402
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-1.md +0 -758
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-2.md +0 -645
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-3.md +0 -602
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-adversarial.md +0 -27
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-architecture.md +0 -27
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-coverage.md +0 -74
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-security.md +0 -15
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-adversarial.md +0 -132
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-verification.md +0 -147
- package/docs/architecture/specs/stash-conventions-code-spec.md +0 -275
- package/docs/architecture/specs/stash-organization-conventions.md +0 -377
- package/docs/architecture/specs/task-workflow-format-unification.md +0 -721
- package/docs/architecture/specs/workflow-engine-buy-vs-build.md +0 -231
- package/docs/architecture/specs/workflow-format-unification.md +0 -432
- package/docs/architecture/testing/manual-testing-checklist.md +0 -3379
- package/docs/architecture/testing/okf-v0.2-conformance-runbook.md +0 -924
- package/docs/architecture/testing/task-workflow-manual-tests.md +0 -1702
- package/docs/guides/claude-code-vs-akm-workflows.md +0 -29
- package/docs/guides/knowledge-management.md +0 -18
- package/docs/maintainers/curate-workmap.md +0 -335
- package/docs/migration/v0.5-to-v0.6.md +0 -759
- package/docs/migration/v0.7-to-v0.8.md +0 -1378
- package/docs/plans/0.9.2-agent-command-workflow-plan.md +0 -423
|
@@ -51,9 +51,9 @@ steps:
|
|
|
51
51
|
The step needs a `## investigate` body section like any other step (it is
|
|
52
52
|
documentation for a human; the child's own steps carry the instructions).
|
|
53
53
|
|
|
54
|
-
- `workflow` names the child. A workflow unit
|
|
55
|
-
carries its own environment, so `exec`, `
|
|
56
|
-
beside `workflow` are lint errors. `workflow` is not allowed inside
|
|
54
|
+
- `workflow` names the child. A workflow unit runs no model of its own and the
|
|
55
|
+
child carries its own environment, so `exec`, `connection`, `harness`, `model`,
|
|
56
|
+
`llm` and `env` beside `workflow` are lint errors. `workflow` is not allowed inside
|
|
57
57
|
`map.unit`.
|
|
58
58
|
- `with:` binds the child's declared `params:` (a workflow has no `inputs:`).
|
|
59
59
|
Each value is a literal (validated against the param's declared type at
|
|
@@ -159,12 +159,14 @@ families) plus the orchestration keys:
|
|
|
159
159
|
- `params` — name → `{ type, description, default }` (JSON-Schema-typed, unlike a bare
|
|
160
160
|
description string). A param the run does not supply takes its `default:`; an explicit
|
|
161
161
|
value wins. Params are never required.
|
|
162
|
-
- `defaults` — run-level dispatch defaults (`
|
|
163
|
-
`timeout`, `on_error`), overridable per unit.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
step
|
|
167
|
-
|
|
162
|
+
- `defaults` — run-level dispatch defaults (`connection`, `harness`, `model`,
|
|
163
|
+
`llm`, `timeout`, `on_error`), overridable per unit. A step with neither runs
|
|
164
|
+
on the default harness, else akm's own runtime over the default connection.
|
|
165
|
+
`llm:` tuning (`temperature`, `max_tokens`, `enable_thinking`,
|
|
166
|
+
`reasoning_effort`) reaches every step, and a document-level `llm:` reaches
|
|
167
|
+
EVERY step. A connection and akm's own runtime send it; a harness reports it as
|
|
168
|
+
an `untranslated-field` notice on that step (see
|
|
169
|
+
[Settings a call asks for](configuration.md#settings-a-call-asks-for)).
|
|
168
170
|
There is no per-step opt-out (`llm: {}` is a no-op and `llm: null` is a parse
|
|
169
171
|
error), so in a mixed document put `llm:` on the `unit:` of each step it is
|
|
170
172
|
meant for instead of in `defaults:`.
|
|
@@ -174,8 +176,8 @@ families) plus the orchestration keys:
|
|
|
174
176
|
(`[A-Za-z_][A-Za-z0-9_-]*` — no dots) and **at most one** of `unit` or `map`.
|
|
175
177
|
A step with neither is **still a unit step** — bare
|
|
176
178
|
`- id: validate` is the complete minimal declaration. `unit:` is the
|
|
177
|
-
optional dispatch-override bag (`exec`, `
|
|
178
|
-
`retry`, `on_error`, `output`, `env`; see
|
|
179
|
+
optional dispatch-override bag (`exec`, `connection`, `harness`, `model`,
|
|
180
|
+
`llm`, `timeout`, `retry`, `on_error`, `output`, `env`; see
|
|
179
181
|
[Exec (shell) units](#exec-shell-units) and
|
|
180
182
|
[Failure policy](#failure-policy)). Dispatch settings live under `unit:`
|
|
181
183
|
(`map.unit:` on a map step), not on the step itself; `unit.output` types
|
|
@@ -267,7 +269,7 @@ type: workflow
|
|
|
267
269
|
description: Review changed files and give an overall verdict
|
|
268
270
|
params:
|
|
269
271
|
changed_files: { type: array, description: Files to review }
|
|
270
|
-
defaults: {
|
|
272
|
+
defaults: { harness: claude, model: balanced, timeout: 10m, on_error: fail }
|
|
271
273
|
budget: { max_units: 40, max_tokens: 200000 }
|
|
272
274
|
steps:
|
|
273
275
|
- id: discover
|
|
@@ -278,8 +280,8 @@ steps:
|
|
|
278
280
|
over: steps.discover.output.files
|
|
279
281
|
concurrency: 8
|
|
280
282
|
unit:
|
|
281
|
-
|
|
282
|
-
model:
|
|
283
|
+
harness: claude
|
|
284
|
+
model: reasoning
|
|
283
285
|
timeout: 5m
|
|
284
286
|
retry: { max: 1, on: [timeout, llm_rate_limit] }
|
|
285
287
|
on_error: continue
|
|
@@ -491,20 +493,20 @@ fail later at `akm workflow run`:
|
|
|
491
493
|
| `map.concurrency` | 1 – 64 |
|
|
492
494
|
| `retry.max` | 0 – 100 |
|
|
493
495
|
| `timeout` | ≤ 2147483647 ms (~24.8 days), or `none` |
|
|
494
|
-
| `
|
|
496
|
+
| `connection` and `harness` names | `^[a-z][a-z0-9]*(-[a-z0-9]+)*$`, ≤ 63 chars |
|
|
495
497
|
|
|
496
498
|
`timeout` is resolved **once, at freeze time**, and the frozen value is what
|
|
497
|
-
dispatch applies — there is no separate
|
|
499
|
+
dispatch applies — there is no separate ceiling on top of it. The
|
|
498
500
|
first of these that is set wins: the unit's `timeout`, then the document's
|
|
499
|
-
`defaults.timeout`, then `
|
|
500
|
-
default — **
|
|
501
|
-
|
|
501
|
+
`defaults.timeout`, then the selected connection's or harness's `timeoutMs`,
|
|
502
|
+
then the default — **none for agent work, whether it runs on a harness or on
|
|
503
|
+
akm's runtime over a connection, and 10m for model work**. Writing `timeout: none` is an explicit opt
|
|
502
504
|
out and leaves the unit genuinely unbounded; nothing later re-imposes a cap.
|
|
503
505
|
|
|
504
506
|
## Exec (shell) units
|
|
505
507
|
|
|
506
508
|
A step whose `unit:` block declares `exec:` runs a **shell command** instead of
|
|
507
|
-
dispatching
|
|
509
|
+
dispatching a model. Deterministic work — running the test suite, building,
|
|
508
510
|
linting, copying a file, invoking a script — is a command, not a prompt, and
|
|
509
511
|
paying for an LLM or agent dispatch to get it done buys nondeterminism, latency,
|
|
510
512
|
and tokens in exchange for nothing.
|
|
@@ -520,10 +522,10 @@ steps:
|
|
|
520
522
|
retry: { max: 1, on: [timeout] }
|
|
521
523
|
```
|
|
522
524
|
|
|
523
|
-
An exec unit names **no
|
|
524
|
-
parser rejects those alongside `exec:`), it
|
|
525
|
-
made only of exec steps freezes and runs on an
|
|
526
|
-
at all. Everything else about a unit still applies unchanged: `timeout`, `retry`,
|
|
525
|
+
An exec unit names **no connection or harness**. It carries no `connection`,
|
|
526
|
+
`harness`, `model`, or `llm` (the parser rejects those alongside `exec:`), it
|
|
527
|
+
consumes no tokens, and a workflow made only of exec steps freezes and runs on an
|
|
528
|
+
install with no connection or harness configured at all. Everything else about a unit still applies unchanged: `timeout`, `retry`,
|
|
527
529
|
`on_error`, `output`, `env`, `map` fan-out and its concurrency, the
|
|
528
530
|
unit journal, budget accounting, and replay/reuse.
|
|
529
531
|
|
|
@@ -579,9 +581,9 @@ full.
|
|
|
579
581
|
| --- | --- |
|
|
580
582
|
| **Working directory** | The owner root of the run's workflow, found at each step's dispatch. `cwd` joins it once and may be absolute. |
|
|
581
583
|
| **Argv** | Spawned directly, never shell-interpreted. A `${ref}` token in an entry is replaced at dispatch. |
|
|
582
|
-
| **Environment** |
|
|
584
|
+
| **Environment** | [akm's own](#the-childs-environment), with the directories this akm resolved set over it, then the unit's `env:` bindings, then the engine's `AKM_*` [context](#context-reaching-the-command). |
|
|
583
585
|
| **`${ref}` tokens** | In argv, `cwd` and env-asset values. `${secrets/name}` becomes the secret's value, any other asset ref the asset's absolute path. A ref no bundle owns fails the unit before it spawns. Prompts are not substituted. |
|
|
584
|
-
| **Redaction** | Only values substituted from `secrets/` refs,
|
|
586
|
+
| **Redaction** | Only values akm knows are secret are scrubbed from stdout, stderr, diagnostics and the journal: values substituted from `secrets/` refs, secret-shaped run params, connection keys, and the values of credential-named variables the command inherited from akm's environment (names such as `*_API_KEY`, `*_TOKEN`, `*_SECRET` and `*_PASSWORD`, eight characters or more). Configuration, such as a URL bound through an env asset or an ordinary inherited variable, is not. |
|
|
585
587
|
|
|
586
588
|
#### What is frozen, and what is found at dispatch
|
|
587
589
|
|
|
@@ -696,8 +698,10 @@ is exactly what makes a `test` step a **gate**. With `on_error: continue` the
|
|
|
696
698
|
failure is recorded in the step's evidence and the completion gate decides.
|
|
697
699
|
|
|
698
700
|
On timeout or cancellation the child's whole **process group** gets a
|
|
699
|
-
SIGTERM→SIGKILL ladder
|
|
700
|
-
|
|
701
|
+
SIGINT→SIGTERM→SIGKILL ladder (each signal after a grace period of 5 seconds, for
|
|
702
|
+
a command still running), so a command that spawned its own children does not
|
|
703
|
+
leave them orphaned. Windows has no process group; there the first signal ends
|
|
704
|
+
the command itself.
|
|
701
705
|
|
|
702
706
|
### Output limits
|
|
703
707
|
|
|
@@ -779,7 +783,7 @@ Where those numbers come from:
|
|
|
779
783
|
- **macOS** has no per-string cap; its binding constraint is `ARG_MAX`
|
|
780
784
|
(262 144 bytes) over `argv` + `environ` *combined*. The 128 KiB total keeps
|
|
781
785
|
akm's own contribution to half of that, leaving the rest for the argv, the
|
|
782
|
-
environment
|
|
786
|
+
rest of the environment and your `env:` bindings.
|
|
783
787
|
- **Windows** caps a single user-defined environment variable at 32 767
|
|
784
788
|
characters (`SetEnvironmentVariable`), and the environment block has limits of
|
|
785
789
|
the same order.
|
|
@@ -823,50 +827,32 @@ command would have to handle both shapes, and the spill file would have to be
|
|
|
823
827
|
placed and cleaned up. A stable contract plus
|
|
824
828
|
an explicit error is the smaller, more predictable surface.
|
|
825
829
|
|
|
826
|
-
### The child's environment
|
|
830
|
+
### The child's environment
|
|
827
831
|
|
|
828
|
-
An exec unit's command
|
|
829
|
-
|
|
832
|
+
An exec unit's command inherits the environment akm runs in, as a command typed in
|
|
833
|
+
your shell would, and nothing is filtered out of it: `PATH`, `HOME`, locale and
|
|
834
|
+
toolchain variables, and any credential or proxy setting of the process that ran
|
|
835
|
+
`akm workflow run` reach the command. It is built in three layers, in this order:
|
|
830
836
|
|
|
831
|
-
1. akm's own
|
|
832
|
-
from akm's own environment (plus any names the unit adds with `pass_env:`);
|
|
837
|
+
1. akm's own environment, with the directories this akm resolved set over it;
|
|
833
838
|
2. the unit's resolved **`env:` bindings**;
|
|
834
839
|
3. the engine-authored **`AKM_*` context** — last, so a binding can never
|
|
835
840
|
shadow it.
|
|
836
841
|
|
|
837
|
-
The
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
| Group | Names | Why |
|
|
841
|
-
| --- | --- | --- |
|
|
842
|
-
| Command resolution | `PATH` | without it only an absolute `command[0]` can be spawned |
|
|
843
|
-
| Home | `HOME` | the config/cache root git, npm, bun, cargo and ssh all read |
|
|
844
|
-
| Identity | `USER`, `LOGNAME`, `SHELL` | read by git/ssh and by tools that re-exec a login shell |
|
|
845
|
-
| Locale | `LANG`, `LC_ALL`, `LC_CTYPE` | without a locale, non-ASCII stdout — *which is this unit's artifact* — gets mangled |
|
|
846
|
-
| Terminal / clock | `TERM`, `TZ` | some CLIs abort with no `TERM`; `TZ` keeps printed timestamps stable |
|
|
847
|
-
| Scratch space | `TMPDIR`, `TEMP`, `TMP` | POSIX and Windows temp roots |
|
|
848
|
-
| Windows essentials | `SystemRoot`, `SystemDrive`, `WINDIR`, `COMSPEC`, `PATHEXT` | Windows **process creation itself** fails with an empty environment; `PATHEXT` is what makes `bun.exe`/`bun.cmd` resolvable at all |
|
|
849
|
-
| Windows home/config | `USERPROFILE`, `HOMEDRIVE`, `HOMEPATH`, `APPDATA`, `LOCALAPPDATA`, `ProgramData`, `ProgramFiles` | the Windows analogues of `HOME` and the machine-wide install roots toolchain shims resolve against |
|
|
850
|
-
| akm provenance | `AKM_EVENT_SOURCE` | a command that calls `akm` records machine traffic, not user demand |
|
|
851
|
-
|
|
852
|
-
`PATH` is additionally supplemented with well-known user binary directories
|
|
853
|
-
when akm is running in a scheduler context (cron/launchd/Task Scheduler) that
|
|
854
|
-
stripped it — the same treatment an agent-harness child gets.
|
|
855
|
-
|
|
856
|
-
The child also gets akm's own directories, whatever the parent found them
|
|
857
|
-
through: `AKM_CONFIG_DIR`, `AKM_DATA_DIR`, `AKM_CACHE_DIR` and `AKM_STATE_DIR` are
|
|
858
|
-
set to the directories the akm that started it resolved (from `AKM_*_DIR`,
|
|
859
|
-
`XDG_*_HOME` or the platform default), and `AKM_BUNDLE_DIR` is passed when that
|
|
842
|
+
The directories are `AKM_CONFIG_DIR`, `AKM_DATA_DIR`, `AKM_CACHE_DIR` and
|
|
843
|
+
`AKM_STATE_DIR`, set to the ones the akm that started the command resolved (from
|
|
844
|
+
`AKM_*_DIR`, `XDG_*_HOME` or the platform default), and `AKM_BUNDLE_DIR` when that
|
|
860
845
|
akm had one. A step that runs `akm` therefore uses the same bundle, config, data,
|
|
861
|
-
cache and state
|
|
862
|
-
|
|
846
|
+
cache and state. Binding one of them in `env:` overrides it. When a scheduled
|
|
847
|
+
task runs the workflow, `AKM_EVENT_SOURCE` is set (when the environment has
|
|
848
|
+
none), so a command that calls `akm` records machine traffic, not user demand; a
|
|
849
|
+
direct `akm workflow run` leaves it as it found it.
|
|
863
850
|
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
name a non-secret per-machine variable with `pass_env:`.
|
|
851
|
+
Reach a fixed value or a secret with an exact named `env:` binding; what is
|
|
852
|
+
redacted from what the command prints is in the Redaction row of [the exec
|
|
853
|
+
contract](#the-exec-contract).
|
|
868
854
|
|
|
869
|
-
#### `pass_env:` —
|
|
855
|
+
#### `pass_env:` — frozen, and it selects nothing
|
|
870
856
|
|
|
871
857
|
```yaml
|
|
872
858
|
unit:
|
|
@@ -875,13 +861,11 @@ name a non-secret per-machine variable with `pass_env:`.
|
|
|
875
861
|
pass_env: [CARGO_HOME, SCCACHE_DIR]
|
|
876
862
|
```
|
|
877
863
|
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
Values passed through this way are **not** redacted from the command's output
|
|
884
|
-
the way a secret bound through `env:` is, so never list a credential here.
|
|
864
|
+
`pass_env:` was the list of variable names an earlier release copied into a child
|
|
865
|
+
that started empty. A workflow that has it keeps loading, and the names are kept
|
|
866
|
+
in the frozen plan and in the unit's input hash, but they select nothing now: the
|
|
867
|
+
command already has the environment. Names only, matching
|
|
868
|
+
`^[A-Za-z_][A-Za-z0-9_]*$`.
|
|
885
869
|
|
|
886
870
|
#### Binding a secret to a unit
|
|
887
871
|
|
|
@@ -930,18 +914,18 @@ env asset:
|
|
|
930
914
|
or a channel id, reaches the journal and the next step unredacted. A
|
|
931
915
|
credential typed straight into an env file is not redacted, so keep
|
|
932
916
|
credentials in `secrets/` and bind them with a `${secrets/name}` token.
|
|
933
|
-
- `env:` needs a child process: it works on exec units and on
|
|
934
|
-
|
|
935
|
-
`env_unsupported`.
|
|
917
|
+
- `env:` needs a child process: it works on exec units and on every unit that
|
|
918
|
+
runs an agent, whether on a harness or on akm's own runtime. A model call that
|
|
919
|
+
runs no agent cannot take a per-unit environment and fails `env_unsupported`.
|
|
936
920
|
|
|
937
|
-
#### Durable v4 (`irVersion:
|
|
921
|
+
#### Durable v4 (`irVersion: 8`) forbids `inherit_env`
|
|
938
922
|
|
|
939
923
|
Every new workflow start freezes the durable plan v4 family's current
|
|
940
|
-
executable format (`irVersion:
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
924
|
+
executable format (`irVersion: 8`; a plan frozen earlier decodes when it holds no
|
|
925
|
+
model step). It rejects
|
|
926
|
+
`inherit_env: true`, which is not needed: the command inherits akm's
|
|
927
|
+
environment. Exact named `env:` bindings are dispatch-significant and form part
|
|
928
|
+
of the unit's input hash.
|
|
945
929
|
|
|
946
930
|
The historical `inherit_env` spelling is unsupported.
|
|
947
931
|
|
|
@@ -949,8 +933,8 @@ The historical `inherit_env` spelling is unsupported.
|
|
|
949
933
|
|
|
950
934
|
`akm show <workflow> --format json` summarizes each step under
|
|
951
935
|
`steps[].orchestration`. For an exec step that summary carries an `exec` object
|
|
952
|
-
and **no `engine`/`model`** — an exec unit
|
|
953
|
-
workflow's `defaults
|
|
936
|
+
and **no `engine`/`model`** — an exec unit runs on no connection or harness, so
|
|
937
|
+
reporting the workflow's `defaults` there would describe a dispatch that never
|
|
954
938
|
happens. Field presence is the discriminator, the same way `fanOut` marks a
|
|
955
939
|
`map` step:
|
|
956
940
|
|
|
@@ -978,8 +962,8 @@ happens. Field presence is the discriminator, the same way `fanOut` marks a
|
|
|
978
962
|
step's output. Every byte is already visible in the workflow file (and stored
|
|
979
963
|
verbatim in `plan_json`) — which is also why you never inline a secret there.
|
|
980
964
|
- `cwd` and `passEnv` appear only when the unit declares them. `passEnv` is a
|
|
981
|
-
list of variable **names
|
|
982
|
-
carry `inheritEnv`.
|
|
965
|
+
list of variable **names** that select nothing; no value is ever projected. New
|
|
966
|
+
v4 plans never carry `inheritEnv`.
|
|
983
967
|
- `timeoutMs` is still reported, because an exec unit really does inherit
|
|
984
968
|
`defaults.timeout` — that number is true for it.
|
|
985
969
|
|
|
@@ -992,21 +976,12 @@ Exec units sit inside the existing workflow trust model — see
|
|
|
992
976
|
[Security: workflow sources are executed code](https://github.com/itlackey/akm/blob/main/docs/guides/run-workflows.md#security-workflow-sources-are-executed-code).
|
|
993
977
|
They do not widen it, and they do not narrow it:
|
|
994
978
|
|
|
995
|
-
- **The child's environment
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
exports tokens for unrelated services, and a third-party step that merely
|
|
1002
|
-
prints its environment, or a tool that ships one in a crash report, should
|
|
1003
|
-
not get them for free), it makes the environment surface **explicit and
|
|
1004
|
-
reviewable** (this list plus lines in the frontmatter diff, rather than
|
|
1005
|
-
"whatever the invoking shell happened to export"), and it **matches the
|
|
1006
|
-
convention akm already applies to spawned children** — agent-harness children
|
|
1007
|
-
have always been built from `envPassthrough` this way, and exec units now use
|
|
1008
|
-
the same mechanism rather than a second one. Operators who need a harder
|
|
1009
|
-
boundary still scope the *akm process* (dedicated account, ephemeral working
|
|
979
|
+
- **The child inherits akm's environment.** The command runs with your
|
|
980
|
+
environment, as if you had typed it in your shell, so a credential the shell or
|
|
981
|
+
CI job exported reaches it, and a value it inherited is not redacted from what
|
|
982
|
+
it prints. That is the same trust a workflow source already has: a command that
|
|
983
|
+
runs at all can read the same credentials off disk. Operators who need a
|
|
984
|
+
boundary scope the *akm process* (dedicated account, ephemeral working
|
|
1010
985
|
directory, external network/filesystem policy); that is the boundary that
|
|
1011
986
|
actually holds.
|
|
1012
987
|
- **Secrets come from `env:` bindings by name.** The frozen plan carries only
|
|
@@ -1062,18 +1037,16 @@ Raising one never raises the others:
|
|
|
1062
1037
|
| --- | --- | --- |
|
|
1063
1038
|
| `map.concurrency` | the step | `workflow.defaultMapConcurrency`, else **4** |
|
|
1064
1039
|
| `execution.maxConcurrency` | `workflow.maxConcurrency` config | CPU-derived `min(16, max(1, cores − 2))` |
|
|
1065
|
-
| the selected
|
|
1040
|
+
| the selected connection's concurrency | `connections.<name>.concurrency` | **1** for a loopback endpoint, **4** for a remote one |
|
|
1066
1041
|
| the host CPU safety cap | nothing — reapplied at dispatch | `min(16, max(1, cores − 2))` |
|
|
1067
1042
|
|
|
1068
|
-
The
|
|
1043
|
+
The connection limit is per **endpoint kind** on purpose. A local model server (LM
|
|
1069
1044
|
Studio, Ollama) has one loaded model, and concurrent inference makes it reload
|
|
1070
1045
|
and return HTTP 500 — a hard failure, so loopback endpoints stay at 1 and a
|
|
1071
1046
|
`map` against a local model is still effectively serial unless you raise
|
|
1072
|
-
`
|
|
1047
|
+
`connections.<name>.concurrency` yourself. Remote providers fail softly (a
|
|
1073
1048
|
retryable 429), and four concurrent completions is well inside any hosted
|
|
1074
|
-
provider's entry tier.
|
|
1075
|
-
except an `opencode-sdk` engine that sets `llmEngine`, which inherits that
|
|
1076
|
-
fallback engine's limit.
|
|
1049
|
+
provider's entry tier. A harness carries no concurrency limit of its own.
|
|
1077
1050
|
|
|
1078
1051
|
#### What counts as a loopback endpoint
|
|
1079
1052
|
|
|
@@ -1095,15 +1068,15 @@ exactly as single-model as one on `127.0.0.1`.
|
|
|
1095
1068
|
re-serializes the dotted form to the hex one before the check ever sees it. A
|
|
1096
1069
|
mapped public address such as `[::ffff:8.8.8.8]` still reads as remote. The
|
|
1097
1070
|
deprecated IPv4-compatible form `[::127.0.0.1]` is not recognized; if you use
|
|
1098
|
-
it, set `
|
|
1071
|
+
it, set `connections.<name>.concurrency: 1`.
|
|
1099
1072
|
|
|
1100
1073
|
The check is **purely syntactic — it never resolves a name.** A frozen plan has
|
|
1101
1074
|
to come out the same on your laptop, on CI, and on a machine with no network at
|
|
1102
1075
|
all, and a DNS lookup would make the frozen width depend on what a resolver
|
|
1103
1076
|
happened to answer. So a *name* that resolves to loopback (a hosts-file alias,
|
|
1104
1077
|
`host.docker.internal`, an internal DNS record) is treated as **remote**; point
|
|
1105
|
-
the
|
|
1106
|
-
explicitly. In the other direction the classification is deliberately
|
|
1078
|
+
the connection's endpoint at the address itself, or set
|
|
1079
|
+
`connections.<name>.concurrency: 1` explicitly. In the other direction the classification is deliberately
|
|
1107
1080
|
conservative: an endpoint akm cannot parse at all is treated as loopback, since
|
|
1108
1081
|
freezing 4 for a config it does not understand is the failure worth avoiding.
|
|
1109
1082
|
|
|
@@ -1177,17 +1150,17 @@ verdict that cannot change. So a step whose unit is `exec:` still has its
|
|
|
1177
1150
|
artifact judged and can still be failed by the verdict; a rejection simply lands
|
|
1178
1151
|
on the first evaluation, carrying the same missing criteria and feedback the
|
|
1179
1152
|
one-shot case does. `gate.max_loops` on such a step is capped at 1 rather than
|
|
1180
|
-
rejected, and
|
|
1153
|
+
rejected, and a model step's declared `max_loops` is untouched. This is the
|
|
1181
1154
|
same reasoning that makes an exec unit's `output:` schema miss fail without a
|
|
1182
1155
|
corrective re-dispatch.
|
|
1183
1156
|
|
|
1184
1157
|
**Fail-closed verification.** With no non-empty `### gate` rubric, no
|
|
1185
|
-
verification runs. When a rubric is present, the workflow requires
|
|
1186
|
-
|
|
1187
|
-
|
|
1158
|
+
verification runs. When a rubric is present, the workflow requires a
|
|
1159
|
+
connection or a harness to judge it before the plan can be frozen: the judge
|
|
1160
|
+
runs where model work runs (the default connection, else the default harness; see
|
|
1161
|
+
[Where each process runs](configuration.md#where-each-process-runs)) — see
|
|
1188
1162
|
[Author's Guide: Troubleshooting](https://github.com/itlackey/akm/blob/main/docs/guides/author-workflows.md#troubleshooting)
|
|
1189
|
-
if
|
|
1190
|
-
the run.
|
|
1163
|
+
if neither is configured yet. That verifier invocation is frozen into the run.
|
|
1191
1164
|
|
|
1192
1165
|
Only a well-formed `complete: true` verdict advances a criteria-bearing step.
|
|
1193
1166
|
A missing verifier, dispatch failure, or malformed result rejects the gate
|
|
@@ -1204,33 +1177,32 @@ across resumes**, not just the current invocation. Hitting a ceiling aborts
|
|
|
1204
1177
|
the step's still-pending dispatches and fails the step with a
|
|
1205
1178
|
`budget exceeded (<which> ceiling)` summary — budget exhaustion is a hard
|
|
1206
1179
|
stop that ignores `on_error: continue`. Because the plan is frozen, raising a
|
|
1207
|
-
budget means starting a new run.
|
|
1180
|
+
budget means starting a new run. Only units that run on akm's own runtime
|
|
1181
|
+
report token usage; a unit on a harness or a direct model call reports none
|
|
1182
|
+
and adds nothing to `max_tokens`.
|
|
1208
1183
|
|
|
1209
1184
|
## Model references
|
|
1210
1185
|
|
|
1211
1186
|
Reference semantic aliases in `model:` fields instead of exact model ids so a
|
|
1212
|
-
workflow stays
|
|
1213
|
-
|
|
1187
|
+
workflow stays portable across machines. The standard aliases are `fast`,
|
|
1188
|
+
`balanced` and `reasoning`; each connection and harness says which of its models
|
|
1189
|
+
answers them (`connections.<name>.models`, `harnesses.<name>.models`; Claude Code
|
|
1190
|
+
ships a map of its own):
|
|
1214
1191
|
|
|
1215
|
-
```
|
|
1216
|
-
{
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
"reasoning": { "claude": "claude-opus-4-7", "opencode": "opencode/claude-opus-4-7" }
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1192
|
+
```yaml
|
|
1193
|
+
defaults: { model: balanced }
|
|
1194
|
+
steps:
|
|
1195
|
+
- id: review
|
|
1196
|
+
unit:
|
|
1197
|
+
model: reasoning
|
|
1224
1198
|
```
|
|
1225
1199
|
|
|
1226
|
-
Resolution
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
configured for the selected engine, with no workflow-authored change. See the [Author's Guide](https://github.com/itlackey/akm/blob/main/docs/guides/author-workflows.md#choosing-engines-and-models)
|
|
1233
|
-
for guidance on which tier to pick per step.
|
|
1200
|
+
Resolution looks the alias up on the connection or harness the step runs on. A
|
|
1201
|
+
string that is not an alias is an exact model name and is used as written. An
|
|
1202
|
+
alias the connection does not map answers with that connection's first model; a
|
|
1203
|
+
harness with no model for it passes none and uses its own default. See
|
|
1204
|
+
[Aliases](configuration.md#aliases) for the full rules and the author's guide
|
|
1205
|
+
for [which tier to pick per step](https://github.com/itlackey/akm/blob/main/docs/guides/author-workflows.md#choosing-where-a-step-runs-and-which-model).
|
|
1234
1206
|
|
|
1235
1207
|
## See also
|
|
1236
1208
|
|
|
@@ -11,9 +11,7 @@ interruption without replaying completed units.
|
|
|
11
11
|
|
|
12
12
|
Workflows are one of the execution surfaces AKM directly orchestrates: AKM
|
|
13
13
|
retrieves every supported capability type, but a workflow's declared steps —
|
|
14
|
-
not arbitrary indexed content — are what actually gets dispatched.
|
|
15
|
-
[Architecture: Core Principles](https://github.com/itlackey/akm/blob/main/docs/architecture/akm-core-principles.md) for
|
|
16
|
-
that boundary.
|
|
14
|
+
not arbitrary indexed content — are what actually gets dispatched.
|
|
17
15
|
|
|
18
16
|
This page is a short map. The full contract now lives across four pages,
|
|
19
17
|
split by what you're doing:
|
|
@@ -24,8 +22,8 @@ split by what you're doing:
|
|
|
24
22
|
someone else's bundle.
|
|
25
23
|
- **[Author's Guide: Writing Workflows](https://github.com/itlackey/akm/blob/main/docs/guides/author-workflows.md)** —
|
|
26
24
|
writing and testing a workflow definition: choosing a source format, the Markdown structure, a
|
|
27
|
-
minimal complete example, common authoring mistakes, choosing
|
|
28
|
-
|
|
25
|
+
minimal complete example, common authoring mistakes, choosing where a step
|
|
26
|
+
runs and which model, and troubleshooting a missing harness or connection.
|
|
29
27
|
- **[Workflow Schema](../reference/workflow-schema.md)** — the exhaustive,
|
|
30
28
|
authoritative reference: every frontmatter key, the bare-reference grammar,
|
|
31
29
|
failure policy, gates, and budget ceilings, with exact syntax.
|
|
@@ -41,7 +39,7 @@ For task- or schedule-driven workflow runs — an `akm task` bound to
|
|
|
41
39
|
|
|
42
40
|
Markdown `.md` is the one workflow source format; it preserves AKM's full prose,
|
|
43
41
|
gates, maps, typed artifacts, and exec vocabulary. New starts resolve source
|
|
44
|
-
owners and executable targets, then freeze durable plan `irVersion`
|
|
42
|
+
owners and executable targets, then freeze durable plan `irVersion` 8. A
|
|
45
43
|
stored plan is read back as it is: one frozen at another `irVersion` that
|
|
46
44
|
still decodes runs, and one this akm cannot decode is abandoned by
|
|
47
45
|
`akm workflow run` with a message naming how to start a new run. See
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.261014-beta",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cursor.",
|
|
6
6
|
"keywords": [
|
|
@@ -34,10 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"license": "MPL-2.0",
|
|
36
36
|
"pinNotes": {
|
|
37
|
-
"@opencode-ai/sdk@1.2.20": "Exact pin. The SDK surface we use (createOpencodeClient + session.create/prompt/delete in src/integrations/harnesses/opencode-sdk/sdk-runner.ts) is stable across 1.x, but the SDK has shipped 5+ minor versions of unrelated provider/registry churn. akm-cli is a global CLI install so the pin is isolated from user-project deps. Re-test sdk-runner before bumping. Note this package is an HTTP client only — it declares no dependencies and its own createOpencodeServer spawns `opencode serve` — so it does NOT make the opencode binary available; that install is separate and is what every SDK-path probe checks for.",
|
|
38
|
-
"@opencode/client@2.0.26": "Exact pin. The OpenCode 2 wire client (OpenCode.make + session.create/prompt/wait/interrupt, event.subscribe, permission.reply) used by src/integrations/harnesses/opencode-sdk/v2-adapter.ts, the default adapter. It is an HTTP client for a private `opencode serve` child akm spawns; it does not install the opencode binary and must never pull in `opencode-ai` or `@opencode/cli`. Re-run the gated real-binary test (AKM_OPENCODE_V2_BIN) before bumping.",
|
|
39
37
|
"better-sqlite3@12.11.1": "Exact pin (#790). This is the SQLite driver akm loads on Node (src/storage/database.ts); Bun never touches it. The pin is about PREBUILT BINARIES, not API surface. better-sqlite3 ships one prebuild per Node ABI as a GitHub release asset and its install script is `prebuild-install || node-gyp rebuild` — so any (version, Node ABI) pair with no prebuild silently COMPILES FROM SOURCE against the headers of whatever Node is on the machine that day. The 11.x line predates Node 24 and declares no `engines` at all: its newest release (11.10.0, 2025-05-08) publishes ABI 108/115/127/131 (Node 18/20/22/23) and nothing for ABI 137 (Node 24). Node 24.19.0 then changed the public `node_object_wrap.h` so `node::ObjectWrap`'s ctor/dtor register and unregister an environment cleanup hook; a from-source 11.x build against those headers aborts at teardown in `Statement::~Statement()` with `RemoveEnvironmentCleanupHook ... Assertion (env) != nullptr`, intermittently, depending on GC timing. 12.11.1 publishes ABI 127/137/141/147 (Node 22/24/25/26) and declares `engines: 20.x || 22.x || 23.x || 24.x || 25.x || 26.x`, so every Node akm supports installs a prebuilt binary and never compiles. Before bumping: confirm the target version publishes a prebuild for EVERY Node major in `engines` (probe https://github.com/WiseLibs/better-sqlite3/releases/download/vX.Y.Z/better-sqlite3-vX.Y.Z-node-vABI-linux-x64.tar.gz), not just that the version is newer. 13.x is the eventual destination — it moved to node-addon-api/N-API with prebuilds bundled in the npm tarball and no install script, which retires this failure mode entirely — but it is a fresh major rewrite of the binding, so it wants its own soak, not a patch release. The CI node-smoke job installs this exact string by reading it back out of this file (.github/workflows/ci.yml), so the two cannot drift.",
|
|
40
|
-
"@huggingface/
|
|
38
|
+
"@huggingface/tokenizers@0.1.3": "Exact pin: the tokenizer of the local embedding model (src/llm/embedders/local.ts). Pure JS with no dependencies. A different release can change the token ids and with them every stored vector, so re-run the real-model semantic gate (tests/integration/semantic-search-e2e.test.ts, which compares the vectors with tests/fixtures/embedder-reference-vectors.json) before changing it.",
|
|
39
|
+
"onnxruntime-node@1.24.3": "Exact pin: the local embedding runtime. The standalone binary embeds this version's native library from node_modules/onnxruntime-node/bin/napi-v6/ (src/standalone/native/) and its addon is bound to exactly that library, so a bump moves this pin, the library file names in src/standalone/native/ (the macOS one carries the version), the list of platforms it ships a library for in src/llm/embedders/local.ts and the real-model semantic gate together.",
|
|
40
|
+
"ajv@8.20.0": "Exact pin (devDependency, used only by tests: tests/tasks-schema.test.ts validates task sources against schemas/akm-task.json, tests/contracts/config-schema-drift.test.ts checks schemas/akm-config.json). Pinned in 4d7d77992 without a recorded reason; keep exact until the pin is next reviewed.",
|
|
41
|
+
"cmd-shim@9.0.2": "Exact pin (devDependency), from cd5a3be12 \"pin cmd-shim for launcher tests\": tests/integration/install/package-launcher.test.ts writes the Windows shims npm would write with this package, where it used to load the copy inside the installed npm's own node_modules. That commit records no reason for an exact version over a range; keep exact until the pin is next reviewed."
|
|
41
42
|
},
|
|
42
43
|
"files": [
|
|
43
44
|
"dist",
|
|
@@ -46,7 +47,6 @@
|
|
|
46
47
|
"SECURITY.md",
|
|
47
48
|
"STABILITY.md",
|
|
48
49
|
"LICENSE",
|
|
49
|
-
"ROADMAP.md",
|
|
50
50
|
"docs/agents",
|
|
51
51
|
"docs/architecture",
|
|
52
52
|
"docs/guides",
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"docs/posts",
|
|
57
57
|
"docs/reference",
|
|
58
58
|
"docs/product-surface.md",
|
|
59
|
-
"docs/plans/0.9.2-agent-command-workflow-plan.md",
|
|
60
59
|
"schemas"
|
|
61
60
|
],
|
|
62
61
|
"exports": {
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
"build": "rm -rf dist && bun scripts/gen-config-schema.ts &&bun run tsc --project ./tsconfig.build.json && bun scripts/copy-assets.ts && bun scripts/fix-esm-extensions.ts",
|
|
78
77
|
"check": "bun run lint && bunx tsc --noEmit && bun run test:unit && bun run test:integration",
|
|
79
78
|
"check:fast": "bun run lint && bunx tsc --noEmit && bun run test:unit",
|
|
80
|
-
"check:changed": "bun run lint && bunx tsc --noEmit && bun test tests/integration/output-baseline.test.ts tests/integration/registry-search.test.ts tests/integration/show-argv-entrypoint.test.ts tests/output-shapes-unit.test.ts",
|
|
79
|
+
"check:changed": "bun run lint && bunx tsc --noEmit && bun test tests/integration/output-baseline.test.ts tests/integration/registry/registry-search.test.ts tests/integration/show-argv-entrypoint.test.ts tests/output-shapes-unit.test.ts",
|
|
81
80
|
"sweep:tmp": "bun scripts/sweep-test-tmp.ts",
|
|
82
81
|
"test": "bash scripts/test-unit.sh",
|
|
83
82
|
"test:unit": "bash scripts/test-unit.sh",
|
|
@@ -87,7 +86,7 @@
|
|
|
87
86
|
"lint:doc-examples": "bun scripts/lint-doc-examples.ts",
|
|
88
87
|
"publish:devto": "npx -y @sinedied/devto-cli push \"docs/posts/**/*.md\" --token \"$DEVTO_TOKEN\" --repo \"$GITHUB_REPOSITORY\" --branch \"${GITHUB_REF_NAME:-main}\" --reconcile",
|
|
89
88
|
"release:check": "./tests/release-check.sh",
|
|
90
|
-
"lint": "bunx biome check src/ tests/ scripts/ && bun scripts/lint-secret-resolver-boundary.ts && bun scripts/lint-shipped-assets.ts && bun scripts/lint-doc-examples.ts",
|
|
89
|
+
"lint": "bunx biome check src/ tests/ scripts/ && bun scripts/lint-secret-resolver-boundary.ts && bun scripts/lint-shipped-assets.ts && bun scripts/lint-doc-examples.ts && bun scripts/lint-lockfile.ts",
|
|
91
90
|
"lint:fix": "bunx biome check --write src/ tests/ scripts/",
|
|
92
91
|
"format": "bunx biome format --write src/ tests/ scripts/",
|
|
93
92
|
"prepublishOnly": "cp .github/README.npm.md README.md && bun run build",
|
|
@@ -118,14 +117,13 @@
|
|
|
118
117
|
},
|
|
119
118
|
"dependencies": {
|
|
120
119
|
"@clack/prompts": "^1.3.0",
|
|
121
|
-
"@huggingface/
|
|
122
|
-
"@opencode-ai/sdk": "1.2.20",
|
|
123
|
-
"@opencode/client": "2.0.26",
|
|
120
|
+
"@huggingface/tokenizers": "0.1.3",
|
|
124
121
|
"citty": "^0.2.2",
|
|
125
122
|
"dotenv": "^17.4.2",
|
|
126
123
|
"fast-xml-parser": "^5.10.1",
|
|
127
124
|
"marked": "^18.1.1",
|
|
128
125
|
"node-html-parser": "^9.0.1",
|
|
126
|
+
"onnxruntime-node": "1.24.3",
|
|
129
127
|
"semver": "^7.6.0",
|
|
130
128
|
"turndown": "^7.2.4",
|
|
131
129
|
"yaml": "^2.8.4",
|