@moldea.ai/cli 9.0.1 → 11.0.0

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  The canonical read-only local command-line composition for deterministic inspection of `moldea` repositories.
6
6
 
7
- The version 9 executable exposes one schema-5-only JSON contract. `validate` and `inspect` are content-free, `scope` matches changed paths by reading only the project manifest, and `content` retrieves one explicitly selected canonical text asset in bounded Unicode-safe chunks. Collection and content responses use deterministic snapshot-bound cursors, exact final UTF-8 byte accounting, a 65,536-byte default page budget, and a 1,048,576-byte hard page ceiling.
7
+ The version 11 executable exposes one schema-7-only JSON contract. `validate` and `inspect` are content-free, `scope` matches changed paths by reading only the project manifest, and `content` retrieves one explicitly selected canonical text asset in bounded Unicode-safe chunks. Collection and content responses use deterministic snapshot-bound cursors, exact final UTF-8 byte accounting, a 65,536-byte default page budget, and a 1,048,576-byte hard page ceiling.
8
8
 
9
9
  Install and invoke the CLI from each adopted repository. Global or user-home installation is outside the supported trust boundary because it can make unrelated repositories share ambient skill and executable behavior.
10
10
 
@@ -23,7 +23,7 @@ moldea content --path /moldea/project.md
23
23
  moldea composition
