@ai-pip/core 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +40 -1
  2. package/package.json +11 -6
package/README.md CHANGED
@@ -135,8 +135,47 @@ pnpm dev
135
135
 
136
136
  ## 📋 Requisitos
137
137
 
138
+ ### Runtime
138
139
  - **Node.js**: >= 18.0.0
139
- - **pnpm**: >= 8.0.0
140
+ - **pnpm**: >= 8.0.0 (recomendado) o npm/yarn
141
+
142
+ ### TypeScript
143
+
144
+ Este paquete utiliza ESM (`"type": "module"`) y exports con subpaths. Para que TypeScript resuelva correctamente los imports, tu proyecto **debe** tener la siguiente configuración en `tsconfig.json`:
145
+
146
+ ```json
147
+ {
148
+ "compilerOptions": {
149
+ "module": "NodeNext",
150
+ "moduleResolution": "nodenext",
151
+ "target": "ES2022",
152
+ // ... otras opciones
153
+ }
154
+ }
155
+ ```
156
+
157
+ **⚠️ Importante**: Sin esta configuración, TypeScript no podrá resolver los subpaths como `@ai-pip/core/csl`, `@ai-pip/core/isl`, etc., y obtendrás errores como `ERR_PACKAGE_PATH_NOT_EXPORTED`.
158
+
159
+ #### Ejemplo de `tsconfig.json` completo
160
+
161
+ ```json
162
+ {
163
+ "compilerOptions": {
164
+ "target": "ES2022",
165
+ "module": "NodeNext",
166
+ "moduleResolution": "nodenext",
167
+ "lib": ["ES2022"],
168
+ "strict": true,
169
+ "esModuleInterop": true,
170
+ "skipLibCheck": true,
171
+ "forceConsistentCasingInFileNames": true
172
+ }
173
+ }
174
+ ```
175
+
176
+ #### Si usas un runtime como `tsx` o `ts-node`
177
+
178
+ Aunque uses `tsx` o `ts-node` para ejecutar TypeScript directamente, **aún necesitas** la configuración correcta en `tsconfig.json` para que TypeScript resuelva los tipos y los imports correctamente.
140
179
 
141
180
  ## 📄 Licencia
142
181
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-pip/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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",
@@ -8,23 +8,28 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./src/index.ts",
11
- "import": "./src/index.ts"
11
+ "import": "./src/index.ts",
12
+ "default": "./src/index.ts"
12
13
  },
13
14
  "./csl": {
14
15
  "types": "./src/csl/index.ts",
15
- "import": "./src/csl/index.ts"
16
+ "import": "./src/csl/index.ts",
17
+ "default": "./src/csl/index.ts"
16
18
  },
17
19
  "./isl": {
18
20
  "types": "./src/isl/index.ts",
19
- "import": "./src/isl/index.ts"
21
+ "import": "./src/isl/index.ts",
22
+ "default": "./src/isl/index.ts"
20
23
  },
21
24
  "./cpe": {
22
25
  "types": "./src/cpe/index.ts",
23
- "import": "./src/cpe/index.ts"
26
+ "import": "./src/cpe/index.ts",
27
+ "default": "./src/cpe/index.ts"
24
28
  },
25
29
  "./shared": {
26
30
  "types": "./src/shared/index.ts",
27
- "import": "./src/shared/index.ts"
31
+ "import": "./src/shared/index.ts",
32
+ "default": "./src/shared/index.ts"
28
33
  }
29
34
  },
30
35
  "files": [