@ai-pip/core 0.1.3 → 0.1.4
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/cpe/index.d.ts +2 -2
- package/dist/cpe/index.d.ts.map +1 -1
- package/dist/cpe/index.js +1 -3
- package/dist/cpe/index.js.map +1 -1
- package/dist/cpe/value-objects/Metadata.js +1 -1
- package/dist/cpe/value-objects/index.d.ts +5 -3
- package/dist/cpe/value-objects/index.d.ts.map +1 -1
- package/dist/cpe/value-objects/index.js +3 -3
- package/dist/cpe/value-objects/index.js.map +1 -1
- package/dist/csl/exceptions/index.d.ts +2 -2
- package/dist/csl/exceptions/index.d.ts.map +1 -1
- package/dist/csl/exceptions/index.js +2 -2
- package/dist/csl/exceptions/index.js.map +1 -1
- package/dist/csl/index.d.ts +6 -3
- package/dist/csl/index.d.ts.map +1 -1
- package/dist/csl/index.js +4 -4
- package/dist/csl/index.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/isl/exceptions/index.d.ts +1 -1
- package/dist/isl/exceptions/index.d.ts.map +1 -1
- package/dist/isl/exceptions/index.js +1 -1
- package/dist/isl/exceptions/index.js.map +1 -1
- package/dist/isl/index.d.ts +4 -3
- package/dist/isl/index.d.ts.map +1 -1
- package/dist/isl/index.js +2 -5
- package/dist/isl/index.js.map +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cpe/index.ts +11 -2
- package/src/cpe/value-objects/Metadata.ts +1 -1
- package/src/cpe/value-objects/index.ts +5 -3
- package/src/csl/exceptions/index.ts +2 -2
- package/src/csl/index.ts +24 -3
- package/src/index.ts +79 -5
- package/src/isl/exceptions/index.ts +1 -1
- package/src/isl/index.ts +36 -3
- package/src/shared/index.ts +6 -1
package/dist/cpe/index.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export type { Nonce } from './value-objects/Nonce';
|
|
|
19
19
|
export { createMetadata, isValidMetadata, CURRENT_PROTOCOL_VERSION } from './value-objects/Metadata';
|
|
20
20
|
export { createSignature } from './value-objects/Signature';
|
|
21
21
|
export type { SignatureVO } from './value-objects/Signature';
|
|
22
|
-
export
|
|
23
|
-
export
|
|
22
|
+
export { EnvelopeError } from './exceptions/EnvelopeError';
|
|
23
|
+
export type { ProtocolVersion, Timestamp, NonceValue, SignatureAlgorithm, Signature, CPEMetadata, CPEEvelope, CPEResult } from './types';
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cpe/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cpe/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,YAAY,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAG5D,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cpe/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,YAAY,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,YAAY,EACV,eAAe,EACf,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,UAAU,EACV,SAAS,EACV,MAAM,SAAS,CAAA"}
|
package/dist/cpe/index.js
CHANGED
|
@@ -20,9 +20,7 @@ export { createNonce, isValidNonce, equalsNonce } from './value-objects/Nonce';
|
|
|
20
20
|
export { createMetadata, isValidMetadata, CURRENT_PROTOCOL_VERSION } from './value-objects/Metadata';
|
|
21
21
|
export { createSignature } from './value-objects/Signature';
|
|
22
22
|
// Exceptions
|
|
23
|
-
export
|
|
24
|
-
// Types
|
|
25
|
-
export * from './types';
|
|
23
|
+
export { EnvelopeError } from './exceptions/EnvelopeError';
|
|
26
24
|
// Serialización y verificación NO son core - van al SDK
|
|
27
25
|
// El core solo define la estructura del envelope, no implementa serialización
|
|
28
26
|
//# sourceMappingURL=index.js.map
|
package/dist/cpe/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cpe/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAE9E,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3D,aAAa;AACb,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cpe/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAE9E,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3D,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAc1D,wDAAwD;AACxD,8EAA8E"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Versión actual del protocolo
|
|
7
7
|
*/
|
|
8
|
-
export const CURRENT_PROTOCOL_VERSION = '1.
|
|
8
|
+
export const CURRENT_PROTOCOL_VERSION = '0.1.4';
|
|
9
9
|
/**
|
|
10
10
|
* Crea metadata de seguridad para el envelope
|
|
11
11
|
* Según especificación: timestamp, nonce, protocolVersion, previousSignatures opcionales
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CPE Value Objects - Exports
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type { Nonce } from './Nonce';
|
|
5
|
+
export { createNonce, isValidNonce, equalsNonce } from './Nonce';
|
|
6
|
+
export { createMetadata, isValidMetadata } from './Metadata';
|
|
7
|
+
export type { SignatureVO } from './Signature';
|
|
8
|
+
export { createSignature, verifySignature, isValidSignatureFormat } from './Signature';
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cpe/value-objects/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cpe/value-objects/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CPE Value Objects - Exports
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export { createNonce, isValidNonce, equalsNonce } from './Nonce';
|
|
5
|
+
export { createMetadata, isValidMetadata } from './Metadata';
|
|
6
|
+
export { createSignature, verifySignature, isValidSignatureFormat } from './Signature';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cpe/value-objects/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cpe/value-objects/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { ClassificationError } from './ClassificationError';
|
|
2
|
+
export { SegmentationError } from './SegmentationError';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/csl/exceptions/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/csl/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { ClassificationError } from './ClassificationError';
|
|
2
|
+
export { SegmentationError } from './SegmentationError';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/csl/exceptions/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/csl/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/csl/index.d.ts
CHANGED
|
@@ -17,8 +17,11 @@
|
|
|
17
17
|
export { segment } from './segment';
|
|
18
18
|
export { classifySource, classifyOrigin } from './classify';
|
|
19
19
|
export { initLineage, createLineageEntry } from './lineage';
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
20
|
+
export type { TrustLevel, Origin, LineageEntry, ContentHash } from './value-objects';
|
|
21
|
+
export { createTrustLevel, isTrusted, isSemiTrusted, isUntrusted, createOrigin, isDom, isUser, isSystem, isInjected, isUnknown, isNetworkFetched, isExternal, isSha256, isSha512, originMap, createContentHash, validateOriginMap } from './value-objects';
|
|
22
|
+
export { ClassificationError } from './exceptions/ClassificationError';
|
|
23
|
+
export { SegmentationError } from './exceptions/SegmentationError';
|
|
24
|
+
export { OriginType, TrustLevelType } from './types';
|
|
25
|
+
export type { HashAlgorithm, Source, CSLInput, CSLSegment, CSLResult } from './types';
|
|
23
26
|
export { generateId, splitByContextRules } from './utils';
|
|
24
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/csl/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/csl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAG3D,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/csl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAG3D,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACpF,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,WAAW,EACX,YAAY,EACZ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGlE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGrF,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/csl/index.js
CHANGED
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
export { segment } from './segment';
|
|
19
19
|
export { classifySource, classifyOrigin } from './classify';
|
|
20
20
|
export { initLineage, createLineageEntry } from './lineage';
|
|
21
|
-
|
|
22
|
-
export * from './value-objects';
|
|
21
|
+
export { createTrustLevel, isTrusted, isSemiTrusted, isUntrusted, createOrigin, isDom, isUser, isSystem, isInjected, isUnknown, isNetworkFetched, isExternal, isSha256, isSha512, originMap, createContentHash, validateOriginMap } from './value-objects';
|
|
23
22
|
// Exceptions
|
|
24
|
-
export
|
|
23
|
+
export { ClassificationError } from './exceptions/ClassificationError';
|
|
24
|
+
export { SegmentationError } from './exceptions/SegmentationError';
|
|
25
25
|
// Types
|
|
26
|
-
export
|
|
26
|
+
export { OriginType, TrustLevelType } from './types';
|
|
27
27
|
// Utils
|
|
28
28
|
export { generateId, splitByContextRules } from './utils';
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
package/dist/csl/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/csl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/csl/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAI3D,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,WAAW,EACX,YAAY,EACZ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAExB,aAAa;AACb,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAElE,QAAQ;AACR,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGpD,QAAQ;AACR,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,12 @@
|
|
|
10
10
|
* - import { addLineageEntry } from '@ai-pip/core/shared'
|
|
11
11
|
* - import { envelope } from '@ai-pip/core/cpe'
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
13
|
+
export { segment, classifySource, classifyOrigin, initLineage, createLineageEntry, generateId, splitByContextRules, OriginType, TrustLevelType, ClassificationError, SegmentationError } from './csl';
|
|
14
|
+
export type { HashAlgorithm, Source, CSLInput, CSLSegment, CSLResult, TrustLevel, Origin, LineageEntry, ContentHash } from './csl';
|
|
15
|
+
export { sanitize } from './isl';
|
|
16
|
+
export type { RiskScore, AnomalyAction, Position, BlockedIntent, SensitiveScope, ProtectedRole, ImmutableInstruction, RemovedInstruction, ISLSegment, ISLResult, PiDetection, PiDetectionResult, AnomalyScore, Pattern } from './isl';
|
|
17
|
+
export { createPiDetection, getDetectionLength, isHighConfidence, isMediumConfidence, isLowConfidence, createPiDetectionResult, hasDetections, getDetectionCount, getDetectionsByType, getHighestConfidenceDetection, createAnomalyScore, isHighRisk, isWarnRisk, isLowRisk, createPattern, matchesPattern, findMatch, MAX_CONTENT_LENGTH, MAX_PATTERN_LENGTH, MAX_MATCHES, SanitizationError } from './isl';
|
|
18
|
+
export { addLineageEntry, addLineageEntries, filterLineageByStep, getLastLineageEntry } from './shared';
|
|
19
|
+
export { envelope, createNonce, isValidNonce, equalsNonce, createMetadata, isValidMetadata, CURRENT_PROTOCOL_VERSION, createSignature, EnvelopeError } from './cpe';
|
|
20
|
+
export type { Nonce, SignatureVO, ProtocolVersion, Timestamp, NonceValue, SignatureAlgorithm, Signature, CPEMetadata, CPEEvelope, CPEResult } from './cpe';
|
|
17
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,cAAc,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,OAAO,CAAA;AACd,YAAY,EACV,aAAa,EACb,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,MAAM,EACN,YAAY,EACZ,WAAW,EACZ,MAAM,OAAO,CAAA;AAGd,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,YAAY,EACV,SAAS,EACT,aAAa,EACb,QAAQ,EACR,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACR,MAAM,OAAO,CAAA;AACd,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,6BAA6B,EAC7B,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EAClB,MAAM,OAAO,CAAA;AAGd,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,UAAU,CAAA;AAGjB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,wBAAwB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACnK,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -10,9 +10,13 @@
|
|
|
10
10
|
* - import { addLineageEntry } from '@ai-pip/core/shared'
|
|
11
11
|
* - import { envelope } from '@ai-pip/core/cpe'
|
|
12
12
|
*/
|
|
13
|
-
// Re-export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
13
|
+
// Re-export CSL
|
|
14
|
+
export { segment, classifySource, classifyOrigin, initLineage, createLineageEntry, generateId, splitByContextRules, OriginType, TrustLevelType, ClassificationError, SegmentationError } from './csl';
|
|
15
|
+
// Re-export ISL
|
|
16
|
+
export { sanitize } from './isl';
|
|
17
|
+
export { createPiDetection, getDetectionLength, isHighConfidence, isMediumConfidence, isLowConfidence, createPiDetectionResult, hasDetections, getDetectionCount, getDetectionsByType, getHighestConfidenceDetection, createAnomalyScore, isHighRisk, isWarnRisk, isLowRisk, createPattern, matchesPattern, findMatch, MAX_CONTENT_LENGTH, MAX_PATTERN_LENGTH, MAX_MATCHES, SanitizationError } from './isl';
|
|
18
|
+
// Re-export Shared
|
|
19
|
+
export { addLineageEntry, addLineageEntries, filterLineageByStep, getLastLineageEntry } from './shared';
|
|
20
|
+
// Re-export CPE
|
|
21
|
+
export { envelope, createNonce, isValidNonce, equalsNonce, createMetadata, isValidMetadata, CURRENT_PROTOCOL_VERSION, createSignature, EnvelopeError } from './cpe';
|
|
18
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,gBAAgB;AAChB,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,OAAO,CAAA;AAad,gBAAgB;AAChB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAiBhC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,6BAA6B,EAC7B,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EAClB,MAAM,OAAO,CAAA;AAEd,mBAAmB;AACnB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,UAAU,CAAA;AAEjB,gBAAgB;AAChB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,wBAAwB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SanitizationError } from './SanitizationError';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/isl/exceptions/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/isl/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SanitizationError } from './SanitizationError';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/isl/exceptions/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/isl/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/isl/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* aplicando diferentes niveles de sanitización según el nivel de confianza.
|
|
7
7
|
*/
|
|
8
8
|
export { sanitize } from './sanitize';
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
9
|
+
export type { PiDetection, PiDetectionResult, AnomalyScore, Pattern } from './value-objects';
|
|
10
|
+
export { createPiDetection, getDetectionLength, isHighConfidence, isMediumConfidence, isLowConfidence, createPiDetectionResult, hasDetections, getDetectionCount, getDetectionsByType, getHighestConfidenceDetection, createAnomalyScore, isHighRisk, isWarnRisk, isLowRisk, createPattern, matchesPattern, findMatch, MAX_CONTENT_LENGTH, MAX_PATTERN_LENGTH, MAX_MATCHES } from './value-objects';
|
|
11
|
+
export { SanitizationError } from './exceptions/SanitizationError';
|
|
12
|
+
export type { RiskScore, AnomalyAction, Position, BlockedIntent, SensitiveScope, ProtectedRole, ImmutableInstruction, RemovedInstruction, ISLSegment, ISLResult } from './types';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/isl/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/isl/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/isl/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,6BAA6B,EAC7B,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACZ,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGlE,YAAY,EACV,SAAS,EACT,aAAa,EACb,QAAQ,EACR,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,SAAS,EACV,MAAM,SAAS,CAAA"}
|
package/dist/isl/index.js
CHANGED
|
@@ -7,10 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
// Funciones puras principales
|
|
9
9
|
export { sanitize } from './sanitize';
|
|
10
|
-
|
|
11
|
-
export * from './value-objects';
|
|
10
|
+
export { createPiDetection, getDetectionLength, isHighConfidence, isMediumConfidence, isLowConfidence, createPiDetectionResult, hasDetections, getDetectionCount, getDetectionsByType, getHighestConfidenceDetection, createAnomalyScore, isHighRisk, isWarnRisk, isLowRisk, createPattern, matchesPattern, findMatch, MAX_CONTENT_LENGTH, MAX_PATTERN_LENGTH, MAX_MATCHES } from './value-objects';
|
|
12
11
|
// Exceptions
|
|
13
|
-
export
|
|
14
|
-
// Types
|
|
15
|
-
export * from './types';
|
|
12
|
+
export { SanitizationError } from './exceptions/SanitizationError';
|
|
16
13
|
//# sourceMappingURL=index.js.map
|
package/dist/isl/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/isl/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/isl/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIrC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,6BAA6B,EAC7B,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACZ,MAAM,iBAAiB,CAAA;AAExB,aAAa;AACb,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA"}
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Solo funciones básicas de manejo de linaje.
|
|
6
6
|
* Auditoría y análisis avanzado van al SDK.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export { addLineageEntry, addLineageEntries, filterLineageByStep, getLastLineageEntry } from './lineage';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,WAAW,CAAA"}
|
package/dist/shared/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Auditoría y análisis avanzado van al SDK.
|
|
7
7
|
*/
|
|
8
8
|
// Lineage básico
|
|
9
|
-
export
|
|
9
|
+
export { addLineageEntry, addLineageEntries, filterLineageByStep, getLastLineageEntry } from './lineage';
|
|
10
10
|
// Funciones de auditoría NO son core - van al SDK/tooling
|
|
11
11
|
// El core solo preserva linaje, no lo analiza
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/shared/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iBAAiB;AACjB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iBAAiB;AACjB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,WAAW,CAAA;AAElB,0DAA0D;AAC1D,8CAA8C"}
|
package/package.json
CHANGED
package/src/cpe/index.ts
CHANGED
|
@@ -25,10 +25,19 @@ export { createSignature } from './value-objects/Signature'
|
|
|
25
25
|
export type { SignatureVO } from './value-objects/Signature'
|
|
26
26
|
|
|
27
27
|
// Exceptions
|
|
28
|
-
export
|
|
28
|
+
export { EnvelopeError } from './exceptions/EnvelopeError'
|
|
29
29
|
|
|
30
30
|
// Types
|
|
31
|
-
export
|
|
31
|
+
export type {
|
|
32
|
+
ProtocolVersion,
|
|
33
|
+
Timestamp,
|
|
34
|
+
NonceValue,
|
|
35
|
+
SignatureAlgorithm,
|
|
36
|
+
Signature,
|
|
37
|
+
CPEMetadata,
|
|
38
|
+
CPEEvelope,
|
|
39
|
+
CPEResult
|
|
40
|
+
} from './types'
|
|
32
41
|
|
|
33
42
|
// Serialización y verificación NO son core - van al SDK
|
|
34
43
|
// El core solo define la estructura del envelope, no implementa serialización
|
|
@@ -9,7 +9,7 @@ import type { Nonce as NonceVO } from './Nonce'
|
|
|
9
9
|
/**
|
|
10
10
|
* Versión actual del protocolo
|
|
11
11
|
*/
|
|
12
|
-
export const CURRENT_PROTOCOL_VERSION: ProtocolVersion = '1.
|
|
12
|
+
export const CURRENT_PROTOCOL_VERSION: ProtocolVersion = '0.1.4'
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Crea metadata de seguridad para el envelope
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* CPE Value Objects - Exports
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export type { Nonce } from './Nonce'
|
|
6
|
+
export { createNonce, isValidNonce, equalsNonce } from './Nonce'
|
|
7
|
+
export { createMetadata, isValidMetadata } from './Metadata'
|
|
8
|
+
export type { SignatureVO } from './Signature'
|
|
9
|
+
export { createSignature, verifySignature, isValidSignatureFormat } from './Signature'
|
|
8
10
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { ClassificationError } from './ClassificationError'
|
|
2
|
+
export { SegmentationError } from './SegmentationError'
|
|
3
3
|
|
package/src/csl/index.ts
CHANGED
|
@@ -21,13 +21,34 @@ export { classifySource, classifyOrigin } from './classify'
|
|
|
21
21
|
export { initLineage, createLineageEntry } from './lineage'
|
|
22
22
|
|
|
23
23
|
// Value objects
|
|
24
|
-
export
|
|
24
|
+
export type { TrustLevel, Origin, LineageEntry, ContentHash } from './value-objects'
|
|
25
|
+
export {
|
|
26
|
+
createTrustLevel,
|
|
27
|
+
isTrusted,
|
|
28
|
+
isSemiTrusted,
|
|
29
|
+
isUntrusted,
|
|
30
|
+
createOrigin,
|
|
31
|
+
isDom,
|
|
32
|
+
isUser,
|
|
33
|
+
isSystem,
|
|
34
|
+
isInjected,
|
|
35
|
+
isUnknown,
|
|
36
|
+
isNetworkFetched,
|
|
37
|
+
isExternal,
|
|
38
|
+
isSha256,
|
|
39
|
+
isSha512,
|
|
40
|
+
originMap,
|
|
41
|
+
createContentHash,
|
|
42
|
+
validateOriginMap
|
|
43
|
+
} from './value-objects'
|
|
25
44
|
|
|
26
45
|
// Exceptions
|
|
27
|
-
export
|
|
46
|
+
export { ClassificationError } from './exceptions/ClassificationError'
|
|
47
|
+
export { SegmentationError } from './exceptions/SegmentationError'
|
|
28
48
|
|
|
29
49
|
// Types
|
|
30
|
-
export
|
|
50
|
+
export { OriginType, TrustLevelType } from './types'
|
|
51
|
+
export type { HashAlgorithm, Source, CSLInput, CSLSegment, CSLResult } from './types'
|
|
31
52
|
|
|
32
53
|
// Utils
|
|
33
54
|
export { generateId, splitByContextRules } from './utils'
|
package/src/index.ts
CHANGED
|
@@ -11,10 +11,84 @@
|
|
|
11
11
|
* - import { envelope } from '@ai-pip/core/cpe'
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
// Re-export
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
// Re-export CSL
|
|
15
|
+
export {
|
|
16
|
+
segment,
|
|
17
|
+
classifySource,
|
|
18
|
+
classifyOrigin,
|
|
19
|
+
initLineage,
|
|
20
|
+
createLineageEntry,
|
|
21
|
+
generateId,
|
|
22
|
+
splitByContextRules,
|
|
23
|
+
OriginType,
|
|
24
|
+
TrustLevelType,
|
|
25
|
+
ClassificationError,
|
|
26
|
+
SegmentationError
|
|
27
|
+
} from './csl'
|
|
28
|
+
export type {
|
|
29
|
+
HashAlgorithm,
|
|
30
|
+
Source,
|
|
31
|
+
CSLInput,
|
|
32
|
+
CSLSegment,
|
|
33
|
+
CSLResult,
|
|
34
|
+
TrustLevel,
|
|
35
|
+
Origin,
|
|
36
|
+
LineageEntry,
|
|
37
|
+
ContentHash
|
|
38
|
+
} from './csl'
|
|
39
|
+
|
|
40
|
+
// Re-export ISL
|
|
41
|
+
export { sanitize } from './isl'
|
|
42
|
+
export type {
|
|
43
|
+
RiskScore,
|
|
44
|
+
AnomalyAction,
|
|
45
|
+
Position,
|
|
46
|
+
BlockedIntent,
|
|
47
|
+
SensitiveScope,
|
|
48
|
+
ProtectedRole,
|
|
49
|
+
ImmutableInstruction,
|
|
50
|
+
RemovedInstruction,
|
|
51
|
+
ISLSegment,
|
|
52
|
+
ISLResult,
|
|
53
|
+
PiDetection,
|
|
54
|
+
PiDetectionResult,
|
|
55
|
+
AnomalyScore,
|
|
56
|
+
Pattern
|
|
57
|
+
} from './isl'
|
|
58
|
+
export {
|
|
59
|
+
createPiDetection,
|
|
60
|
+
getDetectionLength,
|
|
61
|
+
isHighConfidence,
|
|
62
|
+
isMediumConfidence,
|
|
63
|
+
isLowConfidence,
|
|
64
|
+
createPiDetectionResult,
|
|
65
|
+
hasDetections,
|
|
66
|
+
getDetectionCount,
|
|
67
|
+
getDetectionsByType,
|
|
68
|
+
getHighestConfidenceDetection,
|
|
69
|
+
createAnomalyScore,
|
|
70
|
+
isHighRisk,
|
|
71
|
+
isWarnRisk,
|
|
72
|
+
isLowRisk,
|
|
73
|
+
createPattern,
|
|
74
|
+
matchesPattern,
|
|
75
|
+
findMatch,
|
|
76
|
+
MAX_CONTENT_LENGTH,
|
|
77
|
+
MAX_PATTERN_LENGTH,
|
|
78
|
+
MAX_MATCHES,
|
|
79
|
+
SanitizationError
|
|
80
|
+
} from './isl'
|
|
81
|
+
|
|
82
|
+
// Re-export Shared
|
|
83
|
+
export {
|
|
84
|
+
addLineageEntry,
|
|
85
|
+
addLineageEntries,
|
|
86
|
+
filterLineageByStep,
|
|
87
|
+
getLastLineageEntry
|
|
88
|
+
} from './shared'
|
|
89
|
+
|
|
90
|
+
// Re-export CPE
|
|
91
|
+
export { envelope, createNonce, isValidNonce, equalsNonce, createMetadata, isValidMetadata, CURRENT_PROTOCOL_VERSION, createSignature, EnvelopeError } from './cpe'
|
|
92
|
+
export type { Nonce, SignatureVO, ProtocolVersion, Timestamp, NonceValue, SignatureAlgorithm, Signature, CPEMetadata, CPEEvelope, CPEResult } from './cpe'
|
|
19
93
|
|
|
20
94
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SanitizationError } from './SanitizationError'
|
|
2
2
|
|
package/src/isl/index.ts
CHANGED
|
@@ -10,11 +10,44 @@
|
|
|
10
10
|
export { sanitize } from './sanitize'
|
|
11
11
|
|
|
12
12
|
// Value objects
|
|
13
|
-
export
|
|
13
|
+
export type { PiDetection, PiDetectionResult, AnomalyScore, Pattern } from './value-objects'
|
|
14
|
+
export {
|
|
15
|
+
createPiDetection,
|
|
16
|
+
getDetectionLength,
|
|
17
|
+
isHighConfidence,
|
|
18
|
+
isMediumConfidence,
|
|
19
|
+
isLowConfidence,
|
|
20
|
+
createPiDetectionResult,
|
|
21
|
+
hasDetections,
|
|
22
|
+
getDetectionCount,
|
|
23
|
+
getDetectionsByType,
|
|
24
|
+
getHighestConfidenceDetection,
|
|
25
|
+
createAnomalyScore,
|
|
26
|
+
isHighRisk,
|
|
27
|
+
isWarnRisk,
|
|
28
|
+
isLowRisk,
|
|
29
|
+
createPattern,
|
|
30
|
+
matchesPattern,
|
|
31
|
+
findMatch,
|
|
32
|
+
MAX_CONTENT_LENGTH,
|
|
33
|
+
MAX_PATTERN_LENGTH,
|
|
34
|
+
MAX_MATCHES
|
|
35
|
+
} from './value-objects'
|
|
14
36
|
|
|
15
37
|
// Exceptions
|
|
16
|
-
export
|
|
38
|
+
export { SanitizationError } from './exceptions/SanitizationError'
|
|
17
39
|
|
|
18
40
|
// Types
|
|
19
|
-
export
|
|
41
|
+
export type {
|
|
42
|
+
RiskScore,
|
|
43
|
+
AnomalyAction,
|
|
44
|
+
Position,
|
|
45
|
+
BlockedIntent,
|
|
46
|
+
SensitiveScope,
|
|
47
|
+
ProtectedRole,
|
|
48
|
+
ImmutableInstruction,
|
|
49
|
+
RemovedInstruction,
|
|
50
|
+
ISLSegment,
|
|
51
|
+
ISLResult
|
|
52
|
+
} from './types'
|
|
20
53
|
|
package/src/shared/index.ts
CHANGED
|
@@ -7,7 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
// Lineage básico
|
|
10
|
-
export
|
|
10
|
+
export {
|
|
11
|
+
addLineageEntry,
|
|
12
|
+
addLineageEntries,
|
|
13
|
+
filterLineageByStep,
|
|
14
|
+
getLastLineageEntry
|
|
15
|
+
} from './lineage'
|
|
11
16
|
|
|
12
17
|
// Funciones de auditoría NO son core - van al SDK/tooling
|
|
13
18
|
// El core solo preserva linaje, no lo analiza
|