@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.
- package/dist/{index-DfG00R_f.d.mts → index-Bquulp8S.d.mts} +20 -1
- package/dist/{index-DPQEO0Qh.d.ts → index-C5LdnkOB.d.ts} +20 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -0
- package/dist/index.mjs.map +1 -1
- package/dist/sensors/index.d.mts +1 -1
- package/dist/sensors/index.d.ts +1 -1
- package/dist/sensors/index.js +75 -0
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +75 -0
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/sensors/index.mjs
CHANGED
|
@@ -11811,6 +11811,80 @@ var require_intent_registry_sensor = __commonJS({
|
|
|
11811
11811
|
}
|
|
11812
11812
|
});
|
|
11813
11813
|
|
|
11814
|
+
// src/sensors/law-article-presence.sensor.ts
|
|
11815
|
+
var require_law_article_presence_sensor = __commonJS({
|
|
11816
|
+
"src/sensors/law-article-presence.sensor.ts"(exports) {
|
|
11817
|
+
"use strict";
|
|
11818
|
+
var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
|
|
11819
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11820
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
11821
|
+
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;
|
|
11822
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11823
|
+
};
|
|
11824
|
+
var __metadata = exports && exports.__metadata || function(k, v) {
|
|
11825
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
11826
|
+
};
|
|
11827
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11828
|
+
exports.LawArticlePresenceSensor = void 0;
|
|
11829
|
+
var sensor_decorator_1 = (init_sensor_decorator(), __toCommonJS(sensor_decorator_exports));
|
|
11830
|
+
var sensor_bands_1 = (init_sensor_bands(), __toCommonJS(sensor_bands_exports));
|
|
11831
|
+
var LawArticlePresenceSensor = class LawArticlePresenceSensor {
|
|
11832
|
+
constructor(options) {
|
|
11833
|
+
this.options = options;
|
|
11834
|
+
this.name = "LawArticlePresenceSensor";
|
|
11835
|
+
this.order = sensor_bands_1.BAND.IDENTITY + 27;
|
|
11836
|
+
}
|
|
11837
|
+
supports(input) {
|
|
11838
|
+
if (this.mode() === "off")
|
|
11839
|
+
return false;
|
|
11840
|
+
if (!input.intent)
|
|
11841
|
+
return false;
|
|
11842
|
+
if (this.exemptIntents().includes(input.intent))
|
|
11843
|
+
return false;
|
|
11844
|
+
return true;
|
|
11845
|
+
}
|
|
11846
|
+
async run(input) {
|
|
11847
|
+
const intent = input.intent;
|
|
11848
|
+
const count = await this.options.getLawArticleCount(intent, input);
|
|
11849
|
+
if (count > 0) {
|
|
11850
|
+
return {
|
|
11851
|
+
action: "ALLOW",
|
|
11852
|
+
meta: { lawArticles: count }
|
|
11853
|
+
};
|
|
11854
|
+
}
|
|
11855
|
+
const reason = `Intent '${intent}' has no law article mapping`;
|
|
11856
|
+
if (this.mode() === "strict") {
|
|
11857
|
+
return {
|
|
11858
|
+
action: "DENY",
|
|
11859
|
+
code: this.options.missingCode ?? "CAPSULE_NOT_LAWFUL",
|
|
11860
|
+
reason
|
|
11861
|
+
};
|
|
11862
|
+
}
|
|
11863
|
+
return {
|
|
11864
|
+
action: "FLAG",
|
|
11865
|
+
scoreDelta: this.options.auditScoreDelta ?? 5,
|
|
11866
|
+
reasons: ["LAW_ARTICLE_MISSING", reason],
|
|
11867
|
+
meta: { lawArticles: 0 }
|
|
11868
|
+
};
|
|
11869
|
+
}
|
|
11870
|
+
mode() {
|
|
11871
|
+
const configured = this.options.mode;
|
|
11872
|
+
if (typeof configured === "function")
|
|
11873
|
+
return configured();
|
|
11874
|
+
return configured ?? "audit";
|
|
11875
|
+
}
|
|
11876
|
+
exemptIntents() {
|
|
11877
|
+
return this.options.exemptIntents ?? ["system.ping"];
|
|
11878
|
+
}
|
|
11879
|
+
};
|
|
11880
|
+
exports.LawArticlePresenceSensor = LawArticlePresenceSensor;
|
|
11881
|
+
exports.LawArticlePresenceSensor = LawArticlePresenceSensor = __decorate([
|
|
11882
|
+
(0, sensor_decorator_1.Sensor)({ phase: "POST_DECODE" }),
|
|
11883
|
+
__metadata("design:paramtypes", [Object])
|
|
11884
|
+
], LawArticlePresenceSensor);
|
|
11885
|
+
}
|
|
11886
|
+
});
|
|
11887
|
+
|
|
11814
11888
|
// src/sensors/law-evaluation.sensor.ts
|
|
11815
11889
|
var require_law_evaluation_sensor = __commonJS({
|
|
11816
11890
|
"src/sensors/law-evaluation.sensor.ts"(exports) {
|
|
@@ -13282,6 +13356,7 @@ var init_sensors = __esm({
|
|
|
13282
13356
|
__reExport(sensors_exports, __toESM(require_header_tlv_limit_sensor()));
|
|
13283
13357
|
__reExport(sensors_exports, __toESM(require_intent_allowlist_sensor()));
|
|
13284
13358
|
__reExport(sensors_exports, __toESM(require_intent_registry_sensor()));
|
|
13359
|
+
__reExport(sensors_exports, __toESM(require_law_article_presence_sensor()));
|
|
13285
13360
|
__reExport(sensors_exports, __toESM(require_law_evaluation_sensor()));
|
|
13286
13361
|
__reExport(sensors_exports, __toESM(require_proof_presence_sensor()));
|
|
13287
13362
|
__reExport(sensors_exports, __toESM(require_protocol_strict_sensor()));
|