@zweer/dev 1.2.0 → 2.0.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.
Files changed (125) hide show
  1. package/README.md +68 -467
  2. package/configs/_biome.json +38 -0
  3. package/configs/commitlint.config.ts +1 -0
  4. package/configs/editorconfig +16 -0
  5. package/configs/lefthook.yml +38 -0
  6. package/configs/lockfile-lintrc.json +6 -0
  7. package/configs/npmpackagejsonlintrc.json +34 -0
  8. package/configs/tsconfig.json +9 -0
  9. package/configs/tsdown.config.ts +8 -0
  10. package/configs/vitest.config.ts +12 -0
  11. package/dist/index.d.mts +1 -0
  12. package/dist/index.mjs +247 -0
  13. package/dist/index.mjs.map +1 -0
  14. package/kiro/agents/zweer-setup.json +38 -0
  15. package/kiro/prompts/zweer-setup.md +55 -0
  16. package/kiro/skills/agent-template/SKILL.md +22 -0
  17. package/kiro/skills/agent-template/references/base.json +38 -0
  18. package/kiro/skills/agent-template/references/example-monorepo-library.json +60 -0
  19. package/kiro/skills/agent-template/references/example-webapp-vercel.json +54 -0
  20. package/kiro/skills/prompt-template/SKILL.md +23 -0
  21. package/kiro/skills/prompt-template/references/example-library.md +56 -0
  22. package/kiro/skills/prompt-template/references/example-webapp.md +57 -0
  23. package/kiro/skills/skill-templates/SKILL.md +23 -0
  24. package/kiro/skills/skill-templates/references/new-package.md +72 -0
  25. package/kiro/skills/steering-templates/SKILL.md +31 -0
  26. package/kiro/skills/steering-templates/references/build-tooling.md +62 -0
  27. package/kiro/skills/steering-templates/references/code-style.md +83 -0
  28. package/kiro/skills/steering-templates/references/commit-conventions.md +58 -0
  29. package/kiro/skills/steering-templates/references/interaction.md +41 -0
  30. package/kiro/skills/steering-templates/references/testing.md +61 -0
  31. package/kiro/steering/build-tooling.md +62 -0
  32. package/kiro/steering/code-style.md +83 -0
  33. package/kiro/steering/commit-conventions.md +58 -0
  34. package/kiro/steering/interaction.md +41 -0
  35. package/kiro/steering/testing.md +61 -0
  36. package/package.json +42 -57
  37. package/templates/monorepo/CHANGELOG.md +5 -0
  38. package/templates/monorepo/README.md +22 -0
  39. package/templates/monorepo/package.json +30 -0
  40. package/templates/monorepo/packages/core/CHANGELOG.md +5 -0
  41. package/templates/monorepo/packages/core/README.md +21 -0
  42. package/templates/monorepo/packages/core/package.json +28 -0
  43. package/templates/monorepo/packages/core/src/index.ts +3 -0
  44. package/templates/monorepo/packages/core/test/index.test.ts +9 -0
  45. package/templates/monorepo/tsdown.config.ts +12 -0
  46. package/templates/monorepo/vitest.config.ts +12 -0
  47. package/templates/single/CHANGELOG.md +5 -0
  48. package/templates/single/README.md +30 -0
  49. package/templates/single/package.json +38 -0
  50. package/templates/single/src/index.ts +3 -0
  51. package/templates/single/test/index.test.ts +9 -0
  52. package/templates/single/tsdown.config.ts +11 -0
  53. package/workflows/base/ci.yml +24 -0
  54. package/workflows/base/dependabot-auto-merge.yml +43 -0
  55. package/workflows/base/dependabot-lockfile.yml +34 -0
  56. package/workflows/base/dependabot.yml +39 -0
  57. package/workflows/base/pr.yml +41 -0
  58. package/workflows/base/security.yml +25 -0
  59. package/workflows/docs/docs.yml +47 -0
  60. package/workflows/library/npm.yml +45 -0
  61. package/agents/data/zweer_data_engineer.md +0 -436
  62. package/agents/design/zweer_ui_designer.md +0 -171
  63. package/agents/design/zweer_ui_ux.md +0 -124
  64. package/agents/infrastructure/zweer_infra_cdk.md +0 -701
  65. package/agents/infrastructure/zweer_infra_devops.md +0 -148
  66. package/agents/infrastructure/zweer_infra_observability.md +0 -610
  67. package/agents/infrastructure/zweer_infra_terraform.md +0 -658
  68. package/agents/mobile/zweer_mobile_android.md +0 -636
  69. package/agents/mobile/zweer_mobile_flutter.md +0 -623
  70. package/agents/mobile/zweer_mobile_ionic.md +0 -550
  71. package/agents/mobile/zweer_mobile_ios.md +0 -504
  72. package/agents/mobile/zweer_mobile_react_native.md +0 -561
  73. package/agents/quality/zweer_qa_documentation.md +0 -202
  74. package/agents/quality/zweer_qa_performance.md +0 -160
  75. package/agents/quality/zweer_qa_security.md +0 -197
  76. package/agents/quality/zweer_qa_testing.md +0 -189
  77. package/agents/services/zweer_svc_api_gateway.md +0 -553
  78. package/agents/services/zweer_svc_containers.md +0 -575
  79. package/agents/services/zweer_svc_lambda.md +0 -373
  80. package/agents/services/zweer_svc_messaging.md +0 -543
  81. package/agents/services/zweer_svc_microservices.md +0 -502
  82. package/agents/web/zweer_web_api_integration.md +0 -500
  83. package/agents/web/zweer_web_backend.md +0 -358
  84. package/agents/web/zweer_web_database.md +0 -357
  85. package/agents/web/zweer_web_frontend.md +0 -375
  86. package/agents/web/zweer_web_reader.md +0 -229
  87. package/agents/write/zweer_write_content.md +0 -499
  88. package/agents/write/zweer_write_narrative.md +0 -409
  89. package/agents/write/zweer_write_style.md +0 -247
  90. package/agents/write/zweer_write_warmth.md +0 -282
  91. package/cli/commands/bootstrap.d.ts +0 -4
  92. package/cli/commands/bootstrap.js +0 -377
  93. package/cli/commands/cao/agent/create.d.ts +0 -17
  94. package/cli/commands/cao/agent/create.js +0 -89
  95. package/cli/commands/cao/agent/index.d.ts +0 -2
  96. package/cli/commands/cao/agent/index.js +0 -8
  97. package/cli/commands/cao/agent/list.d.ts +0 -3
  98. package/cli/commands/cao/agent/list.js +0 -29
  99. package/cli/commands/cao/agent/remove.d.ts +0 -5
  100. package/cli/commands/cao/agent/remove.js +0 -39
  101. package/cli/commands/cao/index.d.ts +0 -2
  102. package/cli/commands/cao/index.js +0 -18
  103. package/cli/commands/cao/init.d.ts +0 -15
  104. package/cli/commands/cao/init.js +0 -87
  105. package/cli/commands/cao/install.d.ts +0 -10
  106. package/cli/commands/cao/install.js +0 -59
  107. package/cli/commands/cao/launch.d.ts +0 -3
  108. package/cli/commands/cao/launch.js +0 -21
  109. package/cli/commands/cao/list.d.ts +0 -4
  110. package/cli/commands/cao/list.js +0 -28
  111. package/cli/commands/cao/server.d.ts +0 -3
  112. package/cli/commands/cao/server.js +0 -20
  113. package/cli/commands/cao/sync.d.ts +0 -6
  114. package/cli/commands/cao/sync.js +0 -52
  115. package/cli/commands/setup.d.ts +0 -4
  116. package/cli/commands/setup.js +0 -346
  117. package/cli/index.d.ts +0 -2
  118. package/cli/index.js +0 -13
  119. package/cli/utils/agents.d.ts +0 -8
  120. package/cli/utils/agents.js +0 -55
  121. package/cli/utils/cao.d.ts +0 -9
  122. package/cli/utils/cao.js +0 -40
  123. package/cli/utils/paths.d.ts +0 -5
  124. package/cli/utils/paths.js +0 -11
  125. package/templates/orchestrator.md +0 -190
