cencori 1.8.3 → 1.9.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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist/ai/index.d.mts +14 -1
  3. package/dist/ai/index.d.ts +14 -1
  4. package/dist/ai/index.js +43 -3
  5. package/dist/ai/index.js.map +1 -1
  6. package/dist/ai/index.mjs +43 -3
  7. package/dist/ai/index.mjs.map +1 -1
  8. package/dist/compute/index.d.mts +1 -1
  9. package/dist/compute/index.d.ts +1 -1
  10. package/dist/documents/index.d.mts +1 -1
  11. package/dist/documents/index.d.ts +1 -1
  12. package/dist/index.d.mts +50 -9
  13. package/dist/index.d.ts +50 -9
  14. package/dist/index.js +67 -13
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs +67 -13
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/judgment/index.d.mts +1 -1
  19. package/dist/judgment/index.d.ts +1 -1
  20. package/dist/memory/index.d.mts +1 -1
  21. package/dist/memory/index.d.ts +1 -1
  22. package/dist/storage/index.d.mts +5 -7
  23. package/dist/storage/index.d.ts +5 -7
  24. package/dist/storage/index.js +6 -8
  25. package/dist/storage/index.js.map +1 -1
  26. package/dist/storage/index.mjs +6 -8
  27. package/dist/storage/index.mjs.map +1 -1
  28. package/dist/telemetry/index.d.mts +1 -1
  29. package/dist/telemetry/index.d.ts +1 -1
  30. package/dist/{types-CAhDuNTz.d.mts → types-D91o22Gb.d.mts} +28 -1
  31. package/dist/{types-CAhDuNTz.d.ts → types-D91o22Gb.d.ts} +28 -1
  32. package/dist/vision/index.d.mts +1 -1
  33. package/dist/vision/index.d.ts +1 -1
  34. package/dist/voice/index.d.mts +1 -1
  35. package/dist/voice/index.d.ts +1 -1
  36. package/dist/web/index.d.mts +1 -1
  37. package/dist/web/index.d.ts +1 -1
  38. package/dist/workflow/index.d.mts +1 -1
  39. package/dist/workflow/index.d.ts +1 -1
  40. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.mjs';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.mjs';
2
2
 
3
3
  /**
4
4
  * Judgment API — structured decisions from decision models.
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.js';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.js';
2
2
 
3
3
  /**
4
4
  * Judgment API — structured decisions from decision models.
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.mjs';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.mjs';
2
2
 
3
3
  /**
4
4
  * Cencori Memory SDK
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.js';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.js';
2
2
 
3
3
  /**
4
4
  * Cencori Memory SDK
@@ -1,4 +1,4 @@
1
- import { V as VectorSearchOptions } from '../types-CAhDuNTz.mjs';
1
+ import { V as VectorSearchOptions } from '../types-D91o22Gb.mjs';
2
2
 
3
3
  /**
4
4
  * Storage Namespace - Vector Database, Knowledge Base, RAG
@@ -35,15 +35,13 @@ declare class VectorsNamespace {
35
35
  }
36
36
  declare class KnowledgeNamespace {
37
37
  /**
38
- * Query the knowledge base
39
- *
40
- * 🚧 Coming Soon - This feature is not yet available.
38
+ * @deprecated Never implemented. Use `cencori.knowledge.search()`, or
39
+ * ground a chat with `cencori.ai.chat({ knowledgeBases: [...] })`.
41
40
  */
42
41
  query(question: string): Promise<never>;
43
42
  /**
44
- * Add documents to knowledge base
45
- *
46
- * 🚧 Coming Soon - This feature is not yet available.
43
+ * @deprecated Never implemented. Use `cencori.knowledge.addInlineSource()`
44
+ * or `cencori.knowledge.addFileSource()`.
47
45
  */
