@@ -13,13 +13,15 @@ PLAYGROUND_DIR := ../airgate-playground
1313PLAYGROUND_PLUGIN := $(PLAYGROUND_DIR ) /web
1414EPAY_PLUGIN := ../airgate-epay/web
1515HEALTH_PLUGIN := ../airgate-health/web
16+ KIRO_PLUGIN := ../airgate-kiro/web
1617# build-plugins 阶段(生产)同步各插件的 admin dist/index.js 到
1718# core 的 plugin assets dir;health 的公开状态页仍走 /status 反代,不经过这套 assets。
1819OPENAI_ASSETS := $(BACKEND_DIR ) /data/plugins/gateway-openai/assets
1920CLAUDE_ASSETS := $(BACKEND_DIR ) /data/plugins/gateway-anthropic/assets
2021PLAYGROUND_ASSETS := $(BACKEND_DIR ) /data/plugins/airgate-playground/assets
2122EPAY_ASSETS := $(BACKEND_DIR ) /data/plugins/payment-epay/assets
2223HEALTH_ASSETS := $(BACKEND_DIR ) /data/plugins/airgate-health/assets
24+ KIRO_ASSETS := $(BACKEND_DIR ) /data/plugins/gateway-kiro/assets
2325BINARY := $(BACKEND_DIR ) /server
2426WEBDIST := $(BACKEND_DIR ) /internal/web/webdist
2527GO := GOTOOLCHAIN=local go
@@ -28,7 +30,7 @@ GO := GOTOOLCHAIN=local go
2830VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
2931LDFLAGS := -X github.com/DouDOU-start/airgate-core/internal/version.Version=$(VERSION )
3032
31- .PHONY : help dev dev-backend dev-frontend dev-sdk dev-plugins dev-plugin-openai dev-plugin-claude dev-plugin-playground dev-plugin-epay dev-plugin-health \
33+ .PHONY : help dev dev-backend dev-frontend dev-sdk dev-plugins dev-plugin-openai dev-plugin-claude dev-plugin-playground dev-plugin-epay dev-plugin-health dev-plugin-kiro \
3234 build build-backend build-frontend \
3335 build-plugins sync-plugins \
3436 ent lint fmt test clean install ci pre-commit setup-hooks \
@@ -58,11 +60,13 @@ dev-plugins: ## 启动所有插件前端 watch 模式
5860 @echo " - playground → ../airgate-playground/web/dist/"
5961 @echo " - epay → ../airgate-epay/web/dist/"
6062 @echo " - health → ../airgate-health/web/dist/ (含 admin index.js + standalone status page)"
63+ @echo " - kiro → ../airgate-kiro/web/dist/"
6164 @$(MAKE ) dev-plugin-openai &
6265 @$(MAKE ) dev-plugin-claude &
6366 @$(MAKE ) dev-plugin-playground &
6467 @$(MAKE ) dev-plugin-epay &
6568 @$(MAKE ) dev-plugin-health &
69+ @$(MAKE ) dev-plugin-kiro &
6670 @wait
6771
6872dev-plugin-openai : # # 单独 watch openai 插件前端(输出到 ../airgate-openai/web/dist)
@@ -100,6 +104,13 @@ dev-plugin-health: ## 单独 watch health 插件前端(同时 watch admin inde
100104 echo " 跳过 health 插件前端 watch:$( HEALTH_PLUGIN) 不存在" ; \
101105 fi
102106
107+ dev-plugin-kiro : # # 单独 watch kiro 插件前端(输出到 ../airgate-kiro/web/dist)
108+ @if [ -d $( KIRO_PLUGIN) ]; then \
109+ cd $(KIRO_PLUGIN ) && npx vite build --watch; \
110+ else \
111+ echo " 跳过 kiro 插件前端 watch:$( KIRO_PLUGIN) 不存在" ; \
112+ fi
113+
103114dev-backend : # # 启动后端(带热重载,需要 air)
104115 @cd $(BACKEND_DIR ) && \
105116 if command -v air > /dev/null 2>&1 ; then \
@@ -186,6 +197,15 @@ sync-plugins: ## 构建插件前端并同步 admin 资源到 data/plugins/
186197 else \
187198 echo " 跳过 health 插件前端构建:$( HEALTH_PLUGIN) 不存在" ; \
188199 fi
200+ @if [ -d $( KIRO_PLUGIN) ]; then \
201+ echo " 构建并同步 kiro 插件前端..." ; \
202+ (cd $( KIRO_PLUGIN) && npm run build); \
203+ mkdir -p $(KIRO_ASSETS ) ; \
204+ cp $(KIRO_PLUGIN ) /dist/index.js $(KIRO_ASSETS ) /index.js; \
205+ echo " kiro 插件前端已同步到 $( KIRO_ASSETS) /" ; \
206+ else \
207+ echo " 跳过 kiro 插件前端构建:$( KIRO_PLUGIN) 不存在" ; \
208+ fi
189209
190210# ===================== 代码生成 =====================
191211
0 commit comments