feat(claw): provision the workspace git identity at boot

Every forge thread works in a per-thread workspace, and implementer
turns end in commits. git commit refuses to run without user.name and
user.email, and a fresh workspace carries no gitconfig: the first
commit on a fresh image fails, or succeeds with whatever the agent
improvised. The agent commits as itself — its own name and address,
never the user's, never inferred from whatever accounts happen to
exist.

The identity store gains an email field beside the name, so what
onboarding collects with identity_set and the Agent · General page
edits is what commits carry. The config gains an optional git
section, an operator's override. Each field resolves independently:
config, then identity, then defaults (claw, claw@hostname).

The resolved pair is written into the daemon user's global git config
at boot, in both run shapes — a cron pass commits too. The write is
guarded: the settings store remembers the last pair the daemon wrote,
and boot rewrites a field only when the config still holds that pair
or nothing. A value anyone else set wins outright; the daemon is a
tenant of its user's machine, not the owner of its git config.

Provisioning runs from the binary's boot, not daemon assembly, so the
tests that build daemons never touch a real gitconfig. An ssh sandbox
runs git on another host and stays unprovisioned — a later story.

The web UI gains an Email row on Agent · General; the phone's wire
model gains the optional field.
This commit is contained in:
vhaudiquet committed 2026-11-22 11:53:15 +01:00
1 parent 6a81dfa466
commit 1b85cd8937
17 files changed
+598 -13

No files matched your search

@@ -261,6 +261,7 @@ data class CommandResult(val ok: Boolean, val detail: String? = null)
@Serializable
data class AgentIdentity(
val name: String? = null,
val email: String? = null,
val mark: String? = null,
val initials: String? = null,
val tagline: String? = null,