@nextera.one/axis-server-sdk 2.3.13 → 2.3.14

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
@@ -2778,9 +2778,14 @@ var init_intent_router = __esm({
2778
2778
  * Routes a decoded AXIS frame to the appropriate handler.
2779
2779
  *
2780
2780
  * **Precedence:**
2781
- * 1. System Built-ins (`system.ping`, `public.ping`, `system.time`, `system.echo`)
2782
- * 2. Meta-intent execution (`INTENT.EXEC` / `axis.intent.exec`)
2783
- * 3. Dynamically registered handlers from modules.
2781
+ * 1. SDK meta-intents (`CHAIN.EXEC`, `INTENT.EXEC`)
2782
+ * 2. Dynamically registered handlers from modules
2783
+ * 3. Simple SDK built-in fallback (`system.ping`, `public.ping`, `system.time`, `system.echo`)
2784
+ *
2785
+ * Registered app handlers intentionally win over simple built-ins. This lets
2786
+ * applications attach sensors, rate limits, and custom responses to intents
2787
+ * like `system.ping` while keeping a default fallback for apps that do not
2788
+ * register their own handler.
2784
2789
  *
2785
2790
  * @param {AxisFrame} frame - The validated and decoded binary frame
2786
2791
  * @returns {Promise<AxisEffect>} The resulting effect of the execution
@@ -2834,6 +2839,16 @@ var init_intent_router = __esm({
2834
2839
  * This keeps route() focused on observer/error lifecycle concerns.
2835
2840
  */
2836
2841
  async routeResolvedIntent(intent, frame) {
2842
+ if (isChainExecIntent(intent)) {
2843
+ const chainRequest = this.parseChainRequestBody(frame.body);
2844
+ return this.executeChainRequest(frame, chainRequest);
2845
+ }
2846
+ if (isIntentExecIntent(intent)) {
2847
+ return this.routeIntentExec(frame);
2848
+ }
2849
+ if (this.handlers.has(intent)) {
2850
+ return this.routeRegisteredIntent(intent, frame);
2851
+ }
2837
2852
  const builtinEffect = routeSystemBuiltinIntent(
2838
2853
  intent,
2839
2854
  frame.body,
@@ -2845,13 +2860,6 @@ var init_intent_router = __esm({
2845
2860
  }
2846
2861
  return builtinEffect;
2847
2862
  }
2848
- if (isChainExecIntent(intent)) {
2849
- const chainRequest = this.parseChainRequestBody(frame.body);
2850
- return this.executeChainRequest(frame, chainRequest);
2851
- }
2852
- if (isIntentExecIntent(intent)) {
2853
- return this.routeIntentExec(frame);
2854
- }
2855
2863
  return this.routeRegisteredIntent(intent, frame);
2856
2864
  }
2857
2865
  /**