akm-cli 0.10.261012-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 +710 -3
- package/README.md +15 -0
- package/SECURITY.md +11 -10
- package/STABILITY.md +47 -51
- package/dist/assets/hints/cli-hints-full.md +21 -19
- package/dist/assets/hints/cli-hints-short.md +3 -4
- 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/command/execution-source-loader.js +10 -14
- 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-binding.js +47 -58
- package/dist/commands/env/env-cli.js +22 -24
- package/dist/commands/env/env.js +10 -58
- package/dist/commands/env/secret-cli.js +11 -29
- package/dist/commands/env/secret.js +3 -10
- 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/scheduler-binary.js +1 -1
- 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 -17
- package/dist/commands/improve/eligibility.js +1 -3
- 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/env-key-rules.js +7 -6
- package/dist/commands/lint/index.js +3 -3
- 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 +3 -6
- 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 +6 -29
- package/dist/commands/remember.js +25 -40
- package/dist/commands/sources/add-cli.js +8 -63
- package/dist/commands/sources/bundle-cli.js +8 -9
- 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 +119 -63
- 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 -10
- package/dist/commands/sources/source-add.js +2 -2
- package/dist/commands/sources/source-clone.js +31 -7
- package/dist/commands/sources/source-manage.js +4 -4
- package/dist/commands/targets.js +175 -0
- package/dist/commands/tasks/explain.js +104 -69
- package/dist/commands/tasks/tasks-cli.js +9 -11
- package/dist/commands/tasks/tasks.js +75 -97
- package/dist/commands/ui/api.js +11 -3
- package/dist/commands/ui/redact.js +5 -31
- package/dist/commands/ui/workspace-actions.js +1 -1
- package/dist/commands/workflow/plan.js +48 -9
- package/dist/commands/workflow-cli.js +40 -45
- package/dist/core/adapter/adapters/agent-skills-adapter.js +10 -11
- package/dist/core/adapter/adapters/akm-adapter.js +36 -41
- package/dist/core/adapter/adapters/akm-lint.js +10 -12
- package/dist/core/adapter/adapters/akm-metadata.js +2 -2
- package/dist/core/adapter/adapters/akm-task-adapter.js +8 -9
- 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 +7 -6
- 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/asset/resolve-ref.js +5 -0
- package/dist/core/bundle-rename.js +12 -4
- package/dist/core/closest-match.js +37 -0
- package/dist/core/common.js +37 -57
- 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 +438 -109
- 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 +42 -17
- package/dist/core/config/schema/search.js +6 -11
- package/dist/core/config/schema/sources-bundles.js +9 -9
- 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/env-secret-ref.js +84 -73
- package/dist/core/errors.js +10 -16
- 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 +33 -10
- package/dist/core/recognition-util.js +8 -10
- package/dist/core/redaction.js +94 -55
- package/dist/core/ref-token.js +82 -0
- package/dist/core/secret-value.js +14 -0
- 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/core/write-source.js +20 -4
- 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 +46 -42
- package/dist/indexer/installations.js +12 -22
- package/dist/indexer/lookup/adapter-concept-owner.js +40 -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 +9 -11
- package/dist/indexer/search/db-search.js +9 -7
- package/dist/indexer/search/search-source.js +42 -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/path-resolver.js +13 -68
- package/dist/indexer/walk/walker.js +32 -26
- 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 +156 -181
- package/dist/integrations/agent/runner.js +20 -70
- 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 -23
- 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 -8
- package/dist/output/shapes/helpers.js +18 -44
- package/dist/output/shapes/passthrough.js +1 -0
- package/dist/output/shapes.js +1 -7
- package/dist/output/text/command-format.js +41 -39
- 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-directives.js +16 -28
- 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 +44 -15
- 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 +47095 -44905
- package/dist/scripts/akm-migrate.js +46946 -44755
- 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/tasks.js +1 -2
- 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 +13 -5
- package/dist/sources/resolve.js +12 -16
- package/dist/sources/snapshot-fetchers/robots.js +11 -12
- package/dist/sources/snapshot-fetchers/secret-seam.js +2 -4
- package/dist/sources/snapshot-fetchers/website-ingest.js +8 -15
- package/dist/sources/snapshot-fetchers/x.js +1 -1
- 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/proposals-repository.js +2 -2
- package/dist/storage/repositories/task-history-repository.js +2 -2
- package/dist/storage/repositories/workflow-runs-repository.js +44 -129
- package/dist/storage/sqlite-read-snapshot.js +33 -29
- package/dist/tasks/embedded.js +1 -1
- package/dist/tasks/log-redaction.js +7 -119
- package/dist/tasks/prepare/prepare-support.js +8 -7
- package/dist/tasks/prepare/prepare.js +8 -9
- package/dist/tasks/prepare/script-capture.js +9 -25
- package/dist/tasks/run/attempt-lifecycle.js +17 -35
- package/dist/tasks/run/load-task.js +54 -27
- package/dist/tasks/run/run-command-task.js +15 -10
- package/dist/tasks/run/run-native-task.js +8 -21
- package/dist/tasks/run/run-task.js +5 -8
- package/dist/tasks/run/run-workflow-task.js +14 -21
- 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/scheduler-sync.js +0 -1
- package/dist/tasks/source/bounded-document.js +31 -117
- package/dist/tasks/source/parse-task-source.js +0 -1
- 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 +48 -72
- 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/compile.js +1 -15
- package/dist/workflows/concurrency-policy.js +4 -4
- package/dist/workflows/exec/child-workflow.js +1 -4
- package/dist/workflows/exec/dispatch-redaction.js +35 -86
- package/dist/workflows/exec/environment.js +13 -77
- package/dist/workflows/exec/exec-unit.js +14 -55
- package/dist/workflows/exec/frozen-judge.js +26 -28
- package/dist/workflows/exec/native-executor.js +126 -71
- package/dist/workflows/exec/run-workflow.js +38 -42
- package/dist/workflows/exec/step-work.js +13 -17
- package/dist/workflows/exec/unit-dispatch.js +7 -21
- package/dist/workflows/freeze/environment.js +14 -119
- package/dist/workflows/freeze/freeze.js +14 -33
- package/dist/workflows/freeze/step-values.js +6 -13
- package/dist/workflows/freeze/targets/child-workflow.js +3 -5
- package/dist/workflows/freeze/targets/command.js +9 -15
- package/dist/workflows/freeze/targets/shell.js +0 -3
- package/dist/workflows/freeze/task-bindings.js +0 -1
- package/dist/workflows/parser.js +50 -59
- package/dist/workflows/plan.js +8 -2
- package/dist/workflows/renderer.js +83 -9
- package/dist/workflows/resource-limits.js +2 -2
- package/dist/workflows/runtime/run-plan.js +38 -23
- package/dist/workflows/runtime/runs.js +55 -93
- package/dist/workflows/runtime/workflow-asset-loader.js +55 -86
- package/dist/workflows/source-files.js +7 -19
- 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 +283 -99
- 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 +48 -15
- package/docs/architecture/persisted-data-compat.md +10 -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 +172 -52
- package/docs/architecture/workflow-engine.md +51 -34
- package/docs/guides/README.md +0 -1
- package/docs/guides/author-bundles.md +15 -20
- package/docs/guides/author-workflows.md +93 -71
- package/docs/guides/bundles.md +20 -16
- 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 +29 -20
- 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 +2 -6
- package/docs/maintainers/release-checklist.md +73 -126
- 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 +300 -60
- 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 +477 -388
- package/docs/reference/configuration.md +569 -550
- package/docs/reference/data-and-telemetry.md +9 -6
- package/docs/reference/env-and-secrets.md +72 -15
- package/docs/reference/refs.md +3 -20
- package/docs/reference/registry.md +12 -38
- package/docs/reference/supported-formats.md +1 -1
- package/docs/reference/tasks.md +22 -11
- package/docs/reference/ui-api.md +14 -9
- package/docs/reference/workflow-schema.md +199 -154
- package/docs/reference/workflows.md +4 -6
- package/package.json +9 -11
- package/schemas/akm-config.json +1696 -2922
- package/schemas/akm-task.json +4 -4
- 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/commands/sources/dangerous-env-audit.js +0 -134
- package/dist/core/activation-policy.js +0 -67
- 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/execution/directory-identity.js +0 -78
- 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 -333
- 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/authoring/scope-key.js +0 -79
- package/dist/workflows/exec/lowering-notices.js +0 -23
- package/dist/workflows/source-semantics.js +0 -110
- 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 -550
- 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 -189
- 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 -3411
- package/docs/architecture/testing/okf-v0.2-conformance-runbook.md +0 -924
- package/docs/architecture/testing/task-workflow-manual-tests.md +0 -1720
- 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
package/README.md
CHANGED
|
@@ -40,6 +40,21 @@ prefers Bun for execution; old, unusable, or absent Bun installations fall
|
|
|
40
40
|
back to Node.js. Node.js remains required for the npm package. The standalone
|
|
41
41
|
binaries are runtime-free.
|
|
42
42
|
|
|
43
|
+
Local semantic search runs its embedding model on ONNX Runtime
|
|
44
|
+
(`onnxruntime-node`). A standalone binary carries the library for its platform
|
|
45
|
+
and copies it once into akm's cache (18 to 34 MB); a `noexec` temp directory
|
|
46
|
+
blocks a standalone binary's semantic search (keyword search still works), so
|
|
47
|
+
set `TMPDIR` to a writable, executable one.
|
|
48
|
+
Alpine/musl and Intel macOS have no native ONNX Runtime, so semantic search is
|
|
49
|
+
unavailable there and keyword search works. See
|
|
50
|
+
[Getting Started](https://akm.fwdslsh.dev/docs/guides/getting-started/#standalone-binary-and-semantic-search).
|
|
51
|
+
|
|
52
|
+
With a connection and no harness, agent work runs on akm's own runtime, a pinned
|
|
53
|
+
OpenCode 2 binary. The first time it runs, akm downloads that binary from the npm
|
|
54
|
+
registry (about 114 MB, once) into its cache; on Alpine/musl it needs `libstdc++`
|
|
55
|
+
and `libgcc` (the Alpine Node image has them). See
|
|
56
|
+
[Getting Started](https://akm.fwdslsh.dev/docs/guides/getting-started/#akms-own-agent-runtime).
|
|
57
|
+
|
|
43
58
|
## Quick Start
|
|
44
59
|
|
|
45
60
|
```sh
|
package/SECURITY.md
CHANGED
|
@@ -43,8 +43,8 @@ bugs, but you should be aware of them:
|
|
|
43
43
|
Workflow steps run in your shell with your PATH and your environment
|
|
44
44
|
variables — including any secrets you have exported or loaded via
|
|
45
45
|
`akm env run` / `akm secret run`. **Only add workflow sources you trust.** See
|
|
46
|
-
[`docs/
|
|
47
|
-
code"](docs/
|
|
46
|
+
[`docs/guides/run-workflows.md` — "Security: workflow sources are executed
|
|
47
|
+
code"](docs/guides/run-workflows.md#security-workflow-sources-are-executed-code)
|
|
48
48
|
for the full discussion.
|
|
49
49
|
|
|
50
50
|
### Scripts execute shell commands
|
|
@@ -75,8 +75,8 @@ The built-in YouTube snapshot fetcher (`src/sources/snapshot-fetchers/youtube.ts
|
|
|
75
75
|
and `<stash>/secrets/`. They are protected against other local users by
|
|
76
76
|
filesystem permissions but are not encrypted at rest. Do not commit these
|
|
77
77
|
files to source control. Normal `akm env` and `akm secret` output never echoes
|
|
78
|
-
values; materialize values only at the command boundary with `akm env run
|
|
79
|
-
|
|
78
|
+
values; materialize values only at the command boundary with `akm env run`
|
|
79
|
+
or `akm secret run`.
|
|
80
80
|
|
|
81
81
|
The knowledge graph extracted from your assets (entities/relations) lives
|
|
82
82
|
only in `$DATA/index.db` and is surfaced as aggregate counts via `akm health`
|
|
@@ -87,12 +87,13 @@ graph content to an arbitrary path.
|
|
|
87
87
|
|
|
88
88
|
`akm improve` (whose strategies run processes such as reflect, distill, and
|
|
89
89
|
consolidate) and `akm proposal new` can send asset frontmatter and body to the
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
LLM, your asset content goes to that third party
|
|
94
|
-
(
|
|
95
|
-
|
|
90
|
+
connection (or harness) selected by the command, strategy, or current defaults.
|
|
91
|
+
Connections live under `connections.<name>` in `~/.config/akm/config.json`,
|
|
92
|
+
with their keys in the environment or in `~/.config/akm/credentials.json`. If you
|
|
93
|
+
configure a third-party LLM, your asset content goes to that third party, and a
|
|
94
|
+
harness you enable (Claude Code, Codex, ...) sends it wherever it is configured
|
|
95
|
+
to. Use a local endpoint (for example, `http://localhost:11434/v1` via Ollama)
|
|
96
|
+
for assets containing secrets or private notes.
|
|
96
97
|
|
|
97
98
|
## Known non-issues
|
|
98
99
|
|
package/STABILITY.md
CHANGED
|
@@ -33,6 +33,29 @@ spelling is in the CHANGELOG entry and the CLI reference.
|
|
|
33
33
|
| `akm config path --all` | `akm info` |
|
|
34
34
|
| `--run` / `--since` on `akm improve` | `akm improve report --run` / `--since` |
|
|
35
35
|
|
|
36
|
+
**Connections and harnesses (0.10, #1244).** `engines` and `defaults` are
|
|
37
|
+
replaced by `connections` and `harnesses`. A config in the old form still loads
|
|
38
|
+
(converted in memory, with a warning that names `akm migrate apply`), and `akm
|
|
39
|
+
migrate apply` converts it.
|
|
40
|
+
|
|
41
|
+
`--engine <name>` (on `agent`, `command run`, `task add`, `proposal new` and
|
|
42
|
+
`proposal extract`) and `--require-engines` (on `improve`) are hidden from
|
|
43
|
+
`--help` and still run, with one warning, through 0.10. `--require-engines`
|
|
44
|
+
does nothing. Change a script to `--connection <name>` or `--harness <name>`,
|
|
45
|
+
and `--model <alias|name>`; how an old engine name resolves is under
|
|
46
|
+
[The `engines` form](docs/reference/configuration.md#the-engines-form).
|
|
47
|
+
|
|
48
|
+
`AKM_ENGINE_<NAME>_API_KEY`, `AKM_LLM_API_KEY` and `AKM_EMBED_API_KEY` are no
|
|
49
|
+
longer read implicitly: put `"apiKey": "$VAR"` on the connection, or the key in
|
|
50
|
+
`credentials.json`.
|
|
51
|
+
|
|
52
|
+
These are unknown flags or commands (exit 2) from 0.10, with no alias:
|
|
53
|
+
|
|
54
|
+
| Gone | Use |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `akm setup --config <json>` and `--probe` | `akm setup --endpoint <url> --yes` and the other answer flags; `--no-probe` for an offline run (probing is the default) |
|
|
57
|
+
| `akm models list`, `akm models copy-defaults` | `akm models`, `akm models set <alias> <model>` |
|
|
58
|
+
|
|
36
59
|
**Version numbers (0.10 onward, #1089).** A 0.10 release is numbered
|
|
37
60
|
`0.10.YYMMNN`: `YY` the UTC year, `MM` the month (`01` to `12`) and `NN` the
|
|
38
61
|
release within that month (`01` to `99`), each two digits. Every release takes
|
|
@@ -84,7 +107,7 @@ enumeration of the whole `proposal` noun group.
|
|
|
84
107
|
|
|
85
108
|
| Command | Tier | Notes |
|
|
86
109
|
| --- | --- | --- |
|
|
87
|
-
| `akm setup` | Stable | |
|
|
110
|
+
| `akm setup` | Stable | The answer flags (`--endpoint`, `--api-key-env`, `--name`, `--harness`, `--embedding`, ...) are new in 0.10; `--config` and `--probe` are gone (see the table above). |
|
|
88
111
|
| `akm index` | Stable | |
|
|
89
112
|
| `akm health` | Evolving | Exit codes are Evolving; report *content* and rendered `md`/`html` layout are Experimental — do not script against report layout. |
|
|
90
113
|
| `akm metrics` | Experimental | New in 0.9.28. Report content, JSON shape and the `html` dashboard may change. |
|
|
@@ -100,9 +123,9 @@ enumeration of the whole `proposal` noun group.
|
|
|
100
123
|
| `akm search` | Stable | |
|
|
101
124
|
| `akm curate` | Stable | |
|
|
102
125
|
| `akm show` | Stable | |
|
|
103
|
-
| `akm workflow status` | Experimental | `--all-scopes` added in 0.9.15 (#942),
|
|
126
|
+
| `akm workflow status` | Experimental | `--all-scopes` added in 0.9.15 (#942); a deprecated no-op since 0.10 (#1239), accepted through 0.10. |
|
|
104
127
|
| `akm workflow plan` | Experimental | New in 0.9.2; secret-free provenance output; envelope shape may change. |
|
|
105
|
-
| `akm workflow list` | Experimental | `--all-scopes` and a top-level `scopeKey` envelope field added in 0.9.15 (#942),
|
|
128
|
+
| `akm workflow list` | Experimental | `--all-scopes` and a top-level `scopeKey` envelope field added in 0.9.15 (#942); since 0.10 (#1239) `--all-scopes` is a deprecated no-op, accepted through 0.10, and the `scopeKey` field is removed from the list result. |
|
|
106
129
|
| `akm workflow create` | Experimental | |
|
|
107
130
|
| `akm workflow resume` | Experimental | |
|
|
108
131
|
| `akm workflow abandon` | Experimental | |
|
|
@@ -126,7 +149,7 @@ enumeration of the whole `proposal` noun group.
|
|
|
126
149
|
| `akm log` | Evolving | |
|
|
127
150
|
| `akm agent` | Evolving | |
|
|
128
151
|
| `akm command run` | Evolving | Runs stored command templates through the same agent dispatch as `akm agent`. |
|
|
129
|
-
| `akm models` | Evolving |
|
|
152
|
+
| `akm models` | Evolving | The alias picks of a connection, then the models its endpoint lists, and `set` to change one. |
|
|
130
153
|
| `akm lint` | Evolving | |
|
|
131
154
|
| `akm improve` | Evolving | Review-first by default; mutating lanes require `experimental.improveAutonomy` — see below. |
|
|
132
155
|
| `akm improve report` | Evolving | Subcommand since 0.10 (was a magic `scope` value); owns `--run` and `--since`. |
|
|
@@ -314,7 +337,7 @@ CHANGELOG with a migration note.
|
|
|
314
337
|
`list`/`remove`/`init`/`enable`/`disable`); task source v4 YAML (typed
|
|
315
338
|
`inputs:`, optional `schedule:`) is the only accepted version — task v3 and
|
|
316
339
|
task v2 sources are converted by `akm migrate apply`. Command tasks use
|
|
317
|
-
named
|
|
340
|
+
a named connection or harness, and task history metadata is versioned. Schema additions in
|
|
318
341
|
patch releases; removals only at minor. Bare `akm task` is a usage error
|
|
319
342
|
naming the subcommands (`akm task doctor` reports scheduler diagnostics).
|
|
320
343
|
`akm task explain <ref>` (new in 0.9.2) and `akm workflow plan <ref>` are
|
|
@@ -355,20 +378,17 @@ CHANGELOG with a migration note.
|
|
|
355
378
|
`log.md` / `raw/` / `pages/` and its ingest flow); wiki pages are addressed
|
|
356
379
|
as ordinary concepts inside their bundle. Adapter behavior and page
|
|
357
380
|
conventions are still iterating.
|
|
358
|
-
- **Agent dispatch** — `akm agent` and `akm command run`. Supported
|
|
359
|
-
`claude`, `opencode
|
|
360
|
-
|
|
361
|
-
`openhands`. Every harness is Evolving:
|
|
362
|
-
|
|
363
|
-
grow.
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
import) is not deprecated.
|
|
370
|
-
- **Model aliases** — `akm models list|copy-defaults` and the intent-alias
|
|
371
|
-
defaults they expose.
|
|
381
|
+
- **Agent dispatch** — `akm agent` and `akm command run`. Supported
|
|
382
|
+
harnesses: `claude`, `codex`, `opencode` (through `opencode run`, for OpenCode 2
|
|
383
|
+
and for the legacy OpenCode 1, which keeps working with no removal date),
|
|
384
|
+
`copilot`, `pi`, `gemini`, `aider`, `amazonq` and `openhands`. Every harness is Evolving: a harness is a thin shell that turns a
|
|
385
|
+
request into a command, and the set is easy to add to, remove from and update.
|
|
386
|
+
The set will grow. A harness runs with your environment as it is
|
|
387
|
+
([Configuration](docs/reference/configuration.md#how-akm-runs-a-harness)). With
|
|
388
|
+
no harness configured, agent work runs on akm's own runtime over a connection,
|
|
389
|
+
which is Evolving too.
|
|
390
|
+
- **Model aliases** — `akm models` and `akm models set`, and the intent-alias
|
|
391
|
+
picks a connection holds.
|
|
372
392
|
- **Proposal queue** — quality classifications (`accepted`, `pending`,
|
|
373
393
|
`proposed`, `rejected`, `archived`) are stable; the JSON shape of a
|
|
374
394
|
proposal record may add fields.
|
|
@@ -402,14 +422,13 @@ for scripted use.
|
|
|
402
422
|
least settled part and are kept only in that simple form; `akm workflow list
|
|
403
423
|
--children` goes with them.
|
|
404
424
|
|
|
405
|
-
Per-key status today
|
|
406
|
-
`docs/plans/0.10-workflows.md`. It stands until the promote-or-remove
|
|
425
|
+
Per-key status today. It stands until the promote-or-remove
|
|
407
426
|
decision in [#1096](https://github.com/itlackey/akm/issues/1096); every key
|
|
408
427
|
is still Experimental until then.
|
|
409
428
|
|
|
410
429
|
| Key | Status |
|
|
411
430
|
| --- | --- |
|
|
412
|
-
| `params`, `steps`, `inputs`, `output` / `unit.output`, `defaults.
|
|
431
|
+
| `params`, `steps`, `inputs`, `output` / `unit.output`, `defaults.connection` / `defaults.harness`, `### gate` | Core: the feature set pinned by `core-feature-set.test.ts` |
|
|
413
432
|
| exec units (`unit.exec`), `budget`, `unit.retry`, `map`, `gate.max_loops` | Kept in the 0.10 trim |
|
|
414
433
|
| child workflows (`unit.workflow`, `unit.with`) | Experimental: least settled |
|
|
415
434
|
- **`akm metrics`** — new in 0.9.28. What it reports, its JSON shape and the
|
|
@@ -443,9 +462,9 @@ for scripted use.
|
|
|
443
462
|
than `default` and `consolidate` and the proactive-maintenance lane. 0.10 measures each and keeps, folds or removes it
|
|
444
463
|
(#1094). `quick`, `reflect-distill`, `thorough` and `catchup` were removed
|
|
445
464
|
in 0.10 (#1130), as were `proactive-maintenance` and the high-salience lane (#1129); a user-defined strategy of the same name keeps working.
|
|
446
|
-
- **Improve tuning config** — `improve.strategies.*.processes.*` (
|
|
447
|
-
|
|
448
|
-
the `index.*` per-pass config. The 0.9.x series is explicitly still settling
|
|
465
|
+
- **Improve tuning config** — `improve.strategies.*.processes.*` (limits,
|
|
466
|
+
gates, and the CLS knobs), `improve.processes.*` and `improve.qualityGate`
|
|
467
|
+
(where each process runs) and the `index.*` per-pass config. The 0.9.x series is explicitly still settling
|
|
449
468
|
the design of the improve processes, so **keys in these two families may be
|
|
450
469
|
added, renamed, or dropped in any 0.9.x or 0.10.x release**. The `akm
|
|
451
470
|
improve` *command* surface is Evolving (above); its tuning config is not.
|
|
@@ -487,15 +506,15 @@ the pair pass stages a retirement when its claim checks pass and there is no
|
|
|
487
506
|
continuity risk. `triage` with `applyMode: "promote"` can accept that staged
|
|
488
507
|
retirement unattended; an unstaged retirement stays pending. Both retirement
|
|
489
508
|
checks receive complete note bodies with lexical attention hints, so the selected
|
|
490
|
-
|
|
509
|
+
model must accommodate them. The pair judge supplies distinct-claim lists; AKM
|
|
491
510
|
derives duplicate/subsumed/overlap outcomes and retirement direction from those
|
|
492
511
|
lists. Historical queued retirement labels remain readable. Before unattended drain after an upgrade, review pending/staged
|
|
493
512
|
retirements produced by older builds from notes over 12,000 body characters:
|
|
494
513
|
upgrading does not revalidate their evidence (#1195).
|
|
495
514
|
|
|
496
515
|
Because the gate is applied before the LLM preflight, a review-first workspace
|
|
497
|
-
also needs fewer
|
|
498
|
-
is a gated lane resolves without
|
|
516
|
+
also needs fewer connections or harnesses configured: a strategy whose only
|
|
517
|
+
model-backed process is a gated lane resolves without one at all.
|
|
499
518
|
|
|
500
519
|
**Three direct writes are deliberately NOT gated**, because they are additive or
|
|
501
520
|
already independently controlled:
|
|
@@ -539,8 +558,6 @@ on them.
|
|
|
539
558
|
| Variable | Purpose |
|
|
540
559
|
| --- | --- |
|
|
541
560
|
| `AKM_BUNDLE_DIR`, `AKM_CONFIG_DIR`, `AKM_DATA_DIR`, `AKM_CACHE_DIR` | Filesystem layout overrides |
|
|
542
|
-
| `AKM_LLM_API_KEY`, `AKM_EMBED_API_KEY`, `AKM_ENGINE_<NAME>_API_KEY` | Credential provision for `$VAR` config references |
|
|
543
|
-
| `AKM_LLM_ENDPOINT`, `AKM_LLM_BASE_URL` | Setup provider inference |
|
|
544
561
|
| `AKM_VERBOSE`, `AKM_DEBUG` | Diagnostics |
|
|
545
562
|
| `AKM_REGISTRY_URL` | akm registry mirror override |
|
|
546
563
|
| `AKM_NPM_REGISTRY` | npm mirror override — redirects BOTH the trusted-tarball host allowlist and package metadata lookups (`npm view`-equivalent resolution) to the given registry base, replacing `registry.npmjs.org` wholesale rather than merging with it |
|
|
@@ -572,22 +589,6 @@ These changes are planned and will land in a known future release. They
|
|
|
572
589
|
are not part of the current stability contract; you should plan migrations
|
|
573
590
|
around them.
|
|
574
591
|
|
|
575
|
-
**The 0.9.0 decision record is fully shipped.** The
|
|
576
|
-
[decision record](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/0.9.0-decisions.md) settles a set of
|
|
577
|
-
breaking changes; every one of them is now in the code, and each decision
|
|
578
|
-
carries its own shipped status.
|
|
579
|
-
|
|
580
|
-
Shipped from that record: **D1** (`#fragment` section selection),
|
|
581
|
-
**D2** (the `akm show <ref> toc|section|lines|frontmatter|full` view grammar is
|
|
582
|
-
gone — `#fragment` is the only section selector), **D4** (conceptId /
|
|
583
|
-
`bundle//` prefix browse), **D5** (`akm bundle` removed), **D6** (open `type`
|
|
584
|
-
set at runtime), **D7** (all six `--format` values everywhere), **D8** (the
|
|
585
|
-
`experimental.improveAutonomy` gate), **D9** (`--auto-accept` removed, a hard error since 0.10),
|
|
586
|
-
and partially **D10** (an `akm-migrate` binary now exists, though the code still
|
|
587
|
-
lives in this repo). **D3** shipped too, in the end: `akm mv` was removed in
|
|
588
|
-
0.9.0 (see the Renames bullet above), with `scripts/rekey-asset-ref.ts` as the
|
|
589
|
-
Internal replacement for the one capability nothing else covered.
|
|
590
|
-
|
|
591
592
|
- **0.10 — `config set`/`config unset` may drop the config dump** in favor of
|
|
592
593
|
a compact `{ok, shape, key}` result; `akm config list` remains the full read.
|
|
593
594
|
- **0.10 — migration extraction.** The migration machinery lives in its own
|
|
@@ -595,9 +596,6 @@ Internal replacement for the one capability nothing else covered.
|
|
|
595
596
|
`akm` (no separate npm package). The task-source migrator (`task-to-v4.ts`,
|
|
596
597
|
`task-source-v3-frozen.ts`) lives with it under `scripts/akm-migrate/migrate/`,
|
|
597
598
|
out of `src/`.
|
|
598
|
-
- **0.11 or later — the `opencode` CLI dispatch path may be removed.**
|
|
599
|
-
Deprecated in 0.10 (see Agent dispatch under Evolving); `opencode-sdk`
|
|
600
|
-
engines replace it.
|
|
601
599
|
- **0.10 — `BundleAdapter.placeNew()` is removed.** Nothing called it; writes use AKM's fixed type→directory table.
|
|
602
600
|
Writable bundles in a non-akm layout would need per-adapter placement back
|
|
603
601
|
([#1163](https://github.com/itlackey/akm/issues/1163)).
|
|
@@ -624,7 +622,5 @@ worth fixing.
|
|
|
624
622
|
(independent of the feature-stability policy above).
|
|
625
623
|
- [`docs/architecture/specs/ref.md`](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/ref.md) — the
|
|
626
624
|
normative ref grammar.
|
|
627
|
-
- [`docs/architecture/specs/0.9.0-decisions.md`](https://github.com/itlackey/akm/blob/main/docs/architecture/specs/0.9.0-decisions.md)
|
|
628
|
-
— the decision record behind the 0.9.0 surface changes.
|
|
629
625
|
- [`docs/reference/data-and-telemetry.md`](./docs/reference/data-and-telemetry.md) — what
|
|
630
626
|
state akm reads and writes locally.
|
|
@@ -68,7 +68,7 @@ akm show knowledge/my-doc # Show materialized local content
|
|
|
68
68
|
| script | `run`, `setup`, `cwd` |
|
|
69
69
|
| skill | `content` (full SKILL.md) |
|
|
70
70
|
| command | `template`, `description`, `parameters` |
|
|
71
|
-
| agent | `prompt`, `description`, `modelHint
|
|
71
|
+
| agent | `prompt`, `description`, `modelHint` |
|
|
72
72
|
| knowledge | `content` (whole document, or one section via `#fragment`) |
|
|
73
73
|
| workflow | `workflowTitle`, `workflowParameters`, `steps` |
|
|
74
74
|
| memory | `content` (recalled context) |
|
|
@@ -92,7 +92,7 @@ akm import https://example.com/docs/auth # Fetch one URL and import it as
|
|
|
92
92
|
akm import ./doc.md --bundle my-other-bundle # Route import to a named writable bundle source
|
|
93
93
|
akm workflow create ship-release # Create a workflow asset in the bundle
|
|
94
94
|
akm lint --type workflows # Parse and compile every workflow source; list every error
|
|
95
|
-
akm workflow run workflows/ship-release # Start
|
|
95
|
+
akm workflow run workflows/ship-release # Start a new run and execute it
|
|
96
96
|
akm feedback skills/code-review --positive # Record that an asset helped (ranks it higher; no rewrite)
|
|
97
97
|
akm feedback agents/reviewer --negative --reason "says to run jest; the suite runs on vitest" # Content wrong or stale: lowers its ranking; improve may repair its frontmatter
|
|
98
98
|
akm feedback knowledge/opencode-server --negative --reason "the default port is 4096, not 8000" --replace "port 8000" --with "port 4096" --source "https://opencode.ai/docs/server/" # Apply an exact fix
|
|
@@ -150,8 +150,8 @@ the index (comments can contain commented-out credentials). akm does not edit
|
|
|
150
150
|
entries — you edit the file with your own editor and akm loads it.
|
|
151
151
|
|
|
152
152
|
```sh
|
|
153
|
-
akm env create prod # Create an empty env file
|
|
154
|
-
akm env create prod --from-file ./.env # Ingest an existing .env
|
|
153
|
+
akm env create env/prod # Create an empty env file
|
|
154
|
+
akm env create env/prod --from-file ./.env # Ingest an existing .env
|
|
155
155
|
akm env list # List all env files across bundles with key names
|
|
156
156
|
akm show env/prod # Inspect key names (never values or comments)
|
|
157
157
|
akm env run env/prod -- ./deploy.sh # Run a command with the whole .env injected (the safe path)
|
|
@@ -186,10 +186,10 @@ workflow. Direct run-id commands still target the exact run.
|
|
|
186
186
|
akm workflow create ship-release --print # Print a starter workflow template, without writing
|
|
187
187
|
akm workflow create ship-release # Scaffold a new workflow asset
|
|
188
188
|
akm workflow run workflows/ship-release --version=1.2.3 # Start and execute with exact-name parameter flags
|
|
189
|
-
akm workflow run <run-id> --max-retries 2 --timeout 10m #
|
|
189
|
+
akm workflow run <run-id> --max-retries 2 --timeout 10m # Continue a run with invocation-wide controls
|
|
190
190
|
akm workflow status <run-id> # Show the exact run by id
|
|
191
|
-
akm workflow resume <run-id> #
|
|
192
|
-
akm workflow list # List workflow runs
|
|
191
|
+
akm workflow resume <run-id> # Re-activate a blocked or failed run, then `run <run-id>`
|
|
192
|
+
akm workflow list # List workflow runs on this host
|
|
193
193
|
```
|
|
194
194
|
|
|
195
195
|
## Clone
|
|
@@ -282,7 +282,6 @@ akm bundle list --kind git # Filter by provider (files
|
|
|
282
282
|
akm bundle remove <target> # Remove by id, ref, path, or name
|
|
283
283
|
akm bundle update --all # Update all managed sources
|
|
284
284
|
akm bundle update <target> --force # Force re-download
|
|
285
|
-
akm bundle update <target> --allow-dangerous-env-keys # Approve reviewed dangerous env keys
|
|
286
285
|
akm bundle update --all --skip-if-locked # Scheduled refresh; exit 0 on DB contention
|
|
287
286
|
```
|
|
288
287
|
|
|
@@ -298,7 +297,6 @@ akm registry add <url> --name my-team # Add with label
|
|
|
298
297
|
akm registry add <url> --provider skills-sh # Specify provider type
|
|
299
298
|
akm registry remove <url-or-name> # Remove a registry
|
|
300
299
|
akm search "<query>" --from registry # Search all registries (registry search was folded into search)
|
|
301
|
-
akm search "<query>" --from registry --assets # Include asset-level results
|
|
302
300
|
```
|
|
303
301
|
|
|
304
302
|
## Configuration
|
|
@@ -308,15 +306,18 @@ akm config list # Show current config
|
|
|
308
306
|
akm config get <key> # Read a value
|
|
309
307
|
akm config set <key> <value> # Set a value
|
|
310
308
|
akm config unset <key> # Remove a key
|
|
309
|
+
akm models # Which model answers each alias, then what the endpoint lists
|
|
310
|
+
akm models set <alias> <model> # Change one (--connection <name> for another connection)
|
|
311
311
|
```
|
|
312
312
|
|
|
313
313
|
## Other Commands
|
|
314
314
|
|
|
315
315
|
```sh
|
|
316
316
|
akm bundle create # Initialize working bundle (scaffold only)
|
|
317
|
-
akm setup # Interactive wizard:
|
|
317
|
+
akm setup # Interactive wizard: agent programs, model connection, embeddings, bundle + registry config
|
|
318
318
|
akm setup --dir ~/custom-bundle # Run the wizard against a custom bundle path
|
|
319
319
|
akm setup --yes # Non-interactive, accepts all defaults
|
|
320
|
+
akm setup --endpoint <url> --yes # Non-interactive, adds a model connection (an OpenAI-compatible endpoint)
|
|
320
321
|
akm index # Rebuild search index
|
|
321
322
|
akm index --full # Full reindex
|
|
322
323
|
akm bundle list # List all sources
|
|
@@ -334,8 +335,8 @@ akm completions --install # Install completions
|
|
|
334
335
|
```
|
|
335
336
|
|
|
336
337
|
`akm bundle create` only scaffolds the bundle directory and registers it in config;
|
|
337
|
-
`akm setup` additionally walks through
|
|
338
|
-
|
|
338
|
+
`akm setup` additionally walks through agent programs, a model connection,
|
|
339
|
+
embeddings, sources, and registries. Use `setup` for first-time onboarding,
|
|
339
340
|
`bundle create` when you just need a bare bundle.
|
|
340
341
|
|
|
341
342
|
## Proposals & Improvement (0.8.0+)
|
|
@@ -379,7 +380,7 @@ akm search --type task # Enumerate task assets
|
|
|
379
380
|
```
|
|
380
381
|
|
|
381
382
|
Task files use task source v4 (`version: 4`). There is no `akm:` options bag
|
|
382
|
-
or `on:` block — every control (`schedule`, `timeout`, `
|
|
383
|
+
or `on:` block — every control (`schedule`, `timeout`, `connection`, `harness`, `model`,
|
|
383
384
|
`redact`, `maxSteps`, `maxRetries`, …) is a top-level key now. Typed
|
|
384
385
|
`inputs:` declarations and a bounded `output:` schema work like a
|
|
385
386
|
workflow's (`output:` replaces v3's `akm.outputSchema`). Task source never
|
|
@@ -387,23 +388,24 @@ controls activation: use `akm task enable` / `disable`, which update the
|
|
|
387
388
|
host-local config allow-list and sync. To remove one, delete the YAML and run
|
|
388
389
|
`akm task sync` — the scheduler entry is unbound. Top-level
|
|
389
390
|
`timeout:` may be `null` (disable the invocation timer) or a duration/number
|
|
390
|
-
overriding the selected
|
|
391
|
+
overriding the selected connection's or harness's timeout. Preview old task-v2/v3
|
|
391
392
|
conversion with `akm migrate apply --dry-run`.
|
|
392
393
|
|
|
393
394
|
## Agent Dispatch
|
|
394
395
|
|
|
395
396
|
```sh
|
|
396
|
-
akm agent --prompt "summarize open proposals" #
|
|
397
|
-
akm agent agents/architect --prompt "..." # Embody a bundle agent asset (system prompt, model
|
|
397
|
+
akm agent --prompt "summarize open proposals" # Run an agent on your default harness (else akm's own runtime over your connection)
|
|
398
|
+
akm agent agents/architect --prompt "..." # Embody a bundle agent asset (system prompt, model)
|
|
398
399
|
akm command run commands/release # Canonical reusable-command dispatch
|
|
399
|
-
akm agent --model
|
|
400
|
+
akm agent --model reasoning --prompt "..." # Model override (alias fast|balanced|reasoning, or an exact name)
|
|
401
|
+
akm agent --harness claude --prompt "..." # Run on a named harness (or --connection <name>)
|
|
400
402
|
```
|
|
401
403
|
|
|
402
404
|
## Health, Info, and the Event Log
|
|
403
405
|
|
|
404
406
|
```sh
|
|
405
|
-
akm info # Capabilities, bundle dir, index stats, semantic-search status
|
|
406
|
-
akm health # Runtime diagnostics; exit 0 ok / 4 warn / 1 fail
|
|
407
|
+
akm info # Capabilities, bundle dir, index stats, semantic-search status, connections and harnesses
|
|
408
|
+
akm health # Runtime diagnostics, connections and harnesses; exit 0 ok / 4 warn / 1 fail
|
|
407
409
|
akm health --report # Adds accept-rate metrics
|
|
408
410
|
akm metrics # Usage, feedback, utility, LLM tokens, tasks, workflows (last 30d, read-only)
|
|
409
411
|
akm metrics --since 7d # Narrow the window
|
|
@@ -15,9 +15,8 @@ For workflow tasks:
|
|
|
15
15
|
2. `akm workflow run workflows/<name> --param_name=value` — execute every step and verification gate
|
|
16
16
|
3. `akm workflow status <run-id> --units` — inspect a stopped or failed run
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
and `workflow list` operate within the current scope only.
|
|
18
|
+
A workflow ref (`workflows/<name>`) starts a new run; a run id drives that exact
|
|
19
|
+
run. `workflow list` and `workflow status` see every run on this host.
|
|
21
20
|
|
|
22
21
|
## Quick Reference
|
|
23
22
|
|
|
@@ -29,7 +28,7 @@ akm search "memories/projectA/" # List a subtree (conceptId prefix
|
|
|
29
28
|
akm search "<query>" --from all # Also search registries
|
|
30
29
|
akm show <ref> # View asset details
|
|
31
30
|
akm help <command> # Show a command's options and subcommands
|
|
32
|
-
akm workflow run <ref> # Start
|
|
31
|
+
akm workflow run <ref> # Start a new run and execute it
|
|
33
32
|
akm remember "Deployment needs VPN access" # Record a memory in your bundle
|
|
34
33
|
akm remember "note" --bundle my-bundle # Route write to a named writable bundle source
|
|
35
34
|
akm remember "note" --xref knowledge/auth-flow # Cite provenance in frontmatter xrefs (repeatable)
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
+
|
|
5
|
+
// The OpenCode 2 plugin of akm's own agent runtime. akm writes this file to the runtime's config directory and names
|
|
6
|
+
// it in the inline config's `plugins` list (src/integrations/harnesses/opencode/runtime/). It runs inside OpenCode, so
|
|
7
|
+
// it imports no package: only Node's own child_process, to call back into akm.
|
|
8
|
+
//
|
|
9
|
+
// - akm's three read tools, each a run of the akm that started OpenCode, with `--detail agent --format json`. akm
|
|
10
|
+
// passes the argv that runs it in `AKM_OPENCODE_CLI`, a JSON array: the executable alone for a compiled akm, the
|
|
11
|
+
// runtime and the script for one run as a script (Node and `dist/akm`, say), so no shebang or shell is needed on
|
|
12
|
+
// any platform. The run's environment is the call's, so a stamped run's reads (`AKM_EVENT_SOURCE`) are recorded as
|
|
13
|
+
// that run's.
|
|
14
|
+
// - The environment of the commands the agent runs: the variables akm set for the OpenCode process (its roots and
|
|
15
|
+
// its OpenCode settings) are put back to what akm runs in, or removed, so the agent's shell sees the environment a
|
|
16
|
+
// harness's child would.
|
|
17
|
+
// - The connection's request fields, laid over each model request in the endpoint's own field names, as the chat
|
|
18
|
+
// transport sends them. OpenCode sizes every request's output cap from the model's limit and sends it as
|
|
19
|
+
// `max_tokens` or `max_completion_tokens`; that is its own accounting, not a cap anyone asked for, so it is
|
|
20
|
+
// dropped, and the connection's fields carry a cap only when the connection writes one.
|
|
21
|
+
|
|
22
|
+
import { execFile } from "node:child_process";
|
|
23
|
+
|
|
24
|
+
const OUTPUT_LIMIT_BYTES = 8 * 1024 * 1024;
|
|
25
|
+
|
|
26
|
+
const TOOLS = [
|
|
27
|
+
{
|
|
28
|
+
name: "akm_curate",
|
|
29
|
+
command: "curate",
|
|
30
|
+
positional: "query",
|
|
31
|
+
description:
|
|
32
|
+
"Find the akm assets (skills, knowledge, memories, workflows) that best fit a task. Read one with akm_show before relying on it.",
|
|
33
|
+
input: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {
|
|
36
|
+
query: { type: "string", description: "The task or question" },
|
|
37
|
+
type: { type: "string", description: "Optional asset type filter" },
|
|
38
|
+
limit: { type: "integer", minimum: 1 },
|
|
39
|
+
},
|
|
40
|
+
required: ["query"],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "akm_search",
|
|
45
|
+
command: "search",
|
|
46
|
+
positional: "query",
|
|
47
|
+
description: "Search akm assets by name or keyword.",
|
|
48
|
+
input: {
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
query: { type: "string" },
|
|
52
|
+
type: { type: "string", description: "Optional asset type filter" },
|
|
53
|
+
limit: { type: "integer", minimum: 1 },
|
|
54
|
+
},
|
|
55
|
+
required: ["query"],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "akm_show",
|
|
60
|
+
command: "show",
|
|
61
|
+
positional: "ref",
|
|
62
|
+
description: "Read one akm asset by its ref, as returned by akm_curate or akm_search.",
|
|
63
|
+
input: { type: "object", properties: { ref: { type: "string" } }, required: ["ref"] },
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
const text = (value) => (typeof value === "string" && value.trim() !== "" ? value.trim() : undefined);
|
|
68
|
+
|
|
69
|
+
/** The arguments of one tool call for the akm CLI; throws when the required one is missing. */
|
|
70
|
+
function cliArguments(tool, input) {
|
|
71
|
+
const value = text(input?.[tool.positional]);
|
|
72
|
+
if (!value) throw new Error(`"${tool.positional}" is required`);
|
|
73
|
+
const type = text(input?.type);
|
|
74
|
+
const limit = Number.isInteger(input?.limit) && input.limit > 0 ? String(input.limit) : undefined;
|
|
75
|
+
return [
|
|
76
|
+
tool.command,
|
|
77
|
+
value,
|
|
78
|
+
...(type && tool.positional !== "ref" ? ["--type", type] : []),
|
|
79
|
+
...(limit && tool.positional !== "ref" ? ["--limit", limit] : []),
|
|
80
|
+
"--detail",
|
|
81
|
+
"agent",
|
|
82
|
+
"--format",
|
|
83
|
+
"json",
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** The argv in `AKM_OPENCODE_CLI`; throws unless it is a JSON array of strings with at least the executable. */
|
|
88
|
+
function akmArgv() {
|
|
89
|
+
const raw = process.env.AKM_OPENCODE_CLI;
|
|
90
|
+
if (!raw) throw new Error("AKM_OPENCODE_CLI is not set");
|
|
91
|
+
const argv = JSON.parse(raw);
|
|
92
|
+
if (!Array.isArray(argv) || argv.length === 0 || !argv.every((part) => typeof part === "string")) {
|
|
93
|
+
throw new Error("AKM_OPENCODE_CLI is not a JSON array of strings");
|
|
94
|
+
}
|
|
95
|
+
return argv;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function runAkm([executable, ...prefix], args) {
|
|
99
|
+
return new Promise((resolve, reject) => {
|
|
100
|
+
execFile(
|
|
101
|
+
executable,
|
|
102
|
+
[...prefix, ...args],
|
|
103
|
+
{ encoding: "utf8", maxBuffer: OUTPUT_LIMIT_BYTES, env: process.env },
|
|
104
|
+
(error, stdout, stderr) => {
|
|
105
|
+
if (error) reject(new Error((stderr || error.message).trim()));
|
|
106
|
+
else resolve(stdout);
|
|
107
|
+
},
|
|
108
|
+
);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const isObject = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
113
|
+
|
|
114
|
+
/** `over` laid over `base`; an object on both sides is merged one level deep, anything else of `over` wins. */
|
|
115
|
+
function withFields(base, over) {
|
|
116
|
+
const merged = { ...base };
|
|
117
|
+
for (const [key, value] of Object.entries(over)) {
|
|
118
|
+
merged[key] = isObject(merged[key]) && isObject(value) ? { ...merged[key], ...value } : value;
|
|
119
|
+
}
|
|
120
|
+
return merged;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export default {
|
|
124
|
+
id: "akm",
|
|
125
|
+
setup: async (ctx) => {
|
|
126
|
+
await ctx.tool.transform((editor) => {
|
|
127
|
+
for (const tool of TOOLS) {
|
|
128
|
+
editor.add({
|
|
129
|
+
name: tool.name,
|
|
130
|
+
description: tool.description,
|
|
131
|
+
input: tool.input,
|
|
132
|
+
options: { codemode: false },
|
|
133
|
+
execute: async (input) => {
|
|
134
|
+
try {
|
|
135
|
+
const args = cliArguments(tool, input);
|
|
136
|
+
return { content: await runAkm(akmArgv(), args) };
|
|
137
|
+
} catch (error) {
|
|
138
|
+
return { content: `${tool.name} failed: ${error instanceof Error ? error.message : String(error)}` };
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const shellEnv = ctx.options?.shellEnv;
|
|
146
|
+
if (isObject(shellEnv)) {
|
|
147
|
+
await ctx.shell.hook("create.before", async (event) => {
|
|
148
|
+
for (const [name, value] of Object.entries(shellEnv)) {
|
|
149
|
+
if (typeof value === "string") event.env[name] = value;
|
|
150
|
+
else delete event.env[name];
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const fields = ctx.options?.requestFields;
|
|
156
|
+
await ctx.session.hook("http.request", async (event) => {
|
|
157
|
+
const request = event.request;
|
|
158
|
+
if (request.body === null) return;
|
|
159
|
+
let body;
|
|
160
|
+
try {
|
|
161
|
+
body = JSON.parse(await request.clone().text());
|
|
162
|
+
} catch {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
if (!isObject(body)) return;
|
|
166
|
+
const { max_tokens: _own, max_completion_tokens: _ownCompletion, ...kept } = body;
|
|
167
|
+
const headers = new Headers(request.headers);
|
|
168
|
+
headers.delete("content-length");
|
|
169
|
+
event.request = new Request(request.url, {
|
|
170
|
+
method: request.method,
|
|
171
|
+
headers,
|
|
172
|
+
body: JSON.stringify(isObject(fields) ? withFields(kept, fields) : kept),
|
|
173
|
+
signal: request.signal,
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
};
|
|
@@ -13,7 +13,7 @@ consistency and reducing repeated context-setting.
|
|
|
13
13
|
| `knowledge/` | Knowledge | Reference documents, guides, architecture notes |
|
|
14
14
|
| `memories/` | Memories | Persistent facts and preferences learned over time |
|
|
15
15
|
| `commands/` | Commands | Parameterised prompt templates for common workflows |
|
|
16
|
-
| `agents/` | Agents | Agent definitions with system prompts
|
|
16
|
+
| `agents/` | Agents | Agent definitions with system prompts |
|
|
17
17
|
| `workflows/` | Workflows | Multi-step orchestration sequences |
|
|
18
18
|
| `tasks/` | Tasks | Scheduled or on-demand automation tasks |
|
|
19
19
|
| `lessons/` | Lessons | Durable lessons extracted from past sessions |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
version: 4
|
|
2
|
-
run: akm improve --strategy consolidate --timeout-ms 3600000 --skip-if-locked
|
|
2
|
+
run: akm improve --strategy consolidate --timeout-ms 3600000 --skip-if-locked
|
|
3
3
|
description: Consolidation-only pass (every 4h at :20)
|
|
4
4
|
schedule: "20 */4 * * *"
|