Commit Graph
6079 Commits
Author SHA1 Message Date
abkslm b2460fb6ac Merge nucleic/hazy-lunar-gecko-ck0y into dev 2026-07-17 16:29:23 -07:00
abkslm fd1b0e9bf7 Merge nucleic/quiet-opal-gecko-ah7w into dev 2026-07-17 16:03:36 -07:00
abkslm 4275e1745e Merge nucleic/tidy-north-gecko-6wqv into dev 2026-07-17 16:01:25 -07:00
abkslm 1cd4d31ba7 Merge nucleic/tidy-north-gecko-6wqv into dev 2026-07-17 15:35:17 -07:00
abkslm b2b5969e06 Merge nucleic/humble-quartz-panda-u3zj into dev 2026-07-17 15:19:20 -07:00
abkslm 84dbd0267c Merge nucleic/dusky-river-shrew-xau6 into dev 2026-07-17 15:16:12 -07:00
abkslm 9876fb4a3f Merge nucleic/humble-umber-quail-8mkq into dev 2026-07-17 15:11:00 -07:00
abkslm 1496bcd27c Merge nucleic/vivid-cedar-falcon-jzgw into dev 2026-07-17 14:56:04 -07:00
abkslm c00d7c005d Merge nucleic/keen-cedar-bison-cifb into dev 2026-07-17 14:27:45 -07:00
abkslm 6f53e324d5 Merge nucleic/upbeat-willow-tapir-knud into dev 2026-07-14 20:01:33 -07:00
abkslm fcd21d0a92 Merge nucleic/plucky-ancient-koala-2qbh into dev 2026-07-14 19:54:13 -07:00
abkslm 90bec668cf Merge nucleic/nimble-opal-gecko-yu0v into dev 2026-07-14 18:46:16 -07:00
abkslm d96d02314a Merge nucleic/warm-yarn-koala-ffjl into dev 2026-07-14 18:44:15 -07:00
abkslm 387f817813 Merge nucleic/dusky-slate-newt-1i5r into dev 2026-07-14 18:15:31 -07:00
abkslm f92118d711 sync(dev): VERSION 0.4.2 (899) -> 0.4.3 (900) — catch up to canary 2026-07-14 18:05:46 -07:00
abkslm cc69cb82cd Merge nucleic/olive-meadow-otter-vrgd into dev (host-run mediated token + login UI cleanup) 2026-07-15 00:41:27 +00:00
Andrew Blakeslee Moore 05aa9e410d Use Nucleic's mediated token for host-run Claude; hide stale login UI
Root cause of 'OAuth session expired and could not be refreshed': a host-run
(non-containerized) claude turn read claude's OWN credential store (macOS
Keychain / ~/.claude), not the login the user signed into through Nucleic — so a
stale external login failed. The broker only injected the token for containerized
turns. Now the host spawn sets CLAUDE_CODE_OAUTH_TOKEN from the broker's
freshAccessToken() (refreshed on demand), via a token-provider closure wired from
the app; container turns are unchanged.

Also hide auth artifacts a completed sign-in made stale: the 'Unauthenticated —
log in' row + Log in button and the 'Opening … sign-in in your browser…' note are
dropped once a newer 'sign-in complete' note exists (a later lapse still shows the
prompt). The completion note is kept.
2026-07-15 00:41:22 +00:00
abkslm 425ddf44f7 Merge nucleic/olive-meadow-otter-vrgd into dev (in-chat + Settings login buttons) 2026-07-15 00:13:21 +00:00
Andrew Blakeslee Moore ea920dfdee Show in-chat Log in button in all views + Settings auth state
The login affordance never appeared: the ephemeral/scratch transcript passed no
onLogin, and a fatal auth failure arrives as runFinished(.errored) with the reason
in finalText (no .error event) so AuthErrorRow never fired in the main view.

- Wire a backend-aware onLogin into the ephemeral transcript.
- Render AuthErrorRow for a runFinished(.errored) whose finalText looks like an
  auth failure, so the main + scratch views both show the button.
