@ateam-ai-mobile/core 0.1.37 → 0.1.38

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/dist/index.mjs CHANGED
@@ -621,6 +621,26 @@ async function recordEvent(artifactId, event, surface) {
621
621
  } catch {
622
622
  }
623
623
  }
624
+ async function fetchLauncherPlaces() {
625
+ try {
626
+ const res = await authedFetch("/api/acs/launcher", { method: "GET" });
627
+ if (!res.ok) return null;
628
+ const data = await res.json();
629
+ if (!data?.ok) return null;
630
+ return {
631
+ mine: Array.isArray(data.mine) ? data.mine : [],
632
+ resting: Array.isArray(data.resting) ? data.resting : [],
633
+ hidden: Array.isArray(data.hidden) ? data.hidden : []
634
+ };
635
+ } catch (e) {
636
+ console.warn("[acs] /launcher failed:", e?.message || e);
637
+ return null;
638
+ }
639
+ }
640
+ function recordWidgetOpen(pluginId, surface) {
641
+ if (typeof pluginId !== "string" || !pluginId.startsWith("acs:")) return;
642
+ void recordEvent(pluginId.slice(4), "clicked", surface);
643
+ }
624
644
  async function listHomeActions() {
625
645
  try {
626
646
  const res = await authedFetch("/api/acs/home-actions", { method: "GET" });
@@ -2619,6 +2639,7 @@ export {
2619
2639
  disconnectAcsWs,
2620
2640
  exchangeHandoff,
2621
2641
  fetchConsumerConfig,
2642
+ fetchLauncherPlaces,
2622
2643
  focusPlugin,
2623
2644
  fontSize,
2624
2645
  getConfig,
@@ -2667,6 +2688,7 @@ export {
2667
2688
  readDevMode,
2668
2689
  recentDispatches as recentNotifDispatches,
2669
2690
  recordEvent,
2691
+ recordWidgetOpen,
2670
2692
  refreshToken,
2671
2693
  registerHostIntent,
2672
2694
  registerDevice as registerPushDevice,