@contractspec/lib.knowledge 2.3.0 → 2.5.0

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 (44) hide show
  1. package/dist/access/guard.d.ts +3 -0
  2. package/dist/access/guard.js +290 -5
  3. package/dist/access/index.js +290 -5
  4. package/dist/i18n/catalogs/en.d.ts +8 -0
  5. package/dist/i18n/catalogs/en.js +107 -0
  6. package/dist/i18n/catalogs/es.d.ts +6 -0
  7. package/dist/i18n/catalogs/es.js +80 -0
  8. package/dist/i18n/catalogs/fr.d.ts +6 -0
  9. package/dist/i18n/catalogs/fr.js +80 -0
  10. package/dist/i18n/catalogs/index.d.ts +8 -0
  11. package/dist/i18n/catalogs/index.js +263 -0
  12. package/dist/i18n/i18n.test.d.ts +1 -0
  13. package/dist/i18n/index.d.ts +27 -0
  14. package/dist/i18n/index.js +321 -0
  15. package/dist/i18n/keys.d.ts +74 -0
  16. package/dist/i18n/keys.js +33 -0
  17. package/dist/i18n/locale.d.ts +8 -0
  18. package/dist/i18n/locale.js +14 -0
  19. package/dist/i18n/messages.d.ts +14 -0
  20. package/dist/i18n/messages.js +275 -0
  21. package/dist/index.js +316 -23
  22. package/dist/ingestion/gmail-adapter.d.ts +2 -1
  23. package/dist/ingestion/gmail-adapter.js +284 -8
  24. package/dist/ingestion/index.js +284 -8
  25. package/dist/node/access/guard.js +290 -5
  26. package/dist/node/access/index.js +290 -5
  27. package/dist/node/i18n/catalogs/en.js +106 -0
  28. package/dist/node/i18n/catalogs/es.js +79 -0
  29. package/dist/node/i18n/catalogs/fr.js +79 -0
  30. package/dist/node/i18n/catalogs/index.js +262 -0
  31. package/dist/node/i18n/index.js +320 -0
  32. package/dist/node/i18n/keys.js +32 -0
  33. package/dist/node/i18n/locale.js +13 -0
  34. package/dist/node/i18n/messages.js +274 -0
  35. package/dist/node/index.js +316 -23
  36. package/dist/node/ingestion/gmail-adapter.js +284 -8
  37. package/dist/node/ingestion/index.js +284 -8
  38. package/dist/node/query/index.js +282 -10
  39. package/dist/node/query/service.js +282 -10
  40. package/dist/query/index.js +282 -10
  41. package/dist/query/service.d.ts +3 -0
  42. package/dist/query/service.js +282 -10
  43. package/dist/types.d.ts +2 -0
  44. package/package.json +125 -5
package/dist/types.d.ts CHANGED
@@ -28,6 +28,8 @@ export interface RetrievalOptions {
28
28
  tenantId?: string;
29
29
  /** Additional filter criteria */
30
30
  filter?: Record<string, unknown>;
31
+ /** Locale for i18n-aware retrieval */
32
+ locale?: string;
31
33
  }
