From 3085a7d048e7af9de3c031bc4854569ad082e64a Mon Sep 17 00:00:00 2001 From: Accusys Date: Tue, 19 May 2026 03:06:39 +0800 Subject: [PATCH] docs: regenerate HTML/WASM docs after adding 13_config module --- docs_v1.0/doc/01_auth.html | 6 + docs_v1.0/doc/02_health.html | 67 ++++++++ docs_v1.0/doc/03_register.html | 9 +- docs_v1.0/doc/04_lookup.html | 6 + docs_v1.0/doc/05_process.html | 6 + docs_v1.0/doc/06_search.html | 54 ++++-- docs_v1.0/doc/07_identity.html | 48 +++++- docs_v1.0/doc/08_identity_agent.html | 6 + docs_v1.0/doc/08_media.html | 6 + docs_v1.0/doc/09_tmdb.html | 6 + docs_v1.0/doc/10_pipeline.html | 174 ++++++++++---------- docs_v1.0/doc/12_agent.html | 6 + docs_v1.0/doc/index.html | 6 + docs_v1.0/doc/login.html | 15 +- docs_v1.0/doc_developer/11_error_codes.html | 6 + docs_v1.0/doc_developer/13_config.html | 143 ++++++++++++++++ docs_v1.0/doc_developer/index.html | 8 +- docs_v1.0/doc_developer/login.html | 15 +- docs_v1.0/doc_wasm/modules/02_health.md | 40 +++++ docs_v1.0/doc_wasm/modules/03_register.md | 3 +- docs_v1.0/doc_wasm/modules/10_pipeline.md | 8 + docs_v1.0/doc_wasm/test.html | 18 -- docs_v1.0/doc_wasm/test_wasm.html | 29 ---- 23 files changed, 526 insertions(+), 159 deletions(-) create mode 100644 docs_v1.0/doc_developer/13_config.html delete mode 100644 docs_v1.0/doc_wasm/test.html delete mode 100644 docs_v1.0/doc_wasm/test_wasm.html diff --git a/docs_v1.0/doc/01_auth.html b/docs_v1.0/doc/01_auth.html index 11a47c9..7e279dd 100644 --- a/docs_v1.0/doc/01_auth.html +++ b/docs_v1.0/doc/01_auth.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ diff --git a/docs_v1.0/doc/02_health.html b/docs_v1.0/doc/02_health.html index 0ed4b92..99073f4 100644 --- a/docs_v1.0/doc/02_health.html +++ b/docs_v1.0/doc/02_health.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ @@ -223,12 +229,73 @@ a { color: #0066cc; } Identity file count matches DB count +config +object +Runtime toggle states (cache, auto-pipeline, watcher) + + integrations.tmdb object TMDB API key config and reachability +

GET /health/consistency

+

Auth: Required +Scope: system-level

+

Scans the database for data consistency issues. Reports anomalies without modifying any data.

+

Example

+
curl -s "$API/health/consistency" -H "X-API-Key: $KEY" | jq '.checks[] | {check, severity, count}'
+
+ +

Response (200)

+
{
+  "status": "degraded",
+  "checked_at": "2026-05-18T17:30:00Z",
+  "checks": [
+    {
+      "check": "stale_processing",
+      "severity": "warn",
+      "count": 3,
+      "files": [
+        {"file_name": "video.mp4", "file_uuid": "abc123...", "status": "processing", "detail": "job_id is null"}
+      ]
+    }
+  ]
+}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CheckDescriptionSeverity
stale_processingStatus=processing but job_id is nullwarn
orphaned_processingStatus=processing but no active monitor_jobwarn
processing_job_doneStatus=processing but job already completedwarn
unregistered_with_uuidStatus=unregistered but row still in DB (migration residue)info

Health status rules

diff --git a/docs_v1.0/doc/03_register.html b/docs_v1.0/doc/03_register.html index 8e211ba..afc7a0f 100644 --- a/docs_v1.0/doc/03_register.html +++ b/docs_v1.0/doc/03_register.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ @@ -34,7 +40,8 @@ a { color: #0066cc; }

Auth: Required Scope: file-level

Register a video file for processing. Returns the file's metadata and UUID.

-

New in v0.1.2: Registration now automatically triggers the processing pipeline — no need to call POST /api/v1/file/:file_uuid/process separately. The system will: +

Registration can automatically trigger the processing pipeline if the +auto-pipeline toggle is enabled (disabled by default). The system will: 1. Register the file and run ffprobe 2. Auto-run offline TMDb probe (reads local identity files, no API calls) 3. Create a monitor job for the worker diff --git a/docs_v1.0/doc/04_lookup.html b/docs_v1.0/doc/04_lookup.html index 1ce9106..f1e58e7 100644 --- a/docs_v1.0/doc/04_lookup.html +++ b/docs_v1.0/doc/04_lookup.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }

+ diff --git a/docs_v1.0/doc/05_process.html b/docs_v1.0/doc/05_process.html index 69cba53..ae1a491 100644 --- a/docs_v1.0/doc/05_process.html +++ b/docs_v1.0/doc/05_process.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ diff --git a/docs_v1.0/doc/06_search.html b/docs_v1.0/doc/06_search.html index 9843461..7646532 100644 --- a/docs_v1.0/doc/06_search.html +++ b/docs_v1.0/doc/06_search.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ @@ -47,7 +53,7 @@ a { color: #0066cc; }
- + @@ -61,6 +67,13 @@ a { color: #0066cc; } + + + + + + + @@ -80,7 +93,7 @@ a { color: #0066cc; }
curl -s -X POST "$API/api/v1/search/smart" \
   -H "Content-Type: application/json" \
   -H "Authorization: Bearer $JWT" \
-  -d '{"uuid": "'"$FILE_UUID"'", "query": "Audrey Hepburn"}'
+  -d '{"file_uuid": "'"$FILE_UUID"'", "query": "Audrey Hepburn"}'
 

Response (200)

@@ -88,13 +101,19 @@ a { color: #0066cc; } "query": "Audrey Hepburn", "results": [ { - "parent_id": 12345, - "start_time": 299.0, - "end_time": 300.0, - "summary": "[299s-300s, 1s] Cast: Audrey Hepburn. Total: 1 lines, 5 words...", - "similarity": 0.72 + "parent_id": 1087822, + "scene_order": 1087822, + "start_frame": 104438, + "end_frame": 104538, + "fps": 24.0, + "start_time": 4351.6, + "end_time": 4355.76, + "summary": "[4352s-4356s, 4s] Cast: Audrey Hepburn. Total: 2 lines, 10 words. Speakers: Audrey Hepburn (2 lines)", + "similarity": 0.67 } ], + "page": 1, + "page_size": 5, "strategy": "semantic_vector_search"} @@ -124,7 +143,7 @@ a { color: #0066cc; } - + @@ -138,6 +157,13 @@ a { color: #0066cc; } + + + + + + + @@ -157,7 +183,7 @@ a { color: #0066cc; }
curl -s -X POST "$API/api/v1/search/universal" \
   -H "Content-Type: application/json" \
   -H "Authorization: Bearer $JWT" \
-  -d '{"uuid": "'"$FILE_UUID"'", "query": "Cary Grant"}'
+  -d '{"file_uuid": "'"$FILE_UUID"'", "query": "Cary Grant"}'
 

Response (200)

@@ -165,11 +191,13 @@ a { color: #0066cc; } "results": [ { "type": "chunk", - "chunk_id": "uuid_1429", + "chunk_id": "bd80fec92b0b6963d177a2c55bf713e2_2", "chunk_type": "story_child", - "start_time": 429.16, - "end_time": 430.5, - "text": "You could have the stamps.", + "start_frame": 5103, + "end_frame": 5127, + "start_time": 212.64, + "end_time": 213.64, + "text": "[213s-214s] Cary Grant: \"Olá!\"", "score": 0.9 } ], diff --git a/docs_v1.0/doc/07_identity.html b/docs_v1.0/doc/07_identity.html index fd24783..b8e58b5 100644 --- a/docs_v1.0/doc/07_identity.html +++ b/docs_v1.0/doc/07_identity.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ @@ -56,7 +62,7 @@ a { color: #0066cc; } "source": "tmdb", "status": "confirmed", "tmdb_id": 112, - "tmdb_profile": "https://image.tmdb.org/t/p/w185/abc.jpg", + "tmdb_profile": "{output}/identities/{identity_uuid}/profile.jpg", "metadata": {}, "reference_data": {}, "created_at": "2026-05-16T12:00:00Z", @@ -106,7 +112,7 @@ a { color: #0066cc; }
- + @@ -183,6 +189,27 @@ a { color: #0066cc; }
curl -s "$API/api/v1/identity/$IDENTITY_UUID/chunks" -H "X-API-Key: $KEY"
 
+

Response (200)

+
{
+  "success": true,
+  "identity_uuid": "a9a901056d6b46ff92da0c3c1a57dff4",
+  "data": [
+    {
+      "id": 0,
+      "file_uuid": "bd80fec92b0b6963d177a2c55bf713e2",
+      "chunk_id": "bd80fec92b0b6963d177a2c55bf713e2_2",
+      "chunk_type": "sentence",
+      "start_frame": 5103,
+      "end_frame": 5127,
+      "fps": 24.0,
+      "start_time": 212.64,
+      "end_time": 213.64,
+      "text_content": "[213s-214s] Cary Grant: \"Olá!\""
+    }
+  ]
+}
+
+
uuidfile_uuid string Yes Search text
limitintegerNo5Max results to return
page integer No Search text
uuidfile_uuid string No Search types
limitintegerNo10Max results per type
page integer No
tmdb_profile stringTMDb profile image URLLocal profile image path ({output}/identities/{uuid}/profile.jpg)
metadata
@@ -203,6 +230,21 @@ a { color: #0066cc; } + + + + + + + + + + + + + + + @@ -213,7 +255,7 @@ a { color: #0066cc; } - + diff --git a/docs_v1.0/doc/08_identity_agent.html b/docs_v1.0/doc/08_identity_agent.html index 64a8bed..1d1c527 100644 --- a/docs_v1.0/doc/08_identity_agent.html +++ b/docs_v1.0/doc/08_identity_agent.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ diff --git a/docs_v1.0/doc/08_media.html b/docs_v1.0/doc/08_media.html index fae655d..6c33a28 100644 --- a/docs_v1.0/doc/08_media.html +++ b/docs_v1.0/doc/08_media.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ diff --git a/docs_v1.0/doc/09_tmdb.html b/docs_v1.0/doc/09_tmdb.html index 0f48d89..aa15d8e 100644 --- a/docs_v1.0/doc/09_tmdb.html +++ b/docs_v1.0/doc/09_tmdb.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ diff --git a/docs_v1.0/doc/10_pipeline.html b/docs_v1.0/doc/10_pipeline.html index 75eb932..f93d4e9 100644 --- a/docs_v1.0/doc/10_pipeline.html +++ b/docs_v1.0/doc/10_pipeline.html @@ -20,58 +20,33 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+

Pipeline

-

Dependency Graph

-
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.

+
10 processors done
+       (job status stays "running")
+Algorithm 1 Trigger: Rule 1 + Vectorize + Phase 1 Pack
+       (job runs in parallel)
+Algorithm 2 Trigger: Face Trace  TKG, Scene Metadata, Identity Agent, 5W1H Agent
+       (poll checks every 3s)
+Ingestion verification: rule1  vectorize  rule3  face_trace  tkg  scene_meta  5w1h 
+     
+job status = "completed"
 

10 Processor Stages

@@ -147,95 +122,119 @@ a { color: #0066cc; }
Sentence chunk identifier
start_frameintegerFrame-accurate start position
end_frameintegerFrame-accurate end position
fpsfloatFrames per second
start_time float Start time in secondsEnd time in seconds
texttext_content string Spoken text content
-

Post-Processing (入庫)

-

After all 10 processors complete, the pipeline runs the following storage & enrichment steps:

+

入庫 (Post-Processing / Ingestion)

+

These steps run after the 10 processors and are required for pipeline completion. The worker checks all of them before marking the job as done.

- - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - - + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + +
# StepRequiresEvidenceTriggers WhenVerification
1 Rule 1 Sentence ChunkingASR + ASRXchunk table, chunk_type = 'sentence'ASR + ASRX donechunk table has rows with chunk_type = 'sentence'
2 Auto-VectorizeRule 1chunk.embedding IS NOT NULL (pgvector)Rule 1 donechunk.embedding IS NOT NULL for sentence chunks
3 Phase 1 PackRule 1release_pack.py --phase 1Rule 1 donerelease_pack.py --phase 1 executed
4 Rule 3 Scene ChunkingCut + ASRchunk table, chunk_type = 'cut'All 10 processors done + Cut + ASRchunk table has rows with chunk_type = 'cut'
5 Face TraceFaceAll 10 processors done + Face face_detections.trace_id IS NOT NULL
6 Qdrant Face SyncFace TraceQdrant face_embedding collectionFace Trace doneQdrant face_embedding collection populated
7 Trace ChunksFace Tracechunk table, chunk_type = 'trace'Face Trace donechunk table has rows with chunk_type = 'trace'
8 TKG BuilderFace Tracetkg_nodes + tkg_edges tablesFace Trace donetkg_nodes + tkg_edges tables have rows
9 TMDb Face MatchingFace + TMDb enabledTMDb enabled + Face done face_detections.identity_id IS NOT NULL
10 Heuristic Scene MetadataFace + YOLO{file_uuid}.scene_meta.json on diskFace + YOLO done{file_uuid}.scene_meta.json exists on disk
11Identity AgentFace + ASRXidentities with source = 'identity_agent'Template 5W1H Story Summary (PG)Story donechunk.embedding IS NOT NULL for story chunks
125W1H AgentCut + ASRchunk.summary_text IS NOT NULL (chunk_type = 'cut')LLM 5W1H Summary (PG)5W1H donechunk.embedding IS NOT NULL for llm chunks
13Voice Embedding (Qdrant)ASRX doneQdrant voice collection populated
14Face Embedding (Qdrant)Face doneQdrant face collection populated
15Identity AgentFace + ASRX doneidentities with source = 'identity_agent'
165W1H AgentCut + ASR donechunk.summary_text IS NOT NULL for cut chunks
17 Release Pack5W1H Agentrelease_pack.py --phase 2 output5W1H Agent donerelease_pack.py --phase 2 executed
@@ -292,36 +291,29 @@ a { color: #0066cc; }

Configuration

-

POST /api/v1/config/cache

-

Auth: Required -Scope: system-level

-

Toggle the Redis cache on or off.

-

Request Parameters

+

See 13_config.md for runtime configuration endpoints:

- - - + - - - - + + + + + + + + + +
FieldTypeRequiredEndpoint Description
enabledbooleanYestrue to enable, false to disablePOST /api/v1/config/cacheToggle Redis cache
POST /api/v1/config/auto-pipelineToggle auto-pipeline on register
POST /api/v1/config/watcher-auto-registerToggle watcher auto-register
-

Example

-
curl -s -X POST "$API/api/v1/config/cache" \
-  -H "Content-Type: application/json" \
-  -H "X-API-Key: $KEY" \
-  -d '{"enabled": false}'
-
-

Unmounted Routes

The following routes are defined in source code but are NOT currently mounted in the router:

diff --git a/docs_v1.0/doc/12_agent.html b/docs_v1.0/doc/12_agent.html index 79f83ee..46f7c4f 100644 --- a/docs_v1.0/doc/12_agent.html +++ b/docs_v1.0/doc/12_agent.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+

Agent Endpoints

Agent endpoints provide AI-powered capabilities including translation, identity analysis, and 5W1H extraction.

POST /api/v1/agents/translate

diff --git a/docs_v1.0/doc/index.html b/docs_v1.0/doc/index.html index 62b15f8..ae9d116 100644 --- a/docs_v1.0/doc/index.html +++ b/docs_v1.0/doc/index.html @@ -17,11 +17,17 @@ td.cn { width: 140px; font-weight: 600; color: #333; } td.en { color: #666; font-size: 14px; } a { color: #0066cc; text-decoration: none; display: block; } a:hover td { background: #f8f8f8; border-radius: 4px; } +.topbar { display: flex; justify-content: space-between; align-items: baseline; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+

Momentry API 文件

+Logout +

API 參考手冊 — 登入後可瀏覽各模組文件

安全認證Authentication
健康檢查Health
檔案註冊File Registration
檔案屬性查詢File Lookup
處理流程Processing
搜尋功能Search
身份識別Identity
智能身份綁定Smart Identity Binding
串流與截圖Streaming & Thumbnails
TMDb 整合TMDb Integration
生產線Pipeline
智慧代理AI Agents
diff --git a/docs_v1.0/doc/login.html b/docs_v1.0/doc/login.html index c199107..e98ceef 100644 --- a/docs_v1.0/doc/login.html +++ b/docs_v1.0/doc/login.html @@ -11,7 +11,10 @@ h1 { font-size: 24px; margin-bottom: 24px; text-align: center; } input { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; } button { width: 100%; padding: 10px; background: #0066cc; color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; } button:hover { background: #0052a3; } +.btn-logout { background: #888; margin-top: 8px; font-size: 13px; padding: 6px; } +.btn-logout:hover { background: #666; } .error { color: #cc0000; font-size: 13px; margin-bottom: 12px; display: none; } +.success { color: #006600; font-size: 13px; margin-bottom: 12px; display: none; } @@ -19,9 +22,11 @@ button:hover { background: #0052a3; }

Momentry Docs

- +
Invalid credentials
+ +
Session cleared
\ No newline at end of file diff --git a/docs_v1.0/doc_developer/11_error_codes.html b/docs_v1.0/doc_developer/11_error_codes.html index e1bd41c..397e461 100644 --- a/docs_v1.0/doc_developer/11_error_codes.html +++ b/docs_v1.0/doc_developer/11_error_codes.html @@ -20,11 +20,17 @@ pre code { background: none; padding: 0; } a { color: #0066cc; } .back { display: inline-block; margin-bottom: 20px; color: #666; } .back:hover { color: #333; } +.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+ diff --git a/docs_v1.0/doc_developer/13_config.html b/docs_v1.0/doc_developer/13_config.html new file mode 100644 index 0000000..cd452eb --- /dev/null +++ b/docs_v1.0/doc_developer/13_config.html @@ -0,0 +1,143 @@ + + + + +13 Config - Momentry API Docs + + + +
+ + + + + +

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

+ + + + + + + + + + + + + + + + + +
FieldTypeRequiredDescription
enabledbooleanYestrue to enable, false to disable
+

Example

+
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

+ + + + + + + + + + + + + + + + + +
FieldTypeRequiredDescription
enabledbooleanYestrue to enable auto-pipeline, false to disable
+

Example

+
# 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

+ + + + + + + + + + + + + + + + + +
FieldTypeRequiredDescription
enabledbooleanYestrue to enable watcher auto-register, false to disable
+

Example

+
# 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}'
+
+
+ + \ No newline at end of file diff --git a/docs_v1.0/doc_developer/index.html b/docs_v1.0/doc_developer/index.html index 6a66aa7..c00b21f 100644 --- a/docs_v1.0/doc_developer/index.html +++ b/docs_v1.0/doc_developer/index.html @@ -17,13 +17,19 @@ td.cn { width: 140px; font-weight: 600; color: #333; } td.en { color: #666; font-size: 14px; } a { color: #0066cc; text-decoration: none; display: block; } a:hover td { background: #f8f8f8; border-radius: 4px; } +.topbar { display: flex; justify-content: space-between; align-items: baseline; } +.logout-btn { font-size: 13px; color: #999; text-decoration: none; } +.logout-btn:hover { color: #cc0000; }
+

Momentry API 文件

+Logout +

API 參考手冊 — 登入後可瀏覽各模組文件

-
錯誤碼Error Codes
+
錯誤碼Error Codes
13 Config
\ No newline at end of file diff --git a/docs_v1.0/doc_developer/login.html b/docs_v1.0/doc_developer/login.html index c199107..e98ceef 100644 --- a/docs_v1.0/doc_developer/login.html +++ b/docs_v1.0/doc_developer/login.html @@ -11,7 +11,10 @@ h1 { font-size: 24px; margin-bottom: 24px; text-align: center; } input { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; } button { width: 100%; padding: 10px; background: #0066cc; color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; } button:hover { background: #0052a3; } +.btn-logout { background: #888; margin-top: 8px; font-size: 13px; padding: 6px; } +.btn-logout:hover { background: #666; } .error { color: #cc0000; font-size: 13px; margin-bottom: 12px; display: none; } +.success { color: #006600; font-size: 13px; margin-bottom: 12px; display: none; } @@ -19,9 +22,11 @@ button:hover { background: #0052a3; }

Momentry Docs

- +
Invalid credentials
+ +
Session cleared
\ No newline at end of file diff --git a/docs_v1.0/doc_wasm/modules/02_health.md b/docs_v1.0/doc_wasm/modules/02_health.md index 46f7df0..fa77710 100644 --- a/docs_v1.0/doc_wasm/modules/02_health.md +++ b/docs_v1.0/doc_wasm/modules/02_health.md @@ -128,8 +128,48 @@ curl "$API/health/detailed" | jq '{status, services, resources: {cpu: .resources | `pipeline.scripts_integrity` | object | SHA256 checksum verification results | | `schema.ok` | boolean | All required migrations applied | | `identities.synced` | boolean | Identity file count matches DB count | +| `config` | object | Runtime toggle states (cache, auto-pipeline, watcher) | | `integrations.tmdb` | object | TMDB API key config and reachability | +### `GET /health/consistency` + +**Auth**: Required +**Scope**: system-level + +Scans the database for data consistency issues. Reports anomalies without modifying any data. + +#### Example + +```bash +curl -s "$API/health/consistency" -H "X-API-Key: $KEY" | jq '.checks[] | {check, severity, count}' +``` + +#### Response (200) + +```json +{ + "status": "degraded", + "checked_at": "2026-05-18T17:30:00Z", + "checks": [ + { + "check": "stale_processing", + "severity": "warn", + "count": 3, + "files": [ + {"file_name": "video.mp4", "file_uuid": "abc123...", "status": "processing", "detail": "job_id is null"} + ] + } + ] +} +``` + +| Check | Description | Severity | +|-------|-------------|---------| +| `stale_processing` | Status=processing but job_id is null | `warn` | +| `orphaned_processing` | Status=processing but no active monitor_job | `warn` | +| `processing_job_done` | Status=processing but job already completed | `warn` | +| `unregistered_with_uuid` | Status=unregistered but row still in DB (migration residue) | `info` | + #### Health status rules | Condition | status | diff --git a/docs_v1.0/doc_wasm/modules/03_register.md b/docs_v1.0/doc_wasm/modules/03_register.md index 9bae26f..b1643cf 100644 --- a/docs_v1.0/doc_wasm/modules/03_register.md +++ b/docs_v1.0/doc_wasm/modules/03_register.md @@ -11,7 +11,8 @@ Register a video file for processing. Returns the file's metadata and UUID. -**New in v0.1.2**: Registration now **automatically triggers the processing pipeline** — no need to call `POST /api/v1/file/:file_uuid/process` separately. The system will: +Registration can **automatically trigger the processing pipeline** if the +[auto-pipeline toggle](/api/v1/config/auto-pipeline) is enabled (disabled by default). The system will: 1. Register the file and run ffprobe 2. Auto-run offline TMDb probe (reads local identity files, no API calls) 3. Create a monitor job for the worker diff --git a/docs_v1.0/doc_wasm/modules/10_pipeline.md b/docs_v1.0/doc_wasm/modules/10_pipeline.md index 16fdcd9..4ffb115 100644 --- a/docs_v1.0/doc_wasm/modules/10_pipeline.md +++ b/docs_v1.0/doc_wasm/modules/10_pipeline.md @@ -105,6 +105,14 @@ curl "http://localhost:3003/api/v1/stats/ingestion-status/bd80fec9c42afb0307eb28 See [13_config.md](13_config.md) for runtime configuration endpoints: +| 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 + The following routes are defined in source code but are **NOT** currently mounted in the router: | Endpoint | Source file | diff --git a/docs_v1.0/doc_wasm/test.html b/docs_v1.0/doc_wasm/test.html deleted file mode 100644 index df183df..0000000 --- a/docs_v1.0/doc_wasm/test.html +++ /dev/null @@ -1,18 +0,0 @@ - - -WASM Test - -

WASM Test Page

-
Loading...
- - - diff --git a/docs_v1.0/doc_wasm/test_wasm.html b/docs_v1.0/doc_wasm/test_wasm.html deleted file mode 100644 index 914a567..0000000 --- a/docs_v1.0/doc_wasm/test_wasm.html +++ /dev/null @@ -1,29 +0,0 @@ - - -WASM Test - -

WASM Render Test

-
Loading...
-
- - - -