akm-cli 0.9.1 → 0.9.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +103 -28
- package/README.md +3 -1
- package/SECURITY.md +1 -1
- package/STABILITY.md +1 -1
- package/dist/akm +2 -2
- package/dist/akm-migrate +2 -2
- package/dist/assets/hints/cli-hints-full.md +14 -9
- package/dist/assets/improve-strategies/proactive-maintenance.json +1 -1
- package/dist/assets/improve-strategies/reflect-distill.json +1 -1
- package/dist/assets/models.json +35 -0
- package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +3 -4
- package/dist/assets/stash-skeleton/facts/conventions/organization.md +1 -3
- package/dist/assets/tasks/core/extract.yml +6 -5
- package/dist/assets/tasks/core/improve.yml +6 -5
- package/dist/assets/tasks/core/index-refresh.yml +6 -5
- package/dist/assets/tasks/core/sync.yml +6 -5
- package/dist/assets/tasks/core/version-check.yml +6 -5
- package/dist/assets/tasks/improve/akm-graph-refresh-weekly.yml +6 -5
- package/dist/assets/tasks/improve/akm-improve-catchup.yml +6 -5
- package/dist/assets/tasks/improve/akm-improve-consolidate.yml +6 -5
- package/dist/assets/tasks/improve/akm-improve-frequent.yml +6 -5
- package/dist/assets/tasks/improve/akm-improve-nightly.yml +6 -5
- package/dist/cli/confirm.js +2 -2
- package/dist/cli/parse-args.js +3 -24
- package/dist/cli/retired-commands.js +1 -1
- package/dist/cli/shared.js +2 -2
- package/dist/cli.js +11 -9
- package/dist/commands/agent/agent-dispatch.js +55 -89
- package/dist/commands/agent/contribute-cli.js +12 -45
- package/dist/commands/command/builtin-action.js +32 -0
- package/dist/commands/command/command-cli.js +99 -0
- package/dist/commands/command/command-execution.js +308 -0
- package/dist/commands/command/execution-source-loader.js +176 -0
- package/dist/commands/command/portable-template.js +60 -0
- package/dist/commands/config-cli.js +10 -4
- package/dist/commands/env/env.js +4 -2
- package/dist/commands/feedback-cli.js +1 -1
- package/dist/commands/health/checks.js +241 -29
- package/dist/commands/health/html-report.js +0 -14
- package/dist/commands/health/report-view-model.js +0 -1
- package/dist/commands/health/surfaces.js +6 -7
- package/dist/commands/health/types.js +0 -2
- package/dist/commands/health.js +63 -18
- package/dist/commands/improve/collapse-detector.js +5 -6
- package/dist/commands/improve/consolidate.js +251 -214
- package/dist/commands/improve/distill/promote-memory.js +71 -34
- package/dist/commands/improve/distill/quality-gate.js +17 -5
- package/dist/commands/improve/distill.js +232 -155
- package/dist/commands/improve/eligibility.js +112 -79
- package/dist/commands/improve/execution.js +57 -0
- package/dist/commands/improve/extract-cli.js +5 -5
- package/dist/commands/improve/extract-prompt.js +64 -22
- package/dist/commands/improve/extract.js +608 -360
- package/dist/commands/improve/improve-strategies.js +43 -14
- package/dist/commands/improve/improve.js +249 -29
- package/dist/commands/improve/loop-stages.js +11 -17
- package/dist/commands/improve/memory/memory-contradiction-detect.js +90 -66
- package/dist/commands/improve/outcome-loop.js +22 -38
- package/dist/commands/improve/planner.js +134 -0
- package/dist/commands/improve/preparation.js +730 -409
- package/dist/commands/improve/reflect.js +386 -223
- package/dist/commands/improve/run-context.js +3 -4
- package/dist/commands/improve/salience.js +6 -58
- package/dist/commands/improve/session-asset.js +12 -12
- package/dist/commands/lint/index.js +101 -29
- package/dist/commands/migrate-cli.js +11 -69
- package/dist/commands/migration-tool.js +6 -9
- package/dist/commands/models-cli.js +27 -0
- package/dist/commands/proposal/drain.js +258 -186
- package/dist/commands/proposal/proposal-cli.js +32 -10
- package/dist/commands/proposal/proposal.js +2 -5
- package/dist/commands/proposal/propose.js +192 -172
- package/dist/commands/proposal/repository.js +54 -91
- package/dist/commands/proposal/validators/proposal-validators.js +9 -7
- package/dist/commands/read/curate.js +53 -22
- package/dist/commands/read/registry-search.js +25 -9
- package/dist/commands/read/remember-cli.js +14 -2
- package/dist/commands/read/search.js +10 -4
- package/dist/commands/read/show.js +139 -153
- package/dist/commands/registry-cli.js +16 -7
- package/dist/commands/remember.js +33 -18
- package/dist/commands/sources/add-cli.js +19 -178
- package/dist/commands/sources/bundle-cli.js +15 -3
- package/dist/commands/sources/dangerous-env-audit.js +135 -0
- package/dist/commands/sources/info.js +2 -1
- package/dist/commands/sources/installed-stashes.js +901 -177
- package/dist/commands/sources/schema-repair.js +174 -95
- package/dist/commands/sources/self-update.js +30 -74
- package/dist/commands/sources/source-add.js +3 -5
- package/dist/commands/sources/sources-cli.js +2 -15
- package/dist/commands/sources/update-transaction.js +220 -0
- package/dist/commands/tasks/tasks-cli.js +3 -3
- package/dist/commands/tasks/tasks.js +736 -317
- package/dist/commands/workflow-cli.js +2 -2
- package/dist/core/adapter/adapters/agent-skills-adapter.js +3 -0
- package/dist/core/adapter/adapters/akm-adapter.js +85 -35
- package/dist/core/adapter/adapters/akm-lint.js +54 -39
- package/dist/core/adapter/adapters/akm-metadata.js +45 -45
- package/dist/core/adapter/adapters/akm-task-adapter.js +32 -49
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +38 -23
- package/dist/core/adapter/adapters/dotenv-adapter.js +30 -1
- package/dist/core/adapter/adapters/generic-files-adapter.js +11 -0
- package/dist/core/adapter/adapters/index.js +0 -9
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +4 -0
- package/dist/core/adapter/adapters/okf-adapter.js +4 -0
- package/dist/core/adapter/adapters/opencode-adapter.js +5 -8
- package/dist/core/adapter/adapters/tool-dir-shared.js +63 -6
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +4 -0
- package/dist/core/adapter/execution-source.js +308 -0
- package/dist/core/adapter/recognize-match.js +36 -13
- package/dist/core/adapter/registry.js +0 -9
- package/dist/core/asset/stash-meta.js +94 -4
- package/dist/core/common.js +6 -11
- package/dist/core/config/config-io.js +3 -3
- package/dist/core/config/config-schema.js +18 -40
- package/dist/core/config/config-sources.js +11 -21
- package/dist/core/config/config-walker.js +31 -13
- package/dist/core/config/config.js +23 -26
- package/dist/core/config/schema/engines.js +8 -7
- package/dist/core/config/schema/improve-processes.js +29 -5
- package/dist/core/config/schema/index-config.js +0 -27
- package/dist/core/config/schema/primitives.js +1 -23
- package/dist/core/config/schema/sources-bundles.js +13 -16
- package/dist/core/errors.js +2 -0
- package/dist/core/events.js +68 -32
- package/dist/core/extra-params.js +1 -0
- package/dist/core/improve-result.js +315 -0
- package/dist/core/lesson-lint.js +0 -6
- package/dist/core/maintenance-barrier.js +4 -4
- package/dist/core/network-policy.js +152 -0
- package/dist/core/paths.js +1 -1
- package/dist/core/recognition-util.js +4 -4
- package/dist/core/registry-url.js +456 -0
- package/dist/core/state/migrations.js +161 -47
- package/dist/core/state-db.js +453 -80
- package/dist/core/system-error.js +32 -0
- package/dist/core/time.js +2 -12
- package/dist/core/write-source.js +0 -18
- package/dist/execution/directory-identity.js +52 -0
- package/dist/execution/executable-identity.js +107 -0
- package/dist/execution/guarded-source.js +398 -0
- package/dist/execution/json.js +95 -0
- package/dist/{commands/health/types-session-log.js → execution/limits.js} +2 -1
- package/dist/execution/record.js +55 -0
- package/dist/execution/resolved-request.js +730 -0
- package/dist/execution/source.js +320 -0
- package/dist/indexer/bundle-identity-guard.js +5 -4
- package/dist/indexer/db/graph-db.js +33 -0
- package/dist/indexer/graph/graph-boost.js +3 -4
- package/dist/indexer/graph/graph-extraction.js +562 -373
- package/dist/indexer/index-written-assets.js +78 -39
- package/dist/indexer/indexer.js +471 -432
- package/dist/indexer/installations.js +6 -0
- package/dist/indexer/lookup/adapter-concept-owner.js +283 -0
- package/dist/indexer/materialize-embeddings.js +155 -0
- package/dist/indexer/passes/memory-inference.js +227 -174
- package/dist/indexer/passes/metadata.js +263 -118
- package/dist/indexer/scan/doc-to-entry.js +7 -10
- package/dist/indexer/scan/drain-dir.js +51 -23
- package/dist/indexer/search/db-search.js +156 -50
- package/dist/indexer/search/fts-query.js +40 -40
- package/dist/indexer/search/ranking.js +36 -1
- package/dist/indexer/search/search-attribution.js +3 -1
- package/dist/indexer/search/search-fields.js +23 -14
- package/dist/indexer/search/search-hit-enrichers.js +1 -1
- package/dist/indexer/search/search-source.js +7 -16
- package/dist/indexer/search/semantic-status.js +10 -1
- package/dist/indexer/usage/show-usage.js +105 -0
- package/dist/indexer/usage/usage-events.js +7 -2
- package/dist/indexer/walk/matchers.js +40 -10
- package/dist/indexer/walk/path-resolver.js +5 -2
- package/dist/indexer/walk/walker.js +20 -2
- package/dist/integrations/agent/builder-shared.js +3 -6
- package/dist/integrations/agent/conversation-fallback.js +16 -0
- package/dist/integrations/agent/engine-resolution.js +87 -87
- package/dist/integrations/agent/execution-cascade.js +566 -0
- package/dist/integrations/agent/execution-definitions.js +211 -0
- package/dist/integrations/agent/execution-lowering.js +811 -0
- package/dist/integrations/agent/execution-preparation.js +67 -0
- package/dist/integrations/agent/index.js +0 -2
- package/dist/integrations/agent/inline-execution.js +74 -0
- package/dist/integrations/agent/model-map.js +515 -0
- package/dist/integrations/agent/persona-fallback.js +30 -0
- package/dist/integrations/agent/request-lowering.js +186 -0
- package/dist/integrations/agent/runner-dispatch.js +230 -37
- package/dist/integrations/agent/runner.js +12 -83
- package/dist/integrations/harnesses/aider/agent-builder.js +8 -0
- package/dist/integrations/harnesses/aider/index.js +0 -1
- package/dist/integrations/harnesses/amazonq/agent-builder.js +8 -0
- package/dist/integrations/harnesses/amazonq/index.js +0 -1
- package/dist/integrations/harnesses/claude/agent-builder.js +14 -1
- package/dist/integrations/harnesses/claude/index.js +1 -5
- package/dist/integrations/harnesses/claude/session-log.js +3 -33
- package/dist/integrations/harnesses/codex/agent-builder.js +8 -0
- package/dist/integrations/harnesses/codex/index.js +0 -1
- package/dist/integrations/harnesses/copilot/agent-builder.js +8 -0
- package/dist/integrations/harnesses/copilot/index.js +0 -1
- package/dist/integrations/harnesses/gemini/agent-builder.js +8 -0
- package/dist/integrations/harnesses/gemini/index.js +0 -1
- package/dist/integrations/harnesses/index.js +4 -44
- package/dist/integrations/harnesses/opencode/agent-builder.js +16 -9
- package/dist/integrations/harnesses/opencode/index.js +0 -2
- package/dist/integrations/harnesses/opencode/session-log.js +14 -204
- package/dist/integrations/harnesses/opencode-sdk/harness.js +12 -1
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +40 -42
- package/dist/integrations/harnesses/openhands/agent-builder.js +8 -0
- package/dist/integrations/harnesses/openhands/index.js +0 -1
- package/dist/integrations/harnesses/pi/agent-builder.js +8 -0
- package/dist/integrations/harnesses/pi/index.js +0 -1
- package/dist/integrations/harnesses/shared.js +0 -1
- package/dist/integrations/harnesses/types.js +1 -3
- package/dist/integrations/lockfile.js +82 -79
- package/dist/integrations/session-logs/index.js +6 -17
- package/dist/integrations/session-logs/provider-base.js +1 -29
- package/dist/llm/client.js +10 -5
- package/dist/llm/embedder.js +6 -7
- package/dist/llm/embedders/local.js +37 -88
- package/dist/llm/embedders/types.js +1 -1
- package/dist/llm/graph-extract.js +75 -50
- package/dist/llm/index-passes.js +43 -5
- package/dist/llm/memory-infer.js +8 -6
- package/dist/llm/metadata-enhance.js +5 -3
- package/dist/llm/structured-call.js +122 -25
- package/dist/output/format-exempt.js +1 -1
- package/dist/output/render-registry.js +0 -16
- package/dist/output/renderers.js +12 -7
- package/dist/output/shapes/curate.js +1 -0
- package/dist/output/shapes/helpers.js +10 -2
- package/dist/output/shapes/passthrough.js +2 -0
- package/dist/output/text/command-format.js +31 -33
- package/dist/output/text/health-format.js +1 -29
- package/dist/output/text/migrate.js +6 -56
- package/dist/output/text/proposal-format.js +16 -1
- package/dist/output/text/workflow-format.js +16 -0
- package/dist/registry/network.js +279 -0
- package/dist/registry/pinned-request-helper.js +247 -0
- package/dist/registry/pinned-transport.js +717 -0
- package/dist/registry/providers/skills-sh.js +18 -6
- package/dist/registry/providers/static-index.js +20 -7
- package/dist/registry/resolve.js +53 -28
- package/dist/scripts/akm-migrate-node.js +19334 -52269
- package/dist/scripts/akm-migrate.js +19270 -51612
- package/dist/setup/registry-stash-loader.js +64 -20
- package/dist/setup/semantic-assets.js +9 -34
- package/dist/setup/setup.js +12 -30
- package/dist/setup/source-identity.js +17 -0
- package/dist/setup/steps/sources.js +36 -15
- package/dist/setup/steps/tasks.js +39 -11
- package/dist/sources/providers/git-provider.js +3 -3
- package/dist/sources/providers/npm.js +2 -2
- package/dist/sources/providers/provider-utils.js +4 -3
- package/dist/sources/providers/website.js +11 -7
- package/dist/sources/snapshot-fetchers/host-guard.js +9 -136
- package/dist/sources/snapshot-fetchers/website-ingest.js +25 -109
- package/dist/sources/website-url.js +73 -0
- package/dist/storage/engines/sqlite-migrations.js +81 -26
- package/dist/storage/managed-db.js +27 -24
- package/dist/storage/repositories/events-repository.js +3 -0
- package/dist/storage/repositories/index-connection.js +42 -10
- package/dist/storage/repositories/index-entries-repository.js +203 -229
- package/dist/storage/repositories/index-entry-mapper.js +8 -12
- package/dist/storage/repositories/index-entry-schema.js +255 -0
- package/dist/storage/repositories/index-fts-repository.js +64 -71
- package/dist/storage/repositories/index-llm-cache-repository.js +8 -13
- package/dist/storage/repositories/index-meta-repository.js +0 -11
- package/dist/storage/repositories/index-schema.js +74 -350
- package/dist/storage/repositories/index-utility-repository.js +12 -17
- package/dist/storage/repositories/index-vec-repository.js +56 -7
- package/dist/storage/repositories/proposals-repository.js +4 -127
- package/dist/storage/repositories/registry-cache.js +2 -1
- package/dist/storage/repositories/task-history-repository.js +20 -40
- package/dist/storage/repositories/workflow-runs-repository.js +228 -129
- package/dist/storage/sqlite-read-snapshot.js +148 -0
- package/dist/tasks/backends/cron.js +170 -42
- package/dist/tasks/backends/index.js +1 -1
- package/dist/tasks/backends/launchd.js +787 -202
- package/dist/tasks/backends/schtasks.js +282 -83
- package/dist/tasks/embedded.js +7 -7
- package/dist/tasks/frozen-script.js +50 -0
- package/dist/tasks/resolve-akm-bin.js +5 -1
- package/dist/tasks/runner.js +239 -251
- package/dist/tasks/runtime-v3.js +281 -0
- package/dist/tasks/scheduler-binding.js +272 -0
- package/dist/tasks/scheduler-invocation.js +57 -43
- package/dist/tasks/scheduler-sync.js +654 -0
- package/dist/tasks/source-v3.js +752 -0
- package/dist/tasks/standalone-script-entry.js +5 -0
- package/dist/tasks/task-id.js +29 -0
- package/dist/workflows/authoring/authoring.js +15 -32
- package/dist/workflows/exec/dispatch-redaction.js +14 -8
- package/dist/workflows/exec/exec-unit.js +7 -28
- package/dist/workflows/exec/frozen-judge.js +57 -89
- package/dist/workflows/exec/lowering-notices.js +23 -0
- package/dist/workflows/exec/native-executor.js +301 -458
- package/dist/workflows/exec/param-secrets.js +4 -3
- package/dist/workflows/exec/run-workflow.js +26 -32
- package/dist/workflows/exec/step-work.js +105 -109
- package/dist/workflows/exec/unit-dispatch.js +103 -27
- package/dist/workflows/exec/unit-writer.js +3 -3
- package/dist/workflows/exec/worktree.js +2 -2
- package/dist/workflows/ir/compile.js +86 -72
- package/dist/workflows/ir/environment-v4.js +328 -0
- package/dist/workflows/ir/freeze-v4.js +122 -0
- package/dist/workflows/ir/plan-hash.js +13 -7
- package/dist/workflows/ir/schema-v4.js +525 -0
- package/dist/workflows/ir/schema.js +25 -284
- package/dist/workflows/ir/source-freeze-v4.js +506 -0
- package/dist/workflows/parser.js +27 -24
- package/dist/workflows/program/schema.js +1 -2
- package/dist/workflows/renderer.js +42 -29
- package/dist/workflows/resource-limits.js +4 -5
- package/dist/workflows/runtime/agent-identity.js +11 -13
- package/dist/workflows/runtime/plan-classifier.js +8 -8
- package/dist/workflows/runtime/runs.js +27 -43
- package/dist/workflows/runtime/workflow-asset-loader.js +45 -205
- package/dist/workflows/source-files.js +373 -0
- package/dist/workflows/source-ir/compile.js +196 -0
- package/dist/workflows/source-ir/github-yaml.js +577 -0
- package/dist/workflows/source-ir/ordering.js +38 -0
- package/dist/workflows/source-ir/program.js +50 -0
- package/dist/workflows/source-ir/result.js +26 -0
- package/dist/workflows/source-ir/schema.js +772 -0
- package/dist/workflows/source-ir/semantics.js +242 -0
- package/dist/workflows/source-ir/uses.js +14 -0
- package/docs/README.md +2 -0
- package/docs/migration/README.md +3 -1
- package/docs/migration/release-notes/0.9.2.md +55 -0
- package/docs/migration/release-notes/README.md +5 -0
- package/docs/migration/v0.8-to-v0.9.md +76 -1077
- package/docs/migration/v0.9.0-troubleshooting.md +104 -516
- package/docs/migration/v0.9.1-to-v0.9.2.md +150 -0
- package/docs/reference/README.md +1 -0
- package/docs/reference/cli.md +230 -98
- package/docs/reference/configuration.md +159 -36
- package/docs/reference/data-and-telemetry.md +19 -1
- package/docs/reference/supported-formats.md +23 -3
- package/docs/reference/tasks.md +182 -0
- package/docs/reference/workflow-schema.md +91 -40
- package/docs/reference/workflows.md +33 -6
- package/package.json +10 -6
- package/schemas/akm-config.json +372 -224
- package/schemas/akm-task.json +324 -80
- package/schemas/akm-workflow.json +6 -9
- package/dist/core/migration-operation.js +0 -75
- package/dist/integrations/agent/model-aliases.js +0 -74
- package/dist/tasks/parser.js +0 -380
- package/dist/tasks/schema.js +0 -123
- package/dist/tasks/validator.js +0 -80
- package/dist/workflows/ir/freeze.js +0 -320
- package/dist/workflows/runtime/document-cache.js +0 -13
|
@@ -13,15 +13,75 @@ detail.
|
|
|
13
13
|
- For operating a run day to day (`run`, `status`, `resume`, `abandon`), see
|
|
14
14
|
[Running Workflows](https://github.com/itlackey/akm/blob/main/docs/guides/run-workflows.md).
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Source formats and shared IR
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
Peer workflow sources include Markdown `.md` and GitHub-shaped YAML `.yml`.
|
|
19
|
+
`.yaml` is not supported or recognized as a workflow source. Both adapters
|
|
20
|
+
compile into the same strict source IR version 1 (`sourceIrVersion: 1`) before
|
|
21
|
+
target resolution and durable freezing.
|
|
22
|
+
|
|
23
|
+
The shipped `schemas/akm-workflow.json` frontmatter schema applies to and
|
|
24
|
+
validates the Markdown source only. Markdown is not the sole or only workflow
|
|
25
|
+
source; the GitHub-shaped YAML adapter has its own bounded parser and shares
|
|
26
|
+
the source-IR decoder and semantic authorities.
|
|
27
|
+
|
|
28
|
+
### Markdown source
|
|
29
|
+
|
|
30
|
+
A Markdown workflow is an ordinary AKM asset — the same envelope as every
|
|
31
|
+
other Markdown type, OKF-conformant frontmatter plus a body — whose
|
|
32
|
+
frontmatter carries the orchestration graph (params, and how each step
|
|
33
|
+
dispatches, fans out, routes, and gates). Its body carries each step's
|
|
22
34
|
instructions and gate rubric under plain headings, joined to the frontmatter
|
|
23
|
-
by step id.
|
|
24
|
-
|
|
35
|
+
by step id. The remainder of this page's frontmatter/body sections document
|
|
36
|
+
that Markdown authoring format.
|
|
37
|
+
|
|
38
|
+
## GitHub-shaped YAML subset
|
|
39
|
+
|
|
40
|
+
A complete valid `on` plus `jobs` document is one workflow asset.
|
|
41
|
+
It never creates a duplicate or second task asset. The root vocabulary is exactly
|
|
42
|
+
`name`, `on`, and `jobs`:
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
name: Local checks
|
|
46
|
+
on:
|
|
47
|
+
schedule:
|
|
48
|
+
- cron: "0 6 * * *"
|
|
49
|
+
workflow_dispatch: {}
|
|
50
|
+
jobs:
|
|
51
|
+
checks:
|
|
52
|
+
runs-on: [self-hosted]
|
|
53
|
+
steps:
|
|
54
|
+
- id: lint
|
|
55
|
+
run: bun run lint
|
|
56
|
+
- id: review
|
|
57
|
+
uses: akm/command
|
|
58
|
+
with:
|
|
59
|
+
ref: commands/review
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The accepted 0.9.2 subset is deliberately closed:
|
|
63
|
+
|
|
64
|
+
- `on` accepts five-field `schedule` entries and an empty or null
|
|
65
|
+
`workflow_dispatch`; workflow_dispatch inputs are unsupported.
|
|
66
|
+
- Service events are rejected.
|
|
67
|
+
A rejected service event creates no watcher and no polling daemon.
|
|
68
|
+
- Each job requires exactly `runs-on: [self-hosted]`. `name`, `needs`, and
|
|
69
|
+
`steps` are the remaining job fields.
|
|
70
|
+
- Each step requires `id` and exactly one `uses` or `run`; optional fields are
|
|
71
|
+
`name`, `with`, `env`, `shell`, and contained `working-directory`.
|
|
72
|
+
- A `run` accepts only token-safe local command tokens.
|
|
73
|
+
Shell expansion and operators are unsupported and rejected, even when a host shell is named.
|
|
74
|
+
- `uses` delegates to the task-v3 ref classifier. `akm/command`, command,
|
|
75
|
+
script, and task composition are local targets.
|
|
76
|
+
Local actions and Docker actions are unsupported and rejected (including `./` and `docker://`); remote actions are rejected
|
|
77
|
+
because acquisition is out of scope; nested workflows are unsupported.
|
|
78
|
+
- GitHub expressions and contexts are unsupported and rejected anywhere in
|
|
79
|
+
the parsed tree.
|
|
80
|
+
|
|
81
|
+
Multi-job documents are dependency-validated, indexed, and displayable, but
|
|
82
|
+
cannot execute in 0.9.2 because the runtime boundary is single-job execution.
|
|
83
|
+
The runtime refuses instead of flattening `needs` or fabricating job
|
|
84
|
+
semantics.
|
|
25
85
|
|
|
26
86
|
## Frontmatter keys
|
|
27
87
|
|
|
@@ -668,7 +728,8 @@ stripped it — the same treatment an agent-harness child gets.
|
|
|
668
728
|
|
|
669
729
|
Deliberately **not** on the list: credentials of any kind, cloud/CI variables,
|
|
670
730
|
and the proxy family (`HTTP_PROXY` and friends — proxy URLs routinely embed
|
|
671
|
-
credentials). Reach
|
|
731
|
+
credentials). Reach a required value with an exact named `env:` binding, or
|
|
732
|
+
name a non-secret per-machine variable with `pass_env:`.
|
|
672
733
|
|
|
673
734
|
#### `pass_env:` — widen the allowlist by name
|
|
674
735
|
|
|
@@ -687,26 +748,16 @@ a committed *value*, so it cannot carry "whatever this build agent's
|
|
|
687
748
|
Values passed through this way are **not** redacted from the command's output
|
|
688
749
|
the way `env:` binding values are, so never list a credential here.
|
|
689
750
|
|
|
690
|
-
####
|
|
691
|
-
|
|
692
|
-
```yaml
|
|
693
|
-
unit:
|
|
694
|
-
exec:
|
|
695
|
-
command: ["./scripts/deploy.sh"]
|
|
696
|
-
inherit_env: true
|
|
697
|
-
```
|
|
751
|
+
#### Durable v4 forbids `inherit_env`
|
|
698
752
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
`env:` bindings when you can, because those keep what the command can see
|
|
705
|
-
visible in the frontmatter diff.
|
|
753
|
+
Every new workflow start freezes a durable v4 plan. V4 rejects
|
|
754
|
+
`inherit_env: true` and any other request for whole-process inheritance; use
|
|
755
|
+
exact named environment bindings and `pass_env:` instead. Both mechanisms are
|
|
756
|
+
dispatch-significant, keep the visible environment surface bounded, and form
|
|
757
|
+
part of the unit's input hash.
|
|
706
758
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
unit rather than reusing a journaled row produced under the other scope.
|
|
759
|
+
The historical `inherit_env` spelling is unsupported. Pre-v4 stored plans are
|
|
760
|
+
rejected; they are never upgraded or replayed through a second runtime.
|
|
710
761
|
|
|
711
762
|
### What `akm show` reports for an exec step
|
|
712
763
|
|
|
@@ -727,8 +778,7 @@ happens. Field presence is the discriminator, the same way `fanOut` marks a
|
|
|
727
778
|
"exec": {
|
|
728
779
|
"command": ["bun", "run", "test:unit"],
|
|
729
780
|
"cwd": "packages/core",
|
|
730
|
-
"passEnv": ["CARGO_HOME"]
|
|
731
|
-
"inheritEnv": true
|
|
781
|
+
"passEnv": ["CARGO_HOME"]
|
|
732
782
|
}
|
|
733
783
|
}
|
|
734
784
|
}
|
|
@@ -741,8 +791,9 @@ happens. Field presence is the discriminator, the same way `fanOut` marks a
|
|
|
741
791
|
of it is resolved from your environment, from a secret ref, or from a prior
|
|
742
792
|
step's output. Every byte is already visible in the workflow file (and stored
|
|
743
793
|
verbatim in `plan_json`) — which is also why you never inline a secret there.
|
|
744
|
-
- `cwd
|
|
745
|
-
|
|
794
|
+
- `cwd` and `passEnv` appear only when the unit declares them. `passEnv` is a
|
|
795
|
+
list of variable **names**; no value is ever projected. New v4 plans never
|
|
796
|
+
carry `inheritEnv`.
|
|
746
797
|
- `timeoutMs` is still reported, because an exec unit really does inherit
|
|
747
798
|
`defaults.timeout` — that number is true for it.
|
|
748
799
|
|
|
@@ -987,23 +1038,23 @@ budget means starting a new run.
|
|
|
987
1038
|
## Model references
|
|
988
1039
|
|
|
989
1040
|
Reference semantic aliases in `model:` fields instead of exact model ids so a
|
|
990
|
-
workflow stays harness-agnostic.
|
|
991
|
-
|
|
1041
|
+
workflow stays harness-agnostic. Aliases are defined only in the installed and
|
|
1042
|
+
optional user `models.json` files:
|
|
992
1043
|
|
|
993
1044
|
```jsonc
|
|
994
1045
|
{
|
|
995
|
-
"
|
|
996
|
-
|
|
997
|
-
"
|
|
998
|
-
"
|
|
1046
|
+
"version": 1,
|
|
1047
|
+
"aliases": {
|
|
1048
|
+
"fast": { "claude": "claude-haiku-4-5", "opencode": "opencode/claude-haiku-4-5" },
|
|
1049
|
+
"balanced": { "claude": "claude-sonnet-4-6", "opencode": "opencode/claude-sonnet-4-6" },
|
|
1050
|
+
"reasoning": { "claude": "claude-opus-4-7", "opencode": "opencode/claude-opus-4-7" }
|
|
999
1051
|
}
|
|
1000
1052
|
}
|
|
1001
1053
|
```
|
|
1002
1054
|
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
config. See the [Author's Guide](https://github.com/itlackey/akm/blob/main/docs/guides/author-workflows.md#choosing-engines-and-models)
|
|
1055
|
+
Resolution checks the selected engine name or canonical harness column. A
|
|
1056
|
+
known alias without that column fails rather than guessing a provider model;
|
|
1057
|
+
an unknown string is treated as an exact model selector. See the [Author's Guide](https://github.com/itlackey/akm/blob/main/docs/guides/author-workflows.md#choosing-engines-and-models)
|
|
1007
1058
|
for guidance on which tier to pick per step.
|
|
1008
1059
|
|
|
1009
1060
|
## See also
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Workflows
|
|
2
2
|
|
|
3
|
-
A workflow is a
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
A workflow is a multi-step procedure authored as either AKM Markdown or the
|
|
4
|
+
bounded GitHub-shaped YAML subset. `akm workflow run` compiles either peer
|
|
5
|
+
source format through source IR v1, freezes a durable plan, persists run and
|
|
6
|
+
unit state, dispatches work, verifies declared gates, and can resume after an
|
|
7
|
+
interruption without replaying completed units.
|
|
7
8
|
|
|
8
9
|
> **`akm workflow run` is Stable, ungated, and the only execution surface.**
|
|
9
10
|
> It is the canonical start/resume/execute command; there is no separate
|
|
@@ -23,7 +24,7 @@ split by what you're doing:
|
|
|
23
24
|
events. Includes the trust model for running a workflow sourced from
|
|
24
25
|
someone else's bundle.
|
|
25
26
|
- **[Author's Guide: Writing Workflows](https://github.com/itlackey/akm/blob/main/docs/guides/author-workflows.md)** —
|
|
26
|
-
writing and testing a workflow definition: the
|
|
27
|
+
writing and testing a workflow definition: choosing a source format, the Markdown structure, a
|
|
27
28
|
minimal complete example, common authoring mistakes, choosing engines and
|
|
28
29
|
models, and engine-selection troubleshooting.
|
|
29
30
|
- **[Workflow Schema](../reference/workflow-schema.md)** — the exhaustive,
|
|
@@ -34,9 +35,35 @@ split by what you're doing:
|
|
|
34
35
|
worktree isolation, concurrency limits, and resume-without-replay.
|
|
35
36
|
|
|
36
37
|
For task- or schedule-driven workflow runs — an `akm task` bound to
|
|
37
|
-
|
|
38
|
+
`uses: workflows/<ref>` and reconciled with the OS scheduler — see
|
|
38
39
|
[Scheduling](https://github.com/itlackey/akm/blob/main/docs/guides/scheduling.md).
|
|
39
40
|
|
|
41
|
+
## Source formats and execution versions
|
|
42
|
+
|
|
43
|
+
Markdown `.md` and GitHub-shaped YAML `.yml` are peer source formats. The
|
|
44
|
+
Markdown adapter preserves AKM's full prose, gates, maps, routes, typed
|
|
45
|
+
artifacts, and exec vocabulary. The YAML adapter accepts the documented local
|
|
46
|
+
`name`/`on`/`jobs` subset. `.yaml` is not a workflow source.
|
|
47
|
+
|
|
48
|
+
Both adapters produce strict source IR version 1. New starts resolve source
|
|
49
|
+
owners and executable targets, then freeze durable plan v4. Only v4 plans
|
|
50
|
+
execute; pre-v4 rows are rejected and must be replaced by a new run.
|
|
51
|
+
|
|
52
|
+
## Unsupported boundary and 0.9.3
|
|
53
|
+
|
|
54
|
+
The 0.9.2 GitHub-shaped adapter is a local interoperability seam, not GitHub
|
|
55
|
+
Actions. Full GitHub expressions and contexts, local/Docker/remote actions,
|
|
56
|
+
nested workflows, service events, arbitrary hosted runners, and multi-job
|
|
57
|
+
runtime execution remain outside 0.9.2. Valid multi-job sources can be indexed
|
|
58
|
+
and displayed, but the 0.9.2 runtime executes a single job only.
|
|
59
|
+
|
|
60
|
+
These full GitHub semantics, actions, service events, and runner behaviors are
|
|
61
|
+
explicit 0.9.3-or-later work. AKM neither fetches remote actions nor creates
|
|
62
|
+
event watchers or polling daemons in the meantime.
|
|
63
|
+
|
|
64
|
+
Version 0.9.3 may extend full GitHub expressions and contexts, actions,
|
|
65
|
+
service events, and runners; none of those capabilities is implied by 0.9.2.
|
|
66
|
+
|
|
40
67
|
## See also
|
|
41
68
|
|
|
42
69
|
- [Discover and Load](https://github.com/itlackey/akm/blob/main/docs/guides/discover-and-load.md) — find available
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2-alpha.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cursor.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"license": "MPL-2.0",
|
|
37
37
|
"pinNotes": {
|
|
38
38
|
"@opencode-ai/sdk@1.2.20": "Exact pin. The SDK surface we use (createOpencodeClient + session.create/prompt/delete in src/integrations/harnesses/opencode-sdk/sdk-runner.ts) is stable across 1.x, but the SDK has shipped 5+ minor versions of unrelated provider/registry churn. akm-cli is a global CLI install so the pin is isolated from user-project deps. Re-test sdk-runner before bumping. Note this package is an HTTP client only — it declares no dependencies and its own createOpencodeServer spawns `opencode serve` — so it does NOT make the opencode binary available; that install is separate and is what every SDK-path probe checks for.",
|
|
39
|
-
"better-sqlite3@12.11.1": "Exact pin (#790). This is the SQLite driver akm loads on Node (src/storage/database.ts); Bun never touches it. The pin is about PREBUILT BINARIES, not API surface. better-sqlite3 ships one prebuild per Node ABI as a GitHub release asset and its install script is `prebuild-install || node-gyp rebuild` — so any (version, Node ABI) pair with no prebuild silently COMPILES FROM SOURCE against the headers of whatever Node is on the machine that day. The 11.x line predates Node 24 and declares no `engines` at all: its newest release (11.10.0, 2025-05-08) publishes ABI 108/115/127/131 (Node 18/20/22/23) and nothing for ABI 137 (Node 24). Node 24.19.0 then changed the public `node_object_wrap.h` so `node::ObjectWrap`'s ctor/dtor register and unregister an environment cleanup hook; a from-source 11.x build against those headers aborts at teardown in `Statement::~Statement()` with `RemoveEnvironmentCleanupHook ... Assertion (env) != nullptr`, intermittently, depending on GC timing. 12.11.1 publishes ABI 127/137/141/147 (Node 22/24/25/26) and declares `engines: 20.x || 22.x || 23.x || 24.x || 25.x || 26.x`, so
|
|
39
|
+
"better-sqlite3@12.11.1": "Exact pin (#790). This is the SQLite driver akm loads on Node (src/storage/database.ts); Bun never touches it. The pin is about PREBUILT BINARIES, not API surface. better-sqlite3 ships one prebuild per Node ABI as a GitHub release asset and its install script is `prebuild-install || node-gyp rebuild` — so any (version, Node ABI) pair with no prebuild silently COMPILES FROM SOURCE against the headers of whatever Node is on the machine that day. The 11.x line predates Node 24 and declares no `engines` at all: its newest release (11.10.0, 2025-05-08) publishes ABI 108/115/127/131 (Node 18/20/22/23) and nothing for ABI 137 (Node 24). Node 24.19.0 then changed the public `node_object_wrap.h` so `node::ObjectWrap`'s ctor/dtor register and unregister an environment cleanup hook; a from-source 11.x build against those headers aborts at teardown in `Statement::~Statement()` with `RemoveEnvironmentCleanupHook ... Assertion (env) != nullptr`, intermittently, depending on GC timing. 12.11.1 publishes ABI 127/137/141/147 (Node 22/24/25/26) and declares `engines: 20.x || 22.x || 23.x || 24.x || 25.x || 26.x`, so akm's supported Node 24 line installs a prebuilt binary and never compiles. Before bumping: confirm the target version publishes a prebuild for EVERY Node major in `engines` (probe https://github.com/WiseLibs/better-sqlite3/releases/download/vX.Y.Z/better-sqlite3-vX.Y.Z-node-vABI-linux-x64.tar.gz), not just that the version is newer. 13.x is the eventual destination — it moved to node-addon-api/N-API with prebuilds bundled in the npm tarball and no install script, which retires this failure mode entirely — but it is a fresh major rewrite of the binding, so it wants its own soak, not a patch release. The CI node-smoke job installs this exact string by reading it back out of this file (.github/workflows/ci.yml), so the two cannot drift.",
|
|
40
|
+
"@huggingface/transformers@4.2.0": "Exact semantic-search dependency pin. Re-run the real-model semantic gate before changing it."
|
|
40
41
|
},
|
|
41
42
|
"files": [
|
|
42
43
|
"dist",
|
|
@@ -49,11 +50,13 @@
|
|
|
49
50
|
"docs/migration/v0.7-to-v0.8.md",
|
|
50
51
|
"docs/migration/v0.8-to-v0.9.md",
|
|
51
52
|
"docs/migration/v0.9.0-troubleshooting.md",
|
|
53
|
+
"docs/migration/v0.9.1-to-v0.9.2.md",
|
|
52
54
|
"docs/reference/bundle-types.md",
|
|
53
55
|
"docs/reference/cli.md",
|
|
54
56
|
"docs/reference/configuration.md",
|
|
55
57
|
"docs/reference/data-and-telemetry.md",
|
|
56
58
|
"docs/reference/supported-formats.md",
|
|
59
|
+
"docs/reference/tasks.md",
|
|
57
60
|
"docs/reference/workflow-schema.md",
|
|
58
61
|
"docs/reference/workflows.md",
|
|
59
62
|
"schemas"
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
"akm-migrate": "dist/akm-migrate"
|
|
64
67
|
},
|
|
65
68
|
"scripts": {
|
|
66
|
-
"preinstall": "node -e \"var v=(process.versions.node||'0').split('.').map(function(n){return parseInt(n,10)||0});var ok=v[0]>=
|
|
69
|
+
"preinstall": "node -e \"var v=(process.versions.node||'0').split('.').map(function(n){return parseInt(n,10)||0});var ok=v[0]>=24;if(ok){process.exit(0)}console.error('\\n ERROR: the akm-cli npm package requires Node.js >= 24.\\n A working Bun >= 1.0 on PATH is optional and preferred for akm and akm-migrate.\\n Upgrade Node.js (https://nodejs.org), or install the runtime-free standalone binary:\\n curl -fsSL https://github.com/itlackey/akm/releases/latest/download/install.sh | bash\\n');process.exit(1)\"",
|
|
67
70
|
"build": "rm -rf dist && bun scripts/gen-config-schema.ts &&bun run tsc --project ./tsconfig.build.json && bun scripts/copy-assets.ts && bun scripts/fix-esm-extensions.ts",
|
|
68
71
|
"check": "bun run lint && bunx tsc --noEmit && bun run test:unit && bun run test:integration",
|
|
69
72
|
"check:fast": "bun run lint && bunx tsc --noEmit && bun run test:unit",
|
|
@@ -82,7 +85,7 @@
|
|
|
82
85
|
"lint:devto-posts:fix": "bun scripts/lint-devto-posts.ts --fix",
|
|
83
86
|
"publish:devto": "npx -y @sinedied/devto-cli push \"docs/posts/**/*.md\" --token \"$DEVTO_TOKEN\" --repo \"$GITHUB_REPOSITORY\" --branch \"${GITHUB_REF_NAME:-main}\" --reconcile",
|
|
84
87
|
"release:check": "./tests/release-check.sh",
|
|
85
|
-
"lint": "bunx biome check src/ tests/ scripts/ && bun scripts/lint-tests-isolation.ts && bun scripts/lint-license-headers.ts && bun scripts/lint-runtime-boundary.ts && bun scripts/lint-write-source-chokepoint.ts && bun scripts/lint-secret-resolver-boundary.ts && bun scripts/lint-
|
|
88
|
+
"lint": "bunx biome check src/ tests/ scripts/ && bun scripts/lint-tests-isolation.ts && bun scripts/lint-license-headers.ts && bun scripts/lint-runtime-boundary.ts && bun scripts/lint-write-source-chokepoint.ts && bun scripts/lint-secret-resolver-boundary.ts && bun scripts/lint-execution-boundary.ts && bun scripts/lint-process-argv.ts && bun scripts/lint-repository-sql.ts && bun scripts/lint-goldens-presence.ts && bun scripts/lint-golden-captured-at-head.ts && bun scripts/lint-shipped-assets.ts && bun scripts/lint-doc-examples.ts && bun scripts/gen-config-schema.ts --check && bun scripts/lint-active-docs-terminology.ts",
|
|
86
89
|
"lint:runtime-boundary": "bun scripts/lint-runtime-boundary.ts",
|
|
87
90
|
"lint:tests-isolation": "bun scripts/lint-tests-isolation.ts",
|
|
88
91
|
"lint:fix": "bunx biome check --write src/ tests/ scripts/",
|
|
@@ -100,21 +103,22 @@
|
|
|
100
103
|
"@types/node": "^22.19.17",
|
|
101
104
|
"@types/semver": "^7.5.8",
|
|
102
105
|
"@types/turndown": "^5.0.6",
|
|
106
|
+
"ajv": "8.20.0",
|
|
103
107
|
"bun-types": "^1.3.13",
|
|
104
108
|
"cmd-shim": "9.0.2",
|
|
105
109
|
"typescript": "^5.9.3",
|
|
106
110
|
"zod-to-json-schema": "^3.23.0"
|
|
107
111
|
},
|
|
108
112
|
"optionalDependencies": {
|
|
109
|
-
"@huggingface/transformers": "^4.2.0",
|
|
110
113
|
"better-sqlite3": "12.11.1",
|
|
111
114
|
"sqlite-vec": "^0.1.9"
|
|
112
115
|
},
|
|
113
116
|
"engines": {
|
|
114
|
-
"node": ">=
|
|
117
|
+
"node": ">=24"
|
|
115
118
|
},
|
|
116
119
|
"dependencies": {
|
|
117
120
|
"@clack/prompts": "^1.3.0",
|
|
121
|
+
"@huggingface/transformers": "4.2.0",
|
|
118
122
|
"@opencode-ai/sdk": "1.2.20",
|
|
119
123
|
"citty": "^0.2.2",
|
|
120
124
|
"dotenv": "^17.4.2",
|