@nextera.one/axis-server-sdk 2.3.8 → 2.3.10

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.
@@ -464,6 +464,8 @@ declare class IntentRouter {
464
464
  private ccePipelineConfig;
465
465
  private handlerIntents;
466
466
  private handlerPrefixes;
467
+ private handlerByPrefix;
468
+ private handlerByIntent;
467
469
  private handlerClassSensors;
468
470
  private handlerClassObservers;
469
471
  constructor(dependencyResolver?: AxisDependencyResolver, observerDispatcher?: ObserverDispatcherService, sensorRegistry?: SensorRegistry);
@@ -510,6 +512,7 @@ declare class IntentRouter {
510
512
  getHandlerPrefix(handlerName: string): string | undefined;
511
513
  getHandlerClassSensors(handlerName: string): AxisIntentSensorBinding[] | undefined;
512
514
  getHandlerClassObservers(handlerName: string): AxisObserverBinding[] | undefined;
515
+ resolveIntentAlias(intent: string): string;
513
516
  getHandlerSummary(handlerName: string): HandlerSummary | null;
514
517
  getAllHandlerSummaries(): Map<string, HandlerSummary>;
515
518
  private emitIntentObservers;
@@ -746,6 +749,25 @@ declare class IntentRegistrySensor implements AxisSensor {
746
749
  run(input: SensorInput): Promise<SensorDecision>;
747
750
  }
748
751
 
752
+ type LawArticlePresenceMode = "off" | "audit" | "strict";
753
+ interface LawArticlePresenceSensorOptions {
754
+ mode?: LawArticlePresenceMode | (() => LawArticlePresenceMode);
755
+ exemptIntents?: string[];
756
+ missingCode?: string;
757
+ auditScoreDelta?: number;
758
+ getLawArticleCount: (intent: string, input: SensorInput) => number | Promise<number>;
759
+ }
760
+ declare class LawArticlePresenceSensor implements AxisSensor {
761
+ private readonly options;
762
+ readonly name = "LawArticlePresenceSensor";
763
+ readonly order: number;
764
+ constructor(options: LawArticlePresenceSensorOptions);
765
+ supports(input: SensorInput): boolean;
766
+ run(input: SensorInput): Promise<SensorDecision>;
767
+ private mode;
768
+ private exemptIntents;
769
+ }
770
+
749
771
  declare class LawEvaluationSensor implements AxisSensor {
750
772
  private readonly options;
751
773
  private readonly logger;
@@ -888,4 +910,4 @@ declare class VarintHardeningSensor implements AxisSensor {
888
910
  run(input: SensorInput): Promise<SensorDecision>;
889
911
  }
890
912
 
891
- export { BodyBudgetSensor as $, type AxisIntentSensorOptions as A, type AxisIntentSensorBinding as B, type ChainOptions as C, type AxisIntentSensorBindingOptions as D, type AxisIntentSensorRef as E, type AxisIntentSensorWhen as F, type AxisKeyExchangeRef as G, type AxisLawArticleSummary as H, type IntentTlvField as I, type AxisLawDecision as J, type AxisLawEvaluationContext as K, type AxisLawEvaluationResult as L, type AxisLawEvaluator as M, type AxisObserverBinding as N, ObserverDispatcherService as O, type AxisObserverBindingOptions as P, type AxisObserverContext as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverDefinition as U, type AxisObserverEvent as V, type AxisObserverRef as W, type AxisObserverRegistration as X, AxisPublic as Y, AxisRateLimit as Z, type AxisRateLimitConfig as _, type AxisObserverBindingInput as a, type TlvValidatorMeta as a$, CAPSULE_POLICY_METADATA_KEY as a0, CONTRACT_METADATA_KEY as a1, CapabilityEnforcementSensor as a2, Capsule as a3, CapsulePolicy as a4, type CapsulePolicyOptions as a5, type CapsuleScopeMode as a6, ChunkHashSensor as a7, Contract as a8, DEFAULT_CONTRACTS as a9, RequiredProof as aA, RiskDecision as aB, type RiskEvaluation as aC, RiskGateSensor as aD, type RiskGateSensorOptions as aE, type RiskSignal as aF, type RiskSignalCollector as aG, SENSITIVITY_METADATA_KEY as aH, SchemaValidationSensor as aI, Sensitivity as aJ, StreamScopeSensor as aK, TLVParseSensor as aL, TLV_FIELDS_KEY as aM, TLV_VALIDATORS_KEY as aN, type TickAuthCapsuleRef as aO, TickAuthSensor as aP, type TickAuthSensorOptions as aQ, type TickAuthVerifier as aR, TlvEnum as aS, TlvField as aT, type TlvFieldKind as aU, type TlvFieldMeta as aV, type TlvFieldOptions as aW, TlvMinLen as aX, TlvRange as aY, TlvUtf8Pattern as aZ, TlvValidate as a_, EntropySensor as aa, type ExecutionContract as ab, ExecutionTimeoutSensor as ac, FALLBACK_CONTRACT as ad, FrameBudgetSensor as ae, FrameHeaderSanitySensor as af, HeaderTLVLimitSensor as ag, INTENT_METADATA_KEY as ah, INTENT_ROUTES_KEY as ai, Intent as aj, IntentAllowlistSensor as ak, type IntentKind as al, type IntentOptions as am, IntentRegistrySensor as an, type IntentRoute as ao, LawEvaluationSensor as ap, type LawEvaluationSensorOptions as aq, OBSERVER_BINDINGS_KEY as ar, OBSERVER_METADATA_KEY as as, Observer as at, ObserverRegistry as au, ProofPresenceSensor as av, ProtocolStrictSensor as aw, REQUIRED_PROOF_METADATA_KEY as ax, ReceiptPolicySensor as ay, type RegisteredChainConfig as az, type AxisIntentSensorBindingInput as b, TpsSensor as b0, type TpsSensorOptions as b1, VarintHardeningSensor as b2, Witness as b3, buildAxisLawEvaluationContext as b4, toIntentSensorBinding as b5, toObserverBinding as b6, IntentRouter as c, type AxisChainEnvelope as d, type AxisChainResult as e, type AxisCapsuleRef as f, type AxisChainStep as g, type AxisContext as h, AXIS_ANONYMOUS_KEY as i, AXIS_AUTHORIZED_KEY as j, AXIS_META_KEY as k, AXIS_PUBLIC_KEY as l, AXIS_RATE_LIMIT_KEY as m, AccessProfileResolverSensor as n, Axis as o, AxisAnonymous as p, AxisAuthorized as q, type AxisChainEncryption as r, type AxisChainRequest as s, type AxisChainStatus as t, type AxisChainStepResult as u, type AxisChainStepStatus as v, type AxisEffect as w, type AxisExecutionMode as x, type AxisIntentEnvelope as y, type AxisIntentObserver as z };
913
+ export { BodyBudgetSensor as $, type AxisIntentSensorOptions as A, type AxisIntentSensorBinding as B, type ChainOptions as C, type AxisIntentSensorBindingOptions as D, type AxisIntentSensorRef as E, type AxisIntentSensorWhen as F, type AxisKeyExchangeRef as G, type AxisLawArticleSummary as H, type IntentTlvField as I, type AxisLawDecision as J, type AxisLawEvaluationContext as K, type AxisLawEvaluationResult as L, type AxisLawEvaluator as M, type AxisObserverBinding as N, ObserverDispatcherService as O, type AxisObserverBindingOptions as P, type AxisObserverContext as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverDefinition as U, type AxisObserverEvent as V, type AxisObserverRef as W, type AxisObserverRegistration as X, AxisPublic as Y, AxisRateLimit as Z, type AxisRateLimitConfig as _, type AxisObserverBindingInput as a, TlvRange as a$, CAPSULE_POLICY_METADATA_KEY as a0, CONTRACT_METADATA_KEY as a1, CapabilityEnforcementSensor as a2, Capsule as a3, CapsulePolicy as a4, type CapsulePolicyOptions as a5, type CapsuleScopeMode as a6, ChunkHashSensor as a7, Contract as a8, DEFAULT_CONTRACTS as a9, REQUIRED_PROOF_METADATA_KEY as aA, ReceiptPolicySensor as aB, type RegisteredChainConfig as aC, RequiredProof as aD, RiskDecision as aE, type RiskEvaluation as aF, RiskGateSensor as aG, type RiskGateSensorOptions as aH, type RiskSignal as aI, type RiskSignalCollector as aJ, SENSITIVITY_METADATA_KEY as aK, SchemaValidationSensor as aL, Sensitivity as aM, StreamScopeSensor as aN, TLVParseSensor as aO, TLV_FIELDS_KEY as aP, TLV_VALIDATORS_KEY as aQ, type TickAuthCapsuleRef as aR, TickAuthSensor as aS, type TickAuthSensorOptions as aT, type TickAuthVerifier as aU, TlvEnum as aV, TlvField as aW, type TlvFieldKind as aX, type TlvFieldMeta as aY, type TlvFieldOptions as aZ, TlvMinLen as a_, EntropySensor as aa, type ExecutionContract as ab, ExecutionTimeoutSensor as ac, FALLBACK_CONTRACT as ad, FrameBudgetSensor as ae, FrameHeaderSanitySensor as af, HeaderTLVLimitSensor as ag, INTENT_METADATA_KEY as ah, INTENT_ROUTES_KEY as ai, Intent as aj, IntentAllowlistSensor as ak, type IntentKind as al, type IntentOptions as am, IntentRegistrySensor as an, type IntentRoute as ao, type LawArticlePresenceMode as ap, LawArticlePresenceSensor as aq, type LawArticlePresenceSensorOptions as ar, LawEvaluationSensor as as, type LawEvaluationSensorOptions as at, OBSERVER_BINDINGS_KEY as au, OBSERVER_METADATA_KEY as av, Observer as aw, ObserverRegistry as ax, ProofPresenceSensor as ay, ProtocolStrictSensor as az, type AxisIntentSensorBindingInput as b, TlvUtf8Pattern as b0, TlvValidate as b1, type TlvValidatorMeta as b2, TpsSensor as b3, type TpsSensorOptions as b4, VarintHardeningSensor as b5, Witness as b6, buildAxisLawEvaluationContext as b7, toIntentSensorBinding as b8, toObserverBinding as b9, IntentRouter as c, type AxisChainEnvelope as d, type AxisChainResult as e, type AxisCapsuleRef as f, type AxisChainStep as g, type AxisContext as h, AXIS_ANONYMOUS_KEY as i, AXIS_AUTHORIZED_KEY as j, AXIS_META_KEY as k, AXIS_PUBLIC_KEY as l, AXIS_RATE_LIMIT_KEY as m, AccessProfileResolverSensor as n, Axis as o, AxisAnonymous as p, AxisAuthorized as q, type AxisChainEncryption as r, type AxisChainRequest as s, type AxisChainStatus as t, type AxisChainStepResult as u, type AxisChainStepStatus as v, type AxisEffect as w, type AxisExecutionMode as x, type AxisIntentEnvelope as y, type AxisIntentObserver as z };
@@ -464,6 +464,8 @@ declare class IntentRouter {
464
464
  private ccePipelineConfig;
465
465
  private handlerIntents;
466
466
  private handlerPrefixes;
467
+ private handlerByPrefix;
468
+ private handlerByIntent;
467
469
  private handlerClassSensors;
468
470
  private handlerClassObservers;
469
471
  constructor(dependencyResolver?: AxisDependencyResolver, observerDispatcher?: ObserverDispatcherService, sensorRegistry?: SensorRegistry);
@@ -510,6 +512,7 @@ declare class IntentRouter {
510
512
  getHandlerPrefix(handlerName: string): string | undefined;
511
513
  getHandlerClassSensors(handlerName: string): AxisIntentSensorBinding[] | undefined;
512
514
  getHandlerClassObservers(handlerName: string): AxisObserverBinding[] | undefined;
515
+ resolveIntentAlias(intent: string): string;
513
516
  getHandlerSummary(handlerName: string): HandlerSummary | null;
514
517
  getAllHandlerSummaries(): Map<string, HandlerSummary>;
515
518
  private emitIntentObservers;
@@ -746,6 +749,25 @@ declare class IntentRegistrySensor implements AxisSensor {
746
749
  run(input: SensorInput): Promise<SensorDecision>;
747
750
  }
748
751
 
752
+ type LawArticlePresenceMode = "off" | "audit" | "strict";
753
+ interface LawArticlePresenceSensorOptions {
754
+ mode?: LawArticlePresenceMode | (() => LawArticlePresenceMode);
755
+ exemptIntents?: string[];
756
+ missingCode?: string;
757
+ auditScoreDelta?: number;
758
+ getLawArticleCount: (intent: string, input: SensorInput) => number | Promise<number>;
759
+ }
760
+ declare class LawArticlePresenceSensor implements AxisSensor {
761
+ private readonly options;
762
+ readonly name = "LawArticlePresenceSensor";
763
+ readonly order: number;
764
+ constructor(options: LawArticlePresenceSensorOptions);
765
+ supports(input: SensorInput): boolean;
766
+ run(input: SensorInput): Promise<SensorDecision>;
767
+ private mode;
768
+ private exemptIntents;
769
+ }
770
+
749
771
  declare class LawEvaluationSensor implements AxisSensor {
750
772
  private readonly options;
751
773
  private readonly logger;
@@ -888,4 +910,4 @@ declare class VarintHardeningSensor implements AxisSensor {
888
910
  run(input: SensorInput): Promise<SensorDecision>;
889
911
  }
890
912
 
891
- export { BodyBudgetSensor as $, type AxisIntentSensorOptions as A, type AxisIntentSensorBinding as B, type ChainOptions as C, type AxisIntentSensorBindingOptions as D, type AxisIntentSensorRef as E, type AxisIntentSensorWhen as F, type AxisKeyExchangeRef as G, type AxisLawArticleSummary as H, type IntentTlvField as I, type AxisLawDecision as J, type AxisLawEvaluationContext as K, type AxisLawEvaluationResult as L, type AxisLawEvaluator as M, type AxisObserverBinding as N, ObserverDispatcherService as O, type AxisObserverBindingOptions as P, type AxisObserverContext as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverDefinition as U, type AxisObserverEvent as V, type AxisObserverRef as W, type AxisObserverRegistration as X, AxisPublic as Y, AxisRateLimit as Z, type AxisRateLimitConfig as _, type AxisObserverBindingInput as a, type TlvValidatorMeta as a$, CAPSULE_POLICY_METADATA_KEY as a0, CONTRACT_METADATA_KEY as a1, CapabilityEnforcementSensor as a2, Capsule as a3, CapsulePolicy as a4, type CapsulePolicyOptions as a5, type CapsuleScopeMode as a6, ChunkHashSensor as a7, Contract as a8, DEFAULT_CONTRACTS as a9, RequiredProof as aA, RiskDecision as aB, type RiskEvaluation as aC, RiskGateSensor as aD, type RiskGateSensorOptions as aE, type RiskSignal as aF, type RiskSignalCollector as aG, SENSITIVITY_METADATA_KEY as aH, SchemaValidationSensor as aI, Sensitivity as aJ, StreamScopeSensor as aK, TLVParseSensor as aL, TLV_FIELDS_KEY as aM, TLV_VALIDATORS_KEY as aN, type TickAuthCapsuleRef as aO, TickAuthSensor as aP, type TickAuthSensorOptions as aQ, type TickAuthVerifier as aR, TlvEnum as aS, TlvField as aT, type TlvFieldKind as aU, type TlvFieldMeta as aV, type TlvFieldOptions as aW, TlvMinLen as aX, TlvRange as aY, TlvUtf8Pattern as aZ, TlvValidate as a_, EntropySensor as aa, type ExecutionContract as ab, ExecutionTimeoutSensor as ac, FALLBACK_CONTRACT as ad, FrameBudgetSensor as ae, FrameHeaderSanitySensor as af, HeaderTLVLimitSensor as ag, INTENT_METADATA_KEY as ah, INTENT_ROUTES_KEY as ai, Intent as aj, IntentAllowlistSensor as ak, type IntentKind as al, type IntentOptions as am, IntentRegistrySensor as an, type IntentRoute as ao, LawEvaluationSensor as ap, type LawEvaluationSensorOptions as aq, OBSERVER_BINDINGS_KEY as ar, OBSERVER_METADATA_KEY as as, Observer as at, ObserverRegistry as au, ProofPresenceSensor as av, ProtocolStrictSensor as aw, REQUIRED_PROOF_METADATA_KEY as ax, ReceiptPolicySensor as ay, type RegisteredChainConfig as az, type AxisIntentSensorBindingInput as b, TpsSensor as b0, type TpsSensorOptions as b1, VarintHardeningSensor as b2, Witness as b3, buildAxisLawEvaluationContext as b4, toIntentSensorBinding as b5, toObserverBinding as b6, IntentRouter as c, type AxisChainEnvelope as d, type AxisChainResult as e, type AxisCapsuleRef as f, type AxisChainStep as g, type AxisContext as h, AXIS_ANONYMOUS_KEY as i, AXIS_AUTHORIZED_KEY as j, AXIS_META_KEY as k, AXIS_PUBLIC_KEY as l, AXIS_RATE_LIMIT_KEY as m, AccessProfileResolverSensor as n, Axis as o, AxisAnonymous as p, AxisAuthorized as q, type AxisChainEncryption as r, type AxisChainRequest as s, type AxisChainStatus as t, type AxisChainStepResult as u, type AxisChainStepStatus as v, type AxisEffect as w, type AxisExecutionMode as x, type AxisIntentEnvelope as y, type AxisIntentObserver as z };
913
+ export { BodyBudgetSensor as $, type AxisIntentSensorOptions as A, type AxisIntentSensorBinding as B, type ChainOptions as C, type AxisIntentSensorBindingOptions as D, type AxisIntentSensorRef as E, type AxisIntentSensorWhen as F, type AxisKeyExchangeRef as G, type AxisLawArticleSummary as H, type IntentTlvField as I, type AxisLawDecision as J, type AxisLawEvaluationContext as K, type AxisLawEvaluationResult as L, type AxisLawEvaluator as M, type AxisObserverBinding as N, ObserverDispatcherService as O, type AxisObserverBindingOptions as P, type AxisObserverContext as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverDefinition as U, type AxisObserverEvent as V, type AxisObserverRef as W, type AxisObserverRegistration as X, AxisPublic as Y, AxisRateLimit as Z, type AxisRateLimitConfig as _, type AxisObserverBindingInput as a, TlvRange as a$, CAPSULE_POLICY_METADATA_KEY as a0, CONTRACT_METADATA_KEY as a1, CapabilityEnforcementSensor as a2, Capsule as a3, CapsulePolicy as a4, type CapsulePolicyOptions as a5, type CapsuleScopeMode as a6, ChunkHashSensor as a7, Contract as a8, DEFAULT_CONTRACTS as a9, REQUIRED_PROOF_METADATA_KEY as aA, ReceiptPolicySensor as aB, type RegisteredChainConfig as aC, RequiredProof as aD, RiskDecision as aE, type RiskEvaluation as aF, RiskGateSensor as aG, type RiskGateSensorOptions as aH, type RiskSignal as aI, type RiskSignalCollector as aJ, SENSITIVITY_METADATA_KEY as aK, SchemaValidationSensor as aL, Sensitivity as aM, StreamScopeSensor as aN, TLVParseSensor as aO, TLV_FIELDS_KEY as aP, TLV_VALIDATORS_KEY as aQ, type TickAuthCapsuleRef as aR, TickAuthSensor as aS, type TickAuthSensorOptions as aT, type TickAuthVerifier as aU, TlvEnum as aV, TlvField as aW, type TlvFieldKind as aX, type TlvFieldMeta as aY, type TlvFieldOptions as aZ, TlvMinLen as a_, EntropySensor as aa, type ExecutionContract as ab, ExecutionTimeoutSensor as ac, FALLBACK_CONTRACT as ad, FrameBudgetSensor as ae, FrameHeaderSanitySensor as af, HeaderTLVLimitSensor as ag, INTENT_METADATA_KEY as ah, INTENT_ROUTES_KEY as ai, Intent as aj, IntentAllowlistSensor as ak, type IntentKind as al, type IntentOptions as am, IntentRegistrySensor as an, type IntentRoute as ao, type LawArticlePresenceMode as ap, LawArticlePresenceSensor as aq, type LawArticlePresenceSensorOptions as ar, LawEvaluationSensor as as, type LawEvaluationSensorOptions as at, OBSERVER_BINDINGS_KEY as au, OBSERVER_METADATA_KEY as av, Observer as aw, ObserverRegistry as ax, ProofPresenceSensor as ay, ProtocolStrictSensor as az, type AxisIntentSensorBindingInput as b, TlvUtf8Pattern as b0, TlvValidate as b1, type TlvValidatorMeta as b2, TpsSensor as b3, type TpsSensorOptions as b4, VarintHardeningSensor as b5, Witness as b6, buildAxisLawEvaluationContext as b7, toIntentSensorBinding as b8, toObserverBinding as b9, IntentRouter as c, type AxisChainEnvelope as d, type AxisChainResult as e, type AxisCapsuleRef as f, type AxisChainStep as g, type AxisContext as h, AXIS_ANONYMOUS_KEY as i, AXIS_AUTHORIZED_KEY as j, AXIS_META_KEY as k, AXIS_PUBLIC_KEY as l, AXIS_RATE_LIMIT_KEY as m, AccessProfileResolverSensor as n, Axis as o, AxisAnonymous as p, AxisAuthorized as q, type AxisChainEncryption as r, type AxisChainRequest as s, type AxisChainStatus as t, type AxisChainStepResult as u, type AxisChainStepStatus as v, type AxisEffect as w, type AxisExecutionMode as x, type AxisIntentEnvelope as y, type AxisIntentObserver as z };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, I as IntentTlvField, T as TlvValidatorFn, c as IntentRouter, O as ObserverDispatcherService, d as AxisChainEnvelope, e as AxisChainResult, f as AxisCapsuleRef, g as AxisChainStep, h as AxisContext, S as SensorRegistry } from './index-Bdahn8mq.mjs';
2
- export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawEvaluationSensor, aq as LawEvaluationSensorOptions, ar as OBSERVER_BINDINGS_KEY, as as OBSERVER_METADATA_KEY, at as Observer, au as ObserverRegistry, av as ProofPresenceSensor, aw as ProtocolStrictSensor, ax as REQUIRED_PROOF_METADATA_KEY, ay as ReceiptPolicySensor, az as RegisteredChainConfig, aA as RequiredProof, aB as RiskDecision, aC as RiskEvaluation, aD as RiskGateSensor, aE as RiskGateSensorOptions, aF as RiskSignal, aG as RiskSignalCollector, aH as SENSITIVITY_METADATA_KEY, aI as SchemaValidationSensor, aJ as Sensitivity, aK as StreamScopeSensor, aL as TLVParseSensor, aM as TLV_FIELDS_KEY, aN as TLV_VALIDATORS_KEY, aO as TickAuthCapsuleRef, aP as TickAuthSensor, aQ as TickAuthSensorOptions, aR as TickAuthVerifier, aS as TlvEnum, aT as TlvField, aU as TlvFieldKind, aV as TlvFieldMeta, aW as TlvFieldOptions, aX as TlvMinLen, aY as TlvRange, aZ as TlvUtf8Pattern, a_ as TlvValidate, a$ as TlvValidatorMeta, b0 as TpsSensor, b1 as TpsSensorOptions, b2 as VarintHardeningSensor, b3 as Witness, b4 as buildAxisLawEvaluationContext, b5 as toIntentSensorBinding, b6 as toObserverBinding } from './index-Bdahn8mq.mjs';
1
+ import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, I as IntentTlvField, T as TlvValidatorFn, c as IntentRouter, O as ObserverDispatcherService, d as AxisChainEnvelope, e as AxisChainResult, f as AxisCapsuleRef, g as AxisChainStep, h as AxisContext, S as SensorRegistry } from './index-Bquulp8S.mjs';
2
+ export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, at as LawEvaluationSensorOptions, au as OBSERVER_BINDINGS_KEY, av as OBSERVER_METADATA_KEY, aw as Observer, ax as ObserverRegistry, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aA as REQUIRED_PROOF_METADATA_KEY, aB as ReceiptPolicySensor, aC as RegisteredChainConfig, aD as RequiredProof, aE as RiskDecision, aF as RiskEvaluation, aG as RiskGateSensor, aH as RiskGateSensorOptions, aI as RiskSignal, aJ as RiskSignalCollector, aK as SENSITIVITY_METADATA_KEY, aL as SchemaValidationSensor, aM as Sensitivity, aN as StreamScopeSensor, aO as TLVParseSensor, aP as TLV_FIELDS_KEY, aQ as TLV_VALIDATORS_KEY, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, aV as TlvEnum, aW as TlvField, aX as TlvFieldKind, aY as TlvFieldMeta, aZ as TlvFieldOptions, a_ as TlvMinLen, a$ as TlvRange, b0 as TlvUtf8Pattern, b1 as TlvValidate, b2 as TlvValidatorMeta, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor, b6 as Witness, b7 as buildAxisLawEvaluationContext, b8 as toIntentSensorBinding, b9 as toObserverBinding } from './index-Bquulp8S.mjs';
3
3
  import { AxisFrame } from '@nextera.one/axis-protocol';
4
4
  export { AXIS_MAGIC, AXIS_VERSION, AxisBinaryFrame, AxisFrame, TLV as AxisTlvType, ERR_BAD_SIGNATURE, ERR_CONTRACT_VIOLATION, ERR_INVALID_PACKET, ERR_REPLAY_DETECTED, FLAG_BODY_TLV, FLAG_CHAIN_REQ, FLAG_HAS_WITNESS, MAX_BODY_LEN, MAX_FRAME_LEN, MAX_HDR_LEN, MAX_SIG_LEN, NCERT_ALG, NCERT_EXP, NCERT_ISSUER_KID, NCERT_KID, NCERT_NBF, NCERT_NODE_ID, NCERT_PAYLOAD, NCERT_PUB, NCERT_SCOPE, NCERT_SIG, PROOF_CAPSULE, PROOF_JWT, PROOF_LOOM, PROOF_MTLS, PROOF_NONE, PROOF_WITNESS, TLV, TLV_ACTOR_ID, TLV_AUD, TLV_BODY_ARR, TLV_BODY_OBJ, TLV_CAPSULE, TLV_EFFECT, TLV_ERROR_CODE, TLV_ERROR_MSG, TLV_INDEX, TLV_INTENT, TLV_KID, TLV_LOOM_PRESENCE_ID, TLV_LOOM_THREAD_HASH, TLV_LOOM_WRIT, TLV_NODE, TLV_NODE_CERT_HASH, TLV_NODE_KID, TLV_NONCE, TLV_OFFSET, TLV_OK, TLV_PID, TLV_LOOM_PRESENCE_ID as TLV_PRESENCE_ID, TLV_PREV_HASH, TLV_PROOF_REF, TLV_PROOF_TYPE, TLV_REALM, TLV_RECEIPT_HASH, TLV_RID, TLV_SHA256_CHUNK, TLV_LOOM_THREAD_HASH as TLV_THREAD_HASH, TLV_TRACE_ID, TLV_TS, TLV_UPLOAD_ID, TLV_LOOM_WRIT as TLV_WRIT, decodeArray, decodeFrame, decodeObject, decodeTLVs, decodeTLVsList, decodeVarint, encodeFrame, encodeTLVs, encodeVarint, getSignTarget, varintLength } from '@nextera.one/axis-protocol';
5
5
  import { A as AxisObservation, L as LoomReceipt, T as ThreadState, W as WritValidationResult, G as Grant, a as GrantCapability, P as PresenceDeclaration, b as PresenceChallenge, c as Writ, R as Revocation, d as WritBody, e as WritMeta, f as PresenceReceipt, g as GrantStatus, h as PresenceStatus, i as PresenceProof, j as GrantValidationResult, k as PresenceVerifyResult } from './index-CXewlhg-.mjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, I as IntentTlvField, T as TlvValidatorFn, c as IntentRouter, O as ObserverDispatcherService, d as AxisChainEnvelope, e as AxisChainResult, f as AxisCapsuleRef, g as AxisChainStep, h as AxisContext, S as SensorRegistry } from './index-DRnTsYrk.js';
2
- export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawEvaluationSensor, aq as LawEvaluationSensorOptions, ar as OBSERVER_BINDINGS_KEY, as as OBSERVER_METADATA_KEY, at as Observer, au as ObserverRegistry, av as ProofPresenceSensor, aw as ProtocolStrictSensor, ax as REQUIRED_PROOF_METADATA_KEY, ay as ReceiptPolicySensor, az as RegisteredChainConfig, aA as RequiredProof, aB as RiskDecision, aC as RiskEvaluation, aD as RiskGateSensor, aE as RiskGateSensorOptions, aF as RiskSignal, aG as RiskSignalCollector, aH as SENSITIVITY_METADATA_KEY, aI as SchemaValidationSensor, aJ as Sensitivity, aK as StreamScopeSensor, aL as TLVParseSensor, aM as TLV_FIELDS_KEY, aN as TLV_VALIDATORS_KEY, aO as TickAuthCapsuleRef, aP as TickAuthSensor, aQ as TickAuthSensorOptions, aR as TickAuthVerifier, aS as TlvEnum, aT as TlvField, aU as TlvFieldKind, aV as TlvFieldMeta, aW as TlvFieldOptions, aX as TlvMinLen, aY as TlvRange, aZ as TlvUtf8Pattern, a_ as TlvValidate, a$ as TlvValidatorMeta, b0 as TpsSensor, b1 as TpsSensorOptions, b2 as VarintHardeningSensor, b3 as Witness, b4 as buildAxisLawEvaluationContext, b5 as toIntentSensorBinding, b6 as toObserverBinding } from './index-DRnTsYrk.js';
1
+ import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, I as IntentTlvField, T as TlvValidatorFn, c as IntentRouter, O as ObserverDispatcherService, d as AxisChainEnvelope, e as AxisChainResult, f as AxisCapsuleRef, g as AxisChainStep, h as AxisContext, S as SensorRegistry } from './index-C5LdnkOB.js';
2
+ export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, at as LawEvaluationSensorOptions, au as OBSERVER_BINDINGS_KEY, av as OBSERVER_METADATA_KEY, aw as Observer, ax as ObserverRegistry, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aA as REQUIRED_PROOF_METADATA_KEY, aB as ReceiptPolicySensor, aC as RegisteredChainConfig, aD as RequiredProof, aE as RiskDecision, aF as RiskEvaluation, aG as RiskGateSensor, aH as RiskGateSensorOptions, aI as RiskSignal, aJ as RiskSignalCollector, aK as SENSITIVITY_METADATA_KEY, aL as SchemaValidationSensor, aM as Sensitivity, aN as StreamScopeSensor, aO as TLVParseSensor, aP as TLV_FIELDS_KEY, aQ as TLV_VALIDATORS_KEY, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, aV as TlvEnum, aW as TlvField, aX as TlvFieldKind, aY as TlvFieldMeta, aZ as TlvFieldOptions, a_ as TlvMinLen, a$ as TlvRange, b0 as TlvUtf8Pattern, b1 as TlvValidate, b2 as TlvValidatorMeta, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor, b6 as Witness, b7 as buildAxisLawEvaluationContext, b8 as toIntentSensorBinding, b9 as toObserverBinding } from './index-C5LdnkOB.js';
3
3
  import { AxisFrame } from '@nextera.one/axis-protocol';
