@vivantel/rag-core 1.1.2 → 2.0.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 (102) hide show
  1. package/dist/bin/rag-update.d.ts +3 -0
  2. package/dist/bin/rag-update.d.ts.map +1 -0
  3. package/dist/bin/rag-update.js +116 -0
  4. package/dist/bin/rag-update.js.map +1 -0
  5. package/dist/cli/init.d.ts +2 -0
  6. package/dist/cli/init.d.ts.map +1 -0
  7. package/dist/cli/init.js +262 -0
  8. package/dist/cli/init.js.map +1 -0
  9. package/dist/cli/validate.d.ts +2 -0
  10. package/dist/cli/validate.d.ts.map +1 -0
  11. package/dist/cli/validate.js +54 -0
  12. package/dist/cli/validate.js.map +1 -0
  13. package/dist/config-loader.d.ts.map +1 -1
  14. package/dist/config-loader.js +73 -7
  15. package/dist/config-loader.js.map +1 -1
  16. package/dist/core/chunk-processor.d.ts +1 -1
  17. package/dist/core/chunk-processor.d.ts.map +1 -1
  18. package/dist/core/chunk-processor.js +50 -21
  19. package/dist/core/chunk-processor.js.map +1 -1
  20. package/dist/core/embedder.d.ts +5 -1
  21. package/dist/core/embedder.d.ts.map +1 -1
  22. package/dist/core/embedder.js +40 -29
  23. package/dist/core/embedder.js.map +1 -1
  24. package/dist/core/errors.d.ts +16 -0
  25. package/dist/core/errors.d.ts.map +1 -0
  26. package/dist/core/errors.js +17 -0
  27. package/dist/core/errors.js.map +1 -0
  28. package/dist/core/git-tracker.d.ts.map +1 -1
  29. package/dist/core/git-tracker.js +9 -59
  30. package/dist/core/git-tracker.js.map +1 -1
  31. package/dist/core/orchestrator.d.ts +8 -0
  32. package/dist/core/orchestrator.d.ts.map +1 -1
  33. package/dist/core/orchestrator.js +153 -37
  34. package/dist/core/orchestrator.js.map +1 -1
  35. package/dist/core/plugin-discovery.d.ts +19 -0
  36. package/dist/core/plugin-discovery.d.ts.map +1 -0
  37. package/dist/core/plugin-discovery.js +47 -0
  38. package/dist/core/plugin-discovery.js.map +1 -0
  39. package/dist/core/telemetry.d.ts +61 -0
  40. package/dist/core/telemetry.d.ts.map +1 -0
  41. package/dist/core/telemetry.js +50 -0
  42. package/dist/core/telemetry.js.map +1 -0
  43. package/dist/core/uploader.d.ts +5 -1
  44. package/dist/core/uploader.d.ts.map +1 -1
  45. package/dist/core/uploader.js +23 -7
  46. package/dist/core/uploader.js.map +1 -1
  47. package/dist/core/utils.d.ts +7 -0
  48. package/dist/core/utils.d.ts.map +1 -1
  49. package/dist/core/utils.js +35 -0
  50. package/dist/core/utils.js.map +1 -1
  51. package/dist/index.d.ts +14 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +14 -2
  54. package/dist/index.js.map +1 -1
  55. package/dist/interfaces/embedder.d.ts +2 -0
  56. package/dist/interfaces/embedder.d.ts.map +1 -1
  57. package/dist/interfaces/vector-store.d.ts +2 -0
  58. package/dist/interfaces/vector-store.d.ts.map +1 -1
  59. package/dist/strategies/chunk/token.js +1 -1
  60. package/dist/strategies/chunk/token.js.map +1 -1
  61. package/package.json +12 -2
  62. package/.github/config/release-please.json +0 -38
  63. package/.github/dependabot.yaml +0 -28
  64. package/.github/workflows/ci.yaml +0 -119
  65. package/.github/workflows/publish.yaml +0 -155
  66. package/.github/workflows/release.yaml +0 -54
  67. package/.release-please-manifest.json +0 -3
  68. package/.versionrc.json +0 -19
  69. package/CHANGELOG.md +0 -51
  70. package/bin/rag-update.ts +0 -49
  71. package/eslint.config.js +0 -25
  72. package/src/config-loader.ts +0 -21
  73. package/src/core/chunk-processor.test.ts +0 -36
  74. package/src/core/chunk-processor.ts +0 -92
  75. package/src/core/embedder.ts +0 -189
  76. package/src/core/git-tracker.test.ts +0 -64
  77. package/src/core/git-tracker.ts +0 -202
  78. package/src/core/orchestrator.test.ts +0 -53
  79. package/src/core/orchestrator.ts +0 -97
  80. package/src/core/uploader.ts +0 -123
  81. package/src/core/utils.ts +0 -27
  82. package/src/helpers/create-chunker.test.ts +0 -31
  83. package/src/helpers/create-chunker.ts +0 -40
  84. package/src/index.test.ts +0 -33
  85. package/src/index.ts +0 -30
  86. package/src/interfaces/chunker.ts +0 -59
  87. package/src/interfaces/embedder.ts +0 -36
  88. package/src/interfaces/index.test.ts +0 -9
  89. package/src/interfaces/index.ts +0 -3
  90. package/src/interfaces/vector-store.ts +0 -71
  91. package/src/strategies/chunk/index.ts +0 -4
  92. package/src/strategies/chunk/markdown-headers.test.ts +0 -37
  93. package/src/strategies/chunk/markdown-headers.ts +0 -106
  94. package/src/strategies/chunk/semantic.test.ts +0 -21
  95. package/src/strategies/chunk/semantic.ts +0 -80
  96. package/src/strategies/chunk/token.test.ts +0 -41
  97. package/src/strategies/chunk/token.ts +0 -72
  98. package/src/strategies/chunk/whole-file.test.ts +0 -24
  99. package/src/strategies/chunk/whole-file.ts +0 -35
  100. package/tsconfig.json +0 -21
  101. package/typedoc.json +0 -11
  102. package/vitest.config.ts +0 -19
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,KAAK,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC;AAGtC,OAAO,EACL,QAAQ,EACR,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,KAAK,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;;;;;GAQG;AACH,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,13 +1,25 @@
1
1
  // Interfaces
