Spaces:
Sleeping
Sleeping
Commit ·
73b6f92
0
Parent(s):
Init
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributesAdded+2
- .gitignoreAdded+20
- README.mdAdded+86
- agents/README.mdAdded+13
- agents/__init__.pyAdded+15
- agents/export/__init__.pyAdded+3
- agents/export/agent.pyAdded+112
- agents/extraction/__init__.pyAdded+3
- agents/extraction/agent.pyAdded+239
- agents/orchestrator/__init__.pyAdded+3
- agents/orchestrator/agent.pyAdded+18
- agents/rewrite/__init__.pyAdded+3
- agents/rewrite/agent.pyAdded+315
- agents/shared/base.pyAdded+49
- agents/shared/client.pyAdded+97
- agents/shared/embeddings.pyAdded+19
- agents/standards_mapping/__init__.pyAdded+3
- agents/standards_mapping/agent.pyAdded+293
- agents/validation/__init__.pyAdded+3
- agents/validation/agent.pyAdded+96
- common/README.mdAdded+10
- common/embedding_store.pyAdded+98
- docker/DockerfileAdded+20
- docs/README.mdAdded+12
- docs/agents/orchestrator.mdAdded+12
- docs/architecture/system-context.mdAdded+11
- docs/pipelines/pypeflow-overview.mdAdded+8
- docs/ui/review-workflow.mdAdded+17
- frontend/.env.exampleAdded+1
- frontend/README.mdAdded+17
- frontend/index.htmlAdded+13
- frontend/package-lock.jsonAdded+2030
- frontend/package.jsonAdded+25
- frontend/public/favicon.svgAdded
- frontend/public/index.htmlAdded+13
- frontend/src/App.tsxAdded+34
- frontend/src/components/PresetManager.tsxAdded+193
- frontend/src/components/SessionDetails.tsxAdded+578
- frontend/src/components/SessionList.tsxAdded+59
- frontend/src/components/UploadForm.tsxAdded+189
- frontend/src/main.tsxAdded+15
- frontend/src/pages/ObservatoryPage.tsxAdded+179
- frontend/src/pages/PresetEditPage.tsxAdded+202
- frontend/src/pages/PresetsPage.tsxAdded+9
- frontend/src/pages/SessionsPage.tsxAdded+19
- frontend/src/services/api.tsAdded+113
- frontend/src/styles.cssAdded+643
- frontend/src/types/diagnostics.tsAdded+27
- frontend/src/types/session.tsAdded+59
- frontend/tsconfig.jsonAdded+21
12# Auto detect text files and perform LF normalization* text=auto1234567891011121314151617181920# Python__pycache__/*.py[cod].venv/
# Nodenode_modules/*.log
# Editors.idea/.vscode/
# Build outputsdist/build/
# OSThumbs.db.DS_Store1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586# RightCodes Architecture Scaffold
This repository is the starting scaffold for the code and standards migration assistant. The layout mirrors the planned AI-driven workflow (ingestion -> extraction -> mapping -> rewrite -> validation -> export) and keeps agent orchestration, backend services, and UI concerns separated.
## Top-Level Directories
- `frontend/` - React application for uploads, diff review, validation checklists, and export actions.- `server/` - FastAPI backend that manages sessions, orchestrates agents, and exposes REST/WebSocket APIs.- `agents/` - OpenAI agent wrappers plus prompt assets for each processing stage.- `workers/` - File ingestion, document parsing, and pipeline jobs executed off the main API thread.- `storage/` - Versioned document blobs, manifests, caches, and export artefacts.- `docs/` - Architecture notes, pipeline diagrams, agent specs, and UI flows.- `scripts/` - Developer utilities, operational scripts, and local tooling hooks.- `data/` - Sample inputs, canonical standards metadata, and fixture mappings.- `infra/` - DevOps assets (containers, CI pipelines, observability).- `common/` - Shared domain models, schemas, and event definitions.
## Getting Started
### Prerequisites
- Python 3.8+ (3.11+ recommended)- Node.js 18+ and npm (ships with Node.js)- Internet connectivity on the first launch so pip/npm can download dependencies
### Launcher Quick Start
The repository ships with `start-rightcodes.ps1` (PowerShell) and `start-rightcodes.bat` (Command Prompt) which check for Python and Node.js, create the virtual environment, install dependencies, and open the launcher UI.
```powershell.\start-rightcodes.ps1```
```batstart-rightcodes.bat```
The scripts will guide you to the official Python and Node.js installers if either prerequisite is missing. After a successful first run, the cached `.venv/` and `frontend/node_modules/` folders allow the launcher to work offline.
### Backend (FastAPI)
```bashcd serverpython -m venv .venv.venv\Scripts\activate # Windowspip install -r requirements.txt# copy the sample env and add your OpenAI keycopy .env.example .env # or use New-Item -Path .env -ItemType File```
Edit `.env` and set `RIGHTCODES_OPENAI_API_KEY=sk-your-key`.
```bashuvicorn app.main:app --reload --port 8000```
The API is available at `http://localhost:8000/api` and Swagger UI at `http://localhost:8000/api/docs`.
### Frontend (Vite + React)
```bashcd frontendnpm installnpm run dev```
Navigate to `http://localhost:5173` to access the UI. Configure a custom API base URL by setting `VITE_API_BASE_URL` in `frontend/.env`.
## Usage
- Each conversion session requires the original report (`.docx`) plus one or more destination standards packs (`.pdf`). Upload all relevant standards PDFs so the AI pipeline can align existing references with the new context.- The web UI now shows live progress bars and an activity log so you can monitor each stage of the pipeline while it runs.- Backend agent calls expect an OpenAI API key in `RIGHTCODES_OPENAI_API_KEY`. On Windows PowerShell you can set it temporarily with `setx RIGHTCODES_OPENAI_API_KEY "sk-..."` (reopen your terminal afterward).- Optional: override the default OpenAI models by setting `RIGHTCODES_OPENAI_MODEL_EXTRACT`, `RIGHTCODES_OPENAI_MODEL_MAPPING`, `RIGHTCODES_OPENAI_MODEL_REWRITE`, `RIGHTCODES_OPENAI_MODEL_VALIDATE`, and `RIGHTCODES_OPENAI_MODEL_EMBED`. The pipeline stores standards embeddings under `storage/embeddings/`, enabling retrieval-augmented mapping, and the export stage now writes a converted DOCX to `storage/exports/` with a download button once the pipeline completes.
## Offline Distribution Options
- **Zip bundle:** Run `python tools/build_offline_package.py` after a successful online launch. The script creates `dist/rightcodes-offline.zip` containing the repository, the prepared `.venv/`, and `frontend/node_modules/`. Pass `--python-runtime` and `--node-runtime` to embed portable runtimes if you have them (for example, a locally extracted Python embeddable zip and Node.js binary folder). Extract the archive on another machine (same OS/architecture) and use the launcher scripts without needing internet access.- **Docker image:** Build a pre-baked container with `docker build -t rightcodes-launcher -f docker/Dockerfile .`. Supply `RIGHTCODES_OPENAI_API_KEY` (and optionally `RIGHTCODES_OPENAI_API_KEY_SOURCE`) at runtime: `docker run --rm -p 8765:8765 -p 8000:8000 -p 5173:5173 -e RIGHTCODES_OPENAI_API_KEY=sk-xxx rightcodes-launcher`.- **First-run reminder:** Even with these assets, the *initial* bundle build still requires internet so dependencies can be fetched once before packaging.
## Next Steps
1. Flesh out agent logic in `agents/` and integrate with orchestration hooks.2. Replace the in-memory session store with a durable persistence layer.3. Wire the worker queue (`workers/queue/`) to execute long-running stages asynchronously.12345678910111213# Agent Bundles
Encapsulates prompts, tool definitions, and orchestration glue for each OpenAI Agent engaged in the pipeline.
## Structure
- `orchestrator/` - Coordinator agent spec, high-level playbooks, and session controller logic.- `extraction/` - Document clause extraction prompts, tool configs for parsers, and output schemas.- `standards_mapping/` - Normalization/mapping prompts, ontology helpers, and reference datasets.- `rewrite/` - Minimal-change rewrite prompts, safety rules, and diff formatting helpers.- `validation/` - Post-rewrite review prompts, calculation sanity checks, and reporting templates.- `export/` - Finalization prompts, merge instructions, and docx regeneration aids.- `shared/` - Common prompt fragments, JSON schema definitions, and evaluation heuristics.123456789101112131415from .orchestrator.agent import OrchestratorAgentfrom .extraction.agent import ExtractionAgentfrom .standards_mapping.agent import StandardsMappingAgentfrom .rewrite.agent import RewriteAgentfrom .validation.agent import ValidationAgentfrom .export.agent import ExportAgent
__all__ = [ "OrchestratorAgent", "ExtractionAgent", "StandardsMappingAgent", "RewriteAgent", "ValidationAgent", "ExportAgent",]123from .agent import ExportAgent
__all__ = ["ExportAgent"]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112from __future__ import annotations
from datetime import datetimefrom pathlib import Pathfrom typing import Any, Dict, List
from docx import Document
from server.app.services.diagnostics_service import get_diagnostics_service
from ..shared.base import AgentContext, BaseAgent
def _apply_table_replacements(document: Document, replacements: List[Dict[str, Any]]) -> int: tables = document.tables applied = 0 for item in replacements: index = item.get("table_index") updated_rows = item.get("updated_rows") if not isinstance(index, int) or index < 0 or index >= len(tables): continue if not isinstance(updated_rows, list): continue table = tables[index] for row_idx, row_values in enumerate(updated_rows): if row_idx < len(table.rows): row = table.rows[row_idx] else: row = table.add_row() for col_idx, value in enumerate(row_values): if col_idx < len(row.cells): row.cells[col_idx].text = str(value) if value is not None else "" else: break applied += 1 return applied
def _apply_replacements(document: Document, replacements: List[Dict[str, Any]]) -> int: applied = 0 paragraphs = document.paragraphs for item in replacements: try: index = int(item.get("paragraph_index")) except (TypeError, ValueError): continue if index < 0 or index >= len(paragraphs): continue updated_text = item.get("updated_text") if not isinstance(updated_text, str): continue paragraphs[index].text = updated_text applied += 1 return applied
class ExportAgent(BaseAgent): name = "export-agent"
async def run(self, context: AgentContext) -> Dict[str, Any]: await self.emit_debug("Exporting updated document to DOCX.")
rewrite_plan = context.payload.get("rewrite_plan") or {} replacements = rewrite_plan.get("replacements") or [] table_replacements = rewrite_plan.get("table_replacements") or [] source_path = context.payload.get("original_path") if not source_path or not Path(source_path).exists(): raise RuntimeError("Original document path not supplied to export agent.")
document = Document(source_path) applied_paragraphs = _apply_replacements(document, replacements) applied_tables = _apply_table_replacements(document, table_replacements)
storage_root = _resolve_storage_root() export_dir = Path(storage_root) / "exports" export_dir.mkdir(parents=True, exist_ok=True) export_path = export_dir / f"{context.session_id}-converted.docx" document.save(export_path) diagnostics = get_diagnostics_service() diagnostics.record_event( node_id="exports", event_type="export.generated", message=f"Generated export for session `{context.session_id}`", metadata={ "session_id": context.session_id, "path": str(export_path), "paragraph_replacements": applied_paragraphs, "table_updates": applied_tables, }, )
if applied_paragraphs or applied_tables: note = "Converted document generated using rewrite plan." else: note = "Export completed, but no replacements were applied."
return { "export_path": str(export_path), "notes": note, "replacement_count": applied_paragraphs, "table_replacement_count": applied_tables, "generated_at": datetime.utcnow().isoformat(), }
def _resolve_storage_root() -> Path: try: from server.app.core.config import get_settings # local import avoids circular dependency
return get_settings().storage_dir except Exception: # noqa: BLE001 return (Path(__file__).resolve().parents[2] / "storage").resolve()123from .agent import ExtractionAgent
__all__ = ["ExtractionAgent"]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239from __future__ import annotations
from dataclasses import asdict, is_dataclassimport jsonfrom typing import Any, Dict, Iterable, List
from ..shared.base import AgentContext, BaseAgent
class ExtractionAgent(BaseAgent): name = "extraction-agent" paragraph_chunk_size = 40 table_chunk_size = 15 max_text_chars = 1500
async def run(self, context: AgentContext) -> Dict[str, Any]: raw_paragraphs = context.payload.get("paragraphs", []) raw_tables = context.payload.get("tables", []) paragraphs = [_prepare_paragraph(item, self.max_text_chars) for item in _normalise_items(raw_paragraphs)] tables = [_prepare_table(item, self.max_text_chars) for item in _normalise_items(raw_tables)] metadata = context.payload.get("metadata", {})
if not paragraphs and not tables: await self.emit_debug("No document content supplied to extraction agent.") return { "document_summary": "", "sections": [], "tables": [], "references": [], "notes": "Skipped: no document content provided.", }
schema = { "name": "ExtractionResult", "schema": { "type": "object", "properties": { "document_summary": {"type": "string"}, "sections": { "type": "array", "items": { "type": "object", "properties": { "paragraph_index": {"type": "integer"}, "text": {"type": "string"}, "references": { "type": "array", "items": {"type": "string"}, "default": [], }, }, "required": ["paragraph_index", "text"], "additionalProperties": False, }, "default": [], }, "tables": { "type": "array", "items": { "type": "object", "properties": { "table_index": {"type": "integer"}, "summary": {"type": "string"}, "references": { "type": "array", "items": {"type": "string"}, "default": [], }, }, "required": ["table_index", "summary"], "additionalProperties": False, }, "default": [], }, "references": { "type": "array", "items": {"type": "string"}, "default": [], }, "notes": {"type": "string"}, }, "required": ["document_summary", "sections", "tables", "references"], "additionalProperties": False, }, }
model = self.settings.openai_model_extract aggregated_sections: List[Dict[str, Any]] = [] aggregated_tables: List[Dict[str, Any]] = [] aggregated_references: set[str] = set() summaries: List[str] = [] notes: List[str] = []
for chunk in _chunk_list(paragraphs, self.paragraph_chunk_size): batch = await self._process_batch( context=context, model=model, schema=schema, paragraphs=chunk, tables=[], metadata=metadata, ) if batch: summaries.append(batch.get("document_summary", "")) aggregated_sections.extend(batch.get("sections", [])) aggregated_tables.extend(batch.get("tables", [])) aggregated_references.update(batch.get("references", [])) if batch.get("notes"): notes.append(batch["notes"])
for chunk in _chunk_list(tables, self.table_chunk_size): batch = await self._process_batch( context=context, model=model, schema=schema, paragraphs=[], tables=chunk, metadata=metadata, ) if batch: aggregated_tables.extend(batch.get("tables", [])) aggregated_references.update(batch.get("references", [])) if batch.get("notes"): notes.append(batch["notes"])
summary = " ".join(filter(None, summaries)).strip()
for item in paragraphs: aggregated_references.update(item.get("references", [])) for item in tables: aggregated_references.update(item.get("references", []))
return { "document_summary": summary, "sections": aggregated_sections, "tables": aggregated_tables, "references": sorted(aggregated_references), "notes": " ".join(notes).strip(), }
async def _process_batch( self, *, context: AgentContext, model: str, schema: Dict[str, Any], paragraphs: List[Dict[str, Any]], tables: List[Dict[str, Any]], metadata: Dict[str, Any], ) -> Dict[str, Any]: if not paragraphs and not tables: return {}
payload = { "paragraphs": paragraphs, "tables": tables, "metadata": metadata, }
messages = [ { "role": "system", "content": ( "You are an engineering standards analyst. " "Analyse the supplied report content, identify normative references, " "and return structured data following the JSON schema." ), }, { "role": "user", "content": ( f"Session ID: {context.session_id}\n" f"Payload: {json.dumps(payload, ensure_ascii=False)}" ), }, ]
try: result = await self.call_openai_json(model=model, messages=messages, schema=schema) return result except Exception as exc: # noqa: BLE001 await self.emit_debug(f"Extraction chunk failed: {exc}") return { "document_summary": "", "sections": [], "tables": [], "references": [], "notes": f"Chunk failed: {exc}", }
def _normalise_items(items: List[Any]) -> List[Dict[str, Any]]: normalised: List[Dict[str, Any]] = [] for item in items: if is_dataclass(item): normalised.append(asdict(item)) elif isinstance(item, dict): normalised.append(item) else: normalised.append({"value": str(item)}) return normalised
def _prepare_paragraph(item: Dict[str, Any], max_chars: int) -> Dict[str, Any]: text = item.get("text", "") if len(text) > max_chars: text = text[:max_chars] + "...(trimmed)" return { "index": item.get("index"), "text": text, "style": item.get("style"), "heading_level": item.get("heading_level"), "references": item.get("references", []), }
def _prepare_table(item: Dict[str, Any], max_chars: int) -> Dict[str, Any]: rows = item.get("rows", []) preview_rows = [] for row in rows: preview_row = [] for cell in row: cell_text = str(cell) if len(cell_text) > max_chars: cell_text = cell_text[:max_chars] + "...(trimmed)" preview_row.append(cell_text) preview_rows.append(preview_row) return { "index": item.get("index"), "rows": preview_rows, "references": item.get("references", []), }
def _chunk_list(items: List[Dict[str, Any]], size: int) -> Iterable[List[Dict[str, Any]]]: if size <= 0: size = len(items) or 1 for idx in range(0, len(items), size): yield items[idx : idx + size]123from .agent import OrchestratorAgent
__all__ = ["OrchestratorAgent"]123456789101112131415161718from __future__ import annotations
from typing import Any, Dict
from ..shared.base import AgentContext, BaseAgent
class OrchestratorAgent(BaseAgent): name = "orchestrator-agent"
async def run(self, context: AgentContext) -> Dict[str, Any]: await self.emit_debug(f"Received session {context.session_id}") # In a future iteration this agent will orchestrate sub-agent calls. return { "next_stage": "ingest", "notes": "Placeholder orchestrator response.", "input_payload": context.payload, }123from .agent import RewriteAgent
__all__ = ["RewriteAgent"]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315from __future__ import annotations
import jsonfrom typing import Any, Dict, Iterable, List, Sequence
from ..shared.base import AgentContext, BaseAgent
class RewriteAgent(BaseAgent): name = "rewrite-agent" paragraph_chunk_size = 20 max_paragraph_chars = 1600 max_table_chars = 1200
async def run(self, context: AgentContext) -> Dict[str, Any]: mapping_result = context.payload.get("mapping_result") or {} mappings: List[Dict[str, Any]] = mapping_result.get("mappings", []) if not mappings: await self.emit_debug("Rewrite skipped: no mappings provided.") return { "replacements": [], "table_replacements": [], "change_log": [], "notes": "Rewrite skipped: no mappings provided.", }
mapping_by_reference = _index_mappings(mappings) doc_paragraphs = _normalise_paragraphs( context.payload.get("document_paragraphs", []), self.max_paragraph_chars ) doc_tables = _normalise_tables( context.payload.get("document_tables", []), self.max_table_chars )
paragraphs_to_rewrite = [ paragraph for paragraph in doc_paragraphs if any(ref in mapping_by_reference for ref in paragraph["references"]) ] tables_to_rewrite = [ table for table in doc_tables if any(ref in mapping_by_reference for ref in table["references"]) ]
if not paragraphs_to_rewrite and not tables_to_rewrite: await self.emit_debug("Rewrite skipped: no paragraphs or tables matched mapped references.") return { "replacements": [], "table_replacements": [], "change_log": [], "notes": "Rewrite skipped: no references found in document.", }
aggregated_replacements: List[Dict[str, Any]] = [] aggregated_table_replacements: List[Dict[str, Any]] = [] change_log_entries: List[Dict[str, Any]] = [] change_log_seen: set[tuple] = set() notes: List[str] = [] target_voice = context.payload.get("target_voice", "Professional engineering tone") constraints = context.payload.get("constraints", [])
pending_tables = {table["index"]: table for table in tables_to_rewrite}
for chunk in _chunk_list(paragraphs_to_rewrite, self.paragraph_chunk_size): relevant_refs = sorted( { reference for paragraph in chunk for reference in paragraph["references"] if reference in mapping_by_reference } ) if not relevant_refs: continue
mapping_subset = _collect_mapping_subset(mapping_by_reference, relevant_refs) associated_tables = _collect_tables_for_refs(pending_tables, relevant_refs)
payload = { "instructions": { "target_voice": target_voice, "constraints": constraints, "guidance": [ "Preserve numbering, bullet markers, and formatting cues.", "Do not alter calculations, quantities, or engineering values.", "Only update normative references and surrounding wording necessary for clarity.", "Maintain section titles and headings.", ], }, "paragraphs": chunk, "tables": associated_tables, "mappings": mapping_subset, }
schema = _rewrite_schema() messages = [ { "role": "system", "content": ( "You are an engineering editor updating a report so its references align with the target standards. " "Return JSON matching the schema. Maintain original structure and numbering while replacing each reference with the mapped target references." ), }, { "role": "user", "content": ( f"Session: {context.session_id}\n" f"Payload: {json.dumps(payload, ensure_ascii=False)}" ), }, ]
try: result = await self.call_openai_json( model=self.settings.openai_model_rewrite, messages=messages, schema=schema, ) aggregated_replacements.extend(result.get("replacements", [])) aggregated_table_replacements.extend(result.get("table_replacements", [])) for entry in result.get("change_log", []): key = ( entry.get("reference"), entry.get("target_reference"), tuple(entry.get("affected_paragraphs", [])), ) if key not in change_log_seen: change_log_entries.append(entry) change_log_seen.add(key) if result.get("notes"): notes.append(result["notes"]) except Exception as exc: # noqa: BLE001 await self.emit_debug(f"Rewrite chunk failed: {exc}") notes.append(f"Rewrite chunk failed: {exc}")
if not aggregated_replacements and not aggregated_table_replacements: return { "replacements": [], "table_replacements": [], "change_log": change_log_entries, "notes": "Rewrite completed but no updates were suggested.", }
return { "replacements": aggregated_replacements, "table_replacements": aggregated_table_replacements, "change_log": change_log_entries, "notes": " ".join(notes).strip(), }
def _index_mappings(mappings: Sequence[Dict[str, Any]]) -> Dict[str, List[Dict[str, Any]]]: index: Dict[str, List[Dict[str, Any]]] = {} for mapping in mappings: ref = mapping.get("source_reference") if not isinstance(ref, str): continue index.setdefault(ref, []).append(mapping) return index
def _collect_mapping_subset( mapping_by_reference: Dict[str, List[Dict[str, Any]]], references: Sequence[str],) -> List[Dict[str, Any]]: subset: List[Dict[str, Any]] = [] for reference in references: subset.extend(mapping_by_reference.get(reference, [])) return subset
def _collect_tables_for_refs( pending_tables: Dict[int, Dict[str, Any]], references: Sequence[str],) -> List[Dict[str, Any]]: matched: List[Dict[str, Any]] = [] for index in list(pending_tables.keys()): table = pending_tables[index] if any(ref in references for ref in table["references"]): matched.append(table) pending_tables.pop(index, None) return matched
def _normalise_paragraphs(items: Sequence[Dict[str, Any]], max_chars: int) -> List[Dict[str, Any]]: paragraphs: List[Dict[str, Any]] = [] for item in items: index = item.get("index") if index is None: continue text = str(item.get("text", "")) if len(text) > max_chars: text = text[:max_chars] + "...(trimmed)" paragraphs.append( { "index": index, "text": text, "style": item.get("style"), "heading_level": item.get("heading_level"), "references": item.get("references", []), } ) return paragraphs
def _normalise_tables(items: Sequence[Dict[str, Any]], max_chars: int) -> List[Dict[str, Any]]: tables: List[Dict[str, Any]] = [] for item in items: index = item.get("index") if index is None: continue rows = [] for row in item.get("rows", []): preview_row = [] for cell in row: cell_text = str(cell) if len(cell_text) > max_chars: cell_text = cell_text[:max_chars] + "...(trimmed)" preview_row.append(cell_text) rows.append(preview_row) tables.append( { "index": index, "rows": rows, "references": item.get("references", []), } ) return tables
def _chunk_list(items: Sequence[Dict[str, Any]], size: int) -> Iterable[List[Dict[str, Any]]]: if size <= 0: size = len(items) or 1 for idx in range(0, len(items), size): yield list(items[idx : idx + size])
def _rewrite_schema() -> Dict[str, Any]: return { "name": "RewritePlanChunk", "schema": { "type": "object", "properties": { "replacements": { "type": "array", "items": { "type": "object", "properties": { "paragraph_index": {"type": "integer"}, "original_text": {"type": "string"}, "updated_text": {"type": "string"}, "applied_mappings": { "type": "array", "items": {"type": "string"}, "default": [], }, "change_reason": {"type": "string"}, }, "required": ["paragraph_index", "updated_text"], "additionalProperties": False, }, "default": [], }, "table_replacements": { "type": "array", "items": { "type": "object", "properties": { "table_index": {"type": "integer"}, "updated_rows": { "type": "array", "items": { "type": "array", "items": {"type": "string"}, }, "default": [], }, "applied_mappings": { "type": "array", "items": {"type": "string"}, "default": [], }, "change_reason": {"type": "string"}, }, "required": ["table_index"], "additionalProperties": False, }, "default": [], }, "change_log": { "type": "array", "items": { "type": "object", "properties": { "reference": {"type": "string"}, "target_reference": {"type": "string"}, "affected_paragraphs": { "type": "array", "items": {"type": "integer"}, "default": [], }, "note": {"type": "string"}, }, "required": ["reference", "target_reference"], "additionalProperties": False, }, "default": [], }, "notes": {"type": "string"}, }, "required": ["replacements", "table_replacements", "change_log"], "additionalProperties": False, }, }12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849from __future__ import annotations
from abc import ABC, abstractmethodfrom dataclasses import dataclass, fieldfrom typing import Any, Dict
# We import config lazily to avoid circular imports during module initialisation.from typing import TYPE_CHECKING
if TYPE_CHECKING: from server.app.core.config import Settings # pragma: no cover
@dataclassclass AgentContext: session_id: str payload: Dict[str, Any] = field(default_factory=dict)
class BaseAgent(ABC): name: str
@abstractmethod async def run(self, context: AgentContext) -> Dict[str, Any]: """Execute agent logic and return structured output."""
async def emit_debug(self, message: str) -> None: # Placeholder until logging/event bus is wired in. print(f"[{self.name}] {message}")
@property def settings(self): from server.app.core.config import get_settings # import here to avoid circular dependency
return get_settings()
async def call_openai_json( self, *, model: str, messages: list[Dict[str, Any]], schema: Dict[str, Any], ) -> Dict[str, Any]: from .client import create_json_response # import here to avoid circular dependency
if not self.settings.openai_api_key: await self.emit_debug("OpenAI API key missing; returning empty response.") raise RuntimeError("OpenAI API key missing") return await create_json_response(model=model, messages=messages, schema=schema)12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697from __future__ import annotations
import jsonimport loggingfrom functools import lru_cachefrom typing import Any, Iterable
from openai import AsyncOpenAI, OpenAIError
try: from server.app.core.config import get_settings from server.app.services.diagnostics_service import get_diagnostics_serviceexcept ModuleNotFoundError as exc: # pragma: no cover raise RuntimeError( "Failed to import server configuration. Ensure the project root is on PYTHONPATH." ) from exc
logger = logging.getLogger(__name__)
@lru_cachedef get_openai_client() -> AsyncOpenAI: settings = get_settings() if not settings.openai_api_key: diagnostics = get_diagnostics_service() diagnostics.record_event( node_id="openai", event_type="openai.missing_key", message="OpenAI API key missing; requests will fail.", metadata={}, ) raise RuntimeError( "OpenAI API key is not configured. Set RIGHTCODES_OPENAI_API_KEY before invoking agents." ) diagnostics = get_diagnostics_service() diagnostics.record_event( node_id="openai", event_type="openai.client_ready", message="OpenAI client initialised.", metadata={}, ) return AsyncOpenAI(api_key=settings.openai_api_key, base_url=settings.openai_api_base)
async def create_json_response( *, model: str, messages: Iterable[dict[str, Any]], schema: dict[str, Any],) -> dict[str, Any]: """Invoke OpenAI with a JSON schema response format.""" client = get_openai_client() diagnostics = get_diagnostics_service() diagnostics.record_event( node_id="openai", event_type="openai.request", message=f"Requesting model `{model}`", metadata={"model": model}, ) try: response = await client.chat.completions.create( model=model, messages=list(messages), response_format={"type": "json_schema", "json_schema": schema}, ) except OpenAIError as exc: logger.exception("OpenAI call failed: %s", exc) diagnostics.record_event( node_id="openai", event_type="openai.error", message="OpenAI request failed.", metadata={"model": model, "error": str(exc)}, ) raise
try: choice = response.choices[0] content = choice.message.content if choice and choice.message else None if not content: raise RuntimeError("OpenAI response did not include message content.") payload = json.loads(content) diagnostics.record_event( node_id="openai", event_type="openai.response", message="Received OpenAI response.", metadata={"model": model}, ) return payload except (AttributeError, json.JSONDecodeError) as exc: logger.exception("Failed to decode OpenAI response: %s", exc) diagnostics.record_event( node_id="openai", event_type="openai.error", message="Failed to decode OpenAI response.", metadata={"model": model, "error": str(exc)}, ) raise RuntimeError("OpenAI response was not valid JSON.") from exc12345678910111213141516171819from __future__ import annotations
from typing import Iterable, List, Sequence
async def embed_texts(texts: Iterable[str]) -> List[List[float]]: texts = [text if text else "" for text in texts] if not texts: return [] from ..shared.client import get_openai_client client = get_openai_client() from server.app.core.config import get_settings settings = get_settings() response = await client.embeddings.create( model=settings.openai_model_embed, input=list(texts), ) return [item.embedding for item in response.data]123from .agent import StandardsMappingAgent
__all__ = ["StandardsMappingAgent"]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293from __future__ import annotations
from dataclasses import asdict, is_dataclassimport jsonfrom pathlib import Pathfrom typing import Any, Dict, Iterable, List
from ..shared.base import AgentContext, BaseAgentfrom ..shared.embeddings import embed_textsfrom common.embedding_store import EmbeddingStore, get_session_embedding_path
class StandardsMappingAgent(BaseAgent): name = "standards-mapping-agent" reference_chunk_size = 20 max_excerpt_chars = 800
async def run(self, context: AgentContext) -> Dict[str, Any]: extraction_result = context.payload.get("extraction_result") or {} references: List[str] = extraction_result.get("references") or [] sections = extraction_result.get("sections") or [] tables = extraction_result.get("tables") or [] standards_chunks = _normalise_items(context.payload.get("standards_chunks", [])) target_metadata = context.payload.get("target_metadata", {}) store = EmbeddingStore(get_session_embedding_path(context.session_id))
if not references or not standards_chunks: await self.emit_debug("Insufficient data for standards mapping.") return { "mappings": [], "unmapped_references": references, "notes": "Mapping skipped due to missing references or standards content.", }
schema = { "name": "StandardsMapping", "schema": { "type": "object", "properties": { "mappings": { "type": "array", "items": { "type": "object", "properties": { "source_reference": {"type": "string"}, "source_context": {"type": "string"}, "target_reference": {"type": "string"}, "target_clause": {"type": "string"}, "target_summary": {"type": "string"}, "confidence": {"type": "number"}, "rationale": {"type": "string"}, }, "required": [ "source_reference", "target_reference", "confidence", ], "additionalProperties": False, }, "default": [], }, "unmapped_references": { "type": "array", "items": {"type": "string"}, "default": [], }, "notes": {"type": "string"}, }, "required": ["mappings", "unmapped_references"], "additionalProperties": False, }, }
standards_overview = _build_standards_overview(standards_chunks, self.max_excerpt_chars)
model = self.settings.openai_model_mapping aggregated_mappings: List[Dict[str, Any]] = [] aggregated_unmapped: set[str] = set() notes: List[str] = []
for chunk in _chunk_list(references, self.reference_chunk_size): reference_context = _build_reference_context( chunk, sections, tables, self.max_excerpt_chars ) retrieved_candidates = await _retrieve_candidates( chunk, reference_context, store, target_metadata, self.max_excerpt_chars ) payload = { "references": chunk, "reference_context": reference_context, "retrieved_candidates": [ {"reference": ref, "candidates": retrieved_candidates.get(ref, [])} for ref in chunk ], "standards_overview": standards_overview, "target_metadata": target_metadata, }
messages = [ { "role": "system", "content": ( "You are an engineering standards migration specialist. " "Map each legacy reference to the best matching clause in the target standards. " "Use the provided context and standards overview to justify your mapping. " "Return JSON that conforms to the supplied schema." ), }, { "role": "user", "content": ( f"Session: {context.session_id}\n" f"Payload: {json.dumps(payload, ensure_ascii=False)}" ), }, ]
try: result = await self.call_openai_json(model=model, messages=messages, schema=schema) aggregated_mappings.extend(result.get("mappings", [])) aggregated_unmapped.update(result.get("unmapped_references", [])) if result.get("notes"): notes.append(result["notes"]) except Exception as exc: # noqa: BLE001 await self.emit_debug(f"Standards mapping chunk failed: {exc}") aggregated_unmapped.update(chunk) notes.append(f"Chunk failed: {exc}")
await self.emit_debug("Standards mapping completed via OpenAI.") return { "mappings": aggregated_mappings, "unmapped_references": sorted(aggregated_unmapped), "notes": " ".join(notes).strip(), }
def _normalise_items(items: List[Any]) -> List[Dict[str, Any]]: normalised: List[Dict[str, Any]] = [] for item in items: if is_dataclass(item): normalised.append(asdict(item)) elif isinstance(item, dict): normalised.append(item) else: normalised.append({"text": str(item)}) return normalised
def _chunk_list(items: List[str], size: int) -> Iterable[List[str]]: if size <= 0: size = len(items) or 1 for idx in range(0, len(items), size): yield items[idx : idx + size]
def _build_reference_context( references: List[str], sections: List[Dict[str, Any]], tables: List[Dict[str, Any]], max_chars: int,) -> List[Dict[str, Any]]: section_map: Dict[str, List[Dict[str, Any]]] = {} for section in sections: refs = section.get("references") or [] for ref in refs: section_map.setdefault(ref, []) if len(section_map[ref]) < 3: text = section.get("text", "") if len(text) > max_chars: text = text[:max_chars] + "...(trimmed)" section_map[ref].append( { "paragraph_index": section.get("paragraph_index"), "text": text, } ) table_map: Dict[str, List[Dict[str, Any]]] = {} for table in tables: refs = table.get("references") or [] for ref in refs: table_map.setdefault(ref, []) if len(table_map[ref]) < 2: table_map[ref].append({"table_index": table.get("table_index"), "references": refs})
context = [] for ref in references: context.append( { "reference": ref, "paragraphs": section_map.get(ref, []), "tables": table_map.get(ref, []), } ) return context
def _build_standards_overview( standards_chunks: List[Dict[str, Any]], max_chars: int,) -> List[Dict[str, Any]]: grouped: Dict[str, Dict[str, Any]] = {} for chunk in standards_chunks: path = chunk.get("path", "unknown") heading = chunk.get("heading") clauses = chunk.get("clause_numbers") or [] text = chunk.get("text", "") if len(text) > max_chars: text = text[:max_chars] + "...(trimmed)"
group = grouped.setdefault( path, { "document": Path(path).name, "headings": [], "clauses": [], "snippets": [], }, ) if heading and heading not in group["headings"] and len(group["headings"]) < 120: group["headings"].append(heading) for clause in clauses: if clause not in group["clauses"] and len(group["clauses"]) < 120: group["clauses"].append(clause) if text and len(group["snippets"]) < 30: group["snippets"].append(text)
overview: List[Dict[str, Any]] = [] for data in grouped.values(): overview.append( { "document": data["document"], "headings": data["headings"][:50], "clauses": data["clauses"][:50], "snippets": data["snippets"], } ) return overview[:30]
async def _retrieve_candidates( references: List[str], reference_context: List[Dict[str, Any]], store: EmbeddingStore, target_metadata: Dict[str, Any], max_chars: int,) -> Dict[str, List[Dict[str, Any]]]: if not references: return {} if store.is_empty: return {ref: [] for ref in references}
context_lookup = {entry["reference"]: entry for entry in reference_context} embed_inputs = [ _compose_reference_embedding_input( reference, context_lookup.get(reference, {}), target_metadata, max_chars, ) for reference in references ] vectors = await embed_texts(embed_inputs) results: Dict[str, List[Dict[str, Any]]] = {} for reference, vector in zip(references, vectors): candidates = store.query(vector, top_k=8) results[reference] = candidates return results
def _compose_reference_embedding_input( reference: str, context_entry: Dict[str, Any], target_metadata: Dict[str, Any], max_chars: int,) -> str: lines = [reference] target_standard = target_metadata.get("target_standard") if target_standard: lines.append(f"Target standard family: {target_standard}") paragraphs = context_entry.get("paragraphs") or [] for paragraph in paragraphs[:2]: text = paragraph.get("text") if text: lines.append(text) tables = context_entry.get("tables") or [] if tables: refs = tables[0].get("references") or [] if refs: lines.append("Table references: " + ", ".join(refs)) text = "\n".join(filter(None, lines)) if len(text) > max_chars: text = text[:max_chars] + "...(trimmed)" return text123from .agent import ValidationAgent
__all__ = ["ValidationAgent"]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596from __future__ import annotations
import jsonfrom typing import Any, Dict, List
from ..shared.base import AgentContext, BaseAgent
class ValidationAgent(BaseAgent): name = "validation-agent"
async def run(self, context: AgentContext) -> Dict[str, Any]: await self.emit_debug("Running compliance checks.")
extraction = context.payload.get("extraction_result") or {} mapping = context.payload.get("mapping_result") or {} rewrite_plan = context.payload.get("rewrite_plan") or {}
if not mapping or not rewrite_plan: return { "issues": [], "verdict": "pending", "notes": "Validation skipped because mapping or rewrite data was unavailable.", }
schema = { "name": "ValidationReport", "schema": { "type": "object", "properties": { "verdict": { "type": "string", "enum": ["approved", "changes_requested", "pending"], }, "issues": { "type": "array", "items": { "type": "object", "properties": { "description": {"type": "string"}, "severity": { "type": "string", "enum": ["info", "low", "medium", "high"], }, "related_reference": {"type": "string"}, }, "required": ["description", "severity"], "additionalProperties": False, }, "default": [], }, "notes": {"type": "string"}, }, "required": ["verdict", "issues"], "additionalProperties": False, }, }
mapping_snippet = json.dumps(mapping.get("mappings", [])[:20], ensure_ascii=False) rewrite_snippet = json.dumps(rewrite_plan.get("replacements", [])[:20], ensure_ascii=False) references = extraction.get("references", [])
messages = [ { "role": "system", "content": ( "You are a senior structural engineer reviewing a standards migration. " "Evaluate whether the proposed replacements maintain compliance and highlight any risks." ), }, { "role": "user", "content": ( f"Session: {context.session_id}\n" f"Detected references: {references}\n" f"Mappings sample: {mapping_snippet}\n" f"Rewrite sample: {rewrite_snippet}" ), }, ]
model = self.settings.openai_model_mapping
try: result = await self.call_openai_json(model=model, messages=messages, schema=schema) await self.emit_debug("Validation agent completed via OpenAI.") if not result.get("notes"): result["notes"] = "Review generated by automated validation agent." return result except Exception as exc: # noqa: BLE001 await self.emit_debug(f"Validation agent failed: {exc}") return { "issues": [], "verdict": "pending", "notes": f"Validation failed: {exc}", }12345678910# Common Domain Assets
Cross-cutting models, schemas, and events shared between backend services, agents, and workers.
## Structure
- `models/` - Core domain entities and DTOs reused across services.- `utils/` - Reusable helper functions (text normalization, ID generation).- `schemas/` - JSON schema definitions for agent input/output contracts.- `events/` - Event payload definitions for pipeline instrumentation.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798from __future__ import annotations
import jsonfrom dataclasses import dataclassfrom pathlib import Pathfrom typing import Any, List, Sequence, Tuple
import numpy as np
def _resolve_embedding_root() -> Path: try: from server.app.core.config import get_settings # local import to avoid hard dependency at import time
storage_dir = get_settings().storage_dir except Exception: # noqa: BLE001 storage_dir = Path(__file__).resolve().parents[1] / "storage" return Path(storage_dir) / "embeddings"
def get_session_embedding_path(session_id: str) -> Path: return _resolve_embedding_root() / f"{session_id}.json"
@dataclassclass EmbeddingRecord: vector: List[float] metadata: dict[str, Any]
class EmbeddingStore: def __init__(self, path: Path) -> None: self.path = path self._records: list[EmbeddingRecord] = [] self._matrix: np.ndarray | None = None self._load()
def _load(self) -> None: if not self.path.exists(): return with self.path.open("r", encoding="utf-8") as fh: data = json.load(fh) self._records = [EmbeddingRecord(**item) for item in data]
def save(self) -> None: self.path.parent.mkdir(parents=True, exist_ok=True) with self.path.open("w", encoding="utf-8") as fh: json.dump( [{"vector": rec.vector, "metadata": rec.metadata} for rec in self._records], fh, ensure_ascii=False, indent=2, )
def clear(self) -> None: self._records.clear() self._matrix = None
def extend(self, vectors: Sequence[Sequence[float]], metadatas: Sequence[dict[str, Any]]) -> None: for vector, metadata in zip(vectors, metadatas, strict=True): self._records.append(EmbeddingRecord(list(vector), dict(metadata))) self._matrix = None
@property def is_empty(self) -> bool: return not self._records
def _ensure_matrix(self) -> None: if self._matrix is None and self._records: self._matrix = np.array([rec.vector for rec in self._records], dtype=np.float32)
def query(self, vector: Sequence[float], top_k: int = 5) -> List[Tuple[dict[str, Any], float]]: if self.is_empty: return [] self._ensure_matrix() assert self._matrix is not None matrix = self._matrix vec = np.array(vector, dtype=np.float32) vec_norm = np.linalg.norm(vec) if not np.isfinite(vec_norm) or vec_norm == 0: return [] matrix_norms = np.linalg.norm(matrix, axis=1) scores = matrix @ vec / (matrix_norms * vec_norm + 1e-12) top_k = min(top_k, len(scores)) indices = np.argsort(scores)[::-1][:top_k] results: List[Tuple[dict[str, Any], float]] = [] for idx in indices: score = float(scores[idx]) metadata = self._records[int(idx)].metadata.copy() metadata["score"] = score results.append((metadata, score)) return results
def query_many(self, vectors: Sequence[Sequence[float]], top_k: int = 5) -> List[List[dict[str, Any]]]: return [ [meta for meta, _ in self.query(vector, top_k=top_k)] for vector in vectors ]1234567891011121314151617181920FROM node:20-bookworm
RUN apt-get update \ && apt-get install -y --no-install-recommends python3 python3-venv python3-pip \ && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . /app
RUN python3 -m venv /app/.venv \ && /app/.venv/bin/pip install --upgrade pip \ && /app/.venv/bin/pip install -r server/requirements.txt \ && npm install --prefix frontend
ENV PATH="/app/.venv/bin:${PATH}"
EXPOSE 8000 5173 8765
CMD ["python3", "start-rightcodes.py", "--host", "0.0.0.0", "--port", "8765", "--no-browser"]123456789101112# Documentation Hub
Authoritative documentation for architecture, pipelines, agents, and UI workflows.
## Structure
- `architecture/` - System diagrams, deployment topology, and context views.- `agents/` - Detailed specs of each agent, including prompt design and tool APIs.- `pipelines/` - Pypeflow diagrams, data contracts, and runbooks for each stage.- `standards/` - Reference material and taxonomy notes for supported codes and standards.- `ui/` - Wireframes, component inventories, and interaction design specs.- `specifications/` - Functional requirements, acceptance criteria, and use cases.123456789101112# Orchestrator Agent (Draft)
- **Goal:** Coordinate pipeline stages, persist state transitions, and request human intervention when confidence drops below threshold.- **Inputs:** `document_manifest.json`, latest stage outputs, user session preferences.- **Outputs:** `progress_state.json`, downstream agent invocation plans, notifications/events.- **Tool Hooks:** Worker queue enqueuer, storage manifest writer, validation reporter.
Action items:
1. Define structured prompt schema and guardrails.2. Enumerate tool signatures for queueing, status updates, and failure escalation.3. Align logging with `common/events/` payload definitions.1234567891011# System Context (Draft)
- **Primary Actors:** Engineering consultant (user), Orchestrator Agent, Validation Agent, Export Agent.- **External Systems:** OpenAI APIs, Object storage (S3-compatible), Auth provider (to be determined).- **Key Data Stores:** Session manifest store, document blob storage, telemetry pipeline.
Pending tasks:
1. Complete C4 level 1 context diagram.2. Document trust boundaries (uploaded documents vs generated artefacts).3. Define audit/logging requirements tied to standards compliance.12345678# Pypeflow Overview
> Placeholder: document the end-to-end job graph once the first pipeline prototype lands. Recommended sections:>> 1. High-level mermaid diagram showing ingestion -> extraction -> mapping -> rewrite -> validation -> export.> 2. Stage-by-stage JSON artefact expectations (input/output schemas).> 3. Failure handling and retry strategy per stage.> 4. Hooks for agent overrides and manual approvals.1234567891011121314151617# Review Workflow (Draft)
Stages:
1. Upload wizard captures Word report, one or more standards PDFs, and mapping intent.2. Diff workspace highlights replaced clauses with inline confidence tags.3. Validation dashboard lists outstanding checks, comments, and approval history.
Open questions:
- How should we present clause-level provenance (link back to PDF page)?- Do we surface agent rationales verbatim or summarised?- What accessibility requirements should inform colour coding and indicators?
UI notes:
- Show upload progress and pipeline activity log so users know when each processing stage completes.1VITE_API_BASE_URL=http://localhost:8000/api1234567891011121314151617# Frontend Module
React/TypeScript single-page app responsible for user interaction and review workflows.
## Structure
- `public/` - Static assets and HTML shell.- `src/components/` - Shared UI components (uploaders, diff panels, status widgets).- `src/pages/` - Route-level containers for upload, review, and export views.- `src/hooks/` - Reusable logic for API access, session state, and polling.- `src/layouts/` - Shell layouts (wizard, review workspace).- `src/state/` - Store configuration (React Query, Zustand, or Redux).- `src/services/` - API clients, WebSocket connectors, and agent progress handlers.- `src/utils/` - Formatting helpers, doc diff utilities, and schema transformers.- `src/types/` - Shared TypeScript declarations.- `tests/` - Component and integration tests with fixtures and mocks.- `config/` - Build-time configuration (Vite/Webpack, env samples).12345678910111213<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>RightCodes</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.tsx"></script> </body></html>12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030{ "name": "rightcodes-frontend", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rightcodes-frontend", "version": "0.1.0", "dependencies": { "@tanstack/react-query": "^5.51.11", "axios": "^1.7.7", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.26.0" }, "devDependencies": { "@types/react": "^18.3.3", "@types/react-dom": "^18.3.3", "@vitejs/plugin-react": "^4.3.1", "typescript": "^5.4.5", "vite": "^5.4.8" } }, "node_modules/@babel/code-frame": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.28.3", "@babel/helpers": "^7.28.4", "@babel/parser": "^7.28.4", "@babel/template": "^7.27.2", "@babel/traverse": "^7.28.4", "@babel/types": "^7.28.4", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/babel" } }, "node_modules/@babel/generator": { "version": "7.28.3", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.28.3", "@babel/types": "^7.28.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.27.2", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-globals": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "license": "MIT", "dependencies": { "@babel/traverse": "^7.27.1", "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { "version": "7.28.3", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", "@babel/traverse": "^7.28.3" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-plugin-utils": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/plugin-transform-react-jsx-self": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/@babel/plugin-transform-react-jsx-source": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/@babel/template": { "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/parser": "^7.27.2", "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.4", "@babel/template": "^7.27.2", "@babel/types": "^7.28.4", "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "aix" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/android-arm": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/android-arm64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/android-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/darwin-arm64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/darwin-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/freebsd-arm64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/freebsd-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-arm": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-arm64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-ia32": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-loong64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-mips64el": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-riscv64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-s390x": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/netbsd-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/openbsd-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/sunos-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "sunos" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/win32-arm64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/win32-ia32": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { "node": ">=12" } }, "node_modules/@esbuild/win32-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { "node": ">=12" } }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "node_modules/@jridgewell/remapping": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.31", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@remix-run/router": { "version": "1.23.0", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.0.tgz", "integrity": "sha512-O3rHJzAQKamUz1fvE0Qaw0xSFqsA/yafi2iqeE0pvdFtCO1viYx8QL6f3Ln/aCCTLxs68SLf0KPM9eSeM8yBnA==", "license": "MIT", "engines": { "node": ">=14.0.0" } }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-beta.27", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", "dev": true, "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.4.tgz", "integrity": "sha512-BTm2qKNnWIQ5auf4deoetINJm2JzvihvGb9R6K/ETwKLql/Bb3Eg2H1FBp1gUb4YGbydMA3jcmQTR73q7J+GAA==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.4.tgz", "integrity": "sha512-P9LDQiC5vpgGFgz7GSM6dKPCiqR3XYN1WwJKA4/BUVDjHpYsf3iBEmVz62uyq20NGYbiGPR5cNHI7T1HqxNs2w==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.4.tgz", "integrity": "sha512-QRWSW+bVccAvZF6cbNZBJwAehmvG9NwfWHwMy4GbWi/BQIA/laTIktebT2ipVjNncqE6GLPxOok5hsECgAxGZg==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.4.tgz", "integrity": "sha512-hZgP05pResAkRJxL1b+7yxCnXPGsXU0fG9Yfd6dUaoGk+FhdPKCJ5L1Sumyxn8kvw8Qi5PvQ8ulenUbRjzeCTw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-freebsd-arm64": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.4.tgz", "integrity": "sha512-xmc30VshuBNUd58Xk4TKAEcRZHaXlV+tCxIXELiE9sQuK3kG8ZFgSPi57UBJt8/ogfhAF5Oz4ZSUBN77weM+mQ==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ] }, "node_modules/@rollup/rollup-freebsd-x64": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.4.tgz", "integrity": "sha512-WdSLpZFjOEqNZGmHflxyifolwAiZmDQzuOzIq9L27ButpCVpD7KzTRtEG1I0wMPFyiyUdOO+4t8GvrnBLQSwpw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.4.tgz", "integrity": "sha512-xRiOu9Of1FZ4SxVbB0iEDXc4ddIcjCv2aj03dmW8UrZIW7aIQ9jVJdLBIhxBI+MaTnGAKyvMwPwQnoOEvP7FgQ==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.4.tgz", "integrity": "sha512-FbhM2p9TJAmEIEhIgzR4soUcsW49e9veAQCziwbR+XWB2zqJ12b4i/+hel9yLiD8pLncDH4fKIPIbt5238341Q==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.4.tgz", "integrity": "sha512-4n4gVwhPHR9q/g8lKCyz0yuaD0MvDf7dV4f9tHt0C73Mp8h38UCtSCSE6R9iBlTbXlmA8CjpsZoujhszefqueg==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.4.tgz", "integrity": "sha512-u0n17nGA0nvi/11gcZKsjkLj1QIpAuPFQbR48Subo7SmZJnGxDpspyw2kbpuoQnyK+9pwf3pAoEXerJs/8Mi9g==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.4.tgz", "integrity": "sha512-0G2c2lpYtbTuXo8KEJkDkClE/+/2AFPdPAbmaHoE870foRFs4pBrDehilMcrSScrN/fB/1HTaWO4bqw+ewBzMQ==", "cpu": [ "loong64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.4.tgz", "integrity": "sha512-teSACug1GyZHmPDv14VNbvZFX779UqWTsd7KtTM9JIZRDI5NUwYSIS30kzI8m06gOPB//jtpqlhmraQ68b5X2g==", "cpu": [ "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.4.tgz", "integrity": "sha512-/MOEW3aHjjs1p4Pw1Xk4+3egRevx8Ji9N6HUIA1Ifh8Q+cg9dremvFCUbOX2Zebz80BwJIgCBUemjqhU5XI5Eg==", "cpu": [ "riscv64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.4.tgz", "integrity": "sha512-1HHmsRyh845QDpEWzOFtMCph5Ts+9+yllCrREuBR/vg2RogAQGGBRC8lDPrPOMnrdOJ+mt1WLMOC2Kao/UwcvA==", "cpu": [ "riscv64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.4.tgz", "integrity": "sha512-seoeZp4L/6D1MUyjWkOMRU6/iLmCU2EjbMTyAG4oIOs1/I82Y5lTeaxW0KBfkUdHAWN7j25bpkt0rjnOgAcQcA==", "cpu": [ "s390x" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.4.tgz", "integrity": "sha512-Wi6AXf0k0L7E2gteNsNHUs7UMwCIhsCTs6+tqQ5GPwVRWMaflqGec4Sd8n6+FNFDw9vGcReqk2KzBDhCa1DLYg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.4.tgz", "integrity": "sha512-dtBZYjDmCQ9hW+WgEkaffvRRCKm767wWhxsFW3Lw86VXz/uJRuD438/XvbZT//B96Vs8oTA8Q4A0AfHbrxP9zw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-openharmony-arm64": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.4.tgz", "integrity": "sha512-1ox+GqgRWqaB1RnyZXL8PD6E5f7YyRUJYnCqKpNzxzP0TkaUh112NDrR9Tt+C8rJ4x5G9Mk8PQR3o7Ku2RKqKA==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "openharmony" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.4.tgz", "integrity": "sha512-8GKr640PdFNXwzIE0IrkMWUNUomILLkfeHjXBi/nUvFlpZP+FA8BKGKpacjW6OUUHaNI6sUURxR2U2g78FOHWQ==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.4.tgz", "integrity": "sha512-AIy/jdJ7WtJ/F6EcfOb2GjR9UweO0n43jNObQMb6oGxkYTfLcnN7vYYpG+CN3lLxrQkzWnMOoNSHTW54pgbVxw==", "cpu": [ "ia32" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.4.tgz", "integrity": "sha512-UF9KfsH9yEam0UjTwAgdK0anlQ7c8/pWPU2yVjyWcF1I1thABt6WXE47cI71pGiZ8wGvxohBoLnxM04L/wj8mQ==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.4.tgz", "integrity": "sha512-bf9PtUa0u8IXDVxzRToFQKsNCRz9qLYfR/MpECxl4mRoWYjAeFjgxj1XdZr2M/GNVpT05p+LgQOHopYDlUu6/w==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@tanstack/query-core": { "version": "5.90.3", "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.3.tgz", "integrity": "sha512-HtPOnCwmx4dd35PfXU8jjkhwYrsHfuqgC8RCJIwWglmhIUIlzPP0ZcEkDAc+UtAWCiLm7T8rxeEfHZlz3hYMCA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" } }, "node_modules/@tanstack/react-query": { "version": "5.90.3", "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.90.3.tgz", "integrity": "sha512-i/LRL6DtuhG6bjGzavIMIVuKKPWx2AnEBIsBfuMm3YoHne0a20nWmsatOCBcVSaT0/8/5YFjNkebHAPLVUSi0Q==", "license": "MIT", "dependencies": { "@tanstack/query-core": "5.90.3" }, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { "react": "^18 || ^19" } }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "node_modules/@types/babel__generator": { "version": "7.27.0", "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { "version": "7.4.4", "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__traverse": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.28.2" } }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, "node_modules/@types/prop-types": { "version": "15.7.15", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", "dev": true, "license": "MIT" }, "node_modules/@types/react": { "version": "18.3.26", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.26.tgz", "integrity": "sha512-RFA/bURkcKzx/X9oumPG9Vp3D3JUgus/d0b67KB0t5S/raciymilkOa66olh78MUI92QLbEJevO7rvqU/kjwKA==", "dev": true, "license": "MIT", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { "version": "18.3.7", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", "dev": true, "license": "MIT", "peerDependencies": { "@types/react": "^18.0.0" } }, "node_modules/@vitejs/plugin-react": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.28.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.27", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT" }, "node_modules/axios": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "node_modules/baseline-browser-mapping": { "version": "2.8.16", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.16.tgz", "integrity": "sha512-OMu3BGQ4E7P1ErFsIPpbJh0qvDudM/UuJeHgkAvfWe+0HFJCXh+t/l8L6fVLR55RI/UbKrVLnAXZSVwd9ysWYw==", "dev": true, "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" } }, "node_modules/browserslist": { "version": "4.26.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", "dev": true, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/browserslist" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "MIT", "dependencies": { "baseline-browser-mapping": "^2.8.9", "caniuse-lite": "^1.0.30001746", "electron-to-chromium": "^1.5.227", "node-releases": "^2.0.21", "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/caniuse-lite": { "version": "1.0.30001750", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001750.tgz", "integrity": "sha512-cuom0g5sdX6rw00qOoLNSFCJ9/mYIsuSOA+yzpDw8eopiFqcVwQvZHqov0vmEighRxX++cfC0Vg1G+1Iy/mSpQ==", "dev": true, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/browserslist" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "CC-BY-4.0" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, "engines": { "node": ">= 0.8" } }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, "license": "MIT" }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "dev": true, "license": "MIT" }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" }, "engines": { "node": ">=6.0" }, "peerDependenciesMeta": { "supports-color": { "optional": true } } }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/electron-to-chromium": { "version": "1.5.237", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.237.tgz", "integrity": "sha512-icUt1NvfhGLar5lSWH3tHNzablaA5js3HVHacQimfP8ViEBOQv+L7DKEuHdbTZ0SKCO1ogTJTIL1Gwk9S6Qvcg==", "dev": true, "license": "ISC" }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-set-tostringtag": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "engines": { "node": ">=12" }, "optionalDependencies": { "@esbuild/aix-ppc64": "0.21.5", "@esbuild/android-arm": "0.21.5", "@esbuild/android-arm64": "0.21.5", "@esbuild/android-x64": "0.21.5", "@esbuild/darwin-arm64": "0.21.5", "@esbuild/darwin-x64": "0.21.5", "@esbuild/freebsd-arm64": "0.21.5", "@esbuild/freebsd-x64": "0.21.5", "@esbuild/linux-arm": "0.21.5", "@esbuild/linux-arm64": "0.21.5", "@esbuild/linux-ia32": "0.21.5", "@esbuild/linux-loong64": "0.21.5", "@esbuild/linux-mips64el": "0.21.5", "@esbuild/linux-ppc64": "0.21.5", "@esbuild/linux-riscv64": "0.21.5", "@esbuild/linux-s390x": "0.21.5", "@esbuild/linux-x64": "0.21.5", "@esbuild/netbsd-x64": "0.21.5", "@esbuild/openbsd-x64": "0.21.5", "@esbuild/sunos-x64": "0.21.5", "@esbuild/win32-arm64": "0.21.5", "@esbuild/win32-ia32": "0.21.5", "@esbuild/win32-x64": "0.21.5" } }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/follow-redirects": { "version": "1.15.11", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], "license": "MIT", "engines": { "node": ">=4.0" }, "peerDependenciesMeta": { "debug": { "optional": true } } }, "node_modules/form-data": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { "node": ">= 6" } }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-tostringtag": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { "node": ">=6" } }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "license": "MIT", "bin": { "json5": "lib/cli.js" }, "engines": { "node": ">=6" } }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "license": "ISC", "dependencies": { "yallist": "^3.0.2" } }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" } }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, "engines": { "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, "node_modules/node-releases": { "version": "2.0.23", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.23.tgz", "integrity": "sha512-cCmFDMSm26S6tQSDpBCg/NR8NENrVPhAJSf+XbxBG4rPFaaonlEoE9wHQmun+cls499TQGSb7ZyPBRlzgKfpeg==", "dev": true, "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, "node_modules/postcss": { "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "dev": true, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/postcss/" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "MIT", "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, "node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" }, "peerDependencies": { "react": "^18.3.1" } }, "node_modules/react-refresh": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/react-router": { "version": "6.30.1", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.1.tgz", "integrity": "sha512-X1m21aEmxGXqENEPG3T6u0Th7g0aS4ZmoNynhbs+Cn+q+QGTLt+d5IQ2bHAXKzKcxGJjxACpVbnYQSCRcfxHlQ==", "license": "MIT", "dependencies": { "@remix-run/router": "1.23.0" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { "react": ">=16.8" } }, "node_modules/react-router-dom": { "version": "6.30.1", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.1.tgz", "integrity": "sha512-llKsgOkZdbPU1Eg3zK8lCn+sjD9wMRZZPuzmdWWX5SUs8OFkN5HnFVC0u5KMeMaC9aoancFI/KoLuKPqN+hxHw==", "license": "MIT", "dependencies": { "@remix-run/router": "1.23.0", "react-router": "6.30.1" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" } }, "node_modules/rollup": { "version": "4.52.4", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz", "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==", "dev": true, "license": "MIT", "dependencies": { "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.52.4", "@rollup/rollup-android-arm64": "4.52.4", "@rollup/rollup-darwin-arm64": "4.52.4", "@rollup/rollup-darwin-x64": "4.52.4", "@rollup/rollup-freebsd-arm64": "4.52.4", "@rollup/rollup-freebsd-x64": "4.52.4", "@rollup/rollup-linux-arm-gnueabihf": "4.52.4", "@rollup/rollup-linux-arm-musleabihf": "4.52.4", "@rollup/rollup-linux-arm64-gnu": "4.52.4", "@rollup/rollup-linux-arm64-musl": "4.52.4", "@rollup/rollup-linux-loong64-gnu": "4.52.4", "@rollup/rollup-linux-ppc64-gnu": "4.52.4", "@rollup/rollup-linux-riscv64-gnu": "4.52.4", "@rollup/rollup-linux-riscv64-musl": "4.52.4", "@rollup/rollup-linux-s390x-gnu": "4.52.4", "@rollup/rollup-linux-x64-gnu": "4.52.4", "@rollup/rollup-linux-x64-musl": "4.52.4", "@rollup/rollup-openharmony-arm64": "4.52.4", "@rollup/rollup-win32-arm64-msvc": "4.52.4", "@rollup/rollup-win32-ia32-msvc": "4.52.4", "@rollup/rollup-win32-x64-gnu": "4.52.4", "@rollup/rollup-win32-x64-msvc": "4.52.4", "fsevents": "~2.3.2" } }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" } }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { "node": ">=14.17" } }, "node_modules/update-browserslist-db": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", "dev": true, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/browserslist" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "MIT", "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" } }, "node_modules/vite": { "version": "5.4.20", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.20.tgz", "integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" }, "engines": { "node": "^18.0.0 || >=20.0.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, "less": { "optional": true }, "lightningcss": { "optional": true }, "sass": { "optional": true }, "sass-embedded": { "optional": true }, "stylus": { "optional": true }, "sugarss": { "optional": true }, "terser": { "optional": true } } }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true, "license": "ISC" } }}12345678910111213141516171819202122232425{ "name": "rightcodes-frontend", "version": "0.1.0", "private": true, "type": "module", "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview" }, "dependencies": { "@tanstack/react-query": "^5.51.11", "axios": "^1.7.7", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.26.0" }, "devDependencies": { "@types/react": "^18.3.3", "@types/react-dom": "^18.3.3", "@vitejs/plugin-react": "^4.3.1", "typescript": "^5.4.5", "vite": "^5.4.8" }}12345678910111213<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>RightCodes</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.tsx"></script> </body></html>12345678910111213141516171819202122232425262728293031323334import { BrowserRouter, NavLink, Route, Routes } from "react-router-dom";import SessionsPage from "./pages/SessionsPage";import PresetsPage from "./pages/PresetsPage";import PresetEditPage from "./pages/PresetEditPage";import ObservatoryPage from "./pages/ObservatoryPage";
export default function App() { return ( <BrowserRouter> <div className="app-shell"> <header> <h1>RightCodes Converter</h1> <p>Upload reports, review AI-assisted updates, and export revised documents.</p> <nav className="primary-nav"> <NavLink to="/" end> Sessions </NavLink> <NavLink to="/presets">Presets</NavLink> <NavLink to="/observatory">Observatory</NavLink> </nav> </header> <main> <Routes> <Route path="/" element={<SessionsPage />} /> <Route path="/presets" element={<PresetsPage />} /> <Route path="/presets/:presetId/edit" element={<PresetEditPage />} /> <Route path="/observatory" element={<ObservatoryPage />} /> </Routes> </main> <footer>RightCodes {new Date().getFullYear()}</footer> </div> </BrowserRouter> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193import { useState } from "react";import { Link } from "react-router-dom";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { createPreset, deletePreset, fetchPresets } from "../services/api";import type { StandardsPreset } from "../types/session";
export default function PresetManager() { const queryClient = useQueryClient(); const { data: presets = [], isLoading, isError, error } = useQuery({ queryKey: ["presets"], queryFn: fetchPresets, refetchInterval: (currentPresets) => Array.isArray(currentPresets) && currentPresets.some((preset) => preset.status === "processing") ? 2000 : false, });
const [name, setName] = useState(""); const [description, setDescription] = useState(""); const [files, setFiles] = useState<File[]>([]);
const createPresetMutation = useMutation({ mutationFn: createPreset, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["presets"] }); resetForm(); }, onError: (err: unknown) => { alert(`Preset creation failed: ${(err as Error).message}`); }, });
const deletePresetMutation = useMutation({ mutationFn: (id: string) => deletePreset(id), onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["presets"] }); }, onError: (err: unknown) => { alert(`Preset deletion failed: ${(err as Error).message}`); }, });
const resetForm = () => { setName(""); setDescription(""); setFiles([]); const fileInput = document.getElementById("preset-standards-input") as HTMLInputElement | null; if (fileInput) { fileInput.value = ""; } };
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => { event.preventDefault(); if (!files.length) { alert("Select at least one PDF to build a preset."); return; } createPresetMutation.mutate({ name, description: description || undefined, files, }); };
const handleDelete = (preset: StandardsPreset) => { if (!window.confirm(`Delete preset "${preset.name}"? This cannot be undone.`)) { return; } deletePresetMutation.mutate(preset.id); };
return ( <section className="card"> <h2>Manage Standards Presets</h2> <p className="muted"> Reuse commonly referenced standards without re-uploading them for every session. </p> <form className="stacked" onSubmit={handleSubmit}> <label className="field"> <span>Preset Name</span> <input value={name} onChange={(event) => setName(event.target.value)} required /> </label> <label className="field"> <span>Description (optional)</span> <input value={description} onChange={(event) => setDescription(event.target.value)} /> </label> <label className="field"> <span>Preset Standards PDFs</span> <input id="preset-standards-input" type="file" accept=".pdf" multiple onChange={(event) => setFiles(Array.from(event.target.files ?? []))} /> <small> {files.length ? `${files.length} file(s) selected` : "Select one or more PDF references."} </small> </label> <button type="submit" disabled={createPresetMutation.isPending}> {createPresetMutation.isPending ? "Creating preset..." : "Save Preset"} </button> {createPresetMutation.isError && ( <p className="error">Preset creation failed: {(createPresetMutation.error as Error).message}</p> )} {createPresetMutation.isSuccess && ( <p className="success"> Preset queued for processing. Progress will appear below shortly. </p> )} </form>
<div className="preset-list"> <h3>Saved Presets</h3> {isLoading && <p className="muted">Loading presets...</p>} {isError && <p className="error">Failed to load presets: {(error as Error).message}</p>} {!isLoading && !presets.length && <p className="muted">No presets created yet.</p>} {presets.length > 0 && ( <ul> {presets.map((preset: StandardsPreset) => { const totalDocs = preset.total_count || preset.document_count || 0; const processed = Math.min(preset.processed_count || 0, totalDocs); const progressPercent = totalDocs ? Math.min(100, Math.round((processed / totalDocs) * 100)) : preset.status === "ready" ? 100 : 0; const nextDoc = Math.min(processed + 1, totalDocs); return ( <li key={preset.id}> <div className="preset-header"> <div> <strong>{preset.name}</strong> <p className="muted"> {preset.document_count} file{preset.document_count === 1 ? "" : "s"} · Updated{" "} {new Date(preset.updated_at).toLocaleString()} </p> {preset.description && <p className="muted">{preset.description}</p>} </div> <div className="preset-status"> {preset.status === "ready" && <span className="status-ready">Ready</span>} {preset.status === "processing" && ( <span className="status-processing"> Processing {processed}/{totalDocs} </span> )} {preset.status === "failed" && ( <span className="status-failed"> Failed{preset.last_error ? `: ${preset.last_error}` : ""} </span> )} </div> </div> {preset.status === "processing" && ( <div className="progress-block"> <div className="linear-progress"> <div className="linear-progress-fill" style={{ width: `${progressPercent}%` }} /> </div> <p className="muted"> Currently processing document {nextDoc} of {totalDocs}. </p> </div> )} <div className="muted preset-docs"> {preset.documents.map((doc) => doc.split(/[/\\]/).pop() ?? doc).join(", ")} </div> <div className="preset-actions"> <Link className="ghost-button" to={`/presets/${preset.id}/edit`}> Edit </Link> <button type="button" className="ghost-button danger" onClick={() => handleDelete(preset)} disabled={deletePresetMutation.isPending || preset.status === "processing"} > Delete </button> </div> </li> ); })} </ul> )} </div> </section> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578import { useEffect, useState } from "react";import { useQuery } from "@tanstack/react-query";import { fetchSessionById } from "../services/api";import type { Session, SessionSummary } from "../types/session";
interface DocParse { path: string; paragraphs: Array<{ index: number; text: string; style?: string | null; heading_level?: number | null; references?: string[] }>; tables: Array<{ index: number; rows: string[][]; references?: string[] }>; summary?: Record<string, unknown>;}
interface StandardsParseEntry { path: string; summary?: Record<string, unknown>; chunks?: Array<{ page_number: number; chunk_index: number; text: string; heading?: string | null; clause_numbers?: string[]; references?: string[]; is_ocr?: boolean; }>;}
interface ExtractionResult { document_summary?: string; sections?: Array<{ paragraph_index: number; text: string; references?: string[] }>; tables?: Array<{ table_index: number; summary: string; references?: string[] }>; references?: string[]; notes?: string;}
interface MappingResult { mappings?: Array<{ source_reference: string; source_context?: string; target_reference: string; target_clause?: string; target_summary?: string; confidence?: number; rationale?: string; }>; unmapped_references?: string[]; notes?: string;}
interface RewritePlan { replacements?: Array<{ paragraph_index: number; original_text: string; updated_text: string; applied_mapping: string; change_reason?: string; }>; notes?: string;}
interface ValidationReport { issues?: Array<{ description?: string; severity?: string }>; verdict?: string; notes?: string;}
interface ExportManifest { export_path?: string | null; notes?: string; replacement_count?: number;}
interface SessionDetailsProps { session: SessionSummary | null;}
export default function SessionDetails({ session }: SessionDetailsProps) { if (!session) { return <div className="card">Select a session to inspect its progress.</div>; }
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL ?? "http://localhost:8000/api"; const partialSession = session as Partial<Session>; const summaryStandards = Array.isArray(partialSession.standards_docs) ? [...partialSession.standards_docs] : []; const summaryLogs = Array.isArray(partialSession.logs) ? [...partialSession.logs] : []; const summaryMetadata = partialSession.metadata && typeof partialSession.metadata === "object" ? { ...(partialSession.metadata as Record<string, unknown>) } : {}; const normalizedSummary: Session = { ...session, standards_docs: summaryStandards, logs: summaryLogs, metadata: summaryMetadata, }; const sessionQuery = useQuery({ queryKey: ["session", session.id], queryFn: () => fetchSessionById(session.id), enabled: Boolean(session?.id), refetchInterval: (data) => data && ["review", "completed", "failed"].includes(data.status) ? false : 2000, placeholderData: () => normalizedSummary, });
const latest = sessionQuery.data ?? normalizedSummary; const standardsDocs = Array.isArray(latest.standards_docs) ? latest.standards_docs : []; const standardNames = standardsDocs.map((path) => path.split(/[/\\]/).pop() ?? path); const activityLogs = Array.isArray(latest.logs) ? latest.logs : []; const inFlight = !["review", "completed", "failed"].includes(latest.status);
useEffect(() => { if (sessionQuery.data) { console.log(`[Session ${sessionQuery.data.id}] status: ${sessionQuery.data.status}`); } }, [sessionQuery.data?.id, sessionQuery.data?.status]);
const metadata = (latest.metadata ?? {}) as Record<string, unknown>; const docParse = metadata.doc_parse as DocParse | undefined; const standardsParse = metadata.standards_parse as StandardsParseEntry[] | undefined; const extractionResult = metadata.extraction_result as ExtractionResult | undefined; const mappingResult = metadata.mapping_result as MappingResult | undefined; const rewritePlan = metadata.rewrite_plan as RewritePlan | undefined; const validationReport = metadata.validation_report as ValidationReport | undefined; const exportManifest = metadata.export_manifest as ExportManifest | undefined; const exportDownloadUrl = exportManifest?.export_path !== undefined ? `${apiBaseUrl}/sessions/${latest.id}/export` : null;
const docSummary = docParse?.summary as | { paragraph_count?: number; table_count?: number; reference_count?: number } | undefined;
const standardsProgress = metadata.standards_ingest_progress as | { total?: number; processed?: number; current_file?: string; cached_count?: number; parsed_count?: number; completed?: boolean; } | undefined; const standardsProgressFile = standardsProgress?.current_file?.split(/[/\\]/).pop() ?? undefined; const standardsProgressTotal = typeof standardsProgress?.total === "number" ? standardsProgress.total : undefined; const standardsProgressProcessed = standardsProgressTotal !== undefined ? Math.min( typeof standardsProgress?.processed === "number" ? standardsProgress.processed : 0, standardsProgressTotal ) : undefined; const standardsCachedCount = typeof standardsProgress?.cached_count === "number" ? standardsProgress.cached_count : undefined; const standardsParsedCount = typeof standardsProgress?.parsed_count === "number" ? standardsProgress.parsed_count : undefined; const pipelineProgress = metadata.pipeline_progress as | { total?: number; current_index?: number; stage?: string | null; status?: string; } | undefined; const pipelineStageLabel = pipelineProgress?.stage ? pipelineProgress.stage .split("_") .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) .join(" ") : undefined; const pipelineStageStatus = pipelineProgress?.status ? pipelineProgress.status.charAt(0).toUpperCase() + pipelineProgress.status.slice(1) : undefined; const presetMetadata = Array.isArray(metadata.presets) ? (metadata.presets as Array<{ id?: string; name?: string | null; documents?: string[] }>) : []; const presetNames = presetMetadata .map((item) => item?.name || item?.id || "") .filter((value) => Boolean(value)) as string[]; const presetDocTotal = presetMetadata.reduce( (acc, item) => acc + (Array.isArray(item?.documents) ? item.documents.length : 0), 0 );
const [showAllMappings, setShowAllMappings] = useState(false); const [showAllReplacements, setShowAllReplacements] = useState(false);
const sections = extractionResult?.sections ?? []; const sectionsPreview = sections.slice(0, 6);
const mappingLimit = 6; const mappings = mappingResult?.mappings ?? []; const mappingsToDisplay = showAllMappings ? mappings : mappings.slice(0, mappingLimit);
const replacementLimit = 6; const replacements = rewritePlan?.replacements ?? []; const replacementsToDisplay = showAllReplacements ? replacements : replacements.slice(0, replacementLimit);
const tableReplacements = rewritePlan?.table_replacements ?? []; const changeLog = rewritePlan?.change_log ?? [];
return ( <div className="card"> <div className="card-header"> <h2>Session Overview</h2> <div className="header-actions"> {sessionQuery.isFetching && <span className="muted text-small">Updating...</span>} <button type="button" className="ghost-button" onClick={() => sessionQuery.refetch()} disabled={sessionQuery.isFetching} > {sessionQuery.isFetching ? "Refreshing..." : "Refresh now"} </button> </div> </div> {inFlight && ( <div className="progress-block"> <div className="progress-bar"> <div className="progress-bar-fill" /> </div> <p className="muted">Processing pipeline... refreshing every 2s.</p> {pipelineProgress?.total ? ( <p className="muted"> Pipeline stages:{" "} {Math.min(pipelineProgress.current_index ?? 0, pipelineProgress.total)} /{" "} {pipelineProgress.total} {pipelineStageLabel ? ` — ${pipelineStageLabel}` : ""} {pipelineStageStatus ? ` (${pipelineStageStatus})` : ""} </p> ) : null} {standardsProgressTotal !== undefined ? ( <p className="muted"> Standards PDFs: {standardsProgressProcessed ?? 0} / {standardsProgressTotal} {standardsProgressFile ? ` — ${standardsProgressFile}` : ""} {standardsCachedCount !== undefined || standardsParsedCount !== undefined ? ( <> {" "}(cached {standardsCachedCount ?? 0}, parsed {standardsParsedCount ?? 0}) </> ) : null} </p> ) : null} </div> )} <dl className="details-grid"> <div> <dt>Status</dt> <dd>{latest.status}</dd> </div> <div> <dt>Created</dt> <dd>{new Date(latest.created_at).toLocaleString()}</dd> </div> <div> <dt>Updated</dt> <dd>{new Date(latest.updated_at).toLocaleString()}</dd> </div> <div> <dt>Origin</dt> <dd>{latest.target_standard}</dd> </div> <div> <dt>Destination</dt> <dd>{latest.destination_standard}</dd> </div> {standardNames.length > 0 && ( <div> <dt>Standards PDFs</dt> <dd>{standardNames.join(", ")}</dd> </div> )} {presetNames.length ? ( <div> <dt>Preset</dt> <dd> {presetNames.join(", ")} {presetDocTotal ? ` (${presetDocTotal} file${presetDocTotal === 1 ? "" : "s"})` : ""} </dd> </div> ) : null} </dl> {latest.status === "review" && ( <div className="notice success"> Pipeline completed. Review the AI change set and validation notes next. </div> )} {latest.last_error && ( <p className="error"> <strong>Last error:</strong> {latest.last_error} </p> )} <div className="log-panel"> <h3>Activity Log</h3> {activityLogs.length ? ( <ul> {activityLogs.map((entry, index) => ( <li key={`${entry}-${index}`}>{entry}</li> ))} </ul> ) : ( <p className="muted">No activity recorded yet.</p> )} </div>
{docParse && ( <div className="section-card"> <h3>Document Parsing</h3> <p className="muted"> Analysed {docSummary?.paragraph_count ?? docParse.paragraphs.length} paragraphs and{" "} {docSummary?.table_count ?? docParse.tables.length} tables. </p> <ul className="section-list"> {docParse.paragraphs.slice(0, 5).map((paragraph) => ( <li key={paragraph.index}> <strong>Paragraph {paragraph.index}:</strong> {paragraph.text} {paragraph.references?.length ? ( <span className="muted"> — refs: {paragraph.references.join(", ")}</span> ) : null} </li> ))} </ul> </div> )}
{standardsParse && standardsParse.length > 0 && ( <div className="section-card"> <h3>Standards Corpus</h3> <ul className="section-list"> {standardsParse.slice(0, 4).map((entry) => { const name = entry.path.split(/[/\\]/).pop() ?? entry.path; const summary = entry.summary as | { chunk_count?: number; reference_count?: number; ocr_chunk_count?: number } | undefined; const chunkCount = summary?.chunk_count ?? entry.chunks?.length ?? 0; const ocrChunkCount = summary?.ocr_chunk_count ?? entry.chunks?.filter((chunk) => chunk.is_ocr)?.length ?? 0; return ( <li key={entry.path}> <strong>{name}</strong> - {chunkCount} chunks analysed {ocrChunkCount ? ( <span className="muted"> {" "} ({ocrChunkCount} OCR supplement{ocrChunkCount === 1 ? "" : "s"}) </span> ) : null} </li> ); })} </ul> </div> )}
{extractionResult && ( <div className="section-card"> <h3>Extraction Summary</h3> {extractionResult.document_summary && ( <p>{extractionResult.document_summary}</p> )} {extractionResult.references && extractionResult.references.length ? ( <p className="muted"> References detected: {extractionResult.references.slice(0, 20).join(", ")} {extractionResult.references.length > 20 ? "..." : ""} </p> ) : null} {sectionsPreview.length ? ( <ul className="section-list"> {sectionsPreview.map((section) => ( <li key={section.paragraph_index}> <strong>Paragraph {section.paragraph_index}:</strong> {section.text} </li> ))} </ul> ) : null} {extractionResult.notes && <p className="muted">{extractionResult.notes}</p>} </div> )}
{mappingResult && ( <div className="section-card"> <h3>Reference Mapping</h3> {mappings.length ? ( <> <p className="muted"> Showing {mappingsToDisplay.length} of {mappings.length} mappings. </p> <ul className="section-list"> {mappingsToDisplay.map((mapping, idx) => { const cappedConfidence = typeof mapping.confidence === "number" ? Math.round(Math.min(Math.max(mapping.confidence, 0), 1) * 100) : null; return ( <li key={`${mapping.source_reference}-${idx}`}> <strong>{mapping.source_reference}</strong>{" -> "}{mapping.target_reference} {cappedConfidence !== null && ( <span className="muted"> (confidence {cappedConfidence}%)</span> )} {mapping.target_clause && ( <div className="muted">Clause: {mapping.target_clause}</div> )} {mapping.rationale && ( <div className="muted">Reason: {mapping.rationale}</div> )} </li> ); })} </ul> {mappings.length > mappingLimit && ( <button type="button" className="ghost-button" onClick={() => setShowAllMappings((prev) => !prev)} > {showAllMappings ? "Show fewer" : `Show all ${mappings.length}`} </button> )} </> ) : ( <p className="muted"> {mappingResult.notes ?? "No mapping actions recorded."} </p> )} </div> )}
{rewritePlan && ( <div className="section-card"> <h3>Rewrite Plan</h3> {replacements.length ? ( <> <p className="muted"> Showing {replacementsToDisplay.length} of {replacements.length} replacements. </p> <ul className="section-list"> {replacementsToDisplay.map((replacement, idx) => { const appliedMappings = Array.isArray(replacement.applied_mappings) && replacement.applied_mappings.length ? replacement.applied_mappings : replacement.applied_mapping ? [replacement.applied_mapping] : []; return ( <li key={`${replacement.paragraph_index}-${idx}`}> <strong>Paragraph {replacement.paragraph_index}</strong> <div className="diff-block"> <div> <span className="muted">Original:</span> {replacement.original_text} </div> <div> <span className="muted">Updated:</span> {replacement.updated_text} </div> {appliedMappings.length ? ( <div className="muted">Mapping: {appliedMappings.join(", ")}</div> ) : null} {replacement.change_reason && ( <div className="muted">Reason: {replacement.change_reason}</div> )} </div> </li> ); })} </ul> {replacements.length > replacementLimit && ( <button type="button" className="ghost-button" onClick={() => setShowAllReplacements((prev) => !prev)} > {showAllReplacements ? "Show fewer" : `Show all ${replacements.length}`} </button> )} </> ) : ( <p className="muted">{rewritePlan.notes ?? "No rewrite actions required."}</p> )} {tableReplacements.length ? ( <div className="subsection"> <h4>Table Updates</h4> <ul className="section-list"> {tableReplacements.map((table, idx) => { const appliedMappings = Array.isArray(table.applied_mappings) && table.applied_mappings.length ? table.applied_mappings : table.applied_mapping ? [table.applied_mapping] : []; return ( <li key={`${table.table_index}-${idx}`}> <strong>Table {table.table_index}</strong> {appliedMappings.length ? ( <div className="muted">Mapping: {appliedMappings.join(", ")}</div> ) : null} {table.change_reason && <div className="muted">{table.change_reason}</div>} {Array.isArray(table.updated_rows) && table.updated_rows.length ? ( <div className="muted">Updated rows: {table.updated_rows.length}</div> ) : null} </li> ); })} </ul> </div> ) : null} {changeLog.length ? ( <div className="subsection"> <h4>Change Log</h4> <ul className="section-list"> {changeLog.map((entry, idx) => ( <li key={`${entry.reference}-${idx}`}> <strong>{entry.reference}</strong>{" -> "}{entry.target_reference} {entry.affected_paragraphs && entry.affected_paragraphs.length ? ( <span className="muted">{" "}(paragraphs {entry.affected_paragraphs.join(", ")})</span> ) : null} {entry.note && <div className="muted">{entry.note}</div>} </li> ))} </ul> </div> ) : null} {rewritePlan.notes && replacements.length ? ( <p className="muted">{rewritePlan.notes}</p> ) : null} </div> )}
{validationReport && ( <div className="section-card"> <h3>Validation</h3> {validationReport.verdict && ( <p> Verdict: <strong>{validationReport.verdict}</strong> </p> )} {validationReport.issues?.length ? ( <ul className="section-list"> {validationReport.issues.map((issue, idx) => ( <li key={idx}> {issue.description ?? "Issue reported"} {issue.severity && <span className="muted"> ({issue.severity})</span>} </li> ))} </ul> ) : ( <p className="muted">No validation issues reported.</p> )} {validationReport.notes && <p className="muted">{validationReport.notes}</p>} </div> )}
{exportManifest && ( <div className="section-card"> <h3>Export</h3> {exportDownloadUrl ? ( <> <p className="muted"> {exportManifest.notes ?? "Converted document generated using rewrite plan."} </p> {typeof exportManifest.replacement_count === "number" && ( <p className="muted"> {exportManifest.replacement_count} paragraph replacements applied. </p> )} <a className="ghost-button" href={exportDownloadUrl} download> Download DOCX </a> </> ) : ( <p className="muted">{exportManifest.notes ?? "Export not yet generated."}</p> )} </div> )} </div> );}
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859import { useQuery } from "@tanstack/react-query";import { fetchSessions } from "../services/api";import type { SessionSummary } from "../types/session";
interface SessionListProps { selectedId?: string | null; onSelect?: (session: SessionSummary) => void;}
export default function SessionList({ selectedId, onSelect }: SessionListProps) { const { data, isLoading, isError, error } = useQuery({ queryKey: ["sessions"], queryFn: fetchSessions, refetchInterval: 5000, }); const dateFormatter = new Intl.DateTimeFormat(undefined, { dateStyle: "medium", timeStyle: "short", });
if (isLoading) { return <div className="card">Loading sessions...</div>; } if (isError) { return <div className="card error">Failed to load sessions: {(error as Error).message}</div>; }
if (!data?.length) { return <div className="card">No sessions yet. Upload a report to get started.</div>; }
return ( <div className="card"> <h2>Recent Sessions</h2> <p className="muted">Auto-refreshing every 5s.</p> <ul className="session-list"> {data.map((session) => ( <li key={session.id} className={session.id === selectedId ? "selected" : ""} onClick={() => onSelect?.(session)} > <div> <strong>{session.name}</strong> <p> {session.target_standard} {"->"} {session.destination_standard} </p> <p className="muted" title={session.source_doc}> {dateFormatter.format(new Date(session.created_at))} {" · "} {session.source_doc.split(/[/\\]/).pop() ?? session.source_doc} </p> </div> <span className={`status status-${session.status}`}>{session.status}</span> </li> ))} </ul> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189import { useState } from "react";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { fetchPresets, uploadSession } from "../services/api";import type { Session, StandardsPreset } from "../types/session";
interface UploadFormProps { onSuccess?: (session: Session) => void;}
export default function UploadForm({ onSuccess }: UploadFormProps) { const queryClient = useQueryClient(); const [name, setName] = useState(""); const [targetStandard, setTargetStandard] = useState(""); const [destinationStandard, setDestinationStandard] = useState(""); const [file, setFile] = useState<File | null>(null); const [standardsFiles, setStandardsFiles] = useState<File[]>([]); const [selectedPresetId, setSelectedPresetId] = useState<string>("");
const { data: presets = [], isLoading: presetsLoading, isError: presetsError } = useQuery({ queryKey: ["presets"], queryFn: fetchPresets, refetchInterval: (currentPresets) => Array.isArray(currentPresets) && currentPresets.some((preset) => preset.status === "processing") ? 2000 : false, }); const selectedPreset = presets.find((preset) => preset.id === selectedPresetId);
const mutation = useMutation({ mutationFn: uploadSession, onSuccess: (session) => { console.log("Session created:", session); queryClient.invalidateQueries({ queryKey: ["sessions"] }); onSuccess?.(session); resetForm(); }, onError: (error: unknown) => { console.error("Session creation failed:", error); }, });
function resetForm() { setName(""); setTargetStandard(""); setDestinationStandard(""); setFile(null); setStandardsFiles([]); setSelectedPresetId(""); const reportInput = document.getElementById("source-doc-input") as HTMLInputElement | null; if (reportInput) { reportInput.value = ""; } const standardsInput = document.getElementById("standards-doc-input") as HTMLInputElement | null; if (standardsInput) { standardsInput.value = ""; } }
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => { event.preventDefault(); if (!file) { alert("Please select a report to upload."); return; } if (!standardsFiles.length && !selectedPresetId) { alert("Upload at least one standards PDF or choose a preset bundle."); return; } if (selectedPresetId && selectedPreset && selectedPreset.status !== "ready") { alert("The selected preset is still processing. Please wait until it is ready."); return; } mutation.mutate({ name, target_standard: targetStandard, destination_standard: destinationStandard, metadata: {}, sourceFile: file, standardsFiles, standardsPresetId: selectedPresetId || undefined, }); };
return ( <form className="card" onSubmit={handleSubmit}> <h2>Create Conversion Session</h2> <label className="field"> <span>Session Name</span> <input value={name} onChange={(event) => setName(event.target.value)} required /> </label> <label className="field"> <span>Current Standard</span> <input value={targetStandard} onChange={(event) => setTargetStandard(event.target.value)} required /> </label> <label className="field"> <span>Target Standard</span> <input value={destinationStandard} onChange={(event) => setDestinationStandard(event.target.value)} required /> </label> <label className="field"> <span>Word Report</span> <input id="source-doc-input" type="file" accept=".docx" onChange={(event) => setFile(event.target.files?.[0] ?? null)} required /> </label> <label className="field"> <span>New Standards PDFs</span> <input id="standards-doc-input" type="file" accept=".pdf" multiple onChange={(event) => setStandardsFiles(Array.from(event.target.files ?? []))} /> <small> {standardsFiles.length ? `${standardsFiles.length} file(s) selected` : "Select one or more PDF references."} </small> </label> <label className="field"> <span>Saved Standards Preset (optional)</span> <select value={selectedPresetId} onChange={(event) => setSelectedPresetId(event.target.value)} disabled={presetsLoading || !presets.length} > <option value="">Select a preset...</option> {presets.map((preset: StandardsPreset) => ( <option key={preset.id} value={preset.id} disabled={preset.status !== "ready"} > {preset.name} ({preset.document_count} file{preset.document_count === 1 ? "" : "s"}) {preset.status === "processing" ? ` — processing ${preset.processed_count}/${preset.total_count || preset.document_count}` : preset.status === "failed" ? " — failed" : ""} </option> ))} </select> <small> {presetsLoading ? "Loading saved presets..." : presetsError ? "Failed to load presets." : presets.length ? selectedPreset ? selectedPreset.status === "processing" ? `Processing preset ${selectedPreset.processed_count}/${selectedPreset.total_count || selectedPreset.document_count}.` : selectedPreset.status === "failed" ? `Preset failed${selectedPreset.last_error ? `: ${selectedPreset.last_error}` : ""}` : "Optionally reuse a previously parsed standards bundle." : "Optionally reuse a previously parsed standards bundle." : "No presets yet. Create one below."} </small> </label> <button type="submit" disabled={mutation.isPending}> {mutation.isPending ? "Uploading..." : "Start Conversion"} </button> {mutation.isPending && ( <div className="progress-block"> <div className="progress-bar"> <div className="progress-bar-fill" /> </div> <p className="muted">Uploading files and starting pipeline...</p> </div> )} {mutation.isError && ( <p className="error">Upload failed: {(mutation.error as Error).message}</p> )} {mutation.isSuccess && <p className="success">Session created successfully.</p>} </form> );}123456789101112131415import React from "react";import ReactDOM from "react-dom/client";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import App from "./App";import "./styles.css";
const queryClient = new QueryClient();
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( <React.StrictMode> <QueryClientProvider client={queryClient}> <App /> </QueryClientProvider> </React.StrictMode>,);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179import { useEffect, useMemo, useState } from "react";import { useQuery } from "@tanstack/react-query";import { fetchDiagnosticsEvents, fetchDiagnosticsTopology } from "../services/api";import type { DiagnosticsEvent, DiagnosticsNode, DiagnosticsTopology } from "../types/diagnostics";
const EVENT_PULSE_WINDOW_MS = 5000;const EVENTS_LIMIT = 60;
function buildNodeMap(topology?: DiagnosticsTopology): Map<string, DiagnosticsNode> { if (!topology) { return new Map(); } return new Map(topology.nodes.map((node) => [node.id, node]));}
function useActiveNodes(events: DiagnosticsEvent[] | undefined, tick: number): Set<string> { return useMemo(() => { const active = new Set<string>(); if (!events) { return active; } const now = Date.now(); for (const event of events) { if (!event.node_id) { continue; } const timestamp = Date.parse(event.timestamp); if (Number.isNaN(timestamp)) { continue; } if (now - timestamp <= EVENT_PULSE_WINDOW_MS) { active.add(event.node_id); } } return active; }, [events, tick]);}
const timeFormatter = new Intl.DateTimeFormat(undefined, { hour: "2-digit", minute: "2-digit", second: "2-digit",});
export default function ObservatoryPage() { const [timeTick, setTimeTick] = useState(Date.now()); useEffect(() => { const id = window.setInterval(() => setTimeTick(Date.now()), 1000); return () => window.clearInterval(id); }, []);
const { data: topology, isLoading: topologyLoading, isError: topologyError, error: topologyErrorDetails, } = useQuery({ queryKey: ["diagnostics", "topology"], queryFn: fetchDiagnosticsTopology, refetchInterval: 15000, });
const { data: eventsData, isLoading: eventsLoading, isError: eventsError, error: eventsErrorDetails, } = useQuery({ queryKey: ["diagnostics", "events"], queryFn: () => fetchDiagnosticsEvents(EVENTS_LIMIT), refetchInterval: 2000, });
const nodeMap = buildNodeMap(topology); const activeNodes = useActiveNodes(eventsData, timeTick);
const edges = useMemo(() => { if (!topology) { return []; } return topology.edges .map((edge) => { const source = nodeMap.get(edge.source); const target = nodeMap.get(edge.target); if (!source || !target) { return null; } return ( <line key={edge.id} x1={source.position.x} y1={source.position.y} x2={target.position.x} y2={target.position.y} className="observatory-edge" /> ); }) .filter(Boolean) as JSX.Element[]; }, [nodeMap, topology]);
const nodes = useMemo(() => { if (!topology) { return []; } return topology.nodes.map((node) => { const isActive = activeNodes.has(node.id); return ( <g key={node.id} className={`observatory-node group-${node.group}`}> <circle cx={node.position.x} cy={node.position.y} r={isActive ? 6 : 4} className={isActive ? "pulse" : undefined} /> <text x={node.position.x} y={node.position.y - 9} textAnchor="middle"> {node.label} </text> </g> ); }); }, [activeNodes, topology]);
return ( <div className="observatory-page"> <div className="observatory-header"> <h2>System Observatory</h2> <p> Visual map of key storage locations, services, and external dependencies. Nodes pulse when recent activity is detected. </p> </div> <div className="observatory-content"> <section className="observatory-graph-card"> <h3>Topology</h3> {topologyLoading ? ( <p className="muted">Loading topology...</p> ) : topologyError ? ( <p className="error">Failed to load topology: {(topologyErrorDetails as Error).message}</p> ) : ( <svg className="observatory-canvas" viewBox="0 0 100 60" preserveAspectRatio="xMidYMid meet"> {edges} {nodes} </svg> )} </section> <aside className="observatory-feed-card"> <h3>Activity Feed</h3> {eventsLoading ? ( <p className="muted">Monitoring events...</p> ) : eventsError ? ( <p className="error">Failed to load events: {(eventsErrorDetails as Error).message}</p> ) : eventsData && eventsData.length ? ( <ul className="observatory-feed"> {eventsData.map((event) => { const timestamp = Date.parse(event.timestamp); const timeString = Number.isNaN(timestamp) ? event.timestamp : timeFormatter.format(new Date(timestamp)); const node = event.node_id ? nodeMap.get(event.node_id) : undefined; return ( <li key={event.id}> <div className="feed-row"> <strong>{node?.label ?? event.node_id ?? "System"}</strong> <span className="muted">{timeString}</span> </div> <div>{event.message}</div> </li> ); })} </ul> ) : ( <p className="muted">No activity detected yet.</p> )} </aside> </div> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202import { useEffect, useState } from "react";import { Link, Navigate, useParams } from "react-router-dom";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { addPresetDocuments, fetchPresetById, removePresetDocument, updatePreset,} from "../services/api";import type { StandardsPreset } from "../types/session";
export default function PresetEditPage() { const { presetId } = useParams<{ presetId: string }>(); const queryClient = useQueryClient();
const { data: preset, isLoading, isError, error, } = useQuery({ queryKey: ["preset", presetId], queryFn: () => fetchPresetById(presetId ?? ""), enabled: Boolean(presetId), refetchInterval: (currentPreset) => currentPreset?.status === "processing" ? 2000 : false, });
const [name, setName] = useState(""); const [description, setDescription] = useState("");
useEffect(() => { if (preset) { setName(preset.name); setDescription(preset.description ?? ""); } }, [preset?.id, preset?.name, preset?.description]);
const updateMutation = useMutation({ mutationFn: (payload: { name?: string; description?: string | null }) => updatePreset(presetId ?? "", payload), onSuccess: (updated) => { queryClient.setQueryData(["preset", presetId], updated); queryClient.invalidateQueries({ queryKey: ["presets"] }); }, onError: (err: unknown) => { alert(`Failed to update preset: ${(err as Error).message}`); }, });
const addDocumentsMutation = useMutation({ mutationFn: (files: File[]) => addPresetDocuments(presetId ?? "", files), onSuccess: (updated) => { queryClient.setQueryData(["preset", presetId], updated); queryClient.invalidateQueries({ queryKey: ["presets"] }); }, onError: (err: unknown) => { alert(`Failed to add documents: ${(err as Error).message}`); }, });
const removeDocumentMutation = useMutation({ mutationFn: (documentPath: string) => removePresetDocument(presetId ?? "", documentPath), onSuccess: (updated) => { queryClient.setQueryData(["preset", presetId], updated); queryClient.invalidateQueries({ queryKey: ["presets"] }); }, onError: (err: unknown) => { alert(`Failed to remove document: ${(err as Error).message}`); }, });
if (!presetId) { return <Navigate to="/presets" replace />; }
const totalDocs = preset?.total_count ?? preset?.document_count ?? 0; const processedDocs = Math.min(preset?.processed_count ?? 0, totalDocs); const progressPercent = totalDocs ? Math.min(100, Math.round((processedDocs / totalDocs) * 100)) : preset?.status === "ready" ? 100 : 0; const nextDoc = Math.min(processedDocs + 1, totalDocs);
const handleSave = (event: React.FormEvent<HTMLFormElement>) => { event.preventDefault(); const trimmedName = name.trim(); if (!trimmedName) { alert("Preset name cannot be empty."); return; } updateMutation.mutate({ name: trimmedName, description: description.trim() || "", }); };
const handleAddFiles = (event: React.ChangeEvent<HTMLInputElement>) => { const files = Array.from(event.target.files ?? []); if (!files.length) { return; } addDocumentsMutation.mutate(files); event.target.value = ""; };
const handleRemoveDocument = (documentPath: string) => { if (!window.confirm("Remove this document from the preset?")) { return; } removeDocumentMutation.mutate(documentPath); };
return ( <div className="page-stack"> <div className="card"> <div className="edit-header"> <div> <h2>Edit Preset</h2> <p className="muted">Update preset metadata and manage the associated PDF files.</p> </div> <Link className="ghost-button" to="/presets"> ← Back to Presets </Link> </div>
{isLoading && <p className="muted">Loading preset details...</p>} {isError && <p className="error">Failed to load preset: {(error as Error).message}</p>} {preset && ( <> <form className="stacked" onSubmit={handleSave}> <label className="field"> <span>Preset Name</span> <input value={name} onChange={(event) => setName(event.target.value)} required /> </label> <label className="field"> <span>Description</span> <input value={description} onChange={(event) => setDescription(event.target.value)} /> </label> <button type="submit" disabled={updateMutation.isPending}> {updateMutation.isPending ? "Saving..." : "Save Changes"} </button> </form>
<div className="preset-status-card"> <p className="muted"> Status: <strong>{preset.status}</strong> {preset.status === "processing" && ( <> {" "} · {processedDocs}/{totalDocs} processed </> )} </p> {preset.last_error && <p className="error">Last error: {preset.last_error}</p>} </div> {preset.status === "processing" && totalDocs > 0 && ( <div className="progress-block"> <div className="linear-progress"> <div className="linear-progress-fill" style={{ width: `${progressPercent}%` }} /> </div> <p className="muted"> Currently parsing document {nextDoc} of {totalDocs}. </p> </div> )}
<div className="card subsection"> <h3>Documents</h3> {preset.documents.length ? ( <ul className="document-list"> {preset.documents.map((doc) => ( <li key={doc} className="document-item"> <span>{doc.split(/[/\\]/).pop() ?? doc}</span> <button type="button" className="ghost-button danger" onClick={() => handleRemoveDocument(doc)} disabled={removeDocumentMutation.isPending || preset.status === "processing"} > Remove </button> </li> ))} </ul> ) : ( <p className="muted">No documents attached yet.</p> )} <label className="field"> <span>Add Additional PDFs</span> <input type="file" accept=".pdf" multiple onChange={handleAddFiles} /> {addDocumentsMutation.isPending && <p className="muted">Uploading and parsing...</p>} </label> </div> </> )} </div> </div> );}
123456789import PresetManager from "../components/PresetManager";
export default function PresetsPage() { return ( <div className="page-stack"> <PresetManager /> </div> );}12345678910111213141516171819import { useState } from "react";import UploadForm from "../components/UploadForm";import SessionDetails from "../components/SessionDetails";import SessionList from "../components/SessionList";import type { Session, SessionSummary } from "../types/session";
export default function SessionsPage() { const [selectedSession, setSelectedSession] = useState<Session | SessionSummary | null>(null);
return ( <div className="grid"> <div> <UploadForm onSuccess={setSelectedSession} /> <SessionDetails session={selectedSession} /> </div> <SessionList selectedId={selectedSession?.id ?? null} onSelect={setSelectedSession} /> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113import axios from "axios";import type { CreatePresetPayload, CreateSessionPayload, Session, SessionStatusResponse, SessionSummary, StandardsPreset, UpdatePresetPayload,} from "../types/session";import type { DiagnosticsEvent, DiagnosticsTopology } from "../types/diagnostics";
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL ?? "http://localhost:8000/api";
export async function uploadSession(payload: CreateSessionPayload): Promise<Session> { const formData = new FormData(); formData.append("name", payload.name); formData.append("target_standard", payload.target_standard); formData.append("destination_standard", payload.destination_standard); formData.append("source_doc", payload.sourceFile); (payload.standardsFiles ?? []).forEach((file) => { formData.append("standards_pdfs", file); }); if (payload.standardsPresetId) { formData.append("standards_preset_id", payload.standardsPresetId); } if (payload.metadata) { formData.append("metadata", JSON.stringify(payload.metadata)); }
const response = await axios.post<Session>(`${API_BASE_URL}/sessions`, formData, { headers: { "Content-Type": "multipart/form-data" }, }); return response.data;}
export async function fetchSessions(): Promise<SessionSummary[]> { const response = await axios.get<SessionSummary[]>(`${API_BASE_URL}/sessions`); return response.data;}
export async function fetchSessionById(id: string): Promise<Session> { const response = await axios.get<Session>(`${API_BASE_URL}/sessions/${id}`); return response.data;}
export async function fetchSessionStatus(id: string): Promise<SessionStatusResponse> { const response = await axios.get<SessionStatusResponse>(`${API_BASE_URL}/sessions/${id}/status`); return response.data;}
export async function fetchPresets(): Promise<StandardsPreset[]> { const response = await axios.get<StandardsPreset[]>(`${API_BASE_URL}/presets`); return response.data;}
export async function fetchPresetById(id: string): Promise<StandardsPreset> { const response = await axios.get<StandardsPreset>(`${API_BASE_URL}/presets/${id}`); return response.data;}
export async function createPreset(payload: CreatePresetPayload): Promise<StandardsPreset> { const formData = new FormData(); formData.append("name", payload.name); if (payload.description) { formData.append("description", payload.description); } payload.files.forEach((file) => { formData.append("standards_pdfs", file); });
const response = await axios.post<StandardsPreset>(`${API_BASE_URL}/presets`, formData, { headers: { "Content-Type": "multipart/form-data" }, }); return response.data;}
export async function addPresetDocuments(id: string, files: File[]): Promise<StandardsPreset> { const formData = new FormData(); files.forEach((file) => formData.append("standards_pdfs", file)); const response = await axios.post<StandardsPreset>(`${API_BASE_URL}/presets/${id}/documents`, formData, { headers: { "Content-Type": "multipart/form-data" }, }); return response.data;}
export async function updatePreset(id: string, payload: UpdatePresetPayload): Promise<StandardsPreset> { const response = await axios.patch<StandardsPreset>(`${API_BASE_URL}/presets/${id}`, payload); return response.data;}
export async function deletePreset(id: string): Promise<void> { await axios.delete(`${API_BASE_URL}/presets/${id}`);}
export async function removePresetDocument(id: string, documentPath: string): Promise<StandardsPreset> { const response = await axios.delete<StandardsPreset>(`${API_BASE_URL}/presets/${id}/documents`, { params: { document: documentPath }, }); return response.data;}
export async function fetchDiagnosticsTopology(): Promise<DiagnosticsTopology> { const response = await axios.get<DiagnosticsTopology>(`${API_BASE_URL}/diagnostics/topology`); return response.data;}
export async function fetchDiagnosticsEvents(limit = 50): Promise<DiagnosticsEvent[]> { const response = await axios.get<{ events: DiagnosticsEvent[] }>(`${API_BASE_URL}/diagnostics/events`, { params: { limit }, }); return response.data.events;}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643:root { color-scheme: light; font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; font-weight: 400; color: #0f172a; background-color: #f8fafc;}
* { box-sizing: border-box;}
body { margin: 0;}
a { color: inherit;}
button { font: inherit;}
.app-shell { min-height: 100vh; display: flex; flex-direction: column; padding: 1.5rem; gap: 1.5rem;}
header { display: flex; flex-direction: column; gap: 0.5rem;}
.primary-nav { display: flex; gap: 0.75rem; margin-top: 0.5rem;}
.primary-nav a { color: #1d4ed8; padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid transparent; text-decoration: none; transition: background 0.2s, color 0.2s, border-color 0.2s; font-weight: 600; font-size: 0.9rem;}
.primary-nav a:hover { border-color: #bfdbfe; background: #e0f2fe;}
.primary-nav a.active { background: #1d4ed8; color: #ffffff;}
main { flex: 1;}
.grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem;}
.card { background: #ffffff; padding: 1.25rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); display: flex; flex-direction: column; gap: 0.75rem;}
.field { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; color: #0f172a;}
.field input { padding: 0.5rem 0.75rem; border-radius: 8px; border: 1px solid #cbd5f5; font: inherit;}
.field select { padding: 0.5rem 0.75rem; border-radius: 8px; border: 1px solid #cbd5f5; font: inherit; background: #ffffff;}
button[type="submit"] { background: #1d4ed8; color: #ffffff; border: none; padding: 0.6rem 1rem; border-radius: 8px; cursor: pointer; transition: background 0.2s;}
button[type="submit"]:disabled { background: #93c5fd; cursor: not-allowed;}
.error { color: #b91c1c;}
.success { color: #047857;}
.muted { color: #64748b; font-size: 0.875rem;}
.progress-block { display: flex; flex-direction: column; gap: 0.5rem;}
.progress-bar { position: relative; width: 100%; height: 6px; background: #dbeafe; border-radius: 999px; overflow: hidden;}
.progress-bar-fill { position: absolute; inset: 0; background: linear-gradient(90deg, #1d4ed8, #38bdf8); animation: progress-pulse 1.2s linear infinite;}
@keyframes progress-pulse { 0% { transform: translateX(-50%); } 50% { transform: translateX(0%); } 100% { transform: translateX(100%); }}
.notice { padding: 0.75rem; border-radius: 8px; border: 1px solid transparent;}
.notice.success { background: #ecfdf5; border-color: #bbf7d0; color: #036949;}
.log-panel { display: flex; flex-direction: column; gap: 0.5rem;}
.log-panel ul { margin: 0; padding-left: 1rem; display: flex; flex-direction: column; gap: 0.35rem;}
.log-panel li { font-size: 0.9rem; color: #0f172a;}
.section-card { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 0.6rem;}
.section-card h3 { margin: 0; font-size: 1rem; color: #1e293b;}
.section-list { list-style: disc; margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem;}
.section-list li { color: #0f172a;}
.diff-block { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.35rem; padding-left: 0.5rem; border-left: 2px solid #cbd5f5;}
.field small { font-weight: 400; color: #64748b;}
.session-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem;}
.session-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: border-color 0.2s, background 0.2s;}
.session-list li:hover { border-color: #bfdbfe;}
.session-list li.selected { border-color: #1d4ed8; background: #eff6ff;}
.status { text-transform: uppercase; font-weight: 600; font-size: 0.75rem;}
.status-created,.status-processing { color: #1d4ed8;}
.status-review { color: #0f766e;}
.status-completed { color: #16a34a;}
.status-failed { color: #b91c1c;}
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem;}
.details-grid dt { font-size: 0.75rem; text-transform: uppercase; color: #475569;}
.details-grid dd { margin: 0; font-weight: 600;}
footer { text-align: center; color: #64748b; font-size: 0.875rem;}
@media (max-width: 960px) { .grid { grid-template-columns: 1fr; }}.actions-row { display: flex; justify-content: flex-end;}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem;}
.card-header h2 { margin: 0;}
.header-actions { display: flex; align-items: center; gap: 0.75rem;}
.text-small { font-size: 0.875rem;}
.ghost-button { background: transparent; border: 1px solid #cbd5f5; color: #1d4ed8; padding: 0.4rem 0.8rem; border-radius: 8px; cursor: pointer; transition: background 0.2s, color 0.2s;}
.ghost-button:hover:not(:disabled) { background: #e0f2fe;}
.ghost-button:disabled { color: #94a3b8; cursor: not-allowed;}
.subsection { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem;}
.stacked { display: flex; flex-direction: column; gap: 0.75rem;}
.preset-list ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem;}
.preset-list li { border: 1px solid #e2e8f0; border-radius: 10px; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.35rem;}
.preset-docs { font-size: 0.8rem;}
.preset-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem;}
.ghost-button.danger { border-color: #fca5a5; color: #b91c1c;}
.ghost-button.danger:hover:not(:disabled) { background: #fee2e2;}
.ghost-button.danger:disabled { color: #fca5a5; border-color: #fca5a5;}
.edit-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;}
.document-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem;}
.document-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid #e2e8f0; border-radius: 8px;}
.preset-status-card { margin-top: 1rem; padding: 0.75rem; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc;}
.page-stack { display: flex; flex-direction: column; gap: 1.5rem;}
.preset-header { display: flex; justify-content: space-between; gap: 1rem;}
.preset-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem;}
.status-ready { color: #16a34a; font-weight: 600;}
.status-processing { color: #1d4ed8; font-weight: 600;}
.status-failed { color: #b91c1c; font-weight: 600;}
.linear-progress { width: 100%; height: 6px; border-radius: 999px; background: #dbeafe; overflow: hidden;}
.linear-progress-fill { height: 100%; background: linear-gradient(90deg, #1d4ed8, #38bdf8); transition: width 0.3s ease;}
/* Observatory */.observatory-page { display: flex; flex-direction: column; gap: 1.5rem;}
.observatory-header h2 { margin: 0;}
.observatory-header p { margin: 0.25rem 0 0; color: #475569;}
.observatory-content { display: flex; flex-wrap: wrap; gap: 1.5rem;}
.observatory-graph-card,.observatory-feed-card { background: #ffffff; border-radius: 12px; padding: 1.25rem; box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08); flex: 1 1 320px; min-height: 320px;}
.observatory-graph-card { flex: 2 1 520px; display: flex; flex-direction: column;}
.observatory-canvas { margin-top: 1rem; width: 100%; height: 100%; min-height: 320px; border-radius: 12px; background: radial-gradient(circle at center, #dbeafe, #e2e8f0 70%); padding: 1rem;}
.observatory-edge { stroke: rgba(30, 64, 175, 0.35); stroke-width: 0.8; stroke-linecap: round;}
.observatory-node circle { transform-origin: center; transform-box: fill-box; fill: #1d4ed8; opacity: 0.7; transition: r 0.2s ease, opacity 0.2s ease;}
.observatory-node text { font-size: 3px; fill: #0f172a; pointer-events: none;}
.observatory-node.group-storage circle { fill: #0ea5e9;}
.observatory-node.group-service circle { fill: #16a34a;}
.observatory-node.group-external circle { fill: #f97316;}
.observatory-node circle.pulse { animation: observatory-pulse 1.2s ease-in-out infinite; opacity: 0.95;}
@keyframes observatory-pulse { 0%, 100% { transform: scale(1); opacity: 0.95; } 50% { transform: scale(1.3); opacity: 0.6; }}
.observatory-feed-card { display: flex; flex-direction: column;}
.observatory-feed { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-direction: column; gap: 0.75rem; max-height: 360px; overflow-y: auto;}
.observatory-feed li { padding: 0.75rem; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0;}
.observatory-feed .feed-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.35rem;}
.observatory-feed .feed-row strong { color: #0f172a;}
.observatory-feed .feed-row .muted { font-size: 0.85rem;}123456789101112131415161718192021222324252627export interface DiagnosticsNode { id: string; label: string; group: "storage" | "service" | "external" | string; position: { x: number; y: number }; last_event_at?: string | null;}
export interface DiagnosticsEdge { id: string; source: string; target: string;}
export interface DiagnosticsTopology { nodes: DiagnosticsNode[]; edges: DiagnosticsEdge[];}
export interface DiagnosticsEvent { id: string; timestamp: string; event_type: string; message: string; node_id?: string | null; metadata?: Record<string, unknown>;}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859export interface SessionSummary { id: string; name: string; status: string; created_at: string; updated_at: string; source_doc: string; target_standard: string; destination_standard: string; standards_count: number; last_error?: string | null;}
export interface Session extends SessionSummary { standards_docs: string[]; logs: string[]; metadata: Record<string, unknown>;}
export interface CreateSessionPayload { name: string; target_standard: string; destination_standard: string; metadata?: Record<string, unknown>; sourceFile: File; standardsFiles?: File[]; standardsPresetId?: string | null;}
export interface SessionStatusResponse { id: string; status: string; updated_at: string;}
export interface StandardsPreset { id: string; name: string; description?: string | null; documents: string[]; document_count: number; status: string; processed_count: number; total_count: number; last_error?: string | null; created_at: string; updated_at: string;}
export interface CreatePresetPayload { name: string; description?: string; files: File[];}
export interface UpdatePresetPayload { name?: string; description?: string | null;}123456789101112131415161718192021{ "compilerOptions": { "target": "ES2020", "useDefineForClassFields": true, "lib": ["DOM", "DOM.Iterable", "ES2020"], "allowJs": false, "skipLibCheck": true, "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "ESNext", "moduleResolution": "Node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx" }, "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }]}.gitattributesAdded+2
.gitignoreAdded+20
README.mdAdded+86
agents/README.mdAdded+13
agents/__init__.pyAdded+15
agents/export/__init__.pyAdded+3
agents/export/agent.pyAdded+112
agents/extraction/__init__.pyAdded+3
agents/extraction/agent.pyAdded+239
agents/orchestrator/__init__.pyAdded+3
agents/orchestrator/agent.pyAdded+18
agents/rewrite/__init__.pyAdded+3
agents/rewrite/agent.pyAdded+315
agents/shared/base.pyAdded+49
agents/shared/client.pyAdded+97
agents/shared/embeddings.pyAdded+19
agents/standards_mapping/__init__.pyAdded+3
agents/standards_mapping/agent.pyAdded+293
agents/validation/__init__.pyAdded+3
agents/validation/agent.pyAdded+96
common/README.mdAdded+10
common/embedding_store.pyAdded+98
docker/DockerfileAdded+20
docs/README.mdAdded+12
docs/agents/orchestrator.mdAdded+12
docs/architecture/system-context.mdAdded+11
docs/pipelines/pypeflow-overview.mdAdded+8
docs/ui/review-workflow.mdAdded+17
frontend/.env.exampleAdded+1
frontend/README.mdAdded+17
frontend/index.htmlAdded+13
frontend/package-lock.jsonAdded+2030
frontend/package.jsonAdded+25
frontend/public/favicon.svgAdded
frontend/public/index.htmlAdded+13
frontend/src/App.tsxAdded+34
frontend/src/components/PresetManager.tsxAdded+193
frontend/src/components/SessionDetails.tsxAdded+578
frontend/src/components/SessionList.tsxAdded+59
frontend/src/components/UploadForm.tsxAdded+189
frontend/src/main.tsxAdded+15
frontend/src/pages/ObservatoryPage.tsxAdded+179
frontend/src/pages/PresetEditPage.tsxAdded+202
frontend/src/pages/PresetsPage.tsxAdded+9
frontend/src/pages/SessionsPage.tsxAdded+19
frontend/src/services/api.tsAdded+113
frontend/src/styles.cssAdded+643
frontend/src/types/diagnostics.tsAdded+27
frontend/src/types/session.tsAdded+59
frontend/tsconfig.jsonAdded+21