@soulcraft/brainy 1.1.2 → 1.2.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/bin/brainy.js +94 -27
- package/package.json +1 -1
package/bin/brainy.js
CHANGED
|
@@ -19,6 +19,8 @@ import { readFileSync } from 'fs'
|
|
|
19
19
|
import { dirname, join } from 'path'
|
|
20
20
|
import { fileURLToPath } from 'url'
|
|
21
21
|
import { createInterface } from 'readline'
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import Table from 'cli-table3'
|
|
22
24
|
|
|
23
25
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
24
26
|
const packageJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'))
|
|
@@ -33,13 +35,20 @@ const getBrainy = async () => {
|
|
|
33
35
|
return brainy
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
// Beautiful colors
|
|
38
|
+
// Beautiful colors matching brainy.png logo
|
|
37
39
|
const colors = {
|
|
38
|
-
primary: chalk.hex('#3A5F4A'),
|
|
39
|
-
success: chalk.hex('#2D4A3A'),
|
|
40
|
-
info: chalk.hex('#4A6B5A'),
|
|
41
|
-
warning: chalk.hex('#D67441'),
|
|
42
|
-
error: chalk.hex('#B85C35')
|
|
40
|
+
primary: chalk.hex('#3A5F4A'), // Teal container (from logo)
|
|
41
|
+
success: chalk.hex('#2D4A3A'), // Deep teal frame (from logo)
|
|
42
|
+
info: chalk.hex('#4A6B5A'), // Medium teal
|
|
43
|
+
warning: chalk.hex('#D67441'), // Orange (from logo)
|
|
44
|
+
error: chalk.hex('#B85C35'), // Deep orange
|
|
45
|
+
brain: chalk.hex('#D67441'), // Brain orange (from logo)
|
|
46
|
+
cream: chalk.hex('#F5E6A3'), // Cream background (from logo)
|
|
47
|
+
dim: chalk.dim,
|
|
48
|
+
blue: chalk.blue,
|
|
49
|
+
green: chalk.green,
|
|
50
|
+
yellow: chalk.yellow,
|
|
51
|
+
cyan: chalk.cyan
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
// Helper functions
|
|
@@ -47,6 +56,11 @@ const exitProcess = (code = 0) => {
|
|
|
47
56
|
setTimeout(() => process.exit(code), 100)
|
|
48
57
|
}
|
|
49
58
|
|
|
59
|
+
// Initialize Brainy instance
|
|
60
|
+
const initBrainy = async () => {
|
|
61
|
+
return new BrainyData()
|
|
62
|
+
}
|
|
63
|
+
|
|
50
64
|
const wrapAction = (fn) => {
|
|
51
65
|
return async (...args) => {
|
|
52
66
|
try {
|
|
@@ -984,28 +998,81 @@ program
|
|
|
984
998
|
|
|
985
999
|
const actions = {
|
|
986
1000
|
list: async () => {
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1001
|
+
try {
|
|
1002
|
+
// Use unified professional catalog
|
|
1003
|
+
const REGISTRY_URL = 'https://registry.soulcraft.com/api/registry/augmentations'
|
|
1004
|
+
const response = await fetch(REGISTRY_URL)
|
|
1005
|
+
|
|
1006
|
+
if (response && response.ok) {
|
|
1007
|
+
console.log(colors.brain('🏢 SOULCRAFT PROFESSIONAL SUITE\n'))
|
|
1008
|
+
|
|
1009
|
+
const data = await response.json()
|
|
1010
|
+
const { augmentations = [] } = data
|
|
1011
|
+
|
|
1012
|
+
const professional = augmentations.filter(a => a.tier === 'professional')
|
|
1013
|
+
const community = augmentations.filter(a => a.tier === 'community')
|
|
1014
|
+
|
|
1015
|
+
// Display professional augmentations
|
|
1016
|
+
if (professional.length > 0) {
|
|
1017
|
+
console.log(colors.primary('🚀 PROFESSIONAL AUGMENTATIONS'))
|
|
1018
|
+
professional.forEach(aug => {
|
|
1019
|
+
const pricing = aug.pricing === 'FREE' ? colors.success(aug.pricing) : colors.yellow(aug.pricing)
|
|
1020
|
+
const badges = aug.verified ? colors.blue('✓') : ''
|
|
1021
|
+
console.log(` ${aug.name.padEnd(20)} ${pricing.padEnd(15)} ${badges}`)
|
|
1022
|
+
console.log(` ${colors.dim(aug.description)}`)
|
|
1023
|
+
if (aug.businessValue) {
|
|
1024
|
+
console.log(` ${colors.cyan('→ ' + aug.businessValue)}`)
|
|
1025
|
+
}
|
|
1026
|
+
console.log('')
|
|
1027
|
+
})
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
// Display local augmentations
|
|
1031
|
+
const localAugmentations = brainy.listAugmentations()
|
|
1032
|
+
if (localAugmentations.length > 0) {
|
|
1033
|
+
console.log(colors.primary('📦 LOCAL AUGMENTATIONS'))
|
|
1034
|
+
localAugmentations.forEach(aug => {
|
|
1035
|
+
const status = aug.enabled ? colors.success('✅ Enabled') : colors.dim('⚪ Disabled')
|
|
1036
|
+
console.log(` ${aug.name.padEnd(20)} ${status}`)
|
|
1037
|
+
console.log(` ${colors.dim(aug.description || 'Custom augmentation')}`)
|
|
1038
|
+
console.log('')
|
|
1039
|
+
})
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
console.log(colors.cyan('🎯 GET STARTED'))
|
|
1043
|
+
console.log(' brainy install <name> Install augmentation')
|
|
1044
|
+
console.log(' brainy cloud Access Brain Cloud features')
|
|
1045
|
+
console.log(` ${colors.blue('Learn more:')} https://soulcraft.com/augmentations`)
|
|
1046
|
+
|
|
1047
|
+
} else {
|
|
1048
|
+
throw new Error('Registry unavailable')
|
|
1049
|
+
}
|
|
1050
|
+
} catch (error) {
|
|
1051
|
+
// Fallback to local augmentations only
|
|
1052
|
+
console.log(colors.warning('⚠ Professional catalog unavailable, showing local augmentations'))
|
|
1053
|
+
const augmentations = brainy.listAugmentations()
|
|
1054
|
+
if (augmentations.length === 0) {
|
|
1055
|
+
console.log(colors.warning('No augmentations registered'))
|
|
1056
|
+
return
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
const table = new Table({
|
|
1060
|
+
head: [colors.brain('Name'), colors.brain('Type'), colors.brain('Status'), colors.brain('Description')],
|
|
1061
|
+
style: { head: [], border: [] }
|
|
1062
|
+
})
|
|
1063
|
+
|
|
1064
|
+
augmentations.forEach(aug => {
|
|
1065
|
+
table.push([
|
|
1066
|
+
colors.primary(aug.name),
|
|
1067
|
+
colors.info(aug.type),
|
|
1068
|
+
aug.enabled ? colors.success('✅ Enabled') : colors.dim('⚪ Disabled'),
|
|
1069
|
+
colors.dim(aug.description || '')
|
|
1070
|
+
])
|
|
1071
|
+
})
|
|
1072
|
+
|
|
1073
|
+
console.log(table.toString())
|
|
1074
|
+
console.log(colors.info(`\nTotal: ${augmentations.length} augmentations`))
|
|
991
1075
|
}
|
|
992
|
-
|
|
993
|
-
const table = new Table({
|
|
994
|
-
head: [colors.brain('Name'), colors.brain('Type'), colors.brain('Status'), colors.brain('Description')],
|
|
995
|
-
style: { head: [], border: [] }
|
|
996
|
-
})
|
|
997
|
-
|
|
998
|
-
augmentations.forEach(aug => {
|
|
999
|
-
table.push([
|
|
1000
|
-
colors.primary(aug.name),
|
|
1001
|
-
colors.info(aug.type),
|
|
1002
|
-
aug.enabled ? colors.success('✅ Enabled') : colors.dim('⚪ Disabled'),
|
|
1003
|
-
colors.dim(aug.description || '')
|
|
1004
|
-
])
|
|
1005
|
-
})
|
|
1006
|
-
|
|
1007
|
-
console.log(table.toString())
|
|
1008
|
-
console.log(colors.info(`\nTotal: ${augmentations.length} augmentations`))
|
|
1009
1076
|
},
|
|
1010
1077
|
|
|
1011
1078
|
enable: async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Multi-Dimensional AI Database - Vector similarity, graph relationships, metadata facets with HNSW indexing and OPFS storage",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|