@decantr/cli 2.4.1 → 2.5.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
@@ -14,7 +14,7 @@ npm install -D @decantr/cli
14
14
  Or run it without installing:
15
15
 
16
16
  ```bash
17
- npx @decantr/cli new my-app --blueprint=agent-marketplace
17
+ npx @decantr/cli new my-app --blueprint=esports-hq
18
18
  ```
19
19
 
20
20
  Use `decantr new` for a greenfield workspace in a fresh directory. With a blueprint/archetype it uses the runnable adapter and Decantr CSS; without registry content it creates a contract-only workspace unless you explicitly pass `--adoption=decantr-css`.
@@ -68,17 +68,18 @@ Brownfield analysis also writes `.decantr/doctrine-map.json`, a ranked source-pr
68
68
  - produces local Project Health reports, Evidence Bundles, workspace health, and a localhost Studio dashboard for end-user drift triage
69
69
  - audits local registry content repositories with Content Health reports for schema, reference, and quality coverage
70
70
  - searches the registry and showcase benchmark corpus
71
+ - filters blueprints through public portfolio sets: `All`, `Featured`, `Certified`, and opt-in `Labs`
71
72
  - syncs paginated hosted registry content into a full slug-keyed local cache for offline guards and context generation
72
73
  - validates, refreshes, and maintains `decantr.essence.json`
73
74
 
74
75
  ## Common Commands
75
76
 
76
77
  ```bash
77
- decantr new my-app --blueprint=agent-marketplace
78
+ decantr new my-app --blueprint=esports-hq
78
79
  decantr analyze
79
80
  decantr init --existing --accept-proposal
80
81
  decantr check --brownfield
81
- decantr init --existing --blueprint=agent-marketplace
82
+ decantr init --existing --blueprint=esports-hq
82
83
  decantr init --workflow=greenfield --adoption=contract-only
83
84
  decantr rules preview
84
85
  decantr rules apply
@@ -92,6 +93,9 @@ decantr telemetry explain
92
93
  decantr telemetry link --enable --org <org-slug>
93
94
  decantr content-health --ci --fail-on error
94
95
  decantr registry summary --namespace @official --json
96
+ decantr list blueprints --blueprint-set featured
97
+ decantr list blueprints --blueprint-set certified
98
+ decantr search dashboard --type blueprint --blueprint-set labs
95
99
  decantr showcase verification --json
96
100
  ```
97
101
 
@@ -210,7 +214,7 @@ pnpm --filter @decantr/cli certify:blueprints -- --blueprints=portfolio,legal-re
210
214
  Offline blueprint scaffolding expects a real local content source:
211
215
 
212
216
  ```bash
213
- DECANTR_CONTENT_DIR=/path/to/decantr-content decantr new my-app --blueprint=agent-marketplace --offline
217
+ DECANTR_CONTENT_DIR=/path/to/decantr-content decantr new my-app --blueprint=esports-hq --offline
214
218
  ```
215
219
 
216
220
  If a requested offline blueprint, archetype, or theme cannot be resolved from local cache/custom content or `DECANTR_CONTENT_DIR`, the CLI now stops explicitly instead of silently falling back to the default scaffold.
package/dist/bin.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-6BRD6DTB.js";
3
- import "./chunk-P4NUDLWB.js";
2
+ import "./chunk-BZWDPAHL.js";
3
+ import "./chunk-V3XAQWKD.js";
4
4
  import "./chunk-IEW2QFYI.js";
@@ -14,7 +14,7 @@ import {
14
14
  scaffoldProject,
15
15
  syncRegistry,
16
16
  writeExecutionPackBundleArtifacts
17
- } from "./chunk-P4NUDLWB.js";
17
+ } from "./chunk-V3XAQWKD.js";
18
18
  import {
19
19
  buildGuardRegistryContext,
20
20
  createDoctrineMap,
@@ -39,9 +39,11 @@ import { evaluateGuard, isV4 as isV47, validateEssence as validateEssence2 } fro
39
39
  import {
40
40
  CONTENT_TYPE_TO_API_CONTENT_TYPE as CONTENT_TYPE_TO_API_CONTENT_TYPE3,
41
41
  CONTENT_TYPES as GET_CONTENT_TYPES,
42
+ getBlueprintPortfolioMetadata,
42
43
  isApiContentType,
43
44
  isContentIntelligenceSource,
44
45
  isContentType as isGetContentType,
46
+ isPublicBlueprintSet,
45
47
  API_CONTENT_TYPES as LIST_CONTENT_TYPES,
46
48
  RegistryAPIClient as RegistryAPIClient3
47
49
  } from "@decantr/registry";
@@ -6528,7 +6530,46 @@ async function printHostedProjectAudit(namespace, jsonOutput = false, essencePat
6528
6530
  );
6529
6531
  printProjectAuditReport(report);
6530
6532
  }
