Add PageIndex service (VectifyAI upstream submodule, CLI wrapper)
- Submodule services/pageindex/upstream (shallow), run-pageindex.sh, .env.example - Docs: service-pageindex, pageindex-semantic-documents, index updates
This commit is contained in:
parent
3f1894e21f
commit
4fa2cc2418
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -2,3 +2,7 @@
|
|||||||
path = services/carbonyl/upstream
|
path = services/carbonyl/upstream
|
||||||
url = https://github.com/fathyb/carbonyl.git
|
url = https://github.com/fathyb/carbonyl.git
|
||||||
shallow = true
|
shallow = true
|
||||||
|
[submodule "services/pageindex/upstream"]
|
||||||
|
path = services/pageindex/upstream
|
||||||
|
url = https://github.com/VectifyAI/PageIndex.git
|
||||||
|
shallow = true
|
||||||
|
|||||||
@ -24,6 +24,7 @@ Vue d’ensemble et index complet : **[repo/README.md](./repo/README.md)**. Règ
|
|||||||
| [repo/script-anythingllm-pull-sync.md](./repo/script-anythingllm-pull-sync.md) | Hook post-merge → AnythingLLM |
|
| [repo/script-anythingllm-pull-sync.md](./repo/script-anythingllm-pull-sync.md) | Hook post-merge → AnythingLLM |
|
||||||
| [repo/service-anythingllm-devtools.md](./repo/service-anythingllm-devtools.md) | Service HTTP AnythingLLM + devtools |
|
| [repo/service-anythingllm-devtools.md](./repo/service-anythingllm-devtools.md) | Service HTTP AnythingLLM + devtools |
|
||||||
| [repo/service-carbonyl.md](./repo/service-carbonyl.md) | Carbonyl (navigateur terminal), prévisualisation test |
|
| [repo/service-carbonyl.md](./repo/service-carbonyl.md) | Carbonyl (navigateur terminal), prévisualisation test |
|
||||||
|
| [repo/service-pageindex.md](./repo/service-pageindex.md) | PageIndex (index vectorless, définition sémantique documents) |
|
||||||
| [repo/extension-anythingllm-workspaces.md](./repo/extension-anythingllm-workspaces.md) | Extension AnythingLLM IDE (supprimée ; voir anythingllm-devtools) |
|
| [repo/extension-anythingllm-workspaces.md](./repo/extension-anythingllm-workspaces.md) | Extension AnythingLLM IDE (supprimée ; voir anythingllm-devtools) |
|
||||||
|
|
||||||
Les fichiers **`README.md`** sous `services/*/`, `cron/`, `projects/`, etc. ne font que **renvoyer** vers ces pages.
|
Les fichiers **`README.md`** sous `services/*/`, `cron/`, `projects/`, etc. ne font que **renvoyer** vers ces pages.
|
||||||
@ -60,6 +61,7 @@ Les fichiers **`README.md`** sous `services/*/`, `cron/`, `projects/`, etc. ne f
|
|||||||
|----------|---------|
|
|----------|---------|
|
||||||
| [anythingllm-workspaces.md](./anythingllm-workspaces.md) | Un workspace AnythingLLM par projet, synchronisation |
|
| [anythingllm-workspaces.md](./anythingllm-workspaces.md) | Un workspace AnythingLLM par projet, synchronisation |
|
||||||
| [features/carbonyl-terminal-browser.md](./features/carbonyl-terminal-browser.md) | Carbonyl, URL test dans `conf.json` |
|
| [features/carbonyl-terminal-browser.md](./features/carbonyl-terminal-browser.md) | Carbonyl, URL test dans `conf.json` |
|
||||||
|
| [features/pageindex-semantic-documents.md](./features/pageindex-semantic-documents.md) | PageIndex, arbre sémantique PDF / Markdown |
|
||||||
| [ux-navigation-model.md](./ux-navigation-model.md) | Intentions, recherche, mode expert |
|
| [ux-navigation-model.md](./ux-navigation-model.md) | Intentions, recherche, mode expert |
|
||||||
|
|
||||||
## Intégration dépôts
|
## Intégration dépôts
|
||||||
|
|||||||
19
docs/features/pageindex-semantic-documents.md
Normal file
19
docs/features/pageindex-semantic-documents.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# PageIndex — définition sémantique structurée des documents
|
||||||
|
|
||||||
|
## Contexte
|
||||||
|
|
||||||
|
[PageIndex](https://github.com/VectifyAI/PageIndex) (VectifyAI) génère un **index en arbre** à partir de documents professionnels longs (PDF ou Markdown structuré). La récupération s’appuie sur le **raisonnement** du modèle sur cet index, sans base vectorielle ni chunking classique. Détails techniques et citations : dépôt amont et [documentation PageIndex](https://docs.pageindex.ai).
|
||||||
|
|
||||||
|
## Intégration smart_ide
|
||||||
|
|
||||||
|
- Répertoire : **`services/pageindex/`** avec sous-module **`upstream/`**.
|
||||||
|
- Lancement : **`./run-pageindex.sh`** depuis **`services/pageindex/`** (délègue à **`upstream/run_pageindex.py`**).
|
||||||
|
- Dépendances Python : installer dans un **venv** sous **`upstream/`** (voir README du service).
|
||||||
|
|
||||||
|
## Complémentarité avec AnythingLLM
|
||||||
|
|
||||||
|
**AnythingLLM** ([anythingllm-workspaces.md](../anythingllm-workspaces.md)) couvre la mémoire documentaire et le RAG par **ingestion / embeddings** dans des workspaces. **PageIndex** adresse une autre stratégie : **structure hiérarchique explicite** et parcours type « table des matières intelligente » pour des flux où la traçabilité des sections prime.
|
||||||
|
|
||||||
|
## Documentation liée
|
||||||
|
|
||||||
|
- [repo/service-pageindex.md](../repo/service-pageindex.md)
|
||||||
@ -38,6 +38,7 @@ Toute la documentation **opérationnelle** qui vivait auparavant sous des `READM
|
|||||||
| **Scripts et extensions** | |
|
| **Scripts et extensions** | |
|
||||||
| [script-anythingllm-pull-sync.md](./script-anythingllm-pull-sync.md) | Hook post-merge → upload AnythingLLM |
|
| [script-anythingllm-pull-sync.md](./script-anythingllm-pull-sync.md) | Hook post-merge → upload AnythingLLM |
|
||||||
| [service-carbonyl.md](./service-carbonyl.md) | Carbonyl (navigateur terminal), sous-module amont |
|
| [service-carbonyl.md](./service-carbonyl.md) | Carbonyl (navigateur terminal), sous-module amont |
|
||||||
|
| [service-pageindex.md](./service-pageindex.md) | PageIndex (index sémantique vectorless), sous-module amont |
|
||||||
| [extension-anythingllm-workspaces.md](./extension-anythingllm-workspaces.md) | Extension AnythingLLM IDE (supprimée ; anythingllm-devtools) |
|
| [extension-anythingllm-workspaces.md](./extension-anythingllm-workspaces.md) | Extension AnythingLLM IDE (supprimée ; anythingllm-devtools) |
|
||||||
|
|
||||||
Les **spécifications** détaillées (contrats HTTP, sécurité, orchestration) restent dans [../API/README.md](../API/README.md) et [../features/](../features/).
|
Les **spécifications** détaillées (contrats HTTP, sécurité, orchestration) restent dans [../API/README.md](../API/README.md) et [../features/](../features/).
|
||||||
|
|||||||
19
docs/repo/service-pageindex.md
Normal file
19
docs/repo/service-pageindex.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Service PageIndex (`services/pageindex/`)
|
||||||
|
|
||||||
|
Indexation **sémantique structurée** de documents longs (PDF, Markdown) via le projet amont **[VectifyAI/PageIndex](https://github.com/VectifyAI/PageIndex)** : arbre hiérarchique (sections, résumés) et RAG **sans vecteurs** fondé sur le raisonnement LLM sur cet index.
|
||||||
|
|
||||||
|
## Rôle dans smart_ide
|
||||||
|
|
||||||
|
- **Pilotage de la définition sémantique** des documents : produire ou exploiter un **index arborescent** traçable (titres, pages, nœuds), distinct du RAG par embeddings **AnythingLLM**.
|
||||||
|
- **Pas de service HTTP** dans ce dépôt : exécution **CLI** Python sous **`services/pageindex/upstream/`**, lancée via **`services/pageindex/run-pageindex.sh`**.
|
||||||
|
|
||||||
|
## Exploitation
|
||||||
|
|
||||||
|
Voir **[`services/pageindex/README.md`](../../services/pageindex/README.md)** et **[features/pageindex-semantic-documents.md](../features/pageindex-semantic-documents.md)**.
|
||||||
|
|
||||||
|
Secrets : fichier **`upstream/.env`** (non versionné) ou variables d’environnement, selon l’amont — gabarit **`services/pageindex/.env.example`**.
|
||||||
|
|
||||||
|
## Voir aussi
|
||||||
|
|
||||||
|
- [service-anythingllm-devtools.md](./service-anythingllm-devtools.md) — workspaces et upload documentaire vectoriel
|
||||||
|
- [anythingllm-workspaces.md](../anythingllm-workspaces.md) — un workspace AnythingLLM par projet
|
||||||
@ -36,6 +36,8 @@ Ce document décrit les **services logiciels** typiques sur l’**hôte** (serve
|
|||||||
|
|
||||||
Services d’appoint sur **`127.0.0.1`** (souvent auth **Bearer**) : Git devtools, **anythingllm-devtools** (AnythingLLM + RAG initial), LangExtract, recherche regex, proxy claw, **`ia-dev-gateway`** (agents / runs stub), **`smart-ide-orchestrator`** (routage intentions) — voir tableau dans [system-architecture.md](./system-architecture.md), la **référence API** dans [`API/README.md`](./API/README.md), et l’index d’exploitation [repo/README.md](./repo/README.md) (fichiers `repo/service-*.md`). **Carbonyl** (`services/carbonyl/`) n’est pas un listener HTTP : navigateur terminal pour prévisualiser des URLs (ex. déploiement test) — [repo/service-carbonyl.md](./repo/service-carbonyl.md).
|
Services d’appoint sur **`127.0.0.1`** (souvent auth **Bearer**) : Git devtools, **anythingllm-devtools** (AnythingLLM + RAG initial), LangExtract, recherche regex, proxy claw, **`ia-dev-gateway`** (agents / runs stub), **`smart-ide-orchestrator`** (routage intentions) — voir tableau dans [system-architecture.md](./system-architecture.md), la **référence API** dans [`API/README.md`](./API/README.md), et l’index d’exploitation [repo/README.md](./repo/README.md) (fichiers `repo/service-*.md`). **Carbonyl** (`services/carbonyl/`) n’est pas un listener HTTP : navigateur terminal pour prévisualiser des URLs (ex. déploiement test) — [repo/service-carbonyl.md](./repo/service-carbonyl.md).
|
||||||
|
|
||||||
|
**PageIndex** (`services/pageindex/`) n’est pas un listener HTTP : outil Python (sous-module [VectifyAI/PageIndex](https://github.com/VectifyAI/PageIndex)) pour produire un **index arborescent** sémantique sur PDF / Markdown, en complément du RAG **AnythingLLM** — [repo/service-pageindex.md](./repo/service-pageindex.md).
|
||||||
|
|
||||||
## Documentation liée
|
## Documentation liée
|
||||||
|
|
||||||
- [platform-target.md](./platform-target.md)
|
- [platform-target.md](./platform-target.md)
|
||||||
|
|||||||
@ -34,6 +34,7 @@ Conséquences :
|
|||||||
| `core_ide/` | **Sources Lapce** — socle applicatif (build éditeur, personnalisations) — clone amont, hors index du parent |
|
| `core_ide/` | **Sources Lapce** — socle applicatif (build éditeur, personnalisations) — clone amont, hors index du parent |
|
||||||
| `services/anythingllm-devtools/` | HTTP : AnythingLLM + repos-devtools + RAG initial (`.4nkaiignore`) — [API/anythingllm-devtools-api.md](./API/anythingllm-devtools-api.md) |
|
| `services/anythingllm-devtools/` | HTTP : AnythingLLM + repos-devtools + RAG initial (`.4nkaiignore`) — [API/anythingllm-devtools-api.md](./API/anythingllm-devtools-api.md) |
|
||||||
| `services/carbonyl/` | Navigateur terminal Chromium ([Carbonyl](https://github.com/fathyb/carbonyl)) ; sous-module **`upstream/`** ; prévisualisation test — [repo/service-carbonyl.md](./repo/service-carbonyl.md) |
|
| `services/carbonyl/` | Navigateur terminal Chromium ([Carbonyl](https://github.com/fathyb/carbonyl)) ; sous-module **`upstream/`** ; prévisualisation test — [repo/service-carbonyl.md](./repo/service-carbonyl.md) |
|
||||||
|
| `services/pageindex/` | Index sémantique arborescent PDF/MD ([PageIndex](https://github.com/VectifyAI/PageIndex)) ; sous-module **`upstream/`** ; CLI — [repo/service-pageindex.md](./repo/service-pageindex.md) |
|
||||||
| `scripts/` , `setup/` , `systemd/` | Installation hôte, scripts d’exploitation, unités utilisateur pour services |
|
| `scripts/` , `setup/` , `systemd/` | Installation hôte, scripts d’exploitation, unités utilisateur pour services |
|
||||||
| `cron/` | Pull **Git** planifié des clones décrits par `projects/<id>/conf.json` (`project_path`) — [repo/cron-git-pull.md](./repo/cron-git-pull.md) |
|
| `cron/` | Pull **Git** planifié des clones décrits par `projects/<id>/conf.json` (`project_path`) — [repo/cron-git-pull.md](./repo/cron-git-pull.md) |
|
||||||
| `services/local-office/` | **API REST** Office (upload, commandes docx, stockage SQLite + fichiers) ; complément programmatique à ONLYOFFICE |
|
| `services/local-office/` | **API REST** Office (upload, commandes docx, stockage SQLite + fichiers) ; complément programmatique à ONLYOFFICE |
|
||||||
|
|||||||
4
services/pageindex/.env.example
Normal file
4
services/pageindex/.env.example
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Copy to services/pageindex/upstream/.env (gitignored by upstream) or export before run.
|
||||||
|
# PageIndex uses LiteLLM; see https://github.com/VectifyAI/PageIndex/blob/main/README.md
|
||||||
|
|
||||||
|
OPENAI_API_KEY=
|
||||||
49
services/pageindex/README.md
Normal file
49
services/pageindex/README.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# PageIndex — index sémantique « vectorless » (amont)
|
||||||
|
|
||||||
|
[PageIndex](https://github.com/VectifyAI/PageIndex) construit une **structure arborescente** (type table des matières enrichie) à partir de documents longs (PDF, Markdown) et sert de base à un RAG **sans base vectorielle** ni découpage artificiel : la récupération repose sur le **raisonnement** du LLM sur l’index. Projet amont **VectifyAI/PageIndex** (licence **MIT**).
|
||||||
|
|
||||||
|
Ce répertoire **`services/pageindex/`** contient :
|
||||||
|
|
||||||
|
- **`upstream/`** : sous-module Git pointant vers le dépôt amont.
|
||||||
|
- **`run-pageindex.sh`** : exécute `run_pageindex.py` dans **`upstream/`** (chemins relatifs cohérents avec l’amont).
|
||||||
|
- **`.env.example`** : variables attendues par l’amont (clés LLM via **LiteLLM**) ; à copier vers **`upstream/.env`** (non versionné) ou à exporter avant lancement.
|
||||||
|
|
||||||
|
## Installation (une fois par poste)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd services/pageindex/upstream
|
||||||
|
python3 -m venv .venv
|
||||||
|
. .venv/bin/activate
|
||||||
|
pip install --upgrade -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
Copier **`../.env.example`** vers **`upstream/.env`** et renseigner les clés (voir [README amont](https://github.com/VectifyAI/PageIndex/blob/main/README.md)).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Génération d’index pour un PDF :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd services/pageindex
|
||||||
|
./run-pageindex.sh --pdf_path /chemin/vers/document.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
Markdown (hiérarchie `#` / `##`, …) :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./run-pageindex.sh --md_path /chemin/vers/document.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Les options (`--model`, `--toc-check-pages`, etc.) sont celles documentées dans le dépôt amont.
|
||||||
|
|
||||||
|
## Rôle dans smart_ide
|
||||||
|
|
||||||
|
- **Définition sémantique structurée** des documents (arbre de sections, résumés de nœuds) pour outillage, agents ou pipelines **hors** AnythingLLM vectoriel.
|
||||||
|
- Complément possible à la mémoire documentaire **AnythingLLM** ([anythingllm-workspaces.md](../../docs/anythingllm-workspaces.md)) : PageIndex ne remplace pas l’ingestion RAG classique ; il fournit un **index explicable** pour navigation et raisonnement.
|
||||||
|
|
||||||
|
Documentation : [docs/repo/service-pageindex.md](../../docs/repo/service-pageindex.md), [docs/features/pageindex-semantic-documents.md](../../docs/features/pageindex-semantic-documents.md).
|
||||||
|
|
||||||
|
## Ressources amont
|
||||||
|
|
||||||
|
- Dépôt : [VectifyAI/PageIndex](https://github.com/VectifyAI/PageIndex)
|
||||||
|
- Documentation produit : [docs.pageindex.ai](https://docs.pageindex.ai)
|
||||||
11
services/pageindex/run-pageindex.sh
Executable file
11
services/pageindex/run-pageindex.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Run PageIndex CLI from vendored upstream (semantic tree index for PDF / Markdown).
|
||||||
|
set -euo pipefail
|
||||||
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
UP="${ROOT}/upstream"
|
||||||
|
if [[ ! -f "${UP}/run_pageindex.py" ]]; then
|
||||||
|
echo "Missing ${UP}/run_pageindex.py — run: git submodule update --init services/pageindex/upstream" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd "${UP}"
|
||||||
|
exec python3 run_pageindex.py "$@"
|
||||||
1
services/pageindex/upstream
Submodule
1
services/pageindex/upstream
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 8f1ed7783b9e1252ef8c44891ed68f7c22a0ab7d
|
||||||
Loading…
x
Reference in New Issue
Block a user