Repository navigation
fix(occ): show the Agent name in the native admin UI - #3876
Conversation
The OpenClaw Control UI reads its assistant name from the served Agent's identity.name and falls back to "Assistant". OCC never wrote one, so the native admin UI ignored the name set in the OCC Console. Deployment now saves the OCC Agent name as the sole roster entry's identity.name in the revision snapshot, under agents.entries.main when the roster is omitted. A name the Configuration sets wins, a roster of several entries is unchanged, and the reusable Configuration is not modified. The name is added after admission checks, so refusals name only settings the Configuration writes. The native admin k3d proof now checks the Gateway bootstrap document's assistantName. Snapshot assertions and the first-Agent helper expect the added name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pinned Control UI boots from the bootstrap configuration the Gateway embeds in the served document (data-openclaw-bootstrap-config) and fetches control-ui-config.json only on a later refresh, so the first assertion never observed a response. Read the embedded configuration instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
The PostgreSQL Kubernetes platform-state test compares revision snapshots and stored draft specs exactly; they now carry the main entry named after the Agent. Kubernetes Compute pins the dedicated Codex Gateway workspace on that main entry as well as on the defaults, so the real-cluster native document expectation does the same. Shorten the Configuration reference sentence that took the page one word past the 2,500-word hard limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The ClawSweeper input-safety hold on this PR is a false positive in an existing fixture, not material this PR adds.
A maintainer can qualify that fixture line and release the hold, so the automatic review can run. |
freeqaz
left a comment
There was a problem hiding this comment.
Free's clanker here (an AI agent working on Free's behalf). Comment-only review of 476983cf7f.
Summary: correct, and the snapshot tests are updated. Nothing blocks landing.
withAgentIdentityName: it leaves these unchanged:agents.listshapes, non-objectagents/entries/identity, empty or multi-entry rosters, and an entry that already setsidentity.name. It runs after every admission check, and the result is frozen withfrozenValues. OpenClaw'sIdentitySchematakesnameas any string. Its roster rules also treat an entry withoutmodelas sharingagents.defaults, so the addedmainentry does not change model selection.- k3d and PostgreSQL snapshot tests: the earlier head failed
postgres-platform-state-kubernetesdeep-equal checks on the newentries.main.identity.name.476983cf7updates that file andkubernetes-compute-real.mjs. On this head, CI Required is green, including k3d State and Lifecycle, k3d Fixture and Configuration, PostgreSQL Platform and First Agent Smoke. The PR merges cleanly with main. - Verification:
configuration-occandsecret-occconformance passed 56/56 with 0 skipped on a remote test VM.
Non-blocking:
- No test covers the two "unchanged" cases the description lists: a roster of several entries, and a single non-
mainentry key (which should get the name). A small case for each inconfiguration-occ.test.mjswould protect the rules described indeployment.md. first-agent-model.mjsreplacesexpected.agents.entrieswholesale. That is right for the helper's own Configuration, which has no roster. If that Configuration ever gains entries, the exact-match check will refuse every revision. A short comment there would help.native-admin-k3d-realis not in CI. The description says its finalassertManagedNativeConfigWriteRejectedstep timed out and was not compared with main. It would be good to know whether main fails the same way before relying on that file.
Problem
The Agent name set in the OCC Console does not reach the OpenClaw native admin UI, which keeps showing the stock name "Assistant".
The pinned OpenClaw Gateway (
src/gateway/assistant-identity.ts) resolves the assistant name fromagents.entries.<id>.identity.nameof the first roster entry (ormainwhen the roster is omitted), then theName:line of the workspaceIDENTITY.md, then the default"Assistant". OCC wrote neither from the Agent'sname.Change
Deployment now saves the OCC Agent
nameas the served OpenClaw Agent's display name in the revision snapshot (AgentRevision.configuration):identity.name.agents.entries.mainwith onlyidentity.name, themainentry the Gateway already serves.identity.namethe Configuration sets, a roster with several entries, and the reusable Configuration.withAgentIdentityName(packages/occ/src/openclaw-roster.ts) applies this after every admission check, when OCC freezes the snapshot. Refusals therefore name only settings the Configuration writes: an addedmainentry would otherwise make a draft with no model fail onagents.entries.main.model. No Driver contract changes; Compute Drivers receive the snapshot as before.OpenClaw consequences of
identity.name:[name]prefix only whenresponsePrefix: "auto"is set.identityadds no tool policy.Also in this PR:
scripts/first-agent.mjschecks each revision snapshot exactly and now expects the name.tests/helpers/agent-identity.mjs.assistantName.docs/reference/agents/deployment.md), the deployment flow, the Configuration reference, and the Console Agent details guide.Verification
Local, on the branch before merging main (base
09e9cb6e4), with its matching dependency install:configuration-occ33/33,secret-occ20/20,controller-lifecycle41/41,configuration-controller251/251,occ-api74/74,first-agent-startup10/10./tmp, socket binds, missinggh, OpenShell gRPC, file modes).After merging main (
96d90e2cb):configuration-occ.test.mjs.configuration-occ,controller-lifecycle,configuration-controllerandocc-apicases. The merged branch has one extra pass, the new name test. CI must confirm with the current dependencies.Real k3d,
gateway-routinglane prepared withscripts/ci/prepare.mjs, modelgpt-6.1-sol, images built from31e879772, before main was merged; not rerun at this head:production native admin UI opens through OCC and preserves Agent boundaries:data-openclaw-bootstrap-confighasassistantNameequal to the Agent name cut to 50 characters.Message production-dedicated-fc453984-c1c1-4039-9837-37952instead ofMessage Assistant.assertManagedNativeConfigWriteRejectedtimed out waiting forConfig is externally managed. Not investigated; I have not established whether it also fails on main. The check was added in feat: add Gateway managed mode to Agent deployments #2982, before feat(runtime): apply Gateway tool policy to dedicated OCE deployments #2633 moved the OpenClaw pin.two people share an embedded native Gateway with selective stream withdrawal: passed.production dedicated Codex consumes Envoy-routed workspace files through OCC: not rerun after the memory fix.prepareFile, becauserun-tests.mjsstripsOCC_TEST_BROWSER_EXECUTABLEand the host had only system Chromium.Not run:
pnpm docs:checkandpnpm docs:check-length: the local install lacked the docs-site packages.docs/reference/agents/deployment.mdwas near the 2,500-word limit before this change.Risks
first-agenthelper refuses a revision without the name ("changed outside this helper") until that Agent is redeployed.mainentry. OpenClaw servesmaineither way, and the entry inheritsagents.defaults. Topology, workspace setup and tool policy rules treat it like the implicit roster.🤖 Generated with Claude Code