Replace the linear 12-stage wizard interrogation with a menu-driven architecture. Key changes: - Main menu with drill-down sections: Quick Start, Providers, Agent Identity, Skills, Gateway, Advanced, Finish & Apply - Quick Start path: 3 questions (API key, admin email, password) with sensible defaults for everything else. Target: under 90 seconds. - Provider-first flow: LLM API key collection moves to the front of the wizard, with auto-detection of Anthropic vs OpenAI from key prefix - Deterministic intent/naming: user picks an intent category (general, software-dev, devops, research, content, custom) and gets a thematic agent name proposal (Mosaic, Forge, Sentinel, Atlas, Muse) - Headless backward compat: MOSAIC_ASSUME_YES=1 + env vars still work unchanged, with new MOSAIC_AGENT_NAME and MOSAIC_AGENT_INTENT vars - Version bump: 0.0.26 -> 0.0.27 Closes #438 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
91 lines
2.5 KiB
TypeScript
91 lines
2.5 KiB
TypeScript
import { homedir } from 'node:os';
|
|
import { join } from 'node:path';
|
|
|
|
export const VERSION = '0.0.2';
|
|
|
|
export const DEFAULT_MOSAIC_HOME = join(homedir(), '.config', 'mosaic');
|
|
|
|
export const DEFAULTS = {
|
|
agentName: 'Assistant',
|
|
roleDescription: 'execution partner and visibility engine',
|
|
communicationStyle: 'direct' as const,
|
|
pronouns: 'They/Them',
|
|
timezone: 'UTC',
|
|
background: '(not configured)',
|
|
accessibilitySection: '(No specific accommodations configured. Edit this section to add any.)',
|
|
personalBoundaries: '(Edit this section to add any personal boundaries.)',
|
|
projectsTable: `| Project | Stack | Registry |
|
|
|---------|-------|----------|
|
|
| (none configured) | | |`,
|
|
credentialsLocation: 'none',
|
|
customToolsSection: `## Custom Tools
|
|
|
|
(Add any machine-specific tools, scripts, or workflows here.)`,
|
|
gitProvidersTable: `| Instance | URL | CLI | Purpose |
|
|
|----------|-----|-----|---------|
|
|
| (add your git providers here) | | | |`,
|
|
};
|
|
|
|
/** Preset intent categories with display labels and suggested agent names. */
|
|
export const INTENT_PRESETS: Record<
|
|
string,
|
|
{ label: string; hint: string; suggestedName: string }
|
|
> = {
|
|
general: {
|
|
label: 'General purpose assistant',
|
|
hint: 'Versatile helper for any task',
|
|
suggestedName: 'Mosaic',
|
|
},
|
|
'software-dev': {
|
|
label: 'Software development',
|
|
hint: 'Coding, debugging, architecture',
|
|
suggestedName: 'Forge',
|
|
},
|
|
devops: {
|
|
label: 'DevOps & infrastructure',
|
|
hint: 'CI/CD, containers, monitoring',
|
|
suggestedName: 'Sentinel',
|
|
},
|
|
research: {
|
|
label: 'Research & analysis',
|
|
hint: 'Data analysis, literature review',
|
|
suggestedName: 'Atlas',
|
|
},
|
|
content: {
|
|
label: 'Content & writing',
|
|
hint: 'Documentation, copywriting, editing',
|
|
suggestedName: 'Muse',
|
|
},
|
|
custom: {
|
|
label: 'Custom',
|
|
hint: 'Describe your own use case',
|
|
suggestedName: 'Mosaic',
|
|
},
|
|
};
|
|
|
|
/**
|
|
* Detect LLM provider type from an API key prefix.
|
|
*/
|
|
export function detectProviderType(key: string): 'anthropic' | 'openai' | 'none' {
|
|
if (!key) return 'none';
|
|
if (key.startsWith('sk-ant-')) return 'anthropic';
|
|
if (key.startsWith('sk-')) return 'openai';
|
|
return 'none';
|
|
}
|
|
|
|
export const RECOMMENDED_SKILLS = new Set([
|
|
'brainstorming',
|
|
'code-review-excellence',
|
|
'lint',
|
|
'systematic-debugging',
|
|
'verification-before-completion',
|
|
'writing-plans',
|
|
'executing-plans',
|
|
'architecture-patterns',
|
|
'mosaic-board',
|
|
'mosaic-forge',
|
|
'mosaic-prdy',
|
|
'mosaic-standards',
|
|
'mosaic-macp',
|
|
]);
|