humanbehavior-js 0.4.7 → 0.4.8

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 (52) hide show
  1. package/dist/cjs/angular/index.cjs +5 -6
  2. package/dist/cjs/angular/index.cjs.map +1 -1
  3. package/dist/cjs/index.cjs +5 -6
  4. package/dist/cjs/index.cjs.map +1 -1
  5. package/dist/cjs/install-wizard.cjs +4 -2
  6. package/dist/cjs/install-wizard.cjs.map +1 -1
  7. package/dist/cjs/react/index.cjs +5 -6
  8. package/dist/cjs/react/index.cjs.map +1 -1
  9. package/dist/cjs/remix/index.cjs +5 -6
  10. package/dist/cjs/remix/index.cjs.map +1 -1
  11. package/dist/cjs/svelte/index.cjs +5 -6
  12. package/dist/cjs/svelte/index.cjs.map +1 -1
  13. package/dist/cjs/vue/index.cjs +5 -6
  14. package/dist/cjs/vue/index.cjs.map +1 -1
  15. package/dist/cjs/wizard/index.cjs +3208 -0
  16. package/dist/cjs/wizard/index.cjs.map +1 -0
  17. package/dist/cli/ai-auto-install.js +2024 -0
  18. package/dist/cli/ai-auto-install.js.map +1 -0
  19. package/dist/cli/auto-install.js +4 -2
  20. package/dist/cli/auto-install.js.map +1 -1
  21. package/dist/esm/angular/index.js +5 -6
  22. package/dist/esm/angular/index.js.map +1 -1
  23. package/dist/esm/index.js +5 -6
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/install-wizard.js +4 -2
  26. package/dist/esm/install-wizard.js.map +1 -1
  27. package/dist/esm/react/index.js +5 -6
  28. package/dist/esm/react/index.js.map +1 -1
  29. package/dist/esm/remix/index.js +5 -6
  30. package/dist/esm/remix/index.js.map +1 -1
  31. package/dist/esm/svelte/index.js +5 -6
  32. package/dist/esm/svelte/index.js.map +1 -1
  33. package/dist/esm/vue/index.js +5 -6
  34. package/dist/esm/vue/index.js.map +1 -1
  35. package/dist/esm/wizard/index.js +3178 -0
  36. package/dist/esm/wizard/index.js.map +1 -0
  37. package/dist/index.min.js.map +1 -1
  38. package/dist/types/install-wizard.d.ts +8 -8
  39. package/dist/types/wizard/index.d.ts +489 -0
  40. package/package.json +14 -8
  41. package/rollup.config.js +65 -3
  42. package/src/react/AutoInstallWizard.tsx +1 -1
  43. package/src/tracker.ts +5 -6
  44. package/src/wizard/README.md +114 -0
  45. package/src/wizard/ai/ai-install-wizard.ts +894 -0
  46. package/src/wizard/ai/manual-framework-wizard.ts +236 -0
  47. package/src/wizard/cli/ai-auto-install.ts +369 -0
  48. package/src/{cli → wizard/cli}/auto-install.ts +1 -1
  49. package/src/{install-wizard.ts → wizard/core/install-wizard.ts} +12 -10
  50. package/src/wizard/index.ts +23 -0
  51. package/src/wizard/services/centralized-ai-service.ts +668 -0
  52. package/src/wizard/services/remote-ai-service.ts +224 -0
@@ -6,7 +6,7 @@
6
6
  */