32
34
  /**
33
35
  * Context for knowledge access operations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.knowledge",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "RAG and knowledge base primitives",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -31,13 +31,13 @@
31
31
  "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@contractspec/lib.contracts-spec": "2.3.0",
35
- "@contractspec/lib.contracts-integrations": "2.3.0"
34
+ "@contractspec/lib.contracts-spec": "2.5.0",
35
+ "@contractspec/lib.contracts-integrations": "2.5.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@contractspec/tool.typescript": "2.3.0",
38
+ "@contractspec/tool.typescript": "2.5.0",
39
39
  "typescript": "^5.9.3",
40
- "@contractspec/tool.bun": "2.3.0"
40
+ "@contractspec/tool.bun": "2.5.0"
41
41
  },
42
42
  "exports": {
43
43
  ".": {
@@ -64,6 +64,66 @@
64
64
  "node": "./dist/node/access/index.js",
65
65
  "default": "./dist/access/index.js"
66
66
  },
67
+ "./i18n": {
68
+ "types": "./dist/i18n/index.d.ts",
69
+ "bun": "./dist/i18n/index.js",
70
+ "node": "./dist/node/i18n/index.js",
71
+ "default": "./dist/i18n/index.js"
72
+ },
73
+ "./i18n/catalogs": {
74
+ "types": "./dist/i18n/catalogs/index.d.ts",
75
+ "bun": "./dist/i18n/catalogs/index.js",
76
+ "node": "./dist/node/i18n/catalogs/index.js",
77
+ "default": "./dist/i18n/catalogs/index.js"
78
+ },
79
+ "./i18n/catalogs/en": {
80
+ "types": "./dist/i18n/catalogs/en.d.ts",
81
+ "bun": "./dist/i18n/catalogs/en.js",
82
+ "node": "./dist/node/i18n/catalogs/en.js",
83
+ "default": "./dist/i18n/catalogs/en.js"
84
+ },
85
+ "./i18n/catalogs/es": {
86
+ "types": "./dist/i18n/catalogs/es.d.ts",
87
+ "bun": "./dist/i18n/catalogs/es.js",
88
+ "node": "./dist/node/i18n/catalogs/es.js",
89
+ "default": "./dist/i18n/catalogs/es.js"
90
+ },
91
+ "./i18n/catalogs/fr": {
92
+ "types": "./dist/i18n/catalogs/fr.d.ts",
93
+ "bun": "./dist/i18n/catalogs/fr.js",
94
+ "node": "./dist/node/i18n/catalogs/fr.js",
95
+ "default": "./dist/i18n/catalogs/fr.js"
96
+ },
97
+ "./i18n/catalogs/index": {
98
+ "types": "./dist/i18n/catalogs/index.d.ts",
99
+ "bun": "./dist/i18n/catalogs/index.js",
100
+ "node": "./dist/node/i18n/catalogs/index.js",
101
+ "default": "./dist/i18n/catalogs/index.js"
102
+ },
103
+ "./i18n/index": {
104
+ "types": "./dist/i18n/index.d.ts",
105
+ "bun": "./dist/i18n/index.js",
106
+ "node": "./dist/node/i18n/index.js",
107
+ "default": "./dist/i18n/index.js"
108
+ },
109
+ "./i18n/keys": {
110
+ "types": "./dist/i18n/keys.d.ts",
111
+ "bun": "./dist/i18n/keys.js",
112
+ "node": "./dist/node/i18n/keys.js",
113
+ "default": "./dist/i18n/keys.js"
114
+ },
115
+ "./i18n/locale": {
116
+ "types": "./dist/i18n/locale.d.ts",
117
+ "bun": "./dist/i18n/locale.js",
118
+ "node": "./dist/node/i18n/locale.js",
119
+ "default": "./dist/i18n/locale.js"
120
+ },
121
+ "./i18n/messages": {
122
+ "types": "./dist/i18n/messages.d.ts",
123
+ "bun": "./dist/i18n/messages.js",
124
+ "node": "./dist/node/i18n/messages.js",
125
+ "default": "./dist/i18n/messages.js"
126
+ },
67
127
  "./ingestion": {
68
128
  "types": "./dist/ingestion/index.d.ts",
69
129
  "bun": "./dist/ingestion/index.js",
@@ -188,6 +248,66 @@
188
248
  "node": "./dist/node/access/index.js",
189
249
  "default": "./dist/access/index.js"
190
250
  },
251
+ "./i18n": {
252
+ "types": "./dist/i18n/index.d.ts",
253
+ "bun": "./dist/i18n/index.js",
254
+ "node": "./dist/node/i18n/index.js",
255
+ "default": "./dist/i18n/index.js"
256
+ },
257
+ "./i18n/catalogs": {
258
+ "types": "./dist/i18n/catalogs/index.d.ts",
259
+ "bun": "./dist/i18n/catalogs/index.js",
260
+ "node": "./dist/node/i18n/catalogs/index.js",
261
+ "default": "./dist/i18n/catalogs/index.js"
262
+ },
263
+ "./i18n/catalogs/en": {
264
+ "types": "./dist/i18n/catalogs/en.d.ts",
265
+ "bun": "./dist/i18n/catalogs/en.js",
266
+ "node": "./dist/node/i18n/catalogs/en.js",
267
+ "default": "./dist/i18n/catalogs/en.js"
268
+ },
269
+ "./i18n/catalogs/es": {
270
+ "types": "./dist/i18n/catalogs/es.d.ts",
271
+ "bun": "./dist/i18n/catalogs/es.js",
272
+ "node": "./dist/node/i18n/catalogs/es.js",
273
+ "default": "./dist/i18n/catalogs/es.js"
274
+ },
275
+ "./i18n/catalogs/fr": {
276
+ "types": "./dist/i18n/catalogs/fr.d.ts",
277
+ "bun": "./dist/i18n/catalogs/fr.js",
278
+ "node": "./dist/node/i18n/catalogs/fr.js",
279
+ "default": "./dist/i18n/catalogs/fr.js"
280
+ },
281
+ "./i18n/catalogs/index": {
282
+ "types": "./dist/i18n/catalogs/index.d.ts",
283
+ "bun": "./dist/i18n/catalogs/index.js",
284
+ "node": "./dist/node/i18n/catalogs/index.js",
285
+ "default": "./dist/i18n/catalogs/index.js"
286
+ },
287
+ "./i18n/index": {
288
+ "types": "./dist/i18n/index.d.ts",
289
+ "bun": "./dist/i18n/index.js",
290
+ "node": "./dist/node/i18n/index.js",
291
+ "default": "./dist/i18n/index.js"
292
+ },
293
+ "./i18n/keys": {
294
+ "types": "./dist/i18n/keys.d.ts",
295
+ "bun": "./dist/i18n/keys.js",
296
+ "node": "./dist/node/i18n/keys.js",
297
+ "default": "./dist/i18n/keys.js"
298
+ },
299
+ "./i18n/locale": {
300
+ "types": "./dist/i18n/locale.d.ts",
301
+ "bun": "./dist/i18n/locale.js",
302
+ "node": "./dist/node/i18n/locale.js",
303
+ "default": "./dist/i18n/locale.js"
304
+ },
305
+ "./i18n/messages": {
306
+ "types": "./dist/i18n/messages.d.ts",
307
+ "bun": "./dist/i18n/messages.js",
308
+ "node": "./dist/node/i18n/messages.js",
309
+ "default": "./dist/i18n/messages.js"
310
+ },
191
311
  "./ingestion": {
192
312
  "types": "./dist/ingestion/index.d.ts",
193
313
  "bun": "./dist/ingestion/index.js",