How leshm0321/ai-jsunpack works
AI JS Unpack is an authorized JavaScript build-artifact unpacking, audit, and runnable-reconstruction platform. Users submit a directory, script, or supported archive through the web workbench; the API manages the job and the worker analyzes its inputs, plans and runs agent stages, reconstructs a project, validates it, and packages downloadable results with evidence. The map includes the documented settings, audit, and runtime-comparison branches. Pipeline excerpts are partial, so links for unsampled orchestration are limited to documented behavior; the remote Browser Runner is optional.
Main entry points: pipeline.py Job pipeline · main.py FastAPI service · workbench.tsx Job workbench · api.ts Web API client
Components 23
User experience
- Web app
apps/web/src/App.tsx - Job workbench
apps/web/src/workbench.tsx - Web API client
apps/web/src/api.ts - Settings center
apps/web/src/settings.tsx
API and state
- FastAPI service
apps/api/app/main.py - Metadata store
apps/api/app/store.py - Artifact store
apps/api/app/artifact_store.py
Analysis and reconstruction
- Worker queue
apps/worker/worker/queue.py - Job pipeline
apps/worker/worker/pipeline.py - Core bridge
apps/worker/worker/core_bridge.py - Unpack and rebuild
packages/core/src/index.ts - Agent runtime
apps/worker/worker/agent_runtime.py - Agent process
apps/worker/worker/agent_process.py - CrewAI backend
apps/worker/worker/agent_process_worker.py - Evidence retrieval
packages/knowledge/retriever.py - Project memory
packages/memory/service.py
Validation and delivery
- Build validation
apps/worker/worker/build_validation.py - Runtime comparison
apps/worker/worker/runtime_smoke.py - Browser Runner
apps/browser_runner/app/main.py - Result packaging
apps/worker/worker/packaging.py - Result delivery
apps/worker/worker/delivery.py
Other components
- Authorized user
- Model provider
Connections 24
- Authorized user → Web app: uses
- Web app → Job workbench: routes to
- Job workbench → Web API client: submits jobs
- Settings center → Web API client: reads and updates
- Web API client → FastAPI service: calls
- FastAPI service → Metadata store: persists job state
- FastAPI service → Artifact store: reads and writes artifacts
- FastAPI service → Worker queue: dispatches jobs
- Worker queue → Job pipeline: runs jobs
- Job pipeline → Core bridge: invokes analysis
- Core bridge → Unpack and rebuild: runs core
- Job pipeline → Evidence retrieval: retrieves evidence
- Job pipeline → Agent runtime: runs agent stages
- Agent runtime → Agent process: isolates execution
- Agent process → CrewAI backend: runs backend
- CrewAI backend → Model provider: requests inference
- Job pipeline → Project memory: creates memory
- Job pipeline → Build validation: validates build
- Job pipeline → Runtime comparison: compares runtime
- Runtime comparison → Browser Runner: delegates runs
- Job pipeline → Result packaging: packages results
- Job pipeline → Result delivery: delivers results
- Result delivery → Artifact store: stores result package
- Job workbench → FastAPI service: retrieves job results