@nextera.one/axis-server-sdk 2.3.16 → 2.3.18
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-CQGfX-P_.d.mts → index-Bb2pRr93.d.mts} +9 -2
- package/dist/{index-DBEYhMJc.d.ts → index-Q8wrM2PV.d.ts} +9 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -8
- 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 +27 -7
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +31 -8
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -241,16 +241,22 @@ declare const AxisContextZ: z.ZodObject<{
|
|
|
241
241
|
type AxisContext = z.infer<typeof AxisContextZ>;
|
|
242
242
|
|
|
243
243
|
declare const AXIS_META_KEY = "axis:axis";
|
|
244
|
+
declare const AXIS_STREAM_META_KEY = "axis:stream";
|
|
244
245
|
declare const SENSITIVITY_METADATA_KEY = "axis:sensitivity";
|
|
245
246
|
declare const CONTRACT_METADATA_KEY = "axis:contract";
|
|
246
247
|
declare const REQUIRED_PROOF_METADATA_KEY = "axis:required_proof";
|
|
247
248
|
type RequiredProofKind = ProofKind;
|
|
249
|
+
interface AxisStreamOptions {
|
|
250
|
+
path?: string;
|
|
251
|
+
protocol?: string;
|
|
252
|
+
}
|
|
248
253
|
declare function Sensitivity(level: SensitivityLevel): ClassDecorator & MethodDecorator;
|
|
249
254
|
declare function Contract(options: Partial<ExecutionContract>): ClassDecorator & MethodDecorator;
|
|
250
255
|
declare function RequiredProof(proofs: [RequiredProofKind, ...RequiredProofKind[]]): ClassDecorator & MethodDecorator;
|
|
251
256
|
declare function Capsule(): ClassDecorator & MethodDecorator;
|
|
252
257
|
declare function Witness(): ClassDecorator & MethodDecorator;
|
|
253
258
|
declare function Axis(): ClassDecorator;
|
|
259
|
+
declare function AxisStream(options?: AxisStreamOptions): ClassDecorator;
|
|
254
260
|
declare const AXIS_PUBLIC_KEY = "axis:public";
|
|
255
261
|
declare function AxisPublic(): ClassDecorator & MethodDecorator;
|
|
256
262
|
declare const AXIS_ANONYMOUS_KEY = "axis:anonymous";
|
|
@@ -293,7 +299,7 @@ declare const INTENT_METADATA_KEY = "axis:intent";
|
|
|
293
299
|
declare const INTENT_ROUTES_KEY = "axis:intent_routes";
|
|
294
300
|
type IntentKind = "create" | "read" | "update" | "delete" | "action";
|
|
295
301
|
type AxisIntentSensorRef = string | Function;
|
|
296
|
-
type AxisIntentSensorWhen =
|
|
302
|
+
type AxisIntentSensorWhen = "before" | "after" | "both";
|
|
297
303
|
interface AxisIntentSensorBindingOptions {
|
|
298
304
|
use: AxisIntentSensorRef;
|
|
299
305
|
when?: AxisIntentSensorWhen;
|
|
@@ -405,6 +411,7 @@ interface IntentSchema {
|
|
|
405
411
|
intent: string;
|
|
406
412
|
version: number;
|
|
407
413
|
bodyProfile: "TLV_MAP" | "RAW" | "TLV_OBJ" | "TLV_ARR";
|
|
414
|
+
dtoName?: string;
|
|
408
415
|
fields: Array<{
|
|
409
416
|
name: string;
|
|
410
417
|
tlv: number;
|
|
@@ -914,4 +921,4 @@ declare class VarintHardeningSensor implements AxisSensor {
|
|
|
914
921
|
run(input: SensorInput): Promise<SensorDecision>;
|
|
915
922
|
}
|
|
916
923
|
|
|
917
|
-
export {
|
|
924
|
+
export { type AxisRateLimitConfig as $, type AxisIntentSensorOptions as A, type AxisIntentObserver as B, type ChainOptions as C, type AxisIntentSensorBinding as D, type AxisIntentSensorBindingOptions as E, type AxisIntentSensorRef as F, type AxisIntentSensorWhen as G, type AxisKeyExchangeRef as H, type IntentTlvField as I, type AxisLawArticleSummary as J, type AxisLawDecision as K, type AxisLawEvaluationContext as L, type AxisLawEvaluationResult as M, type AxisLawEvaluator as N, ObserverDispatcherService as O, type AxisObserverBinding as P, type AxisObserverBindingOptions as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverContext as U, type AxisObserverDefinition as V, type AxisObserverEvent as W, type AxisObserverRef as X, type AxisObserverRegistration as Y, AxisPublic as Z, AxisRateLimit as _, type AxisObserverBindingInput as a, type TlvFieldMeta as a$, AxisStream as a0, type AxisStreamOptions as a1, BodyBudgetSensor as a2, CAPSULE_POLICY_METADATA_KEY as a3, CONTRACT_METADATA_KEY as a4, CapabilityEnforcementSensor as a5, Capsule as a6, CapsulePolicy as a7, type CapsulePolicyOptions as a8, type CapsuleScopeMode as a9, ObserverRegistry as aA, ProofPresenceSensor as aB, ProtocolStrictSensor as aC, REQUIRED_PROOF_METADATA_KEY as aD, ReceiptPolicySensor as aE, type RegisteredChainConfig as aF, RequiredProof as aG, RiskDecision as aH, type RiskEvaluation as aI, RiskGateSensor as aJ, type RiskGateSensorOptions as aK, type RiskSignal as aL, type RiskSignalCollector as aM, SENSITIVITY_METADATA_KEY as aN, SchemaValidationSensor as aO, Sensitivity as aP, StreamScopeSensor as aQ, TLVParseSensor as aR, TLV_FIELDS_KEY as aS, TLV_VALIDATORS_KEY as aT, type TickAuthCapsuleRef as aU, TickAuthSensor as aV, type TickAuthSensorOptions as aW, type TickAuthVerifier as aX, TlvEnum as aY, TlvField as aZ, type TlvFieldKind as a_, ChunkHashSensor as aa, Contract as ab, DEFAULT_CONTRACTS as ac, EntropySensor as ad, type ExecutionContract as ae, ExecutionTimeoutSensor as af, FALLBACK_CONTRACT as ag, FrameBudgetSensor as ah, FrameHeaderSanitySensor as ai, HeaderTLVLimitSensor as aj, INTENT_METADATA_KEY as ak, INTENT_ROUTES_KEY as al, Intent as am, IntentAllowlistSensor as an, type IntentKind as ao, type IntentOptions as ap, IntentRegistrySensor as aq, type IntentRoute as ar, type LawArticlePresenceMode as as, LawArticlePresenceSensor as at, type LawArticlePresenceSensorOptions as au, LawEvaluationSensor as av, type LawEvaluationSensorOptions as aw, OBSERVER_BINDINGS_KEY as ax, OBSERVER_METADATA_KEY as ay, Observer as az, type AxisIntentSensorBindingInput as b, type TlvFieldOptions as b0, TlvMinLen as b1, TlvRange as b2, TlvUtf8Pattern as b3, TlvValidate as b4, type TlvValidatorMeta as b5, TpsSensor as b6, type TpsSensorOptions as b7, VarintHardeningSensor as b8, Witness as b9, buildAxisLawEvaluationContext as ba, toIntentSensorBinding as bb, toObserverBinding as bc, 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, AXIS_STREAM_META_KEY as n, AccessProfileResolverSensor as o, Axis as p, AxisAnonymous as q, AxisAuthorized as r, type AxisChainEncryption as s, type AxisChainRequest as t, type AxisChainStatus as u, type AxisChainStepResult as v, type AxisChainStepStatus as w, type AxisEffect as x, type AxisExecutionMode as y, type AxisIntentEnvelope as z };
|
|
@@ -241,16 +241,22 @@ declare const AxisContextZ: z.ZodObject<{
|
|
|
241
241
|
type AxisContext = z.infer<typeof AxisContextZ>;
|
|
242
242
|
|
|
243
243
|
declare const AXIS_META_KEY = "axis:axis";
|
|
244
|
+
declare const AXIS_STREAM_META_KEY = "axis:stream";
|
|
244
245
|
declare const SENSITIVITY_METADATA_KEY = "axis:sensitivity";
|
|
245
246
|
declare const CONTRACT_METADATA_KEY = "axis:contract";
|
|
246
247
|
declare const REQUIRED_PROOF_METADATA_KEY = "axis:required_proof";
|
|
247
248
|
type RequiredProofKind = ProofKind;
|
|
249
|
+
interface AxisStreamOptions {
|
|
250
|
+
path?: string;
|
|
251
|
+
protocol?: string;
|
|
252
|
+
}
|
|
248
253
|
declare function Sensitivity(level: SensitivityLevel): ClassDecorator & MethodDecorator;
|
|
249
254
|
declare function Contract(options: Partial<ExecutionContract>): ClassDecorator & MethodDecorator;
|
|
250
255
|
declare function RequiredProof(proofs: [RequiredProofKind, ...RequiredProofKind[]]): ClassDecorator & MethodDecorator;
|
|
251
256
|
declare function Capsule(): ClassDecorator & MethodDecorator;
|
|
252
257
|
declare function Witness(): ClassDecorator & MethodDecorator;
|
|
253
258
|
declare function Axis(): ClassDecorator;
|
|
259
|
+
declare function AxisStream(options?: AxisStreamOptions): ClassDecorator;
|
|
254
260
|
declare const AXIS_PUBLIC_KEY = "axis:public";
|
|
255
261
|
declare function AxisPublic(): ClassDecorator & MethodDecorator;
|
|
256
262
|
declare const AXIS_ANONYMOUS_KEY = "axis:anonymous";
|
|
@@ -293,7 +299,7 @@ declare const INTENT_METADATA_KEY = "axis:intent";
|
|
|
293
299
|
declare const INTENT_ROUTES_KEY = "axis:intent_routes";
|
|
294
300
|
type IntentKind = "create" | "read" | "update" | "delete" | "action";
|
|
295
301
|
type AxisIntentSensorRef = string | Function;
|
|
296
|
-
type AxisIntentSensorWhen =
|
|
302
|
+
type AxisIntentSensorWhen = "before" | "after" | "both";
|
|
297
303
|
interface AxisIntentSensorBindingOptions {
|
|
298
304
|
use: AxisIntentSensorRef;
|
|
299
305
|
when?: AxisIntentSensorWhen;
|
|
@@ -405,6 +411,7 @@ interface IntentSchema {
|
|
|
405
411
|
intent: string;
|
|
406
412
|
version: number;
|
|
407
413
|
bodyProfile: "TLV_MAP" | "RAW" | "TLV_OBJ" | "TLV_ARR";
|
|
414
|
+
dtoName?: string;
|
|
408
415
|
fields: Array<{
|
|
409
416
|
name: string;
|
|
410
417
|
tlv: number;
|
|
@@ -914,4 +921,4 @@ declare class VarintHardeningSensor implements AxisSensor {
|
|
|
914
921
|
run(input: SensorInput): Promise<SensorDecision>;
|
|
915
922
|
}
|
|
916
923
|
|
|
917
|
-
export {
|
|
924
|
+
export { type AxisRateLimitConfig as $, type AxisIntentSensorOptions as A, type AxisIntentObserver as B, type ChainOptions as C, type AxisIntentSensorBinding as D, type AxisIntentSensorBindingOptions as E, type AxisIntentSensorRef as F, type AxisIntentSensorWhen as G, type AxisKeyExchangeRef as H, type IntentTlvField as I, type AxisLawArticleSummary as J, type AxisLawDecision as K, type AxisLawEvaluationContext as L, type AxisLawEvaluationResult as M, type AxisLawEvaluator as N, ObserverDispatcherService as O, type AxisObserverBinding as P, type AxisObserverBindingOptions as Q, type RequiredProofKind as R, SensorRegistry as S, type TlvValidatorFn as T, type AxisObserverContext as U, type AxisObserverDefinition as V, type AxisObserverEvent as W, type AxisObserverRef as X, type AxisObserverRegistration as Y, AxisPublic as Z, AxisRateLimit as _, type AxisObserverBindingInput as a, type TlvFieldMeta as a$, AxisStream as a0, type AxisStreamOptions as a1, BodyBudgetSensor as a2, CAPSULE_POLICY_METADATA_KEY as a3, CONTRACT_METADATA_KEY as a4, CapabilityEnforcementSensor as a5, Capsule as a6, CapsulePolicy as a7, type CapsulePolicyOptions as a8, type CapsuleScopeMode as a9, ObserverRegistry as aA, ProofPresenceSensor as aB, ProtocolStrictSensor as aC, REQUIRED_PROOF_METADATA_KEY as aD, ReceiptPolicySensor as aE, type RegisteredChainConfig as aF, RequiredProof as aG, RiskDecision as aH, type RiskEvaluation as aI, RiskGateSensor as aJ, type RiskGateSensorOptions as aK, type RiskSignal as aL, type RiskSignalCollector as aM, SENSITIVITY_METADATA_KEY as aN, SchemaValidationSensor as aO, Sensitivity as aP, StreamScopeSensor as aQ, TLVParseSensor as aR, TLV_FIELDS_KEY as aS, TLV_VALIDATORS_KEY as aT, type TickAuthCapsuleRef as aU, TickAuthSensor as aV, type TickAuthSensorOptions as aW, type TickAuthVerifier as aX, TlvEnum as aY, TlvField as aZ, type TlvFieldKind as a_, ChunkHashSensor as aa, Contract as ab, DEFAULT_CONTRACTS as ac, EntropySensor as ad, type ExecutionContract as ae, ExecutionTimeoutSensor as af, FALLBACK_CONTRACT as ag, FrameBudgetSensor as ah, FrameHeaderSanitySensor as ai, HeaderTLVLimitSensor as aj, INTENT_METADATA_KEY as ak, INTENT_ROUTES_KEY as al, Intent as am, IntentAllowlistSensor as an, type IntentKind as ao, type IntentOptions as ap, IntentRegistrySensor as aq, type IntentRoute as ar, type LawArticlePresenceMode as as, LawArticlePresenceSensor as at, type LawArticlePresenceSensorOptions as au, LawEvaluationSensor as av, type LawEvaluationSensorOptions as aw, OBSERVER_BINDINGS_KEY as ax, OBSERVER_METADATA_KEY as ay, Observer as az, type AxisIntentSensorBindingInput as b, type TlvFieldOptions as b0, TlvMinLen as b1, TlvRange as b2, TlvUtf8Pattern as b3, TlvValidate as b4, type TlvValidatorMeta as b5, TpsSensor as b6, type TpsSensorOptions as b7, VarintHardeningSensor as b8, Witness as b9, buildAxisLawEvaluationContext as ba, toIntentSensorBinding as bb, toObserverBinding as bc, 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, AXIS_STREAM_META_KEY as n, AccessProfileResolverSensor as o, Axis as p, AxisAnonymous as q, AxisAuthorized as r, type AxisChainEncryption as s, type AxisChainRequest as t, type AxisChainStatus as u, type AxisChainStepResult as v, type AxisChainStepStatus as w, type AxisEffect as x, type AxisExecutionMode as y, type AxisIntentEnvelope 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
|
|
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-Bb2pRr93.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 AXIS_STREAM_META_KEY, o as AccessProfileResolverSensor, p as Axis, q as AxisAnonymous, r as AxisAuthorized, s as AxisChainEncryption, t as AxisChainRequest, u as AxisChainStatus, v as AxisChainStepResult, w as AxisChainStepStatus, x as AxisEffect, y as AxisExecutionMode, z as AxisIntentEnvelope, B as AxisIntentObserver, D as AxisIntentSensorBinding, E as AxisIntentSensorBindingOptions, F as AxisIntentSensorRef, G as AxisIntentSensorWhen, H as AxisKeyExchangeRef, J as AxisLawArticleSummary, K as AxisLawDecision, L as AxisLawEvaluationContext, M as AxisLawEvaluationResult, N as AxisLawEvaluator, P as AxisObserverBinding, Q as AxisObserverBindingOptions, U as AxisObserverContext, V as AxisObserverDefinition, W as AxisObserverEvent, X as AxisObserverRef, Y as AxisObserverRegistration, Z as AxisPublic, _ as AxisRateLimit, $ as AxisRateLimitConfig, a0 as AxisStream, a1 as AxisStreamOptions, a2 as BodyBudgetSensor, a3 as CAPSULE_POLICY_METADATA_KEY, a4 as CONTRACT_METADATA_KEY, a5 as CapabilityEnforcementSensor, a6 as Capsule, a7 as CapsulePolicy, a8 as CapsulePolicyOptions, a9 as CapsuleScopeMode, aa as ChunkHashSensor, ab as Contract, ac as DEFAULT_CONTRACTS, ad as EntropySensor, ae as ExecutionContract, af as ExecutionTimeoutSensor, ag as FALLBACK_CONTRACT, ah as FrameBudgetSensor, ai as FrameHeaderSanitySensor, aj as HeaderTLVLimitSensor, ak as INTENT_METADATA_KEY, al as INTENT_ROUTES_KEY, am as Intent, an as IntentAllowlistSensor, ao as IntentKind, ap as IntentOptions, aq as IntentRegistrySensor, ar as IntentRoute, as as LawArticlePresenceMode, at as LawArticlePresenceSensor, au as LawArticlePresenceSensorOptions, av as LawEvaluationSensor, aw as LawEvaluationSensorOptions, ax as OBSERVER_BINDINGS_KEY, ay as OBSERVER_METADATA_KEY, az as Observer, aA as ObserverRegistry, aB as ProofPresenceSensor, aC as ProtocolStrictSensor, aD as REQUIRED_PROOF_METADATA_KEY, aE as ReceiptPolicySensor, aF as RegisteredChainConfig, aG as RequiredProof, aH as RiskDecision, aI as RiskEvaluation, aJ as RiskGateSensor, aK as RiskGateSensorOptions, aL as RiskSignal, aM as RiskSignalCollector, aN as SENSITIVITY_METADATA_KEY, aO as SchemaValidationSensor, aP as Sensitivity, aQ as StreamScopeSensor, aR as TLVParseSensor, aS as TLV_FIELDS_KEY, aT as TLV_VALIDATORS_KEY, aU as TickAuthCapsuleRef, aV as TickAuthSensor, aW as TickAuthSensorOptions, aX as TickAuthVerifier, aY as TlvEnum, aZ as TlvField, a_ as TlvFieldKind, a$ as TlvFieldMeta, b0 as TlvFieldOptions, b1 as TlvMinLen, b2 as TlvRange, b3 as TlvUtf8Pattern, b4 as TlvValidate, b5 as TlvValidatorMeta, b6 as TpsSensor, b7 as TpsSensorOptions, b8 as VarintHardeningSensor, b9 as Witness, ba as buildAxisLawEvaluationContext, bb as toIntentSensorBinding, bc as toObserverBinding } from './index-Bb2pRr93.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
|
|
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-Q8wrM2PV.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 AXIS_STREAM_META_KEY, o as AccessProfileResolverSensor, p as Axis, q as AxisAnonymous, r as AxisAuthorized, s as AxisChainEncryption, t as AxisChainRequest, u as AxisChainStatus, v as AxisChainStepResult, w as AxisChainStepStatus, x as AxisEffect, y as AxisExecutionMode, z as AxisIntentEnvelope, B as AxisIntentObserver, D as AxisIntentSensorBinding, E as AxisIntentSensorBindingOptions, F as AxisIntentSensorRef, G as AxisIntentSensorWhen, H as AxisKeyExchangeRef, J as AxisLawArticleSummary, K as AxisLawDecision, L as AxisLawEvaluationContext, M as AxisLawEvaluationResult, N as AxisLawEvaluator, P as AxisObserverBinding, Q as AxisObserverBindingOptions, U as AxisObserverContext, V as AxisObserverDefinition, W as AxisObserverEvent, X as AxisObserverRef, Y as AxisObserverRegistration, Z as AxisPublic, _ as AxisRateLimit, $ as AxisRateLimitConfig, a0 as AxisStream, a1 as AxisStreamOptions, a2 as BodyBudgetSensor, a3 as CAPSULE_POLICY_METADATA_KEY, a4 as CONTRACT_METADATA_KEY, a5 as CapabilityEnforcementSensor, a6 as Capsule, a7 as CapsulePolicy, a8 as CapsulePolicyOptions, a9 as CapsuleScopeMode, aa as ChunkHashSensor, ab as Contract, ac as DEFAULT_CONTRACTS, ad as EntropySensor, ae as ExecutionContract, af as ExecutionTimeoutSensor, ag as FALLBACK_CONTRACT, ah as FrameBudgetSensor, ai as FrameHeaderSanitySensor, aj as HeaderTLVLimitSensor, ak as INTENT_METADATA_KEY, al as INTENT_ROUTES_KEY, am as Intent, an as IntentAllowlistSensor, ao as IntentKind, ap as IntentOptions, aq as IntentRegistrySensor, ar as IntentRoute, as as LawArticlePresenceMode, at as LawArticlePresenceSensor, au as LawArticlePresenceSensorOptions, av as LawEvaluationSensor, aw as LawEvaluationSensorOptions, ax as OBSERVER_BINDINGS_KEY, ay as OBSERVER_METADATA_KEY, az as Observer, aA as ObserverRegistry, aB as ProofPresenceSensor, aC as ProtocolStrictSensor, aD as REQUIRED_PROOF_METADATA_KEY, aE as ReceiptPolicySensor, aF as RegisteredChainConfig, aG as RequiredProof, aH as RiskDecision, aI as RiskEvaluation, aJ as RiskGateSensor, aK as RiskGateSensorOptions, aL as RiskSignal, aM as RiskSignalCollector, aN as SENSITIVITY_METADATA_KEY, aO as SchemaValidationSensor, aP as Sensitivity, aQ as StreamScopeSensor, aR as TLVParseSensor, aS as TLV_FIELDS_KEY, aT as TLV_VALIDATORS_KEY, aU as TickAuthCapsuleRef, aV as TickAuthSensor, aW as TickAuthSensorOptions, aX as TickAuthVerifier, aY as TlvEnum, aZ as TlvField, a_ as TlvFieldKind, a$ as TlvFieldMeta, b0 as TlvFieldOptions, b1 as TlvMinLen, b2 as TlvRange, b3 as TlvUtf8Pattern, b4 as TlvValidate, b5 as TlvValidatorMeta, b6 as TpsSensor, b7 as TpsSensorOptions, b8 as VarintHardeningSensor, b9 as Witness, ba as buildAxisLawEvaluationContext, bb as toIntentSensorBinding, bc as toObserverBinding } from './index-Q8wrM2PV.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
|
@@ -134,10 +134,7 @@ function appendRequiredProof(target, propertyKey, proof) {
|
|
|
134
134
|
REQUIRED_PROOF_METADATA_KEY,
|
|
135
135
|
target,
|
|
136
136
|
propertyKey
|
|
137
|
-
) ?? [] : Reflect.getMetadata(
|
|
138
|
-
REQUIRED_PROOF_METADATA_KEY,
|
|
139
|
-
target
|
|
140
|
-
) ?? [];
|
|
137
|
+
) ?? [] : Reflect.getMetadata(REQUIRED_PROOF_METADATA_KEY, target) ?? [];
|
|
141
138
|
const merged = existing.includes(proof) ? existing : [...existing, proof];
|
|
142
139
|
if (propertyKey !== void 0) {
|
|
143
140
|
Reflect.defineMetadata(
|
|
@@ -215,6 +212,21 @@ function Axis() {
|
|
|
215
212
|
Reflect.defineMetadata(AXIS_META_KEY, { entry: true }, target);
|
|
216
213
|
};
|
|
217
214
|
}
|
|
215
|
+
function AxisStream(options = {}) {
|
|
216
|
+
return (target) => {
|
|
217
|
+
Reflect.defineMetadata(
|
|
218
|
+
AXIS_STREAM_META_KEY,
|
|
219
|
+
{
|
|
220
|
+
entry: true,
|
|
221
|
+
transport: "stream",
|
|
222
|
+
role: "entry",
|
|
223
|
+
path: options.path,
|
|
224
|
+
protocol: options.protocol
|
|
225
|
+
},
|
|
226
|
+
target
|
|
227
|
+
);
|
|
228
|
+
};
|
|
229
|
+
}
|
|
218
230
|
function AxisPublic() {
|
|
219
231
|
return (target, propertyKey, descriptor) => {
|
|
220
232
|
if (propertyKey !== void 0) {
|
|
@@ -257,11 +269,12 @@ function AxisRateLimit(config) {
|
|
|
257
269
|
return descriptor;
|
|
258
270
|
};
|
|
259
271
|
}
|
|
260
|
-
var import_reflect_metadata3, AXIS_META_KEY, SENSITIVITY_METADATA_KEY, CONTRACT_METADATA_KEY, REQUIRED_PROOF_METADATA_KEY, AXIS_PUBLIC_KEY, AXIS_ANONYMOUS_KEY, AXIS_AUTHORIZED_KEY, AXIS_RATE_LIMIT_KEY;
|
|
272
|
+
var import_reflect_metadata3, AXIS_META_KEY, AXIS_STREAM_META_KEY, SENSITIVITY_METADATA_KEY, CONTRACT_METADATA_KEY, REQUIRED_PROOF_METADATA_KEY, AXIS_PUBLIC_KEY, AXIS_ANONYMOUS_KEY, AXIS_AUTHORIZED_KEY, AXIS_RATE_LIMIT_KEY;
|
|
261
273
|
var init_intent_policy_decorator = __esm({
|
|
262
274
|
"src/decorators/intent-policy.decorator.ts"() {
|
|
263
275
|
import_reflect_metadata3 = require("reflect-metadata");
|
|
264
276
|
AXIS_META_KEY = "axis:axis";
|
|
277
|
+
AXIS_STREAM_META_KEY = "axis:stream";
|
|
265
278
|
SENSITIVITY_METADATA_KEY = "axis:sensitivity";
|
|
266
279
|
CONTRACT_METADATA_KEY = "axis:contract";
|
|
267
280
|
REQUIRED_PROOF_METADATA_KEY = "axis:required_proof";
|
|
@@ -2652,7 +2665,9 @@ var init_intent_router = __esm({
|
|
|
2652
2665
|
*/
|
|
2653
2666
|
register(intent, handler) {
|
|
2654
2667
|
if (this.handlers.has(intent)) {
|
|
2655
|
-
this.logger.warn(
|
|
2668
|
+
this.logger.warn(
|
|
2669
|
+
`Intent ${intent} is already registered; replacing handler`
|
|
2670
|
+
);
|
|
2656
2671
|
}
|
|
2657
2672
|
this.handlers.set(intent, handler);
|
|
2658
2673
|
if (typeof handler === "function" && handler.name) {
|
|
@@ -2923,7 +2938,9 @@ var init_intent_router = __esm({
|
|
|
2923
2938
|
body: bodyRes
|
|
2924
2939
|
};
|
|
2925
2940
|
}
|
|
2926
|
-
throw new Error(
|
|
2941
|
+
throw new Error(
|
|
2942
|
+
`Handler for ${intent} does not implement handle or execute`
|
|
2943
|
+
);
|
|
2927
2944
|
}
|
|
2928
2945
|
logIntent(intent, start, ok, error) {
|
|
2929
2946
|
const diff = process.hrtime(start);
|
|
@@ -3631,6 +3648,7 @@ var init_intent_router = __esm({
|
|
|
3631
3648
|
intent: meta.intent,
|
|
3632
3649
|
version: 1,
|
|
3633
3650
|
bodyProfile: meta.bodyProfile || "TLV_MAP",
|
|
3651
|
+
dtoName: meta.dto.name || void 0,
|
|
3634
3652
|
fields: extracted.fields.map((f) => ({
|
|
3635
3653
|
name: f.name,
|
|
3636
3654
|
tlv: f.tag,
|
|
@@ -13047,6 +13065,7 @@ __export(index_exports, {
|
|
|
13047
13065
|
AXIS_OPCODES: () => AXIS_OPCODES,
|
|
13048
13066
|
AXIS_PUBLIC_KEY: () => AXIS_PUBLIC_KEY,
|
|
13049
13067
|
AXIS_RATE_LIMIT_KEY: () => AXIS_RATE_LIMIT_KEY,
|
|
13068
|
+
AXIS_STREAM_META_KEY: () => AXIS_STREAM_META_KEY,
|
|
13050
13069
|
AXIS_UPLOAD_FILE_STORE: () => AXIS_UPLOAD_FILE_STORE,
|
|
13051
13070
|
AXIS_UPLOAD_RECEIPT_SIGNER: () => AXIS_UPLOAD_RECEIPT_SIGNER,
|
|
13052
13071
|
AXIS_UPLOAD_SESSION_STORE: () => AXIS_UPLOAD_SESSION_STORE,
|
|
@@ -13066,6 +13085,7 @@ __export(index_exports, {
|
|
|
13066
13085
|
AxisRateLimit: () => AxisRateLimit,
|
|
13067
13086
|
AxisResponseDto: () => import_axis_response.AxisResponseDto,
|
|
13068
13087
|
AxisSensorChainService: () => AxisSensorChainService,
|
|
13088
|
+
AxisStream: () => AxisStream,
|
|
13069
13089
|
AxisTlvDto: () => AxisTlvDto,
|
|
13070
13090
|
BAND: () => BAND,
|
|
13071
13091
|
BodyProfile: () => BodyProfile2,
|
|
@@ -13435,6 +13455,7 @@ init_index();
|
|
|
13435
13455
|
AXIS_OPCODES,
|
|
13436
13456
|
AXIS_PUBLIC_KEY,
|
|
13437
13457
|
AXIS_RATE_LIMIT_KEY,
|
|
13458
|
+
AXIS_STREAM_META_KEY,
|
|
13438
13459
|
AXIS_UPLOAD_FILE_STORE,
|
|
13439
13460
|
AXIS_UPLOAD_RECEIPT_SIGNER,
|
|
13440
13461
|
AXIS_UPLOAD_SESSION_STORE,
|
|
@@ -13454,6 +13475,7 @@ init_index();
|
|
|
13454
13475
|
AxisRateLimit,
|
|
13455
13476
|
AxisResponseDto,
|
|
13456
13477
|
AxisSensorChainService,
|
|
13478
|
+
AxisStream,
|
|
13457
13479
|
AxisTlvDto,
|
|
13458
13480
|
BAND,
|
|
13459
13481
|
BodyProfile,
|