@decantr/cli 1.11.0 → 2.1.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.
@@ -10,12 +10,12 @@ import {
10
10
  scanRoutes,
11
11
  scanStyling,
12
12
  sendGuardMetrics
13
- } from "./chunk-DI2PLOJ6.js";
13
+ } from "./chunk-ZUUJ24YU.js";
14
14
 
15
15
  // src/commands/heal.ts
16
16
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
17
17
  import { join as join2 } from "path";
18
- import { evaluateGuard, isV3, validateEssence } from "@decantr/essence-spec";
18
+ import { evaluateGuard, isV4, validateEssence } from "@decantr/essence-spec";
19
19
 
20
20
  // src/brownfield-check.ts
21
21
  import { existsSync, readFileSync } from "fs";
@@ -141,7 +141,9 @@ function scanBrownfieldIssues(projectRoot, essence) {
141
141
  suggestion: "Run `decantr analyze` to create `.decantr/ambient-context.json` and a proposal-backed report."
142
142
  });
143
143
  }
144
- const hasBrownfieldArtifacts = Boolean(projectJson.initialized?.workflowMode === "brownfield-attach");
144
+ const hasBrownfieldArtifacts = Boolean(
145
+ projectJson.initialized?.workflowMode === "brownfield-attach"
146
+ );
145
147
  if (hasBrownfieldArtifacts && !existsSync(join(projectRoot, ".decantr", "doctrine-map.json"))) {
146
148
  issues.push({
147
149
  type: "warning",
@@ -231,6 +233,7 @@ function collectCheckIssues(projectRoot = process.cwd(), options = {}) {
231
233
  message: err
232
234
  });
233
235
  }
236
+ return { essence, issues, missingEssence: false };
234
237
  }
235
238
  let interactionIssues = [];
236
239
  try {
@@ -255,14 +258,14 @@ function collectCheckIssues(projectRoot = process.cwd(), options = {}) {
255
258
  }
256
259
  if (options.brownfield) {
257
260
  try {
258
- if (isV3(essence)) {
261
+ if (isV4(essence)) {
259
262
  const brownfieldIssues = scanBrownfieldIssues(projectRoot, essence);
260
263
  issues.push(...brownfieldIssues);
261
264
  } else {
262
265
  issues.push({
263
266
  type: "warning",
264
267
  rule: "brownfield-check",
265
- message: "Brownfield checks require a v3 Decantr essence."
268
+ message: "Brownfield checks require an Essence v4.0.0 Decantr contract."
266
269
  });
267
270
  }
268
271
  } catch (e) {
@@ -312,7 +315,7 @@ async function maybeSendTelemetry(projectRoot, essence, issues, options) {
312
315
  optIn(projectRoot);
313
316
  console.log(
314
317
  `
315
- ${CYAN}Telemetry enabled.${RESET} Anonymous guard metrics will be sent on future checks.`
318
+ ${CYAN}Telemetry enabled.${RESET} Decantr will send privacy-filtered CLI product telemetry for this project.`
316
319
  );
317
320
  console.log(`${DIM}Set "telemetry": false in .decantr/project.json to opt out.${RESET}`);
318
321
  }