scene-capability-engine 3.6.20 → 3.6.21
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/docs/command-reference.md +2 -0
- package/docs/magicball-capability-library.md +3 -1
- package/lib/commands/capability.js +42 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.6.21] - 2026-03-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Capability catalog list/search now supports `--release-ready` and `--missing-triad` filters for pre-publish triage.
|
|
14
|
+
- Magicball capability library docs now show list-level triage filter examples.
|
|
15
|
+
|
|
10
16
|
## [3.6.20] - 2026-03-06
|
|
11
17
|
|
|
12
18
|
### Added
|
package/README.md
CHANGED
package/README.zh.md
CHANGED
|
@@ -1903,6 +1903,8 @@ Catalog payloads also expose `release_readiness_ui` for pre-publish sorting and
|
|
|
1903
1903
|
```bash
|
|
1904
1904
|
# List capability templates
|
|
1905
1905
|
sce capability catalog list --json
|
|
1906
|
+
sce capability catalog list --release-ready true --json
|
|
1907
|
+
sce capability catalog list --missing-triad decision_strategy --json
|
|
1906
1908
|
|
|
1907
1909
|
# Search capability templates
|
|
1908
1910
|
sce capability catalog search "customer order" --json
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
sce capability catalog list --json
|
|
23
|
-
sce capability catalog
|
|
23
|
+
sce capability catalog list --release-ready true --json
|
|
24
|
+
sce capability catalog list --missing-triad decision_strategy --json
|
|
25
|
+
sce capability catalog search "customer order" --release-ready false --json
|
|
24
26
|
sce capability catalog show <template-id> --json
|
|
25
27
|
```
|
|
26
28
|
|
|
@@ -1001,6 +1001,34 @@ async function runCapabilityRegisterCommand(options = {}, dependencies = {}) {
|
|
|
1001
1001
|
return result;
|
|
1002
1002
|
}
|
|
1003
1003
|
|
|
1004
|
+
function filterCapabilityCatalogEntries(templates, options = {}) {
|
|
1005
|
+
const entries = Array.isArray(templates) ? templates : [];
|
|
1006
|
+
const normalizedMissingTriad = normalizeText(options.missingTriad || options.missing_triad).toLowerCase();
|
|
1007
|
+
const releaseReadyFilter = normalizeText(options.releaseReady || options.release_ready).toLowerCase();
|
|
1008
|
+
|
|
1009
|
+
return entries.filter((entry) => {
|
|
1010
|
+
const template = enrichCapabilityTemplateForUi(entry);
|
|
1011
|
+
|
|
1012
|
+
if (releaseReadyFilter) {
|
|
1013
|
+
const expected = ['1', 'true', 'yes', 'ready'].includes(releaseReadyFilter);
|
|
1014
|
+
if (template.release_readiness_ui.publish_ready !== expected) {
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
if (normalizedMissingTriad) {
|
|
1020
|
+
const missing = Array.isArray(template.release_readiness_ui.blocking_missing)
|
|
1021
|
+
? template.release_readiness_ui.blocking_missing
|
|
1022
|
+
: [];
|
|
1023
|
+
if (!missing.includes(normalizedMissingTriad)) {
|
|
1024
|
+
return false;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
return true;
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1004
1032
|
function displayCapabilityCatalog(templates, options = {}) {
|
|
1005
1033
|
const total = Array.isArray(templates) ? templates.length : 0;
|
|
1006
1034
|
console.log(chalk.red('🔥') + ' Capability Library');
|
|
@@ -1026,13 +1054,13 @@ function displayCapabilityCatalog(templates, options = {}) {
|
|
|
1026
1054
|
|
|
1027
1055
|
async function listCapabilityCatalog(options = {}) {
|
|
1028
1056
|
const manager = new TemplateManager();
|
|
1029
|
-
const templates = (await manager.listTemplates({
|
|
1057
|
+
const templates = filterCapabilityCatalogEntries((await manager.listTemplates({
|
|
1030
1058
|
category: options.category,
|
|
1031
1059
|
source: options.source,
|
|
1032
1060
|
templateType: 'capability-template',
|
|
1033
1061
|
compatibleWith: options.compatibleWith,
|
|
1034
1062
|
riskLevel: options.risk
|
|
1035
|
-
})).map((template) => enrichCapabilityTemplateForUi(template));
|
|
1063
|
+
})).map((template) => enrichCapabilityTemplateForUi(template)), options);
|
|
1036
1064
|
if (normalizeBoolean(options.json, false)) {
|
|
1037
1065
|
return {
|
|
1038
1066
|
mode: 'capability-catalog-list',
|
|
@@ -1045,13 +1073,13 @@ async function listCapabilityCatalog(options = {}) {
|
|
|
1045
1073
|
|
|
1046
1074
|
async function searchCapabilityCatalog(keyword, options = {}) {
|
|
1047
1075
|
const manager = new TemplateManager();
|
|
1048
|
-
const templates = (await manager.searchTemplates(keyword, {
|
|
1076
|
+
const templates = filterCapabilityCatalogEntries((await manager.searchTemplates(keyword, {
|
|
1049
1077
|
category: options.category,
|
|
1050
1078
|
source: options.source,
|
|
1051
1079
|
templateType: 'capability-template',
|
|
1052
1080
|
compatibleWith: options.compatibleWith,
|
|
1053
1081
|
riskLevel: options.risk
|
|
1054
|
-
})).map((template) => enrichCapabilityTemplateForUi(template));
|
|
1082
|
+
})).map((template) => enrichCapabilityTemplateForUi(template)), options);
|
|
1055
1083
|
if (normalizeBoolean(options.json, false)) {
|
|
1056
1084
|
return {
|
|
1057
1085
|
mode: 'capability-catalog-search',
|
|
@@ -1361,6 +1389,8 @@ function registerCapabilityCommands(program) {
|
|
|
1361
1389
|
.option('--category <name>', 'Template category filter')
|
|
1362
1390
|
.option('--compatible-with <semver>', 'SCE version compatibility')
|
|
1363
1391
|
.option('--risk <level>', 'Risk level filter')
|
|
1392
|
+
.option('--release-ready <bool>', 'Filter by publish readiness')
|
|
1393
|
+
.option('--missing-triad <name>', 'Filter by missing triad (entity_relation|business_rules|decision_strategy)')
|
|
1364
1394
|
.option('--json', 'Output JSON to stdout')
|
|
1365
1395
|
.action(async (options) => {
|
|
1366
1396
|
try {
|
|
@@ -1369,6 +1399,8 @@ function registerCapabilityCommands(program) {
|
|
|
1369
1399
|
category: options.category,
|
|
1370
1400
|
compatibleWith: options.compatibleWith,
|
|
1371
1401
|
risk: options.risk,
|
|
1402
|
+
releaseReady: options.releaseReady,
|
|
1403
|
+
missingTriad: options.missingTriad,
|
|
1372
1404
|
json: options.json
|
|
1373
1405
|
});
|
|
1374
1406
|
if (options.json) {
|
|
@@ -1393,6 +1425,8 @@ function registerCapabilityCommands(program) {
|
|
|
1393
1425
|
.option('--category <name>', 'Template category filter')
|
|
1394
1426
|
.option('--compatible-with <semver>', 'SCE version compatibility')
|
|
1395
1427
|
.option('--risk <level>', 'Risk level filter')
|
|
1428
|
+
.option('--release-ready <bool>', 'Filter by publish readiness')
|
|
1429
|
+
.option('--missing-triad <name>', 'Filter by missing triad (entity_relation|business_rules|decision_strategy)')
|
|
1396
1430
|
.option('--json', 'Output JSON to stdout')
|
|
1397
1431
|
.action(async (keyword, options) => {
|
|
1398
1432
|
try {
|
|
@@ -1401,6 +1435,8 @@ function registerCapabilityCommands(program) {
|
|
|
1401
1435
|
category: options.category,
|
|
1402
1436
|
compatibleWith: options.compatibleWith,
|
|
1403
1437
|
risk: options.risk,
|
|
1438
|
+
releaseReady: options.releaseReady,
|
|
1439
|
+
missingTriad: options.missingTriad,
|
|
1404
1440
|
json: options.json
|
|
1405
1441
|
});
|
|
1406
1442
|
if (options.json) {
|
|
@@ -1500,5 +1536,6 @@ module.exports = {
|
|
|
1500
1536
|
matchCapabilityTemplates,
|
|
1501
1537
|
useCapabilityTemplate,
|
|
1502
1538
|
enrichCapabilityTemplateForUi,
|
|
1503
|
-
buildCapabilityReleaseReadinessUi
|
|
1539
|
+
buildCapabilityReleaseReadinessUi,
|
|
1540
|
+
filterCapabilityCatalogEntries
|
|
1504
1541
|
};
|
package/package.json
CHANGED