local-llm-gateway 0.1.0 → 0.2.0

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 (36) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +16 -8
  3. package/cli/dist/api/client.js +4 -0
  4. package/cli/dist/commands/open.js +40 -0
  5. package/cli/dist/index.js +6 -0
  6. package/cli/dist/key-diagnosis.js +7 -7
  7. package/cli/dist/repl.js +11 -1
  8. package/dist/src/api/endpoints.js +39 -1
  9. package/dist/src/api/openapi.js +9 -2
  10. package/dist/src/api/schemas.js +2 -0
  11. package/dist/src/app.js +27 -2
  12. package/dist/src/config.js +3 -0
  13. package/dist/src/lib/web-root.js +16 -0
  14. package/dist/src/plugins/auth.js +31 -8
  15. package/dist/src/plugins/metrics.js +1 -1
  16. package/dist/src/plugins/web-guard.js +37 -0
  17. package/dist/src/routes/web-page.js +42 -0
  18. package/dist/src/routes/web-session.js +52 -0
  19. package/dist/src/server.js +0 -0
  20. package/dist/src/services/web-session.service.js +50 -0
  21. package/dist/src/storage/postgres/index.js +2 -0
  22. package/dist/src/storage/postgres/schema.js +19 -0
  23. package/dist/src/storage/postgres/web-sessions.js +50 -0
  24. package/dist/src/storage/sqlite/index.js +2 -0
  25. package/dist/src/storage/sqlite/schema.js +18 -0
  26. package/dist/src/storage/sqlite/web-sessions.js +50 -0
  27. package/dist/web/assets/index-C03RJbF2.js +17 -0
  28. package/dist/web/assets/index-CDL8Tl5X.css +1 -0
  29. package/dist/web/index.html +14 -0
  30. package/drizzle/0003_pale_spectrum.sql +24 -0
  31. package/drizzle/meta/0003_snapshot.json +735 -0
  32. package/drizzle/meta/_journal.json +7 -0
  33. package/drizzle/sqlite/0001_blushing_jack_murdock.sql +24 -0
  34. package/drizzle/sqlite/meta/0001_snapshot.json +698 -0
  35. package/drizzle/sqlite/meta/_journal.json +7 -0
  36. package/package.json +22 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-llm-gateway",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A private AI assistant on your own computer: a gateway in front of Ollama, with the `llm` terminal app.",
5
5
  "keywords": [
6
6
  "ollama",
@@ -21,7 +21,8 @@
21
21
  },
22
22
  "bin": {
23
23
  "llm": "cli/dist/index.js",
24
- "llm-gateway": "dist/src/server.js"
24
+ "llm-gateway": "dist/src/server.js",
25
+ "local-llm-gateway": "dist/src/server.js"
25
26
  },
26
27
  "files": [
27
28
  "dist/src",
@@ -29,15 +30,17 @@
29
30
  "drizzle",
30
31
  "cli/dist",
31
32
  "README.md",
32
- "LICENSE"
33
+ "LICENSE",
34
+ "CHANGELOG.md",
35
+ "dist/web"
33
36
  ],
34
37
  "scripts": {
35
38
  "test": "vitest run --exclude \"**/*.int.test.ts\"",
36
39
  "dev": "tsx watch --env-file-if-exists=.env src/server.ts",
37
- "build": "tsc",
40
+ "build": "tsc && node -e \"require('fs').chmodSync('dist/src/server.js', 0o755)\" && npm run build:web",
38
41
  "start": "node --env-file-if-exists=.env dist/src/server.js",
39
42
  "bench": "tsx --env-file-if-exists=.env scripts/bench.ts",
40
- "typecheck": "tsc -p tsconfig.check.json",
43
+ "typecheck": "tsc -p tsconfig.check.json && tsc -p web/tsconfig.json",
41
44
  "test:int": "vitest run -c vitest.config.int.ts",
42
45
  "db:generate": "drizzle-kit generate && drizzle-kit generate --config drizzle.sqlite.config.ts",
43
46
  "db:migrate": "tsx --env-file-if-exists=.env scripts/migrate.ts",
@@ -48,26 +51,36 @@
48
51
  "dev:single": "DATABASE_URL= REDIS_URL= ALLOWED_MODELS= DEFAULT_MODEL= tsx watch --env-file-if-exists=.env src/server.ts",
49
52
  "prepack": "npm run clean && npm run build && npm --prefix cli run build",
50
53
  "pack:smoke": "bash scripts/pack-smoke.sh",
51
- "clean": "node -e \"for (const d of ['dist', 'cli/dist']) require('fs').rmSync(d, { recursive: true, force: true })\""
54
+ "clean": "node -e \"for (const d of ['dist', 'cli/dist']) require('fs').rmSync(d, { recursive: true, force: true })\"",
55
+ "build:web": "vite build --config web/vite.config.ts",
56
+ "dev:web": "vite --config web/vite.config.ts"
52
57
  },
53
58
  "dependencies": {
59
+ "@fastify/cookie": "^11.1.5",
54
60
  "@fastify/rate-limit": "^11.2.0",
61
+ "@fastify/static": "^10.1.12",
62
+ "@prometheus-io/client": "^0.16.1",
55
63
  "better-sqlite3": "^13.0.3",
64
+ "commander": "^15.0.0",
56
65
  "drizzle-orm": "^0.45.3",
57
66
  "fastify": "^5.12.5",
58
67
  "ioredis": "^6.0.0",
59
68
  "postgres": "^3.4.9",
60
- "prom-client": "^15.1.3",
61
- "zod": "^4.6.5",
62
- "commander": "^15.0.0"
69
+ "zod": "^4.6.5"
63
70
  },
64
71
  "devDependencies": {
65
72
  "@types/better-sqlite3": "^9.6.0",
66
73
  "@types/node": "^26.6.4",
74
+ "@types/react": "^19.3.0",
75
+ "@types/react-dom": "^19.3.0",
76
+ "@vitejs/plugin-react": "^6.3.0",
67
77
  "ajv": "^8.20.0",
68
78
  "drizzle-kit": "^0.31.11",
79
+ "react": "^19.3.1",
80
+ "react-dom": "^19.3.1",
69
81
  "tsx": "^4.23.15",
70
82
  "typescript": "^7.0.2",
83
+ "vite": "^8.3.8",
71
84
  "vitest": "^5.0.3"
72
85
  }
73
86
  }