@kb-labs/rest-api-app 1.6.0 → 2.6.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kb-labs/rest-api-app",
3
- "version": "1.6.0",
3
+ "version": "2.6.0",
4
4
  "description": "REST API application for KB Labs, providing HTTP endpoints for plugin functionality",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,46 +24,45 @@
24
24
  "@fastify/swagger": ">=9.5.1",
25
25
  "@fastify/swagger-ui": "^5.2.0",
26
26
  "@fastify/websocket": "^11.0.1",
27
- "@kb-labs/shared-http": "^1.4.0",
28
- "@kb-labs/core-contracts": "^1.7.0",
29
- "fastify-type-provider-zod": "^6.0.0",
30
- "@kb-labs/core-registry": "^1.7.0",
31
- "@kb-labs/core-config": "^1.7.0",
32
- "@kb-labs/core-platform": "^1.7.0",
33
- "@kb-labs/core-runtime": "^1.7.0",
34
- "@kb-labs/gateway-contracts": "^0.4.0",
35
- "@kb-labs/core-tenant": "^1.7.0",
36
- "@kb-labs/core-sys": "^1.7.0",
37
- "@kb-labs/core-workspace": "^1.7.0",
38
- "@kb-labs/plugin-contracts": "^1.4.0",
39
- "@kb-labs/plugin-execution": "^1.4.0",
40
- "@kb-labs/plugin-execution-factory": "^1.4.0",
41
- "@kb-labs/plugin-runtime": "^1.4.0",
42
- "@kb-labs/rest-api-contracts": "^1.6.0",
43
- "@kb-labs/rest-api-core": "^1.6.0",
44
- "@kb-labs/workflow-constants": "^1.5.0",
45
- "@kb-labs/workflow-contracts": "^1.5.0",
46
- "@kb-labs/workflow-engine": "^1.5.0",
47
27
  "fastify": "^5.2.0",
48
28
  "fastify-plugin": "^5.0.1",
49
- "pino": "^8.16.2",
29
+ "fastify-type-provider-zod": "^6.0.0",
30
+ "pino": "^9.0.0",
50
31
  "pino-pretty": "^10.2.3",
51
32
  "prom-client": "^15.1.3",
52
33
  "ulid": "^2.3.0",
53
34
  "ws": "^8.18.0",
54
35
  "yaml": "^2.8.0",
55
- "zod": "^4.0.0"
36
+ "zod": "^3.23.8",
37
+ "@kb-labs/shared-http": "^2.6.0",
38
+ "@kb-labs/core-contracts": "^2.6.0",
39
+ "@kb-labs/core-registry": "^2.6.0",
40
+ "@kb-labs/core-config": "^2.6.0",
41
+ "@kb-labs/core-platform": "^2.6.0",
42
+ "@kb-labs/core-runtime": "^2.6.0",
43
+ "@kb-labs/core-sys": "^2.6.0",
44
+ "@kb-labs/core-tenant": "^2.6.0",
45
+ "@kb-labs/core-workspace": "^2.6.0",
46
+ "@kb-labs/gateway-contracts": "^2.6.0",
47
+ "@kb-labs/plugin-contracts": "^2.6.0",
48
+ "@kb-labs/plugin-execution": "^2.6.0",
49
+ "@kb-labs/plugin-execution-factory": "^2.6.0",
50
+ "@kb-labs/plugin-runtime": "^2.6.0",
51
+ "@kb-labs/rest-api-contracts": "^2.6.0",
52
+ "@kb-labs/rest-api-core": "^2.6.0",
53
+ "@kb-labs/workflow-constants": "^2.6.0",
54
+ "@kb-labs/workflow-contracts": "^2.6.0",
55
+ "@kb-labs/workflow-engine": "^2.6.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@kb-labs/devkit": "link:../../../../infra/kb-labs-devkit",
59
- "@types/node": "^20.10.0",
58
+ "@kb-labs/devkit": "workspace:*",
59
+ "@types/node": "^24.3.3",
60
60
  "@types/ws": "^8.5.13",
61
- "nodemon": "^3.1.11",
62
- "tsup": "^8",
61
+ "rimraf": "^6.0.1",
62
+ "tsup": "^8.5.0",
63
63
  "tsx": "^4.20.5",
64
- "typescript": "^5",
65
- "vitest": "^3",
66
- "rimraf": "^6.0.1"
64
+ "typescript": "^5.6.3",
65
+ "vitest": "^3.2.4"
67
66
  },
68
67
  "engines": {
69
68
  "node": ">=20.0.0",
package/README.md DELETED
@@ -1,54 +0,0 @@
1
- # @kb-labs/rest-api-app
2
-
3
- Deployable Fastify application for the KB Labs REST API.
4
-
5
- ## Overview
6
-
7
- Wires together `@kb-labs/rest-api-core`, plugin manifests, and runtime middleware into a production-ready HTTP service. All business capabilities come from discovered plugin manifests — the app itself only provides shared system endpoints and middleware.
8
-
9
- ## Running Locally
10
-
11
- ```bash
12
- # From kb-labs-rest-api root
13
- pnpm install
14
- pnpm --filter @kb-labs/rest-api-app dev
15
- # Server starts on http://localhost:5050
16
- ```
17
-
18
- Build and run compiled output:
19
-
20
- ```bash
21
- pnpm --filter @kb-labs/rest-api-app build
22
- pnpm --filter @kb-labs/rest-api-app start
23
- ```
24
-
25
- ## Key Components
26
-
27
- | Path | Responsibility |
28
- |------|----------------|
29
- | `src/bootstrap.ts` | Fastify server setup, middleware wiring, route registration |
30
- | `src/index.ts` | Entry point — calls `bootstrap` with repo root |
31
- | `src/routes/` | System routes: health, readiness, metrics, registry, OpenAPI, events |
32
- | `src/middleware/` | Security headers, CORS, rate limiting, request envelopes, timeouts |
33
- | `src/plugins/` | Plugin discovery and dynamic route mounting |
34
- | `src/events/` | SSE hub and registry event bridge |
35
-
36
- ## System Endpoints
37
-
38
- - `GET /health` — versioned health snapshot (`kb.health/1`)
39
- - `GET /ready` — readiness probe (`200` or `503`)
40
- - `GET /openapi.json` — aggregated OpenAPI from all mounted plugins
41
- - `GET /api/v1/plugins/registry` — mounted plugin manifest list
42
- - `GET /api/v1/metrics` — Prometheus metrics
43
- - `GET /api/v1/events/registry` — SSE stream for registry and health changes
44
-
45
- ## Tests
46
-
47
- ```bash
48
- # From repo root
49
- pnpm test
50
- ```
51
-
52
- ## License
53
-
54
- KB Public License v1.1 © KB Labs