mirror of
https://github.com/anand34577/ferrum.git
synced 2026-09-16 23:55:09 +00:00
846cb8ce63
Ships the official Needle 2 CLI binary (Apache-2.0) baked into the ferrum binary itself for windows/amd64, linux/amd64, linux/arm64, and darwin/arm64 via go:embed behind per-platform build tags. No download, no FERRUM_NEEDLE_BIN, no manual provider setup on those platforms. - internal/needle: resolveBinPath prefers an explicit FERRUM_NEEDLE_BIN, otherwise extracts the embedded binary to a cache file on first use. - Fixed a port collision: Needle's --serve defaulted to :8080, the same default as ferrum's own server; it now runs on a dedicated port. - Fixed the real 'assistant times out' bug: Needle's tool-retrieval does a one-time embedding pass on its first request once the tool catalog exceeds 5 tools (ferrum declares 10), which routinely took longer than the old readiness check's 500ms-per-attempt retry loop allowed. Each cancelled attempt kept occupying Needle's single-threaded request loop, so retries piled up and never let a real response through. Replaced with two phases: cheap/retryable raw TCP dials until the socket accepts a connection, then exactly one real request allowed to run for the full startup budget. Subprocess stdout/stderr are now captured so a future failure surfaces a real reason instead of a bare timeout. - seedBuiltinNeedleProvider now runs on every startup (not just fresh installs), idempotently upserting the built-in provider and always reasserting its model as the global default AI assistant. - .gitignore: carved out an exception for the bundled Windows binary, which the blanket *.exe rule would otherwise have silently excluded.