- Broaden isAuthError (oauth session expired / failed to authenticate / run /login).
- AppStore.login(forBackend:) routes to Claude or Codex OAuth.
- Settings > Agents: add third 'Unauthenticated' state (orange) with a Log in
  button, alongside Connected/Not Connected.
2026-07-15 00:13:16 +00:00
abkslm 3683053717 Merge nucleic/olive-meadow-otter-vrgd into dev (never read Claude Code's Keychain item) 2026-07-14 23:49:44 +00:00
Andrew Blakeslee Moore c1bc27fd1d Stop reading Claude Code's Keychain item entirely
Suppressing the prompt was a band-aid; the root cause is that ClaudeLoginKeychain
read Claude Code's foreign 'Claude Code-credentials' item on every read. Now that
Nucleic mediates its own OAuth, it has no reason to touch another app's credential.
Remove the external read, adoptExternalLoginAfterExplicitLogin, preferredLogin, and
the legacyService constant; read() returns Nucleic's own item only. Nucleic now
reads exclusively credentials it minted, so it can never raise a cross-application
Keychain prompt.
2026-07-14 23:49:37 +00:00
abkslm 4128626480 Merge nucleic/olive-meadow-otter-vrgd into dev (no Keychain prompt on legacy reads) 2026-07-14 23:42:46 +00:00
Andrew Blakeslee Moore c023dd3220 Never raise a Keychain prompt when reading legacy login items
The legacy login-Keychain ACL/partition-list panel ("<app> wants to use
'Claude Code-credentials'…") is not governed by kSecUseAuthenticationUIFail,
so Nucleic Dev.app prompted when reading Claude Code's item. Wrap every legacy
read in SecKeychainSetUserInteractionAllowed(false) so it fails silently instead
of prompting; an already-trusted item still reads without UI. Drop the redundant
(and deprecated) kSecUseAuthenticationUIFail flag.
2026-07-14 23:42:38 +00:00
abkslm f3557e172e Merge nucleic/olive-meadow-otter-vrgd into dev (restrict agent auth to mediated credentials) 2026-07-14 23:32:44 +00:00
Andrew Blakeslee Moore da139c31d5 Restrict agent auth to Nucleic-mediated credentials
Stop sandbox/control containers from inheriting ambient ANTHROPIC_API_KEY/
OPENAI_API_KEY/CODEX_API_KEY (which override the mediated OAuth login); keep
the in-Nucleic API-key stores. Scrub the same keys from host_exec subprocesses
via ProcessSpec.removeFromEnvironment. Agent-spawned containers/VMs already
receive no credentials.
2026-07-14 23:32:35 +00:00
abkslm d5afc90dc3 Merge nucleic/olive-meadow-otter-vrgd into dev (native OAuth mediation + usage-token refresh) 2026-07-14 23:10:01 +00:00
Andrew Blakeslee Moore 1771a6b9ae Mediate usage-token refresh + Codex auth follow-ups 2026-07-14 23:00:12 +00:00
abkslm 85a4992e1f Merge nucleic/humble-opal-ferret-jlos into dev 2026-07-14 05:05:06 -07:00
abkslm 643ab58fd6 Merge nucleic/mellow-drift-lemur-o6gt into dev 2026-07-14 04:59:48 -07:00
abkslm 90de1b3316 Merge nucleic/vivid-meadow-tapir-30hu into dev 2026-07-14 04:49:58 -07:00
abkslm 3c62e1e102 Merge nucleic/olive-dewy-urchin-megz into dev 2026-07-14 04:40:04 -07:00
abkslm 3d8e96b995 Merge nucleic/bold-fern-raven-pfer into dev 2026-07-14 04:30:20 -07:00
abkslm f51f5b41e5 Merge nucleic/warm-ancient-lemur-kprc into dev 2026-07-14 01:32:30 -07:00
abkslm 472b46157c sync(dev): VERSION 0.4.1 (892) -> 0.4.2 (899) — catch up to canary 2026-07-14 01:08:39 -07:00
abkslm 99f313eba4 Merge nucleic/amber-yarn-ferret-43bn into dev 2026-07-14 00:56:30 -07:00
abkslm 0fcf1c61f5 Merge claude/nucleic-stdio-stall-391480 into dev 2026-07-14 00:47:08 -07:00
abkslm 254e417cd5 Merge branch 'dev' into claude/nucleic-stdio-stall-391480 2026-07-14 00:45:03 -07:00
abkslmandClaude Fable 5 ab9f836a05 Fix the all-sessions stdio stall: UnixSocketByteConn read-after-close on recycled fds
The "agent started but produced no output within 60s / stdio transport
stalled" lockup was never in the container stack — it was the approval
server's unix-socket transport. UnixSocketByteConn.close() did
shutdown(2)+close(2), freeing the fd NUMBER while the serve loop could
still dispatch its next blocking read(2) on the stored raw int. The race
arms on every SSE-streamed tools/call (respondStreamingToolCall closes
the connection mid-serve-loop; instant auto-approvals make the window
widest). The straggler read then landed on a RECYCLED descriptor —
another session's MCP socket, a container's stdout vsock channel —
parking a global-queue thread forever on, and stealing bytes from, an
unrelated stream. Zombies accumulated until every session stalled at
once (the 2026-07-14 00:02 wedge: 26 threads parked in receive() with
only 2 live unix connections). Yesterday's container-side fixes were
correct but orthogonal, which is why build 898 still stalled.

Fix: close() now only shuts the socket down (wakes a parked read with
EOF, fails later writes with EPIPE); the descriptor is close(2)d exactly
once, in deinit, and every offloaded read/write block strongly captures
self so the fd number cannot be recycled while any block that could
still pass it to the kernel is in flight. receive() is additionally
cancellation-aware, so stop()'s task cancellation unwedges parked reads
instead of stranding them. Regression test drives ten SSE-close /
fresh-connect cycles over a real AF_UNIX socket.

Also found while validating the earlier patch: ensureInitfs trusted a
bare cached vminit.ext4 forever, so repointing vminitReference at the
custom -nucleic1 image never took effect (containers still boot the
Jun-21 upstream initfs — guest patch #8 never actually deployed). The
cache is now keyed on the reference via a sidecar file, the pull
authenticates against GHCR with the app's GitHub token (the package is
private; anonymous pulls 403), and a failed re-pull falls back to the
existing cache so an offline launch still boots.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-14 00:40:48 -07:00
abkslm db36fd5973 Merge branch 'dev' into nucleic/olive-meadow-otter-vrgd 2026-07-14 00:40:17 -07:00
abkslm a31215b523 Merge nucleic/olive-meadow-otter-vrgd into dev 2026-07-14 00:40:17 -07:00
abkslm eaefdadf5a Nucleic: OAuth Mediation Implementation 2026-07-14 00:40:17 -07:00
abkslm 07100adb70 Merge nucleic/golden-river-urchin-xgtc into dev 2026-07-14 00:36:10 -07:00
abkslm 5e868fc776 Merge nucleic/dusky-pebble-koala-hhlc into dev 2026-07-13 23:42:21 -07:00
abkslm 3596d68803 Merge nucleic/hazy-drift-toad-gxbg into dev 2026-07-13 23:42:06 -07:00
abkslm dd34a94602 Merge nucleic/eager-quartz-ibis-ncl9 into dev 2026-07-13 23:41:44 -07:00
abkslm 57842cce30 Merge nucleic/dusky-grove-lemur-l5km into dev 2026-07-13 23:40:18 -07:00
abkslm a3cb51b2af Merge branch 'dev' into nucleic/olive-meadow-otter-vrgd 2026-07-13 23:34:37 -07:00
abkslm 7332b36d1b Merge nucleic/olive-meadow-otter-vrgd into dev 2026-07-13 23:34:37 -07:00
abkslm cc3dcbcea6 Nucleic: OAuth Mediation Implementation 2026-07-13 23:34:37 -07:00
abkslm 8b7ce6f527 Merge nucleic/hazy-jade-shrew-o4on into dev 2026-07-13 23:17:28 -07:00