4
4
  export { AXIS_MAGIC, AXIS_VERSION, AxisBinaryFrame, AxisFrame, TLV as AxisTlvType, ERR_BAD_SIGNATURE, ERR_CONTRACT_VIOLATION, ERR_INVALID_PACKET, ERR_REPLAY_DETECTED, FLAG_BODY_TLV, FLAG_CHAIN_REQ, FLAG_HAS_WITNESS, MAX_BODY_LEN, MAX_FRAME_LEN, MAX_HDR_LEN, MAX_SIG_LEN, NCERT_ALG, NCERT_EXP, NCERT_ISSUER_KID, NCERT_KID, NCERT_NBF, NCERT_NODE_ID, NCERT_PAYLOAD, NCERT_PUB, NCERT_SCOPE, NCERT_SIG, PROOF_CAPSULE, PROOF_JWT, PROOF_LOOM, PROOF_MTLS, PROOF_NONE, PROOF_WITNESS, TLV, TLV_ACTOR_ID, TLV_AUD, TLV_BODY_ARR, TLV_BODY_OBJ, TLV_CAPSULE, TLV_EFFECT, TLV_ERROR_CODE, TLV_ERROR_MSG, TLV_INDEX, TLV_INTENT, TLV_KID, TLV_LOOM_PRESENCE_ID, TLV_LOOM_THREAD_HASH, TLV_LOOM_WRIT, TLV_NODE, TLV_NODE_CERT_HASH, TLV_NODE_KID, TLV_NONCE, TLV_OFFSET, TLV_OK, TLV_PID, TLV_LOOM_PRESENCE_ID as TLV_PRESENCE_ID, TLV_PREV_HASH, TLV_PROOF_REF, TLV_PROOF_TYPE, TLV_REALM, TLV_RECEIPT_HASH, TLV_RID, TLV_SHA256_CHUNK, TLV_LOOM_THREAD_HASH as TLV_THREAD_HASH, TLV_TRACE_ID, TLV_TS, TLV_UPLOAD_ID, TLV_LOOM_WRIT as TLV_WRIT, decodeArray, decodeFrame, decodeObject, decodeTLVs, decodeTLVsList, decodeVarint, encodeFrame, encodeTLVs, encodeVarint, getSignTarget, varintLength } from '@nextera.one/axis-protocol';
