@gurulu/cli 0.2.0 → 0.2.1

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.
@@ -651,7 +651,35 @@ async function runAuthenticatedInstallFlow(args, authDeps, installDeps, scriptsD
651
651
  }
652
652
  catch (err) {
653
653
  installDeps.log?.warn(`Intent analyzer failed: ${err.message}`);
654
+ installDeps.log?.warn('⚠ Falling back to built-in generic event set.');
654
655
  intentRecord.error = `analyze_failed:${err.message}`;
656
+ // Client-side fallback: produce a minimal generic intent so
657
+ // auto-instrument and pre-seed still work even when the API is down.
658
+ intent = {
659
+ vertical: 'generic',
660
+ confidence: 'low',
661
+ reasoning: 'API unavailable — using built-in generic fallback.',
662
+ analyzerMode: 'heuristic',
663
+ alternativeVerticals: [],
664
+ events: [
665
+ { name: '$page_view', category: 'engagement', source: 'inferred:pattern', properties: [], confidence: 1.0, reasoning: 'Baseline page impression.' },
666
+ { name: '$session_start', category: 'engagement', source: 'inferred:pattern', properties: [], confidence: 1.0, reasoning: 'Session boundary.' },
667
+ { name: '$signup', category: 'acquisition', source: 'inferred:pattern', properties: [{ name: 'method', type: 'string' }], confidence: 0.9, reasoning: 'New account signal.' },
668
+ { name: '$login', category: 'engagement', source: 'inferred:pattern', properties: [{ name: 'method', type: 'string' }], confidence: 0.9, reasoning: 'Returning user signal.' },
669
+ { name: '$logout', category: 'engagement', source: 'inferred:pattern', properties: [], confidence: 0.9, reasoning: 'Session end.' },
670
+ { name: '$first_action', category: 'activation', source: 'inferred:pattern', properties: [], confidence: 0.8, reasoning: 'First meaningful interaction.' },
671
+ { name: 'click', category: 'engagement', source: 'inferred:pattern', properties: [{ name: 'selector', type: 'string' }], confidence: 1.0, reasoning: 'User clicks.' },
672
+ { name: 'scroll_depth', category: 'engagement', source: 'inferred:pattern', properties: [{ name: 'depth', type: 'number' }], confidence: 1.0, reasoning: 'Scroll engagement.' },
673
+ { name: 'form_submit', category: 'engagement', source: 'inferred:pattern', properties: [{ name: 'form_id', type: 'string' }], confidence: 0.9, reasoning: 'Form completion.' },
674
+ { name: 'engaged_session', category: 'engagement', source: 'inferred:pattern', properties: [], confidence: 1.0, reasoning: 'Quality session marker.' },
675
+ { name: '$search', category: 'engagement', source: 'inferred:pattern', properties: [{ name: 'query', type: 'string' }], confidence: 0.7, reasoning: 'Search intent.' },
676
+ { name: '$error', category: 'engagement', source: 'inferred:pattern', properties: [{ name: 'message', type: 'string' }], confidence: 0.8, reasoning: 'Client error tracking.' },
677
+ ],
678
+ funnels: [
679
+ { name: 'Signup Flow', category: 'acquisition', steps: ['$page_view', '$signup', '$login'], reasoning: 'Page view to signup to first login.' },
680
+ { name: 'Engagement', category: 'engagement', steps: ['$page_view', 'scroll_depth', 'engaged_session'], reasoning: 'Page view to scroll to engaged session.' },
681
+ ],
682
+ };
655
683
  }
656
684
  if (intent) {
657
685
  const io = authDeps.intent.io || {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gurulu/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Gurulu.io CLI — setup analytics in seconds",
5
5
  "bin": {
6
6
  "gurulu": "bin/gurulu.js"