akm-cli 0.6.1 → 0.7.0-rc1
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 +66 -0
- package/dist/{cli.js → src/cli.js} +620 -26
- package/dist/{commands → src/commands}/config-cli.js +5 -4
- package/dist/src/commands/distill.js +283 -0
- package/dist/src/commands/events.js +108 -0
- package/dist/src/commands/history.js +120 -0
- package/dist/{commands → src/commands}/installed-stashes.js +1 -1
- package/dist/src/commands/proposal.js +119 -0
- package/dist/src/commands/propose.js +171 -0
- package/dist/src/commands/reflect.js +193 -0
- package/dist/{commands → src/commands}/registry-search.js +2 -1
- package/dist/{commands → src/commands}/remember.js +12 -0
- package/dist/{commands → src/commands}/search.js +74 -1
- package/dist/{commands → src/commands}/self-update.js +4 -3
- package/dist/{commands → src/commands}/show.js +44 -0
- package/dist/{core → src/core}/asset-ref.js +5 -5
- package/dist/{core → src/core}/asset-spec.js +12 -0
- package/dist/{core → src/core}/common.js +1 -1
- package/dist/{core → src/core}/config.js +175 -121
- package/dist/{core → src/core}/errors.js +4 -0
- package/dist/src/core/events.js +239 -0
- package/dist/src/core/lesson-lint.js +86 -0
- package/dist/src/core/proposals.js +406 -0
- package/dist/src/core/warn.js +72 -0
- package/dist/{core → src/core}/write-source.js +80 -5
- package/dist/{indexer → src/indexer}/db-search.js +113 -24
- package/dist/{indexer → src/indexer}/db.js +76 -23
- package/dist/{indexer → src/indexer}/file-context.js +0 -3
- package/dist/src/indexer/graph-boost.js +179 -0
- package/dist/src/indexer/graph-extraction.js +212 -0
- package/dist/{indexer → src/indexer}/indexer.js +73 -6
- package/dist/src/indexer/memory-inference.js +263 -0
- package/dist/{indexer → src/indexer}/metadata.js +111 -3
- package/dist/src/integrations/agent/config.js +292 -0
- package/dist/src/integrations/agent/detect.js +94 -0
- package/dist/src/integrations/agent/index.js +17 -0
- package/dist/src/integrations/agent/profiles.js +65 -0
- package/dist/src/integrations/agent/prompts.js +167 -0
- package/dist/src/integrations/agent/spawn.js +221 -0
- package/dist/{integrations → src/integrations}/lockfile.js +0 -26
- package/dist/{llm → src/llm}/client.js +33 -2
- package/dist/src/llm/feature-gate.js +108 -0
- package/dist/src/llm/graph-extract.js +107 -0
- package/dist/src/llm/index-passes.js +35 -0
- package/dist/src/llm/memory-infer.js +86 -0
- package/dist/{output → src/output}/renderers.js +60 -1
- package/dist/src/output/shapes.js +516 -0
- package/dist/{output → src/output}/text.js +447 -4
- package/dist/{registry → src/registry}/build-index.js +14 -4
- package/dist/{registry → src/registry}/factory.js +0 -8
- package/dist/{registry → src/registry}/providers/static-index.js +3 -2
- package/dist/{registry → src/registry}/resolve.js +68 -2
- package/dist/{setup → src/setup}/setup.js +43 -5
- package/dist/{sources → src/sources}/providers/git.js +7 -15
- package/dist/tests/add-website-source.test.js +119 -0
- package/dist/tests/agent/agent-config-loader.test.js +70 -0
- package/dist/tests/agent/agent-config.test.js +221 -0
- package/dist/tests/agent/agent-detect.test.js +100 -0
- package/dist/tests/agent/agent-spawn.test.js +234 -0
- package/dist/tests/agent-output.test.js +186 -0
- package/dist/tests/architecture/agent-no-llm-sdk-guard.test.js +103 -0
- package/dist/tests/architecture/agent-spawn-seam.test.js +193 -0
- package/dist/tests/architecture/llm-stateless-seam.test.js +112 -0
- package/dist/tests/asset-ref.test.js +192 -0
- package/dist/tests/asset-registry.test.js +103 -0
- package/dist/tests/asset-spec.test.js +241 -0
- package/dist/tests/bench/attribution.test.js +995 -0
- package/dist/tests/bench/cleanup-sigint.test.js +83 -0
- package/dist/tests/bench/cleanup.js +203 -0
- package/dist/tests/bench/cleanup.test.js +166 -0
- package/dist/tests/bench/cli.js +683 -0
- package/dist/tests/bench/cli.test.js +177 -0
- package/dist/tests/bench/compare.test.js +556 -0
- package/dist/tests/bench/corpus.js +314 -0
- package/dist/tests/bench/corpus.test.js +258 -0
- package/dist/tests/bench/driver.js +346 -0
- package/dist/tests/bench/driver.test.js +443 -0
- package/dist/tests/bench/evolve-metrics.js +179 -0
- package/dist/tests/bench/evolve-metrics.test.js +187 -0
- package/dist/tests/bench/evolve.js +580 -0
- package/dist/tests/bench/evolve.test.js +616 -0
- package/dist/tests/bench/failure-modes.test.js +300 -0
- package/dist/tests/bench/feedback-integrity.test.js +456 -0
- package/dist/tests/bench/leakage.test.js +125 -0
- package/dist/tests/bench/learning-curve.test.js +133 -0
- package/dist/tests/bench/metrics.js +2319 -0
- package/dist/tests/bench/metrics.test.js +1144 -0
- package/dist/tests/bench/no-os-tmpdir-invariant.test.js +43 -0
- package/dist/tests/bench/report.js +1821 -0
- package/dist/tests/bench/report.test.js +989 -0
- package/dist/tests/bench/runner.js +536 -0
- package/dist/tests/bench/runner.test.js +958 -0
- package/dist/tests/bench/search-bridge.test.js +331 -0
- package/dist/tests/bench/tmp.js +41 -0
- package/dist/tests/bench/trajectory.js +116 -0
- package/dist/tests/bench/trajectory.test.js +127 -0
- package/dist/tests/bench/verifier.js +109 -0
- package/dist/tests/bench/verifier.test.js +118 -0
- package/dist/tests/bench/workflow-evaluator.js +557 -0
- package/dist/tests/bench/workflow-evaluator.test.js +421 -0
- package/dist/tests/bench/workflow-spec.js +358 -0
- package/dist/tests/bench/workflow-spec.test.js +363 -0
- package/dist/tests/bench/workflow-trace.js +438 -0
- package/dist/tests/bench/workflow-trace.test.js +254 -0
- package/dist/tests/benchmark-search-quality.js +536 -0
- package/dist/tests/benchmark-suite.js +1441 -0
- package/dist/tests/capture-cli.test.js +112 -0
- package/dist/tests/cli-errors.test.js +203 -0
- package/dist/tests/commands/events.test.js +370 -0
- package/dist/tests/commands/history.test.js +223 -0
- package/dist/tests/commands/import.test.js +103 -0
- package/dist/tests/commands/proposal-cli.test.js +209 -0
- package/dist/tests/commands/reflect-propose-cli.test.js +333 -0
- package/dist/tests/commands/remember.test.js +97 -0
- package/dist/tests/commands/scope-flags.test.js +300 -0
- package/dist/tests/commands/search.test.js +537 -0
- package/dist/tests/commands/show-indexer-parity.test.js +117 -0
- package/dist/tests/commands/show.test.js +294 -0
- package/dist/tests/common.test.js +266 -0
- package/dist/tests/completions.test.js +142 -0
- package/dist/tests/config-cli.test.js +193 -0
- package/dist/tests/config-llm-features.test.js +139 -0
- package/dist/tests/config.test.js +544 -0
- package/dist/tests/contracts/migration-baseline.test.js +43 -0
- package/dist/tests/contracts/reflect-propose-envelope.test.js +139 -0
- package/dist/tests/contracts/spec-helpers.js +46 -0
- package/dist/tests/contracts/v1-spec-section-11-proposal-queue.test.js +228 -0
- package/dist/tests/contracts/v1-spec-section-12-agent-config.test.js +56 -0
- package/dist/tests/contracts/v1-spec-section-13-lesson-type.test.js +34 -0
- package/dist/tests/contracts/v1-spec-section-14-llm-features.test.js +94 -0
- package/dist/tests/contracts/v1-spec-section-4-1-asset-types.test.js +39 -0
- package/dist/tests/contracts/v1-spec-section-4-2-quality-rules.test.js +44 -0
- package/dist/tests/contracts/v1-spec-section-5-configuration.test.js +47 -0
- package/dist/tests/contracts/v1-spec-section-6-orchestration.test.js +40 -0
- package/dist/tests/contracts/v1-spec-section-7-module-layout.test.js +58 -0
- package/dist/tests/contracts/v1-spec-section-8-extension-points.test.js +34 -0
- package/dist/tests/contracts/v1-spec-section-9-4-cli-surface.test.js +75 -0
- package/dist/tests/contracts/v1-spec-section-9-7-llm-agent-boundary.test.js +36 -0
- package/dist/tests/core/write-source.test.js +366 -0
- package/dist/tests/curate-command.test.js +87 -0
- package/dist/tests/db-scoring.test.js +201 -0
- package/dist/tests/db.test.js +654 -0
- package/dist/tests/distill-cli-flag.test.js +208 -0
- package/dist/tests/distill.test.js +515 -0
- package/dist/tests/docker-install.test.js +120 -0
- package/dist/tests/e2e.test.js +1398 -0
- package/dist/tests/embedder.test.js +340 -0
- package/dist/tests/embedding-model-config.test.js +379 -0
- package/dist/tests/feedback-command.test.js +172 -0
- package/dist/tests/file-context.test.js +552 -0
- package/dist/tests/fixtures/scripts/git/summarize-diff.js +9 -0
- package/dist/tests/fixtures/scripts/lint/eslint-check.js +7 -0
- package/dist/tests/fixtures/stashes/load.js +166 -0
- package/dist/tests/fixtures/stashes/load.test.js +88 -0
- package/dist/tests/fixtures/stashes/ranking-baseline/scripts/mem0-search.js +12 -0
- package/dist/tests/frontmatter.test.js +190 -0
- package/dist/tests/fts-field-weighting.test.js +254 -0
- package/dist/tests/fuzzy-search.test.js +230 -0
- package/dist/tests/git-provider-clone.test.js +45 -0
- package/dist/tests/github.test.js +161 -0
- package/dist/tests/graph-boost-ranking.test.js +305 -0
- package/dist/tests/graph-extraction.test.js +282 -0
- package/dist/tests/helpers/usage-events.js +8 -0
- package/dist/tests/index-pass-llm.test.js +161 -0
- package/dist/tests/indexer.test.js +559 -0
- package/dist/tests/info-command.test.js +166 -0
- package/dist/tests/init.test.js +69 -0
- package/dist/tests/install-script.test.js +246 -0
- package/dist/tests/integration/agent-real-profile.test.js +94 -0
- package/dist/tests/issue-36-repro.test.js +304 -0
- package/dist/tests/issues-191-194.test.js +160 -0
- package/dist/tests/lesson-lint.test.js +111 -0
- package/dist/tests/llm-client.test.js +115 -0
- package/dist/tests/llm-feature-gate.test.js +151 -0
- package/dist/tests/llm.test.js +139 -0
- package/dist/tests/lockfile.test.js +216 -0
- package/dist/tests/manifest.test.js +205 -0
- package/dist/tests/markdown.test.js +126 -0
- package/dist/tests/matchers-unit.test.js +189 -0
- package/dist/tests/memory-inference.test.js +299 -0
- package/dist/tests/merge-scoring.test.js +136 -0
- package/dist/tests/metadata.test.js +313 -0
- package/dist/tests/migration-help.test.js +89 -0
- package/dist/tests/origin-resolve.test.js +124 -0
- package/dist/tests/output-baseline.test.js +217 -0
- package/dist/tests/output-shapes-unit.test.js +476 -0
- package/dist/tests/parallel-search.test.js +272 -0
- package/dist/tests/parameter-metadata.test.js +365 -0
- package/dist/tests/paths.test.js +177 -0
- package/dist/tests/progressive-disclosure.test.js +280 -0
- package/dist/tests/proposals.test.js +279 -0
- package/dist/tests/proposed-quality.test.js +271 -0
- package/dist/tests/provider-registry.test.js +32 -0
- package/dist/tests/ranking-regression.test.js +548 -0
- package/dist/tests/reflect-propose.test.js +455 -0
- package/dist/tests/registry-build-index.test.js +378 -0
- package/dist/tests/registry-cli.test.js +290 -0
- package/dist/tests/registry-index-v2.test.js +430 -0
- package/dist/tests/registry-install.test.js +728 -0
- package/dist/tests/registry-providers/parity.test.js +189 -0
- package/dist/tests/registry-providers/skills-sh.test.js +309 -0
- package/dist/tests/registry-providers/static-index.test.js +204 -0
- package/dist/tests/registry-resolve.test.js +126 -0
- package/dist/tests/registry-search.test.js +723 -0
- package/dist/tests/remember-frontmatter.test.js +380 -0
- package/dist/tests/remember-unit.test.js +123 -0
- package/dist/tests/ripgrep-install.test.js +251 -0
- package/dist/tests/ripgrep-resolve.test.js +108 -0
- package/dist/tests/ripgrep.test.js +163 -0
- package/dist/tests/save-command.test.js +94 -0
- package/dist/tests/save-trust-qa-fixes.test.js +270 -0
- package/dist/tests/scoring-pipeline.test.js +648 -0
- package/dist/tests/search-include-proposed-cli.test.js +118 -0
- package/dist/tests/self-update.test.js +442 -0
- package/dist/tests/semantic-search-e2e.test.js +512 -0
- package/dist/tests/semantic-status.test.js +471 -0
- package/dist/tests/setup-run.integration.js +877 -0
- package/dist/tests/setup-wizard.test.js +198 -0
- package/dist/tests/setup.test.js +131 -0
- package/dist/tests/source-add.test.js +11 -0
- package/dist/tests/source-clone.test.js +254 -0
- package/dist/tests/source-manage.test.js +366 -0
- package/dist/tests/source-providers/filesystem.test.js +82 -0
- package/dist/tests/source-providers/git.test.js +252 -0
- package/dist/tests/source-providers/website.test.js +128 -0
- package/dist/tests/source-qa-fixes.test.js +268 -0
- package/dist/tests/source-registry.test.js +350 -0
- package/dist/tests/source-resolve.test.js +100 -0
- package/dist/tests/source-source.test.js +221 -0
- package/dist/tests/source.test.js +533 -0
- package/dist/tests/tar-utils-scan.test.js +73 -0
- package/dist/tests/toggle-components.test.js +73 -0
- package/dist/tests/usage-telemetry.test.js +265 -0
- package/dist/tests/utility-scoring.test.js +558 -0
- package/dist/tests/vault-load-error.test.js +78 -0
- package/dist/tests/vault-qa-fixes.test.js +194 -0
- package/dist/tests/vault.test.js +429 -0
- package/dist/tests/vector-search.test.js +608 -0
- package/dist/tests/walker.test.js +252 -0
- package/dist/tests/wave2-cluster-bc.test.js +228 -0
- package/dist/tests/wave2-cluster-d.test.js +180 -0
- package/dist/tests/wave2-cluster-e.test.js +179 -0
- package/dist/tests/wiki-qa-fixes.test.js +270 -0
- package/dist/tests/wiki.test.js +529 -0
- package/dist/tests/workflow-cli.test.js +271 -0
- package/dist/tests/workflow-markdown.test.js +171 -0
- package/dist/tests/workflow-path-escape.test.js +132 -0
- package/dist/tests/workflow-qa-fixes.test.js +377 -0
- package/dist/tests/workflows/indexer-rejection.test.js +213 -0
- package/docs/README.md +8 -0
- package/docs/migration/release-notes/0.7.0.md +244 -0
- package/package.json +2 -2
- package/dist/core/warn.js +0 -27
- package/dist/output/shapes.js +0 -212
- /package/dist/{commands → src/commands}/completions.js +0 -0
- /package/dist/{commands → src/commands}/curate.js +0 -0
- /package/dist/{commands → src/commands}/info.js +0 -0
- /package/dist/{commands → src/commands}/init.js +0 -0
- /package/dist/{commands → src/commands}/install-audit.js +0 -0
- /package/dist/{commands → src/commands}/migration-help.js +0 -0
- /package/dist/{commands → src/commands}/source-add.js +0 -0
- /package/dist/{commands → src/commands}/source-clone.js +0 -0
- /package/dist/{commands → src/commands}/source-manage.js +0 -0
- /package/dist/{commands → src/commands}/vault.js +0 -0
- /package/dist/{core → src/core}/asset-registry.js +0 -0
- /package/dist/{core → src/core}/frontmatter.js +0 -0
- /package/dist/{core → src/core}/markdown.js +0 -0
- /package/dist/{core → src/core}/paths.js +0 -0
- /package/dist/{indexer → src/indexer}/manifest.js +0 -0
- /package/dist/{indexer → src/indexer}/matchers.js +0 -0
- /package/dist/{indexer → src/indexer}/search-fields.js +0 -0
- /package/dist/{indexer → src/indexer}/search-source.js +0 -0
- /package/dist/{indexer → src/indexer}/semantic-status.js +0 -0
- /package/dist/{indexer → src/indexer}/usage-events.js +0 -0
- /package/dist/{indexer → src/indexer}/walker.js +0 -0
- /package/dist/{integrations → src/integrations}/github.js +0 -0
- /package/dist/{llm → src/llm}/embedder.js +0 -0
- /package/dist/{llm → src/llm}/embedders/cache.js +0 -0
- /package/dist/{llm → src/llm}/embedders/local.js +0 -0
- /package/dist/{llm → src/llm}/embedders/remote.js +0 -0
- /package/dist/{llm → src/llm}/embedders/types.js +0 -0
- /package/dist/{llm → src/llm}/metadata-enhance.js +0 -0
- /package/dist/{output → src/output}/cli-hints.js +0 -0
- /package/dist/{output → src/output}/context.js +0 -0
- /package/dist/{registry → src/registry}/create-provider-registry.js +0 -0
- /package/dist/{registry → src/registry}/origin-resolve.js +0 -0
- /package/dist/{registry → src/registry}/providers/index.js +0 -0
- /package/dist/{registry → src/registry}/providers/skills-sh.js +0 -0
- /package/dist/{registry → src/registry}/providers/types.js +0 -0
- /package/dist/{registry → src/registry}/types.js +0 -0
- /package/dist/{setup → src/setup}/detect.js +0 -0
- /package/dist/{setup → src/setup}/ripgrep-install.js +0 -0
- /package/dist/{setup → src/setup}/ripgrep-resolve.js +0 -0
- /package/dist/{setup → src/setup}/steps.js +0 -0
- /package/dist/{sources → src/sources}/include.js +0 -0
- /package/dist/{sources → src/sources}/provider-factory.js +0 -0
- /package/dist/{sources → src/sources}/provider.js +0 -0
- /package/dist/{sources → src/sources}/providers/filesystem.js +0 -0
- /package/dist/{sources → src/sources}/providers/index.js +0 -0
- /package/dist/{sources → src/sources}/providers/install-types.js +0 -0
- /package/dist/{sources → src/sources}/providers/npm.js +0 -0
- /package/dist/{sources → src/sources}/providers/provider-utils.js +0 -0
- /package/dist/{sources → src/sources}/providers/sync-from-ref.js +0 -0
- /package/dist/{sources → src/sources}/providers/tar-utils.js +0 -0
- /package/dist/{sources → src/sources}/providers/website.js +0 -0
- /package/dist/{sources → src/sources}/resolve.js +0 -0
- /package/dist/{sources → src/sources}/types.js +0 -0
- /package/dist/{templates → src/templates}/wiki-templates.js +0 -0
- /package/dist/{version.js → src/version.js} +0 -0
- /package/dist/{wiki → src/wiki}/wiki.js +0 -0
- /package/dist/{workflows → src/workflows}/authoring.js +0 -0
- /package/dist/{workflows → src/workflows}/cli.js +0 -0
- /package/dist/{workflows → src/workflows}/db.js +0 -0
- /package/dist/{workflows → src/workflows}/document-cache.js +0 -0
- /package/dist/{workflows → src/workflows}/parser.js +0 -0
- /package/dist/{workflows → src/workflows}/renderer.js +0 -0
- /package/dist/{workflows → src/workflows}/runs.js +0 -0
- /package/dist/{workflows → src/workflows}/schema.js +0 -0
- /package/dist/{workflows → src/workflows}/validator.js +0 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
Migration notes for akm v0.7.0
|
|
2
|
+
|
|
3
|
+
0.7.0 is the last pre-1.0 ship in the v1 cycle. It introduces the
|
|
4
|
+
proposal queue, agent reflection commands, the `lesson` asset type, the
|
|
5
|
+
`llm.features.*` per-call-site gates, and the first cut of `akm-bench`.
|
|
6
|
+
It also rolls in a batch of pre-prod hardening (security, UX, hygiene)
|
|
7
|
+
landed via PR #275.
|
|
8
|
+
|
|
9
|
+
The CLI surface, configuration schema, provider interfaces, and ref
|
|
10
|
+
grammar continue to match the v1 architecture spec
|
|
11
|
+
([`docs/technical/v1-architecture-spec.md`](../../technical/v1-architecture-spec.md)).
|
|
12
|
+
0.7.0 commits to maintaining those surfaces through the 0.8.x / 0.9.x
|
|
13
|
+
pre-releases — the formal freeze itself happens at 1.0 GA.
|
|
14
|
+
|
|
15
|
+
If you are coming from 0.6.x, the
|
|
16
|
+
[v1 migration guide](../v1.md) covers the per-surface delta and is the
|
|
17
|
+
canonical upgrade reference. This file is the executive summary of
|
|
18
|
+
what's new in 0.7.0.
|
|
19
|
+
|
|
20
|
+
## Major new surfaces in 0.7.0
|
|
21
|
+
|
|
22
|
+
### Proposal queue (`akm proposal *`) — new (#225, #226, #233)
|
|
23
|
+
|
|
24
|
+
All proposal-producing commands (`akm reflect`, `akm propose`,
|
|
25
|
+
`akm distill`, plus any plugin-emitted proposals) write through one
|
|
26
|
+
durable queue. The queue lives outside the asset tree so unaccepted
|
|
27
|
+
drafts never leak into search or commits. Promotion runs full validation
|
|
28
|
+
**before** routing through `writeAssetToSource()` — the same single
|
|
29
|
+
write path used by `akm remember` and `akm import`.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
akm proposal list # list pending proposals
|
|
33
|
+
akm proposal show <id> # render one proposal
|
|
34
|
+
akm proposal diff <id> # diff vs. the live ref
|
|
35
|
+
akm proposal accept <id> # validate, then promote
|
|
36
|
+
akm proposal reject <id> --reason "…" # archive with reason
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Multiple proposals for the same `ref` coexist without filesystem
|
|
40
|
+
collisions. Auto-accept is gated per-source via the source config
|
|
41
|
+
(`autoAcceptProposals: true`); the default is off and requires a
|
|
42
|
+
writable source. See v1 spec §11 and `docs/migration/v1.md`.
|
|
43
|
+
|
|
44
|
+
### `akm reflect`, `akm propose`, `akm distill` — new CLI surfaces (#225, #226, #227)
|
|
45
|
+
|
|
46
|
+
Three new commands produce proposals into the queue:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
akm reflect [ref] [--task ...] # reflection proposals
|
|
50
|
+
akm propose <type> <name> --task "..." # generation proposals
|
|
51
|
+
akm distill <ref> # bounded LLM → `lesson` proposal
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`reflect` and `propose` shell out via the agent CLI (`agent.*` config,
|
|
55
|
+
spec §12) and write **only** to the proposal queue — they never mutate
|
|
56
|
+
live stash content. `distill` is the canonical bounded in-tree LLM call
|
|
57
|
+
gated behind `llm.features.feedback_distillation`. All three emit usage
|
|
58
|
+
events (`reflect_invoked`, `propose_invoked`, `distill_invoked`). See
|
|
59
|
+
v1 spec §11.3 and §12.4.
|
|
60
|
+
|
|
61
|
+
### `lesson` asset type — new (#227)
|
|
62
|
+
|
|
63
|
+
`lesson` is a first-class well-known type with required frontmatter
|
|
64
|
+
`description` and `when_to_use`. Lessons are stored under
|
|
65
|
+
`lessons/<name>.md` in the working stash, parallel to `memories/`.
|
|
66
|
+
Normally produced by `akm distill <ref>` as a `proposed`-quality
|
|
67
|
+
proposal and promoted via `akm proposal accept`. Direct authoring via
|
|
68
|
+
`akm import` and `akm remember`-style flows is also supported. See v1
|
|
69
|
+
spec §13.
|
|
70
|
+
|
|
71
|
+
### `llm.features.*` map with default-false gates — new (#227)
|
|
72
|
+
|
|
73
|
+
Every bounded in-tree LLM call site is gated behind exactly one feature
|
|
74
|
+
flag. All defaults are `false` so adding the schema is a non-event
|
|
75
|
+
until the user opts in. Seven keys ship in 0.7.0:
|
|
76
|
+
|
|
77
|
+
| Key | Use site |
|
|
78
|
+
| --- | --- |
|
|
79
|
+
| `curate_rerank` | LLM rerank in `akm curate` |
|
|
80
|
+
| `tag_dedup` | LLM tag dedup during indexer enrichment |
|
|
81
|
+
| `memory_consolidation` | `akm remember --enrich` consolidation |
|
|
82
|
+
| `feedback_distillation` | `akm distill <ref>` |
|
|
83
|
+
| `embedding_fallback_score` | scorer fallback when embeddings unavailable |
|
|
84
|
+
| `memory_inference` | indexer split of pending memories into atomic facts |
|
|
85
|
+
| `graph_extraction` | indexer entity/relation extraction → `graph.json` |
|
|
86
|
+
|
|
87
|
+
Every gated call site uses `tryLlmFeature(feature, config, fn, fallback)`
|
|
88
|
+
from `src/llm/feature-gate.ts`. The wrapper guarantees:
|
|
89
|
+
|
|
90
|
+
- **Disabled** → `fallback` is returned without ever calling `fn`.
|
|
91
|
+
- **Throw** → the error is swallowed; `fallback` is returned.
|
|
92
|
+
- **Timeout** → a 30-second hard timeout (override via `timeoutMs`)
|
|
93
|
+
raises `LlmFeatureTimeoutError`; `fallback` is returned.
|
|
94
|
+
|
|
95
|
+
Failure events surface through an optional `onFallback` sink so callers
|
|
96
|
+
can emit a structured `warnings` entry. See v1 spec §14.
|
|
97
|
+
|
|
98
|
+
### `quality: "proposed"` and `--include-proposed` — new
|
|
99
|
+
|
|
100
|
+
`SearchHit.quality` is an open string set with three well-known values:
|
|
101
|
+
`"generated"`, `"curated"`, and `"proposed"`. The first two are
|
|
102
|
+
included in default search; `"proposed"` is **excluded from default
|
|
103
|
+
search** and surfaces only via `akm search ... --include-proposed` or
|
|
104
|
+
via `akm proposal *`. Unknown values parse-warn-include — they remain
|
|
105
|
+
searchable so plugin authors can introduce new values without crashing
|
|
106
|
+
the indexer. `SearchHit` gains optional `quality?` and `warnings?`
|
|
107
|
+
fields. See v1 spec §4.2.
|
|
108
|
+
|
|
109
|
+
### `akm-bench` v1 — new (#234, PRs #266 / #268 / #269)
|
|
110
|
+
|
|
111
|
+
Bench grows beyond the 0.6.x smoke run into a paired-utility framework:
|
|
112
|
+
|
|
113
|
+
- **Track A — paired noakm/akm runs.** For each task, bench runs an
|
|
114
|
+
agent CLI twice (without and with akm available), captures
|
|
115
|
+
per-tool-call utility, and emits a comparable score pair.
|
|
116
|
+
- **Track B — registry attribution.** Utility deltas are mapped back
|
|
117
|
+
to specific `[origin//]type:name` refs so operators can see which
|
|
118
|
+
assets actually contributed.
|
|
119
|
+
- **`akm-bench compare`** aggregates paired runs into a delta report.
|
|
120
|
+
- **`akm-bench attribute`** surfaces the per-ref attribution report.
|
|
121
|
+
- **`akm-bench evolve`** is a stub for the closed-loop evolution
|
|
122
|
+
workflow that lands in 0.8.
|
|
123
|
+
|
|
124
|
+
The bench technical reference lives in
|
|
125
|
+
[`docs/technical/benchmark.md`](../../technical/benchmark.md).
|
|
126
|
+
|
|
127
|
+
### Removed legacy fields
|
|
128
|
+
|
|
129
|
+
- The legacy registry boolean `curated` is removed. Legacy v2 index
|
|
130
|
+
JSON parses and silently ignores it. Renderers no longer surface a
|
|
131
|
+
`curated` column; the per-asset `quality` field replaces it.
|
|
132
|
+
Publishers do not need to migrate existing JSON.
|
|
133
|
+
- Earlier 0.7.x pre-release work (#220–#223) finalised the registry
|
|
134
|
+
curation surface removal, classification pipeline rewrites, and
|
|
135
|
+
error envelope shape that 0.7.0 ships. Operators upgrading from a
|
|
136
|
+
0.6.x baseline should read [`docs/migration/v1.md`](../v1.md) for
|
|
137
|
+
the per-surface migration recipe.
|
|
138
|
+
|
|
139
|
+
### CLI surface as of 0.7.0
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
add | remove | list | update | search | show | clone | index | setup |
|
|
143
|
+
remember | import | feedback | info | curate | workflow * | vault * |
|
|
144
|
+
wiki * | enable | disable | completions | upgrade | save | help |
|
|
145
|
+
hints | config * | registry * |
|
|
146
|
+
agent | reflect | propose | proposal * | distill
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
This is the surface 0.7.0 commits to maintain through 0.8.x / 0.9.x.
|
|
150
|
+
Renaming or removing any of these commands at 1.0 GA would be a major
|
|
151
|
+
version bump.
|
|
152
|
+
|
|
153
|
+
## Pre-prod hardening (PR #275)
|
|
154
|
+
|
|
155
|
+
PR #275 batched five issues plus the bench tmp follow-up that operators
|
|
156
|
+
should be aware of:
|
|
157
|
+
|
|
158
|
+
### Security
|
|
159
|
+
|
|
160
|
+
- **#270 — git message sanitization.** Commit messages and remote URLs
|
|
161
|
+
written by akm are sanitized to prevent shell-substitution and
|
|
162
|
+
control-character injection through user-supplied content.
|
|
163
|
+
- **#271 — bench env isolation.** `akm-bench` runs each agent invocation
|
|
164
|
+
in a scrubbed environment so host secrets do not leak into bench
|
|
165
|
+
transcripts or paired-run logs.
|
|
166
|
+
- **#272 — LLM body redact + npm tarball host validation.** Outbound
|
|
167
|
+
LLM request/response bodies are redacted in error reporting before
|
|
168
|
+
surfacing to stderr or warnings, and `akm add npm:…` validates the
|
|
169
|
+
tarball download host against the configured npm registry rather
|
|
170
|
+
than blindly following arbitrary `dist.tarball` URLs.
|
|
171
|
+
|
|
172
|
+
### UX
|
|
173
|
+
|
|
174
|
+
- **#273 — workflow noise gate, sources deprecation warn, setup
|
|
175
|
+
`--help`.**
|
|
176
|
+
- `akm workflow next/complete/status` no longer print spurious
|
|
177
|
+
progress noise on quiet runs.
|
|
178
|
+
- Configs still using the legacy `stashes[]` key emit a single
|
|
179
|
+
deprecation warning per process (was: per call site).
|
|
180
|
+
- `akm setup --help` now renders the same help block as `akm setup`
|
|
181
|
+
with no args plus the documented agent-detection summary.
|
|
182
|
+
|
|
183
|
+
### Hygiene
|
|
184
|
+
|
|
185
|
+
- **#274 — tsconfig + HF pin + shapes throw.** `tsconfig.json` now
|
|
186
|
+
includes `tests/` so `bunx tsc --noEmit` covers test files. The HF
|
|
187
|
+
embeddings model is pinned to a specific revision to avoid silent
|
|
188
|
+
upstream changes. The output-shape registry now throws on a missing
|
|
189
|
+
shape rather than silently `JSON.stringify`-ing.
|
|
190
|
+
|
|
191
|
+
### Bench
|
|
192
|
+
|
|
193
|
+
- **#276 — bench tmp redirect.** `akm-bench` no longer writes scratch
|
|
194
|
+
state under `/tmp`; everything lands under the AKM cache dir
|
|
195
|
+
(`~/.cache/akm/bench/`) so cleanup is bounded and CI sandboxes that
|
|
196
|
+
ban `/tmp` writes work out of the box.
|
|
197
|
+
|
|
198
|
+
## Surfaces 0.7.0 commits to maintain (toward 1.0 GA)
|
|
199
|
+
|
|
200
|
+
These are the contract surfaces 0.7.0 ships and intends to carry
|
|
201
|
+
forward through the 0.8.x / 0.9.x pre-releases into 1.0 GA. They are
|
|
202
|
+
not yet frozen — the freeze happens at 1.0 — but operators authoring
|
|
203
|
+
against 0.7.0 should expect them to remain stable through the final
|
|
204
|
+
pre-release cycle. The full list lives in v1 spec §9.
|
|
205
|
+
|
|
206
|
+
1. `writable` defaults to `true` on `filesystem`, `false` otherwise.
|
|
207
|
+
2. Registry results are off by default in `akm search`; pass
|
|
208
|
+
`--include-registry` to merge them. Registry hits never land in
|
|
209
|
+
`hits` — they live under `registryHits`.
|
|
210
|
+
3. Write target resolves as `--target` → `defaultWriteTarget` →
|
|
211
|
+
working stash → `ConfigError`.
|
|
212
|
+
4. `writable: true` is rejected on `website` / `npm` at config load.
|
|
213
|
+
5. `SearchHit.score` is `[0, 1]`, higher = better. One scoring
|
|
214
|
+
pipeline for all indexed content.
|
|
215
|
+
6. Asset refs are `[origin//]type:name`. No URI schemes.
|
|
216
|
+
7. `quality: "proposed"` is excluded from default search.
|
|
217
|
+
8. External agents are CLI shell-out only. The in-tree LLM stays
|
|
218
|
+
bounded and stateless, gated per call site by `llm.features.*`.
|
|
219
|
+
|
|
220
|
+
## Manual actions
|
|
221
|
+
|
|
222
|
+
None for users on a 0.6.x or earlier 0.7.x pre-release with no `agent`
|
|
223
|
+
or `llm.features` blocks set. Everything new is opt-in.
|
|
224
|
+
|
|
225
|
+
If you want to use the new surfaces:
|
|
226
|
+
|
|
227
|
+
```sh
|
|
228
|
+
akm setup # detects installed agent CLIs;
|
|
229
|
+
# persists `agent.default`
|
|
230
|
+
akm config set llm.features.feedback_distillation true
|
|
231
|
+
akm distill memory:my-debugging-notes # produces a lesson proposal
|
|
232
|
+
akm proposal list
|
|
233
|
+
akm proposal accept <id>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Full migration guides
|
|
237
|
+
|
|
238
|
+
- [v1 migration guide](../v1.md) — per-surface delta from any 0.6.x
|
|
239
|
+
baseline. The canonical reference for upgrading.
|
|
240
|
+
- [v0.5 → v0.6](../v0.5-to-v0.6.md) — the older terminology cut and
|
|
241
|
+
registry schema v3.
|
|
242
|
+
- [v1 architecture spec](../../technical/v1-architecture-spec.md) —
|
|
243
|
+
the architecture contract that 0.7.0 commits to maintain through
|
|
244
|
+
1.0 GA.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-rc1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Kit Manager) — A package manager for AI agent skills, commands, tools, and knowledge. Works with Claude Code, OpenCode, Cursor, and any AI coding assistant.",
|
|
6
6
|
"keywords": [
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"optionalDependencies": {
|
|
66
|
-
"@huggingface/transformers": "
|
|
66
|
+
"@huggingface/transformers": "3.8.1",
|
|
67
67
|
"sqlite-vec": "0.1.7-alpha.2"
|
|
68
68
|
},
|
|
69
69
|
"engines": {
|
package/dist/core/warn.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Module-level quiet flag for suppressing stderr warnings.
|
|
3
|
-
* Controlled by the CLI --quiet / -q flag.
|
|
4
|
-
*/
|
|
5
|
-
let quiet = false;
|
|
6
|
-
export function setQuiet(value) {
|
|
7
|
-
quiet = value;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Reset the quiet flag to false.
|
|
11
|
-
* Intended for test teardown to prevent quiet state from leaking between tests.
|
|
12
|
-
*/
|
|
13
|
-
export function resetQuiet() {
|
|
14
|
-
quiet = false;
|
|
15
|
-
}
|
|
16
|
-
export function isQuiet() {
|
|
17
|
-
return quiet;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Emit a warning to stderr unless --quiet is active.
|
|
21
|
-
* Drop-in replacement for console.warn() across the codebase.
|
|
22
|
-
*/
|
|
23
|
-
export function warn(...args) {
|
|
24
|
-
if (!quiet) {
|
|
25
|
-
console.warn(...args);
|
|
26
|
-
}
|
|
27
|
-
}
|
package/dist/output/shapes.js
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure shaping functions that select and trim fields from command result
|
|
3
|
-
* objects according to the active detail level / agent mode.
|
|
4
|
-
*
|
|
5
|
-
* Every function in this module is side-effect free and operates on plain
|
|
6
|
-
* `Record<string, unknown>` shapes, which makes them trivial to unit test.
|
|
7
|
-
*/
|
|
8
|
-
const NORMAL_DESCRIPTION_LIMIT = 250;
|
|
9
|
-
export function shapeForCommand(command, result, detail, forAgent = false) {
|
|
10
|
-
switch (command) {
|
|
11
|
-
case "search":
|
|
12
|
-
return shapeSearchOutput(result, detail, forAgent);
|
|
13
|
-
case "registry-search":
|
|
14
|
-
return shapeRegistrySearchOutput(result, detail);
|
|
15
|
-
case "show":
|
|
16
|
-
return shapeShowOutput(result, detail, forAgent);
|
|
17
|
-
default:
|
|
18
|
-
return result;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export function shapeSearchOutput(result, detail, forAgent = false) {
|
|
22
|
-
const hits = Array.isArray(result.hits) ? result.hits : [];
|
|
23
|
-
const registryHits = Array.isArray(result.registryHits) ? result.registryHits : [];
|
|
24
|
-
const shapedHits = forAgent
|
|
25
|
-
? hits.map((hit) => shapeSearchHitForAgent(hit))
|
|
26
|
-
: hits.map((hit) => shapeSearchHit(hit, detail));
|
|
27
|
-
const shapedRegistryHits = forAgent
|
|
28
|
-
? registryHits.map((hit) => shapeSearchHitForAgent(hit))
|
|
29
|
-
: registryHits.map((hit) => shapeSearchHit(hit, detail));
|
|
30
|
-
if (forAgent) {
|
|
31
|
-
return {
|
|
32
|
-
hits: shapedHits,
|
|
33
|
-
...(shapedRegistryHits.length > 0 ? { registryHits: shapedRegistryHits } : {}),
|
|
34
|
-
...(result.tip ? { tip: result.tip } : {}),
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
if (detail === "full") {
|
|
38
|
-
return {
|
|
39
|
-
schemaVersion: result.schemaVersion,
|
|
40
|
-
stashDir: result.stashDir,
|
|
41
|
-
source: result.source,
|
|
42
|
-
hits: shapedHits,
|
|
43
|
-
...(shapedRegistryHits.length > 0 ? { registryHits: shapedRegistryHits } : {}),
|
|
44
|
-
...(result.semanticSearch ? { semanticSearch: result.semanticSearch } : {}),
|
|
45
|
-
...(result.tip ? { tip: result.tip } : {}),
|
|
46
|
-
...(result.warnings ? { warnings: result.warnings } : {}),
|
|
47
|
-
...(result.timing ? { timing: result.timing } : {}),
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
hits: shapedHits,
|
|
52
|
-
...(shapedRegistryHits.length > 0 ? { registryHits: shapedRegistryHits } : {}),
|
|
53
|
-
...(Array.isArray(result.warnings) && result.warnings.length > 0 ? { warnings: result.warnings } : {}),
|
|
54
|
-
...(result.tip ? { tip: result.tip } : {}),
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export function shapeRegistrySearchOutput(result, detail) {
|
|
58
|
-
const hits = Array.isArray(result.hits) ? result.hits : [];
|
|
59
|
-
const assetHits = Array.isArray(result.assetHits) ? result.assetHits : [];
|
|
60
|
-
// Shape stash hits as registry type
|
|
61
|
-
const shapedKitHits = hits.map((hit) => shapeSearchHit({ ...hit, type: "registry" }, detail));
|
|
62
|
-
// Shape asset hits by detail level
|
|
63
|
-
const shapedAssetHits = assetHits.map((hit) => shapeAssetHit(hit, detail));
|
|
64
|
-
const shaped = {
|
|
65
|
-
hits: shapedKitHits,
|
|
66
|
-
...(shapedAssetHits.length > 0 ? { assetHits: shapedAssetHits } : {}),
|
|
67
|
-
...(Array.isArray(result.warnings) && result.warnings.length > 0 ? { warnings: result.warnings } : {}),
|
|
68
|
-
};
|
|
69
|
-
if (detail === "full") {
|
|
70
|
-
shaped.query = result.query;
|
|
71
|
-
}
|
|
72
|
-
return shaped;
|
|
73
|
-
}
|
|
74
|
-
export function shapeAssetHit(hit, detail) {
|
|
75
|
-
if (detail === "brief")
|
|
76
|
-
return pickFields(hit, ["assetName", "assetType", "action", "estimatedTokens"]);
|
|
77
|
-
if (detail === "normal") {
|
|
78
|
-
return capDescription(pickFields(hit, ["assetName", "assetType", "description", "stash", "action", "estimatedTokens"]), NORMAL_DESCRIPTION_LIMIT);
|
|
79
|
-
}
|
|
80
|
-
return hit;
|
|
81
|
-
}
|
|
82
|
-
export function shapeSearchHit(hit, detail) {
|
|
83
|
-
if (hit.type === "registry") {
|
|
84
|
-
if (detail === "brief") {
|
|
85
|
-
// RegistrySearchHit uses `title` (not `name`); always project installRef
|
|
86
|
-
// and score so callers can use the result without --detail full (QA #28).
|
|
87
|
-
const out = pickFields(hit, ["title", "name", "installRef", "score"]);
|
|
88
|
-
// Normalise: if only title exists, expose it as `name` for consistency
|
|
89
|
-
if (out.title && !out.name)
|
|
90
|
-
out.name = out.title;
|
|
91
|
-
return out;
|
|
92
|
-
}
|
|
93
|
-
if (detail === "normal") {
|
|
94
|
-
const out = capDescription(pickFields(hit, ["title", "name", "description", "action", "installRef", "score", "curated"]), NORMAL_DESCRIPTION_LIMIT);
|
|
95
|
-
if (out.title && !out.name)
|
|
96
|
-
out.name = out.title;
|
|
97
|
-
return out;
|
|
98
|
-
}
|
|
99
|
-
return hit;
|
|
100
|
-
}
|
|
101
|
-
// Stash hit (local or remote)
|
|
102
|
-
if (detail === "brief")
|
|
103
|
-
return pickFields(hit, ["type", "name", "action", "estimatedTokens"]);
|
|
104
|
-
if (detail === "normal") {
|
|
105
|
-
return capDescription(pickFields(hit, ["type", "name", "description", "action", "score", "estimatedTokens"]), NORMAL_DESCRIPTION_LIMIT);
|
|
106
|
-
}
|
|
107
|
-
return hit;
|
|
108
|
-
}
|
|
109
|
-
/** Agent-optimized search hit: only fields an LLM agent needs to decide and act */
|
|
110
|
-
export function shapeSearchHitForAgent(hit) {
|
|
111
|
-
const picked = pickFields(hit, ["name", "ref", "type", "description", "action", "score", "estimatedTokens"]);
|
|
112
|
-
return capDescription(picked, NORMAL_DESCRIPTION_LIMIT);
|
|
113
|
-
}
|
|
114
|
-
export function capDescription(hit, limit) {
|
|
115
|
-
if (typeof hit.description !== "string")
|
|
116
|
-
return hit;
|
|
117
|
-
return { ...hit, description: truncateDescription(hit.description, limit) };
|
|
118
|
-
}
|
|
119
|
-
export function truncateDescription(description, limit) {
|
|
120
|
-
const normalized = description.replace(/\s+/g, " ").trim();
|
|
121
|
-
if (normalized.length <= limit)
|
|
122
|
-
return normalized;
|
|
123
|
-
const truncated = normalized.slice(0, limit - 1);
|
|
124
|
-
const lastSpace = truncated.lastIndexOf(" ");
|
|
125
|
-
const safe = lastSpace >= Math.floor(limit * 0.6) ? truncated.slice(0, lastSpace) : truncated;
|
|
126
|
-
return `${safe.trimEnd()}...`;
|
|
127
|
-
}
|
|
128
|
-
export function shapeShowOutput(result, detail, forAgent = false) {
|
|
129
|
-
if (forAgent) {
|
|
130
|
-
return pickFields(result, [
|
|
131
|
-
"type",
|
|
132
|
-
"name",
|
|
133
|
-
"description",
|
|
134
|
-
"action",
|
|
135
|
-
"content",
|
|
136
|
-
"template",
|
|
137
|
-
"prompt",
|
|
138
|
-
"run",
|
|
139
|
-
"setup",
|
|
140
|
-
"cwd",
|
|
141
|
-
"toolPolicy",
|
|
142
|
-
"modelHint",
|
|
143
|
-
"agent",
|
|
144
|
-
"parameters",
|
|
145
|
-
"workflowTitle",
|
|
146
|
-
"workflowParameters",
|
|
147
|
-
"steps",
|
|
148
|
-
"keys",
|
|
149
|
-
"comments",
|
|
150
|
-
]);
|
|
151
|
-
}
|
|
152
|
-
if (detail === "summary") {
|
|
153
|
-
return pickFields(result, [
|
|
154
|
-
"type",
|
|
155
|
-
"name",
|
|
156
|
-
"description",
|
|
157
|
-
"tags",
|
|
158
|
-
"parameters",
|
|
159
|
-
"workflowTitle",
|
|
160
|
-
"action",
|
|
161
|
-
"run",
|
|
162
|
-
"origin",
|
|
163
|
-
"keys",
|
|
164
|
-
"comments",
|
|
165
|
-
]);
|
|
166
|
-
}
|
|
167
|
-
const base = pickFields(result, [
|
|
168
|
-
"type",
|
|
169
|
-
"name",
|
|
170
|
-
"origin",
|
|
171
|
-
"action",
|
|
172
|
-
"description",
|
|
173
|
-
"tags",
|
|
174
|
-
"content",
|
|
175
|
-
"template",
|
|
176
|
-
"prompt",
|
|
177
|
-
"toolPolicy",
|
|
178
|
-
"modelHint",
|
|
179
|
-
"agent",
|
|
180
|
-
"parameters",
|
|
181
|
-
"workflowTitle",
|
|
182
|
-
"workflowParameters",
|
|
183
|
-
"steps",
|
|
184
|
-
"run",
|
|
185
|
-
"setup",
|
|
186
|
-
"cwd",
|
|
187
|
-
"keys",
|
|
188
|
-
"comments",
|
|
189
|
-
// path and editable are always projected so JSON consumers can locate and
|
|
190
|
-
// edit the asset without needing --detail full (QA #7).
|
|
191
|
-
"path",
|
|
192
|
-
"editable",
|
|
193
|
-
]);
|
|
194
|
-
if (detail !== "full") {
|
|
195
|
-
return base;
|
|
196
|
-
}
|
|
197
|
-
return {
|
|
198
|
-
schemaVersion: 1,
|
|
199
|
-
...base,
|
|
200
|
-
...pickFields(result, ["editHint"]),
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
export function pickFields(source, fields) {
|
|
204
|
-
const result = {};
|
|
205
|
-
for (const field of fields) {
|
|
206
|
-
if (source[field] !== undefined) {
|
|
207
|
-
result[field] = source[field];
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
return result;
|
|
211
|
-
}
|
|
212
|
-
export { NORMAL_DESCRIPTION_LIMIT };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|