@assertion-runtime/sdk-node 0.1.0 → 0.1.1
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 +38 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
|
-
# Assertion Runtime
|
|
1
|
+
# Assertion Runtime API
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Setup
|
|
4
|
+
1. Create a Supabase project and run `supabase/schema.sql`.
|
|
5
|
+
2. Create a project row and API key hash (SHA-256 of your key).
|
|
6
|
+
3. Copy `.env.example` to `.env.local` and fill values.
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
### Supabase setup
|
|
9
|
+
- **Project URL:** Supabase dashboard -> Project Settings -> API -> Project URL
|
|
10
|
+
- **Service role key:** Supabase dashboard -> Project Settings -> API -> service_role key
|
|
11
|
+
- **Schema:** `apps/runtime-api/supabase/schema.sql`
|
|
12
|
+
|
|
13
|
+
### API key setup
|
|
14
|
+
Add an API key row in `api_keys` with a SHA-256 hash of your key:
|
|
15
|
+
```
|
|
16
|
+
sha256(<plain-text-api-key>)
|
|
17
|
+
```
|
|
18
|
+
Use the `projects.id` value in `project_id`.
|
|
19
|
+
|
|
20
|
+
### Local fallback auth (optional)
|
|
21
|
+
Set `ASSR_API_KEY` + `ASSR_FALLBACK_PROJECT_ID` in `.env.local` for local-only testing.
|
|
22
|
+
Requests can then authenticate with `Authorization: Bearer <ASSR_API_KEY>`.
|
|
23
|
+
|
|
24
|
+
## Endpoints
|
|
25
|
+
- `POST /findings` - ingest output lint finding
|
|
26
|
+
- `GET /findings` - list findings
|
|
27
|
+
- `GET /findings/:id` - fetch a single finding
|
|
28
|
+
- `POST /sdk-diagnostics` - ingest SDK diagnostics payload
|
|
29
|
+
|
|
30
|
+
## Notes
|
|
31
|
+
- Findings are immutable and stored as-is.
|
|
32
|
+
- Use `ASSR_ALLOW_IN_MEMORY=true` only for local scaffolding.
|
|
33
|
+
- For local-only testing, you can set `ASSR_API_KEY` + `ASSR_FALLBACK_PROJECT_ID`.
|
|
34
|
+
|
|
35
|
+
## Build + run
|
|
36
|
+
```
|
|
37
|
+
npm run build -w packages/core
|
|
38
|
+
npm run build -w apps/runtime-api
|
|
39
|
+
npm run start -w apps/runtime-api
|
|
40
|
+
```
|