Skip to content
Open
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
18 changes: 9 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -78,37 +78,37 @@ OPENAI_API_KEY=sk-your-openai-key-here
# Enable scholarly literature search across academic databases.
# When enabled, the pipeline searches for peer-reviewed sources
# related to the video's claims and cites them in the report.
# RESEACH_ENABLED=true
# RESEARCH_ENABLED=true

# Research depth: none | light | medium | deep
# none = skip research (same as not setting --research)
# light = top 3 results per claim
# medium = top 5 results per claim (default when --research is on)
# deep = multi-pass iterative research with gap analysis
# RESEACH_DEPTH=medium
# RESEARCH_DEPTH=medium

# Max sources cited in the final report
# RESEACH_MAX_SOURCES=10
# RESEARCH_MAX_SOURCES=10

# Max papers retrieved per search query per database
# RESEACH_MAX_PAPERS_PER_TOPIC=5
# RESEARCH_MAX_PAPERS_PER_TOPIC=5

# Academic databases to search (comma-separated)
# Available: arxiv, semantic_scholar, crossref, openalex
# RESEACH_APIS=arxiv,semantic_scholar,crossref,openalex
# RESEARCH_APIS=arxiv,semantic_scholar,crossref,openalex

# Semantic Scholar API key (optional, free signup at semanticscholar.org)
# Raises rate limit from 100 to 1000 requests per 5 minutes
# SEMANTIC_SCHOLAR_API_KEY=your-s2-key-here

# Email for CrossRef polite pool identification (recommended)
# RESEACH_MAILTO=your-email@example.com
# RESEARCH_MAILTO=your-email@example.com

# Citation style: apa | chicago | ieee
# CITATION_STYLE=apa

# Per-fetch timeout in milliseconds
# RESEACH_TIMEOUT_MS=15000
# RESEARCH_TIMEOUT_MS=15000

# ── Evidence Synthesis & Verification ────────────────────────────────
# Compare video claims against retrieved literature.
Expand Down Expand Up @@ -144,7 +144,7 @@ OPENAI_API_KEY=sk-your-openai-key-here
# ── Iterative Deep Research ──────────────────────────────────────────
# Maximum iterations for deep research mode (--research-depth deep).
# The pipeline stops early if no new sources are found.
# RESEACH_ITERATIONS=3
# RESEARCH_ITERATIONS=3

# ── Audio-only Downloads ──────────────────────────────────────────────
# When enabled, yt-dlp downloads best audio stream instead of full video.
Expand All @@ -155,7 +155,7 @@ OPENAI_API_KEY=sk-your-openai-key-here
# Public web beta is BYOK-only. Operator-funded usage is intentionally disabled
# until quota accounting is durable across Cloud Run instances.
ALLOWED_ORIGINS=https://jongan69.github.io
ALLOWED_VIDEO_HOSTS=youtube.com,www.youtube.com,m.youtube.com,youtu.be,vimeo.com,www.vimeo.com,player.vimeo.com,media.w3.org
ALLOWED_VIDEO_HOSTS=youtube.com,www.youtube.com,m.youtube.com,youtu.be,vimeo.com,www.vimeo.com,player.vimeo.com,media.w3.org,x.com,www.x.com,twitter.com,www.twitter.com
# Required only for the operator job-list endpoint.
# ADMIN_TOKEN=<high-entropy-random-token>

Expand Down
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& pip3 install --no-cache-dir yt-dlp --break-system-packages \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Bun (for dependency install and runtime scripts)
ENV BUN_INSTALL=/root/.bun
RUN curl -fsSL https://bun.sh/install | BUN_INSTALL=$BUN_INSTALL bash \
&& ln -s "$BUN_INSTALL/bin/bun" /usr/local/bin/bun

WORKDIR /app

# Install Node deps
COPY package.json package-lock.json ./
RUN npm install --production
# Install Node deps (Bun)
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile --production

# Copy app code
COPY scripts/ ./scripts/
Expand Down
9 changes: 8 additions & 1 deletion scripts/deploy/oracle-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ else
fi

# ---- Install Node deps ----
npm install --production
if ! command -v bun >/dev/null 2>&1; then
echo "Installing Bun..."
curl -fsSL https://bun.sh/install | bash
export BUN_INSTALL="${BUN_INSTALL:-$HOME/.bun}"
export PATH="$BUN_INSTALL/bin:$PATH"
fi

bun install --frozen-lockfile --production

# ---- Configure env ----
if [ ! -f ".env" ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/pipeline.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export async function runPipeline({url, options = {}, apiKey, tempDir, onProgres

// Stage 3: Domain detection
onProgress('analyze', 60, 'Detecting research domain...');
const domain = config.domain ? getDomain(config.domain) : detectDomain(timestamped);
let domain = config.domain ? getDomain(config.domain) : detectDomain(timestamped);
if (!domain) domain = {name:'General',reportSystemPrompt:'',evidenceSystemPrompt:'',queryPlannerPrompt:'',evaluationRubric:''};

// Stage 4: Research (literature search + citations)
Expand Down
1 change: 1 addition & 0 deletions scripts/web/security.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const DEFAULT_VIDEO_HOSTS = [
'youtube.com', 'www.youtube.com', 'm.youtube.com', 'youtu.be',
'vimeo.com', 'www.vimeo.com', 'player.vimeo.com',
'media.w3.org',
'x.com', 'www.x.com', 'twitter.com', 'www.twitter.com',
];

export const parseAllowedHosts = (value = process.env.ALLOWED_VIDEO_HOSTS) =>
Expand Down
Loading