akm-cli 0.9.30 → 0.10.26101001-alpha
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 +282 -0
- package/README.md +10 -10
- package/ROADMAP.md +112 -0
- package/STABILITY.md +79 -53
- package/dist/api-node.mjs +20 -0
- package/dist/api.d.ts +23 -0
- package/dist/api.js +45 -0
- package/dist/assets/hints/cli-hints-full.md +13 -27
- package/dist/assets/hints/cli-hints-short.md +1 -1
- package/dist/assets/improve-strategies/default.json +3 -3
- package/dist/assets/prompts/consolidate-pair.md +9 -7
- package/dist/cli/shared.js +31 -48
- package/dist/cli/unknown-flags.js +6 -43
- package/dist/cli.js +8 -34
- package/dist/commands/agent/contribute-cli.js +1 -1
- package/dist/commands/completions.js +1 -2
- package/dist/commands/config-cli.js +5 -28
- package/dist/commands/env/env-cli.js +5 -5
- package/dist/commands/env/secret-cli.js +2 -2
- package/dist/commands/health/checks.js +41 -16
- package/dist/commands/health/plugin-staleness.js +52 -22
- package/dist/commands/improve/autonomy-gate.js +5 -3
- package/dist/commands/improve/consolidate/pair-pass.js +7 -1
- package/dist/commands/improve/consolidate.js +6 -35
- package/dist/commands/improve/distill/lesson-update.js +91 -0
- package/dist/commands/improve/distill-guards.js +1 -43
- package/dist/commands/improve/distill.js +140 -20
- package/dist/commands/improve/extract-cli.js +1 -1
- package/dist/commands/improve/improve-cli.js +120 -114
- package/dist/commands/improve/improve-strategies.js +8 -12
- package/dist/commands/improve/loop-stages.js +0 -1
- package/dist/commands/improve/planner.js +0 -1
- package/dist/commands/improve/preparation.js +40 -99
- package/dist/commands/improve/proactive-maintenance.js +2 -2
- package/dist/commands/improve/reflect-noise.js +3 -55
- package/dist/commands/improve/reflect.js +3 -8
- package/dist/commands/improve/retrieval-scope.js +2 -2
- package/dist/commands/improve/salience.js +2 -9
- package/dist/commands/improve/stage.js +14 -9
- package/dist/commands/lint/index.js +5 -20
- package/dist/commands/observability-cli.js +3 -9
- package/dist/commands/proposal/drain.js +39 -6
- package/dist/commands/proposal/proposal-cli.js +10 -30
- package/dist/commands/proposal/repository.js +3 -3
- package/dist/commands/read/knowledge.js +3 -3
- package/dist/commands/read/remember-cli.js +0 -13
- package/dist/commands/read/search-cli.js +29 -97
- package/dist/commands/read/search.js +0 -11
- package/dist/commands/read/show.js +0 -19
- package/dist/commands/sources/plugin-upgrade.js +164 -101
- package/dist/commands/sources/sources-cli.js +1 -15
- package/dist/commands/sources/stash-cli.js +4 -12
- package/dist/commands/tasks/tasks-cli.js +4 -115
- package/dist/commands/workflow/plan.js +11 -33
- package/dist/commands/workflow-cli.js +2 -7
- package/dist/core/adapter/adapter-ids.js +1 -2
- package/dist/core/adapter/adapters/agent-skills-adapter.js +0 -4
- package/dist/core/adapter/adapters/akm-adapter.js +9 -48
- package/dist/core/adapter/adapters/akm-lint.js +10 -26
- package/dist/core/adapter/adapters/akm-metadata.js +2 -72
- package/dist/core/adapter/adapters/akm-task-adapter.js +0 -5
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +9 -28
- package/dist/core/adapter/adapters/dotenv-adapter.js +1 -20
- package/dist/core/adapter/adapters/generic-files-adapter.js +0 -10
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +0 -4
- package/dist/core/adapter/adapters/tool-dir-shared.js +0 -24
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +4 -4
- package/dist/core/adapter/recognize-match.js +3 -4
- package/dist/core/common.js +18 -2
- package/dist/core/config/config-schema.js +12 -15
- package/dist/core/config/config-types.js +6 -15
- package/dist/core/config/config-walker.js +6 -23
- package/dist/core/config/config.js +17 -80
- package/dist/core/config/engine-semantics.js +7 -3
- package/dist/core/config/schema/engines.js +7 -7
- package/dist/core/config/schema/improve-processes.js +8 -61
- package/dist/core/config/schema/improve.js +2 -21
- package/dist/core/config/schema/index-config.js +6 -39
- package/dist/core/env-secret-ref.js +2 -45
- package/dist/core/errors.js +1 -2
- package/dist/core/extra-params.js +2 -86
- package/dist/core/file-lock.js +10 -1
- package/dist/core/improve-result.js +11 -1
- package/dist/core/mutation-target.js +2 -2
- package/dist/core/recognition-util.js +4 -5
- package/dist/core/warn.js +21 -4
- package/dist/core/write-source.js +3 -3
- package/dist/execution/target-ref.js +1 -2
- package/dist/indexer/search/db-search.js +4 -19
- package/dist/indexer/search/fts-query.js +0 -19
- package/dist/integrations/agent/engine-resolution.js +5 -2
- package/dist/integrations/agent/index.js +1 -1
- package/dist/integrations/agent/profiles.js +41 -98
- package/dist/integrations/agent/request-lowering.js +3 -3
- package/dist/integrations/harnesses/aider/index.js +5 -0
- package/dist/integrations/harnesses/amazonq/index.js +1 -0
- package/dist/integrations/harnesses/claude/config-import.js +2 -3
- package/dist/integrations/harnesses/claude/index.js +5 -0
- package/dist/integrations/harnesses/codex/index.js +1 -0
- package/dist/integrations/harnesses/copilot/index.js +1 -0
- package/dist/integrations/harnesses/gemini/index.js +1 -0
- package/dist/integrations/harnesses/index.js +18 -39
- package/dist/integrations/harnesses/opencode/agent-builder.js +60 -35
- package/dist/integrations/harnesses/opencode/config-import.js +121 -52
- package/dist/integrations/harnesses/opencode/index.js +22 -0
- package/dist/integrations/harnesses/opencode/plugin-layout.js +68 -0
- package/dist/integrations/harnesses/opencode/session-log-types.js +12 -0
- package/dist/integrations/harnesses/opencode/session-log-v1.js +72 -0
- package/dist/integrations/harnesses/opencode/session-log-v2.js +140 -0
- package/dist/integrations/harnesses/opencode/session-log.js +104 -115
- package/dist/integrations/harnesses/opencode/version.js +98 -0
- package/dist/integrations/harnesses/opencode-sdk/{harness.js → index.js} +5 -17
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +105 -206
- package/dist/integrations/harnesses/opencode-sdk/v1-adapter.js +199 -0
- package/dist/integrations/harnesses/opencode-sdk/v2-adapter.js +228 -0
- package/dist/integrations/harnesses/opencode-sdk/wire.js +66 -0
- package/dist/integrations/harnesses/openhands/index.js +1 -0
- package/dist/integrations/harnesses/pi/index.js +1 -0
- package/dist/integrations/harnesses/shared.js +2 -0
- package/dist/integrations/harnesses/types.js +2 -0
- package/dist/llm/client.js +74 -14
- package/dist/output/cli-hints.js +1 -1
- package/dist/output/context.js +10 -19
- package/dist/output/format-exempt.js +5 -8
- package/dist/output/shapes/helpers.js +1 -22
- package/dist/output/shapes/passthrough.js +0 -1
- package/dist/output/shapes.js +3 -31
- package/dist/output/stdout.js +5 -1
- package/dist/output/text/command-format.js +6 -1
- package/dist/output/text/workflow-format.js +4 -22
- package/dist/scripts/akm-migrate-node.js +15746 -16706
- package/dist/scripts/akm-migrate.js +16319 -17275
- package/dist/setup/detect.js +10 -4
- package/dist/setup/harness-config-import.js +5 -14
- package/dist/setup/setup.js +1 -1
- package/dist/setup/steps/tasks.js +12 -13
- package/dist/storage/repositories/task-history-repository.js +0 -5
- package/dist/storage/repositories/workflow-runs-repository.js +5 -15
- package/dist/tasks/embedded.js +2 -1
- package/dist/tasks/run/task-history.js +0 -2
- package/dist/tasks/schedule-gates.js +39 -0
- package/dist/tasks/scheduler-binding.js +0 -16
- package/dist/tasks/scheduler-sync.js +3 -97
- package/dist/tasks/source/bounded-document.js +1 -1
- package/dist/tasks/source/task-source-v4.js +2 -12
- package/dist/tasks/task-run-reserved-flags.js +2 -31
- package/dist/workflows/authoring/authoring.js +6 -6
- package/dist/workflows/compile.js +8 -65
- package/dist/workflows/exec/child-workflow.js +22 -3
- package/dist/workflows/exec/native-executor.js +12 -147
- package/dist/workflows/exec/run-workflow.js +31 -103
- package/dist/workflows/exec/step-work.js +9 -178
- package/dist/workflows/exec/unit-dispatch.js +0 -10
- package/dist/workflows/freeze/environment.js +3 -44
- package/dist/workflows/freeze/freeze.js +8 -41
- package/dist/workflows/freeze/targets/child-workflow.js +27 -63
- package/dist/workflows/freeze/targets/command.js +2 -16
- package/dist/workflows/freeze/targets/shell.js +0 -2
- package/dist/workflows/freeze/task-bindings.js +2 -28
- package/dist/workflows/ir/params.js +12 -2
- package/dist/workflows/parser.js +82 -232
- package/dist/workflows/plan.js +1 -1
- package/dist/workflows/renderer.js +10 -19
- package/dist/workflows/runtime/run-plan.js +11 -53
- package/dist/workflows/runtime/runs.js +4 -27
- package/dist/workflows/source-files.js +12 -16
- package/dist/workflows/source-semantics.js +1 -93
- package/docs/README.md +43 -42
- package/docs/agents/README.md +15 -0
- package/docs/agents/agent-install.md +14 -0
- package/docs/architecture/README.md +67 -0
- package/docs/architecture/adapters.md +258 -0
- package/docs/architecture/akm-architecture-decision-history.md +2055 -0
- package/docs/architecture/akm-core-principles.md +126 -0
- package/docs/architecture/architecture.md +578 -0
- package/docs/architecture/comparisons/claude-code-vs-akm-workflows-full.md +550 -0
- package/docs/architecture/decisions/0001-no-interpolation-attached-structured-context.md +72 -0
- package/docs/architecture/decisions/0002-unit-reuse-and-input-hash-scope.md +142 -0
- package/docs/architecture/decisions/0003-child-env-allowlist-and-provenance.md +189 -0
- package/docs/architecture/decisions/0004-task-input-contract-and-flag-coercion.md +97 -0
- package/docs/architecture/decisions/0005-task-result-vocabulary-and-legacy-read-mapping.md +108 -0
- package/docs/architecture/decisions/0006-task-source-version-routing.md +124 -0
- package/docs/architecture/decisions/0007-workflow-composition-bounds.md +83 -0
- package/docs/architecture/decisions/0008-task-binding-normalization.md +88 -0
- package/docs/architecture/decisions/0009-child-run-publication-column-parity.md +80 -0
- package/docs/architecture/decisions/0010-driver-protocol-cut.md +36 -0
- package/docs/architecture/decisions/0011-engine-run-loop-invariants.md +125 -0
- package/docs/architecture/decisions/README.md +62 -0
- package/docs/architecture/improvement.md +471 -0
- package/docs/architecture/internals/classification.md +154 -0
- package/docs/architecture/internals/fresh-host-rebuild-runbook.md +40 -0
- package/docs/architecture/internals/functional-contract-patterns.md +340 -0
- package/docs/architecture/internals/health-advisories.md +110 -0
- package/docs/architecture/internals/improve-workflow.md +720 -0
- package/docs/architecture/internals/indexing.md +498 -0
- package/docs/architecture/internals/registry-network-boundary.md +57 -0
- package/docs/architecture/internals/search.md +248 -0
- package/docs/architecture/internals/storage-locations.md +943 -0
- package/docs/architecture/persisted-data-compat.md +68 -0
- package/docs/architecture/reviews/env-secret-access.md +319 -0
- package/docs/architecture/runtime-boundary-design.md +153 -0
- package/docs/architecture/specs/0.9.0-close-out-plan.md +361 -0
- package/docs/architecture/specs/0.9.0-decisions.md +532 -0
- package/docs/architecture/specs/0.9.0-docs-code-drift-register.md +745 -0
- package/docs/architecture/specs/0.9.0-open-items-register.md +135 -0
- package/docs/architecture/specs/0.9.0-public-api-issue-backlog.md +740 -0
- package/docs/architecture/specs/0.9.0-release-surface-review.md +636 -0
- package/docs/architecture/specs/agent-command-engine-model-design.md +513 -0
- package/docs/architecture/specs/akm-0.9.0-bundle-adapter-spec.md +501 -0
- package/docs/architecture/specs/akm-0.9.0-ref-grammar-decision.md +291 -0
- package/docs/architecture/specs/akm-format-neutral-bundle-workspace-spec.md +2059 -0
- package/docs/architecture/specs/di-seams-plan.md +539 -0
- package/docs/architecture/specs/driver-protocol-keep-or-cut.md +275 -0
- package/docs/architecture/specs/fact-asset-type.md +142 -0
- package/docs/architecture/specs/improve-collapse-churn-detector-design.md +634 -0
- package/docs/architecture/specs/okf-support.md +148 -0
- package/docs/architecture/specs/ref.md +329 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/README.md +72 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/findings-consolidated.md +152 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-alternatives.md +352 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-bunqueue.md +300 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-openworkflow.md +402 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-1.md +758 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-2.md +645 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-3.md +602 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-adversarial.md +27 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-architecture.md +27 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-coverage.md +74 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-security.md +15 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-adversarial.md +132 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-verification.md +147 -0
- package/docs/architecture/specs/stash-conventions-code-spec.md +275 -0
- package/docs/architecture/specs/stash-organization-conventions.md +377 -0
- package/docs/architecture/specs/task-workflow-format-unification.md +721 -0
- package/docs/architecture/specs/workflow-engine-buy-vs-build.md +231 -0
- package/docs/architecture/specs/workflow-format-unification.md +432 -0
- package/docs/architecture/testing/manual-testing-checklist.md +3411 -0
- package/docs/architecture/testing/okf-v0.2-conformance-runbook.md +924 -0
- package/docs/architecture/testing/task-workflow-manual-tests.md +1720 -0
- package/docs/architecture/testing/testing-workflow.md +446 -0
- package/docs/architecture/workflow-engine.md +223 -0
- package/docs/guides/README.md +33 -0
- package/docs/guides/author-bundles.md +310 -0
- package/docs/guides/author-workflows.md +490 -0
- package/docs/guides/bundles.md +321 -0
- package/docs/guides/capture-knowledge.md +136 -0
- package/docs/guides/claude-code-vs-akm-workflows.md +29 -0
- package/docs/guides/concepts.md +93 -0
- package/docs/guides/discover-and-load.md +158 -0
- package/docs/guides/getting-started.md +240 -0
- package/docs/guides/improve-the-library.md +246 -0
- package/docs/guides/knowledge-management.md +18 -0
- package/docs/guides/recipes/headless-install.md +97 -0
- package/docs/guides/recipes/website-source.md +28 -0
- package/docs/guides/run-workflows.md +279 -0
- package/docs/guides/scheduling.md +123 -0
- package/docs/guides/use-with-any-agent.md +174 -0
- package/docs/guides/wikis.md +81 -0
- package/docs/integration/bundling-akm.md +7 -6
- package/docs/maintainers/README.md +19 -0
- package/docs/maintainers/curate-workmap.md +335 -0
- package/docs/maintainers/eval.md +3 -0
- package/docs/maintainers/local-development.md +108 -0
- package/docs/maintainers/release-checklist.md +132 -0
- package/docs/migration/README.md +2 -2
- package/docs/migration/release-notes/0.0.13.md +1 -1
- package/docs/migration/release-notes/0.1.0.md +1 -1
- package/docs/migration/release-notes/0.2.0.md +1 -1
- package/docs/migration/release-notes/0.3.0.md +1 -1
- package/docs/migration/release-notes/0.5.0.md +1 -1
- 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.7.3.md +2 -2
- package/docs/migration/release-notes/0.7.4.md +1 -1
- package/docs/migration/release-notes/0.7.5.md +1 -1
- package/docs/migration/release-notes/0.8.0.md +1 -1
- package/docs/migration/release-notes/0.9.0.md +1 -1
- package/docs/migration/release-notes/0.9.14.md +1 -1
- package/docs/migration/release-notes/0.9.15.md +1 -1
- package/docs/migration/release-notes/0.9.16.md +1 -1
- package/docs/migration/release-notes/0.9.17.md +1 -1
- package/docs/migration/release-notes/0.9.19.md +1 -1
- package/docs/migration/release-notes/0.9.2.md +1 -1
- package/docs/migration/release-notes/README.md +27 -31
- package/docs/migration/v0.5-to-v0.6.md +759 -0
- package/docs/migration/v0.8-to-v0.9.md +1 -1
- package/docs/plans/0.9.2-agent-command-workflow-plan.md +423 -0
- package/docs/posts/README.md +30 -0
- package/docs/posts/akm-command-tour.md +495 -0
- package/docs/posts/akm-logo-sized.webp +0 -0
- package/docs/posts/belief-aware-memory-12.md +139 -0
- package/docs/posts/config-v2-lessons-16.md +191 -0
- package/docs/posts/improve-loop-autonomous-10.md +225 -0
- package/docs/posts/improve-pipeline-debugging-0803.md +179 -0
- package/docs/posts/intro-part-01.md +76 -0
- package/docs/posts/intro-part-02.md +221 -0
- package/docs/posts/intro-part-03.md +190 -0
- package/docs/posts/intro-part-04.md +221 -0
- package/docs/posts/llm-mode-reflect-13.md +166 -0
- package/docs/posts/openpalm-built-on-akm.md +86 -0
- package/docs/posts/progressive-disclosure-06.md +129 -0
- package/docs/posts/proposal-safety-net-15.md +112 -0
- package/docs/posts/release-0.5.0.md +247 -0
- package/docs/posts/release-0.6.0.md +117 -0
- package/docs/posts/release-0.7.0.md +159 -0
- package/docs/posts/release-0.8.0.md +332 -0
- package/docs/posts/scattered-skills-05.md +100 -0
- package/docs/posts/task-assets-persistent-workflows-11.md +222 -0
- package/docs/posts/team-skills-07.md +198 -0
- package/docs/posts/wiki-agent-knowledge-08.md +223 -0
- package/docs/posts/workflows-vaults-09.md +321 -0
- package/docs/product-surface.md +54 -0
- package/docs/reference/README.md +2 -2
- package/docs/reference/api.md +65 -0
- package/docs/reference/asset-types.md +166 -0
- package/docs/reference/bundle-types.md +2 -4
- package/docs/reference/cli.md +129 -175
- package/docs/reference/configuration.md +84 -19
- package/docs/reference/data-and-telemetry.md +1 -1
- package/docs/reference/env-and-secrets.md +126 -0
- package/docs/reference/memory.md +124 -0
- package/docs/reference/refs.md +156 -0
- package/docs/reference/registry.md +489 -0
- package/docs/reference/supported-formats.md +3 -4
- package/docs/reference/tasks.md +12 -19
- package/docs/reference/website-sources.md +141 -0
- package/docs/reference/workflow-schema.md +89 -317
- package/docs/reference/workflows.md +20 -48
- package/package.json +23 -16
- package/schemas/akm-config.json +2 -243
- package/schemas/akm-task.json +2 -3
- package/schemas/akm-workflow.json +47 -84
- package/dist/assets/improve-strategies/catchup.json +0 -41
- package/dist/assets/improve-strategies/proactive-maintenance.json +0 -24
- package/dist/assets/improve-strategies/quick.json +0 -17
- package/dist/assets/improve-strategies/reflect-distill.json +0 -29
- package/dist/assets/improve-strategies/thorough.json +0 -49
- package/dist/assets/tasks/improve/akm-improve-catchup.yml +0 -6
- package/dist/assets/tasks/improve/akm-improve-frequent.yml +0 -4
- package/dist/assets/tasks/improve/akm-improve-nightly.yml +0 -4
- package/dist/cli/retired-commands.js +0 -118
- package/dist/commands/tasks/validate.js +0 -176
- package/dist/core/config/legacy-source-shape-shim.js +0 -117
- package/dist/integrations/harnesses/ids.js +0 -28
- package/dist/tasks/source/task-source-v3-frozen.js +0 -424
- package/dist/tasks/source/task-to-v4.js +0 -863
- package/dist/workflows/exec/worktree.js +0 -372
- package/dist/workflows/freeze/child-output-references.js +0 -83
- package/dist/workflows/freeze/identity.js +0 -22
- package/dist/workflows/freeze/targets/script.js +0 -50
- package/dist/workflows/freeze/targets/task.js +0 -124
- package/dist/workflows/github-yaml.js +0 -506
- package/dist/workflows/runtime/run-outputs.js +0 -80
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Recipe: Headless Install
|
|
2
|
+
|
|
3
|
+
A precise, no-prompts sequence for automated or agent-driven setup of `akm` —
|
|
4
|
+
no interactive wizard, no assumed defaults.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
#!/usr/bin/env bash
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
# 1. Install (standalone binary, runtime-free)
|
|
11
|
+
curl -fsSL https://github.com/itlackey/akm/releases/latest/download/install.sh | bash
|
|
12
|
+
|
|
13
|
+
# 2. Initialize the bundle directory and accept all defaults (no prompts)
|
|
14
|
+
akm setup --yes
|
|
15
|
+
|
|
16
|
+
# 3. Don't rely on the implicit semantic-search default in an unattended
|
|
17
|
+
# script — the default can vary by release and by install path. Set it
|
|
18
|
+
# explicitly so this script's behavior is deterministic. `auto` uses local
|
|
19
|
+
# embeddings (downloaded on first index run); `off` skips them entirely.
|
|
20
|
+
akm config set semanticSearchMode auto
|
|
21
|
+
|
|
22
|
+
# 4. Add sources (adjust paths as needed)
|
|
23
|
+
akm bundle add /path/to/skills
|
|
24
|
+
|
|
25
|
+
# 5. Build the search index (downloads the embedding model on first run if
|
|
26
|
+
# semantic search is enabled)
|
|
27
|
+
akm index
|
|
28
|
+
|
|
29
|
+
# 6. Verify
|
|
30
|
+
akm info
|
|
31
|
+
akm search "test"
|
|
32
|
+
|
|
33
|
+
# 7. Install agent guidance
|
|
34
|
+
akm hints --detail brief >> AGENTS.md
|
|
35
|
+
|
|
36
|
+
echo "akm setup complete"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Notes on each step
|
|
40
|
+
|
|
41
|
+
**Install.** The standalone binary (step 1) is runtime-free. The npm package
|
|
42
|
+
(`npm install -g akm-cli`, or one-shot via `npx akm-cli <command>`) requires
|
|
43
|
+
Node.js >= 22; a working Bun >= 1.0 is optional and preferred for execution
|
|
44
|
+
after Node starts the package launcher.
|
|
45
|
+
|
|
46
|
+
**Setup.** `akm setup --yes` accepts every default with no prompts. To
|
|
47
|
+
pre-configure an LLM or agent engine at the same time instead of accepting
|
|
48
|
+
defaults, pass `--config` with a JSON object, optionally followed by
|
|
49
|
+
`--probe` to verify connectivity:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
akm setup --config '{
|
|
53
|
+
"engines": {
|
|
54
|
+
"default": {
|
|
55
|
+
"kind": "llm",
|
|
56
|
+
"endpoint": "http://localhost:11434/v1/chat/completions",
|
|
57
|
+
"model": "llama3.2"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"defaults": { "llmEngine": "default" }
|
|
61
|
+
}' --probe
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For the full set of accepted top-level `--config` keys and their meaning,
|
|
65
|
+
see [configuration.md](../../reference/configuration.md).
|
|
66
|
+
|
|
67
|
+
**Semantic search.** Headless setups (`--yes` or `--config`, no wizard
|
|
68
|
+
prompts) defer the embedding-model download to the first `akm index` run,
|
|
69
|
+
unlike the interactive wizard which downloads immediately during `akm
|
|
70
|
+
setup`. Set the mode explicitly rather than relying on the implicit default:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
akm config set semanticSearchMode auto # local embeddings, downloaded on first index
|
|
74
|
+
akm config set semanticSearchMode off # skip embeddings entirely
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
For resource requirements and remote-embedding alternatives, see
|
|
78
|
+
[configuration.md](../../reference/configuration.md).
|
|
79
|
+
|
|
80
|
+
**Add source.** `akm bundle add <path|github:owner/repo|@scope/package>`
|
|
81
|
+
registers a directory or package as a source. Add every source before
|
|
82
|
+
indexing.
|
|
83
|
+
|
|
84
|
+
**Index and verify.** `akm index` builds the search index; `akm info` reports
|
|
85
|
+
`indexStats.entryCount` and `semanticSearch.status`; `akm search "<query>"`
|
|
86
|
+
confirms retrieval actually returns results.
|
|
87
|
+
|
|
88
|
+
**Install agent guidance.** `akm hints --detail brief >> AGENTS.md` appends the
|
|
89
|
+
canonical usage block agents need to discover and use the library. Run this
|
|
90
|
+
after indexing so the guidance matches the installed version.
|
|
91
|
+
|
|
92
|
+
## See also
|
|
93
|
+
|
|
94
|
+
- [configuration.md](../../reference/configuration.md) — full configuration
|
|
95
|
+
key reference
|
|
96
|
+
- [docs/agents/agent-install.md](../../agents/agent-install.md) — agent-facing
|
|
97
|
+
entry point that links here
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Recipe: Turn a Website into a Searchable Bundle
|
|
2
|
+
|
|
3
|
+
Crawl a documentation site into markdown knowledge assets you can search and
|
|
4
|
+
show like any other source.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
akm bundle add https://docs.example.com --name docs
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Website sources are crawled and converted to markdown knowledge assets, then
|
|
11
|
+
indexed locally — no different from a local directory or a git bundle once
|
|
12
|
+
they're in.
|
|
13
|
+
|
|
14
|
+
Control the crawl scope with `--max-pages` and `--max-depth`:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
akm bundle add https://www.agentic-patterns.com/ --name agent-patterns --max-pages 100
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Reindex and search once the crawl finishes:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
akm index
|
|
24
|
+
akm search "agent" --type knowledge
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
See [Registry](../../reference/registry.md) for the full install flow and
|
|
28
|
+
supported ref formats.
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# Running Workflows
|
|
2
|
+
|
|
3
|
+
This guide walks through operating a workflow run day to day: starting or
|
|
4
|
+
continuing one, checking on it, resuming it after it blocks, and abandoning
|
|
5
|
+
one you no longer want. It assumes you already know what a workflow is; see
|
|
6
|
+
[Workflow Schema](../reference/workflow-schema.md) for the exact frontmatter
|
|
7
|
+
and body syntax, and
|
|
8
|
+
[Architecture: The Workflow Engine](../architecture/workflow-engine.md) for
|
|
9
|
+
what happens under the hood (frozen plans, dispatch, resume-without-replay).
|
|
10
|
+
For task/schedule-driven workflow runs — akm tasks and the OS scheduler —
|
|
11
|
+
see [Scheduling](scheduling.md).
|
|
12
|
+
|
|
13
|
+
## Start or continue a run
|
|
14
|
+
|
|
15
|
+
`akm workflow run <run-id|workflows/ref>` starts or continues a persisted run
|
|
16
|
+
and executes it until completion, failure, verification rejection,
|
|
17
|
+
interruption, or an explicit invocation limit. Run state is scoped to the
|
|
18
|
+
current project directory (nearest `.akm/config.json`, git root, bundle root,
|
|
19
|
+
or current directory), so the same workflow can run independently in separate
|
|
20
|
+
projects.
|
|
21
|
+
|
|
22
|
+
Every new run/start compiles source IR v1 and freezes the durable plan v4
|
|
23
|
+
family's current executable format (`irVersion: 5`) before publishing the run.
|
|
24
|
+
A workflow ref is a Markdown `.md` source.
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
akm workflow run workflows/ship-release --version 1.2.3
|
|
28
|
+
akm workflow run workflows/review --changed_files a.ts --changed_files b.ts
|
|
29
|
+
akm workflow run <run-id> --max-retries 2 --timeout 10m
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Parameter flags must come after the target and exactly match declared
|
|
33
|
+
`params` keys. Values are coerced through each parameter's JSON Schema:
|
|
34
|
+
repeat an array flag, pass an object or whole array as JSON, and use a bare
|
|
35
|
+
boolean flag for `true`. There are no hyphen/underscore aliases. Parameters
|
|
36
|
+
are accepted only while creating a new run — a later invocation against an
|
|
37
|
+
active run rejects parameter flags.
|
|
38
|
+
|
|
39
|
+
`--max-steps <n>` leaves a partial run active after at most `n` steps.
|
|
40
|
+
`--max-retries <n>` retries a failed step on the same run up to `n` additional
|
|
41
|
+
times (0 through 100). `--timeout <duration>` bounds the whole invocation and
|
|
42
|
+
accepts `N`, `Nms`, `Ns`, or `Nm`; bare `N` is milliseconds. A timeout or
|
|
43
|
+
signal abort releases the run's lock without advancing the active step, so the
|
|
44
|
+
run remains resumable. Failed, gate-rejected, timed-out, and interrupted runs
|
|
45
|
+
exit nonzero.
|
|
46
|
+
|
|
47
|
+
The run freezes its plan, exact models, execution limits, parameter snapshot,
|
|
48
|
+
and verifier selection at creation — edits to source or config do not alter
|
|
49
|
+
an in-flight run. See
|
|
50
|
+
[Architecture: Frozen plans](../architecture/workflow-engine.md#frozen-plans)
|
|
51
|
+
for why.
|
|
52
|
+
|
|
53
|
+
## Check status
|
|
54
|
+
|
|
55
|
+
`akm workflow status` shows the full run state — all step statuses, notes,
|
|
56
|
+
and evidence — for a given run ID or workflow ref.
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
akm workflow status <run-id>
|
|
60
|
+
akm workflow status workflows/ship-release
|
|
61
|
+
# When given a ref, resolves to the most-recently-updated run in the current scope
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Use this to inspect where a run is after a context window break, or to verify
|
|
65
|
+
all steps completed cleanly before closing a PR.
|
|
66
|
+
|
|
67
|
+
**`--units` — per-unit diagnostics.** For an orchestrated run, add `--units`
|
|
68
|
+
to also list the run's journaled unit rows — each unit's id, status,
|
|
69
|
+
`failure_reason`, and any result/error diagnostic text the row carries:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
akm workflow status <run-id> --units
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This is a **diagnostic** surface, deliberately kept out of the deterministic
|
|
76
|
+
artifact graph. A step's promoted artifact (what `steps.x.output` resolves to,
|
|
77
|
+
and what a gate judges) keeps only a failed unit's structured `failure_reason`
|
|
78
|
+
— never the raw error text — so step evidence stays reproducible across
|
|
79
|
+
resumes. When you need the human-facing *why* behind a failure, `--units`
|
|
80
|
+
reads the unit journal directly and shows it without ever feeding that text
|
|
81
|
+
back into an artifact or input hash.
|
|
82
|
+
|
|
83
|
+
## Child runs
|
|
84
|
+
|
|
85
|
+
A step that composes another workflow (see [Workflow Schema: Child
|
|
86
|
+
workflows](../reference/workflow-schema.md#child-workflows)) drives that
|
|
87
|
+
child inline when the composing step runs. `akm workflow status` on a run
|
|
88
|
+
that composes children renders a `children:` tree after its `steps:` block:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
akm workflow status <run-id>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
steps:
|
|
96
|
+
- build [work] (completed)
|
|
97
|
+
- dispatch [dispatch] (completed)
|
|
98
|
+
children:
|
|
99
|
+
- ✓ 4f2b1a9c workflows/leaf [completed] (step "dispatch")
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Each row shows the child's run id, its workflow ref, its status, and which
|
|
103
|
+
of the parent's steps spawned it; a blocked child also shows its resume
|
|
104
|
+
command. Nesting reflects composition depth — a child that itself composes
|
|
105
|
+
a grandchild shows its own indented `children:` rows.
|
|
106
|
+
|
|
107
|
+
**Recovering a blocked child.** A blocked child blocks the composing step
|
|
108
|
+
(and the parent run) too — `akm` will not resume a child for you. Resume the
|
|
109
|
+
**child** first, then resume and re-run the **parent**; re-driving the
|
|
110
|
+
parent is what advances it, because that re-enters the composing step and
|
|
111
|
+
drives the now-resumed child:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
akm workflow resume <childRunId>
|
|
115
|
+
akm workflow resume <parentRunId>
|
|
116
|
+
akm workflow run <parentRunId>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Nested blocks (composition depth 2+).** The three-command sequence above
|
|
120
|
+
clears a block exactly one level deep. When a grandchild blocks — a root
|
|
121
|
+
workflow composes a child, and that child composes the grandchild that
|
|
122
|
+
actually blocks — re-driving the root does **not** cascade down into
|
|
123
|
+
re-driving the still-blocked grandchild: a composing step never re-drives a
|
|
124
|
+
child whose own status is already `blocked`, so re-running the root just
|
|
125
|
+
re-observes the child's block and re-blocks the root the same way, without
|
|
126
|
+
ever reaching the grandchild. Resume **every** blocked run in the chain,
|
|
127
|
+
deepest first, then re-run only the root:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
akm workflow resume <grandchildRunId>
|
|
131
|
+
akm workflow resume <childRunId>
|
|
132
|
+
akm workflow resume <rootRunId>
|
|
133
|
+
akm workflow run <rootRunId>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The status tree prints `resume`/`then` commands on each blocked node, but
|
|
137
|
+
those two commands alone only ever name that node and the root — they do not
|
|
138
|
+
enumerate an intermediate chain. Read the tree top to bottom and resume every
|
|
139
|
+
`blocked` row you see (deepest first) before re-running the root.
|
|
140
|
+
|
|
141
|
+
**Child runs are hidden by default.** `akm workflow list` excludes child
|
|
142
|
+
runs so the list stays a view of the runs you started; pass `--children` to
|
|
143
|
+
include them:
|
|
144
|
+
|
|
145
|
+
```sh
|
|
146
|
+
akm workflow list # child runs excluded
|
|
147
|
+
akm workflow list --children # child runs included
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
A child run id always works directly, listed or not — `akm workflow status
|
|
151
|
+
<childRunId>`, `resume`, `abandon`, and `run` all operate on it exactly like
|
|
152
|
+
any other run.
|
|
153
|
+
|
|
154
|
+
## List runs in scope
|
|
155
|
+
|
|
156
|
+
`akm workflow list` shows workflow runs in the current scope.
|
|
157
|
+
|
|
158
|
+
```sh
|
|
159
|
+
akm workflow list # All runs in this scope (any status)
|
|
160
|
+
akm workflow list --active # Only status=active (executable) runs
|
|
161
|
+
akm workflow list --ref workflows/ship-release # Runs for a specific workflow
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
`--active` filters to runs whose status is exactly `active` — currently
|
|
165
|
+
executable work. A `blocked` run (parked awaiting a human `akm workflow
|
|
166
|
+
resume`) or a `failed`/`completed` run is **not** active and is excluded, so a
|
|
167
|
+
script that treats `--active` output as runnable never picks one up. Blocked
|
|
168
|
+
runs remain listed by the unfiltered `akm workflow list` with their `blocked`
|
|
169
|
+
status.
|
|
170
|
+
|
|
171
|
+
**Example: see what is in flight**
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
akm workflow list --active
|
|
175
|
+
# → lists runs by workflow ref, status, currentStepId, and updatedAt
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Resume a blocked or failed run
|
|
179
|
+
|
|
180
|
+
```sh
|
|
181
|
+
akm workflow resume <run-id>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Flips a `blocked` or `failed` run back to `active`. Completed runs cannot be
|
|
185
|
+
resumed. Use `akm workflow list` to find runs by status. Once resumed,
|
|
186
|
+
`akm workflow run <run-id>` continues it — units already journaled as
|
|
187
|
+
completed are skipped, not re-run (see
|
|
188
|
+
[Architecture: Resume skips completed units](../architecture/workflow-engine.md#resume-skips-completed-units)).
|
|
189
|
+
|
|
190
|
+
A resume consumes the frozen plan and journaled attempts; it does not re-read
|
|
191
|
+
configuration or the index, and reads the authored workflow only to warn once
|
|
192
|
+
when it changed since the run was frozen (the run continues on the frozen
|
|
193
|
+
plan; `akm workflow run <ref> --new` picks up the edit). A stored plan this akm
|
|
194
|
+
cannot decode is abandoned with a message naming how to start a new run.
|
|
195
|
+
|
|
196
|
+
## Abandon a run
|
|
197
|
+
|
|
198
|
+
```sh
|
|
199
|
+
akm workflow abandon <run-id>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Marks a run failed so it stops counting as active. This only changes the
|
|
203
|
+
run's status — `resume` can still reopen it later if you change your mind.
|
|
204
|
+
|
|
205
|
+
## Follow a run's events
|
|
206
|
+
|
|
207
|
+
There is no `akm workflow watch` (0.9.0: dropped — a foreground polling
|
|
208
|
+
daemon in a one-shot CLI). `akm log --run <run-id>` reads the same
|
|
209
|
+
`workflow_*` / `workflow_unit_*` events from the general append-only events
|
|
210
|
+
stream: `--since '@offset:<id>'` gives a durable row-id cursor a cooperating
|
|
211
|
+
process can poll from, in place of `watch --stream`'s in-process loop.
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
akm workflow run <run-id> & # engine in one shell
|
|
215
|
+
akm log --run <run-id> --since '@offset:0' # backlog so far
|
|
216
|
+
akm log --run <run-id> --since '@offset:<nextOffset>' # poll for more, from the prior call's nextOffset
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Event metadata is ids/status/enums only — never workflow-authored content —
|
|
220
|
+
so following a run's events is safe to pipe into logs or dashboards.
|
|
221
|
+
|
|
222
|
+
## Security: workflow sources are executed code
|
|
223
|
+
|
|
224
|
+
Workflow steps that include shell commands run with **the full filesystem and
|
|
225
|
+
network access of the user invoking `akm workflow run`** — same as if the user
|
|
226
|
+
had typed those commands in their shell. There is no sandbox and no separation
|
|
227
|
+
between trusted and untrusted workflows. An `exec` unit's *environment* is
|
|
228
|
+
narrowed to an allowlist by default
|
|
229
|
+
([Workflow Schema](../reference/workflow-schema.md#the-childs-environment-is-an-allowlist)),
|
|
230
|
+
which bounds accidental exposure of unrelated credentials — but a command that
|
|
231
|
+
runs at all can still read those credentials off disk, so it is a hygiene
|
|
232
|
+
boundary, not a containment one. AKM
|
|
233
|
+
directly orchestrates workflows as a defined execution surface — it does not
|
|
234
|
+
blindly execute arbitrary indexed content — but that orchestration still runs
|
|
235
|
+
the workflow's own declared shell commands with your full access once you
|
|
236
|
+
choose to run it.
|
|
237
|
+
|
|
238
|
+
This is by design: a workflow is a runbook authored by you or by a bundle
|
|
239
|
+
maintainer you trust. The flexibility of "run any shell command, read any
|
|
240
|
+
file, hit any network" is what makes workflows useful as automation.
|
|
241
|
+
|
|
242
|
+
The consequence is that **you should treat workflow sources the same way you
|
|
243
|
+
treat package dependencies**:
|
|
244
|
+
|
|
245
|
+
- **Only add workflow sources you trust.** `akm bundle add github:<some-user>/<bundle-repo>`
|
|
246
|
+
followed by `akm workflow run workflows/<their-thing>` is functionally
|
|
247
|
+
equivalent to piping a stranger's bash script into your shell. Read the
|
|
248
|
+
workflow file first (`akm show workflows/<name>`) before running it.
|
|
249
|
+
- **Audit before run** for any workflow that touches secrets, deploys to
|
|
250
|
+
production, or writes outside the project tree. Read the `env:` bindings a
|
|
251
|
+
workflow declares, and read its `exec.pass_env` lines.
|
|
252
|
+
The durable v4 family (`irVersion: 5`) rejects `inherit_env`. Authors must
|
|
253
|
+
use exact named bindings and `pass_env` names.
|
|
254
|
+
- **Pin known-good versions** when adding workflow sources from a registry
|
|
255
|
+
or git remote (`akm bundle add github:owner/repo#v1.2.3`), and update
|
|
256
|
+
deliberately rather than via `akm bundle update --all`. A trusted workflow
|
|
257
|
+
source can become hostile if its upstream is compromised.
|
|
258
|
+
- **Workflow steps cannot escape this trust model** by being labeled
|
|
259
|
+
`dryRun` or `interactive` — those flags affect bookkeeping, not execution.
|
|
260
|
+
`akm workflow status` is read-only; `akm workflow run` executes configured
|
|
261
|
+
units with your process's access.
|
|
262
|
+
|
|
263
|
+
If you operate a CI runner or shared host where untrusted workflows might be
|
|
264
|
+
executed, scope the process: a dedicated user account with no secrets in its
|
|
265
|
+
environment, ephemeral working directory, and a network/filesystem allowlist
|
|
266
|
+
enforced outside akm.
|
|
267
|
+
|
|
268
|
+
## See also
|
|
269
|
+
|
|
270
|
+
- [Workflow Schema](../reference/workflow-schema.md) — exact frontmatter,
|
|
271
|
+
refs, gates, and outputs syntax
|
|
272
|
+
- [Author's Guide: Writing Workflows](../guides/author-workflows.md) —
|
|
273
|
+
writing and testing a workflow definition
|
|
274
|
+
- [Architecture: The Workflow Engine](../architecture/workflow-engine.md) —
|
|
275
|
+
persistence, dispatch, and resume internals
|
|
276
|
+
- [Scheduling](scheduling.md) — running akm tasks (including workflow runs)
|
|
277
|
+
through the OS scheduler
|
|
278
|
+
- [CLI Reference](../reference/cli.md) — full flag documentation for all
|
|
279
|
+
`workflow` subcommands
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Scheduling
|
|
2
|
+
|
|
3
|
+
This guide covers running akm tasks — `akm improve` and other background
|
|
4
|
+
work — through the OS scheduler (cron / launchd / schtasks) safely: how
|
|
5
|
+
`akm setup` reviews task definitions before touching the scheduler, how to
|
|
6
|
+
verify the result, and how to migrate or repair scheduler bindings after
|
|
7
|
+
moving or reinstalling akm.
|
|
8
|
+
|
|
9
|
+
## Review tasks during setup
|
|
10
|
+
|
|
11
|
+
Interactive setup reviews every embedded task definition — both the
|
|
12
|
+
general-purpose core task-template set and the maintainer-oriented
|
|
13
|
+
multi-cadence improve task set — in one pass. See the
|
|
14
|
+
[task CLI reference](../reference/cli.md#task) for the full template list.
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
akm setup
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Before any OS scheduler change, setup shows every reviewed task's schedule
|
|
21
|
+
and enabled state and asks one explicit activation question. Confirming runs
|
|
22
|
+
the scheduler sync; declining leaves both task files and scheduler state
|
|
23
|
+
unchanged.
|
|
24
|
+
|
|
25
|
+
**Safety note:** schedule activation always requires an explicit confirmation
|
|
26
|
+
after reviewing the complete task summary. Nothing is written to the OS
|
|
27
|
+
scheduler without that review step.
|
|
28
|
+
|
|
29
|
+
## Verify
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
akm task doctor
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`akm task doctor` reports the scheduler backend, paths, task state, and
|
|
36
|
+
warnings — run it after any setup pass, and again after a `--rebind` (below),
|
|
37
|
+
to confirm the scheduler state matches what you expect.
|
|
38
|
+
|
|
39
|
+
## Non-interactive setup never activates schedules
|
|
40
|
+
|
|
41
|
+
`akm setup --yes`, config-file setup, and CI runs skip the task step
|
|
42
|
+
entirely: neither task definitions nor OS scheduler entries are created or
|
|
43
|
+
changed. Run interactive `akm setup` to review, prepare, and activate tasks.
|
|
44
|
+
|
|
45
|
+
## Task definitions vs. scheduler state
|
|
46
|
+
|
|
47
|
+
Task definitions live under `<bundle>/tasks/` as task source v4 `.yml` sources;
|
|
48
|
+
the [task source reference](../reference/tasks.md) defines their executable and
|
|
49
|
+
scheduling grammar. A definition cannot enable itself: the refs this host schedules live
|
|
50
|
+
separately in `config.json` under `scheduler.enabled`, a list of
|
|
51
|
+
fully-qualified refs. Use `akm task enable <bundle>//tasks/<id>` or `akm task
|
|
52
|
+
disable <ref>` to change it without editing bundle content. An unscoped `akm
|
|
53
|
+
task sync` installs exactly the listed refs from every enabled configured
|
|
54
|
+
bundle and removes akm-written bindings for refs that are gone or no longer
|
|
55
|
+
listed. Removing a bundle drops its refs from the list; disabling a bundle
|
|
56
|
+
leaves them inert.
|
|
57
|
+
|
|
58
|
+
Native scheduler entries are separate OS state. Activation captures the
|
|
59
|
+
installed akm runtime so scheduled execution does not silently switch to a
|
|
60
|
+
different checkout or package. Editing definitions and running ordinary `akm
|
|
61
|
+
task sync` preserves that captured runtime.
|
|
62
|
+
|
|
63
|
+
A scheduled fire re-reads the guarded current source and creates a fresh
|
|
64
|
+
durable-v4-family freeze at executable `irVersion: 5`.
|
|
65
|
+
Scheduler sync/validation evidence is not an executable snapshot and is never reused as the later run plan.
|
|
66
|
+
|
|
67
|
+
## A scheduled `akm improve` covers one bundle
|
|
68
|
+
|
|
69
|
+
An `akm improve` run improves one bundle, the one it writes to: `--bundle`,
|
|
70
|
+
else `defaultWriteTarget`, else the working bundle. A scheduled row sets
|
|
71
|
+
`AKM_BUNDLE_DIR` to the working bundle of the shell that synced it, so a
|
|
72
|
+
scheduled `akm improve` covers that bundle (or `defaultWriteTarget`, when set)
|
|
73
|
+
and leaves your other bundles alone, even the writable ones. To improve
|
|
74
|
+
another bundle on a schedule, give it a task of its own; the `--bundle` inside
|
|
75
|
+
the command is `akm improve`'s own:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
akm task add improve-team --schedule "15 3 * * *" \
|
|
79
|
+
--command "akm improve --bundle team --skip-if-locked --require-engines"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Rerunning setup preserves scheduler bindings
|
|
83
|
+
|
|
84
|
+
Rerunning `akm setup` preserves existing scheduler bindings by design — it
|
|
85
|
+
will not silently rebind entries that are already activated.
|
|
86
|
+
|
|
87
|
+
## Upgrades
|
|
88
|
+
|
|
89
|
+
A config written before 0.9.17 has no `scheduler.enabled` list. The first
|
|
90
|
+
`akm task sync` (or `setup`, `task enable`, `task disable`, `task add`) after
|
|
91
|
+
the upgrade takes the akm-written rows already installed in the native
|
|
92
|
+
scheduler as this host's choice, writes the list, and says so — a scheduled
|
|
93
|
+
task survives an upgrade by any install method with no manual step. An
|
|
94
|
+
explicit empty list is a choice: sync then removes every akm-written row.
|
|
95
|
+
`akm migrate status` reports anything else that remains pending, and why.
|
|
96
|
+
|
|
97
|
+
## Migrating or repairing scheduler bindings (`--rebind`)
|
|
98
|
+
|
|
99
|
+
If akm was moved, reinstalled under a different package prefix, or repaired
|
|
100
|
+
after an installation problem, migrate scheduler entries deliberately:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
akm task sync --rebind
|
|
104
|
+
akm task doctor
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Use `--rebind` only for that explicit runtime migration or repair — it
|
|
108
|
+
captures the current installed runtime, replacing whatever runtime a prior
|
|
109
|
+
activation had captured.
|
|
110
|
+
|
|
111
|
+
If you change the AKM storage path during reconfiguration, or move or install
|
|
112
|
+
akm at a new runtime path, follow setup with `akm task sync --rebind`; setup
|
|
113
|
+
never silently rebinds existing entries on your behalf.
|
|
114
|
+
|
|
115
|
+
## See also
|
|
116
|
+
|
|
117
|
+
- [Getting Started](getting-started.md) — the first-run path this guide was
|
|
118
|
+
split out of
|
|
119
|
+
- [CLI Reference: task](../reference/cli.md#task) — the full `task` command
|
|
120
|
+
group, including `add`, `enable`, `disable`, `run`, `sync`, `doctor`, and
|
|
121
|
+
`history`
|
|
122
|
+
- [Task source reference](../reference/tasks.md) — exact file grammar,
|
|
123
|
+
targets, triggers, and migration
|