2
2
  export * from "./interfaces/index.js";
3
+ // Errors
4
+ export { RagError, ConfigError, ChunkError, EmbedError, UploadError, } from "./core/errors.js";
3
5
  // Core
4
6
  export { GitTracker } from "./core/git-tracker.js";
5
7
  export { ChunkProcessor } from "./core/chunk-processor.js";
6
8
  export { EmbedderProcessor } from "./core/embedder.js";
7
9
  export { Uploader } from "./core/uploader.js";
8
10
  export { Orchestrator } from "./core/orchestrator.js";
9
- export { computeContentHash, sleep, batchArray, extractFileName, extractDirectory, } from "./core/utils.js";
10
- // Strategies
11
+ export { computeContentHash, sleep, batchArray, extractFileName, extractDirectory, withRetry, withConcurrency, } from "./core/utils.js";
12
+ // Plugin ecosystem
13
+ export { discoverPlugins } from "./core/plugin-discovery.js";
14
+ /**
15
+ * Chunking strategies.
16
+ *
17
+ * @deprecated Import from `@vivantel/rag-strategies` instead:
18
+ * ```ts
19
+ * import { tokenStrategy } from '@vivantel/rag-strategies';
20
+ * ```
21
+ * Direct exports from `@vivantel/rag-core` will be removed in v3.0.
22
+ */
11
23
  export { tokenStrategy, markdownHeadersStrategy, semanticStrategy, wholeFileStrategy, } from "./strategies/chunk/index.js";
12
24
  // Helpers
13
25
  export { createChunker } from "./helpers/create-chunker.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,uBAAuB,CAAC;AAEtC,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,MAAM,wBAAwB,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,KAAK,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAEzB,aAAa;AACb,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAErC,UAAU;AACV,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,gBAAgB;AAChB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,uBAAuB,CAAC;AAEtC,SAAS;AACT,OAAO,EACL,QAAQ,EACR,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,MAAM,wBAAwB,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,KAAK,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAGzB,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAa,MAAM,4BAA4B,CAAC;AAExE;;;;;;;;GAQG;AACH,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAGrC,UAAU;AACV,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,gBAAgB;AAChB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
