Files
ratatoskr-go/.serena/memories/tech_stack.md
ki.sagidullin 5c82229a00
Some checks failed
CI / test (pull_request) Failing after 1m13s
CI / build-and-package (amd64, linux) (pull_request) Failing after 1m2s
CI / build-and-package (amd64, windows) (pull_request) Successful in 28s
chore(serena): обновить память проекта (onboarding)
2026-08-21 00:08:45 +05:00

32 lines
2.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# tech_stack
## Язык / рантайм
- Go **1.25.0** (go.mod `go 1.25.0`, module `github.com/kamelion/ratatoskr-go`).
- Headless-сборка — статический бинарь `CGO_ENABLED=0`. Windows-сборка с UI — cgo (Fyne/GLFW) + MinGW-w64/gcc.
- Локальный Go-тулчейн на хосте: `export PATH=/opt/data/.local/go/bin:$PATH` (go1.25.0 linux/amd64). На Windows — обычный system Go.
## Основные зависимости (go.mod)
- `fyne.io/fyne/v2 v2.6.0` — desktop UI (cgo/GLFW; платформа Windows + Linux). Не собирается в CI (headless).
- `gopkg.in/yaml.v3 v3.0.1` — парсинг config.yaml.
- `modernc.org/sqlite v1.56.0` — SQLite без CGO (чистый Go).
- (indirect) google/uuid, go-humanize, go-text/typesetting, x/sys, x/net, modernc.org/libc и пр.
## Внешние процессы
- **opencode** (opencode.ai) — субагенты (analyst/dev/reviewer). Управляется через internal/opencode (Runner, Pool, LiveRegistry). Требуемая версия **>= 1.18.18** (v2 HTTP API `/api/*`).
- Настройки в конфиге: `opencode.bin / config / config_dir / hard_timeout / idle_timeout / poll_ms` + `opencode.server` (hostname, port, password).
- Подробно — `mem:core`.
## Сборка / Makefile
- `make build` — go build `-ldflags="-s -w -X main.version=commit-<sha7> -X main.updateToken=..." -o ratatoskr ./cmd/ratatoskr/`.
- `make test``go test ./... -v -count=1 -timeout 120s`.
- `make vet``go vet ./...`; `make fmt``go fmt ./...`.
- `make run` — build + `./ratatoskr -config config.yaml`.
- `make cross` — linux/amd64 + windows/amd64 (headless, БЕЗ Fyne-UI; для UI нужен cgo).
- **Fyne-UI (Windows) собирается вручную** на машине с MinGW:
`scripts/build-publish-ui.ps1` (cgo) — сборка + публикация в Gitea в версию `commit-<sha7>`.
Требует `scripts/.gitea-creds` (git-ignored) и gcc в PATH. См. `mem:toolchain/cgo-winlibs-gcc`.
## CI (.gitea/workflows/ci.yaml)
- Job `test`: `go test ./...` + `go vet ./...` (setup-go '1.23', check-latest).
- Job `build-and-package` (matrix linux/amd64 + windows/amd64): собирает headless-бинарь с ldflag update_token, публикует на `main` в версию `commit-<sha7>/` (+ companion `.version`/`.sha256`).
- Секреты: `TC_GITEA_TOKEN` (write:packages), `TC_UPDATE_TOKEN` (read:package), vars `GIT_MAIN_URL`.