@claude-flow/cli 3.1.0-alpha.50 → 3.1.0-alpha.51

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.
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAizI1E,eAAO,MAAM,YAAY,EAAE,OAyG1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAyzI1E,eAAO,MAAM,YAAY,EAAE,OAyG1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1634,19 +1634,20 @@ const intelligenceCommand = {
1634
1634
  // SONA Component
1635
1635
  output.writeln();
1636
1636
  output.writeln(output.bold('🧠 SONA (Sub-0.05ms Learning)'));
1637
- if (result.components.sona.enabled) {
1637
+ const sona = result.components?.sona;
1638
+ if (sona?.enabled) {
1638
1639
  output.printTable({
1639
1640
  columns: [
1640
1641
  { key: 'metric', header: 'Metric', width: 25 },
1641
1642
  { key: 'value', header: 'Value', width: 20, align: 'right' }
1642
1643
  ],
1643
1644
  data: [
1644
- { metric: 'Status', value: formatIntelligenceStatus(result.components.sona.status) },
1645
- { metric: 'Learning Time', value: `${result.components.sona.learningTimeMs.toFixed(3)}ms` },
1646
- { metric: 'Adaptation Time', value: `${result.components.sona.adaptationTimeMs.toFixed(3)}ms` },
1647
- { metric: 'Trajectories', value: result.components.sona.trajectoriesRecorded },
1648
- { metric: 'Patterns Learned', value: result.components.sona.patternsLearned },
1649
- { metric: 'Avg Quality', value: `${(result.components.sona.avgQuality * 100).toFixed(1)}%` }
1645
+ { metric: 'Status', value: formatIntelligenceStatus(sona.status) },
1646
+ { metric: 'Learning Time', value: `${(sona.learningTimeMs ?? 0).toFixed(3)}ms` },
1647
+ { metric: 'Adaptation Time', value: `${(sona.adaptationTimeMs ?? 0).toFixed(3)}ms` },
1648
+ { metric: 'Trajectories', value: sona.trajectoriesRecorded ?? 0 },
1649
+ { metric: 'Patterns Learned', value: sona.patternsLearned ?? 0 },
1650
+ { metric: 'Avg Quality', value: `${((sona.avgQuality ?? 0) * 100).toFixed(1)}%` }
1650
1651
  ]
1651
1652
  });
1652
1653
  }
@@ -1656,17 +1657,18 @@ const intelligenceCommand = {
1656
1657
  // MoE Component
1657
1658
  output.writeln();
1658
1659
  output.writeln(output.bold('🔀 Mixture of Experts (MoE)'));
1659
- if (result.components.moe.enabled) {
1660
+ const moe = result.components?.moe;
1661
+ if (moe?.enabled) {
1660
1662
  output.printTable({
1661
1663
  columns: [
1662
1664
  { key: 'metric', header: 'Metric', width: 25 },
1663
1665
  { key: 'value', header: 'Value', width: 20, align: 'right' }
1664
1666
  ],
1665
1667
  data: [
1666
- { metric: 'Status', value: formatIntelligenceStatus(result.components.moe.status) },
1667
- { metric: 'Active Experts', value: result.components.moe.expertsActive },
1668
- { metric: 'Routing Accuracy', value: `${(result.components.moe.routingAccuracy * 100).toFixed(1)}%` },
1669
- { metric: 'Load Balance', value: `${(result.components.moe.loadBalance * 100).toFixed(1)}%` }
1668
+ { metric: 'Status', value: formatIntelligenceStatus(moe.status) },
1669
+ { metric: 'Active Experts', value: moe.expertsActive ?? 0 },
1670
+ { metric: 'Routing Accuracy', value: `${((moe.routingAccuracy ?? 0) * 100).toFixed(1)}%` },
1671
+ { metric: 'Load Balance', value: `${((moe.loadBalance ?? 0) * 100).toFixed(1)}%` }
1670
1672
  ]
1671
1673
  });
1672
1674
  }
@@ -1676,18 +1678,19 @@ const intelligenceCommand = {
1676
1678
  // HNSW Component
1677
1679
  output.writeln();
1678
1680
  output.writeln(output.bold('🔍 HNSW (150x Faster Search)'));
1679
- if (result.components.hnsw.enabled) {
1681
+ const hnsw = result.components?.hnsw;
1682
+ if (hnsw?.enabled) {
1680
1683
  output.printTable({
1681
1684
  columns: [
1682
1685
  { key: 'metric', header: 'Metric', width: 25 },
1683
1686
  { key: 'value', header: 'Value', width: 20, align: 'right' }
1684
1687
  ],
1685
1688
  data: [
1686
- { metric: 'Status', value: formatIntelligenceStatus(result.components.hnsw.status) },
1687
- { metric: 'Index Size', value: result.components.hnsw.indexSize.toLocaleString() },
1688
- { metric: 'Search Speedup', value: output.success(result.components.hnsw.searchSpeedup) },
1689
- { metric: 'Memory Usage', value: result.components.hnsw.memoryUsage },
1690
- { metric: 'Dimension', value: result.components.hnsw.dimension }
1689
+ { metric: 'Status', value: formatIntelligenceStatus(hnsw.status) },
1690
+ { metric: 'Index Size', value: (hnsw.indexSize ?? 0).toLocaleString() },
1691
+ { metric: 'Search Speedup', value: output.success(hnsw.searchSpeedup ?? 'N/A') },
1692
+ { metric: 'Memory Usage', value: hnsw.memoryUsage ?? 'N/A' },
1693
+ { metric: 'Dimension', value: hnsw.dimension ?? 384 }
1691
1694
  ]
1692
1695
  });
1693
1696
  }
@@ -1697,18 +1700,24 @@ const intelligenceCommand = {
1697
1700
  // Embeddings
1698
1701
  output.writeln();
1699
1702
  output.writeln(output.bold('📦 Embeddings (ONNX)'));
1700
- output.printTable({
1701
- columns: [
1702
- { key: 'metric', header: 'Metric', width: 25 },
1703
- { key: 'value', header: 'Value', width: 20, align: 'right' }
1704
- ],
1705
- data: [
1706
- { metric: 'Provider', value: result.components.embeddings.provider },
1707
- { metric: 'Model', value: result.components.embeddings.model },
1708
- { metric: 'Dimension', value: result.components.embeddings.dimension },
1709
- { metric: 'Cache Hit Rate', value: `${(result.components.embeddings.cacheHitRate * 100).toFixed(1)}%` }
1710
- ]
1711
- });
1703
+ const emb = result.components?.embeddings;
1704
+ if (emb) {
1705
+ output.printTable({
1706
+ columns: [
1707
+ { key: 'metric', header: 'Metric', width: 25 },
1708
+ { key: 'value', header: 'Value', width: 20, align: 'right' }
1709
+ ],
1710
+ data: [
1711
+ { metric: 'Provider', value: emb.provider ?? 'N/A' },
1712
+ { metric: 'Model', value: emb.model ?? 'N/A' },
1713
+ { metric: 'Dimension', value: emb.dimension ?? 384 },
1714
+ { metric: 'Cache Hit Rate', value: `${((emb.cacheHitRate ?? 0) * 100).toFixed(1)}%` }
1715
+ ]
1716
+ });
1717
+ }
1718
+ else {
1719
+ output.writeln(output.dim(' Not initialized'));
1720
+ }
1712
1721
  // V3 Performance
1713
1722
  output.writeln();
1714
1723
  output.writeln(output.bold('🚀 V3 Performance Gains'));