@nextera.one/axis-server-sdk 2.3.9 → 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.
@@ -1,4 +1,4 @@
1
- export { n as AccessProfileResolverSensor, $ as BodyBudgetSensor, a2 as CapabilityEnforcementSensor, a7 as ChunkHashSensor, aa as EntropySensor, ac as ExecutionTimeoutSensor, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ak as IntentAllowlistSensor, an as IntentRegistrySensor, ap as LawEvaluationSensor, av as ProofPresenceSensor, aw as ProtocolStrictSensor, ay as ReceiptPolicySensor, aD as RiskGateSensor, aE as RiskGateSensorOptions, aG as RiskSignalCollector, aI as SchemaValidationSensor, aK as StreamScopeSensor, aL as TLVParseSensor, aO as TickAuthCapsuleRef, aP as TickAuthSensor, aQ as TickAuthSensorOptions, aR as TickAuthVerifier, b0 as TpsSensor, b1 as TpsSensorOptions, b2 as VarintHardeningSensor } from '../index-DfG00R_f.mjs';
1
+ export { n as AccessProfileResolverSensor, $ as BodyBudgetSensor, a2 as CapabilityEnforcementSensor, a7 as ChunkHashSensor, aa as EntropySensor, ac as ExecutionTimeoutSensor, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ak as IntentAllowlistSensor, an as IntentRegistrySensor, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aB as ReceiptPolicySensor, aG as RiskGateSensor, aH as RiskGateSensorOptions, aJ as RiskSignalCollector, aL as SchemaValidationSensor, aN as StreamScopeSensor, aO as TLVParseSensor, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor } from '../index-Bquulp8S.mjs';
2
2
  import '../axis-sensor-BLUemDiZ.mjs';
3
3
  import 'zod';
4
4
  import '@nextera.one/axis-protocol';
@@ -1,4 +1,4 @@
1
- export { n as AccessProfileResolverSensor, $ as BodyBudgetSensor, a2 as CapabilityEnforcementSensor, a7 as ChunkHashSensor, aa as EntropySensor, ac as ExecutionTimeoutSensor, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ak as IntentAllowlistSensor, an as IntentRegistrySensor, ap as LawEvaluationSensor, av as ProofPresenceSensor, aw as ProtocolStrictSensor, ay as ReceiptPolicySensor, aD as RiskGateSensor, aE as RiskGateSensorOptions, aG as RiskSignalCollector, aI as SchemaValidationSensor, aK as StreamScopeSensor, aL as TLVParseSensor, aO as TickAuthCapsuleRef, aP as TickAuthSensor, aQ as TickAuthSensorOptions, aR as TickAuthVerifier, b0 as TpsSensor, b1 as TpsSensorOptions, b2 as VarintHardeningSensor } from '../index-DPQEO0Qh.js';
1
+ export { n as AccessProfileResolverSensor, $ as BodyBudgetSensor, a2 as CapabilityEnforcementSensor, a7 as ChunkHashSensor, aa as EntropySensor, ac as ExecutionTimeoutSensor, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ak as IntentAllowlistSensor, an as IntentRegistrySensor, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aB as ReceiptPolicySensor, aG as RiskGateSensor, aH as RiskGateSensorOptions, aJ as RiskSignalCollector, aL as SchemaValidationSensor, aN as StreamScopeSensor, aO as TLVParseSensor, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor } from '../index-C5LdnkOB.js';
2
2
  import '../axis-sensor-BLUemDiZ.js';
3
3
  import 'zod';
4
4
  import '@nextera.one/axis-protocol';
@@ -11745,6 +11745,80 @@ var require_intent_registry_sensor = __commonJS({
11745
11745
  }
11746
11746
  });
11747
11747
 
