{"openapi":"3.1.0","info":{"title":"Hugging Bay Public API","version":"0.2.0","summary":"Open AI artifact discovery, provenance, hosted/external state, and mirror demand APIs.","description":"Use Hugging Bay as broad metadata discovery plus selective verified mirrors. Public endpoints are safe for agents; admin endpoints require configured bearer tokens."},"servers":[{"url":"https://huggingbay.xyz"}],"tags":[{"name":"Catalog"},{"name":"Artifacts"},{"name":"Publisher"},{"name":"Sources"},{"name":"Agent Docs"},{"name":"Admin"}],"paths":{"/api/health":{"get":{"tags":["Catalog"],"summary":"Service health and persistence mode.","responses":{"200":{"description":"Healthy"},"503":{"description":"Unhealthy"}}}},"/api/me":{"get":{"tags":["Catalog"],"security":[{"bearerAuth":[]}],"summary":"Resolve the current bearer token to its server-authoritative principal and role.","responses":{"200":{"description":"Current principal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Principal"}}}}}}},"/api/publisher-applications":{"post":{"tags":["Publisher"],"summary":"Submit a publisher namespace application for manual review.","description":"Public endpoint. Creates or returns an open publisher-review case. This does not create an account or token automatically.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublisherApplication"}}}},"responses":{"200":{"description":"Existing open/reviewing application returned"},"201":{"description":"Publisher application case created"},"422":{"description":"Invalid application"}}}},"/api/artifacts":{"get":{"tags":["Artifacts"],"summary":"Search and page through public artifacts.","parameters":[{"name":"summary","in":"query","schema":{"type":"string","enum":["1"]},"description":"Use summary=1 for bounded agent-friendly rows."},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"license","in":"query","schema":{"type":"string"}},{"name":"task","in":"query","schema":{"type":"string"}},{"name":"format","in":"query","schema":{"type":"string"}},{"name":"worksWith","in":"query","schema":{"type":"string","enum":["ollama","lm-studio","comfyui","transformers"]},"description":"Filter by local/runtime integration hints."},{"name":"source","in":"query","schema":{"type":"string"}},{"name":"hosting","in":"query","schema":{"type":"string"}},{"name":"facets","in":"query","schema":{"type":"string","enum":["1"]},"description":"Use facets=1 only when global facet counts are needed; default summary search skips heavy facets."},{"name":"sort","in":"query","schema":{"type":"string","enum":["best","ready","mirrorable","updated","downloads","stars","demand","name","size","license"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Artifact page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactPage"}}}}}},"post":{"tags":["Artifacts","Publisher"],"security":[{"bearerAuth":[]}],"summary":"Create a publisher draft with uploaded source files.","description":"Publisher/admin only. Uploads use strict base64 JSON for small releases; invalid placeholders, size mismatches, executable/high-risk files, and scanner findings are rejected.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDraft"}}}},"responses":{"201":{"description":"Draft artifact created"},"403":{"description":"Publisher or admin token required"},"409":{"description":"Duplicate slug or scan failure"},"422":{"description":"Invalid draft or upload payload"}}}},"/api/upload-sessions":{"post":{"tags":["Artifacts","Publisher"],"security":[{"bearerAuth":[]}],"summary":"Create a signed large-upload session for publisher releases.","description":"Publisher/admin only. Returns signed object-storage PUT URLs for declared files. Complete the session before passing largeUploadManifestId to POST /api/artifacts.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["owner","name","files"],"properties":{"owner":{"type":"string"},"name":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/UploadSessionFile"}}}}}}},"responses":{"201":{"description":"Upload session with signed PUT URLs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSession"}}}},"403":{"description":"Publisher or admin token required"},"409":{"description":"Postgres or GCS storage is not configured"},"422":{"description":"Invalid upload declaration"}}}},"/api/upload-sessions/{id}":{"get":{"tags":["Artifacts","Publisher"],"security":[{"bearerAuth":[]}],"summary":"Fetch upload-session state.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Upload session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSession"}}}},"403":{"description":"Session owner or admin token required"},"404":{"description":"Session not found"}}},"delete":{"tags":["Artifacts","Publisher"],"security":[{"bearerAuth":[]}],"summary":"Cancel a pending upload session.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Canceled upload session"},"403":{"description":"Session owner or admin token required"},"404":{"description":"Session not found"}}}},"/api/upload-sessions/{id}/complete":{"post":{"tags":["Artifacts","Publisher"],"security":[{"bearerAuth":[]}],"summary":"Verify object uploads and complete a large-upload session.","description":"HEADs and stream-hashes every uploaded object. Completion returns draftPatch.largeUploadManifestId for POST /api/artifacts.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Completed upload session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSession"}}}},"403":{"description":"Session owner or admin token required"},"404":{"description":"Session not found"},"409":{"description":"Session expired, canceled, or object verification failed"}}}},"/api/artifacts/{id}":{"get":{"tags":["Artifacts"],"summary":"Fetch full artifact record.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Artifact detail"},"404":{"description":"Not found"}}}},"/api/artifacts/{id}/metadata.json":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"Fetch machine-readable artifact metadata and safe agent workflow.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agent metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactMetadata"}}}},"404":{"description":"Not found"}}}},"/api/artifacts/{id}/agent-bundle":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"Fetch one agent-ready artifact bundle.","description":"Packages metadata, card, trust bundle, mirror readiness, hosted files, and safe next actions in one bounded response.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agent artifact bundle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactAgentBundle"}}}},"404":{"description":"Not found"}}}},"/api/artifacts/{id}/card":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"Fetch a rendered-card document for an artifact.","description":"Repo-grade card payload with description, quality checklist, hosting state, actions, and previewable hosted files.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Artifact card document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactCard"}}}},"404":{"description":"Not found"}}}},"/api/artifacts/{id}/card.md":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"Fetch a Markdown artifact card.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Markdown card"},"404":{"description":"Not found"}}}},"/api/artifacts/{id}/files":{"get":{"tags":["Artifacts"],"summary":"Fetch paginated artifact files.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"File page"},"404":{"description":"Not found"}}}},"/api/compare":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"Compare up to six artifacts side by side.","description":"Accepts ids, id, repos, or repo query values. Values can be Hugging Bay artifact ids or owner/name repositories.","parameters":[{"name":"ids","in":"query","schema":{"type":"string"},"description":"Comma-separated artifact ids or owner/name repos."},{"name":"repo","in":"query","schema":{"type":"string"},"description":"Repeatable owner/name repo value."}],"responses":{"200":{"description":"Artifact comparison","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareArtifacts"}}}},"404":{"description":"No artifacts resolved"}}}},"/api/previews/{id}/{path}":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"Preview one hosted text-like file.","description":"Only Hugging Bay-hosted files are previewable. The response is bounded to the first 64 KiB and can include parsed CSV/JSON row samples.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"},"description":"URL-encoded file path."}],"responses":{"200":{"description":"Bounded file preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilePreview"}}}},"409":{"description":"External file is not mirrored"},"415":{"description":"File is not previewable text"}}}},"/api/downloadable-files":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"List Hugging Bay-hosted files only.","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"artifactId","in":"query","schema":{"type":"string"}},{"name":"sourceKind","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Downloadable file rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadableFilesResponse"}}}}}}},"/api/downloads/{id}/{path}":{"get":{"tags":["Artifacts"],"summary":"Download one hosted file. Supports Range requests for large files.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"},"description":"URL-encoded file path within the artifact."}],"responses":{"200":{"description":"Full file"},"206":{"description":"Byte range"},"404":{"description":"Not hosted or not found"}}},"head":{"tags":["Artifacts"],"summary":"Inspect one hosted file without downloading it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File headers"},"404":{"description":"Not hosted or not found"}}}},"/api/recommendations":{"get":{"tags":["Catalog","Agent Docs"],"summary":"Public catalog totals, mirror signals, and pack summaries.","responses":{"200":{"description":"Recommendation summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationSummary"}}}}}}},"/api/mirror-packs":{"get":{"tags":["Catalog","Agent Docs"],"summary":"List curated discovery/download packs without row payloads.","responses":{"200":{"description":"Mirror pack summaries","content":{"application/json":{"schema":{"type":"object","required":["generatedAt","packs"],"properties":{"generatedAt":{"type":"string"},"packs":{"type":"array","items":{"$ref":"#/components/schemas/MirrorPackSummary"}}}}}}}}}},"/api/mirror-packs/{slug}":{"get":{"tags":["Catalog","Agent Docs"],"summary":"Fetch one curated pack with artifact rows.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Mirror pack detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorPackDetail"}}}},"404":{"description":"Pack not found"}}}},"/api/mirror-demand":{"get":{"tags":["Catalog","Agent Docs"],"summary":"Rank requested and high-download mirror candidates.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"requestedOnly","in":"query","schema":{"type":"boolean"},"description":"Set true to show only artifacts with recorded mirror requests."}],"responses":{"200":{"description":"Mirror demand rows","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MirrorDemandRow"}}}}}}}},"/api/mirror-readiness":{"get":{"tags":["Catalog","Agent Docs"],"summary":"Rank mirror candidates with readiness scores, blockers, tool compatibility, and selected safe files.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"requestedOnly","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Mirror readiness report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorReadinessResponse"}}}}}}},"/api/catalog/coverage":{"get":{"tags":["Catalog"],"summary":"Public catalog coverage totals and source policies.","responses":{"200":{"description":"Coverage"}}}},"/api/agents/briefing":{"get":{"tags":["Catalog","Agent Docs"],"summary":"Compact cached briefing for agents and crawlers.","description":"Start here for agent traffic. Returns scale totals, efficient entrypoints, safe workflow, curated packs, topics, mirror candidates, hosted download stats, and crawl guidance.","responses":{"200":{"description":"Agent briefing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBriefing"}}}}}}},"/api/agents/tasks":{"get":{"tags":["Agent Docs"],"summary":"Intent-specific agent workflows.","description":"Returns compact workflows for high-intent agent tasks such as RAG embeddings, hosted downloads, commercial-safe search, and mirror prioritization.","responses":{"200":{"description":"Agent task workflows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTasks"}}}}}}},"/api/agents/publisher-workflow":{"get":{"tags":["Agent Docs","Publisher"],"summary":"Agent-readable publisher application and release-upload workflow.","description":"Public workflow document for applying, validating publisher tokens, uploading small or large releases, running release checks, and publishing.","responses":{"200":{"description":"Publisher workflow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublisherWorkflow"}}}}}}},"/api/indexing/status":{"get":{"tags":["Agent Docs"],"summary":"Search-engine and agent indexing status.","description":"Returns sitemap shards, canonical discovery URLs, URL batch endpoint templates, and crawl guidance.","responses":{"200":{"description":"Indexing status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexingStatus"}}}}}}},"/api/indexing/urls":{"get":{"tags":["Agent Docs"],"summary":"Bounded canonical URL batches for indexing/submission workflows.","parameters":[{"name":"kind","in":"query","schema":{"type":"string","enum":["static","ranking","stack","intent","source","topic","artifact","downloadable","agent-doc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"URL batch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexingUrlBatch"}}}},"400":{"description":"Unsupported indexing kind"}}}},"/api/stacks":{"get":{"tags":["Catalog","Agent Docs"],"summary":"List practical open AI stack packs for high-intent use cases.","responses":{"200":{"description":"Stack pack index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackIndex"}}}}}}},"/api/stacks/{slug}":{"get":{"tags":["Catalog","Agent Docs"],"summary":"Fetch one stack pack with bounded ranked artifact rows.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stack pack","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackPack"}}}},"404":{"description":"Stack pack not found"}}}},"/api/radar":{"get":{"tags":["Catalog","Agent Docs"],"summary":"Fetch multi-source open-source AI radar sections.","description":"Returns bounded popular, newest, non-HF, open-source tooling, and research/dataset rows across indexed sources without exposing internal operator plans.","responses":{"200":{"description":"Open source radar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenSourceRadar"}}}}}}},"/api/rankings/{slug}":{"get":{"tags":["Catalog","Agent Docs"],"summary":"Fetch one ranking as JSON so agents do not scrape ranking HTML.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ranking rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ranking"}}}}}}},"/api/topics":{"get":{"tags":["Catalog"],"summary":"List generated catalog topics by task, type, license, framework, and source.","responses":{"200":{"description":"Topic rows","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Topic"}}}}}}}},"/api/topics/{slug}":{"get":{"tags":["Catalog"],"summary":"Fetch one topic and its ranked artifact rows.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Topic detail"},"404":{"description":"Topic not found"}}}},"/api/trust-bundles/{id}":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"Fetch artifact trust bundle with license, scan, hosting, and file evidence.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Trust bundle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustBundle"}}}},"404":{"description":"Not found"}}}},"/api/keys/manifest-signing":{"get":{"tags":["Artifacts","Agent Docs"],"summary":"Fetch public manifest signing key metadata.","responses":{"200":{"description":"Manifest signing public key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManifestSigningKey"}}}}}}},"/api/schemas":{"get":{"tags":["Agent Docs"],"summary":"Fetch JSON Schema definitions for public API payloads.","responses":{"200":{"description":"JSON Schemas"}}}},"/api/artifacts/{id}/mirror-request":{"post":{"tags":["Artifacts"],"summary":"Record mirror demand for an external Hugging Face artifact.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceRoute":{"type":"string"},"query":{"type":"string"},"topic":{"type":"string"},"ranking":{"type":"string"},"useCase":{"type":"string"},"targetTool":{"type":"string"},"desiredFiles":{"type":"array","items":{"type":"string"}},"contact":{"type":"string"}},"additionalProperties":true}}}},"responses":{"200":{"description":"Mirror request state"},"404":{"description":"Not found"}}}},"/api/artifacts/{id}/run-checks":{"post":{"tags":["Artifacts","Publisher"],"security":[{"bearerAuth":[]}],"summary":"Run publisher release gates for a draft/private/gated artifact.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated artifact"},"403":{"description":"Publisher/admin token required"},"409":{"description":"Artifact is not checkable"}}}},"/api/artifacts/{id}/publish":{"post":{"tags":["Artifacts","Publisher"],"security":[{"bearerAuth":[]}],"summary":"Publish a draft after release gates pass.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Published artifact"},"403":{"description":"Publisher/admin token required"},"409":{"description":"Release gates not passed or already public"}}}},"/api/admin/traffic":{"get":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Fetch first-party traffic, download, and mirror-demand telemetry.","description":"Admin-only. Uses privacy-conscious hashed visitor buckets and existing hosted download/mirror request events.","responses":{"200":{"description":"Traffic summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrafficSummary"}}}},"403":{"description":"Admin token required"}}}},"/api/admin/imports/huggingface/detail-expand":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Expand selected Hugging Face metadata records with file-list details.","description":"Admin-only. Fetches HF detail payloads for high-demand/requested records and upserts file inventory metadata without mirroring files.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":200},"q":{"type":"string"},"requestedOnly":{"type":"boolean"},"force":{"type":"boolean"},"missingSizes":{"type":"boolean","default":true},"preferRuntime":{"type":"boolean","default":true},"dryRun":{"type":"boolean","default":true},"maxRuntimeMs":{"type":"integer","minimum":1000,"maximum":120000,"default":15000},"timeoutMs":{"type":"integer","minimum":1000,"maximum":30000,"default":8000},"retries":{"type":"integer","minimum":0,"maximum":2,"default":0},"backoffMs":{"type":"integer","minimum":0,"maximum":5000,"default":500}},"additionalProperties":true}}}},"responses":{"200":{"description":"HF detail expansion summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HfDetailExpansion"}}}},"403":{"description":"Admin token required"},"409":{"description":"Postgres persistence required"}}}},"/api/admin/storage/check":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Run a storage round-trip diagnostic for the configured mirror object store.","description":"Admin-only diagnostic that writes, heads, reads, range-reads, and deletes a disposable object. Automation should require passed=true before enabling production mirror downloads.","responses":{"200":{"description":"Storage check result. A 200 can still report passed=false when storage is blocked or failed.","content":{"application/json":{"schema":{"type":"object","required":["provider","configured","readiness","passed","status","checks","cleanup"],"properties":{"provider":{"type":"string","enum":["local","gcs","s3"]},"configured":{"type":"boolean"},"passed":{"type":"boolean"},"status":{"type":"string","enum":["passed","failed","blocked"]},"cleanup":{"type":"string"},"durationMs":{"type":"number"},"readiness":{"type":"object","additionalProperties":true},"checks":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true}}}},"403":{"description":"Admin token required"}}}},"/api/admin/imports":{"get":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"List compact import runs for operators and agents.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Import runs"},"403":{"description":"Admin token required"}}}},"/api/admin/imports/{runId}":{"get":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Fetch one import run with cursors.","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Import run detail"},"403":{"description":"Admin token required"},"404":{"description":"Not found"}}}},"/api/admin/jobs":{"get":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Fetch admin import, mirror, scheduler, and worker job state.","responses":{"200":{"description":"Admin jobs snapshot"},"403":{"description":"Admin token required"}}}},"/api/admin/traction":{"get":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Fetch traction recommendations, storage policy, and queued jobs for operators.","responses":{"200":{"description":"Traction snapshot"},"403":{"description":"Admin token required"}}}},"/api/admin/imports/huggingface/catalog":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Import bounded Hugging Face public metadata by preset. Does not bypass gated/private repositories.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"integer","minimum":0,"maximum":100},"datasets":{"type":"integer","minimum":0,"maximum":100},"spaces":{"type":"integer","minimum":0,"maximum":100},"preset":{"type":"string"},"dryRun":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Import summary"},"403":{"description":"Admin token required"}}}},"/api/admin/jobs/hf-refresh":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Run a bounded Hugging Face refresh job by preset.","responses":{"200":{"description":"Refresh summary"},"403":{"description":"Admin token required"}}}},"/api/admin/bulk-up":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Run safe catalog bulk-up: metadata imports plus optional reviewed mirror queue.","description":"Defaults should keep mirrorLimit=0 for broad growth runs; mirroring requires explicit review.","responses":{"200":{"description":"Bulk-up summary"},"403":{"description":"Admin token required"}}}},"/api/admin/imports/sources/catalog":{"post":{"tags":["Admin","Sources"],"security":[{"bearerAuth":[]}],"summary":"Import real non-HF public metadata from GitHub, arXiv, OpenML, Zenodo, Dataverse, DataCite, Papers with Code, OpenDataLab, and OpenCompass.","description":"Metadata-only. Imported rows remain external and are not mirrored or downloadable from Hugging Bay.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["all","github","arxiv","openml","zenodo","dataverse","datacite","paperswithcode","opendatalab","opencompass"]},"limit":{"type":"integer","minimum":1,"maximum":10000},"github":{"type":"integer","minimum":1,"maximum":5000},"arxiv":{"type":"integer","minimum":1,"maximum":5000},"openml":{"type":"integer","minimum":1,"maximum":5000},"zenodo":{"type":"integer","minimum":1,"maximum":5000},"dataverse":{"type":"integer","minimum":1,"maximum":5000},"datacite":{"type":"integer","minimum":1,"maximum":5000},"paperswithcode":{"type":"integer","minimum":1,"maximum":5000},"opendatalab":{"type":"integer","minimum":1,"maximum":5000},"opencompass":{"type":"integer","minimum":1,"maximum":5000},"query":{"type":"string"},"dryRun":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Source import summary"},"403":{"description":"Admin token required"}}}},"/api/admin/imports/sources/plan":{"post":{"tags":["Admin","Sources"],"security":[{"bearerAuth":[]}],"summary":"Plan a resumable metadata-only source import.","description":"Creates provider import cursors for metadata-only source connectors. Does not mirror files.","responses":{"200":{"description":"Source import plan"},"403":{"description":"Admin token required"}}}},"/api/admin/imports/sources/worker/run":{"post":{"tags":["Admin","Sources"],"security":[{"bearerAuth":[]}],"summary":"Run a bounded metadata-only source worker batch.","description":"Processes provider cursors created by /api/admin/imports/sources/plan. Does not mirror files or fetch blobs.","responses":{"200":{"description":"Source worker batch summary"},"403":{"description":"Admin token required"}}}},"/api/admin/mirror-queue":{"get":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"List reviewed mirror queue rows with useful runtime/support file candidates.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"requestedOnly","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Admin mirror queue rows","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MirrorDemandRow"}}}}},"403":{"description":"Admin token required"}}}},"/api/admin/mirror-queue/run":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Run a bounded reviewed mirror queue batch using exact selected useful files.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":25}}}}}},"responses":{"200":{"description":"Mirror queue run summary"},"403":{"description":"Admin token required"}}}},"/api/admin/imports/huggingface/plan":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Plan metadata-only Hugging Face cursor import.","responses":{"200":{"description":"Import plan"},"403":{"description":"Admin token required"}}}},"/api/admin/imports/huggingface/extend":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Plan a metadata-only continuation from a completed Hugging Face import run.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["previousRunId"],"properties":{"previousRunId":{"type":"string"},"targetRecords":{"type":"integer","minimum":1,"maximum":100000},"pageSize":{"type":"integer","minimum":1,"maximum":500},"preset":{"type":"string"}}}}}},"responses":{"200":{"description":"Continuation plan"},"403":{"description":"Admin token required"}}}},"/api/admin/imports/huggingface/worker/run":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"summary":"Run a small metadata-only HF worker batch, optionally scoped to a run id.","responses":{"200":{"description":"Worker batch summary"},"403":{"description":"Admin token or worker enablement required"}}}},"/api/sources":{"get":{"tags":["Sources"],"summary":"Machine-readable source registry.","responses":{"200":{"description":"Sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogSources"}}}}}}},"/api/sources/{id}":{"get":{"tags":["Sources"],"summary":"One source registry entry.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Source"},"404":{"description":"Not found"}}}},"/api/sources/{id}/coverage":{"get":{"tags":["Sources","Agent Docs"],"summary":"Current imported coverage and top rows for one source provider.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Source coverage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCoverage"}}}},"404":{"description":"Not found"}}}},"/llms.txt":{"get":{"tags":["Agent Docs"],"summary":"LLM-facing product and API instructions.","responses":{"200":{"description":"Plain text instructions"}}}},"/.well-known/ai-catalog.json":{"get":{"tags":["Agent Docs"],"summary":"Lightweight well-known agent catalog manifest. Use /api/agents/briefing for the richer cached briefing.","responses":{"200":{"description":"Agent catalog manifest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBriefing"}}}}}}},"/.well-known/mcp.json":{"get":{"tags":["Agent Docs"],"summary":"MCP discovery metadata.","responses":{"200":{"description":"MCP manifest"}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"required":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"MirrorLimits":{"type":"object","required":["maxFileBytes","maxTotalBytes","maxFiles","maxRuntimeFiles","scanSampleBytes","policy"],"properties":{"maxFileBytes":{"type":"number"},"maxTotalBytes":{"type":"number"},"maxFiles":{"type":"number"},"maxRuntimeFiles":{"type":"number"},"scanSampleBytes":{"type":"number"},"policy":{"type":"string"}},"additionalProperties":false},"Principal":{"type":"object","required":["id","role","allowedOwners"],"properties":{"id":{"type":"string"},"role":{"type":"string","enum":["visitor","reader","publisher","admin"]},"allowedOwners":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"FacetCounts":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","required":["value","count"],"properties":{"value":{"type":"string"},"count":{"type":"number"}}}}},"ArtifactSummary":{"type":"object","required":["id","owner","name","repo","type","license","visibility","hostingStatus","fileCount"],"properties":{"id":{"type":"string"},"owner":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"type":{"type":"string"},"summary":{"type":"string"},"publisher":{"type":"string"},"sourceUrl":{"type":"string"},"license":{"type":"string"},"visibility":{"type":"string"},"verificationStatus":{"type":"string"},"scanStatus":{"type":"string"},"cardCompleteness":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"task":{"type":["string","null"]},"modality":{"type":["string","null"]},"framework":{"type":["string","null"]},"formats":{"type":"array","items":{"type":"string"}},"worksWith":{"type":"array","items":{"type":"string"}},"sizeBytes":{"type":"number"},"mirrorCount":{"type":"number"},"downloadCount":{"type":"number"},"stars":{"type":"number"},"citations":{"type":"number"},"updatedAt":{"type":"string"},"createdAt":{"type":"string"},"upstream":{"type":["object","null"],"additionalProperties":true},"hosting":{"type":["object","null"],"additionalProperties":true},"hostingStatus":{"type":"string"},"fileCount":{"type":"number"},"hostedFileCount":{"type":"number"},"externalFileCount":{"type":"number"},"sampleFiles":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/ArtifactFile"}}},"additionalProperties":true},"ArtifactPage":{"type":"object","required":["rows","total","limit","cursor","nextCursor","generatedAt"],"properties":{"rows":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/ArtifactSummary"}},"total":{"type":"number"},"limit":{"type":"number"},"cursor":{"type":"string"},"nextCursor":{"type":["string","null"]},"facets":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/FacetCounts"},"generatedAt":{"type":"string"}}},"ArtifactFile":{"type":"object","required":["path"],"properties":{"path":{"type":"string"},"sizeBytes":{"type":"number"},"format":{"type":["string","null"]},"sha256":{"type":["string","null"]},"risk":{"type":["string","null"]},"sourceKind":{"type":["string","null"]},"downloadPolicy":{"type":["string","null"]},"storageKey":{"type":["string","null"]},"externalUrl":{"type":["string","null"]},"toolCommands":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/ToolCommand"}}},"additionalProperties":true},"ToolCommand":{"type":"object","required":["id","label","command"],"properties":{"id":{"type":"string"},"tool":{"type":"string"},"label":{"type":"string"},"command":{"type":"string"},"detail":{"type":"string"},"description":{"type":"string"},"safe":{"type":"boolean"},"requiresHostedFiles":{"type":"boolean"},"docsUrl":{"type":"string"},"copyable":{"type":"boolean"}},"additionalProperties":true},"ArtifactMetadata":{"type":"object","required":["schemaVersion","id","repo","canonicalUrl","apiUrl","filesUrl","license","hosting","agentUse"],"properties":{"schemaVersion":{"const":"hugging-bay.artifact-metadata.v1"},"id":{"type":"string"},"repo":{"type":"string"},"canonicalUrl":{"type":"string"},"apiUrl":{"type":"string"},"filesUrl":{"type":"string"},"manifestUrl":{"type":"string"},"license":{"type":"object","additionalProperties":true},"safety":{"type":"object","additionalProperties":true},"provenance":{"type":"object","additionalProperties":true},"hosting":{"type":"object","additionalProperties":true},"metrics":{"type":"object","additionalProperties":true},"agentUse":{"type":"object","additionalProperties":true}},"additionalProperties":true},"ArtifactCard":{"type":"object","required":["schemaVersion","generatedAt","artifact","actions"],"properties":{"schemaVersion":{"const":"hugging-bay.artifact-card.v1"},"generatedAt":{"type":"string"},"artifact":{"type":"object","additionalProperties":true},"previewableFiles":{"type":"array","items":{"type":"object","additionalProperties":true}},"actions":{"type":"object","additionalProperties":true}},"additionalProperties":true},"CompareArtifacts":{"type":"object","required":["schemaVersion","generatedAt","rows","columns","guidance"],"properties":{"schemaVersion":{"const":"hugging-bay.compare.v1"},"generatedAt":{"type":"string"},"baseUrl":{"type":"string"},"count":{"type":"number"},"missing":{"type":"array","items":{"type":"string"}},"strongest":{"type":"object","additionalProperties":true},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":true}},"guidance":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"FilePreview":{"type":"object","required":["schemaVersion","artifactId","repo","filePath","renderHint","text","truncated"],"properties":{"schemaVersion":{"const":"hugging-bay.file-preview.v1"},"generatedAt":{"type":"string"},"artifactId":{"type":"string"},"repo":{"type":"string"},"filePath":{"type":"string"},"format":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"number"},"bytesRead":{"type":"number"},"truncated":{"type":"boolean"},"renderHint":{"type":"string","enum":["markdown","json","jsonl","csv","tsv","yaml","toml","text"]},"sha256":{"type":"string"},"text":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{}},"urls":{"type":"object","additionalProperties":true}},"additionalProperties":true},"DownloadableFileRow":{"type":"object","required":["artifactId","repo","filePath","sha256","sourceKind","downloadUrl","manifestUrl"],"properties":{"artifactId":{"type":"string"},"owner":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"type":{"type":"string"},"license":{"type":"string"},"summary":{"type":"string"},"filePath":{"type":"string"},"sizeBytes":{"type":"number"},"storageSizeBytes":{"type":"number"},"sha256":{"type":"string"},"sourceKind":{"type":"string"},"storageProvider":{"type":"string"},"hostingStatus":{"type":"string"},"downloadUrl":{"type":"string"},"manifestUrl":{"type":"string"},"manifestKeyUrl":{"type":"string"},"verifyCommand":{"type":"string"},"trust":{"type":"object","properties":{"verified":{"type":"boolean"},"hashAlgorithm":{"type":"string"},"manifestRequired":{"type":"boolean"},"preferredCommand":{"type":"string"},"directDownloadTrustBoundary":{"type":"string"}},"additionalProperties":true},"toolCommands":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/ToolCommand"}},"updatedAt":{"type":"string"}},"additionalProperties":true},"DownloadableFilesResponse":{"type":"object","required":["stats","rows","generatedAt"],"properties":{"stats":{"type":"object","required":["hostedArtifacts","hostedFiles","hostedBytes"],"additionalProperties":true},"rows":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/DownloadableFileRow"}},"generatedAt":{"type":"string"}},"additionalProperties":true},"MirrorPackSummary":{"type":"object","required":["slug","title","description","artifactCount","hostedArtifacts"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"artifactCount":{"type":"number"},"hostedArtifacts":{"type":"number"}},"additionalProperties":true},"MirrorPackDetail":{"type":"object","required":["slug","title","description","artifactCount","hostedArtifacts","rows"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"artifactCount":{"type":"number"},"hostedArtifacts":{"type":"number"},"rows":{"type":"array","items":{"type":"object","required":["id","repo","type","license","hostedFiles","hostingStatus"],"additionalProperties":true}},"generatedAt":{"type":"string"}},"additionalProperties":true},"MirrorDemandRow":{"type":"object","required":["id","repo","type","license","status","eligible","requestCount","tractionScore"],"properties":{"id":{"type":"string"},"repo":{"type":"string"},"type":{"type":"string"},"license":{"type":"string"},"status":{"type":"string"},"eligible":{"type":"boolean"},"requestCount":{"type":"number"},"smallSafeFiles":{"type":"number"},"smallSafeBytes":{"type":"number"},"usefulFiles":{"type":"number"},"usefulBytes":{"type":"number"},"usefulFileScore":{"type":"number"},"runtimeFileCount":{"type":"number"},"supportFileCount":{"type":"number"},"largeSkipped":{"type":"number"},"autoMirrorReady":{"type":"boolean"},"worksWith":{"type":"array","items":{"type":"string"}},"downloads":{"type":"number"},"stars":{"type":"number"},"tractionScore":{"type":"number"},"mirrorTier":{"type":"string"},"reviewStatus":{"type":"string"},"reviewReason":{"type":"string"},"why":{"type":"array","items":{"type":"string"}},"riskFlags":{"type":"array","items":{"type":"string"}},"topicSlugs":{"type":"array","items":{"type":"string"}},"readiness":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/MirrorReadiness"}},"additionalProperties":true},"MirrorReadiness":{"type":"object","required":["score","level","action","recommendedFiles","blockers"],"properties":{"score":{"type":"number"},"level":{"type":"string","enum":["hosted","ready","reviewable","blocked","needs-detail"]},"action":{"type":"string"},"worksWith":{"type":"array","items":{"type":"string"}},"toolUse":{"type":"array","items":{"type":"object","additionalProperties":true}},"safeFormats":{"type":"array","items":{"type":"string"}},"recommendedFiles":{"type":"array","items":{"type":"object","additionalProperties":true}},"blockers":{"type":"array","items":{"type":"string"}},"positives":{"type":"array","items":{"type":"string"}},"autoMirrorReady":{"type":"boolean"},"runtimeFileCount":{"type":"number"},"supportFileCount":{"type":"number"},"usefulFiles":{"type":"number"},"usefulBytes":{"type":"number"},"usefulFileScore":{"type":"number"},"largeSkipped":{"type":"number"},"hostedFiles":{"type":"number"},"externalFiles":{"type":"number"},"totalFiles":{"type":"number"},"limits":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/MirrorLimits"},"userCommand":{"type":"string"},"selectedMirrorCommand":{"type":"string"}},"additionalProperties":true},"MirrorReadinessResponse":{"type":"object","required":["schemaVersion","generatedAt","summary","rows"],"properties":{"schemaVersion":{"const":"hugging-bay.mirror-readiness.v1"},"generatedAt":{"type":"string"},"baseUrl":{"type":"string"},"summary":{"type":"object","additionalProperties":true},"policy":{"type":"object","additionalProperties":true},"rows":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/MirrorDemandRow"}},"agentUse":{"type":"object","additionalProperties":true}},"additionalProperties":true},"UploadedSourceFile":{"type":"object","required":["path","sizeBytes","contentType","contentBase64"],"properties":{"path":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"},"contentBase64":{"type":"string","description":"Strict base64 file payload. Placeholder values are rejected."}},"additionalProperties":false},"PublishDraft":{"type":"object","required":["owner","name","type","summary","sourceUrl","license","visibility","provenance"],"properties":{"owner":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"sourceUrl":{"type":"string"},"license":{"type":"string"},"visibility":{"type":"string","enum":["public","private","gated"]},"tags":{"type":"string"},"task":{"type":"string"},"framework":{"type":"string"},"sizeGb":{"type":"string"},"provenance":{"type":"string"},"sourceFiles":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/UploadedSourceFile"}},"largeUploadManifestId":{"type":"string","description":"Completed upload session id for large releases. Mutually exclusive with sourceFiles."}},"additionalProperties":true},"PublisherApplication":{"type":"object","required":["namespace","displayName","contact","sourceUrl","artifactTypes","intendedUse","provenancePlan","acceptedTerms"],"properties":{"namespace":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,39}$"},"displayName":{"type":"string","minLength":2,"maxLength":120},"contact":{"type":"string","minLength":5,"maxLength":160},"website":{"type":"string","pattern":"^(https://|$)","maxLength":240},"sourceUrl":{"type":"string","pattern":"^https://"},"artifactTypes":{"type":"array","minItems":1,"items":{"type":"string","enum":["llm","embedding","audio","vision","agent","dataset","app","tool","eval"]}},"intendedUse":{"type":"string","minLength":30,"maxLength":1200},"provenancePlan":{"type":"string","minLength":30,"maxLength":1200},"expectedUploads":{"type":"string","maxLength":400},"acceptedTerms":{"const":true}},"additionalProperties":false},"PublisherWorkflow":{"type":"object","required":["schemaVersion","generatedAt","baseUrl","access","apiFlow","cliFlow","mcpTools","draftRequirements","safety"],"properties":{"schemaVersion":{"const":"hugging-bay.publisher-workflow.v1"},"generatedAt":{"type":"string"},"baseUrl":{"type":"string"},"access":{"type":"object","additionalProperties":true},"apiFlow":{"type":"array","items":{"type":"object","additionalProperties":true}},"cliFlow":{"type":"array","items":{"type":"string"}},"mcpTools":{"type":"array","items":{"type":"string"}},"draftRequirements":{"type":"array","items":{"type":"string"}},"safety":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"UploadSessionFile":{"type":"object","required":["path","sizeBytes","sha256"],"properties":{"path":{"type":"string"},"sizeBytes":{"type":"number"},"sha256":{"type":"string"},"contentType":{"type":"string"},"storageKey":{"type":"string"},"upload":{"type":"object","additionalProperties":true},"uploaded":{"type":"boolean"}},"additionalProperties":true},"UploadSession":{"type":"object","required":["schemaVersion","id","owner","name","status","files","draftPatch"],"properties":{"schemaVersion":{"const":"hugging-bay.upload-session.v1"},"id":{"type":"string"},"owner":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["created","pending","completed","canceled","expired"]},"storageProvider":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"completedAt":{"type":["string","null"]},"files":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/UploadSessionFile"}},"draftPatch":{"type":"object","additionalProperties":true},"links":{"type":"object","additionalProperties":true},"urls":{"type":"object","additionalProperties":true}},"additionalProperties":true},"TrafficSummary":{"type":"object","required":["schemaVersion","generatedAt","available","windows"],"properties":{"schemaVersion":{"const":"hugging-bay.traffic-summary.v1"},"generatedAt":{"type":"string"},"persistence":{"type":"string"},"available":{"type":"boolean"},"reason":{"type":"string"},"instrumentation":{"type":"object","additionalProperties":true},"windows":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true},"HfDetailExpansion":{"type":"object","required":["schemaVersion","generatedAt","dryRun","targetCount","rows"],"properties":{"schemaVersion":{"const":"hugging-bay.hf-detail-expansion.v1"},"generatedAt":{"type":"string"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"dryRun":{"type":"boolean"},"requested":{"type":"number"},"selected":{"type":"number"},"targetCount":{"type":"number"},"fetched":{"type":"number"},"processed":{"type":"number"},"deferred":{"type":"number"},"timedOut":{"type":"boolean"},"maxRuntimeMs":{"type":"number"},"timeoutMs":{"type":"number"},"retries":{"type":"number"},"errors":{"type":"array","items":{"type":"object","additionalProperties":true}},"summary":{"type":"object","additionalProperties":true},"imported":{"type":"number"},"created":{"type":"number"},"updated":{"type":"number"},"blocked":{"type":"number"},"touched":{"type":"array","items":{"type":"string"}},"targets":{"type":"array","items":{"type":"object","additionalProperties":true}},"rows":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true},"ArtifactAgentBundle":{"type":"object","required":["schemaVersion","generatedAt","id","repo","metadata","card","trustBundle","mirrorReadiness"],"properties":{"schemaVersion":{"const":"hugging-bay.agent-artifact-bundle.v1"},"generatedAt":{"type":"string"},"baseUrl":{"type":"string"},"id":{"type":"string"},"repo":{"type":"string"},"metadata":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/ArtifactMetadata"},"card":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/ArtifactCard"},"trustBundle":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/TrustBundle"},"mirrorReadiness":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/MirrorReadiness"},"downloadableFiles":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/DownloadableFileRow"}},"recommendedNextActions":{"type":"array","items":{"type":"string"}},"urls":{"type":"object","additionalProperties":true}},"additionalProperties":true},"Topic":{"type":"object","required":["slug","label","artifactCount"],"properties":{"slug":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string"},"artifactCount":{"type":"number"},"hfImports":{"type":"number"},"hostedFiles":{"type":"number"},"downloads":{"type":"number"},"stars":{"type":"number"}},"additionalProperties":true},"RecommendationSummary":{"type":"object","required":["generatedAt","thesis","totals","packs"],"properties":{"generatedAt":{"type":"string"},"thesis":{"type":"string"},"totals":{"type":"object","additionalProperties":true},"packs":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/MirrorPackSummary"}},"mirrorSignals":{"type":"object","additionalProperties":true},"topMirrorCandidates":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/MirrorDemandRow"}}},"additionalProperties":true},"Ranking":{"type":"object","required":["schemaVersion","generatedAt","slug","title","description","webUrl","rows"],"properties":{"schemaVersion":{"const":"hugging-bay.ranking.v1"},"generatedAt":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"webUrl":{"type":"string"},"rows":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true},"StackIndex":{"type":"object","required":["schemaVersion","generatedAt","webUrl","stacks"],"properties":{"schemaVersion":{"const":"hugging-bay.stack-index.v1"},"generatedAt":{"type":"string"},"webUrl":{"type":"string"},"stacks":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true},"StackPack":{"type":"object","required":["schemaVersion","generatedAt","slug","title","audience","description","webUrl","apiUrl","searchUrl","rows"],"properties":{"schemaVersion":{"const":"hugging-bay.stack-pack.v1"},"generatedAt":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"audience":{"type":"string"},"description":{"type":"string"},"webUrl":{"type":"string"},"apiUrl":{"type":"string"},"searchUrl":{"type":"string"},"rankingUrl":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/ArtifactSummary"}}},"additionalProperties":true},"OpenSourceRadar":{"type":"object","required":["schemaVersion","generatedAt","webUrl","apiUrl","totals","sourceBreakdown","sections","policy"],"properties":{"schemaVersion":{"const":"hugging-bay.open-source-radar.v1"},"generatedAt":{"type":"string"},"webUrl":{"type":"string"},"apiUrl":{"type":"string"},"totals":{"type":"object","additionalProperties":true},"sourceBreakdown":{"type":"array","items":{"type":"object","additionalProperties":true}},"sections":{"type":"array","items":{"type":"object","required":["id","title","description","searchUrl","rows"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"searchUrl":{"type":"string"},"rows":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/ArtifactSummary"}}},"additionalProperties":true}},"policy":{"type":"object","additionalProperties":true}},"additionalProperties":true},"ManifestSigningKey":{"type":"object","required":["algorithm","keyId"],"additionalProperties":true},"TrustBundle":{"type":"object","required":["bundle_version","artifact","trust","files","generated_at"],"additionalProperties":true},"AgentBriefing":{"type":"object","required":["schemaVersion","generatedAt","product","scale","entrypoints","safeWorkflow"],"properties":{"schemaVersion":{"const":"hugging-bay.agent-briefing.v1"},"generatedAt":{"type":"string"},"product":{"type":"object","additionalProperties":true},"scale":{"type":"object","additionalProperties":true},"entrypoints":{"type":"object","additionalProperties":{"type":"string"}},"safeWorkflow":{"type":"array","items":{"type":"string"}},"highValueQueries":{"type":"array","items":{"type":"object","additionalProperties":true}},"packs":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/MirrorPackSummary"}},"topTopics":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/Topic"}},"mirrorCandidates":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/MirrorDemandRow"}},"hostedDownloads":{"type":"object","additionalProperties":true},"trafficGuidance":{"type":"object","additionalProperties":true}},"additionalProperties":true},"AgentTasks":{"type":"object","required":["schemaVersion","generatedAt","baseUrl","tasks","guidance"],"properties":{"schemaVersion":{"const":"hugging-bay.agent-tasks.v1"},"generatedAt":{"type":"string"},"baseUrl":{"type":"string"},"tasks":{"type":"array","items":{"type":"object","required":["id","label","description","webUrl","apiUrl","nextSteps"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"webUrl":{"type":"string"},"apiUrl":{"type":"string"},"searchUrl":{"type":"string"},"actions":{"type":"array","items":{"type":"object","required":["id","method","url"],"properties":{"id":{"type":"string"},"method":{"type":"string"},"url":{"type":"string"},"mcpTool":{"type":"string"},"arguments":{"type":"object","additionalProperties":true}},"additionalProperties":true}},"nextSteps":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}},"guidance":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"CatalogSource":{"type":"object","required":["id","name","status","ingestMode","metadataUse","mirrorPolicy"],"additionalProperties":true},"CatalogSources":{"type":"object","required":["schemaVersion","rows"],"properties":{"schemaVersion":{"const":"hugging-bay.catalog-sources.v1"},"rows":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/CatalogSource"}}},"additionalProperties":true},"SourceCoverage":{"type":"object","required":["schemaVersion","generatedAt","source","sourceId","counts","rollups","topArtifacts","policy"],"properties":{"schemaVersion":{"const":"hugging-bay.source-coverage.v1"},"generatedAt":{"type":"string"},"source":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/CatalogSource"},"sourceId":{"type":"string"},"webUrl":{"type":"string"},"apiUrl":{"type":"string"},"counts":{"type":"object","additionalProperties":true},"rollups":{"type":"object","additionalProperties":true},"topArtifacts":{"type":"array","items":{"type":"object","additionalProperties":true}},"policy":{"type":"object","additionalProperties":true}},"additionalProperties":true},"IndexingUrl":{"type":"object","required":["kind","id","url"],"properties":{"kind":{"type":"string","enum":["static","ranking","stack","intent","source","topic","artifact","downloadable","agent-doc"]},"id":{"type":"string"},"url":{"type":"string"},"apiUrl":{"type":"string"},"lastmod":{"type":["string","null"]}},"additionalProperties":true},"IndexingStatus":{"type":"object","required":["schemaVersion","generatedAt","baseUrl","sitemapIndexUrl","totals","sitemaps","urlKinds"],"properties":{"schemaVersion":{"const":"hugging-bay.indexing-status.v1"},"generatedAt":{"type":"string"},"baseUrl":{"type":"string"},"robotsUrl":{"type":"string"},"sitemapIndexUrl":{"type":"string"},"llmsTxtUrl":{"type":"string"},"openapiUrl":{"type":"string"},"agentManifestUrl":{"type":"string"},"urlBatchEndpoint":{"type":"string"},"totals":{"type":"object","additionalProperties":true},"sitemaps":{"type":"array","items":{"type":"object","additionalProperties":true}},"urlKinds":{"type":"array","items":{"type":"string"}},"guidance":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"IndexingUrlBatch":{"type":"object","required":["schemaVersion","generatedAt","kind","rows","total","limit","cursor","nextCursor"],"properties":{"schemaVersion":{"const":"hugging-bay.indexing-url-batch.v1"},"generatedAt":{"type":"string"},"kind":{"type":"string"},"rows":{"type":"array","items":{"$ref":"https://huggingbay.xyz/api/schemas#/$defs/IndexingUrl"}},"total":{"type":"number"},"limit":{"type":"number"},"cursor":{"type":"string"},"nextCursor":{"type":["string","null"]}},"additionalProperties":true}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Configured Hugging Bay bearer token. Admin endpoints require an admin token."}}}}