@moldea.ai/cli 13.0.4 → 14.0.1
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 +5 -9
- package/dist/chunks/{composition-DfXcSF44.js → composition-D1OYuZ5d.js} +1 -1
- package/dist/chunks/{composition-DxVb23Ru.js → composition-_3bygS_a.js} +21 -23
- package/dist/chunks/composition-_3bygS_a.js.map +1 -0
- package/dist/chunks/{core-composition-D3haS6M3.js → core-composition-BKcJ--NX.js} +2 -2
- package/dist/chunks/{core-composition-D3haS6M3.js.map → core-composition-BKcJ--NX.js.map} +1 -1
- package/dist/moldea.js +7 -12
- package/dist/moldea.js.map +1 -1
- package/dist/portable/LICENSES.md +506 -0
- package/dist/portable/SHA256SUMS +17 -0
- package/dist/portable/analysis-worker.mjs +170 -0
- package/dist/portable/chunk-1306b995.mjs +2 -0
- package/dist/portable/chunk-24ea7c23.mjs +328 -0
- package/dist/portable/chunk-2cc3bf5c.mjs +399 -0
- package/dist/portable/chunk-2e9d4c63.mjs +95 -0
- package/dist/portable/chunk-43b8574a.mjs +1837 -0
- package/dist/portable/chunk-517c6bfb.mjs +2 -0
- package/dist/portable/chunk-8f198616.mjs +4414 -0
- package/dist/portable/chunk-936e5d09.mjs +112519 -0
- package/dist/portable/chunk-98d84174.mjs +422 -0
- package/dist/portable/chunk-9e42770a.mjs +3114 -0
- package/dist/portable/chunk-cea1378f.mjs +50 -0
- package/dist/portable/chunk-d6656fa6.mjs +14 -0
- package/dist/portable/chunk-d9e49acd.mjs +302 -0
- package/dist/portable/moldea.mjs +2656 -0
- package/dist/portable/node-runner.mjs +117 -0
- package/package.json +3 -3
- package/dist/chunks/composition-DxVb23Ru.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
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 14 executable exposes one schema 8 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
|
+
The CLI is optional for repositories using the moldea skill. To run it on its own from a Git checkout, use `npx @moldea.ai/cli@14 validate` or add `@moldea.ai/cli` as a development dependency.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The tarball also contains a minified, source-map-free CLI under `dist/portable/`. Run `node <path-to-portable>/moldea.mjs validate` with Node.js and Git. The complete directory, including its adjacent runner, worker, chunks, `SHA256SUMS`, and `LICENSES.md`, can move as one unit. The skill ships this build.
|
|
12
12
|
|
|
13
13
|
## Commands
|
|
14
14
|
|
|
@@ -101,7 +101,7 @@ A completed Core inspection produces content-free `validate` output. Zero errors
|
|
|
101
101
|
|
|
102
102
|
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.
|
|
103
103
|
|
|
104
|
-
`inspect` uses the same completion status and exit codes. Its allowlisted pages contain agent
|
|
104
|
+
`inspect` uses the same completion status and exit codes. Its allowlisted pages contain agent identities, 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`.
|
|
105
105
|
|
|
106
106
|
`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.
|
|
107
107
|
|
|
@@ -109,8 +109,6 @@ For JSON collection and content output, `--max-output-bytes` accepts 4,096 throu
|
|
|
109
109
|
|
|
110
110
|
The default output budget remains 65,536 bytes. 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.
|
|
111
111
|
|
|
112
|
-
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.
|
|
113
|
-
|
|
114
112
|
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.
|
|
115
113
|
|
|
116
114
|
## Installed composition and integrity
|
|
@@ -119,7 +117,7 @@ Before `validate`, `inspect` or `composition` returns a result, installation che
|
|
|
119
117
|
|
|
120
118
|
`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.
|
|
121
119
|
|
|
122
|
-
Successful human and JSON reports use exit code `0`; JSON uses status `valid` and the schema
|
|
120
|
+
Successful human and JSON reports use exit code `0`; JSON uses status `valid` and the schema 8 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.
|
|
123
121
|
|
|
124
122
|
## Development
|
|
125
123
|
|
|
@@ -137,5 +135,3 @@ pnpm --filter @moldea.ai/cli test
|
|
|
137
135
|
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.
|
|
138
136
|
|
|
139
137
|
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.
|
|
140
|
-
|
|
141
|
-
The consumer checksum selection and qualification evidence live in [`consumers/`](../../consumers/). Historical evidence applies only to its recorded versions and sources.
|
|
@@ -204,7 +204,7 @@ var parsePositiveSafeInteger = (input) => {
|
|
|
204
204
|
const parsedInteger = Number(input);
|
|
205
205
|
return Number.isSafeInteger(parsedInteger) && parsedInteger > 0 ? parsedInteger : null;
|
|
206
206
|
};
|
|
207
|
-
/** Parses one output byte budget inside the schema
|
|
207
|
+
/** Parses one output byte budget inside the schema 8 transport bounds. */
|
|
208
208
|
var parseMoldeaCliOutputByteLimit = (input) => {
|
|
209
209
|
const parsed = parsePositiveSafeInteger(input);
|
|
210
210
|
return parsed !== null && parsed >= 4096 && parsed <= 1048576 ? parsed : null;
|
|
@@ -250,7 +250,7 @@ var isMoldeaCliCommand = (input) => {
|
|
|
250
250
|
return input !== void 0 && COMMAND_NAMES.has(input);
|
|
251
251
|
};
|
|
252
252
|
/**
|
|
253
|
-
* Parses the complete schema
|
|
253
|
+
* Parses the complete schema 8 command grammar without mutating caller arguments.
|
|
254
254
|
* @param commandLineArguments The process arguments after the executable path.
|
|
255
255
|
* @returns A normalized command, informational request, or safe invocation error.
|
|
256
256
|
*/
|
|
@@ -580,16 +580,16 @@ var createMoldeaCliOwnedError = (code, details = EMPTY_ERROR_DETAILS) => {
|
|
|
580
580
|
};
|
|
581
581
|
//#endregion
|
|
582
582
|
//#region src/json-output-contract/document.ts
|
|
583
|
-
/** Creates one strict schema
|
|
583
|
+
/** Creates one strict schema 8 JSON envelope. */
|
|
584
584
|
var createMoldeaCliJsonEnvelope = (input) => Object.freeze({
|
|
585
585
|
cliVersion: input.cliVersion,
|
|
586
586
|
command: input.command,
|
|
587
587
|
error: input.error,
|
|
588
588
|
result: input.result,
|
|
589
|
-
schemaVersion:
|
|
589
|
+
schemaVersion: 8,
|
|
590
590
|
status: input.status
|
|
591
591
|
});
|
|
592
|
-
/** Serializes one schema
|
|
592
|
+
/** Serializes one schema 8 envelope, keys in RFC 8785 order, with its trailing line feed. */
|
|
593
593
|
var serializeMoldeaCliJsonEnvelope = (input) => `${stringifyJsonDeterministically(createMoldeaCliJsonEnvelope(input), { strict: true })}\n`;
|
|
594
594
|
//#endregion
|
|
595
595
|
//#region src/presentation/formatters.ts
|
|
@@ -598,7 +598,6 @@ var DIAGNOSTIC_ENTITY_KEYS = [
|
|
|
598
598
|
"capabilityKind",
|
|
599
599
|
"capabilityId",
|
|
600
600
|
"decisionId",
|
|
601
|
-
"variableId",
|
|
602
601
|
"contextPath",
|
|
603
602
|
"integrationPath"
|
|
604
603
|
];
|
|
@@ -633,7 +632,7 @@ var formatMoldeaCliHelp = (command) => {
|
|
|
633
632
|
};
|
|
634
633
|
/** Formats one safe CLI error for human stderr output. */
|
|
635
634
|
var formatMoldeaCliHumanError = (error) => `${error.source}:${error.code} ${error.message}\n`;
|
|
636
|
-
/** Formats any strict schema
|
|
635
|
+
/** Formats any strict schema 8 JSON envelope. */
|
|
637
636
|
var formatMoldeaCliJsonResult = (command, result, error, status, cliVersion) => serializeMoldeaCliJsonEnvelope({
|
|
638
637
|
cliVersion,
|
|
639
638
|
command,
|
|
@@ -641,7 +640,7 @@ var formatMoldeaCliJsonResult = (command, result, error, status, cliVersion) =>
|
|
|
641
640
|
result,
|
|
642
641
|
status
|
|
643
642
|
});
|
|
644
|
-
/** Formats one safe schema
|
|
643
|
+
/** Formats one safe schema 8 JSON error envelope. */
|
|
645
644
|
var formatMoldeaCliJsonError = (error, command, cliVersion) => formatMoldeaCliJsonResult(command, null, error, "error", cliVersion);
|
|
646
645
|
/** Formats one valid composition result for human stdout. */
|
|
647
646
|
var formatMoldeaCliHumanCompositionResult = (result, cliVersion) => {
|
|
@@ -649,14 +648,14 @@ var formatMoldeaCliHumanCompositionResult = (result, cliVersion) => {
|
|
|
649
648
|
"The installed CLI composition state is valid.",
|
|
650
649
|
`CLI version: ${cliVersion}`,
|
|
651
650
|
`Supported Node.js: ${result.supportedNodeRange}`,
|
|
652
|
-
`JSON output schema:
|
|
651
|
+
`JSON output schema: 8`,
|
|
653
652
|
`Minimum Git: ${result.minimumGitVersion}`,
|
|
654
653
|
`Repository formats: ${result.repositoryFormatVersions.join(", ")}`,
|
|
655
654
|
"Packages:",
|
|
656
655
|
...result.packages.map(({ name, version }) => ` ${name}: ${version}`)
|
|
657
656
|
].join("\n")}\n`;
|
|
658
657
|
};
|
|
659
|
-
/** Formats one composition result in the strict schema
|
|
658
|
+
/** Formats one composition result in the strict schema 8 envelope. */
|
|
660
659
|
var formatMoldeaCliJsonCompositionResult = (result, cliVersion) => formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Composition, result, null, "valid", cliVersion);
|
|
661
660
|
/** Describes completed checks without claiming runtime wiring. */
|
|
662
661
|
var formatCoverage = (counts) => `Coverage: ${counts.bindings} bindings, ${counts.exportsPassed} exports confirmed, ${counts.exportsFailed} exports missing, ${counts.exportsNotChecked} not checked`;
|
|
@@ -672,7 +671,7 @@ var formatMoldeaCliHumanValidateResult = (result) => {
|
|
|
672
671
|
if (result.page.cursor !== null) lines.push("Additional records are available through JSON pagination.");
|
|
673
672
|
return `${lines.join("\n")}\n`;
|
|
674
673
|
};
|
|
675
|
-
/** Formats one validation result in the strict schema
|
|
674
|
+
/** Formats one validation result in the strict schema 8 envelope. */
|
|
676
675
|
var formatMoldeaCliJsonValidateResult = (result, cliVersion) => formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Validate, result, null, result.valid ? "valid" : "invalid", cliVersion);
|
|
677
676
|
/** Formats one completed metadata inspection for human stdout. */
|
|
678
677
|
var formatMoldeaCliHumanInspectResult = (result) => {
|
|
@@ -683,7 +682,7 @@ var formatMoldeaCliHumanInspectResult = (result) => {
|
|
|
683
682
|
for (const [label, count] of Object.entries(result.counts)) lines.push(`${label}: ${count}`);
|
|
684
683
|
return `${lines.join("\n")}\n`;
|
|
685
684
|
};
|
|
686
|
-
/** Formats one metadata inspection in the strict schema
|
|
685
|
+
/** Formats one metadata inspection in the strict schema 8 envelope. */
|
|
687
686
|
var formatMoldeaCliJsonInspectResult = (result, cliVersion) => formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Inspect, result, null, result.valid ? "valid" : "invalid", cliVersion);
|
|
688
687
|
/** Formats one changed-path scope result for human stdout. */
|
|
689
688
|
var formatMoldeaCliHumanScopeResult = (result) => {
|
|
@@ -693,7 +692,7 @@ var formatMoldeaCliHumanScopeResult = (result) => {
|
|
|
693
692
|
...Object.entries(result.counts).map(([label, count]) => `${label}: ${count}`)
|
|
694
693
|
].join("\n")}\n`;
|
|
695
694
|
};
|
|
696
|
-
/** Formats one changed-path scope result in the strict schema
|
|
695
|
+
/** Formats one changed-path scope result in the strict schema 8 envelope. */
|
|
697
696
|
var formatMoldeaCliJsonScopeResult = (result, cliVersion) => formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Scope, result, null, result.valid ? "valid" : "invalid", cliVersion);
|
|
698
697
|
/** Formats one explicit canonical content chunk for human stdout. */
|
|
699
698
|
var formatMoldeaCliHumanContentResult = (result) => {
|
|
@@ -707,7 +706,7 @@ var formatMoldeaCliHumanContentResult = (result) => {
|
|
|
707
706
|
result.chunk.content
|
|
708
707
|
].join("\n")}\n`;
|
|
709
708
|
};
|
|
710
|
-
/** Formats one explicit canonical content chunk in the strict schema
|
|
709
|
+
/** Formats one explicit canonical content chunk in the strict schema 8 envelope. */
|
|
711
710
|
var formatMoldeaCliJsonContentResult = (result, cliVersion) => formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Content, result, null, "valid", cliVersion);
|
|
712
711
|
//#endregion
|
|
713
712
|
//#region src/presentation/transformers.ts
|
|
@@ -765,15 +764,14 @@ var createCoverageRecord = (coverage, index, order = "coverage") => Object.freez
|
|
|
765
764
|
key: createRecordKey(order, "coverage", coverage.relationship, coverage.entity, coverage.path, coverage.symbol, index),
|
|
766
765
|
kind: "coverage"
|
|
767
766
|
});
|
|
768
|
-
/** Projects one bounded Core inspection item through the schema
|
|
767
|
+
/** Projects one bounded Core inspection item through the schema 8 allowlist. */
|
|
769
768
|
var createInspectRecord = (item, index) => {
|
|
770
769
|
const order = index.toString().padStart(6, "0");
|
|
771
770
|
if (item.kind === "agent") {
|
|
772
771
|
const record = {
|
|
773
772
|
agentId: item.agent.agentId,
|
|
774
|
-
key: createRecordKey(order, "agent", item.agent.agentId
|
|
775
|
-
kind: "agent"
|
|
776
|
-
runtimeId: item.agent.runtimeId
|
|
773
|
+
key: createRecordKey(order, "agent", item.agent.agentId),
|
|
774
|
+
kind: "agent"
|
|
777
775
|
};
|
|
778
776
|
return Object.freeze(record);
|
|
779
777
|
}
|
|
@@ -831,7 +829,7 @@ var createMoldeaCliValidateProjection = (validation) => {
|
|
|
831
829
|
warningCount: validation.warningCount
|
|
832
830
|
});
|
|
833
831
|
};
|
|
834
|
-
/** Projects one bounded Core page through the content-free schema
|
|
832
|
+
/** Projects one bounded Core page through the content-free schema 8 allowlist. */
|
|
835
833
|
var createMoldeaCliInspectProjection = (inspection) => {
|
|
836
834
|
const project = inspection.summary === null ? null : Object.freeze({
|
|
837
835
|
manifest: Object.freeze({
|
|
@@ -2430,7 +2428,7 @@ var MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES = Object.freeze([
|
|
|
2430
2428
|
"@moldea.ai/repository-fs"
|
|
2431
2429
|
]);
|
|
2432
2430
|
var MOLDEA_CLI_FIRST_CLASS_PACKAGE_RANGES = Object.freeze({
|
|
2433
|
-
"@moldea.ai/core": "^
|
|
2431
|
+
"@moldea.ai/core": "^10.0.0",
|
|
2434
2432
|
"@moldea.ai/repository": "^4.0.0",
|
|
2435
2433
|
"@moldea.ai/repository-fs": "^4.0.0"
|
|
2436
2434
|
});
|
|
@@ -2449,7 +2447,7 @@ var hasUniquePositiveIntegers = (entries) => entries.length > 0 && entries.every
|
|
|
2449
2447
|
*/
|
|
2450
2448
|
var isMoldeaCliCompositionStateValid = (input) => {
|
|
2451
2449
|
const { dependencies, installedPackageVersions, supportedNodeRange, version } = input.packageMetadata;
|
|
2452
|
-
if ((0, import_semver.valid)(version) === null || supportedNodeRange === null || (0, import_semver.validRange)(supportedNodeRange) === null || (0, import_semver.valid)(input.minimumGitVersion) === null || input.outputSchemaVersion !==
|
|
2450
|
+
if ((0, import_semver.valid)(version) === null || supportedNodeRange === null || (0, import_semver.validRange)(supportedNodeRange) === null || (0, import_semver.valid)(input.minimumGitVersion) === null || input.outputSchemaVersion !== 8 || dependencies === null || installedPackageVersions === null || !hasUniquePositiveIntegers(input.coreSupportedRepositoryFormatVersions)) return false;
|
|
2453
2451
|
const expectedPackageNames = [...MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES];
|
|
2454
2452
|
const declaredPackageNames = Object.keys(dependencies).filter((packageName) => packageName.startsWith("@moldea.ai/"));
|
|
2455
2453
|
const resolvedPackageNames = Object.keys(installedPackageVersions);
|
|
@@ -2508,10 +2506,10 @@ var resolveMoldeaCliComposition = (input) => {
|
|
|
2508
2506
|
var resolveInstalledMoldeaCliComposition = (input) => resolveMoldeaCliComposition({
|
|
2509
2507
|
coreSupportedRepositoryFormatVersions: SUPPORTED_REPOSITORY_FORMAT_VERSIONS,
|
|
2510
2508
|
minimumGitVersion: MINIMUM_GIT_VERSION,
|
|
2511
|
-
outputSchemaVersion:
|
|
2509
|
+
outputSchemaVersion: 8,
|
|
2512
2510
|
packageMetadata: input.packageMetadata
|
|
2513
2511
|
});
|
|
2514
2512
|
//#endregion
|
|
2515
2513
|
export { createMoldeaCliOutputPage as A, formatMoldeaCliJsonInspectResult as C, MOLDEA_CLI_GIT_WORKING_TREE_SOURCE as D, createMoldeaCliOwnedError as E, MOLDEA_CLI_COMMANDS as F, decodeMoldeaCliCursor as M, encodeMoldeaCliCursor as N, parseMoldeaCliArguments as O, MoldeaCliOutputPageException as P, formatMoldeaCliJsonError as S, formatMoldeaCliJsonValidateResult as T, formatMoldeaCliHumanInspectResult as _, require_semver as a, formatMoldeaCliJsonCompositionResult as b, runGitCommand as c, createMoldeaCliInspectProjection as d, createMoldeaCliValidateProjection as f, formatMoldeaCliHumanError as g, formatMoldeaCliHumanContentResult as h, isMoldeaCliCompositionStateValid as i, calculateMoldeaCliJsonDigest as j, isRepositoryDirectoryInputValid as k, readGit as l, formatMoldeaCliHumanCompositionResult as m, resolveMoldeaCliComposition as n, MoldeaCliCompositionException as o, formatMoldeaCliHelp as p, createMoldeaCliCompositionResult as r, createGitVersionPreflight as s, resolveInstalledMoldeaCliComposition as t, createMoldeaCliDiagnosticRecord as u, formatMoldeaCliHumanScopeResult as v, formatMoldeaCliJsonScopeResult as w, formatMoldeaCliJsonContentResult as x, formatMoldeaCliHumanValidateResult as y };
|
|
2516
2514
|
|
|
2517
|
-
//# sourceMappingURL=composition-
|
|
2515
|
+
//# sourceMappingURL=composition-_3bygS_a.js.map
|