11748
+ // src/sensors/law-article-presence.sensor.ts
11749
+ var require_law_article_presence_sensor = __commonJS({
11750
+ "src/sensors/law-article-presence.sensor.ts"(exports2) {
11751
+ "use strict";
11752
+ var __decorate = exports2 && exports2.__decorate || function(decorators, target, key, desc) {
11753
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11754
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11755
+ 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;
11756
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
11757
+ };
11758
+ var __metadata = exports2 && exports2.__metadata || function(k, v) {
11759
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11760
+ };
11761
+ Object.defineProperty(exports2, "__esModule", { value: true });
11762
+ exports2.LawArticlePresenceSensor = void 0;
11763
+ var sensor_decorator_1 = (init_sensor_decorator(), __toCommonJS(sensor_decorator_exports));
11764
+ var sensor_bands_1 = (init_sensor_bands(), __toCommonJS(sensor_bands_exports));
11765
+ var LawArticlePresenceSensor = class LawArticlePresenceSensor {
11766
+ constructor(options) {
11767
+ this.options = options;
11768
+ this.name = "LawArticlePresenceSensor";
11769
+ this.order = sensor_bands_1.BAND.IDENTITY + 27;
11770
+ }
11771
+ supports(input) {
11772
+ if (this.mode() === "off")
11773
+ return false;
11774
+ if (!input.intent)
11775
+ return false;
11776
+ if (this.exemptIntents().includes(input.intent))
11777
+ return false;
11778
+ return true;
11779
+ }
11780
+ async run(input) {
11781
+ const intent = input.intent;
11782
+ const count = await this.options.getLawArticleCount(intent, input);
11783
+ if (count > 0) {
11784
+ return {
11785
+ action: "ALLOW",
11786
+ meta: { lawArticles: count }
11787
+ };
11788
+ }
11789
+ const reason = `Intent '${intent}' has no law article mapping`;
11790
+ if (this.mode() === "strict") {
11791
+ return {
11792
+ action: "DENY",
11793
+ code: this.options.missingCode ?? "CAPSULE_NOT_LAWFUL",
11794
+ reason
11795
+ };
11796
+ }
11797
+ return {
11798
+ action: "FLAG",
11799
+ scoreDelta: this.options.auditScoreDelta ?? 5,
11800
+ reasons: ["LAW_ARTICLE_MISSING", reason],
11801
+ meta: { lawArticles: 0 }
11802
+ };
11803
+ }
11804
+ mode() {
11805
+ const configured = this.options.mode;
11806
+ if (typeof configured === "function")
11807
+ return configured();
11808
+ return configured ?? "audit";
11809
+ }
11810
+ exemptIntents() {
11811
+ return this.options.exemptIntents ?? ["system.ping"];
11812
+ }
11813
+ };
11814
+ exports2.LawArticlePresenceSensor = LawArticlePresenceSensor;
11815
+ exports2.LawArticlePresenceSensor = LawArticlePresenceSensor = __decorate([
11816
+ (0, sensor_decorator_1.Sensor)({ phase: "POST_DECODE" }),
11817
+ __metadata("design:paramtypes", [Object])
11818
+ ], LawArticlePresenceSensor);
11819
+ }
11820
+ });
11821
+
11748
11822
  // src/sensors/law-evaluation.sensor.ts
11749
11823
  var require_law_evaluation_sensor = __commonJS({
11750
11824
  "src/sensors/law-evaluation.sensor.ts"(exports2) {
@@ -13217,6 +13291,7 @@ var init_sensors = __esm({
13217
13291
  __reExport(sensors_exports, __toESM(require_header_tlv_limit_sensor()), module.exports);
13218
13292
  __reExport(sensors_exports, __toESM(require_intent_allowlist_sensor()), module.exports);
13219
13293
  __reExport(sensors_exports, __toESM(require_intent_registry_sensor()), module.exports);
13294
+ __reExport(sensors_exports, __toESM(require_law_article_presence_sensor()), module.exports);
13220
13295
  __reExport(sensors_exports, __toESM(require_law_evaluation_sensor()), module.exports);
13221
13296
  __reExport(sensors_exports, __toESM(require_proof_presence_sensor()), module.exports);
13222
13297
  __reExport(sensors_exports, __toESM(require_protocol_strict_sensor()), module.exports);