@@ -1,89 +0,0 @@
1
- import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
- import { basename, join } from 'node:path';
3
- import { Command } from '@commander-js/extra-typings';
4
- import chalk from 'chalk';
5
- import inquirer from 'inquirer';
6
- import { paths } from '../../../utils/paths.js';
7
- export async function createAgent(config) {
8
- // Read template
9
- const templatePath = join(paths.templates, `${config.template}.md`);
10
- let template = await readFile(templatePath, 'utf-8');
11
- // Replace placeholders
12
- template = template
13
- .replace(/\{\{PROJECT_NAME\}\}/g, config.projectName)
14
- .replace(/\{\{PROJECT_PATH\}\}/g, config.projectPath)
15
- .replace(/\{\{TECH_STACK\}\}/g, config.techStack)
16
- .replace(/\{\{PROJECT_STRUCTURE\}\}/g, config.projectStructure);
17
- // Create .cao/agents directory
18
- const caoDir = join(config.projectPath, '.cao', 'agents');
19
- await mkdir(caoDir, { recursive: true });
20
- // Write agent file
21
- const agentPath = join(caoDir, `${config.name}.md`);
22
- await writeFile(agentPath, template);
23
- return { agentPath };
24
- }
25
- export function getDefaultConfig(cwd, name, template) {
26
- const projectName = basename(cwd);
27
- return {
28
- name: name || `${projectName}_orchestrator`,
29
- projectName,
30
- projectPath: cwd,
31
- techStack: 'Next.js, TypeScript, PostgreSQL',
32
- projectStructure: 'app/, components/, lib/',
33
- template: template || 'orchestrator',
34
- };
35
- }
36
- export const createCommand = new Command()
37
- .name('create')
38
- .description('Create a new agent in current project')
39
- .argument('[name]', 'Agent name')
40
- .option('-t, --template <template>', 'Template to use (orchestrator, specialist)', 'orchestrator')
41
- .option('-y, --yes', 'Skip prompts and use defaults')
42
- .action(async (name, options) => {
43
- const cwd = process.cwd();
44
- let config = getDefaultConfig(cwd, name, options.template);
45
- if (!options.yes) {
46
- const answers = await inquirer.prompt([
47
- {
48
- type: 'input',
49
- name: 'name',
50
- message: 'Agent name:',
51
- default: config.name,
52
- },
53
- {
54
- type: 'input',
55
- name: 'projectName',
56
- message: 'Project name:',
57
- default: config.projectName,
58
- },
59
- {
60
- type: 'input',
61
- name: 'techStack',
62
- message: 'Tech stack:',
63
- default: config.techStack,
64
- },
65
- {
66
- type: 'input',
67
- name: 'projectStructure',
68
- message: 'Main folders:',
69
- default: config.projectStructure,
70
- },
71
- ]);
72
- config = { ...config, ...answers };
73
- }
74
- console.log(chalk.cyan(`\nšŸŽÆ Creating agent: ${config.name}\n`));
75
- try {
76
- const { agentPath } = await createAgent(config);
77
- console.log(chalk.green(`āœ” Agent created: ${agentPath}\n`));
78
- console.log(chalk.dim('Next steps:'));
79
- console.log(chalk.dim(' 1. Edit the agent to add project-specific details'));
80
- console.log(chalk.dim(' 2. Run: dev cao sync'));
81
- console.log(chalk.dim(` 3. Run: dev cao launch ${config.name}`));
82
- console.log();
83
- }
84
- catch (error) {
85
- console.error(chalk.red('āœ– Failed to create agent'));
86
- console.error(error);
87
- process.exit(1);
88
- }
89
- });
@@ -1,2 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare const agentCommand: Command<[], {}>;
@@ -1,8 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import { createCommand } from './create.js';
3
- import { listCommand } from './list.js';
4
- import { removeCommand } from './remove.js';
5
- export const agentCommand = new Command().name('agent').description('Manage local project agents');
6
- agentCommand.addCommand(createCommand);
7
- agentCommand.addCommand(listCommand);
8
- agentCommand.addCommand(removeCommand);
@@ -1,3 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare function getLocalAgents(): Promise<string[]>;
3
- export declare const listCommand: Command<[], {}>;
@@ -1,29 +0,0 @@
1
- import { readdir } from 'node:fs/promises';
2
- import { Command } from '@commander-js/extra-typings';
3
- import chalk from 'chalk';
4
- export async function getLocalAgents() {
5
- const caoAgentsDir = '.cao/agents';
6
- try {
7
- const files = await readdir(caoAgentsDir);
8
- return files.filter((f) => f.endsWith('.md')).map((f) => f.replace('.md', ''));
9
- }
10
- catch {
11
- return [];
12
- }
13
- }
14
- export const listCommand = new Command()
15
- .name('list')
16
- .description('List all local agents in .cao/agents/')
17
- .action(async () => {
18
- const agents = await getLocalAgents();
19
- if (agents.length === 0) {
20
- console.log(chalk.yellow('No local agents found in .cao/agents/'));
21
- console.log(chalk.dim('\nCreate one with: dev cao agent create <name>'));
22
- return;
23
- }
24
- console.log(chalk.bold(`\nLocal Agents (${agents.length}):\n`));
25
- for (const agent of agents) {
26
- console.log(chalk.cyan(` • ${agent}`));
27
- }
28
- console.log();
29
- });
@@ -1,5 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare function removeAgent(name: string): Promise<void>;
3
- export declare const removeCommand: Command<[string], {
4
- yes?: true | undefined;
5
- }>;
@@ -1,39 +0,0 @@
1
- import { unlink } from 'node:fs/promises';
2
- import { join } from 'node:path';
3
- import { Command } from '@commander-js/extra-typings';
4
- import chalk from 'chalk';
5
- import inquirer from 'inquirer';
6
- export async function removeAgent(name) {
7
- const agentPath = join('.cao/agents', `${name}.md`);
8
- await unlink(agentPath);
9
- }
10
- export const removeCommand = new Command()
11
- .name('remove')
12
- .description('Remove a local agent')
13
- .argument('<name>', 'Agent name to remove')
14
- .option('-y, --yes', 'Skip confirmation')
15
- .action(async (name, options) => {
16
- if (!options.yes) {
17
- const { confirm } = await inquirer.prompt([
18
- {
19
- type: 'confirm',
20
- name: 'confirm',
21
- message: `Are you sure you want to remove ${name}?`,
22
- default: false,
23
- },
24
- ]);
25
- if (!confirm) {
26
- console.log(chalk.yellow('Cancelled'));
27
- return;
28
- }
29
- }
30
- try {
31
- await removeAgent(name);
32
- console.log(chalk.green(`āœ” Agent ${name} removed`));
33
- }
34
- catch (error) {
35
- console.error(chalk.red(`āœ– Failed to remove agent ${name}`));
36
- console.error(error);
37
- process.exit(1);
38
- }
39
- });
@@ -1,2 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare const caoCommand: Command<[], {}>;
@@ -1,18 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import { agentCommand } from './agent/index.js';
3
- import { initCommand } from './init.js';
4
- import { installCommand } from './install.js';
5
- import { launchCommand } from './launch.js';
6
- import { listCommand } from './list.js';
7
- import { serverCommand } from './server.js';
8
- import { syncCommand } from './sync.js';
9
- export const caoCommand = new Command()
10
- .name('cao')
11
- .description('Manage CAO (CLI Agent Orchestrator) and agents')
12
- .addCommand(initCommand)
13
- .addCommand(agentCommand)
14
- .addCommand(installCommand)
15
- .addCommand(syncCommand)
16
- .addCommand(serverCommand)
17
- .addCommand(launchCommand)
18
- .addCommand(listCommand);
@@ -1,15 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export interface OrchestratorConfig {
3
- name: string;
4
- projectName: string;
5
- projectPath: string;
6
- techStack: string;
7
- projectStructure: string;
8
- }
9
- export declare function createOrchestrator(config: OrchestratorConfig): Promise<{
10
- orchestratorPath: string;
11
- }>;
12
- export declare function getDefaultConfig(cwd: string, name?: string): OrchestratorConfig;
13
- export declare const initCommand: Command<[string | undefined], {
14
- yes?: true | undefined;
15
- }>;
@@ -1,87 +0,0 @@
1
- import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
- import { basename, join } from 'node:path';
3
- import { Command } from '@commander-js/extra-typings';
4
- import chalk from 'chalk';
5
- import inquirer from 'inquirer';
6
- import { paths } from '../../utils/paths.js';
7
- export async function createOrchestrator(config) {
8
- // Read template
9
- const templatePath = join(paths.templates, 'orchestrator.md');
10
- let template = await readFile(templatePath, 'utf-8');
11
- // Replace placeholders
12
- template = template
13
- .replace(/\{\{PROJECT_NAME\}\}/g, config.projectName)
14
- .replace(/\{\{PROJECT_PATH\}\}/g, config.projectPath)
15
- .replace(/\{\{TECH_STACK\}\}/g, config.techStack)
16
- .replace(/\{\{PROJECT_STRUCTURE\}\}/g, config.projectStructure);
17
- // Create .cao/agents directory
18
- const caoDir = join(config.projectPath, '.cao', 'agents');
19
- await mkdir(caoDir, { recursive: true });
20
- // Write orchestrator file
21
- const orchestratorPath = join(caoDir, `${config.name}.md`);
22
- await writeFile(orchestratorPath, template);
23
- return { orchestratorPath };
24
- }
25
- export function getDefaultConfig(cwd, name) {
26
- const projectName = basename(cwd);
27
- return {
28
- name: name || `${projectName}_orchestrator`,
29
- projectName,
30
- projectPath: cwd,
31
- techStack: 'Next.js, TypeScript, PostgreSQL',
32
- projectStructure: 'app/, components/, lib/',
33
- };
34
- }
35
- export const initCommand = new Command()
36
- .name('init')
37
- .description('Create orchestrator in current project')
38
- .argument('[name]', 'Orchestrator name')
39
- .option('-y, --yes', 'Skip prompts and use defaults')
40
- .action(async (name, options) => {
41
- const cwd = process.cwd();
42
- let config = getDefaultConfig(cwd, name);
43
- if (!options.yes) {
44
- const answers = await inquirer.prompt([
45
- {
46
- type: 'input',
47
- name: 'name',
48
- message: 'Orchestrator name:',
49
- default: config.name,
50
- },
51
- {
52
- type: 'input',
53
- name: 'projectName',
54
- message: 'Project name:',
55
- default: config.projectName,
56
- },
57
- {
58
- type: 'input',
59
- name: 'techStack',
60
- message: 'Tech stack:',
61
- default: config.techStack,
62
- },
63
- {
64
- type: 'input',
65
- name: 'projectStructure',
66
- message: 'Main folders:',
67
- default: config.projectStructure,
68
- },
69
- ]);
70
- config = { ...config, ...answers };
71
- }
72
- console.log(chalk.cyan(`\nšŸŽÆ Creating orchestrator: ${config.name}\n`));
73
- try {
74
- const { orchestratorPath } = await createOrchestrator(config);
75
- console.log(chalk.green(`āœ… Orchestrator created: ${orchestratorPath}\n`));
76
- console.log(chalk.gray('Next steps:'));
77
- console.log(chalk.gray(' 1. Edit the orchestrator to add project-specific details'));
78
- console.log(chalk.gray(' 2. Run: dev install'));
79
- console.log(chalk.gray(` 3. Run: cao launch --agents ${config.name}`));
80
- console.log();
81
- }
82
- catch (error) {
83
- console.error(chalk.red('Failed to create orchestrator'));
84
- console.error(error);
85
- process.exit(1);
86
- }
87
- });
@@ -1,10 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare function executeInstallCao(): Promise<void>;
3
- export declare function executeInstallAgents(): Promise<{
4
- installed: number;
5
- failed: number;
6
- }>;
7
- export declare const installCommand: Command<[], {
8
- caoOnly?: true | undefined;
9
- agentsOnly?: true | undefined;
10
- }>;
@@ -1,59 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import chalk from 'chalk';
3
- import ora from 'ora';
4
- import { getAllAgents } from '../../utils/agents.js';
5
- import { installAgent, installCao } from '../../utils/cao.js';
6
- export async function executeInstallCao() {
7
- await installCao();
8
- }
9
- export async function executeInstallAgents() {
10
- const agents = await getAllAgents();
11
- let installed = 0;
12
- let failed = 0;
13
- for (const agent of agents) {
14
- try {
15
- await installAgent(agent.path);
16
- installed++;
17
- }
18
- catch {
19
- failed++;
20
- }
21
- }
22
- return { installed, failed };
23
- }
24
- export const installCommand = new Command()
25
- .name('install')
26
- .description('Install CAO and all common agents')
27
- .option('--cao-only', 'Install only CAO')
28
- .option('--agents-only', 'Install only agents')
29
- .action(async (options) => {
30
- const installCaoOnly = options.caoOnly;
31
- const installAgentsOnly = options.agentsOnly;
32
- // Install CAO
33
- if (!installAgentsOnly) {
34
- const spinner = ora('Installing CAO prerequisites...').start();
35
- spinner.stop();
36
- try {
37
- await executeInstallCao();
38
- console.log(chalk.green('āœ” CAO installed successfully'));
39
- }
40
- catch (error) {
41
- console.error(chalk.red('āœ– Failed to install CAO'));
42
- console.error(error);
43
- process.exit(1);
44
- }
45
- }
46
- // Install agents
47
- if (!installCaoOnly) {
48
- const agents = await getAllAgents();
49
- console.log(chalk.cyan(`Installing ${agents.length} agents...`));
50
- const { installed, failed } = await executeInstallAgents();
51
- if (failed === 0) {
52
- console.log(chalk.green(`āœ” All ${installed} agents installed successfully`));
53
- }
54
- else {
55
- console.log(chalk.yellow(`⚠ Installed ${installed} agents, ${failed} failed`));
56
- }
57
- }
58
- console.log(chalk.bold.green('\nāœ… Installation complete!\n'));
59
- });
@@ -1,3 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare function executeLaunch(agentName: string): Promise<void>;
3
- export declare const launchCommand: Command<[string], {}>;
@@ -1,21 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import chalk from 'chalk';
3
- import { launchAgent } from '../../utils/cao.js';
4
- export async function executeLaunch(agentName) {
5
- await launchAgent(agentName);
6
- }
7
- export const launchCommand = new Command()
8
- .name('launch')
9
- .description('Launch a specific agent')
10
- .argument('<agent>', 'Agent name to launch')
11
- .action(async (agentName) => {
12
- console.log(chalk.cyan(`šŸš€ Launching ${agentName}...\n`));
13
- try {
14
- await executeLaunch(agentName);
15
- }
16
- catch (error) {
17
- console.error(chalk.red(`Failed to launch ${agentName}`));
18
- console.error(error);
19
- process.exit(1);
20
- }
21
- });
@@ -1,4 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import { type Agent } from '../../utils/agents.js';
3
- export declare function groupAgentsByCategory(agents: Agent[]): Record<string, Agent[]>;
4
- export declare const listCommand: Command<[], {}>;
@@ -1,28 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import chalk from 'chalk';
3
- import { getAllAgents } from '../../utils/agents.js';
4
- export function groupAgentsByCategory(agents) {
5
- return agents.reduce((acc, agent) => {
6
- const key = agent.subcategory ? `${agent.category}/${agent.subcategory}` : agent.category;
7
- if (!acc[key])
8
- acc[key] = [];
9
- acc[key].push(agent);
10
- return acc;
11
- }, {});
12
- }
13
- export const listCommand = new Command()
14
- .name('list')
15
- .description('List all available agents')
16
- .action(async () => {
17
- const agents = await getAllAgents();
18
- console.log(chalk.bold('\nšŸ“¦ Available Agents:\n'));
19
- const grouped = groupAgentsByCategory(agents);
20
- for (const [category, categoryAgents] of Object.entries(grouped)) {
21
- console.log(chalk.cyan(`\n${category}:`));
22
- for (const agent of categoryAgents) {
23
- const desc = agent.description ? chalk.gray(` - ${agent.description}`) : '';
24
- console.log(` ${chalk.green(agent.name)}${desc}`);
25
- }
26
- }
27
- console.log(chalk.gray(`\nTotal: ${agents.length} agents\n`));
28
- });
@@ -1,3 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare function executeServer(): Promise<void>;
3
- export declare const serverCommand: Command<[], {}>;
@@ -1,20 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import chalk from 'chalk';
3
- import { startServer } from '../../utils/cao.js';
4
- export async function executeServer() {
5
- await startServer();
6
- }
7
- export const serverCommand = new Command()
8
- .name('server')
9
- .description('Launch the CAO server')
10
- .action(async () => {
11
- console.log(chalk.cyan('šŸš€ Starting CAO server...\n'));
12
- try {
13
- await executeServer();
14
- }
15
- catch (error) {
16
- console.error(chalk.red('Failed to start server'));
17
- console.error(error);
18
- process.exit(1);
19
- }
20
- });
@@ -1,6 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare function executeSync(): Promise<{
3
- installed: number;
4
- failed: number;
5
- }>;
6
- export declare const syncCommand: Command<[], {}>;
@@ -1,52 +0,0 @@
1
- import { readdir } from 'node:fs/promises';
2
- import { join } from 'node:path';
3
- import { Command } from '@commander-js/extra-typings';
4
- import chalk from 'chalk';
5
- import { installAgent } from '../../utils/cao.js';
6
- export async function executeSync() {
7
- const caoAgentsDir = '.cao/agents';
8
- let installed = 0;
9
- let failed = 0;
10
- try {
11
- const files = await readdir(caoAgentsDir);
12
- const agentFiles = files.filter((f) => f.endsWith('.md'));
13
- for (const file of agentFiles) {
14
- const agentPath = join(caoAgentsDir, file);
15
- try {
16
- await installAgent(agentPath);
17
- console.log(chalk.green(` āœ” ${file}`));
18
- installed++;
19
- }
20
- catch (error) {
21
- console.log(chalk.red(` āœ– ${file}`));
22
- console.error(chalk.dim(` ${error}`));
23
- failed++;
24
- }
25
- }
26
- }
27
- catch (error) {
28
- throw new Error(`Failed to read .cao/agents directory: ${error}`);
29
- }
30
- return { installed, failed };
31
- }
32
- export const syncCommand = new Command()
33
- .name('sync')
34
- .description('Sync all local agents from .cao/agents/')
35
- .action(async () => {
36
- console.log(chalk.cyan('Syncing local agents...\n'));
37
- try {
38
- const { installed, failed } = await executeSync();
39
- console.log();
40
- if (failed === 0) {
41
- console.log(chalk.green(`āœ” All ${installed} agents synced successfully`));
42
- }
43
- else {
44
- console.log(chalk.yellow(`⚠ Synced ${installed} agents, ${failed} failed`));
45
- }
46
- }
47
- catch (error) {
48
- console.error(chalk.red('āœ– Failed to sync agents'));
49
- console.error(error);
50
- process.exit(1);
51
- }
52
- });
@@ -1,4 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- export declare const setup: Command<[], {
3
- yes?: true | undefined;
4
- }>;