@nextera.one/axis-server-sdk 2.3.6 → 2.3.7

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,5 +1,5 @@
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-CffTWMtI.mjs';
2
- import '../axis-sensor-DMW4rfRg.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 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-Bdahn8mq.mjs';
2
+ import '../axis-sensor-BLUemDiZ.mjs';
3
3
  import 'zod';
4
4
  import '@nextera.one/axis-protocol';
5
- import '../cce-pipeline-CBt56guN.mjs';
5
+ import '../cce-pipeline-By7ps8_F.mjs';
@@ -1,5 +1,5 @@
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-CqAU2zlr.js';
2
- import '../axis-sensor-DMW4rfRg.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 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-DRnTsYrk.js';
2
+ import '../axis-sensor-BLUemDiZ.js';
3
3
  import 'zod';
4
4
  import '@nextera.one/axis-protocol';
5
- import '../cce-pipeline-BJ-F1isr.js';
5
+ import '../cce-pipeline-CVeMpuKr.js';
@@ -98,9 +98,9 @@ var require_access_profile_resolver_sensor = __commonJS({
98
98
  this.name = "AccessProfileResolverSensor";
99
99
  this.order = sensor_bands_1.BAND.IDENTITY + 10;
100
100
  }
101
- async supports(input) {
101
+ supports(input) {
102
102
  void input;
103
- return { action: "ALLOW" };
103
+ return true;
104
104
  }
105
105
  async run(input) {
106
106
  const hasCapsule = !!input.metadata?.capsuleId;
@@ -250,12 +250,8 @@ var require_body_budget_sensor = __commonJS({
250
250
  this.name = "BodyBudgetSensor";
251
251
  this.order = sensor_bands_1.BAND.CONTENT + 10;
252
252
  }
253
- async supports(input) {
254
- return !!input.peek && input.peek.length >= 8 ? { action: "ALLOW" } : {
255
- action: "DENY",
256
- code: "SENSOR_NOT_APPLICABLE",
257
- reason: "Insufficient peek data to read headers"
258
- };
253
+ supports(input) {
254
+ return !!input.peek && input.peek.length >= 8;
259
255
  }
260
256
  async run(input) {
261
257
  const { peek } = input;
@@ -8743,10 +8739,7 @@ var init_axis_sensor_chain_service = __esm({
8743
8739
  continue;
8744
8740
  }
8745
8741
  try {
8746
- const supportsDecision = normalizeSensorDecision(
8747
- await sensor.supports(input)
8748
- );
8749
- if (supportsDecision.allow) {
8742
+ if (sensor.supports(input)) {
8750
8743
  relevantSensors.push(sensor);
8751
8744
  }
8752
8745
  } catch (error) {
@@ -11113,9 +11106,9 @@ var require_capability_enforcement_sensor = __commonJS({
11113
11106
  this.name = "CapabilityEnforcementSensor";
11114
11107
  this.order = sensor_bands_1.BAND.POLICY + 10;
11115
11108
  }
11116
- async supports(input) {
11109
+ supports(input) {
11117
11110
  void input;
11118
- return { action: "ALLOW" };
11111
+ return true;
11119
11112
  }
11120
11113
  async run(input) {
11121
11114
  const { intent, packet } = input;
@@ -11181,12 +11174,8 @@ var require_chunk_hash_sensor = __commonJS({
11181
11174
  this.name = "ChunkHashSensor";
11182
11175
  this.order = sensor_bands_1.BAND.CONTENT + 50;
11183
11176
  }
11184
- async supports(input) {
11185
- return input.intent === "file.chunk" ? { action: "ALLOW" } : {
11186
- action: "DENY",
11187
- code: "SENSOR_NOT_APPLICABLE",
11188
- reason: "Only file.chunk intent is supported"
11189
- };
11177
+ supports(input) {
11178
+ return input.intent === "file.chunk";
11190
11179
  }
11191
11180
  async run(input) {
11192
11181
  const headerTLVs = input.headerTLVs;
@@ -11413,8 +11402,8 @@ var require_execution_timeout_sensor = __commonJS({
11413
11402
  this.name = "ExecutionTimeoutSensor";
11414
11403
  this.order = sensor_bands_1.BAND.BUSINESS + 10;
11415
11404
  }
11416
- async supports() {
11417
- return Promise.resolve({ action: "ALLOW" });
11405
+ supports() {
11406
+ return true;
11418
11407
  }
11419
11408
  async run(input) {
11420
11409
  const { intent, context } = input;
@@ -11467,12 +11456,8 @@ var require_frame_budget_sensor = __commonJS({
11467
11456
  this.name = "FrameBudgetSensor";
11468
11457
  this.order = sensor_bands_1.BAND.WIRE + 20;
11469
11458
  }
11470
- async supports(input) {
11471
- return typeof input.contentLength === "number" ? { action: "ALLOW" } : {
11472
- action: "DENY",
11473
- code: "SENSOR_NOT_APPLICABLE",
11474
- reason: "Content-Length not available"
11475
- };
11459
+ supports(input) {
11460
+ return typeof input.contentLength === "number";
11476
11461
  }
11477
11462
  async run(input) {
11478
11463
  const maxBytes = Number(process.env["AXIS_MAX_FRAME_SIZE"]) || 50 * 1024 * 1024;
@@ -11517,12 +11502,8 @@ var require_frame_header_sanity_sensor = __commonJS({
11517
11502
  this.name = "FrameHeaderSanitySensor";
11518
11503
  this.order = sensor_bands_1.BAND.WIRE + 30;
11519
11504
  }
11520
- async supports(input) {
11521
- return !!input.peek && input.peek.length >= 7 ? { action: "ALLOW" } : {
11522
- action: "DENY",
11523
- code: "SENSOR_NOT_APPLICABLE",
11524
- reason: "Insufficient peek data for header sanity checks"
11525
- };
11505
+ supports(input) {
11506
+ return !!input.peek && input.peek.length >= 7;
11526
11507
  }
11527
11508
  async run(input) {
11528
11509
  const peek = input.peek;
@@ -11588,12 +11569,8 @@ var require_header_tlv_limit_sensor = __commonJS({
11588
11569
  this.order = sensor_bands_1.BAND.CONTENT + 0;
11589
11570
  this.MAX_TLVS = 64;
11590
11571
  }
11591
- async supports(input) {
11592
- return !!input.headerTLVs || !!input.packet ? { action: "ALLOW" } : {
11593
- action: "DENY",
11594
- code: "SENSOR_NOT_APPLICABLE",
11595
- reason: "Header TLV context is not available"
11596
- };
11572
+ supports(input) {
11573
+ return !!input.headerTLVs || !!input.packet;
11597
11574
  }
11598
11575
  async run(input) {
11599
11576
  if (input.headerTLVs && input.headerTLVs.size > this.MAX_TLVS) {
@@ -11649,12 +11626,8 @@ var require_intent_allowlist_sensor = __commonJS({
11649
11626
  this.name = "IntentAllowlistSensor";
11650
11627
  this.order = sensor_bands_1.BAND.IDENTITY + 20;
11651
11628
  }
11652
- async supports(input) {
11653
- return !!input.intent ? { action: "ALLOW" } : {
11654
- action: "DENY",
11655
- code: "SENSOR_NOT_APPLICABLE",
11656
- reason: "Intent is not available"
11657
- };
11629
+ supports(input) {
11630
+ return !!input.intent;
11658
11631
  }
11659
11632
  async run(input) {
11660
11633
  const profile = input.metadata?.profile || "PUBLIC";
@@ -11704,8 +11677,8 @@ var require_intent_registry_sensor = __commonJS({
11704
11677
  this.name = "IntentRegistrySensor";
11705
11678
  this.order = sensor_bands_1.BAND.IDENTITY + 25;
11706
11679
  }
11707
- async supports() {
11708
- return Promise.resolve({ action: "ALLOW" });
11680
+ supports() {
11681
+ return true;
11709
11682
  }
11710
11683
  async run(input) {
11711
11684
  const intent = input.intent;
@@ -11754,12 +11727,8 @@ var require_law_evaluation_sensor = __commonJS({
11754
11727
  this.name = "LawEvaluationSensor";
11755
11728
  this.order = sensor_bands_1.BAND.POLICY + 5;
11756
11729
  }
11757
- async supports(input) {
11758
- return !!this.options.evaluator && !!input.intent ? { action: "ALLOW" } : {
11759
- action: "DENY",
11760
- code: "SENSOR_NOT_APPLICABLE",
11761
- reason: "Law evaluator or intent missing"
11762
- };
11730
+ supports(input) {
11731
+ return !!this.options.evaluator && !!input.intent;
11763
11732
  }
11764
11733
  async run(input) {
11765
11734
  const evaluator = this.options.evaluator;
@@ -12226,11 +12195,8 @@ var require_proof_presence_sensor = __commonJS({
12226
12195
  this.name = "ProofPresenceSensor";
12227
12196
  this.order = sensor_bands_1.BAND.IDENTITY + 30;
12228
12197
  }
12229
- async supports(input) {
12230
- if (!!input.profile && !!input.visibility) {
12231
- return { action: "ALLOW" };
12232
- }
12233
- return { action: "DENY", code: "MISSING_REQUIRED_FIELDS" };
12198
+ supports(input) {
12199
+ return !!input.profile && !!input.visibility;
12234
12200
  }
12235
12201
  async run(input) {
12236
12202
  const validatedInput = axis_schemas_1.ProofPresenceInputZ.safeParse(input);
@@ -12524,8 +12490,8 @@ var require_receipt_policy_sensor = __commonJS({
12524
12490
  this.name = "ReceiptPolicySensor";
12525
12491
  this.order = sensor_bands_1.BAND.BUSINESS + 20;
12526
12492
  }
12527
- async supports() {
12528
- return { action: "ALLOW" };
12493
+ supports() {
12494
+ return true;
12529
12495
  }
12530
12496
  async run() {
12531
12497
  return { action: "ALLOW" };
@@ -12685,11 +12651,8 @@ var require_schema_validation_sensor = __commonJS({
12685
12651
  this.name = "SchemaValidationSensor";
12686
12652
  this.order = sensor_bands_1.BAND.CONTENT + 35;
12687
12653
  }
12688
- async supports(input) {
12689
- if (input.metadata?.schema) {
12690
- return { action: "ALLOW" };
12691
- }
12692
- return { action: "DENY", code: "SCHEMA_NOT_CONFIGURED" };
12654
+ supports(input) {
12655
+ return !!input.metadata?.schema;
12693
12656
  }
12694
12657
  async run(input) {
12695
12658
  const schema = input.metadata?.schema;
@@ -12814,8 +12777,8 @@ var require_stream_scope_sensor = __commonJS({
12814
12777
  this.name = "StreamScopeSensor";
12815
12778
  this.order = sensor_bands_1.BAND.BUSINESS + 0;
12816
12779
  }
12817
- async supports() {
12818
- return { action: "ALLOW" };
12780
+ supports() {
12781
+ return true;
12819
12782
  }
12820
12783
  async run() {
12821
12784
  return { action: "ALLOW" };
@@ -12853,12 +12816,8 @@ var require_tickauth_sensor = __commonJS({
12853
12816
  this.matchIntent = options.matchIntent ?? true;
12854
12817
  this.acceptTypes = options.acceptTypes?.length ? new Set(options.acceptTypes) : null;
12855
12818
  }
12856
- async supports(input) {
12857
- return !!(input.metadata?.capsule || input.metadata?.tickauthCapsule || input.metadata?.cceEnvelope?.capsule) ? { action: "ALLOW" } : {
12858
- action: "DENY",
12859
- code: "SENSOR_NOT_APPLICABLE",
12860
- reason: "TickAuth capsule not found"
12861
- };
12819
+ supports(input) {
12820
+ return !!(input.metadata?.capsule || input.metadata?.tickauthCapsule || input.metadata?.cceEnvelope?.capsule);
12862
12821
  }
12863
12822
  async run(input) {
12864
12823
  const capsule = input.metadata?.capsule ?? input.metadata?.tickauthCapsule ?? input.metadata?.cceEnvelope?.capsule;
@@ -12964,12 +12923,8 @@ var require_tlv_parse_sensor = __commonJS({
12964
12923
  this.name = "TLVParseSensor";
12965
12924
  this.order = sensor_bands_1.BAND.CONTENT + 20;
12966
12925
  }
12967
- async supports(input) {
12968
- return !!input.packet ? { action: "ALLOW" } : {
12969
- action: "DENY",
12970
- code: "SENSOR_NOT_APPLICABLE",
12971
- reason: "Packet is not available"
12972
- };
12926
+ supports(input) {
12927
+ return !!input.packet;
12973
12928
  }
12974
12929
  async run(input) {
12975
12930
  const packet = input.packet;
@@ -13101,13 +13056,9 @@ var require_tps_sensor = __commonJS({
13101
13056
  this.maxDriftMs = options.maxDriftMs ?? 3e4;
13102
13057
  this.resolver = options.resolver ?? parseINotation;
13103
13058
  }
13104
- async supports(input) {
13059
+ supports(input) {
13105
13060
  const tps = input.metadata?.tps_coordinate ?? input.metadata?.tps ?? input.packet?.tps;
13106
- return typeof tps === "string" && tps.length > 0 ? { action: "ALLOW" } : {
13107
- action: "DENY",
13108
- code: "SENSOR_NOT_APPLICABLE",
13109
- reason: "TPS coordinate not available"
13110
- };
13061
+ return typeof tps === "string" && tps.length > 0;
13111
13062
  }
13112
13063
  async run(input) {
13113
13064
  const tps = input.metadata?.tps_coordinate ?? input.metadata?.tps ?? input.packet?.tps;
@@ -13173,12 +13124,8 @@ var require_varint_hardening_sensor = __commonJS({
13173
13124
  this.order = sensor_bands_1.BAND.WIRE + 35;
13174
13125
  this.MAX_VARINT_BYTES = 5;
13175
13126
  }
13176
- async supports(input) {
13177
- return !!input.peek && input.peek.length >= 7 ? { action: "ALLOW" } : {
13178
- action: "DENY",
13179
- code: "SENSOR_NOT_APPLICABLE",
13180
- reason: "Insufficient peek data for varint hardening"
13181
- };
13127
+ supports(input) {
13128
+ return !!input.peek && input.peek.length >= 7;
13182
13129
  }
13183
13130
  async run(input) {
13184
13131
  const peek = input.peek;