24
24
  ```
25
25
 
26
- The executable supports top-level and command-specific help, `moldea --version`, strict option validation, and deterministic usage failures. Repository-backed commands discover and pin a Git working tree, use a no-follow exact-path reader, and retry complete provisional operations when the selected source changes. `validate` and `inspect` run the full Core and adapter composition. `scope` and `content` do not load or verify adapters and limit Git inventory to the manifest or requested canonical path. `composition` reports installed executable state without discovering a repository.
26
+ The executable supports top-level and command-specific help, `moldea --version`, strict option validation, and deterministic usage failures. Repository-backed commands discover and pin a Git working tree, use a no-follow exact-path reader, and retry complete provisional operations when the selected source changes. `validate` and `inspect` run the full Core inspection in a supervised analysis worker. The CLI owns repository reads and closes the worker before source post-checks or successful output. `scope` and `content` limit Git inventory to the manifest or requested canonical path. `composition` reports installed executable state without discovering a repository.
27
27
 
28
28
  ## Package boundary
29
29
 
@@ -32,24 +32,12 @@ The package exposes the `moldea` executable and no supported JavaScript or TypeS
32
32
  - `@moldea.ai/repository`
33
33
  - `@moldea.ai/repository-fs`
34
34
  - `@moldea.ai/core`
35
- - `@moldea.ai/adapter-anthropic`
36
- - `@moldea.ai/adapter-claude-agent-sdk`
37
- - `@moldea.ai/adapter-cloudflare-agents`
38
- - `@moldea.ai/adapter-eve`
39
- - `@moldea.ai/adapter-google-genai`
40
- - `@moldea.ai/adapter-langchain`
41
- - `@moldea.ai/adapter-langgraph`
42
- - `@moldea.ai/adapter-openai`
43
- - `@moldea.ai/adapter-openai-agents-sdk`
44
- - `@moldea.ai/adapter-vercel-ai-sdk`
45
-
46
- The package-backed `anthropic`, `claude-agent-sdk`, `cloudflare-agents`, `eve`, `google-genai`, `langchain`, `langgraph`, `openai`, `openai-agents-sdk`, and `vercel-ai-sdk` runtime adapters are active. The `custom` adapter remains built into Core and requires no separate package. Target maturity is not part of the CLI contract.
47
35
 
48
36
  The package declares `preferUnplugged: true` so Yarn Plug'n'Play materializes the executable on the physical filesystem instead of leaving the bundled ESM entry point inside ZipFS. This package-owned hint preserves repository-local Yarn execution without requiring client configuration or a `node_modules` linker.
49
37
 
50
- The executable derives its composition state from its installed manifest, actually resolved first-class package versions, active adapter singletons, Core repository-format constants, minimum Git constant, and JSON output schema constant. It carries no Runtime Compatibility Matrix or target-maturity snapshot.
38
+ The executable derives composition from its installed manifest, resolved foundational package versions, Core format constants, minimum Git constant and JSON schema constant.
51
39
 
52
- The executable performs no network requests, telemetry, repository writes, configured Git content transformations, temporary-index operations, or object-writing Git commands. Repository-backed commands use read-only Git and no-follow filesystem observations within at most three complete snapshot attempts. Help, version, and usage failures do not run the installation-integrity preflight. `composition` and that preflight do not invoke Git, a filesystem repository reader, a client manifest, or Core inspection; the preflight reads installed package manifests and compares them with the actual adapter and Core composition.
40
+ The executable performs no network requests, telemetry, repository writes, configured Git content transformations, temporary-index operations or object-writing Git commands. Repository commands use read-only Git and no-follow filesystem observations within at most three complete snapshot attempts. Help, version and usage failures skip the installation preflight. The preflight compares installed package metadata; `composition` does not create an inspection worker.
53
41
 
54
42
  ## Runtime support
55
43
 
@@ -91,7 +79,7 @@ Before attempting a snapshot, the CLI pins the selected root directory, its work
91
79
 
92
80
  The CLI retries the complete provisional attempt for differing inventories, Repository FS `SNAPSHOT_CHANGED` failures, and reader-creation missing-entry or parent-type failures when a fresh inventory proves the source changed. It recreates the inventory, reader, wrappers, operation state, and filesystem resource budget for every retry and never reuses provisional bytes or results. Three total attempts are allowed. Exhaustion or a changed pinned identity returns `cli:WORKING_TREE_UNSTABLE` with message `The working tree did not remain stable.` and `retryable: true`.
93
81
 
94
- The CLI does not expose selected paths, candidate paths, resolved repository roots, raw process errors, or Git diagnostics in failures. Every accepted snapshot operation creates a fresh Core instance with the exact effective limits: `maxEntries`, `maxFileBytes`, `maxManifestBytes`, `maxDiagnostics`, and `maxEvidence` retain their names, while `maxTotalBytes` becomes Core's `maxTotalBytesRead`. Core's logical `maxRetainedBytes` ceiling is four times that total-read limit, capped at JavaScript's maximum safe integer, so validation and prepared inspection state remain bounded without adding another CLI option. Each `inspect` attempt prepares one content-free Core inspection and reads its requested page without a second validation pass. The active package-backed adapter set contains the immutable `anthropic`, `claude-agent-sdk`, `cloudflare-agents`, `eve`, `google-genai`, `langchain`, `langgraph`, `openai`, `openai-agents-sdk`, and `vercel-ai-sdk` adapter singletons; Core's built-in `custom` behavior remains available without registration.
82
+ The CLI does not expose selected paths, candidate paths, resolved repository roots, raw process errors, or Git diagnostics in failures. Every accepted snapshot operation creates a fresh Core instance with the exact effective limits: `maxEntries`, `maxFileBytes`, `maxManifestBytes`, `maxDiagnostics`, and `maxCoverage` retain their names, while `maxTotalBytes` becomes Core's `maxTotalBytesRead`. Core's logical `maxRetainedBytes` ceiling is four times that total-read limit, capped at JavaScript's maximum safe integer, so validation and prepared inspection state remain bounded without adding another CLI option. Each `inspect` attempt prepares one content-free Core inspection and reads its requested page without a second validation pass.
95
83
 
96
84
  Core resource refusals are mapped without loss into safe CLI error details: the limit name, configured maximum, observed or projected usage, and stable next action remain available, while repository bodies and private host diagnostics remain absent.
97
85
 
@@ -99,31 +87,33 @@ Known `RepositorySourceException`, `CoreConfigurationException`, and `CoreOperat
99
87
 
