@moldea.ai/cli 9.0.0 → 9.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 CHANGED
@@ -107,12 +107,14 @@ A successfully completed Core inspection produces `validate` human or JSON outpu
107
107
 
108
108
  `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
109
 
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.
110
+ `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
111
 
112
112
  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
113
 
114
114
  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
115
 
116
+ 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
+
116
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. 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
119
 
118
120
  ## Installed composition and integrity
package/dist/moldea.js CHANGED
@@ -4,9 +4,9 @@ import path from "node:path";
4
4
  import process from "node:process";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import { createHash, timingSafeEqual } from "node:crypto";
7
+ import { REPOSITORY_ROOT, RepositorySourceException, createRepositoryComparison, isRepositoryPath, parseRepositoryPath } from "@moldea.ai/repository";
7
8
  import { lstat, readFile, readdir, stat } from "node:fs/promises";
8
9
  import { CoreConfigurationException, CoreOperationException, createCore } from "@moldea.ai/core";
9
- import { REPOSITORY_ROOT, RepositorySourceException, createRepositoryComparison, isRepositoryPath, parseRepositoryPath } from "@moldea.ai/repository";
10
10
  import { Buffer as Buffer$1 } from "node:buffer";
11
11
  import { createFilesystemRepositoryReader } from "@moldea.ai/repository-fs";
12
12
  //#region src/cli-execution/constants.ts
@@ -552,7 +552,7 @@ var MOLDEA_CLI_ERROR_DEFINITIONS = Object.freeze({
552
552
  source: "cli"
553
553
  }),
554
554
  PATH_INPUT_INVALID: Object.freeze({
555
- message: "The NUL-delimited changed-path input is invalid.",
555
+ message: "The scope path input is invalid. Use leading-slash repository-logical paths and NUL-delimited UTF-8 on stdin.",
556
556
  retryable: false,
557
557
  source: "cli"
558
558
  }),
@@ -1441,7 +1441,7 @@ var createMoldeaCliContentPage = (input) => {
1441
1441
  var MOLDEA_MANIFEST_PATH = parseRepositoryPath("/moldea/moldea.yaml");
1442
1442
  //#endregion
1443
1443
  //#region src/project-scope/exception.ts
1444
- /** Represents invalid NUL-delimited changed-path input owned by the CLI. */
1444
+ /** Represents invalid scope path input owned by the CLI. */
1445
1445
  var MoldeaCliProjectScopeException = class extends Error {
1446
1446
  code;
1447
1447
  /** Creates one scope-input failure with a stable public code. */
@@ -1459,7 +1459,7 @@ var MoldeaCliProjectScopeException = class extends Error {
1459
1459
  * @param maxEntries Maximum changed-path records accepted by the operation.
1460
1460
  * @returns Detached path strings in supplied order for Core validation and normalization.
1461
1461
  * @throws
1462
- * - PATH_INPUT_INVALID: The NUL-delimited changed-path input is invalid.
1462
+ * - PATH_INPUT_INVALID: The scope path input is invalid. Use leading-slash repository-logical paths and NUL-delimited UTF-8 on stdin.
1463
1463
  */
1464
1464
  var parseMoldeaCliScopePathBytes = (input, maxEntries) => {
1465
1465
  if (input.byteLength === 0) return Object.freeze([]);
@@ -3484,6 +3484,7 @@ var createMoldeaCliCommandExecutor = (workingTreeDiscovery = discoverGitWorkingT
3484
3484
  if (input.stdin.byteLength > options.resourceLimits.maxTotalBytes) return createOperationalErrorResult("RESOURCE_LIMIT_EXCEEDED", input);
3485
3485
  scopePaths = parseMoldeaCliScopePathBytes(input.stdin, options.resourceLimits.maxEntries);
3486
3486
  } else return createOperationalErrorResult("PATH_INPUT_INVALID", input);
3487
+ if (scopePaths.some((path) => !isRepositoryPath(path))) return createOperationalErrorResult("PATH_INPUT_INVALID", input);
3487
3488
  }
3488
3489
  if (command === MOLDEA_CLI_COMMANDS.Content) {
3489
3490
  if (options.path === null) return createOperationalErrorResult("CONTENT_PATH_INVALID", input);