oneie 1.2.0 → 1.2.2

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/oneie.js CHANGED
@@ -21,14 +21,16 @@ program
21
21
  .description('šŸ¤ ONE - Personal Collaborative Intelligence')
22
22
  .version('1.1.0');
23
23
 
24
- // Main install command (default)
24
+ // Main install command (default - engineering agents only)
25
25
  program
26
26
  .command('install', { isDefault: true })
27
- .description('Install ONE and create your personal workspace')
27
+ .description('Install ONE and create your personal workspace with engineering team')
28
28
  .option('-a, --auto', 'Skip interactive setup', false)
29
29
  .action(async (options) => {
30
30
  try {
31
31
  const installer = new OneInstaller();
32
+ // Force core-only installation (engineering agents only)
33
+ options.coreOnly = true;
32
34
  await installer.install(options);
33
35
  } catch (error) {
34
36
  console.error(chalk.red('āŒ Installation failed:'), error.message);
@@ -36,6 +38,23 @@ program
36
38
  }
37
39
  });
38
40
 
41
+ // Secret marketing command
42
+ program
43
+ .command('marketing')
44
+ .description('Install marketing team agents')
45
+ .option('-a, --auto', 'Skip interactive setup', false)
46
+ .action(async (options) => {
47
+ try {
48
+ const installer = new OneInstaller();
49
+ // Install all agents including marketing
50
+ options.includeMarketing = true;
51
+ await installer.install(options);
52
+ } catch (error) {
53
+ console.error(chalk.red('āŒ Marketing installation failed:'), error.message);
54
+ process.exit(1);
55
+ }
56
+ });
57
+
39
58
  // Generate content from me.md
40
59
  program
41
60
  .command('generate')
@@ -294,59 +313,129 @@ program
294
313
  }
295
314
  });
296
315
 
297
- // Show personal agents
316
+ // Agent management commands
298
317
  program
299
318
  .command('agents')
