Changeset 0.38.1 (#234)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -337,6 +337,83 @@ to disk.
|
||||
- `400` — `starlark package missing entry point "script.star"` (or
|
||||
custom `entry_point` value)
|
||||
|
||||
## 5. Extension Connections (v0.38.1)
|
||||
|
||||
Scoped credential management for extensions that integrate with
|
||||
external services. Same scope/resolution pattern as provider configs
|
||||
(personal → team → global).
|
||||
|
||||
### Personal Connections
|
||||
|
||||
**Auth:** Authenticated user
|
||||
|
||||
```
|
||||
GET /connections → {"data": [...connection summaries]}
|
||||
POST /connections ← {"type","package_id","name","config"} → {"id","type","name"}
|
||||
GET /connections/:id → connection summary (owned only)
|
||||
PUT /connections/:id ← {"name?","config?"} → {"message":"connection updated"}
|
||||
DELETE /connections/:id → {"message":"connection deleted"}
|
||||
GET /connections/resolve → resolved connection (decrypted config)
|
||||
?type=gitea&name=Work+Gitea
|
||||
```
|
||||
|
||||
### Team Connections
|
||||
|
||||
**Auth:** Team admin (RequireTeamAdmin middleware)
|
||||
|
||||
```
|
||||
GET /teams/:teamId/connections → {"data": [...connection summaries]}
|
||||
POST /teams/:teamId/connections ← {"type","package_id","name","config"} → {"id","type","name"}
|
||||
PUT /teams/:teamId/connections/:id ← {"name?","config?"} → {"message":"connection updated"}
|
||||
DELETE /teams/:teamId/connections/:id → {"message":"connection deleted"}
|
||||
```
|
||||
|
||||
### Admin (Global) Connections
|
||||
|
||||
**Auth:** Admin
|
||||
|
||||
```
|
||||
GET /admin/connections → {"data": [...connection summaries]}
|
||||
POST /admin/connections ← {"type","package_id","name","config"} → {"id","type","name"}
|
||||
PUT /admin/connections/:id ← {"name?","config?"} → {"message":"connection updated"}
|
||||
DELETE /admin/connections/:id → {"message":"connection deleted"}
|
||||
```
|
||||
|
||||
**Connection summary** (list/get responses — secrets masked):
|
||||
```json
|
||||
{
|
||||
"id": "uuid", "type": "gitea", "package_id": "git-board",
|
||||
"scope": "personal", "name": "Work Gitea",
|
||||
"is_active": true, "has_config": true,
|
||||
"created_at": "2026-03-25T...", "updated_at": "2026-03-25T..."
|
||||
}
|
||||
```
|
||||
|
||||
**Scope resolution:** `GET /connections/resolve?type=gitea` resolves
|
||||
via personal → team → global chain. Returns full connection with
|
||||
decrypted config. Optional `name` parameter for named resolution.
|
||||
|
||||
**Config encryption:** Fields with `type: "secret"` in the package
|
||||
manifest's `connections[].fields` are encrypted at rest using the
|
||||
same vault pattern as provider API keys. The handler layer encrypts
|
||||
on write and decrypts on read. The store is encryption-agnostic.
|
||||
|
||||
**Unique constraint:** `(type, scope, owner_id, name)` — a user cannot
|
||||
have two connections of the same type with the same name.
|
||||
|
||||
**Starlark module:** Extensions with `connections.read` permission
|
||||
get a `connections` module:
|
||||
```python
|
||||
conn = connections.get("gitea") # scope chain
|
||||
conn = connections.get("gitea", name="Work Gitea") # named
|
||||
all = connections.list("gitea") # all accessible
|
||||
```
|
||||
|
||||
Each returned dict contains `id`, `type`, `name`, `scope` plus all
|
||||
config fields with secrets decrypted.
|
||||
|
||||
---
|
||||
|
||||
### Builtin Seeding
|
||||
|
||||
On startup, `SeedBuiltinExtensions()` scans `extensions/builtin/`
|
||||
|
||||
@@ -54,7 +54,7 @@ v0.9.x–v0.28.7 Foundation through Platform Polish ✅
|
||||
│ v0.37.17–18 Surfaces ✅ │
|
||||
│ v0.37.19 Tag ✅ │
|
||||
│ │ │
|
||||
v0.38.0–.4 │ │
|
||||
v0.38.0–.5 │ │
|
||||
Extension │ │
|
||||
Continuation │ │
|
||||
│ │ │
|
||||
@@ -280,10 +280,11 @@ See design docs for full specifications.
|
||||
| Version | Summary | Design Doc |
|
||||
|---------|---------|------------|
|
||||
| v0.38.0 ✅ | Multi-file Starlark | [DESIGN-MULTI-FILE-STARLARK.md](DESIGN-MULTI-FILE-STARLARK.md) — `load()` support, disk-based scripts, package-scoped loader. Prerequisite for libraries. 5 backend changesets. |
|
||||
| v0.38.1 | Extension Connections | [DESIGN-EXT-CONNECTIONS-LIBRARIES.md](DESIGN-EXT-CONNECTIONS-LIBRARIES.md) Part 1 — `ext_connections` table, scoped CRUD (personal → team → global resolution), `connections` Starlark module, 3 management UIs. |
|
||||
| v0.38.1 ✅ | Extension Connections | [DESIGN-EXT-CONNECTIONS-LIBRARIES.md](DESIGN-EXT-CONNECTIONS-LIBRARIES.md) Part 1 — `ext_connections` table, scoped CRUD (personal → team → global resolution), `connections` Starlark module, 3 management UIs. |
|
||||
| v0.38.2 | Library Packages | Part 2 — `library` package type, `ext_dependencies` table, `lib.load()` with per-library permission context, dependency resolution, uninstall protection. |
|
||||
| v0.38.3 | Full Composition | Part 3 — Libraries declare connection types for consumers, reference `gitea-client` library. |
|
||||
| v0.38.4 | Git-board Rewrite | Capstone validation — rewrite git-board as multi-package, multi-platform extension (Gitea/GitLab/GitHub). Proves the entire extension architecture works end-to-end. Reference implementation for future extension authors. |
|
||||
| v0.38.3 | Extension Config Sections | Manifest-driven `config_section` — packages declare a Preact component that the Settings/Admin surfaces discover and lazy-load as a nav section. Enables headless extensions (no surface) and libraries to own their configuration UX. Libraries can provide rich config for their connection types (OAuth flows, test buttons, pickers). |
|
||||
| v0.38.4 | Full Composition | Part 3 — Libraries declare connection types for consumers, reference `gitea-client` library. |
|
||||
| v0.38.5 | Git-board Rewrite | Capstone validation — rewrite git-board as multi-package, multi-platform extension (Gitea/GitLab/GitHub). Proves the entire extension architecture works end-to-end. Reference implementation for future extension authors. |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user