@@ -13,6 +13,8 @@ export interface EmbeddingProvider {
13
13
  embed(text: string): Promise<number[]>;
14
14
  /** Batch convert (optional, for performance) */
15
15
  embedBatch?(texts: string[]): Promise<number[][]>;
16
+ /** Stream embeddings one-by-one as they arrive (optional, for large batches) */
17
+ embedStream?(texts: string[]): AsyncIterable<number[]>;
16
18
  /** Check if provider is available (e.g., valid API key) */
17
19
  healthCheck?(): Promise<boolean>;
18
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"embedder.d.ts","sourceRoot":"","sources":["../../src/interfaces/embedder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,kCAAkC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,uCAAuC;IACvC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEvC,gDAAgD;IAChD,UAAU,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAElD,2DAA2D;IAC3D,WAAW,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"embedder.d.ts","sourceRoot":"","sources":["../../src/interfaces/embedder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,kCAAkC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,uCAAuC;IACvC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEvC,gDAAgD;IAChD,UAAU,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAElD,gFAAgF;IAChF,WAAW,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;IAEvD,2DAA2D;IAC3D,WAAW,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -38,6 +38,8 @@ export interface VectorStore {
38
38
  getCurrentState(collection?: string): Promise<Map<string, string>>;
39
39
  /** Search by embedding vector */
40
40
  search(queryEmbedding: number[], topK: number, collection?: string): Promise<VectorSearchResult[]>;
41
+ /** Batch delete by document IDs (more efficient than per-file delete when IDs are known) */
42
+ batchDelete?(ids: string[]): Promise<void>;
41
43
  /** Optional: delete entire collection */
42
44
  deleteCollection?(collection: string): Promise<void>;
43
45
  /** Optional: get store statistics */
@@ -1 +1 @@
1
- {"version":3,"file":"vector-store.d.ts","sourceRoot":"","sources":["../../src/interfaces/vector-store.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAEhB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC,MAA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AC,CAAC;IAEzD,uEAAuE;IACvE,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnE,iCAAiC;IACjC,MAAM,CACJ,cAAc,EAAE,MAAM,EAAE,EACxB,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAEjC,4FAA4F;IAC5F,WAAW,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3C,yCAAyC;IACzC,gBAAgB,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD,qCAAqC;IACrC,QAAQ,CAAC,IAAI,OAAO,CAAC;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CACxE;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -40,7 +40,7 @@ export function tokenStrategy(options = {}) {
40
40
  commitHash: "", // Will be filled by caller
41
41
  });
42
42
  }
43
- start = end - overlapChars;
43
+ start = Math.max(end - overlapChars, start + 1);
44
44
  }
45
45
  return chunks;
46
46
  },
