Skip to content

Read Core's address from config.json and show the installation in the console - #135

Merged
SaladDay merged 19 commits into
codex/public-urlfrom
codex/web-public-url
Sep 25, 2026
Merged

SaladDay merged 19 commits into
codex/public-urlfrom
codex/web-public-url

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Web half of the backend's phase 1a (one public address + installation read). It merges into the integration branch codex/public-url, and the backend gates the pair and takes it to main.

Changes

  • Setup wizard:
    • no Core address field; nothing sends core_url;
    • the review shows the address read-only ("Set by public_url in config.json");
    • an E2B 409 sandbox_configuration_error (non-HTTPS public address) shows inline with Core's message, the config path and the apply command.
  • "How to call" card, under a newly issued key:
    • OPENAI_BASE_URL=<api_base_url> and OPENAI_API_KEY, as a copyable env block;
    • curl and Python samples (openai==3.13.0);
    • one line on model configuration;
    • a note when the installation is local-only;
    • it replaces the old $CORE_URL example.
  • System page:
    • an Installation section: public address, API base URL, installation ID, source commit;
    • a read-only Startup settings list from GET /core/v1/installation: sensitive values show only configured/not set; "default" and "fixed after install" markers; restarted services; a header "change in <path>, then run <apply_command>".
  • Nodes page: a warning when address_bindings.nodes_on_other_address > 0.
  • Fixture:
    • serves /core/v1/installation in public, local and stale modes;
    • rejects core_url in deployment writes;
    • returns the E2B 409;
    • every node carries core_url.

packages/agents-client is identical to the base branch (the TEMP stand-in was dropped).

