@devilsdev/rag-pipeline-utils 1.0.0 โ 1.0.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.
- package/.dockerignore +14 -14
- package/.eslintignore +5 -0
- package/.eslintrc.json +21 -0
- package/.github/workflows/ci.yml +46 -42
- package/.github/workflows/release.yml +20 -21
- package/CHANGELOG.md +13 -0
- package/Dockerfile +22 -22
- package/LICENSE +674 -674
- package/README.md +117 -116
- package/__tests__/fixtures/sample-eval-dataset.json +14 -14
- package/__tests__/fixtures/sample.pdf +1 -0
- package/__tests__/integration/cli/config-flow.test.js +29 -44
- package/__tests__/integration/config/load-config.test.js +52 -52
- package/__tests__/unit/core/plugin-registry.test.js +55 -55
- package/__tests__/unit/reranker/llm-reranker.test.js +42 -42
- package/__tests__/unit/reranker/reranker.snapshot.test.js +17 -17
- package/bin/cli.js +168 -168
- package/docs-site/docs/Architecture.md +76 -76
- package/docs-site/docs/CLI.md +69 -69
- package/docs-site/docs/Evaluation.md +61 -61
- package/docs-site/docs/FAQ.md +50 -50
- package/docs-site/docs/Plugins.md +61 -61
- package/docs-site/docs/Usage.md +72 -72
- package/jest.config.js +20 -13
- package/package.json +4 -2
- package/public/src/App.jsx +57 -57
- package/release.config.js +36 -23
- package/scripts/setup.js +7 -0
- package/scripts/test-global-setup.js +18 -0
- package/server.js +31 -31
- package/src/config/load-config.js +35 -35
- package/src/config/validate-schema.js +49 -49
- package/src/core/create-pipeline.js +82 -82
- package/src/core/plugin-registry.js +61 -61
- package/src/dag/dag-engine.js +69 -69
- package/src/evaluate/evaluator.js +44 -44
- package/src/evaluate/scoring.js +73 -73
- package/src/loader/csv-loader.js +30 -30
- package/src/loader/directory-loader.js +37 -37
- package/src/loader/html-loader.js +57 -57
- package/src/loader/markdown-loader.js +58 -58
- package/src/reranker/llm-reranker.js +48 -48
- package/src/utils/logger.js +29 -29
- package/src/utils/retry.js +42 -42
package/.dockerignore
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# Ignore test files, fixtures, and local config
|
|
2
|
-
__tests__/
|
|
3
|
-
coverage/
|
|
4
|
-
.env
|
|
5
|
-
.env.*
|
|
6
|
-
node_modules/
|
|
7
|
-
.dockerignore
|
|
8
|
-
.git
|
|
9
|
-
.gitignore
|
|
10
|
-
.vscode
|
|
11
|
-
*.log
|
|
12
|
-
*.md
|
|
13
|
-
/public/
|
|
14
|
-
/docs-site/
|
|
1
|
+
# Ignore test files, fixtures, and local config
|
|
2
|
+
__tests__/
|
|
3
|
+
coverage/
|
|
4
|
+
.env
|
|
5
|
+
.env.*
|
|
6
|
+
node_modules/
|
|
7
|
+
.dockerignore
|
|
8
|
+
.git
|
|
9
|
+
.gitignore
|
|
10
|
+
.vscode
|
|
11
|
+
*.log
|
|
12
|
+
*.md
|
|
13
|
+
/public/
|
|
14
|
+
/docs-site/
|
package/.eslintignore
ADDED
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"es2022": true,
|
|
4
|
+
"node": true,
|
|
5
|
+
"jest": true
|
|
6
|
+
},
|
|
7
|
+
"extends": [
|
|
8
|
+
"eslint:recommended"
|
|
9
|
+
],
|
|
10
|
+
"parserOptions": {
|
|
11
|
+
"ecmaVersion": "latest",
|
|
12
|
+
"sourceType": "module"
|
|
13
|
+
},
|
|
14
|
+
"rules": {
|
|
15
|
+
"no-unused-vars": "warn",
|
|
16
|
+
"no-console": "off",
|
|
17
|
+
"semi": ["error", "always"],
|
|
18
|
+
"quotes": ["error", "single"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,42 +1,46 @@
|
|
|
1
|
-
# .github/workflows/ci.yml
|
|
2
|
-
# Version: 0.1.0
|
|
3
|
-
# Description: GitHub Actions CI pipeline for lint, test, and coverage
|
|
4
|
-
# Author: Ali Kahwaji
|
|
5
|
-
|
|
6
|
-
name: CI
|
|
7
|
-
|
|
8
|
-
on:
|
|
9
|
-
push:
|
|
10
|
-
branches:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- name:
|
|
23
|
-
uses: actions/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
# .github/workflows/ci.yml
|
|
2
|
+
# Version: 0.1.0
|
|
3
|
+
# Description: GitHub Actions CI pipeline for lint, test, and coverage
|
|
4
|
+
# Author: Ali Kahwaji
|
|
5
|
+
|
|
6
|
+
name: CI & Release
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
pull_request:
|
|
13
|
+
branches:
|
|
14
|
+
- main
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build-test-release:
|
|
18
|
+
name: Lint, Test, and Release
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: โฌ๏ธ Checkout code
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: ๐ข Setup Node.js
|
|
26
|
+
uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 20
|
|
29
|
+
cache: 'npm'
|
|
30
|
+
registry-url: 'https://registry.npmjs.org/'
|
|
31
|
+
|
|
32
|
+
- name: ๐ฆ Install dependencies
|
|
33
|
+
run: npm ci
|
|
34
|
+
|
|
35
|
+
- name: ๐งน Lint
|
|
36
|
+
run: npm run lint
|
|
37
|
+
|
|
38
|
+
- name: โ
Run tests with coverage
|
|
39
|
+
run: npm test
|
|
40
|
+
|
|
41
|
+
- name: ๐ Semantic Release
|
|
42
|
+
env:
|
|
43
|
+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
44
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
45
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # ๐ critical for npm publi
|
|
46
|
+
run: npx semantic-release
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
release:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@
|
|
12
|
-
- uses: actions/setup-node@v3
|
|
13
|
-
with:
|
|
14
|
-
node-version: 18
|
|
15
|
-
registry-url: 'https://registry.npmjs.org'
|
|
16
|
-
|
|
17
|
-
- run:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- uses: actions/setup-node@v3
|
|
13
|
+
with:
|
|
14
|
+
node-version: 18
|
|
15
|
+
registry-url: 'https://registry.npmjs.org/'
|
|
16
|
+
- run: npm ci
|
|
17
|
+
- run: npx semantic-release
|
|
18
|
+
env:
|
|
19
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
20
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.0.1](https://github.com/DevilsDev/rag-pipeline-utils/compare/v1.0.0...v1.0.1) (2025-04-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **ci:** initialize release pipeline and scaffold changelog ([179b486](https://github.com/DevilsDev/rag-pipeline-utils/commit/179b486effb0751b8735a9f849825eb63930ad01))
|
|
9
|
+
* **tests:** add missing sample PDF fixture and pre-test setup script ([de8e2b2](https://github.com/DevilsDev/rag-pipeline-utils/commit/de8e2b2c19034b521fc5ae1cdebbe3884a2fd15f))
|
|
10
|
+
|
|
11
|
+
All notable changes to this project will be documented in this file.
|
|
12
|
+
|
|
13
|
+
The format is based on [Semantic Versioning](https://semver.org/), and this project uses [semantic-release](https://github.com/semantic-release/semantic-release) for automated versioning and changelog generation.
|
package/Dockerfile
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# Version: 0.1.0
|
|
2
|
-
# Path: /Dockerfile
|
|
3
|
-
# Description: Minimal Docker image for rag-pipeline CLI
|
|
4
|
-
# Author: Ali Kahwaji
|
|
5
|
-
|
|
6
|
-
FROM node:18-slim
|
|
7
|
-
|
|
8
|
-
# Create app directory
|
|
9
|
-
WORKDIR /app
|
|
10
|
-
|
|
11
|
-
# Copy package files and install deps
|
|
12
|
-
COPY package*.json ./
|
|
13
|
-
RUN npm ci --omit=dev
|
|
14
|
-
|
|
15
|
-
# Copy application source
|
|
16
|
-
COPY . .
|
|
17
|
-
|
|
18
|
-
# Set default entrypoint
|
|
19
|
-
ENTRYPOINT ["node", "./bin/cli.js"]
|
|
20
|
-
|
|
21
|
-
# Default help
|
|
22
|
-
CMD ["--help"]
|
|
1
|
+
# Version: 0.1.0
|
|
2
|
+
# Path: /Dockerfile
|
|
3
|
+
# Description: Minimal Docker image for rag-pipeline CLI
|
|
4
|
+
# Author: Ali Kahwaji
|
|
5
|
+
|
|
6
|
+
FROM node:18-slim
|
|
7
|
+
|
|
8
|
+
# Create app directory
|
|
9
|
+
WORKDIR /app
|
|
10
|
+
|
|
11
|
+
# Copy package files and install deps
|
|
12
|
+
COPY package*.json ./
|
|
13
|
+
RUN npm ci --omit=dev
|
|
14
|
+
|
|
15
|
+
# Copy application source
|
|
16
|
+
COPY . .
|
|
17
|
+
|
|
18
|
+
# Set default entrypoint
|
|
19
|
+
ENTRYPOINT ["node", "./bin/cli.js"]
|
|
20
|
+
|
|
21
|
+
# Default help
|
|
22
|
+
CMD ["--help"]
|