feat: Face JSON v2 schema - add schema_version, bbox x2/y2/center, keep embeddings, update clustering

This commit is contained in:
Accusys
2026-11-02 14:34:02 +08:00
parent 2fca49b120
commit 5d18183d82
566 changed files with 321788 additions and 1662 deletions
Regular → Executable
View File
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
# Cleanup sandbox
# Usage: ./scripts/cleanup_sandbox.sh [sandbox_id]
SANDBOX_ID=${1:-$(ls -td /Users/accusys/sandboxes/* 2>/dev/null | head -1)}
SANDBOX_DIR="/Users/accusys/sandboxes/${SANDBOX_ID}"
if [ ! -d "$SANDBOX_DIR" ]; then
echo "Error: Sandbox not found: ${SANDBOX_DIR}"
exit 1
fi
echo "=== Cleaning up sandbox: ${SANDBOX_ID} ==="
# Kill services
echo "Stopping services..."
pkill -f "11438" 2>/dev/null
pkill -f "3002" 2>/dev/null
pkill -f "8888" 2>/dev/null
# Remove sandbox
echo "Removing sandbox directory..."
rm -rf "${SANDBOX_DIR}"
echo "=== Cleanup complete ==="
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
# Run integration tests in sandbox
# Usage: ./scripts/run_integration_tests.sh [sandbox_dir]
SANDBOX_DIR=${1:-$(ls -td /Users/accusys/sandboxes/* 2>/dev/null | head -1)}
if [ -z "$SANDBOX_DIR" ]; then
echo "Error: No sandbox found"
exit 1
fi
echo "=== Running integration tests ==="
# Wait for services to start
sleep 5
# Test MarkBase API
echo "Testing MarkBase API..."
curl -sf http://localhost:11438/api/v2/myfiles/demo/files > /dev/null && echo " MarkBase: OK" || echo " MarkBase: FAIL"
# Test Momentry Core API
echo "Testing Momentry Core API..."
curl -sf http://localhost:3002/api/v1/health > /dev/null && echo " Core Health: OK" || echo " Core Health: FAIL"
curl -sf http://localhost:3002/api/v1/admin/config > /dev/null && echo " Core Config: OK" || echo " Core Config: FAIL"
# Test Studio Proxy
echo "Testing Studio Proxy..."
curl -sf http://localhost:8888/api/v1/health > /dev/null && echo " Studio: OK" || echo " Studio: FAIL"
# Run core tests
echo "Running core tests..."
cd "${SANDBOX_DIR}/momentry_core" && cargo test --lib 2>&1 | tail -5
echo "=== Integration tests complete ==="
Regular → Executable
View File
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
# Setup Cross-Project Sandbox
# Usage: ./scripts/setup_sandbox.sh [workspace] [purpose]
WORKSPACE=${1:-"momentry_suite"}
PURPOSE=${2:-"integration_test"}
DATE=$(date +%Y%m%d_%H%M%S)
SANDBOX_ID="${WORKSPACE}_${DATE}"
SANDBOX_DIR="/Users/accusys/sandboxes/${SANDBOX_ID}"
echo "=== Creating Sandbox: ${SANDBOX_ID} ==="
# Create sandbox directory
mkdir -p "${SANDBOX_DIR}"
# Clone projects
echo "Cloning markbase..."
git clone ~/markbase "${SANDBOX_DIR}/markbase" 2>/dev/null || cp -R ~/markbase "${SANDBOX_DIR}/markbase"
echo "Cloning MarkBaseEngine..."
git clone ~/MarkBaseEngine "${SANDBOX_DIR}/MarkBaseEngine" 2>/dev/null || cp -R ~/MarkBaseEngine "${SANDBOX_DIR}/MarkBaseEngine"
echo "Cloning momentry_core..."
git clone ~/momentry_core "${SANDBOX_DIR}/momentry_core" 2>/dev/null || cp -R ~/momentry_core "${SANDBOX_DIR}/momentry_core"
echo "Cloning momentry_studio..."
git clone ~/momentry_studio "${SANDBOX_DIR}/momentry_studio" 2>/dev/null || cp -R ~/momentry_studio "${SANDBOX_DIR}/momentry_studio"
# Create shared directory
mkdir -p "${SANDBOX_DIR}/shared"
cp ~/momentry_core/docs_v1.0/doc_language_config/modules/203_Shared_AGENTS.md "${SANDBOX_DIR}/shared/AGENTS.md"
# Create scripts directory
mkdir -p "${SANDBOX_DIR}/scripts"
cp ~/momentry_core/scripts/start_services.sh "${SANDBOX_DIR}/scripts/" 2>/dev/null
cp ~/momentry_core/scripts/run_integration_tests.sh "${SANDBOX_DIR}/scripts/" 2>/dev/null
echo "=== Sandbox created: ${SANDBOX_DIR} ==="
echo "${SANDBOX_ID}"
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
# Start all services in sandbox
# Usage: ./scripts/start_services.sh [sandbox_dir]
SANDBOX_DIR=${1:-$(ls -td /Users/accusys/sandboxes/* 2>/dev/null | head -1)}
if [ -z "$SANDBOX_DIR" ]; then
echo "Error: No sandbox found"
exit 1
fi
echo "=== Starting services in ${SANDBOX_DIR} ==="
# Start markbase (port 11438)
echo "Starting markbase..."
cd "${SANDBOX_DIR}/markbase" && ./markbase --port 11438 &
# Start MarkBaseEngine
echo "Starting MarkBaseEngine..."
cd "${SANDBOX_DIR}/MarkBaseEngine" && ./markbaseengine &
# Start momentry_core (port 3002)
echo "Starting momentry_core..."
cd "${SANDBOX_DIR}/momentry_core" && cargo run -- server &
# Start momentry_studio proxy (port 8888)
echo "Starting momentry_studio..."
cd "${SANDBOX_DIR}/momentry_studio" && npm run dev &
echo "=== Services starting ==="
echo "MarkBase: http://localhost:11438"
echo "Momentry Core: http://localhost:3002"
echo "Studio Proxy: http://localhost:8888"
Regular → Executable
View File
Regular → Executable
View File