300
- .description('View your personalized AI agents')
301
- .action(async () => {
319
+ .description('Agent management and installation')
320
+ .argument('[command]', 'Agent command (install, update, uninstall, status)')
321
+ .option('--backup', 'Create backup before update/uninstall')
322
+ .action(async (command, options) => {
302
323
  try {
303
324
  const installer = new OneInstaller();
325
+ const { AgentInstaller } = await import('../one/tools/agent-installer.js');
326
+ const agentInstaller = new AgentInstaller();
304
327
 
305
- if (!await installer.isInstalled()) {
306
- console.log(chalk.red('āŒ ONE is not installed here.'));
307
- console.log(chalk.gray('Run: npx oneie'));
308
- return;
309
- }
310
-
311
- console.log(chalk.cyan.bold('\\nšŸ¤– Your Personal AI Agents\\n'));
312
-
313
- const agentsDir = path.join(process.cwd(), '.one', 'agents');
314
- if (await fs.pathExists(agentsDir)) {
315
- const agentFiles = await fs.readdir(agentsDir);
316
- const yamlFiles = agentFiles.filter(file => file.endsWith('.yaml'));
328
+ if (!command || command === 'status') {
329
+ // Show agent status
330
+ console.log(chalk.cyan.bold('\\nšŸ¤– Agent Installation Status\\n'));
331
+
332
+ const status = await agentInstaller.getStatus();
333
+
334
+ if (!status.installed) {
335
+ console.log(chalk.yellow('āš ļø Claude Code agents not installed'));
336
+ console.log(chalk.gray('Run: npx oneie agents install'));
337
+ return;
338
+ }
339
+
340
+ console.log(chalk.blue('šŸ“Š Agent Summary:'));
341
+ console.log(` šŸ†“ Free Agents: ${status.agents.free}`);
342
+ console.log(` šŸ’Ž Premium Agents: ${status.agents.premium}`);
343
+ console.log(` šŸ“ Total Agents: ${status.agents.total}`);
344
+ console.log(` āš™ļø Command Files: ${status.commands}`);
345
+
346
+ if (status.license) {
347
+ console.log(`\\nšŸ“„ License Status: ${status.license.status}`);
348
+ if (status.license.licenseType) {
349
+ console.log(` License Type: ${status.license.licenseType}`);
350
+ console.log(` Expires: ${status.license.expiresAt ? new Date(status.license.expiresAt).toLocaleDateString() : 'N/A'}`);
351
+ }
352
+ }
353
+
354
+ console.log(chalk.cyan('\\nšŸ’¬ Try your agents:'));
355
+ console.log(' one:engineering-director "Help me with system design"');
356
+ console.log(' one:content-team-manager "Create a content strategy"');
357
+ if (status.license && status.license.status === 'active') {
358
+ console.log(' one:marketing-director "Develop a marketing campaign"');
359
+ }
360
+
361
+ } else if (command === 'install') {
362
+ console.log(chalk.cyan.bold('\\nšŸ“¦ Installing Claude Code Agents\\n'));
363
+ await agentInstaller.install(options);
364
+
365
+ } else if (command === 'update') {
366
+ console.log(chalk.cyan.bold('\\nšŸ”„ Updating Claude Code Agents\\n'));
367
+ await agentInstaller.update(options);
317
368
 
318
- if (yamlFiles.length === 0) {
319
- console.log(chalk.yellow('No agents found. Run: npx oneie generate'));
369
+ } else if (command === 'uninstall') {
370
+ console.log(chalk.cyan.bold('\\nšŸ—‘ļø Uninstalling Claude Code Agents\\n'));
371
+
372
+ const { confirm } = await import('inquirer').then(m => m.default);
373
+ const { proceed } = await confirm.prompt([{
374
+ type: 'confirm',
375
+ name: 'proceed',
376
+ message: 'Are you sure you want to uninstall all agents?',
377
+ default: false
378
+ }]);
379
+
380
+ if (proceed) {
381
+ await agentInstaller.uninstall(options);
382
+ } else {
383
+ console.log(chalk.gray('Uninstall cancelled'));
384
+ }
385
+
386
+ } else if (command === 'list') {
387
+ // Show personal agents (legacy behavior)
388
+ if (!await installer.isInstalled()) {
389
+ console.log(chalk.red('āŒ ONE is not installed here.'));
390
+ console.log(chalk.gray('Run: npx oneie'));
320
391
  return;
321
392
  }
393
+
394
+ console.log(chalk.cyan.bold('\\nšŸ¤– Your Personal AI Agents\\n'));
322
395
 
323
- for (const file of yamlFiles) {
324
- const agentPath = path.join(agentsDir, file);
325
- const content = await fs.readFile(agentPath, 'utf8');
326
- const frontMatter = content.match(/^---\\n([\\s\\S]*?)\\n---/);
396
+ const agentsDir = path.join(process.cwd(), '.one', 'agents');
397
+ if (await fs.pathExists(agentsDir)) {
398
+ const agentFiles = await fs.readdir(agentsDir);
399
+ const yamlFiles = agentFiles.filter(file => file.endsWith('.yaml'));
327
400
 
328
- if (frontMatter) {
329
- try {
330
- const yaml = await import('js-yaml');
331
- const config = yaml.default.load(frontMatter[1]);
332
-
333
- console.log(chalk.blue(`šŸ¤– ${config.name}`));
334
- console.log(chalk.gray(` ${config.description.split('\\n')[0]}`));
335
- if (config.expertise) {
336
- console.log(chalk.gray(` Expertise: ${JSON.parse(config.expertise).join(', ')}`));
401
+ if (yamlFiles.length === 0) {
402
+ console.log(chalk.yellow('No personal agents found. Run: npx oneie generate'));
403
+ return;
404
+ }
405
+
406
+ for (const file of yamlFiles) {
407
+ const agentPath = path.join(agentsDir, file);
408
+ const content = await fs.readFile(agentPath, 'utf8');
409
+ const frontMatter = content.match(/^---\\n([\\s\\S]*?)\\n---/);
410
+
411
+ if (frontMatter) {
412
+ try {
413
+ const yaml = await import('js-yaml');
414
+ const config = yaml.default.load(frontMatter[1]);
415
+
416
+ console.log(chalk.blue(`šŸ¤– ${config.name}`));
417
+ console.log(chalk.gray(` ${config.description.split('\\n')[0]}`));
418
+ if (config.expertise) {
419
+ console.log(chalk.gray(` Expertise: ${JSON.parse(config.expertise).join(', ')}`));
420
+ }
421
+ console.log('');
422
+ } catch (e) {
423
+ console.log(chalk.gray(`šŸ¤– ${file.replace('.yaml', '')}`));
337
424
  }
338
- console.log('');
339
- } catch (e) {
340
- console.log(chalk.gray(`šŸ¤– ${file.replace('.yaml', '')}`));
341
425
  }
342
426
  }
427
+ } else {
428
+ console.log(chalk.yellow('No agents directory found. Run: npx oneie generate'));
343
429
  }
430
+
344
431
  } else {
345
- console.log(chalk.yellow('No agents directory found. Run: npx oneie generate'));
432
+ console.log(chalk.red(`āŒ Unknown agent command: ${command}`));
433
+ console.log(chalk.gray('Available: install, update, uninstall, status, list'));
346
434
  }
347
435
 
348
436
  } catch (error) {
349
- console.error(chalk.red('āŒ Failed to show agents:'), error.message);
437
+ console.error(chalk.red('āŒ Agent command failed:'), error.message);
438
+ process.exit(1);
350
439
  }
351
440
  });
352
441
 
@@ -358,7 +447,8 @@ program
358
447
  console.log(chalk.cyan.bold('\\nšŸ¤ ONE - Personal Collaborative Intelligence\\n'));
359
448
 
360
449
  console.log(chalk.blue('šŸš€ Getting Started:'));
361
- console.log(' npx oneie # Install and setup your personal workspace');
450
+ console.log(' npx oneie # Install engineering team workspace');
451
+ console.log(' npx oneie marketing # Add marketing team agents');
362
452
  console.log(' npx oneie update-me # Update your me.md profile');
363
453
  console.log(' npx oneie generate # Generate content from your profile');
364
454
  console.log('');
@@ -370,7 +460,9 @@ program
370
460
  console.log('');
371
461
 
372
462
  console.log(chalk.blue('šŸ¤– Your Personalized Workspace:'));
373
- console.log(' npx oneie agents # View your AI agents');
463
+ console.log(' npx oneie agents # Agent management and status');
464
+ console.log(' npx oneie agents install # Install Claude Code agents');
465
+ console.log(' npx oneie agents list # View your personal agents');
374
466
  console.log(' npx oneie mission list # See your missions');
375
467
  console.log(' npx oneie story list # See your stories');
376
468
  console.log(' npx oneie task list # See your tasks');
@@ -386,10 +478,12 @@ program
386
478
  console.log(chalk.gray('Your workspace adapts as you update me.md - try it!'));
387
479
  });
388
480
 
389
- // Handle no command (default to install)
481
+ // Handle no command (default to install with core-only)
390
482
  program.action(async (options) => {
391
483
  try {
392
484
  const installer = new OneInstaller();
485
+ // Default to engineering agents only
486
+ options.coreOnly = true;
393
487
  await installer.install(options);
394
488
  } catch (error) {
395
489
  console.error(chalk.red('āŒ Installation failed:'), error.message);