100
88
  ## Cancellation and process signals
101
89
 
102
- The executable owns one operation-scoped `AbortController`. Repository-backed commands pass its signal through every Git child process, working-tree snapshot step, Repository FS creation, repository read, Core operation, and any applicable adapter invocation. `SIGINT` and `SIGTERM` abort the active operation, prevent another snapshot retry, discard an unwritten result, and exit with code `130` and `143`, respectively. The first received signal determines the exit code. A signal received after output has been completely written does not alter the completed result.
90
+ The executable owns one operation-scoped `AbortController`. Repository-backed commands pass its signal through every Git child process, working-tree snapshot step, Repository FS creation, repository read, Core operation. `SIGINT` and `SIGTERM` abort the active operation, prevent another snapshot retry, discard an unwritten result, and exit with code `130` and `143`, respectively. The first received signal determines the exit code. A signal received after output has been completely written does not alter the completed result.
103
91
 
104
92
  Git process cancellation uses the safe retryable `git:GIT_OPERATION_ABORTED` contract with message `The Git operation was aborted.` at internal command boundaries. When cancellation originates from a process signal before output completion, the executable may emit no human or JSON document rather than expose a successful or partial result. Active Git child processes are terminated through the same operation signal; no raw abort reason or process diagnostic is printed.
105
93
 
106
- A successfully completed Core inspection produces `validate` human or JSON output without exposing the project index, canonical content, or adapter evidence details. Zero errors return status `valid` and exit code `0`, including when scoped unverified-relationship warnings are present. Confirmed errors return status `invalid` and exit code `1`. Complete error and warning counts appear on every JSON page; human output names the affected relationship and safe version context when available. Diagnostics use bounded pages in JSON mode.
94
+ A completed Core inspection produces content-free `validate` output. Zero errors return `valid` and exit `0`; errors return `invalid` and exit `1`. Every diagnostic has severity and group. Warnings have a stable subject and qualifier, acceptance eligibility, an accepted flag and its reason when accepted. Complete errors, unaccepted warnings and accepted warnings are counted separately on every JSON page.
107
95
 
108
- `inspect` uses the same completion status and exit codes. Human output reports the repository format and complete collection counts. JSON output contains only allowlisted records: one independently keyed `agent` record per canonical agent with exactly its `agentId` and manifest-declared `runtimeId`, asset identifiers and metadata, diagnostic severity and closed warning context without arbitrary error details, and evidence summaries without adapter detail payloads. An assignment establishes canonical configuration only. It does not claim that a runtime is installed, implemented, qualified, or published. Unbounded child collections are emitted as independently keyed records, so no parent record grows with the repository. A recursive guard rejects any non-`content` result containing a `content` property or an exact canonical body.
96
+ Binding coverage reports the checks performed on each declared reference: `fileCheck`, `exportCheck`, and a reason when an export could not be checked. TypeScript and JavaScript ESM use conservative syntax-only export inventories; CommonJS, unsupported extensions and inconclusive syntax remain not checked. A passed export check does not establish runtime wiring or SDK compatibility. Interrupted operations return an error without a partial coverage result.
109
97
 
110
- `scope` accepts either one leading-slash repository-logical path through `--path` or NUL-delimited UTF-8 paths with the same grammar through `--paths-stdin`. Invalid paths return `PATH_INPUT_INVALID` before repository discovery; relative paths are not normalized. It reads only `/moldea/moldea.yaml`, invokes Core's deterministic relationship matcher without adapters, and returns relevance, complete counts and digests, and paged match or diagnostic records. `content` accepts exactly one canonical moldea text path and returns metadata plus the largest complete Unicode-scalar chunk that fits its output page.
98
+ `inspect` uses the same completion status and exit codes. Its allowlisted pages contain agent/runtime assignments, asset metadata, diagnostics and binding coverage. Both commands expose coverage counts and the specific file and export checks performed; a successful export check does not prove runtime wiring. Unbounded collections use independent record keys. Canonical bodies are available only through `content`.
99
+
100
+ `scope` accepts either one leading-slash repository-logical path through `--path` or NUL-delimited UTF-8 paths with the same grammar through `--paths-stdin`. Invalid paths return `PATH_INPUT_INVALID` before repository discovery; relative paths are not normalized. It reads only `/moldea/moldea.yaml`, invokes Core's deterministic manifest-only relationship matcher, and returns relevance, complete counts and digests, and paged match or diagnostic records. `content` accepts exactly one canonical moldea text path and returns metadata plus the largest complete Unicode-scalar chunk that fits its output page.
111
101
 
