Commit Graph

70 Commits

Author SHA1 Message Date
Peter Steinberger
5918def440 fix: honor gateway service override labels 2026-01-13 05:58:49 +00:00
Peter Steinberger
78627ce7c2 fix: tighten custom bind probing (#740) (thanks @jeffersonwarrior) 2026-01-13 05:21:59 +00:00
Jefferson Warrior
c851bdd47a feat: add Tailscale binary detection, IP binding modes, and health probe password fix
This PR includes three main improvements:

1. Tailscale Binary Detection with Fallback Strategies
   - Added findTailscaleBinary() with multi-strategy detection:
     * PATH lookup via 'which' command
     * Known macOS app path (/Applications/Tailscale.app/Contents/MacOS/Tailscale)
     * find /Applications for Tailscale.app
     * locate database lookup
   - Added getTailscaleBinary() with caching
   - Updated all Tailscale operations to use detected binary
   - Added TUI warning when Tailscale binary not found for serve/funnel modes

2. Custom Gateway IP Binding with Fallback
   - New bind mode "custom" allowing user-specified IP with fallback to 0.0.0.0
   - Removed "tailnet" mode (folded into "auto")
   - All modes now support graceful fallback: custom (if fail → 0.0.0.0), loopback (127.0.0.1 → 0.0.0.0), auto (tailnet → 0.0.0.0), lan (0.0.0.0)
   - Added customBindHost config option for custom bind mode
   - Added canBindTo() helper to test IP availability before binding
   - Updated configure and onboarding wizards with new bind mode options

3. Health Probe Password Auth Fix
   - Gateway probe now tries both new and old passwords
   - Fixes issue where password change fails health check if gateway hasn't restarted yet
   - Uses nextConfig password first, falls back to baseConfig password if needed

Files changed:
- src/infra/tailscale.ts: Binary detection + caching
- src/gateway/net.ts: IP binding with fallback logic
- src/config/types.ts: BridgeBindMode type + customBindHost field
- src/commands/configure.ts: Health probe dual-password try + Tailscale detection warning + bind mode UI
- src/wizard/onboarding.ts: Tailscale detection warning + bind mode UI
- src/gateway/server.ts: Use new resolveGatewayBindHost
- src/gateway/call.ts: Updated preferTailnet logic (removed "tailnet" mode)
- src/commands/onboard-types.ts: Updated GatewayBind type
- src/commands/onboard-helpers.ts: resolveControlUiLinks updated
- src/cli/*.ts: Updated bind mode casts
- src/gateway/call.test.ts: Removed "tailnet" mode test
2026-01-13 05:20:02 +00:00
Peter Steinberger
231d2d5fdf fix(config): require doctor for invalid configs (#764 — thanks @mukhtharcm) 2026-01-13 01:18:18 +00:00
Ayaan Zaidi
4bba49770d fix: clear gateway auth on off selection 2026-01-12 22:59:37 +05:30
Peter Steinberger
7db1cbe178 fix: improve daemon node selection 2026-01-12 08:33:32 +00:00
Peter Steinberger
d0ba56c5ac fix: set default model after auth choice 2026-01-12 08:04:32 +00:00
Peter Steinberger
018f7aa4df fix: streamline configure section flow 2026-01-12 07:47:15 +00:00
Peter Steinberger
744fadbded feat: loop configure section picker 2026-01-12 06:13:00 +00:00
Peter Steinberger
873cee6947 feat: streamline wizard selection prompts 2026-01-12 05:08:07 +00:00
Peter Steinberger
29884f8d6f fix: wrap clack notes for cleaner boxes 2026-01-11 04:23:43 +01:00
Peter Steinberger
e0bf86f06c feat: improve gateway services and auto-reply commands 2026-01-11 02:27:16 +01:00
Peter Steinberger
b0b4b33b6b fix: update gateway auth docs and clients 2026-01-11 01:51:24 +01:00
Jonáš Jančařík
dcc41e932d feat: add shared model picker to configure/onboarding 2026-01-10 16:32:59 +00:00
Peter Steinberger
53a0c966a5 refactor: unify configure auth choice 2026-01-10 16:14:49 +01:00
mneves75
3e2e3eb023 Config: add MiniMax direct API authentication option
Makes apiKey optional in ModelProviderConfig so MiniMax can use auth
profiles or environment variables (MINIMAX_API_KEY) instead of requiring
explicit config.

Changes:
- src/config/types.ts: apiKey changed from required to optional
- src/config/zod-schema.ts: use z.string().min(1).optional() for validation
- src/commands/configure.ts: add minimax-api auth choice in wizard
- src/commands/onboard-auth.ts: MiniMax provider omits apiKey (uses env/auth)
- patches/@mariozechner__pi-ai@0.42.1.patch: map minimax → MINIMAX_API_KEY

Auth Resolution Order (unchanged):
1. Auth profiles (highest priority)
2. Environment variables (MINIMAX_API_KEY, etc.)
3. Custom provider apiKey from models.json (lowest priority)
2026-01-10 10:57:09 -03:00
Peter Steinberger
63b0a16357 feat(cli): colorize gateway health + daemon output 2026-01-10 03:01:27 +01:00
Magi Metal
a399fa36c8 feat(onboard): add OpenCode Zen as model provider 2026-01-10 01:09:34 +01:00
Peter Steinberger
564caf49bb feat: add config --section 2026-01-09 21:27:51 +01:00
Peter Steinberger
c3083f0186 feat: add setup-token + token auth 2026-01-09 17:50:34 +01:00
Peter Steinberger
fd9e2d3def feat: remove provider config in configure 2026-01-09 16:55:47 +01:00
Peter Steinberger
c4c0f1349a fix: keep build green after main rebase (#570) (thanks @azade-c) 2026-01-09 15:40:36 +01:00
Peter Steinberger
fc7580ab5e fix: remove configure control-ui prompt 2026-01-09 15:17:20 +01:00
Peter Steinberger
7b81d97ec2 feat: wire multi-agent config and routing
Co-authored-by: Mark Pors <1078320+pors@users.noreply.github.com>
2026-01-09 12:48:42 +00:00
Tobias Bischoff
a0bb2bccaf Onboarding: add MiniMax hosted API key option 2026-01-09 13:39:28 +01:00
Peter Steinberger
0c167e85af style: sort configure imports 2026-01-09 10:03:52 +01:00
Peter Steinberger
827e68eadd feat: improve auth setup flows 2026-01-09 09:59:58 +01:00
Peter Steinberger
89132fdd25 chore(lint): biome import order 2026-01-09 09:27:42 +01:00
Peter Steinberger
8d67bd2889 feat: apply lobster palette to prompts 2026-01-09 09:05:24 +01:00
Peter Steinberger
77d4bb8dfe feat: update token auth flow 2026-01-09 08:13:05 +01:00
Peter Steinberger
2062165cd3 chore: add configure section hints 2026-01-09 08:13:04 +01:00
Peter Steinberger
e1789ba9e5 fix: set gemini default model for api-key auth (#489) - thanks @jonasjancarik 2026-01-09 02:49:42 +01:00
Jonáš Jančařík
302d51fd40 feat: add Gemini API key onboarding 2026-01-09 02:45:15 +01:00
Peter Steinberger
1f215848be chore(test): align auth choice options formatting 2026-01-08 23:18:33 +01:00
Peter Steinberger
b01d7e39d5 fix(onboarding): preflight claude cli keychain 2026-01-08 23:18:33 +01:00
Peter Steinberger
1cf8503017 fix(daemon): audit runtime best practices 2026-01-08 22:18:07 +00:00
Peter Steinberger
dc3e3f27d4 style: apply lint fixes 2026-01-08 04:44:15 +00:00
Peter Steinberger
28cd2e4c24 feat: refresh CLI output styling and progress 2026-01-08 05:20:39 +01:00
Peter Steinberger
7a917602c5 feat(auth): sync OAuth from Claude/Codex CLIs
Add source profiles anthropic:claude-cli and openai-codex:codex-cli; surface them in onboarding/configure.

Co-authored-by: pepicrft <pepicrft@users.noreply.github.com>
2026-01-07 10:47:57 +01:00
Peter Steinberger
2937c4861f fix(auth): doctor-migrate anthropic oauth profiles 2026-01-07 06:31:02 +00:00
Randy Torres
ff79db0a99 fix(auth): use anthropic oauth email profile
Use Anthropic OAuth profile email as the profile identifier when available. This fixes cases where Anthropic returns an email-based profile id rather than an explicit id field.
2026-01-07 06:31:02 +00:00
Peter Steinberger
b88c4e9d20 chore: clean up lint and scratchpad 2026-01-07 01:28:46 +00:00
Peter Steinberger
62112d9978 feat: add onboarding doc links 2026-01-07 01:19:31 +01:00
Peter Steinberger
02c9cf0ff4 chore: remove duplicate daemon runtime imports 2026-01-07 00:14:08 +01:00
Peter Steinberger
55278c1c71 feat: add daemon runtime prompts 2026-01-06 23:51:00 +01:00
Peter Steinberger
8d50d08936 style: format daemon runtime changes 2026-01-06 23:29:38 +01:00
Peter Steinberger
707f7918bc feat: add gateway daemon runtime selector 2026-01-06 23:27:58 +01:00
Peter Steinberger
cf1a1d107e fix: add OpenAI Codex OAuth to configure 2026-01-06 09:13:51 +01:00
Muhammed Mukhthar CM
06df6a955a feat: use email-based profile IDs for OAuth providers
Changes writeOAuthCredentials and applyAuthProfileConfig calls to use
the email from OAuth response as part of the profile ID instead of
hardcoded ":default".

This enables multiple accounts per provider - each login creates a
separate profile (e.g., google-antigravity:user@gmail.com) instead
of overwriting the same :default profile.

Affected files:
- src/commands/onboard-auth.ts (generic writeOAuthCredentials)
- src/commands/configure.ts (Antigravity flow)
- src/wizard/onboarding.ts (Antigravity flow)
2026-01-06 05:17:59 +00:00
Peter Steinberger
e73573eaea fix: clean model config typing 2026-01-06 01:08:36 +00:00