diff options
| author | soryu <soryu@soryu.co> | 2026-01-25 02:49:47 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-25 03:52:56 +0000 |
| commit | 34bc1296a53d264216c12cbaa74ca9d68dfe8f22 (patch) | |
| tree | ef7cee659e2dbe76a491376a8694409c96bb8697 /makima/src/server/mod.rs | |
| parent | 579c983d3efb8f1414ffb45b9e031f741cce5f76 (diff) | |
| download | soryu-34bc1296a53d264216c12cbaa74ca9d68dfe8f22.tar.gz soryu-34bc1296a53d264216c12cbaa74ca9d68dfe8f22.zip | |
feat: Add contract type templates API endpoint
Add a new API endpoint to provide contract type templates (workflow
definitions) separate from file templates. This enables the create
contract page to dynamically show available contract types.
Changes:
- Add ContractTypeTemplate struct in templates.rs with id, name,
description, phases, default_phase, and is_builtin fields
- Add built-in contract types: 'simple' (plan/execute) and
'specification' (research/specify/plan/execute/review)
- Add GET /api/v1/contract-types endpoint returning all contract types
- Add frontend ContractTypeTemplate interface and listContractTypes()
API function
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/server/mod.rs')
| -rw-r--r-- | makima/src/server/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/makima/src/server/mod.rs b/makima/src/server/mod.rs index de20569..75f64c6 100644 --- a/makima/src/server/mod.rs +++ b/makima/src/server/mod.rs @@ -208,6 +208,8 @@ pub fn make_router(state: SharedState) -> Router { // Template endpoints .route("/templates", get(templates::list_templates)) .route("/templates/{id}", get(templates::get_template)) + // Contract type templates (workflow definitions) + .route("/contract-types", get(templates::list_contract_types)) // Settings endpoints .route( "/settings/repository-history", |
