@shuffleio/shuffle-mcps 0.0.63 → 0.0.65

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,155 +0,0 @@
1
- // ../Shuffle-Core/lib/analytics.ts
2
- import ReactGA from "react-ga4";
3
- import { isCloud } from "@shuffleio/shuffle-mcps";
4
- var GA_MEASUREMENT_ID = "G-YSYM9JDVEE";
5
- var _initialized = false;
6
- function initAnalytics() {
7
- if (_initialized) return;
8
- if (!isCloud()) return;
9
- if (typeof window === "undefined") return;
10
- ReactGA.initialize(GA_MEASUREMENT_ID);
11
- _initialized = true;
12
- }
13
- var canTrack = () => isCloud() && _initialized;
14
- var GA_EVENTS = {
15
- // Auth events
16
- LOGIN_START: { category: "auth", action: "login_start" },
17
- LOGIN_SUCCESS: { category: "auth", action: "login_success" },
18
- LOGIN_FAILURE: { category: "auth", action: "login_failure" },
19
- REGISTER_START: { category: "auth", action: "register_start" },
20
- REGISTER_SUCCESS: { category: "auth", action: "register_success" },
21
- LOGOUT: { category: "auth", action: "logout" },
22
- // Onboarding events
23
- ONBOARDING_START: { category: "onboarding", action: "onboarding_start" },
24
- ONBOARDING_STEP: { category: "onboarding", action: "onboarding_step" },
25
- ONBOARDING_COMPLETE: { category: "onboarding", action: "onboarding_complete" },
26
- CHALLENGE_SELECTED: { category: "onboarding", action: "challenge_selected" },
27
- TOOL_SELECTED: { category: "onboarding", action: "tool_selected" },
28
- ONBOARDING_APP_CLICK: { category: "onboarding", action: "app_click" },
29
- ONBOARDING_AUTH_TEST_SUCCESS: { category: "onboarding", action: "auth_test_success" },
30
- ONBOARDING_AUTH_TEST_FAILURE: { category: "onboarding", action: "auth_test_failure" },
31
- ONBOARDING_AUTOMATION_TOGGLE: { category: "onboarding", action: "automation_toggle" },
32
- ONBOARDING_PRODUCT_CHOICE: { category: "onboarding", action: "product_choice" },
33
- // Navigation events
34
- CTA_CLICK: { category: "navigation", action: "cta_click" },
35
- NAV_CLICK: { category: "navigation", action: "nav_click" },
36
- EXTERNAL_LINK: { category: "navigation", action: "external_link" },
37
- // Engagement events
38
- SEARCH_USED: { category: "engagement", action: "search_used" },
39
- CATEGORY_FILTER: { category: "engagement", action: "category_filter" },
40
- APP_VIEWED: { category: "engagement", action: "app_viewed" },
41
- // Conversion events
42
- FREE_TRIAL_START: { category: "conversion", action: "free_trial_start" },
43
- INTEGRATION_CONNECTED: { category: "conversion", action: "integration_connected" },
44
- // Incident events
45
- INCIDENT_AUTOMATION_CHANGE: { category: "incidents", action: "automation_change" },
46
- INCIDENT_CREATE: { category: "incidents", action: "create" },
47
- INCIDENT_RESOLVE: { category: "incidents", action: "resolve" },
48
- INCIDENT_BULK_RESOLVE: { category: "incidents", action: "bulk_resolve" },
49
- INCIDENT_SYNC: { category: "incidents", action: "sync" },
50
- INCIDENT_INGESTION_TOGGLE: { category: "incidents", action: "ingestion_toggle" },
51
- INCIDENT_MERGE: { category: "incidents", action: "merge" },
52
- // Detection events
53
- DETECTION_SENSOR_SELECT: { category: "detection", action: "sensor_select" },
54
- DETECTION_SENSOR_CHECK: { category: "detection", action: "sensor_check" },
55
- DETECTION_RULES_LOAD: { category: "detection", action: "rules_load" },
56
- DETECTION_DEPLOY_CLICK: { category: "detection", action: "deploy_click" },
57
- DETECTION_TEST_RUN: { category: "detection", action: "test_run" },
58
- DETECTION_STEP_EXPAND: { category: "detection", action: "step_expand" },
59
- DETECTION_ENV_CREATE: { category: "detection", action: "env_create" },
60
- // Demo tour funnel events.
61
- // Each fires with `label = stepId` and `value = stepIndex` so GA can build
62
- // a step-ordinal funnel (e.g. how many users reach step 5 of the demo).
63
- //
64
- // Funnel layers:
65
- // DEMO_START — user clicked "Start demo tour"
66
- // DEMO_LIVE_ENV_* — environment bootstrap (workflows + feeds + IOCs) result
67
- // DEMO_STEP_VIEW — user landed on a step (once per session per step)
68
- // DEMO_STEP_ADVANCE — user clicked Next from a step (counts as "successful
69
- // at this step" for steps without an explicit gate)
70
- // DEMO_STEP_COMPLETE — gated step's requirement was satisfied (e.g. webhook on)
71
- // DEMO_FORCE_CREATE_INCIDENTS — manual rescue button on the incidents step
72
- // DEMO_FINISH — user reached the final wrap step
73
- // DEMO_ABANDON — user closed/exited the tour before finishing
74
- // DEMO_CLEANUP — user clicked "Clean up demo data"
75
- // DEMO_MINIMIZE/RESTORE — drawer pill state
76
- DEMO_START: { category: "demo", action: "demo_start" },
77
- DEMO_LIVE_ENV_SUCCESS: { category: "demo", action: "demo_live_env_success" },
78
- DEMO_LIVE_ENV_FAILURE: { category: "demo", action: "demo_live_env_failure" },
79
- DEMO_STEP_VIEW: { category: "demo", action: "demo_step_view" },
80
- DEMO_STEP_ADVANCE: { category: "demo", action: "demo_step_advance" },
81
- DEMO_STEP_COMPLETE: { category: "demo", action: "demo_step_complete" },
82
- DEMO_FORCE_CREATE_INCIDENTS: { category: "demo", action: "demo_force_create_incidents" },
83
- DEMO_FINISH: { category: "demo", action: "demo_finish" },
84
- DEMO_ABANDON: { category: "demo", action: "demo_abandon" },
85
- DEMO_CLEANUP: { category: "demo", action: "demo_cleanup" },
86
- DEMO_MINIMIZE: { category: "demo", action: "demo_minimize" },
87
- DEMO_RESTORE: { category: "demo", action: "demo_restore" },
88
- // Host monitor (Add Host) funnel events.
89
- // OPEN — user opened the Add Host dialog
90
- // DEPLOY — advanced from "checks" to "deploy" step (saw the install command)
91
- // DETECTED — sensor actually checked in while the dialog was open (success)
92
- // DISMISS — dialog closed (or page unmounted) without a successful detection (abandonment)
93
- // Together these form a 4-step funnel: OPEN → DEPLOY → DETECTED, with DISMISS as the abandonment counter.
94
- MONITOR_ADD_HOST_OPEN: { category: "monitors", action: "add_host_open" },
95
- MONITOR_ADD_HOST_DEPLOY: { category: "monitors", action: "add_host_deploy" },
96
- MONITOR_ADD_HOST_DETECTED: { category: "monitors", action: "add_host_detected" },
97
- MONITOR_ADD_HOST_DISMISS: { category: "monitors", action: "add_host_dismiss" }
98
- };
99
- function trackEvent({ category, action, label, value, custom }) {
100
- if (!canTrack()) return;
101
- ReactGA.event(action, {
102
- event_category: category,
103
- event_label: label,
104
- value,
105
- ...custom
106
- });
107
- }
108
- function trackPredefinedEvent(event, label, value, custom) {
109
- trackEvent({
110
- category: event.category,
111
- action: event.action,
112
- label,
113
- value,
114
- custom
115
- });
116
- }
117
- function trackPageView(path, title) {
118
- if (!canTrack()) return;
119
- ReactGA.send({
120
- hitType: "pageview",
121
- page: path,
122
- title: title || (typeof document !== "undefined" ? document.title : void 0)
123
- });
124
- }
125
- function trackCTA(ctaName, location) {
126
- trackPredefinedEvent(GA_EVENTS.CTA_CLICK, ctaName, void 0, {
127
- cta_location: location
128
- });
129
- }
130
- function trackOnboardingStep(stepNumber, stepName) {
131
- trackPredefinedEvent(GA_EVENTS.ONBOARDING_STEP, stepName, stepNumber);
132
- }
133
- function trackReferralParams() {
134
- if (typeof window === "undefined") return;
135
- const params = new URLSearchParams(window.location.search);
136
- const utmContent = params.get("utm_content");
137
- const shuffleRef = params.get("shuffle_ref");
138
- if (utmContent) {
139
- trackEvent({ category: "navigation", action: "utm_content", label: utmContent });
140
- }
141
- if (shuffleRef) {
142
- trackEvent({ category: "navigation", action: "shuffle_ref", label: shuffleRef });
143
- }
144
- }
145
-
146
- export {
147
- initAnalytics,
148
- GA_EVENTS,
149
- trackEvent,
150
- trackPredefinedEvent,
151
- trackPageView,
152
- trackCTA,
153
- trackOnboardingStep,
154
- trackReferralParams
155
- };
@@ -1,27 +0,0 @@
1
- import {
2
- DATASTORE_CATEGORIES,
3
- deleteDatastoreItem,
4
- deleteDatastoreItems,
5
- filterItemsByCategory,
6
- getDatastoreByCategory,
7
- getDatastoreItem,
8
- getDatastoreItemPublic,
9
- getDatastorePageSize,
10
- setDatastoreItem,
11
- setDatastoreItems,
12
- setRuntimeOrgId
13
- } from "./chunk-QC2DO6WV.mjs";
14
- import "./chunk-XNE7PKME.mjs";
15
- export {
16
- DATASTORE_CATEGORIES,
17
- deleteDatastoreItem,
18
- deleteDatastoreItems,
19
- filterItemsByCategory,
20
- getDatastoreByCategory,
21
- getDatastoreItem,
22
- getDatastoreItemPublic,
23
- getDatastorePageSize,
24
- setDatastoreItem,
25
- setDatastoreItems,
26
- setRuntimeOrgId
27
- };