@@ -1 +1 @@
1
- {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/strategies/chunk/token.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,UAAgC,EAAE;IAElC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,GAAG,CAAC;IAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IACtC,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,QAAQ,GAAG,SAAS,GAAG,a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"1.1.2",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
+ "workspaces": [
6
+ "packages/*"
7
+ ],
5
8
  "repository": {
6
9
  "type": "git",
7
10
  "url": "https://github.com/vivantel/rag_core"
8
11
  },
9
12
  "description": "Core RAG pipeline tools - universal chunking, embedding, vector store interfaces",
13
+ "files": [
14
+ "dist",
15
+ "README.md"
16
+ ],
10
17
  "main": "dist/index.js",
11
18
  "types": "dist/index.d.ts",
12
19
  "bin": {
@@ -16,6 +23,7 @@
16
23
  "audit:fix": "npm audit fix",
17
24
  "audit:report": "npm audit --json > npm-audit-report.json",
18
25
  "audit": "npm audit",
26
+ "build:all": "npm run build && npm run build --workspaces --if-present",
19
27
  "build:clean": "rm -rf dist && npm run build",
20
28
  "build:verbose": "tsc --listEmittedFiles",
21
29
  "build": "tsc && echo \"✅ Build completed successfully\"",
@@ -79,6 +87,8 @@
79
87
  "author": "Vivantel",
80
88
  "license": "MIT",
81
89
  "dependencies": {
90
+ "@inquirer/prompts": "^8.5.1",
91
+ "chokidar": "^5.0.0",
82
92
  "commander": "^15.0.0",
83
93
  "dotenv": "^17.4.2",
84
94
  "glob": "^13.0.6",
@@ -103,4 +113,4 @@
103
113
  "environment": "node",
104
114
  "globals": false
105
115
  }
106
- }
116
+ }
@@ -1,38 +0,0 @@
1
- {
2
- "release-type": "node",
3
- "bootstrap-sha": "main",
4
- "separate-pull-requests": true,
5
- "include-component-in-tag": false,
6
- "tag-separator": "@",
7
- "packages": {
8
- ".": {
9
- "package-name": "@vivantel/rag-core",
10
- "changelog-path": "CHANGELOG.md",
11
- "release-type": "node",
12
- "bump-minor-pre-major": true,
13
- "bump-patch-for-minor-pre-major": true,
14
- "draft": false,
15
- "prerelease": false
16
- }
17
- },
18
- "plugins": [
19
- {
20
- "type": "node-workspace",
21
- "merge": false
22
- },
23
- {
24
- "type": "sentence-case",
25
- "pull-request-title-pattern": "chore: release ${version}"
26
- }
27
- ],
28
- "changelog-sections": [
29
- {"type": "feat", "section": "Features", "hidden": false},
30
- {"type": "fix", "section": "Bug Fixes", "hidden": false},
31
- {"type": "perf", "section": "Performance Improvements", "hidden": false},
32
- {"type": "refactor", "section": "Code Refactoring", "hidden": false},
33
- {"type": "docs", "section": "Documentation", "hidden": false},
34
- {"type": "style", "section": "Styles", "hidden": true},
35
- {"type": "test", "section": "Tests", "hidden": true},
36
- {"type": "chore", "section": "Miscellaneous Chores", "hidden": true}
37
- ]
38
- }
@@ -1,28 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "npm"
4
- directory: "/"
5
- schedule:
6
- interval: "weekly"
7
- day: "monday"
8
- groups:
9
- production-dependencies:
10
- dependency-type: "production"
11
- development-dependencies:
12
- dependency-type: "development"
13
- open-pull-requests-limit: 10
14
- versioning-strategy: auto
15
- labels:
16
- - "dependencies"
17
- - "automated"
18
- commit-message:
19
- prefix: "chore"
20
- include: "scope"
21
-
22
- - package-ecosystem: "github-actions"
23
- directory: "/"
24
- schedule:
25
- interval: "weekly"
26
- labels:
27
- - "dependencies"
28
- - "ci"
@@ -1,119 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [master, develop]
6
- pull_request:
7
- branches: [master]
8
-
9
- jobs:
10
- build-and-test:
11
- name: Build & Test
12
- runs-on: ubuntu-latest
13
-
14
- strategy:
15
- matrix:
16
- node-version: [22, 24, 26]
17
- fail-fast: false
18
-
19
- steps:
20
- - name: Checkout code
21
- uses: actions/checkout@v6
22
- with:
23
- fetch-depth: 0
24
-
25
- - name: Setup Node.js
26
- uses: actions/setup-node@v6
27
- with:
28
- node-version: ${{ matrix.node-version }}
29
- cache: "npm"
30
-
31
- - name: Install dependencies
32
- run: npm ci
33
-
34
- - name: Type check
35
- run: npm run type-check
36
-
37
- - name: Lint
38
- run: npm run lint
39
-
40
- - name: Run tests
41
- run: npm test
42
-
43
- - name: Build
44
- run: npm run build
45
-
46
- - name: Upload build artifacts
47
- uses: actions/upload-artifact@v4
48
- with:
49
- name: dist-node-${{ matrix.node-version }}
50
- path: dist/
51
- retention-days: 7
52
-
53
- code-quality:
54
- name: Code Quality
55
- runs-on: ubuntu-latest
56
-
57
- steps:
58
- - name: Checkout code
59
- uses: actions/checkout@v6
60
-
61
- - name: Setup Node.js
62
- uses: actions/setup-node@v6
63
- with:
64
- node-version: "lts/*"
65
- cache: "npm"
66
-
67
- - name: Install dependencies
68
- run: npm ci
69
-
70
- - name: Check formatting
71
- run: npx prettier --check "src/**/*.ts"
72
-
73
- - name: Run lint with fix check
74
- run: npx eslint src/ --max-warnings 0
75
-
76
- - name: Type coverage
77
- run: npx type-coverage --at-least 90
78
-
79
- - name: Audit dependencies
80
- run: npm audit --audit-level=moderate
81
-
82
- security:
83
- name: Security Scan
84
- runs-on: ubuntu-latest
85
- permissions:
86
- contents: read
87
- security-events: write
88
- actions: read
89
-
90
- steps:
91
- - name: Checkout code
92
- uses: actions/checkout@v6
93
-
94
- - name: Setup Node.js
95
- uses: actions/setup-node@v6
96
- with:
97
- node-version: "lts/*"
98
-
99
- - name: Run Trivy vulnerability scanner
100
- uses: aquasecurity/trivy-action@v0.36.0
101
- with:
102
- scan-type: "fs"
103
- scan-ref: "."
104
- format: "sarif"
105
- output: "trivy-results.sarif"
106
-
107
- - name: Upload Trivy results to GitHub Security tab
108
- uses: github/codeql-action/upload-sarif@v4
109
- with:
110
- sarif_file: "trivy-results.sarif"
111
-
112
- - name: Run npm audit
113
- run: npm audit --json > npm-audit.json || true
114
-
115
- - name: Upload npm audit results
116
- uses: actions/upload-artifact@v4
117
- with:
118
- name: npm-audit
119
- path: npm-audit.json
@@ -1,155 +0,0 @@
1
- name: Publish
2
-
3
- on:
4
- workflow_dispatch:
5
- inputs:
6
- version_type:
7
- description: "Version type"
8
- required: true
9
- type: choice
10
- options: [patch, minor, major]
11
-
12
- permissions:
13
- contents: write
14
- pull-requests: write
15
- issues: write
16
- packages: write
17
-
18
- jobs:
19
- release-please:
20
- name: Release Please
21
- runs-on: ubuntu-latest
22
-
23
- outputs:
24
- release_created: ${{ steps.release.outputs.release_created }}
25
- tag_name: ${{ steps.release.outputs.tag_name }}
26
- version: ${{ steps.release.outputs.version }}
27
-
28
- steps:
29
- - name: Run Release Please
30
- id: release
31
- uses: googleapis/release-please-action@v5
32
- with:
33
- token: ${{ secrets.GITHUB_TOKEN }}
34
- release-type: node
35
- package-name: "@vivantel/rag-core"
36
- config-file: .github/config/release-please.json
37
- manifest-file: .release-please-manifest.json
38
-
39
- publish-npm:
40
- name: Publish to npm
41
- needs: release-please
42
- if: ${{ needs.release-please.outputs.release_created == 'true' }}
43
- runs-on: ubuntu-latest
44
-
45
- permissions:
46
- contents: read
47
- id-token: write # для npm provenance
48
-
49
- steps:
50
- - name: Checkout code
51
- uses: actions/checkout@v6
52
- with:
53
- ref: ${{ needs.release-please.outputs.tag_name }}
54
-
55
- - name: Setup Node.js
56
- uses: actions/setup-node@v6
57
- with:
58
- node-version: "lts/*"
59
- registry-url: "https://registry.npmjs.org"
60
- cache: "npm"
61
-
62
- - name: Install dependencies
63
- run: npm ci
64
-
65
- - name: Build
66
- run: npm run build
67
-
68
- - name: Run tests
69
- run: npm test
70
-
71
- - name: Check package size
72
- run: npx package-size
73
-
74
- - name: Publish to npm
75
- run: npm publish --provenance --access public
76
- env:
77
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
78
-
79
- - name: Create GitHub Release
80
- uses: softprops/action-gh-release@v2
81
- with:
82
- tag_name: ${{ needs.release-please.outputs.tag_name }}
83
- name: Release ${{ needs.release-please.outputs.version }}
84
- body_path: CHANGELOG.md
85
- draft: false
86
- prerelease: false
87
- generate_release_notes: true
88
- env:
89
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90
-
91
- create-github-package:
92
- name: Publish to GitHub Packages
93
- needs: release-please
94
- if: ${{ needs.release-please.outputs.release_created == 'true' }}
95
- runs-on: ubuntu-latest
96
-
97
- permissions:
98
- contents: read
99
- packages: write
100
-
101
- steps:
102
- - name: Checkout code
103
- uses: actions/checkout@v6
104
- with:
105
- ref: ${{ needs.release-please.outputs.tag_name }}
106
-
107
- - name: Setup Node.js
108
- uses: actions/setup-node@v6
109
- with:
110
- node-version: "lts/*"
111
- registry-url: "https://npm.pkg.github.com"
112
- cache: "npm"
113
-
114
- - name: Install dependencies
115
- run: npm ci
116
-
117
- - name: Build
118
- run: npm run build
119
-
120
- - name: Publish to GitHub Packages
121
- run: npm publish
122
- env:
123
- NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124
-
125
- update-docs:
126
- name: Update Documentation
127
- needs: release-please
128
- if: ${{ needs.release-please.outputs.release_created == 'true' }}
129
- runs-on: ubuntu-latest
130
-
131
- steps:
132
- - name: Checkout code
133
- uses: actions/checkout@v6
134
- with:
135
- ref: ${{ needs.release-please.outputs.tag_name }}
136
-
137
- - name: Setup Node.js
138
- uses: actions/setup-node@v6
139
- with:
140
- node-version: "lts/*"
141
- cache: "npm"
142
-
143
- - name: Install dependencies
144
- run: npm ci
145
-
146
- - name: Generate API documentation
147
- run: npm run docs:generate
148
-
149
- - name: Deploy to GitHub Pages
150
- uses: peaceiris/actions-gh-pages@v4
151
- with:
152
- github_token: ${{ secrets.GITHUB_TOKEN }}
153
- publish_dir: ./docs/api
154
- destination_dir: ${{ needs.release-please.outputs.version }}
155
- keep_files: false
@@ -1,54 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
-
8
- permissions:
9
- contents: write
10
- pull-requests: write
11
- issues: write
12
-
13
- jobs:
14
- release-please:
15
- runs-on: ubuntu-latest
16
- outputs:
17
- release_created: ${{ steps.release.outputs.release_created }}
18
- steps:
19
- - name: Run Release Please
20
- id: release
21
- uses: googleapis/release-please-action@v5
22
- with:
23
- token: ${{ secrets.RELEASE_TOKEN }}
24
- release-type: node
25
- config-file: .github/config/release-please.json
26
- manifest-file: .release-please-manifest.json
27
-
28
- publish-npm:
29
- needs: release-please
30
- if: ${{ needs.release-please.outputs.release_created == 'true' }}
31
- runs-on: ubuntu-latest
32
- permissions:
33
- contents: read
34
- id-token: write
35
- steps:
36
- - uses: actions/checkout@v4
37
- with:
38
- fetch-depth: 0
39
-
40
- - uses: actions/setup-node@v4
41
- with:
42
- node-version: '20.x'
43
- registry-url: 'https://registry.npmjs.org'
44
-
45
- - name: Install dependencies
46
- run: npm ci
47
-
48
- - name: Build
49
- run: npm run build
50
-
51
- - name: Publish to npm
52
- run: npm publish --provenance --access public
53
- env:
54
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,3 +0,0 @@
1
- {
2
- ".": "1.1.2"
3
- }
package/.versionrc.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "types": [
3
- {"type": "feat", "section": "Features"},
4
- {"type": "fix", "section": "Bug Fixes"},
5
- {"type": "perf", "section": "Performance Improvements"},
6
- {"type": "refactor", "section": "Code Refactoring"},
7
- {"type": "docs", "section": "Documentation"},
8
- {"type": "style", "hidden": true},
9
- {"type": "chore", "hidden": true},
10
- {"type": "test", "hidden": true}
11
- ],
12
- "releaseCommitMessageFormat": "chore: release {{currentTag}}",
13
- "skip": {
14
- "bump": false,
15
- "changelog": false,
16
- "commit": false,
17
- "tag": false
18
- }
19
- }
package/CHANGELOG.md DELETED
@@ -1,51 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.1.2](https://github.com/vivantel/rag_core/compare/v1.1.1...v1.1.2) (2026-05-31)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * add repository.url to package.json for npm provenance ([01f8164](https://github.com/vivantel/rag_core/commit/01f816412ce5643eaa1cc1acb6a689fa48c20bfc))
14
-
15
- ## [1.1.1](https://github.com/vivantel/rag_core/compare/v1.1.0...v1.1.1) (2026-05-31)
16
-
17
-
18
- ### Bug Fixes
19
-
20
- * add repository.url to package.json for npm provenance ([c468d1f](https://github.com/vivantel/rag_core/commit/c468d1f819579524795cf2f533871efe9931dd6f))
21
-
22
- ## [1.1.0](https://github.com/vivantel/rag_core/compare/v1.0.0...v1.1.0) (2026-05-31)
23
-
24
-
25
- ### Features
26
-
27
- * test trusted publisher automation ([7fd08b9](https://github.com/vivantel/rag_core/commit/7fd08b96f32e7f7c2c2c02ec7e2eebb761d5fa7f))
28
-
29
- ## 1.0.0 (2026-05-31)
30
-
31
-
32
- ### Features
33
-
34
- * test trusted publisher automation ([8a8cf1f](https://github.com/vivantel/rag_core/commit/8a8cf1f05ab420ebfcaba5653819d0d5e5c5fc2f))
35
- * test trusted publisher automation ([b2638cd](https://github.com/vivantel/rag_core/commit/b2638cd58abbfe073db51ef2fd0146594a99c55f))
36
- * test trusted publisher automation ([c524461](https://github.com/vivantel/rag_core/commit/c5244615cf7e5e91457446b43d62efdd7928273c))
37
-
38
- ## [Unreleased]
39
-
40
- ### Added
41
- - Initial release
42
-
43
- ### Changed
44
-
45
- ### Deprecated
46
-
47
- ### Removed
48
-
49
- ### Fixed
50
-
51
- ### Security
package/bin/rag-update.ts DELETED
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { Command } from 'commander';
4
- import { config } from 'dotenv';
5
- import { loadConfig } from '../src/config-loader.js';
6
- import { Orchestrator } from '../src/core/orchestrator.js';
7
-
8
- config();
9
-
10
- const program = new Command();
11
-
12
- program
13
- .name('rag-update')
14
- .description('Update RAG index with latest changes')
15
- .version('1.0.0')
16
- .option('-c, --config <path>', 'Path to config file', './rag.config.ts')
17
- .option('-f, --force', 'Force full rebuild', false)
18
- .option('--skip-upload', 'Skip upload to vector store', false)
19
- .option('--chunks-file <path>', 'Output path for chunks.json')
20
- .option('--embeddings-file <path>', 'Output path for embeddings.json')
21
- .parse();
22
-
23
- async function main() {
24
- const options = program.opts();
25
-
26
- console.log('🚀 RAG Update Tool\n');
27
-
28
- try {
29
- const config = await loadConfig(options.config);
30
-
31
- const orchestrator = new Orchestrator({
32
- ...config,
33
- options: {
34
- ...config.options,
35
- force: options.force || config.options?.force,
36
- skipUpload: options.skipUpload || config.options?.skipUpload,
37
- chunksFile: options.chunksFile || config.options?.chunksFile,
38
- embeddingsFile: options.embeddingsFile || config.options?.embeddingsFile
39
- }
40
- });
41
-
42
- await orchestrator.run();
43
- } catch (error) {
44
- console.error('❌ Error:', error instanceof Error ? error.message : error);
45
- process.exit(1);
46
- }
47
- }
48
-
49
- main();