48
46
  add(documents: {
49
47
  content: string;
@@ -1,4 +1,4 @@
1
- import { V as VectorSearchOptions } from '../types-CAhDuNTz.js';
1
+ import { V as VectorSearchOptions } from '../types-D91o22Gb.js';
2
2
 
3
3
  /**
4
4
  * Storage Namespace - Vector Database, Knowledge Base, RAG
@@ -35,15 +35,13 @@ declare class VectorsNamespace {
35
35
  }
36
36
  declare class KnowledgeNamespace {
37
37
  /**
38
- * Query the knowledge base
39
- *
40
- * 🚧 Coming Soon - This feature is not yet available.
38
+ * @deprecated Never implemented. Use `cencori.knowledge.search()`, or
39
+ * ground a chat with `cencori.ai.chat({ knowledgeBases: [...] })`.
41
40
  */
42
41
  query(question: string): Promise<never>;
43
42
  /**
44
- * Add documents to knowledge base
45
- *
46
- * 🚧 Coming Soon - This feature is not yet available.
43
+ * @deprecated Never implemented. Use `cencori.knowledge.addInlineSource()`
44
+ * or `cencori.knowledge.addFileSource()`.
47
45
  */
48
46
  add(documents: {
49
47
  content: string;
@@ -57,23 +57,21 @@ var VectorsNamespace = class {
57
57
  };
58
58
  var KnowledgeNamespace = class {
59
59
  /**
60
- * Query the knowledge base
61
- *
62
- * 🚧 Coming Soon - This feature is not yet available.
60
+ * @deprecated Never implemented. Use `cencori.knowledge.search()`, or
61
+ * ground a chat with `cencori.ai.chat({ knowledgeBases: [...] })`.
63
62
  */
64
63
  async query(question) {
65
64
  throw new Error(
66
- `cencori.storage.knowledge.query() is coming soon! Join our waitlist at https://cencori.com/memory`
65
+ `cencori.storage.knowledge.query() is not available. Use cencori.knowledge.search(kbId, { query }), or cencori.ai.chat({ knowledgeBases: [kbId], ... }).`
67
66
  );
68
67
  }
69
68
  /**
70
- * Add documents to knowledge base
71
- *
72
- * 🚧 Coming Soon - This feature is not yet available.
69
+ * @deprecated Never implemented. Use `cencori.knowledge.addInlineSource()`
70
+ * or `cencori.knowledge.addFileSource()`.
73
71
  */
74
72
  async add(documents) {
75
73
  throw new Error(
76
- `cencori.storage.knowledge.add() is coming soon! Join our waitlist at https://cencori.com/memory`
74
+ `cencori.storage.knowledge.add() is not available. Use cencori.knowledge.addInlineSource(kbId, text) or cencori.knowledge.addFileSource(kbId, file).`
77
75
  );
78
76
  }
79
77
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/storage/index.ts"],"sourcesContent":["/**\n * Storage Namespace - Vector Database, Knowledge Base, RAG\n * \n * 🚧 Coming Soon\n * \n * @example\n * const results = await cencori.storage.vectors.search('query', { limit: 5 });\n */\n\nimport type { VectorSearchOptions } from '../types';\n\nclass VectorsNamespace {\n /**\n * Search vectors by query\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async search(query: string, options?: VectorSearchOptions): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.search() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Upsert vectors\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async upsert(vectors: { id: string; values: number[]; metadata?: Record<string, unknown> }[]): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.upsert() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Delete vectors by ID\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async delete(ids: string[]): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.delete() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nclass KnowledgeNamespace {\n /**\n * Query the knowledge base\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async query(question: string): Promise<never> {\n throw new Error(\n `cencori.storage.knowledge.query() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Add documents to knowledge base\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async add(documents: { content: string; metadata?: Record<string, unknown> }[]): Promise<never> {\n throw new Error(\n `cencori.storage.knowledge.add() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nclass FilesNamespace {\n /**\n * Upload a file\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async upload(file: Blob | Buffer, name: string): Promise<never> {\n throw new Error(\n `cencori.storage.files.upload() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Process a file (extract text, OCR, etc.)\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async process(fileId: string): Promise<never> {\n throw new Error(\n `cencori.storage.files.process() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nexport class StorageNamespace {\n /**\n * Vector database operations\n */\n readonly vectors = new VectorsNamespace();\n\n /**\n * Knowledge base operations (RAG)\n */\n readonly knowledge = new KnowledgeNamespace();\n\n /**\n * File storage and processing\n */\n readonly files = new FilesNamespace();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,IAAM,mBAAN,MAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnB,MAAM,OAAO,OAAe,SAA+C;AACvE,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,SAAiG;AAC1G,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,KAA+B;AACxC,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEA,IAAM,qBAAN,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,MAAM,MAAM,UAAkC;AAC1C,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,IAAI,WAAsF;AAC5F,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEA,IAAM,iBAAN,MAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,MAAM,OAAO,MAAqB,MAA8B;AAC5D,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,QAAQ,QAAgC;AAC1C,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEO,IAAM,mBAAN,MAAuB;AAAA,EAAvB;AAIH;AAAA;AAAA;AAAA,SAAS,UAAU,IAAI,iBAAiB;AAKxC;AAAA;AAAA;AAAA,SAAS,YAAY,IAAI,mBAAmB;AAK5C;AAAA;AAAA;AAAA,SAAS,QAAQ,IAAI,eAAe;AAAA;AACxC;","names":[]}
1
+ {"version":3,"sources":["../../src/storage/index.ts"],"sourcesContent":["/**\n * Storage Namespace - Vector Database, Knowledge Base, RAG\n * \n * 🚧 Coming Soon\n * \n * @example\n * const results = await cencori.storage.vectors.search('query', { limit: 5 });\n */\n\nimport type { VectorSearchOptions } from '../types';\n\nclass VectorsNamespace {\n /**\n * Search vectors by query\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async search(query: string, options?: VectorSearchOptions): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.search() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Upsert vectors\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async upsert(vectors: { id: string; values: number[]; metadata?: Record<string, unknown> }[]): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.upsert() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Delete vectors by ID\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async delete(ids: string[]): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.delete() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nclass KnowledgeNamespace {\n /**\n * @deprecated Never implemented. Use `cencori.knowledge.search()`, or\n * ground a chat with `cencori.ai.chat({ knowledgeBases: [...] })`.\n */\n async query(question: string): Promise<never> {\n throw new Error(\n `cencori.storage.knowledge.query() is not available. ` +\n `Use cencori.knowledge.search(kbId, { query }), or cencori.ai.chat({ knowledgeBases: [kbId], ... }).`\n );\n }\n\n /**\n * @deprecated Never implemented. Use `cencori.knowledge.addInlineSource()`\n * or `cencori.knowledge.addFileSource()`.\n */\n async add(documents: { content: string; metadata?: Record<string, unknown> }[]): Promise<never> {\n throw new Error(\n `cencori.storage.knowledge.add() is not available. ` +\n `Use cencori.knowledge.addInlineSource(kbId, text) or cencori.knowledge.addFileSource(kbId, file).`\n );\n }\n}\n\nclass FilesNamespace {\n /**\n * Upload a file\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async upload(file: Blob | Buffer, name: string): Promise<never> {\n throw new Error(\n `cencori.storage.files.upload() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Process a file (extract text, OCR, etc.)\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async process(fileId: string): Promise<never> {\n throw new Error(\n `cencori.storage.files.process() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nexport class StorageNamespace {\n /**\n * Vector database operations\n */\n readonly vectors = new VectorsNamespace();\n\n /**\n * Knowledge base operations (RAG)\n */\n readonly knowledge = new KnowledgeNamespace();\n\n /**\n * File storage and processing\n */\n readonly files = new FilesNamespace();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,IAAM,mBAAN,MAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnB,MAAM,OAAO,OAAe,SAA+C;AACvE,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,SAAiG;AAC1G,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,KAA+B;AACxC,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEA,IAAM,qBAAN,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,MAAM,MAAM,UAAkC;AAC1C,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,IAAI,WAAsF;AAC5F,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEA,IAAM,iBAAN,MAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,MAAM,OAAO,MAAqB,MAA8B;AAC5D,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,QAAQ,QAAgC;AAC1C,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEO,IAAM,mBAAN,MAAuB;AAAA,EAAvB;AAIH;AAAA;AAAA;AAAA,SAAS,UAAU,IAAI,iBAAiB;AAKxC;AAAA;AAAA;AAAA,SAAS,YAAY,IAAI,mBAAmB;AAK5C;AAAA;AAAA;AAAA,SAAS,QAAQ,IAAI,eAAe;AAAA;AACxC;","names":[]}
@@ -33,23 +33,21 @@ var VectorsNamespace = class {
33
33
  };
34
34
  var KnowledgeNamespace = class {
35
35
  /**
36
- * Query the knowledge base
37
- *
38
- * 🚧 Coming Soon - This feature is not yet available.
36
+ * @deprecated Never implemented. Use `cencori.knowledge.search()`, or
37
+ * ground a chat with `cencori.ai.chat({ knowledgeBases: [...] })`.
39
38
  */
40
39
  async query(question) {
41
40
  throw new Error(
42
- `cencori.storage.knowledge.query() is coming soon! Join our waitlist at https://cencori.com/memory`
41
+ `cencori.storage.knowledge.query() is not available. Use cencori.knowledge.search(kbId, { query }), or cencori.ai.chat({ knowledgeBases: [kbId], ... }).`
43
42
  );
44
43
  }
45
44
  /**
46
- * Add documents to knowledge base
47
- *
48
- * 🚧 Coming Soon - This feature is not yet available.
45
+ * @deprecated Never implemented. Use `cencori.knowledge.addInlineSource()`
46
+ * or `cencori.knowledge.addFileSource()`.
49
47
  */
50
48
  async add(documents) {
51
49
  throw new Error(
52
- `cencori.storage.knowledge.add() is coming soon! Join our waitlist at https://cencori.com/memory`
50
+ `cencori.storage.knowledge.add() is not available. Use cencori.knowledge.addInlineSource(kbId, text) or cencori.knowledge.addFileSource(kbId, file).`
53
51
  );
54
52
  }
55
53
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/storage/index.ts"],"sourcesContent":["/**\n * Storage Namespace - Vector Database, Knowledge Base, RAG\n * \n * 🚧 Coming Soon\n * \n * @example\n * const results = await cencori.storage.vectors.search('query', { limit: 5 });\n */\n\nimport type { VectorSearchOptions } from '../types';\n\nclass VectorsNamespace {\n /**\n * Search vectors by query\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async search(query: string, options?: VectorSearchOptions): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.search() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Upsert vectors\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async upsert(vectors: { id: string; values: number[]; metadata?: Record<string, unknown> }[]): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.upsert() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Delete vectors by ID\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async delete(ids: string[]): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.delete() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nclass KnowledgeNamespace {\n /**\n * Query the knowledge base\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async query(question: string): Promise<never> {\n throw new Error(\n `cencori.storage.knowledge.query() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Add documents to knowledge base\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async add(documents: { content: string; metadata?: Record<string, unknown> }[]): Promise<never> {\n throw new Error(\n `cencori.storage.knowledge.add() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nclass FilesNamespace {\n /**\n * Upload a file\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async upload(file: Blob | Buffer, name: string): Promise<never> {\n throw new Error(\n `cencori.storage.files.upload() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Process a file (extract text, OCR, etc.)\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async process(fileId: string): Promise<never> {\n throw new Error(\n `cencori.storage.files.process() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nexport class StorageNamespace {\n /**\n * Vector database operations\n */\n readonly vectors = new VectorsNamespace();\n\n /**\n * Knowledge base operations (RAG)\n */\n readonly knowledge = new KnowledgeNamespace();\n\n /**\n * File storage and processing\n */\n readonly files = new FilesNamespace();\n}\n"],"mappings":";AAWA,IAAM,mBAAN,MAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnB,MAAM,OAAO,OAAe,SAA+C;AACvE,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,SAAiG;AAC1G,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,KAA+B;AACxC,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEA,IAAM,qBAAN,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,MAAM,MAAM,UAAkC;AAC1C,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,IAAI,WAAsF;AAC5F,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEA,IAAM,iBAAN,MAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,MAAM,OAAO,MAAqB,MAA8B;AAC5D,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,QAAQ,QAAgC;AAC1C,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEO,IAAM,mBAAN,MAAuB;AAAA,EAAvB;AAIH;AAAA;AAAA;AAAA,SAAS,UAAU,IAAI,iBAAiB;AAKxC;AAAA;AAAA;AAAA,SAAS,YAAY,IAAI,mBAAmB;AAK5C;AAAA;AAAA;AAAA,SAAS,QAAQ,IAAI,eAAe;AAAA;AACxC;","names":[]}
1
+ {"version":3,"sources":["../../src/storage/index.ts"],"sourcesContent":["/**\n * Storage Namespace - Vector Database, Knowledge Base, RAG\n * \n * 🚧 Coming Soon\n * \n * @example\n * const results = await cencori.storage.vectors.search('query', { limit: 5 });\n */\n\nimport type { VectorSearchOptions } from '../types';\n\nclass VectorsNamespace {\n /**\n * Search vectors by query\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async search(query: string, options?: VectorSearchOptions): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.search() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Upsert vectors\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async upsert(vectors: { id: string; values: number[]; metadata?: Record<string, unknown> }[]): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.upsert() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Delete vectors by ID\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async delete(ids: string[]): Promise<never> {\n throw new Error(\n `cencori.storage.vectors.delete() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nclass KnowledgeNamespace {\n /**\n * @deprecated Never implemented. Use `cencori.knowledge.search()`, or\n * ground a chat with `cencori.ai.chat({ knowledgeBases: [...] })`.\n */\n async query(question: string): Promise<never> {\n throw new Error(\n `cencori.storage.knowledge.query() is not available. ` +\n `Use cencori.knowledge.search(kbId, { query }), or cencori.ai.chat({ knowledgeBases: [kbId], ... }).`\n );\n }\n\n /**\n * @deprecated Never implemented. Use `cencori.knowledge.addInlineSource()`\n * or `cencori.knowledge.addFileSource()`.\n */\n async add(documents: { content: string; metadata?: Record<string, unknown> }[]): Promise<never> {\n throw new Error(\n `cencori.storage.knowledge.add() is not available. ` +\n `Use cencori.knowledge.addInlineSource(kbId, text) or cencori.knowledge.addFileSource(kbId, file).`\n );\n }\n}\n\nclass FilesNamespace {\n /**\n * Upload a file\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async upload(file: Blob | Buffer, name: string): Promise<never> {\n throw new Error(\n `cencori.storage.files.upload() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n\n /**\n * Process a file (extract text, OCR, etc.)\n * \n * 🚧 Coming Soon - This feature is not yet available.\n */\n async process(fileId: string): Promise<never> {\n throw new Error(\n `cencori.storage.files.process() is coming soon! ` +\n `Join our waitlist at https://cencori.com/memory`\n );\n }\n}\n\nexport class StorageNamespace {\n /**\n * Vector database operations\n */\n readonly vectors = new VectorsNamespace();\n\n /**\n * Knowledge base operations (RAG)\n */\n readonly knowledge = new KnowledgeNamespace();\n\n /**\n * File storage and processing\n */\n readonly files = new FilesNamespace();\n}\n"],"mappings":";AAWA,IAAM,mBAAN,MAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnB,MAAM,OAAO,OAAe,SAA+C;AACvE,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,SAAiG;AAC1G,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAO,KAA+B;AACxC,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEA,IAAM,qBAAN,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,MAAM,MAAM,UAAkC;AAC1C,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,IAAI,WAAsF;AAC5F,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEA,IAAM,iBAAN,MAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,MAAM,OAAO,MAAqB,MAA8B;AAC5D,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,QAAQ,QAAgC;AAC1C,UAAM,IAAI;AAAA,MACN;AAAA,IAEJ;AAAA,EACJ;AACJ;AAEO,IAAM,mBAAN,MAAuB;AAAA,EAAvB;AAIH;AAAA;AAAA;AAAA,SAAS,UAAU,IAAI,iBAAiB;AAKxC;AAAA;AAAA;AAAA,SAAS,YAAY,IAAI,mBAAmB;AAK5C;AAAA;AAAA;AAAA,SAAS,QAAQ,IAAI,eAAe;AAAA;AACxC;","names":[]}
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.mjs';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.mjs';
2
2
 
3
3
  /**
4
4
  * Cencori Telemetry Client
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.js';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.js';
2
2
 
3
3
  /**
4
4
  * Cencori Telemetry Client
@@ -95,6 +95,28 @@ interface ChatRequest {
95
95
  /** Template variables to interpolate (e.g. {{tier}} → 'pro') */
96
96
  variables?: Record<string, string>;
97
97
  };
98
+ /**
99
+ * Knowledge base ids (`kb_...`, up to 3) to ground the answer in. The
100
+ * gateway searches them with the latest user message, adds the best
101
+ * passages to the prompt, and the model cites them as `[1]`, `[2]`...
102
+ * Requires a secret key; tenant-scoped bases are queried via Sessions.
103
+ *
104
+ * @example
105
+ * knowledgeBases: ['kb_8f2c...']
106
+ */
107
+ knowledgeBases?: string[];
108
+ }
109
+ /** A passage the answer was grounded in. `n` matches the model's `[n]` marker. */
110
+ interface KnowledgeCitation {
111
+ n: number;
112
+ chunkId: string;
113
+ sourceId: string;
114
+ /** Chunk position within its source. */
115
+ ord: number | null;
116
+ /** Page number, for paged sources like PDFs. */
117
+ page: number | null;
118
+ /** Similarity to the query, 0–1. */
119
+ score: number;
98
120
  }
99
121
  interface ChatResponse {
100
122
  id: string;
@@ -125,6 +147,11 @@ interface ChatResponse {
125
147
  reasons: string[];
126
148
  };
127
149
  };
150
+ /** Present when `knowledgeBases` was set: which passages were used. */
151
+ knowledge?: {
152
+ knowledgeBases: string[];
153
+ citations: KnowledgeCitation[];
154
+ };
128
155
  }
129
156
  /**
130
157
  * Structured output request with JSON schema
@@ -407,4 +434,4 @@ interface RequestOptions {
407
434
  headers?: Record<string, string>;
408
435
  }
409
436
 
410
- export type { CencoriConfig as C, EmbeddingRequest as E, FileSearchTool as F, GenerateObjectRequest as G, ImageGenerationRequest as I, ResponsesRequest as R, ToolCall as T, UrlCitation as U, VectorSearchOptions as V, WorkflowTriggerOptions as W, ChatRequest as a, ChatResponse as b, CompletionRequest as c, EmbeddingResponse as d, GenerateObjectResponse as e, ImageGenerationResponse as f, ResponsesResponse as g, ComputeRunOptions as h, RequestOptions as i, ChatMessage as j, ResponsesOutputItem as k, ResponseInputItem as l, ResponsesTool as m, WebSearchTool as n, CodeInterpreterTool as o };
437
+ export type { CencoriConfig as C, EmbeddingRequest as E, FileSearchTool as F, GenerateObjectRequest as G, ImageGenerationRequest as I, KnowledgeCitation as K, ResponsesRequest as R, ToolCall as T, UrlCitation as U, VectorSearchOptions as V, WorkflowTriggerOptions as W, ChatRequest as a, ChatResponse as b, CompletionRequest as c, EmbeddingResponse as d, GenerateObjectResponse as e, ImageGenerationResponse as f, ResponsesResponse as g, ComputeRunOptions as h, RequestOptions as i, ChatMessage as j, ResponsesOutputItem as k, ResponseInputItem as l, ResponsesTool as m, WebSearchTool as n, CodeInterpreterTool as o };
@@ -95,6 +95,28 @@ interface ChatRequest {
95
95
  /** Template variables to interpolate (e.g. {{tier}} → 'pro') */
96
96
  variables?: Record<string, string>;
97
97
  };
98
+ /**
99
+ * Knowledge base ids (`kb_...`, up to 3) to ground the answer in. The
100
+ * gateway searches them with the latest user message, adds the best
101
+ * passages to the prompt, and the model cites them as `[1]`, `[2]`...
102
+ * Requires a secret key; tenant-scoped bases are queried via Sessions.
103
+ *
104
+ * @example
105
+ * knowledgeBases: ['kb_8f2c...']
106
+ */
107
+ knowledgeBases?: string[];
108
+ }
109
+ /** A passage the answer was grounded in. `n` matches the model's `[n]` marker. */
110
+ interface KnowledgeCitation {
111
+ n: number;
112
+ chunkId: string;
113
+ sourceId: string;
114
+ /** Chunk position within its source. */
115
+ ord: number | null;
116
+ /** Page number, for paged sources like PDFs. */
117
+ page: number | null;
118
+ /** Similarity to the query, 0–1. */
119
+ score: number;
98
120
  }
99
121
  interface ChatResponse {
100
122
  id: string;
@@ -125,6 +147,11 @@ interface ChatResponse {
125
147
  reasons: string[];
126
148
  };
127
149
  };
150
+ /** Present when `knowledgeBases` was set: which passages were used. */
151
+ knowledge?: {
152
+ knowledgeBases: string[];
153
+ citations: KnowledgeCitation[];
154
+ };
128
155
  }
129
156
  /**
130
157
  * Structured output request with JSON schema
@@ -407,4 +434,4 @@ interface RequestOptions {
407
434
  headers?: Record<string, string>;
408
435
  }
409
436
 
410
- export type { CencoriConfig as C, EmbeddingRequest as E, FileSearchTool as F, GenerateObjectRequest as G, ImageGenerationRequest as I, ResponsesRequest as R, ToolCall as T, UrlCitation as U, VectorSearchOptions as V, WorkflowTriggerOptions as W, ChatRequest as a, ChatResponse as b, CompletionRequest as c, EmbeddingResponse as d, GenerateObjectResponse as e, ImageGenerationResponse as f, ResponsesResponse as g, ComputeRunOptions as h, RequestOptions as i, ChatMessage as j, ResponsesOutputItem as k, ResponseInputItem as l, ResponsesTool as m, WebSearchTool as n, CodeInterpreterTool as o };
437
+ export type { CencoriConfig as C, EmbeddingRequest as E, FileSearchTool as F, GenerateObjectRequest as G, ImageGenerationRequest as I, KnowledgeCitation as K, ResponsesRequest as R, ToolCall as T, UrlCitation as U, VectorSearchOptions as V, WorkflowTriggerOptions as W, ChatRequest as a, ChatResponse as b, CompletionRequest as c, EmbeddingResponse as d, GenerateObjectResponse as e, ImageGenerationResponse as f, ResponsesResponse as g, ComputeRunOptions as h, RequestOptions as i, ChatMessage as j, ResponsesOutputItem as k, ResponseInputItem as l, ResponsesTool as m, WebSearchTool as n, CodeInterpreterTool as o };
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.mjs';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.mjs';
2
2
 
3
3
  /**
4
4
  * Vision API — analyze, describe, OCR, and classify images.
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.js';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.js';
2
2
 
3
3
  /**
4
4
  * Vision API — analyze, describe, OCR, and classify images.
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.mjs';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.mjs';
2
2
 
3
3
  /**
4
4
  * Voice API — text-to-speech and speech-to-text across providers.
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.js';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.js';
2
2
 
3
3
  /**
4
4
  * Voice API — text-to-speech and speech-to-text across providers.
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.mjs';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.mjs';
2
2
 
3
3
  /** Cencori Web — first-party fetch, extraction, crawl, and search primitives. */
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CencoriConfig } from '../types-CAhDuNTz.js';
1
+ import { C as CencoriConfig } from '../types-D91o22Gb.js';
2
2
 
3
3
  /** Cencori Web — first-party fetch, extraction, crawl, and search primitives. */
4
4
 
@@ -1,4 +1,4 @@
1
- import { W as WorkflowTriggerOptions } from '../types-CAhDuNTz.mjs';
1
+ import { W as WorkflowTriggerOptions } from '../types-D91o22Gb.mjs';
2
2
 
3
3
  /**
4
4
  * Workflow Namespace - AI Pipelines & Orchestration
@@ -1,4 +1,4 @@
1
- import { W as WorkflowTriggerOptions } from '../types-CAhDuNTz.js';
1
+ import { W as WorkflowTriggerOptions } from '../types-D91o22Gb.js';
2
2
 
3
3
  /**
4
4
  * Workflow Namespace - AI Pipelines & Orchestration
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "cencori",
4
- "version": "1.8.3",
4
+ "version": "1.9.0",
5
5
  "description": "Cencori - The unified infrastructure layer for AI applications. One SDK for AI Gateway, Compute, Workflow, and Storage.",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",