docs: extract config module (13_config.md) from pipeline module
This commit is contained in:
@@ -103,80 +103,13 @@ curl "http://localhost:3003/api/v1/stats/ingestion-status/bd80fec9c42afb0307eb28
|
||||
|
||||
### Configuration
|
||||
|
||||
### `POST /api/v1/config/cache`
|
||||
See [13_config.md](13_config.md) for runtime configuration endpoints:
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle the Redis cache on or off.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
curl -s -X POST "$API/api/v1/config/cache" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": false}'
|
||||
```
|
||||
|
||||
### `POST /api/v1/config/auto-pipeline`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle automatic processing pipeline trigger on file registration (disabled by default).
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable auto-pipeline, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
# Enable auto-pipeline
|
||||
curl -s -X POST "$API/api/v1/config/auto-pipeline" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": true}'
|
||||
|
||||
# Disable auto-pipeline
|
||||
curl -s -X POST "$API/api/v1/config/auto-pipeline" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": false}'
|
||||
```
|
||||
|
||||
### `POST /api/v1/config/watcher-auto-register`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle automatic registration of newly detected files in the watcher (disabled by default).
|
||||
When enabled, the file watcher automatically pre-processes and registers new files into the database.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable watcher auto-register, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
# Enable watcher auto-register
|
||||
curl -s -X POST "$API/api/v1/config/watcher-auto-register" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": true}'
|
||||
```
|
||||
| Endpoint | Description |
|
||||
|----------|-------------|
|
||||
| `POST /api/v1/config/cache` | Toggle Redis cache |
|
||||
| `POST /api/v1/config/auto-pipeline` | Toggle auto-pipeline on register |
|
||||
| `POST /api/v1/config/watcher-auto-register` | Toggle watcher auto-register |
|
||||
|
||||
### Unmounted Routes
|
||||
|
||||
|
||||
87
docs_v1.0/API_WORKSPACE/modules/13_config.md
Normal file
87
docs_v1.0/API_WORKSPACE/modules/13_config.md
Normal file
@@ -0,0 +1,87 @@
|
||||
<!-- module: config -->
|
||||
<!-- description: System configuration — cache, auto-pipeline, watcher-auto-register toggles -->
|
||||
<!-- depends: 01_auth -->
|
||||
|
||||
## System Configuration
|
||||
|
||||
Runtime configuration toggles for system behavior. All endpoints require authentication and system-level scope.
|
||||
|
||||
### `POST /api/v1/config/cache`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle the Redis cache on or off.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
curl -s -X POST "$API/api/v1/config/cache" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": false}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `POST /api/v1/config/auto-pipeline`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle automatic processing pipeline trigger on file registration (disabled by default).
|
||||
When enabled, registering a video file automatically creates a monitor job and starts processing.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable auto-pipeline, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
# Enable auto-pipeline
|
||||
curl -s -X POST "$API/api/v1/config/auto-pipeline" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": true}'
|
||||
|
||||
# Disable auto-pipeline
|
||||
curl -s -X POST "$API/api/v1/config/auto-pipeline" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": false}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `POST /api/v1/config/watcher-auto-register`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle automatic registration of newly detected files in the watcher (disabled by default).
|
||||
When enabled, the file watcher automatically pre-processes and registers new files into the database.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable watcher auto-register, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
# Enable watcher auto-register
|
||||
curl -s -X POST "$API/api/v1/config/watcher-auto-register" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": true}'
|
||||
```
|
||||
@@ -4,52 +4,6 @@
|
||||
|
||||
## Pipeline
|
||||
|
||||
### Dependency Graph
|
||||
|
||||
```mermaid
|
||||
flowchart TB
|
||||
subgraph Processors["10 Processors"]
|
||||
Cut[Cut] --> ASR[ASR]
|
||||
ASR --> ASRX[ASRX]
|
||||
ASRX --> Story[Story]
|
||||
Cut --> Story
|
||||
YOLO[YOLO] --> VisualChunk[VisualChunk]
|
||||
VisualChunk --> Story
|
||||
Face[Face] --> Story
|
||||
Story --> FiveW1H[5W1H]
|
||||
OCR[OCR]
|
||||
Pose[Pose]
|
||||
end
|
||||
|
||||
subgraph Ingestion["入庫 (Post-Processing)"]
|
||||
ASR --> Rule1[Rule 1 Sentence]
|
||||
ASRX --> Rule1
|
||||
Rule1 --> Vectorize[Auto-Vectorize]
|
||||
Rule1 --> Phase1[Phase 1 Pack]
|
||||
|
||||
Cut --> Rule3[Rule 3 Scene]
|
||||
ASR --> Rule3
|
||||
|
||||
Face --> Trace[Face Trace]
|
||||
Trace --> Qdrant[Qdrant Sync]
|
||||
Trace --> TraceChunks[Trace Chunks]
|
||||
Trace --> TKG[TKG Builder]
|
||||
|
||||
Face --> TMDbMatch[TMDb Match]
|
||||
Face --> SceneMeta[Scene Metadata]
|
||||
YOLO --> SceneMeta
|
||||
Face --> IdentityAgent[Identity Agent]
|
||||
ASRX --> IdentityAgent
|
||||
|
||||
Cut --> Agent5W1H[5W1H Agent]
|
||||
ASR --> Agent5W1H
|
||||
Agent5W1H --> Phase2[Phase 2 Pack]
|
||||
end
|
||||
|
||||
style Processors fill:#1a1a2e,stroke:#e94560
|
||||
style Ingestion fill:#16213e,stroke:#0f3460
|
||||
```
|
||||
|
||||
### Pipeline Completion Flow
|
||||
|
||||
The pipeline is **not complete** until both the 10 processors AND the 入庫 (ingestion) steps have finished. The worker polls every 3 seconds and only marks the job as `completed` when all ingestion steps verify OK.
|
||||
@@ -97,9 +51,13 @@ These steps run after the 10 processors and are **required for pipeline completi
|
||||
| 8 | **TKG Builder** | Face Trace done | `tkg_nodes` + `tkg_edges` tables have rows |
|
||||
| 9 | **TMDb Face Matching** | TMDb enabled + Face done | `face_detections.identity_id` IS NOT NULL |
|
||||
| 10 | **Heuristic Scene Metadata** | Face + YOLO done | `{file_uuid}.scene_meta.json` exists on disk |
|
||||
| 11 | **Identity Agent** | Face + ASRX done | `identities` with `source = 'identity_agent'` |
|
||||
| 12 | **5W1H Agent** | Cut + ASR done | `chunk.summary_text` IS NOT NULL for cut chunks |
|
||||
| 13 | **Release Pack** | 5W1H Agent done | `release_pack.py --phase 2` executed |
|
||||
| 11 | **Template 5W1H Story Summary (PG)** | Story done | `chunk.embedding` IS NOT NULL for story chunks |
|
||||
| 12 | **LLM 5W1H Summary (PG)** | 5W1H done | `chunk.embedding` IS NOT NULL for llm chunks |
|
||||
| 13 | **Voice Embedding (Qdrant)** | ASRX done | Qdrant voice collection populated |
|
||||
| 14 | **Face Embedding (Qdrant)** | Face done | Qdrant face collection populated |
|
||||
| 15 | **Identity Agent** | Face + ASRX done | `identities` with `source = 'identity_agent'` |
|
||||
| 16 | **5W1H Agent** | Cut + ASR done | `chunk.summary_text` IS NOT NULL for cut chunks |
|
||||
| 17 | **Release Pack** | 5W1H Agent done | `release_pack.py --phase 2` executed |
|
||||
|
||||
### Ingestion Status
|
||||
|
||||
@@ -145,29 +103,7 @@ curl "http://localhost:3003/api/v1/stats/ingestion-status/bd80fec9c42afb0307eb28
|
||||
|
||||
### Configuration
|
||||
|
||||
### `POST /api/v1/config/cache`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle the Redis cache on or off.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
curl -s -X POST "$API/api/v1/config/cache" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": false}'
|
||||
```
|
||||
|
||||
### Unmounted Routes
|
||||
See [13_config.md](13_config.md) for runtime configuration endpoints:
|
||||
|
||||
The following routes are defined in source code but are **NOT** currently mounted in the router:
|
||||
|
||||
|
||||
87
docs_v1.0/doc_wasm/modules/13_config.md
Normal file
87
docs_v1.0/doc_wasm/modules/13_config.md
Normal file
@@ -0,0 +1,87 @@
|
||||
<!-- module: config -->
|
||||
<!-- description: System configuration — cache, auto-pipeline, watcher-auto-register toggles -->
|
||||
<!-- depends: 01_auth -->
|
||||
|
||||
## System Configuration
|
||||
|
||||
Runtime configuration toggles for system behavior. All endpoints require authentication and system-level scope.
|
||||
|
||||
### `POST /api/v1/config/cache`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle the Redis cache on or off.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
curl -s -X POST "$API/api/v1/config/cache" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": false}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `POST /api/v1/config/auto-pipeline`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle automatic processing pipeline trigger on file registration (disabled by default).
|
||||
When enabled, registering a video file automatically creates a monitor job and starts processing.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable auto-pipeline, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
# Enable auto-pipeline
|
||||
curl -s -X POST "$API/api/v1/config/auto-pipeline" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": true}'
|
||||
|
||||
# Disable auto-pipeline
|
||||
curl -s -X POST "$API/api/v1/config/auto-pipeline" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": false}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `POST /api/v1/config/watcher-auto-register`
|
||||
|
||||
**Auth**: Required
|
||||
**Scope**: system-level
|
||||
|
||||
Toggle automatic registration of newly detected files in the watcher (disabled by default).
|
||||
When enabled, the file watcher automatically pre-processes and registers new files into the database.
|
||||
|
||||
#### Request Parameters
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `enabled` | boolean | Yes | `true` to enable watcher auto-register, `false` to disable |
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
# Enable watcher auto-register
|
||||
curl -s -X POST "$API/api/v1/config/watcher-auto-register" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: $KEY" \
|
||||
-d '{"enabled": true}'
|
||||
```
|
||||
Reference in New Issue
Block a user