create-atlas-agent 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +69 -0
  2. package/index.ts +526 -0
  3. package/package.json +33 -0
  4. package/template/.env.example +49 -0
  5. package/template/Dockerfile +31 -0
  6. package/template/bin/atlas.ts +1092 -0
  7. package/template/bin/enrich.ts +551 -0
  8. package/template/data/.gitkeep +0 -0
  9. package/template/data/demo-sqlite.sql +372 -0
  10. package/template/data/demo.sql +371 -0
  11. package/template/docker-compose.yml +23 -0
  12. package/template/docs/deploy.md +341 -0
  13. package/template/eslint.config.mjs +18 -0
  14. package/template/fly.toml +46 -0
  15. package/template/gitignore +5 -0
  16. package/template/next.config.ts +8 -0
  17. package/template/package.json +55 -0
  18. package/template/postcss.config.mjs +8 -0
  19. package/template/public/.gitkeep +0 -0
  20. package/template/railway.json +13 -0
  21. package/template/render.yaml +19 -0
  22. package/template/semantic/catalog.yml +5 -0
  23. package/template/semantic/entities/.gitkeep +0 -0
  24. package/template/semantic/glossary.yml +6 -0
  25. package/template/semantic/metrics/.gitkeep +0 -0
  26. package/template/src/app/api/chat/route.ts +107 -0
  27. package/template/src/app/api/health/route.ts +97 -0
  28. package/template/src/app/error.tsx +24 -0
  29. package/template/src/app/globals.css +1 -0
  30. package/template/src/app/layout.tsx +19 -0
  31. package/template/src/app/page.tsx +650 -0
  32. package/template/src/global.d.ts +1 -0
  33. package/template/src/lib/agent.ts +112 -0
  34. package/template/src/lib/db/connection.ts +150 -0
  35. package/template/src/lib/providers.ts +63 -0
  36. package/template/src/lib/semantic.ts +53 -0
  37. package/template/src/lib/startup.ts +211 -0
  38. package/template/src/lib/tools/__tests__/sql.test.ts +538 -0
  39. package/template/src/lib/tools/explore-sandbox.ts +189 -0
  40. package/template/src/lib/tools/explore.ts +164 -0
  41. package/template/src/lib/tools/report.ts +33 -0
  42. package/template/src/lib/tools/sql.ts +202 -0
  43. package/template/src/types/vercel-sandbox.d.ts +54 -0
  44. package/template/tsconfig.json +41 -0
  45. package/template/vercel.json +3 -0
@@ -0,0 +1,31 @@
1
+ FROM oven/bun:1.3 AS base
2
+
3
+ FROM base AS deps
4
+ WORKDIR /app
5
+ COPY package.json bun.lock* ./
6
+ RUN bun ci --ignore-scripts
7
+
8
+ FROM base AS builder
9
+ WORKDIR /app
10
+ COPY --from=deps /app/node_modules ./node_modules
11
+ COPY . .
12
+ RUN bun run build
13
+
14
+ FROM base AS runner
15
+ WORKDIR /app
16
+ # NOTE: SQLite data is ephemeral in containers — lost on restart/redeploy
17
+ # unless a persistent volume is mounted. Use PostgreSQL for production.
18
+ ENV NODE_ENV=production
19
+ RUN echo "nodejs:x:1001:" >> /etc/group && \
20
+ echo "nextjs:x:1001:1001:nextjs:/app:/bin/sh" >> /etc/passwd
21
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
22
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
23
+ COPY --from=builder --chown=nextjs:nodejs /app/public ./public
24
+ COPY --from=builder --chown=nextjs:nodejs /app/semantic ./semantic
25
+ USER nextjs
26
+ EXPOSE 3000
27
+ ENV PORT=3000
28
+ ENV HOSTNAME=0.0.0.0
29
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
30
+ CMD bun -e "try { const r = await fetch('http://localhost:3000/api/health'); if(!r.ok){console.error(r.status); process.exit(1)} } catch(e) { console.error(e.message); process.exit(1) }"
31
+ CMD ["bun", "server.js"]