@decantr/cli 2.4.1 → 2.5.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.
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-HO3OLDPQ.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,41 @@ 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 printBlueprintPortfolioNotice(blueprint) {
6546
+ const portfolio = getBlueprintPortfolioMetadata(blueprint);
6547
+ if (!portfolio) return;
6548
+ if (portfolio.visibility === "hidden" || portfolio.maturity === "fold-candidate") {
6549
+ console.log(
6550
+ `${YELLOW9} Warning:${RESET14} blueprint "${blueprint.id}" is folded out of public browsing.`
6551
+ );
6552
+ if (portfolio.recommended_alternative) {
6553
+ console.log(
6554
+ dim3(
6555
+ ` Recommended public alternative: decantr new <name> --blueprint=${portfolio.recommended_alternative}`
6556
+ )
6557
+ );
6558
+ }
6559
+ return;
6560
+ }
6561
+ if (portfolio.visibility === "labs") {
6562
+ console.log(
6563
+ `${YELLOW9} Note:${RESET14} blueprint "${blueprint.id}" is a Labs blueprint; direct scaffolding is supported, but it is not a default recommendation yet.`
6564
+ );
6565
+ }
6566
+ }
6567
+ async function cmdSearch(query, type, sort, recommended, intelligenceSource, blueprintSet) {
6532
6568
  const apiClient = getAPIClient();
6533
6569
  try {
6534
6570
  const response = await apiClient.search({
@@ -6536,7 +6572,8 @@ async function cmdSearch(query, type, sort, recommended, intelligenceSource) {
6536
6572
  type,
6537
6573
  sort,
6538
6574
  recommended,
6539
- intelligenceSource
6575
+ intelligenceSource,
6576
+ blueprintSet
6540
6577
  });
6541
6578
  const results = response.results;
6542
6579
  if (results.length === 0) {
@@ -6551,6 +6588,12 @@ async function cmdSearch(query, type, sort, recommended, intelligenceSource) {
6551
6588
  if (intelligenceSummary) {
6552
6589
  console.log(` ${dim3(intelligenceSummary)}`);
6553
6590
  }
6591
+ const portfolioSummary = formatBlueprintPortfolioSummary(
6592
+ r.blueprint_portfolio
6593
+ );
6594
+ if (portfolioSummary) {
6595
+ console.log(` ${dim3(portfolioSummary)}`);
6596
+ }
6554
6597
  console.log("");
6555
6598
  }
6556
6599
  } catch {
@@ -6690,7 +6733,7 @@ async function cmdValidate(path) {
6690
6733
  } catch {
6691
6734
  }
6692
6735
  }
6693
- async function cmdList(type, sort, recommended, intelligenceSource) {
6736
+ async function cmdList(type, sort, recommended, intelligenceSource, blueprintSet) {
6694
6737
  if (!isApiContentType(type)) {
6695
6738
  console.error(
6696
6739
  error3(`Invalid type "${type}". Must be one of: ${LIST_CONTENT_TYPES.join(", ")}`)
@@ -6706,7 +6749,8 @@ async function cmdList(type, sort, recommended, intelligenceSource) {
6706
6749
  void 0,
6707
6750
  sort,
6708
6751
  recommended,
6709
- intelligenceSource
6752
+ intelligenceSource,
6753
+ blueprintSet
6710
6754
  );
6711
6755
  const items = result.data.items;
6712
6756
  if (items.length === 0) {
@@ -6742,6 +6786,12 @@ async function cmdList(type, sort, recommended, intelligenceSource) {
6742
6786
  if (intelligenceSummary) {
6743
6787
  console.log(` ${dim3(intelligenceSummary)}`);
6744
6788
  }
6789
+ const portfolioSummary = formatBlueprintPortfolioSummary(
6790
+ item.blueprint_portfolio ?? item
6791
+ );
6792
+ if (portfolioSummary) {
6793
+ console.log(` ${dim3(portfolioSummary)}`);
6794
+ }
6745
6795
  }
6746
6796
  }
6747
6797
  }
@@ -7179,6 +7229,7 @@ ${YELLOW9}You're offline. Scaffolding Decantr default.${RESET14}`);
7179
7229
  const blueprintResult = await registryClient.fetchBlueprint(options.blueprint);
7180
7230
  if (blueprintResult) {
7181
7231
  const blueprint = blueprintResult.data;
7232
+ printBlueprintPortfolioNotice(blueprint);
7182
7233
  if (blueprint.theme) {
7183
7234
  if (!userExplicit.theme && blueprint.theme.id) {
7184
7235
  options.theme = blueprint.theme.id;
@@ -8227,7 +8278,7 @@ async function main() {
8227
8278
  break;
8228
8279
  }
8229
8280
  case "upgrade": {
8230
- const { cmdUpgrade } = await import("./upgrade-HSPWYROM.js");
8281
+ const { cmdUpgrade } = await import("./upgrade-U2BTWJJJ.js");
8231
8282
  const applyFlag = args.includes("--apply");
8232
8283
  await cmdUpgrade(process.cwd(), { apply: applyFlag });
8233
8284
  break;
@@ -8336,7 +8387,7 @@ async function main() {
8336
8387
  if (!query) {
8337
8388
  console.error(
8338
8389
  error3(
8339
- "Usage: decantr search <query> [--type <type>] [--sort <recommended|recent|name>] [--source <authored|benchmark|hybrid>]"
8390
+ "Usage: decantr search <query> [--type <type>] [--sort <recommended|recent|name>] [--source <authored|benchmark|hybrid>] [--blueprint-set <all|featured|certified|labs>]"
8340
8391
  )
8341
8392
  );
8342
8393
  process.exitCode = 1;
@@ -8348,6 +8399,18 @@ async function main() {
8348
8399
  const sort = sortIdx !== -1 ? args[sortIdx + 1] : void 0;
8349
8400
  const sourceIdx = args.indexOf("--source");
8350
8401
  const intelligenceSource = sourceIdx !== -1 ? args[sourceIdx + 1] : void 0;
8402
+ const blueprintSetIdx = args.indexOf("--blueprint-set");
8403
+ const rawBlueprintSet = args.includes("--labs") ? "labs" : blueprintSetIdx !== -1 ? args[blueprintSetIdx + 1] : void 0;
8404
+ const blueprintSet = rawBlueprintSet && isPublicBlueprintSet(rawBlueprintSet) ? rawBlueprintSet : void 0;
8405
+ if (rawBlueprintSet && !blueprintSet) {
8406
+ console.error(
8407
+ error3(
8408
+ `Invalid blueprint set "${rawBlueprintSet}". Must be one of: all, featured, certified, labs.`
8409
+ )
8410
+ );
8411
+ process.exitCode = 1;
8412
+ return;
8413
+ }
8351
8414
  if (intelligenceSource && !isContentIntelligenceSource(intelligenceSource)) {
8352
8415
  console.error(
8353
8416
  error3(
@@ -8358,7 +8421,7 @@ async function main() {
8358
8421
  return;
8359
8422
  }
8360
8423
  const recommended = args.includes("--recommended");
8361
- await cmdSearch(query, type, sort, recommended, intelligenceSource);
8424
+ await cmdSearch(query, type, sort, recommended, intelligenceSource, blueprintSet);
8362
8425
  break;
8363
8426
  }
8364
8427
  case "suggest": {
@@ -8389,7 +8452,7 @@ async function main() {
8389
8452
  if (!type) {
8390
8453
  console.error(
8391
8454
  error3(
8392
- "Usage: decantr list <type> [--sort <recommended|recent|name>] [--source <authored|benchmark|hybrid>]"
8455
+ "Usage: decantr list <type> [--sort <recommended|recent|name>] [--source <authored|benchmark|hybrid>] [--blueprint-set <all|featured|certified|labs>]"
8393
8456
  )
8394
8457
  );
8395
8458
  process.exitCode = 1;
@@ -8399,6 +8462,18 @@ async function main() {
8399
8462
  const sort = sortIdx !== -1 ? args[sortIdx + 1] : void 0;
8400
8463
  const sourceIdx = args.indexOf("--source");
8401
8464
  const intelligenceSource = sourceIdx !== -1 ? args[sourceIdx + 1] : void 0;
8465
+ const blueprintSetIdx = args.indexOf("--blueprint-set");
8466
+ const rawBlueprintSet = args.includes("--labs") ? "labs" : blueprintSetIdx !== -1 ? args[blueprintSetIdx + 1] : void 0;
8467
+ const blueprintSet = rawBlueprintSet && isPublicBlueprintSet(rawBlueprintSet) ? rawBlueprintSet : void 0;
8468
+ if (rawBlueprintSet && !blueprintSet) {
8469
+ console.error(
8470
+ error3(
8471
+ `Invalid blueprint set "${rawBlueprintSet}". Must be one of: all, featured, certified, labs.`
8472
+ )
8473
+ );
8474
+ process.exitCode = 1;
8475
+ return;
8476
+ }
8402
8477
  if (intelligenceSource && !isContentIntelligenceSource(intelligenceSource)) {
8403
8478
  console.error(
8404
8479
  error3(
@@ -8409,7 +8484,7 @@ async function main() {
8409
8484
  return;
8410
8485
  }
8411
8486
  const recommended = args.includes("--recommended");
8412
- await cmdList(type, sort, recommended, intelligenceSource);
8487
+ await cmdList(type, sort, recommended, intelligenceSource, blueprintSet);
8413
8488
  break;
8414
8489
  }
8415
8490
  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-HO3OLDPQ.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.0",
4
4
  "description": "Decantr CLI - scaffold, audit, inspect Project Health, and maintain Decantr projects from the terminal",
5
5
  "keywords": [
6
6
  "decantr",
@@ -48,10 +48,10 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "ajv": "^8.20.0",
51
- "@decantr/core": "2.1.0",
52
- "@decantr/registry": "2.0.0",
53
51
  "@decantr/essence-spec": "2.0.1",
52
+ "@decantr/core": "2.1.0",
54
53
  "@decantr/telemetry": "2.2.1",
54
+ "@decantr/registry": "2.1.0",
55
55
  "@decantr/verifier": "2.1.0"
56
56
  },
57
57
  "scripts": {