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.
Files changed (41) hide show
  1. package/README.md +85 -14
  2. package/dist/cli.js +37 -5
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/codegen.d.ts +8 -0
  5. package/dist/commands/codegen.d.ts.map +1 -0
  6. package/dist/commands/codegen.js +54 -0
  7. package/dist/commands/codegen.js.map +1 -0
  8. package/dist/commands/dev-runtime.d.ts +21 -0
  9. package/dist/commands/dev-runtime.d.ts.map +1 -0
  10. package/dist/commands/dev-runtime.js +111 -0
  11. package/dist/commands/dev-runtime.js.map +1 -0
  12. package/dist/commands/dev.d.ts +5 -1
  13. package/dist/commands/dev.d.ts.map +1 -1
  14. package/dist/commands/dev.js +168 -17
  15. package/dist/commands/dev.js.map +1 -1
  16. package/dist/commands/docs.d.ts +8 -0
  17. package/dist/commands/docs.d.ts.map +1 -0
  18. package/dist/commands/docs.js +44 -0
  19. package/dist/commands/docs.js.map +1 -0
  20. package/dist/commands/mcp.d.ts +1 -0
  21. package/dist/commands/mcp.d.ts.map +1 -1
  22. package/dist/commands/mcp.js +12 -12
  23. package/dist/commands/mcp.js.map +1 -1
  24. package/dist/config.d.ts +39 -141
  25. package/dist/config.d.ts.map +1 -1
  26. package/dist/config.js +127 -10
  27. package/dist/config.js.map +1 -1
  28. package/dist/docs.d.ts +3 -0
  29. package/dist/docs.d.ts.map +1 -0
  30. package/dist/docs.js +204 -0
  31. package/dist/docs.js.map +1 -0
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +12 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/scaffold.d.ts.map +1 -1
  37. package/dist/scaffold.js +17 -6
  38. package/dist/scaffold.js.map +1 -1
  39. package/dist/templates/docker-compose.yml +27 -26
  40. package/dist/templates/env.example +14 -0
  41. package/package.json +19 -7
@@ -1,15 +1,12 @@
1
1
  # Docker Compose stack for a kozou project.
2
2
  #
3
- # Brings up (v0.1.0):
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
- # The `kozou` service block is commented out for v0.1.0: the
9
- # published `ghcr.io/kozou-dev/kozou:v0.1.0` image's entrypoint is
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
- # kozou:
46
- # # v0.1.1: reactivate once `kozou dev` spawns the bundled
47
- # # @kozou/svelte-ui Admin UI + MCP HTTP server. v0.1.0 only
48
- # # ships the CLI entrypoint, which exits immediately when
49
- # # run without arguments and therefore would bring no port
50
- # # online.
51
- # image: ghcr.io/kozou-dev/kozou:v0.1.0
52
- # command: ["dev"]
53
- # environment:
54
- # DATABASE_URL: postgres://${POSTGRES_USER:-kozou}:${POSTGRES_PASSWORD:-kozou}@postgres:5432/${POSTGRES_DB:-kozou}
55
- # KOZOU_ADAPTER_URL: http://postgrest:3000
56
- # depends_on:
57
- # postgres:
58
- # condition: service_healthy
59
- # postgrest:
60
- # condition: service_started
61
- # ports:
62
- # - "3333:3333" # Admin UI
63
- # - "3334:3334" # MCP HTTP
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.1.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": "^3.23.0",
40
- "@kozou/core": "0.1.0",
41
- "@kozou/introspect": "0.1.0",
42
- "@kozou/mcp": "0.1.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
- "tsx": "^4.19.0"
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
  }