13 Commits
Author SHA1 Message Date
nandi 83378138d7 fix: raise default Sprite memory ceiling to 64GB (uncapped)
The Fly default ceiling of 8192 MB starved bursty Paseo workloads on Sprites (paseo-agent-2f0f52: 110M page reclaims, exec plane hung). The Sprites API requires a positive limit_mb, so a large ceiling (65536) with autoscale on is the practical uncapped mode. memoryLimitMB=0 now maps to 65536 instead of 8192; updated settings-screen hint accordingly. Both live Sprites already re-policed to {limit_mb: 65536, autoscale: true} via API.
2026-11-20 16:56:05 -08:00
nandi ec93b5a215 feat: lease-based Sprite keepalive with expiry and renewal
Replace forever-on heartbeat billing with a finite lease system:
callers request a window of Sprite time and renew as needed; on
expiry the heartbeat session stops and the Sprite auto-pauses.

- SpriteLeaseStore (server/sprite-lease-store.ts): refcounted
  leases with TTL clamping ([60s, 8h], default 15min) persisted
  to sprite-leases.json
- SpriteHostKeepalive reimplemented on leases; legacy
  keepalive-hosts manifest seeds one final window then clears
- Provider: session.open acquires, session.prompt renews,
  session.close releases
- sprite_* tools and RPCs acquire/renew/release via
  sprites.lease.acquire/renew/release/list
- destroy/archive release leases before deleting Sprites
- Settings: defaultLeaseMinutes (1-480, default 30), schema v2
2026-11-20 14:25:36 -08:00
nandi 4ae69f54ce feat: autoscale Sprite memory via Resources Policy
Sprites have no size presets and CPU/storage are fixed (8 vCPU / 100 GB),
so memory policy (limit + autoscale) is the sizing lever for bursty
unknown workloads. ensureSprite now applies idempotently, non-failing:

- memoryAutoscale (default true) lets the platform grow memory under
  pressure instead of thrashing at a fixed cap
- memoryLimitMB (0 = Fly default ceiling 8192) is the peak ceiling
- Settings UI exposes both controls
2026-11-20 13:41:25 -08:00
nandi b2c8f4492d fix: configure plugin build and runtime deps for git-repo installs 2026-11-18 19:26:51 -08:00
nandi 53f3e1b621 feat: auto-sync Antigravity OAuth auth to ephemeral Sprites
- Add server/antigravity-auth.ts to resolve Antigravity OAuth credentials
  from OpenBao (ANTIGRAVITY_OAUTH_TOKEN / AGY_OAUTH_TOKEN), env, local OS
  keyring (secret-tool / macOS security), or local token file and stream
  them over stdin (umask 077, mode 0600, atomic replace) into
  ~/.gemini/antigravity-cli/antigravity-oauth-token on Sprites
- Cache full OpenBao KV secret map in OpenBaoClient and add
  getOptionalSecretKey for zero-extra-request lookup
- Wire sync into SpritesManager.ensureSprite and restart Sprite Paseo
  daemon worker in ensureSpriteHost when credentials change
- Add syncAntigravityAuth setting (default true) with Settings UI toggle
- Add Antigravity to PROVIDER_CHOICES and prioritize it in PREFERRED_PROVIDERS
2026-11-18 19:18:47 -08:00
nandi 0b923ff019 feat: add Sprite host keepalive to prevent auto-pause
- Add SpriteHostKeepalive (server/sprite-keepalive.ts) maintaining a
  lightweight heartbeat session per enabled Sprite host so Fly Sprites
  does not auto-pause and drop the Paseo relay connection
- Wire keepalive into agent hooks, RPC handlers, and host
  connect/launch paths via onHostReady/onHostRemoved hooks
- Reconcile every 30s against ~/.paseo/hosts.json enabled hosts with
  backoff reconnect; persist desired set to plugin-data
- Add keepSpriteHostsAwake setting (default true) with settings UI
  toggle and live subscription
2026-11-18 19:08:08 -08:00
nandi 2ded63183b fix: resolve Paseo CLI via npm prefix fallback in Sprites and use bash -c for exec
- Add RESOLVE_PASEO_BIN_SNIPPET to locate paseo via npm prefix -g and
  symlink into ~/.local/bin for subsequent calls
- Switch Sprite exec from bash -lc to bash -c so PATH_PREAMBLE
  exports and node version shims apply to already-sourced shells
- Surface npm prefix and install log tail when binary still missing
- Add justfile with plugin install/reload/logs recipes
2026-11-18 18:49:23 -08:00
nandi 36d88ef168 feat: add async Sprite job manager with progress polling
- Add SpriteJobManager and job RPCs (start/get/list) for connect,
  launch, create, and sync operations
- Time-box status RPC with 5s remote timeout and lazy remote fetching
- Cache remote sprites, raw token, and host/agent lists to avoid
  redundant API calls
- Harden sprite host exec timeouts, JSON parsing, and npm install
  with --no-audit --no-fund
- UI: poll active jobs with phase updates in workers screen
- Reduce token exchange and OpenBao request timeout to 8s
2026-11-18 18:39:40 -08:00
nandi 32c02cb3cd feat: switch to managed Paseo Sprite agents, remote hosts, and Fly token exchange 2026-11-19 01:47:07 +00:00
nandi 9188bfc277 feat: add OpenBao + Zitadel OIDC device-code token integration 2026-11-18 16:43:42 -08:00
nandi d399919690 fix: scope useWorkspace to panel and add FLY_TOKEN env fallbacks 2026-11-18 16:39:17 -08:00
nandi b8f5b77931 fix: shim createRequire(undefined) for Paseo CJS plugin bundle 2026-11-18 15:24:02 -08:00
nandi 0c4027ebe5 feat: add fly-sprites-workers Paseo plugin 2026-11-18 14:49:53 -08:00