- Go gateway (stdlib only): /v1/messages non-stream + SSE, /v1/messages/count_tokens, management API /api/* (providers CRUD, apply/restore, settings, backups, logs) - Protocol conversion: Anthropic Messages <-> Chat Completions with a streaming state machine keyed by content block index (text, tool_use, parallel calls) - ~/.claude/settings.json guarded read/write: timestamped backups, managed env keys only, one-click restore - Tauri 2 shell: spawns the gateway sidecar, parses the random port from stdout, stdin pipe watchdog prevents orphans, kills the child on exit - React frontend: Dashboard/Providers/Settings, zh-CN + en-US, TanStack Query - Tests: Go table-driven + httptest integration (all green), vitest + RTL
30 lines
354 B
Makefile
30 lines
354 B
Makefile
ifeq ($(OS),Windows_NT)
|
|
GATEWAY_BIN := bin/gateway.exe
|
|
else
|
|
GATEWAY_BIN := bin/gateway
|
|
endif
|
|
|
|
.PHONY: all build test fmt vet dev dev-gateway clean
|
|
|
|
all: build
|
|
|
|
build: $(GATEWAY_BIN)
|
|
|
|
$(GATEWAY_BIN):
|
|
go build -o $(GATEWAY_BIN) ./cmd/gateway
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
vet:
|
|
go vet ./...
|
|
|
|
dev: build
|
|
npm run tauri dev
|
|
|
|
clean:
|
|
rm -rf bin
|