diff --git a/docs_v1.0/API_WORKSPACE/modules/07_identity.md b/docs_v1.0/API_WORKSPACE/modules/07_identity.md index 188946e..0879ce5 100644 --- a/docs_v1.0/API_WORKSPACE/modules/07_identity.md +++ b/docs_v1.0/API_WORKSPACE/modules/07_identity.md @@ -1102,4 +1102,5 @@ PATCH /api/v1/identity/:identity_uuid This **replaces** the entire `aliases` array. To add to existing aliases, include all existing entries in the request. --- +*Updated: 2026-07-21 — Fixed bind/unbind TKG update to match both trace_N and face_track_N external_id formats* *Updated: 2026-06-20 — Added identity files, chunks, faces, status, and JSON endpoints* diff --git a/docs_v1.0/API_WORKSPACE/modules/15_tkg.md b/docs_v1.0/API_WORKSPACE/modules/15_tkg.md index ca22254..011613e 100644 --- a/docs_v1.0/API_WORKSPACE/modules/15_tkg.md +++ b/docs_v1.0/API_WORKSPACE/modules/15_tkg.md @@ -14,7 +14,7 @@ TKG is a time-aligned knowledge graph built from multi-processor outputs (face, | Node Type | External ID Format | Description | Key Properties | |-----------|-------------------|-------------|----------------| -| `face_track` | `face_track_{trace_id}` | A tracked face identity over time | `trace_id`, `frame_count`, `status`, `pending_identity_name`, `confidence`, `identity_uuid` | +| `face_track` | `trace_{trace_id}` | A tracked face identity over time | `trace_id`, `frame_count`, `status`, `avg_bbox`, `avg_yaw`, `avg_pitch`, `avg_roll`, `start_frame`, `end_frame`, `pose_count` | | `gaze_track` | `gaze_track_{id}` | Gaze direction over time | `direction` (frontal/left/right/up/down + diagonals) | | `lip_track` | `lip_track_{id}` | Lip movement synced with speech | `speaker_id`, `lip_area_range` | | `text_region` | `text_region_{id}` | Spoken text aligned to time | `speaker_id`, `text`, `start_time`, `end_time` | @@ -426,4 +426,101 @@ curl -s "$API/api/v1/file/$FILE_UUID/processor-counts" \ --- -*Updated: 2026-06-25 17:00:00* +### Trace Management + +Endpoints for managing face traces: list, delete, restore, and merge. + +#### `DELETE /api/v1/file/:file_uuid/trace/:trace_id` + +**Auth**: Required + +Soft-delete a face trace (default) or hard-delete with `{"hard_delete": true}`. + +Soft delete marks Qdrant points with `status: "deleted"` and TKG nodes with `status: "deleted"` in properties. Deleted traces are excluded from the traces list. + +Hard delete permanently removes Qdrant points and TKG nodes. + +**Request Body** (optional): + +| Field | Type | Default | Description | +|-------|------|---------|-------------| +| `hard_delete` | boolean | `false` | Permanently delete instead of marking | + +**Example**: +```bash +# Soft delete +curl -X DELETE "$API/api/v1/file/$FILE_UUID/trace/8" \ + -H "X-API-Key: $KEY" -H "Content-Type: application/json" -d '{}' + +# Hard delete +curl -X DELETE "$API/api/v1/file/$FILE_UUID/trace/8" \ + -H "X-API-Key: $KEY" -H "Content-Type: application/json" \ + -d '{"hard_delete": true}' +``` + +**Response**: +```json +{ + "success": true, + "file_uuid": "9f6a9cd55a5809f977f5a6589b9045c5", + "trace_id": 8, + "hard_delete": false, + "qdrant_marked": true, + "tkg_nodes_marked": 1 +} +``` + +--- + +#### `POST /api/v1/file/:file_uuid/trace/:trace_id/restore` + +**Auth**: Required + +Undo a soft-deleted trace. Clears `status: "deleted"` from Qdrant points and TKG node properties. + +**Example**: +```bash +curl -X POST "$API/api/v1/file/$FILE_UUID/trace/8/restore" \ + -H "X-API-Key: $KEY" +``` + +**Response**: +```json +{ + "success": true, + "file_uuid": "9f6a9cd55a5809f977f5a6589b9045c5", + "trace_id": 8, + "qdrant_restored": true, + "tkg_nodes_restored": 1 +} +``` + +--- + +#### `POST /api/v1/file/:file_uuid/trace/:source_trace_id/merge/:target_trace_id` + +**Auth**: Required + +Merge all face points from source trace into target trace. Updates Qdrant `trace_id` and deletes source TKG node. + +**Example**: +```bash +curl -X POST "$API/api/v1/file/$FILE_UUID/trace/16/merge/3" \ + -H "X-API-Key: $KEY" +``` + +**Response**: +```json +{ + "success": true, + "file_uuid": "9f6a9cd55a5809f977f5a6589b9045c5", + "source_trace_id": 16, + "target_trace_id": 3, + "points_moved": 58, + "tkg_nodes_deleted": 1 +} +``` + +--- + +*Updated: 2026-07-21 01:00:00* diff --git a/docs_v1.0/API_WORKSPACE/modules/18_profile.md b/docs_v1.0/API_WORKSPACE/modules/18_profile.md index b07a8ab..b9c594b 100644 --- a/docs_v1.0/API_WORKSPACE/modules/18_profile.md +++ b/docs_v1.0/API_WORKSPACE/modules/18_profile.md @@ -264,4 +264,5 @@ curl -s -X PUT "$API/api/v1/file-profile" \ | `aliases` | `properties->'aliases'` | Multi-language name aliases | --- +*Updated: 2026-07-21 — Fixed external_id matching (trace_N + face_track_N formats), fixed parameter ordering in UPDATE query* *Updated: 2026-07-18 — New profile module: trace-profile (GET, PUT, PUT group) and file-profile (GET, PUT)* diff --git a/docs_v1.0/doc/05_process.html b/docs_v1.0/doc/05_process.html index 17120e8..f5205b6 100644 --- a/docs_v1.0/doc/05_process.html +++ b/docs_v1.0/doc/05_process.html @@ -310,34 +310,45 @@ curl -s -X
faceposeface_tracevisual_chunkposestory5w1happearanceKey Concepts: +- Face = Identity anchor (who is this person?) — requires high-quality embedding +- Pose = Tracking (where is this person?) — extends tracking when face is occluded +- Appearance = Tracking (what do they look like?) — extends tracking when pose is occluded
+Trace ID Inheritance:
+Face trace (identity anchor)
+ ↓ inherits trace_id
+Pose expansion (tracking continuity)
+ ↓ inherits trace_id
+Appearance expansion (tracking continuity)
+Frame Count Relationship:
+face frames ≤ pose frames ≤ appearance frames
+(Each level expands outward from the previous level's traces)
All processors except story and 5w1h run concurrently when their dependencies are met. Story and 5W1H run sequentially after their prerequisites.
curl -s -X POST "$API/api/v1/progress/$FILE_UUID" -H "X-API-Key: $KEY" | jq '{overall_progress, processors: [.processors[] | {name, status}]}'
diff --git a/docs_v1.0/doc/07_identity.html b/docs_v1.0/doc/07_identity.html
index 07e6ab6..d8ec1ab 100644
--- a/docs_v1.0/doc/07_identity.html
+++ b/docs_v1.0/doc/07_identity.html
@@ -1738,7 +1738,8 @@ curl -s -X
This replaces the entire aliases array. To add to existing aliases, include all existing entries in the request.
-Updated: 2026-06-20 — Added identity files, chunks, faces, status, and JSON endpoints
+Updated: 2026-07-21 — Fixed bind/unbind TKG update to match both trace_N and face_track_N external_id formats
+Updated: 2026-06-20 — Added identity files, chunks, faces, status, and JSON endpoints