112
102
  For JSON collection and content output, `--max-output-bytes` accepts 4,096 through 1,048,576 bytes and defaults to 65,536. The measurement covers the final newline-terminated UTF-8 envelope after JSON escaping. `--cursor` continues a prior JSON page. Cursors are opaque canonical base64url documents bound to their format version, command, normalized filters, source snapshot, last key, and checksum. Invalid, tampered, cross-command, filter-mismatched, unsupported, or stale cursors fail with a safe structured error. An envelope or atomic record that cannot fit returns `OUTPUT_BUDGET_TOO_SMALL`; output is never truncated into invalid JSON.
113
103
 
114
- The 65,536-byte default is retained by a reproducible three-sample resource corpus covering ordinary and 1,024-path repositories, large Unicode content, broad relationship output, dense diagnostics, and invalid binary content. Large traversals use additional bounded pages without raising the page peak. The 1 MiB hard maximum is a single-response safety boundary, not a total repository-size limit.
104
+ The default output budget remains 65,536 bytes. The [historical release observations](../../docs/launch-readiness.md) record the earlier resource corpus and its original package versions; those measurements do not establish current release performance. Large traversals use additional bounded pages without raising the page peak. The 1 MiB hard maximum is a single-response safety boundary, not a total repository-size limit.
115
105
 
116
106
  The `inspect` unresolved count includes project-owned and agent-owned requirements across all effects. IDs are scoped to their owners, so identical IDs under different owners count separately. These readiness gaps do not themselves invalidate structurally valid project state.
117
107
 
118
- Each CLI invocation is stateless. An `inspect --cursor` call repeats Git inventory and Core preparation before returning its page; a prepared Core inspection used within one process can read further pages without repeating that work. In a 65-agent shared-source fixture on Linux, the default output budget required three separate CLI commands, emitted 155,606 cumulative JSON bytes, and took 3.37 seconds in one local run. The result describes that fixture and host, not a fixed performance limit or a token count. Use `scope` for changed-path relevance and `content` for one canonical file when a full inspection is unnecessary, and request only the pages needed for the task.
108
+ Each CLI invocation is stateless. An `inspect --cursor` call repeats Git inventory and Core preparation before returning its page; a prepared Core inspection used within one process can read further pages without repeating that work. Use `scope` for changed-path relevance and `content` for one canonical file when a full inspection is unnecessary, and request only the pages needed for the task.
119
109
 
120
110
  ## Installed composition and integrity
121
111
 
122
- Before `validate`, `inspect`, or `composition` produces a result, the executable compares its installed package metadata, actually resolved first-class package identities and versions, compatible-major first-class dependency declarations, active package-backed adapter registration, Core repository-format support, minimum Git constant, and JSON output schema constant. Source-workspace dependencies use `workspace:^<major>.0.0`; packed dependencies retain the equivalent `^<major>.0.0` range. Every resolved package must satisfy the CLI release's declared major line. Exact pins, unbounded ranges, package-manager overrides to a different major or prerelease, missing or additional first-class dependencies, duplicate or invalid adapter IDs, package-backed registration of `custom`, unsupported adapter formats, and invalid constants fail before Git discovery or repository inspection. Compatible patch and minor resolutions remain valid and are reported exactly by `composition`.
112
+ Before `validate`, `inspect` or `composition` returns a result, installation checks compare package identities and resolved versions, compatible-major dependency declarations, Core format support, minimum Git and JSON schema constants. Source dependencies use `workspace:^<minimum>` and packed dependencies use `^<minimum>`. Missing, additional, prerelease or breaking-major substitutions fail closed. Compatible patches and minor releases are reported exactly by `composition`.
123
113
 
