@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 +18 -28
- package/dist/chunks/{semver-BzaJzKRS.js → composition-plpY2VTL.js} +1046 -2
- package/dist/chunks/composition-plpY2VTL.js.map +1 -0
- package/dist/chunks/composition-qEC_umal.js +3 -0
- package/dist/chunks/core-composition-vn2fp5zf.js +93 -0
- package/dist/chunks/core-composition-vn2fp5zf.js.map +1 -0
- package/dist/moldea.js +41 -955
- package/dist/moldea.js.map +1 -1
- package/package.json +3 -13
- package/dist/chunks/composition-Ck3cXQUk.js +0 -142
- package/dist/chunks/composition-Ck3cXQUk.js.map +0 -1
- package/dist/chunks/core-composition-CgaKOyog.js +0 -3
- package/dist/chunks/core-composition-CttwXtDG.js +0 -92
- package/dist/chunks/core-composition-CttwXtDG.js.map +0 -1
- package/dist/chunks/semver-BzaJzKRS.js.map +0 -1
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
|
|
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
|
|
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
|
|
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
|
|
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 `
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
`
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
135
|
+
The consumer checksum selection and qualification evidence live in [`consumers/`](../../consumers/). Historical evidence applies only to its recorded versions and sources.
|