@nextera.one/axis-server-sdk 2.3.2 → 2.3.3
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-Bng8utj8.d.mts → index-D_Av0pG-.d.mts} +27 -0
- package/dist/{index-DJbM2lNM.d.ts → index-wh9piy0E.d.ts} +27 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +106 -4
- 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 +105 -0
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +106 -4
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/sensors/index.d.mts
CHANGED
|
@@ -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-
|
|
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-D_Av0pG-.mjs';
|
|
2
2
|
import '../axis-sensor-DMW4rfRg.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '@nextera.one/axis-protocol';
|
package/dist/sensors/index.d.ts
CHANGED
|
@@ -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-
|
|
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-wh9piy0E.js';
|
|
2
2
|
import '../axis-sensor-DMW4rfRg.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '@nextera.one/axis-protocol';
|
package/dist/sensors/index.js
CHANGED
|
@@ -2588,6 +2588,8 @@ var init_intent_router = __esm({
|
|
|
2588
2588
|
this.cceHandlers = /* @__PURE__ */ new Map();
|
|
2589
2589
|
/** CCE pipeline configuration (set via configureCce) */
|
|
2590
2590
|
this.ccePipelineConfig = null;
|
|
2591
|
+
/** Reverse index: handler class name → list of registered intents */
|
|
2592
|
+
this.handlerIntents = /* @__PURE__ */ new Map();
|
|
2591
2593
|
this.dependencyResolver = dependencyResolver;
|
|
2592
2594
|
this.observerDispatcher = observerDispatcher;
|
|
2593
2595
|
this.sensorRegistry = sensorRegistry;
|
|
@@ -2677,6 +2679,7 @@ var init_intent_router = __esm({
|
|
|
2677
2679
|
intentName,
|
|
2678
2680
|
`${instance.constructor.name}.${String(route.methodName)}`
|
|
2679
2681
|
);
|
|
2682
|
+
this.trackHandlerIntent(instance.constructor.name, intentName);
|
|
2680
2683
|
this.registerIntentMeta(
|
|
2681
2684
|
intentName,
|
|
2682
2685
|
proto,
|
|
@@ -2700,6 +2703,7 @@ var init_intent_router = __esm({
|
|
|
2700
2703
|
handlerSensors,
|
|
2701
2704
|
handlerObservers
|
|
2702
2705
|
);
|
|
2706
|
+
this.trackHandlerIntent(instance.constructor.name, intentName);
|
|
2703
2707
|
}
|
|
2704
2708
|
}
|
|
2705
2709
|
/**
|
|
@@ -3051,6 +3055,99 @@ var init_intent_router = __esm({
|
|
|
3051
3055
|
getRateLimit(intent) {
|
|
3052
3056
|
return this.intentRateLimits.get(intent);
|
|
3053
3057
|
}
|
|
3058
|
+
// ─── Handler-level Getters ─────────────────────────────────────────────────
|
|
3059
|
+
/** All intents registered under the given handler class name. */
|
|
3060
|
+
getHandlerIntents(handlerName) {
|
|
3061
|
+
return this.handlerIntents.get(handlerName) ?? [];
|
|
3062
|
+
}
|
|
3063
|
+
/** All registered handler class names. */
|
|
3064
|
+
getRegisteredHandlers() {
|
|
3065
|
+
return Array.from(this.handlerIntents.keys());
|
|
3066
|
+
}
|
|
3067
|
+
/** The system/builtin intents (ping, time, echo, chain, intent.exec). */
|
|
3068
|
+
getSystemIntents() {
|
|
3069
|
+
return [..._IntentRouter.BUILTIN_INTENTS];
|
|
3070
|
+
}
|
|
3071
|
+
/** True if every intent in the handler is public, or any one is public — returns true if ANY intent is @AxisPublic. */
|
|
3072
|
+
isHandlerPublic(handlerName) {
|
|
3073
|
+
return this.getHandlerIntents(handlerName).some((i) => this.isPublic(i));
|
|
3074
|
+
}
|
|
3075
|
+
/** True if any intent in the handler is @AxisAnonymous. */
|
|
3076
|
+
isHandlerAnonymous(handlerName) {
|
|
3077
|
+
return this.getHandlerIntents(handlerName).some((i) => this.isAnonymous(i));
|
|
3078
|
+
}
|
|
3079
|
+
/** True if any intent in the handler is @AxisAuthorized. */
|
|
3080
|
+
isHandlerAuthorized(handlerName) {
|
|
3081
|
+
return this.getHandlerIntents(handlerName).some(
|
|
3082
|
+
(i) => this.isAuthorized(i)
|
|
3083
|
+
);
|
|
3084
|
+
}
|
|
3085
|
+
/** Union of all required proof kinds across the handler's intents (deduplicated). */
|
|
3086
|
+
getHandlerProof(handlerName) {
|
|
3087
|
+
const all = this.getHandlerIntents(handlerName).flatMap(
|
|
3088
|
+
(i) => this.getRequiredProof(i) ?? []
|
|
3089
|
+
);
|
|
3090
|
+
if (all.length === 0) return void 0;
|
|
3091
|
+
return [...new Set(all)];
|
|
3092
|
+
}
|
|
3093
|
+
/** Contract from the first intent that has one (class-level contracts propagate to all intents). */
|
|
3094
|
+
getHandlerContract(handlerName) {
|
|
3095
|
+
for (const intent of this.getHandlerIntents(handlerName)) {
|
|
3096
|
+
const contract = this.getContract(intent);
|
|
3097
|
+
if (contract) return contract;
|
|
3098
|
+
}
|
|
3099
|
+
return void 0;
|
|
3100
|
+
}
|
|
3101
|
+
/** Sensitivity from the first intent that has one. */
|
|
3102
|
+
getHandlerSensitivity(handlerName) {
|
|
3103
|
+
for (const intent of this.getHandlerIntents(handlerName)) {
|
|
3104
|
+
const sensitivity = this.getSensitivity(intent);
|
|
3105
|
+
if (sensitivity) return sensitivity;
|
|
3106
|
+
}
|
|
3107
|
+
return void 0;
|
|
3108
|
+
}
|
|
3109
|
+
/** Rate limit from the first intent that has one. */
|
|
3110
|
+
getHandlerRateLimit(handlerName) {
|
|
3111
|
+
for (const intent of this.getHandlerIntents(handlerName)) {
|
|
3112
|
+
const rateLimit = this.getRateLimit(intent);
|
|
3113
|
+
if (rateLimit) return rateLimit;
|
|
3114
|
+
}
|
|
3115
|
+
return void 0;
|
|
3116
|
+
}
|
|
3117
|
+
/** Capsule policy from the first intent that has one. */
|
|
3118
|
+
getHandlerCapsulePolicy(handlerName) {
|
|
3119
|
+
for (const intent of this.getHandlerIntents(handlerName)) {
|
|
3120
|
+
const policy = this.intentCapsulePolicies.get(intent);
|
|
3121
|
+
if (policy) return policy;
|
|
3122
|
+
}
|
|
3123
|
+
return void 0;
|
|
3124
|
+
}
|
|
3125
|
+
/** Full summary of a handler's registered intents and aggregated policies. Returns null if unknown. */
|
|
3126
|
+
getHandlerSummary(handlerName) {
|
|
3127
|
+
const intents = this.getHandlerIntents(handlerName);
|
|
3128
|
+
if (intents.length === 0) return null;
|
|
3129
|
+
return {
|
|
3130
|
+
handler: handlerName,
|
|
3131
|
+
intents,
|
|
3132
|
+
isPublic: this.isHandlerPublic(handlerName),
|
|
3133
|
+
isAnonymous: this.isHandlerAnonymous(handlerName),
|
|
3134
|
+
isAuthorized: this.isHandlerAuthorized(handlerName),
|
|
3135
|
+
requiredProof: this.getHandlerProof(handlerName),
|
|
3136
|
+
contract: this.getHandlerContract(handlerName),
|
|
3137
|
+
sensitivity: this.getHandlerSensitivity(handlerName),
|
|
3138
|
+
rateLimit: this.getHandlerRateLimit(handlerName),
|
|
3139
|
+
capsulePolicy: this.getHandlerCapsulePolicy(handlerName)
|
|
3140
|
+
};
|
|
3141
|
+
}
|
|
3142
|
+
/** Summary of all registered handlers keyed by handler class name. */
|
|
3143
|
+
getAllHandlerSummaries() {
|
|
3144
|
+
const result = /* @__PURE__ */ new Map();
|
|
3145
|
+
for (const handlerName of this.handlerIntents.keys()) {
|
|
3146
|
+
const summary = this.getHandlerSummary(handlerName);
|
|
3147
|
+
if (summary) result.set(handlerName, summary);
|
|
3148
|
+
}
|
|
3149
|
+
return result;
|
|
3150
|
+
}
|
|
3054
3151
|
async emitIntentObservers(bindings, context) {
|
|
3055
3152
|
if (!this.observerDispatcher) return;
|
|
3056
3153
|
await this.observerDispatcher.dispatch(
|
|
@@ -3097,6 +3194,14 @@ var init_intent_router = __esm({
|
|
|
3097
3194
|
}
|
|
3098
3195
|
}
|
|
3099
3196
|
}
|
|
3197
|
+
trackHandlerIntent(handlerName, intent) {
|
|
3198
|
+
const existing = this.handlerIntents.get(handlerName);
|
|
3199
|
+
if (existing) {
|
|
3200
|
+
if (!existing.includes(intent)) existing.push(intent);
|
|
3201
|
+
} else {
|
|
3202
|
+
this.handlerIntents.set(handlerName, [intent]);
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3100
3205
|
resolveIntentSensor(ref) {
|
|
3101
3206
|
const registered = this.sensorRegistry?.resolve(ref);
|
|
3102
3207
|
if (registered) {
|