5
5
  import { A as AxisObservation, L as LoomReceipt, T as ThreadState, W as WritValidationResult, G as Grant, a as GrantCapability, P as PresenceDeclaration, b as PresenceChallenge, c as Writ, R as Revocation, d as WritBody, e as WritMeta, f as PresenceReceipt, g as GrantStatus, h as PresenceStatus, i as PresenceProof, j as GrantValidationResult, k as PresenceVerifyResult } from './index-ChuwP1RU.js';
package/dist/index.js CHANGED
@@ -2443,6 +2443,10 @@ var init_intent_router = __esm({
2443
2443
  this.handlerIntents = /* @__PURE__ */ new Map();
2444
2444
  /** Handler class name → intent namespace prefix (from @Handler('auth')) */
2445
2445
  this.handlerPrefixes = /* @__PURE__ */ new Map();
2446
+ /** Handler namespace prefix → handler class name, used by `handler...intent` lookup. */
2447
+ this.handlerByPrefix = /* @__PURE__ */ new Map();
2448
+ /** Intent → handler class name, avoids scanning handlerIntents for normal lookups. */
2449
+ this.handlerByIntent = /* @__PURE__ */ new Map();
2446
2450
  /** Handler class name → class-level sensor bindings (from @HandlerSensors) */
2447
2451
  this.handlerClassSensors = /* @__PURE__ */ new Map();
2448
2452
  /** Handler class name → class-level observer bindings (from @Handler({ observe: [...] })) */
@@ -2452,35 +2456,37 @@ var init_intent_router = __esm({
2452
2456
  this.sensorRegistry = sensorRegistry;
2453
2457
  }
2454
2458
  getSchema(intent) {
2455
- return this.intentSchemas.get(intent);
2459
+ return this.intentSchemas.get(this.resolveIntentAlias(intent));
2456
2460
  }
2457
2461
  getValidators(intent) {
2458
- return this.intentValidators.get(intent);
2462
+ return this.intentValidators.get(this.resolveIntentAlias(intent));
2459
2463
  }
2460
2464
  has(intent) {
2461
- return this.handlers.has(intent) || _IntentRouter.BUILTIN_INTENTS.has(intent);
2465
+ const resolved = this.resolveIntentAlias(intent);
2466
+ return this.handlers.has(resolved) || _IntentRouter.BUILTIN_INTENTS.has(resolved);
2462
2467
  }
2463
2468
  getRegisteredIntents() {
2464
2469
  return [..._IntentRouter.BUILTIN_INTENTS, ...this.handlers.keys()];
2465
2470
  }
2466
2471
  getIntentEntry(intent) {
2467
- if (!this.has(intent)) return null;
2472
+ const resolved = this.resolveIntentAlias(intent);
2473
+ if (!this.has(resolved)) return null;
2468
2474
  return {
2469
- schema: this.intentSchemas.get(intent),
2470
- validators: this.intentValidators.get(intent),
2471
- hasSensors: this.intentSensors.has(intent),
2472
- builtin: _IntentRouter.BUILTIN_INTENTS.has(intent),
2473
- kind: this.intentKinds.get(intent),
2474
- chain: this.intentChains.get(intent),
2475
- capsulePolicy: this.intentCapsulePolicies.get(intent),
2476
- observerCount: this.getObservers(intent).length
2475
+ schema: this.intentSchemas.get(resolved),
2476
+ validators: this.intentValidators.get(resolved),
2477
+ hasSensors: this.intentSensors.has(resolved),
2478
+ builtin: _IntentRouter.BUILTIN_INTENTS.has(resolved),
2479
+ kind: this.intentKinds.get(resolved),
2480
+ chain: this.intentChains.get(resolved),
2481
+ capsulePolicy: this.intentCapsulePolicies.get(resolved),
2482
+ observerCount: this.getObservers(resolved).length
2477
2483
  };
2478
2484
  }
2479
2485
  getChainConfig(intent) {
2480
- return this.intentChains.get(intent);
2486
+ return this.intentChains.get(this.resolveIntentAlias(intent));
2481
2487
  }
2482
2488
  getObservers(intent) {
2483
- return this.intentObservers.get(intent) || [];
2489
+ return this.intentObservers.get(this.resolveIntentAlias(intent)) || [];
2484
2490
  }
2485
2491
  /**
2486
2492
  * Registers a handler for a specific intent.
@@ -2523,6 +2529,14 @@ var init_intent_router = __esm({
2523
2529
  );
2524
2530
  const handlerSensors = Reflect.getMetadata(HANDLER_SENSORS_KEY, instance.constructor) || [];
2525
2531
  const handlerObservers = Reflect.getMetadata(OBSERVER_BINDINGS_KEY, instance.constructor) || [];
2532
+ if (prefix) {
2533
+ this.trackHandlerMeta(
2534
+ instance.constructor.name,
2535
+ prefix,
2536
+ handlerSensors,
2537
+ handlerObservers
2538
+ );
2539
+ }
2526
2540
  const proto = Object.getPrototypeOf(instance);
2527
2541
  for (const route of routes) {
2528
2542
  const intentName = route.absolute ? route.action : `${prefix}.${route.action}`;
@@ -2582,7 +2596,7 @@ var init_intent_router = __esm({
2582
2596
  try {
2583
2597
  const intentBytes = frame.headers.get(import_axis_protocol2.TLV_INTENT);
2584
2598
  if (!intentBytes) throw new Error("Missing intent");
2585
- intent = this.decoder.decode(intentBytes);
2599
+ intent = this.resolveIntentAlias(this.decoder.decode(intentBytes));
2586
2600
  handlerRef = this.intentHandlerRefs.get(intent);
2587
2601
  const observerBindings = this.getObservers(intent);
2588
2602
  await this.emitIntentObservers(observerBindings, {
@@ -2892,25 +2906,25 @@ var init_intent_router = __esm({
2892
2906
  }
2893
2907
  // ─── Policy Getters ────────────────────────────────────────────────────────
2894
2908
  getSensitivity(intent) {
2895
- return this.intentSensitivity.get(intent);
2909
+ return this.intentSensitivity.get(this.resolveIntentAlias(intent));
2896
2910
  }
2897
2911
  getContract(intent) {
2898
- return this.intentContracts.get(intent);
2912
+ return this.intentContracts.get(this.resolveIntentAlias(intent));
2899
2913
  }
2900
2914
  getRequiredProof(intent) {
2901
- return this.intentRequiredProof.get(intent);
2915
+ return this.intentRequiredProof.get(this.resolveIntentAlias(intent));
2902
2916
  }
2903
2917
  isPublic(intent) {
2904
- return this.publicIntents.has(intent);
2918
+ return this.publicIntents.has(this.resolveIntentAlias(intent));
2905
2919
  }
2906
2920
  isAnonymous(intent) {
2907
- return this.anonymousIntents.has(intent);
2921
+ return this.anonymousIntents.has(this.resolveIntentAlias(intent));
2908
2922
  }
2909
2923
  isAuthorized(intent) {
2910
- return this.authorizedIntents.has(intent);
2924
+ return this.authorizedIntents.has(this.resolveIntentAlias(intent));
2911
2925
  }
2912
2926
  getRateLimit(intent) {
2913
- return this.intentRateLimits.get(intent);
2927
+ return this.intentRateLimits.get(this.resolveIntentAlias(intent));
2914
2928
  }
2915
2929
  // ─── Handler-level Getters ─────────────────────────────────────────────────
2916
2930
  /** All intents registered under the given handler class name. */
@@ -2919,10 +2933,8 @@ var init_intent_router = __esm({
2919
2933
  }
2920
2934
  /** Returns the handler class name that owns the given intent, or undefined if not found. */
2921
2935
  getHandlerByIntent(intent) {
2922
- for (const [handlerName, intents] of this.handlerIntents) {
2923
- if (intents.includes(intent)) return handlerName;
2924
- }
2925
- return void 0;
2936
+ const resolved = this.resolveIntentAlias(intent);
2937
+ return this.handlerByIntent.get(resolved);
2926
2938
  }
2927
2939
  /** All registered handler class names. */
2928
2940
  getRegisteredHandlers() {
@@ -2998,6 +3010,33 @@ var init_intent_router = __esm({
2998
3010
  getHandlerClassObservers(handlerName) {
2999
3011
  return this.handlerClassObservers.get(handlerName);
3000
3012
  }
3013
+ /**
3014
+ * Resolves the optional `handler...intent` wire shorthand to a registered
3015
+ * canonical intent. Existing exact intent names always win.
3016
+ */
3017
+ resolveIntentAlias(intent) {
3018
+ if (this.handlers.has(intent) || _IntentRouter.BUILTIN_INTENTS.has(intent)) {
3019
+ return intent;
3020
+ }
3021
+ const separator = "...";
3022
+ const separatorIndex = intent.indexOf(separator);
3023
+ if (separatorIndex <= 0) return intent;
3024
+ const handlerKey = intent.slice(0, separatorIndex);
3025
+ const action = intent.slice(separatorIndex + separator.length);
3026
+ if (!handlerKey || !action) return intent;
3027
+ const handlerName = this.handlerByPrefix.get(handlerKey) ?? (this.handlerIntents.has(handlerKey) ? handlerKey : void 0);
3028
+ if (!handlerName) return intent;
3029
+ const prefix = this.getHandlerPrefix(handlerName) ?? handlerKey;
3030
+ const handlerIntents = this.getHandlerIntents(handlerName);
3031
+ const prefixedIntent = `${prefix}.${action}`;
3032
+ if (handlerIntents.includes(prefixedIntent)) return prefixedIntent;
3033
+ if (handlerIntents.includes(action)) return action;
3034
+ const suffix = `.${action}`;
3035
+ const suffixMatches = handlerIntents.filter(
3036
+ (candidate) => candidate.endsWith(suffix)
3037
+ );
3038
+ return suffixMatches.length === 1 ? suffixMatches[0] : intent;
3039
+ }
3001
3040
  /** Full summary of a handler's registered intents and aggregated policies. Returns null if unknown. */
3002
3041
  getHandlerSummary(handlerName) {
3003
3042
  const intents = this.getHandlerIntents(handlerName);
@@ -3074,6 +3113,7 @@ var init_intent_router = __esm({
3074
3113
  }
3075
3114
  }
3076
3115
  trackHandlerIntent(handlerName, intent) {
3116
+ this.handlerByIntent.set(intent, handlerName);
3077
3117
  const existing = this.handlerIntents.get(handlerName);
3078
3118
  if (existing) {
3079
3119
  if (!existing.includes(intent)) existing.push(intent);
@@ -3087,6 +3127,7 @@ var init_intent_router = __esm({
3087
3127
  */
3088
3128
  trackHandlerMeta(className, prefix, sensors, observers) {
3089
3129
  this.handlerPrefixes.set(className, prefix);
3130
+ this.handlerByPrefix.set(prefix, className);
3090
3131
  if (sensors.length > 0) {
3091
3132
  this.handlerClassSensors.set(
3092
3133
  className,
@@ -11316,6 +11357,80 @@ var require_intent_registry_sensor = __commonJS({
11316
11357
  }
11317
11358
  });
11318
11359
 
11360
+ // src/sensors/law-article-presence.sensor.ts
11361
+ var require_law_article_presence_sensor = __commonJS({
11362
+ "src/sensors/law-article-presence.sensor.ts"(exports2) {
11363
+ "use strict";
11364
+ var __decorate = exports2 && exports2.__decorate || function(decorators, target, key, desc) {
11365
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11366
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11367
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11368
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
11369
+ };
11370
+ var __metadata = exports2 && exports2.__metadata || function(k, v) {
11371
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11372
+ };
11373
+ Object.defineProperty(exports2, "__esModule", { value: true });
11374
+ exports2.LawArticlePresenceSensor = void 0;
11375
+ var sensor_decorator_1 = (init_sensor_decorator(), __toCommonJS(sensor_decorator_exports));
11376
+ var sensor_bands_1 = (init_sensor_bands(), __toCommonJS(sensor_bands_exports));
11377
+ var LawArticlePresenceSensor = class LawArticlePresenceSensor {
11378
+ constructor(options) {
11379
+ this.options = options;
11380
+ this.name = "LawArticlePresenceSensor";
11381
+ this.order = sensor_bands_1.BAND.IDENTITY + 27;
11382
+ }
11383
+ supports(input) {
11384
+ if (this.mode() === "off")
11385
+ return false;
11386
+ if (!input.intent)
11387
+ return false;
11388
+ if (this.exemptIntents().includes(input.intent))
11389
+ return false;
11390
+ return true;
11391
+ }
11392
+ async run(input) {
11393
+ const intent = input.intent;
11394
+ const count = await this.options.getLawArticleCount(intent, input);
11395
+ if (count > 0) {
11396
+ return {
11397
+ action: "ALLOW",
11398
+ meta: { lawArticles: count }
11399
+ };
11400
+ }
11401
+ const reason = `Intent '${intent}' has no law article mapping`;
11402
+ if (this.mode() === "strict") {
11403
+ return {
11404
+ action: "DENY",
11405
+ code: this.options.missingCode ?? "CAPSULE_NOT_LAWFUL",
11406
+ reason
11407
+ };
11408
+ }
11409
+ return {
11410
+ action: "FLAG",
11411
+ scoreDelta: this.options.auditScoreDelta ?? 5,
11412
+ reasons: ["LAW_ARTICLE_MISSING", reason],
11413
+ meta: { lawArticles: 0 }
11414
+ };
11415
+ }
11416
+ mode() {
11417
+ const configured = this.options.mode;
11418
+ if (typeof configured === "function")
11419
+ return configured();
11420
+ return configured ?? "audit";
11421
+ }
11422
+ exemptIntents() {
11423
+ return this.options.exemptIntents ?? ["system.ping"];
11424
+ }
11425
+ };
11426
+ exports2.LawArticlePresenceSensor = LawArticlePresenceSensor;
11427
+ exports2.LawArticlePresenceSensor = LawArticlePresenceSensor = __decorate([
11428
+ (0, sensor_decorator_1.Sensor)({ phase: "POST_DECODE" }),
11429
+ __metadata("design:paramtypes", [Object])
11430
+ ], LawArticlePresenceSensor);
11431
+ }
11432
+ });
11433
+
11319
11434
  // src/sensors/law-evaluation.sensor.ts
11320
11435
  var require_law_evaluation_sensor = __commonJS({
11321
11436
  "src/sensors/law-evaluation.sensor.ts"(exports2) {
@@ -12787,6 +12902,7 @@ var init_sensors = __esm({
12787
12902
  __reExport(sensors_exports, __toESM(require_header_tlv_limit_sensor()));
12788
12903
  __reExport(sensors_exports, __toESM(require_intent_allowlist_sensor()));
12789
12904
  __reExport(sensors_exports, __toESM(require_intent_registry_sensor()));
12905
+ __reExport(sensors_exports, __toESM(require_law_article_presence_sensor()));
12790
12906
  __reExport(sensors_exports, __toESM(require_law_evaluation_sensor()));
12791
12907
  __reExport(sensors_exports, __toESM(require_proof_presence_sensor()));
12792
12908
  __reExport(sensors_exports, __toESM(require_protocol_strict_sensor()));