@moldea.ai/cli 9.0.0 → 10.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 10 executable exposes one schema-6-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 and adapter composition in a supervised analysis worker. The CLI owns repository reads and closes the worker before source post-checks or successful output. `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.
27
27
 
28
28
  ## Package boundary
29
29
 
@@ -49,7 +49,7 @@ The package declares `preferUnplugged: true` so Yarn Plug'n'Play materializes th
49
49
 
50
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.
51
51
 
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.
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. The manifest preflight reads installed package metadata before repository discovery. Actual adapter identities are checked inside the isolated inspection. `composition` uses an empty in-memory snapshot to load and verify the installed adapters, without invoking Git or reading a client repository.
53
53
 
54
54
  ## Runtime support
55
55
 
@@ -105,23 +105,27 @@ Git process cancellation uses the safe retryable `git:GIT_OPERATION_ABORTED` con
105
105
 
106
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.
107
107
 
108
+ Runtime inspection is reported separately from validity as `complete`, `incomplete`, or `not-run`. `complete` means every applicable declaration was accounted for with evidence or a proved error; `incomplete` means scoped unverified warnings remain; `not-run` means universal validation or adapter availability prevented inspection. A project with no applicable runtime relationships is `complete`. Zero errors still produces `valid`, including warning-only results. A valid result with incomplete runtime inspection does not establish launch readiness. Operational failure returns an error without a fabricated completed inspection.
109
+
108
110
  `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.
109
111
 
110
- `scope` accepts either one repository-logical path through `--path` or NUL-delimited UTF-8 paths through `--paths-stdin`. 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.
112
+ `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.
111
113
 
112
114
  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
115
 
114
116
  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.
115
117
 
118
+ 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.
119
+
116
120
  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.
117
121
 
118
122
  ## Installed composition and integrity
119
123
 
120
- 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`.
124
+ 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:^<minimum>`; packed dependencies retain the equivalent `^<minimum>` range. Repository FS requires at least `2.0.3`, which includes the bounded scan correction. Every resolved package must satisfy its declared compatible release range. 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`.
121
125
 
122
126
  `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).
123
127
 
124
- 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.
128
+ Successful human and JSON reports use exit code `0`; JSON uses status `valid` and the schema 6 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.
125
129
 
126
130
  ## Development
127
131
 
@@ -138,6 +142,6 @@ pnpm --filter @moldea.ai/cli test
138
142
 
139
143
  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.
140
144
 
141
- 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.
145
+ 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. The CLI matrix runs on Linux, macOS, and Windows and verifies installed identities, real `version`, `composition`, `validate`, `inspect`, `scope`, and `content` execution, handled worker exhaustion, timeout, readmission, and parent-loss cleanup. Each CLI lane also runs three cold samples of all 24 positive calibration fixtures, checking their expected errors and warnings, including the large selected sources and mixed adapters. The fixture harness uses Node's type stripping to reuse the maintained TypeScript fixtures; CLI and inspection subprocesses retain their production flags. Adapter-specific consumer checks run on Linux, and complete repository tests run on all three operating systems.
142
146
 
143
147
  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.
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ import { anthropicAdapter } from "@moldea.ai/adapter-anthropic";
3
+ import { claudeAgentSdkAdapter } from "@moldea.ai/adapter-claude-agent-sdk";
4
+ import { cloudflareAgentsAdapter } from "@moldea.ai/adapter-cloudflare-agents";
5
+ import { eveAdapter } from "@moldea.ai/adapter-eve";
6
+ import { googleGenAiAdapter } from "@moldea.ai/adapter-google-genai";
7
+ import { langChainAdapter } from "@moldea.ai/adapter-langchain";
8
+ import { langGraphAdapter } from "@moldea.ai/adapter-langgraph";
9
+ import { openAiAdapter } from "@moldea.ai/adapter-openai";
10
+ import { openAiAgentsSdkAdapter } from "@moldea.ai/adapter-openai-agents-sdk";
11
+ import { vercelAiSdkAdapter } from "@moldea.ai/adapter-vercel-ai-sdk";
12
+ //#region src/core-composition/constants.ts
13
+ var ACTIVE_RUNTIME_ADAPTERS = Object.freeze([
14
+ anthropicAdapter,
15
+ claudeAgentSdkAdapter,
16
+ cloudflareAgentsAdapter,
17
+ eveAdapter,
18
+ googleGenAiAdapter,
19
+ langChainAdapter,
20
+ langGraphAdapter,
21
+ openAiAdapter,
22
+ openAiAgentsSdkAdapter,
23
+ vercelAiSdkAdapter
24
+ ]);
25
+ //#endregion
26
+ export { ACTIVE_RUNTIME_ADAPTERS as adapters };
27
+
28
+ //# sourceMappingURL=adapter-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter-registry.js","names":[],"sources":["../src/core-composition/constants.ts"],"sourcesContent":["import type { IRuntimeAdapter } from '@moldea.ai/core/adapter';\nimport { anthropicAdapter } from '@moldea.ai/adapter-anthropic';\nimport { claudeAgentSdkAdapter } from '@moldea.ai/adapter-claude-agent-sdk';\nimport { cloudflareAgentsAdapter } from '@moldea.ai/adapter-cloudflare-agents';\nimport { eveAdapter } from '@moldea.ai/adapter-eve';\nimport { googleGenAiAdapter } from '@moldea.ai/adapter-google-genai';\nimport { langChainAdapter } from '@moldea.ai/adapter-langchain';\nimport { langGraphAdapter } from '@moldea.ai/adapter-langgraph';\nimport { openAiAdapter } from '@moldea.ai/adapter-openai';\nimport { openAiAgentsSdkAdapter } from '@moldea.ai/adapter-openai-agents-sdk';\nimport { vercelAiSdkAdapter } from '@moldea.ai/adapter-vercel-ai-sdk';\n\n// package-backed runtime adapters active in this CLI release\nexport const ACTIVE_RUNTIME_ADAPTERS: readonly IRuntimeAdapter[] = Object.freeze([\n anthropicAdapter,\n claudeAgentSdkAdapter,\n cloudflareAgentsAdapter,\n eveAdapter,\n googleGenAiAdapter,\n langChainAdapter,\n langGraphAdapter,\n openAiAdapter,\n openAiAgentsSdkAdapter,\n vercelAiSdkAdapter,\n]);\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,0BAAsD,OAAO,OAAO;CAC/E;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { t as resolveInstalledMoldeaCliComposition } from "./composition-DIN3r5rw.js";
3
+ export { resolveInstalledMoldeaCliComposition };