Skip to content

Commit e25124d

Browse files
committed
feat(i18n): add accessibility terms and update response stopped messages in multiple locales
- Integrated accessibility terms into locale structural backfills. - Added "responseStopped" and "responseStoppedBadge" translations for various languages including ca-ES, cs-CZ, da-DK, de-DE, el-GR, en-GB, en-US, es-ES, fr-FR, ga-IE, hr-HR, hu-HU, it-IT, ja-JP, ko-KR, ml-IN, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sv-SE, zh-CN, and zh-TW. - Updated chat store to handle the marking of stopped responses with a specific marker. - Enhanced chat view to render the stopped badge correctly after a stream is canceled. - Added an end-to-end test to verify the functionality of stopping a chat stream and displaying the appropriate UI elements. - Updated Vite configuration to allow dynamic API proxy target.
1 parent 4201b57 commit e25124d

275 files changed

Lines changed: 42119 additions & 2860 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Supports building single binary with embedded frontend
33

44
.PHONY: all build build-frontend build-frontend-embedded build-web-module build-backend dev clean help
5+
.PHONY: workspace-templates-bundle embedded-asset-bundles
56
.PHONY: build-linux build-linux-bare build-darwin build-windows build-all
67
.PHONY: tauri-dev tauri-build tauri-build-debug tauri-clean tauri-sidecar tauri-verify-macos-package
78
.PHONY: build-blue-lib-macos build-blue-lib-arm64 build-blue-lib-x64 build-blue-lib-universal
@@ -32,6 +33,7 @@ ZIMAOS_RAW_BINARY ?= $(DIST_DIR)/zimaos-blue-linux-amd64
3233
ZIMAOS_RAW_OUTPUT ?= $(DIST_DIR)/$(ZIMAOS_RAW_MODULE).raw
3334

