@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.
@@ -2853,9 +2853,14 @@ var init_intent_router = __esm({
2853
2853
  * Routes a decoded AXIS frame to the appropriate handler.
2854
2854
  *
2855
2855
  * **Precedence:**
2856
- * 1. System Built-ins (`system.ping`, `public.ping`, `system.time`, `system.echo`)
2857
- * 2. Meta-intent execution (`INTENT.EXEC` / `axis.intent.exec`)
2858
- * 3. Dynamically registered handlers from modules.
2856
+ * 1. SDK meta-intents (`CHAIN.EXEC`, `INTENT.EXEC`)
2857
+ * 2. Dynamically registered handlers from modules
2858
+ * 3. Simple SDK built-in fallback (`system.ping`, `public.ping`, `system.time`, `system.echo`)
2859
+ *
2860
+ * Registered app handlers intentionally win over simple built-ins. This lets
2861
+ * applications attach sensors, rate limits, and custom responses to intents
2862
+ * like `system.ping` while keeping a default fallback for apps that do not
2863
+ * register their own handler.
2859
2864
  *
2860
2865
  * @param {AxisFrame} frame - The validated and decoded binary frame
2861
2866
  * @returns {Promise<AxisEffect>} The resulting effect of the execution
@@ -2909,6 +2914,16 @@ var init_intent_router = __esm({
2909
2914
  * This keeps route() focused on observer/error lifecycle concerns.
2910
2915
  */
2911
2916
  async routeResolvedIntent(intent, frame) {
2917
+ if (isChainExecIntent(intent)) {
2918
+ const chainRequest = this.parseChainRequestBody(frame.body);
2919
+ return this.executeChainRequest(frame, chainRequest);
2920
+ }
2921
+ if (isIntentExecIntent(intent)) {
2922
+ return this.routeIntentExec(frame);
2923
+ }
2924
+ if (this.handlers.has(intent)) {
2925
+ return this.routeRegisteredIntent(intent, frame);
2926
+ }
2912
2927
  const builtinEffect = routeSystemBuiltinIntent(
2913
2928
  intent,
2914
2929
  frame.body,
@@ -2920,13 +2935,6 @@ var init_intent_router = __esm({
2920
2935
  }
2921
2936
  return builtinEffect;
2922
2937
  }
2923
- if (isChainExecIntent(intent)) {
2924
- const chainRequest = this.parseChainRequestBody(frame.body);
2925
- return this.executeChainRequest(frame, chainRequest);
2926
- }
2927
- if (isIntentExecIntent(intent)) {
2928
- return this.routeIntentExec(frame);
2929
- }
2930
2938
  return this.routeRegisteredIntent(intent, frame);
2931
2939
  }
2932
2940
  /**