generator-agent 1.0.2 → 1.0.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "id": "generators",
3
- "name": "Generators",
2
+ "id": "generator",
3
+ "name": "GeneratorAgent",
4
4
  "description": "Generator Agent responsible for generating generators",
5
5
  "scope": "folder",
6
6
  "folderScoped": true
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "agents": [
3
3
  {
4
- "id": "generators",
5
- "name": "Generators",
4
+ "id": "generator",
5
+ "name": "GeneratorAgent",
6
6
  "description": "Generator Agent responsible for generating generators"
7
7
  }
8
8
  ],
9
- "registeredAt": "2026-02-26T06:56:59.449Z",
9
+ "registeredAt": "2026-02-26T07:22:50.850Z",
10
10
  "installedFrom": "/home/ish-zstk410/Agent"
11
11
  }
package/main.js CHANGED
@@ -5,8 +5,8 @@ const fs = require('fs');
5
5
  // Agent objects that will be discovered by Copilot
6
6
  const agents = [
7
7
  {
8
- id: 'generators',
9
- name: 'Generators',
8
+ id: 'generator',
9
+ name: 'GeneratorAgent',
10
10
  description: 'Generator Agent responsible for generating generators',
11
11
  }
12
12
  ];
@@ -38,7 +38,29 @@ function activate(context) {
38
38
  });
39
39
  }
40
40
 
41
- // Export agents for Copilot discovery
41
+ // Register chat participant for Copilot
42
+ if (vscode.chat && vscode.chat.createChatParticipant) {
43
+ const participant = vscode.chat.createChatParticipant('generator', (request, context, stream, token) => {
44
+ const userMessage = request.prompt.toLowerCase();
45
+
46
+ // Default response for generator requests
47
+ stream.markdown('**GeneratorAgent**: Processing...\n\n');
48
+ stream.markdown(`You asked: "${request.prompt}"\n\n`);
49
+ stream.markdown('I can help you generate:\n\n');
50
+ stream.markdown('**Static data** - Fixed values\n');
51
+ stream.markdown('**Dynamic data** - Generated using expressions\n');
52
+ stream.markdown('**Conditional data** - Based on rules\n');
53
+ stream.markdown('**Reference data** - From other fields\n');
54
+ stream.markdown('**Remote data** - From external APIs\n');
55
+
56
+ return {};
57
+ });
58
+ participant.iconPath = vscode.Uri.file(__dirname + '/.agents/generators.json');
59
+ context.subscriptions.push(participant);
60
+ console.log('✅ Chat participant registered: @generator');
61
+ }
62
+
63
+ // Export agents for Copilot discovery (fallback)
42
64
  if (vscode.window && vscode.window.registerChatAgents) {
43
65
  try {
44
66
  agents.forEach(agent => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "generator-agent",
3
3
  "displayName": "GeneratorAgent",
4
4
  "description": "A VS Code extension for conditional rule-based data generation",
5
- "version": "1.0.2",
5
+ "version": "1.0.4",
6
6
  "publisher": "zohodesk",
7
7
  "engines": {
8
8
  "vscode": "^1.80.0"
@@ -26,6 +26,14 @@
26
26
  "command": "generator.start",
27
27
  "title": "Start Generator Agent"
28
28
  }
29
+ ],
30
+ "chatParticipants": [
31
+ {
32
+ "id": "generator",
33
+ "name": "GeneratorAgent",
34
+ "description": "Generator Agent responsible for generating generators",
35
+ "isSticky": true
36
+ }
29
37
  ]
30
38
  },
31
39
  "repository": {
package/post-install.js CHANGED
@@ -31,8 +31,8 @@ try {
31
31
  const agentsConfig = {
32
32
  agents: [
33
33
  {
34
- id: 'generators',
35
- name: 'Generators',
34
+ id: 'generator',
35
+ name: 'GeneratorAgent',
36
36
  description: 'Generator Agent responsible for generating generators',
37
37
  }
38
38
  ],
@@ -59,6 +59,52 @@ try {
59
59
 
60
60
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
61
61
 
62
+ // Create extension symlink for VS Code to discover
63
+ const extensionsDir = path.join(cwd, '.vscode', 'extensions');
64
+ const extensionLink = path.join(extensionsDir, 'zohodesk.generator-agent');
65
+ const packagePath = path.join(cwd, 'node_modules', 'generator-agent');
66
+
67
+ if (!fs.existsSync(extensionsDir)) {
68
+ fs.mkdirSync(extensionsDir, { recursive: true });
69
+ }
70
+
71
+ // Remove old symlink if exists
72
+ if (fs.existsSync(extensionLink)) {
73
+ try {
74
+ fs.unlinkSync(extensionLink);
75
+ } catch (e) {
76
+ // ignore
77
+ }
78
+ }
79
+
80
+ // Create symlink to make extension discoverable
81
+ try {
82
+ fs.symlinkSync(packagePath, extensionLink, 'dir');
83
+ console.log('🔗 Extension linked to .vscode/extensions/');
84
+ } catch (e) {
85
+ console.log('⚠️ Could not create symlink, copying files instead...');
86
+ // Fallback: copy instead of symlink - check if both paths exist first
87
+ if (!fs.existsSync(packagePath)) {
88
+ console.log('⚠️ Package path not found:', packagePath);
89
+ return;
90
+ }
91
+ const copyDir = (src, dest) => {
92
+ if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
93
+ const entries = fs.readdirSync(src, { withFileTypes: true });
94
+ for (let entry of entries) {
95
+ const srcPath = path.join(src, entry.name);
96
+ const destPath = path.join(dest, entry.name);
97
+ if (entry.isDirectory()) {
98
+ copyDir(srcPath, destPath);
99
+ } else {
100
+ fs.copyFileSync(srcPath, destPath);
101
+ }
102
+ }
103
+ };
104
+ copyDir(packagePath, extensionLink);
105
+ console.log('📁 Extension files copied to .vscode/extensions/');
106
+ }
107
+
62
108
  console.log('✅ Agent registered in:', cwd);
63
109
  console.log('📍 Config saved to:', configPath);
64
110
  console.log('⚙️ VS Code settings updated');
@@ -67,7 +113,7 @@ try {
67
113
  console.log(' Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)');
68
114
  console.log(' Type "Developer: Reload Window" and press Enter');
69
115
  console.log('');
70
- console.log('💡 Use @Generators in Copilot Chat');
116
+ console.log('💡 Agent will appear in agent list (@ dropdown)');
71
117
  console.log('✨ Post-install complete!');
72
118
  process.exit(0);
73
119
  } catch (error) {