@hasna/logs 0.3.25 → 0.3.27
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.
- package/README.md +33 -10
- package/dashboard/dist/assets/index-C0wZYq1m.js +53 -0
- package/dashboard/dist/assets/index-DGNrK5qb.css +1 -0
- package/dashboard/dist/index.html +14 -0
- package/dist/cli/index.js +8511 -177
- package/dist/count-bmj4r2zb.js +10 -0
- package/dist/{diagnose-e0w5rwbc.js → diagnose-3q5cy9ra.js} +2 -2
- package/dist/{export-c3eqjste.js → export-cngdb9fh.js} +1 -1
- package/dist/{http-zm3ph78w.js → http-r0xc3d2s.js} +79 -8
- package/dist/index-931pbyn5.js +141 -0
- package/dist/index-b5c72f1p.js +7 -0
- package/dist/{index-p1vgwwsz.js → index-bnr19y0h.js} +596 -37
- package/dist/{index-7w7v7hnr.js → index-by1pdzbr.js} +14 -5
- package/dist/{index-3dr7d80h.js → index-e1930v9b.js} +12 -8
- package/dist/{index-eh9bkbpa.js → index-e72k53yq.js} +10 -2
- package/dist/{index-edn08m6f.js → index-gcd14q2f.js} +9 -6
- package/dist/index-hq6kzaah.js +26 -0
- package/dist/index-j34f36wy.js +5672 -0
- package/dist/index-p4dbdzx4.js +1849 -0
- package/dist/{index-5qznfyah.js → index-q27bgpr1.js} +1086 -1646
- package/dist/index-t3x838zw.js +2583 -0
- package/dist/{index-ww5ggfv3.js → index-zkb3z95a.js} +12 -9
- package/dist/index.js +2982 -22
- package/dist/{jobs-ypmmc2ma.js → jobs-hsgyhfvm.js} +2 -1
- package/dist/mcp/index.js +1473 -4286
- package/dist/{query-7jwj05er.js → query-c5a43zx3.js} +3 -2
- package/dist/server/index.js +2944 -417
- package/dist/storage.js +50 -0
- package/package.json +27 -8
- package/biome.json +0 -13
- package/bun.lock +0 -376
- package/dashboard/README.md +0 -73
- package/dashboard/bun.lock +0 -526
- package/dashboard/eslint.config.js +0 -23
- package/dashboard/index.html +0 -13
- package/dashboard/package.json +0 -32
- package/dashboard/src/App.css +0 -184
- package/dashboard/src/App.tsx +0 -49
- package/dashboard/src/api.ts +0 -33
- package/dashboard/src/assets/hero.png +0 -0
- package/dashboard/src/assets/react.svg +0 -1
- package/dashboard/src/assets/vite.svg +0 -1
- package/dashboard/src/index.css +0 -111
- package/dashboard/src/main.tsx +0 -10
- package/dashboard/src/pages/Alerts.tsx +0 -69
- package/dashboard/src/pages/Issues.tsx +0 -50
- package/dashboard/src/pages/Perf.tsx +0 -75
- package/dashboard/src/pages/Projects.tsx +0 -67
- package/dashboard/src/pages/Summary.tsx +0 -67
- package/dashboard/src/pages/Tail.tsx +0 -65
- package/dashboard/tsconfig.app.json +0 -28
- package/dashboard/tsconfig.json +0 -7
- package/dashboard/tsconfig.node.json +0 -26
- package/dashboard/vite.config.ts +0 -14
- package/dist/count-x3n7qg3c.js +0 -9
- package/dist/index-5cj74qka.js +0 -10803
- package/dist/index-997bkzr2.js +0 -15
- package/dist/index-kezb178p.js +0 -1241
- package/dist/index-pen6t0yc.js +0 -10794
- package/sdk/package.json +0 -27
- package/sdk/src/index.ts +0 -143
- package/sdk/src/types.ts +0 -56
- package/src/cli/entrypoints.test.ts +0 -63
- package/src/cli/index.ts +0 -471
- package/src/db/index.test.ts +0 -33
- package/src/db/index.ts +0 -189
- package/src/db/migrations/001_alert_rules.ts +0 -21
- package/src/db/migrations/002_issues.ts +0 -21
- package/src/db/migrations/003_retention.ts +0 -15
- package/src/db/migrations/004_page_auth.ts +0 -13
- package/src/db/pg-migrations.ts +0 -167
- package/src/index.ts +0 -1
- package/src/lib/alerts.test.ts +0 -67
- package/src/lib/alerts.ts +0 -117
- package/src/lib/browser-script.test.ts +0 -35
- package/src/lib/browser-script.ts +0 -31
- package/src/lib/compare.test.ts +0 -52
- package/src/lib/compare.ts +0 -85
- package/src/lib/count.test.ts +0 -44
- package/src/lib/count.ts +0 -55
- package/src/lib/diagnose.test.ts +0 -55
- package/src/lib/diagnose.ts +0 -91
- package/src/lib/export.test.ts +0 -66
- package/src/lib/export.ts +0 -65
- package/src/lib/github.ts +0 -38
- package/src/lib/health.test.ts +0 -48
- package/src/lib/health.ts +0 -51
- package/src/lib/ingest.test.ts +0 -57
- package/src/lib/ingest.ts +0 -78
- package/src/lib/issues.test.ts +0 -79
- package/src/lib/issues.ts +0 -70
- package/src/lib/jobs.test.ts +0 -69
- package/src/lib/jobs.ts +0 -63
- package/src/lib/lighthouse.ts +0 -65
- package/src/lib/package-meta.test.ts +0 -43
- package/src/lib/package-meta.ts +0 -80
- package/src/lib/page-auth.test.ts +0 -54
- package/src/lib/page-auth.ts +0 -48
- package/src/lib/parse-time.test.ts +0 -37
- package/src/lib/parse-time.ts +0 -14
- package/src/lib/perf.test.ts +0 -45
- package/src/lib/perf.ts +0 -46
- package/src/lib/projects.test.ts +0 -73
- package/src/lib/projects.ts +0 -69
- package/src/lib/query.test.ts +0 -104
- package/src/lib/query.ts +0 -84
- package/src/lib/retention.test.ts +0 -42
- package/src/lib/retention.ts +0 -62
- package/src/lib/rotate.test.ts +0 -37
- package/src/lib/rotate.ts +0 -27
- package/src/lib/scanner.ts +0 -131
- package/src/lib/scheduler.ts +0 -63
- package/src/lib/session-context.ts +0 -28
- package/src/lib/summarize.test.ts +0 -38
- package/src/lib/summarize.ts +0 -23
- package/src/mcp/http.test.ts +0 -92
- package/src/mcp/http.ts +0 -135
- package/src/mcp/index.test.ts +0 -27
- package/src/mcp/index.ts +0 -444
- package/src/server/index.ts +0 -61
- package/src/server/routes/alerts.ts +0 -32
- package/src/server/routes/issues.ts +0 -43
- package/src/server/routes/jobs.ts +0 -32
- package/src/server/routes/logs.ts +0 -113
- package/src/server/routes/perf.ts +0 -23
- package/src/server/routes/projects.ts +0 -67
- package/src/server/routes/stream.ts +0 -43
- package/src/server/server.test.ts +0 -194
- package/src/types/index.ts +0 -119
- package/tsconfig.json +0 -22
- /package/dashboard/{public → dist}/favicon.svg +0 -0
- /package/dashboard/{public → dist}/icons.svg +0 -0
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@ logs --help
|
|
|
21
21
|
- `logs tail`
|
|
22
22
|
- `logs summary`
|
|
23
23
|
- `logs push`
|
|
24
|
+
- `logs events`
|
|
25
|
+
- `logs test-reports`
|
|
24
26
|
- `logs scan`
|
|
25
27
|
- `logs diagnose`
|
|
26
28
|
|
|
@@ -30,20 +32,20 @@ logs --help
|
|
|
30
32
|
logs-mcp
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
Includes log search, raw event search/watch/export, projected test-report search/get, storage sync, scan, issue, and performance tools.
|
|
34
36
|
|
|
35
37
|
## HTTP mode
|
|
36
38
|
|
|
37
39
|
Run a shared Streamable HTTP MCP server (127.0.0.1 only):
|
|
38
40
|
|
|
39
41
|
```bash
|
|
40
|
-
logs-mcp --http # default port
|
|
41
|
-
logs-mcp --http --port
|
|
42
|
+
logs-mcp --http # default port 8864
|
|
43
|
+
logs-mcp --http --port 8864
|
|
42
44
|
MCP_HTTP=1 logs-mcp
|
|
43
45
|
```
|
|
44
46
|
|
|
45
|
-
- Health: `GET http://127.0.0.1:
|
|
46
|
-
- MCP: `POST http://127.0.0.1:
|
|
47
|
+
- Health: `GET http://127.0.0.1:8864/health`
|
|
48
|
+
- MCP: `POST http://127.0.0.1:8864/mcp`
|
|
47
49
|
|
|
48
50
|
Stdio remains the default when no `--http` flag is passed.
|
|
49
51
|
|
|
@@ -53,16 +55,37 @@ Stdio remains the default when no `--http` flag is passed.
|
|
|
53
55
|
logs-serve
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
By default the API is locked unless an API token is configured or trusted
|
|
59
|
+
loopback mode is explicitly enabled:
|
|
57
60
|
|
|
58
|
-
|
|
61
|
+
```bash
|
|
62
|
+
HASNA_LOGS_API_TOKEN="$(openssl rand -hex 32)" logs-serve
|
|
63
|
+
# or, for local-only development:
|
|
64
|
+
logs-serve --local-open
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `Authorization: Bearer <token>` or `X-Logs-Token: <token>` for `/api/*`
|
|
68
|
+
requests. Browser ingest tokens remain scoped write-only tokens for browser
|
|
69
|
+
capture and do not grant general API access.
|
|
70
|
+
|
|
71
|
+
Page scanner credentials are encrypted at rest with a generated local
|
|
72
|
+
`page-auth.key` under the logs data directory. For deployments that need a
|
|
73
|
+
managed secret, set `HASNA_LOGS_SECRET_KEY` or `LOGS_SECRET_KEY`:
|
|
59
74
|
|
|
60
75
|
```bash
|
|
61
|
-
|
|
62
|
-
cloud sync push --service logs
|
|
63
|
-
cloud sync pull --service logs
|
|
76
|
+
export HASNA_LOGS_SECRET_KEY="$(openssl rand -hex 32)"
|
|
64
77
|
```
|
|
65
78
|
|
|
79
|
+
## Remote Sync
|
|
80
|
+
|
|
81
|
+
Logs stores data locally in SQLite and can optionally push/pull service-owned tables to PostgreSQL, including AWS RDS:
|
|
82
|
+
|
|
83
|
+
Configure `HASNA_LOGS_DATABASE_URL` or `LOGS_DATABASE_URL`, then use `logs storage status`, `logs storage push`, `logs storage pull`, or `logs storage sync`.
|
|
84
|
+
|
|
85
|
+
The MCP server also exposes `storage_status`, `storage_push`, `storage_pull`, and `storage_sync`.
|
|
86
|
+
|
|
87
|
+
`LOGS_DATABASE_URL` is accepted as the non-Hasna fallback database URL.
|
|
88
|
+
|
|
66
89
|
## Data Directory
|
|
67
90
|
|
|
68
91
|
Data is stored in `~/.hasna/logs/`.
|