@moldea.ai/cli 13.0.0 → 13.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 +3 -1
- package/dist/chunks/{composition-cVui-wF_.js → composition-C9TNzN2e.js} +21 -12
- package/dist/chunks/composition-C9TNzN2e.js.map +1 -0
- package/dist/chunks/{composition-C2m6SpCI.js → composition-PoYBx0Mw.js} +1 -1
- package/dist/chunks/{core-composition-ZEZSTBMA.js → core-composition-DeWcE7Bf.js} +2 -2
- package/dist/chunks/{core-composition-ZEZSTBMA.js.map → core-composition-DeWcE7Bf.js.map} +1 -1
- package/dist/moldea.js +95 -27
- package/dist/moldea.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/composition-cVui-wF_.js.map +0 -1
package/README.md
CHANGED
|
@@ -57,10 +57,12 @@ Git runs through jg-git-commands without a platform shell, with fixed non-intera
|
|
|
57
57
|
|
|
58
58
|
After discovery, `validate` and `inspect` stream NUL-delimited tracked-index and non-ignored untracked records from fixed `git ls-files` commands. `scope` applies a top-level literal pathspec for `/moldea/moldea.yaml`; `content` applies one for its validated canonical path. These selected commands do not probe the rest of a large repository. `validate` and `inspect` also run one separate instruction probe over literal pathspecs for `/AGENTS.md`, `/CLAUDE.md`, `/.claude/CLAUDE.md`, and `/CLAUDE.local.md` that adds Git-ignored files at those paths through `git ls-files --others --ignored --exclude-standard`, with the inventory budgets applied separately. Its records feed only the instruction source passed to Core's coding-agent integration check and never the general inventory. Tracked records accept only full SHA-1 or SHA-256 object IDs, index stages `0` through `3`, and Git modes `100644`, `100755`, `120000`, or `160000`. Paths are decoded as fatal UTF-8 and preserve exact Unicode scalars, case, tabs, newlines, and an initial BOM without normalization.
|
|
59
59
|
|
|
60
|
-
Raw tracked and untracked records share `maxEntries` before ownership filtering, stage collapse, or deduplication. Their combined stdout, nested-root validation stdout, any required effective `core.symlinks` stdout, and effective Git attribute stdout share `maxTotalBytes`; tracked records are charged with the longest object name, SHA-256's. Each of these Git commands may use the remaining budget for its stdout and stderr together. Stderr is never emitted: more than 4096 bytes of it is refused after the read, and any stderr from a command that otherwise succeeded, such as a warning about a directory Git could not open, fails it with `GIT_OUTPUT_INVALID`. Exceeding an inventory ceiling discards all candidates and returns the non-retryable `cli:RESOURCE_LIMIT_EXCEEDED` contract with message `A resource limit was exceeded.` Malformed output returns `git:GIT_OUTPUT_INVALID` without a partial inventory or partial attribute classification.
|
|
60
|
+
Raw tracked and untracked records share `maxEntries` before ownership filtering, stage collapse, or deduplication. Their combined stdout, nested-root validation stdout, any required effective `core.symlinks` stdout, and effective Git attribute stdout share `maxTotalBytes`; tracked records are charged with the longest object name, SHA-256's. Each of these Git commands may use the remaining budget for its stdout and stderr together. Stderr is never emitted: more than 4096 bytes of it is refused after the read, and any stderr from a command that otherwise succeeded, such as a warning about a directory Git could not open, fails it with `GIT_OUTPUT_INVALID`. A failed `ls-files` listing, `config` read, or `check-attr` check is named in the error's `details.subcommand`. Exceeding an inventory ceiling discards all candidates and returns the non-retryable `cli:RESOURCE_LIMIT_EXCEEDED` contract with message `A resource limit was exceeded.` Malformed output returns `git:GIT_OUTPUT_INVALID` without a partial inventory or partial attribute classification.
|
|
61
61
|
|
|
62
62
|
Every tracked `160000` gitlink establishes an excluded submodule root. The root and every candidate below it are removed without initializing, updating, or recursing into the submodule. Candidate paths containing an exact `.git` segment are also excluded; similarly named ordinary paths such as `.gitignore`, `.gitattributes`, and `.github` remain eligible.
|
|
63
63
|
|
|
64
|
+
Before ownership filtering, the CLI observes each distinct ancestor directory of every candidate once, without following it. A symlink or junction in the working tree shadows every Git candidate beneath it, whatever Git lists there, such as the files Git for Windows reads through a junction, and one untracked candidate remains at the link's own path. An unrelated link therefore produces no diagnostic, while a bound or canonical path beneath it is reported by Core as missing.
|
|
65
|
+
|
|
64
66
|
For untracked candidates, the CLI traverses only the required directory prefixes, compares native names by exact bytes, and uses no-follow filesystem observations. An exact `.git` marker is validated through bounded sanitized Git root discovery so both ordinary nested repositories and linked worktrees are recognized without reimplementing Git's control-file format. Nested-root identity follows host path semantics and falls back to stable filesystem identity for aliases such as Windows short and long path spellings, without altering exact Git logical-path spelling. Untracked candidates owned by those nested working trees are excluded. A selected-repository tracked candidate remains included even when a nested repository was created above it later. Ambiguous ownership, a symlinked boundary, unsafe raw path structure, or contradictory root output fails the complete probe with `GIT_OUTPUT_INVALID`; access failures remain `GIT_ACCESS_DENIED`.
|
|
65
67
|
|
|
66
68
|
After ownership filtering, the CLI groups exact paths in first-appearance order, retains one immutable mode-and-stage record for every unmerged index stage, and rejects duplicate stages, tracked/untracked collisions, stage-zero/conflict mixtures, or a surviving gitlink. Every remaining candidate is classified with a no-follow leaf stat. Missing paths are omitted; regular files and native symlinks retain their current type; directories, special entries, and unexplained contradictions fail atomically with `GIT_OUTPUT_INVALID`.
|
|
@@ -564,13 +564,14 @@ var EMPTY_ERROR_DETAILS = Object.freeze({});
|
|
|
564
564
|
/**
|
|
565
565
|
* Creates one immutable safe error from a CLI- or Git-owned definition.
|
|
566
566
|
* @param code The stable executable-owned error code.
|
|
567
|
+
* @param details Safe fixed details, such as the Git subcommand that failed.
|
|
567
568
|
* @returns The complete safe error object.
|
|
568
569
|
*/
|
|
569
|
-
var createMoldeaCliOwnedError = (code) => {
|
|
570
|
+
var createMoldeaCliOwnedError = (code, details = EMPTY_ERROR_DETAILS) => {
|
|
570
571
|
const definition = MOLDEA_CLI_ERROR_DEFINITIONS[code];
|
|
571
572
|
return Object.freeze({
|
|
572
573
|
code,
|
|
573
|
-
details:
|
|
574
|
+
details: Object.freeze({ ...details }),
|
|
574
575
|
message: definition.message,
|
|
575
576
|
path: null,
|
|
576
577
|
retryable: definition.retryable,
|
|
@@ -864,10 +865,16 @@ var createMoldeaCliInspectProjection = (inspection) => {
|
|
|
864
865
|
};
|
|
865
866
|
//#endregion
|
|
866
867
|
//#region src/git-command/utilities.ts
|
|
867
|
-
/**
|
|
868
|
-
|
|
868
|
+
/**
|
|
869
|
+
* Creates one immutable Git failure.
|
|
870
|
+
* @param reason Why the command failed.
|
|
871
|
+
* @param subcommand The fixed Git subcommand that failed, when the caller knows it.
|
|
872
|
+
* @returns The failed read result.
|
|
873
|
+
*/
|
|
874
|
+
var createGitFailure = (reason, subcommand) => Object.freeze({
|
|
869
875
|
kind: "failed",
|
|
870
|
-
reason
|
|
876
|
+
reason,
|
|
877
|
+
...subcommand === void 0 ? {} : { subcommand }
|
|
871
878
|
});
|
|
872
879
|
/**
|
|
873
880
|
* Classifies one Git error by its code, without retaining its diagnostics.
|
|
@@ -894,16 +901,17 @@ var classifyGitFailure = (error, signal) => {
|
|
|
894
901
|
* Runs one typed Git read and turns its rejection into a failure reason.
|
|
895
902
|
* @param read The read, such as one of jg-git-commands' typed commands.
|
|
896
903
|
* @param signal The read's cancellation signal.
|
|
904
|
+
* @param subcommand The fixed Git subcommand the read runs, named in its failure.
|
|
897
905
|
* @returns A promise resolving to the read's value, or why it failed.
|
|
898
906
|
*/
|
|
899
|
-
var readGit = async (read, signal) => {
|
|
907
|
+
var readGit = async (read, signal, subcommand) => {
|
|
900
908
|
try {
|
|
901
909
|
return Object.freeze({
|
|
902
910
|
kind: "completed",
|
|
903
911
|
value: await read()
|
|
904
912
|
});
|
|
905
913
|
} catch (error) {
|
|
906
|
-
return createGitFailure(classifyGitFailure(error, signal));
|
|
914
|
+
return createGitFailure(classifyGitFailure(error, signal), subcommand);
|
|
907
915
|
}
|
|
908
916
|
};
|
|
909
917
|
/**
|
|
@@ -926,12 +934,13 @@ var checkGitResult = (result, subcommand) => {
|
|
|
926
934
|
//#region src/git-command/run-git-command.ts
|
|
927
935
|
/**
|
|
928
936
|
* Runs one read-only Git command through jg-git-commands, bounded by the caller's combined output
|
|
929
|
-
* limit and the CLI's timeout, and refuses any stderr.
|
|
937
|
+
* limit and the CLI's timeout, and refuses any stderr. A failure names the subcommand.
|
|
930
938
|
* @param args The command's trusted arguments, its subcommand first.
|
|
931
939
|
* @param options The working directory, output limit, stdin, and cancellation.
|
|
932
940
|
* @returns A promise resolving to the command's stdout, or why it failed.
|
|
933
941
|
*/
|
|
934
942
|
var runGitCommand = async (args, { cwd, input, maxOutputBytes, signal }) => {
|
|
943
|
+
const subcommand = args[0];
|
|
935
944
|
const execution = await readGit(() => runGit(args, {
|
|
936
945
|
cwd,
|
|
937
946
|
encoding: "buffer",
|
|
@@ -939,13 +948,13 @@ var runGitCommand = async (args, { cwd, input, maxOutputBytes, signal }) => {
|
|
|
939
948
|
timeoutSeconds: 300,
|
|
940
949
|
...input === void 0 ? {} : { input },
|
|
941
950
|
...signal === void 0 ? {} : { signal }
|
|
942
|
-
}), signal);
|
|
951
|
+
}), signal, subcommand);
|
|
943
952
|
if (execution.kind === "failed") return execution;
|
|
944
|
-
const reason = checkGitResult(execution.value,
|
|
953
|
+
const reason = checkGitResult(execution.value, subcommand ?? "");
|
|
945
954
|
return reason === null ? Object.freeze({
|
|
946
955
|
kind: "completed",
|
|
947
956
|
value: execution.value.stdout
|
|
948
|
-
}) : createGitFailure(reason);
|
|
957
|
+
}) : createGitFailure(reason, subcommand);
|
|
949
958
|
};
|
|
950
959
|
//#endregion
|
|
951
960
|
//#region src/git-version/constants.ts
|
|
@@ -2505,4 +2514,4 @@ var resolveInstalledMoldeaCliComposition = (input) => resolveMoldeaCliCompositio
|
|
|
2505
2514
|
//#endregion
|
|
2506
2515
|
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 };
|
|
2507
2516
|
|
|
2508
|
-
//# sourceMappingURL=composition-
|
|
2517
|
+
//# sourceMappingURL=composition-C9TNzN2e.js.map
|