|
2 | 2 |
|
3 | 3 | AI-powered repo scaffolding inside your workspace. |
4 | 4 |
|
5 | | -**Current version: 1.2.0** (HMAC peer trust) |
6 | | - |
7 | | -## Architecture |
8 | | - |
9 | | -``` |
10 | | -creer/ |
11 | | -├── backend/ # Python FastAPI AI engine (+ packs/ + registry) |
12 | | -├── extension/ # VS Code extension (icon in media/) |
13 | | -└── .github/ # CI + release workflows |
14 | | -``` |
| 5 | +**Current version: 1.3.0** |
15 | 6 |
|
16 | 7 | ## Quick start |
17 | 8 |
|
18 | 9 | ```bash |
19 | | -# Backend |
| 10 | +# Backend (local) |
20 | 11 | cd backend && python -m venv venv && source venv/bin/activate |
21 | 12 | pip install -r requirements.txt && cp .env.example .env |
22 | 13 | uvicorn main:app --reload --port 8000 |
23 | 14 |
|
| 15 | +# Or Docker multi-peer demo |
| 16 | +docker compose up --build |
| 17 | +# A: http://localhost:8000 B: http://localhost:8001 |
| 18 | +curl -s http://localhost:8000/registry/federated | head |
| 19 | + |
24 | 20 | # Extension |
25 | 21 | cd extension && npm install && npm run compile |
26 | | -# F5 → Creer: Create New Repo |
27 | | -``` |
28 | | - |
29 | | -## Registry & federation (v0.7–v1.2) |
30 | | - |
31 | | -Self-hosted pack catalog plus optional multi-host federation, write auth, peer policy, and HMAC peer trust: |
32 | | - |
33 | | -| Method | Path | Description | |
34 | | -|---|---|---| |
35 | | -| `GET` | `/registry?q=&source=` | Searchable pack list (may include a `trust` block when signing is enabled) | |
36 | | -| `GET` | `/registry/federated?q=&source=&peers=&discover=&max_hops=` | Local + peer merge; `discover=true` expands peers; `max_hops` caps hop depth (0–2); peers carry `trust_status` | |
37 | | -| `GET` | `/registry/discover` | Peer discovery (policy-filtered; may include a `trust` block) | |
38 | | -| `GET` | `/registry/peers` | Peer health + configured URLs (+ trust when verified) | |
39 | | -| `POST` | `/registry/peers/probe` | Probe one peer `{ url }` (auth when configured; may 400 on policy; may include trust) | |
40 | | -| `GET` | `/registry/packs/{id}` | Pack metadata | |
41 | | -| `GET` | `/registry/packs/{id}/download` | Portable JSON pack (installable URL) | |
42 | | -| `GET` | `/marketplace` | Curated featured view | |
43 | | -| `POST` | `/packs/install` | Install pack from URL (auth when configured) | |
44 | | -| `DELETE` | `/packs/{id}` | Delete installed pack (auth when configured) | |
45 | | - |
46 | | -When the backend sets `CREER_REGISTRY_TOKEN`, mutating routes expect `Authorization: Bearer <token>` and/or `X-Creer-Token`. |
47 | | - |
48 | | -### Peer policy env vars (v1.1) |
49 | | - |
50 | | -Backend peer/federation policy (SSRF and private-IP hardening). The extension surfaces 400 `detail` strings and per-peer `error` / optional `policy` fields. |
51 | | - |
52 | | -| Env | Purpose | |
53 | | -|---|---| |
54 | | -| `CREER_FEDERATION_MAX_HOPS` | Default max discovery hops (0–2; default 1). Extension may also send `max_hops` on federated browse when the backend accepts it. | |
55 | | -| `CREER_PEER_ALLOWLIST` | Comma-separated hostnames/URLs; if non-empty, only these peers may be contacted | |
56 | | -| `CREER_PEER_DENYLIST` | Comma-separated hostnames/URLs always blocked | |
57 | | -| `CREER_ALLOW_PRIVATE_PEERS` | When true (`1`/`true`/`yes`), allow loopback/private/link-local peers (default off) | |
58 | | - |
59 | | -### HMAC peer trust env vars (v1.2) |
60 | | - |
61 | | -Shared-secret HMAC-SHA256 signing/verification for peer registry and discover responses. Federated `peer_meta` (and probe) include `trust_status`: `signed` | `unsigned` | `invalid` | `skipped`. Signed responses attach a `trust` block `{ alg: "HMAC-SHA256", kid: "default", sig: "<hex>" }`. |
62 | | - |
63 | | -| Env | Purpose | |
64 | | -|---|---| |
65 | | -| `CREER_PEER_TRUST_SECRET` | Shared HMAC secret used to sign outbound registry/discover and verify peer payloads. Empty = signing/verification disabled. | |
66 | | -| `CREER_PEER_TRUST_MODE` | `off` (default) \| `optional` \| `required`. `off`: never verify (outbound still signed when secret set). `optional`: verify when a signature is present; accept unsigned; mark `trust_status`. `required`: reject peer payloads without a valid HMAC (treated as fetch error). | |
67 | | - |
68 | | -Mutual TLS between registries remains an **optional future** concern and is left to human/infra configuration — HMAC peer trust does not require mTLS. |
69 | | - |
70 | | -Extension settings: `creer.registryPeers`, `creer.showPeerStatus`, `creer.federatedDiscover` (`discover=true`), `creer.federationMaxHops` (`max_hops`), `creer.warnPrivatePeers`, `creer.requireSignedPeers` (client-side filter of unsigned/invalid/skipped peer packs), `creer.registryToken` (deprecated plaintext — prefer SecretStorage). |
71 | | - |
72 | | -Commands: **Browse Federated Registry**, **Manage Registry Peers** (Discover peers; private-host warning; policy-blocked suggestions; trust badges), **Set / Clear Registry Token**. |
73 | | - |
74 | | -Install from another Creer host: |
75 | | - |
76 | | -```bash |
77 | | -curl -X POST http://localhost:8000/packs/install \ |
78 | | - -H 'Content-Type: application/json' \ |
79 | | - -d '{"url":"http://other-host:8000/registry/packs/fastapi-crud/download"}' |
80 | 22 | ``` |
81 | 23 |
|
82 | | -Set `CREER_PUBLIC_BASE_URL` for absolute download links in registry responses. |
83 | | -Set `CREER_REGISTRY_PEERS` for backend-configured federated discovery. |
84 | | -Set `CREER_REGISTRY_TOKEN` to require write auth on install/delete/probe. |
85 | | -Use `creer.registryPeers` in the extension for client-side extra peers when browsing. |
86 | | -Set matching `CREER_PEER_TRUST_SECRET` (and `CREER_PEER_TRUST_MODE`) on peers to enable HMAC trust; enable `creer.requireSignedPeers` in the extension to hide unsigned peer packs. |
87 | | - |
88 | | -## Extension commands |
| 24 | +## Highlights |
89 | 25 |
|
90 | | -| Command | Title | |
| 26 | +| Area | Features | |
91 | 27 | |---|---| |
92 | | -| `creer.createRepo` | Create New Repo | |
93 | | -| `creer.createRepoFromChat` | Create from Chat Prompt | |
94 | | -| `creer.browseMarketplace` | Browse Pack Marketplace | |
95 | | -| `creer.browseRegistry` | Browse Pack Registry | |
96 | | -| `creer.browseFederatedRegistry` | Browse Federated Registry | |
97 | | -| `creer.manageRegistryPeers` | Manage Registry Peers | |
98 | | -| `creer.installPackFromUrl` | Install Pack from URL | |
99 | | -| `creer.setGitHubToken` / `clearGitHubToken` | GitHub SecretStorage token | |
100 | | -| `creer.setRegistryToken` / `clearRegistryToken` | Registry write SecretStorage token | |
| 28 | +| Scaffold | Plan → preview → stream generate → content/conflict diffs → write | |
| 29 | +| Packs | Templates, JSON/YAML packs, marketplace, registry download | |
| 30 | +| Federation | Peers, discover, hop budget, SSRF policy, HMAC trust, optional mTLS | |
| 31 | +| Ops | Docker Compose, CI/release workflows, `RELEASE.md` | |
101 | 32 |
|
102 | | -## CI & publishing |
| 33 | +## TLS / mTLS |
103 | 34 |
|
104 | | -- **CI** (`.github/workflows/ci.yml`): pytest + extension compile on push/PR |
105 | | -- **Release** (`.github/workflows/release.yml`): tag `v*` → package `.vsix`, create GitHub Release with attachment; publish to Marketplace / Open VSX only when `VSCE_PAT` / `OVSX_PAT` secrets are set |
| 35 | +See [`docs/MTLS.md`](docs/MTLS.md). Generate dev certs with `./scripts/gen-dev-certs.sh`, then set `CREER_SSL_*` and use `./scripts/run_backend.sh`. |
106 | 36 |
|
107 | | -See [`RELEASE.md`](RELEASE.md) and [`extension/PUBLISH.md`](extension/PUBLISH.md). Package locally: |
108 | | - |
109 | | -```bash |
110 | | -cd extension && npm run compile && npm run package |
111 | | -# → creer-1.2.0.vsix (includes media/icon.png) |
112 | | -``` |
| 37 | +## Publishing |
113 | 38 |
|
114 | | -Signed Marketplace / Open VSX publish requires your own `VSCE_PAT` / `OVSX_PAT` (never commit tokens). Agents cannot set GitHub Actions secrets — that remains a human step. |
| 39 | +Human step for Marketplace / Open VSX tokens — [`RELEASE.md`](RELEASE.md). |
115 | 40 |
|
116 | 41 | ## License |
117 | 42 |
|
|
0 commit comments