Docs and design context (docs/web lines for the backend's review)

  • docs/web:
    • docs/web/README.md:24: System row;
    • docs/web/protocol-coverage.md:19, 21, 109 (new installation row), 115 and 122 (deployment row).
  • Design context: apps/web/DESIGN.md and apps/web/PRODUCT.md.

Verification

  • agents-client: typecheck passes; tests 591/591.
  • apps/web: typecheck passes; tests 335/335; build passes.
  • Full web e2e: 23/23.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

The sandbox wizard no longer asks for a Core address or sends core_url:
its review shows the deployment's read-only address (config.json's
public_url) with where it is set. When Core rejects a configuration it
cannot serve (409 sandbox_configuration_error, such as E2B without an
HTTPS public_url), the wizard keeps Core's message and adds the config
file and apply command from GET /core/v1/installation; nothing is marked
uncertain. Nodes warns when nodes are still bound to an old address.
One card, under the one-time key in the issued-key dialog and the pending
key notice on Projects and keys: OPENAI_BASE_URL and OPENAI_API_KEY from
the installation's API base URL and the new key, a curl request, a Python
example with the pinned openai==3.13.0 and a note that execution needs a
model. Without a public API address it says the API is only reachable
locally. The key stays in the flow's memory only.
@SaladDay
SaladDay force-pushed the codex/web-public-url branch from b3c2a03 to 30cbf38 Compare September 25, 2026 20:13
System lists the public address, API base URL, installation ID and source
commit, then the config.json startup settings read-only: each value
(sensitive ones only as configured or not set), default and fixed markers
and the services a change restarts, under the copyable file and apply
command. The sandbox section links to the Nodes page where it changes.
The fixture serves GET /core/v1/installation (public, local-only and
stale-node modes), rejects core_url on deployment writes with 400, returns
a read-only core_url and rejects E2B with 409 sandbox_configuration_error
when public_url is not HTTPS. Acceptance covers the wizard without an
address field, the E2B rejection, the how-to-call card, the startup
settings and the stale-node warning.
DESIGN.md: the wizard shows Core's address read-only from config.json's
public_url and explains an E2B rejection inline; the how-to-call card; the
System page's sections; the Nodes old-address warning. PRODUCT.md: System
and the OPENAI_BASE_URL/OPENAI_API_KEY guidance beside a new key.
docs/web: the Platform row, the Agents API row, a GET /core/v1/installation
row and the deployment row's read-only core_url.
The real client reports each node's enrolled core_url and requires
api_base_url to be public_url followed by /v1, so a loopback install has
a local API base URL and local_only set. The how-to-call card then shows
the samples under a note that only the Core machine reaches them, and
System marks the API base URL the same way. Test node fixtures carry
core_url. The e2e fixture uses one UUID installation ID, derives
api_base_url and the stale-node count from the nodes' core_url, and the
add-node E2B test no longer fills the removed address field.
The card no longer points at a System page setting that ships separately: a model provider comes with each request, from the saved Agent or from the deployment default.
The Nodes warning now comes from the node snapshot the page already
reads: a node whose core_url differs from the deployment's core_url
(config.json's public_url). It updates with every refresh, removal and
enrollment, names the nodes and says to remove and add them again, as a
status rather than an alert. Refreshing the page also re-reads the
installation the wizard uses.
The Shell sample exports OPENAI_BASE_URL and OPENAI_API_KEY together, so
a shell that already exports one of them cannot send the new key to
another base URL. Each sample's copy button reports a refused clipboard
and selects the sample for a manual copy, as the key's own button does.
Without a public address the card says to set public_url, and a skeleton
replaces the loading line.
After a save attempt clears the E2B key, the review says to enter it
again and links back to the E2B step instead of leaving Save silently
disabled. A loopback public_url carries a caution that only the Core
machine reaches it. The E2B rejection test also checks that the key is
gone from the page.
A write that sends core_url gets Core's 400 (invalid_request_error,
param core_url, its message), and E2B on a loopback public_url gets
ErrSandboxPublicURLUnreachable's message. The installation's binding
counts follow the fixture's allocations and executor credentials.
A local install's public_url is a loopback HTTP address, so the help no longer calls it the one HTTPS address.
Core rejects E2B whenever public_url is loopback, whatever its scheme, so the wizard's caution asks for a public_url other machines can reach, and comments and docs name the loopback rule.
Installation and Sandboxes show facts-only placeholders and Startup settings a table placeholder, all silent; one status says the page is loading while either first read is out. TableSkeleton stays silent without a label.
Setup answers 200, a core_url member is rejected before any state
check, and hosted_sandboxes is the deployment's allocations plus
pending for every provider. The setup test waits for Add node and the
recorded write instead of the Runtime text, and the stale-node test
proves removal alone clears the warning.
Stale node names join as a list in the current language. The samples'
copy buttons read "Copy the Shell sample" / "复制示例:终端". A unit
test ties the Python sample's openai pin to contracts/agents-api/upstream.json,
and PRODUCT.md names the how-to-call card on the first-run screen.
ErrSandboxPublicURLUnreachable no longer ends with "then save again".
* Show a saved Agent's model provider and a dash for a missing harness

An Agent's detail page now has a Model provider section when the Agent
saved x_agents_core.model_provider: its protocol (Anthropic Messages or
OpenAI Responses), base URL, whether an API key is configured, and the
context window and max output tokens when Core reports them. The read
view has no key and the page never shows one.

A saved Agent can have a provider and no harness, so the Agents list and
the detail show "—" for a missing harness instead of "Core default".

The e2e fixture adds two Production Agents, one with only a provider and
one with a harness and a provider, appended after the seeded data so the
rest of the demo is unchanged. One acceptance test checks that the
project's Agents load, the provider-only Agent's harness reads "—", its
provider section shows every field, and no key appears.

* Mention the Agent page's model provider in the Web protocol coverage

* Show Core default again for an Agent without a saved harness

An Agent that saved no harness runs on the deployment's default harness,
so "Core default" is accurate, and it matches how the page shows unset
generation settings. The acceptance test now expects it for the
provider-only Agent.
@SaladDay
SaladDay merged commit a1b623f into codex/public-url Sep 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant