Files
ai-agent/Taskfile.yml
T
t 3d47227fbd refactor: split backend into standalone server project
Remove embedded frontend and workflow editor assets, add standalone API deployment configuration, and retain the current backend service updates.
2026-08-20 21:46:55 +08:00

46 lines
966 B
YAML

version: '3'
silent: true
vars:
APP: agent-desk-server
MAIN: ./cmd/server
DIST_DIR: dist
GO:
sh: 'printf "%s" "${GO:-go}"'
DEV_PORT:
sh: 'printf "%s" "${DEV_PORT:-8083}"'
FRONTEND_DIR:
sh: 'printf "%s" "${FRONTEND_DIR:-../agent-desk-web}"'
tasks:
default:
cmds:
- task --list
dev:
desc: Start the API server
cmds:
- 'AGENT_DESK_SERVER_PORT="{{.DEV_PORT}}" {{.GO}} run -tags dev {{.MAIN}}'
build:
desc: Build the API binary
cmds:
- mkdir -p {{.DIST_DIR}}
- '{{.GO}} build -v -o {{.DIST_DIR}}/{{.APP}} {{.MAIN}}'
test:
desc: Run all Go tests
cmds:
- '{{.GO}} test ./...'
generator:
desc: Run backend code generation
cmds:
- '{{.GO}} run ./cmd/generator/generator.go'
enums:
desc: Generate TypeScript enums into the sibling frontend project
cmds:
- '{{.GO}} run ./cmd/enums/generator.go -output "{{.FRONTEND_DIR}}/lib/generated/enums.ts"'