project-iris 0.1.2 → 0.2.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.
package/lib/installer.js CHANGED
@@ -2,6 +2,7 @@ const fs = require('fs-extra');
2
2
  const path = require('path');
3
3
  const prompts = require('prompts');
4
4
  const yaml = require('js-yaml');
5
+ const { execSync } = require('child_process');
5
6
  const CLIUtils = require('./cli-utils');
6
7
  const InstallerFactory = require('./InstallerFactory');
7
8
  const { FLOWS } = require('./constants');
@@ -67,6 +68,73 @@ async function detectTools() {
67
68
  return detected;
68
69
  }
69
70
 
71
+ // VS Code-based tools that can use the iris Dashboard extension
72
+ const VSCODE_TOOLS = ['claude', 'cursor', 'copilot', 'windsurf', 'cline', 'roo', 'antigravity'];
73
+
74
+ /**
75
+ * Install VS Code extension if any VS Code-based tool is selected
76
+ * @param {string[]} selectedToolKeys - Selected tool keys
77
+ * @returns {boolean} Whether extension was installed
78
+ */
79
+ async function installVSCodeExtension(selectedToolKeys) {
80
+ // Check if any VS Code-based tool is selected
81
+ const hasVSCodeTool = selectedToolKeys.some(key => VSCODE_TOOLS.includes(key));
82
+ if (!hasVSCodeTool) {
83
+ return false;
84
+ }
85
+
86
+ const extensionPath = path.join(__dirname, '..', 'extensions', 'iris-dashboard-0.0.1.vsix');
87
+
88
+ // Check if extension file exists
89
+ if (!await fs.pathExists(extensionPath)) {
90
+ console.log(theme.dim(' VS Code extension not found, skipping...'));
91
+ return false;
92
+ }
93
+
94
+ console.log(theme.dim(' Installing iris Dashboard VS Code extension...'));
95
+
96
+ try {
97
+ // Try 'code' command first (VS Code), then 'cursor' for Cursor
98
+ let installed = false;
99
+
100
+ // Try VS Code
101
+ try {
102
+ execSync(`code --install-extension "${extensionPath}" --force`, {
103
+ stdio: 'pipe',
104
+ timeout: 30000
105
+ });
106
+ installed = true;
107
+ CLIUtils.displayStatus('', 'Installed iris Dashboard extension for VS Code', 'success');
108
+ } catch {
109
+ // VS Code not available or failed
110
+ }
111
+
112
+ // Try Cursor if selected
113
+ if (selectedToolKeys.includes('cursor')) {
114
+ try {
115
+ execSync(`cursor --install-extension "${extensionPath}" --force`, {
116
+ stdio: 'pipe',
117
+ timeout: 30000
118
+ });
119
+ installed = true;
120
+ CLIUtils.displayStatus('', 'Installed iris Dashboard extension for Cursor', 'success');
121
+ } catch {
122
+ // Cursor not available or failed
123
+ }
124
+ }
125
+
126
+ if (!installed) {
127
+ console.log(theme.dim(' Could not auto-install extension. Install manually:'));
128
+ console.log(theme.dim(` code --install-extension "${extensionPath}"`));
129
+ }
130
+
131
+ return installed;
132
+ } catch (error) {
133
+ console.log(theme.dim(` Extension install skipped: ${error.message}`));
134
+ return false;
135
+ }
136
+ }
137
+
70
138
  async function install() {
71
139
  // Initialize analytics (respects opt-out env vars)
72
140
  analytics.init();
@@ -153,6 +221,9 @@ async function install() {
153
221
  try {
154
222
  const filesCreated = await installFlow(selectedFlow, selectedToolKeys);
155
223
 
224
+ // Install VS Code extension if applicable
225
+ await installVSCodeExtension(selectedToolKeys);
226
+
156
227
  // Track successful installation for each tool
157
228
  const durationMs = Date.now() - installStartTime;
158
229
  for (const toolKey of selectedToolKeys) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-iris",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Multi-agent orchestration system for AI-native software development. Delivers AI-DLC, Agile, and custom SDLC flows as markdown-based agent systems.",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {
@@ -34,6 +34,7 @@
34
34
  },
35
35
  "files": [
36
36
  "bin/",
37
+ "extensions/",
37
38
  "flows/",
38
39
  "lib/",
39
40
  "scripts/",