aios-core
Version:
Synkra AIOS: AI-Orchestrated System for Full Stack Development - Core Framework
86 lines (74 loc) ⢠3.29 kB
JavaScript
/**
* Greeting Configuration CLI
*
* Standalone CLI for managing greeting preferences.
* Usage:
* node .aios-core/scripts/greeting-config-cli.js get greeting
* node .aios-core/scripts/greeting-config-cli.js set greeting.preference minimal
*/
const GreetingPreferenceManager = require('./greeting-preference-manager');
const command = process.argv[2];
const subcommand = process.argv[3];
const value = process.argv[4];
(async () => {
try {
const manager = new GreetingPreferenceManager();
switch (command) {
case 'get':
if (subcommand === 'greeting') {
const config = manager.getConfig();
console.log('š Agent Greeting Configuration\n');
console.log(`Preference: ${config.preference || 'auto'} (auto|minimal|named|archetypal)`);
console.log(`Context Detection: ${config.contextDetection !== false ? 'enabled' : 'disabled'}`);
console.log(`Session Detection: ${config.sessionDetection || 'hybrid'}`);
console.log(`Workflow Detection: ${config.workflowDetection || 'hardcoded'}`);
console.log(`Show Archetype: ${config.showArchetype !== false ? 'yes' : 'no'}`);
console.log(`Locale: ${config.locale || 'en-US'}`);
console.log('\nš” Examples:');
console.log(' - "auto": Session-aware greetings (default)');
console.log(' - "minimal": Always minimal greeting');
console.log(' - "named": Always named greeting');
console.log(' - "archetypal": Always archetypal greeting');
} else {
console.error('Usage: node greeting-config-cli.js get greeting');
process.exit(1);
}
break;
case 'set':
if (subcommand === 'greeting.preference' && value) {
const result = manager.setPreference(value);
console.log(`ā
Greeting preference set to: ${result.preference}`);
if (value === 'auto') {
console.log('\nš Using automatic session-aware greetings:');
console.log(' - New session ā Full greeting (archetypal level)');
console.log(' - Existing session ā Quick greeting (named level)');
console.log(' - Workflow session ā Minimal greeting + suggestions');
} else {
console.log(`\nš Using fixed level: ${value} for all sessions`);
}
} else {
console.error('Usage: node greeting-config-cli.js set greeting.preference <auto|minimal|named|archetypal>');
console.error('\nExamples:');
console.error(' node greeting-config-cli.js set greeting.preference auto');
console.error(' node greeting-config-cli.js set greeting.preference minimal');
process.exit(1);
}
break;
default:
console.log(`
Usage:
node greeting-config-cli.js get greeting
node greeting-config-cli.js set greeting.preference <auto|minimal|named|archetypal>
Examples:
node greeting-config-cli.js get greeting
node greeting-config-cli.js set greeting.preference auto
node greeting-config-cli.js set greeting.preference minimal
`);
process.exit(1);
}
} catch (error) {
console.error(`ā Error: ${error.message}`);
process.exit(1);
}
})();