6531
- async function cmdSearch(query, type, sort, recommended, intelligenceSource) {
6533
+ function formatBlueprintPortfolioSummary(value) {
6534
+ const portfolio = getBlueprintPortfolioMetadata(value);
6535
+ if (!portfolio) return null;
6536
+ const labels = [];
6537
+ if (portfolio.artifact.status === "certified") labels.push("Certified");
6538
+ if (portfolio.visibility === "featured") labels.push("Featured");
6539
+ if (portfolio.visibility === "labs") labels.push("Labs");
6540
+ if (portfolio.visibility === "hidden") labels.push("Folded");
6541
+ if (labels.length === 0) labels.push("All");
6542
+ const alternative = portfolio.recommended_alternative ? `; recommended alternative: ${portfolio.recommended_alternative}` : "";
6543
+ return `Blueprint set: ${labels.join(" + ")}${alternative}`;
6544
+ }
6545
+ function formatRegistryListIdentifier(item) {
6546
+ if (!item || typeof item !== "object") return String(item ?? "");
6547
+ const record = item;
6548
+ return typeof record.slug === "string" && record.slug || typeof record.id === "string" && record.id || typeof record.name === "string" && record.name || "";
6549
+ }
6550
+ function printBlueprintPortfolioNotice(blueprint) {
6551
+ const portfolio = getBlueprintPortfolioMetadata(blueprint);
6552
+ if (!portfolio) return;
6553
+ if (portfolio.visibility === "hidden" || portfolio.maturity === "fold-candidate") {
6554
+ console.log(
6555
+ `${YELLOW9} Warning:${RESET14} blueprint "${blueprint.id}" is folded out of public browsing.`
6556
+ );
6557
+ if (portfolio.recommended_alternative) {
6558
+ console.log(
6559
+ dim3(
6560
+ ` Recommended public alternative: decantr new <name> --blueprint=${portfolio.recommended_alternative}`
6561
+ )
6562
+ );
6563
+ }
6564
+ return;
6565
+ }
6566
+ if (portfolio.visibility === "labs") {
6567
+ console.log(
6568
+ `${YELLOW9} Note:${RESET14} blueprint "${blueprint.id}" is a Labs blueprint; direct scaffolding is supported, but it is not a default recommendation yet.`
6569
+ );
6570
+ }
6571
+ }
6572
+ async function cmdSearch(query, type, sort, recommended, intelligenceSource, blueprintSet) {
6532
6573
  const apiClient = getAPIClient();
6533
6574
  try {
6534
6575
  const response = await apiClient.search({
@@ -6536,7 +6577,8 @@ async function cmdSearch(query, type, sort, recommended, intelligenceSource) {
6536
6577
  type,
6537
6578
  sort,
6538
6579
  recommended,
6539
- intelligenceSource
6580
+ intelligenceSource,
6581
+ blueprintSet
6540
6582
  });
6541
6583
  const results = response.results;
6542
6584
  if (results.length === 0) {
@@ -6551,6 +6593,12 @@ async function cmdSearch(query, type, sort, recommended, intelligenceSource) {
6551
6593
  if (intelligenceSummary) {
6552
6594
  console.log(` ${dim3(intelligenceSummary)}`);
6553
6595
  }
6596
+ const portfolioSummary = formatBlueprintPortfolioSummary(
6597
+ r.blueprint_portfolio
6598
+ );
6599
+ if (portfolioSummary) {
6600
+ console.log(` ${dim3(portfolioSummary)}`);
6601
+ }
6554
6602
  console.log("");
6555
6603
  }
6556
6604
  } catch {
@@ -6690,7 +6738,7 @@ async function cmdValidate(path) {
6690
6738
  } catch {
6691
6739
  }
6692
6740
  }
6693
- async function cmdList(type, sort, recommended, intelligenceSource) {
6741
+ async function cmdList(type, sort, recommended, intelligenceSource, blueprintSet) {
6694
6742
  if (!isApiContentType(type)) {
6695
6743
  console.error(
6696
6744
  error3(`Invalid type "${type}". Must be one of: ${LIST_CONTENT_TYPES.join(", ")}`)
@@ -6706,7 +6754,8 @@ async function cmdList(type, sort, recommended, intelligenceSource) {
6706
6754
  void 0,
6707
6755
  sort,
6708
6756
  recommended,
6709
- intelligenceSource
6757
+ intelligenceSource,
6758
+ blueprintSet
6710
6759
  );
6711
6760
  const items = result.data.items;
6712
6761
  if (items.length === 0) {
@@ -6735,13 +6784,21 @@ async function cmdList(type, sort, recommended, intelligenceSource) {
6735
6784
  } else {
6736
6785
  console.log(heading2(`${items.length} ${type} found`));
6737
6786
  for (const item of items) {
6738
- console.log(` ${cyan3(item.id)} ${dim3(item.description || item.name || "")}`);
6787
+ console.log(
6788
+ ` ${cyan3(formatRegistryListIdentifier(item))} ${dim3(item.description || item.name || "")}`
6789
+ );
6739
6790
  const intelligenceSummary = formatIntelligenceSummary(
6740
6791
  item.intelligence
6741
6792
  );
6742
6793
  if (intelligenceSummary) {
6743
6794
  console.log(` ${dim3(intelligenceSummary)}`);
6744
6795
  }
6796
+ const portfolioSummary = formatBlueprintPortfolioSummary(
6797
+ item.blueprint_portfolio ?? item
6798
+ );
6799
+ if (portfolioSummary) {
6800
+ console.log(` ${dim3(portfolioSummary)}`);
6801
+ }
6745
6802
  }
6746
6803
  }
6747
6804
  }
@@ -7179,6 +7236,7 @@ ${YELLOW9}You're offline. Scaffolding Decantr default.${RESET14}`);
7179
7236
  const blueprintResult = await registryClient.fetchBlueprint(options.blueprint);
7180
7237
  if (blueprintResult) {
7181
7238
  const blueprint = blueprintResult.data;
7239
+ printBlueprintPortfolioNotice(blueprint);
7182
7240
  if (blueprint.theme) {
7183
7241
  if (!userExplicit.theme && blueprint.theme.id) {
7184
7242
  options.theme = blueprint.theme.id;
@@ -8227,7 +8285,7 @@ async function main() {
8227
8285
  break;
8228
8286
  }
8229
8287
  case "upgrade": {
8230
- const { cmdUpgrade } = await import("./upgrade-HSPWYROM.js");
8288
+ const { cmdUpgrade } = await import("./upgrade-U2BTWJJJ.js");
8231
8289
  const applyFlag = args.includes("--apply");
8232
8290
  await cmdUpgrade(process.cwd(), { apply: applyFlag });
8233
8291
  break;
@@ -8336,7 +8394,7 @@ async function main() {
8336
8394
  if (!query) {
8337
8395
  console.error(
8338
8396
  error3(
8339
- "Usage: decantr search <query> [--type <type>] [--sort <recommended|recent|name>] [--source <authored|benchmark|hybrid>]"
8397
+ "Usage: decantr search <query> [--type <type>] [--sort <recommended|recent|name>] [--source <authored|benchmark|hybrid>] [--blueprint-set <all|featured|certified|labs>]"
8340
8398
  )
8341
8399
  );
8342
8400
  process.exitCode = 1;
@@ -8348,6 +8406,18 @@ async function main() {
8348
8406
  const sort = sortIdx !== -1 ? args[sortIdx + 1] : void 0;
8349
8407
  const sourceIdx = args.indexOf("--source");
8350
8408
  const intelligenceSource = sourceIdx !== -1 ? args[sourceIdx + 1] : void 0;
8409
+ const blueprintSetIdx = args.indexOf("--blueprint-set");
8410
+ const rawBlueprintSet = args.includes("--labs") ? "labs" : blueprintSetIdx !== -1 ? args[blueprintSetIdx + 1] : void 0;
8411
+ const blueprintSet = rawBlueprintSet && isPublicBlueprintSet(rawBlueprintSet) ? rawBlueprintSet : void 0;
8412
+ if (rawBlueprintSet && !blueprintSet) {
8413
+ console.error(
8414
+ error3(
8415
+ `Invalid blueprint set "${rawBlueprintSet}". Must be one of: all, featured, certified, labs.`
8416
+ )
8417
+ );
8418
+ process.exitCode = 1;
8419
+ return;
8420
+ }
8351
8421
  if (intelligenceSource && !isContentIntelligenceSource(intelligenceSource)) {
8352
8422
  console.error(
8353
8423
  error3(
@@ -8358,7 +8428,7 @@ async function main() {
8358
8428
  return;
8359
8429
  }
8360
8430
  const recommended = args.includes("--recommended");
8361
- await cmdSearch(query, type, sort, recommended, intelligenceSource);
8431
+ await cmdSearch(query, type, sort, recommended, intelligenceSource, blueprintSet);
8362
8432
  break;
8363
8433
  }
8364
8434
  case "suggest": {
@@ -8389,7 +8459,7 @@ async function main() {
8389
8459
  if (!type) {
8390
8460
  console.error(
8391
8461
  error3(
8392
- "Usage: decantr list <type> [--sort <recommended|recent|name>] [--source <authored|benchmark|hybrid>]"
8462
+ "Usage: decantr list <type> [--sort <recommended|recent|name>] [--source <authored|benchmark|hybrid>] [--blueprint-set <all|featured|certified|labs>]"
8393
8463
  )
8394
8464
  );
8395
8465
  process.exitCode = 1;
@@ -8399,6 +8469,18 @@ async function main() {
8399
8469
  const sort = sortIdx !== -1 ? args[sortIdx + 1] : void 0;
8400
8470
  const sourceIdx = args.indexOf("--source");
8401
8471
  const intelligenceSource = sourceIdx !== -1 ? args[sourceIdx + 1] : void 0;
8472
+ const blueprintSetIdx = args.indexOf("--blueprint-set");
8473
+ const rawBlueprintSet = args.includes("--labs") ? "labs" : blueprintSetIdx !== -1 ? args[blueprintSetIdx + 1] : void 0;
8474
+ const blueprintSet = rawBlueprintSet && isPublicBlueprintSet(rawBlueprintSet) ? rawBlueprintSet : void 0;
8475
+ if (rawBlueprintSet && !blueprintSet) {
8476
+ console.error(
8477
+ error3(
8478
+ `Invalid blueprint set "${rawBlueprintSet}". Must be one of: all, featured, certified, labs.`
8479
+ )
8480
+ );
8481
+ process.exitCode = 1;
8482
+ return;
8483
+ }
8402
8484
  if (intelligenceSource && !isContentIntelligenceSource(intelligenceSource)) {
8403
8485
  console.error(
8404
8486
  error3(
@@ -8409,7 +8491,7 @@ async function main() {
8409
8491
  return;
8410
8492
  }
8411
8493
  const recommended = args.includes("--recommended");
8412
- await cmdList(type, sort, recommended, intelligenceSource);
8494
+ await cmdList(type, sort, recommended, intelligenceSource, blueprintSet);
8413
8495
  break;
8414
8496
  }
8415
8497
  case "showcase": {
@@ -133,7 +133,7 @@ var RegistryClient = class {
133
133
  * Unified fetch for a content list.
134
134
  * Resolution: API -> Cache. Custom items are merged into the list.
135
135
  */
136
- async fetchContentList(contentType, namespace, sort, recommended, intelligenceSource) {
136
+ async fetchContentList(contentType, namespace, sort, recommended, intelligenceSource, blueprintSet, labs) {
137
137
  let apiItems = [];
138
138
  let source = { type: "cache" };
139
139
  if (!this.offline) {
@@ -142,7 +142,9 @@ var RegistryClient = class {
142
142
  namespace,
143
143
  sort,
144
144
  recommended,
145
- intelligenceSource
145
+ intelligenceSource,
146
+ blueprintSet,
147
+ labs
146
148
  });
147
149
  apiItems = apiResult.items;
148
150
  source = { type: "api", url: this.apiUrl };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./chunk-6BRD6DTB.js";
2
- import "./chunk-P4NUDLWB.js";
1
+ import "./chunk-BZWDPAHL.js";
2
+ import "./chunk-V3XAQWKD.js";
3
3
  import "./chunk-IEW2QFYI.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RegistryClient,
3
3
  refreshDerivedFiles
4
- } from "./chunk-P4NUDLWB.js";
4
+ } from "./chunk-V3XAQWKD.js";
5
5
 
6
6
  // src/commands/upgrade.ts
7
7
  import { existsSync, readFileSync, writeFileSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decantr/cli",
3
- "version": "2.4.1",
3
+ "version": "2.5.1",
4
4
  "description": "Decantr CLI - scaffold, audit, inspect Project Health, and maintain Decantr projects from the terminal",
5
5
  "keywords": [
6
6
  "decantr",
@@ -49,10 +49,10 @@
49
49
  "dependencies": {
50
50
  "ajv": "^8.20.0",
51
51
  "@decantr/core": "2.1.0",
52
- "@decantr/registry": "2.0.0",
53
52
  "@decantr/essence-spec": "2.0.1",
54
- "@decantr/telemetry": "2.2.1",
55
- "@decantr/verifier": "2.1.0"
53
+ "@decantr/verifier": "2.1.0",
54
+ "@decantr/registry": "2.1.0",
55
+ "@decantr/telemetry": "2.2.1"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsup",