@nextera.one/axis-server-sdk 2.2.4 → 2.2.5
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-QGwgvVDY.d.ts → index-CwXlBXJf.d.ts} +2 -0
- package/dist/{index-C4ApiXHX.d.mts → index-ldPtIocV.d.mts} +2 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +100 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +100 -2
- 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 +100 -2
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +100 -2
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -418,6 +418,7 @@ declare class IntentRouter {
|
|
|
418
418
|
private static readonly BUILTIN_INTENTS;
|
|
419
419
|
private handlers;
|
|
420
420
|
private intentSensors;
|
|
421
|
+
private intentHandlerRefs;
|
|
421
422
|
private intentDecoders;
|
|
422
423
|
private intentSchemas;
|
|
423
424
|
private intentValidators;
|
|
@@ -534,6 +535,7 @@ declare class ObserverDispatcherService {
|
|
|
534
535
|
private readonly logger;
|
|
535
536
|
constructor(registry: ObserverRegistry);
|
|
536
537
|
dispatch(bindings: AxisObserverBinding[] | undefined, context: AxisObserverContext): Promise<void>;
|
|
538
|
+
private getImplicitRegistrations;
|
|
537
539
|
}
|
|
538
540
|
|
|
539
541
|
type AxisLawDecision = "allow" | "deny" | "conditional";
|
|
@@ -418,6 +418,7 @@ declare class IntentRouter {
|
|
|
418
418
|
private static readonly BUILTIN_INTENTS;
|
|
419
419
|
private handlers;
|
|
420
420
|
private intentSensors;
|
|
421
|
+
private intentHandlerRefs;
|
|
421
422
|
private intentDecoders;
|
|
422
423
|
private intentSchemas;
|
|
423
424
|
private intentValidators;
|
|
@@ -534,6 +535,7 @@ declare class ObserverDispatcherService {
|
|
|
534
535
|
private readonly logger;
|
|
535
536
|
constructor(registry: ObserverRegistry);
|
|
536
537
|
dispatch(bindings: AxisObserverBinding[] | undefined, context: AxisObserverContext): Promise<void>;
|
|
538
|
+
private getImplicitRegistrations;
|
|
537
539
|
}
|
|
538
540
|
|
|
539
541
|
type AxisLawDecision = "allow" | "deny" | "conditional";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, 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-
|
|
2
|
-
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_META_KEY, k as AXIS_PUBLIC_KEY, l as AXIS_RATE_LIMIT_KEY, m as AccessProfileResolverSensor, n as Axis, o as AxisAnonymous, p as AxisChainEncryption, q as AxisChainRequest, r as AxisChainStatus, s as AxisChainStepResult, t as AxisChainStepStatus, u as AxisEffect, v as AxisExecutionMode, w as AxisIntentEnvelope, x as AxisIntentObserver, y as AxisIntentSensorBinding, z as AxisIntentSensorBindingOptions, B as AxisIntentSensorRef, D as AxisIntentSensorWhen, E as AxisKeyExchangeRef, F as AxisLawArticleSummary, G as AxisLawDecision, H as AxisLawEvaluationContext, J as AxisLawEvaluationResult, K as AxisLawEvaluator, L as AxisObserverBinding, M as AxisObserverBindingOptions, N as AxisObserverContext, P as AxisObserverDefinition, Q as AxisObserverEvent, R as AxisObserverRef, U as AxisObserverRegistration, V as AxisPublic, W as AxisRateLimit, X as AxisRateLimitConfig, Y as BodyBudgetSensor, Z as CAPSULE_POLICY_METADATA_KEY, _ as CONTRACT_METADATA_KEY, $ as CapabilityEnforcementSensor, a0 as Capsule, a1 as CapsulePolicy, a2 as CapsulePolicyOptions, a3 as CapsuleScopeMode, a4 as ChunkHashSensor, a5 as Contract, a6 as DEFAULT_CONTRACTS, a7 as EntropySensor, a8 as ExecutionContract, a9 as ExecutionTimeoutSensor, aa as FALLBACK_CONTRACT, ab as FrameBudgetSensor, ac as FrameHeaderSanitySensor, ad as HeaderTLVLimitSensor, ae as INTENT_METADATA_KEY, af as INTENT_ROUTES_KEY, ag as Intent, ah as IntentAllowlistSensor, ai as IntentKind, aj as IntentOptions, ak as IntentRegistrySensor, al as IntentRoute, am as LawEvaluationSensor, an as LawEvaluationSensorOptions, ao as OBSERVER_BINDINGS_KEY, ap as OBSERVER_METADATA_KEY, aq as Observer, ar as ObserverRegistry, as as ProofPresenceSensor, at as ProtocolStrictSensor, au as REQUIRED_PROOF_METADATA_KEY, av as ReceiptPolicySensor, aw as RegisteredChainConfig, ax as RequiredProof, ay as RequiredProofKind, az as RiskDecision, aA as RiskEvaluation, aB as RiskGateSensor, aC as RiskGateSensorOptions, aD as RiskSignal, aE as RiskSignalCollector, aF as SENSITIVITY_METADATA_KEY, aG as SchemaValidationSensor, aH as Sensitivity, aI as StreamScopeSensor, aJ as TLVParseSensor, aK as TLV_FIELDS_KEY, aL as TLV_VALIDATORS_KEY, aM as TickAuthCapsuleRef, aN as TickAuthSensor, aO as TickAuthSensorOptions, aP as TickAuthVerifier, aQ as TlvEnum, aR as TlvField, aS as TlvFieldKind, aT as TlvFieldMeta, aU as TlvFieldOptions, aV as TlvMinLen, aW as TlvRange, aX as TlvUtf8Pattern, aY as TlvValidate, aZ as TlvValidatorMeta, a_ as TpsSensor, a$ as TpsSensorOptions, b0 as VarintHardeningSensor, b1 as Witness, b2 as buildAxisLawEvaluationContext, b3 as toIntentSensorBinding, b4 as toObserverBinding } from './index-
|
|
1
|
+
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, 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-ldPtIocV.mjs';
|
|
2
|
+
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_META_KEY, k as AXIS_PUBLIC_KEY, l as AXIS_RATE_LIMIT_KEY, m as AccessProfileResolverSensor, n as Axis, o as AxisAnonymous, p as AxisChainEncryption, q as AxisChainRequest, r as AxisChainStatus, s as AxisChainStepResult, t as AxisChainStepStatus, u as AxisEffect, v as AxisExecutionMode, w as AxisIntentEnvelope, x as AxisIntentObserver, y as AxisIntentSensorBinding, z as AxisIntentSensorBindingOptions, B as AxisIntentSensorRef, D as AxisIntentSensorWhen, E as AxisKeyExchangeRef, F as AxisLawArticleSummary, G as AxisLawDecision, H as AxisLawEvaluationContext, J as AxisLawEvaluationResult, K as AxisLawEvaluator, L as AxisObserverBinding, M as AxisObserverBindingOptions, N as AxisObserverContext, P as AxisObserverDefinition, Q as AxisObserverEvent, R as AxisObserverRef, U as AxisObserverRegistration, V as AxisPublic, W as AxisRateLimit, X as AxisRateLimitConfig, Y as BodyBudgetSensor, Z as CAPSULE_POLICY_METADATA_KEY, _ as CONTRACT_METADATA_KEY, $ as CapabilityEnforcementSensor, a0 as Capsule, a1 as CapsulePolicy, a2 as CapsulePolicyOptions, a3 as CapsuleScopeMode, a4 as ChunkHashSensor, a5 as Contract, a6 as DEFAULT_CONTRACTS, a7 as EntropySensor, a8 as ExecutionContract, a9 as ExecutionTimeoutSensor, aa as FALLBACK_CONTRACT, ab as FrameBudgetSensor, ac as FrameHeaderSanitySensor, ad as HeaderTLVLimitSensor, ae as INTENT_METADATA_KEY, af as INTENT_ROUTES_KEY, ag as Intent, ah as IntentAllowlistSensor, ai as IntentKind, aj as IntentOptions, ak as IntentRegistrySensor, al as IntentRoute, am as LawEvaluationSensor, an as LawEvaluationSensorOptions, ao as OBSERVER_BINDINGS_KEY, ap as OBSERVER_METADATA_KEY, aq as Observer, ar as ObserverRegistry, as as ProofPresenceSensor, at as ProtocolStrictSensor, au as REQUIRED_PROOF_METADATA_KEY, av as ReceiptPolicySensor, aw as RegisteredChainConfig, ax as RequiredProof, ay as RequiredProofKind, az as RiskDecision, aA as RiskEvaluation, aB as RiskGateSensor, aC as RiskGateSensorOptions, aD as RiskSignal, aE as RiskSignalCollector, aF as SENSITIVITY_METADATA_KEY, aG as SchemaValidationSensor, aH as Sensitivity, aI as StreamScopeSensor, aJ as TLVParseSensor, aK as TLV_FIELDS_KEY, aL as TLV_VALIDATORS_KEY, aM as TickAuthCapsuleRef, aN as TickAuthSensor, aO as TickAuthSensorOptions, aP as TickAuthVerifier, aQ as TlvEnum, aR as TlvField, aS as TlvFieldKind, aT as TlvFieldMeta, aU as TlvFieldOptions, aV as TlvMinLen, aW as TlvRange, aX as TlvUtf8Pattern, aY as TlvValidate, aZ as TlvValidatorMeta, a_ as TpsSensor, a$ as TpsSensorOptions, b0 as VarintHardeningSensor, b1 as Witness, b2 as buildAxisLawEvaluationContext, b3 as toIntentSensorBinding, b4 as toObserverBinding } from './index-ldPtIocV.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-_S4fmVUJ.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, 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-
|
|
2
|
-
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_META_KEY, k as AXIS_PUBLIC_KEY, l as AXIS_RATE_LIMIT_KEY, m as AccessProfileResolverSensor, n as Axis, o as AxisAnonymous, p as AxisChainEncryption, q as AxisChainRequest, r as AxisChainStatus, s as AxisChainStepResult, t as AxisChainStepStatus, u as AxisEffect, v as AxisExecutionMode, w as AxisIntentEnvelope, x as AxisIntentObserver, y as AxisIntentSensorBinding, z as AxisIntentSensorBindingOptions, B as AxisIntentSensorRef, D as AxisIntentSensorWhen, E as AxisKeyExchangeRef, F as AxisLawArticleSummary, G as AxisLawDecision, H as AxisLawEvaluationContext, J as AxisLawEvaluationResult, K as AxisLawEvaluator, L as AxisObserverBinding, M as AxisObserverBindingOptions, N as AxisObserverContext, P as AxisObserverDefinition, Q as AxisObserverEvent, R as AxisObserverRef, U as AxisObserverRegistration, V as AxisPublic, W as AxisRateLimit, X as AxisRateLimitConfig, Y as BodyBudgetSensor, Z as CAPSULE_POLICY_METADATA_KEY, _ as CONTRACT_METADATA_KEY, $ as CapabilityEnforcementSensor, a0 as Capsule, a1 as CapsulePolicy, a2 as CapsulePolicyOptions, a3 as CapsuleScopeMode, a4 as ChunkHashSensor, a5 as Contract, a6 as DEFAULT_CONTRACTS, a7 as EntropySensor, a8 as ExecutionContract, a9 as ExecutionTimeoutSensor, aa as FALLBACK_CONTRACT, ab as FrameBudgetSensor, ac as FrameHeaderSanitySensor, ad as HeaderTLVLimitSensor, ae as INTENT_METADATA_KEY, af as INTENT_ROUTES_KEY, ag as Intent, ah as IntentAllowlistSensor, ai as IntentKind, aj as IntentOptions, ak as IntentRegistrySensor, al as IntentRoute, am as LawEvaluationSensor, an as LawEvaluationSensorOptions, ao as OBSERVER_BINDINGS_KEY, ap as OBSERVER_METADATA_KEY, aq as Observer, ar as ObserverRegistry, as as ProofPresenceSensor, at as ProtocolStrictSensor, au as REQUIRED_PROOF_METADATA_KEY, av as ReceiptPolicySensor, aw as RegisteredChainConfig, ax as RequiredProof, ay as RequiredProofKind, az as RiskDecision, aA as RiskEvaluation, aB as RiskGateSensor, aC as RiskGateSensorOptions, aD as RiskSignal, aE as RiskSignalCollector, aF as SENSITIVITY_METADATA_KEY, aG as SchemaValidationSensor, aH as Sensitivity, aI as StreamScopeSensor, aJ as TLVParseSensor, aK as TLV_FIELDS_KEY, aL as TLV_VALIDATORS_KEY, aM as TickAuthCapsuleRef, aN as TickAuthSensor, aO as TickAuthSensorOptions, aP as TickAuthVerifier, aQ as TlvEnum, aR as TlvField, aS as TlvFieldKind, aT as TlvFieldMeta, aU as TlvFieldOptions, aV as TlvMinLen, aW as TlvRange, aX as TlvUtf8Pattern, aY as TlvValidate, aZ as TlvValidatorMeta, a_ as TpsSensor, a$ as TpsSensorOptions, b0 as VarintHardeningSensor, b1 as Witness, b2 as buildAxisLawEvaluationContext, b3 as toIntentSensorBinding, b4 as toObserverBinding } from './index-
|
|
1
|
+
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, 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-CwXlBXJf.js';
|
|
2
|
+
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_META_KEY, k as AXIS_PUBLIC_KEY, l as AXIS_RATE_LIMIT_KEY, m as AccessProfileResolverSensor, n as Axis, o as AxisAnonymous, p as AxisChainEncryption, q as AxisChainRequest, r as AxisChainStatus, s as AxisChainStepResult, t as AxisChainStepStatus, u as AxisEffect, v as AxisExecutionMode, w as AxisIntentEnvelope, x as AxisIntentObserver, y as AxisIntentSensorBinding, z as AxisIntentSensorBindingOptions, B as AxisIntentSensorRef, D as AxisIntentSensorWhen, E as AxisKeyExchangeRef, F as AxisLawArticleSummary, G as AxisLawDecision, H as AxisLawEvaluationContext, J as AxisLawEvaluationResult, K as AxisLawEvaluator, L as AxisObserverBinding, M as AxisObserverBindingOptions, N as AxisObserverContext, P as AxisObserverDefinition, Q as AxisObserverEvent, R as AxisObserverRef, U as AxisObserverRegistration, V as AxisPublic, W as AxisRateLimit, X as AxisRateLimitConfig, Y as BodyBudgetSensor, Z as CAPSULE_POLICY_METADATA_KEY, _ as CONTRACT_METADATA_KEY, $ as CapabilityEnforcementSensor, a0 as Capsule, a1 as CapsulePolicy, a2 as CapsulePolicyOptions, a3 as CapsuleScopeMode, a4 as ChunkHashSensor, a5 as Contract, a6 as DEFAULT_CONTRACTS, a7 as EntropySensor, a8 as ExecutionContract, a9 as ExecutionTimeoutSensor, aa as FALLBACK_CONTRACT, ab as FrameBudgetSensor, ac as FrameHeaderSanitySensor, ad as HeaderTLVLimitSensor, ae as INTENT_METADATA_KEY, af as INTENT_ROUTES_KEY, ag as Intent, ah as IntentAllowlistSensor, ai as IntentKind, aj as IntentOptions, ak as IntentRegistrySensor, al as IntentRoute, am as LawEvaluationSensor, an as LawEvaluationSensorOptions, ao as OBSERVER_BINDINGS_KEY, ap as OBSERVER_METADATA_KEY, aq as Observer, ar as ObserverRegistry, as as ProofPresenceSensor, at as ProtocolStrictSensor, au as REQUIRED_PROOF_METADATA_KEY, av as ReceiptPolicySensor, aw as RegisteredChainConfig, ax as RequiredProof, ay as RequiredProofKind, az as RiskDecision, aA as RiskEvaluation, aB as RiskGateSensor, aC as RiskGateSensorOptions, aD as RiskSignal, aE as RiskSignalCollector, aF as SENSITIVITY_METADATA_KEY, aG as SchemaValidationSensor, aH as Sensitivity, aI as StreamScopeSensor, aJ as TLVParseSensor, aK as TLV_FIELDS_KEY, aL as TLV_VALIDATORS_KEY, aM as TickAuthCapsuleRef, aN as TickAuthSensor, aO as TickAuthSensorOptions, aP as TickAuthVerifier, aQ as TlvEnum, aR as TlvField, aS as TlvFieldKind, aT as TlvFieldMeta, aU as TlvFieldOptions, aV as TlvMinLen, aW as TlvRange, aX as TlvUtf8Pattern, aY as TlvValidate, aZ as TlvValidatorMeta, a_ as TpsSensor, a$ as TpsSensorOptions, b0 as VarintHardeningSensor, b1 as Witness, b2 as buildAxisLawEvaluationContext, b3 as toIntentSensorBinding, b4 as toObserverBinding } from './index-CwXlBXJf.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-l3Hhirqb.js';
|
package/dist/index.js
CHANGED
|
@@ -1077,6 +1077,7 @@ var init_axis_chain_executor = __esm({
|
|
|
1077
1077
|
timestamp: startedAt,
|
|
1078
1078
|
chainId: envelope.chainId,
|
|
1079
1079
|
stepId: step.stepId,
|
|
1080
|
+
handler: step.handler,
|
|
1080
1081
|
intent: step.intent,
|
|
1081
1082
|
envelope,
|
|
1082
1083
|
step,
|
|
@@ -1111,6 +1112,7 @@ var init_axis_chain_executor = __esm({
|
|
|
1111
1112
|
timestamp: finishedAt,
|
|
1112
1113
|
chainId: envelope.chainId,
|
|
1113
1114
|
stepId: step.stepId,
|
|
1115
|
+
handler: step.handler,
|
|
1114
1116
|
intent: step.intent,
|
|
1115
1117
|
effect,
|
|
1116
1118
|
envelope,
|
|
@@ -1125,6 +1127,7 @@ var init_axis_chain_executor = __esm({
|
|
|
1125
1127
|
timestamp: finishedAt,
|
|
1126
1128
|
chainId: envelope.chainId,
|
|
1127
1129
|
stepId: step.stepId,
|
|
1130
|
+
handler: step.handler,
|
|
1128
1131
|
intent: step.intent,
|
|
1129
1132
|
envelope,
|
|
1130
1133
|
step,
|
|
@@ -1139,6 +1142,7 @@ var init_axis_chain_executor = __esm({
|
|
|
1139
1142
|
timestamp: finishedAt,
|
|
1140
1143
|
chainId: envelope.chainId,
|
|
1141
1144
|
stepId: step.stepId,
|
|
1145
|
+
handler: step.handler,
|
|
1142
1146
|
intent: step.intent,
|
|
1143
1147
|
effect,
|
|
1144
1148
|
envelope,
|
|
@@ -1169,6 +1173,7 @@ var init_axis_chain_executor = __esm({
|
|
|
1169
1173
|
timestamp: finishedAt,
|
|
1170
1174
|
chainId: envelope.chainId,
|
|
1171
1175
|
stepId: step.stepId,
|
|
1176
|
+
handler: step.handler,
|
|
1172
1177
|
intent: step.intent,
|
|
1173
1178
|
error: error.message,
|
|
1174
1179
|
envelope,
|
|
@@ -2388,6 +2393,8 @@ var init_intent_router = __esm({
|
|
|
2388
2393
|
this.handlers = /* @__PURE__ */ new Map();
|
|
2389
2394
|
/** Per-intent sensor refs (resolved through SensorRegistry at call time) */
|
|
2390
2395
|
this.intentSensors = /* @__PURE__ */ new Map();
|
|
2396
|
+
/** Per-intent handler identifier (e.g. UsersHandler.usersPage) */
|
|
2397
|
+
this.intentHandlerRefs = /* @__PURE__ */ new Map();
|
|
2391
2398
|
/** Per-intent body decoders */
|
|
2392
2399
|
this.intentDecoders = /* @__PURE__ */ new Map();
|
|
2393
2400
|
/** Per-intent TLV schemas */
|
|
@@ -2463,6 +2470,16 @@ var init_intent_router = __esm({
|
|
|
2463
2470
|
*/
|
|
2464
2471
|
register(intent, handler) {
|
|
2465
2472
|
this.handlers.set(intent, handler);
|
|
2473
|
+
if (typeof handler === "function" && handler.name) {
|
|
2474
|
+
this.intentHandlerRefs.set(intent, handler.name);
|
|
2475
|
+
} else if (handler && typeof handler === "object") {
|
|
2476
|
+
const objectName = handler.constructor?.name;
|
|
2477
|
+
if (objectName) {
|
|
2478
|
+
this.intentHandlerRefs.set(intent, `${objectName}.handle`);
|
|
2479
|
+
}
|
|
2480
|
+
} else {
|
|
2481
|
+
this.intentHandlerRefs.set(intent, `intent:${intent}`);
|
|
2482
|
+
}
|
|
2466
2483
|
}
|
|
2467
2484
|
/**
|
|
2468
2485
|
* Automatically registers all `@Intent`-decorated methods from a handler instance.
|
|
@@ -2493,6 +2510,10 @@ var init_intent_router = __esm({
|
|
|
2493
2510
|
} else {
|
|
2494
2511
|
this.register(intentName, fn);
|
|
2495
2512
|
}
|
|
2513
|
+
this.intentHandlerRefs.set(
|
|
2514
|
+
intentName,
|
|
2515
|
+
`${instance.constructor.name}.${String(route.methodName)}`
|
|
2516
|
+
);
|
|
2496
2517
|
this.registerIntentMeta(
|
|
2497
2518
|
intentName,
|
|
2498
2519
|
proto,
|
|
@@ -2533,15 +2554,18 @@ var init_intent_router = __esm({
|
|
|
2533
2554
|
async route(frame) {
|
|
2534
2555
|
const start = process.hrtime();
|
|
2535
2556
|
let intent = "unknown";
|
|
2557
|
+
let handlerRef;
|
|
2536
2558
|
try {
|
|
2537
2559
|
const intentBytes = frame.headers.get(import_axis_protocol2.TLV_INTENT);
|
|
2538
2560
|
if (!intentBytes) throw new Error("Missing intent");
|
|
2539
2561
|
intent = this.decoder.decode(intentBytes);
|
|
2562
|
+
handlerRef = this.intentHandlerRefs.get(intent);
|
|
2540
2563
|
const observerBindings = this.getObservers(intent);
|
|
2541
2564
|
await this.emitIntentObservers(observerBindings, {
|
|
2542
2565
|
event: "intent.received",
|
|
2543
2566
|
timestamp: Date.now(),
|
|
2544
2567
|
intent,
|
|
2568
|
+
handler: handlerRef,
|
|
2545
2569
|
frame
|
|
2546
2570
|
});
|
|
2547
2571
|
let effect;
|
|
@@ -2671,6 +2695,7 @@ var init_intent_router = __esm({
|
|
|
2671
2695
|
event: "intent.completed",
|
|
2672
2696
|
timestamp: Date.now(),
|
|
2673
2697
|
intent,
|
|
2698
|
+
handler: handlerRef,
|
|
2674
2699
|
frame,
|
|
2675
2700
|
effect,
|
|
2676
2701
|
metadata: effect.metadata
|
|
@@ -2682,6 +2707,7 @@ var init_intent_router = __esm({
|
|
|
2682
2707
|
event: "intent.failed",
|
|
2683
2708
|
timestamp: Date.now(),
|
|
2684
2709
|
intent,
|
|
2710
|
+
handler: handlerRef,
|
|
2685
2711
|
frame,
|
|
2686
2712
|
error: e.message
|
|
2687
2713
|
});
|
|
@@ -8056,6 +8082,61 @@ var init_disk_upload_file_store = __esm({
|
|
|
8056
8082
|
function unique(values) {
|
|
8057
8083
|
return Array.from(new Set(values));
|
|
8058
8084
|
}
|
|
8085
|
+
function matchesObserverIntent(intents, intent) {
|
|
8086
|
+
if (!intents || intents.length === 0) {
|
|
8087
|
+
return true;
|
|
8088
|
+
}
|
|
8089
|
+
if (!intent) {
|
|
8090
|
+
return false;
|
|
8091
|
+
}
|
|
8092
|
+
return intents.includes(intent);
|
|
8093
|
+
}
|
|
8094
|
+
function normalizeHandlerToken(value) {
|
|
8095
|
+
return value.trim().toLowerCase();
|
|
8096
|
+
}
|
|
8097
|
+
function matchesObserverHandler(handlers, handler) {
|
|
8098
|
+
if (!handlers || handlers.length === 0) {
|
|
8099
|
+
return true;
|
|
8100
|
+
}
|
|
8101
|
+
if (!handler) {
|
|
8102
|
+
return false;
|
|
8103
|
+
}
|
|
8104
|
+
const normalizedHandler = normalizeHandlerToken(handler);
|
|
8105
|
+
return handlers.some((candidate) => {
|
|
8106
|
+
if (!candidate) {
|
|
8107
|
+
return false;
|
|
8108
|
+
}
|
|
8109
|
+
const normalizedCandidate = normalizeHandlerToken(candidate);
|
|
8110
|
+
return normalizedHandler === normalizedCandidate || normalizedHandler.endsWith(`.${normalizedCandidate}`) || normalizedHandler.startsWith(`${normalizedCandidate}.`) || normalizedCandidate.endsWith(`.${normalizedHandler}`) || normalizedCandidate.startsWith(`${normalizedHandler}.`);
|
|
8111
|
+
});
|
|
8112
|
+
}
|
|
8113
|
+
function observerRefKey2(ref) {
|
|
8114
|
+
return typeof ref === "string" ? ref : ref.name || "(anonymous)";
|
|
8115
|
+
}
|
|
8116
|
+
function mergeBindingRefs(...bindingGroups) {
|
|
8117
|
+
const merged = /* @__PURE__ */ new Map();
|
|
8118
|
+
for (const bindings of bindingGroups) {
|
|
8119
|
+
for (const binding of bindings) {
|
|
8120
|
+
for (const ref of binding.refs) {
|
|
8121
|
+
const key = observerRefKey2(ref);
|
|
8122
|
+
const current = merged.get(key);
|
|
8123
|
+
if (!current) {
|
|
8124
|
+
merged.set(key, {
|
|
8125
|
+
refs: [ref],
|
|
8126
|
+
tags: binding.tags ? [...new Set(binding.tags)] : void 0,
|
|
8127
|
+
events: binding.events ? [...new Set(binding.events)] : void 0
|
|
8128
|
+
});
|
|
8129
|
+
continue;
|
|
8130
|
+
}
|
|
8131
|
+
current.tags = Array.from(
|
|
8132
|
+
/* @__PURE__ */ new Set([...current.tags || [], ...binding.tags || []])
|
|
8133
|
+
);
|
|
8134
|
+
current.events = current.events === void 0 || binding.events === void 0 ? void 0 : Array.from(/* @__PURE__ */ new Set([...current.events || [], ...binding.events]));
|
|
8135
|
+
}
|
|
8136
|
+
}
|
|
8137
|
+
}
|
|
8138
|
+
return Array.from(merged.values());
|
|
8139
|
+
}
|
|
8059
8140
|
var ObserverDispatcherService;
|
|
8060
8141
|
var init_observer_dispatcher_service = __esm({
|
|
8061
8142
|
"src/engine/observer-dispatcher.service.ts"() {
|
|
@@ -8066,9 +8147,20 @@ var init_observer_dispatcher_service = __esm({
|
|
|
8066
8147
|
this.logger = createAxisLogger(_ObserverDispatcherService.name);
|
|
8067
8148
|
}
|
|
8068
8149
|
async dispatch(bindings, context) {
|
|
8069
|
-
|
|
8150
|
+
const explicitBindings = bindings || [];
|
|
8151
|
+
const implicitRegistrations = this.getImplicitRegistrations();
|
|
8152
|
+
if (!explicitBindings.length && implicitRegistrations.length === 0) {
|
|
8153
|
+
return;
|
|
8154
|
+
}
|
|
8070
8155
|
const invoked = /* @__PURE__ */ new Set();
|
|
8071
|
-
|
|
8156
|
+
const implicitBindings = implicitRegistrations.map(
|
|
8157
|
+
(registration) => ({
|
|
8158
|
+
refs: [registration.instance.constructor],
|
|
8159
|
+
events: registration.events
|
|
8160
|
+
})
|
|
8161
|
+
);
|
|
8162
|
+
const merged = mergeBindingRefs(explicitBindings, implicitBindings);
|
|
8163
|
+
for (const binding of merged) {
|
|
8072
8164
|
if (binding.events && binding.events.length > 0 && !binding.events.includes(context.event)) {
|
|
8073
8165
|
continue;
|
|
8074
8166
|
}
|
|
@@ -8079,6 +8171,9 @@ var init_observer_dispatcher_service = __esm({
|
|
|
8079
8171
|
continue;
|
|
8080
8172
|
}
|
|
8081
8173
|
if (invoked.has(registration.name)) continue;
|
|
8174
|
+
if (!matchesObserverIntent(registration.intents, context.intent) || !matchesObserverHandler(registration.handlers, context.handler)) {
|
|
8175
|
+
continue;
|
|
8176
|
+
}
|
|
8082
8177
|
if (registration.events && registration.events.length > 0 && !registration.events.includes(context.event)) {
|
|
8083
8178
|
continue;
|
|
8084
8179
|
}
|
|
@@ -8104,6 +8199,9 @@ var init_observer_dispatcher_service = __esm({
|
|
|
8104
8199
|
}
|
|
8105
8200
|
}
|
|
8106
8201
|
}
|
|
8202
|
+
getImplicitRegistrations() {
|
|
8203
|
+
return this.registry.list();
|
|
8204
|
+
}
|
|
8107
8205
|
};
|
|
8108
8206
|
}
|
|
8109
8207
|
});
|