kozou 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.
- package/README.md +85 -14
- package/dist/cli.js +37 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/codegen.d.ts +8 -0
- package/dist/commands/codegen.d.ts.map +1 -0
- package/dist/commands/codegen.js +54 -0
- package/dist/commands/codegen.js.map +1 -0
- package/dist/commands/dev-runtime.d.ts +21 -0
- package/dist/commands/dev-runtime.d.ts.map +1 -0
- package/dist/commands/dev-runtime.js +111 -0
- package/dist/commands/dev-runtime.js.map +1 -0
- package/dist/commands/dev.d.ts +5 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +168 -17
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/docs.d.ts +8 -0
- package/dist/commands/docs.d.ts.map +1 -0
- package/dist/commands/docs.js +44 -0
- package/dist/commands/docs.js.map +1 -0
- package/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +12 -12
- package/dist/commands/mcp.js.map +1 -1
- package/dist/config.d.ts +39 -141
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +127 -10
- package/dist/config.js.map +1 -1
- package/dist/docs.d.ts +3 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +204 -0
- package/dist/docs.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +17 -6
- package/dist/scaffold.js.map +1 -1
- package/dist/templates/docker-compose.yml +27 -26
- package/dist/templates/env.example +14 -0
- package/package.json +19 -7
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
# Docker Compose stack for a kozou project.
|
|
2
2
|
#
|
|
3
|
-
# Brings up
|
|
3
|
+
# Brings up:
|
|
4
4
|
# - postgres PostgreSQL 16 (the source of truth)
|
|
5
5
|
# - postgrest REST adapter consumed by the Kozou DataAdapter
|
|
6
6
|
# (MIT-licensed external dependency, not bundled)
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
# the `kozou` CLI, which does not bind a port. Host integration
|
|
11
|
-
# (`kozou dev` spawning the bundled Admin UI + MCP HTTP server)
|
|
12
|
-
# lands in v0.1.1; uncomment the block then.
|
|
7
|
+
# - kozou `kozou dev` - the bundled Admin UI + MCP HTTP server
|
|
8
|
+
# (ghcr.io/kozou-dev/kozou). Binds 0.0.0.0 inside the
|
|
9
|
+
# container so the port mappings below reach your host.
|
|
13
10
|
#
|
|
14
11
|
# Customize the credentials in .env before running `docker compose up`.
|
|
15
12
|
|
|
@@ -42,22 +39,26 @@ services:
|
|
|
42
39
|
postgres:
|
|
43
40
|
condition: service_healthy
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
kozou:
|
|
43
|
+
# `kozou dev` spawns the bundled @kozou/svelte-ui Admin UI and the
|
|
44
|
+
# MCP HTTP server (Kozou v0.1 spec §9.1). Both bind 0.0.0.0 inside
|
|
45
|
+
# the container so the port mappings below reach your host.
|
|
46
|
+
image: ghcr.io/kozou-dev/kozou:v0.2.0
|
|
47
|
+
command: ["dev"]
|
|
48
|
+
environment:
|
|
49
|
+
DATABASE_URL: postgres://${POSTGRES_USER:-kozou}:${POSTGRES_PASSWORD:-kozou}@postgres:5432/${POSTGRES_DB:-kozou}
|
|
50
|
+
KOZOU_ADAPTER_URL: http://postgrest:3000
|
|
51
|
+
# The Admin UI is a SvelteKit (adapter-node) app. Without ORIGIN
|
|
52
|
+
# it assumes https and rejects every form POST (create / edit /
|
|
53
|
+
# delete) over plain http with a 403 "Cross-site POST forbidden".
|
|
54
|
+
# Set it to the exact URL you open in the browser; override if you
|
|
55
|
+
# publish the Admin UI on a different host or port.
|
|
56
|
+
ORIGIN: ${KOZOU_ORIGIN:-http://localhost:3333}
|
|
57
|
+
depends_on:
|
|
58
|
+
postgres:
|
|
59
|
+
condition: service_healthy
|
|
60
|
+
postgrest:
|
|
61
|
+
condition: service_started
|
|
62
|
+
ports:
|
|
63
|
+
- "3333:3333" # Admin UI
|
|
64
|
+
- "3334:3334" # MCP HTTP
|
|
@@ -9,3 +9,17 @@ POSTGRES_PORT=5432
|
|
|
9
9
|
# Used by kozou + postgrest at runtime; defaults match the compose stack.
|
|
10
10
|
DATABASE_URL=postgres://kozou:change-me@postgres:5432/kozou
|
|
11
11
|
KOZOU_ADAPTER_URL=http://postgrest:3000
|
|
12
|
+
|
|
13
|
+
# Public URL you open the Admin UI on (v0.2.0). The bundled SvelteKit
|
|
14
|
+
# (adapter-node) server needs this to accept form submissions over plain
|
|
15
|
+
# http — without it, create / edit / delete are rejected with a 403
|
|
16
|
+
# "Cross-site POST forbidden". Override if you serve the UI elsewhere.
|
|
17
|
+
KOZOU_ORIGIN=http://localhost:3333
|
|
18
|
+
|
|
19
|
+
# JWT auth for the experimental in-house API (`kozou dev --adapter api`).
|
|
20
|
+
# Leave unset to keep it unauthenticated and loopback-only (the default).
|
|
21
|
+
# KOZOU_JWT_SECRET=your-hs256-secret # HS256 — or KOZOU_JWT_PUBLIC_KEY / KOZOU_JWT_JWKS_URI
|
|
22
|
+
# KOZOU_JWT_JWKS_URI=https://your-idp/.well-known/jwks.json # Auth0 / Clerk / Supabase
|
|
23
|
+
# KOZOU_JWT_ANON_ROLE=web_anon # role for requests with no token (else 401)
|
|
24
|
+
# KOZOU_UI_ROLE=app_admin # role the bundled Admin UI runs as (HS256)
|
|
25
|
+
# KOZOU_ADAPTER_TOKEN= # RS256 / external IdP: a ready-made UI token
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kozou",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Kozou CLI: scaffolding, schema introspection, and MCP server entry points. See Kozou v0.1 design spec §9.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,17 +36,29 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"commander": "^14.0.0",
|
|
38
38
|
"yaml": "^2.9.0",
|
|
39
|
-
"zod": "^
|
|
40
|
-
"@kozou/core": "0.
|
|
41
|
-
"@kozou/introspect": "0.
|
|
42
|
-
"@kozou/mcp": "0.
|
|
39
|
+
"zod": "^4.4.3",
|
|
40
|
+
"@kozou/core": "0.2.0",
|
|
41
|
+
"@kozou/introspect": "0.2.0",
|
|
42
|
+
"@kozou/mcp": "0.2.0",
|
|
43
|
+
"@kozou/svelte-ui": "0.2.0"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"
|
|
46
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
47
|
+
"@playwright/test": "^1.50.0",
|
|
48
|
+
"@testcontainers/postgresql": "^12.0.0",
|
|
49
|
+
"@types/pg": "^8.11.10",
|
|
50
|
+
"pg": "^8.13.0",
|
|
51
|
+
"testcontainers": "^12.0.0",
|
|
52
|
+
"tsx": "^4.19.0",
|
|
53
|
+
"@kozou/api": "0.0.0",
|
|
54
|
+
"@kozou/codegen": "0.0.0"
|
|
46
55
|
},
|
|
47
56
|
"scripts": {
|
|
48
57
|
"typecheck": "tsc --noEmit",
|
|
49
58
|
"build": "tsc && node scripts/copy-templates.mjs",
|
|
50
|
-
"test": "vitest run --coverage"
|
|
59
|
+
"test": "vitest run --coverage",
|
|
60
|
+
"test:e2e": "playwright test",
|
|
61
|
+
"test:e2e:api": "playwright test --config playwright.kozou-api.config.ts",
|
|
62
|
+
"test:e2e:api:auth": "playwright test --config playwright.kozou-api-auth.config.ts"
|
|
51
63
|
}
|
|
52
64
|
}
|