7
7
  interface FrameworkInfo {
8
8
  name: string;
9
- type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'node';
9
+ type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'node' | 'auto';
10
10
  bundler?: 'vite' | 'webpack' | 'esbuild' | 'rollup';
11
11
  packageManager?: 'npm' | 'yarn' | 'pnpm';
12
12
  hasTypeScript?: boolean;
@@ -27,9 +27,9 @@ interface InstallationResult {
27
27
  nextSteps: string[];
28
28
  }
29
29
  declare class AutoInstallationWizard {
30
- private apiKey;
31
- private projectRoot;
32
- private framework;
30
+ protected apiKey: string;
31
+ protected projectRoot: string;
32
+ protected framework: FrameworkInfo | null;
33
33
  constructor(apiKey: string, projectRoot?: string);
34
34
  /**
35
35
  * Main installation method - detects framework and auto-installs
@@ -38,15 +38,15 @@ declare class AutoInstallationWizard {
38
38
  /**
39
39
  * Detect the current framework and project setup
40
40
  */
41
- private detectFramework;
41
+ detectFramework(): Promise<FrameworkInfo>;
42
42
  /**
43
43
  * Install the SDK package
44
44
  */
45
- private installPackage;
45
+ protected installPackage(): Promise<void>;
46
46
  /**
47
47
  * Generate code modifications based on framework
48
48
  */
49
- private generateModifications;
49
+ protected generateModifications(): Promise<CodeModification[]>;
50
50
  /**
51
51
  * Generate React-specific modifications
52
52
  */
@@ -82,7 +82,7 @@ declare class AutoInstallationWizard {
82
82
  /**
83
83
  * Apply modifications to the codebase
84
84
  */
85
- private applyModifications;
85
+ protected applyModifications(modifications: CodeModification[]): Promise<void>;
86
86
  /**
87
87
  * Generate next steps for the user
88
88
  */
@@ -0,0 +1,489 @@
1
+ /**
2
+ * HumanBehavior SDK Auto-Installation Wizard
3
+ *
4
+ * This wizard automatically detects the user's framework and modifies their codebase
5
+ * to integrate the SDK with minimal user intervention.
6
+ */
7
+ interface FrameworkInfo$2 {
8
+ name: string;
9
+ type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'node' | 'auto';
10
+ bundler?: 'vite' | 'webpack' | 'esbuild' | 'rollup';
11
+ packageManager?: 'npm' | 'yarn' | 'pnpm';
12
+ hasTypeScript?: boolean;
13
+ hasRouter?: boolean;
14
+ projectRoot?: string;
15
+ }
16
+ interface CodeModification {
17
+ filePath: string;
18
+ action: 'create' | 'modify' | 'append';
19
+ content: string;
20
+ description: string;
21
+ }
22
+ interface InstallationResult {
23
+ success: boolean;
24
+ framework: FrameworkInfo$2;
25
+ modifications: CodeModification[];
26
+ errors: string[];
27
+ nextSteps: string[];
28
+ }
29
+ declare class AutoInstallationWizard {
30
+ protected apiKey: string;
31
+ protected projectRoot: string;
32
+ protected framework: FrameworkInfo$2 | null;
33
+ constructor(apiKey: string, projectRoot?: string);
34
+ /**
35
+ * Main installation method - detects framework and auto-installs
36
+ */
37
+ install(): Promise<InstallationResult>;
38
+ /**
39
+ * Detect the current framework and project setup
40
+ */
41
+ detectFramework(): Promise<FrameworkInfo$2>;
42
+ /**
43
+ * Install the SDK package
44
+ */
45
+ protected installPackage(): Promise<void>;
46
+ /**
47
+ * Generate code modifications based on framework
48
+ */
49
+ protected generateModifications(): Promise<CodeModification[]>;
50
+ /**
51
+ * Generate React-specific modifications
52
+ */
53
+ private generateReactModifications;
54
+ /**
55
+ * Generate Next.js-specific modifications
56
+ */
57
+ private generateNextJSModifications;
58
+ /**
59
+ * Generate Nuxt-specific modifications
60
+ */
61
+ private generateNuxtModifications;
62
+ /**
63
+ * Generate Remix-specific modifications
64
+ */
65
+ private generateRemixModifications;
66
+ /**
67
+ * Generate Vue-specific modifications
68
+ */
69
+ private generateVueModifications;
70
+ /**
71
+ * Generate Angular-specific modifications
72
+ */
73
+ private generateAngularModifications;
74
+ /**
75
+ * Generate Svelte-specific modifications
76
+ */
77
+ private generateSvelteModifications;
78
+ /**
79
+ * Generate vanilla JS/TS modifications
80
+ */
81
+ private generateVanillaModifications;
82
+ /**
83
+ * Apply modifications to the codebase
84
+ */
85
+ protected applyModifications(modifications: CodeModification[]): Promise<void>;
86
+ /**
87
+ * Generate next steps for the user
88
+ */
89
+ private generateNextSteps;
90
+ private findReactAppFile;
91
+ private findVueMainFile;
92
+ private findSvelteMainFile;
93
+ private findHTMLFile;
94
+ private injectReactProvider;
95
+ private injectNextJSAppRouter;
96
+ private injectNextJSPagesRouter;
97
+ private injectRemixProvider;
98
+ private injectVuePlugin;
99
+ private injectAngularModule;
100
+ private injectAngularStandaloneInit;
101
+ private injectSvelteStore;
102
+ private injectSvelteKitLayout;
103
+ private injectVanillaScript;
104
+ private injectNuxtConfig;
105
+ /**
106
+ * Helper method to find the best environment file for a framework
107
+ */
108
+ private findBestEnvFile;
109
+ /**
110
+ * Helper method to create or append to environment files
111
+ */
112
+ private createEnvironmentModification;
113
+ }
114
+
115
+ /**
116
+ * AI-Enhanced HumanBehavior SDK Auto-Installation Wizard
117
+ *
118
+ * This wizard uses AI to intelligently detect frameworks, analyze code patterns,
119
+ * and generate optimal integration code that's both future-proof and backward-compatible.
120
+ *
121
+ * 🚀 KEY FEATURES:
122
+ * - AI-powered framework detection beyond package.json
123
+ * - Intelligent code pattern analysis
124
+ * - Future-proof integration strategies
125
+ * - Backward compatibility with legacy frameworks
126
+ * - Adaptive code generation for new frameworks
127
+ * - Smart conflict resolution
128
+ * - Learning from user feedback
129
+ * - Centralized AI service (no user API keys required)
130
+ */
131
+
132
+ interface AICodeAnalysis {
133
+ framework: FrameworkInfo$2;
134
+ confidence: number;
135
+ patterns: string[];
136
+ conflicts: string[];
137
+ recommendations: string[];
138
+ integrationStrategy: 'provider' | 'plugin' | 'module' | 'script' | 'standalone';
139
+ compatibilityMode: 'modern' | 'legacy' | 'hybrid';
140
+ }
141
+ interface AIInstallationResult extends InstallationResult {
142
+ aiAnalysis: AICodeAnalysis;
143
+ learningData: {
144
+ patterns: string[];
145
+ framework: string;
146
+ success: boolean;
147
+ userFeedback?: string;
148
+ };
149
+ }
150
+ /**
151
+ * Centralized AI Service Interface
152
+ * This runs on your backend infrastructure, not in the user's environment
153
+ */
154
+ interface CentralizedAIService$1 {
155
+ analyzeCodePatterns(codeSamples: string[]): Promise<AICodeAnalysis>;
156
+ resolveConflicts(conflicts: string[], framework: FrameworkInfo$2): Promise<string[]>;
157
+ generateOptimizations(framework: FrameworkInfo$2, patterns: string[]): Promise<string[]>;
158
+ }
159
+ declare class AIEnhancedInstallationWizard extends AutoInstallationWizard {
160
+ private aiService;
161
+ private learningCache;
162
+ private patternDatabase;
163
+ constructor(apiKey: string, projectRoot?: string, aiService?: CentralizedAIService$1);
164
+ /**
165
+ * AI-enhanced installation with intelligent analysis
166
+ */
167
+ install(): Promise<AIInstallationResult>;
168
+ /**
169
+ * AI-powered code analysis using centralized service
170
+ */
171
+ performAICodeAnalysis(): Promise<AICodeAnalysis>;
172
+ /**
173
+ * Scan project files for analysis
174
+ */
175
+ private scanProjectFiles;
176
+ /**
177
+ * Check if file is relevant for analysis
178
+ */
179
+ private isRelevantFile;
180
+ /**
181
+ * Extract code samples for AI analysis
182
+ */
183
+ private extractCodeSamples;
184
+ /**
185
+ * Extract relevant code patterns
186
+ */
187
+ private extractCodePatterns;
188
+ /**
189
+ * AI-enhanced framework detection
190
+ */
191
+ private detectFrameworkWithAI;
192
+ /**
193
+ * Generate AI-optimized modifications
194
+ */
195
+ private generateAIOptimizedModifications;
196
+ /**
197
+ * Enhance modification with AI insights
198
+ */
199
+ private enhanceModificationWithAI;
200
+ /**
201
+ * Generate AI-specific optimizations
202
+ */
203
+ private generateAIOptimizations;
204
+ /**
205
+ * Apply modifications with AI conflict resolution
206
+ */
207
+ private applyModificationsWithAI;
208
+ /**
209
+ * Detect potential conflicts
210
+ */
211
+ private detectConflicts;
212
+ /**
213
+ * Resolve conflicts with AI
214
+ */
215
+ private resolveConflicts;
216
+ /**
217
+ * Apply single modification
218
+ */
219
+ private applyModification;
220
+ /**
221
+ * Generate AI-enhanced next steps
222
+ */
223
+ private generateAINextSteps;
224
+ /**
225
+ * Learn from installation for future improvements
226
+ */
227
+ private learnFromInstallation;
228
+ /**
229
+ * Load learning data from disk
230
+ */
231
+ private loadLearningData;
232
+ /**
233
+ * Save learning data to disk
234
+ */
235
+ private saveLearningData;
236
+ /**
237
+ * Get AI insights for a specific framework
238
+ */
239
+ getAIInsights(frameworkName: string): any[];
240
+ /**
241
+ * Get learning statistics
242
+ */
243
+ getLearningStats(): any;
244
+ }
245
+ /**
246
+ * Browser-based AI installation wizard
247
+ */
248
+ declare class AIBrowserInstallationWizard {
249
+ private apiKey;
250
+ private aiService;
251
+ constructor(apiKey: string, aiService?: CentralizedAIService$1);
252
+ install(): Promise<AIInstallationResult>;
253
+ private performBrowserAIAnalysis;
254
+ private detectBrowserFramework;
255
+ private analyzeBrowserPatterns;
256
+ private generateAIBrowserModifications;
257
+ }
258
+
259
+ /**
260
+ * AI-Enhanced HumanBehavior SDK Auto-Installation CLI
261
+ *
262
+ * Usage: npx humanbehavior-js ai-auto-install [api-key]
263
+ *
264
+ * This tool uses AI to intelligently detect frameworks, analyze code patterns,
265
+ * and generate optimal integration code that's both future-proof and backward-compatible.
266
+ */
267
+ interface AICLIOptions {
268
+ apiKey?: string;
269
+ projectPath?: string;
270
+ yes?: boolean;
271
+ dryRun?: boolean;
272
+ useAI?: boolean;
273
+ browser?: boolean;
274
+ framework?: string;
275
+ manual?: boolean;
276
+ }
277
+ declare class AIAutoInstallCLI {
278
+ private rl;
279
+ private options;
280
+ constructor(options: AICLIOptions);
281
+ run(): Promise<void>;
282
+ private getApiKey;
283
+ private chooseInstallationMode;
284
+ private confirmInstallation;
285
+ private getInstallationModeDisplay;
286
+ private chooseFramework;
287
+ private displayResults;
288
+ }
289
+
290
+ /**
291
+ * HumanBehavior SDK Auto-Installation CLI
292
+ *
293
+ * Usage: npx humanbehavior-js auto-install [api-key]
294
+ *
295
+ * This tool automatically detects the user's framework and modifies their codebase
296
+ * to integrate the SDK with minimal user intervention.
297
+ */
298
+ interface CLIOptions {
299
+ apiKey?: string;
300
+ projectPath?: string;
301
+ yes?: boolean;
302
+ dryRun?: boolean;
303
+ }
304
+ declare class AutoInstallCLI {
305
+ private rl;
306
+ private options;
307
+ constructor(options: CLIOptions);
308
+ run(): Promise<void>;
309
+ private getApiKey;
310
+ private confirmInstallation;
311
+ private displayResults;
312
+ }
313
+
314
+ /**
315
+ * Remote AI Service Implementation
316
+ *
317
+ * This connects to your deployed Lambda function via API Gateway
318
+ */
319
+
320
+ interface FrameworkInfo$1 {
321
+ name: string;
322
+ type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'node';
323
+ bundler?: 'vite' | 'webpack' | 'esbuild' | 'rollup';
324
+ packageManager?: 'npm' | 'yarn' | 'pnpm';
325
+ hasTypeScript?: boolean;
326
+ hasRouter?: boolean;
327
+ projectRoot?: string;
328
+ }
329
+ interface RemoteAIServiceConfig {
330
+ apiEndpoint: string;
331
+ timeout?: number;
332
+ }
333
+ declare class RemoteAIService {
334
+ private config;
335
+ constructor(config: RemoteAIServiceConfig);
336
+ /**
337
+ * Analyze code patterns using your deployed AI service
338
+ */
339
+ analyzeCodePatterns(codeSamples: string[]): Promise<AICodeAnalysis>;
340
+ /**
341
+ * Resolve conflicts using your deployed AI service
342
+ */
343
+ resolveConflicts(conflicts: string[], framework: FrameworkInfo$1): Promise<string[]>;
344
+ /**
345
+ * Generate optimizations using your deployed AI service
346
+ */
347
+ generateOptimizations(framework: FrameworkInfo$1, patterns: string[]): Promise<string[]>;
348
+ /**
349
+ * Heuristic analysis fallback
350
+ */
351
+ private performHeuristicAnalysis;
352
+ /**
353
+ * Heuristic conflict resolution
354
+ */
355
+ private resolveConflictsHeuristic;
356
+ /**
357
+ * Heuristic optimization generation
358
+ */
359
+ private generateOptimizationsHeuristic;
360
+ }
361
+
362
+ /**
363
+ * Centralized AI Service Implementation
364
+ *
365
+ * This service runs on your backend infrastructure and provides AI-powered
366
+ * code analysis without requiring users to provide their own API keys.
367
+ *
368
+ * The service can be deployed as:
369
+ * - AWS Lambda function
370
+ * - Docker container
371
+ * - Express.js server
372
+ * - Cloud function
373
+ */
374
+
375
+ interface FrameworkInfo {
376
+ name: string;
377
+ type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'node';
378
+ bundler?: 'vite' | 'webpack' | 'esbuild' | 'rollup';
379
+ packageManager?: 'npm' | 'yarn' | 'pnpm';
380
+ hasTypeScript?: boolean;
381
+ hasRouter?: boolean;
382
+ projectRoot?: string;
383
+ }
384
+ interface CentralizedAIServiceConfig {
385
+ openaiApiKey: string;
386
+ openaiModel?: string;
387
+ maxTokens?: number;
388
+ temperature?: number;
389
+ enableCaching?: boolean;
390
+ cacheTTL?: number;
391
+ }
392
+ /**
393
+ * Centralized AI Service Implementation
394
+ * This runs on your backend infrastructure
395
+ */
396
+ declare class CentralizedAIService {
397
+ private config;
398
+ private cache;
399
+ private openai;
400
+ constructor(config: CentralizedAIServiceConfig);
401
+ /**
402
+ * Initialize OpenAI client
403
+ */
404
+ private initializeOpenAI;
405
+ /**
406
+ * Analyze code patterns using AI
407
+ */
408
+ analyzeCodePatterns(codeSamples: string[]): Promise<AICodeAnalysis>;
409
+ /**
410
+ * Resolve conflicts using AI
411
+ */
412
+ resolveConflicts(conflicts: string[], framework: FrameworkInfo): Promise<string[]>;
413
+ /**
414
+ * Generate optimizations using AI
415
+ */
416
+ generateOptimizations(framework: FrameworkInfo, patterns: string[]): Promise<string[]>;
417
+ /**
418
+ * Perform AI analysis
419
+ */
420
+ private performAIAnalysis;
421
+ /**
422
+ * Build analysis prompt
423
+ */
424
+ private buildAnalysisPrompt;
425
+ /**
426
+ * Build conflict resolution prompt
427
+ */
428
+ private buildConflictResolutionPrompt;
429
+ /**
430
+ * Build optimization prompt
431
+ */
432
+ private buildOptimizationPrompt;
433
+ /**
434
+ * Parse analysis result
435
+ */
436
+ private parseAnalysisResult;
437
+ /**
438
+ * Parse conflict resolutions
439
+ */
440
+ private parseConflictResolutions;
441
+ /**
442
+ * Parse optimizations
443
+ */
444
+ private parseOptimizations;
445
+ /**
446
+ * Heuristic analysis fallback
447
+ */
448
+ private performHeuristicAnalysis;
449
+ /**
450
+ * Heuristic conflict resolution
451
+ */
452
+ private resolveConflictsHeuristic;
453
+ /**
454
+ * Heuristic optimization generation
455
+ */
456
+ private generateOptimizationsHeuristic;
457
+ /**
458
+ * Generate cache key
459
+ */
460
+ private generateCacheKey;
461
+ /**
462
+ * Check if cache is valid
463
+ */
464
+ private isCacheValid;
465
+ /**
466
+ * Get default analysis
467
+ */
468
+ private getDefaultAnalysis;
469
+ /**
470
+ * Get service statistics
471
+ */
472
+ getStats(): {
473
+ cacheSize: number;
474
+ config: {
475
+ model: string | undefined;
476
+ maxTokens: number | undefined;
477
+ temperature: number | undefined;
478
+ caching: boolean | undefined;
479
+ };
480
+ openaiAvailable: boolean;
481
+ };
482
+ /**
483
+ * Clear cache
484
+ */
485
+ clearCache(): void;
486
+ }
487
+
488
+ export { AIAutoInstallCLI, AIBrowserInstallationWizard, AIEnhancedInstallationWizard, AutoInstallCLI, AutoInstallationWizard, CentralizedAIService, AutoInstallationWizard as InstallWizard, RemoteAIService };
489
+ export type { AICodeAnalysis, AIInstallationResult, CentralizedAIServiceConfig, CodeModification, FrameworkInfo$2 as FrameworkInfo, InstallationResult, RemoteAIServiceConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "humanbehavior-js",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "SDK for HumanBehavior session and event recording",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -43,6 +43,11 @@
43
43
  "import": "./dist/esm/install-wizard.js",
44
44
  "require": "./dist/cjs/install-wizard.cjs",
45
45
  "types": "./dist/types/install-wizard.d.ts"
46
+ },
47
+ "./wizard": {
48
+ "import": "./dist/esm/wizard/index.js",
49
+ "require": "./dist/cjs/wizard/index.cjs",
50
+ "types": "./dist/types/wizard/index.d.ts"
46
51
  }
47
52
  },
48
53
  "scripts": {
@@ -55,28 +60,29 @@
55
60
  "author": "Chirag Kawediya, Skyler Ji, Amogh Chaturvedi",
56
61
  "license": "ISC",
57
62
  "dependencies": {
58
- "@types/react": "^19.0.12",
59
63
  "@rrweb/record": "^2.0.0-alpha.17",
64
+ "@types/react": "^19.0.12",
65
+ "openai": "^5.12.0",
60
66
  "uuid": "^11.1.0"
61
67
  },
62
68
  "peerDependencies": {
69
+ "@remix-run/node": ">=2.0.0",
63
70
  "react": ">=16.8.0",
64
71
  "react-dom": ">=16.8.0",
65
- "vue": ">=3.0.0",
66
- "@remix-run/node": ">=2.0.0"
72
+ "vue": ">=3.0.0"
67
73
  },
68
74
  "devDependencies": {
75
+ "@remix-run/node": "^2.0.0",
69
76
  "@rollup/plugin-commonjs": "^28.0.3",
70
77
  "@rollup/plugin-node-resolve": "^16.0.1",
71
78
  "@rollup/plugin-terser": "^0.4.4",
72
79
  "@rollup/plugin-typescript": "^12.1.2",
73
- "@types/node": "^24.0.3",
80
+ "@types/node": "^24.2.0",
74
81
  "rollup": "^4.36.0",
75
82
  "rollup-plugin-dts": "^6.2.1",
76
83
  "tslib": "^2.8.1",
77
84
  "typescript": "^5.8.2",
78
- "vue": "^3.0.0",
79
- "@remix-run/node": "^2.0.0"
85
+ "vue": "^3.0.0"
80
86
  },
81
87
  "publishConfig": {
82
88
  "access": "public"
@@ -92,6 +98,6 @@
92
98
  "koalaware"
93
99
  ],
94
100
  "bin": {
95
- "humanbehavior-js": "./dist/cli/auto-install.js"
101
+ "humanbehavior-js": "./dist/cli/ai-auto-install.js"
96
102
  }
97
103
  }
package/rollup.config.js CHANGED
@@ -294,7 +294,7 @@ export default [
294
294
 
295
295
  // CLI bundle
296
296
  {
297
- input: 'src/cli/auto-install.ts',
297
+ input: 'src/wizard/cli/auto-install.ts',
298
298
  output: {
299
299
  file: 'dist/cli/auto-install.js',
300
300
  format: 'es',
@@ -314,9 +314,31 @@ export default [
314
314
  external: nodeExternal
315
315
  },
316
316
 
317
+ // AI CLI bundle
318
+ {
319
+ input: 'src/wizard/cli/ai-auto-install.ts',
320
+ output: {
321
+ file: 'dist/cli/ai-auto-install.js',
322
+ format: 'es',
323
+ sourcemap: true
324
+ },
325
+ plugins: [
326
+ resolve({
327
+ preferBuiltins: true
328
+ }),
329
+ commonjs(),
330
+ typescript({
331
+ tsconfig: './tsconfig.json',
332
+ declaration: false,
333
+ declarationMap: false
334
+ })
335
+ ],
336
+ external: nodeExternal
337
+ },
338
+
317
339
  // Install wizard bundle
318
340
  {
319
- input: 'src/install-wizard.ts',
341
+ input: 'src/wizard/core/install-wizard.ts',
320
342
  output: [
321
343
  {
322
344
  file: 'dist/cjs/install-wizard.cjs',
@@ -345,12 +367,52 @@ export default [
345
367
 
346
368
  // Install wizard types
347
369
  {
348
- input: 'src/install-wizard.ts',
370
+ input: 'src/wizard/core/install-wizard.ts',
349
371
  output: {
350
372
  file: 'dist/types/install-wizard.d.ts',
351
373
  format: 'es'
352
374
  },
353
375
  plugins: [dts()],
354
376
  external: nodeExternal
377
+ },
378
+
379
+ // Wizard module bundle
380
+ {
381
+ input: 'src/wizard/index.ts',
382
+ output: [
383
+ {
384
+ file: 'dist/cjs/wizard/index.cjs',
385
+ format: 'cjs',
386
+ sourcemap: true
387
+ },
388
+ {
389
+ file: 'dist/esm/wizard/index.js',
390
+ format: 'es',
391
+ sourcemap: true
392
+ }
393
+ ],
394
+ plugins: [
395
+ resolve({
396
+ preferBuiltins: true
397
+ }),
398
+ commonjs(),
399
+ typescript({
400
+ tsconfig: './tsconfig.json',
401
+ declaration: false,
402
+ declarationMap: false
403
+ })
404
+ ],
405
+ external: nodeExternal
406
+ },
407
+
408
+ // Wizard module types
409
+ {
410
+ input: 'src/wizard/index.ts',
411
+ output: {
412
+ file: 'dist/types/wizard/index.d.ts',
413
+ format: 'es'
414
+ },
415
+ plugins: [dts()],
416
+ external: nodeExternal
355
417
  }
356
418
  ];
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { BrowserAutoInstallationWizard } from '../install-wizard';
2
+ import { BrowserAutoInstallationWizard } from '../wizard/core/install-wizard';
3
3
 
4
4
  interface AutoInstallWizardProps {
5
5
  apiKey: string;