agent-generator-cli 1.0.1 → 1.0.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/README.md CHANGED
@@ -2,31 +2,11 @@
2
2
 
3
3
  ## Installation
4
4
 
5
- ### Option 1: Install from npm (Recommended)
6
-
7
- Install the agent directly using npm:
8
-
9
5
  ```bash
10
- npm install -g @zohodesk/generator-agent
6
+ npm install -g agent-generator-cli
11
7
  ```
12
8
 
13
- After installation, the agent will automatically appear in your GitHub Copilot agent list.
14
-
15
- ### Option 2: Manual Install (Development)
16
-
17
- 1. Clone the repository:
18
-
19
- ```bash
20
- git clone https://github.com/ishwaryaramesh200-byte/Generator-Agent.git
21
-
22
- cd Generator-Agent
23
-
24
- ```
25
-
26
- 2. Reload VS Code:
27
-
28
- - Press `Ctrl+Shift+P`
29
- - Type "Reload Window" and press Enter
9
+ After installation, restart VS Code and the "Generators" agent will automatically appear in your GitHub Copilot agent list.
30
10
 
31
11
  ## Usage
32
12
 
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ // Determine VS Code extensions directory based on OS
8
+ const homeDir = os.homedir();
9
+ let extensionsDir;
10
+
11
+ if (process.platform === 'win32') {
12
+ extensionsDir = path.join(homeDir, 'AppData', 'Roaming', 'Code', 'User', 'extensions');
13
+ } else if (process.platform === 'darwin') {
14
+ extensionsDir = path.join(homeDir, 'Library', 'Application Support', 'Code', 'User', 'extensions');
15
+ } else {
16
+ // Linux
17
+ extensionsDir = path.join(homeDir, '.vscode', 'extensions');
18
+ }
19
+
20
+ const extensionName = 'agent-generator-cli-1.0.1';
21
+ const targetDir = path.join(extensionsDir, extensionName);
22
+
23
+ // Check if extensions directory exists
24
+ if (!fs.existsSync(extensionsDir)) {
25
+ console.log(`VS Code extensions directory not found at ${extensionsDir}`);
26
+ console.log('Please ensure VS Code is installed.');
27
+ process.exit(0);
28
+ }
29
+
30
+ // Create extension directory if it doesn't exist
31
+ if (!fs.existsSync(targetDir)) {
32
+ fs.mkdirSync(targetDir, { recursive: true });
33
+ }
34
+
35
+ // Copy extension files
36
+ const filesToCopy = ['main.js', 'package.json', 'Generator_Patterns', 'source', '.agents'];
37
+ const currentDir = __dirname;
38
+
39
+ filesToCopy.forEach(file => {
40
+ const src = path.join(currentDir, file);
41
+ const dest = path.join(targetDir, file);
42
+
43
+ if (fs.existsSync(src)) {
44
+ if (fs.statSync(src).isDirectory()) {
45
+ copyDir(src, dest);
46
+ } else {
47
+ fs.copyFileSync(src, dest);
48
+ }
49
+ }
50
+ });
51
+
52
+ // Also create package.json metadata file
53
+ const packageJson = require('./package.json');
54
+ const packageMetadata = {
55
+ name: packageJson.name,
56
+ version: packageJson.version,
57
+ engines: packageJson.engines,
58
+ activationEvents: packageJson.activationEvents,
59
+ contributes: packageJson.contributes,
60
+ main: packageJson.main
61
+ };
62
+
63
+ fs.writeFileSync(
64
+ path.join(targetDir, 'package.json'),
65
+ JSON.stringify(packageMetadata, null, 2)
66
+ );
67
+
68
+ console.log(`✓ Generator Agent installed successfully at ${targetDir}`);
69
+ console.log('✓ Restart VS Code to activate the agent');
70
+ console.log('✓ The "Generators" agent will appear in your Copilot chat');
71
+
72
+ // Helper function to recursively copy directories
73
+ function copyDir(src, dest) {
74
+ if (!fs.existsSync(dest)) {
75
+ fs.mkdirSync(dest, { recursive: true });
76
+ }
77
+
78
+ const files = fs.readdirSync(src);
79
+ files.forEach(file => {
80
+ const srcFile = path.join(src, file);
81
+ const destFile = path.join(dest, file);
82
+
83
+ if (fs.statSync(srcFile).isDirectory()) {
84
+ copyDir(srcFile, destFile);
85
+ } else {
86
+ fs.copyFileSync(srcFile, destFile);
87
+ }
88
+ });
89
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "agent-generator-cli",
3
3
  "displayName": "Generator Agent",
4
4
  "description": "A Copilot Agent for conditional rule-based data generation",
5
- "version": "1.0.1",
5
+ "version": "1.0.2",
6
6
  "publisher": "IshwaryaRamesh",
7
7
  "engines": {
8
8
  "vscode": "^1.80.0"
@@ -36,6 +36,7 @@
36
36
  "files": [
37
37
  "main.js",
38
38
  "package.json",
39
+ "install-extension.js",
39
40
  "Generator_Patterns",
40
41
  "source",
41
42
  ".agents"
@@ -43,5 +44,8 @@
43
44
  "devDependencies": {
44
45
  "@types/vscode": "^1.80.0",
45
46
  "@vscode/vsce": "^2.32.0"
47
+ },
48
+ "scripts": {
49
+ "postinstall": "node install-extension.js"
46
50
  }
47
51
  }