@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
|
@@ -749,6 +749,25 @@ declare class IntentRegistrySensor implements AxisSensor {
|
|
|
749
749
|
run(input: SensorInput): Promise<SensorDecision>;
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
+
type LawArticlePresenceMode = "off" | "audit" | "strict";
|
|
753
|
+
interface LawArticlePresenceSensorOptions {
|
|
754
|
+
mode?: LawArticlePresenceMode | (() => LawArticlePresenceMode);
|
|
755
|
+
exemptIntents?: string[];
|
|
756
|
+
missingCode?: string;
|
|
757
|
+
auditScoreDelta?: number;
|
|
758
|
+
getLawArticleCount: (intent: string, input: SensorInput) => number | Promise<number>;
|
|
759
|
+
}
|
|
760
|
+
declare class LawArticlePresenceSensor implements AxisSensor {
|
|
761
|
+
private readonly options;
|
|
762
|
+
readonly name = "LawArticlePresenceSensor";
|
|
763
|
+
readonly order: number;
|
|
764
|
+
constructor(options: LawArticlePresenceSensorOptions);
|
|
765
|
+
supports(input: SensorInput): boolean;
|
|
766
|
+
run(input: SensorInput): Promise<SensorDecision>;
|
|
767
|
+
private mode;
|
|
768
|
+
private exemptIntents;
|
|
769
|
+
}
|
|
770
|
+
|
|
752
771
|
declare class LawEvaluationSensor implements AxisSensor {
|
|
753
772
|
private readonly options;
|
|
754
773
|
private readonly logger;
|
|
@@ -891,4 +910,4 @@ declare class VarintHardeningSensor implements AxisSensor {
|
|
|
891
910
|
run(input: SensorInput): Promise<SensorDecision>;
|
|
892
911
|
}
|
|
893
912
|
|
|
894
|
-
export { BodyBudgetSensor as $, type AxisIntentSensorOptions as A, type AxisIntentSensorBinding as B, type ChainOptions as C, type AxisIntentSensorBindingOptions as D, type AxisIntentSensorRef as E, type AxisIntentSensorWhen as F, type AxisKeyExchangeRef as G, type AxisLawArticleSummary as H, type IntentTlvField as I, type AxisLawDecision as J, type AxisLawEvaluationContext as K, type AxisLawEvaluationResult as L, type AxisLawEvaluator as M, type AxisObserverBinding as N, ObserverDispatcherService as O, type AxisObserverBindingOptions as P, type AxisObserverContext as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverDefinition as U, type AxisObserverEvent as V, type AxisObserverRef as W, type AxisObserverRegistration as X, AxisPublic as Y, AxisRateLimit as Z, type AxisRateLimitConfig as _, type AxisObserverBindingInput as a,
|
|
913
|
+
export { BodyBudgetSensor as $, type AxisIntentSensorOptions as A, type AxisIntentSensorBinding as B, type ChainOptions as C, type AxisIntentSensorBindingOptions as D, type AxisIntentSensorRef as E, type AxisIntentSensorWhen as F, type AxisKeyExchangeRef as G, type AxisLawArticleSummary as H, type IntentTlvField as I, type AxisLawDecision as J, type AxisLawEvaluationContext as K, type AxisLawEvaluationResult as L, type AxisLawEvaluator as M, type AxisObserverBinding as N, ObserverDispatcherService as O, type AxisObserverBindingOptions as P, type AxisObserverContext as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverDefinition as U, type AxisObserverEvent as V, type AxisObserverRef as W, type AxisObserverRegistration as X, AxisPublic as Y, AxisRateLimit as Z, type AxisRateLimitConfig as _, type AxisObserverBindingInput as a, TlvRange as a$, CAPSULE_POLICY_METADATA_KEY as a0, CONTRACT_METADATA_KEY as a1, CapabilityEnforcementSensor as a2, Capsule as a3, CapsulePolicy as a4, type CapsulePolicyOptions as a5, type CapsuleScopeMode as a6, ChunkHashSensor as a7, Contract as a8, DEFAULT_CONTRACTS as a9, REQUIRED_PROOF_METADATA_KEY as aA, ReceiptPolicySensor as aB, type RegisteredChainConfig as aC, RequiredProof as aD, RiskDecision as aE, type RiskEvaluation as aF, RiskGateSensor as aG, type RiskGateSensorOptions as aH, type RiskSignal as aI, type RiskSignalCollector as aJ, SENSITIVITY_METADATA_KEY as aK, SchemaValidationSensor as aL, Sensitivity as aM, StreamScopeSensor as aN, TLVParseSensor as aO, TLV_FIELDS_KEY as aP, TLV_VALIDATORS_KEY as aQ, type TickAuthCapsuleRef as aR, TickAuthSensor as aS, type TickAuthSensorOptions as aT, type TickAuthVerifier as aU, TlvEnum as aV, TlvField as aW, type TlvFieldKind as aX, type TlvFieldMeta as aY, type TlvFieldOptions as aZ, TlvMinLen as a_, EntropySensor as aa, type ExecutionContract as ab, ExecutionTimeoutSensor as ac, FALLBACK_CONTRACT as ad, FrameBudgetSensor as ae, FrameHeaderSanitySensor as af, HeaderTLVLimitSensor as ag, INTENT_METADATA_KEY as ah, INTENT_ROUTES_KEY as ai, Intent as aj, IntentAllowlistSensor as ak, type IntentKind as al, type IntentOptions as am, IntentRegistrySensor as an, type IntentRoute as ao, type LawArticlePresenceMode as ap, LawArticlePresenceSensor as aq, type LawArticlePresenceSensorOptions as ar, LawEvaluationSensor as as, type LawEvaluationSensorOptions as at, OBSERVER_BINDINGS_KEY as au, OBSERVER_METADATA_KEY as av, Observer as aw, ObserverRegistry as ax, ProofPresenceSensor as ay, ProtocolStrictSensor as az, type AxisIntentSensorBindingInput as b, TlvUtf8Pattern as b0, TlvValidate as b1, type TlvValidatorMeta as b2, TpsSensor as b3, type TpsSensorOptions as b4, VarintHardeningSensor as b5, Witness as b6, buildAxisLawEvaluationContext as b7, toIntentSensorBinding as b8, toObserverBinding as b9, IntentRouter as c, type AxisChainEnvelope as d, type AxisChainResult as e, type AxisCapsuleRef as f, type AxisChainStep as g, type AxisContext as h, AXIS_ANONYMOUS_KEY as i, AXIS_AUTHORIZED_KEY as j, AXIS_META_KEY as k, AXIS_PUBLIC_KEY as l, AXIS_RATE_LIMIT_KEY as m, AccessProfileResolverSensor as n, Axis as o, AxisAnonymous as p, AxisAuthorized as q, type AxisChainEncryption as r, type AxisChainRequest as s, type AxisChainStatus as t, type AxisChainStepResult as u, type AxisChainStepStatus as v, type AxisEffect as w, type AxisExecutionMode as x, type AxisIntentEnvelope as y, type AxisIntentObserver as z };
|
|
@@ -749,6 +749,25 @@ declare class IntentRegistrySensor implements AxisSensor {
|
|
|
749
749
|
run(input: SensorInput): Promise<SensorDecision>;
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
+
type LawArticlePresenceMode = "off" | "audit" | "strict";
|
|
753
|
+
interface LawArticlePresenceSensorOptions {
|
|
754
|
+
mode?: LawArticlePresenceMode | (() => LawArticlePresenceMode);
|
|
755
|
+
exemptIntents?: string[];
|
|
756
|
+
missingCode?: string;
|
|
757
|
+
auditScoreDelta?: number;
|
|
758
|
+
getLawArticleCount: (intent: string, input: SensorInput) => number | Promise<number>;
|
|
759
|
+
}
|
|
760
|
+
declare class LawArticlePresenceSensor implements AxisSensor {
|
|
761
|
+
private readonly options;
|
|
762
|
+
readonly name = "LawArticlePresenceSensor";
|
|
763
|
+
readonly order: number;
|
|
764
|
+
constructor(options: LawArticlePresenceSensorOptions);
|
|
765
|
+
supports(input: SensorInput): boolean;
|
|
766
|
+
run(input: SensorInput): Promise<SensorDecision>;
|
|
767
|
+
private mode;
|
|
768
|
+
private exemptIntents;
|
|
769
|
+
}
|
|
770
|
+
|
|
752
771
|
declare class LawEvaluationSensor implements AxisSensor {
|
|
753
772
|
private readonly options;
|
|
754
773
|
private readonly logger;
|
|
@@ -891,4 +910,4 @@ declare class VarintHardeningSensor implements AxisSensor {
|
|
|
891
910
|
run(input: SensorInput): Promise<SensorDecision>;
|
|
892
911
|
}
|
|
893
912
|
|
|
894
|
-
export { BodyBudgetSensor as $, type AxisIntentSensorOptions as A, type AxisIntentSensorBinding as B, type ChainOptions as C, type AxisIntentSensorBindingOptions as D, type AxisIntentSensorRef as E, type AxisIntentSensorWhen as F, type AxisKeyExchangeRef as G, type AxisLawArticleSummary as H, type IntentTlvField as I, type AxisLawDecision as J, type AxisLawEvaluationContext as K, type AxisLawEvaluationResult as L, type AxisLawEvaluator as M, type AxisObserverBinding as N, ObserverDispatcherService as O, type AxisObserverBindingOptions as P, type AxisObserverContext as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverDefinition as U, type AxisObserverEvent as V, type AxisObserverRef as W, type AxisObserverRegistration as X, AxisPublic as Y, AxisRateLimit as Z, type AxisRateLimitConfig as _, type AxisObserverBindingInput as a,
|
|
913
|
+
export { BodyBudgetSensor as $, type AxisIntentSensorOptions as A, type AxisIntentSensorBinding as B, type ChainOptions as C, type AxisIntentSensorBindingOptions as D, type AxisIntentSensorRef as E, type AxisIntentSensorWhen as F, type AxisKeyExchangeRef as G, type AxisLawArticleSummary as H, type IntentTlvField as I, type AxisLawDecision as J, type AxisLawEvaluationContext as K, type AxisLawEvaluationResult as L, type AxisLawEvaluator as M, type AxisObserverBinding as N, ObserverDispatcherService as O, type AxisObserverBindingOptions as P, type AxisObserverContext as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverDefinition as U, type AxisObserverEvent as V, type AxisObserverRef as W, type AxisObserverRegistration as X, AxisPublic as Y, AxisRateLimit as Z, type AxisRateLimitConfig as _, type AxisObserverBindingInput as a, TlvRange as a$, CAPSULE_POLICY_METADATA_KEY as a0, CONTRACT_METADATA_KEY as a1, CapabilityEnforcementSensor as a2, Capsule as a3, CapsulePolicy as a4, type CapsulePolicyOptions as a5, type CapsuleScopeMode as a6, ChunkHashSensor as a7, Contract as a8, DEFAULT_CONTRACTS as a9, REQUIRED_PROOF_METADATA_KEY as aA, ReceiptPolicySensor as aB, type RegisteredChainConfig as aC, RequiredProof as aD, RiskDecision as aE, type RiskEvaluation as aF, RiskGateSensor as aG, type RiskGateSensorOptions as aH, type RiskSignal as aI, type RiskSignalCollector as aJ, SENSITIVITY_METADATA_KEY as aK, SchemaValidationSensor as aL, Sensitivity as aM, StreamScopeSensor as aN, TLVParseSensor as aO, TLV_FIELDS_KEY as aP, TLV_VALIDATORS_KEY as aQ, type TickAuthCapsuleRef as aR, TickAuthSensor as aS, type TickAuthSensorOptions as aT, type TickAuthVerifier as aU, TlvEnum as aV, TlvField as aW, type TlvFieldKind as aX, type TlvFieldMeta as aY, type TlvFieldOptions as aZ, TlvMinLen as a_, EntropySensor as aa, type ExecutionContract as ab, ExecutionTimeoutSensor as ac, FALLBACK_CONTRACT as ad, FrameBudgetSensor as ae, FrameHeaderSanitySensor as af, HeaderTLVLimitSensor as ag, INTENT_METADATA_KEY as ah, INTENT_ROUTES_KEY as ai, Intent as aj, IntentAllowlistSensor as ak, type IntentKind as al, type IntentOptions as am, IntentRegistrySensor as an, type IntentRoute as ao, type LawArticlePresenceMode as ap, LawArticlePresenceSensor as aq, type LawArticlePresenceSensorOptions as ar, LawEvaluationSensor as as, type LawEvaluationSensorOptions as at, OBSERVER_BINDINGS_KEY as au, OBSERVER_METADATA_KEY as av, Observer as aw, ObserverRegistry as ax, ProofPresenceSensor as ay, ProtocolStrictSensor as az, type AxisIntentSensorBindingInput as b, TlvUtf8Pattern as b0, TlvValidate as b1, type TlvValidatorMeta as b2, TpsSensor as b3, type TpsSensorOptions as b4, VarintHardeningSensor as b5, Witness as b6, buildAxisLawEvaluationContext as b7, toIntentSensorBinding as b8, toObserverBinding as b9, IntentRouter as c, type AxisChainEnvelope as d, type AxisChainResult as e, type AxisCapsuleRef as f, type AxisChainStep as g, type AxisContext as h, AXIS_ANONYMOUS_KEY as i, AXIS_AUTHORIZED_KEY as j, AXIS_META_KEY as k, AXIS_PUBLIC_KEY as l, AXIS_RATE_LIMIT_KEY as m, AccessProfileResolverSensor as n, Axis as o, AxisAnonymous as p, AxisAuthorized as q, type AxisChainEncryption as r, type AxisChainRequest as s, type AxisChainStatus as t, type AxisChainStepResult as u, type AxisChainStepStatus as v, type AxisEffect as w, type AxisExecutionMode as x, type AxisIntentEnvelope as y, type AxisIntentObserver as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, 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_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as
|
|
1
|
+
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, 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-Bquulp8S.mjs';
|
|
2
|
+
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, at as LawEvaluationSensorOptions, au as OBSERVER_BINDINGS_KEY, av as OBSERVER_METADATA_KEY, aw as Observer, ax as ObserverRegistry, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aA as REQUIRED_PROOF_METADATA_KEY, aB as ReceiptPolicySensor, aC as RegisteredChainConfig, aD as RequiredProof, aE as RiskDecision, aF as RiskEvaluation, aG as RiskGateSensor, aH as RiskGateSensorOptions, aI as RiskSignal, aJ as RiskSignalCollector, aK as SENSITIVITY_METADATA_KEY, aL as SchemaValidationSensor, aM as Sensitivity, aN as StreamScopeSensor, aO as TLVParseSensor, aP as TLV_FIELDS_KEY, aQ as TLV_VALIDATORS_KEY, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, aV as TlvEnum, aW as TlvField, aX as TlvFieldKind, aY as TlvFieldMeta, aZ as TlvFieldOptions, a_ as TlvMinLen, a$ as TlvRange, b0 as TlvUtf8Pattern, b1 as TlvValidate, b2 as TlvValidatorMeta, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor, b6 as Witness, b7 as buildAxisLawEvaluationContext, b8 as toIntentSensorBinding, b9 as toObserverBinding } from './index-Bquulp8S.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-CXewlhg-.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, R as RequiredProofKind, 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_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as
|
|
1
|
+
import { C as ChainOptions, A as AxisIntentSensorOptions, a as AxisObserverBindingInput, b as AxisIntentSensorBindingInput, R as RequiredProofKind, 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-C5LdnkOB.js';
|
|
2
|
+
export { i as AXIS_ANONYMOUS_KEY, j as AXIS_AUTHORIZED_KEY, k as AXIS_META_KEY, l as AXIS_PUBLIC_KEY, m as AXIS_RATE_LIMIT_KEY, n as AccessProfileResolverSensor, o as Axis, p as AxisAnonymous, q as AxisAuthorized, r as AxisChainEncryption, s as AxisChainRequest, t as AxisChainStatus, u as AxisChainStepResult, v as AxisChainStepStatus, w as AxisEffect, x as AxisExecutionMode, y as AxisIntentEnvelope, z as AxisIntentObserver, B as AxisIntentSensorBinding, D as AxisIntentSensorBindingOptions, E as AxisIntentSensorRef, F as AxisIntentSensorWhen, G as AxisKeyExchangeRef, H as AxisLawArticleSummary, J as AxisLawDecision, K as AxisLawEvaluationContext, L as AxisLawEvaluationResult, M as AxisLawEvaluator, N as AxisObserverBinding, P as AxisObserverBindingOptions, Q as AxisObserverContext, U as AxisObserverDefinition, V as AxisObserverEvent, W as AxisObserverRef, X as AxisObserverRegistration, Y as AxisPublic, Z as AxisRateLimit, _ as AxisRateLimitConfig, $ as BodyBudgetSensor, a0 as CAPSULE_POLICY_METADATA_KEY, a1 as CONTRACT_METADATA_KEY, a2 as CapabilityEnforcementSensor, a3 as Capsule, a4 as CapsulePolicy, a5 as CapsulePolicyOptions, a6 as CapsuleScopeMode, a7 as ChunkHashSensor, a8 as Contract, a9 as DEFAULT_CONTRACTS, aa as EntropySensor, ab as ExecutionContract, ac as ExecutionTimeoutSensor, ad as FALLBACK_CONTRACT, ae as FrameBudgetSensor, af as FrameHeaderSanitySensor, ag as HeaderTLVLimitSensor, ah as INTENT_METADATA_KEY, ai as INTENT_ROUTES_KEY, aj as Intent, ak as IntentAllowlistSensor, al as IntentKind, am as IntentOptions, an as IntentRegistrySensor, ao as IntentRoute, ap as LawArticlePresenceMode, aq as LawArticlePresenceSensor, ar as LawArticlePresenceSensorOptions, as as LawEvaluationSensor, at as LawEvaluationSensorOptions, au as OBSERVER_BINDINGS_KEY, av as OBSERVER_METADATA_KEY, aw as Observer, ax as ObserverRegistry, ay as ProofPresenceSensor, az as ProtocolStrictSensor, aA as REQUIRED_PROOF_METADATA_KEY, aB as ReceiptPolicySensor, aC as RegisteredChainConfig, aD as RequiredProof, aE as RiskDecision, aF as RiskEvaluation, aG as RiskGateSensor, aH as RiskGateSensorOptions, aI as RiskSignal, aJ as RiskSignalCollector, aK as SENSITIVITY_METADATA_KEY, aL as SchemaValidationSensor, aM as Sensitivity, aN as StreamScopeSensor, aO as TLVParseSensor, aP as TLV_FIELDS_KEY, aQ as TLV_VALIDATORS_KEY, aR as TickAuthCapsuleRef, aS as TickAuthSensor, aT as TickAuthSensorOptions, aU as TickAuthVerifier, aV as TlvEnum, aW as TlvField, aX as TlvFieldKind, aY as TlvFieldMeta, aZ as TlvFieldOptions, a_ as TlvMinLen, a$ as TlvRange, b0 as TlvUtf8Pattern, b1 as TlvValidate, b2 as TlvValidatorMeta, b3 as TpsSensor, b4 as TpsSensorOptions, b5 as VarintHardeningSensor, b6 as Witness, b7 as buildAxisLawEvaluationContext, b8 as toIntentSensorBinding, b9 as toObserverBinding } from './index-C5LdnkOB.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-ChuwP1RU.js';
|
package/dist/index.js
CHANGED
|
@@ -11357,6 +11357,80 @@ var require_intent_registry_sensor = __commonJS({
|
|
|
11357
11357
|
}
|
|
11358
11358
|
});
|
|
11359
11359
|
|
|
11360
|
+
// src/sensors/law-article-presence.sensor.ts
|
|
11361
|
+
var require_law_article_presence_sensor = __commonJS({
|
|
11362
|
+
"src/sensors/law-article-presence.sensor.ts"(exports2) {
|
|
11363
|
+
"use strict";
|
|
11364
|
+
var __decorate = exports2 && exports2.__decorate || function(decorators, target, key, desc) {
|
|
11365
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11366
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
11367
|
+
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;
|
|
11368
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11369
|
+
};
|
|
11370
|
+
var __metadata = exports2 && exports2.__metadata || function(k, v) {
|
|
11371
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
11372
|
+
};
|
|
11373
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11374
|
+
exports2.LawArticlePresenceSensor = void 0;
|
|
11375
|
+
var sensor_decorator_1 = (init_sensor_decorator(), __toCommonJS(sensor_decorator_exports));
|
|
11376
|
+
var sensor_bands_1 = (init_sensor_bands(), __toCommonJS(sensor_bands_exports));
|
|
11377
|
+
var LawArticlePresenceSensor = class LawArticlePresenceSensor {
|
|
11378
|
+
constructor(options) {
|
|
11379
|
+
this.options = options;
|
|
11380
|
+
this.name = "LawArticlePresenceSensor";
|
|
11381
|
+
this.order = sensor_bands_1.BAND.IDENTITY + 27;
|
|
11382
|
+
}
|
|
11383
|
+
supports(input) {
|
|
11384
|
+
if (this.mode() === "off")
|
|
11385
|
+
return false;
|
|
11386
|
+
if (!input.intent)
|
|
11387
|
+
return false;
|
|
11388
|
+
if (this.exemptIntents().includes(input.intent))
|
|
11389
|
+
return false;
|
|
11390
|
+
return true;
|
|
11391
|
+
}
|
|
11392
|
+
async run(input) {
|
|
11393
|
+
const intent = input.intent;
|
|
11394
|
+
const count = await this.options.getLawArticleCount(intent, input);
|
|
11395
|
+
if (count > 0) {
|
|
11396
|
+
return {
|
|
11397
|
+
action: "ALLOW",
|
|
11398
|
+
meta: { lawArticles: count }
|
|
11399
|
+
};
|
|
11400
|
+
}
|
|
11401
|
+
const reason = `Intent '${intent}' has no law article mapping`;
|
|
11402
|
+
if (this.mode() === "strict") {
|
|
11403
|
+
return {
|
|
11404
|
+
action: "DENY",
|
|
11405
|
+
code: this.options.missingCode ?? "CAPSULE_NOT_LAWFUL",
|
|
11406
|
+
reason
|
|
11407
|
+
};
|
|
11408
|
+
}
|
|
11409
|
+
return {
|
|
11410
|
+
action: "FLAG",
|
|
11411
|
+
scoreDelta: this.options.auditScoreDelta ?? 5,
|
|
11412
|
+
reasons: ["LAW_ARTICLE_MISSING", reason],
|
|
11413
|
+
meta: { lawArticles: 0 }
|
|
11414
|
+
};
|
|
11415
|
+
}
|
|
11416
|
+
mode() {
|
|
11417
|
+
const configured = this.options.mode;
|
|
11418
|
+
if (typeof configured === "function")
|
|
11419
|
+
return configured();
|
|
11420
|
+
return configured ?? "audit";
|
|
11421
|
+
}
|
|
11422
|
+
exemptIntents() {
|
|
11423
|
+
return this.options.exemptIntents ?? ["system.ping"];
|
|
11424
|
+
}
|
|
11425
|
+
};
|
|
11426
|
+
exports2.LawArticlePresenceSensor = LawArticlePresenceSensor;
|
|
11427
|
+
exports2.LawArticlePresenceSensor = LawArticlePresenceSensor = __decorate([
|
|
11428
|
+
(0, sensor_decorator_1.Sensor)({ phase: "POST_DECODE" }),
|
|
11429
|
+
__metadata("design:paramtypes", [Object])
|
|
11430
|
+
], LawArticlePresenceSensor);
|
|
11431
|
+
}
|
|
11432
|
+
});
|
|
11433
|
+
|
|
11360
11434
|
// src/sensors/law-evaluation.sensor.ts
|
|
11361
11435
|
var require_law_evaluation_sensor = __commonJS({
|
|
11362
11436
|
"src/sensors/law-evaluation.sensor.ts"(exports2) {
|
|
@@ -12828,6 +12902,7 @@ var init_sensors = __esm({
|
|
|
12828
12902
|
__reExport(sensors_exports, __toESM(require_header_tlv_limit_sensor()));
|
|
12829
12903
|
__reExport(sensors_exports, __toESM(require_intent_allowlist_sensor()));
|
|
12830
12904
|
__reExport(sensors_exports, __toESM(require_intent_registry_sensor()));
|
|
12905
|
+
__reExport(sensors_exports, __toESM(require_law_article_presence_sensor()));
|
|
12831
12906
|
__reExport(sensors_exports, __toESM(require_law_evaluation_sensor()));
|
|
12832
12907
|
__reExport(sensors_exports, __toESM(require_proof_presence_sensor()));
|
|
12833
12908
|
__reExport(sensors_exports, __toESM(require_protocol_strict_sensor()));
|