Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ npm --workspace=apps/web run type-check
## Testing

- **pytest** — `pythonpath = src`, `testpaths = tests`, `asyncio_mode = auto`
- Coverage target: 90 % minimum enforced via `pytest.ini` on `backend`, `enhanced_video_processor`, and `enterprise_mcp_server`
- Coverage settings are defined in `pyproject.toml` for `youtube_extension`.
- Default test video ID: `auJzb1D-fag` — **never** use `dQw4w9WgXcQ` (Rick Roll; causes flaky tests due to age-gating)
- Use real `tempfile`/`shutil` temp dirs; avoid `pyfakefs`

Expand Down
12 changes: 12 additions & 0 deletions apps/web/src/app/api/__tests__/api-route.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { describe, expect, it } from 'vitest';
import { GET } from '@/app/api/route';

describe('GET /api', () => {
it('identifies deprecated video and retired pipeline routes', async () => {
const response = await GET();
const body = await response.json();

expect(body.endpoints.video).toContain('DEPRECATED');
expect(body.endpoints.pipeline).toContain('retired');
});
});
3 changes: 2 additions & 1 deletion apps/web/src/app/api/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export async function GET() {
endpoints: {
video_pack: 'POST /api/video/pack - Emit a hashed Video Pack from a YouTube URL',
transcribe: 'POST /api/transcribe - Extract video transcripts',
video: 'POST /api/video - Video analysis only',
video: 'POST /api/video [DEPRECATED] - Video analysis only; use /api/video/pack',
pipeline: 'Legacy /api/pipeline routes are retired',
health: 'GET /api - This endpoint',
},
});
Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/app/api/video/route.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { NextResponse } from 'next/server';
/**
* @deprecated Legacy video register/list endpoint. No in-repo callers;
* superseded by the Video Pack pipeline (`POST /api/video/pack`). Kept for
* backward compatibility with external API consumers. Do not add new callers.
* @deprecated Legacy video analysis endpoint. Retained for external API
* compatibility; use the Video Pack pipeline (`POST /api/video/pack`) instead.
*/
import { waitUntil } from '@vercel/functions';
import { publishEvent, EventTypes } from '@/lib/cloudevents';
Expand Down
9 changes: 6 additions & 3 deletions apps/web/src/app/docs/api/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ export default function ApiDocsPage() {
<h1 className="mt-2 font-heading text-4xl font-black">API Reference</h1>
<p className="mt-3 max-w-2xl text-ink/60">
UVAI exposes a small, REST-style surface for transcription, event
extraction, pipeline execution, and search. All endpoints accept
and return JSON unless noted. Streaming endpoints use Server-Sent
Events.
extraction, and search. All endpoints accept and return JSON unless noted.
</p>
<p className="mt-3 max-w-2xl text-sm text-ink/50">
The legacy <code>/api/pipeline</code> and <code>/api/pipeline/stream</code>
routes are retired. <code>GET</code> and <code>POST /api/video</code> remain
for compatibility but are deprecated; use <code>POST /api/video/pack</code>.
</p>
</header>

Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/lib/__tests__/auth-paths.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ describe('auth path policy', () => {
expect(needsAuthentication('/api/workspace/export')).toBe(false);
});

it('keeps the retired /api/pipeline surface non-public', () => {
// The legacy pipeline routes were removed (Video Pack pipeline is
it('keeps the deprecated, retired /api/pipeline surface non-public', () => {
// The legacy pipeline routes remain retired (Video Pack pipeline is
// canonical). They must not be re-added as public by accident.
expect(isPublicApiPath('/api/pipeline')).toBe(false);
expect(isPublicApiPath('/api/pipeline/stream')).toBe(false);
Expand Down Expand Up @@ -289,4 +289,3 @@ describe('AI route classification (rate-limit budget)', () => {
expect(isAiRoute('/api/transcribe/status', 'GET')).toBe(true);
});
});

10 changes: 0 additions & 10 deletions config/import_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"youtube_extension.processors.simple_real_processor"
],
"backend.main": [
"agents.markdown_video_processor",
"backend.enhanced_video_processor",
"backend.video_processor_factory",
"backend.real_api_endpoints"
Expand Down Expand Up @@ -70,7 +69,6 @@
"youtube_extension.services.api_cost_monitor"
],
"start_enhanced_backend": [
"agents.markdown_video_processor",
"youtube_extension.main"
]
},
Expand All @@ -89,10 +87,6 @@
"backend.main",
"backend.video_processor_factory"
],
"agents.markdown_video_processor": [
"backend.main",
"start_enhanced_backend"
],
"backend.real_video_processor": [
"backend.video_processor_factory"
],
Expand Down Expand Up @@ -179,7 +173,6 @@
"factory.monitoring": "factory/monitoring.py",
"backend.video_processor_factory": "backend/video_processor_factory.py",
"backend.test_real_pipeline": "backend/test_real_pipeline.py",
"enterprise_mcp_server": "enterprise_mcp_server.py",
"create_import_map": "create_import_map.py",
"tools.collect_todos": "tools/collect_todos.py",
"monitoring_dashboard": "monitoring_dashboard.py",
Expand All @@ -189,7 +182,6 @@
"backend.real_video_processor": "backend/real_video_processor.py",
"backend.main_v2": "backend/main_v2.py",
"factory.__init__": "factory/__init__.py",
"notebooklm_processor": "notebooklm_processor.py",
"agents.interactive_metadata_extractor": "agents/interactive_metadata_extractor.py",
"agents.mcp_ecosystem_coordinator": "agents/mcp_ecosystem_coordinator.py",
"factory.models": "factory/models.py",
Expand All @@ -208,7 +200,6 @@
"intelligence_layer.__init__": "intelligence_layer/__init__.py",
"agents.gemini_video_master_agent": "agents/gemini_video_master_agent.py",
"scripts.fetch_candidates": "scripts/fetch_candidates.py",
"test_enterprise_mcp": "test_enterprise_mcp.py",
"deploy_all": "deploy_all.py",
"server": "server.py",
"scripts.setup_llama_agent": "scripts/setup_llama_agent.py",
Expand Down Expand Up @@ -262,7 +253,6 @@
"agents.openai_dev_task_manager": "agents/openai_dev_task_manager.py",
"agents.a2a_framework": "agents/a2a_framework.py",
"mcp_server": "mcp_server.py",
"agents.markdown_video_processor": "agents/markdown_video_processor.py",
"chart_script": "chart_script.py",
"backend.enhanced_video_processor": "backend/enhanced_video_processor.py",
"scripts.vision_analyze": "scripts/vision_analyze.py",
Expand Down
2 changes: 1 addition & 1 deletion docs/CAPABILITIES_AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ If a streaming chat UI is the goal, either adopt the AI SDK's `useChat` + a back

## MCP ecosystem

MCP servers exist (`mcp-servers/litert-mcp`, `mcp-servers/shared-state`, `src/youtube_extension/mcp/`) using `@modelcontextprotocol/sdk@^1.26.0`, primarily for NotebookLM video-analysis orchestration. They are **loosely coupled** — no dedicated deployment workflow, not wired into the main pipelines.
MCP server implementations exist in `mcp-servers/litert-mcp` and `mcp-servers/shared-state`. The unused standalone NotebookLM video-analysis server under `src/youtube_extension/mcp/` has been removed. The remaining servers are **loosely coupled** — no dedicated deployment workflow, not wired into the main pipelines.

## Suggested priority order

Expand Down
Loading
Loading