124
- `composition` reports the installed CLI version and JSON schema version in the envelope, plus the supported Node.js range, minimum Git version, sorted exact package versions, Core repository-format versions, and every sorted executable adapter with its accepted repository formats. Core's built-in `custom` adapter is included using Core's format support. The CLI does not report matrix entries, maturity, implementation status, target profiles, evidence links, or compatibility claims owned by the packages website. Current published technical compatibility and target maturity are available from [`https://packages.moldea.ai/compatibility/runtimes.json`](https://packages.moldea.ai/compatibility/runtimes.json).
114
+ `composition` reports the installed CLI and schema versions, supported Node.js range, minimum Git, sorted foundational package versions and Core repository-format versions. It reads installed metadata without creating a worker or accessing a client repository.
125
115
 
126
- Successful human and JSON reports use exit code `0`; JSON uses status `valid` and the schema 5 deterministic envelope. The command never uses status `invalid`. A contradictory installation returns the non-retryable `cli:COMPOSITION_STATE_INVALID` error with message `The installed composition state is invalid.` and exit code `3`, without a partial result. The command accesses no Git executable, repository filesystem, client manifest, network, or Cloud service.
116
+ Successful human and JSON reports use exit code `0`; JSON uses status `valid` and the schema 7 deterministic envelope. The command never uses status `invalid`. A contradictory installation returns the non-retryable `cli:COMPOSITION_STATE_INVALID` error with message `The installed composition state is invalid.` and exit code `3`, without a partial result. The command accesses no Git executable, repository filesystem, client manifest, network, or Cloud service.
127
117
 
128
118
  ## Development
129
119
 
@@ -140,6 +130,6 @@ pnpm --filter @moldea.ai/cli test
140
130
 
141
131
  Unit, integration, and end-to-end tests are colocated with their owning modules. The end-to-end suite installs real package tarballs and executes the resulting package bin without requiring any `@moldea.ai/*` package to be published. It verifies command, output, exit, security, package-content, process-signal, and repository-immutability behavior at the consumer boundary.
142
132
 
143
- CI separately packs Repository, Repository FS, Core, every active package-backed adapter, and CLI and installs them with npm scripts disabled and strict engine validation on Node.js `22.11.0`, latest Node.js 22, Node.js `24.11.0`, latest Node.js 24, and Node.js `26.8.1`. Dedicated runtime harnesses verify each adapter's installed inspection boundary and the CLI's installed identities plus real `version`, `composition`, `validate`, `inspect`, `scope`, and `content` execution. Linux owns this consumer-runtime matrix, while the complete repository tests continue to run on Linux, macOS, and Windows.
133
+ CI packs Repository, Repository FS, Core and CLI and tests installed commands across the supported Node versions on Linux, macOS and Windows. The packed Node harness checks bounded paging, handled worker exhaustion, timeout, readmission and parent-loss cleanup. Its failure fixtures inject only the worker workload while retaining the real packed supervisor and IPC. The fifteen repository-neutral corpus workloads run three cold samples each and check expected errors and warnings. SDK calls and runtime wiring are outside this guarantee.
144
134
 
145
- Every active package-backed adapter has its own repository fixtures, package tests, packed-runtime consumer check, and verified compatibility claim. Qualification execution remains outside this repository; targets with a committed skill profile may publish its canonical evidence URL through the compatibility matrix.
135
+ The consumer checksum selection and qualification evidence live in [`consumers/`](../../consumers/). Historical evidence applies only to its recorded versions and sources.