@moldea.ai/cli 4.0.0 → 5.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 +11 -11
- package/dist/moldea.js +46 -46
- package/dist/moldea.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
The canonical read-only local command-line composition for deterministic inspection of `moldea` repositories.
|
|
6
6
|
|
|
7
|
-
The package's version
|
|
7
|
+
The package's version 5 surface provides the `moldea` executable with the version 1 command grammar and version 2 JSON envelope. It includes deterministic help and version output, resource-limit validation, safe human or JSON errors, Git-owned working-tree discovery, bounded strict tracked/untracked candidate probing, submodule and nested-repository ownership filtering, deterministic stage collapse, no-follow current entry-type normalization, bounded effective `core.symlinks` resolution, portable logical-path normalization with exact Unicode code-point ordering, bounded effective Git content-transformation classification, exact-path Repository FS construction, private immutable reader wrappers for materialized Git symlinks and guarded regular-file reads, bounded whole-operation snapshot stabilization, attempt-local Core execution, safe Repository/Core operational-error translation, operation-scoped process-signal cancellation, deterministic content-minimized `validate` human and JSON results, concise content-free `inspect` human summaries, complete Core-result `inspect` JSON output, command-wide installation-integrity verification, and compact deterministic `composition` human and JSON reporting.
|
|
8
8
|
|
|
9
|
-
Version
|
|
9
|
+
Version 5 bundles Anthropic adapter `2.0.3`, whose client-tool names must match `^[A-Za-z0-9_-]{1,64}$`.
|
|
10
10
|
|
|
11
11
|
Tarball, installed-bin, and cross-repository skill checks remain the release boundary for every published version.
|
|
12
12
|
|
|
@@ -17,10 +17,10 @@ The version 1 command names are:
|
|
|
17
17
|
```text
|
|
18
18
|
moldea validate
|
|
19
19
|
moldea inspect
|
|
20
|
-
moldea
|
|
20
|
+
moldea composition
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
The foundation fully supports top-level and command-specific help, `moldea --version`, strict option validation, and usage failures. It discovers a selected working tree, pins its filesystem and Git identity, probes its raw tracked and non-ignored untracked candidates, excludes submodule and nested-repository-only content, collapses index stages by exact path, omits absent paths, classifies every remaining current file or symlink without following the leaf, derives its effective Git content-transformation state, converts the surviving records into deterministically sorted repository logical paths, retries a complete provisional reader operation when the source changes, and runs Core through the accepted reader. `validate` and `inspect` return completed valid and structurally invalid results. `
|
|
23
|
+
The foundation fully supports top-level and command-specific help, `moldea --version`, strict option validation, and usage failures. It discovers a selected working tree, pins its filesystem and Git identity, probes its raw tracked and non-ignored untracked candidates, excludes submodule and nested-repository-only content, collapses index stages by exact path, omits absent paths, classifies every remaining current file or symlink without following the leaf, derives its effective Git content-transformation state, converts the surviving records into deterministically sorted repository logical paths, retries a complete provisional reader operation when the source changes, and runs Core through the accepted reader. `validate` and `inspect` return completed valid and structurally invalid results. `composition` reports the installed executable and exact package composition without discovering a repository.
|
|
24
24
|
|
|
25
25
|
## Package boundary
|
|
26
26
|
|
|
@@ -44,9 +44,9 @@ The package-backed `anthropic`, `claude-agent-sdk`, `cloudflare-agents`, `eve`,
|
|
|
44
44
|
|
|
45
45
|
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 root-local Yarn execution without requiring client configuration or a `node_modules` linker.
|
|
46
46
|
|
|
47
|
-
The executable derives its
|
|
47
|
+
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.
|
|
48
48
|
|
|
49
|
-
The executable performs no network requests, telemetry, repository writes, or configured Git content transformations. `validate` and `inspect` use read-only Git operations and no-follow filesystem metadata inspection to discover a working tree, establish and verify its identity, normalize the selected inventory, construct an exact-path guarded filesystem reader, and run Core within at most three complete snapshot attempts. Help, version, and usage failures do not run the installation-integrity preflight. `
|
|
49
|
+
The executable performs no network requests, telemetry, repository writes, or configured Git content transformations. `validate` and `inspect` use read-only Git operations and no-follow filesystem metadata inspection to discover a working tree, establish and verify its identity, normalize the selected inventory, construct an exact-path guarded filesystem reader, and run Core 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.
|
|
50
50
|
|
|
51
51
|
## Runtime support
|
|
52
52
|
|
|
@@ -102,13 +102,13 @@ A successfully completed Core inspection produces `validate` human or JSON outpu
|
|
|
102
102
|
|
|
103
103
|
`inspect` uses the same completion status and exit codes. Valid human output reports the repository format and counts for context assets, decisions, runtime-guidance assets, agents, mirrors, and adapter evidence items without printing canonical content. Invalid human output uses the same ordered diagnostic presentation as `validate` and reports non-empty adapter evidence counts without exposing evidence details. `inspect --json` preserves the complete Core `IProjectInspectionResult`, including the deeply immutable project index and its canonical normalized content when valid, and writes it only to stdout inside the deterministic version 2 envelope. This JSON output may contain confidential project context, decisions, runtime guidance, descriptions, and instructions; callers must protect captured output.
|
|
104
104
|
|
|
105
|
-
##
|
|
105
|
+
## Installed composition and integrity
|
|
106
106
|
|
|
107
|
-
Before `validate`, `inspect`, or `
|
|
107
|
+
Before `validate`, `inspect`, or `composition` produces a result, the executable compares its installed package metadata, actually resolved first-class package identities and versions, exact first-class dependency declarations, active package-backed adapter registration, Core repository-format support, minimum Git constant, and JSON output schema constant. Source-workspace dependencies must use exact `workspace:<version>` declarations; packed dependencies must use the same exact published version. Loose ranges, package-manager overrides, missing or additional first-class dependencies, mismatched package identities or versions, duplicate or invalid adapter IDs, package-backed registration of `custom`, unsupported adapter formats, and invalid constants fail before Git discovery or repository inspection.
|
|
108
108
|
|
|
109
|
-
`
|
|
109
|
+
`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).
|
|
110
110
|
|
|
111
|
-
Successful human and JSON reports use exit code `0`; JSON uses status `valid` and the version 2 deterministic envelope. The command never uses status `invalid`. A contradictory installation returns the non-retryable `cli:
|
|
111
|
+
Successful human and JSON reports use exit code `0`; JSON uses status `valid` and the version 2 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.
|
|
112
112
|
|
|
113
113
|
## Development
|
|
114
114
|
|
|
@@ -125,6 +125,6 @@ pnpm --filter @moldea.ai/cli test
|
|
|
125
125
|
|
|
126
126
|
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.
|
|
127
127
|
|
|
128
|
-
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`, and latest Node.js 24. Dedicated runtime harnesses verify each adapter's installed inspection boundary and the CLI's installed identities plus real `version`, `
|
|
128
|
+
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`, and latest Node.js 24. Dedicated runtime harnesses verify each adapter's installed inspection boundary and the CLI's installed identities plus real `version`, `composition`, `validate`, and `inspect` execution. Linux owns this consumer-runtime matrix, while the complete repository tests continue to run on Linux, macOS, and Windows.
|
|
129
129
|
|
|
130
130
|
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.
|
package/dist/moldea.js
CHANGED
|
@@ -34,7 +34,7 @@ var MOLDEA_CLI_EXIT_CODES = {
|
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/command-line/constants.ts
|
|
36
36
|
var MOLDEA_CLI_COMMANDS = {
|
|
37
|
-
|
|
37
|
+
Composition: "composition",
|
|
38
38
|
Inspect: "inspect",
|
|
39
39
|
Validate: "validate"
|
|
40
40
|
};
|
|
@@ -167,7 +167,7 @@ var parseMoldeaCliArguments = (commandLineArguments) => {
|
|
|
167
167
|
const resourceField = RESOURCE_OPTION_FIELDS[option];
|
|
168
168
|
const isRepositoryOption = option === MOLDEA_CLI_OPTIONS.Repository;
|
|
169
169
|
if (resourceField === void 0 && !isRepositoryOption) return createArgumentError("INVALID_ARGUMENT", command, isJson);
|
|
170
|
-
if (command === MOLDEA_CLI_COMMANDS.
|
|
170
|
+
if (command === MOLDEA_CLI_COMMANDS.Composition) return createArgumentError("INVALID_ARGUMENT", command, isJson);
|
|
171
171
|
const optionValue = commandLineArguments[index + 1];
|
|
172
172
|
if (optionValue === void 0 || optionValue.startsWith("--")) return createArgumentError("INVALID_ARGUMENT", command, isJson);
|
|
173
173
|
index += 1;
|
|
@@ -198,8 +198,8 @@ var parseMoldeaCliArguments = (commandLineArguments) => {
|
|
|
198
198
|
//#endregion
|
|
199
199
|
//#region src/presentation/constants.ts
|
|
200
200
|
var MOLDEA_CLI_ERROR_DEFINITIONS = Object.freeze({
|
|
201
|
-
|
|
202
|
-
message: "The installed
|
|
201
|
+
COMPOSITION_STATE_INVALID: Object.freeze({
|
|
202
|
+
message: "The installed composition state is invalid.",
|
|
203
203
|
retryable: false,
|
|
204
204
|
source: "cli"
|
|
205
205
|
}),
|
|
@@ -290,7 +290,7 @@ var MOLDEA_CLI_TOP_LEVEL_HELP = `Usage: moldea <command> [options]
|
|
|
290
290
|
Commands:
|
|
291
291
|
validate Validate the current moldea project.
|
|
292
292
|
inspect Inspect the current moldea project.
|
|
293
|
-
|
|
293
|
+
composition Report the installed CLI composition state.
|
|
294
294
|
|
|
295
295
|
Global options:
|
|
296
296
|
--help Show top-level help.
|
|
@@ -311,9 +311,9 @@ var INSPECTION_OPTIONS_HELP = `Options:
|
|
|
311
311
|
--help Show this help.
|
|
312
312
|
`;
|
|
313
313
|
var MOLDEA_CLI_COMMAND_HELP = {
|
|
314
|
-
[MOLDEA_CLI_COMMANDS.
|
|
314
|
+
[MOLDEA_CLI_COMMANDS.Composition]: `Usage: moldea composition [options]
|
|
315
315
|
|
|
316
|
-
Report the installed CLI
|
|
316
|
+
Report the installed CLI composition state.
|
|
317
317
|
|
|
318
318
|
Options:
|
|
319
319
|
--json Emit one machine-readable JSON result.
|
|
@@ -473,14 +473,14 @@ var formatMoldeaCliJsonError = (error, command, cliVersion) => {
|
|
|
473
473
|
})}\n`;
|
|
474
474
|
};
|
|
475
475
|
/**
|
|
476
|
-
* Formats one valid
|
|
477
|
-
* @param result The exact installed
|
|
476
|
+
* Formats one valid composition result for human stdout.
|
|
477
|
+
* @param result The exact installed composition.
|
|
478
478
|
* @param cliVersion The installed CLI package version.
|
|
479
479
|
* @returns A deterministic complete human report ending with LF.
|
|
480
480
|
*/
|
|
481
|
-
var
|
|
481
|
+
var formatMoldeaCliHumanCompositionResult = (result, cliVersion) => {
|
|
482
482
|
const lines = [
|
|
483
|
-
"The installed CLI
|
|
483
|
+
"The installed CLI composition state is valid.",
|
|
484
484
|
`CLI version: ${cliVersion}`,
|
|
485
485
|
`Supported Node.js: ${result.supportedNodeRange}`,
|
|
486
486
|
`JSON output schema: 2`,
|
|
@@ -494,15 +494,15 @@ var formatMoldeaCliHumanCompatibilityResult = (result, cliVersion) => {
|
|
|
494
494
|
return `${lines.join("\n")}\n`;
|
|
495
495
|
};
|
|
496
496
|
/**
|
|
497
|
-
* Formats one valid
|
|
498
|
-
* @param result The exact installed
|
|
497
|
+
* Formats one valid composition result as a version 2 JSON envelope.
|
|
498
|
+
* @param result The exact installed composition.
|
|
499
499
|
* @param cliVersion The installed CLI package version.
|
|
500
500
|
* @returns One compact deterministic JSON document ending with LF.
|
|
501
501
|
*/
|
|
502
|
-
var
|
|
502
|
+
var formatMoldeaCliJsonCompositionResult = (result, cliVersion) => {
|
|
503
503
|
return `${serializeJsonDeterministically({
|
|
504
504
|
cliVersion,
|
|
505
|
-
command: MOLDEA_CLI_COMMANDS.
|
|
505
|
+
command: MOLDEA_CLI_COMMANDS.Composition,
|
|
506
506
|
error: null,
|
|
507
507
|
result,
|
|
508
508
|
schemaVersion: 2,
|
|
@@ -521,7 +521,7 @@ var formatMoldeaCliHumanValidateResult = (result) => {
|
|
|
521
521
|
return `${lines.join("\n")}\n`;
|
|
522
522
|
};
|
|
523
523
|
/**
|
|
524
|
-
* Formats one completed validation result as a version
|
|
524
|
+
* Formats one completed validation result as a version 2 JSON envelope.
|
|
525
525
|
* @param result The content-minimized validation result.
|
|
526
526
|
* @param cliVersion The installed CLI package version.
|
|
527
527
|
* @returns One compact deterministic JSON document ending with LF.
|
|
@@ -556,7 +556,7 @@ var formatMoldeaCliHumanInspectResult = (result) => {
|
|
|
556
556
|
return `${lines.join("\n")}\n`;
|
|
557
557
|
};
|
|
558
558
|
/**
|
|
559
|
-
* Formats one completed inspection result as a version
|
|
559
|
+
* Formats one completed inspection result as a version 2 JSON envelope.
|
|
560
560
|
* @param result The complete inspection result and its source descriptor.
|
|
561
561
|
* @param cliVersion The installed CLI package version.
|
|
562
562
|
* @returns One compact deterministic JSON document ending with LF.
|
|
@@ -1940,7 +1940,7 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1940
1940
|
module.exports = subset;
|
|
1941
1941
|
}));
|
|
1942
1942
|
//#endregion
|
|
1943
|
-
//#region src/
|
|
1943
|
+
//#region src/composition/constants.ts
|
|
1944
1944
|
var import_semver = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1945
1945
|
var internalRe = require_re();
|
|
1946
1946
|
var constants = require_constants();
|
|
@@ -2003,7 +2003,7 @@ var MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES = Object.freeze([
|
|
|
2003
2003
|
var MOLDEA_CLI_ADAPTER_PACKAGE_PREFIX = "@moldea.ai/adapter-";
|
|
2004
2004
|
var MOLDEA_CLI_CUSTOM_ADAPTER_ID = "custom";
|
|
2005
2005
|
//#endregion
|
|
2006
|
-
//#region src/
|
|
2006
|
+
//#region src/composition/validations.ts
|
|
2007
2007
|
var ADAPTER_ID_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
2008
2008
|
var hasExactStringSet = (left, right) => {
|
|
2009
2009
|
if (left.length !== right.length || new Set(left).size !== left.length || new Set(right).size !== right.length) return false;
|
|
@@ -2022,9 +2022,9 @@ var createActiveAdapterMap = (adapters, coreRepositoryFormatVersions) => {
|
|
|
2022
2022
|
/**
|
|
2023
2023
|
* Verifies the installed package manifest and actual executable adapter composition.
|
|
2024
2024
|
* @param input The installed package, Core, adapter, Git, and JSON-schema state.
|
|
2025
|
-
* @returns Whether every runtime
|
|
2025
|
+
* @returns Whether every runtime composition invariant is satisfied.
|
|
2026
2026
|
*/
|
|
2027
|
-
var
|
|
2027
|
+
var isMoldeaCliCompositionStateValid = (input) => {
|
|
2028
2028
|
const { dependencies, installedPackageVersions, supportedNodeRange, version } = input.packageMetadata;
|
|
2029
2029
|
if ((0, import_semver.valid)(version) === null || supportedNodeRange === null || (0, import_semver.validRange)(supportedNodeRange) === null || (0, import_semver.valid)(input.minimumGitVersion) === null || input.outputSchemaVersion !== 2 || dependencies === null || installedPackageVersions === null || !hasUniquePositiveIntegers(input.coreSupportedRepositoryFormatVersions)) return false;
|
|
2030
2030
|
const activeAdapterMap = createActiveAdapterMap(input.activeAdapters, input.coreSupportedRepositoryFormatVersions);
|
|
@@ -2040,10 +2040,10 @@ var isMoldeaCliCompatibilityStateValid = (input) => {
|
|
|
2040
2040
|
});
|
|
2041
2041
|
};
|
|
2042
2042
|
//#endregion
|
|
2043
|
-
//#region src/
|
|
2043
|
+
//#region src/composition/transformers.ts
|
|
2044
2044
|
var compareIdentifiers = (left, right) => left < right ? -1 : left > right ? 1 : 0;
|
|
2045
|
-
/** Recursively freezes a
|
|
2046
|
-
var
|
|
2045
|
+
/** Recursively freezes a composition result without retaining mutable input ownership. */
|
|
2046
|
+
var freezeCompositionValue = (value) => {
|
|
2047
2047
|
const pendingValues = [value];
|
|
2048
2048
|
const visitedValues = /* @__PURE__ */ new Set();
|
|
2049
2049
|
while (pendingValues.length > 0) {
|
|
@@ -2056,11 +2056,11 @@ var freezeCompatibilityValue = (value) => {
|
|
|
2056
2056
|
return value;
|
|
2057
2057
|
};
|
|
2058
2058
|
/**
|
|
2059
|
-
* Creates the compact immutable
|
|
2059
|
+
* Creates the compact immutable composition result from validated installed state.
|
|
2060
2060
|
* @param input The already validated installed and executable composition.
|
|
2061
|
-
* @returns A deeply immutable
|
|
2061
|
+
* @returns A deeply immutable composition result in deterministic report order.
|
|
2062
2062
|
*/
|
|
2063
|
-
var
|
|
2063
|
+
var createMoldeaCliCompositionResult = (input) => {
|
|
2064
2064
|
const adapters = [{
|
|
2065
2065
|
id: MOLDEA_CLI_CUSTOM_ADAPTER_ID,
|
|
2066
2066
|
repositoryFormatVersions: [...input.coreSupportedRepositoryFormatVersions].sort((left, right) => left - right)
|
|
@@ -2072,7 +2072,7 @@ var createMoldeaCliCompatibilityResult = (input) => {
|
|
|
2072
2072
|
name,
|
|
2073
2073
|
version
|
|
2074
2074
|
})).sort((left, right) => compareIdentifiers(left.name, right.name));
|
|
2075
|
-
return
|
|
2075
|
+
return freezeCompositionValue({
|
|
2076
2076
|
adapters,
|
|
2077
2077
|
minimumGitVersion: input.minimumGitVersion,
|
|
2078
2078
|
packages,
|
|
@@ -2536,30 +2536,30 @@ var createGitVersionPreflight = (processExecutor = executeGitProcess) => async (
|
|
|
2536
2536
|
});
|
|
2537
2537
|
};
|
|
2538
2538
|
//#endregion
|
|
2539
|
-
//#region src/
|
|
2540
|
-
var
|
|
2539
|
+
//#region src/composition/composition.ts
|
|
2540
|
+
var INVALID_COMPOSITION_RESOLUTION = Object.freeze({ kind: "invalid" });
|
|
2541
2541
|
/**
|
|
2542
|
-
* Resolves one explicit runtime composition without emitting a partial
|
|
2542
|
+
* Resolves one explicit runtime composition without emitting a partial composition result.
|
|
2543
2543
|
* @param input The installed and actual runtime state to compare.
|
|
2544
2544
|
* @returns A valid immutable result or the single invalid-state outcome.
|
|
2545
2545
|
*/
|
|
2546
|
-
var
|
|
2546
|
+
var resolveMoldeaCliComposition = (input) => {
|
|
2547
2547
|
try {
|
|
2548
|
-
if (!
|
|
2548
|
+
if (!isMoldeaCliCompositionStateValid(input)) return INVALID_COMPOSITION_RESOLUTION;
|
|
2549
2549
|
return Object.freeze({
|
|
2550
2550
|
kind: "valid",
|
|
2551
|
-
result:
|
|
2551
|
+
result: createMoldeaCliCompositionResult(input)
|
|
2552
2552
|
});
|
|
2553
2553
|
} catch {
|
|
2554
|
-
return
|
|
2554
|
+
return INVALID_COMPOSITION_RESOLUTION;
|
|
2555
2555
|
}
|
|
2556
2556
|
};
|
|
2557
2557
|
/**
|
|
2558
|
-
* Resolves
|
|
2558
|
+
* Resolves composition through the fixed package, Core, adapter, Git, and JSON composition.
|
|
2559
2559
|
* @param input The installed package metadata.
|
|
2560
2560
|
* @returns A valid immutable result or the single invalid-state outcome.
|
|
2561
2561
|
*/
|
|
2562
|
-
var
|
|
2562
|
+
var resolveInstalledMoldeaCliComposition = (input) => resolveMoldeaCliComposition({
|
|
2563
2563
|
activeAdapters: ACTIVE_RUNTIME_ADAPTERS,
|
|
2564
2564
|
coreSupportedRepositoryFormatVersions: SUPPORTED_REPOSITORY_FORMAT_VERSIONS,
|
|
2565
2565
|
minimumGitVersion: MINIMUM_GIT_VERSION,
|
|
@@ -4565,16 +4565,16 @@ var executeWorkingTreeSnapshot = createWorkingTreeSnapshotExecutor();
|
|
|
4565
4565
|
//#endregion
|
|
4566
4566
|
//#region src/cli-execution/results.ts
|
|
4567
4567
|
/**
|
|
4568
|
-
* Creates one process-neutral result for a valid
|
|
4569
|
-
* @param result The exact installed
|
|
4568
|
+
* Creates one process-neutral result for a valid installed composition.
|
|
4569
|
+
* @param result The exact installed composition result.
|
|
4570
4570
|
* @param cliVersion The installed CLI package version.
|
|
4571
4571
|
* @param isJson Whether machine-readable output was requested.
|
|
4572
4572
|
* @returns The complete immutable successful process output.
|
|
4573
4573
|
*/
|
|
4574
|
-
var
|
|
4574
|
+
var createMoldeaCliCompositionExecutionResult = (result, cliVersion, isJson) => Object.freeze({
|
|
4575
4575
|
exitCode: MOLDEA_CLI_EXIT_CODES.Success,
|
|
4576
4576
|
stderr: "",
|
|
4577
|
-
stdout: isJson ?
|
|
4577
|
+
stdout: isJson ? formatMoldeaCliJsonCompositionResult(result, cliVersion) : formatMoldeaCliHumanCompositionResult(result, cliVersion)
|
|
4578
4578
|
});
|
|
4579
4579
|
/**
|
|
4580
4580
|
* Creates one safe process-neutral error result in the requested output mode.
|
|
@@ -4633,13 +4633,13 @@ var createMoldeaCliInspectExecutionResult = (inspection, cliVersion, isJson) =>
|
|
|
4633
4633
|
* @param workingTreeDiscovery The Git working-tree discovery operation.
|
|
4634
4634
|
* @param workingTreeSnapshotExecutor The complete working-tree snapshot operation.
|
|
4635
4635
|
* @param coreInspectionExecutor The attempt-local Core inspection composition.
|
|
4636
|
-
* @param
|
|
4636
|
+
* @param compositionResolver The installed executable-integrity and composition boundary.
|
|
4637
4637
|
* @returns A command executor for the current behavioral slice.
|
|
4638
4638
|
*/
|
|
4639
|
-
var createMoldeaCliCommandExecutor = (workingTreeDiscovery = discoverGitWorkingTree, workingTreeSnapshotExecutor = executeWorkingTreeSnapshot, coreInspectionExecutor = executeMoldeaCliCoreInspection,
|
|
4640
|
-
const
|
|
4641
|
-
if (
|
|
4642
|
-
if (input.invocation.command === MOLDEA_CLI_COMMANDS.
|
|
4639
|
+
var createMoldeaCliCommandExecutor = (workingTreeDiscovery = discoverGitWorkingTree, workingTreeSnapshotExecutor = executeWorkingTreeSnapshot, coreInspectionExecutor = executeMoldeaCliCoreInspection, compositionResolver = resolveInstalledMoldeaCliComposition) => async (input) => {
|
|
4640
|
+
const compositionResolution = compositionResolver({ packageMetadata: input.packageMetadata });
|
|
4641
|
+
if (compositionResolution.kind === "invalid") return createMoldeaCliErrorResult(createMoldeaCliOwnedError("COMPOSITION_STATE_INVALID"), input.invocation.command, input.packageMetadata.version, input.invocation.options.isJson, MOLDEA_CLI_EXIT_CODES.OperationalError);
|
|
4642
|
+
if (input.invocation.command === MOLDEA_CLI_COMMANDS.Composition) return createMoldeaCliCompositionExecutionResult(compositionResolution.result, input.packageMetadata.version, input.invocation.options.isJson);
|
|
4643
4643
|
const discoveryResult = await workingTreeDiscovery({
|
|
4644
4644
|
invocationDirectory: input.invocationDirectory,
|
|
4645
4645
|
repositoryDirectory: input.invocation.options.repositoryDirectory,
|