@ai-pip/core 0.1.1 → 0.1.2
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/package.json +3 -2
- package/src/cpe/envelope.ts +3 -3
- package/src/cpe/types.ts +1 -1
- package/src/isl/sanitize.ts +5 -5
- package/src/isl/types.ts +1 -1
- package/src/shared/lineage.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-pip/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Core implementation of the AI-PIP protocol. Provides layered, zero-trust context processing (CSL, ISL, CPE, ALL, ModelGateway)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"test": "vitest",
|
|
80
80
|
"test:watch": "vitest --watch",
|
|
81
81
|
"test:ui": "vitest --ui",
|
|
82
|
-
"test:coverage": "vitest --coverage"
|
|
82
|
+
"test:coverage": "vitest --coverage",
|
|
83
|
+
"test:install": "node test-package-install.js"
|
|
83
84
|
}
|
|
84
85
|
}
|
package/src/cpe/envelope.ts
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* // - lineage: linaje completo
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
import type { ISLResult } from '
|
|
31
|
+
import type { ISLResult } from '../isl/types'
|
|
32
32
|
import type { CPEEvelope, CPEResult } from './types'
|
|
33
33
|
import { createNonce } from './value-objects/Nonce'
|
|
34
34
|
import { createMetadata } from './value-objects/Metadata'
|
|
@@ -36,8 +36,8 @@ import { createSignature } from './value-objects/Signature'
|
|
|
36
36
|
import { EnvelopeError } from './exceptions'
|
|
37
37
|
// Serialización NO es core - va al SDK
|
|
38
38
|
// El core solo define la estructura del envelope
|
|
39
|
-
import { addLineageEntries } from '
|
|
40
|
-
import { createLineageEntry } from '
|
|
39
|
+
import { addLineageEntries } from '../shared/lineage'
|
|
40
|
+
import { createLineageEntry } from '../csl/value-objects/LineageEntry'
|
|
41
41
|
|
|
42
42
|
export function envelope(islResult: ISLResult, secretKey: string): CPEResult {
|
|
43
43
|
const startTime = Date.now()
|
package/src/cpe/types.ts
CHANGED
package/src/isl/sanitize.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { CSLResult } from '
|
|
1
|
+
import type { CSLResult } from '../csl/types'
|
|
2
2
|
import type { ISLResult, ISLSegment, RemovedInstruction } from './types'
|
|
3
|
-
import { createLineageEntry } from '
|
|
4
|
-
import { addLineageEntry } from '
|
|
5
|
-
import type { TrustLevel } from '
|
|
6
|
-
import { TrustLevelType } from '
|
|
3
|
+
import { createLineageEntry } from '../csl/value-objects'
|
|
4
|
+
import { addLineageEntry } from '../shared/lineage'
|
|
5
|
+
import type { TrustLevel } from '../csl/value-objects'
|
|
6
|
+
import { TrustLevelType } from '../csl/types'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Sanitiza contenido según nivel de confianza - función pura
|
package/src/isl/types.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// Importar tipos de CSL y value objects
|
|
6
|
-
import type { LineageEntry, TrustLevel } from '
|
|
6
|
+
import type { LineageEntry, TrustLevel } from '../csl/value-objects'
|
|
7
7
|
import type { PiDetectionResult } from './value-objects/PiDetectionResult'
|
|
8
8
|
import type { AnomalyScore } from './value-objects/AnomalyScore'
|
|
9
9
|
|
package/src/shared/lineage.ts
CHANGED