3435
# Go build flags
36+
GO_BUILD_FLAGS ?= -trimpath -buildvcs=false
3537
LDFLAGS := -s -w
3638
LDFLAGS += -X main.version=$(VERSION)
3739
LDFLAGS += -X main.buildTime=$(BUILD_TIME)
@@ -75,6 +77,14 @@ copy-skills:
7577
@mkdir -p $(SKILLS_EMBED)
7678
@cp -r $(SKILLS_SRC)/* $(SKILLS_EMBED)/
7779

80+
# Regenerate the compressed workspace templates bundle used by go:embed.
81+
workspace-templates-bundle:
82+
@echo "Generating workspace templates bundle..."
83+
@cd $(SERVER_DIR) && go run ./tools/generate_embed_bundle -source internal/workspace/templates -output internal/workspace/templates_bundle.tar.gz -prefix templates
84+
85+
# Regenerate compressed embedded asset bundles that live fully inside server/.
86+
embedded-asset-bundles: workspace-templates-bundle
87+
7888
# Regenerate the canonical provider catalog JSON and sync the embedded fallback copy.
7989
provider-catalog:
8090
@echo "Generating provider catalog..."
@@ -89,7 +99,8 @@ provider-catalog-check:
8999
build-backend:
90100
@echo "Building backend..."
91101
@mkdir -p $(DIST_DIR)
92-
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue ./cmd/blue
102+
@$(MAKE) embedded-asset-bundles
103+
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue ./cmd/blue
93104
@echo "Binary size: $$(du -h $(DIST_DIR)/zimaos-blue | cut -f1)"
94105

95106
# Development mode (run frontend and backend separately)
@@ -102,16 +113,18 @@ dev:
102113
build-linux: build-frontend copy-frontend copy-skills
103114
@echo "Building for Linux (amd64)..."
104115
@mkdir -p $(DIST_DIR)
105-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-linux-amd64 ./cmd/blue
116+
@$(MAKE) embedded-asset-bundles
117+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-linux-amd64 ./cmd/blue
106118

107119
build-linux-bare: copy-skills
108120
@echo "Building bare Linux binary for ZimaOS raw (amd64)..."
109121
@mkdir -p $(DIST_DIR)
122+
@$(MAKE) embedded-asset-bundles
110123
@cd $(SERVER_DIR) && \
111124
if [ "$(shell uname -s)" = "Linux" ]; then \
112-
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags 'fts5' -ldflags "$(LDFLAGS)" -o $(ZIMAOS_RAW_BINARY) ./cmd/blue; \
125+
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build $(GO_BUILD_FLAGS) -tags 'fts5' -ldflags "$(LDFLAGS)" -o $(ZIMAOS_RAW_BINARY) ./cmd/blue; \
113126
elif command -v zig >/dev/null 2>&1; then \
114-
CC="zig cc -target x86_64-linux-gnu" CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags 'fts5' -ldflags "$(LDFLAGS)" -o $(ZIMAOS_RAW_BINARY) ./cmd/blue; \
127+
CC="zig cc -target x86_64-linux-gnu" CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build $(GO_BUILD_FLAGS) -tags 'fts5' -ldflags "$(LDFLAGS)" -o $(ZIMAOS_RAW_BINARY) ./cmd/blue; \
115128
else \
116129
echo "zig is required to cross-compile linux/amd64 with CGO from $(shell uname -s)" >&2; \
117130
exit 1; \
@@ -120,32 +133,37 @@ build-linux-bare: copy-skills
120133
build-linux-arm64: build-frontend copy-frontend copy-skills
121134
@echo "Building for Linux (arm64)..."
122135
@mkdir -p $(DIST_DIR)
123-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-linux-arm64 ./cmd/blue
136+
@$(MAKE) embedded-asset-bundles
137+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-linux-arm64 ./cmd/blue
124138

125139
build-darwin: build-frontend copy-frontend copy-skills
126140
@echo "Building for macOS (amd64)..."
127141
@mkdir -p $(DIST_DIR)
128-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-darwin-amd64 ./cmd/blue
142+
@$(MAKE) embedded-asset-bundles
143+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-darwin-amd64 ./cmd/blue
129144

130145
build-darwin-arm64: build-frontend copy-frontend copy-skills
131146
@echo "Building for macOS (arm64)..."
132147
@mkdir -p $(DIST_DIR)
133-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-darwin-arm64 ./cmd/blue
148+
@$(MAKE) embedded-asset-bundles
149+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-darwin-arm64 ./cmd/blue
134150

135151
build-windows: build-frontend copy-frontend copy-skills
136152
@echo "Building for Windows (amd64)..."
137153
@mkdir -p $(DIST_DIR)
138-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-windows-amd64.exe ./cmd/blue
154+
@$(MAKE) embedded-asset-bundles
155+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-windows-amd64.exe ./cmd/blue
139156

140157
# Build for all platforms
141158
build-all: build-frontend copy-frontend copy-skills
142159
@echo "Building for all platforms..."
143160
@mkdir -p $(DIST_DIR)
144-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-linux-amd64 ./cmd/blue
145-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-linux-arm64 ./cmd/blue
146-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-darwin-amd64 ./cmd/blue
147-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-darwin-arm64 ./cmd/blue
148-
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-windows-amd64.exe ./cmd/blue
161+
@$(MAKE) embedded-asset-bundles
162+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-linux-amd64 ./cmd/blue
163+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-linux-arm64 ./cmd/blue
164+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-darwin-amd64 ./cmd/blue
165+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-darwin-arm64 ./cmd/blue
166+
@cd $(SERVER_DIR) && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(DIST_DIR)/zimaos-blue-windows-amd64.exe ./cmd/blue
149167
@echo "All builds complete!"
150168
@ls -lh $(DIST_DIR)/
151169

@@ -204,16 +222,17 @@ TAURI_BIN_DIR := $(TAURI_DIR)/src-tauri/bin
204222
tauri-sidecar: build-frontend copy-frontend copy-skills
205223
@echo "Building Go sidecar for Tauri..."
206224
@mkdir -p $(TAURI_BIN_DIR)
225+
@$(MAKE) embedded-asset-bundles
207226
ifeq ($(shell uname -s),Darwin)
208227
ifeq ($(shell uname -m),arm64)
209-
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o $(TAURI_BIN_DIR)/blue-server-aarch64-apple-darwin ./cmd/blue
228+
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(TAURI_BIN_DIR)/blue-server-aarch64-apple-darwin ./cmd/blue
210229
else
211-
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o $(TAURI_BIN_DIR)/blue-server-x86_64-apple-darwin ./cmd/blue
230+
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(TAURI_BIN_DIR)/blue-server-x86_64-apple-darwin ./cmd/blue
212231
endif
213232
else ifeq ($(shell uname -s),Linux)
214-
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o $(TAURI_BIN_DIR)/blue-server-x86_64-unknown-linux-gnu ./cmd/blue
233+
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(TAURI_BIN_DIR)/blue-server-x86_64-unknown-linux-gnu ./cmd/blue
215234
else
216-
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o $(TAURI_BIN_DIR)/blue-server-x86_64-pc-windows-msvc.exe ./cmd/blue
235+
@cd $(SERVER_DIR) && CGO_ENABLED=0 go build $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS)" -o $(TAURI_BIN_DIR)/blue-server-x86_64-pc-windows-msvc.exe ./cmd/blue
217236
endif
218237
@echo "Sidecar built successfully"
219238

@@ -347,7 +366,7 @@ build-blue-lib-arm64:
347366
@echo "Building Go static library for macOS ARM64..."
348367
@mkdir -p $(TAURI_LIB_DIR)
349368
@cd $(SERVER_DIR) && CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 \
350-
go build -buildmode=c-archive \
369+
go build $(GO_BUILD_FLAGS) -buildmode=c-archive \
351370
-tags 'fts5' \
352371
-ldflags "$(LDFLAGS)" \
353372
-o $(TAURI_LIB_DIR)/libblue_arm64.a \
@@ -360,7 +379,7 @@ build-blue-lib-x64:
360379
@echo "Building Go static library for macOS x64..."
361380
@mkdir -p $(TAURI_LIB_DIR)
362381
@cd $(SERVER_DIR) && CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 \
363-
go build -buildmode=c-archive \
382+
go build $(GO_BUILD_FLAGS) -buildmode=c-archive \
364383
-tags 'fts5' \
365384
-ldflags "$(LDFLAGS)" \
366385
-o $(TAURI_LIB_DIR)/libblue_x64.a \
@@ -388,15 +407,15 @@ build-blue-lib-macos:
388407
ifeq ($(shell uname -m),arm64)
389408
@echo "Detected Apple Silicon, building ARM64 library..."
390409
@cd $(SERVER_DIR) && CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 \
391-
go build -buildmode=c-archive \
410+
go build $(GO_BUILD_FLAGS) -buildmode=c-archive \
392411
-tags 'fts5' \
393412
-ldflags "$(LDFLAGS)" \
394413
-o $(TAURI_LIB_DIR)/libblue.a \
395414
./cmd/bluelib
396415
else
397416
@echo "Detected Intel, building x64 library..."
398417
@cd $(SERVER_DIR) && CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 \
399-
go build -buildmode=c-archive \
418+
go build $(GO_BUILD_FLAGS) -buildmode=c-archive \
400419
-tags 'fts5' \
401420
-ldflags "$(LDFLAGS)" \
402421
-o $(TAURI_LIB_DIR)/libblue.a \

assets/skills/deep_research/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ Key parameters:
8080
- `time_windows` (optional): array of timeline windows
8181
- `report_style` (optional): typically `summary` or `timeline`
8282

83+
Auto recent-discussion routing:
84+
85+
- Queries like `What are people saying in the last 30 days about ZimaOS?`
86+
- Queries like `最近30天大家怎么说 ZimaOS?`
87+
88+
stay on the public Research entry. Blue now detects that intent and internally switches to a native recent multi-site retrieval profile across public web, Reddit, Hacker News, GitHub, Polymarket, X, TikTok, Instagram, and Bluesky. Known YouTube URLs are added as enrichment when they are already present in the request. There is no separate public `last30days` mode or command.
89+
8390
Behavior:
8491

8592
1. Plan sub-questions

assets/skills/office_docs/SKILL.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
name: office_docs
3+
version: "1.0.0"
4+
description: "Use when the task involves creating, reading, editing, validating, or reformatting .docx, .xlsx, .pptx, or .pdf workspace artifacts, especially when the user also needs host application or window interaction that should go through a11y."
5+
invocation: "blue docx action=create path=reports/brief.docx title='Launch Brief' content='# Summary'"
6+
examples:
7+
- "blue docx action=create path=reports/brief.docx title='Launch Brief' content='# Summary'"
8+
- "blue xlsx action=create path=reports/scorecard.xlsx sheets='[{\"name\":\"Scorecard\",\"rows\":[{\"Metric\":\"Launch\",\"Value\":\"Ready\"}]}]'"
9+
- "blue a11y action=snapshot"
10+
capability_tags:
11+
- documents
12+
- office
13+
- docx
14+
- xlsx
15+
- pptx
16+
- pdf
17+
- a11y
18+
interaction_mode: interactive
19+
card_support: streaming
20+
---
21+
22+
# Office Docs
23+
24+
Route native workspace document work through the dedicated document tools, and switch to `a11y` when the task crosses from file manipulation into live host-window interaction.
25+
26+
## Setup
27+
28+
No external CLI is required. Use the built-in `docx`, `xlsx`, `pptx`, `pdf`, and `a11y` surfaces.
29+
30+
---
31+
32+
## Task Routing
33+
34+
| User Intent | Action |
35+
|-------------|--------|
36+
| Create or rewrite a Word-style report | `blue docx action=create ...` or `blue docx action=edit ...` |
37+
| Apply placeholders to an existing template | `blue docx action=apply_template ...` |
38+
| Create or update a spreadsheet | `blue xlsx action=create ...`, `edit`, `append_rows`, or `update_cells` |
39+
| Create or update a slide deck | `blue pptx action=create ...`, `edit`, `replace_text`, or slide mutation actions |
40+
| Read, inspect, create, fill, or reformat PDFs | `blue pdf action=read|info|create|fill|reformat ...` |
41+
| Focus a desktop app window, inspect host UI, click menus/buttons, scroll, type, or capture a host-window screenshot | `blue a11y action=windows|focus|snapshot|snapshot_interactive|act|scroll|key|screenshot ...` |
42+
| Work on both the file artifact and the live desktop app | Use `docx` / `xlsx` / `pptx` / `pdf` for the file, and use `a11y` for the host window steps |
43+
44+
---
45+
46+
## Command Usage
47+
48+
### DOCX
49+
50+
```bash
51+
blue docx action=create path=reports/brief.docx title="Launch Brief" content="# Summary"
52+
blue docx action=edit path=reports/brief.docx replacements='{"{{status}}":"Ready"}'
53+
blue docx action=validate path=reports/brief.docx
54+
```
55+
56+
### XLSX
57+
58+
```bash
59+
blue xlsx action=create path=reports/scorecard.xlsx sheets='[{"name":"Scorecard","rows":[{"Metric":"Launch","Value":"Ready"}]}]'
60+
blue xlsx action=append_rows path=reports/scorecard.xlsx sheet="Scorecard" rows='[{"Metric":"Risk","Value":"Low"}]'
61+
blue xlsx action=update_cells path=reports/scorecard.xlsx sheet="Scorecard" cells='{"B2":"Green"}'
62+
```
63+
64+
### PPTX
65+
66+
```bash
67+
blue pptx action=create path=decks/launch_plan.pptx title="Launch Plan" sections='[{"heading":"Overview","bullets":["Status","Risks","Timeline"]}]'
68+
blue pptx action=edit path=decks/launch_plan.pptx replacements='{"{{owner}}":"Platform Team"}'
69+
blue pptx action=validate path=decks/launch_plan.pptx
70+
```
71+
72+
### PDF
73+
74+
```bash
75+
blue pdf action=read path=reports/brief.pdf
76+
blue pdf action=create path=reports/brief.pdf title="Launch Brief" content="# Summary"
77+
blue pdf action=reformat input_path=reports/source.pdf output_path=reports/source_clean.pdf
78+
```
79+
80+
### A11y For Host Apps And Windows
81+
82+
```bash
83+
blue a11y action=windows
84+
blue a11y action=focus window_id=12345
85+
blue a11y action=snapshot
86+
blue a11y action=act params.ref=@5 params.act_type=click
87+
blue a11y action=key params.keys='["cmd","s"]'
88+
blue a11y action=screenshot
89+
```
90+
91+
---
92+
93+
## Notes
94+
95+
- Prefer the native document tools when the source of truth is the workspace file itself.
96+
- Prefer `a11y` when the user explicitly wants to operate a desktop application, native window, menu, button, dialog, or scrollable host UI.
97+
- Do not try to use `docx`, `xlsx`, `pptx`, or `pdf` to click through native application chrome; that is `a11y` work.
98+
- Do not use `a11y` as a substitute for structured file edits when the artifact can be produced directly with `docx`, `xlsx`, `pptx`, or `pdf`.

assets/skills/web_query/SKILL.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,8 @@ Parameters:
6464
- `web_query` is the canonical public web skill.
6565
- Legacy `web_search`, `web_fetch`, and `web_read` names are compatibility aliases and should not be used as the primary route in new prompts or harness cases.
6666
- If `web_query` reports login wall, challenge, or browser-required warnings, switch to `browser`.
67+
- Blue also uses an internal recent multi-site retrieval profile inside the web layer for Research requests such as `what are people saying in the last 30 days` / `最近30天大家怎么说`.
68+
- That recent profile is native to `web_query` internals, not a separate public mode or command.
69+
- The current native source mix includes public web, Reddit, Hacker News, GitHub, Polymarket, X, TikTok, Instagram, and Bluesky. Known YouTube URLs can be added as enrichment when they are already present in the request.
70+
- For X, TikTok, Instagram, and Bluesky, Blue currently relies on public-page discovery plus browser-assisted reading rather than a separate public platform command.
71+
- If the user only wants a few links or one readable page, keep using ordinary `web_query input=...` calls rather than trying to surface the internal recent profile directly.

build.bat

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ set "CXX=zig c++ -target x86_64-windows-gnu"
2121
set "CGO_LDFLAGS=-static-libgcc -static-libstdc++"
2222
set "CGO_CFLAGS=-O2"
2323
set "CGO_CXXFLAGS=-O2"
24+
set "GO_BUILD_FLAGS=-trimpath -buildvcs=false"
2425

2526
if "%COMMAND%"=="" set "COMMAND=prd"
2627

@@ -292,7 +293,7 @@ echo [OK] Skills copied to server\internal\skill\embedded\skills
292293
:: Build server with pack-dist (appends web assets to binary)
293294
echo [INFO] Building Go server...
294295
cd /d "%PROJECT_ROOT%server"
295-
go build -ldflags="-s -w" -o bin\blue.exe ./cmd/blue
296+
go build %GO_BUILD_FLAGS% -ldflags="-s -w" -o bin\blue.exe ./cmd/blue
296297
if errorlevel 1 (
297298
echo [ERROR] Failed to build server
298299
exit /b 1
@@ -360,7 +361,7 @@ echo [OK] Skills copied to server\internal\skill\embedded\skills
360361
:: Build server with pack-dist (appends web assets to binary)
361362
echo [INFO] Building Go server (production mode)...
362363
cd /d "%PROJECT_ROOT%server"
363-
go build -ldflags="-s -w" -o bin\blue.exe ./cmd/blue
364+
go build %GO_BUILD_FLAGS% -ldflags="-s -w" -o bin\blue.exe ./cmd/blue
364365
if errorlevel 1 (
365366
echo [ERROR] Failed to build server
366367
exit /b 1

build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ COMMAND="${1:-prd}"
1212
# Enable CGO by default for production-capable builds.
1313
# Allow explicit override from environment when needed.
1414
export CGO_ENABLED="${CGO_ENABLED:-1}"
15+
GO_BUILD_FLAGS="-trimpath -buildvcs=false"
1516

1617
HOST_UNAME_S="$(uname -s)"
1718
if [ "$HOST_UNAME_S" = "Darwin" ]; then
@@ -151,7 +152,7 @@ start_server() {
151152
make build-bluecli
152153
binary_path="./bin/bluecli"
153154
else
154-
go build -tags "$GO_SERVER_TAGS" -o blue ./cmd/blue
155+
go build $GO_BUILD_FLAGS -tags "$GO_SERVER_TAGS" -o blue ./cmd/blue
155156
fi
156157
success "Server built successfully"
157158

@@ -209,7 +210,7 @@ start_all() {
209210
make build-bluecli
210211
binary_path="./bin/bluecli"
211212
else
212-
go build -tags "$GO_SERVER_TAGS" -o blue ./cmd/blue
213+
go build $GO_BUILD_FLAGS -tags "$GO_SERVER_TAGS" -o blue ./cmd/blue
213214
fi
214215
run_binary "$binary_path"
215216
}
@@ -359,7 +360,7 @@ build_all() {
359360
if [ "$HOST_UNAME_S" = "Darwin" ]; then
360361
EXTRA_LDFLAGS="-extldflags '-sectcreate __TEXT __info_plist Info.plist'"
361362
fi
362-
go build -tags "$GO_SERVER_TAGS" -ldflags="-s -w $EXTRA_LDFLAGS" -o blue ./cmd/blue
363+
go build $GO_BUILD_FLAGS -tags "$GO_SERVER_TAGS" -ldflags="-s -w $EXTRA_LDFLAGS" -o blue ./cmd/blue
363364

364365
# macOS: create .app bundle + codesign (TCC needs proper bundle for speech recognition)
365366
if [ "$(uname -s)" = "Darwin" ]; then

0 commit comments

Comments
 (0)